• ¿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 6 páginas
Examen

Algorithm design and analysis terms and techniques Questions With Answers

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

Algorithm design and analysis terms and techniques Questions With Answers

Vista previa del contenido

Algorithm design and analysis terms and
techniques Questions With Answers
Question 1.
Pseudocode
Correct Answer: Notation for writing algorithms that abstracts away some
practical considerations (memory size, cache, word size,...) but lets us write
unambiguous code that is readable by humans, if not by an actual machine.
CLRS p. 20
See RAM model.

Question 2.
Summation
Correct Answer: Sigma notation is used to sum sequences. CLRS ap. A, C.1.
E.g.: _{1djdn} j = n(n+1)/2
They can be manipulated like integrals -- changing variables, reordering, etc.,
but are easier to envision because they are discrete.
Advice: sum over sets, rather than putting indices above and below the sigma,
because it is easier to manipulate the indices.

Question 3.
Recursive definition
Correct Answer: A definition of X in three parts: base cases identify a few X
items, recursive rules create new X items from known X items, and a closure
rule says the only way to generate X items is to start with the base cases and
apply recursive rules finitely many times.
E.g.: Natural numbers 0 in N; for all k in N, k+1 in N; Closure.
Binary trees: nil is a tree; a root node with pointers to left and right trees is a
tree; closure. CLRS B.5.3

Question 4.
Induction
Correct Answer: A technique for proving that a property is true for all items of
a recursively defined set by handling two cases: Base: proves the property
holds for one or more base cases; IS: proves the property holds for a general
non-base item, assuming that we have already proved it holds for all smaller
items (strong induction). See handout; prereq for CLRS (p.xv)

,Question 5.
Invariant
Correct Answer: A statement that remains true during the execution of an
algorithm. Used to derive and create assertions for correct code implementing
an algorithm.
E.g., Insertionsort: A[1..j-1] have been sorted into increasing order and A[j..n]
are untouched. CLRS p.18
BFS/DFS: gray vertices are in the queue/stack in increasing order of distance d;
parent pointers form a spanning tree on non-white vertices. CLRS p.595.

Question 6.
Recurrence relation
Correct Answer: A recursively defined function (usually on natural numbers or
tuples thereof) that is often used to bound time or space in analysis of an
algorithm or data structure, especially in divide and conquer and dynamic
programming. CLRS 4.3.
E.g., Merge sort recurrence: T(0)=0; T(n) = cn + T(floor(n/2))+T(ceil(n/2))

Question 7.
Recursion tree
Correct Answer: A diagram that helps analyze recurrences. Place the
non-recursive costs in a node, and create a child for each recursive call. The
total of all costs at nodes gives the form of the recurrence that we can prove by
induction. CLRS 4.4.
____ ___s typically fall into one of three types: top-heavy (cost dominated by the
root), leaf-heavy (cost dominated by the many leaves), and even (cost about
the same at each level, so total is lg n * level cost. (Master thm, CLRS 4.5, in a
nutshell.)

Question 8.
Asymptotic notation
Correct Answer: Big-Theta, big-O, and big-Omega suppress constants and lower
order terms
in functions of n. Useful tools in simplifying analysis when we are developing
pseudocode for the RAM model, since those also abstract away details from
actual implementations and hardware. Each has a precise definition, but is
often used as sloppy shorthand. CLRS 3.1, but move all quantifiers in their
definitions to the front.
E.g. 3n^2+n in O(n^2) because there exist c=4 and n_0=1 such that, for all
n>=n_2 3n^2+n <= cn^2.

Question 9.
Incremental
Correct Answer: Maintains the solution to a problem as you add input one by
one. CLRS 2.3. E.g.: Insertion sort, Separate chaining, BST construction

Información del documento

Subido en
3 de diciembre de 2026
Número de páginas
6
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
865
Seguidores
376
Artículos
64193
Última venta
1 día 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