Processing math: 29%

Monday, January 24, 2022

Mazels on your wedding

The larger regular hexagon in the diagram below has a side length of 1. What is the side length of the smaller regular hexagon?

So let's first note that if the side length of the larger hexagon is 1, then the diameter of the circumscribing circle must be 2, thus it has a radius of R=1. This can be seen by noting that a regular hexagon can be divided into six equilateral triangles.

Assuming that both the larger hexagon and the circumscribing circle are centered at the origin, the upper semicircle is then given by point of the form y=1x2. In particular, let's assume that the side length of the smaller hexagon is s, then the points where the smaller hexagon and the circumscribing circle intersect are (±s2,1s24).

Again, noting that the regular hexagon can be broken into size equilateral triangles, we see that the height of the smaller hexagon is s3, while half of the height of the larger hexagon is 32. Therefore, the upper boundary of the smaller regular hexagon is on the line y=32+s3. So, in particular, we have 1s24=32+s3.

Squaring both sides we get 1s24=3(s+12)2=3s2+3s+34, or equivalently 0=134s2+3s14=134(s2+1213s113)=134(s+1)(s113), so choosing the positive solution, we must have that the smaller hexagon has side length ˆs=113.

Generically, we can solve for any arbitrary number of additional vanishingly small hexagons by setting s1=ˆs=1/13 as above, and setting up the recurrence relationship 1s2i4=3(12+ik=1sk), where the side length of the ith hexagon is denoted by si. We can square and solve this relationship to find that the side lengths of the next two smaller hexagons are s2=90+8113169=4.27179104 and s3=1.316951018, respectively.

Monday, January 10, 2022

Sure, but what's the probability that you call timeout in OT for no reason and miss the playoffs?

In the Riddler Football League, you are coaching the Arizona Ordinals against your opponent, the Detroit Lines, and your team is down by 14 points. You can assume that you have exactly two remaining possessions (i.e., opportunities to score), and that Detroit will score no more points.

For those unfamiliar with American football, a touchdown is worth 6 points. After each touchdown, you can decide whether to go for 1 extra point or 2 extra points. You happen to have a great kicker on your team, and your chances of scoring 1 extra point (should you go for it) are 100 percent. Meanwhile, scoring 2 extra points is no sure thing — suppose that your team’s probability of success is some value p.

If the teams are tied at the end of regulation, the game proceeds to overtime, which you have a 50 percent chance of winning. (Assuming ties are not allowed.)

What is the minimum value of p such that you’d go for 2 extra points after your team’s first touchdown (i.e., when you’re down 8 points)?

Let's set up the problem. Say Si is the score after your ith touchdown and extra point(s), with S0=14. You are faced with two choices, u1 and u2, each of which can be K (kick) or T (try for two-point conversion). So the transitional probabilities are P{Si=sui}={1,if ui=K and s=Si1+7;p,if ui=T and s=Si1+8;1p,if ui=T and s=Si1+6;0,otherwise.

