Here are pointers to various programs that I've written. Feel free to use them. These are not supported -- use at your own risk.


A short program to produce a pseudo-random sample of a range of integers.
Uses SHA-256 in counter mode to pick sample elements.
A very straightforward little program, intended as a reference implementation of a recommended procedure for picking a random sample for election audits.
The program text contains considerable documentation.


A program to "canonicalize" a bibtex database by re-computing all the citation tags. It also "pretty-prints" the file, and sorts the output into order. Many user options to control its behavior. Click here.


In three words, query is a ``paragraph-oriented grep.'' Query will search a file and return all paragraphs containing a given set of keywords or keyword fragments. Very useful for searching address lists and bibliographies. Click here.


For information about windex, a program I wrote to help compile the index for Introduction to Algorithms, click here.

Minimum spanning tree demonstration program

An experiment in pedagogic eye candy.
Pretty display of minimum spanning tree of a bunch of bouncing balls.
Implemented in Python using Pygame; converted to single-file executable using NSIS.
April 7, 2006.


An elementary "sudoku" program; it solves sudoku puzzles, generates random sudoku puzzles, and rates sudoku puzzles. Given only as an example of introductory Python programming; nothing particularly clever here, and lots of missing features one might want (like a GUI!). Return to Ron Rivest's home page.