That doesn't sound complicated at all
zkfcfbzr
Not sure how much you'd care, but I came back to this and found (by hand) a function which closely approximates the solution - it's not exact but it's also not super far. Graph.
I think I could also solve the differential equation by hand at this point (getting the same solution as before) - I haven't, but I'm pretty sure I could if I wanted to for whatever reason. I'm doubtful it's possible to get an exact solution in terms of just x but if you ever manage I'd love to see how.
Making one additional note here, because of your parenthetical message, letting you know that my short backlog of problems I found interesting has actually run dry with the last one I posted - so my series is unfortunately on hiatus. I'll still post if I come across other interesting problems but that honestly doesn't happen too often - even the ones I have posted were collected (and saved by a friend) over several years.
Mark Rober for me, seems like he wants to be Mr. Beast Lite or something lately.
Not to mention released the next day, and reportedly in good health and high spirits since. Like, talk about best possible outcome.
visible text
spoilered invisible text
visible text
spoilered invisible text
solution
I'm sure there's some short elegant solution here that uses beautiful vector math. Instead I went for the butt ugly coordinate geometry solution.
Let u = <a, b> and v = <c, d>
See diagram. WLOG, assume u has a smaller angle than v. We can find cos(θ) by constructing a right triangle as shown, and by finding a new vector w, in the same direction as u, which has the correct length to complete our right triangle. Once done, we will have cos(θ) = |w| / |v|.
Let's consider each vector to be anchored at the origin. So we can say u lies on the line y = (b/a)x, and v lies on the line y = (d/c)x. To find w, let us first find z - the third side of the triangle, which we know must be perpendicular to u, and pass through (c, d).
The line perpendicular to y = (b/a)x and passing through (c, d) is y = (-a/b)(x-c) + d. So this is the line containing the third side of our constructed triangle, z. To find w, then, let's find its point of intersection with y = (b/a)x, the line containing w.
(b/a)x = (-a/b)(x-c) + d → Setup
(b/a)x = (-a/b)x + (ca/b) + d → Distribute on right
x(b/a + a/b) = (ca/b) + d → Add (a/b)x to both sides, factor out x on left
x(a² + b²) = ca² + dab → Multiply both sides by ab
x = (ca² + dab) / (a² + b²) → Divide both sides by (a² + b²)
x = (ca² + dab) / |u|² → a² + b² is |u|²
y = (b/a)x = (b/a)(ca² + dab) / |u|² → Plug solution for x into (b/a)x, don't bother simplifying as this form is useful in a moment
So w = <(ca² + dab) / |u|², (b/a)(ca² + dab) / |u|²>. Now we need |w|.
|w| = sqrt((ca² + dab)² / |u|⁴ + (b²/a²)(ca² + dab)² / |u|⁴) → Plugging into normal |w| formula
|w| = sqrt(((ca² + dab)² / |u|⁴) * (1 + b² / a²)) → Factor out (ca² + dab)² / |u|⁴
|w| = (ca² + dab) / |u|² * sqrt(1 + b² / a²) → Pull (ca² + dab)² / |u|⁴ out of the root
|w| = (ca² + dab) / |u|² * sqrt((a² + b²) / a²) → Combine terms in root to one fraction
|w| = (ca² + dab) / |u|² * |u| / a → Evaluate sqrt
|w| = (ca + db) / |u| → Cancel out |u| and a from numerator and denominator
So this is the length of our adjacent side in the constructed right triangle. Finally, to find cos(θ), divide it by the length of the hypotenuse - which is |v|.
cos(θ) = |w| / |v| = (ac + bd) / (|u||v|)
And note that ac + bd is u•v. So we're done.
cos(θ) = u•v / (|u||v|), or |u||v|cos(θ) = u•v.
Note that since this formula is symmetric with respect to u and v, our assumption that u's angle was smaller than v's angle did not matter - so this should hold regardless of which is larger.
In probability, two events are said to be independent if one event happening has no effect on the probability of another event happening. So coin flips, as an example, are independent - because when you flip a coin and get Tails, that doesn't affect the probability of the next coin flip also coming up Tails.
So in this context, asking if A and B are independent is asking: Does knowing the game lasts at least four turns change the probability of winning? And similarly for A and C. Does knowing the game lasts at least 5 turns change the probability that the game will end in a victory?
Rest of response
To be clear about your other answers, saying P(B) = 1/16 and P(C) = 1/32 are not correct - I was saying if you adjusted your formula, from 1/2^n to 1/2^(n-1), then your answers would be correct. So the probability of the game lasting at least four turns is 1/2^(4-1) = 1/2^3 = 1/8, and the probability of it lasting at least 5 turns is 1/2^(5-1) = 1/2^4 = 1/16.
But I think you were more asking about why this didn't affect your win rate - that's because there's a subtle difference between "making it to the nth round" and "having the game end on the nth round" - and that difference is that once you make it to a round, you then have a 1/2 probability to end the game - which makes the probability of ending on the nth round the 1/2^n you used.
response
This is the correct answer, although P(A|B) should actually be 2/3 rather than 7/12 - I think you meant 1/2 + 1/8 + 1/32 + ...?
The reasoning is good, either way. Since past flips won't affect future flips, if the player has made it to turn 5, an odd turn, then their future prospects are no different than they were on turn 1, another odd turn - so A and C are independent. Similarly, A and B are dependent because your chances of winning and losing effectively flip: If you've made it to an even turn, then you now win if it takes an odd number of flips from there to get Heads.
So it should be an almost paradoxical-seeming situation: You win 1/3 games overall, you win 2/3 games that make it to turn 2, you win 1/3 games that make it to turn 3, you win 2/3 games that make it to turn 4, 1/3 that make it to turn 5, etc.
Games are always played to completion, though if you wanna make it (barely) more challenging you can add in a 5% chance for both players to get bored and give up on each round (before flipping), leading to a loss. Though it seems unlikely - after flipping a quarter 20 times and getting Tails every time, I'd be inclined to keep flipping if anything.
response
These are correct. It is possible to reason out which of B and C is independent of A without going into the numbers.
response
This is close, but you've got an off-by-one error where you calculate the probability of making it to the nth round as 1/2^n. Consider that that would imply you have a probability of 1/2 for the game to make it to round 1, or 1/4 to make it to round 2, etc - it should be 1/2^(n-1). Correcting this would give you the correct answers for P(B) and P(C).
As for the dependence question, I'm not sure I followed your arguments there - but saying both are dependent is not correct.
Are you thinking of Snowden?