# Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014

Save this PDF as:

Size: px
Start display at page:

Download "Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014"

## Transcription

1 Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li Advised by: Dave Mount May 22, INTRODUCTION In this report we consider the implementation of an efficient algorithm for computing Euclidean minimum spanning trees, which will be based in part on the well-separated pair decomposition, introduced by Callahan and Kosaraju. In order to compute the Euclidean Minimum Spanning Tree of n points in the space, one can naively link each pair of edges to build the complete Euclidean graph G=(P,E), where P stands for the vertex set, and E stands for set of edges, which consist of all pairs (p, q) p, q ϵ P. For such a graph we have E = nn 2, which is Ѳ(nn2 ), and combining this with the Ο(ElogV)=Ο(nn 2 logn) running time for the execution of Kruskal s Algorithm, would result in an overall running time of Ο(nn 2 logn). In this paper we present a more efficient solution. Our algorithm for computing the Euclidean minimum spanning tree will be based on a number of components. More specifically, the program provides the construction of a point region quadtree, which used to store input set of data points. We then implemented the well-separated decomposition upon the constructed point region quadtree to store each well-separated pair of cells as cross links in the tree. The next procedure is to implement projections for each pair of well-separated cells in order to find (approximately) the closest pair of points and build the graph G. Finally, we implement Kruskal s Algorithm to obtain the Minimum Spanning Tree from G. This paper is organized as follows. Section 2 defines the basic concepts of the well-separated decomposition, as well as how it is applied in this program.

2 Section 3 presents a projection method for approximating the closest pair of points between each well-separated pair and how this is used in Kruskal s algorithm. Section 4 provides a pseudo-code description of the complete method an evaluation of merits of this application of well-separated decomposition theorem, along with the graph showing the ultimate Euclidean minimum spanning tree built from several combined procedures. Section 5 make a conclusion about this newly-tested approximation algorithm. 2 CONCEPTS OF WELL-SEPARATED DECOMPOSITION From [1, p. 88], let P be a given set of n points in the Euclidean space, for any factor s 1, two non-overlapping subsets A and B of P are said to be wellseparated if both A and B can be enclosed within two Euclidean balls of radius r such that the minimum distance between SS aa and SS bb is at least sr. Figure 1: cell A and B are well-separated by the factor s From [1, p.90], for a given point set P and a separation factor s, the wellseparated decomposition is defined to be a collection of pairs of subsets of P, denoted {{AA 1, BB 1 }, {AA 2, BB 2 },, {AA mm, BB mm }}, such that (1) AA ii, BB ii P, for 1 i m (2) AA ii BB ii =, for 1 i m m (3) i=1 (AA ii BB ii ) = P P

3 (4) AA ii aaaaaa BB ii are s-well-separated, for 1 i m In order to construct the well-separated pair decomposition, we build a point quadtree in which to store input set data points. The quadtree is based on a recursive subdivision of two dimensional space which is based on repeatedly splitting a square into four quadrants. The result is a decomposition of space into squares, called cells, each of which contains a set of points. For the construction of WSPD, we make some modifications to the existing quadtree structure. In the general version of quadtree structure, each internal node serves as a placeholder, but does not store any data points, and each leaf node stores either zero or one data points in its associated cell. Figure 2: Point region quadtree partitions data points into cells. In our augmented version of quadtree structure, we add an associated representative for each node u, which we denote by rep(u). As a leaf node, if it contains a point p, then rep(u)={uu}; otherwise it contains no point, then rep(u)=. For the internal node, the case is different from that of the traditional version. Since each internal node contains more than one data point within its associated

4 cell, it must have two or more nonempty leaf nodes descended from it. In this case, we may randomly select one of such leaf children node v, and set rep(u)=rep(v) (see [1] for more detail)). Also, we associate each node with its depth in the tree, which we call its level. In my program, in order to compare levels among different nodes, we can first calculate the side-length of cell associated with each node, then determine the result by the key feature that the side length of a cell associated with u is no smaller than that of a cell associated with v if and only if level(u) level(v). The side length of a cell of is generated by the formula below. Let x be the side length of the cell associated with root node, each time we partition the cell, we divide the side length of the cell by 2. Accumulatively, the cell that is partitioned i times from the original cell, is smaller by the factor 1/2 ii. Thus, letting x denote the side length of the root cell, the side length of the associated cell of a node at level i is x/2 ii. Let us next consider the implementation of well-separated pair decomposition. The general idea of this algorithm is that each execution we check the pair of nonempty nodes if they can be decomposed into well-separated pairs, then that pair will be stored, otherwise we compare the level of this pair of nonempty nodes and decide which has larger cell size. We subdivide the node containing cell with larger size into its children nodes and recursively call that function for each child with the other node. (See [1] for more detail).

