create account

Mathematics × Programming Competition #7 - Geometrical solution by armandocat

View this thread on: hive.blogpeakd.comecency.com
· @armandocat ·
$12.27
Mathematics × Programming Competition #7 - Geometrical solution
This is my solution to @kenchung contest #7:
https://steemit.com/contest/@kenchung/question-mathematics-programming-competition-7


### Question
A point is chosen randomly in a square. 4 lines are drawn to connect this point with the 4 vertices of this square, such that 4 triangles are formed. Find the probability that all interior angles of the 4 triangles are less than 120°. Give your answer correct to the nearest 3 decimal places.


## Geometrical solution

First of all, let's consider a square. For simplicity, we are going to choose a square with side equal to 1, that also has an area of 1.

If we choose randomly a point inside the square, and draw the triangles from it, what are the angles of those triangles?

<center>
![](https://i.imgsafe.org/3c/3c16c3a663.png)
</center>

We can consider just one of the triangles for now, the reasoning for the other 3 triangles are the same due to the symmetry of the figures. 
As you can see, the angles at the base of the triangle are never going to be more than 90°, because the random point P is inside the square.
So the only angle that could be more than 120° is the angle on P.

I will solve this problem by first finding out all the possible cases when the angle is 120° or more.

To find all the points that give an angle of 120° we can consider AB to be a chord of a circle such that the __inscribed angle__ is 120°

<center>
![](https://i.imgsafe.org/3c/3c31a6e2d3.png)
</center>

Now, all the points inside that **circular segment** are the points that gives as an angle of at least 120°.

If we do that same for the 4 sides of the square, we can see that the points that gives at least one angle greater than 120° are in the union of 4 circular segments.

<center>
![](https://i.imgsafe.org/3c/3c215b0d0d.png)
</center>

Only choosing a point **not** in the circular segments gives us angles less than 120°.
Therefore the area of the square minus the areas of the union of circular segments is the solution to our problem. (Because we choose a square with area 1, otherwise the probability would be the ratio of that area and the total area of the square)



### Finding the area of the circular segment

First, let's find the radius R of the circle.
Using the law of sines:
```
AB / sin(120°) = R / sin(30°)
AB = 1
R = sin(30°) / sin(120°) = 1/2 * 2/√3 = 1/√3
```

Now, we can compute the area of the circular segment
(https://en.wikipedia.org/wiki/Circular_segment)

```
A1 = R^2 / 2 (120°/180°*π - sin(120°))
   = 1/6 (2/3π - √3/2)
   = 1/9 π - √3/12
```

### Area of the intersection of the circular segments

Now we have to be careful, because if we sum the 4 areas of the circular segments we are going to have some area counted twice. Therefore we have to find the areas shown in the figure:

<center>
![](https://i.imgsafe.org/3c/3c2629663e.png)
</center>

That is another circular segment!

Let's find the length of AC and the angle θ:
```
AC / sin(15°) = AB / sin(120°)
AC = sin(15°) / sin(120°) = (√6 - √2)/4 * 2/√3
```

Again, with the help of wikipedia (https://en.wikipedia.org/wiki/Circular_segment)
```
AC = 2R * sin(θ/2)
sin(θ/2) = AC / 2R
θ = 2 arcsin(AC/2R)
θ = 2 arcsin((√6 - √2)/4 * 2/√3 * √3/2)
θ = 2 arcsin((√6 - √2)/4)
θ = 2 * 15°
θ = 30°
```

Now, the area of the circular segment is:
```
A2 = R^2 / 2 (30°/180°*π - sin(30°))
   = 1/6 (1/6π - 1/2)
   = 1/36 π - 1/12
```

### Conclusion

<center>
![](https://i.imgsafe.org/3c/3c468160ac.png)
</center>

The total area of the union of the 4 circular segments is:
```
A = 4 * A1 - 8 * A2
  = 4(1/9 π - √3/12) - 8(1/36 π - 1/12)
  = 0.787
```

The answer to the question is then
<center>

`Probability = 1 - A = 0.213`

</center>











👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , ,
properties (23)
authorarmandocat
permlinkmathematics-programming-competition-7-geometrical-solution
categorycontest
json_metadata{"tags":["contest","cn-contest","cn","math","steemstem"],"users":["kenchung"],"image":["https://i.imgsafe.org/3c/3c16c3a663.png","https://i.imgsafe.org/3c/3c31a6e2d3.png","https://i.imgsafe.org/3c/3c215b0d0d.png","https://i.imgsafe.org/3c/3c2629663e.png","https://i.imgsafe.org/3c/3c468160ac.png"],"links":["https://steemit.com/contest/@kenchung/question-mathematics-programming-competition-7","https://en.wikipedia.org/wiki/Circular_segment"],"app":"steemit/0.1","format":"markdown"}
created2017-09-28 05:17:39
last_update2017-09-28 05:17:39
depth0
children13
last_payout2017-10-05 05:17:39
cashout_time1969-12-31 23:59:59
total_payout_value11.112 HBD
curator_payout_value1.156 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length3,679
author_reputation19,042,686,186,587
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,149,577
net_rshares4,265,350,522,133
author_curate_reward""
vote details (58)
@chasmic-cosm ·
Aaaaahhhhhh! I wrote some code to solve this but stupidly forgot to check the fourth triangle because it needed slightly different treatment.
Thanks for posting your solution, it all makes sense now :)
properties (22)
authorchasmic-cosm
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t154645639z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 15:46:45
last_update2017-09-28 15:46:45
depth1
children0
last_payout2017-10-05 15:46:45
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length201
author_reputation4,159,775,155,640
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,193,910
net_rshares0
@galotta · (edited)
1. Inscribed angle theorem
2. Calculate area of circular segments
3. ???
4. Profit

(I think I got the same solution :) )
👍  
properties (23)
authorgalotta
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t070708176z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 07:07:12
last_update2017-09-28 07:51:21
depth1
children0
last_payout2017-10-05 07:07:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length121
author_reputation4,889,387,557,452
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,156,124
net_rshares2,727,735,080
author_curate_reward""
vote details (1)
@grandrey ·
What is the secret that you joined this platform recently and you are reaping big?I however like your post.Follow me back.
properties (22)
authorgrandrey
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170930t093424046z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-30 09:34:27
last_update2017-09-30 09:34:27
depth1
children0
last_payout2017-10-07 09:34:27
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length122
author_reputation54,423,680,663
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,360,254
net_rshares0
@kenchung ·
$0.03
Great work! I can confirm that your answer is correct :)
I will announce the winners in a few days, hope that you will be one of the winners! :)
👍  
properties (23)
authorkenchung
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t060905163z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 06:09:09
last_update2017-09-28 06:09:09
depth1
children1
last_payout2017-10-05 06:09:09
cashout_time1969-12-31 23:59:59
total_payout_value0.028 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length144
author_reputation41,181,348,504,685
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,152,522
net_rshares10,225,780,848
author_curate_reward""
vote details (1)
@tvb ·
The diagrams are very professional.
I like the diagrams!!!
properties (22)
authortvb
permlinkre-kenchung-re-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t111413770z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 11:14:12
last_update2017-09-28 11:14:12
depth2
children0
last_payout2017-10-05 11:14:12
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length58
author_reputation35,178,037,825,802
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,171,964
net_rshares0
@lrd ·
How I tried to solve the problem.
![1.gif](https://steemitimages.com/DQmcmDLZpC1hjFkmSx7ne932u3D4fV1eTTi8SVzWmCEqNvB/1.gif)
👍  
properties (23)
authorlrd
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t054337238z
categorycontest
json_metadata{"tags":["contest"],"image":["https://steemitimages.com/DQmcmDLZpC1hjFkmSx7ne932u3D4fV1eTTi8SVzWmCEqNvB/1.gif"],"app":"steemit/0.1"}
created2017-09-28 05:43:57
last_update2017-09-28 05:43:57
depth1
children0
last_payout2017-10-05 05:43:57
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length123
author_reputation15,552,995,201,866
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,151,107
net_rshares1,135,799,015
author_curate_reward""
vote details (1)
@minnowbooster ·
@minnowbooster upvoted this post!
![@armandocat got you a $8.31 @minnowbooster upgoat, nice!](http://minnowshares.net/upgoat/?user=armandocat&receiver=armandocat&value=8.31&hash=731)
*@armandocat got you a $8.31 @minnowbooster upgoat, nice! (Image: pixabay.com)*
---
[Want a boost? Click here to read more!](https://steemit.com/minnowbooster/@minnowbooster/6rt2mn-introducing-minnowbooster-beta) @originalworks
properties (22)
authorminnowbooster
permlinkcomment-1506576510382
categorycontest
json_metadata""
created2017-09-28 05:28:30
last_update2017-09-28 05:28:30
depth1
children1
last_payout2017-10-05 05:28:30
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length376
author_reputation230,546,282,483,083
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,150,163
net_rshares0
@originalworks ·
originalworks
The @OriginalWorks bot has determined this post by @armandocat to be original material and upvoted it! 
<center>![ezgif.com-resize.gif](https://steemitimages.com/DQmaBi37A5oTnQ9NBLH8YU4jpvhhmFauyvgg3YRrEJwskM9/ezgif.com-resize.gif)</center> 

To call @OriginalWorks, simply reply to any post with @originalworks or !originalworks in your message! 
### To enter this post into the daily RESTEEM contest, upvote this comment! The user with the most upvotes on their @OriginalWorks comment will win!<h3>
For more information, [Click Here!](https://steemit.com/writing/@originalworks/originalworks-bot-explanation-and-info)
Special thanks to @reggaemuffin for being a supporter! Vote him as a witness to help make Steemit a better place! 
properties (22)
authororiginalworks
permlinkre-comment-1506576510382-20170928t052938
categorycontest
json_metadata"{"app": "pysteem/0.5.4"}"
created2017-09-28 05:29:39
last_update2017-09-28 05:29:39
depth2
children0
last_payout2017-10-05 05:29:39
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length734
author_reputation79,292,026,602,057
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,150,223
net_rshares0
@shango ·
$0.04
Didn't know the cat was that good with math
👍  
properties (23)
authorshango
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t215851406z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 21:58:51
last_update2017-09-28 21:58:51
depth1
children0
last_payout2017-10-05 21:58:51
cashout_time1969-12-31 23:59:59
total_payout_value0.027 HBD
curator_payout_value0.008 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length43
author_reputation3,432,125,687,483
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,220,708
net_rshares13,457,504,783
author_curate_reward""
vote details (1)
@tvb ·
Great work! 
Your diagrams are very professional.
I want to consult a question. 
What soft do you draw the diagrams?
properties (22)
authortvb
permlinkre-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t111217671z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 11:12:18
last_update2017-09-28 11:12:18
depth1
children3
last_payout2017-10-05 11:12:18
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length116
author_reputation35,178,037,825,802
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,171,837
net_rshares0
@armandocat ·
Thanks!
The tool is:
https://www.geogebra.org

It's very nice!
👍  
properties (23)
authorarmandocat
permlinkre-tvb-re-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t204502052z
categorycontest
json_metadata{"tags":["contest"],"links":["https://www.geogebra.org"],"app":"steemit/0.1"}
created2017-09-28 20:45:03
last_update2017-09-28 20:45:03
depth2
children2
last_payout2017-10-05 20:45:03
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length62
author_reputation19,042,686,186,587
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,216,163
net_rshares3,584,760,370
author_curate_reward""
vote details (1)
@nutela ·
And the programming?
properties (22)
authornutela
permlinkre-armandocat-re-tvb-re-armandocat-mathematics-programming-competition-7-geometrical-solution-20170930t220159409z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-30 22:01:51
last_update2017-09-30 22:01:51
depth3
children0
last_payout2017-10-07 22:01:51
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length20
author_reputation12,740,113,194,550
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,415,384
net_rshares0
@tvb ·
Thank you!
It is really very nice. I will try it!
properties (22)
authortvb
permlinkre-armandocat-re-tvb-re-armandocat-mathematics-programming-competition-7-geometrical-solution-20170928t205832772z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-09-28 20:58:33
last_update2017-09-28 20:58:33
depth3
children0
last_payout2017-10-05 20:58:33
cashout_time1969-12-31 23:59:59
total_payout_value0.000 HBD
curator_payout_value0.000 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length49
author_reputation35,178,037,825,802
root_title"Mathematics × Programming Competition #7 - Geometrical solution"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,216,992
net_rshares0