1. Not finding help here? Sign up for a free 30min tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Number of n-length "words"

  1. Oct 24, 2016 #1
    1. The problem statement, all variables and given/known data
    Given an alphabet of {0,1,2}, how many "words" of length n are there that contain even 0s?

    2. Relevant equations
    Choose 2k 0s from n - C(n,2k), k=0,n/2

    3. The attempt at a solution
    I tried to solve this for n=4 and n=5. For n=4 I got 12 (or, if 0000 is also counted then 13), for n=5 - 30. But I can't figure out the formula
     
  2. jcsd
  3. Oct 24, 2016 #2
    First, consider this problem : How many words of length ##n## contains ##2k## ##0##s?
    There are ##^nC_{2k}## ways to choose the ##2k## places for ##2k## ##0##s. After setting ##0##s, we have ##n-2k## places to be filled up by ##1##s and ##2##s. We can use as many ##1##s and ##2##s as we like. So there are ##2^{n-2k}## ways to fill the rest ##n-2k## places by ##1##s and ##2##s.
    Therefore, there are ##^nC_{2k}\cdot 2^{n-2k}## words of length ##n## that contain ##2k## 0s.
    Can you figure out the formula now?
    [Hints: Apply binomial theorem]
     
    Last edited: Oct 24, 2016
  4. Oct 24, 2016 #3
    I know what is the binomial theorem but I don't know how to transform this formula to get the binomial form of it
     
  5. Oct 24, 2016 #4

    haruspex

    User Avatar
    Science Advisor
    Homework Helper
    Gold Member
    2016 Award

    Consider the expansion of (1+x)n. Your problem is that you get both odd and even powers of x. How could you add another expansion to make only the odd powers disappear?
     
Know someone interested in this topic? Share this thread via Reddit, Google+, Twitter, or Facebook

Have something to add?
Draft saved Draft deleted



Similar Discussions: Number of n-length "words"
  1. N letter words (Replies: 5)

  2. Find number n,m (Replies: 26)

Loading...