5 Figure 3: Some of the s-separated cells generated from the WSPD. 3 MINIMUM PROJECTION OF EACH WELL-SEPARATED PAIR AND KRUSKAL S ALGORITHM After we constructed each pair of well- separated pairs, the next step is to construct for each well separated pair PP 1 and PP 2 the closest pair of points in these two sets. We do this through an approximation. Consider the line segment joining the centers of the Euclidean balls containing PP 1 and PP 2, and let pp 1 PP 1 and pp 2 PP 2 be points with closet projections along this line. The essence of mathematical formula used in [2]. Let uu 1 and uu 2 be the two nodes defining any of the wellseparated pairs each containing a set of data points and let (xx 1,yy 1 ), (xx 2,yy 2 ) be the center points of the cells associated with uu 1 and uu 2, respectively. First, define the vector between two center points by VV = (xx 2 xx 1, yy 2 yy 1 ). Then for each data point (xx pp, yy pp ), we create another vector ww pp = (xx pp xx 1, yy pp yy 1 ). In order to calculate the projection distance from (xx pp, yy pp ) to (xx 1, yy 1 ), we create the distance vector dd pp by the inner product of vv and ww pp such that dd pp =vv ww pp = (vv xx ww ppxx + vv yy

6 ww ppyy ). After recursively executing the above calculation for each data point p= (pp xx, pp yy ) ϵ u2, where pp xx xx 2 rr uu2xx, xx 2 + rr uu2xx, pp yy yy 2 rr uu2yy, yy 2 + rr uu2yy, we can find the minimum projection value among all calculated vector values ww pp and store the according pp 2 = (pp xx2, pp yy2 ) uu 2. We repeat the above steps with swapped uu 1 and uu 2 to obtain another data point pp 1 = (pp xx1, pp yy1 ) uu 1. The ultimate step for each separated pair is to add the edge (pp 1, pp 2 ) into the graph G with its weight w=distance (pp 1, pp 2 ). Following the above calculation method of finding minimum projections, we have added one edge into the graph G for each well-separated pair. Altogether, the number of edges E in the graph G is the same as the number of well-separated pairs. Now, we just have one more step left to obtain the minimum spanning tree from this graph G. Among the best known algorithms for computing the minimum spanning tree of a graph are Kruskal s algorithm and Prim s algorithm. In my program, I chose the former. Kruskal s algorithm is a greedy algorithm in the goal of building a subset tree which includes each vertex in the original graph with the minimized weight of all edges connected within (see details in [3]). In my version of the application of Kruskal s algorithm, I built a priority queue to sort the set of edges in graph G based on its associated weight. In that way, each stage of the while loop within the Kruskal s algorithm, the program will make the local decision of selecting the edge with the lowest weight among the set of all input edges with the hope of finding global optimal solution in a reasonable time (See detail in [4]). There are two standard methods for implementing adding edge process: one is the union-find data structure, the other is the labeling method. In my program, I chose the latter. The structure I wrapped with this method is the treemap, the key of which has the type Integer, each index of the labeling, maps to a sequence of vertices in a cycle. During the execution of the loop, when we try to add a new edge into the minimum spanning tree, we check that if both vertices have not been added to any of the cycle yet, we create a new key, and map this Integer value to the new cycle containing just one edge. In the case that one vertex has been added to one of the cycles with other vertex not, we just add this new vertex into the cycle containing the other vertex. Another situation is that both vertices have been added to the same cycle, in which case this edge is redundant

7 for the new minimum spanning tree; hence, we do nothing. The last condition is bit complicated that both vertices are added to the treemap data structure but within different cycles. In this case, we will compare the labels associated with two different vertices and merge the cycle with larger label into the cycle with smaller label, removing larger key from the treemap. Finally, we will get the output of approximation minimum spanning tree, the sequence of edges. Figure 4: A sample of the minimum spanning tree built by Kruskal s Algorithm 4 ALGORITHM IN THE FORM OF PSEUDOCODE Two algorithms, Well-Separated Pair Decomposition and Kruskal s algorithm, are presented in the following code block, each describing how the data structures are wrapped in the associated implementation. Algorithm 1: Well-Separated Pair Decomposition Algorithm (from [1, p93]) 1. WS-pairs(u, v, s) { 2. if (rep(u) or rep(v) is empty) return ; 3. else if (u and v are s-well separated) 4. return {{u, v}}; 5. else { 6. if (level(u) > level(v))

8 7. Let u 1,..., u mm denote the children of u; 8. return ii=1 WS-pairs(uu ii, v, s); 9. } 10. } Algorithm 2: Kruskal s Algorithm (from [3]) My implementation of this algorithm is based on the treemap data structure and the labeling method for maintaining connected components, each key in the map is the index of a label, and it maps to a sequence of vertices forming a cycle. At the beginning of execution, we initialize each label associated with the vertex with value A= 2. For each e G. E; 3. Make-set (E) 4. For each (u, v) E, ordered by weight (u,v), increasing, and stored in the priority queue 5. If Label(u)=-1 and Label(v)=-1, we add a new key that maps to this new edge, and put this pair into the treemap. A=A { (u, v)} 6. Else if Label(u)=-1 and Label(v) -1 we put u into the sequence of vertices that Label(v) maps to A=A {(u,v)} 7. Else if Label(u) -1 and Label(v)=-1, we put v into the sequence of vertices that Label(u) maps to A=A {(u, v)} 8. Else if Label(u)=Label(v), we continue to the next iteration 9. Else we compare the value of Label (u) and Label (v), and merge the sequence of vertices that larger key value maps to into the sequence of vertices that smaller key value maps to. Remove the larger key value from the treemap. A=A {(u,v)}

