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

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.

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

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}}}\).

In Exercises 16โ€“22 find the language recognized by the given deterministic finite-state automaton

a) Construct a phrase-structure grammar that generates all signed decimal numbers, consisting of a sign, either + or โˆ’; a nonnegative integer; and a decimal fraction that is either the empty string or a decimal point followed by a positive integer, where initial zeros in an integer are allowed.

b) Give the Backusโ€“Naur form of this grammar.

c) Construct a derivation tree for โˆ’31.4 in this grammar.

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}}*\).

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

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