subject

Purpose: To model a DFA (Deterministic Finite Automaton) and use it to accept strings of the associated language. Input: The program should take the DFA description from a text file that is specified as a command line parameter. If this parameter is missing, the user should be prompted for the data file. Strings to be tested for inclusion in the language should be entered interactively by the user.
Output: For each string being tested, the program should indicate whether or not the string is accepted.
DFA input format: line 1: alphabet - eg. {0,1}
line 2: states - eg. {a, b,c, d,e}
line 3: start state - eg. a
line 4: accept states - eg. {d, e}
lines 5-: transition fn - eg. (a,0)->b (a,1)->c etc
Notes: • Assume no spaces in input. • Alphabet must at least allow {0,1}. Please feel free to expand this. • States must at least allow lower case letters, but you are welcome to expand this to numerals and upper case letters. • Transition functions may appear in any order in the input text file. End of the input file indicates the end of transition functions. • Name the source code file Dfa. java.

ansver
Answers: 2

Another question on Computers and Technology

question
Computers and Technology, 22.06.2019 11:00
The editing of digital photos us about the same level of difficulty as editing an analog photo
Answers: 2
question
Computers and Technology, 22.06.2019 12:20
Usually, when we sniff packets, we are only interested certain types of packets. we can do that by setting filters in sniffing. scapy’s filter use the bpf (berkeley packet filter) syntax; you can find the bpf manual from the internet. set the following filters and demonstrate your sniffer program again (each filter should be set separately): (a) capture only the icmp packet. (b) capture any tcp packet that comes from a particular ip and with a destination port number 23. (c) capture packets comes from or to go to a particular subnet. you can pick any subnet, such as 128.230.0.0/16; you should not pick the subnet that your vm is attached to.
Answers: 3
question
Computers and Technology, 23.06.2019 19:30
Anul 2017 tocmai s-a încheiat, suntem trişti deoarece era număr prim, însă avem şi o veste bună, anul 2018 este produs de două numere prime, 2 şi 1009. dorel, un adevărat colecţionar de numere prime, şi-a pus întrebarea: “câte numere dintr-un interval [a,b] se pot scrie ca produs de două numere prime? “.
Answers: 1
question
Computers and Technology, 23.06.2019 20:30
If an appliance consumes 500 w of power and is left on for 5 hours, how much energy is used over this time period? a. 2.5 kwh b. 25 kwh c. 250 kwh d. 2500 kwh
Answers: 1
You know the right answer?
Purpose: To model a DFA (Deterministic Finite Automaton) and use it to accept strings of the associa...
Questions
question
Computers and Technology, 14.07.2019 15:00
Questions on the website: 13722360