Minimum Spanning Trees
|
|
|
- Iris Cameron
- 10 years ago
- Views:
Transcription
1 Minimum Spanning Trees weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced topics References: Algorithms in Java, Chapter
2 Minimum Spanning Tree Given. Undirected graph G with positive edge weights (connected). Goal. Find a min weight set of edges that connects all of the vertices G 2
3 Minimum Spanning Tree Given. Undirected graph G with positive edge weights (connected). Goal. Find a min weight set of edges that connects all of the vertices weight(t) = 50 = Brute force: Try all possible spanning trees problem 1: not so easy to implement problem 2: far too many of them Ex: [Cayley, 1889]: V V-2 spanning trees on the complete graph on V vertices. 3
4 MST Origin Otakar Boruvka (1926). Electrical Power Company of Western Moravia in Brno. Most economical construction of electrical power network. Concrete engineering problem is now a cornerstone problem-solving model in combinatorial optimization. Otakar Boruvka 4
5 Applications MST is fundamental problem with diverse applications. Network design. telephone, electrical, hydraulic, TV cable, computer, road Approximation algorithms for NP-hard problems. traveling salesperson problem, Steiner tree Indirect applications. max bottleneck paths LDPC codes for error correction image registration with Renyi entropy learning salient features for real-time face verification reducing data storage in sequencing amino acids in a protein model locality of particle interactions in turbulent fluid flows autoconfig protocol for Ethernet bridging to avoid cycles in a network Cluster analysis. 5
6 Medical Image Processing MST describes arrangement of nuclei in the epithelium for cancer research 6
7 7
8 Two Greedy Algorithms Kruskal's algorithm. Consider edges in ascending order of cost. Add the next edge to T unless doing so would create a cycle. Prim's algorithm. Start with any vertex s and greedily grow a tree T from s. At each step, add the cheapest edge to T that has exactly one endpoint in T. Proposition. Both greedy algorithms compute an MST. Greed is good. Greed is right. Greed works. Greed clarifies, cuts through, and captures the essence of the evolutionary spirit." - Gordon Gecko 8
9 weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced topics 9
10 Weighted Graph API public class WeightedGraph void Iterable<Edge> int String WeightedGraph(int V) insert(edge e) adj(int v) V() tostring() create an empty graph with V vertices insert edge e return an iterator over edges incident to v return the number of vertices return a string representation iterate through all edges (once in each direction) 10
11 Weighted graph data type Identical to Graph.java but use Edge adjacency sets instead of int. public class WeightedGraph { private int V; private SET<Edge>[] adj; } public Graph(int V) { this.v = V; adj = (SET<Edge>[]) new SET[V]; for (int v = 0; v < V; v++) adj[v] = new SET<Edge>(); } public void addedge(edge e) { int v = e.v, w = e.w; adj[v].add(e); adj[w].add(e); } public Iterable<Edge> adj(int v) { return adj[v]; } 11
12 Weighted edge data type public class Edge implements Comparable<Edge> { private final int v, int w; private final double weight; Edge abstraction needed for weights public Edge(int v, int w, double weight) { this.v = v; this.w = w; this.weight = weight; } public int either() { return v; } public int other(int vertex) { if (vertex == v) return w; else return v; } public int weight() { return weight; } // See next slide for edge compare methods. slightly tricky accessor methods (enables client code like this) for (int v = 0; v < G.V(); v++) { for (Edge e : G.adj(v)) { int w = e.other(v); } } // edge v-w } 12
13 Weighted edge data type: compare methods Two different compare methods for edges compareto() so that edges are Comparable (for use in SET) compare() so that clients can compare edges by weight. public final static Comparator<Edge> BY_WEIGHT = new ByWeightComparator(); private static class ByWeightComparator implements Comparator<Edge> { public int compare(edge e, Edge f) { if (e.weight < f.weight) return -1; if (e.weight > f.weight) return +1; return 0; } } } public int compareto(edge that) { if (this.weight < that.weight) return -1; else if (this.weight > that.weight) return +1; else if (this.weight > that.weight) return 0; } 13
14 weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced topics 14
15 Spanning Tree MST. Given connected graph G with positive edge weights, find a min weight set of edges that connects all of the vertices. Def. A spanning tree of a graph G is a subgraph T that is connected and acyclic. Property. MST of G is always a spanning tree. 15
16 Greedy Algorithms Simplifying assumption. All edge weights w e are distinct. Cycle property. Let C be any cycle, and let f be the max cost edge belonging to C. Then the MST does not contain f. Cut property. Let S be any subset of vertices, and let e be the min cost edge with exactly one endpoint in S. Then the MST contains e. f C S e f is not in the MST e is in the MST 16
17 Cycle Property Simplifying assumption. All edge weights w e are distinct. Cycle property. Let C be any cycle, and let f be the max cost edge belonging to C. Then the MST T* does not contain f. Pf. [by contradiction] Suppose f belongs to T*. Let's see what happens. Deleting f from T* disconnects T*. Let S be one side of the cut. Some other edge in C, say e, has exactly one endpoint in S. T = T* { e } { f } is also a spanning tree. Since c e < c f, cost(t) < cost(t*). Contradicts minimality of T*. f C S e T* 17
18 Cut Property Simplifying assumption. All edge costs c e are distinct. Cut property. Let S be any subset of vertices, and let e be the min cost edge with exactly one endpoint in S. Then the MST T* contains e. Pf. [by contradiction] Suppose e does not belong to T*. Let's see what happens. Adding e to T* creates a (unique) cycle C in T*. T = T* { e } { f } is also a spanning tree. Some other edge in C, say f, has exactly one endpoint in S. Since c e < c f, cost(t) < cost(t*). Contradicts minimality of T*. f cycle C S e MST T* 18
19 weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced algorithms clustering 19
20 Kruskal's Algorithm: Example Kruskal's algorithm. [Kruskal, 1956] Consider edges in ascending order of cost. Add the next edge to T unless doing so would create a cycle
21 Kruskal's algorithm example 25% 75% 50% 100% 21
22 Kruskal's algorithm correctness proof Proposition. Kruskal's algorithm computes the MST. Pf. [case 1] Suppose that adding e to T creates a cycle C e is not in the MST (cycle property) e is the max weight edge in C (weights come in increasing order) v e C w 22
23 Kruskal's algorithm correctness proof Proposition. Kruskal's algorithm computes the MST. Pf. [case 2] Suppose that adding e = (v, w) to T does not create a cycle let S be the vertices in v s connected component w is not in S e is the min weight edge with exactly one endpoint in S e is in the MST (cut property) w e S v 23
24 Kruskal's algorithm implementation Q. How to check if adding an edge to T would create a cycle? A1. Naïve solution: use DFS. O(V) time per cycle check. O(E V) time overall. 24
25 Kruskal's algorithm implementation Q. How to check if adding an edge to T would create a cycle? A2. Use the union-find data structure from lecture 1 (!). Maintain a set for each connected component. To add v-w to T, merge sets containing v and w. If v and w are in same component, then adding v-w creates a cycle. w v w v Case 1: adding v-w creates a cycle Case 2: add v-w to T and merge sets 25
26 Kruskal's algorithm: Java implementation public class Kruskal { private SET<Edge> mst = new SET<Edge>(); public Kruskal(WeightedGraph G) { Edge[] edges = G.edges(); Arrays.sort(edges, Edge.BY_WEIGHT); UnionFind uf = new UnionFind(G.V()); for (Edge e: edges) if (!uf.find(e.either(), e.other())) { uf.unite(e.either(), e.other()); mst.add(edge); } sort edges by weight greedily add edges to MST } } public Iterable<Edge> mst() { return mst; } return to client iterable sequence of edges Easy speedup: Stop as soon as there are V-1 edges in MST. 26
27 Kruskal's algorithm running time Kruskal running time: Dominated by the cost of the sort. Operation sort union find Frequency 1 V E Time per op E log E log* V log* V amortized bound using weighted quick union with path compression recall: log* V 5 in this universe Remark 1. If edges are already sorted, time is proportional to E log* V Remark 2. Linear in practice with PQ or quicksort partitioning (see book: don t need full sort) 27
28 weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced topics 28
29 Prim's algorithm example Prim's algorithm. [Jarník 1930, Dijkstra 1957, Prim 1959] Start with vertex 0 and greedily grow tree T. At each step, add cheapest edge that has exactly one endpoint in T
30 Prim's Algorithm example 25% 75% 50% 100% 30
31 Prim's algorithm correctness proof Proposition. Prim's algorithm computes the MST. Pf. Let S be the subset of vertices in current tree T. Prim adds the cheapest edge e with exactly one endpoint in S. e is in the MST (cut property) S e 31
32 Prim's algorithm implementation Q. How to find cheapest edge with exactly one endpoint in S? A1. Brute force: try all edges. O(E V) time overall. O(E) time per spanning tree edge. 32
33 Prim's algorithm implementation Q. How to find cheapest edge with exactly one endpoint in S? A2. Maintain a priority queue of vertices connected by an edge to S Delete min to determine next vertex v to add to S. Disregard v if already in S. Add to PQ any vertex brought closer to S by v. Running time. log V steps per edge (using a binary heap). E log V steps overall. Note: This is a lazy version of implementation in Algs in Java lazy: put all adjacent vertices (that are not already in MST) on PQ eager: first check whether vertex is already on PQ and decrease its key 33
34 Key-value priority queue Associate a value with each key in a priority queue. API: public class MinPQplus<Key extends Comparable<Key>, Value> MinPQplus() create a key-value priority queue void put(key key, Value val) put key-value pair into the priority queue Value delmin() return value paired with minimal key Key min() return minimal key Implementation: start with same code as standard heap-based priority queue use a parallel array vals[] (value associated with keys[i] is vals[i]) modify exch() to maintain parallel arrays (do exch in vals[]) modify delmin() to return Value add min() (just returns keys[1]) 34
35 Lazy implementation of Prim's algorithm public class LazyPrim { Edge[] pred = new Edge[G.V()]; public LazyPrim(WeightedGraph G) { boolean[] marked = new boolean[g.v()]; double[] dist = new double[g.v()]; MinPQplus<Double, Integer> pq; pq = new MinPQplus<Double, Integer>(); dist[s] = 0.0; marked[s] = true; pq.put(dist[s], s); while (!pq.isempty()) { int v = pq.delmin(); if (marked[v]) continue; marked(v) = true; for (Edge e : G.adj(v)) { int w = e.other(v); if (!done[w] && (dist[w] > e.weight())) { dist[w] = e.weight(); pred[w] = e; pq.insert(dist[w], w); } } } } } pred[v] is edge attaching v to MST marks vertices in MST distance to MST key-value PQ get next vertex ignore if already in MST add to PQ any vertices brought closer to S by v 35
36 Prim's algorithm (lazy) example Priority queue key is distance (edge weight); value is vertex Lazy version leaves obsolete entries in the PQ therefore may have multiple entries with same value red: pq value (vertex) blue: obsolete value 36
37 Eager implementation of Prim s algorithm Use indexed priority queue that supports contains: is there a key associated with value v in the priority queue? decrease key: decrease the key associated with value v [more complicated data structure, see text] Putative benefit : reduces PQ size guarantee from E to V PQ size is far smaller in practice not important for the huge sparse graphs found in practice widely used, but practical utility is debatable 37
38 Removing the distinct edge costs assumption Simplifying assumption. All edge weights w e are distinct. Fact. Prim and Kruskal don't actually rely on the assumption (our proof of correctness does) Suffices to introduce tie-breaking rule for compare(). Approach 1: public int compare(edge e, Edge f) { if (e.weight < f.weight) return -1; if (e.weight > f.weight) return +1; if (e.v < f.v) return -1; if (e.v > f.v) return +1; if (e.w < f.w) return -1; if (e.w > f.w) return +1; return 0; } Approach 2: add tiny random perturbation. 38
39 weighted graph API cycles and cuts Kruskal s algorithm Prim s algorithm advanced topics 39
40 Advanced MST theorems: does an algorithm with a linear-time guarantee exist? Year Worst Case E log log V E log log V E log* V, E + V log V E log (log* V) E (V) log (V) E (V) Discovered By Yao Cheriton-Tarjan Fredman-Tarjan Gabow-Galil-Spencer-Tarjan Chazelle Chazelle xx optimal Pettie-Ramachandran E??? deterministic comparison based MST algorithms Year Problem Time Discovered By 1976 Planar MST E Cheriton-Tarjan 1992 MST Verification E 1995 Randomized MST E Dixon-Rauch-Tarjan Karger-Klein-Tarjan related problems 40
41 Euclidean MST Euclidean MST. Given N points in the plane, find MST connecting them. Distances between point pairs are Euclidean distances. Brute force. Compute N 2 / 2 distances and run Prim's algorithm. Ingenuity. Exploit geometry and do it in O(N log N) [stay tuned for geometric algorithms] 41
42 Scientific application: clustering k-clustering. Divide a set of objects classify into k coherent groups. distance function. numeric value specifying "closeness" of two objects. Fundamental problem. Divide into clusters so that points in different clusters are far apart. Applications. Routing in mobile ad hoc networks. Identify patterns in gene expression. Document categorization for web search. Outbreak of cholera deaths in London in 1850s. Reference: Nina Mishra, HP Labs Similarity searching in medical image databases Skycat: cluster 10 9 sky objects into stars, quasars, galaxies. 42
43 k-clustering of maximum spacing k-clustering. Divide a set of objects classify into k coherent groups. distance function. Numeric value specifying "closeness" of two objects. Spacing. Min distance between any pair of points in different clusters. k-clustering of maximum spacing. Given an integer k, find a k-clustering such that spacing is maximized. spacing k = 4 43
44 Single-link clustering algorithm Well-known algorithm for single-link clustering: Form V clusters of one object each. Find the closest pair of objects such that each object is in a different cluster, and add an edge between them. Repeat until there are exactly k clusters. Observation. This procedure is precisely Kruskal's algorithm (stop when there are k connected components). Property. Kruskal s algorithm finds a k-clustering of maximum spacing. 44
45 Clustering application: dendrograms Dendrogram. Scientific visualization of hypothetical sequence of evolutionary events. Leaves = genes. Internal nodes = hypothetical ancestors. Reference: 45
46 Dendrogram of cancers in human Tumors in similar tissues cluster together. Gene 1 Gene n Reference: Botstein & Brown group gene expressed gene not expressed 46
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
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
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
! 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
Union-Find Algorithms. network connectivity quick find quick union improvements applications
Union-Find Algorithms network connectivity quick find quick union improvements applications 1 Subtext of today s lecture (and this course) Steps to developing a usable algorithm. Define the problem. Find
! 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
CIS 700: algorithms for Big Data
CIS 700: algorithms for Big Data Lecture 6: Graph Sketching Slides at http://grigory.us/big-data-class.html Grigory Yaroslavtsev http://grigory.us Sketching Graphs? We know how to sketch vectors: v Mv
Chapter 11. 11.1 Load Balancing. Approximation Algorithms. Load Balancing. Load Balancing on 2 Machines. Load Balancing: Greedy Scheduling
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
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
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
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
Distributed Computing over Communication Networks: Maximal Independent Set
Distributed Computing over Communication Networks: Maximal Independent Set What is a MIS? MIS An independent set (IS) of an undirected graph is a subset U of nodes such that no two nodes in U are adjacent.
Binary Heap Algorithms
CS Data Structures and Algorithms Lecture Slides Wednesday, April 5, 2009 Glenn G. Chappell Department of Computer Science University of Alaska Fairbanks [email protected] 2005 2009 Glenn G. Chappell
Analysis of Algorithms, I
Analysis of Algorithms, I CSOR W4231.002 Eleni Drinea Computer Science Department Columbia University Thursday, February 26, 2015 Outline 1 Recap 2 Representing graphs 3 Breadth-first search (BFS) 4 Applications
Data Structures and Algorithms Written Examination
Data Structures and Algorithms Written Examination 22 February 2013 FIRST NAME STUDENT NUMBER LAST NAME SIGNATURE Instructions for students: Write First Name, Last Name, Student Number and Signature where
Directed Graphs. digraph search transitive closure topological sort strong components. References: Algorithms in Java, Chapter 19
Directed Graphs digraph search transitive closure topological sort strong components References: Algorithms in Java, Chapter 19 http://www.cs.princeton.edu/introalgsds/52directed 1 Directed graphs (digraphs)
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;
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
Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li. Advised by: Dave Mount. May 22, 2014
Euclidean Minimum Spanning Trees Based on Well Separated Pair Decompositions Chaojun Li Advised by: Dave Mount May 22, 2014 1 INTRODUCTION In this report we consider the implementation of an efficient
http://algs4.cs.princeton.edu dictionary find definition word definition book index find relevant pages term list of page numbers
ROBERT SEDGEWICK KEVI WAYE F O U R T H E D I T I O ROBERT SEDGEWICK KEVI WAYE ROBERT SEDGEWICK KEVI WAYE Symbol tables Symbol table applications Key-value pair abstraction. Insert a value with specified.
Protein Protein Interaction Networks
Functional Pattern Mining from Genome Scale Protein Protein Interaction Networks Young-Rae Cho, Ph.D. Assistant Professor Department of Computer Science Baylor University it My Definition of Bioinformatics
Data Structures Fibonacci Heaps, Amortized Analysis
Chapter 4 Data Structures Fibonacci Heaps, Amortized Analysis Algorithm Theory WS 2012/13 Fabian Kuhn Fibonacci Heaps Lacy merge variant of binomial heaps: Do not merge trees as long as possible Structure:
Sorting revisited. Build the binary search tree: O(n^2) Traverse the binary tree: O(n) Total: O(n^2) + O(n) = O(n^2)
Sorting revisited How did we use a binary search tree to sort an array of elements? Tree Sort Algorithm Given: An array of elements to sort 1. Build a binary search tree out of the elements 2. Traverse
CS711008Z Algorithm Design and Analysis
CS711008Z Algorithm Design and Analysis Lecture 7 Binary heap, binomial heap, and Fibonacci heap 1 Dongbo Bu Institute of Computing Technology Chinese Academy of Sciences, Beijing, China 1 The slides were
Dynamic programming. Doctoral course Optimization on graphs - Lecture 4.1. Giovanni Righini. January 17 th, 2013
Dynamic programming Doctoral course Optimization on graphs - Lecture.1 Giovanni Righini January 1 th, 201 Implicit enumeration Combinatorial optimization problems are in general NP-hard and we usually
SIMS 255 Foundations of Software Design. Complexity and NP-completeness
SIMS 255 Foundations of Software Design Complexity and NP-completeness Matt Welsh November 29, 2001 [email protected] 1 Outline Complexity of algorithms Space and time complexity ``Big O'' notation Complexity
CSC2420 Fall 2012: Algorithm Design, Analysis and Theory
CSC2420 Fall 2012: Algorithm Design, Analysis and Theory Allan Borodin November 15, 2012; Lecture 10 1 / 27 Randomized online bipartite matching and the adwords problem. We briefly return to online algorithms
Solutions to Homework 6
Solutions to Homework 6 Debasish Das EECS Department, Northwestern University [email protected] 1 Problem 5.24 We want to find light spanning trees with certain special properties. Given is one example
Binary Heaps * * * * * * * / / \ / \ / \ / \ / \ * * * * * * * * * * * / / \ / \ / / \ / \ * * * * * * * * * *
Binary Heaps A binary heap is another data structure. It implements a priority queue. Priority Queue has the following operations: isempty add (with priority) remove (highest priority) peek (at highest
GRAPH THEORY LECTURE 4: TREES
GRAPH THEORY LECTURE 4: TREES Abstract. 3.1 presents some standard characterizations and properties of trees. 3.2 presents several different types of trees. 3.7 develops a counting method based on a bijection
cs2010: algorithms and data structures
cs2010: algorithms and data structures Lecture 11: Symbol Table ADT. Vasileios Koutavas 28 Oct 2015 School of Computer Science and Statistics Trinity College Dublin Algorithms ROBERT SEDGEWICK KEVIN WAYNE
UPPER BOUNDS ON THE L(2, 1)-LABELING NUMBER OF GRAPHS WITH MAXIMUM DEGREE
UPPER BOUNDS ON THE L(2, 1)-LABELING NUMBER OF GRAPHS WITH MAXIMUM DEGREE ANDREW LUM ADVISOR: DAVID GUICHARD ABSTRACT. L(2,1)-labeling was first defined by Jerrold Griggs [Gr, 1992] as a way to use graphs
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
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 [email protected],
SCAN: A Structural Clustering Algorithm for Networks
SCAN: A Structural Clustering Algorithm for Networks Xiaowei Xu, Nurcan Yuruk, Zhidan Feng (University of Arkansas at Little Rock) Thomas A. J. Schweiger (Acxiom Corporation) Networks scaling: #edges connected
Finding and counting given length cycles
Finding and counting given length cycles Noga Alon Raphael Yuster Uri Zwick Abstract We present an assortment of methods for finding and counting simple cycles of a given length in directed and undirected
Network Algorithms for Homeland Security
Network Algorithms for Homeland Security Mark Goldberg and Malik Magdon-Ismail Rensselaer Polytechnic Institute September 27, 2004. Collaborators J. Baumes, M. Krishmamoorthy, N. Preston, W. Wallace. Partially
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].
ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN. Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015
ONLINE DEGREE-BOUNDED STEINER NETWORK DESIGN Sina Dehghani Saeed Seddighin Ali Shafahi Fall 2015 ONLINE STEINER FOREST PROBLEM An initially given graph G. s 1 s 2 A sequence of demands (s i, t i ) arriving
B AB 5 C AC 3 D ABGED 9 E ABGE 7 F ABGEF 8 G ABG 6 A BEDA 3 C BC 1 D BCD 2 E BE 1 F BEF 2 G BG 1
p.9 9.5 a. Find the shortest path from A to all other vertices for the graph in Figure 9.8. b. Find the shortest unweighted path from B to all other vertices for the graph in Figure 9.8. A 5 B C 7 7 6
Graphical degree sequences and realizations
swap Graphical and realizations Péter L. Erdös Alfréd Rényi Institute of Mathematics Hungarian Academy of Sciences MAPCON 12 MPIPKS - Dresden, May 15, 2012 swap Graphical and realizations Péter L. Erdös
CMPSCI611: Approximating MAX-CUT Lecture 20
CMPSCI611: Approximating MAX-CUT Lecture 20 For the next two lectures we ll be seeing examples of approximation algorithms for interesting NP-hard problems. Today we consider MAX-CUT, which we proved to
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
arxiv:1412.2333v1 [cs.dc] 7 Dec 2014
Minimum-weight Spanning Tree Construction in O(log log log n) Rounds on the Congested Clique Sriram V. Pemmaraju Vivek B. Sardeshmukh Department of Computer Science, The University of Iowa, Iowa City,
Part 2: Community Detection
Chapter 8: Graph Data Part 2: Community Detection Based on Leskovec, Rajaraman, Ullman 2014: Mining of Massive Datasets Big Data Management and Analytics Outline Community Detection - Social networks -
MATHEMATICS Unit Decision 1
General Certificate of Education January 2008 Advanced Subsidiary Examination MATHEMATICS Unit Decision 1 MD01 Tuesday 15 January 2008 9.00 am to 10.30 am For this paper you must have: an 8-page answer
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
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,
Home Page. Data Structures. Title Page. Page 1 of 24. Go Back. Full Screen. Close. Quit
Data Structures Page 1 of 24 A.1. Arrays (Vectors) n-element vector start address + ielementsize 0 +1 +2 +3 +4... +n-1 start address continuous memory block static, if size is known at compile time dynamic,
THE PROBLEM WORMS (1) WORMS (2) THE PROBLEM OF WORM PROPAGATION/PREVENTION THE MINIMUM VERTEX COVER PROBLEM
1 THE PROBLEM OF WORM PROPAGATION/PREVENTION I.E. THE MINIMUM VERTEX COVER PROBLEM Prof. Tiziana Calamoneri Network Algorithms A.y. 2014/15 2 THE PROBLEM WORMS (1)! A computer worm is a standalone malware
11. APPROXIMATION ALGORITHMS
11. APPROXIMATION ALGORITHMS load balancing center selection pricing method: vertex cover LP rounding: vertex cover generalized load balancing knapsack problem Lecture slides by Kevin Wayne Copyright 2005
Chapter 6: Graph Theory
Chapter 6: Graph Theory Graph theory deals with routing and network problems and if it is possible to find a best route, whether that means the least expensive, least amount of time or the least distance.
5.4 Closest Pair of Points
5.4 Closest Pair of Points Closest Pair of Points Closest pair. Given n points in the plane, find a pair with smallest Euclidean distance between them. Fundamental geometric primitive. Graphics, computer
1 Definitions. Supplementary Material for: Digraphs. Concept graphs
Supplementary Material for: van Rooij, I., Evans, P., Müller, M., Gedge, J. & Wareham, T. (2008). Identifying Sources of Intractability in Cognitive Models: An Illustration using Analogical Structure Mapping.
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
Page 1. CSCE 310J Data Structures & Algorithms. CSCE 310J Data Structures & Algorithms. P, NP, and NP-Complete. Polynomial-Time Algorithms
CSCE 310J Data Structures & Algorithms P, NP, and NP-Complete Dr. Steve Goddard [email protected] CSCE 310J Data Structures & Algorithms Giving credit where credit is due:» Most of the lecture notes
Social Media Mining. Data Mining Essentials
Introduction Data production rate has been increased dramatically (Big Data) and we are able store much more data than before E.g., purchase data, social media data, mobile phone data Businesses and customers
Simplified External memory Algorithms for Planar DAGs. July 2004
Simplified External Memory Algorithms for Planar DAGs Lars Arge Duke University Laura Toma Bowdoin College July 2004 Graph Problems Graph G = (V, E) with V vertices and E edges DAG: directed acyclic graph
API for java.util.iterator. ! hasnext() Are there more items in the list? ! next() Return the next item in the list.
Sequences and Urns 2.7 Lists and Iterators Sequence. Ordered collection of items. Key operations. Insert an item, iterate over the items. Design challenge. Support iteration by client, without revealing
CompSci-61B, Data Structures Final Exam
Your Name: CompSci-61B, Data Structures Final Exam Your 8-digit Student ID: Your CS61B Class Account Login: This is a final test for mastery of the material covered in our labs, lectures, and readings.
International Journal of Software and Web Sciences (IJSWS) www.iasir.net
International Association of Scientific Innovation and Research (IASIR) (An Association Unifying the Sciences, Engineering, and Applied Research) ISSN (Print): 2279-0063 ISSN (Online): 2279-0071 International
Graph Theory and Complex Networks: An Introduction. Chapter 06: Network analysis
Graph Theory and Complex Networks: An Introduction Maarten van Steen VU Amsterdam, Dept. Computer Science Room R4.0, [email protected] Chapter 06: Network analysis Version: April 8, 04 / 3 Contents Chapter
Max Flow, Min Cut, and Matchings (Solution)
Max Flow, Min Cut, and Matchings (Solution) 1. The figure below shows a flow network on which an s-t flow is shown. The capacity of each edge appears as a label next to the edge, and the numbers in boxes
Tables so far. set() get() delete() BST Average O(lg n) O(lg n) O(lg n) Worst O(n) O(n) O(n) RB Tree Average O(lg n) O(lg n) O(lg n)
Hash Tables Tables so far set() get() delete() BST Average O(lg n) O(lg n) O(lg n) Worst O(n) O(n) O(n) RB Tree Average O(lg n) O(lg n) O(lg n) Worst O(lg n) O(lg n) O(lg n) Table naïve array implementation
All trees contain a large induced subgraph having all degrees 1 (mod k)
All trees contain a large induced subgraph having all degrees 1 (mod k) David M. Berman, A.J. Radcliffe, A.D. Scott, Hong Wang, and Larry Wargo *Department of Mathematics University of New Orleans New
Persistent Data Structures and Planar Point Location
Persistent Data Structures and Planar Point Location Inge Li Gørtz Persistent Data Structures Ephemeral Partial persistence Full persistence Confluent persistence V1 V1 V1 V1 V2 q ue V2 V2 V5 V2 V4 V4
Cpt S 223. School of EECS, WSU
The Shortest Path Problem 1 Shortest-Path Algorithms Find the shortest path from point A to point B Shortest in time, distance, cost, Numerous applications Map navigation Flight itineraries Circuit wiring
Efficiency of algorithms. Algorithms. Efficiency of algorithms. Binary search and linear search. Best, worst and average case.
Algorithms Efficiency of algorithms Computational resources: time and space Best, worst and average case performance How to compare algorithms: machine-independent measure of efficiency Growth rate Complexity
Algorithms. Algorithms GEOMETRIC APPLICATIONS OF BSTS. 1d range search line segment intersection kd trees interval search trees rectangle intersection
Algorithms ROBERT SEDGEWICK KEVIN WAYNE GEOMETRIC APPLICATIONS OF BSTS Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE 1d range search line segment intersection kd trees interval search
Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design
Bicolored Shortest Paths in Graphs with Applications to Network Overlay Design Hongsik Choi and Hyeong-Ah Choi Department of Electrical Engineering and Computer Science George Washington University Washington,
Small Maximal Independent Sets and Faster Exact Graph Coloring
Small Maximal Independent Sets and Faster Exact Graph Coloring David Eppstein Univ. of California, Irvine Dept. of Information and Computer Science The Exact Graph Coloring Problem: Given an undirected
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
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 [email protected], [email protected] Abstract In this paper we
Cost Model: Work, Span and Parallelism. 1 The RAM model for sequential computation:
CSE341T 08/31/2015 Lecture 3 Cost Model: Work, Span and Parallelism In this lecture, we will look at how one analyze a parallel program written using Cilk Plus. When we analyze the cost of an algorithm
Outline 2.1 Graph Isomorphism 2.2 Automorphisms and Symmetry 2.3 Subgraphs, part 1
GRAPH THEORY LECTURE STRUCTURE AND REPRESENTATION PART A Abstract. Chapter focuses on the question of when two graphs are to be regarded as the same, on symmetries, and on subgraphs.. discusses the concept
Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs
Discrete Mathematics & Mathematical Reasoning Chapter 10: Graphs Kousha Etessami U. of Edinburgh, UK Kousha Etessami (U. of Edinburgh, UK) Discrete Mathematics (Chapter 6) 1 / 13 Overview Graphs and Graph
On the independence number of graphs with maximum degree 3
On the independence number of graphs with maximum degree 3 Iyad A. Kanj Fenghui Zhang Abstract Let G be an undirected graph with maximum degree at most 3 such that G does not contain any of the three graphs
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
8.1 Min Degree Spanning Tree
CS880: Approximations Algorithms Scribe: Siddharth Barman Lecturer: Shuchi Chawla Topic: Min Degree Spanning Tree Date: 02/15/07 In this lecture we give a local search based algorithm for the Min Degree
136 CHAPTER 4. INDUCTION, GRAPHS AND TREES
136 TER 4. INDUCTION, GRHS ND TREES 4.3 Graphs In this chapter we introduce a fundamental structural idea of discrete mathematics, that of a graph. Many situations in the applications of discrete mathematics
Guessing Game: NP-Complete?
Guessing Game: NP-Complete? 1. LONGEST-PATH: Given a graph G = (V, E), does there exists a simple path of length at least k edges? YES 2. SHORTEST-PATH: Given a graph G = (V, E), does there exists a simple
Binary Search Trees. A Generic Tree. Binary Trees. Nodes in a binary search tree ( B-S-T) are of the form. P parent. Key. Satellite data L R
Binary Search Trees A Generic Tree Nodes in a binary search tree ( B-S-T) are of the form P parent Key A Satellite data L R B C D E F G H I J The B-S-T has a root node which is the only node whose parent
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
5. A full binary tree with n leaves contains [A] n nodes. [B] log n 2 nodes. [C] 2n 1 nodes. [D] n 2 nodes.
1. The advantage of.. is that they solve the problem if sequential storage representation. But disadvantage in that is they are sequential lists. [A] Lists [B] Linked Lists [A] Trees [A] Queues 2. The
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 }
A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called heap-order property
CmSc 250 Intro to Algorithms Chapter 6. Transform and Conquer Binary Heaps 1. Definition A binary heap is a complete binary tree, where each node has a higher priority than its children. This is called
Questions 1 through 25 are worth 2 points each. Choose one best answer for each.
Questions 1 through 25 are worth 2 points each. Choose one best answer for each. 1. For the singly linked list implementation of the queue, where are the enqueues and dequeues performed? c a. Enqueue in
MapReduce and Distributed Data Analysis. Sergei Vassilvitskii Google Research
MapReduce and Distributed Data Analysis Google Research 1 Dealing With Massive Data 2 2 Dealing With Massive Data Polynomial Memory Sublinear RAM Sketches External Memory Property Testing 3 3 Dealing With
On Integer Additive Set-Indexers of Graphs
On Integer Additive Set-Indexers of Graphs arxiv:1312.7672v4 [math.co] 2 Mar 2014 N K Sudev and K A Germina Abstract A set-indexer of a graph G is an injective set-valued function f : V (G) 2 X such that
CSC 373: Algorithm Design and Analysis Lecture 16
CSC 373: Algorithm Design and Analysis Lecture 16 Allan Borodin February 25, 2013 Some materials are from Stephen Cook s IIT talk and Keven Wayne s slides. 1 / 17 Announcements and Outline Announcements
Load Balancing. Load Balancing 1 / 24
Load Balancing Backtracking, branch & bound and alpha-beta pruning: how to assign work to idle processes without much communication? Additionally for alpha-beta pruning: implementing the young-brothers-wait
AI: A Modern Approach, Chpts. 3-4 Russell and Norvig
AI: A Modern Approach, Chpts. 3-4 Russell and Norvig Sequential Decision Making in Robotics CS 599 Geoffrey Hollinger and Gaurav Sukhatme (Some slide content from Stuart Russell and HweeTou Ng) Spring,
A Fast Algorithm For Finding Hamilton Cycles
A Fast Algorithm For Finding Hamilton Cycles by Andrew Chalaturnyk A thesis presented to the University of Manitoba in partial fulfillment of the requirements for the degree of Masters of Science in Computer
COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH. 1. Introduction
COMBINATORIAL PROPERTIES OF THE HIGMAN-SIMS GRAPH ZACHARY ABEL 1. Introduction In this survey we discuss properties of the Higman-Sims graph, which has 100 vertices, 1100 edges, and is 22 regular. In fact
V. Adamchik 1. Graph Theory. Victor Adamchik. Fall of 2005
V. Adamchik 1 Graph Theory Victor Adamchik Fall of 2005 Plan 1. Basic Vocabulary 2. Regular graph 3. Connectivity 4. Representing Graphs Introduction A.Aho and J.Ulman acknowledge that Fundamentally, computer
Link Prediction in Social Networks
CS378 Data Mining Final Project Report Dustin Ho : dsh544 Eric Shrewsberry : eas2389 Link Prediction in Social Networks 1. Introduction Social networks are becoming increasingly more prevalent in the daily
Chapter 20: Data Analysis
Chapter 20: Data Analysis Database System Concepts, 6 th Ed. See www.db-book.com for conditions on re-use Chapter 20: Data Analysis Decision Support Systems Data Warehousing Data Mining Classification
