CS 301 Spring 2012 Problem Set 4
- Prove that every finite language must be regular. (Hint: Use induction on the size of the language.)
- Consider the class C of all languages that are both regular and infinite. For each of the following, tell whether class C is closed, and if it is not closed, give a brief counterexample:
- Union
- Intersection
- Kleene Star
- For each of the following languages, tell whether it is regular or not, and prove your answer. (One way to show a language is regular is by giving an automaton or by giving a regular expression. Almost always, to show a language is not regular, you will use the Pumping Lemma.)
- \{ 0^i 1^j : i, j \geq 0 \mbox{ and } i + j = 4 \}
- \{ 0^i 1^j : i, j \geq 0 \mbox{ and } i - j = 4 \}
- \{ 0^i 1^j : i, j \geq 0 \mbox{ and } |i - j| = 4 \}
- \{ 0^i 1^j : 0 \leq i \leq j \leq 42 \}
- \{ w \in (a \cup b \cup c)^* : n_a(w) \cdot n_b(w) \geq n_c(w) \} where n_x(w) denotes the number of times that character x appears in string w .
(More coming shortly.) -- Main.sloan - 2012-02-04
Topic revision: r1 - 2012-02-04 - 16:17:55 - Main.sloan