Advertisement
If you have a new account but are having problems posting or verifying your account, please email us on hello@boards.ie for help. Thanks :)
Hello all! Please ensure that you are posting a new thread or question in the appropriate forum. The Feedback forum is overwhelmed with questions that are having to be moved elsewhere. If you need help to verify your account contact hello@boards.ie
Hi there,
There is an issue with role permissions that is being worked on at the moment.
If you are having trouble with access or permissions on regional forums please post here to get access: https://www.boards.ie/discussion/2058365403/you-do-not-have-permission-for-that#latest

Basic Enough probability Question

  • 05-01-2016 11:10pm
    #1
    Registered Users, Registered Users 2 Posts: 476 ✭✭


    My LC maths skills have eluded me and I have a programming assignment due soon but I need to have knowledge of the following information. Here is the exact question I have. It is for an ARM assembly assignment but I am not asking for programming help.
    The Imaginary Lottery Company sells lottery tickets for a weekly draw. Players choose six numbers between 1 and 32 when purchasing an Imaginary Lottery ticket. There are prizes for matching four, five or six numbers.

    Design and write an ARM Assembly Language program that will determine the number of tickets that match four numbers, five numbers and six numbers. (i.e. Your program should produce three result values for the number of “match four” tickets, “match five” tickets and “match six” tickets.).

    Assuming the numbers drawn are 1,2,3,4,5,6.

    There is obviously 1 winning ticket that has all 6.

    Could there be 26 which has 5 matching e.g
    1,2,3,4,5,7
    1,2,3,4,5,8
    1,2,3,4,5,9 etc?


Comments

  • Registered Users, Registered Users 2 Posts: 5,141 ✭✭✭Yakuza


    Not quite, there are more match 5's than that.
    In order to work out how many combinations there are, divide the set of 32 into 6 winners and 26 non-winners.

    For a match 5, you need 5 from the winning 6 numbers and one from the 26 non-winners, formally [latex] {6 \choose 5} * {26 \choose 1} [/latex] or 6 * 26 = 156.
    The match 4 category will have [latex] {6 \choose 4} * {26 \choose 2} [/latex] or 15 * 325 = 4875 sets in it.

    So, your program should produce the following answers:
    Match 6 :    1
    Match 5 :  156
    Match 4 : 4875
    


  • Registered Users, Registered Users 2 Posts: 476 ✭✭RoRo979


    Yakuza wrote: »
    Not quite, there are more match 5's than that.
    In order to work out how many combinations there are, divide the set of 32 into 6 winners and 26 non-winners.

    For a match 5, you need 5 from the winning 6 numbers and one from the 26 non-winners, formally [latex] {6 \choose 5} * {26 \choose 1} [/latex] or 6 * 26 = 156.
    The match 4 category will have [latex] {6 \choose 4} * {26 \choose 2} [/latex] or 15 * 325 = 4875 sets in it.

    So, your program should produce the following answers:
    Match 6 :    1
    Match 5 :  156
    Match 4 : 4875
    

    But order does not matter in this question so would it not be that the person has 5 correct numbers. therefore there is now 27 remaining. If the user got picked number 6 then he/she would have won so that leaves 26 possible numbers that could have been picked no?


  • Registered Users, Registered Users 2 Posts: 1,768 ✭✭✭timsey tiger


    RoRo979 wrote: »
    But order does not matter in this question so would it not be that the person has 5 correct numbers. therefore there is now 27 remaining. If the user got picked number 6 then he/she would have won so that leaves 26 possible numbers that could have been picked no?

    Correct, however you've forgotten to consider how many ways you can get five correct numbers. You could be missing the first one or the second one or the third one...

    Giving 6 different ways you can get 5 out of the six winners. Then for each of these you have 26 options to pick the final wrong number, giving a total of 6 by 26 = 156 possible match five tickets


  • Registered Users, Registered Users 2 Posts: 23,902 ✭✭✭✭ted1


    4 numbers = 32*31*30*29/ 4*3*2*1
    5numberd as above but *28 /5..,.
    6numbers as above but *27/6.,,,


Advertisement