Wednesday, December 06, 2006

Programmer's Almanac: Dec 8, 2006

On this day, in 1931, the "birth" of broadband took place: The patent for the co-axial cable was granted to Lloyd Espenschied and Herman Affel of AT&T. Originally used for the development of the first television systems, the "coax" cable was in use long before "wireless" over-the-air programming. In the 1970's, coax was used in the first implementations of Ethernet. Today many of us enjoy the power of broadband in our homes because the "last" mile comes over this magic wire from our cable providers, along with MTV and ESPN.

And also on this day in 1865, Frenchman, mathematician and prime number specialist Jacques Hadamard was born. His proof of the prime number theorem helps us understand the distribution of prime numbers.

In Hadamard's day, it wasn't uncommon for mathematicians to own tables of prime numbers - created by hand. One table even had all the primes up to 100,330,200. There were nearly 6 million numbers in that list. Today, you can see the first 5,800,000 primes online. Jacques Hadamard is probably rolling over in his grave.

Below is a short c-program for finding primes (87 characters). It is notable for being easier than the "old fashioned way":

*v;main(a,b){for(v=1[v=b]?atoi(v[--a]):99;
a%++b%a||(a^b||printf("%d\n",a),b=a++

Luckily for us, the theoretical studies of prime numbers in the 19th century serve a useful purpose in the Internet Age: The difficulty of factoring very large primes is the basis for most modern encryption algorithms. Encryption lets you securely view your bank's Web site over safe HTTPS protocol -- on fast coaxial cable connections to the Internet.

(c) 2006, Jorge Monasterio

No comments: