Posted by: Dave Richeson | April 16, 2013

Countability of the rationals drawn using TikZ

I’m continuing my exploration of TikZ (here is my first post about TikZ). I will be showing my Discrete Math class how to “count” the positive rational numbers. (See this old blog post for more information about countable sets.) I used TikZ to create the picture below.

Screen Shot 2013-04-16 at 9.23.14 PM

Here is the source code for this figure. If you click on the link you can get an editable copy of the document in WriteLatex.



  1. The paper “Recounting the rationals twice” is really good along these lines, developing a single tree expansion that underlies the stern-brocot and calkin-wilf trees.


%d bloggers like this: