This preview shows pages 1–2. Sign up to view the full content.
CS 284 Algorithms
Some Sample Final Exam Questions
1) During a breadthfirst search, the status of a gray vertex is:
a) It has been completely processed.
b) It is in the FIFO queue.
c) It is in the priority queue.
d) It is undiscovered.
2) The number of edges in a complete undirected graph of n nodes is:
(a) n1
(b) n
(c) n(n1)/2
(d) n(n+1)/2
(e) n
2
3)
If an
undirected
graph has
at least
as many
edges
as
vertices
(
E

≥

V
), then the graph:
a)
contains exactly one cycle
b)
contains at most one cycle
c)
contains at least one cycle.
d)
is acyclic (has no cycles).
4) How long does it take to determine if a
given vertex
has
zero degree
in an undirected graph
G
= (
V
,
E
)?
a)
O
(
V
+
E
) for adjacency matrix and
O
(
V
) for adjacency lists.
b)
O
(
V
) for adjacency matrix and
O
(1) for adjacency lists.
c)
O
(
E
) for both adjacency matrix and adjacency lists.
d)
O
(
V
) for both adjacency matrix and adjacency lists.
5)
This preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
This is the end of the preview. Sign up
to
access the rest of the document.
This note was uploaded on 04/15/2011 for the course CS 284 taught by Professor Jamess. during the Spring '10 term at Jordan University of Science & Tech.
 Spring '10
 JamesS.
 Algorithms

Click to edit the document details