機遇再生論 1.7

同理,在一次牌都未洗的時候,問:

如果洗牌 m 次,起碼一次洗到原本排列 A 的機會率是多少?

答案將會是

P(A_m)= 1 - (1 - \frac{1}{N})^m

留意,N = 52! \approx 8.07 \times 10^{67},非常之大,導致 (1 - \frac{1}{N}) 極端接近 1。在一般情況,m 的數值還是正常時, P(A_m) 會仍然極端接近 0。

例如,你將會連續洗一千萬次牌(m = 10,000,000),起碼有一次,回到原本排列 A 的機會是:

P(A_m)
= 1 - (1 - \frac{1}{N})^m
= 1 - (1 - \frac{1}{52!})^{10,000,000}

你用一般手提計算機的話,它會給你 0。你用電腦的話,它會給你

1.239799930857148592 \times 10^{-61}

.

但是,你亦毋須完全悲觀,因為只要再留意,你亦會發現,只要 m 越大,P(A_m) 的數值,都會越大。

亦即是話,例如,

「(在一次牌都未洗的時候問)洗牌 二千萬 次,起碼一次洗到原本排列 A 的機會率」

會大過

「(在一次牌都未洗的時候問)洗牌 一千萬 次,起碼一次洗到原本排列 A 的機會率」。

.

那樣,如果有無限的時間,容許不停地洗牌,只要在一次牌都未洗的時候,問機會率 P(A_m) 時,把將會洗牌的次數 m 加大某個程度,P(A_m) 就有可能遠離零而接近一。

例如,如果設定次數 m 為一千萬的兩倍,你會發現

P(A_m)
= 1 - (1 - \frac{1}{N})^m
= 1 - (1 - \frac{1}{52!})^{10,000,000 \times 2}
\approx 2.479599861714297185 \times 10^{-61},

大過原本的數值 1.239799930857148592 \times 10^{-61};但是,那仍然是很小。

那樣,你就將 m 設為更大的數值,例如一千萬的一千萬倍(10,000,000 \times 10,000,000):

P(A_m)
= 1 - (1 - \frac{1}{52!})^{10,000,000 \times 10,000,000}
\approx 1.2397999308571485923950342 \times 10^{-54}

雖然 P(A_m) 大了約一千萬倍之多,但是,結果的數值依然是很小。

但是,你也不用完全氣餒,因為,你可以不斷再試,越來越大的 m 數值。再例如,你可以試,一千萬的三次方、一千萬的四次方、一千萬的五次方等,如此類推。

m = 10,000,000^3, P(A_m) = 1 - (1 - \frac{1}{52!})^{10,000,000^3} \approx 1.2398 \times 10^{-47}

m = 10,000,000^4, P(A_m) \approx 1.2398 \times 10^{-40}

m = 10,000,000^8, P(A_m) \approx 1.2398 \times 10^{-12}

m = 10,000,000^9, P(A_m) \approx 0.000012398

m = 10,000,000^{10}, P(A_m) = 0.9999999...

.

你會發現,如果在一次牌都未洗的時候問:

洗牌 10,000,000^{10} 次,起碼一次洗到原本排列 A 的機會率是多少?

答案將會是非常接近一:

P(A_{10,000,000^{10}}) = 0.9999999...

.

(問:你的意思是,即使我洗了(例如)一千萬牌,仍然得不回原本的排列 A,只要我洗多一千萬次,得回 A 的機會,就會大一點?)

.

不是。

正正是為了避免這個誤會,我在以上的論述中,不厭其煩地重複著

如果在一次牌都未洗的時候問…

你留意我剛才所講:

由於,機會率只是與未知的事情有關,或者說,已知的事件,發生的機會率必為 1;所以,如果發生了第一次洗牌,而你又知道其結果的情況下,問「如果再洗一次牌,『是 A』和『不是 A』的機會,分別是多少」,第二次洗牌各個可能結果,發生的機會率,與第一次洗牌的結果無關。

第二次洗牌結果為組合 A 的機會率,仍然是

P(A) = \frac{1}{N}

(N = 52! \approx 8.07 \times 10^{67})

同理:

