- #36
member 587159
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}.##
QuantumQuest said:It is just used in the context of explaining what is ##I_A##.
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).
Math_QED said:Here's my solution for 7.
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?
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?
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?
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.
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
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)
##
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.
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.
I have such a nice way for ##\tan(15°)=2-\sqrt{3}## with the cosine theorem and all just look up the tangent.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
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!
StoneTemplePython said:However, I ran a long MC simulation a few minutes before you posted this which convinced me they were the same formula.
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.
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
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/
Freixas said: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.
Freixas said: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.
StoneTemplePython said: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.
Freixas said: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.
Freixas said: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).