Thursday, April 09, 2009


Codemill has a new post, on paging in the 32 bit x86 architecture. I know you're all dying to read it.

Tuesday, February 24, 2009


532,668 people reside in Wyoming (2008 estimate), and they get 2 senators and 1 representative. Washington D.C. has 591,833 (2008 estimate) residents, no senators, and one non voting delegate in the House. A population over 11% larger than that of the entire state of Wyoming, and no vote in Congress.

$20 billion have been paid in federal taxes in 2007 by D.C. residents: the highest per-capita in the U.S. On average D.C. residents paid over $34 thousand compared to the runner-up, Delaware, at less than $20 thousand per resident. Wyoming pays on average less than $10 thousand per resident. (FY2007 Federal Tax Revenue)

Depending on which polls you go by, anywhere from 61% to 82% of Americans support D.C. voting rights.

Let's hope this is a good week.

Friday, June 20, 2008


Short post. Going to Israel for a little over 2 weeks. Will travel all over the country. There will be a wedding. Leaving tonight. Returning on the 7th. On the way there and back, I get some time in London to wander around. Let's hope this cease fire sticks. Will take pictures.

Tuesday, January 15, 2008

Left v. Right

We've all probably heard the concept that different people may experience color differently. Maybe what I see as yellow looks, in my mind, like what the color blue looks like in your mind. There's no real way to answer that question definitively using modern technology and our limited understanding of how the brain works, but in theory with sufficiently advanced technology and a sufficiently advanced understanding of the brain, one could answer that question. Of course, there would be no 'right' or 'wrong' way to perceive colors, but one could at least agree that two people either see things the same, or differently. That said, I've heard somewhere (it could have been through my dad, who as a lawyer, is not an authority on the matter) that we all probably see colors the same way.

The other day I was thinking along similar lines about the whole left/right distinction. The decision of which goes where is arbitrary. If everything in your head were a mirror image of what things were like in reality (we'll come to reality later), then you wouldn't have any problems getting around in the world. You would have learned to read 'backwards', drive on the 'other' side of the road, etc. However, everything would be flipped, so everything would still agree internally. Still, just like the color example we're more familiar with, it's possible that what 'left' feels like in your mind may be what 'right' feels like in my mind.

Now, if two people really do disagree in their minds of where 'left' goes and where 'right' goes, and we somehow figure out a way to study the brain enough to discover when that's the case, who would be considered to have a mirror-image view of reality? I don't believe that we could say either way, since each person's views of reality are internally consistent, and would make all the same predictions about reality. There's just no way to determine if the universe is actually this way or that way. Construct a model of the universe, and look at it through a mirror (don't try this at home, it's far too big.) Everything still works normally, since you're looking at the same thing, but certain rules are changed. The right-hand-rule for vector multiplication in electromagnetic interactions would become the left-hand-rule, the parity violation of weak interactions would cut the other way (I think that's how it works), etc. The question instead becomes whether the universe makes a choice here, or if reality doesn't actually have a preference in the left/right placement decision, and outside of our minds the structure of space is something bizarre and foreign.

Thursday, January 10, 2008

Tech-savvy districts in NH like Clinton

While not being definitive proof of fraud on the part of either the electronic voting machines used in New Hampshire or the human ballot counters, it seems like there is a general discrepancy in the percentage of votes won by senators Clinton and Obama in the primary. In towns that use electronic voting machines, Clinton experienced an advantage, and in towns that hand-count their ballots, Obama experienced an advantage. The other candidates also experienced advantages in one type of voting machine or the other, but the percentages were much closer to zero. I haven't figured out the statistical significance of these numbers, so it could be attributed to random noise. However, I am skeptical of that since the candidates with a higher overall vote count experienced higher discrepancies between electronic and hand-counted ballots, whereas I would think the reverse would hold if it was simply 'background noise'. All the more reason to insist that all electronic voting machines implement a voter-verified paper record of votes.

2008 New Hampshire State Primary Results

After doing some very simple analysis on the numbers, I've found the following:

Of the 135 towns that used paper ballots, Clinton beat Obama in 47 of them (~35%)
Of the 100 towns that used electronic ballots, Clinton beat Obama in 59 of them (59%)

So, in districts that use electronic ballots, Clinton beat Obama almost twice as often as she did in districts that use paper ballots.

Wednesday, January 09, 2008


Despite the fact that I started using Google as my homepage because it was little more than a search box on a plain white background, I've been using the 'iGoogle' homepage for a while now. It lets you customize the page somewhat with themes, but almost all of the themes are cutesy: little cartoon animals doing something different depending on the time of day, making tea, gathering berries, what have you. Google is finally trying to break into the adults-who-don't-have-hello-kitty-pencil-bags market, and added a 'Solar System' theme. Different picture depending on the day, quite tasteful in my opinion. They have images of the Sun, Mercury, Venus, Earth, the Moon, Mars, Jupiter, Saturn, Uranus, and Neptune. No Pluto, no asteroids or comets, none of the jovian moons (or any moon other than THE moon for that matter,) but still a nice spread. They have 10 images, but there are only 7 days in the week, and I'm guessing that some of them are either unused, or not every day of the week will be the same from week to week.

Wednesday, November 07, 2007


I've been digging around some, and have failed to see this information demonstrated, at least not in a way that I could identify, so...

I propose the following:

For all p, p being a safe prime (with a corresponding Sophie Germain prime s,) implies that for all y in [2, p-1], y^s mod p is either 1 or p-1.

Furthermore, a discrete logarithm only exists under the following circumstances:

  • 0^k = z mod p is only true for z = 0, with k in {1, 2, 3, ...}
  • 1^k = z mod p is only true for z = 1, with k in {1, 2, 3, ...}
  • (p-1)^k = z mod p is only true for z in {1, p-1}.
    (p-1)^k = p-1 mod p for all odd k values, and
    (p-1)^k = 1 mod p for all even k values.
  • Otherwise, let y be in [2, p-2]:

    • if y^s = p-1 mod p:
      for all z in [1, p-1], there is some k such that y^k = z mod p.
      Let the set of all such y values be represented as Y.
    • if y^s = 1 mod p:
      y^k = z mod p has a solution k if and only if p - z is in Y.

I have managed to show that this is true for all safe primes under one thousand, I just need to figure out how to prove it for all safe primes. Hopefully there will be more to come here.

For a follow up, here's an interesting chart showing this information for the safe prime 11. The columns represent the y values, the rows represent the z values, and the numbers in the cells (if present) represent the k values. The relevant Sophie-Germain prime powers are highlighted in green.

2007/11/08: Here's a similar chart for the safe primes 5 and 7:

Compare these against a non safe-prime (not even prime) base 12:

I've written a program to show these tables, available here