Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

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

Step: 3

blur-text-image

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

Oracle 10g Database Administrator Implementation And Administration

Authors: Gavin Powell, Carol McCullough Dieter

2nd Edition

1418836656, 9781418836658

More Books

Students also viewed these Databases questions

Question

How is the NDAA used to shape defense policies indirectly?

Answered: 1 week ago

Question

The certainty effect and subcertainty are opposite phenomena.

Answered: 1 week ago