B+-Trees

During a conversation with a friend, I said something worth writing:

“The B+-tree is the programming analogue of the Clementi sonatinas: not too difficult to implement, but very fun nevertheless.”

Applications

If one more person asks me why my work on the divisor function is applicable, I am going to scream! I’ve been mentioning Robin’s Theorem (proving a bound on the divisor function is equivalent to proving the Riemann Hypothesis) as an example of what can be done with this, but that is not why I did this research.

If Dali had to justify his paintings to the powerful, we would not have “The Persistence of Memory”. If Beethoven had to justify his works to the elite, we would not have the Moonlight Sonata. The simple act of expression is a reflection of the beauty in the soul.

It is the same with mathematics. I don’t know how significant my result is (though I am sure that it is at least novel and suspect that it has a moderate degree of significance… probably not enough to prove the Riemann Hypothesis), and probably never will due to society’s refusal to accommodate my wish to pursue multidisciplinary training, but I don’t care, because I’ve effectively reduced the amortized time complexity of calculating the divisor function for sequentially-increasing values to O(n) (calculating it the old-fashioned way, by multiplying over the primes, is polynomial) in a most elegant way.

That suffices for me. If it doesn’t suffice for you, I’d say you are, mathematically, at a handicap against those with an innate sense of mathematical beauty. At the very least, you’ll lack the passion that we have.

Oh, and this doesn’t only apply to math. If you only concentrate on application, a whole world of beauty is closed to you.

Matlab with CGI

If you call Matlab from, say, Perl, and it segfaults on startup with this message, please note that you must set the HOME environment variable, as Matlab requires a home directory. I used /tmp, but feel free to set it to whatever accessible directory you wish. It took me nearly 2 hours to figure this out, so I am posting this in the hope that it will save others from repeating this.
< M A T L A B >
Copyright 1984-2005 The MathWorks, Inc.
Version 7.0.4.352 (R14) Service Pack 2
January 29, 2005

————————————————————————
Segmentation violation detected at Wed Jul 25 13:37:45 2007
————————————————————————

Configuration:
MATLAB Version:   7.0.4.352 (R14) Service Pack 2
MATLAB License:   213660
Operating System: Linux 2.6.8-1.521smp #1 SMP Mon Aug 16 09:32:47 EDT 2004 x86_64
Window System:    No active display
Current Visual:   None
Virtual Machine:  Java is not enabled
Default Charset:  US-ASCII

Register State:
rax = 0000000000000000   rbx = 0000000000000001
rcx = 0000000000000000   rdx = 0000002a959cf9a0
rbp = 0000007fbfffbdf0   rsi = 0000000000000000
rdi = 0000000000000000   rsp = 0000007fbfffbdb8
r8 = fefefefefefefeff    r9 = 0000002a96c8cb50
r10 = 0000000000000001   r11 = 0000002a9593ccb0
r12 = 0000000000000000   r13 = 0000007fbfffcf50
r14 = 0000002a95af70e0   r15 = 0000002a959cf9a0
rip = 0000002a96bfe790   flg = 0000000000010246

Stack Trace:
[0] libc.so.6:strlen~(0x7fbfffcfa0, 0x2a95c4ffa5, 0, 0) + 48 bytes
[1] libmwservices.so:svGetToolboxCacheFile(0, 0, 0, 0) + 31 bytes
[2] libmwbridge.so:mnRunLoginScript()(0x7fbfffd008, 0x00590420, 0x7fbfffd170, 0x2a95d7d61b) + 549 bytes
[3] libmwbridge.so:mnRunPathDependentInitialization()(0, 0x004015a0, 0, 0x7fbfffd1b9) + 28 bytes
[4] libmwmcr.so:mcr_init_handler(long)(0x7fbfffd430, 0x0058e360, 0x00592470, 0x2a96d99cf8) + 539 bytes
[5] libmwmcr.so:mcrInstance::mcrInstance(mcrOptions&, MfileReader*)(0x2a97559b79 “libc.so.6”, 0x2a97673dc3 “libc.so.6”, 0x7fbffff120, 0x2a97673dc3 “libc.so.6”) + 484 bytes
[6] MATLAB:mcrMain(int, char**)(0x00401730, 0, 0, 0x004015c0) + 226 bytes
[7] libc.so.6:__libc_start_main~(0x7fbffff7df “-nosplash”, 0x7fbffff7e9 “-r”, 0x7fbffff7ec “test”, 0x7fbffff7f1 “-logfile”) + 164 bytes

Please follow these steps in reporting this problem to The MathWorks so
that we have the best chance of correcting it:

1. Send this crash report to segv@mathworks.com for automated analysis.
For your convenience, this information has been recorded in:
test.out

2. Also, if the problem is reproducible, send the crash report to
support@mathworks.com along with:
– A specific list of steps that will reproduce the problem
– Any M, MEX, MDL or other files required to reproduce the problem
– Any error messages displayed to the command window
A technical support engineer will contact you with further information.

