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

Show that if A is a regular set, then\({{\bf{A}}^{\bf{R}}}\), the set of all reversals of strings in A, is also regular.

Short Answer

Expert verified

Therefore, the given statement is true. That is, if A is a regular set, then\({{\bf{A}}^{\bf{R}}}\), the set of all reversals of strings in A, is also regular.

Step by step solution

Achieve better grades quicker with Premium

  • Unlimited AI interaction
  • Study offline
  • Say goodbye to ads
  • Export flashcards

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

01

General form

Regular expressions (Definition): The regular expressions over a set I are defined recursively by:

The symbol \(\emptyset \) is a regular expression.

The symbol \({\bf{\lambda }}\)is a regular expression.

The symbol xis a regular expression whenever\({\bf{x}} \in {\bf{I}}\).

The symbols \(\left( {{\bf{AB}}} \right){\bf{,}}\left( {{\bf{A}} \cup {\bf{B}}} \right){\bf{,}}\) and \({\bf{A*}}\) are regular expressions whenever A and B are regular expressions.

The sets represented by regular expressions are called regular sets.

A rule of regular expression represents a set:

\(\emptyset \) represents the empty set, that is, the set with no strings;

\({\bf{\lambda }}\) represents the set\(\left\{ {\bf{\lambda }} \right\}\), which is the set containing the empty string;

xrepresents the set \(\left\{ {\bf{x}} \right\}\) containing the string with one symbol x;

(AB) represents the concatenation of the sets represented by Aand by B;

\(\left( {{\bf{A}} \cup {\bf{B}}} \right)\)represents the union of the sets represented by Aand by B;

\({\bf{A*}}\) represents the Kleene closure of the sets represented by A.

Structural Induction:A proof by structural induction consists of two parts. These parts are

Basis step: Show that the result holds for all elements specified in the basis step of the recursive definition to be in the set.

Recursive step: Show that if the statement is true for each of the elements used to construct new elements in the recursive step of the definition, the result holds for these new elements.

02

Step 2: Proof of the given statement

Given that, the set of all reversals of strings in A, is also regular.

To prove: If A is a regular set, then\({{\bf{A}}^{\bf{R}}}\).

Proof: Using Structural induction.

If the regular expression for A is \(\emptyset {\bf{, \lambda ,}}\)or x, the result is trivial.

Otherwise, suppose the regular expression for A is\({\bf{BC}}\).

Then \({\bf{A = BC}}\)where B is the set generated by B and C is the set generated by C.

By the inductive hypothesis there are regular expressions \({\bf{B'}}\) and \({\bf{C'}}\) that generate \({{\bf{B}}^{\bf{R}}}\) and\({{\bf{C}}^{\bf{R}}}\), respectively.

Because,

\(\begin{array}{c}{{\bf{A}}^{\bf{R}}}{\bf{ = }}{\left( {{\bf{BC}}} \right)^{\bf{R}}}\\{\bf{ = }}{{\bf{C}}^{\bf{R}}}{{\bf{B}}^{\bf{R}}}\end{array}\)

\({\bf{C'B'}}\)is a regular expression for\({{\bf{A}}^{\bf{R}}}\).

If the regular expression for A is\({\bf{B}} \cup {\bf{C}}\), then the regular expression for \({{\bf{A}}^{\bf{R}}}\) is \({\bf{B'}} \cup {\bf{C'}}\)because\({\left( {{\bf{B}} \cup {\bf{C}}} \right)^{\bf{R}}} = \left( {{{\bf{B}}^{\bf{R}}}} \right) \cup \left( {{{\bf{C}}^{\bf{R}}}} \right)\).

Finally, if the regular expression for A is\({\bf{B*}}\), then it is easy to see that \(\left( {{\bf{B'}}} \right){\bf{*}}\) is a regular expression for\({{\bf{A}}^{\bf{R}}}\).

Conclusion: So, A is a regular set, and then \({{\bf{A}}^{\bf{R}}}\) is also regular set.

Hence proved.

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

A context-free grammar is ambiguous if there is a word in \({\bf{L(G)}}\) with two derivations that produce different derivation trees, considered as ordered, rooted trees.

Show that the grammar \({\bf{G = }}\left( {{\bf{V, T, S, P}}} \right)\) with \({\bf{V = }}\left\{ {{\bf{0, S}}} \right\}{\bf{,T = }}\left\{ {\bf{0}} \right\}\), starting state \({\bf{S}}\), and productions \({\bf{S}} \to {\bf{0S,S}} \to {\bf{S0}}\), and \({\bf{S}} \to 0\) is ambiguous by constructing two different derivation trees for \({{\bf{0}}^{\bf{3}}}\).

Use Backusโ€“Naur form to describe the syntax of expressions in infix notation, where the set of operators and identifiers is the same as in the BNF for postfix expressions given in the preamble to Exercise 39, but parentheses must surround expressions being used as factors.

Let \({\bf{G = }}\left( {{\bf{V, T, S, P}}} \right)\) be the context-free grammar with \({\bf{V = }}\left\{ {\left( {\bf{,}} \right){\bf{S,A,B}}} \right\}{\bf{, T = }}\left\{ {\left( {\bf{,}} \right)} \right\}\) starting symbol \({\bf{S}}\), and productions

Show that \({\bf{L}}\left( {\bf{G}} \right)\) is the set of all balanced strings of parentheses, defined in the preamble to Supplementary Exercise \(55\) in Chapter \(4\).

Let G be the grammar with V = {a, b, c, S}; T = {a, b, c}; starting symbol S; and productions \({\bf{S }} \to {\bf{ abS, S }} \to {\bf{ bcS, S }} \to {\bf{ bbS, S }} \to {\bf{ a, and S }} \to {\bf{ cb}}{\bf{.}}\)Construct derivation trees for

\(\begin{array}{*{20}{l}}{{\bf{a) bcbba}}{\bf{.}}}\\{{\bf{b) bbbcbba}}{\bf{.}}}\\{{\bf{c) bcabbbbbcb}}{\bf{.}}}\end{array}\)

Construct a finite-state machine that delays an input string by two bits, giving 00 as the first two bits of output.

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