Monday, January 11, 2010

0 & 1

Natural number is for counting. Long time ago, people didn't count nothing. So there is no concept of zero. George Gamow wrote a famous book “1, 2, 3…Infinity”. He said our ancestors used to count 1, 2 & 3. If it was more than 3, it was many and definitely no concept of 0. But when we have 4 birds and sold 2, we have 2 left. How many are left when we sell the final 2? We will say I don’t have any, I don’t count. But that is just awkward. We can say we own nothing & call nothing 0(ZERO). So finally we have 0 left. Natural number can have 0 or not depending on whom you talk to. But it seems the natural number is not so natural after all. The counting of year in the human civilization has been a mess. The lack of concept 0 & its notation led to confusion. People think it is natural to count from 1. After all, why is there a need to count nothing? This creates no problem when we count things that are not divisible like men. For example, if every man own 10 beads, ten men will have 10x10=100 beads. But when we count thing that is divisible like year (divisible to days), we encounter something awkward. In second year (year 2), we try to count how many days passed from the beginning of year 1 when the day is February 1. We have to calculate with (2-1) x 365 + 31. But what happen if it is the first year we try to calculate? We get (1-1) x 365 + 31. Here (1-1) is a concept of zero but we just don’t have the notation 0 to represent it. Without the concept of 0 also led to the absence of AD 0 in Christian Calendar. So the years between 1 BC & AD 1 is not 1-(-1) = 2, but only 1. If Chinese people count the year starting from 黃帝, 2697 BC, the conversion of 2010 is 2010-(-2697)=4707. But 2010 BC will be -2010-(-2697) + 1= 687+1= 688, assuming the first Chinese year is year 1. The reason of this discrepancy is the gap between 1 BC & 1 AD, Zero. This kind of awkwardness happens often. For example, we count day 1 of the week, 星期一…六 and on Sunday, we call it 日. Subconsciously, it means 0 and we call the starting day of the week 星期日 (Sunday). So 星期一 of the week is actually not the first day of the week. Subconsciously people treat 星期日 as 星期零 (not 星期七). The way we count the age went through the same confusion. Chinese count the infant age 1 when it is born. Eventually they found the problem & called it 虛歲. The notation of the counting without 0 is 1, 2,…,10. The last number 10 is unnatural since it uses digit 0 after 1 & it contains 2 digits. What is the definition of Decade, Century & Millennium? Since there is no zero, you have to define a decade from 1 to 10, a century 1 to 100 & millennium from 1 to 1000. But what happened to the world when Millennium came several years ago? To aggravate the situation, the so-called Y2K problem played havoc to the computer world. What was the reason behind all these problems? Just look at the number from 1999 to 2000. There are four digits that flip. But from 2000 to 2001, there is only one digit flips. It is the counting without 0! There were two camps of people in celebrating Millennium, one for 2000 & one for 2001. Since there is no 0 AD, the new millennium must be 2001. Guess what? Most people went ahead to celebrate on 1/1/2000, the last year of the old millennium, not the beginning of the new millennium. Why caused the shift? People already get used to the concept of zero in counting. Also it is just awkward to count 1001 to 2000 as a millennium. So now we have an embarrassing situation, the first millennium is from 1 to 999, only 999 years. The third millennium is from 2000 to 2999, a perfect 1000 years. This year is 2010, it is the beginning of a new decade, not the last year of the old decade.

The dawning of the computer age creates the necessity of programming languages. In digital world we use 2, 8 or 16 base system ie binary, octal & hex base system. We all order the digits starting from 0. Here we skip the 4 base system since we think it is trivial. As a matter of fact, this is what our ancestors used, 1,2,3…Infinity. 0,1,2,3 are the 4 digits for the 4-based system. All computers count from 0 to the last digit of the base & wrap around to 10. Zero is the lowest unsigned integer value, one of the most fundamental types in programming and hardware design. In computer science, zero is thus often used as the base case for many kinds of numerical recursions. Proofs and other sorts of mathematical reasoning in computer science often begin with zero. For these reasons, in computer science it is not unusual to number from zero rather than one. There have been so many kinds of languages like car companies in the early 20th century. Eventually it settles down to just a few and C language becomes the most popular one used in the software industry. The most powerful feature in C is the Pointer. It is basically a kind of Array Indexing. All indexing in C starts from 0. You define Array[40], but can only use Array[0..39]. If you get out of bound, the compiler will flag it as an error. It becomes very natural for most programmers to think things starting from 0 instead of 1. It is ironical that most hardware engineers don’t like C language. They rather like to use BASIC in their work. I know some principal engineers hate C language just because they never really feel comfortable or grasp the zero-based indexing, especially the concept of Pointers.

The indivisibility of 0 is another subject warrants separate discussion. It is interesting to note that 0 & infinity form two ends of the counting scale, one left, one right. It is not surprising that indivisibility of 0 relates to the infinity. Without the concept of zero & infinity, there will be no concept of Limit & so there will be no Calculus. Zero & Infinity are two pillars that lead to the Limit & Calculus which make our world a much better place to live.

PS0: One of the most natural number is e. When e is expressed in infinite series, it starts from index 0:
Summation of 1/n!(n=0…infinity). It is the same in sin(x) & cos(x) & Taylor series.

PS1: Some time ago (1971) when a group of philosophers tried to celebrate the 2,400th birthday of Plato (428 BC-348 BC). They got the problem as they couldn't get the consensus as to pick 1971 or 1972 for celebration. Logically, it should be 1972, not 1971 since there is no AD 0.

PS2: We have 元年, 元旦 or 正月. It sounds as if people vaguely have the concept of 0 & try to distinguish it from 1.

PS3: Have you ever heard of "雙簧管效應"? It is called "OBOE", ie Offset By One Error. This happens very often in our life, for example 植樹問題, year counting (19xx as 20th century), column count in a building & Loop index error that crashes computers.

2 comments:

Mark Lin said...

I posted this article on January 11, 2010 on Monday. It can be dated as 01/11/10 (01) & sure looks like a binary date. I could only count 0 & 1 on that day & it started from 0.

Mark Lin said...

Most people think 0 is a peculiar number. Here is one example.

Let x = 7, then
x*x = 7x, then
x*x - 49 = 7x - 49, then
(x+7)(x-7) = 7(x-7), then
x+7 = 7, then
x = 0
Since x = 7 from the beginning, so 7 = 0

Using the same method, it can be shown that any number N(1,2,3...) = 0.

No wonder, our ancestors avoided 0 like plague.