Notice: Due to an ongoing migration of our storage and publishing system, material requested since last month will not be uploaded for the time being, and new requests are paused. All existing notes remain available.
You're offline
Unit 6 MCQsBacktracking
ECAP538 ·
60 questions. Pick an option to check it.
Backtracking builds a solution incrementally and abandons a choice when it cannot lead to a valid solution.
Question 2 of 60 · General method · Easy
Which structure is commonly used to represent the choices explored by a backtracking algorithm?
Not quite. Try another option.
Answer: State-space tree
A state-space tree represents possible choices as branches and candidate solutions as paths.
Question 3 of 60 · General method · Easy
What does pruning mean in backtracking?
Not quite. Try another option.
Answer: Skipping branches that cannot succeed
Pruning avoids exploring a branch once it is known that the branch cannot produce a valid solution.
Question 4 of 60 · General method · Easy
Backtracking most commonly uses which search strategy?
Not quite. Try another option.
Answer: Depth-first search
Backtracking explores one sequence of choices deeply before returning to try alternatives.
Question 5 of 60 · General method · Easy
When does a backtracking algorithm undo its most recent choice?
Not quite. Try another option.
Answer: When the partial solution becomes invalid
An invalid partial solution cannot be extended successfully, so the algorithm reverses its latest choice.
Question 6 of 60 · The 8-queens problem · Easy
What is the goal of the 8-queens problem?
Not quite. Try another option.
Answer: Place eight queens so none attack
The goal is to place eight queens on a chessboard so that no two queens attack each other.
Question 7 of 60 · The 8-queens problem · Easy
Which board size is used in the standard 8-queens problem?
Not quite. Try another option.
Answer:
The standard problem places eight queens on an chessboard.
Question 8 of 60 · The 8-queens problem · Easy
In a valid 8-queens solution, how many queens may occupy the same row?
Not quite. Try another option.
Answer: At most one queen
Two queens in the same row would attack each other, so each row can contain at most one queen.
Question 9 of 60 · The 8-queens problem · Easy
Which three relationships must be checked to prevent two queens from attacking each other?
Not quite. Try another option.
Answer: Rows, columns, and diagonals
A queen attacks along its row, column, and diagonals.
Question 10 of 60 · The 8-queens problem · Easy
What should a backtracking algorithm do after placing a queen causes a conflict?
Not quite. Try another option.
Answer: Remove the queen and try another position
The conflicting placement is undone, and the algorithm tries another available position.
Question 11 of 60 · Graph coloring · Easy
What is assigned to each vertex in the graph coloring problem?
Not quite. Try another option.
Answer: A color
Graph coloring assigns a color to every vertex while satisfying the coloring constraints.
Question 12 of 60 · Graph coloring · Easy
In a proper vertex coloring, adjacent vertices must have what property?
Not quite. Try another option.
Answer: They have different colors
A proper coloring requires every pair of vertices connected by an edge to use different colors.
Question 13 of 60 · Graph coloring · Easy
What does the chromatic number of a graph represent?
Not quite. Try another option.
Answer: The minimum required colors
The chromatic number is the smallest number of colors needed for a proper vertex coloring.
Question 14 of 60 · Graph coloring · Easy
How many colors are sufficient to properly color a graph containing no edges?
Not quite. Try another option.
Answer: One color
With no adjacent vertices, every vertex can receive the same single color.
Question 15 of 60 · Graph coloring · Easy
When should backtracking reject a color assigned to a vertex?
Not quite. Try another option.
Answer: When a neighboring vertex has that color
A color is invalid if an adjacent vertex already uses the same color.
Question 16 of 60 · Hamiltonian cycles · Easy
What is a Hamiltonian cycle?
Not quite. Try another option.
Answer: A cycle that visits every vertex once
A Hamiltonian cycle visits every vertex exactly once and then returns to its starting vertex.
Question 17 of 60 · Hamiltonian cycles · Easy
What must happen at the end of a Hamiltonian cycle?
Not quite. Try another option.
Answer: The path returns to its start
Because it is a cycle, the final vertex must connect back to the starting vertex.
Question 18 of 60 · Hamiltonian cycles · Easy
How many times is each vertex visited in a Hamiltonian cycle, apart from repeating the start to close the cycle?
Not quite. Try another option.
Answer: Exactly once
Each vertex appears exactly once in the cycle, with the starting vertex repeated only to show closure.
Question 19 of 60 · Hamiltonian cycles · Easy
When extending a partial Hamiltonian cycle, which vertex may be added next?
Not quite. Try another option.
Answer: An unvisited adjacent vertex
The next vertex must be connected to the current vertex and must not have been visited already.
Question 20 of 60 · Hamiltonian cycles · Easy
What is the key difference between a Hamiltonian cycle and an Euler cycle?
Not quite. Try another option.
Answer: Hamiltonian focuses on vertices; Euler focuses on edges
A Hamiltonian cycle visits every vertex once, while an Euler cycle uses every edge once.
Question 21 of 60 · General method · Medium
A backtracking algorithm has a maximum of candidates at each of decision levels. If no branches are pruned, what is its worst-case time complexity?
Not quite. Try another option.
Answer:
Without pruning, the search tree may contain approximately leaf paths, giving exponential worst-case time.
Question 22 of 60 · General method · Medium
Which sequence correctly describes how a typical backtracking algorithm processes a candidate?
Not quite. Try another option.
Answer: Choose, test, recurse, and undo
Backtracking chooses a candidate, checks whether the partial solution is promising, explores it recursively, and then undoes the choice.
Question 23 of 60 · General method · Medium
For a pruning rule to preserve the correctness of a backtracking algorithm, which condition must hold?
Not quite. Try another option.
Answer: Every pruned node has no valid completion
A branch may be safely pruned only when its partial solution cannot be extended to any valid complete solution.
Question 24 of 60 · General method · Medium
A backtracking procedure currently stops when it finds its first valid solution. What change is needed to enumerate all valid solutions?
Not quite. Try another option.
Answer: Record the solution and continue exploring siblings
After recording a complete solution, the procedure must backtrack and examine the remaining candidate branches.
Question 25 of 60 · General method · Medium
A 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?
Not quite. Try another option.
Answer:
Depth-first search stores only the current path and its recursion frames, so auxiliary space grows linearly with depth.
Question 26 of 60 · The 8-queens problem · Medium
In an 8-queens representation where is the column of the queen in row , when do queens in rows and attack each other?
Not quite. Try another option.
Answer: or
Queens attack when they share a column or when their row and column differences are equal, which indicates a shared diagonal.
Question 27 of 60 · The 8-queens problem · Medium
Queens have been placed in columns for rows . Which column is safe for the queen in row ?
Not quite. Try another option.
Answer: Column
Column is unused, and its diagonal distance from each earlier queen differs from the corresponding row distance.
Question 28 of 60 · The 8-queens problem · Medium
A backtracking formulation places exactly one queen in each row. Which conflicts must its promising function explicitly test?
Not quite. Try another option.
Answer: Column and diagonal conflicts
Placing one queen per row prevents row conflicts automatically, leaving column and diagonal conflicts to be checked.
Question 29 of 60 · The 8-queens problem · Medium
In the standard row-by-row state-space tree for 8-queens, what does a promising node at depth represent?
Not quite. Try another option.
Answer: Five nonattacking queens in five rows
Each level places one queen in the next row, so depth represents a valid partial placement of five queens.
Question 30 of 60 · The 8-queens problem · Medium
If an 8-queens solution has its row- queen in column , where is that queen after reflecting the board across its vertical axis?
Not quite. Try another option.
Answer: Column
Vertical reflection maps columns to , so column becomes .
Question 31 of 60 · Graph coloring · Medium
What is the minimum number of colors required to properly color the cycle graph ?
Not quite. Try another option.
Answer:
An odd cycle is not bipartite, so two colors are insufficient, while three colors produce a proper coloring.
Question 32 of 60 · Graph coloring · Medium
A backtracking algorithm attempts to color using three colors. What happens after three mutually adjacent vertices receive distinct colors?
Not quite. Try another option.
Answer: The fourth vertex has no legal color
The fourth vertex is adjacent to all three colored vertices, so every available color creates a conflict.
Question 33 of 60 · Graph coloring · Medium
Vertices , , 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?
Not quite. Try another option.
Answer: Green only
Because is adjacent to both and , it cannot use red or blue and must use green.
Question 34 of 60 · Graph coloring · Medium
Which vertex-ordering heuristic often reduces the search performed by a graph-coloring backtracking algorithm?
Not quite. Try another option.
Answer: Color high-degree vertices first
Highly constrained vertices tend to reveal conflicts earlier, allowing the algorithm to prune unsuccessful branches sooner.
Question 35 of 60 · Graph coloring · Medium
For a graph with vertices and available colors, what is the maximum number of complete color assignments before constraint-based pruning?
Not quite. Try another option.
Answer:
Each of the vertices independently has possible colors before adjacency constraints are considered.
Question 36 of 60 · Hamiltonian cycles · Medium
During a Hamiltonian-cycle search, which conditions make an unvisited vertex a valid next candidate on the current path?
Not quite. Try another option.
Answer: It is adjacent to the last vertex and unvisited
A Hamiltonian path must follow graph edges and include each vertex exactly once, so the candidate must be adjacent and unvisited.
Question 37 of 60 · Hamiltonian cycles · Medium
After a backtracking algorithm places all vertices in a candidate Hamiltonian path, what final condition must it verify?
Not quite. Try another option.
Answer: The last vertex is adjacent to the first
The edge from the last vertex back to the first is required to close the Hamiltonian path into a cycle.
Question 38 of 60 · Hamiltonian cycles · Medium
A connected graph with more than two vertices contains a vertex of degree . What can be concluded about Hamiltonian cycles in the graph?
Not quite. Try another option.
Answer: No Hamiltonian cycle can exist
Every vertex on a cycle requires two incident cycle edges, which is impossible for a vertex of degree .
Question 39 of 60 · Hamiltonian cycles · Medium
How many distinct undirected Hamiltonian cycles does the complete graph have when rotations and reversals are considered identical?
Not quite. Try another option.
Answer:
The number is , dividing by two because opposite traversal directions represent the same cycle.
Question 40 of 60 · Hamiltonian cycles · Medium
Two triangles share exactly one common vertex and have no other connecting edges. Why does the resulting graph have no Hamiltonian cycle?
Not quite. Try another option.
Answer: The shared vertex would need to be visited twice
A cycle covering both triangles would have to pass through the shared articulation vertex more than once, violating the Hamiltonian requirement.
Question 41 of 60 · General method · Hard
A 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?
Not quite. Try another option.
Answer: Every complete solution extending implies
The predicate must be a necessary condition for an extension to be a solution. Its contrapositive ensures that means no solution can occur below .
Question 42 of 60 · General method · Hard
At 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 ?
Not quite. Try another option.
Answer:
There are at most nodes at depth . Multiplying by and summing over all depths gives the bound.
Question 43 of 60 · General method · Hard
A 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?
Not quite. Try another option.
Answer: It explores every legal value and reverses each state change correctly
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.
Question 44 of 60 · General method · Hard
Two different partial assignments reach states with the same proposed memoization signature. When is merging those states sound for an optimization backtracking algorithm?
Not quite. Try another option.
Answer: Their feasible completions and incremental completion values are identical
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.
Question 45 of 60 · General method · Hard
In 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?
Not quite. Try another option.
Answer: Prune whenever
If every completion costs at least , the subtree cannot improve the incumbent. Equality may be pruned because only one optimal solution is required.
Question 46 of 60 · The 8-queens problem · Hard
In 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?
Not quite. Try another option.
Answer: , ,
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.
Question 47 of 60 · The 8-queens problem · Hard
The standard 8-queens problem has 92 solutions when board orientations are distinguished. How many fundamental solutions remain when rotations and reflections are considered equivalent?
Not quite. Try another option.
Answer: fundamental solutions
The 92 oriented solutions form 12 equivalence classes under the eight symmetries of the square. Orbit sizes are not all necessarily eight.
Question 48 of 60 · The 8-queens problem · Hard
Queens have been legally placed in rows through at columns . Which set contains exactly the legal columns for the queen in row ?
Not quite. Try another option.
Answer:
Unused columns are . Column is diagonal to , and column is diagonal to , leaving and .
Question 49 of 60 · The 8-queens problem · Hard
A 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?
Not quite. Try another option.
Answer: It retains 46 solutions but does not remove all rotational symmetries
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.
Question 50 of 60 · The 8-queens problem · Hard
A generalized queens solver may choose any unassigned row next and applies the minimum-remaining-values heuristic. Which statement best characterizes this modification?
Not quite. Try another option.
Answer: It preserves all solutions and may expose dead ends earlier
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.
Question 51 of 60 · Graph coloring · Hard
Using the chromatic polynomial of a cycle, how many proper colorings of the labeled vertices of exist with three labeled colors?
Not quite. Try another option.
Answer:
For a cycle, . Thus .
Question 52 of 60 · Graph coloring · Hard
A 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?
Not quite. Try another option.
Answer: Remove minimum-degree vertices repeatedly, then greedily color in reverse order
When a removed vertex is reinserted in reverse order, at most of its neighbors are already colored. Therefore one of colors is available.
Question 53 of 60 · Graph coloring · Hard
For vertices ordered as , a coloring search enforces and . What symmetry does this restriction remove?
Not quite. Try another option.
Answer: It chooses one canonical representative for each permutation of color labels
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.
Question 54 of 60 · Graph coloring · Hard
During -coloring backtracking, each uncolored vertex has a residual list of permitted colors. For an uncolored clique , which condition is a sound reason to prune?
Not quite. Try another option.
Answer: Some satisfies
Clique vertices require distinct colors. By Hall's condition, such a subset cannot receive distinct representatives from its available color lists.
Question 55 of 60 · Graph coloring · Hard
An 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?
Not quite. Try another option.
Answer: Vertex
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.
Question 56 of 60 · Hamiltonian cycles · Hard
A bipartite graph has parts and with and . Which conclusion about Hamiltonian cycles is valid regardless of its edge set?
Not quite. Try another option.
Answer: It has no Hamiltonian cycle because the part sizes differ
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.
Question 57 of 60 · Hamiltonian cycles · Hard
Let mean that a path starts at fixed vertex , visits exactly the vertices in , and ends at . Which recurrence supports a Hamiltonian-cycle algorithm?
Not quite. Try another option.
Answer:
The predecessor of must be some adjacent in . With base , a full path forms a cycle when its endpoint is adjacent to .
Question 58 of 60 · Hamiltonian cycles · Hard
A Hamiltonian-cycle backtracking search has a partial path from start vertex to current endpoint , with unvisited set . Which condition is a sound pruning test?
Not quite. Try another option.
Answer: Prune if the subgraph induced by is disconnected
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.
Question 59 of 60 · Hamiltonian cycles · Hard
For a simple graph with vertices, which statement correctly applies Dirac's theorem?
Not quite. Try another option.
Answer: If , then is Hamiltonian
Dirac's condition is sufficient but not necessary: every simple -vertex graph with minimum degree at least has a Hamiltonian cycle.
Question 60 of 60 · Hamiltonian cycles · Hard
How many distinct undirected Hamiltonian cycles does the complete labeled graph contain when cycles differing only by starting vertex or traversal direction are identified?
Not quite. Try another option.
Answer:
Fixing one vertex as the start removes rotational duplicates, leaving orders. Reversing any order describes the same undirected cycle, so the count is halved.
That's unit 6
Answer a few questions and your score shows up here.
Nearly through. Did unit 6 of ECAP538 save you a night before the exam?
LPU Notes is free. A student pays for the servers.
Did unit 6 of ECAP538 save you a night before the exam?
Then you can help keep it free for the next batch. 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.