9 10. Return A In this program, the algorithms described above are all linked with one another. The well-separated decomposition theorem provides a list of well-separated pairs served as the prerequisite of the minimum projection method. Compared with the naive way of building nn 2 pairs of edges from the input set of n data points, this method makes local comparisons for each pair and construct the graph which contains the number of edges equal to that of the well-separated pairs. Such partially linked graph structure greatly saves space. The above two algorithms combined take time Ο(nlogn), which might also perform better for the efficiency concern. The last step is identical for either the traditional method or the newly application of well-separated decomposition theorem in my program. The Kruskal s algorithm executed on two different graphs with different size of edges. During the loop of this algorithm, it will check whether each existing edge should be added into the newly created minimum spanning tree, obviously, in our program, the graph G with fewer edges will have the great probability to save the total running time of minimum spanning tree algorithm, which costs Ο(nn 2 ) in the naïve way of building the graph.

10 Figure 5: A minimum spanning tree generated from my program: the PR quadtree partitions data points, well-separated decomposition separates pairs, minimum projection method build edges, Kruskal s Algorithm find ultimately minimum spanning tree. 5 CONCLUSION Well-separated decomposition theorem is widely applied in several fields such as astronomy, molecular dynamics, fluid dynamics, plasma physics, and even surface reconstruction. We present an algorithm that uses this concept to efficiently construct an approximation to the minimum spanning tree. This shows how geometry can be exploited to obtain algorithms that greatly improve the storage space and running time efficiency over traditional approaches.

11 References 1. David Mount. CMSC754 Lecture Notes. Mar url: 2. Meyer, Carl D. (2000). Matrix Analysis and Applied Linear Algebra. Society for Industrial and Applied Mathematics. 3. Wikipedia. Kruskal's_algorithm Wikipedia, The Free Encyclopedia Wikipedia. Greedy_algorithm Wikipedia, The Free Encyclopedia.

### GRAPH THEORY and APPLICATIONS. Trees

GRAPH THEORY and APPLICATIONS Trees Properties Tree: a connected graph with no cycle (acyclic) Forest: a graph with no cycle Paths are trees. Star: A tree consisting of one vertex adjacent to all the others.

### The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge,

The Union-Find Problem Kruskal s algorithm for finding an MST presented us with a problem in data-structure design. As we looked at each edge, cheapest first, we had to determine whether its two endpoints

### Chapter 4. Trees. 4.1 Basics

Chapter 4 Trees 4.1 Basics A tree is a connected graph with no cycles. A forest is a collection of trees. A vertex of degree one, particularly in a tree, is called a leaf. Trees arise in a variety of applications.

### 4 Basics of Trees. Petr Hliněný, FI MU Brno 1 FI: MA010: Trees and Forests

4 Basics of Trees Trees, actually acyclic connected simple graphs, are among the simplest graph classes. Despite their simplicity, they still have rich structure and many useful application, such as in

### Lecture Notes on Spanning Trees

Lecture Notes on Spanning Trees 15-122: Principles of Imperative Computation Frank Pfenning Lecture 26 April 26, 2011 1 Introduction In this lecture we introduce graphs. Graphs provide a uniform model

### Solutions to Exercises 8

Discrete Mathematics Lent 2009 MA210 Solutions to Exercises 8 (1) Suppose that G is a graph in which every vertex has degree at least k, where k 1, and in which every cycle contains at least 4 vertices.

### A. V. Gerbessiotis CS Spring 2014 PS 3 Mar 24, 2014 No points

A. V. Gerbessiotis CS 610-102 Spring 2014 PS 3 Mar 24, 2014 No points Problem 1. Suppose that we insert n keys into a hash table of size m using open addressing and uniform hashing. Let p(n, m) be the

### CMSC 451: Graph Properties, DFS, BFS, etc.

CMSC 451: Graph Properties, DFS, BFS, etc. Slides By: Carl Kingsford Department of Computer Science University of Maryland, College Park Based on Chapter 3 of Algorithm Design by Kleinberg & Tardos. Graphs

### Minimum Spanning Trees

Minimum Spanning Trees Algorithms and 18.304 Presentation Outline 1 Graph Terminology Minimum Spanning Trees 2 3 Outline Graph Terminology Minimum Spanning Trees 1 Graph Terminology Minimum Spanning Trees

### OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION

OPTIMAL DESIGN OF DISTRIBUTED SENSOR NETWORKS FOR FIELD RECONSTRUCTION Sérgio Pequito, Stephen Kruzick, Soummya Kar, José M. F. Moura, A. Pedro Aguiar Department of Electrical and Computer Engineering

