Consider a language of words where each word is a string of

Consider a language of words, where each word is a string of ones and zeroes. The following grammar describes this language:

<word> = <token> | <word> <token> | <word> <item>

<item> = 0

<token> = 1

(a) Derive all of the 3-character strings consisting of at least one 0.

(b) Derive one 7-character string that is made up of at least one 0 and one 1.

Solution

(a)

There can be numerous words here 3-charcterstrings in the

above grammer
011

001

100

000

101

110

(b) the 7- character string is 1000110

Consider a language of words, where each word is a string of ones and zeroes. The following grammar describes this language: <word> = <token> | <

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site