This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/- | |
The original problem is incorrect. Instead, we prove that the statement is true | |
if and only if either A or B is the universe | |
-/ | |
example (h0 : X ⊆ A) (h1 : Y ⊆ B) : | |
A = Set.univ ∨ B = Set.univ ↔ (X ×ˢ Y)ᶜ = A ×ˢ Yᶜ ∪ Xᶜ ×ˢ B := by | |
apply Iff.intro | |
{ | |
intro h2 | |
rw [Set.compl_prod_eq_union, Set.union_comm] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def riddler_classic(): | |
max_prob = 0 | |
max_n = 0 | |
for n in range(11, 100): | |
prob = 1 | |
for i in range(0, 8): | |
prob *= (n - i) / (2 * n - i) | |
for i in range(0, 11): | |
prob *= (n - i) / (2 * n - 8 - i) |