


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



6.042/18.062J Mathematics for Computer Science October 13, 2010
Tom Leighton and Marten van Dijk
Problem 1. [20 points] [15] For each of the following, either prove that it is an equivalence
relation and state its equivalence classes, or give an example of why it is not an equivalence
relation.
(a) [5 pts] Rn := {(x, y) ∈ Z × Z s.t. x ≡ y (mod n)}
(b) [5 pts] R := {(x, y) ∈ P × P s.t. x is taller than y} where P is the set of all people in
the world today.
(c) [5 pts] R := {(x, y) ∈ Z × Z s.t. gcd(x, y) = 1}
(d) [5 pts] RG := the set of (x, y) ∈ V × V such that V is the set of vertices of a graph G,
and there is a path x, v 1 ,... , vk, y from x to y along the edges of G.
Problem 2. [20 points] Every function has some subset of these properties:
injective surjective bijective
Determine the properties of the functions below, and briefly explain your reasoning.
(a) [5 pts] The function f : R →R defined by f (x) = x sin(x).
(b) [5 pts] The function f : R →R defined by f (x) = 99 x^99.
(c) [5 pts] The function f : R R defined by tan − 1 → (x).
(d) [5 pts] The function f : N →N defined by f (x) = the number of numbers that divide x.
For example, f (6) = 4 because 1 , 2 , 3 , 6 all divide 6. Note: We define here the set N to be
the set of all positive integers ( 1 , 2 ,.. .).
Problem 3. [20 points] In this problem we study partial orders (posets). Recall that a
weak partial order � on a set X is reflexive (x � x), anti-symmetric (x � y∧y � x →x = y),
and transitive (x � y ∧ y � z →x � z). Note that it may be the case that neither x � y
nor y � x. A chain is a list of distinct elements x 1 ,... , xi in X for which x 1 � x 2 � · · · � xi.
An antichain is a subset S of X such that for all distinct x, y ∈ S, neither x � y nor y � x.
2 Problem Set 6
The aim of this problem is to show that any sequence of (n − 1)(m − 1) + 1 integers either
contains a non-decreasing subsequence of length n or a decreasing subsequence of length m.
Note that the given sequence may be out of order, so, for instance, it may have the form
1 , 5 , 3 , 2 , 4 if n = m = 3. In this case the longest non-decreasing and longest decreasing
subsequences have length 3 (for instance, consider 1 , 2 , 4 and 5 , 3 , 2).
(a) [7 pts] Label the given sequence of (n − 1)(m − 1) + 1 integers a 1 , a 2 ,... , a(n−1)(m−1)+1.
Show the following relation � on { 1 , 2 , 3 ,... , (n − 1)(m − 1) + 1 } is a weak poset: i � j if
and only if i ≤ j and ai ≤ aj (as integers).
For the next part, we will need to use Dilworth’s theorem, as covered in lecture. Recall that
Dilworth’s theorem states that if (X, �) is any poset whose longest chain has length n, then
X can be partitioned into n disjoint antichains.
(b) [7 pts] Show that in any sequence of (n − 1)(m − 1) + 1 integers, either there is a
non-decreasing subsequence of length n or a decreasing subsequence of length m.
(c) [6 pts] Construct a sequence of (n − 1)(m − 1) integers, for arbitrary n and m, that
has no non-decreasing subsequence of length n and no decreasing subsequence of length m.
Thus in general, the result you obtained in the previous part is best-possible.
Problem 4. [20 points] Louis Reasoner figures that, wonderful as the Bene˘s network may
be, the butterfly network has a few advantages, namely: fewer switches, smaller diameter,
and an easy way to route packets through it. So Louis designs an N -input/output network
he modestly calls a Reasoner-net with the aim of combining the best features of both the
butterfly and Bene˘s nets:
The ith input switch in a Reasoner-net connects to two switches, ai and bi, and likewise, the jth output switch has two switches, yj and zj , connected to it. Then the Reasoner-net has an N -input Bene˘s network connected using the ai switches as input switches and the yj switches as its output switches. The Reasoner-net also has an N -input butterfly net connected using the bi switches as inputs and¡ the zj switches as outputs.
In the Reasoner-net the minimum latency routing does not have minimum congestion. The
latency for min-congestion (LMC) of a net is the best bound on latency achievable using
routings that minimize congestion. Likewise, the congestion for min-latency (CML) is the
best bound on congestion achievable using routings that minimize latency.
Fill in the following chart for the Reasoner-net and briefly explain your answers.
diameter switch size(s) # switches congestion LMC CML
MIT OpenCourseWare http://ocw.mit.edu
6.042J / 18.062J Mathematics for Computer Science
Fall 2010
For information about citing these materials or our Terms of Use, visit: http://ocw.mit.edu/terms.