Challenge Ready for a Summer Math Challenge?

Click For Summary
A new summer math challenge has been introduced, inviting participants to solve basic math problems with the requirement of providing full derivations or proofs for their solutions. Advanced problems are available in a separate thread. Participants can use resources like Google and WolframAlpha but cannot search for direct answers to the posed questions. Mentors and homework helpers are asked to refrain from posting solutions until the designated date to encourage broader participation. The challenge aims to engage math enthusiasts and foster a collaborative problem-solving environment.
  • #31
I'm not sure what happened to the spoiler tags, but I'll nest your responses in them, for space reasons:

Thugles said:
(Consider a "portion" as being a section of track between two canisters)

We already know it's possible to divide both the total amount of fuel (F) and the total length (U) in the same number of partitions. Therefore, ##U = F##.

If we number all the canisters (from 1 to n) in their respective positions, we have, for the general case:

##U = U_{1,2} + U_{2,3} + U_{3,4} + ... + U_{n-1,n}##
##F = F_{1,2} + F_{2,3} + F_{3,4} + ... + F_{n-1,n}##

(I thought about writing the second one as ##F = F_{1} + F_{2} + F_{3} + ... + F_{n}##; instead, intepret ##F_{a,b}## simply as the amount of fuel in canister a)

Since ##U = F##, we have ##U_{1,2} + U_{2,3} + U_{3,4} + ... + U_{n-1,n} = F_{1,2} + F_{2,3} + F_{3,4} + ... + F_{n-1,n} = C## (with C being a real constant)

Therefore, no matter how many "low fuel canisters" or "really lenghty portions" we have; they will be balanced by canisters with more fuel and shorter lenghts. If that didn't happen, the relation wouldn't remain constant.

(But I'm afraid I'm just saying that that the amount of fuel is almost enough, instead of answering the question...?)
So if you were allowed to choose the sequencing then the above equations would work. However the problem is that I mischievously get to choose the sequencing of the gas canisters. You don't get to permute them / choose their ordering in general. You can only choose where you start in the cycle (i.e. a cyclic property).
Thugles said:
I think I can see the "informal" solution but I'm sure sure if I can express that in a mathematical way :frown:
To me, since U = F, distributing the fuel is the same thing as distributing the circle. It's impossible to distribute circle in a way that it's impossible to make the cycle; taking away from one portion means compensating it somewhere else, and we are always going to have a starting point.

The "perfect" way of having the car run the cycle is by distributing the cannisters symmetrically with the same amount of fuel in each of them (therefore the car arrives at each canister exactly when he's about to run out of fuel), which means any canister is a valid starting point. If I want the car to fail, I need to either remove a bit of fuel in one canister and add in on the another one or move one of the canisters a little bit towards either direction, in order to create one particular portion of track that is bigger than the car can reach.

But, due to the symmetry of the arrangement and the circle, removing fuel or adding length to a portion would end up adding fuel or removing length to another portion. There will always be at least one spot where the amount of fuel required to reach the next canister is greater than the amount of units I need to run, giving me "extra" fuel to compensate the places where I was supposed to dail.

(Thanks for all the clarifying replies. Now I realize I underestimated that question quite a bit! Last try for today, I promise)

Since this is a Basic thread, the argument needs to be fairly tight though perhaps not completely airtight. What I'm strongly hinting at is:

you solved it explicitly for the ##N = 2## case and have identified some interesting structural features for general ##N##. Why not try to solve it explicitly for ##N=3## and perhaps explicitly for ##N=4##. What kinds of patterns can you find here? There's no shame in solving multiple base cases. Then with a pinch of insight you can put it all together in a seamless inductive proof. (I trust you're somewhat familiar with induction in math, or recursion in programming... this is a very nice exercise for it. If you're not, or don't want to go this way, mfb is hinting at another approach)

Thugles said:
(Thanks for all the clarifying replies. Now I realize I underestimated that question quite a bit! Last try for today, I promise)
It's ok to submit another one -- as long as you seem to be making incremental progress / putting in a real effort it's fine by me.
mfb said:
In general, there will be only one starting point where you can complete the circle. Given the positions and fuel amounts, how can you find this point?

@Thugles --this seems to hint at the other solution I'm aware of -- a very slick thought experiment that shows how to quickly find the 'right' starting position which gives you existence for free.
- - - -
There certainly may be even more approaches though these are the 2 mains ones I'm aware of.

As a reminder: if different people solve the same problem in significantly different ways, then they both get credit. It's worth exploring different approaches for interesting problems.

edit:
There's also a real nice way to set this one up for a contradiction. So that's 3 distinct solution approaches that I'm aware of...
 
Last edited:
Physics news on Phys.org
  • #32
Ok here is a stab at #7, apologies if my writing is hard to follow - trying to describe what I did in a spreadsheet

An urn contains balls, each of which has one of the following colors: red, green, blue and yellow balls. Balls are sampled randomly with replacement. Let r, g, b, and y represent the probabilities of drawing a red, green, blue or yellow.

a) what is the expected number of balls chosen before obtaining the first yellow ball?
b) what is the expected number of different colors of balls obtained before getting the first yellow ball? The probability of drawing a yellow ball is ¼ and the distribution of the number of trials before the first yellow ball is drawn follows a geometric distribution

