Thursday, May 24, 2007

Algorithm proof by mathematical induction.

In analysis of algorithms, we learned a technique similar to mathmatical induction whereby the algorithm is shown that if it is true for case N, it is true for case N+1. Then, it is shown to be true for some specific case.

There is a weakness in this method. Because computer programs are supposed to have a start and stop case and not be running infinitely, these cases must also be examined, individually, so, in addition to the proof in the first paragraph, we must also demonstrate that the algorithm handles the first case and the last case.

There is another special case that messes up many computer programmers: the zeroth case, i.e., the case where there are no records to process. Many programmers assume there will be an input, so their programs do stupid things, such as initialize counters at 1, rather than initializing at zero and allowing an increment only when the input actually happens.

Wednesday, May 23, 2007


I have most of my good thoughts in the shower. After toweling dry, I frequently forget what I thought. Today, however, I remember, and the topic was good enough to blog about.

It is about time. No, I mean, it is about the topic, Time.

In the Bible we learn that before Time began, God already was. And we also learn that, "Time shall be no more."

This means that time has a beginning, and time will have an end.

In science, we typically assume that time extends from minus infinity to plus infinity, i.e., it has no beginning and no end. But the Bible says God has that attribute, not time.

This means that some of our scientific thinking needs to be challenged, especially those things with a time component.

Take "C" for instance. C is supposedly a constant, the speed of light in a vacuum. But C is given in terms of time, e.g., meters per second or miles per hour.

The next major paradigm shift in science will come when it is recognized that time is not a continuous function. E = mC^2 will need to be changed to E = mC(t)^2, where C(t) is a function/variable, depending on time, and not a constant.

If time is not a continuous function (because it doesn't go to minus infinity and doesn't go to plus infinity), many formulae will need to be reconsidered. Many things that depend on rates will need to be reevaluated. For example, take radioactive decay. What happens if we try to extrapolate a time line based upon an "inifinite time" assumption vs a "beginning/ending time" assumption?

Then, I got out of the shower.