Explanation of Solution
a.
Solution A: There exists a variable corresponding to every “n2” positions on the board.
Solution B: There is a variable corresponding to every knight.
Explanation of Solution
b.
Solution A: Each of the variables can be taken one of two values. The values can be taken are, “occupied” and “vacant”.
Solution B: Domain of each variable is the set of squares.
Explanation of Solution
c.
Solution A: Each and every pair of square separated by knight’s move constrained, such that both cannot be occupied. The entire set of squares is constrained, such that the number of occupied squares should be “k”.
Solution B: Each and every pair of knights is constrained, such that no two knights can be on the same square or on squares separated by a knight’s move. The solution B may be preferable because there is no global constraint, although the solution A has the smaller state space when “k” is large.
Explanation of Solution
d.
The solutions must be describing a complete-state formulation. This is because the use of local search
Solution C: Ensure that no attack at any time. Actions are to remove any knight, add a knight in any unattacked square, or move a knight to any unattacked square.
Solution D: allow attacks but try to get rid of them. Actions are to remove any knight, add a knight in any square, or move a knight to any square.
Want to see more full solutions like this?
Chapter 6 Solutions
Artificial Intelligence: A Modern Approach
- Consider the challenge of determining whether a witness questioned by a law enforcement agency is telling the truth. An innovative questioning system pegs two individuals against each other. A reliable witness can determine whether the other individual is telling the truth. However, an unreliable witness's testimony is questionable. Given all the possible outcomes from the given scenarios, we obtain the table below. This pairwise approach could then be applied to a larger pool of witnesses. Answer the following: 1) If at least half of the K witnesses are reliable, the number of pairwise tests needed is Θ(n). Show the recurrence relation that models the problem. Provide a solution using your favorite programming language, that solves the recurrence, using initial values entered by the user.arrow_forwardWith reference to the graph, let the roughness index R of a path to success be R = T +2E, where T is the time to get from L to W and E is the total number of enemies made. (a) Find the smoothest (least rough) path to success. (b) Find the smoothest path to success that includes edge ( f, i); this edge can be traversed in either direction.arrow_forwardIn a column with a width of M = 11, imagine printing the absurd text "This week has seven days in it, okay" neatly. The printing instance M;l1,..., ln=11; 4, 4, 3, 5, 5, 2, 2, 2 is used to symbolise this. (a) Complete the cost[0..n] and birdAdvice[0..n] tables for this case. The lowest row contains the initial instance, its solution, and its expense. (b) When completing this final row, include solutions and prices related to each of the potential bird responses.arrow_forward
- Can you find a stable outcome for the following network, if possible. If not, please explain why.arrow_forwardThe definition of indistinguishability in Definitions 3.8 (page 55), 3.18 (page 70), 3.21 (pages 73-74) and 3.22 (page 74) all follow the pattern: Pr[Adversary success] ≤ 1/2 + negl(n). It is suggested that we could equivalently state these as: Pr[Adversary success] = 1/2 + negl(n) (where + denotes plus or minus). Discuss.arrow_forwardNow consider the opposite problem: using an encryption algorithm to construct a oneway hash function. Consider using RSA with a known key. Then process a message consisting of a sequence of blocks as follows: Encrypt the first block, XOR the result with the second block and encrypt again, etc. Show that this scheme is not secure by solving the following problem. Given a two-block message B1, B2, and its hash RSAH(B1, B2) = RSA(RSA (B1) +B2) Given an arbitrary block C1, choose C2 so that RSAH(C1, C2) = RSAH(B1, B2). Thus, the hash function does not satisfy weak collision resistance.arrow_forward
- Consider the following version of Knapsack. Given are two weight limits W 1 and W 2 , whereW 1 ≤ W 2 . Given are also n items (w 1 , c 1 ), (w 2 , c 2 ), . . . , (w n , c n ), where w i is the weight and c ithe cost of the i-th item. We want to find a subset of these items of the highest cost, wherethe subset weights at least W 1 and at most W 2 . Give an O(nW 2 ) algorithm for this problem.(Recall that the cost (respectively weight) of a subset is the sum of the costs (respectivelyweights) of the items in the subset.)arrow_forwardGiven a set of items, each with a weight and a value, and a knapsack with a capacity, find the maximum value of items that can be put in the knapsack without exceeding the capacity. Fibonacci Sequencearrow_forwardTo achieve consistency, the players have to reach an agreement on the game state.However, this opens a door to distributed consensus problems. Let us look at one ofthem, called the two-generals problem: Two generals have to agree whether to attacka target. They have couriers carrying the messages to and fro, but the delivery of themessage is unreliable. Is it possible for them to be sure that they have an agreementon what do? For a further discussion on consensus problems, see Lamport and Lyncharrow_forward
- Consider a voting system with 3 candidates C1,C2,C3, and 5 voters V1,V2,V3,V4,V5. The votes will be casted as cipher texts using Paillier PKC. Implement a voting scheme that uses additive homomorphic property of Paillier. (Suppose voter J votes for candidate I using the equation vote(J)= J mod 3.) Show all the steps and the final tally.arrow_forwardSuppose the agent has progressed to the point shown in Figure 7.4(a), page , having perceived nothing in [1,1], a breeze in [2,1], and a stench in [1,2], and is now concerned with the contents of [1,3], [2,2], and [3,1]. Each of these can contain a pit, and at most one can contain a wumpus. Following the example of Figure 7.5, construct the set of possible worlds. (You should find 32 of them.) Mark the worlds in which the KB is true and those in which each of the following sentences is true:α2 = “There is no pit in [2,2].”α3 = “There is a wumpus in [1,3].”Hence show that KB⊨α2 and KB⊨α3.arrow_forwardSuppose we use the following KB (where x, y, z are variables and r1, r2, r3, goal are constants) to determine whether a particular robot can score. (a) Open(x) ∧ HasBall(x) → CanScore(x)(b) Open(x) ∧ CanAssist(y, x) ∧ HasBall(y) → CanScore(x) (c) PathClear(x,y) → CanAsist(x,y)(d) PathClear(x,z) ∧ CanAssist(z,y) → CanAssist(x,y) (e) PathClear(x,goal) → Open(x)(f) PathClear(y,x) → PathClear(x,y) (g) HasBall(r3)(h) PathClear(r1,goal) (i) PathClear(r2,r1) (j) PathClear(r3,r2) (k) PathClear(r3,goal)arrow_forward
- Operations Research : Applications and AlgorithmsComputer ScienceISBN:9780534380588Author:Wayne L. WinstonPublisher:Brooks Cole