1-2 | Quiz I Flashcards

1
Q

13 in binary system?

A

1101

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

174 in binary system?

A

10101110

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Size of an instance
What is the size of a positive integer 𝑛?

eg 13, 174

algorithm to determine this?

A

13 is represented by 4 bits
174 is represented by 8 bits

procedure size(𝑛)
s ← 0
while (𝑛 > 0) do
𝑛 ← ⌊𝑛/2⌋
𝑠 ← 𝑠 + 1
return 𝑠

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

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

a<sup<2</sup> is even and a is odd

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

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

a = 15k, where k is an integer

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

3.

The summation Σ1≤k≤nk(k+1) equals

  • n(n+1)
  • n2
  • n(n+1)/2
  • n(n+1)(n+2)/3
A

n(n+1)(n+2)/3

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

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
A

4n -4Σ1≤s≤ns + Σ1≤s≤ns2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

5.

TRUE or FALSE:

Let logax denote logarithm with base a of x. Then, x = blogax, where a ≠ b.

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

6.

TRUE or FALSE:

If a is rational and a*b is irrational, then b is irrational.

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

7.

TRUE or FALSE:

Σ2≤i≤n-2k(k-1)(n-k) = Σ0≤i≤nk(k-1)(n-k).

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

8.

TRUE or FALSE:

Σ1≤i≤nln(ai*bi/ci) = Σ1≤i≤nln(ai) + Σ1≤i≤nln(bi) - Σ1≤i≤nln(ci)

A

TRUE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

9.

TRUE or FALSE

Σ1≤i≤nb + Σ1≤j≤ma = nb+(m+1)a

A

FALSE

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

10.

The summation Σ2≤i≤n(i+1) equals:

  • (n2+3n-4)/2
  • (n+1)2
  • (n-1)(i+1)
  • n(n+1)/2
A

(n2+3n-4)/2

How well did you know this?
1
Not at all
2
3
4
5
Perfectly