AIMA Chapter 3: Solving problems by searching

Save this PDF as:
 WORD  PNG  TXT  JPG

Size: px
Start display at page:

Download "AIMA Chapter 3: Solving problems by searching"

Transcription

1 AIMA Chapter 3: Solving problems by searching Ana Huaman January 13, Define in your own words the following terms: state, state space, search tree, search node, goal, action, transition model and branching factor State: It represents a particular configuration of the world State space: It consists of the set of all possible states that can be reached from the initial state by any sequence of actions Search tree: It is the possible sequences of actions beginning at the initial state of the problem. It is composed by branches (actions) and nodes (instances of the state space). The root node of the search tree is the initial state. Search node: It is a bookeeping data structure that is used to represent the search tree. Goal: It is a state which our agent wants to achieve. It can be formulated as one state (or a subset of states) of the state space. It also can be expressed as an abstract property ; in both cases a goal test must be performed. Action: Given a particular state s, an action is a process that can be executed in order to change s into a new state s in the state space. Transition Model: It is the description of what each action does Branching factor: The maximum number of successors of a node. It is used to express the complexity of a problem. 2. Explain why problem formulation must follow goal formulation First, problem formulation is the process of deciding what actions and states to consider, given a goal, so we need to define it before. Second, once we have defined our goal properly, we can abstract the states and actions needed to achieve your objective. By abstraction I mean the simplification of the problem, this is the removal of detail not relevant to our goal. 3. Which of the following are true and which are false? Give a brief explanation of each answer: Depth-first search always expands at least as many nodes as A* search with an admissible heuristic False. Depth-first search (DFS) is neither optimal nor complete, so it may come with a sub-optimal solution at an earlier stage than A* 1

2 (expanding less nodes). For instance, in 1, considering that G is the goal state we observe that DFS would just expand 1 node, with a cost of 100; however, A* would expand 3 nodes to find an optimal path to C (with a lower cost of 70 but apparently a longer path). A* evaluates the goal when it expands the node, rather than when it is generated, which is why it does not get stuck in a sub-optimal path. Figure 1: Example 1 h(n)=0 is an admissible heuristic for the 8-puzzle True. For a heuristic function h(n) to be admissible, it must satisfy: (a) The function does not have to overestimate the real path cost (b) h(goal) = 0[2] If we consider the path costs to be non-negative (as it is usually done), then h(n) = 0 satisfy both requirements. Note, however, that using this heuristic is the same as using Uniform-cost search, an uninformed search strategy, so we are not using any advantage of an informed search. Any other admissible heuristic that dominates h = 0 will generate fewer nodes and consequently will use less time and space during the search. A* cannot be used in robotics because percepts, states and actions are continuous False. It is a fact that the world is continuous, but it is also true that usually we use discretization at some extent to solve problems that otherwise would be infeasible or harder to manage. For example, for applications in robot navigation in known environments, it is common to represent the world as a 2D grid. If the granularity factor is small enough (depending of the problem), then this problem can be solved by using any search algorithm that operates in a discrete manner. As a reference, in the DARPA Challenge 2007, A* was one of the options used for planning routes to achieve all checkpoints in the real-world road. 1 1 At least, the Virginia Tech s team (Victor Tango) used it successfully (they placed third in the finals) 2

3 Breadth-first search is complete even if zero step-costs are allowed True (if the other conditions for completeness are met). In breadthfirst search (BFS), we care about the number of steps the path has rather than the path cost. So, for this search to be complete, the conditions are: The goal must be at a finite depth The branching factor must be finite The condition of having an infinite loop of zero step-cost paths would affect completeness in the case of uniform-cost search, because in that case the evaluation function is the path cost (in BFS, it is assumed that each path has the same cost). Assume that a rook can move on a chessboard any number of squares in a straight line, vertically or horizontally, but cannot jump over pieces. Manhattan distance is an admissible heuristic for the problem of moving the rook from square A to square B in the smallest number of moves False. The condition for a heuristic function is that it never overestimates the solution cost. We can easily see in the example shown in Fig. 2 that for diagonal displacements, the Manhattan distance overestimate the real path cost (in the figure, the real cost from start (node S) to goal (node G) is 4, while according to Manhattan distance, it would be 8. (a) Cost real =4 (b) Cost Manhattan =8 Figure 2: Example of a non-admissible heuristic for the rook problem So, what can be an admissible heuristic? First, we will relax the problem to a simpler version. The original is: A rook can move from square A to square B if: (a) There are not occupied squares between A and B (horizontal, vertical or diagonal) (b) Square B is on the same column or row of A (straight movement) or it is on the same diagonal. If we relax the first condition (so the rook can jump over pieces), we would have 2 cases: One when B is on the same diagonal of A and when it is not. Both cases are shown in Fig.3. In Fig.3(a), it is easy to see that the path cost is equal to the d vertical (= d horizontal ) between the start and goal nodes. In the second case Fig. 3(b), after 3

4 a simple observation we can see that the shortest path is equal to MAX(d vertical, d horizontal ). So, we can formulate the heuristic as: h(s) = MAX(abs(X S X G ), abs(y S Y G )) which is true for both cases (in the first case, as both horizontal and vertical distances are equal, the maximum is also the same). As this is a solution for a relaxed version of the original problem, it is an admissible heuristic for the original problem. (a) Diagonal relaxed case (b) Non-diagonal relaxed case Figure 3: Relaxed problem 4. Consider the problem of finding the shortest path between two points on a plane that has convex polygonal obstacles as shown in Fig.4 This is an idealization of the problem that a robot has to solve to navigate in a crowded environment Figure 4: A scene with polygonal obstacles. S and G are the start and goal states Suppose the state space consists of all positions (x, y) in the plane. How many spaces are there? How many paths are there to the goal? We define our world like this: Given the world W = R 2 (the real plane) and a finite group of convex polygonal obstacles O, our goal is to move an agent (represented as a point) from an initial position (x s, y s ) to a final position (x g, y g ), such as the path is the shortest 4

5 possible and that it is goes through the free space, defined as F = W O. Our state space would be all the positions (x, y) R 2 that are in the free space F (given that the number of obstacles is finite, it is safe to say that the free space exists). In the world R 2, even if we have just a small neighborhood of radius ɛ > 0, the number of pairs (x, y) inside it is infinite. About the paths towards the goal, if the goal is reachable (in the figure shown, it is), there are infinite paths, given that there are infinite states. However, there is just one optimal path that is formed by a group of vertices of the obstacles and two straight lines connecting the initial and final positions to some vertices of the obstacles. Explain briefly why the shortest path from one polygon vertex to any other in the scene must consist of straight-line segments joining some of the vertices of the polygons. Define a good state space now. How large is this state space? First we define the Euclidean shortest path: The shortest path from one polygon vertex p to any other q is expressed by: ρ =< p, p 1, p 2,..., p k, q > where each vertex in the path is a vertex of one of the polygonal obstacles. We can prove by contradiction that the statement above is true[1]. First, let us assume that at least one of the vertices in the shortest path (p i ) is not a vertex of the obstacles. Also, consider that each of the vertices are not redundant (so 3 consecutives vertices are not colinear, or the same, they form a triangle). For this, we evaluate the 3 possible cases, shown in Fig. 5: Figure 5: Three possible cases to prove the ESP statement (figure from [1]) Case 1: Both edges p i 1 p i and p i p i+1 are not on the tangent of an obstacle or on the tangent of a vertex. If this is the case, as we can see in Fig. 5, there is always a small neighborhood U around p i such that for a point p i i U. From observing the figure, we can easily see that d e (p i 1, p i ) + d e(p i, p i+1) < 5

6 d e (p i 1, p i ) + d e (p i, p i+1 ). From this we see that if we replace p i by p i we can obtain a shorter path, which contradicts the initial assumption of ρ being the shortest path. Case 2: Both edges p i 1 p i and p i p i+1 are on an obstacle edge or on a tangent of a vertex. For this case, we can prove a contradiction similar as in case 1. Lets consider 02 vertices p i 1 and p i+1 that are the closest such that p i 1 p i and p i p i+1 are on the original tangents. In a similar way to the case above, we can always find a point p i such that the new distance p i 1 p i p i+1 is shorter than the original p i 1 p ip i+1, that means another contradiction. Case 3: Just one edge is on an obstacle tangent and the other is not This is a combination of the other two cases mentioned and is demonstrated in a similar way. Definition of the state space for the problem Given the proof above, we observe that to reach our goal (to go from a polygon vertex to another) in a shortest path, we have to analyze just the vertices of the obstacles, so we can safely ignore the other points (x, y) in the free space. Abstracting the problem then, we can define the state space of the problem as: State space = (x, y) (x, y) is a vertex of O (where O represents the set of polygonal obstacles in the real plane analyzed.) How large is this state space?: It would be the total number of vertices of all the obstacles in the plane. i=n Size ss = #V ert Oi i=0 Define the necessary functions to implement the search problem, including an ACTIONS function that takes a vertex as input and returns a set of vectors, each of which maps the current vertex to one of the vertices that can be reached in a straight line (Do not forget the neighbors on the same polygon) Use the straight-line distance for the heuristic function Apply one or more of the algorithms in this chapter to solve a range of problems in the domain, and comment on their performance. 5. Prove each of the following statements: Breadth-first search is a special case of uniform-cost search True, since in breadth-first search we consider that the cost is the same between nodes. Breadth-first search, depth-first search, and uniform-cost search are special cases of best-first search Best-first search selects the node to expand based on an evaluation function f(n). The node with the lowest value of f is chosen to be expanded first in each iteration. For each of the three uninformed search strategies mentioned we have: (a) Breadth-first search: f(n)=number of actions (or branches) between start and current nodes 6

7 (b) Depth-first search: Uh, not sure here...i think that the function thinks that the farthest of the start, the nearest to the goal :) (c) Uniform-cost search: f(n)=sum of cost of subpaths between start and current goal Uniform-cost search is a special case of A* search For A* we have that the evaluation function is given by: f(n) = g(n)+h(n). Instead, for uniform-cost search we consider f(n) = g(n), that is h(n) = 0. References [1] Statistical Science and Interdisciplinary Research, chapter 1. World Scientific Review, [2] Artificial Intelligence: A Modern Approach. Prentice Hall,

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

