If you don't like maths, don't read the stuff below. It's only here to assist anyone thinking about where (and if) I made an error.

---

In

*Three New Wrong Answers for Bertrand*, I talk about arriving at four numbers, 1/2, 3/4, something close to 4/9 and something close to 2/3. What I don’t get into is the mathematics by which I arrived at this numbers. I’ll do that here.
My analysis was done in Excel, using the rand()
function. I assumed a circle of radius 1
(y

^{2}+ x^{2}= 1), so I looked for a random point within a box defined by x=-1 and x=1 and y=0 and y=1 and a random point within a box defined by x=-1 and x=1 and y=0 and y=-1.
So x

_{1}=2*rand()-1, y_{1}=rand(), x_{2}=2*rand()-1 and y_{2}=rand()*-1.
Then I determined the line defined by these two points,
y=mx+c where m= (y

_{2}-y_{1}/ (x_{2}-x_{1}) and c=y_{1}-mx_{1}= y_{2}-mx_{2}.
Then I looked for the points at where this line intersected
the circle, which I did by inserting y=mx+c into y

^{2}+ x^{2}= 1 and solving for two values of x, x_{3}and x_{4}and using those to generate y_{3}and y_{4}, from which I could determine the length of the chord and compare it to √3.
Just for completeness, after inserting y=mx+c into y

^{2}+ x^{2}= 1, I arrived at:
(m

^{2}+1)x^{2}+ 2mcx + (c^{2}-1) = 0 = αx^{2}+ βx + γ
Which I solved using (-β ± √(β

^{2}- 4αγ))/2α.
When I used two
random pairs without limiting them to different halves, I checked against (β

^{2}- 4αγ)>0 to ensure that the line intersected the circle. If the pairs didn’t meet this criterion, I rejected them as not resulting in a chord.
For that effort, I used x

_{1}=2*rand()-1, y_{1}=2*rand()-1, x_{2}=2*rand()-1 and y_{2}=2*rand()-1 to generate the two random pairs.
## No comments:

## Post a Comment

Feel free to comment, but play nicely!

Sadly, the unremitting attention of a spambot means you may have to verify your humanity.