Thursday, May 29, 2008

Circle on many lattice points

Are there radii, possibly irrational, for which there exist an arbitrarily large number of lattice points at that radius from the origin? In other words, for any fixed D, is there a limit to the number of solutions to the Diophantine Pythagorean equation a2+b2=D? If there is no limit, what is the order of growth of the number of solutions with respect to D? How many co-circular pixels can I plot on a typical display?

Representative element

Given a set of elements, compute all pairs distances between them. Choose the element that has the minimum mean distance from the rest. Video sites like Youtube might use this to select a "representative" frame from a video as a thumbnail. One might first select a small random subset of frames instead of computing all pairs distances from all frames.

Tuesday, May 13, 2008

Chronological history of complete Fermat number factorizations

Source: http://www.prothsearch.net/fermat.html

1732F5Euler
123 year gap
1855F6Clausen
115 year gap
1970F7Morrison & Brillhart
10 year gap
1980F8Brent & Pollard
8 year gap
1988F11Brent & Morain
2 year gap
1990F9Lenstra, Manasse & a larger team
5 year gap
1995F10Brent
13 year gap......and counting
2008(today)

We are now in the third largest gap between Fermat number complete factorizations. The next milestone is the year 2110 when another 115 years will have again passed between complete factorizations. Will F12 (or greater) be factored before then?

Wednesday, May 07, 2008

Hierarchical comments in programming

Comments organize code, often hierarchically. This is the second major use of comments, the other being to annotate a specific section of code. We need the comment equivalent of the HTML div element to mark the scope of a "long" comment that extends a long way. Continuing the analogy with HTML, a short comment is like an attribute on an element, a long comment is like a DIV.

Consider DAG tagging.

Pretty but dangerous

There seems to be a fundamental dichotomy between "rich" web applications and those simple enough for users to modify, mashup, or monitor. All "formats" want to expand until they are Turing complete, so the user can never be sure exactly what it is doing, and access the OS and network in arbitrary ways, so the user never knows what privacy is violated. For example, Adobe PDF, Windows Media Player, Flash, and of course the web browser and e-mail client. Of course, extensibility has its benefits, to never be completely stymied by the limits of the format. But back in the day, perhaps this is nostalgia for a past that never actually existed, it was just straight static text, and the user had control over the font size, width and height, color. The user could use easily use a screen reader if he were blind. These days every one of these features don't exist or totally break a typical Web 2.0 application.

I honestly believe that the point of the internet is the content, and not stalking users with cookies or Flash plug-ins that surreptitiously turn on the user's microphone and listen in on the room. I believe we can simplify, while at the same time concentrate the Turing-complete part into sandboxes, like with Java. We can isolate content produces from consumers with peer-to-peer technologies.

Sunday, May 04, 2008

Type-getter

Given a complicated tuple type ([A],((B,C),[(D,E)],(F,(G,H),[J])) have the compiler automatically synthesize a "getter" funtion that extracts a sub-tuple matching a given (possibly polymorphic) type, for example, query "(B,C), or query "F", or query "(x,y,[z])" which matches (F,(G,H),[J]). This makes the program not have to be changed very much if the "schema" changes, say, to add on to the tuple type.

This could be interestingly abused by having a global variable "preludeFunctions" consisting of the type-unique prelude functions in a giant tuple, and querying into that, e.g., query "(a -> b) -> [a] -> [b]" gets you "map".