AI: A Modern Approach, Chpts. 3-4 Russell and Norvig AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring,

More information

Outline. Informed search algorithms. Greedy best-first search. Best-first search. Greedy best-first search example. Greedy best-first search example

Outline. Informed search algorithms. Greedy best-first search. Best-first search. Greedy best-first search example. Greedy best-first search example Outline Informed search algorithms Chapter 4 Best-first search A * search Heuristics Local search algorithms Hill-climbing search Simulated annealing search Local beam search Genetic algorithms Best-first

More information

Heuristics and A* Search

Heuristics and A* Search 1 Hal Daumé III (me@hal3.name) Heuristics and A* Search Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 2 Feb 2012 Many slides courtesy

More information

Informed search algorithms

Informed search algorithms CmpE 540 Principles of Artificial Intelligence Informed search algorithms Pınar Yolum pinar.yolum@boun.edu.tr Department of Computer Engineering Boğaziçi University Chapter 4 (Sections 1 3) (Based mostly

More information

The scenario: Initial state Target (Goal) states A set of intermediate states A set of operations that move the agent from one state to another.

The scenario: Initial state Target (Goal) states A set of intermediate states A set of operations that move the agent from one state to another. CmSc310 Artificial Intelligence Solving Problems by Searching - Uninformed Search 1. Introduction All AI tasks involve searching. General idea: You know where you are (initial state) and where you want

More information

Heuristic (Informed) Search (Where we try to choose smartly)

Heuristic (Informed) Search (Where we try to choose smartly) Heuristic (Informed) Search (Where we try to choose smartly) R&: Chap., Sect.. Recall that the ordering of FRIGE defines the search strategy Search Algorithm # SEARCH#. ISERT(initial-node,FRIGE). Repeat:

More information

Introduction to Intelligent Systems

Introduction to Intelligent Systems Problem Solving by Search Objectives Problem solving agent Tree search Uninformed search strategies: BFS, DFS, DLS, and IDS Heuristic search strategies: GBFS and A* Reference Russell & Norvig: 3 and 4.1

More information

State Space Representation and Search

State Space Representation and Search 1. Introduction In this section we examine the concept of a state space and the different searches that can be used to explore the search space in order to find a solution. Before an AI problem can be

More information

Artificial Intelligence Search I

Artificial Intelligence Search I Content: Search I Artificial Intelligence Search I Lecture 3 Introduction Knowledge, Problem Types and Problem Formulation Search Strategies General Search Problem 4 Criteria for Evaluating Search Strategies

More information

Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as: Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

More information

Artificial Intelligence

Artificial Intelligence rtificial Intelligence Informed search Chapter 4, IM Romania Romania Romania problem Initial state: rad ucharest. 1 Informed search Example heuristic function h( Searching for the goal and knowing something

More information

573 Intelligent Systems

573 Intelligent Systems Sri Lanka Institute of Information Technology 3ed July, 2005 Course Outline Course Information Course Outline Reading Material Course Setup Intelligent agents. Agent types, agent environments and characteristics.

More information

Informed search algorithms. Chapter 4, Sections 1 2 1

Informed search algorithms. Chapter 4, Sections 1 2 1 Informed search algorithms Chapter 4, Sections 1 2 Chapter 4, Sections 1 2 1 Outline Best-first search A search Heuristics Chapter 4, Sections 1 2 2 Review: Tree search function Tree-Search( problem, fringe)

More information

Artificial Intelligence

Artificial Intelligence COMP224 Artificial Intelligence The Meaning of earch in AI The terms search, search space, search problem, search algorithm are widely used in computer science and especially in AI. In this context the

More information

Test-1 Solution. Date: Marks: 50. Subject & Code: Artificial Intelligence and Agent technology (14SCS24)

Test-1 Solution. Date: Marks: 50. Subject & Code: Artificial Intelligence and Agent technology (14SCS24) Test-1 Solution Date: 25-02-2015 Marks: 50 Subject & Code: Artificial Intelligence and Agent technology (14SCS24) Name of faculty: Dr.Srikanta Murthy. K Sec: II Sem M.Tech Time: 8.30 to 10.00AM Q1). What

More information

A problem consists of. Artificial Intelligence. Example: 8-puzzle. Example: 8-puzzle. Example: 8-puzzle. Expanding 8-puzzle

A problem consists of. Artificial Intelligence. Example: 8-puzzle. Example: 8-puzzle. Example: 8-puzzle. Expanding 8-puzzle A problem consists of Artificial Intelligence Uninformed search Chapter 3, AIMA An initial state, θ(0) A list of possible actions, α, for the agent A goal test (there can be many goal states) A path cost

More information

Heuristic Search. Ref: Chapter 4

Heuristic Search. Ref: Chapter 4 Heuristic Search Ref: Chapter 4 1 Heuristic Search Techniques Direct techniques (blind search) are not always possible (they require too much time or memory). Weak techniques can be effective if applied

More information

Measuring the Performance of an Agent

Measuring the Performance of an Agent 25 Measuring the Performance of an Agent The rational agent that we are aiming at should be successful in the task it is performing To assess the success we need to have a performance measure What is rational

More information

An Introduction to The A* Algorithm

An Introduction to The A* Algorithm An Introduction to The A* Algorithm Introduction The A* (A-Star) algorithm depicts one of the most popular AI methods used to identify the shortest path between 2 locations in a mapped area. The A* algorithm

More information

Midterm Examination CS540: Introduction to Artificial Intelligence

Midterm Examination CS540: Introduction to Artificial Intelligence Midterm Examination CS540: Introduction to Artificial Intelligence October 27, 2010 LAST NAME: SOLUTION FIRST NAME: SECTION (1=Zhu, 2=Dyer): Problem Score Max Score 1 15 2 16 3 7 4 15 5 12 6 10 7 15 8

More information

AI Principles, Semester 2, Week 1, Lecture 3, Search

AI Principles, Semester 2, Week 1, Lecture 3, Search AI Principles, Semester 2, Week 1, Lecture 3, Search Examples of problems which are solved by search Setting the scene: your Romanian holiday search problem How to be systematic in your search Uninformed

More information

Planar Tree Transformation: Results and Counterexample

Planar Tree Transformation: Results and Counterexample Planar Tree Transformation: Results and Counterexample Selim G Akl, Kamrul Islam, and Henk Meijer School of Computing, Queen s University Kingston, Ontario, Canada K7L 3N6 Abstract We consider the problem

More information

Foundations of Artificial Intelligence

Foundations of Artificial Intelligence Foundations of Artificial Intelligence 4. Informed Search Methods Heuristics, Local Search Methods, Genetic Algorithms Wolfram Burgard, Maren Bennewitz, and Marco Ragni Albert-Ludwigs-Universität Freiburg

More information

CS 520: Introduction to Artificial Intelligence. Reading:

CS 520: Introduction to Artificial Intelligence. Reading: CS 520: Introduction to Artificial Intelligence Prof. Louis Steinberg Lecture 4: Constraint satisfaction 1 Reading: For next lecture: Russell & Norvig Chapter 5 For next week: Graham Read Ch 1-3 and 6

More information

(Refer Slide Time: 01:35)

(Refer Slide Time: 01:35) Artificial Intelligence Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 6 Informed Search -2 Today we start our 6 th lecture. This

More information

Polygon Triangulation. O Rourke, Chapter 1

Polygon Triangulation. O Rourke, Chapter 1 Polygon Triangulation O Rourke, Chapter 1 Outline Triangulation Duals Three Coloring Art Gallery Problem Definition A (simple) polygon is a region of the plane bounded by a finite collection of line segments

More information

The A* Search Algorithm. Siyang Chen

The A* Search Algorithm. Siyang Chen The A* Search Algorithm Siyang Chen Introduction A* (pronounced A-star ) is a search algorithm that finds the shortest path between some nodes S and T in a graph. Heuristic Functions Suppose we want to

More information

BEYOND CLASSICAL SEARCH: SEARCHING WITH NON-DETERMINISTIC ACTIONS SEARCHING WITH PARTIAL OBSERVATIONS ONLINE SEARCH & UNKNOWN ENVIRONMENTS

BEYOND CLASSICAL SEARCH: SEARCHING WITH NON-DETERMINISTIC ACTIONS SEARCHING WITH PARTIAL OBSERVATIONS ONLINE SEARCH & UNKNOWN ENVIRONMENTS BEYOND CLASSICAL SEARCH: SEARCHING WITH NON-DETERMINISTIC ACTIONS SEARCHING WITH PARTIAL OBSERVATIONS ONLINE SEARCH & UNKNOWN ENVIRONMENTS Chapter 4, Sections 4.3-4.5 Machines will be capable, within twenty

More information

Artificial Intelligence Lecture 2

Artificial Intelligence Lecture 2 Artificial Intelligence Lecture 2 Representation From AI admirers to AI programmers. Step 1: Represent the problem so that it is computerfriendly. Step 2: Code the problem in a programming language. Step

More information

Searching for Solutions

Searching for Solutions CS4700 (Summer 2014!) Foundations of Artificial Intelligence Searching for Solutions Jon Park DEPARTMENT OF COMPUTER SCIENCE CORNELL UNIVERSITY Agenda Review Search Problem Formulation Searching for Solutions

More information

Artificial Intelligence Heuristic Search

Artificial Intelligence Heuristic Search Artificial Intelligence Heuristic Search Andrea Torsello Search in AI Blind search strategies Breadth First Depth First Iterative Deepening Analyzed Completeness Optimality Time Complexity Space Complexity

More information

Module 2. Problem Solving using Search- (Single agent search) Version 2 CSE IIT, Kharagpur

Module 2. Problem Solving using Search- (Single agent search) Version 2 CSE IIT, Kharagpur Module 2 Problem Solving using Search- (Single agent search) 2.1 Instructional Objective The students should understand the state space representation, and gain familiarity with some common problems formulated

More information

Homework #1 (Search Problems) Out: 1/14/03 Due: 1/21/03

Homework #1 (Search Problems) Out: 1/14/03 Due: 1/21/03 CS121 Introduction to Artificial Intelligence Winter 2004 Homework #1 (Search Problems) Out: 1/14/03 Due: 1/21/03 How to complete this HW: First copy this file; then insert your answers in the file immediately

More information

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches - Introduction

Introduction to Artificial Intelligence (G51IAI) Dr Rong Qu. Blind Searches - Introduction Introduction to Artificial Intelligence (G51IAI) Dr Rong u Blind Searches - Introduction Aim of This Section (2 hours) Introduce the blind searches on search tree Specifically, the general search pseudo-code

More information

Artificial Intelligence 2007 Spring Midterm Solution

Artificial Intelligence 2007 Spring Midterm Solution Artificial Intelligence 2007 Spring Midterm Solution May 31, 2007 1. (10 points) Minesweeper is a famous one-player computer game as shown in Figure 1. The player has to find all the mines in a given minefield

More information

Lecture 2. Uninformed search

Lecture 2. Uninformed search Lecture 2 Uninformed search " Reference: Preparing for week 1 Reading: Chapters 1 and 2.1, 2.2, 2.5, 3.1, 3.2, 3.3, 3.4, 3.5 Assignment 1 has now been posted on the course LEARN site Uses MATLAB (a tutorial

More information

Uninformed Search. Chapter 3. Some material adopted from notes and slides by Marie desjardins and Charles R. Dyer

Uninformed Search. Chapter 3. Some material adopted from notes and slides by Marie desjardins and Charles R. Dyer Uninformed Search Chapter 3 Some material adopted from notes and slides by Marie desjardins and Charles R. Dyer Today s class Goal-based agents Representing states and operators Example problems Generic

More information

Intelligent Agents. Search Algorithms. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: June 11, 2014

Intelligent Agents. Search Algorithms. Ute Schmid. Cognitive Systems, Applied Computer Science, Bamberg University. last change: June 11, 2014 Intelligent Agents Search Algorithms Ute Schmid Cognitive Systems, Applied Computer Science, Bamberg University last change: June 11, 2014 U. Schmid (CogSys) Intelligent Agents last change: June 11, 2014

More information

Moving Target Search. 204 Automated Reasoning

Moving Target Search. 204 Automated Reasoning Moving Target Search Toru Ishida NTT Communications and Information Processing Laboratories 1-2356, Take, Yokosuka, 238-03, JAPAN ishida%nttkb.ntt.jp@relay.cs.net Richard E. Korf Computer Science Department

More information

State Spaces Graph Search Searching. Graph Search. CPSC 322 Search 2. Textbook 3.4. Graph Search CPSC 322 Search 2, Slide 1

State Spaces Graph Search Searching. Graph Search. CPSC 322 Search 2. Textbook 3.4. Graph Search CPSC 322 Search 2, Slide 1 Graph Search CPSC 322 Search 2 Textbook 3.4 Graph Search CPSC 322 Search 2, Slide 1 Lecture Overview 1 State Spaces 2 Graph Search 3 Searching Graph Search CPSC 322 Search 2, Slide 2 State Spaces Idea:

More information

Pathfinding in Two-dimensional Worlds

Pathfinding in Two-dimensional Worlds Pathfinding in Two-dimensional Worlds A survey of modern pathfinding algorithms, and a description of a new algorithm for pathfinding in dynamic two-dimensional polygonal worlds. Master s Thesis Authors:

More information

Incremental Routing Algorithms For Dynamic Transportation Networks

Incremental Routing Algorithms For Dynamic Transportation Networks UCGE Reports Number 20238 Department of Geomatics Engineering Incremental Routing Algorithms For Dynamic Transportation Networks (URL: http://www.geomatics.ucalgary.ca/research/publications/gradtheses.html)

More information

Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur

Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Problem Solving by Search Course: CS40002 Instructor: Dr. Pallab Dasgupta Department of Computer Science & Engineering Indian Institute of Technology Kharagpur Search Frameworks State space search Uninformed

More information

Approximation Algorithms

Approximation Algorithms Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

More information

Solutions. 1) Is the following Boolean function linearly separable? Explain.

Solutions. 1) Is the following Boolean function linearly separable? Explain. CS/ES 480, CES 510 Mid-term # 1 Practice Problems Solutions 1) Is the following Boolean function linearly separable? Explain. f ( x, y,z ) ( x y z ) ( x y z ) ( x y z ) Solution: Geometric representation

