Presentation is loading. Please wait.

Presentation is loading. Please wait.

1 Proof of the Day: Let P= {(b, acbb), (aac, a), (b, ca)}. 1.Prove that P has a match. 2. Find Q which is P encoded in binary. 3.What match of Q corresponds.

Similar presentations


Presentation on theme: "1 Proof of the Day: Let P= {(b, acbb), (aac, a), (b, ca)}. 1.Prove that P has a match. 2. Find Q which is P encoded in binary. 3.What match of Q corresponds."— Presentation transcript:

1 1 Proof of the Day: Let P= {(b, acbb), (aac, a), (b, ca)}. 1.Prove that P has a match. 2. Find Q which is P encoded in binary. 3.What match of Q corresponds to the match of P you found for Question #1? 4. Compute |P| and |Q| as defined on the assignment.

2 2 Announcements Assignment #1 is due on Wed. at the beginning of class. On Question 2(a), you do not have to find a closed formula for the coefficients of the resulting polynomial. Just argue that they are constants say c 0, c 1, c 2, … then solve in terms of the c i ’s.

3 3 Regular Languages http://eloquentjavascript.net/img/xkcd_regular_expressions.png

4 4 Σ * = set of all strings over alphabet Σ Language over Σ – any subset of Σ * Examples: Σ = {0, 1} L 1 = { w  Σ * : w has an even number of 0’s} L 2 = { w  Σ * : w is the binary representation of a prime number with no leading zeroes} L 3 = Σ * L 4 = { } = Φ L 5 = { ε }

5 5 Operations on Languages: 1. Complement of L defined over Σ = = { w  Σ * : w is not in L } 2. Concatenation of Languages L 1 ۰ L 2 = L 1 L 2 = {w= x ۰ y for some x  L 1 and y  L 2 } 3. Kleene star of L, L * = { w= w 1 w 2 w 3 … w k for some k ≥ 0 and w 1, w 2, w 3, …,w k are all in L} 4. L + = L ۰ L * (Concatenate together one or more strings from L.)

6 6 Regular Languages over Alphabet Σ: [Basis] 1. Φ and {σ} for each σ  Σ are regular languages. [Inductive step] If L 1 and L 2 are regular languages, then so are: 2. L 1 ۰ L 2, 3. L 1 ⋃ L 2, and 4. L 1 *.

7 7 Regular expressions over Σ: [Basis] 1. Φ and σ for each σ  Σ are regular expressions. [Inductive step] If α and β are regular expressions, then so are: 2. ( αβ) 3. (α ⋃ β) and 4. α * Note: Regular expressions are strings over Σ ⋃ { (, ), Φ, ⋃, * } for some alphabet Σ.

8 8 Precedence of Operators Exponents Multiplication Addition Kleene star Concatenation Union highest ⇩ lowest

9 9 Assume that p, q, and r are in. 1.Note that the number of pairs (p,q) with p + q = k is k+1. Use this to prove that the number of 3-tuples (p, q, r) with p+q+r = k is 1 + 2 + 3 + … + k + k+1 = (k+1) (k+2)/2. 2. Prove that the set S= { (p,q,r) : p, q, and r are in } is countable.


Download ppt "1 Proof of the Day: Let P= {(b, acbb), (aac, a), (b, ca)}. 1.Prove that P has a match. 2. Find Q which is P encoded in binary. 3.What match of Q corresponds."

Similar presentations


Ads by Google