I wonder how much of a price premium people would be willing to pay for a hard drive with a lifetime warranty?
Thursday, March 31, 2005
glimpseindex fun
Indexing 149,000 mail messages totaling 1.21 GB took 7 hours with glimpseindex -o. The total size of the .glimpse_* index files is 368 MB. After bzip2 compression, the messages themselves are 420 MB and the index files (surprisingly) compress by 50% to 182 MB.
Sunday, March 27, 2005
Circle polygons
What are polygons all of whose vertices lie on the circumcircle? Similarly for edges on the incircle? Similarly for polyhedra?
--
Mobile Email from a Cingular Wireless Customer http://www.cingular.com
Misère hex
Saturday, March 26, 2005
Math fonts
By dropping the fonts from the
symfont fix package into ~/.fonts, one can view pages
like Mathematical
Constants and Computation, Perimeter
of an Ellipse, and pages converted by TTH.
I still don't fully understand why the font gets recognized
as iso8859-1, even though the EncodingScheme is
``FontSpecific''. One also needs to use a ``recent''
(probably GTK2+) build of Firefox or Mozilla, the kind that
try to do antialiased fonts. It might be necessary to
run fc-cache
to generate the index files.
jsMath displays some awesomely rendered mathematics. drop the BaKoMa Tex fonts into ~/.fonts. The fonts are supposedly also available at CTAN and mozilla mathML
Friday, March 25, 2005
inch centimeter 127
Firefox extensions
Tuesday, March 22, 2005
How to memorize 81 bits
Color each grid square by the bit, and remember the shape of the bits, and the letters they correspond to.
yo car caul ga pet dronex sho ambi ot wer dext ic ing rous
an con ti fig e van bo ura du it dy ble cat y ions
Scroll-wheel app-switcher
Scroll the mouse-wheel on the desktop to switch (and cycle) between windows of running applications. (No window manager I know does this by default, yet.)
Sunday, March 20, 2005
Factoring Ramanujan's Constant
exp(pi*sqrt(163)) = 262537412640768744 ( 2 2 2 3 10939058860032031 (2 3 5 7 13 179 (2 88 (2 2 2 11)) 6959 (2 7 7 71) 3216751 (2 3 5 5 5 4289 (2 2 2 2 2 2 67))))
Saturday, March 19, 2005
Unsolved instance of the Post Correspondance Problem
{(10,0),(0,001),(001,1)} Ling
Zhao's PCP page
Prove it has no solution...
Also given in bit-flipped form as (6.15) in his Master's thesis:
{(110,1), (1,01), (0, 110)}
1- in Lisp is pred in Haskell
The handy function 1-
in Lisp is
pred
in Haskell, also (subtract
1)
and (-1)
by operator lambdas.
Thursday, March 17, 2005
RFC 2409, RFC 3526, and "bad" generators
The two RFCs specify 2 as a generator for the prime Diffie-Hellman fields. However, 2 is not a generator: for example:
RFC 2409 - The Internet Key Exchange (IKE) 6.1 First Oakley Default Group FFFFFFFFFFFFFFFFC90FDAA22168C234C4C6628B80DC1CD129024E088A67CC74020BBEA63B139B22514A08798E3404DDEF9519B3CD3A431B302B0A6DF25F14374FE1356D6D51C245E485B576625E7EC6F44C42E9A63A3620FFFFFFFFFFFFFFFF ? p=2^768-2^704-1+2^64*(floor(2^638*pi)+149686) %41 = 1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919 ? isprime(p) %42 = 1 ? j=2; ? (p-1)%j %44 = 0 ? q=(p-1)/j; ? isprime(q) %46 = 1 ? Mod(2,p)^q %47 = Mod(1, 1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919) ? znprimroot(p) %48 = Mod(7, 1552518092300708935130918131258481755631334049434514313202351194902966239949102107258669453876591642442910007680288864229150803718918046342632727613031282983744380820890196288509170691316593175367469551763119843371637221007210577919)
The reason is buried Appendix E of RFC 2412 (uncited): " Using 2 as a generator is efficient for some modular exponentiation algorithms. [Note that 2 is technically not a generator in the number theory sense, because it omits half of the possible residues mod P. From a cryptographic viewpoint, this is a virtue.]"
One wonders why they didn't use a multiplier (instead of 149686) for which 2 really is a number-theoretic generator.
Monday, March 14, 2005
Unfriendly primes
Reply from On-Line Encyclopedia
./x.primes-2.ll.x primes 10000 | drop.pl 4 | xargs -n1 -i expr '{}' - 1 | xargs -n1 factor | perl -nlwe 'BEGIN{$f{2}=0}($a,$b)=/(.*):.* (\d+)/;$a++;$f{$a}=$f{$b}+1;END{print "$f{$_} $_" for(keys %f)}' | sort +0n +1n | perl -nwae 'BEGIN{$p="-1"}print if $p!=$F[0];$p=$F[0]'
Better is
./x.primes-2.ll.x primes 2000000 | drop.pl 4 | xargs -i expr '{}' - 1 | xargs factor | perl -nlwae 'BEGIN{$f{2}=0}($a=$F[0])=~s/://;shift@F;$m=0;for(@F){if($f{$_}>$m){$m=$f{$_}}}$f{++$a}=$m+1;END{print "$f{$_} $_" for(keys %f)}' | sort +0n +1n | perl -nwae 'BEGIN{$p="-1"}print if $p!=$F[0];$p=$F[0]'
First difference is at 239 (238: 2 7 17).
./x.primes-2.ll.x primes 2000000000 | drop.pl 4 | xargs -i expr '{}' - 1 | xargs factor | perl -nlwae 'BEGIN{$f{2}=0;$x=0} ($a=shift@F)=~s/://;$m=0; for(@F){if($f{$_}>$m){$m=$f{$_}}} $f{++$a}=++$m;if ($m>$x){print $a;$x=$m}'
Memorizing 81 bits
|
|
|
|||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||
|
|
|
|
|
|
|
|||||||||||||||||||||||||||||||||||||||||
|
|
|
|||||||||||||||||||||||||||||||||||||||||
|
|
|
|
Sunday, March 13, 2005
Mersenne 42 in other bases
The 42nd known Mersenne prime 225964951-1 was discovered recently. The minus-one factorization of the exponent is 25964951 (5 5 11 17 2777 (2 2 2 347 (2 173 (2 2 43 (2 3 7))))).
The huge pages of ``random'' characters inspire the Word-search Problem: given a string S, and a target word T (or a list of target words), find T= S[a]S[b]S[c]... where the indices a,b,c... are in arithmetic progression.
Sunday, March 06, 2005
IRC is an Internet Push Technology
One must query a RSS feed continuously to get real-time updates, which will usually get you banned (try the Coral distribution instead). Is there a better "push" solution?
Yes. IRC.
Wednesday, March 02, 2005
NIC GPS
What if all network cards had GPS receivers? They would provide the link between the physical and cyber worlds.
--
Mobile Email from a Cingular Wireless Customer http://www.cingular.com