X1
The longest Collatz chain under a million
Start from n. If n is even halve it, otherwise triple it and add 1, and repeat until you reach 1. Find the starting number below 1,000,000 that takes the most steps.
Target: 837799, which takes 524 steps.
Hand in: verify.py printing the starting number and the step count, and the time it took.
X2
Count the primes
Count the primes below 10⁶, 10⁷ and 10⁸ with a sieve, and compare each count with the estimate x / ln x.
Targets: π(10⁶) = 78,498, π(10⁷) = 664,579, π(10⁸) = 5,761,455.
Hand in: verify.py printing the three counts and the percentage error of the estimate for each.
X3
Estimate π by throwing darts
Pick random points in a square and count how many land inside the inscribed circle. Estimate π for 10³, 10⁴, …, 10⁷ points and show that the error shrinks like one over the square root of the number of points.
Target: an estimate within three standard errors of 3.14159…, at every sample size, from a fixed seed.
Hand in: verify.py with a fixed seed, printing each estimate with its standard error.
X4
The birthday problem, two ways
Compute exactly the probability that at least two of 23 people share a birthday (365 equally likely days), then estimate it by simulation and show the two agree.
Target: 0.5073 (exactly 0.507297… to six places).
Hand in: verify.py printing the exact value from the formula, the simulated value with its standard error, and whether they agree.
X5
Verify Goldbach's conjecture to a million
Check that every even number from 4 to 1,000,000 is a sum of two primes. Report the even number whose smallest such prime is largest.
Target: no counterexample. (The conjecture is unproved; you are verifying a finite range, not proving it.)
Hand in: verify.py printing the count checked, the hardest case and its two primes.
X6
Find Feigenbaum's constant
For the map x → r·x·(1 − x), find the values of r where the long-run behaviour doubles its period (1 to 2, 2 to 4, 4 to 8, 8 to 16). The ratios of the gaps between them approach a universal constant.
Target: δ ≈ 4.669. Your last ratio should be within 0.01 of it.
Hand in: verify.py printing the bifurcation points to six decimal places and the successive ratios.
X7
When does a grid let water through?
Open each cell of an L × L grid at random with probability p. Estimate the value of p at which a path of open cells from top to bottom first becomes likely, for L = 64, 128 and 256, and extrapolate.
Target: the site percolation threshold of the square lattice, p ≈ 0.5927.
Hand in: verify.py with fixed seeds, printing the estimate and its uncertainty for each L, and a short note on how you extrapolated.
X8
The temperature where a magnet forgets
Simulate the two-dimensional Ising model on a square grid with the Metropolis algorithm and locate the temperature at which the magnetisation disappears. Compare it with Onsager's exact answer.
Target: T = 2 / ln(1 + √2) ≈ 2.269 (in units where the coupling and Boltzmann's constant are 1).
Hand in: verify.py with fixed seeds, printing magnetisation against temperature for at least two grid sizes and your estimate with its uncertainty.