You are on page 1of 2

Student Information

Full Name : Badshah Kazmi


Id Number : 2492106

Q. 1
(A ∪ B) \ (A ∩ B) = {x| x ∈ (A ∪ B) ∧ x ∈
/ (A ∩ B)} ∵ Def inition of dif f erence.
= {x| x ∈ (A ∪ B) ∧ x ∈ (A ∩ B)} ∵ Def inition of complement.
= {x| x ∈ (A ∪ B) ∧ x ∈ (A ∪ B)} ∵ De M organ′ s Law.
= {x| (x ∈ A ∨ x ∈ B) ∧ (x ∈ A ∨ x ∈ B)} ∵ Def inition of ∪ .
(Distributive Law) = {x| (x ∈ A ∧ x ∈ A) ∨ (x ∈ A ∧ x ∈ B) ∨ (x ∈ B ∧ x ∈ A) ∨ (x ∈ B ∧ x ∈ B)}
(Complement Def inition) = {x| (x ∈ A ∧ x ∈
/ A) ∨ (x ∈ A ∧ x ∈
/ B) ∨ (x ∈ B ∧ x ∈
/ A) ∨ (x ∈ B ∧ x ∈
/ B)}
(∈
/ Def inition) = {x| (x ∈ A ∧ ¬(x ∈ A)) ∨ (x ∈ A ∧ x ∈
/ B) ∨ (x ∈ B ∧ x ∈
/ A) ∨ (x ∈ B ∧ ¬(x ∈ B))}
= {x| F ∨ (x ∈ A ∧ x ∈
/ B) ∨ (x ∈ B ∧ x ∈
/ A) ∨ F} ∵ p ∧ ¬p ≡ F
= {x| (x ∈ A ∧ x ∈
/ B) ∨ (x ∈ B ∧ x ∈
/ A)} ∵p∨F ≡p
= {x| x ∈ (A \ B) ∨ x ∈ (B \ A)} ∵ Def inition of dif f erence.
= (A \ B) ∪ (B \ A) ∵ Def inition of ∪ .
(1)

Q.2
Since {0,1} ⊂ N, we can say that:

{f |f ⊆ N × {0, 1}} \ {f |f : {0, 1} → N, f is a f unction} = {f |f ⊆ {N \ {0, 1}} × {0, 1}} (2)

So a set of all subsets of {N \ {0, 1}} × {0, 1} ordered pairs.

Let’s assume that this set is countable, then there exists an enumeration that includes all elements of the
set.
Such an enumeration can be modeled using a table where each row represents a subset (Si ) and each
column represents a pairing of {N \ {0, 1}} × {0, 1} :

2 3 4 5 6 7 ...
S1 0 1 0 1 0 1 ...
S2 1 0 1 0 1 0 ...
S3 0 0 1 1 0 0 ...
S4 1 1 0 0 1 1 ...
S5 0 0 0 1 1 1 ...
S6 1 1 1 0 0 0 ...
... ... ... ... ... ... ... ...

If we flip the diagonal elements we get a subset:


Sx = {(2, 1), (3, 1), (4, 0), (5, 1), (6, 0), (7, 1), ...} ∈ {N \ {0, 1}} × {0, 1} (3)
which is missed by the enumeration, so as proven by contradiction, there does not exist an enumeration
counting each element in {N \ {0, 1}} × {0, 1}, and thus such a set is uncountable.

1
Q.3
Let’s assume that f (n) = 4n + 5n2 logn is O(2n ), then that means that there exist constants c and k such
that:
c2n ≥ |4n + 5n2 log n| ϶n≥k
4n 5n2 log n
c ≥ + (4)
2n 2n
5n2 log n
c ≥ 2n +
2n
2 2
Since 2n + 5n 2log
n
n
is an increasing function and limn→∞ 2n + 5n 2log
n
n
= ∞, for this equation to remain
consistent, c must also increase as n increases so it can’t remain constant.
As proven by contradiction, no constants c and k exist such that c2n ≥ |4n + 5n2 log n| and n ≥ k, thus
f (n) = 4n + 5n2 logn is not O(2n ).

Q.4
Since (2x − 1)n − x2 ≡ −x − 1 (mod(x − 1)), it follows that:

(x − 1) | ((2x − 1)n − x2 ) − (−x − 1)


(5)
(x − 1) | (2x − 1)n − x2 + x + 1

We start with the observation:


2
x − 1))2x − 1
2x − 2
1
So,

2x − 1 ≡ 1 (mod(x − 1))
(2x − 1)n ≡ 1n (mod(x − 1)) ∵ if a ≡ b (mod n) , then an ≡ bn (mod n) f or any positive n. (6)
n
(2x − 1) ≡ 1 (mod(x − 1))

Let f (x) be a function of x, then:

f (x) − (x − 1)
x − 1))(2x − 1)n − x2 + x + 1
f (x) · (x − 1)
1 − x2 + x + 1
−x2 + 2x − 1
−x+3

Since (x − 1) | (2x − 1)n − x2 + x + 1, the remainder must be 0, so:

−x + 3 = 0
(7)
x=3

You might also like