# Basic Math Challenge - July 2018

• Challenge
• Featured
Mentor
My solution for Problem 3
γ=45-α/2
β=135-α/2
According to the Law of sines:
##\overline{AD} = \frac {\overline{CD} \sin(45-α/2)}{\sin(α/2)}## 1
multiplying eqs1 and eqs2 and using that ##\overline{AD}^2=\overline{BD} \overline{CD}##,
##\sin(45°-α/2)\sin(135°-α/2)=\sin^2(α/2)##
The solution is α/2=30°: α=60, β=105°, γ=15°.
Dividing eq 1 with eq 2
##\frac{\overline{BD}}{\overline{CD}} = \frac {\sin(45°-α/2)}{\sin(135°-α/2)} =\frac{\sin(15°) }{\sin(105°)} = \tan(15°)##
Using the half angle formula :##\tan^2(x/2) =\frac {1-\cos(x)}{1+\cos(x)}## . With x=30°, ##\tan(15°)=2-\sqrt{3}##.

View attachment 228447
I have such a nice way for ##\tan(15°)=2-\sqrt{3}## with the cosine theorem and all just look up the tangent.

Correct, of course.

ehild
Homework Helper
I have such a nice way for ##\tan(15°)=2-\sqrt{3}## with the cosine theorem and all just look up the tangent.

Correct, of course.
I do not know what is that way, but this is an other one for tan(15°)

#### Attachments

• 3.2 KB Views: 206
jim mcnamara and fresh_42
PeroK
Homework Helper
Gold Member
For question 7, part 2, I don't see the simple solution, but I submit this:

I'm going to change the notation slightly to ##y, a, b, c##, as that's the way I've written it out.

First, we have:

##E = aE(a) + bE(b) + cE(c)##

Where ##E## is the expected number of colours before we get a yellow and ##E(a)## is the expected number of colours we get before a yellow, given the first ball is colour ##a##.

Now, let's focus on ##E(a)##. This doesn't change if we draw ##a## again, so we have:

##E(a) = \frac{1}{y + b + c}(y + bE(ab) + cE(ac))##

Where ##E(ab)## is the expected number of colours before we get a yellow, given that the first ball was ##a## and the next ball of a different colour was ##b##. Also, note that ##y + b + c = 1-a##.

Finally, ##E(ab) = \frac{1}{y + c}(2y + 3c)##

If we put this all together, we get:

$$E = \frac{a}{1-a}(y + b(\frac{2y + 3c}{y+c}) + c(\frac{2y + 3b}{y+b}))$$
$$\ \ \ + \frac{b}{1-b}(y + a(\frac{2y + 3c}{y+c}) + c(\frac{2y + 3a}{y+a}))$$
$$\ \ \ + \frac{c}{1-c}(y + a(\frac{2y + 3b}{y+b}) + b(\frac{2y + 3a}{y+a}))$$

I checked this with ##y = a= b = c = 1/4## and got ##E = 3/2##.

But, a simplification of this result I don't see.

ehild
Homework Helper
Problem 4

The distance between A and P is x=3tan(θ). The speed of the spot of light is v=dx/dt= (3/cos2(θ))dθ/dt.
There are 5 turns in 60 s, so dθ/dt= 5 *2π/60=π/6 s-1.
At the instant, when AP=4 mi, the distance LA = 5mi, and cos(θ)=0.6. The speed is v=(3/0.36)(π/6)=π/0.72=4.36 mi/s

#### Attachments

• 1.8 KB Views: 219
Last edited:
QuantumQuest
PeroK
Homework Helper
Gold Member
Simple solution to number 7:

We pick the balls at random for a large number of trials and count how many different colours we get between yellows. The probability that colour ##a## appears before the next yellow is ##\frac{a}{a+y}##, so ##a## counts with this frequency. Similarly for ##b## and ##c##.

The expected number of coloured balls between yellows is the sum of these three:

##E = \frac{a}{a+y} + \frac{b}{b+y} + \frac{c}{c+y}##

I checked the two formulas for ##a = b = 1/4, c = 1/8, y = 3/8## and got ##E = 21/20## in both cases. So, I guess the expression in my previous post does indeed simplify to this one!

StoneTemplePython
StoneTemplePython
Gold Member
2019 Award
Simple solution to number 7:

