Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

( Due January 2 4 ) In class, we designed automata for recognizing integers and real numbers. 1 . 1 . Use the same ideas

(Due January 24) In class, we designed automata for recognizing integers and real numbers.
1.1. Use the same ideas to describe an automaton for the following task. Most Russian female last names end in a letter "a". Describe an automaton for recognizing words that end in "a". For example, "Ivanov" should be rejected, but "Ivanova" or "IVANOVA" should be accepted.
A natural idea is to have 3 states:
the start state S,
the state A indicating that the last read letter was "a" or "A", and
the state D indicating that the last read letter was different from "a" and "A".
Start is the starting state, A is the only final state. The transitions are as follows:
from S, letters "a" and "A" lead to state A, any other letter leads to state D;
from A, letters "a" and "A" lead to state A, any other letter leads to state D;
from D, letters "a" and "A" lead to state A, any other letter leads to state D.
1.2. Trace, step-by-step, how the finite automaton from Part 1.1 will check whether the following two words (sequences of symbols) are ends with the letter "a"(small or capital):
the word Iva (which this automaton should accept) and
the word Iv (which this automaton should reject).
1.3. Write down the tuple corresponding to the automaton from Part 1.1:
Q is the set of all the states,
is the alphabet, i.e., the set of all the symbols that this automaton can encounter; for simplicity, consider only three letters: a,r, and A;
:QQ is the function that describes, for each state q and for each symbol s, the state (q,s) to which the automaton that was originally in the state q moves when it sees the symbol s (you do not need to describe all possible transitions this way, just describe two of them);
q0 is the starting state, and
F is the set of all final states.
1.4. For each automaton A, let LA denote the language of all the words accepted by this automaton, i.e., of all the words for which this automaton ends up in a final state. In class, we learned a general algorithm that:
given two automata A and B that correspond to languages LA and LB,
constructs two new automata for recognizing, correspondingly, the union and intersection o languages LA and LB.
Apply this algorithm to the following two automata:
the automaton from Part 1.1 as Automaton A, and
an automaton for words not containing letter "r"(since some people have difficulty pronouncing this sound) as Automaton B.
A natural idea is to have 3 states for Automaton B: start (s), words with no "r" letters (n), and words with "r" letter (r). Start is the starting state, n is the only final state. The transitions are a follows:
from s, letter "r" leads to r, any other symbol leads to n;
from n, letter "r" leads to r, any other symbol leads to n;
from r, every symbol leads back to r.
For simplicity, in your automaton for recognizing the union and intersection of the two languages, feel free to assume that you only have symbols a, r, and A.
image text in transcribed

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

Database Driven Web Sites

Authors: Joline Morrison, Mike Morrison

2nd Edition

? 061906448X, 978-0619064488

More Books

Students also viewed these Databases questions

Question

What guides and references exist for the Amazon EC 2 service?

Answered: 1 week ago

Question

2. List the advantages of listening well

Answered: 1 week ago