LogGamma

Another way to compute the binomial coefficient when using large numbers is to recognize that


{n \choose k} = \frac{n!}{k!\,(n-k)!} = \frac{\Gamma(n+1)}{\Gamma(k+1)\,\Gamma(n-k+1)} = \exp(\ln\Gamma(n+1)-\ln\Gamma(k+1)-\ln\Gamma(n-k+1)),

where ( \ln \Gamma(n) ) denotes the natural logarithm of the gamma function at n. It is a special function that is easily computed and is standard in some programming languages such as using log_gamma in Maxima, LogGamma in Mathematica, gammaln in MATLAB, or lgamma in R. Roundoff error may cause the returned value to not be an integer.

— Wikipedia on Binomial coefficient

2014.07.23 Wednesday ACHK

天外救星 3C

Deus ex machina 3C

「時間旅行」、「蟲洞」、「平行宇宙」、「奇蹟」等情節,都是「天外救星」。它們的出現往往代表,該故事有著,不可修補的漏洞。

故事凡是時間錯亂,就宣稱是「時間旅行」。

故事凡是地點有誤,就宣稱是「瞬間轉移」。

故事凡是自相矛盾,就宣稱是「平行宇宙」。

故事凡是有違常理,就宣稱有「奇蹟」。

— Me@2014-07-11 04:59:55 PM

2014.07.13 Sunday (c) All rights reserved by ACHK

Deus ex machina 3

天外救星 3

Time travels, wormholes, parallel universes, miracles are all deus ex machina.

When a story’s author uses those deus ex machina, it means that the story broken, in the sense that the story has plot holes that the author cannot fix. 

With time travel, the story’s time logic is given up. With wormholes, the story’s space logic is given up. With parallel universes, the story’s internal consistency is given up. With miracles, the story’s scientific consistency is given up.

— Me@2014-07-12 01:15:25 PM

2014.07.13 Sunday (c) All rights reserved by ACHK

Deus ex machina 2

天外救星 2

Towards the end of the 19th century, Friedrich Nietzsche criticized Euripides for making tragedy an optimistic genre via use of the device, and was highly skeptical of the “Greek cheerfulness”, prompting what he viewed as the plays’ “blissful delight in life”.

Nietzsche argues that the deus ex machina creates a false sense of consolation that ought not to be sought in phenomena.

— Wikipedia on Deus ex machina

2014.07.12 Saturday ACHK

Deus ex machina

天外救星

Deus ex machina is a plot device whereby a seemingly unsolvable problem is suddenly and abruptly resolved by the contrived and unexpected intervention of some new event, character, ability or object. Depending on how it is done, it can be intended to move the story forward when the writer has “painted himself into a corner” and sees no other way out, to surprise the audience, to bring the tale to a happy ending, or as a comedic device.
  
Origin of the expression

The Latin phrase deus ex machina, from deus, meaning “a god”, ex, meaning “from”, and machina, meaning “a device, a scaffolding, an artifice”, is a calque from Greek ἀπὸ μηχανῆς θεός (apò mēkhanḗs theós), meaning “god from the machine”. Such a device was referred to by Horace in his Ars Poetica (lines 191–2), where he instructs poets that they should never resort to a “god from the machine” to resolve their plots “unless a difficulty worthy a god’s unraveling should happen”. He was referring to the conventions of Greek tragedy, where a machine is used to bring actors playing gods onto the stage. The machine could be either a crane (mechane) used to lower actors from above or a riser that brought actors up through a trapdoor.

Ancient usage

Aristotle criticized the device in his Poetics, where he argued that the resolution of a plot must arise internally, following from previous action of the play …

In modern literature

A deus ex machina is generally deemed undesirable in writing and often implies a lack of creativity on the part of the author. The reasons for this are that it does not pay due regard to the story’s internal logic (although it is sometimes deliberately used to do this) and is often so unlikely that it challenges suspension of disbelief, allowing the author to conclude the story with an unlikely, though perhaps more palatable, ending. Following Aristotle, Renaissance critics continued to view the deus ex machina as an inept plot device, …

— Wikipedia on Deus ex machina

2014.07.11 Friday ACHK

天外救星

「天外救星」是意料外的、突然的、牽強的解圍角色、手段或事件,在虛構作品內,突然引入來為緊張情節或場面解圍。近似詞有「天降神兵」和「如有神助」等。

Deus ex machina

拉丁語片語Deus ex machina(英譯:God from the machine)翻譯自希臘語,意思是「機關跑出的神」,中文一般翻譯為「舞台機關送神」、「機械降神」、「機器神」、「解圍之神」等。

在古希臘戲劇,當劇情陷入膠着,困境難以解決時,突然出現擁有強大力量的神,將難題解決,令故事得以收拾。方法是利用起重機,或起升機的機關,將扮演神的演員,下降至舞台上。這種表演手法是人為的,製造出意料之外的劇情大逆轉。

現代批評

這種手法通常被評論家認為是,不高明的說書技巧,因為它破壞了故事的內在邏輯,縱使有時候會為了這個理由,而故意採用。繼亞里士多德之後,文藝復興時期評論家將其視為,一種迂拙的情節計策…

— 改編自維基百科

2014.07.10 Thursday ACHK

99% is no real certainty

Dear Giotis, they were formally at least 99.9999999% certain, that’s what the 6-7 sigma confidence level means, and even when some possible “qualitatively different errors” are considered as possibilities, their certainty is still vastly higher than 99%.

As I wrote in an update, Pryke of BICEP2 says that the rumors about the planned retractions by BICEP are pure bullshit.

99% is no real certainty. It’s just a laymen’s myth that 99% is high enough to treat something as a certainty. It’s less than 2 sigma. In hard sciences, if something comes out to confirm a theory at a 99% level, a scientist doesn’t consider it even as significant evidence to be carefully studied!

— Lubos Motl

This file is licensed under the Creative Commons Attribution 2.5 Generic license. Author: Mwtoews

In statistics, the 68–95–99.7 rule, also known as the three-sigma rule or empirical rule, states that nearly all values lie within three standard deviations of the mean in a normal distribution.

68.27% of the values lie within one standard deviation of the mean. Similarly, 95.45% of the values lie within two standard deviations of the mean. Nearly all (99.73%) of the values lie within three standard deviations of the mean.

— Wikipedia on 68–95–99.7 rule

2014.06.03 Tuesday ACHK

The Magic City

.

The second theme is concerned explicitly with technology. It is a law of life in the magic city that if you wish for anything you can have it. But with this law goes a special rule about machines. If anyone wishes for a piece of machinery, he is compelled to keep it and go on using it for the rest of his life.

– Disturbing the Universe, p.4

.

.

.

2009.12.21 Monday ACHK

Dear Esther, 4

cease to exist

~ cannot be found in the original region,

but is still possible to be found in the meta-region

For example, at the end of the video game Dear Esther, the character dies, computer screen turns black, you cease to exist there,

but you wake up and continue to exist outside that video game, outside that computer screen.  

— Me@2012.10.27

2014.06.01 Sunday (c) All rights reserved by ACHK

Infinity 9

Infinitesimal 4, Whole-part conflict 2

Actual infinity is logically impossible, for it makes the whole-part relationship break down. 

— Me@2012-10-27

2014.05.27 Tuesday (c) All rights reserved by ACHK

Whole-part conflict

paradox ~ mixing levels

Mixing levels is a problem of whole-part conflict.

“x = 1 – x” has no conflicts but “x = x – 1” does, because “x = x – 1” means “the whole is equal to a part“, which is logically impossible, according the definitions of the words “whole” and “part”. 

— Me@2012.10.26

2014.05.04 Sunday (c) All rights reserved by ACHK

Hole, 2

The existence of X is not a property of X itself. Instead, the existence of X is a property of the bigger system that consists of X.

For example, the existence of a hole is a property of the whole, not of the hole itself. You cannot define a hole without the whole. Without the whole, the hole cannot exist at all.

hole ~ whole

— Me@2012.10.26

2014.04.30 Wednesday (c) All rights reserved by ACHK

回到過去 3

Cumulative concept of time 20

你想回到過去,重新經歷年青時的生活。但是,你有沒有想過,「經歷」即是「走過」,又名「離開」。「經歷過去」,其實就即是「到達現在」。

(Me:那樣,如果我只是「回到過去」,但不「經歷過去」,我豈不是不會「失去青春」?)

無錯。但是,回到過去,但不經歷過去,即是停止時間。這個現象,學名叫做「英年早逝」。那不是好事。

但是,你亦不用灰心,因為,「經歷過去」或者「到達現在」,並不代表你「失去過去」。「現在」,就是「經歷了的過去」。「過去」,是「現在」的一部分。「過去的你」,是「現在的你」的一部分。你從來也沒有失去過,年青時候的自己。

正如,「使用金錢」的意思是,令它消失,從而換取其他,更有價值的東西。「使用金錢」而不開心,是因為你花太多的金錢,去買了一些,用處不大的東西。

同理,你覺得「失去」青春,是因為你沒有百分百地利用,當時的時光,去賺取最多的經驗,累積最多的財富,創造最多的作品。

— Me@2014-04-24 01:56:35 AM

2014.04.27 Sunday (c) All rights reserved by ACHK

Fact

“Fact” is “事實” in Chinese. Literally,

事 = event

實 = solid

fact

~ event solid

~ past event

~ unchangeable

How about abstract facts?

Abstract facts, such as “2+2=4”, are definitions.

Analytic facts are definitions.

Synthetic facts are past events.

— Me@2012.10.26

2014.04.25 Friday (c) All rights reserved by ACHK

The fifth floor

回到過去 2 | 幼稚建築論 2 | Cumulative concept of time 19

The fifth floor cannot exist without the first 4 floors.

— Me@2012.10.24

That’s why time travel is logically impossible.

— Me@2014.04.17

If you remove the first 4 floors, the original fifth floor is not the “fifth” floor anymore. Instead, it would become the first floor.

— Me@2014.04.16

2014.04.17 Thursday (c) All rights reserved by ACHK

nCr, 2

這段改編自 2014 年 3 月 22 日的對話。

假設有 7 蘋果,你要選 3 個出來,總共有多少個選法?

(A:我大概明白你的解釋。但是,情感上,我仍然接受不到,「7 選 3」和「7 選完 2 後再選 1」,的確有所不同。)

如果你堅持要把「7 選 3」,看成「7 選完 2 後再選 1」,而又要得到正確答案的話,你可以用 nPr 的方法。

「nPr」即是「n 排 r」—— 如果有 n 個物件,選 r 出來排隊,總共有多少個排列方法?

例如,由 7 個蘋果之中,選 3 個蘋果出來,總共就有 7P3,即是 210 個排法。

但是,題目要的是「組合」,不是「排列」。亦即是話,題目只重視,如果 7 個蘋果之中購買 3 個,有多少個選擇方法,而購買的次序並不重要。

換句話說,被選的 3 個蘋果的內部次序,不予考慮。所以,你應該把 7P3 除以(3!),才可以把「排列」翻譯成「組合」,得到正確的答案:

7P3/(3!)

= 210/6

= 35

這個答案,和 7C3 的結果相同。

你剛才說,你很想把「7 選 3」,看成「7 選完 2 後再選 1」。你可以這樣做:

首先,由 7 個蘋果之中,選兩個出來排隊。

7P2

然後,再由餘下的 5 個蘋果之中,選 1 個出來排隊。

(7P2)(5P1)

最後,就把次序因素刪除。

(7P2)(5P1)/(3!)

= 35

你都會得到 35。

總括而言,「7P3/(3!)」、「7P2 x 5P1/(3!)」和「7C3」都是正確的,等如 35。而「7C2 x 5C1」則等如 105,不是正確的。

(A: 為何把「7P3」拆成「7P2 x 5P1」就可以,而把「7C3」拆成「7C2 x 5C1」就錯誤?)

如果要變成正確,你就要把「7C2 x 5C1」除以 3。「7C2 x 5C1/3」都會等如 35。為何要把「7C2 x 5C1」除以 3,才會得到正確答案呢?

亦即是話,在這裡,「除以 3」的實際意思,又是什麼呢?

— Me@2014.04.05

2014.04.06 Sunday (c) All rights reserved by ACHK