Mena Sargios
Quiz von , erstellt am more than 1 year ago

Algorithms and Data Structures | Test 3 Review | CSCI-3110-002 MTSU

485
0
0
Mena Sargios
Erstellt von Mena Sargios vor mehr als 7 Jahre
Schließen

7. Algorithm Growth Rate

Frage 1 von 15

1

Algorithm analysis focuses on the ORDER of an algorithm, that is it's ____ rate function.

Wähle eine der folgenden:

  • Growth

  • none of the above

Erklärung

Frage 2 von 15

1

Q: Which of these algorithms is faster

Wähle eine der folgenden:

  • a.N^2

  • b.N

  • c.N^2 +2N

  • d.N + N

  • e.a & c

  • f.b & d

Erklärung

Frage 3 von 15

1

what is algorithm analysis concerned with?

Wähle eine der folgenden:

  • A.what its start points are

  • B,how well it handles inputs

  • C.how fast a program runs

  • D.how many times it loop

Erklärung

Frage 4 von 15

1

Algorithm analysis focuses on the ORDER of an algorithm

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 5 von 15

1

what is the name of this common growth rate O(1)?

Wähle eine der folgenden:

  • A)factorial

  • B)linear

  • C)constant time

  • D)logarithmic

Erklärung

Frage 6 von 15

1

If an algorithm requires f(n) time, then it is oder f(n), or O(f(n)),
if there is a constant k such that for large values of n:

Wähle eine der folgenden:

  • a. f(n) >= k*f(n)

  • b. f(n) = f(n^2)

  • c. f(n) <= k*f(n)

  • d. None of the above!

Erklärung

Frage 7 von 15

1

What is the order of the function x^2 - 7x + 3?

Wähle eine der folgenden:

  • A) O(n)

  • B) O(log n)

  • C) O(2n)

  • D) O(n^2)

Erklärung

Frage 8 von 15

1

Algorithm analysis focuses more on how fast a program runs rather than how efficient the algorithm is as inputs increase.

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 9 von 15

1

Which of the following is a reasonable conclusion from analzying an algorithm?

Wähle eine der folgenden:

  • A. The algorithm requres 5 * N time units to solve a problem with N inputs

  • B. The program implementing the algorithm took 0.5 seconds to execute

  • C. Algorithm A requres more time units to solve a problem than B

  • D. The algorithm appears effecient because it looks like it would be.

Erklärung

Frage 10 von 15

1

What is O(1)?

Wähle eine der folgenden:

  • A) Logarithmic

  • B) Linear

  • C) Constant

  • D) None of the above

Erklärung

Frage 11 von 15

1

All of the following are properties of growth-rate functions except for one.
Which is NOT a property of growth-rate functions?

Wähle eine der folgenden:

  • A. can ignore lower order terms

  • B. cannot ignore the multiplicative constant for the highest-order term

  • C. the sum of orders is the order of the sums

  • D. the product of orders is the order of the products

Erklärung

Frage 12 von 15

1

Algorithm analysis reaches conclusions like:

Wähle eine der folgenden:

  • A. Algorithm A requires N^2/5 time units to solve a problem with n inputs

  • B. Algorithm B requires 5*N time units to solve a problem with n inputs

  • C. Algorithm B is more efficient than Algorithm A

  • D. All of the above

Erklärung

Frage 13 von 15

1

These typical growth rates are put in order from best to worst

O(1), O(log N), O(N logN), O(log^2 N), O(N), O(N^2), O(N^3), O(2^N)

Wähle eins der folgenden:

  • WAHR
  • FALSCH

Erklärung

Frage 14 von 15

1

Is the following description of properties of growth-rate function correct?

1) ignore lower order terms
2) ignore the multiplicative constant for the highest-order term
3) O ( f(n) ) + O ( g(n) ) = O ( f(n) + g(n) )

Wähle eine der folgenden:

  • a. yes, correct

  • b. no, incorrect

Erklärung

Frage 15 von 15

1

If f(n) = n^4 and g(n) = 4n, what is O( f(n) ) + O( g(n) )?

Wähle eine der folgenden:

  • O( f(n) + g(n) ) = O(n^4 + 4n) = O(n^4)

  • none of the above

Erklärung