Menu

[Solved]Knight S Tour Problem Kt Asks Start Chess Knight Upper Left Corner Chess Board Move Visits Q37286821

The knight’s tour problem (KT) asks if you can start with achess knight in the upper-left corner of a chess board and move itso that it visits every square exactly once. A knight in chessmakes moves that are two squares horizontally or vertically and onesquare in the other direction, in an L-shape. Answer the followingquestions about KT.

2. The Longest Path problem (LP) takes in a graph G, vertices u and v, and an integer k, and it returns whether G contains a

2. The Longest Path problem (LP) takes in a graph G, vertices u and v, and an integer k, and it returns whether G contains a path of length k or more between u and v. Use the reduction below to prove that if LPE P, KT E P, or explain why this reduction cannot prove that KT P. You may assume that the reduction is correct. 3. Use the reduction above to prove that if LP2(2″), KT – 2(2), or explain why this reduction cannot prove that KT – S2(2n). You may assume that the reduction is correct. Input: n: positive integer (size of chess board) Output: Whether a knight starting in the upper-left corner of an n × n chess board has a knight’s tour 1 Algorithm: KTReduction 2 If n < 3 then 3return false 4 end s G – Graph(n2) 6 for each square (i, j) on an n × n chess board do 7for each square (k, 2) on the board one knight’s move away from (1.3) do Add an edge between (i,j) and (k, e) in G 8 9end 10 end 11 Let u be the vertex in G representing (1,1) 12 Let v be the vertex in G representing (2,3) 13 return LP(G, u, v, n2 – 1) Show transcribed image text 2. The Longest Path problem (LP) takes in a graph G, vertices u and v, and an integer k, and it returns whether G contains a path of length k or more between u and v. Use the reduction below to prove that if LPE P, KT E P, or explain why this reduction cannot prove that KT P. You may assume that the reduction is correct. 3. Use the reduction above to prove that if LP2(2″), KT – 2(2), or explain why this reduction cannot prove that KT – S2(2n). You may assume that the reduction is correct. Input: n: positive integer (size of chess board) Output: Whether a knight starting in the upper-left corner of an n × n chess board has a knight’s tour 1 Algorithm: KTReduction 2 If n

Expert Answer


Answer to The knight’s tour problem (KT) asks if you can start with a chess knight in the upper-left corner of a chess board and… . . .

OR


Leave a Reply

Your email address will not be published. Required fields are marked *