Artificial Intelligence: A Modern Approach
3rd Edition
ISBN: 9780136042594
Author: Stuart Russell, Peter Norvig
Publisher: Prentice Hall
expand_more
expand_more
format_list_bulleted
Concept explainers
Expert Solution & Answer
Chapter 3, Problem 16E
a.
Explanation of Solution
Formulation:
- Initial state: one arbitrarily selected piece (say a straight piece).
- Successor function: for any open peg, add any piece type from remaining types.
- For a curved piece, add “in either orientation”; for a fork, add “in either orientation” and connect “at either hole”...
b.
Explanation of Solution
Search
- All solutions are at the same depth, so depth-first search would be appropriate.
- The space is very large, so uniform-cost...
c.
Explanation of Solution
Reasons for not removing any one of the “fork” pieces:
- A solution has no open pegs or holes, so every peg is in a hole, so there must be equal numbers of pegs and holes. Removing a fork violates this property.
- There are two other “proofs” that are acceptable:
- a similar argument to the effect that there must be an even number of “ends”...
d.
Explanation of Solution
Upper bound:
- The maximum possible number of open pegs is 3.
- Pretending each piece is unique, any piece can be added to a peg, giving at most 12 + (2 · 16) + (2 · 2) + (2 · 2 · 2) = 56 choices per peg...
Expert Solution & Answer
Trending nowThis is a popular solution!
Students have asked these similar questions
On a chess board of r rows and c columns there is a lone white
rook surrounded by a group of opponent's black knights. Each
knight attacks 8 squares as in a typical chess game, which are shown
in the figure - the knight on the red square attacks the 8 squares
with a red dot. The rook can move horizontally and vertically by
any number of squares. The rook can safely pass through an empty
square that is attacked by a knight, but it must move to a square that
is not attacked by any knight. The rook cannot jump over a knight
while moving. If the rook moves to a square that contains a knight,
it may capture it and remove it from the board. The black knights.
never move. Can the rook eventually safely move to the designated
target square?
The figure illustrates how the white rook can move to the blue
target square at the top-right corner in the first sample case. The
rook captures one black knight at the bottom-right of the board on
its way.
Rok nd kight lcoes by Chunen
Input
The first line…
A frieze pattern is a decoration made from repeated copies of a basic unit, arranged in a row. Figure 1 shows two examples from France in about 1820.
Figure 1 Example friezes
a.Provide a decomposition of the problem of drawing a frieze pattern, assuming for the moment that the basic unit is repeated just 7 times. At this stage you are not trying to produce a solution, just break the problem down into smaller parts. We are looking for a decomposition that could apply to any frieze, so you should for now ignore the details of how the basic unit will be drawn. You will need to use a loop.
(4 marks)
In the remainder of this question, you will design and implement a program to draw the particular frieze shown in Figure 2.
Figure 2 The frieze pattern for this question
In this frieze the length of each horizontal and vertical segment is 25.
b.Next refine your decomposition, adding more detail so that it becomes an algorithm. This is not yet a program, so you should write the…
Consider a scenario in which you are presented with a data set of length K. Write a simple recursive algorithm to choose all possible pairs of elements in the set. Assess the computational complexity and explain your calculations.
Chapter 3 Solutions
Artificial Intelligence: A Modern Approach
Ch. 3 - Explain why problem formulation must follow goal...Ch. 3 - Prob. 2ECh. 3 - Prob. 3ECh. 3 - Prob. 4ECh. 3 - Prob. 5ECh. 3 - Prob. 6ECh. 3 - Prob. 8ECh. 3 - Prob. 9ECh. 3 - Prob. 10ECh. 3 - Prob. 11E
Ch. 3 - Prob. 12ECh. 3 - Prob. 13ECh. 3 - Prob. 14ECh. 3 - Prob. 15ECh. 3 - Prob. 16ECh. 3 - Prob. 17ECh. 3 - Prob. 18ECh. 3 - Prob. 20ECh. 3 - Prob. 21ECh. 3 - Prob. 22ECh. 3 - Trace the operation of A search applied to the...Ch. 3 - Prob. 24ECh. 3 - Prob. 25ECh. 3 - Prob. 26ECh. 3 - Prob. 27ECh. 3 - Prob. 28ECh. 3 - Prob. 29ECh. 3 - Prob. 31ECh. 3 - Prob. 32E
Knowledge Booster
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
- Hi. I'm studying JAVA Data structure and Algorithm and stuck with this mouse maze problem. Could anybody help me with it please? I do not have any idea about setting up the restriction for mouse moving conditions. (Please provide right answer and explain it step by step)arrow_forwardAlgorithms, Data Structures and Computability (Using python)arrow_forwardThe following are the different operations that can be done using a doubly linked list. The corresponding algorithm and simulation/s are attached in the course material for doubly linked list. Choose only one operation and create the Java program for the chosen operation using its corresponding algorithm. The rubric below will be used to assess your output. Insertion in the beginning of the list Insertion after a node Insertion before a node Deletion of the first node Deletion of the last node Deletion of a given nodearrow_forward
- Offline Problems: In the fibonacci sequence, you count 1,1,2,3,5,8... Each number is equal to the previous two added together. Imagine a grid that looked like below, where the first row and first column were the fibonacci sequence. If you wanted to fill in the remaining grid with the following rule: (The value of each cell is equal to the sum of the number above, to the left, and to the upper left corner of the cell). (Provide their index values as they would appear in Java. Write the pseudocode that fills in the following table below (with loops not magic numbers) Then write the pseudocode that fills in the rest of the table according to the above rules. 1 1 2 3 5 8 13 21 1 2 3 5 8 13 21arrow_forwardInvestigate both the iterative and the recursive methods of problem resolution, and then compare and contrast the results of your research. When would you use iteration when recursion would be more appropriate, and when would you use recursion when iteration would be more appropriate? Your answer should be justified by giving examples that are different from those that are shown on the slides of the presentation.arrow_forwardSearch and learn three existing algorithms that use the dynamic programming strategy, in addition to those that we have discussed the class (“rod-cutting” and “matrix-chain”). For each algorithm, concisely and clearly describe: 1. The problem statement 2. The recursive structure in the solution. 3. Why does the recursion-based idea not work well ? 4. Why does dynamic programming work ?arrow_forward
- 1. Now, answer these following questions: (a). Write an algorithm to figure out how many maximum levels the maze can go up to. (b). Figure out the complexity of your algorithm. To create a maze some rooms of a building is connected. Starting room is called Entrance room. From the entrance room other rooms are there connected from it. However, some rooms of that maze- building have connected room from it, and some rooms do not have any connected room. Each of the room can have at most or up to two rooms connected from it. The starting room is the entrance room of the maze or building. Fore example: It can be any one like the followings: Exumple -J: Room1 Roono Room Entrance Room Raom 5. Room2 Room8 Room2 RoDom Here, maximum lenel =7arrow_forwardConsider the algorithm that puts minimal effort into splitting the list into one of size n − 1 and one of size one, but puts lots of effort into recombining the sublists. Also consider the algorithm that puts lots of effort into splitting the list into one of size n − 1 and one of size one, but puts minimal effort into recombining the sublists. What are these two algorithms? explainarrow_forwardPersonal project Q5. This question is concerned with the design and analysis of recursive algorithms. You are given a problem statement as shown below. This problem is concerned with performing calculations on a sequence A of real numbers. Whilst this could be done using a conventional loop-based approach, your answer must be developed using a recursive algorithm. No marks will be given if your answer uses loops. FindAverageAndProduct(a1, ...., an) such that n > 1 Input: A sequence of real values A = (a1, ...., an) Output:, A 2-tuple (average, product) containing the average (average) of all the values and the product (product) of all the values of the elements in A. Your recursive algorithm should use a single recursive structure to find the average and product values, and should not use two separate instances of a recursive design. You should not employ any global variables. (a) Produce a pseudo code design for a recursive algorithm to solve this problem. (b) Draw a call-stack…arrow_forward
- Consider the 8-puzzle below with initial and goal states shown, where O corresponds to an empty space and the other numbers correspond to number tiles. The number tiles can move left, right, up, or down into the empty space (where available). The neighborhood operator consists of applying a possible move to the current state. Using hill climbing search algorithm and Manhattan distance (see Note below) as the objective, show the first two moves of hill climbing algorithm starting from the initial state while showing all the nodes generated at each step and their corresponding objective value. Note: In a 2D plane with point pi at coordinates (x, yı) and point p, at coordinates (x2, ya), the Manhattan distance between points pi and pa is computed as |x1 - Xa| + lyı - Y2l where ly: - Val represents absolute difference between y, and y. As an example of coordinates, tile 8 in start state below can be considered at coordinates (1,2) while tile 8 in goal state below can be considered at…arrow_forward5. Consider the Josephus problem: in class, we looked at n elements in a circle and eliminated every second element until only one was left. The last element surviving this process was called the Josephus number. Instead of finding the last survivor, let I(n) be the element that survives second to last. To give a few small values, I(2) = 1, I(3) = 1, I(4) = 3, and I(5) = 5. Give a closed form expression for I(n) for any n ≥ 2.arrow_forwardConsider a scenario in which you would use recursive binary search. What would you do? What is the halting condition for a recursive binary search in the first place?arrow_forward
arrow_back_ios
SEE MORE QUESTIONS
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education