Page 1 of 1

a This program is a simple demo of DFA. A DFA with following characteristics: No of states is 4: 90, 91, 92, 93, and q4

Posted: Fri May 20, 2022 6:05 pm
by answerhappygod
A This Program Is A Simple Demo Of Dfa A Dfa With Following Characteristics No Of States Is 4 90 91 92 93 And Q4 1
A This Program Is A Simple Demo Of Dfa A Dfa With Following Characteristics No Of States Is 4 90 91 92 93 And Q4 1 (36.31 KiB) Viewed 17 times
a This program is a simple demo of DFA. A DFA with following characteristics: No of states is 4: 90, 91, 92, 93, and q4 No of symbols is 2: 'a' and 'b' Start state is go The DFA accepts any string that ends with either aa or bb Input string is read from a file. File name is provided by user as command line argument. Input string MUST have a $ symbol as sentinel value in the end. Hint: You need to draw the DFA and its corresponding state table. From state table you can implement your logic by using goto statements. If an invalid input symbol is received the program should terminate with an appropriate message. Sample Run $ gee labb.c -o labo $ ./labb infile Input string is: abb$ State transitions are shown below: Received a on state go - Moving to state : Received b on state qi - Moving to state q3 Received bon state q3 Moving to state 4 End of string. String accepted