More information

al Solutions to the Twenty-Four Puzzle

al Solutions to the Twenty-Four Puzzle From: AAAI-96 Proceedings. Copyright 1996, AAAI (www.aaai.org). All rights reserved. Finding 0 al Solutions to the Twenty-Four Puzzle Richard E. Korf and Larry A. Taylor Computer Science Department University

More information

5 Automated problem solving

5 Automated problem solving CMPUT 366 Intelligent Systems: Dale Schuurmans 1 5 Automated problem solving Last time: represented problem as a CSP This time: represent problem as a state space search problem 5.1 State space search

More information

Cpt S 223. School of EECS, WSU

Cpt S 223. School of EECS, WSU The Shortest Path Problem 1 Shortest-Path Algorithms Find the shortest path from point A to point B Shortest in time, distance, cost, Numerous applications Map navigation Flight itineraries Circuit wiring

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Fall 2015 Introduction to rtificial Intelligence Midterm You have approximately 80 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. Mark your

More information

Introduction to Flocking {Stochastic Matrices}

Introduction to Flocking {Stochastic Matrices} Supelec EECI Graduate School in Control Introduction to Flocking {Stochastic Matrices} A. S. Morse Yale University Gif sur - Yvette May 21, 2012 CRAIG REYNOLDS - 1987 BOIDS The Lion King CRAIG REYNOLDS

More information

Graph Theory Problems and Solutions

Graph Theory Problems and Solutions raph Theory Problems and Solutions Tom Davis tomrdavis@earthlink.net http://www.geometer.org/mathcircles November, 005 Problems. Prove that the sum of the degrees of the vertices of any finite graph is

More information

Week 2 Polygon Triangulation

Week 2 Polygon Triangulation Week 2 Polygon Triangulation What is a polygon? Last week A polygonal chain is a connected series of line segments A closed polygonal chain is a polygonal chain, such that there is also a line segment

More information

Homework 15 Solutions

Homework 15 Solutions PROBLEM ONE (Trees) Homework 15 Solutions 1. Recall the definition of a tree: a tree is a connected, undirected graph which has no cycles. Which of the following definitions are equivalent to this definition

More information

PART II Algorithms for Message- Passing Systems. Section 7 Introduction Model Basic Graph Algorithms

PART II Algorithms for Message- Passing Systems. Section 7 Introduction Model Basic Graph Algorithms PART II Algorithms for Message- Passing Systems Section 7 Introduction Model Basic Graph Algorithms 1 Formal Model for Message-Passing Systems There are n processes in the system: p 0,.., p n-1 Each process

More information

Problem Solving Through AI

Problem Solving Through AI 2 Problem Solving Through AI 2.1 INTRODUCTION In the last chapter, we have tried to explain that Artificial Intelligence is the science and technology applied to make machines intelligent. The ultimate

More information

Induction Problems. Tom Davis November 7, 2005

Induction Problems. Tom Davis  November 7, 2005 Induction Problems Tom Davis tomrdavis@earthlin.net http://www.geometer.org/mathcircles November 7, 2005 All of the following problems should be proved by mathematical induction. The problems are not necessarily

More information

Monotone Partitioning. Polygon Partitioning. Monotone polygons. Monotone polygons. Monotone Partitioning. ! Define monotonicity

Monotone Partitioning. Polygon Partitioning. Monotone polygons. Monotone polygons. Monotone Partitioning. ! Define monotonicity Monotone Partitioning! Define monotonicity Polygon Partitioning Monotone Partitioning! Triangulate monotone polygons in linear time! Partition a polygon into monotone pieces Monotone polygons! Definition

More information

Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm

Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm Solving the 8 Puzzle in a Minimum Number of Moves: An Application of the A* Algorithm Daniel R. Kunkle Computer Science Dept. College of Computing and Information Sciences Rochester Institute of Technology

More information

Problem Solving and Search 2. Problem Solving and Search. Let s have Holiday in Romania. What is the Problem? Is there more?

Problem Solving and Search 2. Problem Solving and Search. Let s have Holiday in Romania. What is the Problem? Is there more? Let s have Holiday in Romania On holiday in Romania; currently in Arad. 2 Problem Solving and Search Flight leaves tomorrow from Bucharest at 1:00. Let s configure this to be an AI problem. 1 2 What is

More information

CPS331 Lecture: Search last revised January 29, Objectives:

CPS331 Lecture: Search last revised January 29, Objectives: CPS331 Lecture: Search last revised January 29, 2014 Objectives: 1. To introduce the concept of a state space 2. To discuss uninformed search strategies 3. To introduce the use of heuristics in searches

More information

Social Media Mining. Graph Essentials

Social Media Mining. Graph Essentials Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

More information

MGF 1107 CH 15 LECTURE NOTES Denson. Section 15.1

MGF 1107 CH 15 LECTURE NOTES Denson. Section 15.1 1 Section 15.1 Consider the house plan below. This graph represents the house. Consider the mail route below. This graph represents the mail route. 2 Definitions 1. Graph a structure that describes relationships.

More information

(Refer Slide Time 1.50)

(Refer Slide Time 1.50) Discrete Mathematical Structures Dr. Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology, Madras Module -2 Lecture #11 Induction Today we shall consider proof

More information

Uninformed Search. Chapter 3. (Based on slides by Stuart Russell, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty)

Uninformed Search. Chapter 3. (Based on slides by Stuart Russell, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty) Uninformed Search Chapter 3 (Based on slides by Stuart Russell, Dan Weld, Oren Etzioni, Henry Kautz, and other UW-AI faculty) What is Search? Search is a class of techniques for systematically finding

More information

Basic Notions on Graphs. Planar Graphs and Vertex Colourings. Joe Ryan. Presented by

Basic Notions on Graphs. Planar Graphs and Vertex Colourings. Joe Ryan. Presented by Basic Notions on Graphs Planar Graphs and Vertex Colourings Presented by Joe Ryan School of Electrical Engineering and Computer Science University of Newcastle, Australia Planar graphs Graphs may be drawn

More information

2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines 2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

More information

1 Basic Definitions and Concepts in Graph Theory