剛才我們運算過,(在一次牌都未洗的時候問)洗牌 一千萬 次,起碼一次洗到原本排列 A 的機會率是

P(A_{10,000,000})
\approx 1.2398 \times 10^{-61}

如果你在洗完一千萬次牌後,發現原本排列 A 還未重新出現,然後問:

現在開始,再洗多一千萬次牌的話,至少一次洗到原本排列 A 的機會率是多少?

答案仍然會是

P(A_{10,000,000})
\approx 1.2398 \times 10^{-61}

但是,如果你在洗完一千萬次牌後,發現原本排列 A 還未重新出現時,問_另一個_問題的話,答案就會截然不同:

剛才,我洗了一千萬之牌,仍然回不到 A。

我決定,現在開始再洗牌,多不只一千萬次,而是二千萬次牌的話,至少一次洗到原本排列 A 的機會率是多少?

答案將會是

P(A_{20,000,000})
\approx 1.2398 \times 10^{-54}

— Me@2018-02-23 08:21:52 PM

.

.

2018.02.25 Sunday (c) All rights reserved by ACHK

On Lisp

paulgraham_2202_3475946

Lisp is an especially good language for writing extensible programs because it is itself an extensible program.

Because Lisp gives you the freedom to define your own operators, you can mold it into just the language you need. If you’re writing a text-editor, you can turn Lisp into a language for writing text-editors. If you’re writing a CAD program, you can turn Lisp into a language for writing CAD programs. And if you’re not sure yet what kind of program you’re writing, it’s a safe bet to write it in Lisp. Whatever kind of program yours turns out to be, Lisp will, during the writing of it, have evolved into a language for writing that kind of program.

— On Lisp: Advanced Techniques for Common Lisp

— Paul Graham

.

.

2018.02.21 Wednesday ACHK

Problem 14.3b6

Quick Calculation 14.4b | A First Course in String Theory

.

Massive level in the open superstring

Consider the first and second excited levels of the open superstring (\alpha' M^2 = 1 and \alpha' M^2 = 2). List the states in NS sector and the states in the R sector. Confirm that you get the same number of states.

~~~

When \alpha' M^2 = 2, by Equation (14.54), the possible states are

\{ \alpha_{-2}^I, \alpha_{-1}^I \alpha_{-1}^J, d_{-1}^I d_{-1}^J \} | R_a \rangle, || ...

\{ \alpha_{-1}^I d_{-1}^J, d_{-2}^I \} | R_{\bar a} \rangle, || ...

.

For \alpha_{-2}^I | R_a \rangle, the number of states is 8.

For \alpha_{-1}^I \alpha_{-1}^J | R_a \rangle, the number of states is \frac{8 \times 7}{2} + 8 = 36.

For d_{-1}^I d_{-1}^J | R_a \rangle, the number of states is \frac{8 \times 7}{2} = 28.

For \alpha_{-1}^I d_{-1}^J | R_{\bar a} \rangle, the number of states is 8 \times 8 = 64.

For d_{-2}^I | R_{\bar a} \rangle, the number of states is 8.

.

However, since each of a and {\bar a} has 8 possible values, there is an additional multiple of 8.

The total number of states is 8 \left[ 8 + 36 + 28 + 64 + 8 \right].

.

You can check this answer against Equation (14.67):

f_{NS} (x) = \frac{1}{\sqrt{x}} + 8 + 36 \sqrt{x} + 128 x + 402 x \sqrt{x} + 1152 x^2 + ...

— Me@2018.02.20 10:57 AM

.

.

2018.02.20 Tuesday (c) All rights reserved by ACHK

The language of Change 1.2

Energy conservation, 6.2 | Energy 5.2

.

time ~ change

energy ~ the ability of _keeping_ changing

.

constant velocity ~ the amount of an object’s change of position, measured with respect to its observer’s unit of change, is constant

s = \Delta x

v = \frac{s}{\Delta t} = \frac{\Delta x}{\Delta t}

.

kinetic energy ~ the amount of the ability of keeping changing an object’s position

\frac{1}{2} m v^2 ~ the square of (the amount of change of position, relative to the observer’s unit of change)

.

