Course Components
Labs
In lab, students will solve practical problems and test students' ideas, using computer software.
Discussions
During Discussions, students will work on some selected problems with the help of TAs. Discussions are graded based on attendance.
Pre-Lecture Quizzes
CPSC 121 promotes an "interactive engagement" lecture approach to facilitate learning, so students must prepare before the lecture by doing a reading, and completing an online quiz.
Clickers
Clickers are a way of engaging students in lecture and also get immediate feedback, so instructors can manage the time spent in each topic based on the students response.
Homework
The homework provides challenging proof questions to students, so they practice what they learn in lecture and prepare for the final exam.
Examlets
Every other week, students are assessed with a set of autograded questions, that offer immediate feedback and multiple opportunities to correct any mistakes.
Learning Goals
Model computational systems and apply valid reasoning to these models, i.e. prove relevant properties or reason through functionality of computational systems using predicate logic, propositional logic and state machines.
Write proofs for simple theorems by translating the theorem into first-order logic, decomposing the statement, and applying an appropriate proof-technique such as direct proofs, indirect proofs, and proofs by mathematical induction.
Identify alternate methods to solve or simplify problems by translating between English language, simple formal representations and closely related equivalent formal representations, and then use them to solve the problem.
Prove features of simple algorithms correct or bound in their running time. Justify why each step of the proof is correct.
Clearly and precisely communicate computational models to computer scientists.
Create regular expressions and DFAs to solve problems that are important in programming.
Modules
-
Module 01. Propositional Logic
- Translating between natural language statements and propositional logic
- Evaluating truth values with truth tables
- Representing propositional logic statements as digital circuits
- Systematic translation between circuits and logic statements
- Building computational systems using propositional logic and circuits
- Recognizing truth table patterns to form logical expressions
-
Module 02. Logical Equivalences
- Translating between natural language and propositional logic with conditionals and biconditionals
- Truth tables with conditionals and biconditionals
- Applying equivalence rules to transform statements
- Simplifying and reformatting complex logic statements
- Designing LED display systems with logic expressions and circuits
-
Module 03. Number Representation
- Converting unsigned integers between decimal and binary
- Two’s complement of binary integers
- Converting signed integers between decimal and binary
- Hexadecimal representation of binary numbers
- Binary addition
- Critiquing digital representation schemes
-
Module 04. Propositional Logic Proofs
- Validating inference rules with truth tables
- Applying inference rules to derive new statements
- Assessing proof validity and justification
- Exploring logical consequences with equivalence and inference rules
- Developing strategies for proving statements from premises
-
Module 05. Sets and Predicate Logic
- Evaluating predicate logic statements for specific values
- Translating between predicate logic and natural language (with quantifiers)
- Negating quantified statements
- Defining set operations (union, intersection, complement, difference)
- Defining subset and set equality in terms of predicate logic
- Understanding the empty set and its properties
- Differentiating statements with different quantifier order
- Expressing relationships with predicate logic
-
Module 06. Regex and DFA
- Components of regular expressions
- Writing simple regular expressions
- Tracing DFA operation on input strings
- Determining DFA-accepted languages
- Recognizing problems solvable with Regular Expressions
- Distinguishing DFA and NFA
-
Module 07. Direct Proofs
- Applying Universal Instantiation, Modus Ponens, and Modus Tollens
- Selecting proof strategies based on quantifiers
- Developing multiple direct proof strategies
- Practicing direct proofs and identifying common techniques
-
Module 08. Indirect Proofs
- Using contrapositive in proofs
- Using contradiction in proofs
- Developing indirect proof strategies
- Explaining the validity of indirect proofs
- Practicing indirect proofs and common approaches
-
Module 09. Weak Induction Proofs
- Manipulating summations/products (bounds, splits, factoring)
- Identifying base case, induction hypothesis, and induction step
- Using induction on self-referential structures
- Proving properties of non-negative integers with weak induction
- Distinguishing proofs with IH: P(n-1) vs. IH: P(n)
-
Module 10. Strong Induction Proofs
- Differences between weak and strong induction
- Proving properties of integers with strong induction
- Adding multiple base cases in strong induction proofs
-
Module 11. A Working Computer
- Understanding Big-O notation for algorithm efficiency
- Proving Big-O relationships with Direct Proofs
- Analyzing algorithms using Big-O
- Von Neumann architecture: program and data in memory
- Tracing fetch-decode-execute cycle (ALU, memory, PC interactions)
Land Acknowledgement
UBC's Point Grey Campus is located on the traditional, ancestral, and unceded territory of the xwməθkwəy̓əm (Musqueam) people. The land it is situated on has always been a place of learning for the Musqueam people, who for millennia have passed on their culture, history, and traditions from one generation to the next on this site. It’s important that this recognition of Musqueam territory and our relationship with the Musqueam people does not appear as just a formality. Take a moment to appreciate the meaning behind the words we use:
TRADITIONAL recognizes lands traditionally used and/or occupied by the Musqueam people or other First Nations in other parts of the country.
ANCESTRAL recognizes land that is handed down from generation to generation.
UNCEDED refers to land that was not turned over to the Crown (government) by a treaty or other agreement.
As you begin your journey at UBC, take some time to learn about the history of this land and honor its original inhabitants.