Discrete Mathematics and Its Applications, Seventh Edition

Published by McGraw-Hill Education
ISBN 10: 0073383090
ISBN 13: 978-0-07338-309-5

Chapter 6 - Section 6.1 - The Basics of Counting - Exercises - Page 397: 41

Answer

$2^{\frac{n}{2}}$ if n is even and $2^{\frac{n+1}{2}}$ if n is odd.

Work Step by Step

a palindrome of length n is completely determined by its first $\left \lceil{\frac{n}{2}}\right \rceil$ bits. This is true because once these bits are specified, the remaining bits, read from right to left, must be identical to the first $\left \lfloor{\frac{n}{2}}\right \rfloor$ bits, read from left to right. Furthermore, for each bit we have 2 options, Therefore, by the product rule there are $\left \lceil{\frac{n}{2}}\right \rceil $ways to do so. i.e., $2^{\frac{n}{2}}$ if n is even and $2^{\frac{n+1}{2}}$ if n is odd.
Update this answer!

You can help us out by revising, improving and updating this answer.

Update this answer

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.