# A Game of Dice and Logic

A friend and I are playing a cooperative game. He has two D7 dice and 5 cards in front of him. They read;

HIDDEN IS <= SHOWN
HIDDEN IS >= SHOWN
HIDDEN IS EXACTLY ONE AWAY FROM SHOWN
HIDDEN AND SHOWN SUM TO AN ODD NUMBER
HIDDEN IS ONE OF 1/4/7


The game works as thus; my friend rolls two dice and looks at both of them. He then places one of those two dice on one card (thereby revealing it to me). That die is the SHOWN die, and the one he did not place is the HIDDEN die. He may only play a die on a card if that placement would make a true statement.

The problem is that we're both perfect logicians, so most games go pretty easily. That is, until one day he decided to mess with me. Without showing either of the dice he rolled, he gave me a few facts about his dice;

1. I could put either of these dice on any of at least two cards and I wouldn't be breaking any of the rules.

2. The lesser of them could go on more cards than the greater.

3. And if I removed this card, then the two previous facts would still be true.

As he said the third fact, he pointed to a card.

"I still don't know what dice you have," I said.

What card did he point to?

Thanks for playing! Inspiration for this puzzle came from the boardgame Shipwreck Arcana, it's one of my favourite games I've ever played :)

• Now I'm trying to imagine what a D7 die would look like. Assuming it's a fair die, the only shape I can think of would be a 7-sided prism (with pointy ends so it doesn't land on an end.) Of course, then you'd end up with an edge on top, so the numbers would have to be on the edges rather than the faces... Mar 12 '20 at 13:40
• >the numbers would have to be on the edges rather than the faces Clearly the solution is to make a d14 in this manner, then double up on face values ;) Speaking of which - a d20 with odds marked as 1 and evens marked as 2 is probabilistically identical to a coin :P Mar 12 '20 at 14:27
• A pentagonal prism could be very tall, and then the probability of landing on either of the pentagonal faces would be nearly 0; or it could be very squat, and then the probability of landing on either of the pentagonal would be nearly 1. Somewhere in between, there is a height where the probability of landing on one of the pentagonal faces is the same as the probability of landing on one of the rectangular faces. This is an example of a fair D7. Ref <statweb.stanford.edu/~cgates/PERSI/papers/fairdice.pdf>. Video: <youtube.com/watch?v=G7zT9MljJ3Y>. Mar 13 '20 at 3:20
• Ah, IVF. I love seeing it in the wild. Mar 13 '20 at 10:38
• @Mathgeek, if that's an abbreviation for intermediate value theorem, there's something a little off about it. Also I should probably confess that the source also says the value depends on the mechanical properties of the die and the table ... a spinner (roughly what you described) is probably a better bet. Mar 13 '20 at 17:03

I am able to find a unique answer only if I interpret

Rule number 1 ("I could put either of these dice on any of at least two cards and I wouldn't be breaking any of the rules.") to mean that either die can go on the SAME two or more cards without violating the game rules.
I don't think this is the interpretation the puzzle author intended, but without this interpretation I cannot get a unique answer.

With that interpretation, my answer is that the friend is pointing to

Card 1 (HIDDEN <= SHOWN)

Explanation:

For the lesser die to be able to placed on more of the 5 cards than the greater die, we know that the numbers on the dice must be different, and then we can reason that the two dice split evenly across the first two cards, and both either match or do not match cards 3 and 4. Therefore, we can conclude that ONLY the lesser die can match card 5.
This means that the greater die must be one of 1/4/7 (obviously, it cannot be 1), and the lesser die is NOT ANY of these. This only leaves
2,4 3,4
2,7 3,7 5,7, 6,7
as possibilities. Furthermore, for rule 1 (with the above interpretation) to be true, both the lesser die and greater die must BOTH be able to be placed on BOTH of cards 3 and 4. This means that they are one apart (and, obviously, odd in sum), which only leaves
3,4 6,7.
Then, evaluating the five cards for removal,
by the above interpretation of Rule 1, only card 1, 2, or 5 could be removed to make the statements true. If card 2 or 5 is removed, it will not be possible for the lesser die to be placed on more cards. So only card 1 can be removed. If card 1 is removed, both the 3,4 and 6,7 results still satisfy all statements the friend made, which is why the narrator does not know precisely which dice were thrown.

