1-2 | Quiz I Flashcards
13 in binary system?
1101
174 in binary system?
10101110
Size of an instance
What is the size of a positive integer 𝑛?
eg 13, 174
algorithm to determine this?
13 is represented by 4 bits
174 is represented by 8 bits
procedure size(𝑛)
s ← 0
while (𝑛 > 0) do
𝑛 ← ⌊𝑛/2⌋
𝑠 ← 𝑠 + 1
return 𝑠
1.
Suppose that a is a positive integer. To prove the claim “If a<sup<2</sup> is even, then a is even”, by contradiction, we assume:
- a<sup<2</sup> is even and a is even
- a<sup<2</sup> is odd and a is odd
- a<sup<2</sup> is odd and a is even
- a<sup<2</sup> is even and a is odd
a<sup<2</sup> is even and a is odd
2.
Suppose that a is positive integer. If a is divisible by 5 and a is divisible by 3, then:
- a = 3k, where k is an integer divisible by 2
- a = 15k, where k is an integer
- a = 3k, where k is an integer that is not divisible by 5
- a = 5k, where k is an integer that is not divisible by 3
a = 15k, where k is an integer
3.
The summation Σ1≤k≤nk(k+1) equals
- n(n+1)
- n2
- n(n+1)/2
- n(n+1)(n+2)/3
n(n+1)(n+2)/3
4.
The summation Σ1≤s≤n(2-s)2 equals
- 4n + 6Σ1≤s≤ns + Σ1≤s≤ns2
- 2n + 6Σ1≤s≤ns
- 4n -4Σ1≤s≤ns -Σ1≤s≤ns2
- 4n -4Σ1≤s≤ns + Σ1≤s≤ns2
4n -4Σ1≤s≤ns + Σ1≤s≤ns2
5.
TRUE or FALSE:
Let logax denote logarithm with base a of x. Then, x = blogax, where a ≠ b.
FALSE
6.
TRUE or FALSE:
If a is rational and a*b is irrational, then b is irrational.
TRUE
7.
TRUE or FALSE:
Σ2≤i≤n-2k(k-1)(n-k) = Σ0≤i≤nk(k-1)(n-k).
FALSE
8.
TRUE or FALSE:
Σ1≤i≤nln(ai*bi/ci) = Σ1≤i≤nln(ai) + Σ1≤i≤nln(bi) - Σ1≤i≤nln(ci)
TRUE
9.
TRUE or FALSE
Σ1≤i≤nb + Σ1≤j≤ma = nb+(m+1)a
FALSE
10.
The summation Σ2≤i≤n(i+1) equals:
- (n2+3n-4)/2
- (n+1)2
- (n-1)(i+1)
- n(n+1)/2
(n2+3n-4)/2