Regular Expressions
[14/100%]Determine the concatenation for the following pairs of languages and :
and ;
and ;
and .
Let . Which of the following languages is the iteration of this language?
;
;
;
.
Prove the correctness of the regular expression in Example 77 on p. 316: the expression is claimed to represent the language of all words over that do not contain the substring "000".
Determine which language is represented by the following expressions:
;
;
;
.
Prove the equivalences of Proposition 104 on p. 315: for any regular expressions ,
-
(commutativity of union);
-
(associativity of union);
-
(associativity of concatenation);
-
(idempotence of iteration);
-
(distributivity).
Prove the following equivalences for regular expressions:
;
;
;
.
Simplify the following regular expressions:
;
;
;
.
Using equivalent transformations of regular expressions, simplify the result obtained in Example 81 on p. 328: .
Let be the automaton constructed in the proof of Theorem 111 on p. 322 from the regular expression (Theorem 111: for every regular expression one can effectively construct an NFA recognizing , by induction on 's structure — a fixed automaton for each base case , , , and, given automata for and , a combined automaton for , , and built by gluing them together with new -transitions). Prove the following statements:
in the diagram of , at most two edges leave each vertex, and at most one leaves each accepting vertex;
the number of states of exceeds the length of the expression by at most a factor of three, that is ;
when using optimized methods, the number of states of exceeds the length of the expression by at most a factor of two, that is .
Complete the proof of Proposition 110 on p. 321 by showing that if , then , where is a finite automaton with initial state and a single accepting state , and is obtained from by adding a new initial-and-only-accepting state together with the two -transitions and (so that , per Proposition 110).
Apply the determinization procedure from Theorem 100 on p. 302 (Theorem 100: for every NFA one can effectively construct a DFA such that ) and construct a DFA equivalent to the NFA from Example 80 on p. 323.
Construct a regular expression defining the language over the alphabet :
;
;
;
.
Let be an arbitrary word of length , and let be pairwise distinct natural numbers arranged in increasing order. Prove that the language can be described by a regular expression of length no greater than (taking into account all symbols required by the definition).
Above, in Problem 243 on p. 310, it was proposed to construct an automaton that checks the correctness of addition. Construct a regular expression defining the language recognized by this automaton, that is, the following set of words over the alphabet :
S = \left\{ \left\llbracket \begin{array}{l} a_{1} \\ b_{1} \\ c_{1} \end{array} \right\rrbracket \ldots \left\llbracket \begin{array}{l} a_{n} \\ b_{n} \\ c_{n} \end{array} \right\rrbracket \; : \; c_{n} \ldots c_{1}\text{ is the sum of the binary numbers } a_{n} \ldots a_{1} \text{ and } b_{n} \ldots b_{1}\right\}