{-
Verify the result computed in Sec 5.2 of the paper.
First, we solve the auxiliary problem, of computing
SUM_{s \subset S}
SUM_{x \in s, x /= Alice}
SUM_{y \in s, y /= Bob, x /= y} 1
Where S is the domain of 100 people that includes Alice and Bob.
In other words, for each subset s of the domain we compute the number
of ordered pairs of different individuals such that the first
component of the pair is not Alice and the second component is not Bob.
Sum over all such subsets s of the domain.
If the subset s contains neither Alice nor Bob then the result (the number
of ordered pairs in s) is n*(n-1) = n^2-n, where n = |s|,
the cardinality of s.
If the subset s contains exactly one of Alice and Bob then the
result is (n-1)*(n-1) = n^2-2*n+1
If the subset s contains both Alice and Bob then the result is
(n-2)*(n-2) + 1*(n-1) = n^2-3*n+3
-}
n `choose` m = product [n-m+1..n] `div` product [1..m]
answer_sum =
sum [ sum [ ((100-2) `choose` (n-2)) * (n^2-3*n+3) | n <- [2..100] ]
, sum [ ((100-2) `choose` (n-1)) * (n^2-2*n+1) | n <- [1.. 99] ] * 2
, sum [ ((100-2) `choose` (n-0)) * (n^2-n ) | n <- [0.. 98] ] ]
-- 3075003443503627470680627800440832
{- We now solve the problem posed in Sec 5.2 of the paper, of computing
SUM_{s \subset S}
Prod_{x \in s, y \in s, x /= Alice, y /= Bob, x /= 3} 3
-}
answer_prod =
sum [ sum [ ((100-2) `choose` (n-2)) * 3^(n^2-3*n+3) | n <- [2..100] ]
, sum [ ((100-2) `choose` (n-1)) * 3^(n^2-2*n+1) | n <- [1.. 99] ] * 2
, sum [ ((100-2) `choose` (n-0)) * 3^(n^2-n ) | n <- [0.. 98] ] ]
-- 32176184600 .....
answer_prod_len = length $ show answer_prod
-- 4630