External A* Stefan Edelkamp, Shahid Jabbar (ich) University of Dortmund, Germany and Stefan Schrödl (DaimlerChrysler, CA)

Slides:



Advertisements
Similar presentations
Algorithm Engineering Parallele Suche Stefan Edelkamp.
Advertisements

A* Search. 2 Tree search algorithms Basic idea: Exploration of state space by generating successors of already-explored states (a.k.a.~expanding states).
CS 245Notes 71 CS 245: Database System Principles Notes 7: Query Optimization Hector Garcia-Molina.
Solving Problem by Searching
Accelerating External Search with Bitstate Hashing Stefan Edelkamp Shahid Jabbar Computer Science Department University of Dortmund, Dortmund, Germany.
CS CS4432: Database Systems II Operator Algorithms Chapter 15.
ICS-171:Notes 4: 1 Notes 4: Optimal Search ICS 171 Summer 1999.
Graph Traversals Visit vertices of a graph G to determine some property: Is G connected? Is there a path from vertex a to vertex b? Does G have a cycle?
Dynamic State-Space Partitioning in External-Memory Graph Search Rong Zhou † and Eric A. Hansen ‡ † Palo Alto Research Center ‡ Mississippi State University.
CSCI 3160 Design and Analysis of Algorithms Tutorial 2 Chengyu Lin.
1 External Sorting Chapter Why Sort?  A classic problem in computer science!  Data requested in sorted order  e.g., find students in increasing.
Query Evaluation. An SQL query and its RA equiv. Employees (sin INT, ename VARCHAR(20), rating INT, age REAL) Maintenances (sin INT, planeId INT, day.
Chapter 11: File System Implementation
UNIVERSITY OF SOUTH CAROLINA Department of Computer Science and Engineering Blind State-Space Search Notes for Ch.11 of Bratko For CSCE 580 Sp03 Marco.
CS 245Notes 71 CS 245: Database System Principles Notes 7: Query Optimization Hector Garcia-Molina.
1 Overview of Storage and Indexing Chapter 8 (part 1)
CS 104 Introduction to Computer Science and Graphics Problems
FALL 2006CENG 351 Data Management and File Structures1 External Sorting.
1 External Sorting Chapter Why Sort?  A classic problem in computer science!  Data requested in sorted order  e.g., find students in increasing.
Computer Organization and Architecture
External Memory Algorithms Kamesh Munagala. External Memory Model Aggrawal and Vitter, 1988.
1 7/2/2015 ITCS 6114 Graph Algorithms. 2 7/2/2015 Graphs ● A graph G = (V, E) ■ V = set of vertices ■ E = set of edges = subset of V  V ■ Thus |E| =
External-Memory MST (Arge, Brodal, Toma). Minimum-Spanning Tree Given a weighted, undirected graph G=(V,E), the minimum-spanning tree (MST) problem is.
Memory Management Last Update: July 31, 2014 Memory Management1.
Graphs and Sets Dr. Andrew Wallace PhD BEng(hons) EurIng
Using Abstraction to Speed Up Search Robert Holte University of Ottawa.
Keyword Search on External Memory Data Graphs Bhavana Bharat Dalvi, Meghana Kshirsagar, S. Sudarshan PVLDB 2008 Reported by: Yiqi Lu.
Distributed Verification of Multi-threaded C++ Programs Stefan Edelkamp joint work with Damian Sulewski and Shahid Jabbar.
The X-Tree An Index Structure for High Dimensional Data Stefan Berchtold, Daniel A Keim, Hans Peter Kriegel Institute of Computer Science Munich, Germany.
File System Implementation Chapter 12. File system Organization Application programs Application programs Logical file system Logical file system manages.
Cost-Optimal Symbolic Pattern Database Planning with State Trajectory and Preference Constraints Stefan Edelkamp University of Dortmund.
VIRTUAL MEMORY By Thi Nguyen. Motivation  In early time, the main memory was not large enough to store and execute complex program as higher level languages.
CS 149: Operating Systems March 3 Class Meeting Department of Computer Science San Jose State University Spring 2015 Instructor: Ron Mak
Memory Management during Run Generation in External Sorting – Larson & Graefe.
Real-Time Model Checking on Secondary Storage Stefan Edelkamp and Shahid Jabbar Chair for Programming Systems and Compiler Construction Computer Science.
An Efficient Linear Time Triple Patterning Solver Haitong Tian Hongbo Zhang Zigang Xiao Martin D.F. Wong ASP-DAC’15.
CS 241 Section Week #9 (11/05/09). Topics MP6 Overview Memory Management Virtual Memory Page Tables.
Parallel External Directed Model Checking with Linear I/O Shahid Jabbar Stefan Edelkamp Computer Science Department University of Dortmund, Dortmund, Germany.
External Memory Value Iteration Stefan Edelkamp, Shahid Jabbar Chair for Programming Systems, University of Dortmund, Germany Blai Bonet Departamento de.
I/O Efficient Directed Model Checking Shahid Jabbar and Stefan Edelkamp, Computer Science Department University of Dortmund, Germany.
1 Data Structures CSCI 132, Spring 2014 Lecture 1 Big Ideas in Data Structures Course website:
FALL 2005CENG 351 Data Management and File Structures1 External Sorting Reference: Chapter 8.
CS 440 Database Management Systems Lecture 5: Query Processing 1.
CS 540 Database Management Systems
DMBS Internals I February 24 th, What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the.
DMBS Internals I. What Should a DBMS Do? Store large amounts of data Process queries efficiently Allow multiple users to access the database concurrently.
Large Scale External Directed Liveness Checking Stefan Edelkamp Shahid Jabbar Computer Science Department University of Dortmund, Dortmund, Germany.
1 Contents Memory types & memory hierarchy Virtual memory (VM) Page replacement algorithms in case of VM.
Biointelligence Lab School of Computer Sci. & Eng. Seoul National University Artificial Intelligence Chapter 8 Uninformed Search.
Memory management The main purpose of a computer system is to execute programs. These programs, together with the data they access, must be in main memory.
Memory Hierarchy Ideal memory is fast, large, and inexpensive
Memory Management 5/11/2018 9:49 PM
Chapter 2 Memory and process management
CS 540 Database Management Systems
CS 440 Database Management Systems
Data Structure Interview Question and Answers
Lecture 16: Data Storage Wednesday, November 6, 2006.
Memory Management 6/20/ :27 PM
Abstraction Transformation & Heuristics
Finding Heuristics Using Abstraction
COT 4600 Operating Systems Spring 2011
Elementary Graph Algorithms
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 8 11/24/2018.
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 12/1/2018.
Introduction to Data Structures
Contents Memory types & memory hierarchy Virtual memory (VM)
Memory Management Lectures notes from the text supplement by Siberschatz and Galvin Modified by B.Ramamurthy Chapter 9 4/5/2019.
General External Merge Sort
CENG 351 Data Management and File Structures
CSE 542: Operating Systems
Presentation transcript:

External A* Stefan Edelkamp, Shahid Jabbar (ich) University of Dortmund, Germany and Stefan Schrödl (DaimlerChrysler, CA)

Shahid Jabbar (Dortmund)External A*2 A* Algorithm  A.k.a Goal-directed dijkstra  A heuristic estimate is used to guide the search. E.g. Straight line distance from the current node to the goal in case of a graph with a geometric layout.  Reweighting: w’(u,v) = w(u,v) – h(u) + h(v)

Shahid Jabbar (Dortmund)External A*3 Problems ( It’s a big big world for a small small memory )  A* needs to store all the states during exploration.  A* generates large amount of duplicates that can be removed using an internal hash table – only if it can fit in the main memory.  A* do not exhibit any locality of expansion. For large state spaces, standard virtual memory management can result in excessive page faults.

Shahid Jabbar (Dortmund)External A*4 A bit of History  Munagala and Ranade: Generated states flushed to the disk for every BFS level. No hash table. Duplicates are removed by sorting the nodes according to the indices and doing an scan and compaction phase. Before expanding a layer t, the nodes in the layer t-1 and t-2 are subtracted from t. O(|V| + sort(|V| + |E|)) I/Os.

Shahid Jabbar (Dortmund)External A*5 A bit of History (contd…)  Further improved by Mehlhorn & Meyer to O(√(|V| ∙ scan(|V| + |E|)) + sort(|V| + |E|)) I/Os.  Korf presented External BFS for implicit graphs with the name Delayed duplicate detection for frontier search. Keep a level in the main memory until it exceeds a certain bound. If it does, sort it and flush to the disk. When a level is finished, merge the presorted buffers to get a sorted file and remove the duplicates

Shahid Jabbar (Dortmund)External A*6 Restriction on the domain  Implicit state space – generated on the fly –> no adjacency list  Unweighted  Undirected  Consistent Heuristic

Shahid Jabbar (Dortmund)External A*7 Take a closer look  Implicit, unweighted, undirected graphs  Consistent heurisitc estimates. => ∆h ={-1,0,1} g h Ah ha! It’s a Bucket of states

Shahid Jabbar (Dortmund)External A*8 Bucket  A Bucket is a set of states, residing on the disk, having the same (g, h) value, Where, g = number of transitions needed to transform the initial state to the states of the bucket, and h = Estimated distance of the bucket’s state to the goal  No state is inserted again in a bucket that is expanded  If Active (being read or written), represented internally by a small buffer. File on disk Buffer in internal memory Insert stateFlush when full

Shahid Jabbar (Dortmund)External A*9  Buckets represent temporal locality – cache efficient order of expansion.  If we store the states in the same bucket together we can exploit the spatial locality.  Munagala and Ranade’s BFS and Korf’s delayed duplicate detection for implicit graphs. External A*

Shahid Jabbar (Dortmund)External A*10 External A* - pseudocode Procedure External A* Bucket(0, h(I))  {I} f min  h(I) while (f min ≠ ∞) g  min{i | Bucket(i, f min − i) ≠  } while (g min ≤ f min ) h  f min − g Bucket(g, h)  remove duplicates from Bucket(g, h) Bucket(g, h)  Bucket(g, h) \ (Bucket(g − 1, h) U Bucket(g − 2, h)) // Subtraction A(f min ),A(f min + 1),A(f min + 2)  N(Bucket(g, h)) // Generate Neighbours Bucket(g + 1, h + 1)  A(f min + 2) Bucket(g + 1, h)  A(f min + 1) U Bucket(g + 1, h) Bucket(g + 1, h − 1)  A(f min ) U Bucket(g + 1, h − 1) g  g + 1 f min  min{i + j > f min | Bucket(i, j) ≠  } U {∞}

Shahid Jabbar (Dortmund)External A*11 Complexity Analysis  Internal A* => Each edge is looked at most once.  Duplicates Removal: Sorting the green bucket having one state for every edge from the 3 black buckets. Scanning and compaction.  O(sort(|E|))  Subtraction: Removing states of orange buckets (duplicates free) from the green one.  O(scan(|V|) + scan(|E|))

Shahid Jabbar (Dortmund)External A*12 I/O Performance of External A* Theorem: The complexity of External A* in an implicit unweighted and undirected graph with a consistent estimate is bounded by O(sort(|E|) + scan(|V|)) I/Os.

Shahid Jabbar (Dortmund)External A*13 15-Puzzle

Shahid Jabbar (Dortmund)External A*14 Experimental Results – Test Instances S. No.InstanceInit. Estim ate Opt. Sol. Length (12) (16) (14) (60) (88)

Shahid Jabbar (Dortmund)External A*15 Test Run – Generated states

Shahid Jabbar (Dortmund)External A*16 Test Run - Duplicates

Shahid Jabbar (Dortmund)External A*17 Exp. Results – Generated nodes S.No.IDA*External A*% gain Space (GB) 4546,344493, ,984,0515,180, ,369,596,778297,583, ,337,690,3312,269,240, ,009,130,7482,956, 384,

Shahid Jabbar (Dortmund)External A*18 Cache-Efficient Behaviour: CPU Internal Buffers File on disk

Shahid Jabbar (Dortmund)External A*19 Conclusion  A* for secondary storage with an I/O complexity of O(sort(|E|) + scan(|V|)).  Given that Delayed Duplication Detection has to be performed, the bound is I/O optimal.  File-based priority queue.  Hash table replaced by Delayed Duplicate Detection.  Successfully implemented to solve Korf’s Largest instance in secondary memory.  In case of non-uniformly weighted graphs with small integer weights in {1, …, C}. O(sort(|E|) + C ∙ scan(|V|))