1 Basic Definitions and Concepts in Graph Theory CME 305: Discrete Mathematics and Algorithms 1 Basic Definitions and Concepts in Graph Theory A graph G(V, E) is a set V of vertices and a set E of edges. In an undirected graph, an edge is an unordered

More information

SAMPLES OF HIGHER RATED WRITING: LAB 5

SAMPLES OF HIGHER RATED WRITING: LAB 5 SAMPLES OF HIGHER RATED WRITING: LAB 5 1. Task Description Lab report 5. (April 14) Graph Coloring. Following the guidelines, and keeping in mind the assessment criteria, using where appropriate experimental

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm. Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

More information

State space representation Basic search techniques on state spaces Informed search using heuristic strategies. Unit 3: Search

State space representation Basic search techniques on state spaces Informed search using heuristic strategies. Unit 3: Search Unit 3: Search José Luis Ruiz Reina José Antonio Alonso Franciso J. Martín Mateos Agustín Riscos Núñez Departamento de Ciencias de la Computación e Inteligencia Artificial Universidad de Sevilla Inteligencia

More information

COT5405 Analysis of Algorithms Homework 3 Solutions

COT5405 Analysis of Algorithms Homework 3 Solutions COT0 Analysis of Algorithms Homework 3 Solutions. Prove or give a counter example: (a) In the textbook, we have two routines for graph traversal - DFS(G) and BFS(G,s) - where G is a graph and s is any

More information

Graph Algorithms using Map-Reduce

Graph Algorithms using Map-Reduce Graph Algorithms using Map-Reduce Graphs are ubiquitous in modern society. Some examples: The hyperlink structure of the web 1/7 Graph Algorithms using Map-Reduce Graphs are ubiquitous in modern society.

More information

4. Why is it that the best first search is more effective than hill climbing?

4. Why is it that the best first search is more effective than hill climbing? Abstract: The following questions and exercises are from chapter 3, Informed Search. This chapter covers the use of heuristics in search and how to evaluate the effectiveness of heuristics and search algorithms.

More information

Existence of Simple Tours of Imprecise Points

Existence of Simple Tours of Imprecise Points Existence of Simple Tours of Imprecise Points Maarten Löffler Department of Information and Computing Sciences, Utrecht University Technical Report UU-CS-007-00 www.cs.uu.nl ISSN: 09-7 Existence of Simple

More information

CS 151: Intelligent Agents, Problem Formulation and Search

CS 151: Intelligent Agents, Problem Formulation and Search CS 151: Intelligent Agents, Problem Formulation and Search How do we make a vacuum "smart?" Vacuum, clean the house! Um OK?? This one's got no chance How do we represent this task? Hmmm where to begin?

More information

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling

Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling Approximation Algorithms Chapter Approximation Algorithms Q. Suppose I need to solve an NP-hard problem. What should I do? A. Theory says you're unlikely to find a poly-time algorithm. Must sacrifice one

More information

Uninformed Search. Romania Map. Example: Map Problem. State Space Representation. Water Jugs Problem. Water Jugs Problem. CIS*3700 (Winter 2007)

Uninformed Search. Romania Map. Example: Map Problem. State Space Representation. Water Jugs Problem. Water Jugs Problem. CIS*3700 (Winter 2007) Romania Map Uninformed Search CIS*3700 (Winter 2007) Example: Map Problem Problem: drive from Arad to Bucharest Formulate a oal: be in Bucharest Current in Arad Formulate the problem: States: various cities

More information

TOURING PROBLEMS A MATHEMATICAL APPROACH

TOURING PROBLEMS A MATHEMATICAL APPROACH TOURING PROBLEMS A MATHEMATICAL APPROACH VIPUL NAIK Abstract. The article surveys touring, a problem of fun math, and employs serious techniques to attack it. The text is suitable for high school students

More information

6.099, Spring Semester, 2006 Assignment for Week 13 1

6.099, Spring Semester, 2006 Assignment for Week 13 1 6.099, Spring Semester, 2006 Assignment for Week 13 1 MASSACHVSETTS INSTITVTE OF TECHNOLOGY Department of Electrical Engineering and Computer Science 6.099 Introduction to EECS I Spring Semester, 2006

More information

Romania Slide 1/18. Romania. Fall Semester. Artificial Intelligence

Romania Slide 1/18. Romania. Fall Semester. Artificial Intelligence Romania Slide 1/18 Romania Fall Semester Romania Slide 2/18 Topic Outline Road Map of Romania Statement of the Problem Examples Optimal path Breadth-first Depth-first alphabetical Uniform Cost Search Compare

More information

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina stefano.martina@stud.unifi.it

Seminar. Path planning using Voronoi diagrams and B-Splines. Stefano Martina stefano.martina@stud.unifi.it Seminar Path planning using Voronoi diagrams and B-Splines Stefano Martina stefano.martina@stud.unifi.it 23 may 2016 This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International

More information

CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

More information

Markov chains and Markov Random Fields (MRFs)

Markov chains and Markov Random Fields (MRFs) Markov chains and Markov Random Fields (MRFs) 1 Why Markov Models We discuss Markov models now. This is the simplest statistical model in which we don t assume that all variables are independent; we assume

More information

Solutions to Exercises 8

Solutions to Exercises 8 Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

More information

Diameter and Treewidth in Minor-Closed Graph Families, Revisited

Diameter and Treewidth in Minor-Closed Graph Families, Revisited Algorithmica manuscript No. (will be inserted by the editor) Diameter and Treewidth in Minor-Closed Graph Families, Revisited Erik D. Demaine, MohammadTaghi Hajiaghayi MIT Computer Science and Artificial

More information

CMPT 301 Artificial Intelligence Fall 2014 Homework #4

CMPT 301 Artificial Intelligence Fall 2014 Homework #4 CMPT 301 Artificial Intelligence Fall 2014 Homework #4 75 Total Points Due Date: No Later than 5:30 PM on Monday, October 6, 2014. You may either hand-in this homework written or submit it to the drop

More information

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm. Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

More information

Principles of Artificial Intelligence Fall 2005 Handout #2 Goal-Based Agents

Principles of Artificial Intelligence Fall 2005 Handout #2 Goal-Based Agents Principles of Artificial Intelligence Fall 2005 Handout #2 Goal-Based Agents Vasant Honavar Artificial Intelligence Research Laboratory Department of Computer Science 226 Atanasoff Hall Iowa State University

More information

COLORED GRAPHS AND THEIR PROPERTIES

COLORED GRAPHS AND THEIR PROPERTIES COLORED GRAPHS AND THEIR PROPERTIES BEN STEVENS 1. Introduction This paper is concerned with the upper bound on the chromatic number for graphs of maximum vertex degree under three different sets of coloring

More information

Problems, Problem Spaces and Search

Problems, Problem Spaces and Search Problems, Problem Spaces and Search Contents Defining the problem as a State Space Search Production Systems Control Strategies Breadth First Search Depth First Search Heuristic Search Problem Characteristics

More information

Mathematical induction & Recursion

Mathematical induction & Recursion CS 441 Discrete Mathematics for CS Lecture 15 Mathematical induction & Recursion Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Proofs Basic proof methods: Direct, Indirect, Contradiction, By Cases,

More information

Search. Announcements. Clarifications from Last Time. Recap of Last Time. Goal-Based Agents. Goal-Based Agents

Search. Announcements. Clarifications from Last Time. Recap of Last Time. Goal-Based Agents. Goal-Based Agents Burr H. Settles CS-540, UW-adison www.cs.wisc.edu/~cs540-1 Summer 23 Announcements Homework #1 is out today (6/18) and will be due next Friday (6/27) Please hand in Homework #0 (the info card/sheet about

More information

Smart Graphics: Methoden 3 Suche, Constraints

Smart Graphics: Methoden 3 Suche, Constraints Smart Graphics: Methoden 3 Suche, Constraints Vorlesung Smart Graphics LMU München Medieninformatik Butz/Boring Smart Graphics SS2007 Methoden: Suche 2 Folie 1 Themen heute Suchverfahren Hillclimbing Simulated

More information

Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

More information

CS91.543 MidTerm Exam 4/1/2004 Name: KEY. Page Max Score 1 18 2 11 3 30 4 15 5 45 6 20 Total 139

CS91.543 MidTerm Exam 4/1/2004 Name: KEY. Page Max Score 1 18 2 11 3 30 4 15 5 45 6 20 Total 139 CS91.543 MidTerm Exam 4/1/2004 Name: KEY Page Max Score 1 18 2 11 3 30 4 15 5 45 6 20 Total 139 % INTRODUCTION, AI HISTORY AND AGENTS 1. [4 pts. ea.] Briefly describe the following important AI programs.

More information

(Refer Slide Time: 01:04)

(Refer Slide Time: 01:04) Artificial Intelligence Prof. Sudeshna Sarkar Department of Computer Science and Engineering Indian Institute of Technology, Kharagpur Lecture - 3 State Space Search Today we will start the third lecture

More information

Principle of (Weak) Mathematical Induction. P(1) ( n 1)(P(n) P(n + 1)) ( n 1)(P(n))

Principle of (Weak) Mathematical Induction. P(1) ( n 1)(P(n) P(n + 1)) ( n 1)(P(n)) Outline We will cover (over the next few weeks) Mathematical Induction (or Weak Induction) Strong (Mathematical) Induction Constructive Induction Structural Induction Principle of (Weak) Mathematical Induction

More information

Introduction to Voronoi Diagrams

Introduction to Voronoi Diagrams C.S. 252 Prof. Roberto Tamassia Computational Geometry Sem. II, 1992 1993 Lecture 13 Date: March 22, 1993 Scribe: Scott S. Snibbe 1 Introduction Introduction to Voronoi Diagrams This lecture introduces

More information

Arrangements And Duality

Arrangements And Duality Arrangements And Duality 3.1 Introduction 3 Point configurations are tbe most basic structure we study in computational geometry. But what about configurations of more complicated shapes? For example,

More information

GRAPH THEORY and APPLICATIONS. Trees

GRAPH THEORY and APPLICATIONS. Trees GRAPH THEORY and APPLICATIONS Trees Properties Tree: a connected graph with no cycle (acyclic) Forest: a graph with no cycle Paths are trees. Star: A tree consisting of one vertex adjacent to all the others.

More information