Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Problem 1 : FSA ( 3 0 pts ) Design an FSA that checks if a given email address is in the correct format [

Problem 1: FSA (30 pts)
Design an FSA that checks if a given email address is in the correct format [1], as follows:
An email address is divided into two parts: local part, followed by the @ symbol, followed by the domain part. The local part consists of any combination of alphabetic characters, digits, or any of the following special characters:
! # $ % &*+/=?^_`.{|} ~
The only other constraint for the local part is that the period character cannot be the first or last character, and there cannot be two or more consecutive periods. The domain part should be a series of period-separated DNS labels. (Example: cs.fiu.edu) Each DNS label consist of any combination of alphabetic characters, digits, and hyphens. The labels cannot be all numeric and hyphens cannot be the first or last character of a label.
[1] Email address format as defined by RFC 3696,5321,5322,6530.
Problem 2: Regular Expressions (10 pts)
Write your solution to Problem 1 as a regular expression, using the conventions as described in the textbook.
Problem 3: Complex FSA (60 pts)
a)(2pt) Design a FSA that will recognize sentences such as
Namely, the sentences should look like Theres an THING1 on/in the THING2 on/in the THING3... on/in the THINGn, where THINGn is a thing, and where the maximum n can be arbitrarily large. Assume that words are fed to the FSA one at a time (not a character at a time), and your FSA may include one special transition that tests whether a word represents
a noun or not.
b)(2pts) Design an FSA that recognize sentences such as The mouse the cat the dog chased ate lived in the house that Mary built., namely ANIMAL1 ANIMAL2 ANIMAL3...VERBED3 VERBED2 VERBED1 lived in the PLACE1 which Mary built. Assume that n <=3 and that you have two special transitions available, one that tests whether a word represents an animal, and the other that tests whether a word is a verb.
c)(2pts) For part (b), would it be possible to design an FSA that would work to arbitrary depth n? Why or why not? What is different between the FSA is part (a) and in part (b)?

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

Advances In Spatial Databases 2nd Symposium Ssd 91 Zurich Switzerland August 1991 Proceedings Lncs 525

Authors: Oliver Gunther ,Hans-Jorg Schek

1st Edition

3540544143, 978-3540544142

More Books

Students also viewed these Databases questions

Question

state what is wrong for printing an array with separators. cout

Answered: 1 week ago

Question

a. How will the leader be selected?

Answered: 1 week ago

Question

b. Will new members be welcomed?

Answered: 1 week ago