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

For each of these regular expressions find a regular expression that represents the same language with minimum star height.

\(\begin{array}{l}{\bf{a) }}\left( {{\bf{0*1*}}} \right){\bf{*}}\\{\bf{b) }}\left( {{\bf{0}}\left( {{\bf{01*0}}} \right){\bf{*}}} \right){\bf{*}}\\{\bf{c) }}\left( {{\bf{0*}} \cup {\bf{(01)*}} \cup {\bf{1*}}} \right){\bf{*}}\end{array}\)

Short Answer

Expert verified

a) The regular expression with star height expression is \({\bf{(0}} \cup {\bf{1)*}}\).

b) The regular expression with star height expression is \({\bf{(0(01*0))}}*\) already has minimum star height.

c) The regular expression with star height expression is \({\bf{(0}} \cup {\bf{1)*}}\).

Step by step solution

01

Step \({\bf{1}}\): Definition

Kleene closure of \(A\): Set consisting of concatenations of any number of strings from \(A\)can be

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

02

Finding the regular expression

(a)

\(\left( {0*1*} \right)*\)By the definition of the Kleene closure, \(0*\) represents a string of zero or more \(0{\bf{ }}'s\) and \(1*\) represents a string of zero or more \(1{\bf{ }}'s\).

This then implies that \(\left( {0*1*} \right)*\) represents any concatenation of \(0{\bf{ }}'s\) and \(1{\bf{ }}'s\), which are all possible bit strings. It can also notate the set of all bit strings as \({\bf{(0}} \cup {\bf{1)}}*\) which has the minimum star height of \(1\) (as it cannot represent the set of all bit strings without using the Kleene closure).

Therefore, the regular expression with star height expression is \({\bf{(0}} \cup {\bf{1)*}}\)

03

Detecting the regular expression

(b)

\({\bf{(0(01*0))}}*\)By the definition of the Kleene closure, \(1*\) represents a string of zero or more \(1{\bf{ }}'s\).

\(01*0\)then represents all strings starting and ending with zeros, while \(\left( {01*0} \right)*\) then represents all strings in which the \({{\rm{(}}^{}}'{\rm{)'}}s\) are separated by at least two zeros.

\(\left( {0\left( {0*0} \right)} \right)*\)then represents all strings in which the \(1{\bf{ }}'s\) are separated by at least three zeros.

\({\bf{(0(01*0))}}*\)has height \(3\) due to the expression containing two Kleene closures. It is not possible to represents the set of all strings in which the \(1{\bf{ }}'s\) are separated by at least three zeros with \(1\) or no Kleene closures and it is mentioned that the regular expression already has least star height.

Therefore, the regular expression with star height expression is \({\bf{(0(01*0))}}*\) already has minimum star height.

04

Discovering the regular expression

(c)

\(\left( {0* \cup \left( {01} \right)* \cup *} \right)*\)

By the definition of the Kleene closure, \(0*\) represents a string of zero or more \(0{\bf{ }}'s\) and \(1*\) represents a string of zero or more \(1{\bf{ }}'s\).

This then implies that \(\left( {0* \cup \left( {01} \right)* \cup *} \right)*\) represents any concatenation of \(0{\bf{ }}'s\) and \(1{\bf{ }}'s\), which are all possible bit strings. It can also notate the set of all bit strings as \({\bf{(0}} \cup {\bf{1)*}}\) which has the minimum star height of \(1\) (as it cannot represent the set of all bit strings without using the Kleene closure).

Therefore, the regular expression with star height expression is \({\bf{(0}} \cup {\bf{1)*}}\).

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

Express each of these sets using a regular expression.

  1. The set consisting of the strings 0, 11, and 010
  2. The set of strings of three 0s followed by two or more 0s
  3. The set of strings of odd length
  4. The set of strings that contain exactly one 1
  5. The set of strings ending in 1 and not containing 000

a) Show that the grammar \({{\bf{G}}_{\bf{1}}}\) given in Example 6 generates the set\({\bf{\{ }}{{\bf{0}}^{\bf{m}}}{{\bf{1}}^{\bf{n}}}{\bf{|}}\,{\bf{m,}}\,{\bf{n = 0,}}\,{\bf{1,}}\,{\bf{2,}}\,...{\bf{\} }}\).

b) Show that the grammar \({{\bf{G}}_{\bf{2}}}\) in Example 6 generates the same set.

Suppose that S, I and O are finite sets such that \(\left| S \right| = n, \left| I \right| = k\), and \(\left| O \right| = m\).

\(a)\)How many different finite-state machines (Mealy machines) \(M = \left( {S,I,O,f,g,{s_0}} \right)\) can be constructed, where the starting state \({s_0}\) can be arbitrarily chosen?

\({\bf{b)}}\)How many different Moore machines \(M = \left( {S,I,O,f,g,{s_0}} \right)\) can be constructed, where the starting state \({s_0}\) can be arbitrarily chosen?

Let V = {S, A, B, a, b} and T = {a, b}. Find the language generated by the grammar (V, T, S, P) when theset P of productions consists of

\(\begin{array}{*{20}{l}}{{\bf{a) S }} \to {\bf{ AB, A }} \to {\bf{ ab, B }} \to {\bf{ bb}}{\bf{.}}}\\{{\bf{b) S }} \to {\bf{ AB, S }} \to {\bf{ aA, A }} \to {\bf{ a, B }} \to {\bf{ ba}}{\bf{.}}}\\{{\bf{c) S }} \to {\bf{ AB, S }} \to {\bf{ AA, A }} \to {\bf{ aB, A }} \to {\bf{ ab, B }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{d) S }} \to {\bf{ AA, S }} \to {\bf{ B, A }} \to {\bf{ aaA, A }} \to {\bf{ aa, B }} \to {\bf{ bB, B }} \to {\bf{ b}}{\bf{.}}}\\{{\bf{e) S }} \to {\bf{ AB, A }} \to {\bf{ aAb, B }} \to {\bf{ bBa, A }} \to {\bf{ \lambda , B }} \to {\bf{ \lambda }}{\bf{.}}}\end{array}\)

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

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