Draw the search tree generated by algorithm a

Assignment Help Data Structure & Algorithms
Reference no: EM131210776

Assignment:

Turn in a hardcopy of your solutions to the following problems.

1. In a typical state space representation of the 8-puzzle, let

 

1

4

7

3

8

6

5

2

be the start state and

1

2

3

8

 

4

7

6

5

be the goal state. We want to solve this problem using the A* algorithm. Operators representing legal moves are U (move the blank space up one), D (down), L (left) and R (right), where the obvious prerequisites ap- ply (e.g., if the blank space is in the top row, it cannot move up). For any state n, let g(n) be the usual cost function, in other words, the number of moves used to reach state n from the start state. Let the heuristic function h(n) be the number of tiles that are not in their goal state positions in state n.

a. Draw the search tree generated by Algorithm A*, using the representation and g and h functions given above, starting from the initial state and going to the point in which five nodes have been expanded and their descendants added to the search tree. When a duplicate state occurs, just discard the duplicate and do not include it in the search tree. Thus your answer should show all non-duplicate nodes generated as suc- cessors to any expanded node during this search. Write each node's g, h and f values, along with a written word (first, second, third, etc.) indicating the order in which that node was expanded, next to every node. Also write the operator used (U, D, L or R) next to each corresponding arc/link between states.

