C.Hamiltonian focuses on edges; Euler focuses on vertices
D.Hamiltonian allows paths; Euler allows only trees
Correct Answer: Hamiltonian focuses on vertices; Euler focuses on edges
Explanation:
A Hamiltonian cycle visits every vertex once, while an Euler cycle uses every edge once.
Incorrect! Try again.
21A backtracking algorithm has a maximum of candidates at each of decision levels. If no branches are pruned, what is its worst-case time complexity?
General method
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Without pruning, the search tree may contain approximately leaf paths, giving exponential worst-case time.
Incorrect! Try again.
22Which sequence correctly describes how a typical backtracking algorithm processes a candidate?
General method
Medium
A.Test, undo, choose, and recurse
B.Recurse, choose, test, and undo
C.Choose, recurse, undo, and test
D.Choose, test, recurse, and undo
Correct Answer: Choose, test, recurse, and undo
Explanation:
Backtracking chooses a candidate, checks whether the partial solution is promising, explores it recursively, and then undoes the choice.
Incorrect! Try again.
23For a pruning rule to preserve the correctness of a backtracking algorithm, which condition must hold?
General method
Medium
A.Every accepted node has one child
B.Every candidate is examined in sorted order
C.Every search level uses equal branching
D.Every pruned node has no valid completion
Correct Answer: Every pruned node has no valid completion
Explanation:
A branch may be safely pruned only when its partial solution cannot be extended to any valid complete solution.
Incorrect! Try again.
24A backtracking procedure currently stops when it finds its first valid solution. What change is needed to enumerate all valid solutions?
General method
Medium
A.Record the solution and restart from the root
B.Reject the solution and increase the depth limit
C.Accept the solution and disable all pruning
D.Record the solution and continue exploring siblings
Correct Answer: Record the solution and continue exploring siblings
Explanation:
After recording a complete solution, the procedure must backtrack and examine the remaining candidate branches.
Incorrect! Try again.
25A depth-first backtracking algorithm has maximum recursion depth . Ignoring stored output, what is its typical auxiliary space usage when each stack frame has constant size?
General method
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Depth-first search stores only the current path and its recursion frames, so auxiliary space grows linearly with depth.
Incorrect! Try again.
26In an 8-queens representation where is the column of the queen in row , when do queens in rows and attack each other?
The 8-queens problem
Medium
A. or
B. or
C. or
D. or
Correct Answer: or
Explanation:
Queens attack when they share a column or when their row and column differences are equal, which indicates a shared diagonal.
Incorrect! Try again.
27Queens have been placed in columns for rows . Which column is safe for the queen in row ?
The 8-queens problem
Medium
A.Column
B.Column
C.Column
D.Column
Correct Answer: Column
Explanation:
Column is unused, and its diagonal distance from each earlier queen differs from the corresponding row distance.
Incorrect! Try again.
28A backtracking formulation places exactly one queen in each row. Which conflicts must its promising function explicitly test?
The 8-queens problem
Medium
A.Row and column conflicts
B.Row and diagonal conflicts
C.Column and diagonal conflicts
D.Only diagonal conflicts
Correct Answer: Column and diagonal conflicts
Explanation:
Placing one queen per row prevents row conflicts automatically, leaving column and diagonal conflicts to be checked.
Incorrect! Try again.
29In the standard row-by-row state-space tree for 8-queens, what does a promising node at depth represent?
The 8-queens problem
Medium
A.Eight queens with five conflicts removed
B.A complete board containing five solutions
C.Five nonattacking queens in five rows
D.Five queens using exactly five diagonals
Correct Answer: Five nonattacking queens in five rows
Explanation:
Each level places one queen in the next row, so depth represents a valid partial placement of five queens.
Incorrect! Try again.
30If an 8-queens solution has its row- queen in column , where is that queen after reflecting the board across its vertical axis?
The 8-queens problem
Medium
A.Column
B.Column
C.Column
D.Column
Correct Answer: Column
Explanation:
Vertical reflection maps columns to , so column becomes .
Incorrect! Try again.
31What is the minimum number of colors required to properly color the cycle graph ?
Graph coloring
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
An odd cycle is not bipartite, so two colors are insufficient, while three colors produce a proper coloring.
Incorrect! Try again.
32A backtracking algorithm attempts to color using three colors. What happens after three mutually adjacent vertices receive distinct colors?
Graph coloring
Medium
A.The graph becomes properly two-colored
B.The fourth vertex has no legal color
C.The first vertex must be left uncolored
D.The fourth vertex may reuse any color
Correct Answer: The fourth vertex has no legal color
Explanation:
The fourth vertex is adjacent to all three colored vertices, so every available color creates a conflict.
Incorrect! Try again.
33Vertices , , and form a triangle. If is red and is blue, which color can be assigned to in a proper coloring using red, blue, and green?
Graph coloring
Medium
A.Blue only
B.Red only
C.Red or blue
D.Green only
Correct Answer: Green only
Explanation:
Because is adjacent to both and , it cannot use red or blue and must use green.
Incorrect! Try again.
34Which vertex-ordering heuristic often reduces the search performed by a graph-coloring backtracking algorithm?
Graph coloring
Medium
A.Color high-degree vertices first
B.Color low-degree vertices first
C.Color vertices randomly once
D.Color isolated vertices first
Correct Answer: Color high-degree vertices first
Explanation:
Highly constrained vertices tend to reveal conflicts earlier, allowing the algorithm to prune unsuccessful branches sooner.
Incorrect! Try again.
35For a graph with vertices and available colors, what is the maximum number of complete color assignments before constraint-based pruning?
Graph coloring
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
Each of the vertices independently has possible colors before adjacency constraints are considered.
Incorrect! Try again.
36During a Hamiltonian-cycle search, which conditions make an unvisited vertex a valid next candidate on the current path?
Hamiltonian cycles
Medium
A.It is adjacent to the first vertex and visited
B.It is nonadjacent to the last vertex and unvisited
C.It has the largest degree and is unvisited
D.It is adjacent to the last vertex and unvisited
Correct Answer: It is adjacent to the last vertex and unvisited
Explanation:
A Hamiltonian path must follow graph edges and include each vertex exactly once, so the candidate must be adjacent and unvisited.
Incorrect! Try again.
37After a backtracking algorithm places all vertices in a candidate Hamiltonian path, what final condition must it verify?
Hamiltonian cycles
Medium
A.The last vertex has maximum graph degree
B.The first vertex is adjacent to every vertex
C.The last vertex is adjacent to the first
D.The path contains every graph edge
Correct Answer: The last vertex is adjacent to the first
Explanation:
The edge from the last vertex back to the first is required to close the Hamiltonian path into a cycle.
Incorrect! Try again.
38A connected graph with more than two vertices contains a vertex of degree . What can be concluded about Hamiltonian cycles in the graph?
Hamiltonian cycles
Medium
A.No Hamiltonian cycle can exist
B.A Hamiltonian cycle exists if the graph is connected
C.A Hamiltonian cycle must use that edge twice
D.Exactly one Hamiltonian cycle exists
Correct Answer: No Hamiltonian cycle can exist
Explanation:
Every vertex on a cycle requires two incident cycle edges, which is impossible for a vertex of degree .
Incorrect! Try again.
39How many distinct undirected Hamiltonian cycles does the complete graph have when rotations and reversals are considered identical?
Hamiltonian cycles
Medium
A.
B.
C.
D.
Correct Answer:
Explanation:
The number is , dividing by two because opposite traversal directions represent the same cycle.
Incorrect! Try again.
40Two triangles share exactly one common vertex and have no other connecting edges. Why does the resulting graph have no Hamiltonian cycle?
Hamiltonian cycles
Medium
A.The shared vertex has an odd degree
B.The graph requires exactly three vertex colors
C.Each triangle contains too many graph edges
D.The shared vertex would need to be visited twice
Correct Answer: The shared vertex would need to be visited twice
Explanation:
A cycle covering both triangles would have to pass through the shared articulation vertex more than once, violating the Hamiltonian requirement.
Incorrect! Try again.
41A backtracking algorithm prunes a node whenever a predicate on the current partial state is false. Which property of is sufficient to guarantee that pruning preserves completeness?
General method
Hard
A. is true for every internal search-tree node
B. implies that has exactly one solution
C.Every state satisfying extends to a solution
D.Every complete solution extending implies
Correct Answer: Every complete solution extending implies
Explanation:
The predicate must be a necessary condition for an extension to be a solution. Its contrapositive ensures that means no solution can occur below .
Incorrect! Try again.
42At depth , each surviving node generates at most children, and testing a node at depth costs . With no pruning, which expression is the tightest general upper bound on total testing cost through depth ?
General method
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
There are at most nodes at depth . Multiplying by and summing over all depths gives the bound.
Incorrect! Try again.
43A constraint solver dynamically chooses the unassigned variable with the fewest legal values rather than using a fixed variable order. Under which condition does this preserve completeness?
General method
Hard
A.It chooses only variables whose domains have equal cardinality
B.It permanently removes every value rejected in one sibling branch
C.It explores every legal value and reverses each state change correctly
D.It always selects the same variable after returning to a depth
Correct Answer: It explores every legal value and reverses each state change correctly
Explanation:
Dynamic variable ordering changes traversal order, not the solution space. Completeness is preserved when all legal alternatives are explored and branch-local changes are undone.
Incorrect! Try again.
44Two different partial assignments reach states with the same proposed memoization signature. When is merging those states sound for an optimization backtracking algorithm?
General method
Hard
A.Their branching factors and variable orders are identical
B.Their feasible completions and incremental completion values are identical
C.Their current objective values have the same numerical parity
D.Their search-tree depths and most recent decisions are identical
Correct Answer: Their feasible completions and incremental completion values are identical
Explanation:
A signature is sufficient only if it captures everything affecting future feasibility and objective contribution. Tree position or branching structure alone does not establish state equivalence.
Incorrect! Try again.
45In a minimization search seeking one optimal solution, an incumbent has value . A valid lower bound applies to every completion of state . Which pruning rule is sound?
General method
Hard
A.Prune whenever
B.Prune whenever
C.Prune whenever its current cost is below
D.Prune whenever one completion may exceed
Correct Answer: Prune whenever
Explanation:
If every completion costs at least , the subtree cannot improve the incumbent. Equality may be pruned because only one optimal solution is required.
Incorrect! Try again.
46In a bit-mask solver, , , and mark columns and diagonals attacked in the current row, and . After choosing a one-bit position , which update correctly prepares the masks for the next row?
The 8-queens problem
Hard
A., ,
B., ,
C., ,
D., ,
Correct Answer: , ,
Explanation:
The selected column remains occupied, while diagonal attacks shift by one column in opposite directions for the next row. Masking retains only the eight board columns.
Incorrect! Try again.
47The standard 8-queens problem has 92 solutions when board orientations are distinguished. How many fundamental solutions remain when rotations and reflections are considered equivalent?
The 8-queens problem
Hard
A. fundamental solutions
B. fundamental solutions
C. fundamental solutions
D. fundamental solutions
Correct Answer: fundamental solutions
Explanation:
The 92 oriented solutions form 12 equivalence classes under the eight symmetries of the square. Orbit sizes are not all necessarily eight.
Incorrect! Try again.
48Queens have been legally placed in rows through at columns . Which set contains exactly the legal columns for the queen in row ?
The 8-queens problem
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Unused columns are . Column is diagonal to , and column is diagonal to , leaving and .
Incorrect! Try again.
49A solver restricts the first-row queen to columns through to break left-right reflection symmetry. What is the precise effect on the 92 oriented solutions?
The 8-queens problem
Hard
A.It retains 23 solutions because four rotations are eliminated
B.It retains 46 solutions but does not remove all rotational symmetries
C.It retains 4 solutions because only corner-column starts survive
D.It retains 12 solutions representing all symmetry equivalence classes
Correct Answer: It retains 46 solutions but does not remove all rotational symmetries
Explanation:
Vertical reflection pairs solutions whose first columns are and , so the restriction keeps one from each pair. Other reflections and rotations can still relate retained solutions.
Incorrect! Try again.
50A generalized queens solver may choose any unassigned row next and applies the minimum-remaining-values heuristic. Which statement best characterizes this modification?
The 8-queens problem
Hard
A.It eliminates the need to track occupied diagonal directions
B.It preserves only solutions compatible with increasing row order
C.It preserves all solutions and may expose dead ends earlier
D.It guarantees polynomial running time on every board size
Correct Answer: It preserves all solutions and may expose dead ends earlier
Explanation:
Choosing the most constrained row changes only the search order if every legal column is explored. It can improve pruning but does not change worst-case exponential complexity.
Incorrect! Try again.
51Using the chromatic polynomial of a cycle, how many proper colorings of the labeled vertices of exist with three labeled colors?
Graph coloring
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
For a cycle, . Thus .
Incorrect! Try again.
52A graph is -degenerate, meaning every nonempty subgraph has a vertex of degree at most . Which procedure is guaranteed to construct a proper coloring using at most colors?
Graph coloring
Hard
A.Color maximum-degree vertices first while reserving one color for each component
B.Remove maximum-degree vertices repeatedly, then greedily color in removal order
C.Remove minimum-degree vertices repeatedly, then greedily color in reverse order
D.Color minimum-degree vertices immediately without removing their incident edges
Correct Answer: Remove minimum-degree vertices repeatedly, then greedily color in reverse order
Explanation:
When a removed vertex is reinserted in reverse order, at most of its neighbors are already colored. Therefore one of colors is available.
Incorrect! Try again.
53For vertices ordered as , a coloring search enforces and . What symmetry does this restriction remove?
Graph coloring
Hard
A.It restricts the search to greedy colorings of the chosen vertex order
B.It removes every coloring related by a nontrivial graph automorphism
C.It chooses one canonical representative for each permutation of color labels
D.It identifies colorings related by arbitrary permutations of graph vertices
Correct Answer: It chooses one canonical representative for each permutation of color labels
Explanation:
Colors are introduced in a fixed first-use order, producing a restricted-growth representation. This removes duplicate color-label permutations without removing distinct vertex partitions.
Incorrect! Try again.
54During -coloring backtracking, each uncolored vertex has a residual list of permitted colors. For an uncolored clique , which condition is a sound reason to prune?
Graph coloring
Hard
A.At least two vertices in have lists of equal size
B.Every satisfies
C.Some satisfies
D.Some satisfies
Correct Answer: Some satisfies
Explanation:
Clique vertices require distinct colors. By Hall's condition, such a subset cannot receive distinct representatives from its available color lists.
Incorrect! Try again.
55An uncolored graph has vertices with saturation degrees and uncolored degrees , respectively. Under standard DSATUR selection with uncolored degree as the tie-breaker, which vertex is selected?
Graph coloring
Hard
A.Vertex
B.Vertex
C.Vertex
D.Vertex
Correct Answer: Vertex
Explanation:
DSATUR first maximizes the number of distinct colors used by colored neighbors. Among , which each have saturation degree 3, vertex has the largest uncolored degree.
Incorrect! Try again.
56A bipartite graph has parts and with and . Which conclusion about Hamiltonian cycles is valid regardless of its edge set?
Hamiltonian cycles
Hard
A.It has a Hamiltonian cycle whenever the graph is connected
B.It has a Hamiltonian cycle if every vertex has degree at least
C.It has no Hamiltonian cycle because the part sizes differ
D.It has no Hamiltonian path because its order is odd
Correct Answer: It has no Hamiltonian cycle because the part sizes differ
Explanation:
Every cycle in a bipartite graph alternates between the two parts and therefore contains equal numbers of vertices from each. A spanning cycle is impossible when the part sizes differ.
Incorrect! Try again.
57Let mean that a path starts at fixed vertex , visits exactly the vertices in , and ends at . Which recurrence supports a Hamiltonian-cycle algorithm?
Hamiltonian cycles
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
The predecessor of must be some adjacent in . With base , a full path forms a cycle when its endpoint is adjacent to .
Incorrect! Try again.
58A Hamiltonian-cycle backtracking search has a partial path from start vertex to current endpoint , with unvisited set . Which condition is a sound pruning test?
Hamiltonian cycles
Hard
A.Prune if and are not adjacent in the current partial path
B.Prune if the subgraph induced only by contains any cycle
C.Prune if some two vertices of have the same graph degree
D.Prune if the subgraph induced by is disconnected
Correct Answer: Prune if the subgraph induced by is disconnected
Explanation:
Any completion must continue from , traverse every vertex in , and return to . Those available vertices and endpoints must therefore lie in one connected induced subgraph.
Incorrect! Try again.
59For a simple graph with vertices, which statement correctly applies Dirac's theorem?
Hamiltonian cycles
Hard
A.If , then is Hamiltonian
B.If is Hamiltonian, then
C.If , then is Hamiltonian
D.If , then is Hamiltonian
Correct Answer: If , then is Hamiltonian
Explanation:
Dirac's condition is sufficient but not necessary: every simple -vertex graph with minimum degree at least has a Hamiltonian cycle.
Incorrect! Try again.
60How many distinct undirected Hamiltonian cycles does the complete labeled graph contain when cycles differing only by starting vertex or traversal direction are identified?
Hamiltonian cycles
Hard
A.
B.
C.
D.
Correct Answer:
Explanation:
Fixing one vertex as the start removes rotational duplicates, leaving orders. Reversing any order describes the same undirected cycle, so the count is halved.
Incorrect! Try again.
Did this save you a night before the exam?
LPU Notes is free, and it stays free. Ads cover part of the server bill.
The rest comes out of a student's own pocket: the domain, the storage,
and keeping the site up through the weeks everyone needs it at once.
The payment button didn't load. An ad blocker or a filtered network is the usual reason.
to try again.
Nothing here is ever locked, and nothing unlocks. Chip in only if it was worth it.
What it pays for →