-4

I'm having trouble understanding how to convert. I made a state table for NFA but enter image description here

This alphabet instead of (a,b) makes me confused. Can anyone help me how to convert this NFA to DFA?

enter image description here

alongova
  • 35
  • 5
  • 1
    This question is probably most suited for the [mathematics stack exchange site](https://math.stackexchange.com) – kyriakosSt Jun 21 '20 at 23:35
  • You can do that by using JFLAP.[![enter image description here](https://i.stack.imgur.com/OeqBV.jpg)](https://i.stack.imgur.com/OeqBV.jpg) –  Jun 21 '20 at 23:42
  • Are you sure this DFA is right? I don't understand. I think there has to be dead state isn't there? – alongova Jun 21 '20 at 23:50
  • @alongova -- not necessarily. – xilpex Jun 22 '20 at 02:28
  • @Xilpex If i wanna add , where do i have to put that dead state? and why its not necessarily? – alongova Jun 22 '20 at 02:52
  • @alongova -- you will go to the dead state if there is no transition from a state upon a character. It is good for emphasis, but not required. – xilpex Jun 22 '20 at 03:53

2 Answers2

0

You have a typo in your table the transition for state 5 on 0 should be 3,4 not 3,5.

Once you fix that, you can convert to a DFA by starting with the NFA state table and adding states for all (reachable) sets of NFA states until you reach closure (a complete DFA where each DFA state corresponds to a set of NFA states).

In this case, it is quite easy -- you have one additional DFA state to add ({3,4}), and it gets the union of the transitions from 3 and 4. Then you're done -- you have a complete 6 state DFA with two accepting states. You can simplify it by pruning off the states that cannot possibly reach an accepting state (state 3 in this case).

Note that you could have done the useless state pruning from the NFA, in which case you wouldn't have needed to add any states to convert it to a DFA.

Chris Dodd
  • 119,907
  • 13
  • 134
  • 226
0

In a DFA, for a particular input character, the machine goes to one state only. A transition function is defined on every state for every input symbol. Hence we added a dummy state in this problem. While converting NFA to DFA we obtain an new state named {3,4}

Final states are {4} & {3,4}

DFA Equivalent Transition Diagram

1

vimuth
  • 5,064
  • 33
  • 79
  • 116