Question: Write everything using a java code, not any other language. 1. Write a Java program to read in a DSFM, then decides if an input

Write everything using a java code, not any other language.Write everything using a java code, not any other language. 1. Write

1. Write a Java program to read in a DSFM, then decides if an input string is accepted by the DSFM or not. You can assume the input DSFM is legal, and states are named with single letters. Note . The program has 2 parts: l. Read in the start tate, the final states, and the transitions of the input DSFM. (no need to read| K or since the transitions would imply those) -Use a Vector String to store the set of final states. . Use a Vector to store the set of tansitions. 2. Determine if an input string is accepted or rejected based on algorithm dfsnSimulate. String methods such as sta With, and substring are useful . The following run is for the DSFM deseribed in Ex2-4-1: nter final states, 1 on each line. Enter to end; nter trons itions, 1 *nach line with no ws 1 state, letter,state. Enter 0,8,0 to end: b.t nter input string. enter done to endia nter input string, enter done to end:ab ccept er input string, nter, dare to nd:ahb eject nter input string. enter done to end:aba ccept nter input string, enter done to erd :abda ccept nter input string. enter done to end:abbb nter input string, enter done to end:b ccept er input #tring, enter done to end:hb eject

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!