Theorem 1.39 on Page 55 of textbook [Introduction to the Theory of Computation:Sipser Introduction to the Theory of Computation 3rd Edition] says that every NFA has an equivalent DFA, followed by the construction
procedures of equivalent DFA given a NFA. In this project, will write a program using Using Java Programming to implement part of such construction procedures.
Read part of the transition table of a NFA from a txt file, suppose this table only contains two columns: the first
column lists out the states, while the second column lists out what each state jumps to upon the input e. For
example, given the following transition table in a txt file:
1,{2, 3}
2,empty 3,{4}
4,empty
We know the corresponding NFA contains the following set of states: 1, 2, 3, 4 . Also state 1 jumps to states 2,
3 upon the input of ε, while state 2 does not have an outgoing arrowhead with ε on, namely it jumps to ∅ upon the input of ε (in the txt file we use “empty” to denote empty set ∅).
Read part of the transition table of a NFA from a txt file, and then print out the set of states the equivalent DFA has and E(q) for each q in the set of states of the NFA. For example, for the above part of the transition table of a NFA, the print out should be
State set of the equivalent DFA = {empty, {1}, {2}, {3}, {4}, {1, 2}, {1, 3}, {1, 4}, {2, 3}, {2, 4}, {3, 4}, {1, 2,
3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 3, 4}}
E(1) = {1,2,3,4}
E(2) = {2}
E(3) = {3,4}
E(4) = {4}
Note that your program must be able to work for any input, not only just for the above given example.
The following are a few more examples you can use to test your program (I highly recommend that you come up with more examples to make sure the correctness of your program):
(1) 1,{3}
2,empty 3,empty
For the above part of the transition table of a NFA, the print out should be
State set of the equivalent DFA = {empty, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}
E(1) = {1,3}
E(2) = {2}
E(3) = {3}
(2) 1,{3}
2,{1}
3,empty
For the above part of the transition table of a NFA, the print out should be
State set of the equivalent DFA = {empty, {1}, {2}, {3}, {1, 2}, {1, 3}, {2, 3}, {1, 2, 3}}
E(1) = {1,3}
E(2) = {1,2,3}
E(3) = {3}
(3) 1,{2,3}
2,empty 3,{4,5}
4,empty 5,empty
For the above part of the transition table of a NFA, the print out should be
State set of the equivalent DFA = {empty, {1}, {2}, {3}, {4}, {5}, {1, 2}, {1, 3}, {2, 3}, {1, 4}, {2, 4}, {3,
4}, {1, 5}, {2, 5}, {3, 5}, {4, 5}, {1, 2, 3}, {1, 2, 4}, {1, 3, 4}, {2, 3, 4}, {1, 2, 5}, {1, 3, 5}, {2, 3, 5}, {1,
4, 5}, {2, 4, 5}, {3, 4, 5}, {1, 2, 3, 4}, {1, 2, 3, 5}, {1, 2, 4, 5}, {1, 3, 4, 5}, {2, 3, 4, 5}, {1, 2, 3, 4, 5}}
E(1) = {1, 2, 3, 4, 5}
E(2) = {2}
E(3) = {3, 4, 5}
E(4) = {4}
E(5) = {5}
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Example:
1,{2, 3}
2,empty
3,{4}
4,empty
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Test 1:
1,{3}
2,empty
3,empty
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Test 2:
1,{3}
2,{1}
3,empty
– – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – – –
Test 3:
1,{2,3}
2,empty
3,{4,5}
4,empty
5,empty
Our Advantages
Plagiarism Free Papers
All our papers are original and written from scratch. We will email you a plagiarism report alongside your completed paper once done.
Free Revisions
All papers are submitted ahead of time. We do this to allow you time to point out any area you would need revision on, and help you for free.
Title-page
A title page preceeds all your paper content. Here, you put all your personal information and this we give out for free.
Bibliography
Without a reference/bibliography page, any academic paper is incomplete and doesnt qualify for grading. We also offer this for free.
Originality & Security
At Homework Sharks, we take confidentiality seriously and all your personal information is stored safely and do not share it with third parties for any reasons whatsoever. Our work is original and we send plagiarism reports alongside every paper.
24/7 Customer Support
Our agents are online 24/7. Feel free to contact us through email or talk to our live agents.
Try it now!
How it works?
Follow these simple steps to get your paper done
Place your order
Fill in the order form and provide all details of your assignment.
Proceed with the payment
Choose the payment system that suits you most.
Receive the final file
Once your paper is ready, we will email it to you.
Our Services
We work around the clock to see best customer experience.
Pricing
Our prces are pocket friendly and you can do partial payments. When that is not enough, we have a free enquiry service.
Communication
Admission help & Client-Writer Contact
When you need to elaborate something further to your writer, we provide that button.
Deadlines
Paper Submission
We take deadlines seriously and our papers are submitted ahead of time. We are happy to assist you in case of any adjustments needed.
Reviews
Customer Feedback
Your feedback, good or bad is of great concern to us and we take it very seriously. We are, therefore, constantly adjusting our policies to ensure best customer/writer experience.