CPSC 481 Homework 6
The state denoting the specific 6-queens arrangement shown earlier (in Q2) is a: (Select the best answer) A) Neither a local nor global optimum B) A local optimum C) A global optimum D) Is a local or global optimum depending on the local search algorithm
A) Neither a local nor global optimum
Consider the same Simulated Annealing problem as the previous question, but with Temperature=10 (down from 100). Pick the statement that best describes what happens in the next iteration of the Simulated Annealing algorithm. A) The probability that s5 is the next state has not changed B) The probability that s5 is the next state has decreased C) The probability that s1 is the next state has not changed D) The probability that the state will not change is 10 times larger
A) The probability that s5 is the next state has not changed
Consider the following two states representing board positions in the 8-queens problem. [3, 5, 4, 1, 2, 7, 8, 2] [1, 3, 8, 6, 4, 2, 5, 7] If these two states were selected as the "parents" in a crossover, which of the following states could be a resulting state? (There could be multiple correct answers. Pick all.) A) [3, 5, 8, 6, 4, 2, 5, 7] B) [3, 5, 4, 1, 2, 7, 5, 7] C) [3, 5, 4, 1, 1, 3, 8, 6] D) [1, 3, 4, 1, 2, 7, 8, 2]
A) [3, 5, 8, 6, 4, 2, 5, 7] B) [3, 5, 4, 1, 2, 7, 5, 7] D) [1, 3, 4, 1, 2, 7, 8, 2]
Which of the following states represents a neighbor/successor of the 6-queens arrangement shown earlier (in Q2)? (There could be multiple correct answers; pick all.) A) [5, 3, 6, 4, 2, 1] B) [5, 3, 6, 6, 2, 1] C) [5, 3, 6, 6, 2, 4] D) [5, 3, 1, 6, 4, 2]
A) [5, 3, 6, 4, 2, 1] B) [5, 3, 6, 6, 2, 1]
The 8-queens problem can be generalized to any sized board. Consider the 6-queens arrangement in the image below. Represent the positions as a 6-tuple of row numbers (as shown in class, i.e., the i-th element is the row number of the queen in column i). A) [5, 3, 6, 5, 2, 1] B) [1, 2, 3, 4, 5, 6] C) [1, 2, 3, 5, 5, 6] D) [1, 1, 1, 0, 2, 1]
A) [5, 3, 6, 5, 2, 1]
Let the successors/neighbors of a state in the 6-queens problem be those states generated by moving only one queen in its column. How many successors/neighbors does a state have?
30
Consider a maximization problem that is being solved by Simulated Annealing. Let the objective function value of the current state, s, be 1000. Let this state have 5 successors/neighbors: s1(950), s2(975), s3(1000), s4(1000), and s5(1050). The numbers in parentheses represent the corresponding objective function values. The current temperature is 100. The probability that the next state is: s1 = ["0.121", "0.156", "0.2", "0.778", "0.606"] s2 = ["0.156", "0.121", "0.2", "0.778", "0.606"] s3 = ["0.121", "0.778", "0.156", "0.606", "0.2"] s4 = ["0.778", "0.121", "0.156", "0.2", "0.606"] s5 = ["0.778", "0.121", "0.156", "0.2", "0.606"]
950 = .20 * (exp(-50/100)) = 0.121 975 = .20 * (exp(-25/100)) = 0.155 1000 = .20 * (exp(0/100)) = .20 1000 = .20 * (exp(0/100)) = .20 1050 = .20 * (exp(50/100)) = .20
The goal of the n-queens problem is to come up with the positions of the n queens such that none of the queens attack each other. (Two queens attack each other if they are on the same row, column, or diagonal.) Define the objective function for this problem as the number of attacking pairs on the board. What is the objective function value for the board position shown above? A) 4 B) 6 C) 0 D) 2
A) 4
For the previous problem, how many iterations will the Simulated Annealing algorithm execute? A) It depends on the annealing schedule B) 100 C) 1000 D) Infinity
A) It depends on the annealing schedule
Consider the following state representing a board position in the 8-queens problem. [3, 5, 4, 1, 2, 7, 8, 2] If this state was mutated, which of the following states could be a resulting state? (There could be multiple correct answers. Pick all.) A) [3, 5, 4, 1, 1, 3, 8, 6] B) [3, 5, 4, 1, 2, 7, 8, 2] C) [3, 5, 4, 2, 2, 7, 8, 2] D) [4, 5, 4, 1, 2, 7, 8, 4]
B) [3, 5, 4, 1, 2, 7, 8, 2] C) [3, 5, 4, 2, 2, 7, 8, 2]
Consider the same Simulated Annealing problem as the previous question. Pick the statement that best describes what happens in the next iteration of the Simulated Annealing algorithm. A) s1 and s2 are equally likely to be the next state B) s3, s4, and s5 are equally likely to be the next state C) s1 is most likely to be the next state D) s1 is more likely than s2 to be the next state
B) s3, s4, and s5 are equally likely to be the next state
