Question: 1 . 1 . Use the same ideas to describe an automaton for homework numbers. A homework number should start with a digits, it can

1.1. Use the same ideas to describe an automaton for homework numbers. A homework number should start with a digits, it can be followed by digits and letters. For example, 12 and 12a should be accepted, while a1 should be rejected.
A natural idea is to have 3 states:
the start state S,
the state V indicating we have a valid homework number, and
the state E indicating that this is an error.
Start is the starting state, V is the only final state. The transitions are as follows:
from S, any digits lead to state V, any other letter leads to state E;
from V, any digits and any letter letter lead to state V, any other symbol (e.g.,?) leads to state E;
from E, any symbol leads back to E.
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 valid homework numbers:
the word 1a (which this automaton should accept) and
the word a1(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,
\Sigma is the alphabet, i.e., the set of all the symbols that this automaton can encounter; for simplicity, consider only three symbols: 1, a, and question mark ?;
\delta : Q x \Sigma -> Q is the function that describes, for each state q and for each symbol s, the state \delta (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 of 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 containing only digits as Automaton B.
A natural idea is to have 2 states for Automaton B: words with only digits (n), and all other words (w). Start is the starting state, and it is also the only final state. The transitions are as follows:
from n, any digit leads to n, any other symbol leads to w;
from w, every symbol leads back to w.
For simplicity, in your automaton for recognizing the union and intersection of the two languages, feel free to assume that you only three symbols 1, a, and ?.

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 Finance Questions!