Solutions of Assignment 1

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

Discrete Mathematics DATE: 29.07.

2018

Solutions of Assignment 1:
Instructor: Sourav Chakraborty Scribe: Debasmita Bhoumik

Problem 1: Let R, S and T be three sets. Answer whether the following statements
are true or false. In either case present a proof:

(a) (R ∪ S) = (R ∪ T ) =⇒ (S = T )
Answer: FALSE
Proof. (Proof by counter example.)
Let, R = {1, 2, 3, 4}, S = {3}, T = {4}.
R ∪ S = {1, 2, 3, 4}
R ∪ T = {1, 2, 3, 4}
∴R∪S =R∪T
But S 6= T . 2
(b) (R ⊆ S) =⇒ ((R ∩ T ) ⊆ (S ∩ T )))
Answer: TRUE
Proof. Let x ∈ R.
As R ⊆ S, x ∈ S too.
If x ∈ R ∩ T ,
x ∈ R and x ∈ T
=⇒ x ∈ S and x ∈ T
=⇒ x ∈ (S ∩ T )
∴ (R ∩ T ) ⊆ (S ∩ T )
∴ (R ⊆ S) =⇒ ((R ∩ T ) ⊆ (S ∩ T )). 2
(c) (S ⊆ T ) ⇐⇒ ((S ∩ T ) = S)
Answer: TRUE
Proof. This has two parts.

Part 1: To show (S ⊆ T ) =⇒ ((S ∩ T ) = S)


Firstly, it is obvious that always (S ∩ T ) ⊆ S.
So all we have to show is that (S ⊆ T ) =⇒ (S ⊆ (S ∩ T )).
Let, x ∈ S
∴ x ∈ T [as S ⊆ T ]
So, x ∈ S and x ∈ T
∴x∈S∩T
∴ S ⊆ (S ∩ T )

∴ (S ∩ T ) = S

Part 2: To show ((S ∩ T ) = S) =⇒ (S ⊆ T )


Let, x ∈ S

1-1
=⇒ x ∈ (S ∩ T ) [as S ∩ T = S]
=⇒ x ∈ S and x ∈ T
∴x∈T
∴S⊆T

∴ ((S ∩ T ) = S) =⇒ (S ⊆ T )

So (S ⊆ T ) ⇐⇒ ((S ∩ T ) = S) 2
(d) (R ∪ S) = (R ∪ T ) ⇐⇒ ((S-R) = (T -R))

Answer: TRUE
Proof. This has two parts.

Part 1: To show (R ∪ S) = (R ∪ T ) =⇒ ((S-R) = (T -R)).


Let, x ∈ R ∪ S and x ∈
/ R.
∴x∈S−R
Now, x ∈ (R ∪ T )
∴ x ∈ (T − R)

∴ (S − R) ⊆ (T − R)

Similarly, Let, x ∈ R ∪ T and x ∈


/ R.
∴x∈T −R
Now, x ∈ (R ∪ S)
∴ x ∈ (S − R)

∴ (T − R) ⊆ (S − R)

∴ (T − R) = (S − R)

∴ (R ∪ S) = (R ∪ T ) =⇒ ((S-R) = (T -R))
Now we have to proof the converse.

Part 2: To show ((S-R) = (T -R)) =⇒ (R ∪ S) = (R ∪ T ).


(R ∪ S) = R ∪ (S − R) and similarly, (R ∪ T ) = R ∪ (T − R).
So, if (S − R) = (T − R) we have (R ∪ S) = (R ∪ T ).
2
(e) P (S ∩ T ) = P (S) ∩ P (T )
Answer: TRUE

Proof. Let, x ∈ S ∩ T
∴ x ∈ P (S ∩ T )

1-2
Now, x ⊆ S ∩ T
=⇒ X ⊆ S ∧ x ⊆ T
=⇒ x ∈ P (S) ∧ x ∈ P (T )
=⇒ x ∈ P (S) ∩ P (T )
∴ P (S ∩ T ) ⊆ P (S) ∩ P (T )

Now, let assume,


x ∈ P (S) ∩ P (T )
∴ x ∈ P (S) ∧ x ∈ P (T )
=⇒ x ⊆ S ∧ x ⊆ T
=⇒ x ⊆ S ∩ T
=⇒ x ∈ P (S ∩ T )

∴ P (S) ∩ P (T ) ⊆ P (S ∩ T )

∴ P (S ∩ T ) = P (S) ∩ P (T ). 2

(f) (S × T )c = S c × T c

Answer: FALSE

Proof. Proof by counter example.


Let, S = {1, 2}, T = {3, 4}, U = {1, 2, 3, 4, 5}
S × T = {(1, 3), (1, 4), (2, 3), (2, 4)}
|(S × T )c | = 21 [as total 25 pairs are possible]
S = {3, 4, 5}, T = {1, 2, 5}
|S| × |T | = 3X3 = 9
9 6= 21. 2

Problem 2: Prove or Disprove:

(a) The Cartesian product is associative.


Answer: FALSE
Proof. Proof by counter example. Let, A = {1}
((A × A) × A) = ((1, 1), 1).
(A × (A × A)) = ((1, (1, 1)).
But they are not equal. 2

(b) The Cartesian product is commutative.


Answer: FALSE
Proof. Proof by counter example. Let, A={1,2}, B={3,4}
∴ A × B = {(1, 3), (1, 4), (2, 3), (2, 4)}
and B × A = {(3, 1), (4, 1), (3, 2), (4, 2)}
∴ A × B 6= B × A. 2

1-3
(c) The relation “is connected to” for a pair of vertices in an undirected graph is an
equivalence relation.
Answer: TRUE

Proof.
• Reflexive: Let V is the set of vertices, v ∈ V .
Now, v is connected to v.
∴ vRv exists.
• Symmetric: Let u, v ∈ V .
Now, if uRv (u is connected to v) then vRu (v is connected to u) by going
through the edges in the reverse order.
• Transitive: Let u, v, w ∈ V .
Now, if uRv and vRw, then uRw, by first going from u to v and then going
from v to w,

∴ It is an equivalence relation.
2

(d) The set Q+ is countable.


Answer: TRUE

Proof. To show that Q+ is countable we need to show a 1-1 mapping from


Q+ to N.
If pq ∈ Q+ , where p, q ∈ mathbbN and q 6= 0 then let us define the bijection as
follows.
p
F ( ) = 2p (2q − 1)
q
All we need to prove is that the function F is 1-1.
Let us prove by contradiction. Let F (p/q) = F (r/s).
Then 2p (2q − 1) = 2r (2s − 1).
Since q, s ≥ 1 so (2q − 1) and (2s − 1) are both non-zero.
The maximum power of 2 that divides LHS is 2p while the maximum power of 2
that divided RHS is 2r .
So if 2p (2q − 1) = 2r (2s − 1) then p must be equal to r.
And in that case we have (2q − 1) = (2s − 1) which means q = s.
So if F (p/q) = F (r/s) then p = r and q = s.
So F is a 1-1 function and hence Q+ is countable. 2

Problem 3: Is the relation “is at least as popular as” a valid ordering and if so is it a
partial ordering or a total ordering?
Proof.
Proof of non-transitive: (by counter example)
Let us assume it is transitive.
Therefore if there are 3 contestants A, B and C. Then if A > B and B > C then it

1-4
must be A > C.
Let there are 3 voters, namely 1, 2 and 3. Their preferences for contestants are as
follows in Table.

1 2 3
a b c
b c a
c a b

Table 1: Preference

Now from column 1 and 3, a > b, from column 1 and 2, b > c.


But from column 2 and 3, c > a.
∴ it is non transitive. So there is no valid ordering. 2

Problem 4: Let R be a relation on S. Prove that x∈S |N + (x)| = x∈S |N − (x)| = m.


P P
Proof. Consider the relation as a directed graph.
∴ if (x,y) ∈ R then there is an edge x− > y.
Suppose the out-degree of x is k. Then these k edges incident on some other nodes.
∴ out-degree of x adds the same to the total in-degree
∴ if outdegree of x is k then for entire graph, out degree increases k and indegree
increases
P k too.
∴ degree x = indegree = outdegree
Now |R| = m, therefore total m edges. Each edge is connected with some node.
Consider vertex x1 , let the edge is m1 , for x2 , let it be m2 , and so on ...
∴ m1 + m2 + ... = m But m1 = Out-degree of x1 , m2 = Out-degree of x2 , and so on.
∴ sum
P of total out-degree
P =m. Similarly for in-degree.
So, x∈S |N + (x)| = x∈S |N − (x)| = m. 2

Problem 5: How many functions are there from a domain of size n to a range of size
m?
For each element of domain (=n) we can have m different functions.
D = {x1 , x2 , ...xn }
R = {y1 , y2 , ...ym }
The set of functions S={f (x1 ), f (x2 ), ..., f (xn )}
Now, f (x1 ) can be chosen in m ways, f (x2 ) can be chosen in m ways, and so on..
The number of functions =
m ∗ m ∗ m ∗ ... ∗ m [n times]=mn

Problem 6: How many one to one functions are there from a domain of size n to a
range of size m?
There can be two cases.

1-5
Case 1: If m ≥ n:
There will be m ways to map 1st element, m − 1 ways to map 2nd element, m − 2
ways to map 3rd element, ... , (m − n + 1) way to map nth element.
So, m∗(m−1)∗(m−2)∗....∗(m−n+1) = m!/(m−n)! =m Pn number of into functions.

Case 2: If m < n:
Not possible.

Problem 7: How many onto functions are there from a domain of size n to a range of
size m?
Let S be the domain of size n and R be the range of size m, with m ≤ n. If m > n
then the number of onto functions from S to R is 0.
Let R = {y1 , . . . , ym }.
Any function f from S to R is defined by the sets f −1 (y1 ), . . . , f −1 (ym ).
If f is onto we have the additional property that for all i f −1 (yi ) is non-empty.
So the number of onto functions from S is to R is the number of ways the elements
of S can be partitioned into m non-empty subsets.
This number is
m  
i m
X
(−1) (m − i)n .
i
i=0

Problem 8: If f is a function from the set D = {1, 2, 3, . . . , 100} to R = {1, 2, . .


. , 200}. How many decreasing functions are there from D to R and how
many non-increasing functions are there from D to R.
If f is an decreasing function then the function is defined by the set {f (1), . . . , f (100)}
and given a subset of R of size n there is an unique decreasing function. So the number
of decreasing function is 200
100 .

Any function f from D to R is defined by the sets f −1 (1), . . . , f −1 (200).


If f is a non-increasing function we have the additional property that for all i, j ∈ R
if i < j then all the elements in f −1 (j) is before all the element in f −1 (i).
So such a non-increasing function is just defined by the size of f −1 (1), . . . , f −1 (200).
So the number of onto functions from S is to R is the number of ways 100 identical
objects can be partitioned into 200 subsets. The number is 299 100 .

1-6

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy