Professional Documents
Culture Documents
Midterm
Instructor: Soumyottam Chatterjee Student Name: Uttkarsh Kohli
Due: March 22, 2022 Uttkarsh.kohli 24@ashoka.edu.in
1
2
Problem 1 (6 points)
2
Prove that xx = o(1.001x ). You may assume that each of the domain and the codomain
is R+ , i.e., the set of positive real numbers. You may not make any use of Stirling’s
approximation or of the ”limit definition” of the o-notation.
Answer:
Proof:
let f (x) = c ∗ x − ln(x)
f ′ (x) = c − 1/x, for x > 1/c we have f ′ (x) > 0 therefore it is increasing.
Since we have ∀c > 0, c ∈ R+ Let k = max{1, 1c } then ∀x > k, we have ln(x) < c ∗ x
2
To prove : ∀c > 0, c ∈ R+ ∃k : {∀x > k, xx < c ∗ (1.001)x }
2
Let f(x) = ln(c ∗ (1.001)x ) − ln(xx )
if ln(c) > 0 then let g(x) = x2 ln(1.001) − xln(x) then we have f (x) > g(x)
1
Claim: for ln(c) > 0 we have f (x) > g(x) > 0, ∀x > ln(1.001)
thus g(x) > 0 when x ∗ C − ln(x) > 0 [for C = ln(1.001)] which we know from above is
1
true ∀x > ln(1.001)
1
since we have ln(c) > 0 then f (x) = ln(c) + g(x) > ln(c) + 0 > 0, ∀x > ln(1.001)
2 ln(1.001)
then ln(c) + x2 ln(1.001) > xln(x) which implies eln(c)+x > exln(x) for x ∈ R+
2
=⇒ xx < c ∗ (1.001)x
1
Since we have ∀c > 0, c ∈ R+ Let k = ln(1.001)
then ∀x > k, we have ln(x) < c ∗ x
x x2
it is proved, x = o(1.001 ).
4
For a proposition of n variables, each variable can have 2 values: True or false. Therefore,
by the product rule there are a total 2 ∗ 2 ∗ ..... ∗ 2[n times] = 2n different combinations
of the truth values of n variables.
This represents 1 specific arrangement with 2n values. Since we have to find the total num-
ber of different truth tables that can be formed and we know one table has 2n elements,
n
and each can have 2 values: True or false. There will be a total of 2∗2∗.....2[2n times ] = 22
n
Hence proved, there are 22 different truth tables for propositions in n variables.
Total number of upper case letters: 26 Total number of lower case letters: 26 Total
number of underscore characters: 1 Total number of digits: 10
To find: number of different variable names possible under the given conditions.
Conditions:
1) The first character is either a letter(lowercase or uppercase) or an underscore. Total
possible characters for the first character:
26 + 26 + 1 = 53 [Rule of Sums] 2) Rest of the characters can be uppercase letters,
lowercase letters, digits, or underscores. Total possible characters for the rest of the char-
acters: 26 + 26 + 10 + 1 = 63.
By the rule of products, the total number of different variables satisfying the condi-
tions are :
By the rule of sums, the total number of different variables satisfying the conditions
are :
Answer: 53 ∗ 637 + 53 ∗ 636 + 53 ∗ 635 + 53 ∗ 634 + 53 ∗ 633 + 53 ∗ 632 + 53 ∗ 631 + 53
212133167002880
6
Problem 4 (3 points)
Counterexample:
f (x) = x, f : {1, 2} → {1, 2, 3, 4}. [f is one-to-one on its domain]
(
x, x ̸= 4
g(x) = , g : {1, 2, 3, 4} → {1, 2, 3, 4}. [g is many-to-one on its domain since f(3)=f(4)=3]
3, x = 4
Problem 5 (4 points)
To prove:
Prove that if n is an odd positive integer, then n2 ≡ 1 (mod 8).
Proof:
If n is an odd positive integer then n = 2k + 1, k ∈ Z≥0 .
n2 = (2k + 1)2 = 4k 2 + 4k + 1
Since these 2 cases are exhaustive (an integer is either odd or even), it is proved: if
n is an odd positive integer, then n2 ≡ 1 (mod 8).
8
Problem 6 (6 points)
Answer:
Pre requisite -
Claim: If an odd number is a perfect square, it is the perfect square of an odd number.
p: x2 , x ∈ N is odd
q: x, x ∈ N is odd
To prove: p → q
Proof by contraposition: Assume ¬q, let x be not an odd number, then x is even,
x = 2k, k ∈ N .
x2 = (2k)2 = 4k 2 = 2(2k 2 )
since 2 divides x2 , x2 is even =⇒ x2 is not odd which is ¬p.
(¬q =⇒ ¬p) ⇐⇒ (p =⇒ q)
Therefore claim holds, proof by contraposition.
Each integer in the above sequence can be represented as 10n + 10n−1 + 10n−2 + .... + 1
Proof by contradiction:
Assume: Sn is a perfect square.
Since Sn has 1 as the unit digit, it is not divisible by 2 and thus it is odd =⇒ it is the
perfect square of an odd number. [Proved above]
2(m − x) = 5
Problem 7 (3 points)
Proof by induction:
Basis: for n = 1, (3!)1 = 3! = 6, (3n)! = (3 ∗ 1)! = 6 and 6|6. therefore the statement
holds for n = 1.
Induction hypothesis: Assume for all m such that n > m > 1, m ∈ N , assume (3!)m |(3m)! =⇒
(3m)! = k ∗ (3!)m for some k ∈ N
case 1: m is even.
=⇒ m = 2p, p ∈ N
3m + 2 = 6p + 2 = 2(3p + 1)
=⇒ 2|(3m + 2) and since 3|3m, we have (3 ∗ 2)|((3m) ∗ (3m + 2))
thus we have 3!|((3m) ∗ (3m + 2))
case 2: m is odd.
=⇒ m = 2p + 1, p ∈ N
3m + 1 = 6p + 3 + 1 = 2(3p + 2)
=⇒ 2|(3m + 1) and since 3|3m, we have (3 ∗ 2)|((3m) ∗ (3m + 1))
thus we have 3!|((3m) ∗ (3m + 1))
Therefore, it is proved by induction: we have (3!)n) |(3n)! for all natural numbers.
Proof: b = ak, d = cp
bd = ak ∗ cp = akcp
clearly a|bd and c|bd and ac|bd.