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, 23.06.2019 14:00
Technician a says that with self-adjusting clutch systems, the release bearing constantly rotates. technician b says that the ball bearing portion of the release bearing should be lubricated with high-temperature grease during routine maintenance. which technician is correct?
Answers: 2
question
Computers and Technology, 24.06.2019 03:30
Explain the importance of html in web page designing in 20 sentences..
Answers: 1
question
Computers and Technology, 24.06.2019 17:40
Anewly established internet company with 40 employees needs your advice. they are looking for a collaboration tool and have narrowed their choices to gotomeeting, webex, and my web conferences. after reading the information presented in this chapter and other sources, prepare a two- page document ( double spaced) that includes two advantages and two disadvantages of each tool. which one is your final recommendation? why did you choose that tool over the other two?
Answers: 3
question
Computers and Technology, 24.06.2019 17:50
Create a class hand in its own module. one object of class hand represents a hand of cards and so one object stores a number of card objects. for this assignment you will submit three separate modules, one with the definition of class card, one with the definition of class hand and one with the main application that thoroughly tests class hand.class hand must contain the following four methods: 1) , numcardsinhand) takes an integer as parameter and initializes a hand object with numcardsinhand card objects inside it. these card objects are generated randomly. for simplicity, assume an infinite number of decks of cards.2) bjvalue(self) returns the blackjack value for the whole hand of cards3) ) returns a string containing all the cards in the hand4) hitme(self) adds one randomly generated card to the handcreate a main program in its own module that thoroughly tests class hand. you will have three modules/files to upload to your etudes assignment submission: card.py, hand.py and the module that contains your main program.two alternatives for extra credit - you cannot get credit for both! (+1 point): after you have thoroughly tested the class hand and all of its methods, add code to your main program that stores one hand object as a pickle file and reads it back into a new hand object. you are only eligible for this extra credit if class hand has all four of the methods above working.or(+2 points): after you have thoroughly tested the class hand and all of its methods, add code to your main program that stores one hand object as a text file on the disk and reads it back into a new hand object. you are only eligible for this extra credit if class hand has all four of the methods above working.notes: -start by making any and all modifications suggested by my comments to your previous submission of class card from assignment #6 "a robust card object"-once your class card is tested and working well, you will not make any further modifications to it for the purposes of class hand.-you can keep the test code for class card intact. if it is indented inside an if __name__ == "__main__", then it will not be executed when your main program's module imports it.-to save time, write and test one method for class hand at a time.-under no circumstances are you to attempt the extra credit until you are completely finished with writing and testing all the methods in class hand.
Answers: 3
You know the right answer?
Purpose: To model a DFA (Deterministic Finite Automaton) and use it to accept strings of the associa...
Questions
question
Spanish, 03.03.2021 01:00
question
Mathematics, 03.03.2021 01:00
question
History, 03.03.2021 01:00
question
Mathematics, 03.03.2021 01:00
question
Mathematics, 03.03.2021 01:00
question
Mathematics, 03.03.2021 01:00
question
Mathematics, 03.03.2021 01:00
question
History, 03.03.2021 01:00
question
Arts, 03.03.2021 01:00
question
Mathematics, 03.03.2021 01:00