Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

EST Solutions of UCS405 (Discrete Mathematical Structures) 2018-19

A. 1(a)

i. Those numbers which are multiples of both 3 and 5 are the multiples of 15; hence A 3 ∩
A5 = A15.
ii. The multiples of 20 and no other numbers belong to both A 4 and A5 , hence A4 ∩ A5 =
A20.
iii. Every positive integer except 1 is a multiple of at least one prime number; hence

U i ∈ Q Ai = {2, 3, 4, . . .} = N\{1}

A. 1(b)

i. If the departments share the equipment, then the maximum number of each type is all that
is required, so we want to take the union of the multisets, A + B.
ii. Both departments will use the minimum number of each type, so we want to take the
intersection of the multisets, A * B.
iii. This will be the difference B − A of the multisets.
iv. If no sharing is allowed, then the university needs to purchase a quantity of each type of
equipment that is the sum of the quantities used by the departments; this is the sum of the
multisets, A + B.

A. 1(c)

Let M be the set of students passing in Mathematics P be the set of students passing in Physics C
be the set of students passing in Chemistry Now, n(M ∪ P ∪ C) = 50, n(M) = 37, n(P) = 24, n(C)
= 43 n(M ∩ P) ≤ 19, n(M ∩ C) ≤ 29, n(P ∩ C) ≤ 20 (Given) n(M ∪ P ∪ C) = n(M) + n(P) + n(C)
– n(M ∩ P) – n(M ∩ C) – n(P ∩ C) + n(M ∩ P ∩ C) ≤ 50 ⇒ 37 + 24 + 43 – 19 – 29 – 20 + n(M
∩ P ∩ C) ≤ 50 ⇒ n(M ∩ P ∩ C) ≤ 50 – 36 ⇒ n(M ∩ P ∩ C) ≤ 14 Thus, the largest possible
number that could have passed all the three examinations is 14.

A. 2(a)

For the function to be invertible, it must be a one-to-one correspondence. This means that it has
to be one-to-one, which it is, and onto, which it is not, because, its range is the set of all real
numbers, rather than the set of positive real numbers. When we restrict the codomain to be the
set of positive real numbers, we get an invertible function. In fact, there is a well-known name
for the inverse function in this case-the natural logarithm function (g(x) = ln x).
A. 2(b)

In order to prove that f is one to one, it is required to prove that for any two integers n and m, if
f(n) = f(m) then n = m.

f(n) = f(m) ⇔ n2 + n + 1 = m2 + m + 1

⇔ n2 + n = m2 + m

⇔ n(n + 1) = m(m + 1)

⇔ n = m.

Because product of consecutive natural numbers starting from m and n are equal iff m = n.

Next f is not onto because for any n (odd or even) n2 + n + 1 is odd. This implies that there are

even elements in N that are not image of any element in N.

A. 2(c)

Let f and g are functions whose domains are subsets of Z +. We say f is O(g) if there exists
constants c and k such that |f(n)| ≤ c. |lg(n)| ∀ n ≥ k. Now,

P(n) = a0 + a1n + a2n2+ … + amnm

≤ a0nm + a1nm + a2nm + … + amnm ∀n≥1

= [a0 + a1 + a2 + … + am] nm ∀n≥1

P(n) = O(nm)

A. 2(d)

i. Here our runtime is O(n + n2), which we just call O(n2)


ii. O(n * log 3 n)
A. 3(a)

Minimal element: 1-1-1-1-1-1


Maximal element: 6

A. 3(b)

One of the answers is:

Foundation < Framing < Roof < Exterior siding < Wiring < Plumbing < Flooring < Wall − board
< Exterior painting < Interior painting < Carpeting < Interior fixtures < Exterior fixtures <
Completion.

A. 3(c)

x2 − x − 1=0

Using the quadratic formula, we obtain the roots:

r1 = r2 =

we obtain the general solution:

an = c1 + c2

The initial conditions yield the following system of two linear equations in c1 and c2
For n = 0 and a 0 = 0, we get: 0 = c1 + c2
For n = 1 and a 1 = 1, we get: 1= c1 + c2
The solution of the system follows:
c1 = c2 = −

Accordingly, the following is the solution of the Fibonacci recurrence relation:

an = −

A. 4(a)

The truth values for each element of U under the given conditions of propositions is given in the
following table:

x P(x) Q(x) R(x) P(x) ˄ R(x) [~ Q(x)] ˄ P(x)


