27 May 2011 - 16:06Open thread for arguing about the iPad

Have at it people!

4 Comments | Tags: Computers, politics

23 July 2009 - 18:21Perspectives

Playing around with perspective-correction in the gimp. This was pretty easy to do. I don’t think my shower is all that square to begin with though.

showerunretouchedshowerretouched

No Comments | Tags: Computers, photography

7 July 2009 - 14:58The presidential birthday paradox

It occurred to me back at the time of the inauguration that the number of presidents is such that we ought to have had two who share a birthday. The well known “birthday ‘paradox'” is that once you have as many people in a group as the square root of the number of days in a year there is a good chance of a collision. We have had 43 different presidents, which is just in the right range to see the ‘paradox.’

I tested this when I first learned of the effect back in high school by waiting outside a classroom that was about to let out (my class had already dispersed) with the intention of asking everyone their birthdays. The first person out was the girl I had a crush on at the time (hi Hayley!) and I asked her. She had the same birthday as me. Paradox lost.

Returning to presidents, there is about a 90% chance that two should share a birthday. And in fact two of them do: Warren Harding and James K. Polk (the Napoleon of the stump) were both born on November 2nd.

More interesting are the death days of presidents, which display more surprising results. There are three collisions! Truman and Ford both died on December 26th, Fillmore and Taft both died on March 8th, and Adams, Jefferson, and Monroe all died on (get this) July 4th! Adams and Jefferson even managed to die on the same 4th of July, in 1826.

How anomalous is this? Fairly, but not unbelievably. I figure there’s almost exactly a 25% chance of there being three two-way collisions. Having a three-way collision at all is just under 6%. Without doing the calculation, it can’t be too unlikely that conditioned on a three-way collision you also get two two-ways, since having two two-way collisions is something over 50%. So it’s around 3% likelihood to get a distribution like the one we have. Of course, to have the triple collision on a particular important day you have to divide by another 365. That’s pretty extraordinary.

On the other hand, the presidents’ birthdays are also a little odd. There’s over a 2/3 probability that there should be at least two collisions, and we only have one. Ok, now that I’ve written that it isn’t all that odd.

But what can explain the improbable deaths? I conjecture that the deaths are more likely to be closely correlated than births. December 26th is certainly a special day–it’s easy to imagine old men hanging on to see their grandchildren for one last Christmas. And maybe old presidents are trotted out for Independence day and the fireworks give them heart attacks. I wonder if anyone has the actuarial data and the wherewithal to check on such correlations of births and deaths among the population at large.

In case anyone is interested, I calculated the probabilities using the python program below. I know I could have done this analytically, but I thought it would be a useful exercise for learning a little python, which I’ve been meaning to do for a while. The program illustrates loops, if blocks, function calls, and importing a library. To run it, paste it into the python interpreter then issue a command like:
probability(43,365,10000,2)
This will compute the expectation value of having at least 2 collisions and print out a list of those probabilities for collisions of size zero through 5. It does this by picking 43 birthdays at random, in a year with 365 days. The 10000 is the number of times to run the loop to get more accurate results. I don’t deal with leap years since I’m don’t really need a particularly accurate answer.

def birthdays(births,year):
    a=[0]*year
    for x in range(0,births):
        a[int(random.random()*year)]+=1
    return [a.count(0),a.count(1),a.count(2),a.count(3),a.count(4),a.count(5)]

def probability2(births,year,iters,howmany):
    counts=[0]*6
    probs=[0.]*6
    for x in range(0,iters):
        a=birthdays(births,year)
        for y in range(0,6):
            if a[y]>=howmany:
                counts[y]+=1
    for x in range(0,6):
        probs[x]=float(counts[x])/float(iters)
    return probs

No Comments | Tags: Computers, idea, physics, Uncategorized

3 January 2008 - 15:01XOXO QKD

This is very cool. Despite my misgivings about the one-laptop-per-child initiative, the machine and software are starting to get me excited. It is apparently too late for the give one/get one program, but maybe there will be another chance soon. But what’s really cool is quantum cryptography (key distribution) between two of these machines. This news came to me via the slashdot firehose, lwn.net and the source OLPC Austria. Check it out.

I do like that (from the pictures) it appears that Alice and Bob’s computers are right next to each other.  I guess that’s still better than when CHB and I did it, where Alice and Bob actually shared a computer.

No Comments | Tags: Computers, physics

3 November 2007 - 18:02It was Earth all along

The BE-2350 CPU turned out to be fine. I bought a new CPU which the MSI tech support guy said ought to work even with the oldest BIOS (AMD Ahlon 64 3200+ Orleans 2000 MHZ $46) and still nothing worked. Finally, I was going to try booting off the old IDE hard drive I had in an old computer (which I think is 9GB and has Windows 95 on it) and just listen to see if the drive spins or quits. I had the bright idea to test that machine first, which would also serve to retest the monitor. Sure enough, same strange clicking sound and no display. I tested the monitor with the thinkpad again and it still worked.

So I brought the old computer into the lab and plugged it into a different monitor. Booted up fine, displayed fine. Who knew a multisync monitor could work with some VGA cards and not others? In my garage I had Jim’s old computer and monitor dated 1999. I was sure it couldn’t be a VGA monitor, looked more like the machine was a 286 perhaps EGA era. But it was a VGA. Coincidentally, Jim came by yesterday (after four and a half years) to take all his stuff that was stored here. He ended up leaving the computer (Russell and I are charged with saving the data from it or chucking it, at our discretion). So today I tried the old monitor and the new machine boots up fine.

It happened that the new CPU was in the motherboard when I began today, so I updated the BIOS on the board without bothering to see if it would have worked with the BE-2350 and the old BIOS. The only other trouble I had was that the machine wouldn’t boot with both memory slots full (with either set of RAM) until I put back the 3200+ CPU, then switched them again. I don’t know why that worked, perhaps I just got lucky reseating the RAM enough times.

No Comments | Tags: Computers

29 October 2007 - 0:42Bad AMD BE-2350 processor?

I’m currently building a computer: Parts list:

  • MSI K9AGM2-L motherboard ($51)
  • AMD BE-2350 CPU (45 watts dual processor) ($86)
  • 2 Samsung 500GB drives ($110 each)
  • ANTEC NSK-2480 case with 380 watt 80+ certified power supply ($83)
  • 2 GB DDR800 A-DATA RAM (2 sticks so the double data rate can go full speed) ($61)
  • Lite-On 20X DVD burner ($35)
  • Gigabyte 7200GS PCI-E ($29) video card (fastest one with no fan I could find)
  • Scythe CPU Mini Ninja cooler (huge, may work with no fan since the CPU will be next to a case fan) ($30)
  • BTC 9019URFIII wireless keyboard ($43)

The problem is the thing just won’t boot. I get either one long or two short beeps (it’s hard to tell) and the monitor makes a bad clicking noise not sinking up. First I thought it was a bad monitor–I borrowed it from work and had no evidence it was working. So I checked it with a laptop and it works fine. Next I called MSI and they said the memory I have might be wrong. It is the right type but not tested with that motherboard. I took some RAM that is known to be good and to be compatible from my computer at work. I was sure that would fix it but still nothing. Next I ordered another motherboard. Still no good. New power supply–nothing. Tomorrow I will see about RMAing the CPU. That’s all that’s left. I am still worried that the motherboard is simply not compatible with the CPU even though the MSI website says it is. It only claims it will work with the latest version of their BIOS. I have no way to determine the BIOS version or update it without a CPU that works. Plus, the time is running out on various parts’ 30 day return policies. I consider it all a learning experience.

No Comments | Tags: Computers