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

時空膠紙 1.5

尋找下一步 1.8 | Meaningful 11.8

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

讀書時代的「成績」,有類似的「時空膠紙」功用。例如,我最終不是做數學家,所以學那麼多的高深數學,對我並沒有直接的用途。但是,我仍有極大的動機,去磨練我的數學,因為,如果我能在考試中得到好成績,我入大學的機會就大很多。學術帶來成績;成績引發前途。

「成績」,就即是可以「保存」、可以「累積」的東西。

讀事時代的因果缺憾,遠不及事業時代的多。需要用到「時空膠紙」的情況,自然亦會較少。

第一,有些科目對一般人來說,會有直接的用途;毋須任何「時空膠紙」,也應起勁去讀,例如語文科目。

第二,有些科目對超能人而言,會有直接的用途。例如,有部分年輕人真的想做數學家、物理學家 或 工程師。那樣,數學科對他們就有天然的意義。

第三,即使沒有直接的用途,年輕人除了「成績」外,還有其他的「時空膠紙」可以選擇,或者同時使用。「成績」並不是唯一的「時空膠紙」。

即使不是作對應的專業人士,對於透過學習(例如)數學科,「成績」以外,你還可以得到「學問」和「智力」。

學問方面,數學中的部分知識,其實會在日常生活中實際用到。智力方面,學習數學的過程中,所激發出來的額外思考層次,一生受用 —— 幾乎可以應用在,任何的上文下理。

人生旅程中,只會有很少的情況,智力完全沒有任何用途。

— Me@2013.07.14

2013.07.14 Sunday (c) All rights reserved by ACHK

Digital physics, 6.3

Myth: The breakdown of the usual geometric intuition near the Planck scale – sometimes nicknamed the “minimum length” – implies that the length, area, and other geometric observables have to possess a discrete spectrum.

Reality: This implication is incorrect. String theory is a clear counterexample: distances shorter than the Planck scale (and, perturbatively, even the string scale) cannot be probed because there exist no probes that could distinguish them. Consequently, the scattering amplitudes become very soft near the Planck scale and the divergences disappear. 

However, there is no discreteness of geometric quantities – such as the radii of compact circles in spacetime. And general “intervals” or “surfaces” inside the spacetime can’t even be localized with the Planckian precision which is also why their proper lengths and areas, assuming their better-than-Planckian accuracy, are not even well-defined observables in string theory: what can’t be measured operationally often can’t be defined theoretically, either. ;-) 

— Myths about the minimal length

— Lubos Motl

2013.07.14 Sunday ACHK

天使與魔鬼

1. 自我虛級化

Publish! 2

.

自我虛級化,是保存自我的最佳方法。

Self-de-centralization is the best way to backup yourself.

– Me@2010.07.20

.

.

.

2010.07.21 Wednesday (c) ACHK

2. 自我虛級化 2

Self-de-centralization 2

釋放自我 2

.

.

Centralized-self = Evil

– Me@2010.07.25

.

.

.

.

.

.

.

.

.

.

.

.

.

.

.

把手緊握 什麼都沒有

把手放開 你得到一切

– 臥虎藏龍

.

.

.

2010.07.25 Sunday (c) ACHK

3. 天使與魔鬼 5

自我虛級化 | Self-de-centralization | 釋放自我 3

.

.

入魔 = 要求別人的世界以自己為中心

– Me@2010.07.28

.

Angels can fly because they take themselves lightly;

devils fall because of their gravity.

–- G. K. Chesterton

.

.

.

2010.08.07 Saturday (c) ACHK

— Me@2011.11.04

— Me@2013.07.12

2013.07.12 Friday (c) All rights reserved by ACHK

Multinomial coefficient 2.5

二項式係數 4.5 | Binomial coefficient 4.5

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

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

言歸正傳,剛才我講過:

記住,是否視之為「一個」可能性,並不是跟你的感覺行事。一切要按題目的指示去定義。例如,在這一題中,題目問的是「分法」,而不是「抽法」,或者「坐法」。

所以,答案明顯是 10_C_4,即是「10 選 4」,等於 210。結論是,總共有 210 個可能的分配方法。

10_C_4 =

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

而我亦提過,這題式又可以視為「多項式係數」(multinomial coefficient),意思是「分組公式」—— 分子是指把 10 人分成兩組;分母則是指,第一組有 4 個人 和 第二組有 6 個人。因為是「分組」,即是「分成組合」,所以每組內部的次序並不重要。

但是,你剛才又追問:

但是,我覺得應該不止有 210 個可能性,因為抽某 4 個人出來時,本身有很多個抽法。假設「甲、乙、丙、丁」四人被抽中,去乘坐第一輛車,「先抽甲出來」和「先抽乙出來」,就已經是兩個不同的可能性。我不太明白,為什麼毋須考慮這一點?

那樣,我就會答:

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

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

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

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

— Me@2013.07.12

2013.07.12 Friday (c) All rights reserved by ACHK

Looper, 5.4

Paradox 5.5 | Meta-time 4.5 | Cumulative concept of time, 13.5 | Two dimensional time 4.4 | 二次元時間 4.4

To be logically consistent WITHIN the movie’s story, Young Joe (in the year 2044) should not be able to influence Old Joe, who had time-travelled to the year 2044 from the year 2074,because that Old Joe is from another timeline. The proof is that Young Joe’s experience in the year 2044 is different from Old Joe’s experience in the year 2044 when he was young.

They are not the same person, nor the same person at different ages within the same timeline. At most, they are different versions of the “same” person from two different timelines (aka “parallel universes” or “histories”).

Young Joe’s changes should affect the same-timeline-Old-Joe, but not any Old Joe’s from any other timelines. So the Old Joe within the movie should not have been affected when Young Joe hurt himself.

Also, the changes of the same-timeline-Old-Joe due to the actions of Young Joe should be seen only by the author (meta-time), but not by Young Joe until he has become that Old Joe 30 years later. 

The author unintentionally, or intentionally, has confused two story timelines. Moreover, the author unintentionally, or intentionally, has confused the story-time and its meta-time.

— Me@2013-07-05 10:32 PM

2013.07.11 Thursday (c) All rights reserved by ACHK

時空膠紙 1.4

尋找下一步 1.7 | Meaningful 11.7

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

即使你沒有以上四種問題,金錢真的有效作為你的「時空膠紙」,令你每天也很有衝勁地去上班,你也不宜過度使用這種「時空膠紙」,去修補生活中的因果缺憾。正如,如果修理電器時,那個師傅唯一使用的工具是膠紙,你會覺得,他很明顯是一個冒牌的電器師傅。

你過份依賴「金錢」的話,它很快就會失去,作為「時空膠紙」的功效。亦即是話,如果你上班從事的工作,百分百沒有用,百分百是純為了金錢,沒有任何形式的其他意義的話,金錢為你帶來的生氣,很快會用盡,不會長久。

例如,假設上司指派你每天的工作,就只是呆坐八個小時,然後打一千個筋斗。我相信,上班不到一個月,你就會發狂,即使那個職位,會為你帶來豐厚的收入。

當然,最理想的情況是,你的工作之中,十成十是有意義的實事,而又能為你提供安穩的入息。但是,如果為勢所迫,在上班的時間之中,你要花八成去做無聊事,我覺得勉強都可以接受,因為你還有兩成時間,去做有用之事。

在那個情況下,你就應該虛事虛做 —— 把上司指派的無聊事,盡量做差 —— 從而減低新的無聊事,跑到你身上的機會率;然後,你又要實事實做 —— 把上司吩咐的有用事,盡量做好 —— 從而發揮自己,貢獻公司。那樣,當上司發現你發熱發亮,不可或缺時,你的權力自然增加。你就可以把那些上班時候的無聊事務,盡量清除。

— Me@2013.07.09

2013.07.10 Wednesday (c) All rights reserved by ACHK

Looper, 5.3

Paradox 5.4 | Meta-time 4.4 | Cumulative concept of time, 13.4 | Two dimensional time 4.3 | 二次元時間 4.3

In a single-mutable-timeline time travel story, the two dimensional time is not due to the internal causal structure of the story. Instead, it is due to the author’s timeline (aka meta-time). The author’s timeline is the second time dimension (aka independent direction).

The single-mutable-timeline model of time travel is not logically consistent within the story. If it is “mutable”, it is not “single”.