-4 0 0 1 0 0
-2 0 0 1 0 0
0 0 0 1 0 0
1 0 0 0 0 0
3 0 0 0 0 0
5 1 1 0 0 0
6 1 0 1 1 1
8 1 0 1 1 1
10 1 0 1 1 1

A. 4(b)

Suppose for the sake of contradiction that this is not true.

Then there exists an x ∈ [0, π/2] for which sin x + cos x < 1.

Since x ∈ [0, π/2], neither sin x nor cos x is negative, so 0 ≤ sin x+cos x < 1.

Thus 02 ≤ (sin x + cos x)2 < 12, which gives 02 ≤ sin2 x+2 sin x cos x+cos2 x < 12.

As sin2 x+cos2 x = 1, this becomes 0 ≤ 1+2 sin x cos x < 1, so 1+2 sin x cos x < 1.

Subtracting 1 from both sides gives 2 sin x cos x < 0.

But this contradicts the fact that neither sin x nor cos x is negative.
A. 4(c)

p q r p↔q (p↔q) ↔r q↔r p↔(q↔r)


F F F T F T F
F F T T T F T
F T F F T F T
F T T F F T F
T F F F T T T
T F T F F F F
T T F T F F F
T T T T T T T

This table shows that (p↔q) ↔r and p↔(q↔r) are logically equivalent.

A. 5(a)

Let G=(V(G),E(G)) and H=(V(H),E(H)) be two graphs.

Let us map a function f: V(G)-> V(H).

Then two graphs are said to be isomorphic, if

i) F is one-one and onto, and

ii) xy ∈ E(G) if and only if f(x) f(y) ∈ E(H)

If not they are called non-isomorphic graphs

Yes G and G’ are isomorphic.

A. 5(b)

Initialization: (k = 0)

Iteration 1: (k = 1) Shorter paths from 2 ↝ 3 and 2 ↝ 4 are found through vertex 1


Iteration 2: (k = 2) Shorter paths from 4 ↝ 1, 5 ↝ 1, and 5 ↝ 3 are found through vertex 2

Iteration 3: (k = 3) No shorter paths are found through vertex 3

Iteration 4: (k = 4) Shorter paths from 1 ↝ 2, 1 ↝ 3, 2 ↝ 3, 3 ↝ 1, 3 ↝ 2, 5 ↝ 1, 5 ↝ 2, 5 ↝ 3,


and 5 ↝ 4 are found through vertex 4
Iteration 5: (k = 5) No shorter paths are found through vertex 5

The final shortest paths for all pairs is given by


A. 5(c)

The only lotus flowers the king’s frog can use as a starting point are 3 and 5.

If one connects two lotuses by a line, as below, wherever it is possible for the frog to make a
jump that satisfies the above conditions, the path and the two possible starting points become
clear.

Indeed, one has connected those numbers that are a distance of three or five apart.

One has thus constructed a graph with vertices 1, 2, …, 7 with edges drawn. A Hamiltonian path
in a graph is a way to connect the vertices so that one passes through each vertex exactly once.

The graph above, therefore, consists of a Hamiltonian path: 3-6-1-4-7-2-5. The king’s frog can
jump along this path starting at 3 and ending at 5, or the other way around.

A. 6(a)

i. Show that the operation * is closed on G.

Solution: If a, b in G, then a>1 and b>1, so b-1>0, and therefore


a(b-1)>(b-1). It follows immediately that ab-a-b+2>1.
ii. Show that the associative law holds for *.

Solution: For a, b, c in G, we have

a * (b * c) = a * (bc-b-c+2)
= a(bc-b-c+2) -a -(bc-b-c +2) +2
= abc -ab -ac -bc +a +b +c .

On the other hand, we have

(a * b) * c = (ab-a-b+2) * c
= (ab-a-b+2)c - (ab-a-b+2) -c +2
= abc -ab -ac -bc +a +b +c .

Thus a * (b * c) = (a * b) * c.

iii. Show that 2 is the identity element for the operation *.

Solution: Since the operation is commutative, the one computation


2 * y = 2y - 2 - y + 2 = y suffices to show that 2 is the identity element.

iv. Show that for element a in G there exists an inverse a-1 in G.

Solution: Given any a in G, we need to solve a * y = 2. This gives us the equation


ay - a - y + 2 = 2, which has the solution y = a / (a-1). This solution belongs to G
since
a > a - 1 implies a / (a-1) > 1. Finally,

a * (a / a-1) = a2 / (a-1) - a - a / (a-1) + 2


= (a2 -a2 + a - a) / (a-1) + 2 = 2.
A. 6(b)

i.

ii.

iii.

iv.

You might also like