Consider the set of words of length n over the 3-letter alphabet {0,1,2}
a) Prove that the number of such words with an even number of 0’s is (3^n+1)/2 and the number of such words with an odd number of 0’s is (3^n-1)/2. (Hint: Try a proof by induction.)
b) Prove that C(n,0)*2^n+C(n,1)2^(n-2)+C(n,4)2^(n-4)+....+C(n,q)2^(n-q)=(3^n+1)/2.

Consider the set of words of length n over the 3-letter alphabet {0,1,2} a) Prove that...
Let Σ = {0, 1). (a) Give a recursive definition of Σ., the set of strings from the alphabet Σ. (b) Prove that for every n E N there are 2" strings of length n in '. (c) Give a recursive definition of I(s), the length of a string s E Σ For a bitstring s, let O(s) and I(s) be number of zeroes and ones, respectively, that occur in s. So for example if s = 01001, then 0(s)...
8 Find CFGs that for these regular languages over the alphabet a, b. Draw a Finite Automata first and use this to create the CFG (a) The language of all words that consist only of double letters (aa or bb) (b) The set of all words that begin with the letter b and contains an odd number of a's or begin with the letter a and contains an even number of b's.
(3) Consider the following three languages over the alphabet Σ default i,j, k, are non-negative integers (can be 0): (a,b,c,d), where by One of these is not a CFL; the other two are CFLs. Give context-free grammars for the two that are CFLs, and a CFL Pumping Lemma proof for the one that is not a CFL. (You need not prove your grammars correct, but their plan should be clear. (6+6+18 30 pts., for 74 total on the set)
(3)...
Give regular expressions generating the languages of 1. {w over the alphabet of {0, 1} | w is any string except 11 and 111} 2. {w over the alphabet of {0, 1} | w contains at least two 0’s and at most one 1} 3. {w over the alphabet of {0, 1} | the length of w is at most 9} 4. {w over the alphabet of {0, 1} | w contains at least three 1 s} 5. {w over...
John Doe claims that the language L, of all strings over the alphabet Σ = { a, b } that contain an even number of occurrences of the letter ‘a’, is not a regular language. He offers the following “pumping lemma proof”. Explain what is wrong with the “proof” given below. “Pumping Lemma Proof” We assume that L is regular. Then, according to the pumping lemma, every long string in L (of length m or more) must be “pumpable”. We...
(a) Consider the alphabet Σ = {a, b, c}. Give a recursive definition for the set of strings over Σ that contain exactly one c. (b) Give a recursive definition for the set S = {x | x ∈ Z≥0 and b x 4 c is even}
4. Let n be a positive integer. Z" is the set of all lists of length n whose entries are in Z. Prove that Z" is countable. (Hint: Find a bijection between Z"-1x Z and Z" and then use induction.)
4. Let n be a positive integer. Z" is the set of all lists of length n whose entries are in Z. Prove that Z" is countable. (Hint: Find a bijection between Z"-1x Z and Z" and then use induction.)
Definition of Even: An integer n ∈ Z is even if there exists an integer q ∈ Z such that n = 2q. Definition of Odd: An integer n ∈ Z is odd if there exists an integer q ∈ Z such that n = 2q + 1. Use these definitions to prove only #5: 2. Prove that zero is even. 3. Prove that for every natural number n ∈ N, either n is even or n is odd. 4....
Therom 1.8.2
n choose k = (n choose n-k)
n choose k = (n-1 choose K) + (n-1 choose K-1)
2n = summation of (n choose i )
please use the induction method
(a) (10 pts) Show that the following equality holds: n +1 + 2 Hint: If you proceed by induction, you might want to use Theorem 1.8.2. If you search for a combinatorial proof, consider the set X - (i,j, k): 0 S i,j< k< n) (b) (10...
Let n be an even number. How many ternary strings (i.e. strings over the alphabet 10, 1,2]) of length n are there in which the only places that zeroes can appear are in the odd-numbered positions?