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:
develop mathematical reasoning skills;
improve understanding of propositional and first-order logic,
including key notions, such as: expressing natural language
statements as logical formulas, distinguishing between correct
and incorrect reasoning (between valid and invalid logical arguments),
constructing a formal proof, distinguishing between syntax
and semantics; and
explore the limits of computers, including computability and uncomputability.
Objectives
At the end of the course, students should be able to:
formalize English sentences into properly formed formulas in
the propositional and first-order logic and, conversely, interpret
such formulas in English;
formalize the notion of correct reasoning and proof,
and be able to construct formal proofs;
realize the limitation of formal proof systems; and
understand the applications of logic to computer science
Overview
introduction: history, motivation, connections to computer science
propositional logic:
connectives, truth tables, translation of English sentences into
propositional logic
syntax: well-formed-formulas in propositional logic;
structural induction and its use in proving statements
about logic formulas
semantics: value assignments, how to (semantically) prove
that arguments in propositional logic are valid
(i.e., correct, sound)
essential laws for propositional logic, formula simplification,
Conjunctive/Disjunctive Normal Forms
formal deduction for propositional logic; proving arguments valid by
formal deduction (syntactically)
soundness and completeness of formal deduction
applications of propositional logic to computer science, such as:
analysis and simplification of code; automated proofs: resolution,
Davis-Putnam Procedure; hardware and software verification
first-order logic:
limitations of propositional logic, and the necessity of
first-order logic for reasoning about objects and properties
quantifiers, universe of discourse, translation of English sentences
into first-order logic formulas
syntax of first-order logic, well-formed formulas
semantics of first-order logic, interpretations
proving argument validity in first-order logic (semantically)
formal deduction in first-order logic;
proving argument validity by formal deduction (syntactically)
applications of first-order logic to computer science,
such as: Automated theorem provers and verifiers; databases
decidability and Peano arithmetic:
Turing machine as a model of computation
undecidability: basic notions, undecidability of the halting problem
and other problems
the Peano axioms for number theory (including the induction axiom),
undecidability of Peano arithmetic
Gödel's incompleteness theorem
an important application of logic to computer science:
program verification:
Hoare triples
inference rules for assignments, conditionals, while-loops
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.
For questions concerning course material, please join us during our scheduled office hours.
Note that office hours will start at the second week of the term, and that we will not hold
office hours during the Reading Week break. 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.
Instructors
Lila Kari:
Tuesdays and Thursdays, 16:00 - 17:00 (on campus: DC 1312)
Stephen Watt:
Tuesdays 1:10-2:15 DC 3621 (on campus : DC 3621)
Fridays 12:30-1:30 (online Microsoft Teams) from Sept 25.
Teaching Assistants
Ethan Gibbons:
Wednesdays, 15:00 - 16:00 (online: Microsoft Teams)
Sajad Ashkezari:
Wednesdays, 16:00 - 17:00 (online: Microsoft Teams)
Grading Scheme
Marked Quizzes: 10%
Crowdmark Assignments: 20%
Midterm Exam: 30%
Final Exam: 40%
Notes:
students must pass the weighted exam portion of the course
(Midterm Exam, Final Exam) in order to pass the course
the work you submit must be your own (e.g., the use of ChatGPT is not permitted), and written in your own words,
with references to any sources that you have used;
you may discuss the assignment questions verbally with others
but should come away from these discussions with no electronic
or written records
students will not be exempted from more than two Crowdmark assignments for any reason
Textbook
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.
Late Submission of Crowdmark Assignments
Here are the details about how late Crowdmark assignments will be handled:
For full credit, you must submit your solutions by the specified due date and time.
A 3% late penalty will be applied for each hour that you are late in submitting.
If you have submitted anything before the deadline, then Crowdmark will not let you re-submit after the deadline passes.
This means that you must decide whether to exercise your option to submit late before the deadline, and refrain from making a partial submission in this case.
Practice Quizzes
Here are the details about how the practice quizzes will work:
There will be at least one practice quiz per week.
The purpose of the practice quizzes is to give you more frequent practice with the course material than the Crowdmark assignments will.
Each practice quiz will be automatically graded once you submit it, so that you will have immediate feedback about how you did.
You may take each practice quiz as many times as you like.
Marked Quizzes
Here are the details about how the marked quizzes will work:
There will be a marked quiz due in each week when there will not be a Crowdmark assignment due or a mid-term examination. The due dates for the marked quizzes are displayed on the course schedule page.
No late submissions of marked quizzes will be accepted.
From the time you start taking the marked quiz, you will have one hour in which to complete it. You must submit your quiz before this hour elapses and before the due date and time to receive credit.
You will have a maximum of two attempts at each marked quiz. If you make two attempts, then the higher grade will count.
Your grading for each marked quiz will be displayed on LEARN after the due date and time has passed.
Your marked quiz will be randomly customized for you. We will ensure that the variations of any given question are all of the same difficulty.
Piazza Guidelines
Please search Piazza to see whether your question has already been answered, before posting a duplicate question. This should benefit us all in two obvious ways:
You may find that your answer is already posted. In this case you will not need to wait for someone to respond.
The overall volume of posts will be minimized, allowing the course staff to respond more quickly to all of the questions.
The instructors also wish to take this opportunity to remind the class of our general expectations about how you will use the Piazza platform.
In accordance with university policies, please always be respectful and professional when posting to our course Piazza site.
If you need to give feedback about an aspect of the course which you do not like, then please do so in a constructive manner.