• This is the correct solution! Well done! The dice could overlap on which cards they hit on (meaning if they were equal, you could have them both on <= or >=). Well solved, this was the entire intended solution. Mar 12 '20 at 3:56

I think the card he pointed to is

not determinable

Because

They can't be the same number because of fact 2. If they were the same, they'd go on the same cards

And

If one dice can go on card 3 or 4, the other one can too.

Also

One can go on 1 and one can go on card 2. So the extra card is card 5, that only the small one can go on (and in fact must be able to go on).

So

the possible combinations are
1, 4
1, 7
2, 4
2, 7
3, 4
3, 7
5, 7
6, 7

and

at least one of card 3 and card 4 is true. (otherwise there would not be at least two cards for the larger dice).

therefore

we can eliminate 1,7 2,4 3,7 and 5,7 because they don't make either 3 or 4 true

That leaves

1,4 2,7 3,4 6,7

if he

removes card 1, then the smaller dice will have the more possible cards (2, 5 plus possible 3,4) as the larger dice (possible 3,4, same as smaller dice). But, this means that 3 AND 4 must be true to satisfy the other rule. This would allow him to guess 3 and 4, so it can't be the card he pointed to.

and if he

removes card 2, then the smaller dice will have the same number of possibilities (5 plus possible 3,4) as the larger dice (1, possible 3,4), so this can't work.

and if he

removes card 3, then the smaller dice will have the more possible cards (2, 5, 4) than the larger dice (1,4) (Four must be true so larger dice has two possibilities). The possibilites are 1,4, 2,7 3,4 so this doesn't narrow it down, so could be the pointed to card.

and if he

removes card 4, then the smaller dice will have the more possible cards (2, 5, 3) than the larger dice (1, 3). (Three must be true so larger dice has two possibilities). The possibilites are 3,4 6,7 so this doesn't narrow it down either, so could be the pointed to card.

and if he

removes card 5, then the smaller dice will have the same number of possibilities (2 plus possible 3,4) as the larger dice (1, possible 3,4), so this can't work.

Therefore

Either card 3 or 4 was pointed to, but we don't know which one.

• I think you had it right with your original answer (at least in identifying the card) Mar 12 '20 at 2:16
• @DanielMathias i thought so, but then realized i had it backwards. that would have let him figure out the dice numbers and he said he couldn't Mar 12 '20 at 2:17

Your partner has rolled a one and a six, and is pointing at the off by one card.

We know that

the two dice are not equal due to fact #2.

Fact three points that

there is either one card that neither die can be placed on, or that each die can secretly be placed on three or more cards. We'll go with the former for now. Since the two dice are unequal, one of the first two cards <= or >= will always be available.

The dice cannot be

one apart, else each die would be able to placed on three different cards (<=/>=, off by one, sum to odd). Similarly, both dice cannot be part of card 5 (1,4,7).

That leaves

the <=/>= cards as one of our potential cards, and the sum to odd as the second. Because only the lesser die can be placed on a third card, it must be (1,4,7). The lesser value obviously can't be 7. A quick check shows that it can't be 4 either - as in order to sum to an odd value, the higher die would need to be a 5 (which allows placement on off-by-one) or a 7 (allows placement on 1,4,7). So the lower die must be a 1. The higher die cannot be a 2 (off by one), 3 (doesn't sum to odd), 4 (1,4,7), 5 (doesn't sum to odd), or 7 (1,4,7).

