Chapter 10: Algorithm Design Techniques

Slides:



Advertisements
Similar presentations
Heuristic Search techniques
Advertisements

Artificial Intelligence By Mr. Ejaz CIIT Sahiwal.
Chapter 9: Graphs Topological Sort
Chapter 9: Graphs Shortest Paths
Ch 4. Heuristic Search 4.0 Introduction(Heuristic)
CSC411Artificial Intelligence 1 Chapter 3 Structures and Strategies For Space State Search Contents Graph Theory Strategies for Space State Search Using.
Solving IPs – Cutting Plane Algorithm General Idea: Begin by solving the LP relaxation of the IP problem. If the LP relaxation results in an integer solution,
State Space 3 Chapter 4 Heuristic Search. Three Algorithms Backtrack Depth First Breadth First All work if we have well-defined: Goal state Start state.
Search Techniques MSc AI module. Search In order to build a system to solve a problem we need to: Define and analyse the problem Acquire the knowledge.
Breadth-First and Depth-First Search
Searching Algorithms Finding what you are looking for.
1 Using Search in Problem Solving Part II. 2 Basic Concepts Basic concepts: Initial state Goal/Target state Intermediate states Path from the initial.
Using Search in Problem Solving
Chapter 7: Sorting Algorithms
Chapter 4: Trees General Tree Concepts Binary Trees Lydia Sinapova, Simpson College Mark Allen Weiss: Data Structures and Algorithm Analysis in Java.
Chapter 7: Sorting Algorithms
Chapter 3: Abstract Data Types Queues Lydia Sinapova, Simpson College Mark Allen Weiss: Data Structures and Algorithm Analysis in Java.
Chapter 4: Trees Radix Search Trees Lydia Sinapova, Simpson College Mark Allen Weiss: Data Structures and Algorithm Analysis in Java.
Using Search in Problem Solving
Chapter 5: Hashing Hash Tables
Chapter 7: Sorting Algorithms Heap Sort Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Chapter 10: Algorithm Design Techniques
Chapter 2: Algorithm Analysis Application of Big-Oh to program analysis Running Time Calculations Lydia Sinapova, Simpson College Mark Allen Weiss: Data.
Blind Search-Part 2 Ref: Chapter 2. Search Trees The search for a solution can be described by a tree - each node represents one state. The path from.
Applications of Depth-First Search
Chapter 4: Trees AVL Trees Lydia Sinapova, Simpson College Mark Allen Weiss: Data Structures and Algorithm Analysis in Java.
Using Search in Problem Solving
Chapter 4: Trees Binary Search Trees
Chapter 6: Priority Queues
The Design and Analysis of Algorithms
Chapter 9: Graphs Basic Concepts
Brute Force Search Depth-first or Breadth-first search
WAES 3308 Numerical Methods for AI
Chapter 5: Hashing Collision Resolution: Separate Chaining Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Control Algorithms 1 Chapter 6 Control Algorithms 1 Chapter 6 Pattern Search.
Problem Reduction So far we have considered search strategies for OR graph. In OR graph, several arcs indicate a variety of ways in which the original.
A* Path Finding Ref: A-star tutorial.
Chapter 2: Algorithm Analysis Application of Big-Oh to program analysis Logarithms in Running Time Lydia Sinapova, Simpson College Mark Allen Weiss: Data.
Search in State Spaces Problem solving as search Search consists of –state space –operators –start state –goal states A Search Tree is an efficient way.
Kruse/Ryba ch051 Object Oriented Data Structures Recursion Introduction to Recursion Principles of Recursion Backtracking: Postponing the Work Tree-Structured.
February 11, 2016Introduction to Artificial Intelligence Lecture 6: Search in State Spaces II 1 State-Space Graphs There are various methods for searching.
Chapter 7: Sorting Algorithms Insertion Sort Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Lydia Sinapova, Simpson College.
Review: Tree search Initialize the frontier using the starting state
Breadth First and Depth First
The Design and Analysis of Algorithms
Artificial Intelligence (CS 370D)
Using a Stack Chapter 6 introduces the stack data type.
Artificial Intelligence Problem solving by searching CSC 361
Problem Solving: Brute Force Approaches
Heuristic search INT 404.
Using a Stack Chapter 6 introduces the stack data type.
Chapter 9: Graphs Basic Concepts
Graphs Part 2 Adjacency Matrix
BEST FIRST SEARCH -OR Graph -A* Search -Agenda Search CSE 402
Maze Design Presentation Questions
Using a Stack Chapter 6 introduces the stack data type.
Blay Whitby 2003 Search Blay Whitby 2003
Haskell Tips You can turn any function that takes two inputs into an infix operator: mod 7 3 is the same as 7 `mod` 3 takeWhile returns all initial.
Using a Stack Chapter 6 introduces the stack data type.
Artificial Intelligence Chapter 8 Uninformed Search
A General Backtracking Algorithm
Algorithms Lecture # 29 Dr. Sohail Aslam.
Backtracking and Branch-and-Bound
Exercise: Dice rolls Write a method diceRoll that accepts an integer parameter representing a number of 6-sided dice to roll, and output all possible arrangements.
General Tree Concepts Binary Trees
Chapter 9: Graphs Basic Concepts
Chapter 9: Graphs Shortest Paths
Announcements Assignment #4 is due tonight. Last lab program is going to be assigned this Wednesday. ◦ A backtracking problem.
Chapter 5: Hashing Hash Tables
Supplemental slides for CSE 327 Prof. Jeff Heflin
Presentation transcript:

Chapter 10: Algorithm Design Techniques Mark Allen Weiss: Data Structures and Algorithm Analysis in Java Chapter 10: Algorithm Design Techniques Backtracking Lydia Sinapova, Simpson College

Backtracking How to solve a problem by search Generate and Test What is Backtracking Example

The Idea Problem solving: search in a space of possible states. Initial state Target state2 Target state1

Generate and Test Method Take a state Generate next states by applying relevant rules (not all rules are applicable for a given state!) Test to see if the goal state is reached. If yes - stop   If no - add the generated states into a stack/queue (do not add if the state has already been generated) and repeat the procedure. To get the solution: Record the paths

Search Methods Breadth-first vs depth-first search Exhaustive search (brute force) vs informative (constraint-based, heuristic) search Backtracking

Backtracking rejecting the currently reached state as a dead-end state, going back to some previous level in the state-space tree/graph proceeding with the exploration of other paths toward the target state Backtracking occurs in depth-first search

Example Replace the letters with distinct digits such that the addition is correct Decide on: State representation Operators Constraints Initial state Target state   LOAN + LOAN LOAN ------- DEBT