Foundations of Computation is a free textbook for a one-semester course in theoretical computer science. It has been used for several years in a course at Hobart and William Smith Colleges. The course has no prerequisites other than introductory computer programming. The first half of the course covers material on logic, sets, and functions that would often be taught in a course in discrete mathematics. The second part covers material on automata, formal languages, and grammar that would ordinarily be encountered in an upper level course in theoretical computer science.
Version 2.3 (Summer 2010) added a section on pushdown automata; aside from that, there were only minor corrections and changes. The most recent version, 2.3.1 (Summer 2011), is a very minor update, with one new proof and a few corrections.