• Why rot13(pna'g gur qvpr or cynprq ba 3 pneqf?) Mar 11 '20 at 22:01
• @SteveV - I'm assuming that otherwise, the opponent would r13 fcrpvsl gung rnpu qvr pbhyq or cynprq ba ng yrnfg guerr pneqf Mar 11 '20 at 22:07
• "I still don't know what dice you have" means that the numbers cannot be determined. Mar 11 '20 at 22:25
• Woke up and realized my last card logic was backwards. Whoops. Mar 12 '20 at 11:49

He points to:

HIDDEN IS >= SHOWN

Because:

#2 says one of the dice is greater than the other. The first two cards can be played in four ways, as it is not specified which die is hidden. For example, a throw of 2,7 could be 2 HIDDEN (card 1) or 7 HIDDEN (card 2). This gives us the two cards.

Then:

Cards 3 implies card 4, but not the other way round. Both the LESSER and GREATER die obey both, one (just card 4) or neither cards together. So #3 implies that the LESSER die must be a $$1$$ or $$4$$, and the GREATER die cannot be a $$4$$ or $$7$$. Also #3 tells us that the LESSER die is the HIDDEN die.

Now:

Card 2 is false, and card 1 is true.

And:

Removing card 5 violates #3. Removing card 4 disallows card 3, and would only leave 1 true card for the GREATER SHOWN die, namely card 1.

Finally,

So he must have pointed to either card 1 or card 3, and we want the card that leaves the outcome of the dice unknown, i.e. one of the cards fixes the dice. Removing card 1 leaves cards 3 and 4 true, so $$12$$ or $$45$$. Removing card 3 means the sum is odd, but the dice are not one apart, and this can only be $$16$$.

Therefore:

Card 1 is pointed at.

• Not either of them. One of them, when removed, would make statement 2 false. Mar 12 '20 at 2:11

I believe that the expected answer* is that he pointed to

the middle card, HIDDEN IS EXACTLY ONE AWAY FROM SHOWN

Having rolled

either $$(2,7)$$, $$(3,4)$$ or $$(6,7)$$

Why?

"The lesser of them..." $$\implies$$ they are not equal
Call them little, $$L$$, and big, $$B$$.
We know:
* $$B$$ can be placed on HIDDEN IS <= SHOWN; and
* $$L$$ can be placed on HIDDEN IS >= SHOWN
and conversely:
* $$L$$ cannot be placed on HIDDEN IS <= SHOWN; and
* $$B$$ cannot be placed on HIDDEN IS >= SHOWN

Since each of HIDDEN IS EXACTLY ONE AWAY FROM SHOWN and HIDDEN AND SHOWN SUM TO AN ODD NUMBER may only be playable by both dice or neither AND "The lesser of them could go on more cards than the greater." we know that $$L$$ can be placed on the only other card ...HIDDEN IS ONE OF 1/4/7 AND that $$B$$ cannot
- i.e. $$L \in \{2,3,5,6\}$$ and $$B \in \{1,4,7\}$$

Since $$L we now have only $$6$$ pairs to consider: $$(2, 4)$$, $$(2, 7)$$, $$(3, 4)$$, $$(3, 7)$$, $$(5, 7)$$, $$(6, 7)$$

Summarising some of the above we know $$B$$:
* can go on HIDDEN IS <= SHOWN;
* cannot go on HIDDEN IS >= SHOWN; and
* cannot go on HIDDEN IS ONE OF 1/4/7
...but must playable on at least $$2$$ cards.
Now note that we can rule out any pairs for which both dice cannot be played on either HIDDEN IS EXACTLY ONE AWAY FROM SHOWN or HIDDEN AND SHOWN SUM TO AN ODD NUMBER
...that is those which have an even sum (necessarily also non-adjacent).
This leaves $$(2, 7)$$, $$(3, 4)$$, $$(6, 7)$$
Examining these by playable counts, $$P(L),P(B)$$, after the removal of each card:
 L B | h<=s h>=s Δ=1 odd(h+s) h~147 2 7 | 3,1 2,2 3,2 2,1 2,2 3 4 | 4,2 3,3 3,2 3,2 3,3 6 7 | 4,2 3,3 3,2 3,2 3,3

We can see that
the only column for which all entries satisfy $$P(L)>P(B)$$ and $$P(B)\ge 2$$ is the middle column, representing HIDDEN IS EXACTLY ONE AWAY FROM SHOWN.

* Unfortunately...

He could actually point to any card which has any $$2$$ such $$P(L),P(B)$$ entries in its column - which means he could have pointed to either HIDDEN IS <= SHOWN or HIDDEN AND SHOWN SUM TO AN ODD NUMBER having rolled either $$(3,4)$$ or $$(6,7)$$.

...although I just read the accepted answer and I see now. Very nice puzzle except for the slightly confusing, albeit strictly-speaking correct, English employed.