Question

[Easy] Theoretical Computer Science

Find a grammar for the following languages: (a) Set of binary numerals that represent odd natural numbers (b) Set of binary numerals that represent even natural numbers

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

Solution :

a) Set of binary numbers that represents odd numbers :
S-> 0S|1S|1
all odd binary numbers ends with 1.

b) Set of binary numbers that represents even numbers : '
S-> 0S|1S|0
All even binary numbers ends with 0.

if you have any doubts then you can ask in comment section if you find the solution helpful then upvote the answer. Thank you.

Add a comment
Know the answer?
Add Answer to:
[Easy] Theoretical Computer Science Find a grammar for the following languages: (a) Set of binary numerals...
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