CS 173: Discrete Structures
Viraj Kumar Margaret Fleck
Lucas Cook, Samer Fanek, Chen Li, Lance Pittman, Dan Schreiber Rick Barber, Efe Karakus, Adair Liu, Andrew Pikler
1
What is CS 173 about?
Were going to learn: 1. Basic mathematical objects and techni
1
CS 173, Spring 2016
NETID:
Examlet 12, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(a) (9 points) Suppose that G is a graph with 30 nodes. Use proof by contradiction to show that two
of the nodes have the same degree.
(b) (6 points) Supp
Planar Graphs I
Margaret M. Fleck 28 April 2010
This is a half-lecture due to the third quiz. This lecture surveys facts about graphs that can be drawn in the plane without any edges crossing (rst half of section 9.7 of Rosen).
1
Planar graphs
So far, wev
Applications of Equivalence Relations
Margaret M. Fleck 26 April 2010
This lecture nishes the topic of equivalence relations (section 8.5 of Rosen). We show how to show that an operation on equivalence classes is well-dened. And we see more applications o
Equivalence Relations and Partitions
Margaret M. Fleck 23 April 2010
This lecture continues the topic of equivalence relations (section 8.5 of Rosen), including how to prove that something is an equivalence relation.
1
Announcements
Reminder: quiz next We
Equivalence Relations
Margaret M. Fleck 21 April 2010
This lecture nishes the discussion of basic properties of relations and then covers material on equivalence classes from section 8.5 of Rosen, a topic well continue through next Monday.
1
Announcements
Relations
Margaret M. Fleck 19 April 2010
This lecture introduces relations and covers basic properties of relations, i.e. parts of section 8.1 and 8.3 of Rosen. When you look at Rosen, be aware that were covering only relations on a single set, where he
Graph isomorphism/connectivity
Margaret M. Fleck 16 April 2010
This lecture nishes our coverage of basic graph concepts: isomorphism, paths, and connectivity. It shows the basic ideas without covering every possible permutation of these ideas e.g. for die
Graphs
Margaret M. Fleck 14 April 2010
This lecture introduces graphs (section 9.1. and 9.2 of Rosen).
1
Graphs
Graphs are a very general class of object, used to represent a wide variety of relationships and complex objects in computer science. A simple
Counting III
Margaret M. Fleck 12 April 2010
This lecture covers the rest of section 5.4 of Rosen, including combinatorial proof, plus some material from section 5.5.
1
Overview
Well see a bunch of combinatorial formulas, as well as some extended cases of
Counting II
Margaret M. Fleck 9 April 2010
This lecture covers more examples of permutations and combinations, from section 5.3 of Rosen plus part of section 5.4. It also introduces combinatorial proofs.
1
Recap: basic counting methods
Last class, we cove
Structural induction Counting I
Margaret M. Fleck 5 April 2010
This lecture nishes structural induction (in section 4.3 in Rosen) and starts the topic of counting, covering sections 5.1 and 5.3.
1
Announcements
Midterm coming up on Wednesday. If you have
Planar Graphs II
Margaret M. Fleck 30 April 2010
This lecture continues the discussion of planar graphs (section 9.7 of Rosen).
1
Announcements
Makeup quiz last day of classes (at the start of class). Your room for the nal exam (Friday the 7th, 7-10pm) is
Graph Coloring
Margaret M. Fleck 3 May 2010
This lecture discusses the graph coloring problem (section 9.8 of Rosen).
1
Announcements
Makeup quiz last day of classes (at the start of class). Your room for the nal exam (Friday the 7th, 7-10pm) is based on
Cardinality
Margaret M. Fleck 5 May 2010
This is a half lecture due to the makeup quiz. It discussed cardinality, an interesting topic but which doesnt have an obvious xed place in the syllabus. Its covered at the very end of section 2.4 in Rosen.
1
The r
1
CS 173, Spring 2016
NETID:
Examlet 12, Part B
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(9 points) Let f : X Y be any function, and let A and B be subsets of X. For any subset S of
X define its image f (S) by f (S) = cfw_f (s) Y | s S. Is it
1
CS 173, Spring 2016
NETID:
Examlet 9, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(18 points) Suppose that a chocolate bar is a rectangle divided into a p by q grid of squares. Breaking
a chocolate bar along one of the grid lines divides
1
CS 173, Spring 2016
NETID:
Examlet 8, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(20 points) Suppose that g : Z+ Z is defined by
g(1) = 2
g(2) = 8
g(n) = 4( g(n 1) g(n 2) )
Use (strong) induction to prove that g(n) = n2n .
Solution: Pro
1
CS 173, Spring 2016
NETID:
Examlet 12, Part B
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(9 points) Let f : X Y be any function, and let A and B be subsets of X. For any subset S of
X define its image f (S) by f (S) = cfw_f (s) Y | s S. Is it
1
CS 173, Spring 2016
NETID:
Examlet 12, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(a) (9 points) Suppose that G is a graph with 30 nodes. Use proof by contradiction to show that two
of the nodes have the same degree.
Solution: Suppose G
1
CS 173, Spring 2016
NETID:
Examlet 10, Part B
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
1. (7 points) Suppose that f , g, and h are functions from the reals to the reals, such that f (x) is
O(h(x) and g(x) is O(h(x). Must f (x)g(x) be O(h(x)?
1
CS 173, Spring 2016
NETID:
Examlet 10, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(15 points) Use (strong) induction to prove the following claim:
n
X
1
Claim: For any positive integer n,
2 n
p
p=1
Solution:
Proof by induction on n.
n
1
CS 173, Spring 2016
NETID:
Examlet 9, Part A
FIRST:
Discussion:
LAST:
Monday
9
10
11
12
1
2
3
4
5
(18 points) Suppose that a chocolate bar is a rectangle divided into a p by q grid of squares. Breaking
a chocolate bar along one of the grid lines divides
Trees and Structural Induction
Margaret M. Fleck 2 April 2010
This lecture covers some basic properties of trees (section 10.1 of Rosen and introduces structural induction (in section 4.3 of Rosen).
1
Announcements
Midterm coming up next Wednesday. Contac
Trees
Margaret M. Fleck 31 March 2010
Weve seen trees already, but informally. This lecture rms up the details of trees and tree terminology (section 10.1 of Rosen).
1
Announcements
Midterm coming up next Wednesday (the 7th). As for the rst midterm, discu
Proving two sets are equal
In general to show that X = Y we need to show two things: X Y and Y X Occasionally, however, the proof follows directly by logical equivalence: Example (DeMorgans Law): A B = A B Proof: A B = cfw_ x U x A B = cfw_ x U (x A B)
A Direct Proof with
(Transitivity of ): If A B and B C then A C Proof: Let x A Since A B, then by definition y, y A y B So x B Again since B C, then by definition z, z B z C So x C Thus x, x A x C Hence by definition, A C
Another Direct Proof with
Cla
Announcements
Quiz 1 solutions available Graded quizzes will be returned next week
Sets
A set is an unordered collection of objects Three ways to define a set: 1. Describe its contents in mathematical English (e.g., the set of all integers greater than