19 March 2010

Adding is in Nature’s definition

Below is one of the funniest and at the same time saddest course descriptions I ever saw.

As an undergrad, I took a course of Tudor Niculiu. I believe the course was supposed to be on OOP, but the lectures gave us some sort of introduction to philosophy. Luckily, there was no exam—we just had to write a small C++ program. Then we had to print the program (poor trees!) and go to an oral examination where the lecturer wanted to see, apparently, if we have any idea about how the program works.

A colleague once told me that "Niculiu used to be normal, but then he had an accident that affected his brain." If that's true, then it is quite sad. In any case, I have trouble understanding how someone who describes his course as follows is allowed to teach in what is supposed to be one of the best colleges in Romania.

Algorithms and Data Structures:

Adding is in Nature’s definition. However, the inverse operation, subtraction, needs negative numbers. We close mathematically the Nature to an integer that opens the physics for recognizing the limits of the Reason - electrons, in the meanwhile, attracting marvelous engineering solutions for different technologies. Electronics is among the most advanced engineering sciences; therefore, it has to be practiced by the most conscient human beings. Recurrent addition is multiplication, a most important parameter for the Nature. Mathematics closes the integers to the multiplication inverse, defining the rational numbers. These are not more than the naturals, but we can do many useful things with the Reason, from strategy to computer. So "what else do we need?" say too many, forgetting that the limits of the, so-called, pure Reason are caused by the fact that it bounds itself to close the Adaptability to discrete/ sequential operations. Thanks God, neither mathematicians, nor physicists accept all-happiness. They discover in three ways - order, algebra, analysis - which assisted all of them to think together, the power of continuum and that of the patience. In this context, “mathematicians and physicists” means the theorem, natural laws, or even new approach discoverers, and more, the engineers that understand the essential of mathematics and of physics.

To his credit, in the first part there's a glimmer of the (nice!) axiomatic way of defining numbers.

17 March 2010

Typesetting Inequalities

These are two puzzles I arrived at while working on my PhD thesis. I know the answers but not because I derived them. I think both puzzles are quite hard. Have fun!

Typesetting. As you know from a previous post, ViM doesn’t handle paragraph reformatting very well in LATEX, so I wrote a small tool. Given word lengths l1l2, …, ln we want to insert line breaks such that (1) no line is longer than l and (2) the shortest line is as long as possible. Here’s the challenge: do it in O(n) time.

Inequality. Show that the following inequality has no solution in non-negative reals (or integers if you prefer).

PS: I know the answers because of 11011110 and, respectively, geomblog.

02 March 2010

TeX text files

Questions for those who use LaTeX by editing text files (as opposed to those who use a WYSIWYG editor like LyX).

Do you use the line wrapping feature in your editor and keep each paragraph on one line or do you usually put paragraphs on multiple lines? If the latter is true then how do you maintain the lines so they aren't too long or too short? Manually or automatically? If automatically, then do you use a program like par, a feature of your editor, or something else? If you use par, then how do you keep it from messing things like \begin {equation}…\end{equation} and \begin {verbatim}…\end{verbatim}? (The latter is in a paragraph of its own, but the former usually not.)