recategorized by
2,333 views
2 votes
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
recategorized by

1 Answer

2 votes
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:

Related questions

3 votes
3 votes
2 answers
3
2 votes
2 votes
1 answer
4
go_editor asked Jul 29, 2016
2,207 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 $!