Monday, December 17, 2007

Lý thuyết của các Lý thuyết!

Ê hê, mình thích khoa học từ bé, nên đã sớm đụng đến cái "khoa học của các khoa học" là Triết học. Ấy vậy, tuy nghiên cứu lý thuyết cũng khá lâu rồi mà mình không biết đến cái gọi là "lý thuyết của các hệ thống lý thuyết"!

Chẹp chẹp... dạo này nghiên cứu lý thuyết "nặng" quá (formal methods), nên mặc dù không muốn cũng vẫn phải rờ tới cái tên Lô-gíc! Hôm trước vừa mới nêu ra "Tiên đề Phân biệt", thế mà không ngờ ngay hôm sau đã bắt gặp cái món "Lô-gíc Trực giác"(Intuitionistic logic) không chấp nhận "luật phủ định giá trị thứ ba". Tuy nhiên, mình thấy đây cũng không hẳn là cái mình muốn. Eo ơi, đụng đến lô-gíc thì có đủ loại lô-gíc, thiệt là kham hỏng nổi!

Hờ, dẫu sao thì mình cũng có vẻ là người của chủ nghĩa xây dựng (Constructivism)...

Friday, November 30, 2007

The Implied Axioms of Science

When a child and first time heard of "logic", I was so amazed, and somehow amused, by the way they use only 2 values TRUE/FALSE; and later by the 2 values ZERO/ONE in computing, too. "How can it be?", I wondered. Why is any thing must either true or false? Why can't they be somehow-true-somehow-false, like "30% true"? Why don't we do computation with real numbers like 1.2315, but only with 0 and 1? When studied about the Theory of Computation and first met the Diangonal Argument, I was surprised about its strength, but soon get more surprised with the way Cantor choosed an element out of an arbitrary set! I thought that if we donot know the underlying structure, or if we cannot assign any structure to a set, how can we "pick something up" from that set, while a set is simply a "bag" and no more.
➠ Axiom of Choice
Cannot be satisfied with the simple explaination "Because we defined it, we can choose something from it!", I've searched for the definition of set. The rationale of my dissatisfaction is that if we can choose, then other actions like sorting must be able, but no one allows that, they just give a special allowance to the "choosing" action! Then, at last I've found that the "right to choose" is no more than an axiom! People accept it just because they feel it axiomatic!
➟ Axiom of Separation
Even though there is no axiomatic system for the whole science, but for science to be "clear" and "precise", all scientists presume that "A" and "not A" are always distinct, i.e. we can always separate things into one side and the other side. It sounds self-evident, but if we kick the word "of course" out of our mind, we can see that this separation is no more than an axiom.

Saturday, July 14, 2007

Simple Vs Complex

There are some things look simple but actually very complex, some problems can be simply stated but so complicated to be solved, some games have simple rules and equipment but no simple way to win ;)

Long time ago, when first meeting Chaos, I have had a great impression on the "Fishes in pond" problem; Now, more admiration has been rised in me when I met the Conway's Game of Life and the Go game!

  • Simple forumlae Vs Chaotic results: Logistic map is a very simple model of "Population of fishes in a pond" which is based on only 2 factors
    (1) Reproduction: next year's population ~ this year's population, and
    (2) Starvation: next year's population ~ (pond's limit - this year's population)
    but results in a fantastic chaos!

  • Simple rule set Vs Universal behavior: Conway's Game of Life is a very simple model of "Living population" which is defined by only 4 trivial rules
    (1) Survival: One cell will continue to live if there are 2 or 3 living neighbour cells,
    (2,3) Death: One cell will die if there is less than 2 or more than 3 living neighbour cells (because of isolation/overpopulation), and
    (4) Birth: One cell will be born in an empty square if that square is surrounded by exactly 3 living cells.

    However, with appropriate initial seeds, this population can grow and form various types of "living body". Moreover, this "cellular automaton" is equally powerful as a (2D-tape) Turing machine, thus universal!

  • Simple games Vs Intractable solutions: Go, 圍棋/囲碁, literally "encirclement chess", is one of the oldest board game on earth which is equipped with only a board with many stones of black and white. The play rules are simply about how to "surround the opponent's stones to capture them", which you can learn in minutes, but knowing the rules is nothing about knowing how to play! After a few trials, you will soon discover that there are countless patterns and strategies for players to learn, that the shape of stones on the board is so chaotic and ever-changing, 千変万化, "thiên biến vạn hoá"!!! Moreover, the philosophy of Go is about the whole universe, about the life and death, is about the endless force of the empty, is that "everything is generated from the nothing!" This game, Go, is far more difficult than the common Chess as well as other similar chesses(Xiangqi/象棋, Shogi/将棋):

    - "While the strongest computer chess software has defeated top players (Deep Blue beat the world champion in 1997), the best Go programs routinely lose to talented children." - Wikipedia
    - "While the Baroque rules of Chess could only have been created by humans, the rules of Go are so elegant, organic, and rigorously logical that if intelligent life forms exist elsewhere in the universe, they almost certainly play Go." - Edward Lasker

    This game is actually "A few moments to learn, a lifetime to master!" (Chinese proverb)

