create account

[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回) by kenchung

View this thread on: hive.blogpeakd.comecency.com
· @kenchung ·
$68.07
[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)
<h2><center>Mathematics × Programming Competition #7<br>Announcement of Answer and Winners</center></h2>

https://steemitimages.com/0x0/https://steemitimages.com/DQmb33Qwu5vome8xQ2ZLcqFxZmFwV255hPGovzavXSUDtaX/math%26progLOGO-01-01.png

<center><sup>Designed by @nicolemoker</sup></center>

<center><h6>*For Chinese version please scroll to the bottom. 中文版請見文末。*</h6></center>

---

<center><h2>Question</h2></center>

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. 

---

<h2><center>Answer: 0.213</center></h2>

<h6><center>Strictly speaking 0.21255 (not corrected to the nearest 3 decimal places) and 21.255 (missing % sign) are both incorrect answers, yet after consideration I decided to adopt a lenient approach and accept these answers as well. </center></h6>

<h4>Mathematical approach</h4>

<center>https://steemitimages.com/DQmbchzAFYf9jzraqcTW5K8H7EQdbaEY6FwiGsFka4JodFd/image.png</center>

Let’s assume the length of the square to be 1. The square is labelled as ABCD while the random point is called P as shown above.

<center>https://steemitimages.com/DQmaG574iC7aXB6oYrAfhwBMMjpo7PzpBrvG6Ba9iq7xDC9/image.png</center>

Consider the locus formed by P such that ∠APD = 120°. This should be a circle because of *converse of angles in the same segment*. E is the center and ∠AED = 120° (angles at the centre is twice the angle at the circumference). If the random point falls in the shaded region, an interior angle will be larger than 120°, which violates the required criteria.

<center>https://steemitimages.com/DQmVVynhs2VjkZ46KMw1m7dTpmivfkQqFvtY2d4dKpTgxLj/image.png</center>

Combining the criteria produced from the 3 other sides of the square, we should be able to see that the required probability is the area of the center unshaded region divided by that of the whole square. Denote the area of the red and yellow shaded area as shown above as *R* and *Y* respectively. Then the required probability = 1 - 4*Y* + 4*R*.

<center>https://steemitimages.com/DQmWudjPWXNn5yLquQRt37HaD5aFnzVAgnKgAc2CxLTw7ra/image.png</center>

<center>https://steemitimages.com/DQmYJ3PcXRa7aNm7Po8h9x3WD9nqQMFmTEUVYU7pgPdVCxC/CodeCogsEqn.png</center>

<h4>Programming approach</h4>

We may carry out simulations for a large number of times and take the empirical probability as our answer. Note that we will never be able to obtain the exact answer in this approach, but this approach would work here since we were asked to give our answer correct to the nearest 3 decimal places only.

Psuedocode:
```
count = 0
Loop for 10,000,000 times
	x = random(0 to 1)
	y = random(0 to 1)
	Use cosine theorem to check all 4 internal angles
	If all angles < 120 then count++
End loop
Output count / 10,000,000
```
If time is allowed, the number of loops can be set to an even higher value so as to ensure accuracy. 

---

<h2><center>Winners</center></h2>

Among 30 participants, there are 15 people who got the correct answers. Thank you for your participation!

@kona @philipheihei @guyverckw @leedslemon @armandocat @tvb @tensaix2j @wlcpu @galotta @livinguktaiwan @kangnajiang @geass @challk @mooninwater @superbing @kevingau @shieha @speeding @justyy @ghasemkiani @marziehshahabi @susankiani @ariak @megii @vincentyip @dkmathstats @akshaybornare @chasmic-cosm @rfece143 @dailyfortune

SBD payout of the the question post = 37.299 SBD

Besides, @steemstem has generously sponsored 7.5 SP, 5 SP and 2.5 SP for the first, second and third prizes!

<center>https://steemitimages.com/DQmdHTguFTTx7JU8HjWFRUU316pPQbBvmFEncP2nbaokS3q/image.png</center>

The winners and prizes are tabulated below:

