recategorized by
2,107 views
1 votes
1 votes

Which of the following statements is false?

  1. Top-down parsers are LL parsers where first L stands for left-to-right scan and second L stands for a leftmost derivation
  2. (000)* is a regular expression that matches only strings containing an odd number of zeroes, including the empty string
  3. Bottom-up parsers are in the LR family, where L stands for left-to-right scan and R stands for rightmost derivation
  4. The class of context-free languages is closed under reversal. That is, if L is any context-free language, then the language $L^R =\{w^R: w \varepsilon L\}$ is context-free
recategorized by

2 Answers

Best answer
2 votes
2 votes
  1. (000)* is a regular expression that matches only strings containing an odd number of zeroes, including the empty string also caontain 6, 12, 18, 24 which are even .

B is answer

selected by
0 votes
0 votes
  • Top-down parsers are LL parsers where first L stands for left – to – right scan and second L stands for a leftmost derivation.Correct

 

  • (000)* is a regular expression that matches only strings containing an odd number of zeroes, including the empty string.Incorrect (000)* will generate ε, 000, 000000, 000000000, …….. multiples of 3 which include odd and even strings, so this is incorrect.

 

  • Bottom-up parsers are in the LR family, where L stands for left – to – right scan and R stands for rightmost derivation.Correct

 

  • The class of context – free languages is closed under reversal. That is, if L is any context – free language, then the language LR = {wR: w∈L} is context – free.Correct

So, option (B) is correct.

Answer:

Related questions

3 votes
3 votes
2 answers
1
go_editor asked Aug 8, 2016
8,904 views
What will be the hexadecimal value in the register $ax$ (32-bit) after executing the following instructions?mov al, 15mov ah, 15xor al, almov cl, 3shr ax, cl0F00 h0F0F h0...
1 votes
1 votes
2 answers
3
6 votes
6 votes
2 answers
4
go_editor asked Aug 8, 2016
3,468 views
How many solutions are there for the equation $x+y+z+u=29$ subject to the constraints that $x \geq 1, \: \: y \geq 2 \: \: z \geq 3 \: \: and \: \: u \geq 0$?496026002375...