Tuesday, April 24, 2007

Led or El-ee-dee? Star or Asterisk?

GUI / G-U-I
LED / L-E-D
char / kar
SeQueL / S-Q-L
.PiNG / .-p-n-g
.wav / (.-w-a-v)
... / ...?

Which spellings are correct? It depends on your society: While Americans spell GUI /gui/, Japaneses spell /dʒi-ju-ai/; While Vietnameses spell LED /led/, Americans spell /el-i-di/; While Vietnameses in general and I in particular and also some Americans spell Char(type) /tʃar/, some others spell /kar/; And so on...

Not only abbreviations, but the symbols(marks) under your fingertips (on your keyboard) are also spelled in many different ways:

Table of Spellings of Symbols on Computer Keyboard
Notes:

SPACE, blank, ghost+
(Khoảng) cách, khoảng trống, khoảng trắng

!
EXCLAMATION MARK, wow+, hey+, bang+, boing+
Chấm than, chấm cảm, chấm nhểu

"
double quote, QUOTATION MARK, dirk+, literal mark+, rabbit ears+
Nháy kép, nháy nháy, ngoặc kép

#
NUMBER SIGN, sharp, (garden) fence, hash+, mesh+, CROSSHATCH, mask, pig-pen, pound sign
Thăng, rào

$
DOLLAR SIGN, buck, milreis+, escudo+
Đô-la

%
PERCENT SIGN, mod+
Phần trăm

&
and, AMPERSAND, andpersand, snowman+


'
QUOTE, single quote, APOSTROPHE, tick, prime, irk+, pop+, spark, glitch+
Nháy (đơn), ngoặc đơn

()
PARENTHESES, parens, round brackets, bananas+, ears+, bowlegs+
Ngoặc (tròn)

(
open paren, LEFT PARENTHESIS, parenthesee+, sad+
Mở ngoặc (tròn)

)
close paren, RIGHT PARENTHESIS, unparenthesee+, already+, wax+, happy+
Đóng ngoặc (tròn)

*
star, ASTERISK, splat+, spider+
Sao, hoa thị

+
PLUS SIGN, plus, add, cross+
Cộng

,
COMMA, tail+
Phẩy, phết

-
MINUS (sign), HYPHEN, dash, negative (sign), worm+
Trừ, gạch ngang, gạch nối

.
dot, PERIOD, spot, full stop
Chấm

/
SLASH, stroke, over, slant+, SOLIDUS+, diagonal+, slat+, slak+
Xuyệc, xược, Xẹt, (gạch) chéo

:
COLON, two-spot, double dot
Hai chấm

;
SEMICOLON, semi, hybrid+
Chấm phẩy, chấm phết

<>
ANGLE BRACKETS, pointy brackets, angles, widgets+, funnels+, brokets+
Ngoặc nhọn

<
LESS-THAN SIGN, open angle (bracket), open tag
Nhỏ (hơn), Mở ngoặc nhọn

>
GREATER-THAN SIGN, close angle (bracket), close tag
Lớn (hơn), Đóng ngoặc nhọn

=
EQUAL SIGN, equal(s)
Bằng

