Preface |
|
xi | |
Acknowledgments |
|
xiii | |
About the Authors |
|
xv | |
Introduction |
|
xvii | |
|
|
1 | (12) |
|
|
1 | (5) |
|
|
6 | (1) |
|
|
7 | (1) |
|
1.4 Counting Arguments and Diagonalization |
|
|
8 | (5) |
|
|
12 | (1) |
|
Chapter 2 Languages: Alphabets, Strings, and Languages |
|
|
13 | (20) |
|
2.1 Alphabets and Strings |
|
|
13 | (4) |
|
2.2 Operations on Strings |
|
|
17 | (5) |
|
2.3 Operations on Languages |
|
|
22 | (11) |
|
|
30 | (3) |
|
|
33 | (28) |
|
3.1 Computational Problems |
|
|
33 | (3) |
|
|
36 | (2) |
|
3.3 Traveling Salesman Problem |
|
|
38 | (1) |
|
3.4 Algorithms: A First Look |
|
|
39 | (2) |
|
|
41 | (1) |
|
3.6 Efficiency in Algorithms |
|
|
42 | (2) |
|
|
43 | (1) |
|
3.6.2 Why Polynomial? Measuring Time |
|
|
44 | (1) |
|
|
44 | (1) |
|
3.7 Counting Steps in an Algorithm |
|
|
44 | (1) |
|
|
45 | (1) |
|
|
46 | (2) |
|
3.10 Properties of O Notation |
|
|
48 | (1) |
|
3.11 Finding O: Analyzing an Algorithm |
|
|
48 | (5) |
|
3.12 Best and Average Case Analysis |
|
|
53 | (1) |
|
3.13 Tractable and Intractable |
|
|
54 | (7) |
|
|
55 | (1) |
|
|
56 | (5) |
|
Chapter 4 Turing Machines |
|
|
61 | (20) |
|
|
61 | (1) |
|
4.2 The Turing Machine Model |
|
|
61 | (1) |
|
4.3 Formal Definition of Turing Machine |
|
|
62 | (4) |
|
|
63 | (1) |
|
|
63 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
|
64 | (1) |
|
4.3.7 Transition Function |
|
|
65 | (1) |
|
4.4 Configurations of Turing Machines |
|
|
66 | (1) |
|
|
67 | (2) |
|
4.6 Some Sample Turing Machines |
|
|
69 | (5) |
|
4.7 Turing Machines: What Should I Be Able to Do? |
|
|
74 | (7) |
|
4.7.1 Decide If a Given Diagram Describes a Turing Machine |
|
|
74 | (1) |
|
4.7.2 Given a Turing Machine, Trace Its Operation on a Given String |
|
|
75 | (1) |
|
4.7.3 Given a Turing Machine, Describe the Language It Accepts |
|
|
75 | (1) |
|
4.7.4 Given a Language, Write a Turing Machine That Decides (or Accepts) This Language |
|
|
75 | (1) |
|
|
76 | (5) |
|
Chapter 5 Turing-Completeness |
|
|
81 | (32) |
|
5.1 Other Versions of Turing Machines |
|
|
81 | (17) |
|
|
82 | (2) |
|
|
84 | (1) |
|
|
85 | (5) |
|
5.1.4 Nondeterministic Turing Machines (NDTMs) |
|
|
90 | (7) |
|
5.1.5 Other Extensions and Limitations of Turing Machines |
|
|
97 | (1) |
|
5.2 Turing Machines to Evaluate a Function |
|
|
98 | (1) |
|
5.3 Enumerating Turing Machines |
|
|
98 | (1) |
|
5.4 The Church-Turing Thesis |
|
|
99 | (2) |
|
5.5 A Simple Computer (Optional) |
|
|
101 | (3) |
|
5.6 Encodings of Turing Machines |
|
|
104 | (4) |
|
5.7 Universal Turing Machine |
|
|
108 | (5) |
|
|
110 | (3) |
|
|
113 | (16) |
|
6.1 Introduction and Overview |
|
|
113 | (2) |
|
6.1.1 Problems That Refer to Themselves (Self-Reference) |
|
|
113 | (1) |
|
6.1.1.1 Problem 1: The Barber |
|
|
114 | (1) |
|
6.1.1.2 Problem 2: Grelling's Paradox |
|
|
115 | (1) |
|
6.1.1.3 Problem 3: Russell's Paradox |
|
|
115 | (1) |
|
6.2 Self-Reference and Self-Contradiction in Computer Programs |
|
|
115 | (6) |
|
6.2.1 Problem 1: The "Hello World" Writing Detector Program |
|
|
115 | (3) |
|
6.2.2 Problem 2: The Infinite Loop Detector Program |
|
|
118 | (3) |
|
6.3 Cardinality of the Set of All Languages Over an Alphabet |
|
|
121 | (1) |
|
6.4 Cardinality of the Set of All Turing Machines |
|
|
122 | (2) |
|
6.5 Construction of the Undecidable Language Accepttm |
|
|
124 | (5) |
|
|
126 | (3) |
|
Chapter 7 Undecidability and Reducibility |
|
|
129 | (32) |
|
7.1 Undecidable Problems: Other Examples |
|
|
129 | (3) |
|
|
132 | (2) |
|
7.3 Reducibility and Language Properties |
|
|
134 | (1) |
|
7.4 Reducibility to Show Undecidability |
|
|
135 | (4) |
|
7.5 Rice's Theorem (A Super-Theorem) |
|
|
139 | (2) |
|
7.6 Undecidability: What Does it Mean? |
|
|
141 | (1) |
|
7.7 Post Correspondence Problem (Optional) |
|
|
141 | (12) |
|
7.8 Context-Free Grammars (Optional: Requires Section 7.7) |
|
|
153 | (8) |
|
|
157 | (4) |
|
Chapter 8 Classes NP and NP-Complete |
|
|
161 | (24) |
|
8.1 The Class NP (Nondeterministic Polynomial) |
|
|
161 | (1) |
|
8.2 Definition of P and NP |
|
|
161 | (4) |
|
8.3 Polynomial Reducibility |
|
|
165 | (2) |
|
|
167 | (1) |
|
|
168 | (1) |
|
8.6 Intractable and Tractable---Once Again |
|
|
169 | (2) |
|
8.7 A First NP-Complete Problem: Boolean Satisfiability |
|
|
171 | (3) |
|
8.8 Cook-Levin Theorem: Proof |
|
|
174 | (6) |
|
8.8.1 Proof Part I: Construction of the Clauses |
|
|
175 | (4) |
|
8.8.2 Proof Part II: Construction in Polynomial Time and Correctness |
|
|
179 | (1) |
|
|
180 | (5) |
|
|
180 | (5) |
|
Chapter 9 More NP-Complete Problems |
|
|
185 | (40) |
|
9.1 Adding Other Problems to the List of Known NP-Complete Problems |
|
|
185 | (1) |
|
9.2 Reductions to Prove NP-Completeness |
|
|
185 | (5) |
|
9.2.1 Restriction (Also Called Generalization) |
|
|
186 | (1) |
|
|
187 | (2) |
|
|
189 | (1) |
|
|
190 | (4) |
|
9.4 Vertex Cover: The First Graph Problem |
|
|
194 | (5) |
|
|
199 | (2) |
|
9.6 Hamiltonian Circuit (HC) |
|
|
201 | (7) |
|
9.7 Eulerian Circuits (An Interesting Problem In P) |
|
|
208 | (1) |
|
9.8 Three-Dimensional Matching (3DM) |
|
|
209 | (6) |
|
|
215 | (4) |
|
|
219 | (6) |
|
|
220 | (5) |
|
Chapter 10 Other Interesting Questions and Classes |
|
|
225 | (28) |
|
|
225 | (1) |
|
|
225 | (5) |
|
|
230 | (1) |
|
|
231 | (1) |
|
10.5 Are There Any Problems In NP-P But Not NP-Complete? |
|
|
232 | (5) |
|
10.5.1 Linear Programming |
|
|
236 | (1) |
|
|
237 | (1) |
|
|
237 | (1) |
|
|
237 | (1) |
|
|
237 | (3) |
|
10.7 Reachable Configurations |
|
|
240 | (1) |
|
|
241 | (2) |
|
10.9 A PSPACE Complete Problem |
|
|
243 | (4) |
|
10.9.1 Quantified Boolean Formulas (QBFs) |
|
|
245 | (2) |
|
10.10 Other PSPACE-Complete Problems |
|
|
247 | (1) |
|
|
248 | (1) |
|
|
249 | (1) |
|
10.13 Approaches to Hard Problems in Practice |
|
|
250 | (1) |
|
|
251 | (2) |
|
|
252 | (1) |
Bibliography |
|
253 | (2) |
Index |
|
255 | |