Computer Science Engineering (CSE) Exam  >  Computer Science Engineering (CSE) Questions  >  Consider the following languages:L1= {0n1n n ... Start Learning for Free
Consider the following languages:
L= {0n1∣ n ≥ 0}
L= {wcwr ∣ wε {a, b}}
L= {wwr ∣ wε{a, b}}
Which of these languages are deterministic context-free languages?
  • a)
     Only L1
  • b)
     Only L1 and L2
  • c)
     None of the languages
  • d)
     All three languages
Correct answer is option 'D'. Can you explain this answer?
Most Upvoted Answer
Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr w&epsil...
Given,
L= {0n1∣ n ≥ 0}
Languages L1 contains all strings in which n0's are followed by n1's.
Deterministic PDA can be constructed to accept L1. For 0's we can push it on stack and for 1's, we can pop from stack. So, it is DCFL.
L= {wcwr ∣ wε{a, b}}
L2 contains all strings of form wcwr where w is a string of a's and b's and wr is reverse of w.
For example, aabbcbbaa. To accept this language, we can construct PDA which will push all symbols on stack before c.
After c, if symbol on input string matches with symbol on stack, it is popped.
So, L2 can also be accepted with deterministic PDA, thus, it is also DCFL.
L= {wwr ∣ wε{a, b}}
L3 contains all strings of form wwr where w is a string of a's and b's and wr is reverse of w.
But we don't know where w ends and wr starts. For example, aabbaa is a string corresponding to L3. For first a, we will push it on stack.
Next a can be either part of w or wr where w = a.
Therefore, there can be multiple moves from a state on an input symbol.
So, only non-deterministic PDA can be used to accept this type of language.
So, it is NCFL, not DCFL.
Thus, all three languages are deterministic context-free languages.
Hence, the correct option is (D).
Community Answer
Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr w&epsil...
L1 is the language that consists of strings of the form 0n1n, where n is a non-negative integer. In other words, L1 contains strings that start with some number of 0's followed by an equal number of 1's.

Examples of strings in L1 include: "", "01", "0011", "000111", "00001111", etc.

Some strings that are not in L1 include: "01", "0", "1", "0001111", "000001111", etc.

L1 can be described by the regular expression 0*1*, which means zero or more 0's followed by zero or more 1's.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer?
Question Description
Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? for Computer Science Engineering (CSE) 2024 is part of Computer Science Engineering (CSE) preparation. The Question and answers have been prepared according to the Computer Science Engineering (CSE) exam syllabus. Information about Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? covers all topics & solutions for Computer Science Engineering (CSE) 2024 Exam. Find important definitions, questions, meanings, examples, exercises and tests below for Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer?.
Solutions for Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? in English & in Hindi are available as part of our courses for Computer Science Engineering (CSE). Download more important topics, notes, lectures and mock test series for Computer Science Engineering (CSE) Exam by signing up for free.
Here you can find the meaning of Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? defined & explained in the simplest way possible. Besides giving the explanation of Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer?, a detailed solution for Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? has been provided alongside types of Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? theory, EduRev gives you an ample number of questions to practice Consider the following languages:L1= {0n1n n ≥ 0}L2= {wcwr wε {a, b}∗}L3= {wwr wε{a, b}∗}Which of these languages are deterministic context-free languages?a)Only L1b)Only L1 and L2c)None of the languagesd)All three languagesCorrect answer is option 'D'. Can you explain this answer? tests, examples and also practice Computer Science Engineering (CSE) tests.
Explore Courses for Computer Science Engineering (CSE) exam

Top Courses for Computer Science Engineering (CSE)

Explore Courses
Signup for Free!
Signup to see your scores go up within 7 days! Learn & Practice with 1000+ FREE Notes, Videos & Tests.
10M+ students study on EduRev