Mitderm I Review
Topics to be covered on Midterm I:
- Sets, relations, functions
- Regular Expressions and Regular Languages
- Deterministic Finite Automata
- Non-Deterministic Finite Automata
- Non-Regular Languages and the Pumping Lemma
- Context Free Grammars
Book Sections to be covered on Midterm I
- Chatper 1, sections 1.1-1.8
- Chapter 2, sections 2.1-2.5
- Chapter 3, sections 3.1-3.2
Sample Questions
- For the language L = all strings over {a,b} that begin and end with aa
- Give a regular expression for L
- Give an NFA (DFA is OK too) for L
- Give an NFA (DFA is OK too) for the complement of L
- Give a regular expression for the complement of L
- For the language L = all strings over {a,b} that contain the substring aa or bb
- Give a regular expression for L
- Give an NFA (DFA is OK too) for L
- Give an NFA (DFA is OK too) for the complement of L
- Give a regular expression for the complement of L
- L = {w : w ∈ (a+b)*, |w| > 2 and one of the last three symbols in w is a 1}. So, 0010, 0111, 00100, 0101 ∈ L, but 01000 ∉ L
-
Give a Deterministic Finite Automaton for L
- Give a regular expression for L
- Give a regular expression for the complement of L
- L = all strings over {a,b,c} that contain more a's than c's, and all a's appear before any c's. Thus, aababc, bbabac, aabbc ∈ L, but aca, babacc, and abc ∉ L
-
Give a Context-Free Grammar for L
-
Prove that L is not regular
- Relations, partial orders, total orders
- How many different relations R ⊆ A × A are there, in terms of |A|?
- How many different total orders R ⊆ A × A are there, in terms of |A|?