Stable marriages
A process cannot be understood by stopping it. Understanding must move
with the ow of the process, must join it and ow with it.
The First Law of Mentat, in Frank Herberts Dune (1965)
Discrete Structures & Algorithms
Lecture 10
Graphs and
Midterm Exam 2
Fall 2012 EECE 320 UBC
November 8, 2012
Candidates name:
Student number:
Remarks
1. Each question is worth 10 points.
2. If you write I do not know for a question that should be marked then you will receive 20% of the
marks for that questio
Midterm Exam 1 Solutions
Fall 2013 EECE 320 UBC
1. Perfect numbers
A positive integer n is said to be perfect if it is equal to half the sum of its factors. Let cfw_ f1 , f2 , . . . , fm be the
factors of n (n/ fi = y where y is a positive integer). If n
Midterm Exam 3 Solutions
Fall 2013 EECE 320 UBC
November 14, 2013
1. Bottlenecks and path capacities
You are planning an evacuation route to move people from UBC to Downtown Vancouver in case of an emergency. There are many paths from UBC to the downtown
Final Examination
Spring 2012 EECE 320 UBC
April 16 2012
Candidates name:
Student number:
Remarks
1. Each question is worth 10 points.
2. If you write I do not know for a question that should be marked then you will receive 20% of the marks
for that quest
Final Exam
Fall 2012 EECE 320 UBC
December 5, 2012
Candidates name:
Student number:
Remarks
1. Each question is worth 10 points.
2. If you write I do not know for a question that should be marked then you will receive 20% of the
marks for that question.
3
Homework 7 Solutions
Fall 2013 EECE 320 UBC
1. (Bipartite graphs.) A graph is bipartite if its vertices can be coloured black or red such that
every edge joins vertices of two different colours. A graph is d-regular if every vertex has
degree d. A matchin
Midterm Exam 2 Solutions
Fall 2013 EECE 320 UBC
November 7, 2013
1. Pareto optimality
SomeGenericStartup is planning to hire UBC students for an 8-month internship. They are interested in students that have performed well in EECE 320 and EECE 315. Because
Midterm Exam 2 Solutions
Fall 2012 EECE 320 UBC
November 8, 2012
1. Elementary Graph Properties: 10 1 = 10 points.
Given a simple undirected graph G = (V, E) with n vertices, V = cfw_v1 , v2 , . . . , vn , and m edges, answer
the following questions.
(a)
Midterm Exam 1
Fall 2012 EECE 320 UBC
October 4, 2012
Candidates name:
Student number:
Remarks
1. Each question is worth 10 points.
2. If you write I do not know for a question that should be marked then you will receive 20% of the
marks for that question
Topics for the day
Some examples
Discrete Structures & Algorithms
Lecture 9
Questions on graphs and solutions
Ideas for other proofs
Graphs and Trees: II
Minimal spanning trees
EECE 320 UBC Fall 2008
Times change. The farmer's daughter now tells jokes abo
A binary search tree (BST) is a binary
tree with the following properties:
Discrete Structures & Algorithms
Lecture 7
! The key of a node is always greater
than the keys of the nodes in its left
subtree.
Efficient data structures and algorithms
(Red-black
Counting II:
Recurring Problems and
Correspondences
Discrete Structures & Algorithms
Lecture 12
Counting
EECE 320 UBC Fall 2008
(
+
+
)(
+
)=?
1-1 onto Correspondence
( just correspondence for short)
A
B
Correspondence Principle
If two finite sets can be
edge
vertex
Discrete Structures & Algorithms
Lecture 8
Graphs and Trees: I
EECE 320 UBC Fall 2008
Theres a difference between knowing the path and walking the path.
Morpheus [Laurence Fishburne], The Matrix (1999)
Vertex degree is 3
1
Lunchroom arrangeme
Review of last lecture
Discrete Structures & Algorithms
Lecture 2
Propositional Logic
EECE 320 : UBC : Fall 2008
1
! Pancake sorting
! A problem with many applications
! Bracketing (bounding a function)
! Proving bounds for pancake sorting
! You can make
Bits of wisdom
What did our brains evolve to do?
Discrete Structures & Algorithms
Lecture 3
Predicate Logic & Proofs
EECE 320 : UBC : Fall 2008
1
What were our brains
intelligently designed to do?
What kind of meat did the Flying
Spaghetti Monster put in
Dominoes
Domino Principle: Line up
any number of dominos in a
row; knock the first one over
and they will all fall.
Discrete Structures & Algorithms
Lecture 4
Mathematical Induction
EECE 320 UBC Fall 2008
2
Dominoes numbered 1 to n
Fk = The
kth
Dominoes n
Discrete Structures & Algorithms
Lecture 11
Counting I: One-To-One
Correspondence
and Choice Trees
Counting
EECE 320 UBC Fall 2008
If I have 14 teeth on the top and 12
teeth on the bottom, how many
teeth do I have in all?
Addition Rule
Let A and B be two
Midterm Exam 1 Solutions
Fall 2012 EECE 320 UBC
1.
(a) True or False: 5 1 = 5 points. For each of the following, indicate if the statement is true or
false. No justification is needed.
i.
ii.
iii.
iv.
v.
If f (n) = ni=0 i2 then f (n) (n2 ). TRUE.
If f (n)