## Wednesday, June 30, 2004

### Calculus of Probabilities in the game of “co-incidence”

Here is a paper by Euler that is very readable to regular people. (Well, at least to me.) Calculus of Probabilities in the game of co-incidence The probability of no coincidence is 1/e = 0.368 in the limiting case. Updated link to paper

## Tuesday, June 29, 2004

### Pi in sexagesimal

```III
VIII    XXIX    XLIV    N       XLVII
XXV     LIII    VII     XXIV    LVII
XXXVI   XVII    XLIII   IV      XXIX
VII     X       III     XLI     XVII
LII     XXXVI   XII     XIV     XXXVI
XLIV    LI      L       XV      XXXIII
VII     XXIII   LIX     IX      XIII
XLVIII  XXII    XII     XXI     XLV
XXII    LVI     XLVII   XXXIX   XLIV
XXVIII  XXXVII  LVIII   XXIII   XXI
XI      LVI     XXXIII  XXII    XL
XLII    XXXI    VI      VI      IV
```
Sixty "digits" of pi, in base sixty (sexagesimal), in Roman numerals, as a tribute to Archimedes and other ancient mathematicians. Note that "N" stands for nihil or nullus, or zero. In modern notation pi = 3 units 8 minutes 29 seconds + 44/216000 + 0/60^4 + 47/60^5 + 25/60^6 + 53/60^7 + 7/60^8 + 24/60^9 + 57/60^10 + ... I have a hundred million sexagesimal digits lying around if anyone wants it.

### The Ten Greatest Mathematicians

The Ten Greatest Mathematicians There's a break between the top 4 (Gauss, Archimedes, Newton, Euler) and the rest of the field. I'd put Euler as #1, though, and Newton at 4 or even lower. Newton invented calculus, yeah, but it would have been invented without him.

## Sunday, June 27, 2004

### Slow cycle times

One hertz (Hz) is one cycle per second.
```1 / second  = 1.000 hertz
1 / minute = 16.7 millihertz
1 / hour = 278 microhertz
1 / day = 11.6 microhertz
1 / week = 1.65 microhertz
1 / month = 380 nanohertz
1 / year = 31.7 nanohertz
```

## Saturday, June 26, 2004

### Fitt's Squared Law

Which is easier to click: a 30-by-30 square or a 900-by-1 line? Clearly the square. However by Fitt's Law, they both have the same area. Thus I introduce "Fitt's Squared Law", which states that the time to acquire a target is monotonically decreasing in the size of the incircle (largest inscribed circle) of the target. So, a 33.8 pixel diameter circle is even easier to click than a 30-by-30 square. It is also pi(33.8)^2 = 900 pixels in area. Fitt's Squared Law has great implications for web browsers because all links of text are always short and wide, instead of square-like. At the very least, it asks for the Web browsers to think of pages a composed of boxes (inside boxes, and so forth), like the way TeX does. They may already do that--Mozilla DOM Viewer shows that off. However in the bigger picutere, we may want text swooping smoothly over and under circular-shaped links in text kind of like air around an airfoil. I hope to describe more in detail what web browsers should look like in the future.

### AES and the One Time Pad

The traditional way to use a one-time pad (OTP) is to XOR the pad data with the plain text. However, if an attacker gets a hold of the plaintext and the ciphertext, and if you are stupid enough to accidentally encrypt using the same "one-time" pad data twice, then the second encryption can be trivially broken. So instead of using XOR as your "cipher", use AES, and use the one-time pad as key material. That is, take 128 bits of plaintext and 128 bits of OTP as key to produce one block of ciphertext. For the next block, take the next 128 bits of OTP as key and so forth. Even after an attacker gains the plaintext and ciphertext, he still has to calculate f(PT,CT)->Key(s) which is conjectured to be hard. So, my AES decoder ring will also have a CD-ROM which can input a one-time-pad.

## Thursday, June 24, 2004

### Parentheses Lifting

The basic problem in Lisp-like languages is stuff gets buried inside many levels of parentheses, which screws up code-indenting. Suppose we have a function that takes 4 args, of which the last arg is often complex containing another instance of foo.
```(foo bar bar bar (foo bar2 bar2 bar2 (foo bar3 bar3 bar3 (foo ... ))))
```
We want to transform ("lift") so that it looks like this
```(lift (foo bar bar bar)
(foo bar2 bar2 bar2)
(foo bar3 bar3 bar3)
(foo ...))
```
This would be all well and good if it weren't for the fact that the embedding has to span multiple levels of parens: (foo xa1 xa2 (bar ya1 (foo xb1 xb2 (bar yb1 ...)))) You begin to need templates (or code!) describing exactly how to perform the lifting you want this time. *** The only case I really care about are :case statements in parenthesized haskell anyway, so I'll apply a one-time band-aid instead. It's all interesting in general in theory...

## Wednesday, June 16, 2004

### Sports Predictions

the end-of-the-year prediction column The prediction about the Pats and the Connecticut NCAA sweep is pretty neat. I'm also amused by Gallo's predictions: May 14 -- Mike Piazza starts his first game ever as a pitcher and gives up 29 runs in a blowout loss to the Astros. However, he hits opposing starter Roger Clemens four times in the head with pitches, and beans him repeatedly with pickoff attempts to first base.

## Sunday, June 13, 2004

### Primes with Primitive Roots near powers of two

For every power of two, what is the largest prime number less than it for which a primitive root is known? This probably means what's the largest prime number p less than 2^n for which p-1 has been completely factored. I guess it also begs the question, for each Mersenne prime 2^p-1, is 2^p-2 factored? Another related question is what's the largest Sophie Germain prime less than 2^n, for each prime (because sophie germain primes minus easily factor). Of course, there's also: what's the smallest prime number greater than the power of two that yadda yadda...

## Saturday, June 12, 2004

### westminster chimes

for 31 days 1 2 3 4 5 12 34 51 23 45 123 451 234 512 345 1234 5123 4512 3451 2345 there's 20. next 10 days cycle (13524) 13 52 41 35 24 135 241 352 413 524 on the 31st day 12345 == perhaps some other cycle (14253), (54321)...

### web browser columns

A web browser should do this to content 123..z12 :
```123 def pqr
456 ghi stu
789 jkl vwx
abc mno z12
--------------
```
so that scrolling happens along the bottom scrollbar only. It allows for narrow column that humans like to read.

### Fitt's Law, and things competing for the edge of the screen

menu bars start button quick launch subwindow tabs (or emacs buffer tabs) toolbars task lists scroll bars don't launch screensaver corner scroll desktop window manipulation (minimize, maximize, resize)

## Monday, June 07, 2004

### Emacs popups and mouseovers

Need a way to make "modern" IDE's with emacs. Need a way of hiding text, for example I don't care about the type information of the paramters to this function. And need a way of expanding and re-shrinking the hidden text quickly. And having the hidden text pop up on a mouseover.

## Tuesday, June 01, 2004

### more pell's equation

http://www.kaynet.or.jp/~kay/misc/pell2.html but the results don't agree with http://mathworld.wolfram.com/PellEquation.html for example at D=46 24335 3588 3482 531 226153980 there doesn't seem to be a truly authoritative source.

### pell's equation

I now learn that I studied pell's diophantine equation in 7th-grade or so, though i didn't know it was called that. I was messing with newton's method of calculating square roots, and doing everything with exact fractions, and noticed that some intermediate fraction (the correction term) in each newton iteration tended be be something like 1/n. can be seen by seeding sqrt(2) with an initial guess of 3/2, or sqrt(3) with an inital guess of 2.