### Theorem A graph T is a tree if, and only if, every two distinct vertices of T are joined by a unique path.

Chapter 3 Trees Section 3. Fundamental Properties of Trees Suppose your city is planning to construct a rapid rail system. They want to construct the most economical system possible that will meet the

### Two General Methods to Reduce Delay and Change of Enumeration Algorithms

ISSN 1346-5597 NII Technical Report Two General Methods to Reduce Delay and Change of Enumeration Algorithms Takeaki Uno NII-2003-004E Apr.2003 Two General Methods to Reduce Delay and Change of Enumeration

### Counting Spanning Trees

Counting Spanning Trees Bang Ye Wu Kun-Mao Chao Counting Spanning Trees This book provides a comprehensive introduction to the modern study of spanning trees. A spanning tree for a graph G is a subgraph

### Well-Separated Pair Decomposition for the Unit-disk Graph Metric and its Applications

Well-Separated Pair Decomposition for the Unit-disk Graph Metric and its Applications Jie Gao Department of Computer Science Stanford University Joint work with Li Zhang Systems Research Center Hewlett-Packard

### Divide-and-Conquer. Three main steps : 1. divide; 2. conquer; 3. merge.

Divide-and-Conquer Three main steps : 1. divide; 2. conquer; 3. merge. 1 Let I denote the (sub)problem instance and S be its solution. The divide-and-conquer strategy can be described as follows. Procedure

### Graph. Consider a graph, G in Fig Then the vertex V and edge E can be represented as:

