Chapter 1: Regular Languages
Q12E
Let contains an even number of a’s and an odd number of b’s and does not contain the substring ab}. Give a DFA with five states that recognizes role="math" localid="1663218927815" and a regular expression that generatesrole="math" localid="1663218933181" .(Suggestion: Describe more simply.)
Q14E
- Show that ifis a DFA that recognizes language, swapping the accept and non accept states inyields a new DFA recognizing the complement of. Conclude that the class of regular languages is closed under complement.
- Show by giving an example that ifM is an NFA that recognizes language C swapping the accept and non accept states in Mdoesn’t necessarily yield a new NFA that recognizes the complement of C. Is the class of languages recognized by NFAs closed under complement? Explain your answer.
Q18E
Give regular expressions generating the languages of Exercise 1.6.
a. {begins with a 1 and ends with a 0}
b. { contains at least three 1s}
c. { contains the substring 0101 (i.e., w = x0101y for some x and y)}
d. { has length at least 3 and its third symbol is a 0}
e. { starts with 0 and has odd length, or starts with 1 and has even length}
f. { doesn’t contain the substring 110}
g. { the length of is at most 5}
h. { is any string except 11 and 111}
i. { every odd position of w is a 1 }
j. { contains at least two 0s and at most one 1}
k.
l. { contains an even number of 0 s, or contains exactly two 1s}
m. The empty set
n. All strings except the empty string
Q24E
A finite state transducer (FST) is a type of deterministic finite automaton whose output is a string and not just accept or reject. The following are state diagrams of finite state transducers .
Each transition of an FST is labeled with two symbols, one designating the input symbol for that transition and the other designating the output symbol. The two symbols are written with a slash, , separating them. In , the transition from has input symbol 2 and output symbol 1. Some transitions may have multiple input–output pairs, such as the transition in from to itself. When an FST computes on an input string w, it takes the input symbols one by one and, starting at the start state, follows the transitions by matching the input labels with the sequence of symbols . Every time it goes along a transition, it outputs the corresponding output symbol. For example, on input , machine enters the sequence of states and produces output . On input , outputs . Give the sequence of states entered and the output produced in each of the following parts.
a. on input
b. on input
c. on input
d. on input
e. on input b
f. on input bbab
g. on input bbbbbb
h. on input localid="1663158267545"

Q28E
Convert the following regular expressions to NFAs using the procedure given in Theorem 1.54. In all parts,.
Q29E
Use the pumping lemma to show that the following languages arenot regular
Q34P
Let be the same as in Problem 1.33. Consider each row to be a binary number and let the top row of w is a larger number than is the bottom row}. For example, , but . How that D is regular.
Q35P
Let be the same as in Problem 1.33. Consider the top and bottom rows to be strings of 0s and 1s, and let the bottom row of w is the reverse of the top row of w}. Show that is E not regular.
Q36P
Let Show that for each, the language Bis regular.
Q37P
Let is a binary number that is a multiple of n}. Show that for each , the language is regular