a) The expectation of a geometric distribution is 1/p. p=1/4 so the expectation is 4 balls (the distribution is skewed so the median is significantly less: 2.4 balls)

b) The probability of a the first success at draw n follows a geometric distribution with p= ¼.

At each draw before the first success there are ( combinations of picking k balls with ##\binom n k## with k<=n

There is a ¼ probability that k=0 (a success in the first trial)

Let s=turn when first yellow ball is drawn and 0<n<s a prior (non-yellow) draw for s>1

Let M = a k x n matrix (each column is a draw and each row is ##\binom n k##,
, the number of combinations of balls of different colors drawn, with 0 if k<n)

Then S = normalizing M, dividing each column vector entry by the sum of that column vector, so that the sum of each column vector =1

Let v= a nx1 (column) vector with each entry representing the probability mass function corresponding to the geometric distribution with p=1/4 and k=n+1 (k=trial of first yellow ball is drawn)

Then multiply Mv , which gives the probability for 1,2,3 different colors of balls for n (every outcome except a yellow ball on the first draw) Mv ≈ (0.502,0.269,0.224)

Let P = (0.25 0.75(Mv)) (0.25,0.377,0.202,0.168), the probabilities corresponding to 0,1,2,3 different colored balls drawn

The expectation is the dot product of (0,1,2,3) and P, which 1.26 expected different colored balls drawn before the first yellow one
 
  • #33
BWV said:
Ok here is a stab at #7, apologies if my writing is hard to follow - trying to describe what I did in a spreadsheet

An urn contains balls, each of which has one of the following colors: red, green, blue and yellow balls. Balls are sampled randomly with replacement. Let r, g, b, and y represent the probabilities of drawing a red, green, blue or yellow.

a) what is the expected number of balls chosen before obtaining the first yellow ball?
b) what is the expected number of different colors of balls obtained before getting the first yellow ball?The probability of drawing a yellow ball is ¼ and the distribution of the number of trials before the first yellow ball is drawn follows a geometric distribution

a) The expectation of a geometric distribution is 1/p. p=1/4 so the expectation is 4 balls (the distribution is skewed so the median is significantly less: 2.4 balls)

b) The probability of a the first success at draw n follows a geometric distribution with p= ¼.

