Question: Draw a deterministic finite state machine that accepts the language of file paths for a specific system.. A file path consists of at least one

Draw a deterministic finite state machine that accepts the language of file paths for a specific system..
A file path consists of at least one directory name and only one file name, separated by "/".
The path must start with "/"
The first directory name must start with one letter, then follow by one or more digits or letters
The rest directory name(s) can include letters and digits, and should not be empty
A file name can include letters, digits and dots
A file name cannot start with a dot
A file name cannot end with a dot
A file name cannot have two or more dots in a row
A file name must have at least one dot
Valid samples:
/B7a/7ak/b/c/P1.java
/T11d11/is/a/very/l0ng/directory/a.file
/f3/123.456.789
/b53/Dot/is.necessary
Invalid samples:
/P1.java
/1his/is/a/very/long/directory/.file
/foo/I.have.too..many.dots
//empty.directory
/A5/.abc.
Label the edges of your FSM with words slash, dot, letter and digit.

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!