.

Energy difference is _not_ exactly a measurement of the amount of change, time interval is.

— Me@2018-02-20 09:39:30 AM

.

.

2018.02.20 Tuesday (c) All rights reserved by ACHK

潛行凶間 16

Inception 16

這段改編自 2010 年 8 月 13 日的對話。

d_2018_02_18__19_10_12_PM_

這幾個月來,我跟一位來自大學時代的朋友,討論一些較為深刻精采,一般人也不會討論的話題。怎料,《潛行凶間》竟然囊括那些深刻精采話題,之中的一大部分。

在我朋友的同意和鼓勵下,我把那些對話錄了音,再化成文字。那就彷彿是把那些意念,由氣體凝結成液體。怎料,該電影卻把那些意念,再由液體凝固成固體。

我把對話化成文字,莫非都是為了避免,同一堆說話,再講一次。同一堆說話講第二次,並不是一個快樂的過程。有了文字版後,當有其他朋友需要那些意念時,我就可以引述我的文章,從而開發下一個層次的話題。

但是,有了《潛行凶間》這電影後,凡是之中有的意念,我的相關文章,都可以一概置之不理;因為,我只要介紹該電影,給對那些意念,有興趣的朋友就可以。

電影內,有太多超凡的意念,不能一次過講得完。你們可以分開幾次來問我,例如:

1. 清醒夢

1.1 有些人在某些時候,在夢知道自己在發夢,卻又可以保持住,發夢的狀態。

1.2 那些人之中的部分人,在那些清醒夢時候的部分時候,甚至可以控制著,那些夢境的劇情演變。

你有沒有試過,在夢裡面,知道自己在發夢?

(CPK:未。不過,我的姐姐試過。)

我中學時代,有一次清醒夢時,刻意留意一棵樹。

我發現,原來夢中的東西,不只有黑白色。我不單看到,那棵樹的葉是綠色的,而且,還可以見到,那些樹葉中的每一塊。

《潛行凶間》中的意念,你可以假想,有七成是真的。

又例如:

2. 多層夢

有時,明明已經起了床,關掉了鬧鐘;怎料,「明明已經起了床,關掉了鬧鐘」這劇情,只是另一個夢 — 我仍然未醒來。

3. 多重自我

3.1 每一個人,其實有超過一個自我。

3.2 而每一個自我,其實有超過一個層次的意識。

— Me@2018.02.18

.

.

2018.02.18 Sunday (c) All rights reserved by ACHK

Creative constraints

Imagine you were asked to invent something new. It could be whatever you want, made from anything you choose, in any shape or size. That kind of creative freedom sounds so liberating, doesn’t it? Or … does it?

If you’re like most people you’d probably be paralyzed by this task. Why?

Brandon Rodriguez explains how creative constraints actually help drive discovery and innovation.

With each invention, the engineers demonstrated an essential habit of scientific thinking – that solutions must recognize the limitations of current technology in order to advance it.

Understanding constraints guides scientific progress, and what’s true in science is also true in many other fields.

Constraints aren’t the boundaries of creativity, but the foundation of it.

— The power of creative constraints

— Lesson by Brandon Rodriguez

— animation by CUB Animation

— TED-Ed

.

We cannot change anything until we accept it. Condemnation does not liberate, it oppresses.

— Carl Jung

.

.

2018.02.17 Saturday (c) All rights reserved by ACHK

Twelve-step program

A twelve-step program is a set of guiding principles outlining a course of action for recovery from addiction, compulsion, or other behavioral problems. Originally proposed by Alcoholics Anonymous (AA) as a method of recovery from alcoholism, the Twelve Steps were first published in the 1939 book Alcoholics Anonymous: The Story of How More Than One Hundred Men Have Recovered from Alcoholism. The method was adapted and became the foundation of other twelve-step programs.

As summarized by the American Psychological Association, the process involves the following:

– admitting that one _cannot_ control one’s alcoholism, addiction or compulsion;

– recognizing a higher power that can give strength;

– examining past errors with the help of a sponsor (experienced member);

– making amends for these errors;

– learning to live a new life with a new code of behavior;