?
QUESTION MARK, whatmark, hook, query+, huh+
(Chấm) hỏi

@
AT SIGN, at, COMMERCIAL AT, whirl, whirlpool, vortex+, cyclone+, snail+, cat+, monkey (tail)+, each+
A vòng, a còng, a móc, a thương mại

[]
BRACKETS, SQUARE BRACKETS, U-turns+, edged parentheses+
Ngoặc vuông

[
LEFT BRACKET, LEFT SQUARE (BRACKET), bracket, bra+
Mở (ngoặc) vuông

]
RIGHT BRACKET, RIGHT SQUARE (BRACKET), unbracket, ket+
Đóng (ngoặc) vuông

\
BACKSLASH, backslant, backwhack+, backslat+, REVERSE SOLIDUS+, reversed virgule+, bash+
Xuyệc ngược, xược ngược, xẹt ngược, sổ ngược, chéo ngược

^
(top)hat, cap, uphat, CIRCUMFLEX (ACCENT), party hat, housetop+, caret, carrot+, hiccup+
, Ô

_
underline, underbar, UNDERSCORE, LOW LINE, flatworm+
Gạch dưới

`
backquote, backprime, GRAVE (ACCENT), unapostrophe, backspark+, birk+, blugle+, backtick, push+, backglitch+, backping+
Huyền, nháy ngược

{}
BRACES, curly braces, squiggly braces+, CURLY BRACKETS, squiggle brackets+
Ngoặc móc

{
LEFT BRACE, LEFT/OPEN CURLY BRACKET, leftit+, embrace+, openbrace
Mở (ngoặc) móc

}
RIGHT BRACE, RIGHT/CLOSE CURLY BRACKET, rytit+, unbrace+, uncurly+, bracelet+
Đóng (ngoặc) móc

|
VERTICAL BAR/LINE, tube, whack+, gutter+, wall+
Gạch đứng

~
TILDE, wave, twiddle, tilda+, tildee+, squiggle+, swung dash+
Ngã, sóng

Monday, April 09, 2007

"Cái USB" ?!

"Cái USB", bạn đã từng nghe hoặc dùng từ này hay chưa? Nó được dùng để chỉ cái... thẻ nhớ con con được cắm vào máy tính qua cổng USB đấy :D

Thật là nực cười khi hầu hết các thiết bị ngoại vi trong hệ thống máy tính của tôi đều được liên kết với máy tính qua cổng USB (thẻ nhớ flash, đĩa cứng ngoài, con chuột, bàn phím, máy in, webcam,...), mà "cái USB" lại chỉ để chỉ có mỗi một cái thẻ nhớ thôi! USB(Universal Serial Bus) vốn là một đường truyền vạn năng (universal) bỗng nhiên lại trở thành... cái thẻ nhớ!

Hẳn không phải là không có lý do để người ta gọi tên sai lầm lệch lạc như thế. Vốn là từ đầu, thẻ flash là thiết bị ngoại vi đầu tiên nối kết với máy tính qua cổng USB, và có lẽ bây giờ ở Việt Nam, đó vẫn là thiết bị USB phổ biến nhất, nên người dân thường, người ngoại đạo vẫn thường "thấy sao gọi vậy". Tuy nhiên, tệ hại hơn nữa là kể cả dân IT, cũng có nhiều người dù biết USB là gì nhưng vẫn cứ vô tình/cố ý gán oan cho nó vào "cái USB"!

- USB: Ôi, oan uổng quá đi thôi! Sao một kẻ vạn năng như ta lại có thể bị gán vào một thằng thẻ nhớ nhỏ nhặt đó được!???
- "Cái USB": Này anh USB, đừng phỉ báng tôi như thế nhé! Đấy là tên gọi quen thuộc nhất của tôi đối với mọi người ở VN đấy. Mà cho dù anh có "vạn năng" hay không thì dân tình cũng có biết gì khác đến anh ngoài việc dùng để cắm "cái USB" này đâu :P

Sunday, January 07, 2007

Số Lớn...

Này, đố bạn hai số lớn sau:
1) "Hằng hà sa số"(恒河沙數) là số mấy, viết theo công thức toán học?
2) Số 1010100 được gọi là gì (từ Âu-Mỹ)?

Trong tiếng Việt, có thể mọi người đã quen dùng "hằng hà sa số" như "muôn vạn" với nghĩa là vô số, mà không mấy ai chú ý dịch nghĩa của từng chữ. Nếu chú ý một tí, ta dễ dàng thấy rằng "Hằng hà" là sông Hằng (Ấn Độ) và "sa số" là số (hạt) cát ("sa" như trong "phù sa", "sa mạc"), nên "Hằng hà sa số" dịch nguyên văn ra là "số cát sông Hằng" vậy! Theo Phật giáo du nhập vào Trung Hoa, từ này còn được dùng để chỉ số 1052 trong hệ thống số lớn tính theo vạn(104) được sử dụng tại Trung Quốc, Nhật Bản, Triều Tiên. Trong hệ thống này, các bội số được tính theo cơ số vạn: vạn = 104, ức = 108 = vạn2, triệu = 1012 = vạn3,... hằng hà sa = 1052 = vạn13.

Ở phương Đông có con số dài đến tận 53 chữ số không, tưởng đã là quá dư thừa, thế mà phương Tây lại còn có con số dài đến độ nếu viết ra thì số chữ số không của nó cả vũ trụ này cũng không thể chứa nổi... 10100 chữ số không! Trên internet, hẳn bạn phải biết đến bác Gú-gồ(Google), và cũng có thể nghe nói đến con số googol có tới 100 chữ số không,... nhưng chắc chưa biết đến con số googolplex = 10googol = 1010100 :D

Saturday, January 06, 2007

Interesting Stuffs about Primes


  • A beautiful prime visualization


    Thanks to Wikipedia, I've just accidentally found the "Number Spiral" view of the primes. It is much more beautiful than my view on the complex plane.

  • Illegal Primes


    Have you known DeCSS? You must know it if you have ever RIPped a DVD :D! If have never heard, you should try this cool stuff whenever you want to watch a DVD bought from Vietnam (region #3) in US(region #1), or to watch a DVD bought from US in Japan(region #2) as I used to do. The DeCSS algorithm is so favourite that people(not only rippers) around the world have contributed lots of representations of that stuff. Among them, there's a type of genuine mathematical representation, the prime number. You can extract the C code of the DeCSS program efdtt.c in 8-bit ASCII encoding from the 1045-digit prime 207401646065301...7791512957, or in 7-bit ASCII from the 914-digit prime 94547005113906...0843081469! You can even get the executable version of that program by converting the 1811-digit prime 49310835970...5452543537 into binary form, then pass a CSS-encripted .VOB file by this program, and receive the deCSSed version of that .VOB!
    These numbers have made the first illegal primes in the world.


__________________________________
Attachments:

/*
* File name : efdtt.c
* Author : Charles M. Hannum
* Thanks to Phil Carmody
* for additional tweaks.
* Original Length: 434 bytes (excluding tables and unnecessary newlines)
* Usage : cat title-key scrambled.vob | efdtt >clear.vob
* Reform : Le Xuan Dinh
* (inserted new-lines, spaces, and tabs)
*
*/

#define a(f) (i[f]^l[f+84])<<

unsigned char i[5], l[2048], m;

main(n)
{
for( read(0,i,5); read(0,l,n=2048); write(1,l,n) )
if(l[m=l[13]%8+20]/16%4 == 1)
{
int
p = a(1)17^256 + a(0)8,
q = a(2)0,
r = a(4)17^a(3)9^q*2 - q%8^8,
u = 0,
w = 26;
for( l[m]-=16; --w; r*=2 )
u = u*2^p&1,
p = p/2^r&1<<24;
for( r=127; ++rm )
w += m=p^p/8^p>>4^p>>12,
p = p>>8^m<<17,
u ^= u>>14,
m = u^u*8^u<<6,
u = u>>8^m<<9,
q = l[r],
q = "7Wo~'G_\216"[q&7] + 2^"cr3sfw6v;*k+>/n."[q>>4]*2^q*257/8,
l[r] = q^(q&q*2&34)*6^w + ~m;
}
}