How Knuth Brushes His Teeth

24 February 2016

A pre­ma­ture optimization?

Q: Do you have any other in­sights to offer into how you use maths in your work?

A: For instance, when I brush my teeth I’ve got eight areas to cover, namely Left and right, upper and lower, inside and outside. It’s most ef­fi­cient to follow a “Hamiltonian path” or “Gray code”:

  • left upper outside
  • right upper outside
  • right upper inside
  • left upper inside
  • left lower inside
  • right lower inside
  • right lower outside
  • left lower outside