Thank you for your assistance.  Please save your workspace and restart
MATLAB before continuing your work.

Ruminations Over Salad for "The Optimization of Systems"

While eating at the local Wendy’s (basically the only source of food that is open past 2 PM in all of Templetown – words cannot describe how much I hate this city), I noticed two important things:

  1. Potentials (Materials, Ideas, Things that aren’t yet in their final Form) always existed in one form or another since the birth of the universe, yet are only usable after undergoing a change or series of changes. The essence is eternal, but the structure is only transient. For example, “this salad did not exist yesterday”: certainly the salad as an assembled component did not, but the lettuce, tomatoes, and partially hydrogenated soybean oil did exist. Even before they existed in those forms, they existed as part of a plant. The First Law of Thermodynamics guarantees this.
  2. Wendy’s now serves breakfast.

Expanding more on the Potentials, this should be a very intuitive, even downright obvious, idea. What makes it interesting is the particular framing of my thoughts: I realized that this could be used to derive a potential function (as in the amortized analysis technique) that serves as a “signature” of the changes physical objects undergo. I need to develop the idea further, but it’s something to talk about if I ever get around to writing “The Optimization of Systems”.

Iron Chef House

I’m somewhat of a Japanese food connoisseur. When I find a place that I consider excellent, I really mean it.

And I just found such a place.

There’s a small Japanese restaurant called the Iron Chef House in Brooklyn Heights, NYC. The prices are moderately expensive – about what one would expect for a standard Japanese dinner – but the food is excellent and the portions are large. To summarize, I’d highly recommend it and it gives Fuji a run for its money.

I ordered the dinner Bento. I was surprised at the versatility of this item: I could get three types of miso soup as well as two choices from a menu of six different types of entrees, all $16.95. It came with noodles, salad, and shumai as “fixed” items.

First, the “standard” (vs. vegetarian or special) miso soup: it was strong, yet not too salty, and the flavor of the miso contrasted nicely with the wakame and tofu. I’d add some more scallions, but this was probably the best miso soup I’ve ever tried regardless.

Salad: their lettuce was fresh and crisp, and it looked like a blend of different varieties. The ginger dressing was good, though I like the nutty flavor of Mahzu’s dressing a bit more.

Shumai: Excellent. Light and goes well with the tempura dipping sauce.

Teriyaki: Grilled, but not burnt (more like Fuji’s Teriyaki than Mahzu’s, though not quite as good a value), served warm but not sizzling, with a sufficient degree of sauce to flavor the chicken. The sauce was real teriyaki sauce, and did not resemble BBQ sauce, as in some restaurants. The Teriyaki also came with an assortment of vegetables, most of which were very good when mixed with the chicken and sauce (though avoid the celery).

Tempura: Perfect; that is, fried just heavy enough to coat yet lightly enough to avoid grease. The sauce was standard tempura sauce, but complemented the tempura very nicely, lending it flavor without overpowering the food.

Noodles: Interesting. Served with garlic and some caviar; could use a bit of butter to offset the harshness a bit.

Water: Exactly how lemon water should taste: the lemon was subtle, but present. I unfortunately did not have the foresight to order the green tea.

Cost: $16.95.

Portions: Filling.

Quality: Excellent.

Variety: Good.

Decor: Meh.

Overall: 5/5. I’d strongly recommend it.

Past use of language governs future use of language!

The early adopters set the trends once they have carved niches for themselves! They create them around their own skillsets. They don’t exist before then, and that explains how research fads come into being and why there are always one or two leaders at the very origin of a field! The very language of the field grows around these individuals!

Sorry if I got somewhat carried away with that insight. It just happens to support something I called the “initialism” principle, which I had largely discarded a while ago. That principle states that the present state of nearly everything is influenced by its origin. Please don’t mistake it for determinism; it makes no claim that the present state of things is exactly determined by the state of their origins.

An interesting alternative

Now that I’m thinking about interviews, I just realized a very interesting idea for an alternative: the bottom line is performance on the job, so that’s all we should really test.

Why not hire the candidate for a day and see how he/she does? That seems like the most pragmatic interview of all.

There is surprisingly little literature that treats an interview as a statistical test. I sense a research opportunity.

Sensitivity and specificity of an interview?

My newly-discovered penchant for freezing up and forgetting rudimentary facts during interviews makes me question the sensitivity and specificity of a multi-round interview process. That also makes me question whether such thing as a ground truth for good employees exists (maybe performance on the job?)

Anyway, once we have a ground-truth, we can perform an ROC analysis at various performance “thresholds” (note that we need only interview a population of candidates once; the criteria are the stringency of selection). The area underneath the curve would yield a measure of the method’s accuracy, while the curve itself would illustrate the relationship between sensitivity and false positive rate (that is, how many good candidates are hired vs. how many bad ones are hired). Of course, what we’re really interested in is the Positive Predictive Value: how efficiently does the interview process select good employees?

I wonder if any studies were performed on this? Hopefully so; I’d hate to think that such a stressful process exists simply based on tradition.