PPT-Recursive Backtracking
Author : marina-yarberry | Published Date : 2015-10-31
Eric Roberts CS 106B January 25 2013 Solving a Maze A journey of a thousand miles begins with a single step Lao Tzu 6 th century BCE The example most often used
Presentation Embed Code
Download Presentation
Download Presentation The PPT/PDF document "Recursive Backtracking" is the property of its rightful owner. Permission is granted to download and print the materials on this website for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.
Recursive Backtracking: Transcript
Eric Roberts CS 106B January 25 2013 Solving a Maze A journey of a thousand miles begins with a single step Lao Tzu 6 th century BCE The example most often used to illustrate recursive backtracking is the problem of solving a maze which has a long history in its own right. You probably solved it immediately but can you describe the algorithm you use to solve it On a larger maze the actual algorithm you use would be cleare and is called backtracking This is where you try a path until you get stuck then retrace your ste Sullivan PhD Iteration When we encounter a problem that requires repetition we often use iteration ie some type of loop Sample problem printing the series of integers from n1 to n2 where n1 n2 example printSeries5 10 should print the following 5 6 snarf. the code for today’s class. . Then think about the famous 8-Queen’s Puzzle. The question is: is there a way to arrange 8 queens on a (8x8) chessboard so that no 2 queens can attack each other (queens can attack horizontally, vertically, and diagonally). Regular Expressions . and . Pattern . Matching. Overview. The Perl Approach (recursive backtracking) VS The . egrep. Approach (Thompson Multi-State NFA). Matching. :. 29 Character String, Perl: >60 seconds, Thompson NFA: 20 microseconds. D. Nehab. 1. A. Maximo. 1. R. S. Lima. 2. H. Hoppe. 3. 1. IMPA . 2. Digitok. . . 3. Microsoft Research. Linear, shift-invariant filters. But use feedback from earlier outputs. D. Nehab. 1. A. Maximo. 1. R. S. Lima. 2. H. Hoppe. 3. 1. IMPA . 2. Digitok. . . 3. Microsoft Research. Linear, shift-invariant filters. But use feedback from earlier outputs. N-Queens. The object is to place queens on a chess board in such a way as no queen can capture another one in a single move. Recall that a queen can move horizontally, vertically, or diagonally an infinite distance. D. Nehab. 1. A. Maximo. 1. R. S. Lima. 2. H. Hoppe. 3. 1. IMPA . 2. Digitok. . . 3. Microsoft Research. Linear, shift-invariant filters. But use feedback from earlier outputs. and . Structural Induction. ICS 6D. Sandy . Irani. Recursive Definitions. A recursive definition defines a sequence or set in terms of smaller instances.. A . recursively defined sequence . (. recurrence relations. Instructor: Kris Hauser. http://cs.indiana.edu/~hauserk. 1. Constraint Propagation. Place a queen in a square. Remove the attacked squares from future consideration. 2. Constraint Propagation. Count the number of non-attacked squares in every row and column . Self-reflection is the school of wisdom. Baltastar Gracián. 2. An organization chart. Every . structure for presenting data has an underlying data model. 3. Modeling a 1:1 relationship. 1:1 relationship is labeled. “Patterns are everywhere you look”. Learning Target. By the end of section 3.1, I will be able to recognize a recursive pattern and find out the pattern, either increasing or decreasing.. Vocabulary. In this topic, we will cover:. Traversals of trees and graphs. Backtracking . Backtracking. Suppose a solution can be made as a result of a series of choices. Each choice forms a partial solution. These choices may form either a tree or DAG. Programming Abstractions Cynthia Lee CS106X Today’s topics: Previous lectures: Introduction to recursion with Factorial Mechanics of recursion: looking at the stack frames Classic, widely-used CS algorithm example: Binary Search
Download Document
Here is the link to download the presentation.
"Recursive Backtracking"The content belongs to its owner. You may download and print it for personal use, without modification, and keep all copyright notices. By downloading, you agree to these terms.
Related Documents