Question

****** Theory of Computing ********* 1. Provide a regular expression for “all even length strings of...

****** Theory of Computing *********

1. Provide a regular expression for “all even length strings of b’s”.

2. List all words of length 4 in Language((a+b)* a). Also, provide an English description of this language.

0 0
Add a comment Improve this question Transcribed image text
Answer #1

1.

If the alphabet Σ = (b) then,

the regular expression for all the even length strings of b is

R = (bb)*.

Here, ε is considered to be of even length.

2.

The regular expression for the language given is (a+b)*a.

To get the list of words of length 4 from the language, the following steps are taken :

List out all the strings of length 4 possible from the alphabet of Σ (a,b). This can be done by treating 0 in a truth table as symbol a and 1 in the truth table as symbol b. So, for strings of length, a combination of 24 = 16 are made as in a truth table.

aaaa

aaab

aaba

aabb

abaa

abab

abba

abbb

baaa

baab

baba

babb

bbaa

bbab

bbba

bbbb

Step 2 :

Extract only those strings that end with symbol a.

So, the strings of length 4 are :

aaaa

aaba

abaa

abba

baaa

baba

bbaa

bbba

The language described by the given regular expression is used to denote the set of all strings that end with symbol a.

Add a comment
Know the answer?
Add Answer to:
****** Theory of Computing ********* 1. Provide a regular expression for “all even length strings of...
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for? Ask your own homework help question. Our experts will answer your question WITHIN MINUTES for Free.
Similar Homework Help Questions
ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT