機會率一樣

這段改編自 2010 年 7 月 20 日的對話。

運算機會率題目時,盡量不要用「一樣」這個字眼;盡量不要說「因為兩個情況一樣,所以你要將中途答案乘二」這類說話。

例如,問題是:

如果擲兩個錢幣,擲到一公一字(1H1T)的機會率是多少?

假設每一個錢幣都是正常的,即是擲到公字的機會均等,也是 1/2。

這題很簡單容易,所以用最原始的方法也無妨:

HH
HT
TH
TT

總共有 4 個可能的結果。根據題目的假設,它們每個的發生機會均等,都是 1/4;而中間的兩個可能,都是題目想要的結果,所以,答案是 2/4,即是 1/2。

在解釋這一點時,如果要用「一樣」這個詞語,我可以用兩個完全相反的講法。換而言之,「一樣」會造成混淆。

HH
HT <
TH <
TT

我既可以說,因為中間的兩個案例「一樣」 —— 都是「一公一字」 —— 符合題目的要求,所以兩個案例都要,導致分子是 2,答案是四分之二:

2
_

4

但是,我又可以說,因為中間的兩個案例「不一樣」 —— 一個是「第一個公、第二個字」,而另一個是「第一個字、第二個公」 —— 所以應該視為兩個案例,而不是 1 個。那樣,分子就應該是 2,而不是 1。答案是四分之二:

2
_

4

化簡後是 1/2。

— Me@2013.07.27

2013.07.27 Saturday (c) All rights reserved by ACHK

The Beginning of Time, 2

Brian Greene continues with all the delusions and delusions, infrequently spiced with a correct proposition. The Big Bang created the arrow of time (the latter has nothing to do with the laws of physics), holy cow. “We don’t know why the Universe started in a low-entropy state,” holy cow. We perfectly know why it did. If it started with a state of a high entropy, we could always ask “what was before that”. The only thing that prevents us from going before a moment is that the moment has the minimal mathematically possible value of the entropy, namely zero.

— The Fabric of the Cosmos II

— Lubos Motl

2013.07.25 Thursday ACHK

無限旅程 4.3

Meaningful 12.3

這段改編自 2010 年 4 月 3 日的對話。

(安:但是,我又可以追問,為什麼「存在」好過「不存在」?)

那不是一定的。那要視乎上文下理而定。

你只可以說,「好東西存在」,好過「好東西不存在」;而「壞東西不存在」,好過「壞東西存在」。那都是重言句。

例如,銀包(錢包)中的金錢,對你來說是好東西。所以,「金錢存在於你的銀包之內」,相對於你而言,好過「金錢不存在於你的銀包之中」。

又例如,銀包中的蟑螂,對你來說是壞東西。所以,「蟑螂不存在於你的銀包之內」,相對於你而言,好過「蟑螂存在於你的銀包之中」。

(安:那我自己的存在呢?為什麼「自己存在」,好過「自己不存在」?)

那是一個奇怪的問題。那亦是一個「不成問題」的問題,因為,「自己」並沒有所謂「存在不存在」。意思是,「你的存在」並不是「你的性質」。

「性質」的意思是,你可以利用它,來把人群分成兩組。例如,「輕盈」是一個性質。所以,你可以把人群分成兩組:一組是「輕盈」的人,另一組是「不輕盈」的人。

但是,你可不可以假設,「存在」是一個「性質」呢?亦即是話,你可不可以把人群分成兩組:一組是「存在」的人,而另一組是「不存在」的人呢?

— Me@2013.07.24

2013.07.25 Thursday (c) All rights reserved by ACHK

T-duality, 5

Open strings and D-branes

T-duality acting on D-branes changes their dimension by +1 or -1.

— Wikipedia on T-duality

2013.07.24 Wednesday ACHK

無限旅程 4.2

Meaningful 12.2

這段改編自 2010 年 4 月 3 日的對話。

你這個問題可以改為:

為什麼「不進則退」?

難道「原地踏步」,就不可「繼續存在」嗎?

「不斷存在」,並不是一個單一事件;「不斷存在」,是一個不斷的過程。

你要維持「現狀」,就要不斷有「維持」的動作。主要的原因是,即使你不變,你的環境會變。你要「維持現狀」,你就要隨著你的環境,作出相應的變化。「維持現狀」,是一個「苦心經營」的過程。

例如,如果你的目標是「體重不變」,「絕食」並不能令你如願以償,因為,即使你不再進食,你的身體仍會不斷消耗能量。不再進食,只會令你體重遞減。

達至「體重不變」的正確方法是,定時適量進食。

— Me@2013.07.23

2013.07.23 Tuesday (c) All rights reserved by ACHK

Godel 11

1931: Publication of Gödel’s incompleteness theorems, showing that essential aspects of Hilbert’s program could not be attained.

It showed how to construct, for any sufficiently powerful and consistent recursively axiomatizable system – such as necessary to axiomatize the elementary theory of arithmetic on the (infinite) set of natural numbers – a statement that formally expresses its own unprovability, which he then proved equivalent to the claim of consistency of the theory; so that (assuming the consistency as true), the system is not powerful enough for proving its own consistency, let alone that a simpler system could do the job.

It thus became clear that the notion of mathematical truth [cannot] be completely determined and reduced to a purely formal system as envisaged in Hilbert’s program. This dealt a final blow to the heart of Hilbert’s program, the hope that consistency could be established by finitistic means (it was never made clear exactly what axioms were the “finitistic” ones, but whatever axiomatic system was being referred to, it was a ‘weaker’ system than the system whose consistency it was supposed to prove).

— Wikipedia on Foundations of mathematics

2013.07.21 Sunday ACHK

無限旅程 4

Meaningful 12

這段改編自 2010 年 4 月 3 日的對話。

(安:為什麼必須要有一個「無限旅程」,人才會感到「有意義」?

或者說,為什麼一件事有「下一步」還不夠,而一定要「不斷地」有下一步,人才會感到真正的快樂?)

「有限價值」會帶來短暫的開心;「永恆價值」則會引發長久的幸福。

一件事如果有無限個「下一步」,那就代表「那件事」本身,可以長存於時間之中,不會消失。

一件事如果沒有起碼一個「無限旅程」,你的「機會成本評價系統」,自然會令你沒有心機、提不起勁,因為「那件事」早晚會消失;而你付出的努力,亦注定要白費。

有意義

~ (不斷地)有下一步

~ 可保存

~ 可繼續存在

~ 可儲存於時間之中

— Me@2013.07.21

2013.07.21 Sunday (c) All rights reserved by ACHK

Logical arrow of time, 3

And as we have explained many times, the results of this inference – the retrodictions – always depend on our priors. So the knowledge of the present is enough to calculate the future (classically) or to predict the unique probabilities of various states in the future (quantum mechanically). But it is simply never enough to calculate the unique state or unique probabilities of various states in the past.

The reason has been explained many times. But we can say that at least in the macroscopic context (when some microscopic detailed information is being omitted, e.g. because it’s unmeasurable), different initial states “A,B” in the past may evolve into the same final state “C” in the future.

— Logical arrow of time and terminology

— Lubos Motl

2013.07.20 Saturday ACHK

Multinomial coefficient 3

二項式係數 5 | Binomial coefficient 5

這段改編自 2010 年 7 月 20 日的對話。

外傳故事:

利用 multinomial coefficient(分組公式)時,有一個情況要額外小心。我們先研究一題例子:

如果有 10 個人,要分成兩隊音樂組合,各自有 5 人,那總共有多少個可能?

答案表面上是 10_C_5,即是「10 選 5」,因為,你要考慮由那 10 人之中,選 5 人出來組成第一組樂隊,有多少個方法。

10_C_5 =

(10!)
——–
(5!)(5!)

而我亦多次提過,這題式又可以視為「多項式係數」(multinomial coefficient),意思是「分組公式」 —— 分子是指把 10 人分成兩組;分母則是指,第一組有 5 個人 和 第二組有 5 個人。

但是,實際上,正確的運算方法,應該是

(1/2) 10_C_5 =

1(10!)
——–
2(5!)(5!)

原因是,題目只要求把那 10 人分成,兩組人數相同的樂隊,而題目並沒有要求區分,哪組為之「第一組」、哪組為之「第二組」。例如,

由『ABCDEFGHIJ』10 人中,選了『ACEGI』5 人出來,先組成一隊

由『ABCDEFGHIJ』10 人中,選了『BDFHJ』5 人出來,先組成一隊

」,

在這一題上文下理的要求下,應該歸納為同一個「case」(事件可能性),因為,兩者的結果都同樣是:

『ACEGI』為之一隊,而『BDFHJ』則為之另一隊。

如果題目改為:

如果有 10 個人,要抽 5 人出來,組成一隊音樂組合,那總共有多少個可能?

答案則是:

10_C_5 =

(10!)
——–
(5!)(5!)

如果題目改為:

如果有 10 個人,要分成兩隊音樂組合,第一組有 5 人,而第二組又有 5 人,那總共有多少個可能?

答案都是:

10_C_5 =

(10!)
——–
(5!)(5!)

明白的話,試一試這題:

假設有 10 個友人,要乘坐計程車去郊遊。總共有兩輛計程車。第一輛車的載客量是 5 人,而第二輛的載客量是 5 人。換而言之,那 10 人要分成兩組乘車。那樣,總共有多少個分配方法呢?

究竟答案應該是 (1/2) 10_C_5,還是 10_C_5 呢?

— Me@2013.07.19

2013.07.20 Saturday (c) All rights reserved by ACHK

Godel 10

An important consequence of the completeness theorem is that it is possible to enumerate the logical consequences of any effective first-order theory, by enumerating all the correct deductions using axioms from the theory.

Gödel’s incompleteness theorem, referring to a different meaning of completeness, shows that if any sufficiently strong effective theory of arithmetic is consistent[,] then there is a formula (depending on the theory) which can neither be proven nor disproven within the theory. Nevertheless the completeness theorem applies to these theories, showing that any logical consequence of such a theory is provable from the theory.

— 14 February 2012

— Wikipedia on Gödel’s completeness theorem

2013.07.19 Friday ACHK

Free Software 5

自由軟體 5 | Consultant 2

Paying represents a recognition of value. Paying is a declaration of commitment.

Without enough payment, people in general will not commit enough time to fully utilize a product. 

— Me@2011.03.17

Free software is a matter of liberty, not price. To understand the concept, you should think of free as in free speech, not as in free beer.

— Richard Stallman

Free software does not have to be free. Free software does not have to be cheap.

Free Software Foundation sold each Emacs copy for 100 dollars.

— based on my memory of a Richard Stallman’s speech in Hong Kong

[The “$100” may be incorrect. But spirit of the whole paragraph is intact.]

— Me@2013.07.17

2013.07.19 Friday (c) All rights reserved by ACHK

月黑高飛 2.1

The Shawshank Redemption, 2.1 | 尋找下一步 1.9

這段改編自 2010 年 4 月 3 日的對話。

剛才,我回答你的問題時,提到:

留意,你的「第二工作」,一定要有「永恆價值」,你才可能得到,真正的長久快樂,……

即使那份「第二工作」,「只是」你的「興趣」,如果不會造成 real consequence(長遠後果),你就不會有心機,亦不會提起勁,去不斷發展它,……

所以,如果你打算透過你的「第二工作」,例如編寫手機程式,去賺取外快,你就要保證,它可以達到以下兩項要求。一方面,你的「第二工作」,一定要能夠長久帶來額外收入。另一方面,那些額外收入,必須兼備一個,足夠高的增長速度,令到你有機會在合理的時間之內,例如三年,脫離你現在厭惡的維生正職。

如果你的「第二工作」,可以附帶這個「人生進化」的前景,你的「機會成本評價系統」,就會自動將你的身心,調節到提得起勁,去透過那份「第二工作」,建構你的個人事業。而你對現在「第一工作」的厭惡程度,亦會大大減低,因為,你知道你的「第一工作」,只是你人生中的過客。

當然,到你三年後成功「工作逃獄」,完全從事自己的事業時,你都會有原本的「無限旅程」問題。你腦袋中的「自我虐待系統」,又會出來追問:

So what?

咁又點呢?

那又怎樣?

但是,那時,你已經有一些無懈可擊的答案。

第一,新的工作是你自己選擇,然後逐步建構出來的,所以你一定非常喜歡。那樣,它會為你長久的快樂。

第二,新的工作竟然,可以由三年前的「副業」身份,幻化成現在的正職,證明它可持續發展。換而言之,它本身就內置了,至少一個「無限旅程」。「變成了正職」,從來也不是它的終點。

第三,最重要的是,那時候,你再不只代表你自己。你的身份,除了是「自己」之外,還有是「一間公司」。你考慮自己的人生意義之餘,亦會從公司的角度出發,去不斷尋找「改善世界」的下一步。這就是最重要的「無限旅程」。

— Me@2013.07.17

2013.07.17 Wednesday (c) All rights reserved by ACHK

Godel 9

For example, the statement S = “There exists an a with a*a = 2″ is true in R, but false in Q since the square root of 2 is irrational. Similarly, the statement T = “There exists an a with a*a = -1″ is true in C, but false in R (the imaginary unit i satisfies the statement in C).

[]

