ENGG1007 Foundations of Computer Science
Methods of Proof
Prof. Francis Chin, Dr SM Yiu (Chapters 1.6, 1.7, 4.1)
1
Logical Inference Example: If Peter did it, he will be nervous when he is questioned. Peter was very nervous when he was questioned. Therefo
ENGG1007 Foundations of Computer Science of Computer Science
Euler Path/Circuit
Prof. Francis Chin, Dr SM Yiu November 8/10, 2010 (Chapter 9)
1
Knigsbergs Bridge Problem Bridge Problem
ENGG1007 FCS
Can we cross all bridges once and return to the starting
ENGG1007 Foundations of Computer Science of Computer Science
Graphs
Prof. Francis Chin, Dr SM Yiu November 4/5, 2010 (Chapter 9)
1
What is a Graph? is Graph?
A simple graph G = (V, E) consists of simple V, the set of vertices (nodes, points), and the set
ENGG1007 Foundations of Computer Science of Computer Science
Probability
Professor Francis Chin, Dr SM Yiu Text book - Chapter 6 book
1
An expensive sport car is hiding behind one of the doors
ENGG1007 FCS 1. Player chooses a door. 2. MC then opens one of
CSIS1121 Discrete Mathematics Mathematics
Inclusion and Exclusion and Exclusion Pigeon-Hole Principle Principle
Prof. Francis Chin, Dr SM Yiu October 14/15, 2010 (Chapter 5.2, 5.5, 7.5, 7.6)
1
Over Counting Counting
How many bit strings of length 8 that e
CSIS1121 Discrete Mathematics Mathematics
Inclusion and Exclusion and Exclusion Pigeon-Hole Principle Principle
Prof. Francis Chin, Dr SM Yiu October 14/15, 2010 (Chapter 5.2, 5.5, 7.5, 7.6)
1
Over Counting Counting
How many bit strings of length 8 that e
CSIS1121 Discrete Mathematics Mathematics
Combinations
Prof. Francis Chin, Dr SM Yiu October 7 / 8, 2010 (Chapter 5)
1
Permutation (review) (review)
CSIS1121 Discrete Maths
Given a set S of n distinct objects, a permutation is an ordered arrangement of th
ENGG1007 Foundations of Computer Science of Computer Science
Counting
Prof. Francis Chin, Dr SM Yiu October 4 / 6, 2010 (Chapter 5)
1
Counting
ENGG1007 FCS
Counting is for finding the number of possible arrangements or configurations of certain pattern or
ENGG1007 Foundations of Computer Science of Computer Science
Relations
Prof. Francis Chin, Dr SM Yiu Sept 24 / 30, 2010 (Chapters 2.1, 2.2, 8)
1
Relations
ENGG1007 FCS
Consider C=cfw_HK, Beijing, Shanghai, Guangzhou, Nanjing Every city builds roads to its
ENGG1007 Foundations of Computer Science of Computer Science
Hamiltonian Graphs Graphs
Professor Francis Chin, Dr SM Yiu November 11/12, 2010 Chapter 9.5
1
Word Puzzle Puzzle
ENGG1007 FCS
Given these words: CAR, CUB, DIM, HEN, HUT, MOB, RED, SAW, SON, WIT
ENGG1007 Foundations of Computer Science of Computer Science
Hamiltonian hs phs 2 Grap Gra
Professor Francis Chin, Dr SM Yiu November 15/17, 2010 Chapter 9.5
1
Rotating Drum Drum
ENGG1007 FCS
First bit Second bit
Third bit
2
Rotating Drum Positioning revi
ENGG1007 Foundations of Computer Science
Methods of Proof
Prof. Francis Chin, Dr SM Yiu (Chapters 1.6, 1.7, 4.1)
1
Logical Inference Example: If Peter did it, he will be nervous when he is questioned. Peter was very nervous when he was questioned. Therefo
ENGG1007 Foundations of Computer Science
Predicate Logic
Prof. Francis Chin, Dr SM Yiu (chapters 1.3, 1.4)
1
Subjects and Predicates
Do you still remember the definition of propositions? Is x > 3 a proposition? No, unless the value of x is fixed. Let P(x)
ENGG1007 Foundations of Computer Science
Predicate Logic
Prof. Francis Chin, Dr SM Yiu (chapters 1.3, 1.4)
1
Subjects and Predicates
Do you still remember the definition of propositions? Is x > 3 a proposition? No, unless the value of x is fixed. Let P(x)
ENGG1007 Foundations of Computer Science
Hamiltonian Graphs 2 Graphs
Professor Francis Chin, Dr SM Yiu November 15/17, 2010 Chapter 9.5
1
Rotating Drum
ENGG1007 FCS
First bit Second bit
Third bit
2
Rotating Drum Positioning revisited
The 2n positions of t
ENGG1007 Foundations of Computer Science of Computer Science
Graph Coloring Graphs
Professor Francis Chin and Dr SM Yiu November 25/26, 2010 Chapter 9.8
1
Map Coloring Coloring
ENGG1007 FCS
Given a map, try to color every region of the map such that adjac
ENGG1007 Foundations of Computer Science of Computer Science
Planar Graphs Graphs
Professor Francis Chin and Dr SM Yiu April 18/19, 2009 18/19, 2009
1
Planar Layouts Layouts
Printed Circuit Boards: Can we connect the three pins in chip A to three pins in
ENGG1007 Foundations of Computer Science
Sets
Prof. Francis Chin, Dr SM Yiu Sept 20/22, 2010 (Chapter 2.1, 2.2)
1
Sets Definition & Notation Sets
A set is a collection of objects.
ENGG1007 FCS
Example: A = cfw_apple, orange, mango, pear ; apple apple B =
ENGG1007 Foundations of Computer Science
Recursion
Prof. Francis Chin, Dr SM Yiu (Chapters 4.3, 7.1)
1
Recurrence and recursive function
A function is recursive if it is defined in terms of itself.
Let n be positive integers e.g. f(n)= 1 f(n-1)+n n=1 n>1
ENGG1007 Foundations of Computer Science
Hamiltonian Graphs Graphs
Professor Francis Chin, Dr SM Yiu November 11/12, 2010 Chapter 9.5
1
Word Puzzle
ENGG1007 FCS
Given these words: CAR, CUB, DIM, HEN, HUT, MOB, RED, SAW, SON, WIT. The task is to arrange th
ENGG1007 Foundations of Computer Science
Probability
Professor Francis Chin, Dr SM Yiu Text book - Chapter 6
1
An expensive sport car is hiding behind one of the doors
ENGG1007 FCS 1. Player chooses a door. 1. MC then opens one of the other two doors whic
CSIS1121 Discrete Mathematics
Inclusion and Exclusion Pigeon-Hole Principle
Prof. Francis Chin, Dr SM Yiu October 14/15, 2010 (Chapter 5.2, 5.5, 7.5, 7.6)
1
Over Counting
How many bit strings of length 8 that either start with a 1 bit or end with the two
CSIS1121 Discrete Mathematics
Combinations
Prof. Francis Chin, Dr SM Yiu October 7 / 8, 2010 (Chapter 5)
1
Permutation (review)
CSIS1121 Discrete Maths
Given a set S of n distinct objects, a permutation is an ordered arrangement of these objects. The numb
ENGG1007 Foundations of Computer Science
Counting
Prof. Francis Chin, Dr SM Yiu October 4 / 6, 2010 (Chapter 5)
1
Counting
ENGG1007 FCS
Counting is for finding the number of possible arrangements or configurations of a certain pattern. Examples: Assume th
ENGG1007 Foundations of Computer Science
Relations
Prof. Francis Chin, Dr SM Yiu Sept 24 / 30, 2010 (Chapters 2.1, 2.2, 8)
1
Relations
ENGG1007 FCS
Consider C=cfw_HK, Beijing, Shanghai, Guangzhou, Nanjing Every city builds roads to its nearest city. This
ENGG1007 Foundations of Computer Science
Sets
Prof. Francis Chin, Dr SM Yiu Sept 20/22, 2010 (Chapter 2.1, 2.2)
1
Sets Definition & Notation
A set is a collection of objects.
ENGG1007 FCS
Example: A = cfw_apple, orange, mango, pear ; apple apple B = cfw_p
ENGG1007 Foundations of Computer Science
Recursion
Prof. Francis Chin, Dr SM Yiu (Chapters 4.3, 7.1)
1
Recurrence and recursive function
A function is recursive if it is defined in terms of itself.
Let n be positive integers e.g. f(n)= 1 f(n-1)+n n=1 n>1
ENGG1007 Foundations of Computer Science
Hamiltonian Graphs 2 Graphs
Professor Francis Chin, Dr SM Yiu November 15/17, 2010 Chapter 9.5
1
Rotating Drum
ENGG1007 FCS
First bit Second bit
Third bit
2
Rotating Drum Positioning revisited
The 2n positions of t