Professional Documents
Culture Documents
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:
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 ...
... ... ... ... ... ... ... ...
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:
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))
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
−x + 3 = 0
(7)
x=3