Foundations of Computing
Foundations of Computing
An Accessible Introduction to Formal Languages
About the Book
A textbook for upper-division Computer Science majors covering formal languages and automata with an introduction to computability. Intended to give CS majors a solid foundation in the Theory of Computation without being overly formal mathematically, while retaining the rigor of the material. It has been classroom tested since 2016 with good success.
Table of Contents
-
- Foreword
- Preface
-
1 Introduction
- 1.1 Formal Languages
-
1.2 Finite State Machines
- Exercises
- Chapter Summary
-
I Regular Languages
-
2 Finite Automata
-
- Where Are We?
- Chapter Objectives
-
2.1 Deterministic Finite Automata
- Exercises
-
2.2 Non-Deterministic Finite Automata
- Equivalence of NFAs and DFAs
- NFAs and Complements
- Exercises
-
2.3 Minimal Automata
- Exercises
-
2.4 Machines with Output
- Computer Arithmetic
- Lexical Analysis
- Minimal Mealy Machines
- Exercises
- Chapter Summary
-
-
3 Regular Expressions and Grammars
-
- Where Are We?
- Chapter Objectives
-
3.1 Regular Expressions
- Exercises
-
3.2 Equivalence of Regular Expressions and Regular Languages
- From Regular Expression to NFA
- From NFA to Regular Expression
- Exercises
-
3.3 Regular Grammars
- Left-Linear Grammars
- Exercises
- Chapter Summary
-
-
4 Properties of Regular Languages
-
- Where Are We?
- Chapter Objectives
-
4.1 Closure Properties
- Computing Set Operations
- Exercises
-
4.2 Decision Algorithms
- Exercises
-
4.3 Infinite Regular Languages and a “Pumping Theorem”
- Exercises
- Chapter Summary
-
-
2 Finite Automata
-
II Context-Free Languages
-
5 Pushdown Automata
-
- Where Are We?
- Chapter Objectives
-
5.1 Adding a Stack to Finite Automata
- Exercises
-
5.2 Pushdown Automata and Determinism
- Exercise
- Chapter Summary
-
-
6 Context-Free Grammars
-
- Where Are We?
- Chapter Objectives
-
6.1 Context-Free Grammars and Derivations
- Simplifying Grammars
- Exercises
-
6.2 Derivation Trees and Ambiguous Grammars
- Operator Precedence
- Operator Associativity
- Expression Trees
- Exercises
-
6.3 Equivalence of PDAs and CFGs
- From CFG to PDA
- From PDA to CFG (Special Case)
- From PDA to CFG (General Case)
- Exercises
- Chapter Summary
-
-
7 Properties of Context-Free Languages
-
- Where Are We?
- Chapter Objectives
-
7.1 Chomsky Normal Form
- Removing Lambda
- Removing Unit Productions
- Chomsky Normal Form Rules
- Exercises
-
7.2 Closure Properties
- Closure Properties of DCFLs
- Exercises
-
7.3 Decision Algorithms
- Is a CFL Empty or Infinite?
- Exercises
-
7.4 Infinite CFLs and Another Pumping Theorem
- Exercises
- Chapter Summary
-
-
5 Pushdown Automata
-
III Recursively Enumerable Languages
-
8 Turing Machines
-
- Where Are We?
- Chapter Objectives
-
8.1 Prelude
- Post Machines
- Exercise
-
8.2 The Standard Turing Machine
- Subroutines
- Halting
- Exercises
-
8.3 Variations on Turing Machines
- The Universal Turing Machine
- Non-Deterministic TM = Deterministic TM
- Programming Exercise
- Chapter Summary
-
-
9 The Landscape of Formal Languages
-
- Where Are We?
- Chapter Objectives
-
9.1 Recursively Enumerable Languages
- A Non-Recursive, RE Language
- Context-Sensitive Languages
- Properties of Recursively Enumerable Languages
- Exercises
-
9.2 Unrestricted Grammars
- Context-Sensitive Grammars
- Equivalence of Unrestricted Grammars and Turing Machines
- Exercises
-
9.3 The Chomsky Hierarchy
- Countable Sets
- Uncountable Sets
- Chapter Summary
-
-
10 Computability
-
- Chapter Objectives
- 10.1 The Halting Problem
-
10.2 Reductions and Undecidability
- Exercises
- Chapter Summary
-
- Glossary
- Bibliography
- Index
-
8 Turing Machines
- Notes
The Leanpub 60 Day 100% Happiness Guarantee
Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.
Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.
You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!
So, there's no reason not to click the Add to Cart button, is there?
See full terms...
Earn $8 on a $10 Purchase, and $16 on a $20 Purchase
We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.
(Yes, some authors have already earned much more than that on Leanpub.)
In fact, authors have earnedover $14 millionwriting, publishing and selling on Leanpub.
Learn more about writing on Leanpub
Free Updates. DRM Free.
If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).
Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.
Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.
Learn more about Leanpub's ebook formats and where to read them