How to construct a DFA for truncate the rightmost symbol from a given string?

1.2k Views Asked by At

If I have a truncate operation defined which removes the rightmost symbol from a string ,for instance I have a string say aababb so it removes the rightmost symbol b and the output is aabab.

so how to approach this question

1

There are 1 best solutions below

2
On

HINT: Start with a DFA for the original language $L$, and modify it to get a DFA for the truncated language. The only part of it that you need to change is the set of acceptor (final) states.

A state should be an acceptor state in the new automaton if there is a transition from it to a state that was an acceptor state in the old one.