Skip to content
Vamshi Jandhyala

Books · The Fiddler: Solutions

Chapter 34

Let’s Make a Tic-Tac-Deal!

Tic-Tac-Deal 2.02.0 uses a 3×33\times3 grid holding the numbers 33 through 1111: 34567891011\begin{array}{ccc}3&4&5\\6&7&8\\9&10&11\end{array} You roll two standard dice and add them, then place an X on the square equal to the sum. A sum of 22 or 1212, or any sum you have rolled before, wastes the roll. With exactly three rolls, what are your chances of getting three Xs in a row (horizontally, vertically, or diagonally)?

The Fiddler, Zach Wissner-Gross, October 10, 2025(original post)

The board. Eight lines win: three rows, three columns, and the two diagonals {3,7,11}\{3,7,11\}, {5,7,9}\{5,7,9\}.

Solution

Three rolls can make a line only if all three are distinct, none is 22 or 1212, and the three sums are exactly the three entries of one winning line. For such a triple the order is free and no roll is wasted, so each line contributes 3!3! orderings. With ckc_k the number of dice outcomes summing to kk (c3,,c11=2,3,4,5,6,5,4,3,2c_3,\dots,c_{11}=2,3,4,5,6,5,4,3,2) the answer is P=3!363lines {a,b,c}cacbcc=645246656=11319445.81%.P=\frac{3!}{36^3}\sum_{\text{lines }\{a,b,c\}} c_a c_b c_c =\frac{6\cdot452}{46656}=\frac{113}{1944}\approx\boxed{5.81\%}.

The computation

Roll the game out exhaustively: over all 36336^3 ordered outcomes of three dice-rolls, mark the squares (discarding 22, 1212, and repeats) and count the fraction whose marked set contains a winning line.

from fractions import Fraction as F
from itertools import product
lines = [(3,4,5),(6,7,8),(9,10,11),(3,6,9),(4,7,10),(5,8,11),(3,7,11),(5,7,9)]
dice = [a + b for a in range(1, 7) for b in range(1, 7)]   # 36 equally likely sums
win = 0
for s1, s2, s3 in product(dice, repeat=3):
    marks = {s for s in (s1, s2, s3) if 3 <= s <= 11}   # 2/12 and repeats drop out
    if any(set(L) <= marks for L in lines): win += 1
print(F(win, 36**3))                                          # 113/1944

Extra Credit

In the real game you get five rolls, with the same wasted-roll rules. With five rolls, what are your chances of three in a row?

Solution

After five rolls the marked squares are exactly the distinct sums in 3,,113,\dots,11 that came up; repeats and 2/122/12 only waste a turn. Tracking the set of marked squares through a five-step exact recursion and reading off the chance the final set contains a line, P=910405251942436.14%.P=\frac{910405}{2519424}\approx\boxed{36.14\%}. (The source’s five-roll figure is paywalled; this exact value is my own.)

The computation

Carry the exact distribution over marked-square sets (as bitmasks) through five rolls: each step either wastes the turn (22 or 1212) or adds square kk with probability ck/36c_k/36. Sum the probability of every final set that contains a line.

from collections import defaultdict
c = {3:2, 4:3, 5:4, 6:5, 7:6, 8:5, 9:4, 10:3, 11:2}; vals = list(c)
idx = {v: i for i, v in enumerate(vals)}
masks = [sum(1 << idx[x] for x in L) for L in lines]
dist = {0: F(1)}
for _ in range(5):
    nd = defaultdict(F)
    for s, pr in dist.items():
        nd[s] += pr*F(2, 36)                         # rolled 2 or 12 -> wasted
        for k in vals: nd[s | 1 << idx[k]] += pr*F(c[k], 36)
    dist = nd
print(sum(pr for s, pr in dist.items() if any((s & m) == m for m in masks)))
# -> 910405/2519424 ~ 36.14%