Winner|Prize|SBD
---|---|---
@leedslemon|First prize|37.299 / 8 = 4.662 SBD + 7.5 SP
@armandocat|Second prize|37.299 / 8 = 4.662 SBD + 5 SP
@tvb|Third prize|37.299 / 8 = 4.662 SBD + 2.5 SP
@tensaix2j|Consolation prize|37.299 / 8 = 4.662 SBD
@ghasemkiani|Consolation prize|37.299 / 8 = 4.662 SBD
@shieha|Consolation prize|37.299 / 8 = 4.662 SBD
@vincentyip|Consolation prize|37.299 / 8 = 4.662 SBD
@challk|Consolation prize|37.299 / 8 = 4.662 SBD

Congratulations to the winners!

----

<center>https://steemitimages.com/0x0/https://steemitimages.com/DQmY2jUCgfijKRkYnpsENa1jpv6VFwWe8Ts88cYKcQjiLcp/image.png</center>


The steemSTEM project (@steemstem) is a community-supported project aiming to increase the quality and the visibility of STEM (STEM is the acronym for Science, Technology, Engineering and Mathematics) articles on Steemit. Please support steemSTEM by following @steemstem and joining the <a href ="https://steemit.chat/channel/steemSTEM">chat channel</a>. You can also consider joining a private curation trail to further support steemSTEM by asking about it in the chat channel. In order to further promote the use of the chat channel, I will stop announcing the time of next competition via a post. Instead I will announce the time in advance in the chat channel! 


---

---

<h2><center>數學 × 程式編寫比賽 (第七回)<br>答案及得獎名單公佈</center></h2>
https://steemitimages.com/0x0/https://steemitimages.com/DQmb33Qwu5vome8xQ2ZLcqFxZmFwV255hPGovzavXSUDtaX/math%26progLOGO-01-01.png

<center><sup>Designed by @nicolemoker</sup></center>


----

<center><h2>問題</h2></center>

在一個正方形內隨機選取一點,並將此點與四個頂點連上直線,從而將正方形分割為四個三角形。求四個三角形之中所有內角均不超過 120° 的概率,答案準確至小數點後 3 位。

---

<h2><center>答案: 0.213</center></h2>

<h6><center>按理0.21255 (不是準確至三個小數位) 及21.255 (沒有%符號) 均屬錯誤答案,經考慮下我決定採取寬鬆政策,一併接受此兩項答案。</center></h6>

<h4>數學方法</h4>

<center>https://steemitimages.com/DQmbchzAFYf9jzraqcTW5K8H7EQdbaEY6FwiGsFka4JodFd/image.png</center>

設正方形的長度為1,並標記為ABCD,而隨機點則稱為P,如上所示。

<center>https://steemitimages.com/DQmaG574iC7aXB6oYrAfhwBMMjpo7PzpBrvG6Ba9iq7xDC9/image.png</center>

若固定∠APD= 120°,P形成的軌跡是一個圓(同弓形內的圓周角的逆定理)。E為圓的中心,可知∠AED= 120°(圓心角兩倍於圓周角)。 如果隨機點落在陰影區域,內角將大於120°,這違反了題目的要求。

<center>https://steemitimages.com/DQmVVynhs2VjkZ46KMw1m7dTpmivfkQqFvtY2d4dKpTgxLj/image.png</center>

結合正方形由其餘三面所產生的限制,我們可以知道題目所求的概率是中心非陰影區域的面積除以整個正方形的面積。 將紅色和黃色陰影區域的區域分別表示為 *R* 和 *Y*,那麼所需的概率 = 1 - 4 *Y* + 4 *R*。

<center>https://steemitimages.com/DQmWudjPWXNn5yLquQRt37HaD5aFnzVAgnKgAc2CxLTw7ra/image.png</center>

<center>https://steemitimages.com/DQmYJ3PcXRa7aNm7Po8h9x3WD9nqQMFmTEUVYU7pgPdVCxC/CodeCogsEqn.png</center>

<h4>編程方法</h4>

我們可以進行電腦模擬,在正方形內隨機抽出一點,並計算是否符合題目的要求,最後將實驗概率作為我們的答案。請注意,此方法並不能獲得確切答案,但此題目只要求將答案準確至最接近的3位小數位,因此當運行次數足夠大,答案正確的機會率將會相當高。

偽代碼:
```
count = 0
Loop for 10,000,000 times
	x = random(0 to 1)
	y = random(0 to 1)
	Use cosine theorem to check all 4 internal angles
	If all angles < 120 then count++
End loop
Output count / 10,000,000
```
如果時間充足,則可將迴圈次數設置為更高的值,以確保準確性。

