I hereby solicit suggestions for the video of the day. Please email me your ideas with explanations. Selected entries will win 5 homework points. If your video is played at the beginning of class, you must also briefly explain something about the video and something about yourself - in person.
T O
+ G O
======
O U T
Variables: T, O, G, U
Domain: {0,1,2,3,4,5,6,7,8,9}
Constraints:
AllDifferent(T,O,G,U)
O + O = T
T + G = U + 10
int((T + G) / 10) = O
(ignore carry from O + O)
## Here is the csp object for TWO + TWO = FOUR from csp.py:
two_two_four =
NaryCSP({'T': set(range(1, 10)), 'F': set(range(1, 10)),
'W': set(range(0, 10)), 'O': set(range(0, 10)), 'U': set(range(0, 10)), 'R': set(range(0, 10)),
'C1': set(range(0, 2)), 'C2': set(range(0, 2)), 'C3': set(range(0, 2))},
[Constraint(('T', 'F', 'W', 'O', 'U', 'R'), all_diff_constraint),
Constraint(('O', 'R', 'C1'), lambda o, r, c1: o + o == r + 10 * c1),
Constraint(('W', 'U', 'C1', 'C2'), lambda w, u, c1, c2: c1 + w + w == u + 10 * c2),
Constraint(('T', 'O', 'C2', 'C3'), lambda t, o, c2, c3: c2 + t + t == o + 10 * c3),
Constraint(('F', 'C3'), eq)])
Four color theorem 1976 proof had 1,834 reducible configurations! First proof by computer.
Social processes and proofs of theorems and programs, DeMillo, Lipton, and Perlis, 1979. CACM. Volume 22, Issue 5.