Purchase Solution

palindromes

Not what you're looking for?

Ask Custom Question

How many bit strings of length n are palindromes? Hint: Consider two cases n is even and n is odd. Note a palindrome is a "string" of letters or numbers which read the same frontwards and backwards. Examples: MOM, 1101011, 10111101 are palindromes.

Purchase this Solution

Solution Summary

String bits and palindromes are assessed in this solution.

Solution Preview

Hello and thank you for posting your question to BrainMass.

Let's see first how many different strings we can make with k bits.

If we have one bit, then we have two possible strings (namely "0" and "1")
If we have k=2 bits, then we have to possibilities for the first bit and two possibilities for the second bit, so together there are 2x2 = 4 possibles strings.
In a k length string, each bit has two possible values, hence the total number of strings is 2x2x.....2 = 2^k

Now we can start with out palindrome strings of length n.
Say we set the k<n bit. Then, by the definition of the palindrome this immediately sets the ...

Purchase this Solution


Free BrainMass Quizzes
Multiplying Complex Numbers

This is a short quiz to check your understanding of multiplication of complex numbers in rectangular form.

Solving quadratic inequalities

This quiz test you on how well you are familiar with solving quadratic inequalities.

Graphs and Functions

This quiz helps you easily identify a function and test your understanding of ranges, domains , function inverses and transformations.

Exponential Expressions

In this quiz, you will have a chance to practice basic terminology of exponential expressions and how to evaluate them.

Know Your Linear Equations

Each question is a choice-summary multiple choice question that will present you with a linear equation and then make 4 statements about that equation. You must determine which of the 4 statements are true (if any) in regards to the equation.