At each draw before the first success there are ( combinations of picking k balls with ##\binom n k## with k<=n

There is a ¼ probability that k=0 (a success in the first trial)

Let s=turn when first yellow ball is drawn and 0<n<s a prior (non-yellow) draw for s>1

Let M = a k x n matrix (each column is a draw and each row is ##\binom n k##,
, the number of combinations of balls of different colors drawn, with 0 if k<n)

Then S = normalizing M, dividing each column vector entry by the sum of that column vector, so that the sum of each column vector =1

Let v= a nx1 (column) vector with each entry representing the probability mass function corresponding to the geometric distribution with p=1/4 and k=n+1 (k=trial of first yellow ball is drawn)

Then multiply Mv , which gives the probability for 1,2,3 different colors of balls for n (every outcome except a yellow ball on the first draw) Mv ≈ (0.502,0.269,0.224)

Let P = (0.25 0.75(Mv)) (0.25,0.377,0.202,0.168), the probabilities corresponding to 0,1,2,3 different colored balls drawn

The expectation is the dot product of (0,1,2,3) and P, which 1.26 expected different colored balls drawn before the first yellow one

Sorry. A correct answer only uses symbols like "r, g, b, y" (and perhaps 1, since these are probabilities and sum to one). Note the problem does not say there are only 4 balls in the urn or that odds of drawing a ball are uniform. It says every ball has one color and there are 4 distinct colors in total and the probability of drawing a given ball color is given by ##r## for red, ##g## for green, ##b## for blue and ##y## for yellow.
 
  • #34
Question about 8: What is ##A##? Is it an arbitrary set?
 
  • #35
Math_QED said:
Question about 8: What is ##A##? Is it an arbitrary set?

It is just used in the context of explaining what is ##I_A##.
 
  • #36
QuantumQuest said:
It is just used in the context of explaining what is ##I_A##.

It is in the problem statement though. I think you have to replace it by ##\mathbb{R}.##
 
  • #37
We are in the context of ##\mathbb{R}## regarding ##f## but during the solution you can introduce ##I_A## as it is (i.e. in a more generalized fashion).
 
  • #38
QuantumQuest said:
We are in the context of ##\mathbb{R}## regarding ##f## but during the solution you can introduce ##I_A## as it is (i.e. in a more generalized fashion).

I guess you can do that, but formally the other functions should be restricted to ##A## too if this is a proper subset of ##\mathbb{R}##. But it doesn't matter, I understood the question now.
 
  • Like
Likes QuantumQuest
  • #39
Here's my solution for 7.

(a) Let ##X## be the variable that indicates "the amount of balls chosen before getting yellow". Then ##X## has a geometric distribution with parameter ##p = r+g+b = 1-y##, if we consider pulling a non-yellow ball as a failure, and it is well known that ##\mathbb{E}[X] = \frac{1}{r+g+b}##.

(b) Let ##Y## be the variable that indicates "the amount of different colors chosen before getting yellow". Then ##Y## can attain the values ##0,1,2,3##.

DISCLAIMER: I assume in this answer that all the quantities ##p,g,r,y## are non-zero. Otherwise, I would divide by zero and some of the series won't converge.

Then:

##\mathbb{P}\{Y = 0\} = y##

Write ##R_k## for the event "pulling red balls the first ##k## pulls", and define ##B_k## and ##G_k## similarly. Define ##Y_l## as the event "pulling a yellow ball the ##l^{th}## try".

Then,

##\mathbb{P}\{Y=1\} = \mathbb{P}(\bigcup_{k=1}^\infty (R_k \cap Y_{k+1})) + \mathbb{P}(\bigcup_{k=1}^\infty (B_k \cap Y_{k+1})) + \mathbb{P}(\bigcup_{k=1}^\infty (G_k \cap Y_{k+1}))##

##= \sum_{k=1}^\infty \mathbb{P}(R_k \cap Y_{k+1}) + \sum_{k=1}^\infty \mathbb{P}(B_k \cap Y_{k+1}) + \sum_{k=1}^\infty \mathbb{P}(G_k \cap Y_{k+1})##

##= y\sum_{k=1}^\infty r^k + y\sum_{k=1}^\infty b^k + y\sum_{k=1}^\infty g^k ##

##= y(\frac{r}{1-r} + \frac{b}{1-b} + \frac{g}{1-g})##

In the same way,

##\mathbb{P}\{Y=2\} = y(\frac{r+g}{1-(r+g)} + \frac{r+b}{1-(r+b)} + \frac{b+g}{1-(b+g)})##
##\mathbb{P}\{Y=3\} = y\frac{(r+g+b)}{1-(r+g+b)} =r+g+b##

so we obtain:

##\mathbb{E}[Y] = y(\frac{r}{1-r} + \frac{b}{1-b} + \frac{g}{1-g} + 2(\frac{r+g}{1-(r+g)} + \frac{r+b}{1-(r+b)} + \frac{b+g}{1-(b+g)})) + 3(r+g+b)##

and now I hope I'm not asked to simplify this :P
 
  • #40
I have a question about question 2. It says it is a one way ride. Do you get to choose the direction you are going?

Otherwise the answer seems that it is not possible, since it already fails for ##N=2##.

Also, do all the cans contain the same amount of fuel?
 
Last edited by a moderator:
  • #41
Math_QED said:
Here's my solution for 7.

I'll take a look at this tomorrow. From where I sit, this formally should be deleted because helpers aren't supposed to put in solutions until the 16th of the month. There is ambiguity on time zones for that rule, though I think we observe GMT (as in Greg Mean Time.)
- - - -

edit: despite being impressed with myself on "GMT", I'm taking a look at the solution now.
- - - -
edit2:
The solution stated is wrong. Your assumption that they are non-zero probabilities is fine by me.

I'll throw a couple bones your way:

For part 1 -- your answer is actually how I first answered the problem, but is wrong. Why?

For part 2 -- there is a very simple solution here that looks a lot nicer than your final formula. You are correct that the possible number of different colors seen before yellow is in ##\{0,1,2,3\}##. You may want to look at your formula on simple qualitative grounds.

For example what expected value of Y does it give in the uniform case?
 
Last edited:
  • #42
Math_QED said:
I have a question about question 2. It says it is a one way ride. Do you get to choose the direction you are going?

Otherwise the answer seems that it is not possible, since it already fails for ##N=2##.

Also, do all the cans contain the same amount of fuel?

You may want to re-read the problem and prior comments in the thread on this problem... gas cans don't have uniform amounts of fuel in general .

You choose starting point but not direction. (The track is said to be "one way" meaning a pre defined direction. For fun I'll insist that the cars must go clockwise.)

Why do you think this fails for N=2?
 
  • #43
StoneTemplePython said:
I'll take a look at this tomorrow. From where I sit, this formally should be deleted because helpers aren't supposed to put in solutions until the 16th of the month. There is ambiguity on time zones for that rule, though I think we observe GMT (as in Greg Mean Time.)
- - - -

edit: despite being impressed with myself on "GMT", I'm taking a look at the solution now.
- - - -
edit2:
The solution stated is wrong. Your assumption that they are non-zero probabilities is fine by me.

I'll throw a couple bones your way:

For part 1 -- your answer is actually how I first answered the problem, but is wrong. Why?

For part 2 -- there is a very simple solution here that looks a lot nicer than your final formula. You are correct that the possible number of different colors seen before yellow is in ##\{0,1,2,3\}##. You may want to look at your formula on simple qualitative grounds.

For example what expected value of Y does it give in the uniform case?

Yeah, I made a dumb mistake for part 1.

Succes should be pulling yellow, so the expected value should be

1/p = 1/y

I will look at 2 later today, but is the formula correct as it stands? If not, I'm curious to see where I made a mistake.
 
Last edited by a moderator:
  • #44
StoneTemplePython said:
You may want to re-read the problem and prior comments in the thread on this problem... gas cans don't have uniform amounts of fuel in general .

You choose starting point but not direction. (The track is said to be "one way" meaning a pre defined direction. For fun I'll insist that the cars must go clockwise.)

Why do you think this fails for N=2?

I was wrong and you are right. It doesn't fail for ##N =2##.
 
  • #45
Math_QED said:
Yeah, I made a dumb mistake for part 1.

Succes should be pulling yellow, so the expected value should be

1/p = 1/y

I will look at 2 later today, but is the formula correct as it stands? If not, I'm curious to see where I made a mistake.

Part 1 is still not right but getting warmer. (I correct what I said earlier -- your current answer is what I initially thought of as the answer but a closer read of the question indicates otherwise)

Part 2 is wrong -- unless there is some mass cancellation I'm not seeing and a major transcription error in the below.

Python:
r_prob = 0.25
g_prob = 0.25
b_prob = 0.25
y_prob = 1 - r_prob - g_prob - b_probdef ev(r, g, b, y):
    part1 = r/(1-r) + b/(1-b) + g/(1-g)
    part2 = (r+g)/(1-(r+g)) + (r+b)/(1-(r+b)) + (b+g)/(1-(b+g))
    part3 = (r+g+b)
    return (part1 + 2*part2)*y + 3*(r+g+b)

 
print(ev(r_prob, g_prob, b_prob, y_prob))
# prints expected value of 4 which is impossible

compare against

##
\mathbb{E}[Y] = y(\frac{r}{1-r} + \frac{b}{1-b} + \frac{g}{1-g} + 2(\frac{r+g}{1-(r+g)} + \frac{r+b}{1-(r+b)} + \frac{b+g}{1-(b+g)})) + 3(r+g+b)
##
 
  • #46
StoneTemplePython said:
Part 1 is still not right but getting warmer. (I correct what I said earlier -- your current answer is what I initially thought of as the answer but a closer read of the question indicates otherwise)

Part 2 is wrong -- unless there is some mass cancellation I'm not seeing and a major transcription error in the below.

Python:
r_prob = 0.25
g_prob = 0.25
b_prob = 0.25
y_prob = 1 - r_prob - g_prob - b_probdef ev(r, g, b, y):
    part1 = r/(1-r) + b/(1-b) + g/(1-g)
    part2 = (r+g)/(1-(r+g)) + (r+b)/(1-(r+b)) + (b+g)/(1-(b+g))
    part3 = (r+g+b)
    return (part1 + 2*part2)*y + 3*(r+g+b)

 
print(ev(r_prob, g_prob, b_prob, y_prob))
# prints expected value of 4 which is impossible

compare against

##
\mathbb{E}[Y] = y(\frac{r}{1-r} + \frac{b}{1-b} + \frac{g}{1-g} + 2(\frac{r+g}{1-(r+g)} + \frac{r+b}{1-(r+b)} + \frac{b+g}{1-(b+g)})) + 3(r+g+b)
##

EDIT:

I was confused by a different use of the geometric distribution. This is what happens when we become too lazy to calculate expectations :). I hope it is correct this time.

Corresponding to the probability function ##\mathbb{P}\{X = k\} = q^kp = (1-y)^k y##, we have

##\mathbb{E}[X] = \frac{q}{p} = \frac{1-y}{y} = \frac{r+g+b}{y}##

so this is the answer.

For (2), I discovered that my calculation for ##\mathbb{P}\{Y=2\}, \mathbb{P}\{Y=3\}## is wrong. I couldn't split up it in sums since the events aren't disjoint. Trying to correct that now.
 
Last edited by a moderator:
  • #47
Math_QED said:
EDIT:

I was confused by a different use of the geometric distribution. This is what happens when we become too lazy to calculate expectations :). I hope it is correct this time.

Corresponding to the probability function ##\mathbb{P}\{X = k\} = q^kp = (1-y)^k y##, we have

##\mathbb{E}[X] = \frac{q}{p} = \frac{1-y}{y} = \frac{r+g+b}{y}##

so this is the answer.

Correct. It can also be interpreted as a classic 0 vs 1 indexing error. What you (and I) originally did was count total draws, but the question wants to count total failures -- hence it is the prior answer minus one, i.e. ##\frac{1}{p} - 1 = \frac{1-p}{p} = \frac{q}{p}##
 
  • #48
Solution for 2, the one I gave a hint towards already:

Consider a modified problem where negative fill values for the tank are allowed. Start at an arbitrary place with 0 fuel, keep track of your fuel. You get a function that decreases with a constant slope (your fuel consumption) most of the time and does a finite number of discrete jumps upwards at the fuel talks. After the full length you are at zero again (or higher if we have excess fuel). If you keep the position of the fuel tank as part of the previous segment then every segment has a minimum and you can find a global minimum. Start at this global minimum and your tank will always have fuel.

I mentioned the infinite case already, so let's have a look at this. Let's say the length of the track is 1. Put ##2^{-n}## fuel at position ##2^{-n}## for n=1 to infinity. The total fuel is 1. If you don't start at a fuel tank then you cannot drive. If you start at a fuel tank you have just enough fuel to reach the next fuel tank - until you get to 1/2 at place 1/2, which brings you to position 1 (or equivalently: 0) exactly - but there is no fuel tank there, you cannot continue. This is a purely mathematical result, obviously.
 
  • Like
Likes QuantumQuest and StoneTemplePython
  • #49
mfb said:
Solution for 2, the one I gave a hint towards already:

Consider a modified problem where negative fill values for the tank are allowed. Start at an arbitrary place with 0 fuel, keep track of your fuel. You get a function that decreases with a constant slope (your fuel consumption) most of the time and does a finite number of discrete jumps upwards at the fuel talks. After the full length you are at zero again (or higher if we have excess fuel). If you keep the position of the fuel tank as part of the previous segment then every segment has a minimum and you can find a global minimum. Start at this global minimum and your tank will always have fuel.

As a slightly more physical take: you could ask that your friend gets in the car the 'day' before and starts with a full tank at a canister and logs consumption vs amounts available at each canister. Reading these logs in line with the above would give you 'an inside tip' afterward and ensure you choose the a starting spot guaranteed to succeed.

- - - - -

A few other thoughts:
1.) There's at least two other ways to prove the existence of a 'good' starting spot -- via induction and a contradiction involving 'pigeons'...
2.) Any discussion of infinite dimensional cases forces structural issues not in the problem -- the other two techniques aren't designed for it, and the existence of a global minimum partial sum (not merely a greatest lower bound) becomes troublesome. In any case, it's really outside the scope.
3.) This question, with ##n## canisters, under a slightly different guise, has been asked of many maths students interviewing with Cambridge (undergrad I think). It's a nice problem though kind of rough to have thrown at you on the spot.
 
  • #50
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
##\overline{AD}= \frac {\overline{BD}\sin(135-α/2)}{\sin(α/2)}## 2
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}##.

