Question

a. Design a FSA that will recognize sentences such as “The dog that chased the cat...

a. Design a FSA that will recognize sentences such as “The dog that chased the cat that ate the mouse lived in the house that Jack built.” Namely, the sentences should look like “The ANIMAL1 that VERBED1 the ANIMAL2 that VERBED2 the ANIMAL3 … VERBED3 in the house that Jack built.”, where ANIMALn is an animal and VERBEDn is a past-tense verb, 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 two special transitions, one that tests whether a word represents an animal, and one that tests whether a word is a verb.

b. Design a FSA that will recognize sentences such as “The mouse the cat the dog chased ate lived in the house that Jack built.”, namely “The ANIMAL1 the ANIMAL2 the ANIMAL3 …VERBED3 VERBED2 VERBED1 in the house that Jack built.” Assume that n ≤ 3 and that you have the same special transitions available.

c. For part (b), would it be possible to design an FSA that would work for any depth n? Why or why not? What is different between the FSA is part (a) and in part (b)?

Homework Answers

Answer #1

Please find the FSA below:

A)

B)

c)

If we have the whole animal set and verb set it is possible to design an FSA for both a and b. FSA would work for depth n , cause it can go in a loop.

The main difference betwen part a and part b is the limit. Part a wil for such a long sentences but part b wont as n should b less than or equal to 3.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions