Question: Implement a NFA simulator in C as well as C++ in a Linux environment: = Read in a specified machine (5-tuple definition) and process input

Implement a NFA simulator in C as well as C++ in a Linux environment: = Read in a specified machine (5-tuple definition) and process input strings against this NFA; output ACCEPT or NOT ACCEPT for each input string. = All error checking must be performed including command line argument parsing, valid definition file, valid input string etc. = Full help usage must be provided which should be self sufficient to run the program. = Input string is read from stdin which means following should work = ./nfa -d m1.dfa m1.out = cat m1.in | ./nfa -d m1.dfa = -v option should provide verbose information on the working of the machine; for example display the definition of the machine, transitions as input is processed etc.

Deliverables = Source files = Sample Input/output = Define 3 machines: 1.6 b, c, f and show at least 3 ACCEPT and 3 NOT ACCEPT examples for each.

Heres question 1.6 for your reference. 1.6 Give state diagrams of NFAs recognizing the following languages. In all parts, the alphabet is {0,1}. b. {w| w contains at least three 1s} c. {w| w contains the substring 0101 (i.e., w = x0101y for some x and y)} f. {w| w doesnt contain the substring 110} = Define machine for a*.c; show at least 3 ACCEPT and 3 NOT ACCEPT examples

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!