• recategorized by
2,922 views
2 2 votes

Given the following statements:

$S_1: \text{ The grammars }S \rightarrow asb \mid bsa \mid ss \mid a \text{ and } S \rightarrow asb \mid bsa \mid a$ are not equivalent.

$S_2: \text{ The grammars }S \rightarrow ss \mid sss \mid asb \mid bsa \mid \lambda \text{ and } S \rightarrow ss \mid asb \mid bsa \mid \lambda $ are equivalent.

  1. $S_1$ is correct and $S_2$ is not correct 
  2. Both $S_1$ ad $S_2$ are correct
  3. $S_1$ is not correct and $S_2$ is correct
  4. Both $S_1$ ad $S_2$ are not correct

1 Answer

2 2 votes

Both are correct. 

S1: The grammars S→asb∣bsa∣ss∣a and S→asb∣bsa∣a are not equivalent b/c aa is not accepted by second.

S2:  second is also true.

Answer:
Position:
Show:

Related questions

5 5 votes
2 2 answers
7.5k
7.5k views
go_editor asked Jul 29, 2016
7,524 views
The Greibach normal form grammar for the language $L=\{a^n b^{n +1} \mid n \geq 0 \}$ is$S \rightarrow a \, SB, B \rightarrow bB \mid \lambda$$S \rightarrow a \, SB, B \r...
4 4 votes
2 2 answers
2.7k
2.7k views
go_editor asked Jul 29, 2016
2,680 views
Pumping lemma for context-free languages states:Let $L$ be an infinite context free language. Then there exists some positive integer m such that any $w \in L$ with $\mid...
3 3 votes
2 2 answers
2.9k
2.9k views
go_editor asked Jul 29, 2016
2,860 views
Possible thread states in Windows 2000 operating system include:Ready, running and waitingReady, standby, running, waiting, transition and terminatedReady, running, waiti...
2 2 votes
1 1 answer
2.7k
2.7k views
go_editor asked Jul 29, 2016
2,724 views
Which of the following commands would return process_id of sleep command?Sleep 1 and echo $Sleep 1 and echo $#Sleep 1 and echo $*Sleep 1 and echo $!