Principles of Computing – UFCFA3-30-1

Slides:



Advertisements
Similar presentations
Artificial Intelligent
Advertisements

Solving problems by searching Chapter 3. Outline Problem-solving agents Problem types Problem formulation Example problems Basic search algorithms.
Additional Topics ARTIFICIAL INTELLIGENCE
Review: Search problem formulation
Announcements Course TA: Danny Kumar
Uninformed search strategies
Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Artificial Intelligence Solving problems by searching
January 26, 2003AI: Chapter 3: Solving Problems by Searching 1 Artificial Intelligence Chapter 3: Solving Problems by Searching Michael Scherger Department.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
CS 480 Lec 3 Sept 11, 09 Goals: Chapter 3 (uninformed search) project # 1 and # 2 Chapter 4 (heuristic search)
Blind Search1 Solving problems by searching Chapter 3.
Search Strategies Reading: Russell’s Chapter 3 1.
May 12, 2013Problem Solving - Search Symbolic AI: Problem Solving E. Trentin, DIISM.
1 Chapter 3 Solving Problems by Searching. 2 Outline Problem-solving agentsProblem-solving agents Problem typesProblem types Problem formulationProblem.
Solving Problem by Searching Chapter 3. Outline Problem-solving agents Problem formulation Example problems Basic search algorithms – blind search Heuristic.
1 Lecture 3 Uninformed Search. 2 Uninformed search strategies Uninformed: While searching you have no clue whether one non-goal state is better than any.
Touring problems Start from Arad, visit each city at least once. What is the state-space formulation? Start from Arad, visit each city exactly once. What.
Artificial Intelligence for Games Uninformed search Patrick Olivier
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
Search Strategies CPS4801. Uninformed Search Strategies Uninformed search strategies use only the information available in the problem definition Breadth-first.
UNINFORMED SEARCH Problem - solving agents Example : Romania  On holiday in Romania ; currently in Arad.  Flight leaves tomorrow from Bucharest.
Artificial Intelligence Lecture No. 7 Dr. Asad Safi ​ Assistant Professor, Department of Computer Science, COMSATS Institute of Information Technology.
14 Jan 2004CS Blind Search1 Solving problems by searching Chapter 3.
CHAPTER 3 CMPT Blind Search 1 Search and Sequential Action.
CS 380: Artificial Intelligence Lecture #3 William Regli.
1 Lecture 3 Uninformed Search. 2 Complexity Recap (app.A) We often want to characterize algorithms independent of their implementation. “This algorithm.
Solving problems by searching
1 Lecture 3 Uninformed Search
Artificial Intelligence Course outline Introduction Problem solving Generic algorithms Knowledge Representation and Reasoning Expert Systems Uncertainty.
Review: Search problem formulation Initial state Actions Transition model Goal state (or goal test) Path cost What is the optimal solution? What is the.
Artificial Intelligence
AI in game (II) 권태경 Fall, outline Problem-solving agent Search.
An Introduction to Artificial Intelligence Lecture 3: Solving Problems by Sorting Ramin Halavati In which we look at how an agent.
SOLVING PROBLEMS BY SEARCHING Chapter 3 August 2008 Blind Search 1.
A General Introduction to Artificial Intelligence.
1 Solving problems by searching Chapter 3. Depth First Search Expand deepest unexpanded node The root is examined first; then the left child of the root;
Uninformed search strategies A search strategy is defined by picking the order of node expansion Uninformed search strategies use only the information.
Problem Solving as Search. Problem Types Deterministic, fully observable  single-state problem Non-observable  conformant problem Nondeterministic and/or.
Problem Solving by Searching
Implementation: General Tree Search
Solving problems by searching A I C h a p t e r 3.
WEEK 5 LECTURE -A- 23/02/2012 lec 5a CSC 102 by Asma Tabouk Introduction 1 CSC AI Basic Search Strategies.
Chapter 3 Solving problems by searching. Search We will consider the problem of designing goal-based agents in observable, deterministic, discrete, known.
Artificial Intelligence Solving problems by searching.
Lecture 3 Problem Solving through search Uninformed Search
Lecture 3: Uninformed Search
Problem Solving Agents
Announcements Homework 1 will be posted this afternoon. After today, you should be able to do Questions 1-3. Python 2.7 only for the homework; turns.
EE562 ARTIFICIAL INTELLIGENCE FOR ENGINEERS
Uninformed Search Chapter 3.4.
Uninformed Search Strategies
Problem solving and search
Artificial Intelligence (CS 370D)
Russell and Norvig: Chapter 3, Sections 3.4 – 3.6
Solving problems by searching
CS 188: Artificial Intelligence Spring 2007
Lecture 1B: Search.
Problem Solving and Searching
What to do when you don’t know anything know nothing
Artificial Intelligence
Searching for Solutions
Problem Solving and Searching
Problem Spaces & Search
ECE457 Applied Artificial Intelligence Fall 2007 Lecture #2
Solving Problems by Searching
Search Strategies CMPT 420 / CMPG 720.
CS440/ECE 448 Lecture 4: Search Intro
Presentation transcript:

