Warning: foreach() argument must be of type array|object, bool given in /var/www/html/web/app/themes/studypress-core-theme/template-parts/header/mobile-offcanvas.php on line 20

Determine whether the string 01001 is in each of these sets.

a){0,1}* b){0}*{10}{1}*

c){010}*{0}*{1} d){010,011} {00,01}

e){00} {0}*{01} f){01}*{01}*

Short Answer

Expert verified
  1. The string contains 01001.
  2. The string does not contain 01101.
  3. It contains string 01101.
  4. It contains string 01101.
  5. It does no t contain string 01101.
  6. It does not contain string 01101.

Step by step solution

01

Definition

Here AB represents the concatenation of A and B.

AB= {xy|\({\bf{x}} \in {\bf{A}}\,{\bf{and}}\,{\bf{y}} \in {\bf{B}}\)}

Kleene closure of a set consisting of the concatenation of any amount of strings from A.

\({{\bf{A}}^{\bf{*}}}{\bf{ = }}\bigcup\limits_{k = 0}^{ + \infty } {{{\bf{A}}^{\bf{k}}}} \)

02

Show result of {0, 1}*

By the definition of Kleene closure and the concatenation, \({{\bf{\{ 0,1\} }}^{\bf{*}}}\)contains any sequence of 0’s and 1’s.

Thus it also contains the bit string {01101}.

03

show the result of {0}*{10}{1}*

By the definition of Kleene closure and concatenation, \({{\bf{\{ 1\} }}^{\bf{*}}}\)contains any sequence of 0’s and \({{\bf{\{ }}0{\bf{\} }}^{\bf{*}}}\) contains a sequence of 0’s.

{0}*{10}{1}*then contains a string sequence of 0’s, 10, and 1’s respectively.

This implies that{0}*{10}{1}* does not contains the bit string {01001}.

04

Find the result of {010}*{0}*{1}

By the definition of Kleene closure and the concatenation,\({{\bf{\{ }}0{\bf{\} }}^{\bf{*}}}\) contains a sequence of 010’s and \({{\bf{\{ }}0{\bf{\} }}^{\bf{*}}}\) contains a sequence of 0’s.

{010}*{0}*{1}contains a string with sequence 010, followed by any sequence of zeros, followed by 1.

This implies that {010}*{0}*{1} contains bit strings 01001, since starts with 010, followed by 0, then 1.

05

Get the result of {010, 011} {00, 01}

{010,011}{00, 01} represents the concatenation of {010, 011}

\(X\)

\(Y\)

\(XY\)

010

00

01000

010

01

01001

011

00

01100

011

01

01101

This contains the string {01001}.

06

Solve for {00} {0}*{01}

By the definition of Kleene closure and concatenation, \({{\bf{\{ 0\} }}^{\bf{*}}}\) contains any sequence of 0.

{00} {0}*{01}then contains a string with two 0’s, then 0’s and ends with 01.

This implies that{00} {0}*{01} does notcontains the bit string 00101, since 00101 contains multiple of 1’s and a string in {00} {0}*{01} can contain only ones 1.

07

Find the result for {01}*{01}* 

By the definition of Kleene closure and the concatenation, \({{\bf{\{ 0}}1{\bf{\} }}^{\bf{*}}}\) contains any sequence of 01’s.

{01}*{01}*then contains a string with two 01’s.

This implies that){01}*{01}* does notcontains the bit string 00101, since 01101 does not contain the same number of zeros and ones.

Therefore, the required results are:

  1. The string contains 01001.
  2. The string does not contain 01101.
  3. It contains string 01101.
  4. It contains string 01101.
  5. It does not contain string 01101.
  6. It does not contain string 01101.

Unlock Step-by-Step Solutions & Ace Your Exams!

  • Full Textbook Solutions

    Get detailed explanations and key concepts

  • Unlimited Al creation

    Al flashcards, explanations, exams and more...

  • Ads-free access

    To over 500 millions flashcards

  • Money-back guarantee

    We refund you if you fail your exam.

Over 30 million students worldwide already upgrade their learning with Vaia!

One App. One Place for Learning.

All the tools & learning materials you need for study success - in one app.

Get started for free

Most popular questions from this chapter

Find a phrase-structure grammar for each of these languages.

a) the set of all bit strings containing an even number of 0s and no 1s

b) the set of all bit strings made up of a 1 followed by an odd number of 0s

c) the set of all bit strings containing an even number of 0s and an even number of 1s

d) the set of all strings containing 10 or more 0s and no 1s

e) the set of all strings containing more 0s than 1s

f) the set of all strings containing an equal number of 0s and 1s

g) the set of all strings containing an unequal number of 0s and 1s

Determine whether the string 11101 is in each of these sets.

a){0,1}* b){1}*{0}*{1}*

c){11} {0}*{01 d){11}*{01}*

e){111}*{0}*{1} f){11,0} {00,101}

Find a phrase-structure grammar that generates each of these languages.

\({\bf{a)}}\)the set of bit strings of the form \({{\bf{0}}^{{\bf{2n}}}}{{\bf{1}}^{{\bf{3n}}}}\), where \({\bf{n}}\) is a nonnegative integer

\({\bf{b)}}\)the set of bit strings with twice as many \({\bf{0's}}\) as \({\bf{1's}}\)

\({\bf{c)}}\)the set of bit strings of the form \({{\bf{w}}^{\bf{2}}}\), where \({\bf{w}}\) is a bit string

Give production rules in extended Backus–Naur form for identifiers in the C programming language (see Exercise 33).

Given a deterministic finite-state automaton \({\bf{M = (S,I,f,}}{{\bf{s}}_{\bf{o}}}{\bf{,F)}}\), use structural induction and the recursive definition of the extended transition function f to prove that \({\bf{f }}\left( {{\bf{s, x y}}} \right){\bf{ = f }}\left( {{\bf{f }}\left( {{\bf{s ,x}}} \right){\bf{, y}}} \right)\)for all states \({\bf{s}} \in {\bf{S}}\)and all strings\({\bf{x}} \in {\bf{I}}*{\bf{andy}} \in {\bf{I}}*\).

See all solutions

Recommended explanations on Math Textbooks

View all explanations

What do you think about this solution?

We value your feedback to improve our textbook solutions.

Study anywhere. Anytime. Across all devices.

Sign-up for free