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

Business, Finance, Economics, Accounting, Operations Management, Computer Science, Electrical Engineering, Mechanical Engineering, Civil Engineering, Chemical Engineering, Algebra, Precalculus, Statistics and Probabilty, Advanced Math, Physics, Chemistry, Biology, Nursing, Psychology, Certifications, Tests, Prep, and more.
Post Reply
answerhappygod
Site Admin
Posts: 899603
Joined: Mon Aug 02, 2021 8:13 am

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

Post 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!
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!
Post Reply