BlackEyes Posted April 11, 2013 Share Posted April 11, 2013 (edited) Go to this link and look at number 4: http://www.cs.umd.ed...estions/all.pdf Here is a picture of the question on the PDF: http://i.imgur.com/KxSRxpo.png It wants the contestant to write a program to take the best possible turn by picking the numbers with the smallest face value. Anyone know what face value means? This isn't homework and I'm not in any programming contest right now but I'm preparing for one. My guess would be face value means the one with the lowest high number. It says (For example, given the options {2,4,6} and {2,3,7}, you would take {2,4,6}). The highest numbers in those two are 6 & 7, 6 is lower, therefore pick that sequence. Edited April 11, 2013 by BlackEyes Quote Link to comment Share on other sites More sharing options...
Papa John Posted April 11, 2013 Share Posted April 11, 2013 (edited) Well since apparently it is stored in an array you can just do checks for each number in the array. For example, the sequences A: {1, 2, 3} and B: {1, 2, 4}. Check the first number in both sequences ( 1 and 1 ) and compare which is greater. Because they are equal the set is essentially a wash an neither sequence earns a point in its favor. You can perform the same check with the second which results in the same wash. Moving on to the last digit the comparision proves sequence A has a lower digit (3) than sequnce B (4) and so sequence A earns a point in its favor. At the end the sequence with the highest points in its favor is the correct sequence. Edited April 11, 2013 by Papa John Quote Link to comment Share on other sites More sharing options...
enigma# Posted April 11, 2013 Share Posted April 11, 2013 (edited) The PDF seems to read the same as what you said. You want to pick the lowest values for any die roll. Note on the strategy used: (I found it interesting ) I don't think the strategy is well sounded since you'd actually want to clear the HIGHEST numbered cards first before moving onto the lower numbers. there are 3 (or 4 since the card 6 can be completed with either 1 or 2 die) cards that can be rolled with 2 die. two dies, of which contains 6 faces. Right off the bat you can't roll a 1 because you have to use two die. Two is possible only if you can roll 1/1, this has a probability of 2/36 = 1/18 (6%), with 1 it's 17% Three is possible only with (2/1)(1,2) = 6%, with 1 it is 17% Four is possible with (3,1)(1,3)(2,2)(2,2) = 11%, with 1 it is 17% Five is possible with (4,1)(1,4)(3,2)(2,3) = 11%, with 1 it is 17% Six is possible with two die (3,3)(3,3)(2,4)(4,2)(1,5)(5,1) = 17%, with 1 it's 17% (equal chance) Seven - (3,4)(4,3)(5,2)(2,5)(1,6)(6,1) = 17% (not doable with 1) Eight - (4,4)(4,4)(6,2)(2,6)(5,3)(3,5) = 17% (not doable with 1) Nine - (3,6)(6,3)(5,4)(4,5) = 11% (not doable with 1) You would have a better chance of clearing out 7,8,9 and even six better than the other numbers. over 6,7,8,9 (17+17+17+11) = 62% over 1,2,3,4,5 = 33% If you compute the values at 1 die,7,8,9 are impossible to do with 1 die where as 1,2,3,4,5,6 all have equal chances of being rolled. So it would be smarter then to clear the higher ones first than the little ones. If you clear the numbers higher than 6 (or even 6 itself) first, you get a better chance at winning than clearing out the LOWEST numbers first. Edited April 11, 2013 by enigma# Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.