Principles of Computing – UFCFA3-30-1 Week-14 Instructor : Mazhar H Malik Email : mazhar@gcet.edu.om Global College of Engineering and Technology

Time and Space Complexity AND Shortest Path Finding Algorithms

Classes of Algorithms Simple recursive algorithms. Backtracking algorithms. Divide and conquer algorithms. Dynamic programming algorithms. Greedy algorithms. Evolutionary algorithms. Randomized algorithms.

Problem Formulation - Romania Start Finish

Problem Formulation - Romania Initial State  Arad Goal State  Bucharest Operator o driving between cities o state space consists of all 20 cities in the graph Goal Test o is the current state Bucharest? o a solution is a path from the initial to the goal state Path cost is a function of time/distance/risk/petrol/…

Uninformed Search Strategies Uninformed strategies use only the information available in the problem definition, Also known as blind searching Breadth-first search Uniform-cost search Depth-first search Depth-limited search Iterative deepening search

Comparing Uninformed Search Strategies Completeness Will a solution always be found if one exists? Time How long does it take to find the solution? Often represented as the number of nodes searched Space How much memory is needed to perform the search? Often represented as the maximum number of nodes stored at once Optimal Will the optimal (least cost) solution be found?

Comparing Uninformed Search Strategies Time and space complexity are measured in b – maximum branching factor of the search tree m – maximum depth of the state space d – depth of the least cost solution AI: Chapter 3: Solving Problems by Searching 7

Breadth-First Search Recall from Data Structures the basic algorithm for a breadth-first search on a graph or tree Expand the shallowest unexpanded node Place all new successors at the end of a FIFO queue

Breadth-First Search

Breadth-First Search

Breadth-First Search

Breadth-First Search

Properties of Breadth-First Search Complete Yes if b (max branching factor) is finite Time – 1 + b + b2 + … + bd = O(bd) exponential in d Space O(bd) Keeps every node in memory This is the big problem; an agent that generates nodes at 10 MB/sec will produce 860 MB in 24 hours Optimal Yes (if cost is 1 per step); not optimal in general

Properties of Breadth-First Search

Breadth First Search outcome The memory requirements are a breadth-first search bigger than is problem for execution time Exponential-complexity search problems cannot be solved by uniformed methods for any but the smallest instances

Depth-First Search Recall from Data Structures the basic algorithm for a depth-first search on a graph or tree Expand the deepest unexpanded node Unexplored successors are placed on a stack until fully explored

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search

Depth-First Search Complete Time Space Optimal No: fails in infinite-depth spaces, spaces with loops Modify to avoid repeated spaces along path Yes: in finite spaces Time O(bm) Not great if m is much larger than d But if the solutions are dense, this may be faster than breadth-first search Space O(bm)…linear space Optimal No

Depth-Limited Search A variation of depth-first search that uses a depth limit Alleviates the problem of unbounded trees Search to a predetermined depth l (“ell”) Nodes at depth l have no successors Same as depth-first search if l = ∞ Can terminate for failure and cutoff

Depth-Limited Search

Depth-Limited Search Complete Time Space Optimal Yes if l = d O(bl) No if l = d

Summery

NP Complete Problem The list below contains some well-known problems that are NP-complete when expressed as decision problems. Boolean satisfiability problem (SAT) Knapsack problem. Hamiltonian path problem. Travelling salesman problem (decision version) Subgraph isomorphism problem. Subset sum problem. Clique problem. Vertex cover problem.