A state space graph is a data representation of all the possible paths that lead to a solution for a problem.

Similar documents
Cpt S 223. School of EECS, WSU

Data Structures and Algorithms Written Examination

Decision Mathematics 1 TUESDAY 22 JANUARY 2008

Krishna Institute of Engineering & Technology, Ghaziabad Department of Computer Application MCA-213 : DATA STRUCTURES USING C

2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Why? A central concept in Computer Science. Algorithms are ubiquitous.

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig

WAN Wide Area Networks. Packet Switch Operation. Packet Switches. COMP476 Networked Computer Systems. WANs are made of store and forward switches.

5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.

International Journal of Software and Web Sciences (IJSWS)

Data Structures. Chapter 8

Exam study sheet for CS2711. List of topics

3.1 Solving Systems Using Tables and Graphs

International Journal of Advanced Research in Computer Science and Software Engineering

Warshall s Algorithm: Transitive Closure

The number of marks is given in brackets [ ] at the end of each question or part question. The total number of marks for this paper is 72.

West Virginia University College of Engineering and Mineral Resources. Computer Engineering 313 Spring 2010

An Introduction to The A* Algorithm

Measuring the Performance of an Agent

CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) Total 92.

Algorithmic Software Verification

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

Social Media Mining. Graph Essentials

Load balancing Static Load Balancing

Overview on Graph Datastores and Graph Computing Systems. -- Litao Deng (Cloud Computing Group)

Load Balancing and Termination Detection

Chapter 15: Dynamic Programming

DATA ANALYSIS II. Matrix Algorithms

A linear combination is a sum of scalars times quantities. Such expressions arise quite frequently and have the form

Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013

Decision Mathematics D1. Advanced/Advanced Subsidiary. Friday 12 January 2007 Morning Time: 1 hour 30 minutes. D1 answer book

Networks and Paths. The study of networks in mathematics began in the middle 1700 s with a famous puzzle called the Seven Bridges of Konigsburg.

Graph Theory Origin and Seven Bridges of Königsberg -Rhishikesh

Problem Set 7 Solutions

Chapter 4: Computer Codes

IT 3202 Internet Working (New)

CS MidTerm Exam 4/1/2004 Name: KEY. Page Max Score Total 139

CS335 Sample Questions for Exam #2

Lecture 3. Linear Programming. 3B1B Optimization Michaelmas 2015 A. Zisserman. Extreme solutions. Simplex method. Interior point method

Path Selection Analysis in MPLS Network Based on QoS

Chinese postman problem

Teaching Introductory Artificial Intelligence with Pac-Man

Introduction to Logic in Computer Science: Autumn 2006

6.02 Practice Problems: Routing

Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Decision Mathematics D1 Advanced/Advanced Subsidiary. Tuesday 5 June 2007 Afternoon Time: 1 hour 30 minutes

Network Flow I. Lecture Overview The Network Flow Problem

CompSci-61B, Data Structures Final Exam

EdExcel Decision Mathematics 1

CAB TRAVEL TIME PREDICTI - BASED ON HISTORICAL TRIP OBSERVATION

Sociology and CS. Small World. Sociology Problems. Degree of Separation. Milgram s Experiment. How close are people connected? (Problem Understanding)

Asynchronous Computations

Linear Programming. March 14, 2014

Approximation Algorithms

A Review And Evaluations Of Shortest Path Algorithms

Write your spelling words in alphabetical order. Then write your words in reverse alphabetical order!

Accentuate the Negative: Homework Examples from ACE

Methods for Solving Sudoku Puzzles

Finite Automata and Formal Languages

V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005

Ordered Lists and Binary Trees

Graph Database Proof of Concept Report

Load Balancing and Termination Detection

Minimum cost maximum flow, Minimum cost circulation, Cost/Capacity scaling

Chapter 6: Graph Theory

1 Solving LPs: The Simplex Algorithm of George Dantzig

Efficient Recovery of Secrets

Properties of Real Numbers

Random Map Generator v1.0 User s Guide

Finding Fault Location: Combining network topology and end-to-end measurments to locate network problems?

Practical Guide to the Simplex Method of Linear Programming

So today we shall continue our discussion on the search engines and web crawlers. (Refer Slide Time: 01:02)

Cloud Computing. Lectures 10 and 11 Map Reduce: System Perspective

A Fast Algorithm For Finding Hamilton Cycles

Load Balancing and Termination Detection

Euler Paths and Euler Circuits

Design and Analysis of ACO algorithms for edge matching problems

Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis

1. Write the number of the left-hand item next to the item on the right that corresponds to it.

Hardware Limited Artificial Intelligence: Desirability Assessment for Board Games. By Andy Matange & Michael Daly

Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit

Question 1. [7 points] Consider the following scenario and assume host H s routing table is the one given below:

How To Find Local Affinity Patterns In Big Data

Session 5 Dissections and Proof

in R Binbin Lu, Martin Charlton National Centre for Geocomputation National University of Ireland Maynooth The R User Conference 2011

