Artificial Intelligence: A Modern Approach
Artificial Intelligence: A Modern Approach
3rd Edition
ISBN: 9780136042594
Author: Stuart Russell, Peter Norvig
Publisher: Prentice Hall
bartleby

Concept explainers

Expert Solution & Answer
Book Icon
Chapter 3, Problem 5E

Explanation of Solution

Formulation for a planar map:

  • The formulation puts one queen per column, with a new queen placed only in a square that is not attacked by any other queen.
  • To simplify matters, we’ll first consider the n–rooks problem where the first rook can be placed in any square in column 1 (n choices), the second in any square in column 2 except the same row that as the rook in column 1 (n−1 choices), and so on.
  • This gives n! elements of the search space.
  • For n queens, notice that a queen attacks at most three squares in any given column, so in column 2 there are at least (n − 3) choices, in column at least (n − 6) choices, and so on.
  • Thus the state space size Sn(n3)(n6)... Hence we have:

S3nnn(n3)(n3)(n6)(n6)

Blurred answer
Students have asked these similar questions
We know that when we have a graph with negative edge costs, Dijkstra’s algorithm is not guaranteed to work.   (a) Does Dijkstra’s algorithm ever work when some of the edge costs are negative? Explain why or why not.   (b) Find an algorithm that will always find a shortest path between two nodes, under the assumption that at most one edge in the input has a negative weight. Your algorithm should run in time O(m log n), where m is the number of edges and n is the number of nodes. That is, the runnning time should be at most a constant factor slower than Dijkstra’s algorithm. To be clear, your algorithm takes as input   (i) a directed graph, G, given in adjacency list form. (ii) a weight function f, which, given two adjacent nodes, v,w, returns the weight of the edge between them. For non-adjacent nodes v,w, you may assume f(v,w) returns +1. (iii) a pair of nodes, s, t. If the input contains a negative cycle, you should find one and output it. Otherwise, if the graph contains at least one…
The rook is a chess piece that may move any number of spaces either horizontally or vertically. Consider the “rooks problem” where we try to place 8 rooks on an 8x8 chess board in such a way that no pair attacks each other. a. How many different solutions are there to this?b. Suppose we place the rooks on the board one by one, and we care about the order in which we put them on the board. We still cannot place them in ways that attack each other. How many different full sequences of placing the rooks (ending in one of the solutions from a) are there?
Draw the state space tree for the 5-Queen problem with a branching factor of 2. Show a local maxima in the state space tree if Hill Climbing is used to solve the problem. Note that you do not have to draw the whole state space tree. You can make up an initial state of your choice.
Knowledge Booster
Background pattern image
Computer Science
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
SEE MORE QUESTIONS
Recommended textbooks for you
Text book image
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Text book image
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Text book image
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
Text book image
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Text book image
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Text book image
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education