Page 1 of 1

Question 30: Part a: Find the phrase structure grammar for the following language: the set consisting of only the bit st

Posted: Sat Nov 27, 2021 10:46 am
by answerhappygod
Question 30:
Part a:
Find the phrase structure grammar for the following
language:
the set consisting of only the bit strings 01, 010, 011
Here the set of terminals is {0, 1} and all capital letters
refer to non-terminal symbols. Choose from the following the
production rules that produce the above language. There could be
multiple correct answers.
Group of answer choices
S-> 0A, A-> 1B, A->1, B->0, B->1
S-> 0A, A-> 1B, A->1, B->0
S-> 0A, A->1A, A->0, A->1
S->0A, A->1B, B-> 1, B->0
Part b:
Find the phrase structure grammar for the following
language:
the set of bit strings that have neither two consecutive 0s nor
two consecutive 1s.
Here the set of terminals is {0, 1} and all capital letters
refer to non-terminal symbols. Choose from the following the
production rules that produce the above language. There could be
multiple correct answers.
Group of answer choices
S->\lambda, S->1A, S->0B, A->0B, B->1A,
A->\lambda.
S->1A, S->0B, A->0B, B->1A, A->\lambda,
B->\lambda.
S->\lambda, S->1A, S->0B, A->0B, B->1A,
A->\lambda, B->\lambda.
S->\lambda, S->1A, S->0B, A->0B, B->1A,
B->\lambda.
Part c:
Find the phrase structure grammar for the following
language:
the set of bit strings that starts with 0 and ends with 1.
Here the set of terminals is {0, 1} and all capital letters
refer to non-terminal symbols. Choose from the following the
production rules that produce the above language. There could be
multiple correct answers.
Group of answer choices
S->0S1, S->lambda, S->1S, S->0S
S->0A1, A->1A, A->0A
S->0A1, A->lambda, A->1A, A->0A
S->0A1, A->lambda, A->1A
Please answer all parts with full work shown, thank you!