Hence, if you believe the Soundness Theorem, we should not expect to be able to prove either S or (not S) from F because there is one model of F in which S is true, and one where S is false. Similarly, we should not expect to be able to prove either T or (not T). Thus, our system F is incomplete, i.e. there are statements X such that we can neither prove X nor (not X).

[]

However, there are [] good reasons why it is incomplete [;] there are statements which can be either true or false depending on which model of F you are currently working.

The Completeness Theorem basically says that this is the only way a system can be incomplete. In other words, the above converse question is true, which implies that we can prove absolutely everything that is not ruled out for the above basic reason.

— Godel’s Completeness Theorem

— Joe Mileti

2013.07.17 Wednesday ACHK

Multinomial coefficient 2.6

二項式係數 4.6 | Binomial coefficient 4.6

這段改編自 2010 年 7 月 20 日的對話。

假設有 10 個友人,要乘坐計程車去郊遊。總共有兩輛計程車。第一輛車的載客量是 4 人,而第二輛的載客量是 6 人。換而言之,那 10 人要分成兩組乘車。那樣,總共有多少個分配方法呢?

你講得沒有錯,即使在那 10 人中,指定某 4 個人去乘第一輛車,那就已經有(4!)個可能性,即是 24 個那 4 人被抽出來時,可能的先後次序。

而正正是因為那樣,再加上那(4!)個可能性,在題目問法的上文下理之下,被定義為「同一個」case(事件可能性),所以分母才會有一個(4!)的因子,用以減低「事件可能性」的數目。

換而言之,題目只在乎「分配方法」,即是那 10 人之中,哪些人上第一輛車,哪些人去第二輛。

試想想,假設你只懂乘除,而不懂得任何機會率,或者統計學的公式,你會怎樣完成這一題呢?

首先,總共有 10 個坐位,第一輛車有 4 個,而第二輛車有 6 個:

(_)(_)(_)(_)|(_)(_)(_)(_)(_)(_)

抽第一個人去第一輛車時,有 10 個可能的人:

(10)(_)(_)(_)|(_)(_)(_)(_)(_)(_)

抽第二個人去第一輛車時,有 9 個可能性:

(10)(9)(_)(_)|(_)(_)(_)(_)(_)(_)

如此類推:

(10)(9)(8)(7)|(_)(_)(_)(_)(_)(_)

但是,那 4 人也是乘坐第一輛車,題目不想理會他們,被抽出來時的先後次序。而他們「被抽的次序」,總共有 24 個。所以,分母應該要有一個 24 的因子:

24 = 4 x 3 x 2 x 1

(10)(9)(8)(7)|(_)(_)(_)(_)(_)(_)
————————————————————-
(4)(3)(2)(1)|(_)(_)(_)(_)(_)(_)

然後,我們考慮第二輛車。因為餘下的有 6 個人,抽第一個人去第二輛車時,就有 6 個可能的人:

(10)(9)(8)(7)|(6)(_)(_)(_)(_)(_)
————————————————————-
(4)(3)(2)(1)|(_)(_)(_)(_)(_)(_)

抽第二個人去第二輛車時,有 5 人可能性:

(10)(9)(8)(7)|(6)(5)(_)(_)(_)(_)
————————————————————-
(4)(3)(2)(1)|(_)(_)(_)(_)(_)(_)

如此類推:

(10)(9)(8)(7)|(6)(5)(4)(3)(2)(1)
————————————————————-
(4)(3)(2)(1)|(_)(_)(_)(_)(_)(_)

但是,那 6 人也是去乘坐第二輛車。題目不想理會他們,被抽出來時的先後次序。而他們「被抽的次序」,總共就有 720 個。所以,分母還有一個, 720 的因子:

720 = 6 x 5 x 4 x 3 x 2 x 1

(10)(9)(8)(7)|(6)(5)(4)(3)(2)(1)
———————————————————
 (4)(3)(2)(1)|(6)(5)(4)(3)(2)(1)

= 210

在連 factorial(階乘)都不懂的情況下,你就需要用到這個詳細的做法。如果你懂 factorial,即使假設還未學會 n_C_r,你仍然可以用一個,精簡一點的做法:

首先,有 10 個人 10 個位,所以總共有(10!)個排法:

(10!)
——–
(_)(_)

但是,第一輛車的那 4 人,內在次序不重要,所以,你要把那(4!)個排法「歸一」:

(10!)
——–
(4!)(_)

同理,第二輛車的那 6 人,內在次序亦不重要,所以分母再有一個(6!)的因子:

(10!)
——–
(4!)(6!)

= 210

— Me@2013.07.15

2013.07.15 Monday (c) All rights reserved by ACHK