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

Find all pairs of sets of strings A and B for which AB= {10, 111, 1010, 1000, 10111, 101000}.

Short Answer

Expert verified

All possible pairs are given below:

First case:

\(\begin{array}{c}{\bf{A = \{ \lambda \} }}\\{\bf{B = \{ 10,111,1010,1000,10111,101000\} }}\\{\bf{A = \{ 10,111,1010,1000,10111,101000\} }}\\{\bf{B = \{ \lambda \} }}\end{array}\)

Second case:

\(\begin{array}{c}{\bf{A = \{ \lambda ,10\} }}\\{\bf{B = \{ 10,111,1000\} }}\end{array}\)

Third case:

\(\begin{array}{c}{\bf{A = \{ 1,101\} }}\\{\bf{B = \{ 0,11,000\} }}\end{array}\)

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

 Step 1: Find the strings

Here AB= {10, 111, 1010, 1000, 10111, 101000}.

Here AB represents the concatenation of A and B.

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

First case- one of the sets could contain only the empty string\({\bf{\lambda }}\), then the other set will contain all strings in AB itself.

\(\begin{array}{c}{\bf{A = \{ \lambda \} }}\\{\bf{B = \{ 10,111,1010,1000,10111,101000\} }}\\{\bf{A = \{ 10,111,1010,1000,10111,101000\} }}\\{\bf{B = \{ \lambda \} }}\end{array}\)

02

Solve for second case.

Second case- one of the sets contains the empty sets and at least one other string. Then there is only one possible case. Then

\(\begin{array}{c}{\bf{A = \{ \lambda ,10\} }}\\{\bf{B = \{ 10,111,1000\} }}\end{array}\)

X

Y

XY

\({\bf{\lambda }}\)

10

10

10

10

1010

\({\bf{\lambda }}\)

111

111

10

111

10111

\({\bf{\lambda }}\)

1000

1000

10

1000

101000

03

Third case.

Third case-there is also one possible pair of sets A and B where never contain empty string\({\bf{\lambda }}\).

\(\begin{array}{c}{\bf{A = \{ 1,101\} }}\\{\bf{B = \{ 0,11,000\} }}\end{array}\)

X

Y

XY

1

0

10

101

0

1010

1

11

111

101

11

10111

1

000

1000

101

000

101000

Therefore pairs are:

\(\begin{array}{c}{\bf{A = \{ \lambda \} }}\\{\bf{B = \{ 10,111,1010,1000,10111,101000\} }}\\{\bf{A = \{ 10,111,1010,1000,10111,101000\} }}\\{\bf{B = \{ \lambda \} }}\end{array}\)

\(\begin{array}{l}{\bf{A = \{ \lambda ,10\} }}\\{\bf{B = \{ 10,111,1000\} }}\end{array}\)

\(\begin{array}{l}{\bf{A = \{ 1,101\} }}\\{\bf{B = \{ 0,11,000\} }}\end{array}\)

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

Express each of these sets using a regular expression.

  1. The set containing all strings with zero, one, or two bits
  2. The set of strings of two 0s, followed by zero or more 1s, and ending with a 0
  3. The set of strings with every 1 followed by two 0s
  4. The set of strings ending in 00 and not containing 11
  5. The set of strings containing an even number of 1s

Let G be a grammar and let R be the relation containing the ordered pair \(\left( {{{\bf{w}}_{\bf{0}}}{\bf{,}}\,{{\bf{w}}_{\bf{1}}}} \right)\) if and only if \({{\bf{w}}_{\bf{1}}}\) is directly derivable from \({{\bf{w}}_{\bf{0}}}\) in G. What is the reflexive transitive closure of R?

Find the output generated from the input string 10001 for the finite-state machine with the state diagram in

a) Exercise 2(a).

b) Exercise 2(b).

c) Exercise 2(c).

Give production rule in Backus-Naur form for an identifier if it can consist of

a. One or more lower case letters.

b. At least three but no more than six lowercase letter

c. One to six uppercase or lowercase letters beginning with an uppercase letter.

d. A lowercase letter, followed by a digit or an underscore, followed by three or four alphanumeric characters (lower or uppercase letters and digits.)

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