Incipit prologus in libro alghoarismi de practica arismetrice.
— Ioannis Hispalensis [John of Seville?],
Liber algorismi de pratica arismetrice (c.1135)
Shall I tell you, my friend, how you will come to understand it?
Go and write a book upon it.
— Henry Home, Lord Kames (1696–1782),
in a letter to to Sir Gilbert Elliot
The individual is always mistaken. He designed many things, and drew in other
persons as coadjutors, quarrelled with some or all, blundered much, and
something is done; all are a little advanced, but the individual is always mistaken.
It turns out somewhat new and very unlike what he promised himself.
— Ralph Waldo Emerson, “Experience”, Essays, Second Series (1844)
What I have outlined above is the content of a book the realization of whose basic
plan and the incorporation of whose details would perhaps be impossible; what I
have written is a second or third draft of a preliminary version of this book
— Michael Spivak, preface of the ﬁrst edition of
Differential Geometry, Volume I (1970)
About This Book
This textbook grew out of a collection of lecture notes that I wrote for various
algorithms classes at the University of Illinois at Urbana-Champaign, which I
have been teaching about once a year since January 1999. Spurred by changes
of our undergraduate theory curriculum, I undertook a major revision of my
notes in 2016; this book consists of a subset of my revised notes on the most
fundamental course material, mostly reﬂecting the algorithmic content of our
new required junior-level theory course.
The algorithms classes I teach at Illinois have two signiﬁcant prerequisites:
a course on discrete mathematics and a course on fundamental data structures.
Consequently, this textbook is probably not suitable for most students as a ﬁrst