



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!




Exercise 1. Formulate the basic counting techniques, namely, the product rule (4 pt), the sum rule (4 pt), and the inclusion-exclusion principle (4 pt).
Exercise 2. A computer company receives 350 applications from computer graduates for a job planning a line of new Web servers. Suppose that 220 of these people majored in computer science, 147 majored in business, and 51 majored both in computer science and in business. How many of these applicant majored neither in computer science nor in business? (10 pt) In order to earn the full credit, clearly indicate each step of the solution of your problem and which counting techniques you used.
Solution. We denote the universal set of all applicants by U, the set of people who major in computer science by C and the set of people who major in business by B. Then, |U| = 350, |C| = 220, |B| = 147, and |C ∩B| = 51. We have to find the number |C ∩B|. By applying the IE principle, we obtain that the number of applicant who major in either computer science, or in business, or in both, is equal to |A ∪ B| = |A| + |B| − |A ∩ B| = 220 + 147 − 51 = 316. The complement of the set A ∪ B is the set of all people who major in neither computer science nor in business which is the set of our interest. Therefore, we obtain |A ∩ B| = |U| − |A ∪ B| = 350 − 316 = 34. The final answer is 34.
Exercise 3. (14 pt) How many solutions are there to the equation
x 1 + x 2 + x 3 + x 4 + x 5 + x 6 = 26
where xi, i = 1, 2 , 3 , 4 , 5 , 6, is a nonnegative integer such that
x 1 ≥ 1 , x 2 ≥ 2 , x 3 < 2 , and x 6 ≥ 5.
Solution. This problem is equivalent to the problem of distributing 26 in- distinguishable balls into six distinguishable urns under certain restrictions given by the above inequalities. Here, xi denotes the number of balls in the i-th urn. We solve this problem in several steps. First, we notice that the first urn must have at least one ball, the second urn – at least two balls and the six urn – at least five balls. So, we denote x 1 = y 1 + 1, x 2 = y 2 + 2, and
x 6 = y 6 + 5, substitute these relations into the original equation and obtain the equivalent problem: find the number of the solutions of the equation
y 1 + y 2 + x 3 + x 4 + x 5 + y 6 = 26 − 1 − 2 − 5 = 18
where y 1 , y 2 , x 3 , x 4 , x 5 , and y 6 are nonnegative integers, under the restriction x 3 < 2.
On the second step, we remove the restriction x 3 < 2 from the consid- eration. This restriction is equivalent to two cases, namely, the case x 3 = 0 (no balls in the third urn) and the case x 3 = 1 (exactly one ball in the third urn). We consider these two cases separately.
In the first case, we have to distribute 18 indistinguishable balls into five distinguishable urns (we do not count the third urn). This can be done in C(18 + 5 − 1 , 18) = C(22, 18) = C(22, 4) ways. (We recall that if there are n balls and r urns, then the number of ways to put the balls into urns is equal to C(n + r − 1 , r − 1) = C(n + r − 1 , r − 1)).
In the second case, we put one ball in the third urn and distribute the rest 17 balls in the other five urns. It can be done in C(17+5− 1 , 5 −1) = C(21, 4) ways.
Finally, we combine these two cases by invoking the sum rule. The final answer is as follows. There are C(22, 4) + C(21, 4) = 13, 300 solutions of the original problem.
Exercise 4. What is a transitive closure of a relation R? (4 pt) Let R be a relation on set A with |A| = 5 which is presented by matrix MR. Which matrix presents the transitive closure of R? (6 pt)
Solution. Since the set A consists of five elements, the matrix M presenting the transitive closure of R is given by
where M R[k ]denotes the k-th Boolean power of the matrix MR, k = 2, 3 , 4 , 5.
the formula id(s) = s for all s ∈ S. This is a bijection between S and S. Also, the cardinality of the empty set is equal to the cardinality of the empty set. Therefore, (S, S) ∈ R for all subsets S.
Symmetricity. The symmetricity means that if (S, T ) ∈ R for some sets S and T , then also (T, S) ∈ R. Let assume that (S, T ) ∈ R. Then, in the case when S and T are non-empty, there exists a bijection f : S → T. It is invertible and the function f −^1 : T → S is also a bijection. Therefore, (T, S) ∈ R. The second case, when S = T = ∅, is trivial.
Transitivity. Let S, T , and V be three non-empty sets which satisfy (S, T ) ∈ R and (T, V ) ∈ R. It means that there exist a bijection f : S → T and a bijection g : T → V. Let us take h = g ◦ f : S → V. It is a bijection from S to V. Therefore, (S, V ) ∈ R. So, R is transitive.
Finally, we have to describe the equivalence classes. First, if S is finite and T is infinite, then no bijection between S and T exists. Therefore, (S, T ) 6 ∈ R. Now, we consider two cases. If both S and T are finite, then they are equivalent iff they have the same number of elements. So, for each non-negative integer n we define the class
An = {S ⊆ Z : |S| = n}
of sets which consist of exactly n elements.
Since Z is countable, and all infinite subsets of Z are also countable, we obtain another equivalence class
A∞ = {S ⊆ Z : S is an infinite set }.
Finally, the set A can be presented as the union of disjoint classes by
n=
An
Exercise 7. Define the concept of isomorphism of two graphs. (4 pt) Which graph invariants will you look for in order to prove that two DIRECTED graphs are not isomorphic? (2 pt each, 6 pt MAX)
Exercise 8. For the pair of graphs on the figures below, determine the adjacency matrices. (5 pt for the only matrix or 8 pt for both) Determine whether the pair of graphs is isomorphic. Exhibit an isomorphism or provide a rigorous proof that none exists. (12 pt)
u 6 u^2
u (^1)
u (^3)
u (^4)
u (^5)
v (^2)
v (^5)
v (^6)
v (^4) v (^3)
v (^1)
Solution. Let us take a closer look at the graphs. If on the graph from the left we move the vertexes u 1 and u 4 inside the circuit formed by vertexes u 2 , u 3 , u 5 , and u 6 , we get an equivalent picture shown below
u (^2)
u (^5) u (^3)
u (^6) u 1
u (^4)
v (^2)
v (^5)
v (^6)
v (^4) v (^3)
v (^1)
a circuit by taking the eligible edge with the least index of the adjacent point. We obtain the following circuit: P 1 , P 2 , P 3 , P 1 , P 4 , P 2 , P 5 , P 4 , P 6 , P 1. There is no further way to go from P 1 Since we have not passed through all edges, we define the graph H which is the triangle connecting vertices P 3 , P 5 , and P 6. Vertex P 3 lies on the already constructed circuit, therefore, we form another circuit P 3 , P 5 , P 6 , P 3 on H and insert it into our circuit. In the result, we obtain the circuit P 1 , P 2 , P 3 , P 5 , P 6 , P 3 , P 1 , P 4 , P 2 , P 5 , P 4 , P 6 , P 1. Since it traverses each edge exactly once, and all edges are involved, this circuit is a desired Euler circuit.