Counting n-letter codewords with an even number of zeros

  • Context: Undergrad 
  • Thread starter Thread starter erogol
  • Start date Start date
Join the discussion
Registration is free. Ask a follow-up in this thread, or start your own.
5 replies · 2K views
erogol
Messages
14
Reaction score
0
a "codeword" from the alphabet A={0,1,2,3) is said to be legitimate if it contains even number of zeros. Thus for instance the codeword 31020 is legitimated and 0002 is not. How many n - letter codewords are legitimated ?
 
Physics news on Phys.org
erogol said:
a "codeword" from the alphabet A={0,1,2,3) is said to be legitimate if it contains even number of zeros. Thus for instance the codeword 31020 is legitimated and 0002 is not. How many n - letter codewords are legitimated ?

Hi erogol! :wink:

Show us what you've tried, and where you're stuck, and then we'll know how to help! :smile:
 
i have no sense to solve it i just know answer is 2^(2n-1) + 2^n -1
 
erogol said:
i have no sense to solve it i just know answer is 2^(2n-1) + 2^n -1

ok, start by making a sum over all possible (even) numbers of 0s …

the total number of legitimated words is ∑ what ? :smile:
 
So you are not even going to try?
 
HallsofIvy said:
So you are not even going to try?

Are you talking to me? :biggrin: