Question: 1 . 1 . Use the same ideas to describe an automaton for homework numbers. A homework number should start with a digits, it can
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, and a should be accepted, while a should be rejected.
A natural idea is to have 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 eg leads to state E;
from E any symbol leads back to E
Trace, stepbystep, how the finite automaton from Part will check whether the following two words sequences of symbols are valid homework numbers:
the word a which this automaton should accept and
the word awhich this automaton should reject
Write down the tuple corresponding to the automaton from Part :
Q is the set of all the states,
Sigma is the alphabet, ie the set of all the symbols that this automaton can encounter; for simplicity, consider only three symbols: 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 qs 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;
q is the starting state, and
F is the set of all final states.
For each automaton A let LA denote the language of all the words accepted by this automaton, ie 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 as Automaton A and
an automaton for words containing only digits as Automaton B
A natural idea is to have 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 a and
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
