Riddler Express

Don’t Leave Home Without It!

With two circles with radius 1 that overlap, what distance should the centers be from one another for the three regions they create to have the same area? Let’s start with a base circle centered at the origin, and find the center of the second circle that we’ll push to the right without loss of generality.

When looking at these circles, it is apparent that the center of the second circle needs to be less than 1.

yu <- function(x) sqrt(1-x^2)
yd <- function(x) -sqrt(1-x^2)
r <- 0.8079455065990344184
yu2 <- function(x) sqrt(1-(x-r)^2)
yd2 <- function(x) -sqrt(1-(x-r)^2)
x <- seq(-1,2,0.1)
y <- seq(-1,1,0.2/3)
plot(x,y, type = "n")
curve(yu, -1, 1, n=101, add = TRUE)
curve(yd, -1, 1, n=101, add = TRUE)
curve(yu2, r-1, r+1, n = 101, add = TRUE)
curve(yd2, r-1, r+1, n = 101, add = TRUE)
abline(h = 0, v=0)

Setup

The graphs of these two are \(x^2+y^2=1\) and \((x-r)^2 + y^2 = 1\) for some \(0\leq r\leq 1\), respectively. Our job is to find the \(r\) such that the areas of the three regions are equal.

First, we find at what \(x\) the two circles intersect. This is when \(\sqrt{1-x^2} = \sqrt{1-(x-r)^2}\) which occurs at \(x = r/2\). To simplify the problem, we’ll find the areas defined above \(y=0\) and below the graphs up until \(x=r/2\).

x <- seq(-1,r/2,(r/2+1)/10)
y <- seq(0,1,0.1)
plot(x,y, type = "n")
curve(yu, -1, r/2, n=101, add = TRUE)
curve(yu2, r-1, r/2, n = 101, add = TRUE)
abline(h=0, v=r/2)

If we call the smaller of these two regions B, and the larger of the two regions A, then we need to find the value \(r\) such that the area of A is twice the area of B.

The area of \(A\cup B\) can be found by integrating \[ \int_{-1}^{r/2} \sqrt{1-x^2} dx. \] The integral of \(B\) can be found by integrating \[ \int_{r-1}^{r/2} \sqrt{1-(x-r)^2} dx. \] The first requires a substitution of \(x = -\cos(\theta)\) while the second requires a substituion of \(x = r-\cos(\theta)\).

Evaluating these two will reveal that \[ \text{area}(A\cup B) = \frac{\pi - \theta^*}{2} + \frac{r\sqrt{4-r^2}}{8}, \] and \[ \text{area}(B) = \frac{\theta^*}{2} - \frac{r\sqrt{4-r^2}}{8}, \] where \(\theta^* = \arccos(r/2)\).

By setting up the equation \(\text{area}(A\cup B) - \text{area}(B) = 2\times\text{area}(B)\) we end up needing to find a solution for \(r\) that satisfies \[ \frac{\pi}{2} = 2\arccos(r/2)-\frac{r\sqrt{4-r^2}}{2}, \] which, by using WolframAlpha will result in \(r = 0.8079455065990344184\). To check our answer, let’s integrate the functions over these regions.

## The area of A union B
AuB <- integrate(yu, -1, r/2)
## The area of B
B <- integrate(yu2, r-1, r/2)
AuB$value - B$value
## [1] 0.7853982
2*B$value
## [1] 0.7853983

Riddler Classic: Tour de FiveThirtyEight

Going First

So that we have a model to work with, let’s assume that paces range from 10mph to 30mph and the linear probability of “cracking” linearly changes from 0 to 1 along those paces. Let \(x\) represent the pace and \(p\) the probability, then the relationship here is \(p = \frac{x}{20}-\frac12\).

For us to win the race, we must finish and all 19 teams after us must fail at a pace that is faster than ours by a negligible amount. The probability of finishing is \(1-p\). As they will choose a pace that is almost our own (just a negligible amount faster), each team has a \(p\) probability of “cracking”. Thus, the probability we win is \((1-p)p^{19}\).

We need to maximize \(f(p) = (1-p)p^{19}\). To do this, we’ll maximize the log of the function, which will make things easier. Maximizing \(\ln(f(p)) = \ln(1-p)+19\ln(p)\) we take a derivative and set it equal to zero. This produces the equation \[ -\frac{1}{1-p}+\frac{19}{p}= 0. \]

Solving this produces \(p=0.95\), which is the probability of cracking. Thus, the probability that we finish the race will be \(0.05\), and then the probability that all other teams will lose the race is \((0.95)^{19}\). Thus, the probability we will be the overall winners will be

0.05*(0.95)^19
## [1] 0.01886768

Unimportant to the problem, this would mean the pace we set would have been 29mph.

What if we go last?

Assuming that all coaches conduct this ultimate strategy, the probability that we will win as the team that goes last is a twenty-part calculation. To see this, consider the first few cases.

Case 1. The first team finishes the race. This means the pace is at its fastest. Any team after this could finish the race as well, at a 5% chance. This includes us.

Case 2. The first team fails to finish. Now, we have a new problem similar to the first, except there are only 19 teams. Solving a similar equation will produce a \(p = 18/19\) instead of the \(0.95 = 19/20\). Now suppose the second team finishes the race. This has probability \(\frac{19}{20}\times \frac{1}{19} = \frac{1}{20}\). The pace has been set again (this time at 28mph), and any team after this could finish with probability 1/19, including us.

Case \(n<20\). The first \(n-1\) teams failed, and the \(n\)th team succeeds. This, like the previous case, has probability .05. Any team after has probability of \(\frac{1}{21-n}\) of finishing, including us. Again, the pace would be \(30-n\) mph if you care. But this is not important.

Thus, the probability that we win is \(.05\times \left(\frac{1}{20}+\frac{1}{19}+\ldots +\frac12 +1\right)\).

.05*sum(1/1:20)
## [1] 0.179887