• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 5 páginas
Examen

AlgDes Ch02: Algorithm Analysis Questions With Answers

Document preview thumbnail
Vista previa 2 fuera de 5 páginas

AlgDes Ch02: Algorithm Analysis Questions With Answers. Complete set of exam questions with correct answers for Algorithm Design and Analysis exam preparation and revision. Ideal for reviewing key concepts and practicing before your test.

Vista previa del contenido

AlgDes Ch02: Algorithm Analysis Questions With
Answers
Question 1.
What are the 2 most important tools for comparing the efficiency of algorithms without
implementing them?
Correct Answer: (1) The Random Access Machine (RAM) model of computation,
and (2) the asymptotic analysis of worst-case complexity.

Question 2.
Describe the Random Access Machine model.
Correct Answer: Each simple operation and each memory access take exactly
one time step. Loops and subroutines are not considered simple operations. We
have as much memory and the model doesn't take notice of whether an item is
in cache or on the disk.

Question 3.
What additional assumption allows running times to be computed using the RAM model?
Correct Answer: That the RAM executes a constant number of steps per second.

Question 4.
What are 3 benefits of using the RAM model?
Correct Answer: 1) It allows algorithms to be understood, studied, and
compared in a language-and machine-independent (but not
implementation-independent) manner; 2) it is simple to work with, and 3)
almost never gives misleading results.

Question 5.
What are the 3 algorithm complexity functions and how are they defined?
Correct Answer: (1) Worst-case complexity is defined as the maximum number
of steps performed by the algorithm, taken over all possible input instances for
a given instance size; (2) Best-case complexity is defined as the minimum
number of steps performed by the algorithm, taken over all possible input
instances for a given instance size; and (3) Average-case complexity is defined
as the average number of steps performed by the algorithm, taken over all
possible input instances for a given instance size.

Question 6.
Which of the 3 algorithm complexity functions is most commonly used, and why?
Correct Answer: Worst-case complexity, mostly because of the ambiguities in
working with Average-case complexity. In particular, it is usually difficult to
determine how "average" a particular instance is beforehand, and it may not be
obvious what sorts of instances produce near-worst-case performance.

,Question 7.
What are 2 reasons why it is very difficult to work with the exact algorithm complexity
functions?
Correct Answer: (1) They have too many bumps, and (2) They require too much
detail to specify precisely (becomes implementation-specific, and provides very
little additional information).

Question 8.
What is 1 reason why multiplicative constants are ignored using Big Oh analysis?
Correct Answer: They are language- and machine-dependent.

Question 9.
What is the exact definition of f(n) = O(g(n))?
Correct Answer: c times g(n) is an upper bound on f(n). Thus there exists some
constant c such that f(n) is always <= c times g(n), for large enough n. I.e., for
big enough problems, there is a constant c such that f(n) is always less than c
times g(n).

Question 10.
What is the exact definition of f(n) = Omega(g(n))?
Correct Answer: c times g(n) is a lower bound on f(n). Thus there exists some
constant c such that f(n) is always >= c times g(n), for large enough n. I.e., for
big enough problems, there is a constant c such that f(n) is always greater than
c times g(n).

Question 11.
What is the exact definition of f(n) = Theta(g(n))?
Correct Answer: It's basically a combination of both O and Omega, meaning
that two different multiplicative constants of g(n) provide upper and lower
bounds of f(n) above a certain problem size. So g(n) provides a nice, tight
bound on f(n).

Question 12.
What's the take home lesson regarding Big Oh notation?
Correct Answer: The Big Oh notation and worst-case analysis are tools that
greatly simplify our ability to compare the efficiency of algorithms. The enable
us to ignore the details and focus on the big picture.

Question 13.
n^2 = O(n^3). What is a better way to read the "=" in this case?
Correct Answer: "... one of the functions that are..."

Question 14.
Why is 2^(n+1) = Theta(2^n)?
Correct Answer: The key observation is that 2^(n+1) = 2 times 2^n. So it
doesn't grow faster than 2^n, but instead is always double. I think the mistake
is picturing 2^n in a similar way to how we think of x^n. In the former, n is the
variable. In the latter, n is fixed.

Información del documento

Subido en
2 de diciembre de 2026
Número de páginas
5
Escrito en
2026/2027
Tipo
Examen
Contiene
Preguntas y respuestas
$14.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Favorgrades
3.8
(200)
Vendido
863
Seguidores
376
Artículos
62409
Última venta
4 horas hace



Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes