CS 245 plays a key role in the development of mathematical skills required in the Computer Science program, and thus complements MATH 135 (Algebra), MATH 239 (Graph Theory and Enumeration), and STAT 230 (Probability). The course covers a variety of topics related to "logic and computation" that are required as background for other courses in Computer Science. It differs both in tone and content from a "logic" course one would typically find in a mathematics program. The course aims to:
At the end of the course, students should be able to:
Students registered in the course may log into Quest to view their lecture and tutorial meet times.
If you wish to register or to change sections, either use Quest or contact a Computer Science academic advisor. The instructors and course coordinator do not support course registrations.
We will adjust this schedule as required.
Each tutorial will provide a forum for you to practice with the ideas and techniques presented in the preceding lectures. The following assignment allows further practice and feedback. Each assignment will focus on the recent topics, but includes everything that came before, as well — everything is cumulative.
The Midterm Exam will cover the material up to the end of Week #5.
There will be a Final Exam during the university's final exam period, which will cover the entire course.
| Week | Lectures | Tutorials | Assessments | References | |
|---|---|---|---|---|---|
| Tuesday | Thursday | Friday | |||
| #1: 05/06–05/10 |
What is logic? Logic propositions and connectives. | Truth tables; translations between English and propositional logic; propositional logic syntax; review of induction. | Translations; propositional syntax; induction | Marked Quiz 1 released by 05/08 |
|
| #2: 05/13–05/17 |
Structural induction; propositional semantics; satisfiability. | Proving arguments valid in propositional logic. | Structural induction; propositional logic semantics; argument validity. |
|
|
| #3: 05/20–05/24 |
Propositional calculus laws; Disjunctive and Conjunctive Normal Forms. | Disjunctive and Conjunctive Normal Forms. |
|
|
|
| #4: 05/27–05/31 |
Adequate set of connectives; Boolean algebra; logic gates. | Circuit design and minimization; code analysis and simplification. | Adequate sets; boolean algebra; logic gates; Circuit design, code analysis and simplification. |
|
|
| #5: 06/03–06/07 |
Formal deduction for propositional logic. | Soundness and completeness of formal deduction for propositional logic (proof of completeness optional). | Formal deduction for propositional logic; Soundness and completeness of formal deduction. |
|
|
| #6: 06/10–06/14 |
Automated theorem-proving: resolution, Davis-Putnam Procedure (proof of soundess and completeness of DPP, starting at slide 35 of Logic07: optional). | Self-study (lectures for Q&A only) | Resolution for propositional logic; DPP. |
|
|
| #7: 06/17–06/21 |
First-order logic: domain, terms, relations, variables, quantifiers. Translations from English to first-order logic. |
First–order logic syntax and semantics. | Introduction to first-order logic; Syntax and semantics for first-order logic. |
|
|
| #8: 06/24–06/28 |
Logical consequence in first–order logic. | Formal deduction in first–order logic. | Logical consequence in first–order logic; Formal deduction for first-order logic. |
|
|
| #9: 07/01–07/05 |
Formal deduction in first–order logic: proof examples; soundness and completeness. | Resolution for first–order logic: Prenex Normal Form, Existential-free PNF, unification and resolution, automated theorem provers/verifiers. | Formal deduction for first-order logic; Resolution for first–order logic. |
|
|
| #10: 07/08–07/12 |
Computation and logic: Turing machines, decidability, undecidability, the halting problem. | Turing machine examples, the undecidable tiling problem (optional), decidability and complexity of some logic problems. | Decidability; undecidability; Turing machines. |
|
|
| #11: 07/15–07/19 |
Peano arithmetic. | Proving theorems in Peano arithmetic; Gödel's incompleteness theorem. | Peano arithmetic; Gödel's incompleteness theorem. |
|
|
| #12: 07/22–07/26 |
Program verification: Hoare triples, partial and total correctness, rules for assignment, implication, composition. | Program verification: conditional statements, while-loops. | Program verification: assignment, implication, composition, conditionals, partial-while. | No assessments due the week of 07/22–07/26. |
|
| #13: 07/29–07/30 |
Program Verification: program termination; Undecidability of Partial and Total Correctness; Course Review. | Crowdmark Assignment 5 due 07/30, 11:59 PM |
|
||
For questions concerning course material, please join us during our scheduled office hours. Office hours will start in the second week of classes, and will be posted below by the end of the first week. Times listed below are in Eastern Time. Note whether specific office hours are on campus or online; and refer to LEARN on how to connect to online office hours. If the below times do not suit you, contact an instructor to schedule an meeting. For administrative questions, contact the coordinator, Dalibor Dvorski, by email: ddvorski@uwaterloo.ca.
Notes:
The recommended textbook for this course is Mathematical Logic for Computer Science, second edition, by Lu Zhongwan. Students may access an electronic version of the textbook through the library. Please note that this book does not cover all the material presented in the course, and is meant mainly for definitions, notation, and the sections on formal deduction. For the rest of the material, students should take notes from the course and work from these. Lecture slides for the course are available electronically on LEARN.