Question

String digit sums. Consider strings over the alphabet 2= {0,1,2,3,4,5,6,7,8,9). We will recursively define the digsum functio

Just cant even. Consider a language Lodd defined as follows: • a € Lodd for a € {1,3,5,7,9} • ax e Lodd for a € {0,2,4,6,8)

(b) Prove that for any x E Lodd, digsum(x) is odd.

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

For a \epsilon Lodd, it should be odd. So for a single character, it is alway odd.

Now for ax \epsilon Lodd, a should be even. Sum of an even and odd number is odd, so this case always yields an odd number.

Now for axb \epsilon Lodd, a and b should be odd. Sum of two odd numbers is odd, and sum of an even and odd number is odd, so this case always yields an odd number too.

So, it will always result in odd.

Add a comment
Know the answer?
Add Answer to:
String digit sums. Consider strings over the alphabet 2= {0,1,2,3,4,5,6,7,8,9). We will recursively define the digsum...
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