---

<h2><center>得獎者</center></h2>

在30個參加者之中,有15人答對。多謝大家的熱烈參與!

@kona @philipheihei @guyverckw @leedslemon @armandocat @tvb @tensaix2j @wlcpu @galotta @livinguktaiwan @kangnajiang @geass @challk @mooninwater @superbing @kevingau @shieha @speeding @justyy @ghasemkiani @marziehshahabi @susankiani @ariak @megii @vincentyip @dkmathstats @akshaybornare @chasmic-cosm @rfece143 @dailyfortune

比賽題目帖文的SBD收入 = 37.299 SBD

另外,@steemstem 慷慨贊助了7.5 SP、5 SP以及2.5 SP予是次比賽的第一、二及三等獎!

<center>https://steemitimages.com/DQmdHTguFTTx7JU8HjWFRUU316pPQbBvmFEncP2nbaokS3q/image.png</center>

下表顯示得獎者及其所得獎金:

得獎者|獎項|SBD
---|---|---
@leedslemon|一等獎|37.299 / 8 = 4.662 SBD + 7.5 SP
@armandocat|二等獎|37.299 / 8 = 4.662 SBD + 5 SP
@tvb|三等獎|37.299 / 8 = 4.662 SBD + 2.5 SP
@tensaix2j|安慰獎|37.299 / 8 = 4.662 SBD
@ghasemkiani|安慰獎|37.299 / 8 = 4.662 SBD
@shieha|安慰獎|37.299 / 8 = 4.662 SBD
@vincentyip|安慰獎|37.299 / 8 = 4.662 SBD
@challk|安慰獎|37.299 / 8 = 4.662 SBD

恭喜所有得獎者!

----

<center>https://steemitimages.com/0x0/https://steemitimages.com/DQmY2jUCgfijKRkYnpsENa1jpv6VFwWe8Ts88cYKcQjiLcp/image.png</center>


