Let alphabet Σ = {a, b, c}, and consider L1 = {w ∈ Σ ∗ | more than half the symbols in w are c’s}. Prove that L1 is not FS using the pumping lemma.
The language is . To prove that the language is not FS, use the pumping lemma as follows.
Let be the pumping length. Then consider the word . In this word, more than half the symbols are 'c', hence .
Now consider any breakup of the word such that:
Then as the first letter in are 'a's, the entire string can only consist of 'a's. Hence .
Now if the language were regular, then for each , it must be that .
Consider . Then , as an additional will contribute additional 'a's to the word.
But in , there are c's, while the length of the word is as .
This means that at most half of the symbols are 'c's, thus violating the property for the language L1, hence .
This contradics the pumping lemma, hence proving that L1 is not FS.
Comment in case of any doubts.
Just for this problem, let the alphabet be I = { a b c}. Let us consider the language anbncn = { abc aabbcc aaabbbccc ... } Prove that this language is nonregular by the (i) Pumping lemma. Show this by pumping x,y,z
(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)...
1(a)Draw the state diagram for a DFA for accepting the following language over alphabet {0,1}: {w | the length of w is at least 2 and has the same symbol in its 2nd and last positions} (b)Draw the state diagram for an NFA for accepting the following language over alphabet {0,1} (Use as few states as possible): {w | w is of the form 1*(01 ∪ 10*)*} (c)If A is a language with alphabet Σ, the complement of A is...
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...
Let y-and Г be two alphabets, and let Г be the alphabet be the alphabet of vectors where the first element is from Σ and the second is from「 For example, if -(a,b) and Г-{0.1} then and B c Г be any regular languages, and consider the language Let A Show A B is regular. Let y-and Г be two alphabets, and let Г be the alphabet be the alphabet of vectors where the first element is from Σ and...
Consider the language defined over the alphabet Σ (0, 1): [10] 2nin i. Show that L1 is context-free by specifying a CFG Gi for L1 ii. Convert the CFG Gi to a pushdown automaton Pv that accepts L1 by empty 12 stack iii. Give a pushdown automaton PF that accepts L by final state
1. Consider the alphabet {a,b,c}. Construct a finite automaton that accepts the language described by the following regular expression. 6* (ab U bc)(aa)* ccb* Which of the following strings are in the language: bccc, babbcaacc, cbcaaaaccbb, and bbbbaaaaccccbbb (Give reasons for why the string are or are not in the language). 2. Let G be a context free grammar in Chomsky normal form. Let w be a string produced by that grammar with W = n 1. Prove that the...
Given any string w ∈ {0, 1}∗, let n0(w) = number of 0′s in w and n1(w) = number of 1′s in w. Prove, by using the pumping lemma, that the language {w | 0 ≤ n0(w) ≤ 2∗n1(w)+1.} is not a regular language.
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)...
Consider the following languages Li and L2, respectively, and construct a context free grammar for it if it is a context free language; if not, using the pumping lemma to disprove it. Let na(w) denote the number if a is w, same notation for to now) and nc(w). • L1 = {w we {a,b}* and na(w) = nb(w)} • L2 = {w I w€ {a,b,c}* and na(w) = n5(w) = nc(w)}