Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Write programs that can build a DFA based on the specifications and then process the strings and decide whether they are accepted 2. 3. Your

image text in transcribed

Write programs that can build a DFA based on the specifications and then process the strings and decide whether they are accepted 2. 3. Your code will need to read in two input files then output your answer to a file as well. 4. The user will type the names of the input files and the name of the output file to the command line (not through the keyboard terminal). 5. For example if the user provides the following command line inputs (in one line) ". . /COSC485_P1 DFA. txt" "../ cosc485-P1-strings. txt" COSC485 P1 Answers. txt" ../ a. Then COSC485_P1_ DFA. txt is the file that contains the specifications for a DFA h. COSC485_P1 Strings. txt is the ile that contains some number of strings c. COSC485_P1Answers.txtwill be the file thal you create to write your answer to, which contains the information that which of the strings arc accepted by the DEA and which are not; d. The users may choose ouher file names they desire but the order of therm won't changc, t means the first file will be the specifications of a DFA: the second file will be a set of strings; and the uhird file will be the answers Sample files are provided, but the sample input files are by nO mean listing all testing cases. You have to add testing cascs to the input file to test your program completely. What you can assume is that the input file structure will be the same as those sample input files. c. 6. The specifications of a DFA may or may not omit the transitions leading to a sink/dead state That is Lo say, any missing transition may come out of a state is assued ogo into a sink dead state (such a state may or may not be specified as one element of the set of states)

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions