Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

In Java Write a program that (1) accepts an input set of strings on lower case English letters and create a Non-deteministic Finite State Automaton

In Java

image text in transcribed

image text in transcribed

image text in transcribed

Write a program that (1) accepts an input set of strings on lower case English letters and create a Non-deteministic Finite State Automaton (NFSA) for accepting only that set, and (2) creates an equivalent Deterministic Finite State Automaton (DFSA) corresponding to the NFSA using the subset construction algorithm covered in class. Sample input: be bear Sample output of phase 1 -NFSA: (1) number of states: 11 (2) final states: 2,6, 10 (3) alphabet: a b c d e fg h ij k1 mnopgrstuvwxyz (4) transitions: o b1 3 5 r 6 8 r9 9 e 10 Sample output of phase 2 - The equivalent DFSA: (1) number of states: 9 state 0: 0 state 1: 3 state 2: 7 state 3: 12 41 state 4: 8; state 5: (5 state 6: 9 state 7: 6; state 8: 10 (2) final states: 3, 7,8 (3) transitions: state 0: b 1, c 2 state 1: e 3 state 2: a 4 state 3: a 5 Write a program that (1) accepts an input set of strings on lower case English letters and create a Non-deteministic Finite State Automaton (NFSA) for accepting only that set, and (2) creates an equivalent Deterministic Finite State Automaton (DFSA) corresponding to the NFSA using the subset construction algorithm covered in class. Sample input: be bear Sample output of phase 1 -NFSA: (1) number of states: 11 (2) final states: 2,6, 10 (3) alphabet: a b c d e fg h ij k1 mnopgrstuvwxyz (4) transitions: o b1 3 5 r 6 8 r9 9 e 10 Sample output of phase 2 - The equivalent DFSA: (1) number of states: 9 state 0: 0 state 1: 3 state 2: 7 state 3: 12 41 state 4: 8; state 5: (5 state 6: 9 state 7: 6; state 8: 10 (2) final states: 3, 7,8 (3) transitions: state 0: b 1, c 2 state 1: e 3 state 2: a 4 state 3: a 5

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_2

Step: 3

blur-text-image_3

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

Database Design For Mere Mortals

Authors: Michael J Hernandez

4th Edition

978-0136788041

More Books

Students also viewed these Databases questions

Question

Over what timescale should the project be undertaken?

Answered: 1 week ago