MCMC and the coupon collector problem
More from John D. Cook
GPS satellites all orbit at the same altitude. According to the FAA, GPS satellites fly in circular orbits at an altitude of 10,900 nautical miles (20,200 km) and with a period of 12 hours. Why were these orbits chosen? You can determine your position using satellites that are not in circular orbits, but with circular […] The post GPS satellite...
A few weeks ago I wrote about the Mellin transform. Mitchell Wheat left comment saying the transform seems reminiscent of Ramanujan’s master theorem, which motivated this post. Suppose you have a function f that is nice enough to have a power series. Now focus on the coefficients an as a function of k. We’ll introduce […] The post Ramanujan’s...
Here’s a simple calculation that I’ve done often enough that I’d like to save the result for my future reference and for the benefit of anyone searching on this. A linear combination of sines and cosines a sin(x) + b cos(x) can be written as a sine with a phase shift A sin(x + φ). […] The post Linear combination of sine and cosine as phase shift...
Suppose you want to write a shell script searches the current directory for files that have a keyword in the name of the file or in its contents. Here’s a first attempt. find . -name '*.py' -type f -print0 | grep -i "$1" find . -name '*.py' -type f -print0 | xargs -0 grep -il […] The post Resolving a mysterious problem with find first appeared on...
I recently stumbled upon the Postage Stamp Problem. Given two relatively prime positive numbers a and b, show that any sufficiently large number N, there exists positive integers x and y such that ax + by = N. I initially missed the constraint that x and y must be positive, in which result is well […] The post The Postage Stamp Problem first...