b. Put an asterisk next to all leaf nodes in the search tree you produced in (a) that could legally be the next node expanded by this A* algorithm should the search process continue (but don't expand any of them).

c. Suppose that instead of using the h(n) function defined above, the A* algorithm used an h(n) that was one half of the number of tiles that are not in their goal state positions in state n. Would the resulting pro- cedure be guaranteed to find a minimal cost path to the goal state? Why or why not?

2. Consider a puzzle consisting of 4 tiles on a rectangular board with room for 5 tiles in a row. There are two black (B) tiles and two white (W) tiles, e.g., state WBWEB of the board is:

685_State WBWEB.jpg

where E is an empty space or cell. The goal of this puzzle is to reach any state in which all of the W tiles are to the left of all of the B tiles. Note that there is more than one such state. Allowed moves, which can be in either direction, are as follows:

- a tile may move into an adjacent empty cell
- a tile may jump over an adjacent tile into an empty cell
- a tile may jump over two adjacent tiles into an empty cell

For example, any of the four tiles in the state pictured above could legally move to the empty space. Con- sider the heuristic function h(board) with

h(board) = i=1Σ5 (white(i,board) + empty(i,board))

where: white(i,board) = i; if the ith board position has a white tile, and 0 otherwise;
empty(i,board) = i/2 if the ith board position is empty, and 0 otherwise.

For example, for the board position WBWEB above h = 1 + 3 + 2 = 6. Lower values of h are "better". Let the cost g(board) be the number of moves needed to reach that board state from the start state.

a. Draw the search tree generated by Algorithm A*, using the given g and h functions, from the initial state BBWWE (not pictured above!) to a goal state. Show all nodes generated as successors to any expanded node during this search. Whenever a duplicate state is generated, discard it and do not add it to the search tree. Write each node's g, h, and f values next to the nodes.

b. Suppose that, even though one solution has been found, it was desired to continue the search process to see if additional paths to a goal state could also be found. Place an asterisk next to all of the non-goal leaf nodes in your search tree in (a) that could legally be the next state expanded by Algorithm A* were the search to continue (but don't expand them).

c. Yes or no: Is the h function that we use above admissible? Explain your answer.

3. Consider the game tree pictured below, where MAX and MIN are indicated in the usual fashion. Leaf node labels indicate the results of applying an evaluation/value function from MAX's viewpoint to the game states. To produce what you turn in, you can either print this page and record your answers on the printed page, or you can just draw everything by hand.

a. Write the backed-up minimax value for each and every non-leaf node in the game tree next to that node.

415_Game Tree.jpg

b. Place an asterisk by the arc representing the move that MAX would select based on (a).

c. Suppose that instead of using minimax search, alpha-beta search is being used, working from left to right in the search tree. Draw a short horizontal line through the arc where the first cut-off would occur, labeling this as either an alpha or a beta cutoff.

 

Reference no: EM131210776

Questions Cloud

Hypothesis testing for two populations : TNH Industry Human Resources department is concerned about the perception of the hours worked per week at the India facility compared to hours worked at the China facility. Sunila, the HR Manager has asked for your help.
How business decision support systems have evolved : Write a 2 page essay describing how business decision support systems have evolved over the past several decades as computer and data capabilities have grown. The rubric for this assignment can be viewed when clicking on the assignment link.
Hypothesis testing scenario : Caption: As you prepared your memo about the new "Tire Kit" line, you discovered that the sample size that you were provided was insufficiently small. Using a larger sample of 200 customers, you conducted this research and the data is now ready fo..
Modify the program so that it passes the age variable : Modify the program so that it passes the age variable by reference to the get Age function. Save and then run the program. When prompted to enter your age, type your age and press Enter. This time, the message contains your age
Draw the search tree generated by algorithm a : Draw the search tree generated by Algorithm A*, using the given g and h functions, from the initial state BBWWE (not pictured above!) to a goal state.
Problem regarding the colorblind person : In a certain population, 4% of people are color blind. A subset is to be randomlychosen. How large must the subset be if the probability of its containing at least one colorblind person is at least 95%?
Current staffing levels for horizon events : You have recently been appointed as the new Business Development Manager for a company called Horizon Events. The company is reasonably well established and has been operatiang in your region for the past ten years.
Does your selected organization have a focused strategy : Describe the Internal factors and influences (at least 3) which could impact the company's decision making such as the company's market position and its competencies, capabilities, resource strengths and weaknesses, and competitiveness.
Regard to the standard deviation : With regard to the standard deviation, illustrate how and why the larger the deviation number, the more difficult it would be to predict an outcome. Use specific examples to illustrate.

Reviews

Write a Review

Data Structure & Algorithms Questions & Answers

  Define the child term as used in trees

Suppose the following list of numbers is inserted in order into an empty binary search tree:45, 33, 90, 34, 68, 72, 15, 24, 30, 66, 11, 50, 10

  Describe different structures and areas within the brain.

Discuss in detail the thalamus, hypothalamus, endocrine and limbic systems.

  Design an adt for a two-color

Design an ADT for a two-color, double-stack ADT that consists of two stacks one "red" and one "blue" and has as its operations color-coded versions of the regular stack ADT operations.

  Implement the queue data structure

implement the queue data structure - circular linked list to implement the queue data structure as described in java.

  Write code to implement the expression

Write code to implement the expression: A= (B+C) * (D+E) on 3-, 2-, 1- and 0- address machines. In accordance with programming language practice, computing the expression should not change the values of its operands. Show all instructions.

  Refresh address counter

A microcomputer memory is built from 64K X 1 DRAM, with DRAM cell array organized into 256 rows. Each row requires being refreshed at least once every four ms, strictly on a periodic basis.

  Whether the site provides sufficient navigation information

Create screen captures from the sites and indicate where the site structure and navigation information are available to the user.

  Shell scripting based questions

Determine will the following only print the text "I FOUND A MATCH" to standard output when the grep is successful? if grep "mrichard" /etc/passwd; then echo "I FOUND A MATCH"; fi

  Hierarchy chart and design the logic

Draw the hierarchy chart and design the logic for a program that calculates the projected cost of an automobile trip. Assume that the user's car travels 20 miles per gallon of gas. Design a program that prompts the user for a number of miles drive..

  Create algorithm to read file of employee records

Create the algorithm which will read a file of employee records and produce the weekly report of gross earnings for those employees.

  Splay tree and show the resulting tree

Insert 5, 1, 3, 6, 2, 4 into an initially empty splay tree and show the resulting tree - Can you provide some help with my Java language project? I hope someone nice out there can help me with it.

  Algorithm for partitioning a set of n weights into k

give a greedy algorithm for partitioning a set of n weights into k bins. b) does it find the perfect solution?

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd