Results 1 to 3 of 3

Thread: pop quiz question

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Posts
    83

    pop quiz question

    hey dudes my sister brought home a sheet of interesting maths puzzles she'd been given at school becasue its maths weeks here in ireland.

    anyway one of them has me a bit confused!!

    you have an "n" digit number
    each digit can assume only one of 3 values 1,2,3,

    so in this n digit number what percentage of the time do all 3 values (1,2,3) appear at least once!

    best i can see is 2/9 of the time, regardless of the length of the number!! but i'm thinking this may be wrong, because if the number grows drastically to say a billion digits, and each digit can only be one two or three, then surely most of the time in this string of a billion digits 1,2,3 will appear and so the percentage should rise as the value n increases??
    actually i'm 100% sure i'm wrong with my 2/9ths, i'll work on it a bit more and post again!!

    i wont go through my workings just yet, i'd be interested to hear what others have to say
    sdrawkcab daer uoy nac

  2. #2
    Lively Member
    Join Date
    May 2004
    Posts
    72

    Re: pop quiz question

    Hi,

    Nice to have maths weeks.

    Total combination of number with "n" digit for 1,2,3 = 3^n

    P(3 values appear at least once)
    = (P(Total) - P(No "1") - P(No "2") - P(No "3"))/P(Total)

    P(No "1") = P(No "2") = P(No "3")

    Combination with "1" would be just Combination of 2 and 3
    XXX, 3C3
    XXY, 3C2
    XYY, 3C1

    Combination above = Sum of nCr, for r =1 to n
    As Sum of nCr, for r = 0 to n => 2^n,
    Sum of nCr, for r =1 to n => (2^n)-1

    P(No "1") = (2^n)-1

    P(3 values appear at least once)
    = (P(Total) - P(No "1") - P(No "2") - P(No "3"))/P(Total)
    = (3^n - 3((2^n)-1))/3^n

    I check it for n = 3 to 14, and it corrects.
    Hope it is the answer

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Dec 2005
    Posts
    83

    Re: pop quiz question

    hey soft
    yeah your exactly right. i've come up with the same answer but a different way!!

    the set of all combinations has 3^n members

    the set containing only 1's and 2's (including all 1's and all 2's)= 2^n members
    the set containing only 1's and 3's (including all 1's and all 3's)= 2^n members
    the set containing only 2's and 3's (including all 2's and all 3'2)= 2^n members

    the 3 sets above have 3*2^n members but 3 members are repeated
    eg 11111.......1 appears in the first and second set
    22222......2 appears in the first and third set
    33333......3 appears in the second and third set

    to the total unique members in theese 3 sets is (3*(2^n))-3

    so that the set containing members with all 3 numbers appearing is
    (3^n)-(3*(2^n)-3) = (3^n-3((2^n)-1)
    and expressed as a percentage of all combinations= (3^n-3((2^n)-1)/(3^n)

    sdrawkcab daer uoy nac

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width