Question

Show L = { w | w is an element of {a, b, c, d, e,...

Show L = { w | w is an element of {a, b, c, d, e, f}* such that the number of a's + number of b's = number of c's + number of d's = number of e's + number of f's } is not context-free

0 0
Add a comment Improve this question Transcribed image text
Answer #1

Now some important points for a language to be context free

1. It must have A PDA accepting the language

2. A PDA means push and pop operations should be clear.

3. Language can do atmost one comparison only

Now i will show how it voilates all condition

let L = aabbcdddeffe (a+b=c+d=e+f=4)

Steps Of PDA

1. Push all a's and b's into stack

2. To make sure that number of a's + number of b's = number of c's + number of d's we will have to pop the stack on each occurence of c and d as input.

3. If after all c and d in input sequence ended then stack need to be empty beacuse in this example stack contain aabb (i.e stack have 4 elements ) when  c and d come so if total c+d =4 then only it is equal to a+b then all a and b are pop out

4.If stack is empty then a+b=c+d else not

5. Now we donot know about count of a+b or c+d so now how will you check whether e+f = a+b = c+d as stack is empty

So we can only compare a+b = c+d or not as after that we lost the value (i.e 4)  and then we don't know whether to push or pop e and f

Point 1 :

So here when push and pop are not clear a PDA is not possible so Given L is not A context -free

Point 2:

I said we can do only 1 comparison but here we are 2 comparison so it not possible for a context free language

Thank You

If u feel any doubt comment it and please rate the answer if u like it else let me know what you want more

Add a comment
Know the answer?
Add Answer to:
Show L = { w | w is an element of {a, b, c, d, e,...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
  • Consider the language L _ {w E {a,b)' : the longest run of a's in u,...

    Consider the language L _ {w E {a,b)' : the longest run of a's in u, is longer than any run of b's in w} For example, abbbbaabbbaaaaa E L because the longest run of b's in it has length four, while the longest run of a's has length six. Prove that L is not context-free.

  • 1. Construct a DFSM to accept the language: L = {w € {a,b}*: w contains at...

    1. Construct a DFSM to accept the language: L = {w € {a,b}*: w contains at least 3 a's and no more than 3 b's} 2. Let acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E ', let W denote the string w with the...

  • Give a context free grammar for the language L where L = {a"bam I n>:O and...

    Give a context free grammar for the language L where L = {a"bam I n>:O and there exists k>-o such that m=2"k+n) 3. Give a nondeterministic pushdown automata that recognizes the set of strings in L from question 3 above. Acceptance should be by accept state. 4. 5 Give a context-free grammar for the set (abc il j or j -k) ie, the set of strings of a's followed by b's followed by c's, such that there are either a...

  • Show that L = {w ∈ {a, b, c}∗ | |w|a = |w|b = |w|c} is...

    Show that L = {w ∈ {a, b, c}∗ | |w|a = |w|b = |w|c} is not context-free by using the closure properties of the context-free languages. Note: make sure to use the closure properties of the context-free languages.

  • (20) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's...

    (20) Let L be the language over {a,b,c} accepting all strings so that: 1. No b's occur before the first c. 2. No a's occur after the first c. 3. The last symbol of the string is b. 4. Each b that is not the last symbol is immediately followed by at least two c's. 5. There are exactly as many a's as b's. Construct a context-free grammar generating L. You do not need an inductive proof, but you should...

  • please with chi chart thank you An anatomy teacher hypothesizes that the final grades in her...

    please with chi chart thank you An anatomy teacher hypothesizes that the final grades in her class are distributed as 10% A's, 23% B's, 45% C's, 14% D's, and 8% F's. If at the end of the semester she has the following grades was she correct in her hypothesis? Use a = 0.05. A B C D F 6 14 22 8 4

  • 1. Construct a DFSM to accept the language: L w E ab): w contains at least 3 as and no more than 3 bs) 2. Let E (acgt a...

    1. Construct a DFSM to accept the language: L w E ab): w contains at least 3 as and no more than 3 bs) 2. Let E (acgt and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg. ge. Construct both a DFSM to accept the language and a regular expression that represents the language. 3. Let ab. For a string w E , let w denote the string w with the...

  • Problem 8 You can assume that L = {a"be": n > 0} is not context free....

    Problem 8 You can assume that L = {a"be": n > 0} is not context free. Prove the following: Show that L-ab: n20 is not context free Show that L = {w E {a,b,c,d)* : na(w) = nb(w)-ne(w) = nd(w)) is not context free Note that na(w) means the number of a's in w .

  • DO NUMBER 4 AND 5 2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta,...

    DO NUMBER 4 AND 5 2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E X", let W denote the string w with the a's and b's flipped. For example, for w aabbab: w bbaaba wR babbaa abaabb {wwR Construct a PDA to accept...

  • DO NUMBER 3 2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, g...

    DO NUMBER 3 2. Let {acgt} and let L be the language of strings consisting of repeated copies of the pairs at, ta, cg, gc. Construct both a DFSM to accept the language and a regular expression that represents the language 3. Let a,b. For a string w E X", let W denote the string w with the a's and b's flipped. For example, for w aabbab: w bbaaba wR babbaa abaabb {wwR Construct a PDA to accept the language:...

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT