You are not logged in.
Pages: 1
What is the probability that a rope of length l cut into 3 random pieces can form a triangle?
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
hi Agnishom,
Here's my effort on this. I did a simulation that seems to confirm it.
Call the first length a, the second b and the third c.
c= 1 - a - b
By the triangle inequality you want
a+b > c => a + b > 1 - a - b => a+b > 0.5. This is equivalent to c < 0.5
and
c+b > a => 1 - a - b + b > a => a < 0.5
and similarly
b < 0.5
Assuming the distributions are uniform
P(a<0.5) = 0.5 and similarly for the other two.
For all three constraints, P(a triangle) = 0.5 x 0.5 x 0.5 = 0.125
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
But, you are counting cases in which a+b+c<1.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
The answer should be 0.25
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
OK. I'll have a re-think.
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
I found this!
'And fun? If maths is fun, then getting a tooth extraction is fun. A viral infection is fun. Rabies shots are fun.'
'God exists because Mathematics is consistent, and the devil exists because we cannot prove it'
I'm not crazy, my mother had me tested.
Offline
hi
But, you are counting cases in which a+b+c<1.
Yes, I accept that is wrong. But that means the actual answer would be lower. ???
I have re-done my simulation as follows:
Choose a at random in the range (0,1)
Choose b at random in the range (a,1)
Calculate c = 1 - a - b
I have then flagged all cases where a,b,c < 0.5 and counted them.
Running this 1 000 000 times I get P = 0.019275
Typical flagged results ( 0.235791, 0.47383, 0.290379) and (0.124516, 0.42401, 0.451474)
and typical un-flagged results (0.797796, 0.08612, 0.116084) and ( 0.107225, 0.74065, 0.152125)
This simulation isn't getting results anywhere close to 0.25. So, can anyone see what's going wrong ?
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
Shouldn't you be picking b from (0,1-a)?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Yes, I just said it wrong. If you look at my sample data you'll see it does pick as you say.
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
I think we can look at this geometrically. If we plot in R³ which points satisfy the conditions (i.e. x+y+z=1) it's an equilateral triangle with a side of
and the ones which also satisfy x,y,z<0.5 make up an equilateral triangle of side . So, the answer should be 1/4. The simulation I did confirms it:l = Select[Table[{#1, #2, 1 - #1 - #2} &[RandomReal[], RandomReal[]], {100000}], #[[3]] > 0 &];
l1 = Select[l, #[[1]] < 0.5 && #[[2]] < 0.5 && #[[3]] > 0 && #[[3]] < 0.5 &];
Length[l1]/Length[l] // N
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
hi Stefy and Agnishom,
Oh, boy. This question really has me beat. First of all, Stefy, I like your solution best of all; neat way to do it.
So now for my simulation. I found two errors (after lots of puzzling) and what follows is my best effort. It doesn't give 0.25. It seems to want to give 0.025, which is tantalisingly close but I cannot account for the factor of ten. .
I used Excel. Sorry. The command RAND() returns a number in the range 0,1.
So I used it to pick two points, P and Q along the line from 0 to 1.
If P>Q, I compute P-Q and call this a. Otherwise Q-P
If P>Q, I store OQ in b. Otherwise OP.
I compute c = 1 - a - b
Then I test for all three less than 0.5 and flag this with a 1, else 0.
Then I add up all the 1s, and compute the experimental probability.
I also have done the following checks.
(1) Check that a + b + c = 1 for every case.
(2) Calculate the expected (mean average) value a, b and c.
(3) Look at some cases to check that 1 really does mean the triangle is drawable and 0 means it isn't. This has checked out for every case I've checked.
Here's a screen shot of the last two lines of 10000 repeats and the formulas that I used.
Can anyone see where I'm going wrong ?
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
Have you tried doing it a few more times?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Yes, loads. It always gives numbers like 0.02.....
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
I have to look at it a bit more.
Glad we're finally online at the same time. It's a bit late over there, isn't it?
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Yes it is. I ought to go to bed. Got a busy day tomorrow. Bye for now.
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
Good night.
When you get the chance, please tell us what you used to get the mean of the 1's and 0's.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Good question.
The command in cell F10002 is =SUM(F2:F1001)/(ROW(A10001)-ROW(A2))
I had used 10000 in place of (ROW(A10001)-ROW(A2)), but decided to let Excel count the rows in case I was doing something stupid with the number of trials. Mrs B had a similar thought so she looked at the rows and is convinced that I really had 10000.
FIRST EDIT: Got it! Just looked at what I have typed in. I'll just adjust that to =SUM(F2:F10001)/(ROW(A10001)-ROW(A2)) Thanks.
SECOND EDIT: Now I'm getting 0.25............. Hurray!!!!!! Many many thanks.
Bob
Last edited by Bob (2015-01-07 21:24:46)
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
Nice work!
I guess we can safely say the answer is 1/4.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
I'm happy to say that. I may still see if I can make my original method work, now I've got a clear procedure.
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
If you mean the one in post #7, that would be hard, because if you pick like that, the distribution of b over (0,1) is not uniform. You would need to be picking it from (0,1-a) with a non-uniform distribution, I think.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Yes. I realise that now. It may take a while but it will be good for my brain to try.
Got to stop now. See you tomorrow.
Bob
Children are not defined by school ...........The Fonz
You cannot teach a man anything; you can only help him find it within himself..........Galileo Galilei
Sometimes I deliberately make mistakes, just to test you! …………….Bob
Offline
See you and good luck.
Here lies the reader who will never open this book. He is forever dead.
Taking a new step, uttering a new word, is what people fear most. ― Fyodor Dostoyevsky, Crime and Punishment
The knowledge of some things as a function of age is a delta function.
Offline
Pages: 1