upload_2018-7-27_17-50-52.png
 

Attachments

  • upload_2018-7-27_17-50-52.png
    upload_2018-7-27_17-50-52.png
    2.4 KB · Views: 918
Last edited:
  • #51
ehild said:
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
##\overline{AD}= \frac {\overline{BD}\sin(135-α/2)}{\sin(α/2)}## 2
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. :cry:

Correct, of course.
 
  • #52
fresh_42 said:
I have such a nice way for ##\tan(15°)=2-\sqrt{3}## with the cosine theorem and all just look up the tangent. :cry:

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

upload_2018-7-27_18-44-20.png
 

Attachments

  • upload_2018-7-27_18-44-20.png
    upload_2018-7-27_18-44-20.png
    3.1 KB · Views: 465
  • Like
Likes jim mcnamara and fresh_42
  • #53
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.
 
  • #54
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
upload_2018-7-28_12-52-59.png
 

Attachments

  • upload_2018-7-28_12-52-59.png
    upload_2018-7-28_12-52-59.png
    1.6 KB · Views: 512
Last edited:
  • Like
Likes QuantumQuest
  • #55
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!
 
  • Like
Likes StoneTemplePython
  • #56
PeroK said:
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}##
 
  • Like
Likes PeroK
  • #57
StoneTemplePython said:
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.
 
  • #58
PeroK said:
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
 
  • Like
Likes jim mcnamara
  • #60
StoneTemplePython said:
what about the gas canisters problem in our last basic challenge? It was problem 2:

https://www.physicsforums.com/threads/basic-math-challenge-july-2018.950689/

Hey, Mr. StoneTemplePython, thanks a lot for burning up all my spare time! :wink: 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.
 

Similar threads

  • · Replies 93 ·
4
Replies
93
Views
11K
  • · Replies 64 ·
3
Replies
64
Views
16K
  • · Replies 104 ·
4
Replies
104
Views
17K
  • · Replies 114 ·
4
Replies
114
Views
11K
  • · Replies 61 ·
3
Replies
61
Views
11K
  • · Replies 93 ·
4
Replies
93
Views
15K
  • · Replies 60 ·
3
Replies
60
Views
12K
  • · Replies 102 ·
4
Replies
102
Views
11K
  • · Replies 55 ·
2
Replies
55
Views
11K
  • · Replies 39 ·
2
Replies
39
Views
13K