Contents    Page-10    Prev    Next    Page+10    Index   

Log n Grows Slowly

The function log(n) grows so slowly that it can almost be considered to be the same as 1.

A good rule: log2(1000) ≈ 10, since 210 = 1024.

         10 bits 3 decimal digits.         

n log2(n)
students in CS 314 240 8
students at UT 50,000 16
people in US 300,000,000 28
people on earth 7,000,000,000 33
national debt 19,500,000,000,000 45
Library of Congress, bytes 20*1012 45
earth surface area, mm2 5*1020 69
atoms in universe 1080 266

Thus, we can say that log2(n) < 300 for any problem that we are likely to see. If we simply wrote 300 instead of log2(n), our rule tells us to eliminate the constant 300.