Welcome to The Forum

Register now to gain access to all of our features. Once registered and logged in, you will be able to create topics, post replies to existing threads

A Contest Question (This Isn't A Contest)


BlackEyes
 Share

Recommended Posts

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 by BlackEyes
Link to comment
Share on other sites

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 by Papa John
Link to comment
Share on other sites

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 :D)

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 by enigma#
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share