Artificial Intelligence: A Modern Approach
3rd Edition
ISBN: 9780136042594
Author: Stuart Russell, Peter Norvig
Publisher: Prentice Hall
expand_more
expand_more
format_list_bulleted
Expert Solution & Answer
Chapter 3, Problem 3E
a.
Explanation of Solution
State space:
- State space:
- States are all possible city pairs (i,j).
- The map is not the state space.
- Successor function: The successor...
b.
Explanation of Solution
Size of state space:
- In the given case, “i” and “j” are two cities and “D(i,j)” is the straight-line distance between them...
c.
Explanation of Solution
“Yes”, there are some completely connected maps that do not have any solution.
Justification:
- In the given case, a map consisting of two nodes are connected by one link.
- The two friends will swap the places forever...
d.
Explanation of Solution
“Yes” there are maps that contain all solutions that require one friend to visit the same city twice.
Justification:
- If any one of the unsolvable maps are considered, and a self-loop is added to any one of the nodes...
Expert Solution & Answer
Want to see the full answer?
Check out a sample textbook solutionStudents have asked these similar questions
There are 2016 passengers about to board a plane, numbered 1 through 2016 in that order. Each passenger is assigned to a seat equal to his or her own number. However, the first passenger disregards instructions and instead of sitting in seat number 1, chooses and sits down in a randomly chosen seat. Each subsequent passenger acts according to the following scheme: if their assigned seat is available, they will sit there; otherwise, they will pick at random from the remaining available seats and sit there. What is the probability that the 1512th passenger ends up sitting in their assigned seat?
A. 1/2016
B. 1/2
C. 5/8
D. 3/4
E. None of the above
Let l be a line in the x-yplane. If l is a vertical line, its equation is x = a for some real number a.
Suppose l is not a vertical line and its slope is m. Then the equation of l is y = mx + b, where b is the y-intercept.
If l passes through the point (x₀, y₀), the equation of l can be written as y - y₀ = m(x - x₀).
If (x₁, y₁) and (x₂, y₂) are two points in the x-y plane and x₁ ≠ x₂, the slope of line passing through these points is m = (y₂ - y₁)/(x₂ - x₁).
Instructions
Write a program that prompts the user for two points in the x-y plane. Input should be entered in the following order:
Input x₁
Input y₁
Input x₂
Dingyu is playing a game defined on an n X n board. Each cell (i, j) of the board (1 2, he may only go to (2, n).) The reward he earns for
a move from cell C to cell D is |value of cell C – value of cell D|. The game ends when he reaches (n, n). The total reward
-
is the sum of the rewards for each move he makes.
For example, if n =
1
2 and A =
3
the answer is 4 since he can visit (1, 1) → (1, 2) → (2, 2), and no other solution
will get a higher reward.
A. Write a recurrence relation to express the maximum possible reward Dingyu can achieve in traveling from cell (1, 1) to cell
(n, n). Be sure to include any necessary base cases.
B. State the asymptotic (big-O) running time, as a function of n, of a bottom-up dynamic programming algorithm based on
your answer from the previous part. Briefly justify your answer. (You do not need to write down the algorithm itself.)
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
Similar questions
- Imagine there are N teams competing in a tournament, and that each team plays each of the other teams once. If a tournament were to take place, it should be demonstrated (using an example) that every team would lose to at least one other team in the tournament.arrow_forwardA certain cat shelter has devised a novel way of making prospective adopters choose their new pet. To remove pet owners’ biases regarding breed, age, or looks, they are led blindfolded into a room containing all the cats up for adoption and must bring home whichever they pick up. Suppose you are trying to adopt two cats, and the shelter contains a total of N cats in one of only two colors: black or orange. is it still possible to pick up two black cats with probability ½, given that there is an even number of orange cats in the room? If so, how many cats should be in the room? How many black, how many orange?arrow_forwardLet L be a line in the xy plane. If L is a vertical line, its equation is x=afor some real number a. Suppose L is not a vertical line and its slope is m. Then the equation of L is y=mx + b, where b is the y-intercept. If L passes through the point (x0,y0), the equation of L can be written as y –y0=m(x –x0). If (x1,y1)and (x2,y2)are two points in the xy plane and x1≠x2, the slope of the line passing through these points is m = (y2-y1)/ (x2-x1). Write a program that prompts the user to enter two points in the xy plane. The program outputs the equation of theline and uses ifstatements to determine and output whether the line is vertical, horizontal, increasing, or decreasing. If L is a nonvertical line, output its equation in the form y=mx + b.arrow_forward
- This problem is taken from the delightful book "Problems for Mathematicians, Young and Old" by Paul R. Halmos. Suppose that 931 tennis players want to play an elimination tournament. That means: they pair up, at random, for each round; if the number of players before the round begins is odd, one of them, chosen at random, sits out that round. The winners of each round, and the odd one who sat it out (if there was an odd one), play in the next round, till, finally, there is only one winner, the champion. What is the total number of matches to be played altogether, in all the rounds of the tournament? Your answer: Hint: This is much simpler than you think. When you see the answer you will say "of course".arrow_forwardOn 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…arrow_forwardThree prisoners have been sentenced to long terms in prison, but due to over crowed conditions, one prisoner must be released. The warden devises a scheme to determine which prisoner is to be released. He tells the prisoners that he will blindfold them and then paint a red dot or blue dot on each forehead. After he paints the dots, he will remove the blindfolds, and a prisoner should raise his hand if he sees at least one red dot on the other two prisoners. The first prisoner to identify the color of the dot on his own forehead will be release. Of course, the prisoners agree to this. (What do they have to lose?) The warden blindfolds the prisoners, as promised, and then paints a red dot on the foreheads of all three prisoners. He removes the blindfolds and, since each prisoner sees a red dot (in fact two red dots), each prisoner raises his hand. Some time passes when one of the prisoners exclaims, "I know what color my dot is! It's red!" This prisoner is then released. Your problem…arrow_forward
- In the game of 10-pin bowling the bowler has two attempts to knock down pins for every frame of 10-pins, and scores a point for each pin knocked down. If all the pins are knocked down with two attempts, the bowler gets a bonus - whatever score they obtain with their next bowl is doubled. If all the pins are knocked down on the 1st attempt, no 2nd attempt is allowed, and the bowler gets a bonus – whatever score they obtain on their next two bowls are doubled. A student attempts to capture this scoring system in VHDL code, a fragment of which is shown in Figure Q4. Q4 (a) Draw the state transition diagram described by the VHDL of Figure Q4. Discuss whether the VHDL of Figure Q4 correctly scores a game of 10-pin bowling. (b) elsif CLK='1' and CLK'event and UPD='1' then case present state is when throwl => frame := frame + 1; + resize (unsigned (N), 9) score := score if N = w1010" then present state score := score + resize (unsigned (N), 9) present state + resize (unsigned (N),9) if N =…arrow_forwardConsider a billboard that consists of n vertical panels of width 1 and varying integer heights, hanged down and held by a horizontal roller from the top. The panel i has a height h For the objective of placing two banners, it is allowed to move each panel up by any integer length using the roller. Once the necessary moves are completed, you may place two banners completely inside of the panels. Based on the above description, what is the maximum total area that you can provide for the two posters? Output Print a single integer- the maximum total area the two posters can cover together. Example 1: 6 Input: Output: 18 Input The first line of input contains one integer n (1arrow_forwardA hungry mouse wants to eat all four fruits in a maze such as the one below, in as few moves as possible.. At each turn the mouse can move any number of squares in one of the directions up, down, left or right, but it is not allowed to enter (or jump over) any walls (i.e., the black squares). Thus, the mouse moves just like a rook in chess. To eat a fruit, the mouse has to stop at that square. Assume that the maze has 4 fruits, and the size of b xh squares. 1. Give a suitable representatión of the states in this searching problem. 2. How many possible actions can the mouse perform at each move? (1.e., what is the branching factor?)arrow_forwardConsider a maze represented by a matrix of m rows and n columns with obstacles (see the figure below). A cell with a value = -1 is an obstacle that cannot be overcome. The goal is to start from cell [0, 0] and reach the last cell [m-1, n-1]. This may be possible by taking several paths. Count the number of these paths. The movement is allowed from cells (i+ 1, j) and (i, j+ 1) only. -1 -1 Provide two solutions, one iterative and one recursive to the above problem.arrow_forwardIn a game of tic-tac-toe, two players take turnsmarking an available cell in a 3 x 3 grid with their respective tokens (either Xor O). When one player has placed three tokens in a horizontal, vertical, or diagonalrow on the grid, the game is over and that player has won. A draw (no winner)occurs when all the cells on the grid have been filled with tokens and neitherplayer has achieved a win. Create a program for playing a tic-tac-toe game.The program prompts two players to alternately enter an X token and O token.Whenever a token is entered, the program redisplays the board on the console anddetermines the status of the game (win, draw, or continue). Here is a sample run:arrow_forwardSuppose you have a set of n lectures that need to be scheduled in classrooms. Each lecture has fixed starting and ending times. You would like to use as few classrooms as possible to schedule all lectures. For example: Lectures 1 2 3 5 7 8 10 11:00 11:00 10:30 12:30 10:30 12:30 2:00 Starts: 9:00 9:00 9:00 1:00 1:00 2:00 3:00 3:00 Ends: 2:30 2:30 4:30 4:30 4:30 These lectures çan be scheduled in 3 classrooms. a) Explain how a brute force algorithm would solve this problem and analyze its complexity. b) Design a more efficient algorithm to solve this problem, and analyze its complexity| [Important instruction: Create an arbitrary list of 10 lectures starting times and their corresponding ending times to provide full explanation of how your proposed algorithm should work step by step] Implement your efficient algorithm using Pythonarrow_forwardarrow_back_iosSEE MORE QUESTIONSarrow_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