Rectilinear Pattern Recognition Dan J. Nardi Masters Thesis April 11, 2003.

Slides:



Advertisements
Similar presentations
Spatial Join Queries. Spatial Queries Given a collection of geometric objects (points, lines, polygons,...) organize them on disk, to answer point queries.
Advertisements

Graphs CSC 220 Data Structure. Introduction One of the Most versatile data structures like trees. Terminology –Nodes in trees are vertices in graphs.
DATA STRUCTURE RECAP Yiqun Zhang University of Houston.
CSE 2331/5331 Topic 11: Basic Graph Alg. Representations Undirected graph Directed graph Topological sort.
1 Section 9.4 Spanning Trees. 2 Let G be a simple graph. A spanning subtree of G is a subgraph of G containing every vertex of G –must be connected; contains.
CSE 373: Data Structures and Algorithms Lecture 19: Graphs III 1.
Graphs Chapter 12. Chapter Objectives  To become familiar with graph terminology and the different types of graphs  To study a Graph ADT and different.
Abstract Data Types and Subprograms
© 2006 Pearson Addison-Wesley. All rights reserved14 A-1 Chapter 14 excerpts Graphs (breadth-first-search)
Graphs Graphs are the most general data structures we will study in this course. A graph is a more general version of connected nodes than the tree. Both.
Data Structure and Algorithms (BCS 1223) GRAPH. Introduction of Graph A graph G consists of two things: 1.A set V of elements called nodes(or points or.
CS171 Introduction to Computer Science II Graphs Strike Back.
Graph & BFS.
Nyhoff, ADTs, Data Structures and Problem Solving with C++, Second Edition, © 2005 Pearson Education, Inc. All rights reserved Graphs.
Graph COMP171 Fall Graph / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D E A C F B Vertex Edge.
Alyce Brady CS 510: Computer Algorithms Breadth-First Graph Traversal Algorithm.
Graph & BFS Lecture 22 COMP171 Fall Graph & BFS / Slide 2 Graphs * Extremely useful tool in modeling problems * Consist of: n Vertices n Edges D.
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
CS 206 Introduction to Computer Science II 11 / 03 / 2008 Instructor: Michael Eckmann.
COMP171 Depth-First Search.
Heaps & Priority Queues Nelson Padua-Perez Bill Pugh Department of Computer Science University of Maryland, College Park.
CS 206 Introduction to Computer Science II 11 / 05 / 2008 Instructor: Michael Eckmann.
CS 206 Introduction to Computer Science II 03 / 25 / 2009 Instructor: Michael Eckmann.
Alyce Brady CS 510: Computer Algorithms Depth-First Graph Traversal Algorithm.
Using Search in Problem Solving
Depth-first search COMP171 Fall Graph / Slide 2 Depth-First Search (DFS) * DFS is another popular graph search strategy n Idea is similar to pre-order.
Fast and Scalable Packet Classification Using Perfect Hash functions Author: Viktor Puš, Jan Korenek Publisher: FPGA’09 Presenter: Yu-Ping Chiang Date:
Fall 2007CS 2251 Graphs Chapter 12. Fall 2007CS 2252 Chapter Objectives To become familiar with graph terminology and the different types of graphs To.
Depth-First Search Lecture 24 COMP171 Fall Graph / Slide 2 Depth-First Search (DFS) * DFS is another popular graph search strategy n Idea is similar.
Important Problem Types and Fundamental Data Structures
Chapter 1 Introduction Definition of Algorithm An algorithm is a finite sequence of precise instructions for performing a computation or for solving.
CS261 Data Structures DFS and BFS – Edge List Representation.
Introduction to Routing. The Routing Problem Apply after placement Input: –Netlist –Timing budget for, typically, critical nets –Locations of blocks and.
Recursion Bryce Boe 2013/11/18 CS24, Fall Outline Wednesday Recap Lab 7 Iterative Solution Recursion Binary Tree Traversals Lab 7 Recursive Solution.
Chapter 14 Graphs. © 2004 Pearson Addison-Wesley. All rights reserved Terminology G = {V, E} A graph G consists of two sets –A set V of vertices,
Introduction. 2COMPSCI Computer Science Fundamentals.
UNC Chapel Hill M. C. Lin Line Segment Intersection Chapter 2 of the Textbook Driving Applications –Map overlap problems –3D Polyhedral Morphing.
1 Trees A tree is a data structure used to represent different kinds of data and help solve a number of algorithmic problems Game trees (i.e., chess ),
Common final examinations When: Wednesday, 12/11, 3:30-5:30 PM Where: Ritter Hall - Walk Auditorium 131 CIS 1166 final When: Wednesday, 12/11, 5:45-7:45.
Graphs. 2 Graph definitions There are two kinds of graphs: directed graphs (sometimes called digraphs) and undirected graphs Birmingham Rugby London Cambridge.
MA/CSSE 473 Day 28 Dynamic Programming Binomial Coefficients Warshall's algorithm Student questions?
Graphs. Definitions A graph is two sets. A graph is two sets. –A set of nodes or vertices V –A set of edges E Edges connect nodes. Edges connect nodes.
COMP261 Lecture 6 Dijkstra’s Algorithm. Connectedness Is this graph connected or not? A Z FF C M N B Y BB S P DDGG AA R F G J L EE CC Q O V D T H W E.
Agenda Review: –Planar Graphs Lecture Content:  Concepts of Trees  Spanning Trees  Binary Trees Exercise.
Trees : Part 1 Section 4.1 (1) Theory and Terminology (2) Preorder, Postorder and Levelorder Traversals.
Trees 2: Section 4.2 and 4.3 Binary trees. Binary Trees Definition: A binary tree is a rooted tree in which no vertex has more than two children
Trees, Binary Search Trees, Balanced Trees, Graphs Graph Fundamentals Telerik Algo Academy
1 Directed Graphs Chapter 8. 2 Objectives You will be able to: Say what a directed graph is. Describe two ways to represent a directed graph: Adjacency.
COSC 2007 Data Structures II
Graphs Chapter 12. Chapter 12: Graphs2 Chapter Objectives To become familiar with graph terminology and the different types of graphs To study a Graph.
© 2006 Pearson Addison-Wesley. All rights reserved 14 A-1 Chapter 14 Graphs.
Association Analysis (3)
Hello Everyone!!! 1. Tree And Graphs 2 Features of Trees  Tree Nodes Each node have 0 or more children A node have must one parent  Binary tree Tree.
MA/CSSE 473 Day 30 B Trees Dynamic Programming Binomial Coefficients Warshall's algorithm No in-class quiz today Student questions?
90-723: Data Structures and Algorithms for Information Processing Copyright © 1999, Carnegie Mellon. All Rights Reserved. 1 Lecture 7: Graphs Data Structures.
1 Trees : Part 1 Reading: Section 4.1 Theory and Terminology Preorder, Postorder and Levelorder Traversals.
Data Structures and Algorithm Analysis Graph Algorithms Lecturer: Jing Liu Homepage:
Graphs. What is a graph? In simple words, A graph is a set of vertices and edges which connect them. A node (or vertex) is a discrete position in the.
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
A* Reference: “Artificial Intelligence for Games”, Ian Millington.
Graphs - II CS 2110, Spring Where did David leave that book? 2.
Brute Force and Exhaustive Search Brute Force and Exhaustive Search Traveling Salesman Problem Knapsack Problem Assignment Problem Selection Sort and Bubble.
Searching Given a collection and an element (key) to find… Output
Binary Search Trees.
Depth-First Search.
Data Structures and Algorithms for Information Processing
Search Related Algorithms
Graphs Part 2 Adjacency Matrix
COMP171 Depth-First Search.
Depth-First Search CSE 2011 Winter April 2019.
Presentation transcript:

Rectilinear Pattern Recognition Dan J. Nardi Masters Thesis April 11, 2003

Index of Topics Introduction of Problem Target & Chip Model Algorithms  Overlay  Search Breadth-first vs. Depth-first Graph Model Recursion for ‘deep compare’ Conclusion

Introduction of Problem IBM needs help Need algorithm to find all occurrences of a simple pattern within larger pattern  Data describes geometric layout  Uses only rectilinear shapes

Target & Chip Model Smaller pattern is our ‘target’

Target & Chip Model Larger pattern is our ‘chip’

Algorithms Program broken into two parts  Read in data and optimize (overlay)  Perform search (deep compare)

Algorithms Read data into appropriate data structures  Vertex table  Edge table  Face table Shapes are on different layers that overlap Needed to ‘flatten’ representation

Overlay Algorithm Have: Want:

Overlay Algorithm We used the Plane Sweep Algorithm  Computational Geometry: Algorithms and Applications by M. de Berg et al [pages 20 – 38] Start at highest horizontal edge Go to next highest, and so on Keep track of active vertical edges Test for intersection(s)

Plane Sweep Algorithm

Intersection Found

Plane Sweep Algorithm Intersection Found

Plane Sweep Algorithm

Overlay Algorithm get all horizontal edges and sort into list for each horizontal edge in list { remove inactive vertical edges;//active edges now above activeH add active vertical edges;//vert. edges activeH for each active vertical edge { test_intersection(activeH, activeV); if(intersection == true) update tables with new values; }

Search Ready to compare target & chip data Can be solved with recursion But where to start? Target ‘key’  Face in target with the largest # edges  Most unique  more definitive search

Search Now that we have starting point How to search  Breadth-first search Requires a lot of memory  Depth-first search Less memory needed Need a finite tree to search

Breadth-first Search

Depth-first Search

Can throw away this sub-tree

Graph Model Now we need to represent the patterns in such a way that we can use one of these searches Visualize a tree  Root node is target ‘key’  Each neighboring face becomes a child node  Recursively iterate through pattern

Graph Model f1 f2f3 f4 e f1 e f2f3 e f4 e e e Abstract Tree

Graph Model Don’t need to represent multiple shared edges Mark faces & edges as ‘visited’ once checked f1 e f2f3ee ef2 ee Concrete Tree (repetitive edges)

Recursive ‘Deep Compare’ Use recursion on abstract trees Start with key and possible match

Deep Compare Algorithm get list of possible matches (those equivalent to target key) for each face in list { if(deepCompare(t-key, cface)); keep face in list } bool deepCompare(tface, cface) { if(tface == cface) { do{ new-cface = get next neighbor of cface new-tface = get next neighbor of tface if not (deepCompare(new-cface, new-tface)) return false; }while still have unvisited neighbors; return true; } return false; }

Search If deepCompare is true for possible match  Then candidate is a final match and is flagged Else  Removed from the list At end all matches are flagged

Conclusion Algorithm can be adapted for other input data We’re allowed conveniences by having rectilinear shapes (less detail and overhead) Using plane-sweep algo. saves on runtime  Now log(n) not n 2

Conclusion Good choice for target ‘key’ quickly decreases search space Depth-first search saves on memory

The End Created: April 4, 2003