steemSTEM(@steemstem)是一個由steemit社群支持的項目,旨在宣傳STEM(STEM是科學,技術,工程和數學的首字母縮略詞)。 請追蹤 @steemSTEM 以及加入<a href ="https://steemit.chat/channel/steemSTEM">聊天頻道</a>來支持steemSTEM。你還可以透過加入自動點讚系統來在為了進一步支持steemSTEM,詳情請在聊天頻道內向負責人士查詢。為了推廣聊天頻道的使用,我將不再透過發文來宣布下一場比賽的時間,我會在聊天頻道中提前公佈比賽時間。
👍  , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , , and 39 others
properties (23)
authorkenchung
permlinkanswer-and-winners-mathematics-programming-competition-7
categorycontest
json_metadata{"tags":["contest","cn-contest","cn","math","steemstem"],"users":["nicolemoker","kona","philipheihei","guyverckw","leedslemon","armandocat","tvb","tensaix2j","wlcpu","galotta","livinguktaiwan","kangnajiang","geass","challk","mooninwater","superbing","kevingau","shieha","speeding","justyy","ghasemkiani","marziehshahabi","susankiani","ariak","megii","vincentyip","dkmathstats","akshaybornare","chasmic-cosm","rfece143","dailyfortune","steemstem"],"image":["https://steemitimages.com/0x0/https://steemitimages.com/DQmb33Qwu5vome8xQ2ZLcqFxZmFwV255hPGovzavXSUDtaX/math%26progLOGO-01-01.png","https://steemitimages.com/DQmbchzAFYf9jzraqcTW5K8H7EQdbaEY6FwiGsFka4JodFd/image.png","https://steemitimages.com/DQmaG574iC7aXB6oYrAfhwBMMjpo7PzpBrvG6Ba9iq7xDC9/image.png","https://steemitimages.com/DQmVVynhs2VjkZ46KMw1m7dTpmivfkQqFvtY2d4dKpTgxLj/image.png","https://steemitimages.com/DQmWudjPWXNn5yLquQRt37HaD5aFnzVAgnKgAc2CxLTw7ra/image.png","https://steemitimages.com/DQmYJ3PcXRa7aNm7Po8h9x3WD9nqQMFmTEUVYU7pgPdVCxC/CodeCogsEqn.png","https://steemitimages.com/DQmdHTguFTTx7JU8HjWFRUU316pPQbBvmFEncP2nbaokS3q/image.png","https://steemitimages.com/0x0/https://steemitimages.com/DQmY2jUCgfijKRkYnpsENa1jpv6VFwWe8Ts88cYKcQjiLcp/image.png"],"links":["https://steemit.chat/channel/steemSTEM"],"app":"steemit/0.1","format":"markdown"}
created2017-10-02 17:32:48
last_update2017-10-02 17:32:48
depth0
children11
last_payout2017-10-09 17:32:48
cashout_time1969-12-31 23:59:59
total_payout_value55.859 HBD
curator_payout_value12.214 HBD
pending_payout_value0.000 HBD
promoted0.000 HBD
body_length8,137
author_reputation41,181,348,504,685
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,588,828
net_rshares24,594,765,305,715
author_curate_reward""
vote details (103)
@gamzeuzun ·
Great enjoy a lot want to see more of this in future. @kenchung
properties (22)
authorgamzeuzun
permlinkre-kenchung-answer-and-winners-mathematics-programming-competition-7-20171002t231337938z
categorycontest
json_metadata{"tags":["contest"],"users":["kenchung"],"app":"steemit/0.1"}
created2017-10-02 23:13:42
last_update2017-10-02 23:13:42
depth1
children0
last_payout2017-10-09 23:13:42
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_length63
author_reputation7,627,187,610
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,612,880
net_rshares0
@leedslemon ·
太感動了,居然第一了。計了一點點時間還以為只能試一下抽一下安慰獎呢!
properties (22)
authorleedslemon
permlinkre-kenchung-answer-and-winners-mathematics-programming-competition-7-20171003t022205265z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-03 02:22:03
last_update2017-10-03 02:22:03
depth1
children1
last_payout2017-10-10 02:22: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_length34
author_reputation848,482,237,371
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,623,658
net_rshares0
@kenchung ·
這應該說明了你低估了自己的實力啦😎
properties (22)
authorkenchung
permlinkre-leedslemon-re-kenchung-answer-and-winners-mathematics-programming-competition-7-20171003t051040529z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-03 05:10:42
last_update2017-10-03 05:10:42
depth2
children0
last_payout2017-10-10 05:10:42
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_length17
author_reputation41,181,348,504,685
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,633,550
net_rshares0
@speeding ·
期待下一次中奖
properties (22)
authorspeeding
permlinkre-kenchung-answer-and-winners-mathematics-programming-competition-7-20171003t075800061z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-03 07:58:00
last_update2017-10-03 07:58:00
depth1
children0
last_payout2017-10-10 07:58:00
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_length7
author_reputation1,172,222,545,920
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,643,940
net_rshares0
@tvb ·
我又得奖啦,好幸运哟。
properties (22)
authortvb
permlinkre-kenchung-answer-and-winners-mathematics-programming-competition-7-20171002t174117565z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-02 17:41:18
last_update2017-10-02 17:41:18
depth1
children6
last_payout2017-10-09 17:41: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_length11
author_reputation35,178,037,825,802
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,589,528
net_rshares0
@kenchung ·
恭喜啊 :)
properties (22)
authorkenchung
permlinkre-tvb-re-kenchung-answer-and-winners-mathematics-programming-competition-7-20171002t175612780z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-02 17:56:12
last_update2017-10-02 17:56:12
depth2
children5
last_payout2017-10-09 17:56: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_length6
author_reputation41,181,348,504,685
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,590,585
net_rshares0
@tvb ·
你不会明天一早又出题了吧,我要不要订个闹钟?
properties (22)
authortvb
permlinkre-kenchung-re-tvb-re-kenchung-answer-and-winners-mathematics-programming-competition-7-20171002t175948673z
categorycontest
json_metadata{"tags":["contest"],"app":"steemit/0.1"}
created2017-10-02 17:59:51
last_update2017-10-02 17:59:51
depth3
children4
last_payout2017-10-09 17:59: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_length22
author_reputation35,178,037,825,802
root_title"[Answer and Winners] Mathematics × Programming Competition #7 [答案及得獎名單] 數學 × 程式編寫比賽 (第七回)"
beneficiaries[]
max_accepted_payout1,000,000.000 HBD
percent_hbd10,000
post_id16,590,847
net_rshares0