On the effect of forwarding table size on SDN network utilization

Reductions & NP-completeness as part of Foundations of Computer Science undergraduate course

The Goldberg Rao Algorithm for the Maximum Flow Problem

Analysis of QoS Routing Approach and the starvation`s evaluation in LAN

5.1 Midsegment Theorem and Coordinate Proof

DATA STRUCTURES NOTES FOR THE FINAL EXAM SUMMER 2002 Michael Knopf

Some questions... Graphs

Introduction to Metropolitan Area Networks and Wide Area Networks

You can probably work with decimal. binary numbers needed by the. Working with binary numbers is time- consuming & error-prone.

MATHEMATICS Unit Decision 1

10CS35: Data Structures Using C

Examination paper for MA0301 Elementær diskret matematikk

CS311H. Prof: Peter Stone. Department of Computer Science The University of Texas at Austin

Design of LDPC codes

Transcription:

Chapter 2 in the textbook begins our study of search with rudimentary uninformed search algorithms. It starts with representing data and choices as graphs and then covers basic techniques for traversing the graphs as well as the advantages and disadvantages of the different algorithms. Questions: 1. Why is search an important component of an AI system? It is important because of the amount of data and the number of choices that are often being dealt with. Search is needed to determine the best possible answer given what is known. We as humans constantly add structure to the data we use so as to more effectively be able to find what we need from it. An AI system that does not attempt to emulate this in some way would not be very useful. 2. What is a state space graph? A state space graph is a data representation of all the possible paths that lead to a solution for a problem. 3. Describe the generate and test paradigm. In the generate and test paradigm you iterate over possible solutions and validate them as they are generated. While this is a trial and error approach, a good generator should be nonredundant and as informed as possible so as to provide possible solutions with a high level of potential. 6. Describe the greedy algorithm in a sentence or two. A greedy algorithm uses some method of ranking the available choices at any given stage. The choice with the best value is always the one taken. 7. State the Traveling Salesperson Problem. The Traveling Salesperson Problem attempts to find the shortest path through a weighted graph. The path must pass through each node of the graph only once and must end where it started.

Exercises: 7. Use Dijkstra s Algorithm to find the shortest path from the source vertex to all other vertices in Figure 2.35. Dijkstra s Algorithm will choose the shortest path at each node that it has not previously chosen until it reaches its destination. It can only analyze alternate paths if they are between nodes it has already visited. The paths to each of the vertices would be: = 4 2 > V 3 = 6 2 > V 3 1 > V 2 = 7 3 > V 2 = 7 2 > V 3 >1 V4 = 7 8. Create a representation for a puzzle such as the 15 puzzle that is appropriate for checking repeated states. One possible representation for the 15 puzzle could be to pack the values into a single unsigned 64 bit integer. First we would need to flatten the puzzle out into a single row of 16 pieces rather than 4 rows of 4 pieces. We can use 0 to represent the blank space. Since there are only 16 possible values for each space we only need 4 bits to store that value. Since there are 16 spaces and each space requires 4 bits, the entire game board will fit into an unsigned 64 bit integer. Checking for repeated states is then just an equality comparison. For example creating a game board state could look something like this: unsigned long long state = (15ull << 60) (0ull << 56) (10ull << 52) (2ull << 48) (5ull << 44) (6ull << 40) (14ull << 36) (12ull << 32) (13ull << 28) (11ull << 24) (4ull << 20) (9ull << 16) (3ull << 12) (8ull << 8) (1ull << 4) (7ull); which would represent a board that looked like this: 15 10 2 5 6 14 12 13 11 4 9 3 8 1 7

9. Solve the Missionaries and Cannibals Problem using breadth first search. The representation of this problem is as such, m = missionaries and c = cannibals. The west bank is on the left and followed by a colon, the east bank is next and is also followed by a colon, the boat state is last. The boat state is w for west bank and e for east bank. Moves are attempted in the order m, 2m, mc, 2c, c. Repeated and failed states have been pruned from this graph.

10. A farmer with a wolf, a goat, and a container of cabbage are on the west bank of the river. On the river is a boat in which the farmer and one of the other three (wolf, goat, or cabbage) can fit. If the wolf is left alone with the goat, the wolf will eat the goat. If the goat is left alone with the container of cabbage, the goat will eat the cabbage. Your goal is to transfer everyone to the other side of the river safely. Solve this problem using: The representation of this problem is as such, f = farmer, w = wolf, g = goat, c = cabbage, and the 2 river banks are separated by a colon with the west bank on the left and the east bank on the right. Moves are attempted in the order of fw, fg, fc, f. Repeated and failed states have not been pruned from these graphs so as to better illustrate the choices. a. Depth first search

b. Breadth first search

11. Use bfs and then dfs to get from start node (S) to goal node (G) in parts (a) and (b) of Figure 2.36. At each step, explore nodes in alphabetical order. (a) bfs (a) dfs (b) bfs (b) dfs