We pick the balls at random for a large number of trials and count how many different colours we get between yellows. The probability that colour ##a## appears before the next yellow is ##\frac{a}{a+y}##, so ##a## counts with this frequency. Similarly for ##b## and ##c##.

The expected number of coloured balls between yellows is the sum of these three:

##E = \frac{a}{a+y} + \frac{b}{b+y} + \frac{c}{c+y}##

I checked the two formulas for ##a = b = 1/4, c = 1/8, y = 3/8## and got ##E = 21/20## in both cases. So, I guess the expression in my previous post does indeed simplify to this one!
your original approach was a nice use of conditioning but a really awful final answer -- it was too long for Wolfram to parse and sympy couldn't reduce the difference between these two solutions to zero. However, I ran a long MC simulation a few minutes before you posted this which convinced me they were the same formula.

The simple idea here is let ##N ## be a random variable taking on values for number of different colors seen before yellow. ##N## can take on values of 0, 1, 2 or 3. We can write ##N## numerous ways but in general the most convenient is to decompose it into (possibly dependent) indicator random variables.

##N = \mathbb I_a + \mathbb I_b + \mathbb I_c##

where, for example, ##\mathbb I_a## is an indicator random variable (bernouli) that is ##1## in the event an "##a##" ball is drawn before a ##\text{yellow}##, and ##0## otherwise. Taking expectations of each side gives

##E\big[N\big] = E\big[\mathbb I_a + \mathbb I_b + \mathbb I_c \big] = E\big[\mathbb I_a\big] + E\big[\mathbb I_b\big] + E\big[\mathbb I_c \big] = \frac{a}{a+y} + \frac{b}{b+y} + \frac{c}{c+y}##

PeroK
PeroK
Homework Helper
Gold Member
However, I ran a long MC simulation a few minutes before you posted this which convinced me they were the same formula.
I was convinced they were equivalent because both methods looked rock solid to me! But the first formula was frustratingly difficult to simplify.

StoneTemplePython
Gold Member
2019 Award
I was convinced they were equivalent because both methods looked rock solid to me! But the first formula was frustratingly difficult to simplify.
quite right -- though I always worry about a small bug creeping in throwing the results off.

I ended up tweaking the sympy setup and getting symbolic equivalence -- for those interested I've dropped in the code. The exact steps to do the simplifications by hand are, of course, left as an exercise for the interested reader.

Python:
import sympy as sp

a = sp.Symbol('a', positive = True)
b = sp.Symbol('b', positive = True)
c = sp.Symbol('c', positive = True)
y = sp.Symbol('y', positive = True)

part1 = a/(1-a)*(y +b*(2*y+3*c)/(y+c) + c*(2*y + 3*b)/(y+b))
part2 = b/(1-b)*(y + a*(2*y+3*c)/(y+c) + c*(2*y+3*a)/(y+a))
part3 = c/(1-c)*(y + a*(2*y + 3*b)/(y+b) + b*(2*y + 3*a)/(y+a))

perok_formula = part1 + part2 + part3
print(sp.latex(perok_formula))
# prints formula out in latex

desired_formula = a/(a+y) + b/(b+y) + c/(c+y)

difference = desired_formula - perok_formula
print(sp.simplify(difference.subs(y, 1 - a - b - c)))
# prints zero

jim mcnamara
QuantumQuest
Gold Member
Problem 4
Well done @ehild

what about the gas canisters problem in our last basic challenge? It was problem 2:

Hey, Mr. StoneTemplePython, thanks a lot for burning up all my spare time! I took a look at the problem and solving it became an obsession.

I didn't look at your solution or anyone else's until after coming up with my own (and I learned that email alerts don't honor the SPOILER codes, so I had to avert my eyes to that portion of your message). Actually, I haven't read any of the other answers except yours.

I often get caught by misreading the problem or making the wrong assumptions or failing to make the right assumptions.

For example, I assumed all canisters hold the same amount of fuel, since assuming otherwise would definitely put the problem out of my reach. I assumed you couldn’t just get out of the car, go fetch a canister and bring it back, or else the problem would be trivial—you have to drive to the next canister (technically, there's nothing forbidding this, so you couldn't mark such an answer wrong). My initial reading of “mischievously placed” was that you would plant the car next to a canister and then the rest would be positioned in the worst possible place. I backed off this assumption as it’s easy to see that you can’t ever win. Finally, I assumed the car's tank could hold all the fuel in all the canisters without overflowing.

I came up with something like your solution, but I don't think your solution is complete. Consider the 4-canister case. I place two canisters together and another two together such that the distance between them is greater than two intervals. Your argument fails. Of course, if one pair is separated by more than two intervals, then other pair will be separated by less, so you start with the second pair. The choice of the starting canister is important and I didn't see it addressed at all by your argument. The 3-canister case is misleading since the choice of the correct starting position is obvious. When you get to the 100-canister case, things are even trickier.

Here's my solution:

Divide the track into N open-ended equally-sized segments. Let’s begin by placing one canister at each end point of a segment. The canisters are equally spaced and the car runs out just as it reaches the next canister. Solution: the car can be placed next to any canister.

Every alternative placement can be formed by warping this arrangement, sliding canisters in the direction of travel by some distance. Take the canister immediately after the one at the car’s starting position and move it further away (moving it closer wouldn’t change anything). We don’t jump over any existing canister—since canisters are arbitrary, any arrangement achieved by a jump could also be achieved by sliding canisters without jumping.

If we move the car’s starting position to the moved canister, we can complete the track. It's important to visualize this. The canisters started out equally spaced. As we create a gap, if we switch our perspective to the gap's end point, we see all the canisters in front of us and occupying less space than before. We will have all the fuel we need before we reach the gap at what is now the end of our route.

We can keep moving the canister further away, gathering up or compressing the distance between any other canisters we meet and the situation remains the same. Actually, if the gap creates one empty segment, we can move the car's starting position to any canister except the one preceding the gap. If the gap creates two empty segments, then any position except the two preceding the gap will work. And so on. The position at the end of the gap always works.

Try to create an uncrossable gap elsewhere. The new gap cannot affect the existing gap. It could, of course, but I never specified how big the first gap was, so any situation which shrinks the first gap could be equated to a situation where the first gap was always that size.

If we compressed all canisters into the last segment, then we cannot create a gap big enough to be a problem.

If we compressed the canisters into the last two segments, then remember that either of the first two canisters will get us around. The biggest gap we can create is two segments. If we place this gap after the first canister, we can finish by starting from the second canister. If we place it after the second, then the first two canisters get can us across the gap, since the gap can't be bigger than 2. Placing the gap any further along won’t help. We'll just have even more fuel to cross the gap.

The same generalizes if we compress all the canisters into the last n segments. The gap can't be bigger than n and no matter where we put it, we can either cross it or choose a starting position after the new gap that will carry us around.

Admittedly, I've solved the problem for N canisters with 1 or 2 gaps. There also needs to be a generalization for n gaps, showing that a similar argument could be applied for any additional gaps, but my brain is tired and so I'll leave it as an exercise for the reader.

StoneTemplePython
Gold Member
2019 Award
Hey, Mr. StoneTemplePython, thanks a lot for burning up all my spare time! I took a look at the problem and solving it became an obsession.

I didn't look at your solution or anyone else's until after coming up with my own (and I learned that email alerts don't honor the SPOILER codes, so I had to avert my eyes to that portion of your message). Actually, I haven't read any of the other answers except yours.
Yes, I can certainly relate to this. Figuring out how to break the abstraction into something useful can take a little or an awful lot of time. That's kind of the joy, and peril, of these challenges I think.

I also didn't realize that Spoilers aren't hidden in emails... interesting.

I often get caught by misreading the problem or making the wrong assumptions or failing to make the right assumptions.

For example, I assumed all canisters hold the same amount of fuel, since assuming otherwise would definitely put the problem out of my reach...

I came up with something like your solution, but I don't think your solution is complete. Consider the 4-canister case. I place two canisters together and another two together such that the distance between them is greater than two intervals. Your argument fails.
Sorry no. Your assumption isn't justifed. The canisters in general hold a varying amount of fuel. The only constraint is that of course each amount is real non-negative and in aggregate the amount of fuel sums to exactly the amount required to drive around the track. (There is a way to convert from your not justified assumption to the actual problem by changing perspective and just looking at partial sums though... edit: specifically if you consider for any arbitrarily chosen starting position then the ith 'gas station' has ##x_i## of gas and ##y_i## as the gas required to get to the next station -- the value of ##z_i:= (x_i - y_i)## is what is of interest.)

Your 'counterexample' doesn't hold water I'm afraid. If you place two canister touching each other (I guess that's what 'together' means?) then it's just another legal 4 canister configuration. If together means 'exactly the same spot' I'm not really sure that's allowed physically but in the interest of sport I'd point out that if it were allowed you have just reduced it to the 2 canister problem which most people can solve by inspection.

- - - -

edit: thread was moved to the right home so suggested place for follow-ups is not needed.
- - - -

another note: even if you've been out of the habit of doing math for many decades, in the event you've been doing computer programming in the interim, my suggested solution should feel quite familiar to certain recursive programs.

- - - -
All in all I think we agree that this is a nice Basic Challenge

Last edited:
pbuk and Greg Bernhardt
Your 'counterexample' doesn't hold water I'm afraid. If you place two canister touching each other (I guess that's what 'together' means?) then it's just another legal 4 canister configuration. If together means 'exactly the same spot' I'm not really sure that's allowed physically but in the interest of sport I'd point out that if it were allowed you have just reduced it to the 2 canister problem which most people can solve by inspection.
"At the same spot relative to the track" is what I meant. The canisters could be stacked on top of each other, for example.

As for my counter-example, I mixed my problem statements and was still thinking in terms of the one I working on. I interpreted "extra fuel" to mean more than 1/Nth of the total fuel, rather than more than 100% of the fuel needed for the next section. It took me a while to even see this.

Reading your problem description more carefully, I see you asked if there was a viable starting point, not to identify which point that might be. The reduction proof works for identifying that a starting point exists, but not for identifying which it is. Oddly enough, it is not the one with the most fuel or even the most percentage of fuel for its leg. Consider N=4 where all canisters are spaced equidistant. The fuel amount needed to complete the track is 100 and the canister amounts are 26, 51, 12 and 11. Staring at 26 let's the car finish; starting at 51 doesn't. In same cases, of course, there are multiple valid starting points. When reducing, it doesn't matter whether you start with 26 or 51—you still know it can be done, but a little extra record-keeping is needed to determine where to start.

I do think the problem should have explicitly stated that the fuel was not distributed equally among all canisters. If you argue that I should, in my solution, not include restrictions not imposed by the problem statement, then I will simply have the driver walk to the nearest canister, bring it back to the car and repeat as necessary. Problem solved! If you argue that I shouldn't make unreasonable assumptions, then I would respond that reasonable is a subjective term; if something is important to the problem, it should be included. Personally, I don't think it would hurt to include both.

Thanks for taking the time to create this puzzle, though (assuming it's yours).

StoneTemplePython
Gold Member
2019 Award
Reading your problem description more carefully, I see you asked if there was a viable starting point, not to identify which point that might be. The reduction proof works for identifying that a starting point exists, but not for identifying which it is. Oddly enough, it is not the one with the most fuel or even the most percentage of fuel for its leg.
In mathematics it's called an existence proof. Nothing more and nothing less.

And yes, it is immediate from my suggested inductive proof that such an approach only shows the existence of a viable path -- but you could have to to try all ##n## starting points to find one that works. This is why in our August thread I said mfb's response here (see post 48 and 49 on this thread) is perhaps the most constructive / satisfying -- it gives existence and a thought experiment to identify the starting point.

- - - -

I do think the problem should have explicitly stated that the fuel was not distributed equally among all canisters. If you argue that I should, in my solution, not include restrictions not imposed by the problem statement, then I will simply have the driver walk to the nearest canister, bring it back to the car and repeat as necessary. Problem solved! If you argue that I shouldn't make unreasonable assumptions, then I would respond that reasonable is a subjective term; if something is important to the problem, it should be included. Personally, I don't think it would hurt to include both.

Thanks for taking the time to create this puzzle, though (assuming it's yours).
It doesn't not work like that. You should read through these threads and see how people respond in them. As we've said many times in these threads -- you are free to ask questions. You are not free to over-ride the challenges or their intent.

This puzzle actually comes in 2 different problem books I have. It is not an original of mine. As I said in post #49 of this thread -- a slight variant of this has been asked on many occasions as part of mathematics admissions interviews at Cambridge. I think what you've said above... would have been quite poorly received. What you are suggesting here seems to be in between linguistics and personal philosophy, not math.
- - - -