– helping others who suffer from the same alcoholism, addictions or compulsions.

— Wikipedia on Twelve-step program

.

We cannot change anything until we accept it. Condemnation does not liberate, it oppresses.

— Carl Jung

.

.

2018.02.17 Saturday (c) All rights reserved by ACHK

深淵 2

與魔鬼戰鬥的人,應當小心自己不要成為魔鬼。當你遠遠凝視深淵時,深淵也在凝視你。

— 尼采

.

勇者鬥惡龍,小心勇者變惡龍。

.

As soon as men decide that all means are permitted to fight an evil, then their good becomes indistinguishable from the evil that they set out to destroy.

— Christopher Dawson

.

.

2018.02.16 Friday ACHK

Problem 14.3b5

Quick Calculation 14.4b | A First Course in String Theory

.

Massive level in the open superstring

Consider the first and second excited levels of the open superstring (\alpha' M^2 = 1 and \alpha' M^2 = 2). List the states in NS sector and the states in the R sector. Confirm that you get the same number of states.

~~~

When \alpha' M^2 = 2, by Equation (14.37),

M^2 = \frac{1}{\alpha'} \left( - \frac{1}{2} + N^\perp \right)

N^\perp = \frac{5}{2}

.

\{ b_{-1/2}^I b_{-1/2}^J b_{-1/2}^K b_{-1/2}^L b_{-1/2}^M,

b_{-3/2}^I b_{-1/2}^L b_{-1/2}^M,

b_{-5/2}^I,

\alpha_{-1}^I b_{-1/2}^J b_{-1/2}^K b_{-1/2}^M,

\alpha_{-1}^I b_{-3/2}^J,

\alpha_{-2}^I b_{-1/2}^J,

\alpha_{-1}^I \alpha_{-1}^J b_{-1/2}^K \} |NS \rangle \otimes |p^+, \vec p_T \rangle

.

There are \frac{8 \times 7 \times 6 \times 5 \times 4}{5!} = {8 \choose 5} = 56 states for

\{ b_{-1/2}^I b_{-1/2}^J b_{-1/2}^K b_{-1/2}^L b_{-1/2}^M |NS \rangle \otimes |p^+, \vec p_T \rangle

There are 8 \times \frac{8 \times 7}{2} = 224 states for

\{ b_{-3/2}^I b_{-1/2}^L b_{-1/2}^M \} |NS \rangle \otimes |p^+, \vec p_T \rangle

There are 8 states for

\{ b_{-5/2}^I \} |NS \rangle \otimes |p^+, \vec p_T \rangle

There are 8 \times {8 \choose 3} = 448 states for

\{ \alpha_{-1}^I b_{-1/2}^J b_{-1/2}^K b_{-1/2}^M \} |NS \rangle \otimes |p^+, \vec p_T \rangle

There are 8 \times 8 = 64 states for

\{ \alpha_{-1}^I b_{-3/2}^J \} |NS \rangle \otimes |p^+, \vec p_T \rangle

There are 8 \times 8 = 64 states for

\{ \alpha_{-2}^I b_{-1/2}^J \} |NS \rangle \otimes |p^+, \vec p_T \rangle

There are \left( \frac{8 \times 7}{2!} + 8 \right) \times 8 = 288 states for

\{ \alpha_{-1}^I \alpha_{-1}^J b_{-1/2}^K \} |NS \rangle \otimes |p^+, \vec p_T \rangle

So the total number of states is 56 + 224 + 8 + 448 + 64 + 64 + 288 = 1152.

.

You can check this answer against Equation (14.67):

f_{NS} (x) = \frac{1}{\sqrt{x}} + 8 + 36 \sqrt{x} + 128 x + 402 x \sqrt{x} + 1152 x^2 + ...

— Me@2018-02-16 03:22:13 PM

.

.

2018.02.16 Friday (c) All rights reserved by ACHK

The language of Change

Energy conservation, 6 | Energy 5

.

time ~ change

energy ~ the ability of causing change

Assuming

1. a system of one single particle

2. has only kinetic energy

3. and that kinetic energy is conserved.

conservation of energy ~ an object’s potential amount of change of position, measured with respect to its observer’s unit of change, is constant

s = \Delta x

v = \frac{s}{\Delta t} = \frac{\Delta x}{\Delta t}

— Me@2018-02-15 02:21:20 PM

.

Note:

The above argument has a bug:

If the mass m is constant, the kinetic energy E_K should be proportional to velocity squared v^2, instead of velocity v.

E_K = \frac{1}{2} m v^2

.

However, the above argument is still technically correct:

When E_K is constant, v^2 is constant. In turn, the magnitude of v also remains unchanged.

— Me@2018-02-19 09:37:24 PM

.

.

2018.02.15 Thursday (c) All rights reserved by ACHK

機遇再生論 1.6

.

所以,「同情地理解」,亦可稱為「意念淘金術」。

機遇再生論,可以同情地理解為,有以下的意思:

(而這個意思,亦在「機遇再生論」的原文中,用作其理據。)

假設,你現在手中,有一副樸克牌,存在於某一個排列 A 。洗牌一次之後,排列仍然是 A 的機會極微。

一副完整的撲克牌,共有 N = 52! \approx 8.07 \times 10^{67} 個,可能的排列。亦即是話,洗牌後仍然是排列 A 的機會率,只有 \frac{1}{N}

由於分母 N 太大(相當於 8 之後,還有 67 個位),洗牌後,理應變成另外一個排列 B 。

P(A) = \frac{1}{N}

P(\text{not} A) = 1 - \frac{1}{N}

洗了一次牌後,發覺排列是 B 不是 A 後,我們可以再問,如果再洗一次牌,「是 A」和「不是 A」的機會,分別是多少?

.

由於,機會率只是與未知的事情有關,或者說,已知的事件,發生的機會率必為 1;所以,如果發生了第一次洗牌,而你又知道其結果的情況下,問「如果再洗一次牌,『是 A』和『不是 A』的機會,分別是多少」,第二次洗牌各個可能結果,發生的機會率,與第一次洗牌的結果無關。

第二次洗牌結果為組合 A 的機會率,仍然是

P(A) = \frac{1}{N}

不是組合 A 的機會率,仍然是

P(\text{not} A) = 1 - \frac{1}{N}

.

(問:那樣,為什麼要問多一次呢?)

我是想釐清,我真正想問的是,並不是這個問題,而是另一個:

如果在第一次洗牌之前,亦即是話,一次牌都未洗的話,問:

「如果洗牌兩次,起碼一次洗到原本排列 A 的機會率是多少?」

把該事件標示為 A_2

A_2 = 兩次洗牌的結果,起碼一次洗到原本排列 A

再把該事件的機會率,標示為 P(A_2)

由於 P(A_2) 相對麻煩,我們可以先行運算其「互補事件」的機會率。

A_2 的互補事件為「不是 A_2」:

不是 A_2

= 兩次洗牌的結果,不是起碼一次洗到原本排列 A

= 兩次洗牌的結果,都不是排列 A

其機會率為

P(\text{not} A_2) = (1 - \frac{1}{N})^2

那樣,我們就可推斷,

P(A_2)
= 1 - P(\text{not} A_2)
= 1 - (1 - \frac{1}{N})^2

.

同理,在一次牌都未洗的時候,問:

如果洗牌 m 次,起碼一次洗到原本排列 A 的機會率是多少?

答案將會是

P(A_m)= 1 - (1 - \frac{1}{N})^m

留意,N = 52! \approx 8.07 \times 10^{67},非常之大,導致 (1 - \frac{1}{N}) 極端接近 1。在一般情況,m 的數值還是正常時, P(A_m) 會仍然極端接近 0。

例如,你將會連續洗一千萬次牌(m = 10,000,000),起碼有一次,回到原本排列 A 的機會是:

P(A_m)
= 1 - (1 - \frac{1}{N})^m
= 1 - (1 - \frac{1}{52!})^{10,000,000}

你用一般手提計算機的話,它會給你 0。你用電腦的話,它會給你

1.239799930857148592 \times 10^{-61}

— Me@2018-01-25 12:38:39 PM

.

.

2018.02.13 Tuesday (c) All rights reserved by ACHK