Graph A graph G consist of 1. Set of vertices V (called nodes), (V = {v1, v2, v3, v4...}) and 2. Set of edges E (i.e., E {e1, e2, e3...cm} A graph can be represents as G = (V, E), where V is a finite and

### Solutions to Homework 6

Solutions to Homework 6 Debasish Das EECS Department, Northwestern University ddas@northwestern.edu 1 Problem 5.24 We want to find light spanning trees with certain special properties. Given is one example

### Lecture 10: Regression Trees

Lecture 10: Regression Trees 36-350: Data Mining October 11, 2006 Reading: Textbook, sections 5.2 and 10.5. The next three lectures are going to be about a particular kind of nonlinear predictive model,

### Classifying Large Data Sets Using SVMs with Hierarchical Clusters. Presented by :Limou Wang

Classifying Large Data Sets Using SVMs with Hierarchical Clusters Presented by :Limou Wang Overview SVM Overview Motivation Hierarchical micro-clustering algorithm Clustering-Based SVM (CB-SVM) Experimental

### α = u v. In other words, Orthogonal Projection

Orthogonal Projection Given any nonzero vector v, it is possible to decompose an arbitrary vector u into a component that points in the direction of v and one that points in a direction orthogonal to v

### Why? A central concept in Computer Science. Algorithms are ubiquitous.

Analysis of Algorithms: A Brief Introduction Why? A central concept in Computer Science. Algorithms are ubiquitous. Using the Internet (sending email, transferring files, use of search engines, online

### 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT

DECISION 1 Revision Notes 1. Sorting (assuming sorting into ascending order) a) BUBBLE SORT Make sure you show comparisons clearly and label each pass First Pass 8 4 3 6 1 4 8 3 6 1 4 3 8 6 1 4 3 6 8 1

### Applied Algorithm Design Lecture 5

Applied Algorithm Design Lecture 5 Pietro Michiardi Eurecom Pietro Michiardi (Eurecom) Applied Algorithm Design Lecture 5 1 / 86 Approximation Algorithms Pietro Michiardi (Eurecom) Applied Algorithm Design

### COLORED GRAPHS AND THEIR PROPERTIES

COLORED GRAPHS AND THEIR PROPERTIES BEN STEVENS 1. Introduction This paper is concerned with the upper bound on the chromatic number for graphs of maximum vertex degree under three different sets of coloring

### IE 680 Special Topics in Production Systems: Networks, Routing and Logistics*

IE 680 Special Topics in Production Systems: Networks, Routing and Logistics* Rakesh Nagi Department of Industrial Engineering University at Buffalo (SUNY) *Lecture notes from Network Flows by Ahuja, Magnanti

### Sample Problems in Discrete Mathematics

Sample Problems in Discrete Mathematics This handout lists some sample problems that you should be able to solve as a pre-requisite to Computer Algorithms Try to solve all of them You should also read

### 1. What s wrong with the following proofs by induction?

ArsDigita University Month : Discrete Mathematics - Professor Shai Simonson Problem Set 4 Induction and Recurrence Equations Thanks to Jeffrey Radcliffe and Joe Rizzo for many of the solutions. Pasted

### Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24

Introduction to Algorithms Review information for Prelim 1 CS 4820, Spring 2010 Distributed Wednesday, February 24 The final exam will cover seven topics. 1. greedy algorithms 2. divide-and-conquer algorithms

### CSE 326, Data Structures. Sample Final Exam. Problem Max Points Score 1 14 (2x7) 2 18 (3x6) 3 4 4 7 5 9 6 16 7 8 8 4 9 8 10 4 Total 92.

Name: Email ID: CSE 326, Data Structures Section: Sample Final Exam Instructions: The exam is closed book, closed notes. Unless otherwise stated, N denotes the number of elements in the data structure

### Discrete Mathematics, Chapter 5: Induction and Recursion

Discrete Mathematics, Chapter 5: Induction and Recursion Richard Mayr University of Edinburgh, UK Richard Mayr (University of Edinburgh, UK) Discrete Mathematics. Chapter 5 1 / 20 Outline 1 Well-founded

### The Goldberg Rao Algorithm for the Maximum Flow Problem

The Goldberg Rao Algorithm for the Maximum Flow Problem COS 528 class notes October 18, 2006 Scribe: Dávid Papp Main idea: use of the blocking flow paradigm to achieve essentially O(min{m 2/3, n 1/2 }

### Computational Geometry. Lecture 1: Introduction and Convex Hulls

Lecture 1: Introduction and convex hulls 1 Geometry: points, lines,... Plane (two-dimensional), R 2 Space (three-dimensional), R 3 Space (higher-dimensional), R d A point in the plane, 3-dimensional space,

### Full and Complete Binary Trees

Full and Complete Binary Trees Binary Tree Theorems 1 Here are two important types of binary trees. Note that the definitions, while similar, are logically independent. Definition: a binary tree T is full

### A Non-Linear Schema Theorem for Genetic Algorithms

A Non-Linear Schema Theorem for Genetic Algorithms William A Greene Computer Science Department University of New Orleans New Orleans, LA 70148 bill@csunoedu 504-280-6755 Abstract We generalize Holland

### Social Media Mining. Graph Essentials

Graph Essentials Graph Basics Measures Graph and Essentials Metrics 2 2 Nodes and Edges A network is a graph nodes, actors, or vertices (plural of vertex) Connections, edges or ties Edge Node Measures

### Inner Product Spaces and Orthogonality

Inner Product Spaces and Orthogonality week 3-4 Fall 2006 Dot product of R n The inner product or dot product of R n is a function, defined by u, v a b + a 2 b 2 + + a n b n for u a, a 2,, a n T, v b,

### Approximation Algorithms

Approximation Algorithms or: How I Learned to Stop Worrying and Deal with NP-Completeness Ong Jit Sheng, Jonathan (A0073924B) March, 2012 Overview Key Results (I) General techniques: Greedy algorithms

### DATA MINING CLUSTER ANALYSIS: BASIC CONCEPTS

DATA MINING CLUSTER ANALYSIS: BASIC CONCEPTS 1 AND ALGORITHMS Chiara Renso KDD-LAB ISTI- CNR, Pisa, Italy WHAT IS CLUSTER ANALYSIS? Finding groups of objects such that the objects in a group will be similar

### Year 9 set 1 Mathematics notes, to accompany the 9H book.

Part 1: Year 9 set 1 Mathematics notes, to accompany the 9H book. equations 1. (p.1), 1.6 (p. 44), 4.6 (p.196) sequences 3. (p.115) Pupils use the Elmwood Press Essential Maths book by David Raymer (9H

### OPTIMUM PARTITION PARAMETER OF DIVIDE-AND-CONQUER ALGORITHM FOR SOLVING CLOSEST-PAIR PROBLEM

OPTIMUM PARTITION PARAMETER OF DIVIDE-AND-CONQUER ALGORITHM FOR SOLVING CLOSEST-PAIR PROBLEM Mohammad Zaidul Karim 1 and Nargis Akter 2 1 Department of Computer Science and Engineering, Daffodil International

### Section 1.1. Introduction to R n

The Calculus of Functions of Several Variables Section. Introduction to R n Calculus is the study of functional relationships and how related quantities change with each other. In your first exposure to

### Exam study sheet for CS2711. List of topics

Exam study sheet for CS2711 Here is the list of topics you need to know for the final exam. For each data structure listed below, make sure you can do the following: 1. Give an example of this data structure

### INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS

INDISTINGUISHABILITY OF ABSOLUTELY CONTINUOUS AND SINGULAR DISTRIBUTIONS STEVEN P. LALLEY AND ANDREW NOBEL Abstract. It is shown that there are no consistent decision rules for the hypothesis testing problem

### CS325: Analysis of Algorithms, Fall Midterm Solutions

CS325: Analysis of Algorithms, Fall 2016 Midterm Solutions I don t know policy: you may write I don t know and nothing else to answer a question and receive 25 percent of the total points for that problem

### Intro. to the Divide-and-Conquer Strategy via Merge Sort CMPSC 465 CLRS Sections 2.3, Intro. to and various parts of Chapter 4

Intro. to the Divide-and-Conquer Strategy via Merge Sort CMPSC 465 CLRS Sections 2.3, Intro. to and various parts of Chapter 4 I. Algorithm Design and Divide-and-Conquer There are various strategies we

### 6. If there is no improvement of the categories after several steps, then choose new seeds using another criterion (e.g. the objects near the edge of

Clustering Clustering is an unsupervised learning method: there is no target value (class label) to be predicted, the goal is finding common patterns or grouping similar examples. Differences between models/algorithms

### CS 4310 HOMEWORK SET 1

CS 4310 HOMEWORK SET 1 PAUL MILLER Section 2.1 Exercises Exercise 2.1-1. Using Figure 2.2 as a model, illustrate the operation of INSERTION-SORT on the array A = 31, 41, 59, 26, 41, 58. Solution: Assume

### Monotone Partitioning. Polygon Partitioning. Monotone polygons. Monotone polygons. Monotone Partitioning. ! Define monotonicity

Monotone Partitioning! Define monotonicity Polygon Partitioning Monotone Partitioning! Triangulate monotone polygons in linear time! Partition a polygon into monotone pieces Monotone polygons! Definition

### 5.1 Bipartite Matching

CS787: Advanced Algorithms Lecture 5: Applications of Network Flow In the last lecture, we looked at the problem of finding the maximum flow in a graph, and how it can be efficiently solved using the Ford-Fulkerson

### 12 Abstract Data Types

12 Abstract Data Types 12.1 Source: Foundations of Computer Science Cengage Learning Objectives After studying this chapter, the student should be able to: Define the concept of an abstract data type (ADT).

### MATHEMATICAL INDUCTION AND DIFFERENCE EQUATIONS

1 CHAPTER 6. MATHEMATICAL INDUCTION AND DIFFERENCE EQUATIONS 1 INSTITIÚID TEICNEOLAÍOCHTA CHEATHARLACH INSTITUTE OF TECHNOLOGY CARLOW MATHEMATICAL INDUCTION AND DIFFERENCE EQUATIONS 1 Introduction Recurrence

### The edge slide graph of the n-dimensional cube

The edge slide graph of the n-dimensional cube Howida AL Fran Institute of Fundamental Sciences Massey University, Manawatu 8th Australia New Zealand Mathematics Convention December 2014 Howida AL Fran

### 2. (a) Explain the strassen s matrix multiplication. (b) Write deletion algorithm, of Binary search tree. [8+8]

Code No: R05220502 Set No. 1 1. (a) Describe the performance analysis in detail. (b) Show that f 1 (n)+f 2 (n) = 0(max(g 1 (n), g 2 (n)) where f 1 (n) = 0(g 1 (n)) and f 2 (n) = 0(g 2 (n)). [8+8] 2. (a)

### Analysis of Algorithms I: Optimal Binary Search Trees

Analysis of Algorithms I: Optimal Binary Search Trees Xi Chen Columbia University Given a set of n keys K = {k 1,..., k n } in sorted order: k 1 < k 2 < < k n we wish to build an optimal binary search

### Relations Graphical View

Relations Slides by Christopher M. Bourke Instructor: Berthe Y. Choueiry Introduction Recall that a relation between elements of two sets is a subset of their Cartesian product (of ordered pairs). A binary

### 1 Point Inclusion in a Polygon

Comp 163: Computational Geometry Tufts University, Spring 2005 Professor Diane Souvaine Scribe: Ryan Coleman Point Inclusion and Processing Simple Polygons into Monotone Regions 1 Point Inclusion in a

### Sample Questions Csci 1112 A. Bellaachia

Sample Questions Csci 1112 A. Bellaachia Important Series : o S( N) 1 2 N N i N(1 N) / 2 i 1 o Sum of squares: N 2 N( N 1)(2N 1) N i for large N i 1 6 o Sum of exponents: N k 1 k N i for large N and k

### CS 441 Discrete Mathematics for CS Lecture 16. Counting. CS 441 Discrete mathematics for CS. Course administration

CS 44 Discrete Mathematics for CS Lecture 6 Counting Milos Hauskrecht milos@cs.pitt.edu 5329 Sennott Square Course administration Midterm exam: Thursday, March 6, 24 Homework assignment 8: due after Spring

### DATA STRUCTURES NOTES FOR THE FINAL EXAM SUMMER 2002 Michael Knopf mknopf@ufl.edu

DATA STRUCTURES NOTES FOR THE FINAL EXAM SUMMER 2002 Michael Knopf mknopf@ufl.edu ',6&/\$,0(5 0U 0LFKDHO.QRSI SUHSDUHG WKHVH QRWHV 1HLWKHU WKH FRXUVH LQVWUXFWRU QRU WKH WHDFKLQJ DVVLVWDQWV KDYH UHYLHZHG

### Chapter 4: Non-Parametric Classification

Chapter 4: Non-Parametric Classification Introduction Density Estimation Parzen Windows Kn-Nearest Neighbor Density Estimation K-Nearest Neighbor (KNN) Decision Rule Gaussian Mixture Model A weighted combination

### CS5314 Randomized Algorithms. Lecture 16: Balls, Bins, Random Graphs (Random Graphs, Hamiltonian Cycles)

CS5314 Randomized Algorithms Lecture 16: Balls, Bins, Random Graphs (Random Graphs, Hamiltonian Cycles) 1 Objectives Introduce Random Graph Model used to define a probability space for all graphs with

### Mathematics for Computer Science/Software Engineering. Notes for the course MSM1F3 Dr. R. A. Wilson

Mathematics for Computer Science/Software Engineering Notes for the course MSM1F3 Dr. R. A. Wilson October 1996 Chapter 1 Logic Lecture no. 1. We introduce the concept of a proposition, which is a statement

### 2.3 Scheduling jobs on identical parallel machines

2.3 Scheduling jobs on identical parallel machines There are jobs to be processed, and there are identical machines (running in parallel) to which each job may be assigned Each job = 1,,, must be processed

### Zachary Monaco Georgia College Olympic Coloring: Go For The Gold

Zachary Monaco Georgia College Olympic Coloring: Go For The Gold Coloring the vertices or edges of a graph leads to a variety of interesting applications in graph theory These applications include various

### Interactive Math Glossary Terms and Definitions

Terms and Definitions Absolute Value the magnitude of a number, or the distance from 0 on a real number line Additive Property of Area the process of finding an the area of a shape by totaling the areas

### Tufts University, Spring 2005 Michael Horn, Julie Weber (2004) Voronoi Diagrams

Comp 163: Computational Geometry Professor Diane Souvaine Tufts University, Spring 2005 Michael Horn, Julie Weber (2004) Voronoi Diagrams 1 Voronoi Diagrams 1 Consider the following problem. To determine

### CMPS 102 Solutions to Homework 1

CMPS 0 Solutions to Homework Lindsay Brown, lbrown@soe.ucsc.edu September 9, 005 Problem..- p. 3 For inputs of size n insertion sort runs in 8n steps, while merge sort runs in 64n lg n steps. For which

### Induction. Mathematical Induction. Induction. Induction. Induction. Induction. 29 Sept 2015

Mathematical If we have a propositional function P(n), and we want to prove that P(n) is true for any natural number n, we do the following: Show that P(0) is true. (basis step) We could also start at

### 3. INNER PRODUCT SPACES

. INNER PRODUCT SPACES.. Definition So far we have studied abstract vector spaces. These are a generalisation of the geometric spaces R and R. But these have more structure than just that of a vector space.

### Reducing Clocks in Timed Automata while Preserving Bisimulation

Reducing Clocks in Timed Automata while Preserving Bisimulation Shibashis Guha Chinmay Narayan S. Arun-Kumar Indian Institute of Technology Delhi {shibashis, chinmay, sak}@cse.iitd.ac.in arxiv:1404.6613v2

### 6.3 Conditional Probability and Independence

222 CHAPTER 6. PROBABILITY 6.3 Conditional Probability and Independence Conditional Probability Two cubical dice each have a triangle painted on one side, a circle painted on two sides and a square painted

### Trees and Fundamental Circuits

Trees and Fundamental Circuits Tree A connected graph without any circuits. o must have at least one vertex. o definition implies that it must be a simple graph. o only finite trees are being considered

### Outline. NP-completeness. When is a problem easy? When is a problem hard? Today. Euler Circuits

Outline NP-completeness Examples of Easy vs. Hard problems Euler circuit vs. Hamiltonian circuit Shortest Path vs. Longest Path 2-pairs sum vs. general Subset Sum Reducing one problem to another Clique

### CS420/520 Algorithm Analysis Spring 2010 Lecture 04

CS420/520 Algorithm Analysis Spring 2010 Lecture 04 I. Chapter 4 Recurrences A. Introduction 1. Three steps applied at each level of a recursion a) Divide into a number of subproblems that are smaller

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. #-approximation algorithm.

Approximation Algorithms 11 Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of three

### Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS

Homework MA 725 Spring, 2012 C. Huneke SELECTED ANSWERS 1.1.25 Prove that the Petersen graph has no cycle of length 7. Solution: There are 10 vertices in the Petersen graph G. Assume there is a cycle C

### Network (Tree) Topology Inference Based on Prüfer Sequence

Network (Tree) Topology Inference Based on Prüfer Sequence C. Vanniarajan and Kamala Krithivasan Department of Computer Science and Engineering Indian Institute of Technology Madras Chennai 600036 vanniarajanc@hcl.in,

### Lecture 7: Approximation via Randomized Rounding

Lecture 7: Approximation via Randomized Rounding Often LPs return a fractional solution where the solution x, which is supposed to be in {0, } n, is in [0, ] n instead. There is a generic way of obtaining

### Algorithms and Data Structures (INF1) Lecture 14/15 Hua Lu

Algorithms and Data Structures (INF1) Lecture 14/15 Hua Lu Department of Computer Science Aalborg University Fall 2007 This Lecture Shortest paths Problem preliminary Shortest paths in DAG Bellman-Moore

### Operation Count; Numerical Linear Algebra

10 Operation Count; Numerical Linear Algebra 10.1 Introduction Many computations are limited simply by the sheer number of required additions, multiplications, or function evaluations. If floating-point

### ! Solve problem to optimality. ! Solve problem in poly-time. ! Solve arbitrary instances of the problem. !-approximation algorithm.

Approximation Algorithms Chapter Approximation Algorithms Q Suppose I need to solve an NP-hard problem What should I do? A Theory says you're unlikely to find a poly-time algorithm Must sacrifice one of

### 1 Basic Definitions and Concepts in Graph Theory

CME 305: Discrete Mathematics and Algorithms 1 Basic Definitions and Concepts in Graph Theory A graph G(V, E) is a set V of vertices and a set E of edges. In an undirected graph, an edge is an unordered

### Data Matching Optimal and Greedy

Chapter 13 Data Matching Optimal and Greedy Introduction This procedure is used to create treatment-control matches based on propensity scores and/or observed covariate variables. Both optimal and greedy

### Scheduling Shop Scheduling. Tim Nieberg

Scheduling Shop Scheduling Tim Nieberg Shop models: General Introduction Remark: Consider non preemptive problems with regular objectives Notation Shop Problems: m machines, n jobs 1,..., n operations

### 1 2-3 Trees: The Basics

CS10: Data Structures and Object-Oriented Design (Fall 2013) November 1, 2013: 2-3 Trees: Inserting and Deleting Scribes: CS 10 Teaching Team Lecture Summary In this class, we investigated 2-3 Trees in

### Exponential time algorithms for graph coloring

Exponential time algorithms for graph coloring Uriel Feige Lecture notes, March 14, 2011 1 Introduction Let [n] denote the set {1,..., k}. A k-labeling of vertices of a graph G(V, E) is a function V [k].

### Computer Graphics CS 543 Lecture 12 (Part 1) Curves. Prof Emmanuel Agu. Computer Science Dept. Worcester Polytechnic Institute (WPI)

Computer Graphics CS 54 Lecture 1 (Part 1) Curves Prof Emmanuel Agu Computer Science Dept. Worcester Polytechnic Institute (WPI) So Far Dealt with straight lines and flat surfaces Real world objects include

### Catalan Numbers. Thomas A. Dowling, Department of Mathematics, Ohio State Uni- versity.

7 Catalan Numbers Thomas A. Dowling, Department of Mathematics, Ohio State Uni- Author: versity. Prerequisites: The prerequisites for this chapter are recursive definitions, basic counting principles,

### Induction Problems. Tom Davis November 7, 2005

Induction Problems Tom Davis tomrdavis@earthlin.net http://www.geometer.org/mathcircles November 7, 2005 All of the following problems should be proved by mathematical induction. The problems are not necessarily

### On the k-path cover problem for cacti

On the k-path cover problem for cacti Zemin Jin and Xueliang Li Center for Combinatorics and LPMC Nankai University Tianjin 300071, P.R. China zeminjin@eyou.com, x.li@eyou.com Abstract In this paper we

### Discrete Mathematics (2009 Spring) Induction and Recursion (Chapter 4, 3 hours)

Discrete Mathematics (2009 Spring) Induction and Recursion (Chapter 4, 3 hours) Chih-Wei Yi Dept. of Computer Science National Chiao Tung University April 17, 2009 4.1 Mathematical Induction 4.1 Mathematical

### princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora

princeton univ. F 13 cos 521: Advanced Algorithm Design Lecture 6: Provable Approximation via Linear Programming Lecturer: Sanjeev Arora Scribe: One of the running themes in this course is the notion of

### Chapter 6 Planarity. Section 6.1 Euler s Formula

Chapter 6 Planarity Section 6.1 Euler s Formula In Chapter 1 we introduced the puzzle of the three houses and the three utilities. The problem was to determine if we could connect each of the three utilities

### Algorithm Design and Analysis

Algorithm Design and Analysis LECTURE 27 Approximation Algorithms Load Balancing Weighted Vertex Cover Reminder: Fill out SRTEs online Don t forget to click submit Sofya Raskhodnikova 12/6/2011 S. Raskhodnikova;

### Chapter 2 Limits Functions and Sequences sequence sequence Example

Chapter Limits In the net few chapters we shall investigate several concepts from calculus, all of which are based on the notion of a limit. In the normal sequence of mathematics courses that students

### A tree can be defined in a variety of ways as is shown in the following theorem: 2. There exists a unique path between every two vertices of G.

7 Basic Properties 24 TREES 7 Basic Properties Definition 7.1: A connected graph G is called a tree if the removal of any of its edges makes G disconnected. A tree can be defined in a variety of ways as

### Computational Geometry

Lecture 10: 1 Lecture 10: Voronoi diagram Spatial interpolation Given some trees, seen from above, which region will they occupy? 2 Lecture 10: Voronoi diagram Spatial interpolation Given some trees, seen