The single-mutable-timeline model of time travel is logically consistent only outside the story, from the perspective of the story’s author.

— Me@2013-07-02 3:47 PM 

2013.07.09 Tuesday (c) All rights reserved by ACHK

未來報告 3

天眼救未來(Next)| The power is in the principles, 5

Principles, aka differential equations, let you see part of the future. 

— Me@2013-07-06 06:05:21 PM

2013.07.08 Monday (c) All rights reserved by ACHK

Multinomial coefficient 2.4

二項式係數 4.4 | Binomial coefficient 4.4

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

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

換而言之,從 10 人中抽 4 人出來,組成第一隊樂隊,總共有多少個抽法呢?

在這個情況下,次序很明顯不重要。試想想,假設你從那 10 人中,抽了「ABCE」4 人出來。無論抽的先後次序是「ABCE」,還是「ACBE」,他們所組成樂隊都會「一樣」。兩個情況所組成的音樂組合,你都會視之為「同一隊」樂隊。

但是,如果問題改為:

從 10 人中抽 4 人出來,去參加一個音樂比賽,而沒有其他參賽者的話,總共有多少個可能的比賽排名結果呢?

那樣,被抽了出來的那 4 個人中,不同的人拿冠軍,為之不同的排名,不同的結果。所以,次序需要考慮。運算方面,詳細的版本是:

首先,考慮有「冠、亞、季、殿」軍 4 個空格:

(_)(_)(_)(_)

因為冠軍寶座有 10 個可能的奪得者,所以,第一格是 10:

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

其中 1 人奪得冠軍後,亞軍還有 9 個可能的領獎人士:

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

如此類推的話,我們就可以推斷到,總共有 5040 個可能的比賽結果:

(10)(9)(8)(7)

= 5040

精簡的版本則是:

題目明確地問,有多少個可能的比賽排名。所以,題目所問的,就相當於:

從 10 人中抽 4 人出來,而次序重要的話,總共有多少個抽法呢?

那是 permutation(排列)。答案明顯是 10_P_4,即是「10 排 4」,等於 5040。

10_P_4 =

10!
——-
(10-4)!

結論是,總共有 5040 個可能的比賽排名。

— Me@2013.07.08

2013.07.08 Monday (c) All rights reserved by ACHK

Looper, 5.2

Paradox 5.3 | Meta-time 4.3 | Cumulative concept of time, 13.3 | Two dimensional time 4.2 | 二次元時間 4.2

In the movie Looper, Young Joe (in the year 2044) influences Old Joe (in the year 2074) in the sense that Young Joe’s every action affects the state of Old Joe, because Old Joe is Young Joe’s future self.

For example, after Young Joe had hurt his own arm, the corresponding wound also appeared on Old Joe’s arm, even though Old Joe had already time-travelled back to the year 2044. 

All of Young Joe’s actions are the causes of Old Joe’s state. Young Joe is in the past of Old Joe.

Old Joe (2074-Joe) = [ …, Young Joe (2044-Joe), … ]

B = [ …, A, … ]

However, Old Joe (2074-Joe) had time-travelled back to the year 2044, meeting the Young Joe.

So, some of Old Joe’s actions would affect Young Joe’s decisions on his own actions. In this sense, Old Joe also influences Young Joe indirectly. Some of Old Joe’s actions are the causes of Young Joe’s state. Part of Old Joe is also in the past of Young Joe.

Young Joe (2044-Joe) = [ …, Old Joe (2074-Joe), … ]

A = [ …, B, … ]

However, it is logically impossible to have both

B is in the past of A 

and

A is in the past of B

just as it is logically almost impossible to have both

D is a part of C

and

C is a part of D

If you insist that it is the case, the only possibility is that

C = D

In this analogy, neither C nor D is really a “part” of another. In the time travel case, neither A nor B is really in the past of another. In other words, A (Young Joe) and B (Old Joe) have no time relationship. Neither’s actions are the causes of the state of another.

The real causes of Young Joe or Old Joe’s states are actually not within the movie story’s timeline. The real causes are the decisions of the author of the story.

— Me@2013-07-03 6:19 PM

2013.07.08 Monday (c) All rights reserved by ACHK