Lecture 1 Introduction
Lecture 1 Introduction
• Lectures:
• Synchronous, in-person delivery
• A01, A02: 11:30 am – 12:50 pm on M, Th (HHB 105)
• Course Website:
• Brightspace: https://bright.uvic.ca/d2l/home/336697
• Course outline: https://heat.csc.uvic.ca/coview/course/2024011/CSC320
PowerPoint Passcode Game
• We want the passcode 0’s followed by an equal number of 1’s (e.g 000111)
• Pushdown Automata: Can push / pop symbols and read the top symbol
000111
𝟎, 𝝐 → 𝟎 𝟏, 𝟎 → 𝝐
𝝐, 𝝐 → $ 𝝐, 𝝐 → 𝝐 𝝐, $ → 𝝐
• Turing machine: infinite tape and can read / write symbols anywhere
• The computational limits of a Turing machine are the limits of classical computers
1 0 1 1 0 …
NP
P
P v.s NP
• The P v.s NP problem: “Are the problems in P the same as the problems in NP?”
• In other words, if the solution to a problem is easy to check for correctness, must
the problem be easy to solve?
P = NP ?
CSC 320 Timeline
Tutorials
• Weekly tutorials going over practice questions which are similar to
assignment / midterm questions
Evaluation
• Assignments (30%)
• There will be 6 assignments worth 5% each
• You will be given around 2 weeks to complete them
• There are 2 assignments before each midterm for practice
• Assignments will be given and submitted through BrightSpace
• Midterms (40%)
• Midterm 1 (20%): in class on February 8th
• Midterm 2 (20%): in class on March 14th
• You are allowed one single sided handwritten cheatsheet of A4 (8.5’’ x 11’’) paper
• Final (30%)
• To be scheduled by the University
• You must pass the final exam to pass the course
Policy on Collaboration / Online Resources
Assignments:
• Students are encouraged to discuss assignments together
• All solutions must be individually written and no sharing of any solutions
• (Don’t look at any other student’s paper)
• You may use online resources to help you on your assignments, but your
submission must clearly display that you understand the solution
ChatGPT:
• You may use ChatGPT to help you on your assignments
• WARNING: ChatGPT is pretty bad at CSC320…
Countable and Uncountable
A set is countable if it is finite or countably infinite
• elements of a countable set can be counted one at a time without missing any
• every element is associated with a unique natural number
There exists a bijection between any countably infinite set and the set of natural
numbers ℕ
1
2
3
4
5
…
… -5 -4 -3 -2 -1 0 1 2 3 4 5 …
…
• 𝒙𝒏 = 0. 𝑑𝑛1 𝑑𝑛2 𝑑𝑛3 𝑑𝑛4 … is the 𝒏𝒕𝒉 real number in the enumeration
• 𝒙𝒏 has decimal digits 0. 𝑑𝑛1 𝑑𝑛2 𝑑𝑛3 𝑑𝑛4 (since we are enumerating real numbers
between 0 and 1)
ℝ is uncountable (Cantor’s Diagonalization)
• Consider the number 𝒄 = 0. 𝑐1 𝑐2 𝑐3 𝑐4 … where 𝑐𝑖 ≠ 𝑑𝑖𝑖 for each 𝑖
𝒙𝟏 = 0. 𝑑11 𝑑12 𝑑13 𝑑14 … 𝒄 ≠ 𝒙𝟏 since the 1𝑠𝑡 decimal digit is different (𝑐1 ≠ 𝑑11)
𝒙𝟐 = 0. 𝑑21 𝑑22 𝑑23 𝑑24 … 𝒄 ≠ 𝒙𝟐 since the 2𝑛𝑑 decimal digit is different (𝑐2 ≠ 𝑑22 )
𝒙𝟑 = 0. 𝑑31 𝑑32 𝑑33 𝑑34 … 𝒄 ≠ 𝒙𝟑 since the 3𝑟𝑑 decimal digit is different (𝑐3 ≠ 𝑑33 )
𝒙𝟒 = 0. 𝑑41 𝑑42 𝑑43 𝑑44 … 𝒄 ≠ 𝒙𝟒 since the 4𝑡ℎ decimal digit is different (𝑐4 ≠ 𝑑44 )
…
𝒙𝒏 = 0. 𝑑𝑛1 𝑑𝑛2 𝑑𝑛3 𝑑𝑛4 … 𝒄 ≠ 𝒙𝒏 since the 𝑛𝑡ℎ decimal digit is different (𝑐𝑛 ≠ 𝑑𝑛𝑛 )
…
…
• We define 𝒄 = 0. 𝑐1 𝑐2 𝑐3 𝑐4 such that the digit 𝒄𝒊 is something different than the 𝒊𝒕𝒉
digit of 𝒙𝒊
…
then 𝒄 must be in the list somewhere.
• However, 𝒄 is defined such that digit 𝒄𝒌 is different than the 𝒌𝒕𝒉 decimal digit of 𝒙𝒌
• The enumerated list 𝒙𝟏 , 𝒙𝟐 , 𝒙𝟑 , … does not contain all real numbers between
0 and 1 since it cannot contain 𝒄
• So, we cannot enumerate all the elements in this subset of ℝ (real numbers
between 0 and 1)
• Therefore, ℝ is uncountable