Here we assume that losing by any number of points, or winning by any number, while potentially valuable to degenerate gamblers who are following the RFL, is of no use to you the coach (so I guess there are no weird tie breakers or other such secondary incentives to score the most points possible). So the utility function that we are trying to maximize is V(S2)={1,if S2>0;0.5,if S2=00,if S2<0 and we have the following optimization problem max

The boring strategy would be u_1 = u_2 = K, essentially playing for a tie, which give S_2 = 0 w.p. 1 and so \mathbb{E}[V(S_2) \mid u_1 = u_2 = K] = V(0) = 0.5. We needn't really check due to the prompt, but the strategy u_1 = K, u_2 = T would give S_1 = -7 w.p. 1 and so \mathbb{E}[V(S_2) \mid u_2 = T, u_1 = K] = p V(1) + (1-p) V(-1) = p, which would only be better than u_1 = u_2 = K if p \gt 0.5.

If instead, we go for 2 after the first touchdown, then there are two possible outcomes. If we succeed and S_1 \mid u_1 = -6, then we can safely pick u_2 = K, since this will give S_2 = 1 w.p. 1, so \mathbb{E} [V(S_2) \mid S_1 = -6, u_1 = T, u_2 = K ]= 1 which is a better outcome for any value of p \lt 1 than \mathbb{E}[ V(S_2) \mid S_1 = -6, u_1 = u_2 = T ] = p V(2) + (1-p) V(0) = 0.5 (1 + p). If on the other hand S_1 \mid u_1 = -8 because the intial 2 point conversion try was unsuccessful, then we should also do u_2 = T, since S_2 \mid S_1 = -6, u_2 = K \lt 0 w.p. 1. When we go for two a second time, we have \mathbb{E} [V(S_2) \mid S_1 = -8, u_1=u_2=T] = pV(0) + (1-p) V(-2) = 0.5 p. Therefore, if u_1 = T, then we have \begin{align*}\mathbb{E}[ V(S_2) \mid u_1 = T ] &= p \mathbb{E}[V(S_2) \mid S_1 = -6,u_2 = K] + (1-p) \mathbb{E} [V(S_2) \mid S_1 = -8, u_2=T]\\ &= p + 0.5 p(1-p) = \frac{3p - p^2}{2}.\end{align*} The choice to go for 2 after your first touchdown will be optimal whenever \frac{3p - p^2}{2} > \frac{1}{2}, or p^2 - 3p + 1 \lt 0, that is, whenever p > \frac{3 - \sqrt{9 - 4}}{2} = \frac{3 - \sqrt{5}}{2} = 0.381966\dots.

Sunday, January 9, 2022

When the ant hits the line, ... that's Amare

Amare the ant is traveling within Triangle ABC, as shown below. Angle A measures 15 degrees, and sides AB and AC both have length 1.

Amare starts at point B and wants to ultimately arrive on side AC. However, the queen of his colony has asked him to make several stops along the way. Specifically, his path must:

\cdot Start at point B.

\cdot Second, touch a point — any point — on side AC.

\cdot Third, touch a point — any point — back on side AB.

\cdot Finally, proceed to a point — any point — on side AC (not necessarily the same point he touched earlier).

What is the shortest distance Amare can travel to complete the queen’s desired path?

Amare the evidently male ant knows that that his colony has to travel along the isoceles triagle ABC with smallest angle 15 degrees, but he wants to solve the general problem knowing that almost all queens have the same obscure rules and if he cannot mate with his queen perhaps he can abscond to some other colony to mate with that queen dazzling her with an optimal route, or something, I'm not an myrmecologist. So instead, he will solve the case where the smallest angle is some \theta \in [0, \frac{\pi}{3}).

Amare decides to set up an optimization problem by labeling setting the point A as the origin and B at the point (1,0), thus surmising that C is the point (\cos \theta, \sin \theta). He decides to model his first point on the AC side of the triangle by the variable (\alpha \cos \theta, \alpha \sin \theta) then the point he visits along the AB side as (\beta, 0) and finally returning to the AC side at (\gamma \cos \theta, \gamma \sin \theta) for some 0 \leq \alpha, \beta, \gamma \leq 1. Let d_1(\alpha) = \sqrt{\alpha^2 - 2 \cos \theta \alpha + 1} be the length of Amare's first transit from AB to AC, let d_2(\alpha, \beta) = \sqrt{\alpha^2 - 2 \alpha \beta \cos \theta + \beta^2} be the length of his passage from AC back to AB and d_3(\beta, \gamma) = \sqrt{\beta^2 - 2 \beta \gamma \cos \theta + \gamma^2} the length of the final leg of his journey. Then Amare's total distance traveled is \begin{align*} d(\alpha, \beta, \gamma) &= d_1(\alpha) + d_2(\alpha, \beta) + d_3(\beta, \gamma) \\ &=\sqrt{\alpha^2 - 2 \cos \theta \alpha + 1} + \sqrt{ \alpha^2 - 2 \alpha \beta \cos \theta + \beta^2} + \sqrt{ \beta^2 - 2 \beta \gamma \cos \theta + \gamma^2}.\end{align*}

Taking the gradient, Amare gets that \nabla d = \begin{pmatrix} \frac{\alpha - \cos \theta}{d_1(\alpha)} + \frac{\alpha - \beta \cos \theta}{d_2(\alpha, \beta)} \\ \frac{\beta - \alpha \cos \theta}{d_2(\alpha, \beta)} + \frac{\beta - \gamma \cos \theta}{d_3(\beta, \gamma)} \\ \frac{\gamma - \beta \cos \theta }{d_3(\beta, \gamma)} \end{pmatrix}. For the time being, Amare just wants to find when \nabla d = 0, so he first notices that if this is the case then \gamma = \beta \cos \theta, which in turn means that d_3(\beta, \gamma) = \sqrt{ \beta^2 - 2 \beta \gamma \cos \theta + \gamma^2} = \beta \sin \theta.

Therefore, if \nabla d = 0, then \gamma = \beta \cos \theta and plugging back into \frac{\partial}{\partial \beta} d=0, we also have the equation \frac{\beta - \alpha \cos \theta}{d_2(\alpha, \beta)} + \frac{\beta - \gamma \cos \theta}{d_3(\beta, \gamma)} = \frac{\beta - \alpha \cos \theta}{d_2(\alpha, \beta)} + \sin \theta = 0, or equivalently, \beta = -d_2 \sin \theta + \alpha \cos \theta. Plugging this value of \beta, back into d_2(\alpha, \beta)^2, we get \begin{align*} d_2^2 &= \alpha^2 - 2 \alpha (-d_2\sin \theta + \alpha \cos \theta) \cos \theta + (- d_2 \sin \theta + \alpha \cos \theta)^2 \\ &= \alpha^2 - 2 \alpha^2 \cos^2 \theta + 2 \alpha d_2 \sin \theta \cos \theta + d_2^2 \sin^2 \theta - 2 \alpha d_2 \sin \theta \cos \theta + \alpha^2 \cos^2 \theta \\ &= (1- \cos^2 \theta) \alpha^2 + d_2^2 \sin^2 \theta\end{align*} or equivalently d_2(\alpha, \beta) = \alpha \tan \theta. Plugging this value back into the formula for \beta, we get \beta = -d_2 \sin \theta + \alpha \cos \theta = \alpha \bigl( \cos \theta - \sin \theta \tan \theta\bigr) = \alpha \frac{\cos 2\theta}{\cos \theta}.

So finally, plugging back into \frac{\partial}{\partial \alpha} d = 0 we get \begin{align*}0 &= \frac{\alpha - \cos \theta}{d_1} + \frac{\alpha - \beta \cos \theta}{d_2}\\ &= \frac{\alpha - \cos \theta}{d_1} + \frac{ \alpha - \alpha \frac{\cos 2 \theta}{\cos \theta} \cos \theta }{ \alpha \tan \theta}\\ &= \frac{\alpha - \cos \theta}{d_1} + \frac{1 - \cos 2\theta}{\tan \theta}\\ &= \frac{\alpha - \cos \theta}{d_1} + \sin 2\theta\end{align*} or equivalently d_1 = \frac{\cos \theta - \alpha}{ \sin 2\theta}. Plugging this back into d_1^2 we get \alpha^2 - 2 \alpha \cos \theta + 1 = \frac{ \cos^2 \theta - 2 \alpha \cos \theta + \alpha^2 }{ \sin^2 2\theta } or equivalently \cos^2 2\theta \alpha^2 - 2 \cos \theta \cos^2 2\theta \alpha + \cos^2 \theta - \sin^2 2\theta = 0. Solving the quadratic equation we get \begin{align*}\alpha &= \frac{2 \cos \theta \cos^2 2\theta \pm \sqrt{ 4 \cos^2 \theta \cos^4 2\theta -4 (\cos^2 2\theta) (\cos^2 \theta - \sin^2 2\theta)}}{2 \cos^2 2\theta}\\ &= \cos \theta \pm \frac{ 2 \cos 2\theta \sqrt{\cos^2 \theta \cos^2 2\theta - \cos^2 \theta + \sin^2 2\theta}}{2\cos^2 2\theta} \\ &= \cos \theta \pm \frac{\sqrt{\cos^2 \theta ( \cos^2 2\theta - 1) + \sin^2 2\theta}}{\cos 2\theta} = \cos \theta \pm \frac{ \sqrt{ \sin^2 2\theta (1 - \cos^2 \theta) }}{\cos 2\theta} \\ &= \cos \theta \pm \frac{ \sin 2\theta \sin \theta }{\cos 2\theta} = \cos \theta \pm \sin \theta \tan 2\theta = \frac{\cos \theta \cos 2\theta \pm \sin \theta \sin 2\theta}{\cos 2\theta}\end{align*} that is either \alpha = \frac{\cos \theta}{\cos 2\theta} \,\,\, \text{ or } \,\,\, \alpha = \frac{\cos 3\theta}{\cos 2\theta}. Since \frac{\cos \theta}{\cos 2\theta} \not \in [0,1] for any \theta \in [0,\frac{\pi}{3}), Amare will go with \alpha = \frac{\cos 3\theta}{\cos 2\theta} whenever \theta \in [0, \frac{\pi}{6}) and in this case, d_1 = \frac{\cos \theta - \frac{\cos 3\theta}{\cos 2\theta}}{\sin 2\theta} = \frac{\sin \theta}{\cos 2\theta}. Note that when \theta \in [\frac{\pi}{6}, \frac{\pi}{3}) we have \alpha = 0 and d_1 = 1.

So if \theta \in [0, \frac{\pi}{6}), then \begin{align*}\hat{\alpha} &= \frac{\cos 3\theta}{\cos 2\theta}, \\\hat{\beta} &= \hat{\alpha} \frac{\cos 2\theta}{\cos \theta} = \frac{\cos 3\theta}{\cos \theta} \\ \hat{\gamma} &= \hat{\beta} \cos \theta = \cos 3\theta\end{align*} and the shortest distance is \begin{align*}\hat{d} &= d(\hat{\alpha}, \hat{\beta}, \hat{\gamma}) = d_1 + d_2 + d_3 = \\ &= \frac{\sin \theta}{\cos 2\theta} + \frac{\cos 3\theta}{\cos 2\theta} \tan \theta + \frac{\cos 3\theta}{\cos \theta} \sin \theta\\ &= \sin \theta \left( \frac{\cos \theta + \cos 3\theta + \cos 2\theta \cos 3\theta}{\cos \theta \cos 2\theta} \right) \\ &= \sin \theta \left( \frac{ \cos \theta + 2 \cos^2 \theta \cos 3\theta }{\cos \theta \cos 2\theta } \right) \\ &= \sin \theta \left( \frac{1 + 2 \cos \theta \cos 3\theta}{\cos 2 \theta} \right) \\ &= \sin \theta \left( \frac{1 + \cos 4\theta + \cos 2\theta}{\cos 2\theta} \right) \\ &= \sin \theta \left( \frac{2 \cos^2 2\theta + \cos 2\theta }{\cos 2\theta} \right)\\ &= \sin \theta ( 2 \cos 2\theta + 1 ) = \sin \theta (2 \cos^2 \theta + \cos 2\theta) \\ &= \sin 2\theta \cos \theta + \sin \theta \cos 2\theta = \sin 3\theta. \end{align*} In particular, when \theta = \frac{\pi}{12}, we get that Amare's shortest path for his home colony's queen is \hat{d} = \sin \frac{\pi}{4} = \frac{\sqrt{2}}{2}. Whenever \theta \in [\frac{\pi}{6}, \frac{\pi}{3}) then \hat{\alpha}=\hat{\beta}=\hat{\gamma} = 0 and \hat{d} = 1.