[A] Which one of the following grammars produces strings of 1s, the length of which is divisible by 3? (The empty string e can also be considered as a string of 1's with length 0) S → 1S | 1 S → 1S | e S → 11S | 11 S → 11S | € S → 111S | 111 S → 111S | €

Computer Networking: A Top-Down Approach (7th Edition)
7th Edition
ISBN:9780133594140
Author:James Kurose, Keith Ross
Publisher:James Kurose, Keith Ross
Chapter1: Computer Networks And The Internet
Section: Chapter Questions
Problem R1RQ: What is the difference between a host and an end system? List several different types of end...
icon
Related questions
Question

no explanations needed just answer 

Let L be a language. The strings of language Lare defined by the following rules -
1. All strings of L are binary strings
2. All strings of L start and end with 000.
3. In the middle, there is a sequence of l's, the length of which is divisible by 3.
Example: 000111111111000is a string of language L, because it starts with 000, ends with 000, and in the middle, there is a sequence of nine l's 9 is
divisible by 3. Similarly, 000000, 000111000, 0001l1111000are also strings of language L
[A] Which one of the following grammars produces strings of ls, the length of which is
divisible by 3? (The empty string e can also be considered as a string of 1's with length 0)
OS → 1S | 1
S → 1S | e
S → 11S | 11
S → 11S | e
S → 111S | 111
S → 111S | e
Transcribed Image Text:Let L be a language. The strings of language Lare defined by the following rules - 1. All strings of L are binary strings 2. All strings of L start and end with 000. 3. In the middle, there is a sequence of l's, the length of which is divisible by 3. Example: 000111111111000is a string of language L, because it starts with 000, ends with 000, and in the middle, there is a sequence of nine l's 9 is divisible by 3. Similarly, 000000, 000111000, 0001l1111000are also strings of language L [A] Which one of the following grammars produces strings of ls, the length of which is divisible by 3? (The empty string e can also be considered as a string of 1's with length 0) OS → 1S | 1 S → 1S | e S → 11S | 11 S → 11S | e S → 111S | 111 S → 111S | e
[B] Which one of the following grammars is the grammar for the language L?
S → 000A000
A → 111A | e
S → 000S000 | A
A → 111A| epsilon
S → 000 | A
A → 111A111 | 111
S → 000S000 | A
A → 111A |e
Transcribed Image Text:[B] Which one of the following grammars is the grammar for the language L? S → 000A000 A → 111A | e S → 000S000 | A A → 111A| epsilon S → 000 | A A → 111A111 | 111 S → 000S000 | A A → 111A |e
Expert Solution
steps

Step by step

Solved in 2 steps

Blurred answer
Recommended textbooks for you
Computer Networking: A Top-Down Approach (7th Edi…
Computer Networking: A Top-Down Approach (7th Edi…
Computer Engineering
ISBN:
9780133594140
Author:
James Kurose, Keith Ross
Publisher:
PEARSON
Computer Organization and Design MIPS Edition, Fi…
Computer Organization and Design MIPS Edition, Fi…
Computer Engineering
ISBN:
9780124077263
Author:
David A. Patterson, John L. Hennessy
Publisher:
Elsevier Science
Network+ Guide to Networks (MindTap Course List)
Network+ Guide to Networks (MindTap Course List)
Computer Engineering
ISBN:
9781337569330
Author:
Jill West, Tamara Dean, Jean Andrews
Publisher:
Cengage Learning
Concepts of Database Management
Concepts of Database Management
Computer Engineering
ISBN:
9781337093422
Author:
Joy L. Starks, Philip J. Pratt, Mary Z. Last
Publisher:
Cengage Learning
Prelude to Programming
Prelude to Programming
Computer Engineering
ISBN:
9780133750423
Author:
VENIT, Stewart
Publisher:
Pearson Education
Sc Business Data Communications and Networking, T…
Sc Business Data Communications and Networking, T…
Computer Engineering
ISBN:
9781119368830
Author:
FITZGERALD
Publisher:
WILEY