Question

(a) Consider the alphabet Σ = {a, b, c}. Give a recursive definition for the set...

(a) Consider the alphabet Σ = {a, b, c}. Give a recursive definition for the set of strings over Σ that contain exactly one c.

(b) Give a recursive definition for the set S = {x | x ∈ Z≥0 and b x 4 c is even}

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

(a) Language is S

Recursive definition

c belongs to S
aS, bS, Sa and Sb belongs to S

Explanation

At the end c must come at any place

(b) Language is S

0, 1, 2, 3 belongs to S
4 + S belongs to S

Explanation

0 1 2 3 -> floor(x / 4) = 0 even <-- Base case

4 5 6 7 -> floor(x / 4) = 1 odd

8 9 10 11 -> floor(x / 4) = 2 even <-- Add 4 each time

and so on

Add a comment
Know the answer?
Add Answer to:
(a) Consider the alphabet Σ = {a, b, c}. Give a recursive definition for the set...
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