I want to solve the problem 2.24 of "Introduction to the theory of computation" Sipser 3th edition, below:
Let G be the following grammar:
S → T-
T → TaTb | TbTa | ε
( - is the end symbol for endmarked languages)
Use the DK-test to show that G is a DCFG. Describe a DPDA that recognizes L(G)
I tried using the DK-test but this showed me that G is not DCFG, but this is impossible because i build a DPDA that recognizes L(G).
Can someone tell me why i'm running the DK-test wrong?
I can't post photos of my work (because i don't have enough reputation), but i can explain what i did: I build the DFA DK for show that G is DCFG, but following the symbols T-a-T-b i reach in a DFA DK's state that has 2 complete rules
T→TaTb.
T→.
and this means that the grammar G is not a DCFG, but this is not true. I can't see what i'm doing wrong.