1.5 Case Study. dynamic connectivity quick find quick union improvements applications

Size: px
Start display at page:

Download "1.5 Case Study. dynamic connectivity quick find quick union improvements applications"

Transcription

1 . Case Study dynamic connectivity quick find quick union imrovements alications Subtext of today s lecture (and this course) Stes to develoing a usable algorithm. Model the roblem. Find an algorithm to solve it. Fast enough? Fits in memory? If not, figure out why. Find a way to address the roblem. Iterate until satisfied. The scientific method. Mathematical analysis. Algorithms in Java, th Edition Robert Sedgewick and Kevin Wayne Coyright 9 January, :: AM Dynamic connectivity Given a set of objects Union: connect two objects. Find: is there a ath connecting the two objects? more difficult roblem: find the ath union(, ) dynamic connectivity quick find quick union imrovements alications union(, ) union(, ) union(, 6) find(, ) find(, ) union(, ) union(, ) union(, 6) no yes 6 union(, ) find(, ) yes find(, ) yes

2 Network connectivity: larger examle Modeling the objects Q. Is there a ath from to q? Dynamic connectivity alications involve maniulating objects of all tyes. Variable name aliases. Pixels in a digital hoto. Comuters in a network. Web ages on the Internet. Transistors in a comuter chi. Metallic sites in a comosite system. q When rogramming, convenient to name objects to N-. Use integers as array index. Suress details not relevant to union-find. can use symbol table to translate from object names to integers (stay tuned) A. Yes. but finding the ath is more difficult: stay tuned (Chater ) 6 Modeling the connections Imlementing the oerations Transitivity. If is connected to q and q is connected to r, then is connected to r. Connected comonents. Maximal set of objects that are mutually connected. Find query. Check if two objects are in the same set. Union command. Relace sets containing two objects with their union. 6 6 union(, ) connected comonents connected comonents

3 Union-find data tye (API) Goal. Design efficient data structure for union-find. Number of objects N can be huge. Number of oerations M can be huge. Find queries and union commands may be intermixed. ublic class UnionFind UnionFind(int N) create union-find data structure with N objects and no connections boolean find(int, int q) are and q in the same set? void union(int, int q) relace sets containing and q with their union dynamic connectivity quick find quick union imrovements alications 9 Quick-find [eager aroach] Quick-find [eager aroach] Data structure. Integer array id[] of size N. Interretation: and q are connected if they have the same id. Data structure. Integer array id[] of size N. Interretation: and q are connected if they have the same id. i 6 9 id[i] and 6 are connected,,, and 9 are connected i 6 9 id[i] and 6 are connected,,, and 9 are connected Find. Check if and q have the same id. id[] = 9; id[6] = 6 and 6 not connected 6 9

4 Quick-find [eager aroach] Quick-find examle Data structure. Integer array id[] of size N. Interretation: and q are connected if they have the same id. i 6 9 id[i] and 6 are connected,,, and 9 are connected Find. Check if and q have the same id. id[] = 9; id[6] = 6 and 6 not connected Union. To merge sets containing and q, change all entries with id[] to id[q] i 6 9 id[i] union of and 6,,,, 6, and 9 are connected 6- roblem: many values can change roblem: many values can change Quick-find: Java imlementation Quick-find is too slow ublic class QuickFind rivate int[] id; ublic QuickFind(int N) id = new int[n]; for (int i = ; i < N; i++) id[i] = i; set id of each object to itself (N array accesses) Quick-find defect. Union too exensive (N array accesses). Trees are flat, but too exensive to kee them flat. algorithm union find quick-find N rivate int find(int ) return id[]; ublic boolean find(int, int q) return find() == find(q); ublic void union(int, int q) int id = find(); for (int i = ; i < id.length; i++) if (id[i] == id) id[i] = id[q]; return comonent id for ( array access) check whether and q are in the same comonent change all entries with id[] to id[q] (N array accesses) Ex. Takes N array accesses to rocess sequence of N union commands on N objects. 6

5 Quadratic algorithms do not scale Rough standard (for now). 9 oerations er second. 9 words of main memory. Touch all words in aroximately second. a truism (roughly) since 9! Ex. Huge roblem for quick-find. 9 union commands on 9 objects. Quick-find takes more than oerations. + years of comuter time! Paradoxically, quadratic algorithms get worse with newer equiment. New comuter may be x as fast. But, has x as much memory so roblem may be x bigger. With quadratic algorithm, takes x as long! dynamic connectivity quick find quick union imrovements alications Quick-union [lazy aroach] Quick-union [lazy aroach] Data structure. Integer array id[] of size N. Interretation: id[i] is arent of i. Root of i is id[id[id[...id[i]...]]]. kee going until it doesn t change Data structure. Integer array id[] of size N. Interretation: id[i] is arent of i. Root of i is id[id[id[...id[i]...]]]. kee going until it doesn t change i 6 9 id[i] q i 6 9 id[i] q 's root is 9; 's root is 6 Find. Check if and q have the same root. 's root is 9; 's root is 6 and are not connected 9

6 Quick-union [lazy aroach] Quick-union examle Data structure. Integer array id[] of size N. Interretation: id[i] is arent of i. Root of i is id[id[id[...id[i]...]]]. kee going until it doesn t change i 6 9 id[i] q Find. Check if and q have the same root. Union. To merge sets containing and q, set the id of 's root to the id of q's root. i 6 9 id[i] 's root is 9; 's root is 6 and are not connected 6 q roblem: trees can get tall only one value changes Quick-union: Java imlementation Quick-union is also too slow ublic class QuickUnion rivate int[] id; ublic QuickUnion(int N) id = new int[n]; for (int i = ; i < N; i++) id[i] = i; rivate int find(int i) while (i!= id[i]) i = id[i]; return i; set id of each object to itself (N array accesses) chase arent ointers until reach root (deth of i array accesses) Quick-find defect. Union too exensive (N array accesses). Trees are flat, but too exensive to kee them flat. Quick-union defect. Trees can get tall. Find too exensive (could be N array accesses). ublic boolean find(int, int q) return find() == find(q); check if and q have same root (deth of and q array accesses) algorithm union find quick-find N ublic void union(int, int q) int i = root(), j = root(q); id[i] = j; change root of to oint to root of q (deth of and q array accesses) quick-union N N includes cost of finding root worst case

7 Imrovement : weighting Weighted quick-union. Modify quick-union to avoid tall trees. Kee track of size of each set. Balance by linking small tree below large one. dynamic connectivity quick find quick union imrovements alications Ex. Union of and. Quick union: link 9 to 6. Weighted quick union: link 6 to 9. size 9 6 q 6 Weighted quick-union examle Weighted quick-union: Java imlementation Data structure. Same as quick-union, but maintain extra array sz[i] to count number of objects in the tree rooted at i. Find. Identical to quick-union. return find() == find(q); no roblem: trees stay flat Union. Modify quick-union to: Merge smaller tree into larger tree. Udate the sz[] array. int i = find(); int j = find(q); if (sz[i] < sz[j]) id[i] = j; sz[j] += sz[i]; else id[j] = i; sz[i] += sz[j];

8 Weighted quick-union analysis Weighted quick-union analysis Analysis. Find: takes time roortional to deth of and q. Union: takes constant time, given roots. Proosition. Deth of any node x is at most lg N. Analysis. Find: takes time roortional to deth of and q. Union: takes constant time, given roots. Proosition. Deth of any node x is at most lg N. Pf. When does deth of x increase? Increases by when tree T containing x is merged into another tree T. The size of the tree containing x at least doubles since T! T. Size of tree containing x can double at most lg N times. Why? 6 9 T T N = deth(x) =! lg N x x 9 Weighted quick-union analysis Imrovement : ath comression Analysis. Find: takes time roortional to deth of and q. Union: takes constant time, given roots. Quick union with ath comression. Just after comuting the root of, set the id of each examined node to oint to that root. Proosition. Deth of any node x is at most lg N. algorithm union find 9 6 quick-find N quick-union N N weighted QU lg N lg N 6 includes cost of finding root 9 root(9) Q. Sto at guaranteed accetable erformance? A. No, easy to imrove further.

9 Path comression: Java imlementation Weighted quick-union with ath comression examle Standard imlementation: add second loo to find() to set the id[] of each examined node to the root. Simler one-ass variant: halve the ath length by making every other node in ath oint to its grandarent ublic int find(int i) while (i!= id[i]) id[i] = id[id[i]]; i = id[i]; return i; only one extra line of code! no roblem: trees stay VERY flat In ractice. No reason not to! Kees tree almost comletely flat. 6- WQUPC erformance Summary Proosition. [Tarjan 9] Starting from an emty data structure, any sequence of M union and find os on N objects takes O(N + M lg* N) time. Proof is very difficult. But the algorithm is still simle! actually O(N + M α(m, N)) see COS Bottom line. WQUPC makes it ossible to solve roblems that could not otherwise be addressed. algorithm worst-case time quick-find M N Linear algorithm? Cost within constant factor of reading in the data. In theory, WQUPC is not quite linear. In ractice, WQUPC is linear. because lg* N is a constant in this universe Amazing fact. No linear-time algorithm exists. N lg* N lg* function number of times needed to take the lg of a number until reaching quick-union weighted QU QU + ath comression weighted QU + ath comression M union-find oerations on a set of N objects Ex. [ 9 unions and finds with 9 objects] WQUPC reduces time from years to 6 seconds. Suercomuter won't hel much; good algorithm enables solution. M N N + M log N N + M log N N + M lg* N 6

10 Union-find alications dynamic connectivity quick find quick union imrovements alications Percolation. Games (Go, Hex). Network connectivity. Least common ancestor. Equivalence of finite state automata. Hoshen-Koelman algorithm in hysics. Hinley-Milner olymorhic tye inference. Kruskal's minimum sanning tree algorithm. Comiling equivalence statements in Fortran. Morhological attribute oenings and closings. Matlab's bwlabel() function in image rocessing. Percolation Percolation A model for many hysical systems: N-by-N grid of sites. Each site is oen with robability (or blocked with robability -). System ercolates if to and bottom are connected by oen sites. A model for many hysical systems: N-by-N grid of sites. Each site is oen with robability (or blocked with robability -). System ercolates if to and bottom are connected by oen sites. ercolates blocked site does not ercolate model system vacant site occuied site ercolates N = emty oen site does not ercolate full oen site site connected to to no oen site connected to to electricity material conductor insulated conducts fluid flow material emty blocked orous social interaction oulation erson emty communicates 9

11 Likelihood of ercolation Percolation hase transition Deends on site vacancy robability. When N is large, theory guarantees a shar threshold *. > *: almost certainly ercolates. < *: almost certainly does not ercolate. Q. What is the value of *? low does not ercolate medium ercolates? high ercolates ercolation robability N =.9 * site vacancy robability N = Monte Carlo simulation UF solution to find ercolation threshold Initialize N-by-N whole grid to be blocked. Declare random sites oen until to connected to bottom. Vacancy ercentage estimates *. How to check whether system ercolates? Create an object for each site. Sites are in same set if connected by oen sites. Percolates if any site in to row is in same set as any site in bottom row. brute force algorithm needs to check N airs full oen site (connected to to) emty oen site (not connected to to) blocked site full oen site (connected to to) emty oen site (not connected to to) blocked site N =

12 UF solution to find ercolation threshold UF solution to find ercolation threshold Q. How to declare a new site oen? Q. How to declare a new site oen? A. Take union of new site and all adjacent oen sites. oen this site oen this site full oen site (connected to to) 6 9 full oen site (connected to to) emty oen site (not connected to to) blocked site emty oen site (not connected to to) blocked site N = N = 6 UF solution: a critical otimization UF solution: a critical otimization Q. How to avoid checking all airs of to and bottom sites? Q. How to avoid checking all airs of to and bottom sites? A. Create a virtual to and bottom objects; system ercolates when virtual to and bottom objects are in same set. virtual to row full oen site (connected to to) 6 9 full oen site (connected to to) emty oen site (not connected to to) blocked site emty oen site (not connected to to) blocked site virtual bottom row N = N =

13 Percolation threshold Subtext of today s lecture (and this course) Q. What is ercolation threshold *? A. About.96 for large square lattices. ercolation constant known only via simulation ercolation robability *.9 site vacancy robability Stes to develoing a usable algorithm. Model the roblem. Find an algorithm to solve it. Fast enough? Fits in memory? If not, figure out why. Find a way to address the roblem. Iterate until satisfied. The scientific method. Mathematical analysis. Fast algorithm enables accurate answer to scientific question. 9

Algorithms 1.5 UNION FIND. dynamic connectivity quick find quick union improvements applications

Algorithms 1.5 UNION FIND. dynamic connectivity quick find quick union improvements applications 1.5 UNION FIND Algorithms F O U R T H E D I T I O N dynamic connectivity quick find quick union improvements applications R O B E R T S E D G E W I C K K E V I N W A Y N E Algorithms, 4 th Edition Robert

More information

Algorithms 1.5 UNION FIND. dynamic connectivity quick find quick union improvements applications

Algorithms 1.5 UNION FIND. dynamic connectivity quick find quick union improvements applications 1.5 UNION FIND Algorithms F O U R T H E D I T I O N dynamic connectivity quick find quick union improvements applications R O B E R T S E D G E W I C K K E V I N W A Y N E Algorithms, 4 th Edition Robert

More information

Algorithms. Algorithms 1.5 UNION-FIND. dynamic connectivity quick find quick union improvements applications ROBERT SEDGEWICK KEVIN WAYNE

Algorithms. Algorithms 1.5 UNION-FIND. dynamic connectivity quick find quick union improvements applications ROBERT SEDGEWICK KEVIN WAYNE Algorithms ROBERT SEDGEWICK KEVIN WAYNE 1.5 UNION-FIND Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE dynamic connectivity quick find quick union improvements applications http://algs4.cs.princeton.edu

More information

Union-Find Algorithms. network connectivity quick find quick union improvements applications

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

More information

Union-Find Algorithms

Union-Find Algorithms Union-Find Algorithms Network connectivity Basic abstractions set of objects union command: connect two objects find query: is there a path connecting one object to another? network connectivity quick

More information

ALGORITHMS COS 226, SPRING 2013 AND DATA STRUCTURES JOSH HUG ARVIND NARAYANAN. COS 226 course overview. Why study algorithms? Why study algorithms?

ALGORITHMS COS 226, SPRING 2013 AND DATA STRUCTURES JOSH HUG ARVIND NARAYANAN. COS 226 course overview. Why study algorithms? Why study algorithms? COS 226, SPRING 213 COS 226 course overview What is COS 226? Intermediate-level survey course. Programming and roblem solving, with alications. Algorithm: method for solving a roblem. Data structure: method

More information

Algorithms. Algorithms 1.5 UNION FIND. union find data type quick-find quick-union improvements applications ROBERT SEDGEWICK KEVIN WAYNE

Algorithms. Algorithms 1.5 UNION FIND. union find data type quick-find quick-union improvements applications ROBERT SEDGEWICK KEVIN WAYNE Algorithms ROBERT SEDGEWICK KEVIN WAYNE 1.5 UNION FIND Algorithms F O U R T H E D I T I O N ROBERT SEDGEWICK KEVIN WAYNE union find data type quick-find quick-union improvements applications http://algs4.cs.princeton.edu

More information

CSE202 Greedy algorithms. Fan Chung Graham

CSE202 Greedy algorithms. Fan Chung Graham CSE202 Greedy algorithms Fan Chung Graham Announcement Reminder: Homework #1 has been posted, due April 15. This lecture includes material in Chapter 5 of Algorithms, Dasgupta, Papadimitriou and Vazirani,

More information

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University

Shuigeng Zhou. May 18, 2016 School of Computer Science Fudan University Query Processing Shuigeng Zhou May 18, 2016 School of Comuter Science Fudan University Overview Outline Measures of Query Cost Selection Oeration Sorting Join Oeration Other Oerations Evaluation of Exressions

More information

Lecture 1: Introduction

Lecture 1: Introduction Overview Lecture 1: Introduction What is COS 226? Intermediate-level survey course. Programming and problem solving with applications. Algorithms: method for solving a problem. Data structures: method

More information

Randomized algorithms: Two examples and Yao s Minimax Principle

Randomized algorithms: Two examples and Yao s Minimax Principle Randomized algorithms: Two examles and Yao s Minimax Princile Maximum Satisfiability Consider the roblem Maximum Satisfiability (MAX-SAT). Bring your knowledge u-to-date on the Satisfiability roblem. Maximum

More information

Optimizing Dynamic Memory Management!

Optimizing Dynamic Memory Management! Otimizing Dynamic Memory Management! 1 Goals of this Lecture! Hel you learn about:" Details of K&R hea mgr" Hea mgr otimizations related to Assignment #6" Faster free() via doubly-linked list, redundant

More information

10 File System Mass Storage Structure Mass Storage Systems Mass Storage Structure Mass Storage Structure FILE SYSTEM 1

10 File System Mass Storage Structure Mass Storage Systems Mass Storage Structure Mass Storage Structure FILE SYSTEM 1 10 File System 1 We will examine this chater in three subtitles: Mass Storage Systems OERATING SYSTEMS FILE SYSTEM 1 File System Interface File System Imlementation 10.1.1 Mass Storage Structure 3 2 10.1

More information

I ACCEPT NO RESPONSIBILITY FOR ERRORS ON THIS SHEET. I assume that E = (V ).

I ACCEPT NO RESPONSIBILITY FOR ERRORS ON THIS SHEET. I assume that E = (V ). 1 I ACCEPT NO RESPONSIBILITY FOR ERRORS ON THIS SHEET. I assume that E = (V ). Data structures Sorting Binary heas are imlemented using a hea-ordered balanced binary tree. Binomial heas use a collection

More information

22. Swaping: Policies

22. Swaping: Policies 22. Swaing: Policies Oerating System: Three Easy Pieces 1 Beyond Physical Memory: Policies Memory ressure forces the OS to start aging out ages to make room for actively-used ages. Deciding which age to

More information

Equality-Based Translation Validator for LLVM

Equality-Based Translation Validator for LLVM Equality-Based Translation Validator for LLVM Michael Ste, Ross Tate, and Sorin Lerner University of California, San Diego {mste,rtate,lerner@cs.ucsd.edu Abstract. We udated our Peggy tool, reviously resented

More information

Lecture 8: Orthogonal Range Searching

Lecture 8: Orthogonal Range Searching CPS234 Comutational Geometry Setember 22nd, 2005 Lecture 8: Orthogonal Range Searching Lecturer: Pankaj K. Agarwal Scribe: Mason F. Matthews 8.1 Range Searching The general roblem of range searching is

More information

1.5 CASE STUDY: UNION-FIND

1.5 CASE STUDY: UNION-FIND 1.5 CASE STUDY: UNION-FIND To illustrate our basic approach to developing and analyzing algorithms, we now consider a detailed example. Our purpose is to emphasize the following themes. Good algorithms

More information

Improved heuristics for the single machine scheduling problem with linear early and quadratic tardy penalties

Improved heuristics for the single machine scheduling problem with linear early and quadratic tardy penalties Imroved heuristics for the single machine scheduling roblem with linear early and quadratic tardy enalties Jorge M. S. Valente* LIAAD INESC Porto LA, Faculdade de Economia, Universidade do Porto Postal

More information

Chapter 7, Part B Sampling and Sampling Distributions

Chapter 7, Part B Sampling and Sampling Distributions Slides Preared by JOHN S. LOUCKS St. Edward s University Slide 1 Chater 7, Part B Samling and Samling Distributions Samling Distribution of Proerties of Point Estimators Other Samling Methods Slide 2 Samling

More information

Truth Trees. Truth Tree Fundamentals

Truth Trees. Truth Tree Fundamentals Truth Trees 1 True Tree Fundamentals 2 Testing Grous of Statements for Consistency 3 Testing Arguments in Proositional Logic 4 Proving Invalidity in Predicate Logic Answers to Selected Exercises Truth

More information

Source Coding and express these numbers in a binary system using M log

Source Coding and express these numbers in a binary system using M log Source Coding 30.1 Source Coding Introduction We have studied how to transmit digital bits over a radio channel. We also saw ways that we could code those bits to achieve error correction. Bandwidth is

More information

GRAPHS (Undirected) Graph: Set of objects with pairwise connections. Why study graph algorithms?

GRAPHS (Undirected) Graph: Set of objects with pairwise connections. Why study graph algorithms? GRAPHS (Undirected) Graph: Set of objects with pairwise connections. Why study graph algorithms? Interesting and broadly useful abstraction. Challenging branch of computer science and discrete math. Hundreds

More information

OMNI: An Efficient Overlay Multicast. Infrastructure for Real-time Applications

OMNI: An Efficient Overlay Multicast. Infrastructure for Real-time Applications OMNI: An Efficient Overlay Multicast Infrastructure for Real-time Alications Suman Banerjee, Christoher Kommareddy, Koushik Kar, Bobby Bhattacharjee, Samir Khuller Abstract We consider an overlay architecture

More information

CS649 Sensor Networks IP Track Lecture 6: Graphical Models

CS649 Sensor Networks IP Track Lecture 6: Graphical Models CS649 Sensor Networks IP Track Lecture 6: Grahical Models I-Jeng Wang htt://hinrg.cs.jhu.edu/wsn06/ Sring 2006 CS 649 1 Sring 2006 CS 649 2 Grahical Models Grahical Model: grahical reresentation of joint

More information

Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming

Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming Source-to-Source Code Generation Based on Pattern Matching and Dynamic Programming Weimin Chen, Volker Turau TR-93-047 August, 1993 Abstract This aer introduces a new technique for source-to-source code

More information

An empirical analysis of loopy belief propagation in three topologies: grids, small-world networks and random graphs

An empirical analysis of loopy belief propagation in three topologies: grids, small-world networks and random graphs An emirical analysis of looy belief roagation in three toologies: grids, small-world networks and random grahs R. Santana, A. Mendiburu and J. A. Lozano Intelligent Systems Grou Deartment of Comuter Science

More information

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network

Sensitivity Analysis for an Optimal Routing Policy in an Ad Hoc Wireless Network 1 Sensitivity Analysis for an Otimal Routing Policy in an Ad Hoc Wireless Network Tara Javidi and Demosthenis Teneketzis Deartment of Electrical Engineering and Comuter Science University of Michigan Ann

More information

! A data structure representing a list. ! A series of nodes chained together in sequence. ! A separate pointer (the head) points to the first

! A data structure representing a list. ! A series of nodes chained together in sequence. ! A separate pointer (the head) points to the first Ch. 17: Linked Lists 17.1 Introduction to Linked Lists! A data structure reresenting a list! A series of nodes chained together in sequence CS 2308 Sring 2015 Jill Seaman - Each node oints to one other

More information

Mitigating the Impact of Decompression Latency in L1 Compressed Data Caches via Prefetching

Mitigating the Impact of Decompression Latency in L1 Compressed Data Caches via Prefetching Mitigating the Imact of Decomression Latency in L1 Comressed Data Caches via Prefetching by Sean Rea A thesis resented to Lakehead University in artial fulfillment of the requirement for the degree of

More information

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data

Efficient Processing of Top-k Dominating Queries on Multi-Dimensional Data Efficient Processing of To-k Dominating Queries on Multi-Dimensional Data Man Lung Yiu Deartment of Comuter Science Aalborg University DK-922 Aalborg, Denmark mly@cs.aau.dk Nikos Mamoulis Deartment of

More information

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model.

Lecture 18. Today, we will discuss developing algorithms for a basic model for parallel computing the Parallel Random Access Machine (PRAM) model. U.C. Berkeley CS273: Parallel and Distributed Theory Lecture 18 Professor Satish Rao Lecturer: Satish Rao Last revised Scribe so far: Satish Rao (following revious lecture notes quite closely. Lecture

More information

Control plane and data plane. Computing systems now. Glacial process of innovation made worse by standards process. Computing systems once upon a time

Control plane and data plane. Computing systems now. Glacial process of innovation made worse by standards process. Computing systems once upon a time Classical work Architecture A A A Intro to SDN A A Oerating A Secialized Packet A A Oerating Secialized Packet A A A Oerating A Secialized Packet A A Oerating A Secialized Packet Oerating Secialized Packet

More information

Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects

Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScript Objects Identity-sensitive Points-to Analysis for the Dynamic Behavior of JavaScrit Objects Shiyi Wei and Barbara G. Ryder Deartment of Comuter Science, Virginia Tech, Blacksburg, VA, USA. {wei,ryder}@cs.vt.edu

More information

Distributed Estimation from Relative Measurements in Sensor Networks

Distributed Estimation from Relative Measurements in Sensor Networks Distributed Estimation from Relative Measurements in Sensor Networks #Prabir Barooah and João P. Hesanha Abstract We consider the roblem of estimating vectorvalued variables from noisy relative measurements.

More information

A BICRITERION STEINER TREE PROBLEM ON GRAPH. Mirko VUJO[EVI], Milan STANOJEVI] 1. INTRODUCTION

A BICRITERION STEINER TREE PROBLEM ON GRAPH. Mirko VUJO[EVI], Milan STANOJEVI] 1. INTRODUCTION Yugoslav Journal of Oerations Research (00), umber, 5- A BICRITERIO STEIER TREE PROBLEM O GRAPH Mirko VUJO[EVI], Milan STAOJEVI] Laboratory for Oerational Research, Faculty of Organizational Sciences University

More information

A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism

A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism A New and Efficient Algorithm-Based Fault Tolerance Scheme for A Million Way Parallelism Erlin Yao, Mingyu Chen, Rui Wang, Wenli Zhang, Guangming Tan Key Laboratory of Comuter System and Architecture Institute

More information

Recap: Consensus. CSE 486/586 Distributed Systems Mutual Exclusion. Why Mutual Exclusion? Why Mutual Exclusion? Mutexes. Mutual Exclusion C 1

Recap: Consensus. CSE 486/586 Distributed Systems Mutual Exclusion. Why Mutual Exclusion? Why Mutual Exclusion? Mutexes. Mutual Exclusion C 1 Reca: Consensus Distributed Systems Mutual Exclusion Steve Ko Comuter Sciences and Engineering University at Buffalo On a synchronous system There s an algorithm that works. On an asynchronous system It

More information

Chapter 7b - Point Estimation and Sampling Distributions

Chapter 7b - Point Estimation and Sampling Distributions Chater 7b - Point Estimation and Samling Distributions Chater 7 (b) Point Estimation and Samling Distributions Point estimation is a form of statistical inference. In oint estimation we use the data from

More information

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm

11/2/2010. In the last lecture. Monte-Carlo Ray Tracing : Path Tracing. Today. Shadow ray towards the light at each vertex. Path Tracing : algorithm Comuter Grahics Global Illumination: Monte-Carlo Ray Tracing and Photon Maing Lecture 11 In the last lecture We did ray tracing and radiosity Ray tracing is good to render secular objects but cannot handle

More information

A Metaheuristic Scheduler for Time Division Multiplexed Network-on-Chip

A Metaheuristic Scheduler for Time Division Multiplexed Network-on-Chip Downloaded from orbit.dtu.dk on: Jan 25, 2019 A Metaheuristic Scheduler for Time Division Multilexed Network-on-Chi Sørensen, Rasmus Bo; Sarsø, Jens; Pedersen, Mark Ruvald; Højgaard, Jasur Publication

More information

36. I/O Devices. Operating System: Three Easy Pieces 1

36. I/O Devices. Operating System: Three Easy Pieces 1 36. I/O Devices Oerating System: Three Easy Pieces AOS@UC 1 I/O Devices I/O is critical to comuter system to interact with systems. Issue : w How should I/O be integrated into systems? w What are the general

More information

Skip List Based Authenticated Data Structure in DAS Paradigm

Skip List Based Authenticated Data Structure in DAS Paradigm 009 Eighth International Conference on Grid and Cooerative Comuting Ski List Based Authenticated Data Structure in DAS Paradigm Jieing Wang,, Xiaoyong Du,. Key Laboratory of Data Engineering and Knowledge

More information

CMSC 425: Lecture 16 Motion Planning: Basic Concepts

CMSC 425: Lecture 16 Motion Planning: Basic Concepts : Lecture 16 Motion lanning: Basic Concets eading: Today s material comes from various sources, including AI Game rogramming Wisdom 2 by S. abin and lanning Algorithms by S. M. LaValle (Chats. 4 and 5).

More information

Leak Detection Modeling and Simulation for Oil Pipeline with Artificial Intelligence Method

Leak Detection Modeling and Simulation for Oil Pipeline with Artificial Intelligence Method ITB J. Eng. Sci. Vol. 39 B, No. 1, 007, 1-19 1 Leak Detection Modeling and Simulation for Oil Pieline with Artificial Intelligence Method Pudjo Sukarno 1, Kuntjoro Adji Sidarto, Amoranto Trisnobudi 3,

More information

Improving Trust Estimates in Planning Domains with Rare Failure Events

Improving Trust Estimates in Planning Domains with Rare Failure Events Imroving Trust Estimates in Planning Domains with Rare Failure Events Colin M. Potts and Kurt D. Krebsbach Det. of Mathematics and Comuter Science Lawrence University Aleton, Wisconsin 54911 USA {colin.m.otts,

More information

Distributed Systems (5DV147)

Distributed Systems (5DV147) Distributed Systems (5DV147) Mutual Exclusion and Elections Fall 2013 1 Processes often need to coordinate their actions Which rocess gets to access a shared resource? Has the master crashed? Elect a new

More information

Object and Native Code Thread Mobility Among Heterogeneous Computers

Object and Native Code Thread Mobility Among Heterogeneous Computers Object and Native Code Thread Mobility Among Heterogeneous Comuters Bjarne Steensgaard Eric Jul Microsoft Research DIKU (Det. of Comuter Science) One Microsoft Way University of Coenhagen Redmond, WA 98052

More information

33. Event-based Concurrency

33. Event-based Concurrency 33. Event-based Concurrency Oerating System: Three Easy Pieces AOS@UC 1 Event-based Concurrency A different style of concurrent rogramming without threads w Used in GUI-based alications, some tyes of internet

More information

Using Standard AADL for COMPASS

Using Standard AADL for COMPASS Using Standard AADL for COMPASS (noll@cs.rwth-aachen.de) AADL Standards Meeting Aachen, Germany; July 5 8, 06 Overview Introduction SLIM Language Udates COMPASS Develoment Roadma Fault Injections Parametric

More information

Algorithms. Algorithms 1.4 ANALYSIS OF ALGORITHMS

Algorithms. Algorithms 1.4 ANALYSIS OF ALGORITHMS ROBERT SEDGEWICK KEVIN WAYNE Algorithms ROBERT SEDGEWICK KEVIN WAYNE 1.4 ANALYSIS OF ALGORITHMS Algorithms F O U R T H E D I T I O N http://algs4.cs.princeton.edu introduction observations mathematical

More information

Real Time Compression of Triangle Mesh Connectivity

Real Time Compression of Triangle Mesh Connectivity Real Time Comression of Triangle Mesh Connectivity Stefan Gumhold, Wolfgang Straßer WSI/GRIS University of Tübingen Abstract In this aer we introduce a new comressed reresentation for the connectivity

More information

Simulating Ocean Currents. Simulating Galaxy Evolution

Simulating Ocean Currents. Simulating Galaxy Evolution Simulating Ocean Currents (a) Cross sections (b) Satial discretization of a cross section Model as two-dimensional grids Discretize in sace and time finer satial and temoral resolution => greater accuracy

More information

Modified Bloom filter for high performance hybrid NoSQL systems

Modified Bloom filter for high performance hybrid NoSQL systems odified Bloom filter for high erformance hybrid NoSQL systems A.B.Vavrenyuk, N.P.Vasilyev, V.V.akarov, K.A.atyukhin,..Rovnyagin, A.A.Skitev National Research Nuclear University EPhI (oscow Engineering

More information

Distributed Algorithms

Distributed Algorithms Course Outline With grateful acknowledgement to Christos Karamanolis for much of the material Jeff Magee & Jeff Kramer Models of distributed comuting Synchronous message-assing distributed systems Algorithms

More information

Extracting Optimal Paths from Roadmaps for Motion Planning

Extracting Optimal Paths from Roadmaps for Motion Planning Extracting Otimal Paths from Roadmas for Motion Planning Jinsuck Kim Roger A. Pearce Nancy M. Amato Deartment of Comuter Science Texas A&M University College Station, TX 843 jinsuckk,ra231,amato @cs.tamu.edu

More information

Fast Distributed Process Creation with the XMOS XS1 Architecture

Fast Distributed Process Creation with the XMOS XS1 Architecture Communicating Process Architectures 20 P.H. Welch et al. (Eds.) IOS Press, 20 c 20 The authors and IOS Press. All rights reserved. Fast Distributed Process Creation with the XMOS XS Architecture James

More information

To Do. Computer Graphics (Fall 2004) Course Outline. Course Outline. Motivation. Motivation

To Do. Computer Graphics (Fall 2004) Course Outline. Course Outline. Motivation. Motivation Comuter Grahics (Fall 24) COMS 416, Lecture 3: ransformations 1 htt://www.cs.columbia.edu/~cs416 o Do Start (thinking about) assignment 1 Much of information ou need is in this lecture (slides) Ask A NOW

More information

A Study of Protocols for Low-Latency Video Transport over the Internet

A Study of Protocols for Low-Latency Video Transport over the Internet A Study of Protocols for Low-Latency Video Transort over the Internet Ciro A. Noronha, Ph.D. Cobalt Digital Santa Clara, CA ciro.noronha@cobaltdigital.com Juliana W. Noronha University of California, Davis

More information

A Moving Least Squares Material Point Method with Displacement Discontinuity and Two-Way Rigid Body Coupling (Supplementary Document)

A Moving Least Squares Material Point Method with Displacement Discontinuity and Two-Way Rigid Body Coupling (Supplementary Document) A Moving Least Squares Material Point Method with Dislacement Discontinuity and Two-Way Rigid Body Couling (Sulementary Document) Yuanming Hu Yu Fang Ziheng Ge Ziyin Qu Yixin Zhu Andre Pradhana Chenfanfu

More information

Protecting Mobile Agents against Malicious Host Attacks Using Threat Diagnostic AND/OR Tree

Protecting Mobile Agents against Malicious Host Attacks Using Threat Diagnostic AND/OR Tree Protecting Mobile Agents against Malicious Host Attacks Using Threat Diagnostic AND/OR Tree Magdy Saeb, Meer Hamza, Ashraf Soliman. Arab Academy for Science, Technology & Maritime Transort Comuter Engineering

More information

Autonomic Physical Database Design - From Indexing to Multidimensional Clustering

Autonomic Physical Database Design - From Indexing to Multidimensional Clustering Autonomic Physical Database Design - From Indexing to Multidimensional Clustering Stehan Baumann, Kai-Uwe Sattler Databases and Information Systems Grou Technische Universität Ilmenau, Ilmenau, Germany

More information

20. Paging: Smaller Tables

20. Paging: Smaller Tables 20. Paging: Smaller Tables Oerating System: Three Easy Pieces AOS@UC 1 Paging: Linear Tables We usually have one age table for every rocess in the system. w Assume that 32-bit address sace with 4KB ages

More information

Privacy Preserving Moving KNN Queries

Privacy Preserving Moving KNN Queries Privacy Preserving Moving KNN Queries arxiv:4.76v [cs.db] 4 Ar Tanzima Hashem Lars Kulik Rui Zhang National ICT Australia, Deartment of Comuter Science and Software Engineering University of Melbourne,

More information

Patterned Wafer Segmentation

Patterned Wafer Segmentation atterned Wafer Segmentation ierrick Bourgeat ab, Fabrice Meriaudeau b, Kenneth W. Tobin a, atrick Gorria b a Oak Ridge National Laboratory,.O.Box 2008, Oak Ridge, TN 37831-6011, USA b Le2i Laboratory Univ.of

More information

A Model-Adaptable MOSFET Parameter Extraction System

A Model-Adaptable MOSFET Parameter Extraction System A Model-Adatable MOSFET Parameter Extraction System Masaki Kondo Hidetoshi Onodera Keikichi Tamaru Deartment of Electronics Faculty of Engineering, Kyoto University Kyoto 66-1, JAPAN Tel: +81-7-73-313

More information

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.)

Lecture 3: Geometric Algorithms(Convex sets, Divide & Conquer Algo.) Advanced Algorithms Fall 2015 Lecture 3: Geometric Algorithms(Convex sets, Divide & Conuer Algo.) Faculty: K.R. Chowdhary : Professor of CS Disclaimer: These notes have not been subjected to the usual

More information

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python

Lecture 7: Objects (Chapter 15) CS 1110 Introduction to Computing Using Python htt://www.cs.cornell.edu/courses/cs1110/2018s Lecture 7: Objects (Chater 15) CS 1110 Introduction to Comuting Using Python [E. Andersen, A. Bracy, D. Gries, L. Lee, S. Marschner, C. Van Loan, W. White]

More information

A Symmetric FHE Scheme Based on Linear Algebra

A Symmetric FHE Scheme Based on Linear Algebra A Symmetric FHE Scheme Based on Linear Algebra Iti Sharma University College of Engineering, Comuter Science Deartment. itisharma.uce@gmail.com Abstract FHE is considered to be Holy Grail of cloud comuting.

More information

Improved Symmetric Lists

Improved Symmetric Lists Imroved Symmetric Lists Prerint February, 24 Christian Bachmaier and Marcus Raitner University of Passau, 943 Passau, Germany {bachmaier,raitner}@fmi.uni-assau.de Abstract. We introduce a new data structure

More information

10. Multiprocessor Scheduling (Advanced)

10. Multiprocessor Scheduling (Advanced) 10. Multirocessor Scheduling (Advanced) Oerating System: Three Easy Pieces AOS@UC 1 Multirocessor Scheduling The rise of the multicore rocessor is the source of multirocessorscheduling roliferation. w

More information

Graph: composable production systems in Clojure. Jason Wolfe Strange Loop 12

Graph: composable production systems in Clojure. Jason Wolfe Strange Loop 12 Grah: comosable roduction systems in Clojure Jason Wolfe (@w01fe) Strange Loo 12 Motivation Interesting software has: many comonents comlex web of deendencies Develoers want: simle, factored code easy

More information

Figure 8.1: Home age taken from the examle health education site (htt:// Setember 14, 2001). 201

Figure 8.1: Home age taken from the examle health education site (htt://  Setember 14, 2001). 201 200 Chater 8 Alying the Web Interface Profiles: Examle Web Site Assessment 8.1 Introduction This chater describes the use of the rofiles develoed in Chater 6 to assess and imrove the quality of an examle

More information

An Efficient Video Program Delivery algorithm in Tree Networks*

An Efficient Video Program Delivery algorithm in Tree Networks* 3rd International Symosium on Parallel Architectures, Algorithms and Programming An Efficient Video Program Delivery algorithm in Tree Networks* Fenghang Yin 1 Hong Shen 1,2,** 1 Deartment of Comuter Science,

More information

S16-02, URL:

S16-02, URL: Self Introduction A/Prof ay Seng Chuan el: Email: scitaysc@nus.edu.sg Office: S-0, Dean s s Office at Level URL: htt://www.hysics.nus.edu.sg/~hytaysc I was a rogrammer from to. I have been working in NUS

More information

Grouping of Patches in Progressive Radiosity

Grouping of Patches in Progressive Radiosity Grouing of Patches in Progressive Radiosity Arjan J.F. Kok * Abstract The radiosity method can be imroved by (adatively) grouing small neighboring atches into grous. Comutations normally done for searate

More information

Auto-Tuning Distributed-Memory 3-Dimensional Fast Fourier Transforms on the Cray XT4

Auto-Tuning Distributed-Memory 3-Dimensional Fast Fourier Transforms on the Cray XT4 Auto-Tuning Distributed-Memory 3-Dimensional Fast Fourier Transforms on the Cray XT4 M. Gajbe a A. Canning, b L-W. Wang, b J. Shalf, b H. Wasserman, b and R. Vuduc, a a Georgia Institute of Technology,

More information

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model

IMS Network Deployment Cost Optimization Based on Flow-Based Traffic Model IMS Network Deloyment Cost Otimization Based on Flow-Based Traffic Model Jie Xiao, Changcheng Huang and James Yan Deartment of Systems and Comuter Engineering, Carleton University, Ottawa, Canada {jiexiao,

More information

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS

PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS PREDICTING LINKS IN LARGE COAUTHORSHIP NETWORKS Kevin Miller, Vivian Lin, and Rui Zhang Grou ID: 5 1. INTRODUCTION The roblem we are trying to solve is redicting future links or recovering missing links

More information

A measure of compression gain for new alphabet symbols in data-compression

A measure of compression gain for new alphabet symbols in data-compression A measure of comression gain for new alhabet symbols in data-comression Richard Fredlund richard_fredlund@hotmail.com arxiv:402.4738v [cs.it] 9 Feb 204 Abstract In coding theory it is widely known that

More information

Lecture06: Pointers 4/1/2013

Lecture06: Pointers 4/1/2013 Lecture06: Pointers 4/1/2013 Slides modified from Yin Lou, Cornell CS2022: Introduction to C 1 Pointers A ointer is a variable that contains the (memory) address of another variable What is a memory address?

More information

Basic Types and Arrays. Pointers. Records and Pointers. Record Definition. Creating a Record. Pointer. Basic Types. Arrays

Basic Types and Arrays. Pointers. Records and Pointers. Record Definition. Creating a Record. Pointer. Basic Types. Arrays Basic Tyes and Arrays ointers SE 6 Data Structures Lecture Basic Tyes integer, real (floating oint), boolean (0,), character Arrays A[099] : integer array A 0 6 7 99 A[] /9/0 ointers and Lists- Lecture

More information

An Efficient VLSI Architecture for Adaptive Rank Order Filter for Image Noise Removal

An Efficient VLSI Architecture for Adaptive Rank Order Filter for Image Noise Removal International Journal of Information and Electronics Engineering, Vol. 1, No. 1, July 011 An Efficient VLSI Architecture for Adative Rank Order Filter for Image Noise Removal M. C Hanumantharaju, M. Ravishankar,

More information

An object oriented approach to lattice gas modeling

An object oriented approach to lattice gas modeling An object oriented aroach to lattice gas modeling Alexandre Duuis and Bastien Choard University of Geneva, CUI, 24, rue Général-Dufour, CH - 1211 Geneva, Switzerland [Alexandre.Duuis Bastien.Choard]@cui.unige.ch

More information

Introduction to Parallel Algorithms

Introduction to Parallel Algorithms CS 1762 Fall, 2011 1 Introduction to Parallel Algorithms Introduction to Parallel Algorithms ECE 1762 Algorithms and Data Structures Fall Semester, 2011 1 Preliminaries Since the early 1990s, there has

More information

Power Savings in Embedded Processors through Decode Filter Cache

Power Savings in Embedded Processors through Decode Filter Cache Power Savings in Embedded Processors through Decode Filter Cache Weiyu Tang Rajesh Guta Alexandru Nicolau Deartment of Information and Comuter Science University of California, Irvine Irvine, CA 92697-3425

More information

Applications of Pointers (1A) Young Won Lim 2/27/18

Applications of Pointers (1A) Young Won Lim 2/27/18 Alications of (1A) Coyright (c) 2010-2018 Young W. Lim. Permission is granted to coy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.2 or any later

More information

2. Introduction to Operating Systems

2. Introduction to Operating Systems 2. Introduction to Oerating Systems Oerating System: Three Easy Pieces 1 What a haens when a rogram runs? A running rogram executes instructions. 1. The rocessor fetches an instruction from memory. 2.

More information

Coarse grained gather and scatter operations with applications

Coarse grained gather and scatter operations with applications Available online at www.sciencedirect.com J. Parallel Distrib. Comut. 64 (2004) 1297 1310 www.elsevier.com/locate/jdc Coarse grained gather and scatter oerations with alications Laurence Boxer a,b,, Russ

More information

Sage Estimating (formerly Sage Timberline Estimating) Getting Started Guide. Version has been retired. This version of the software

Sage Estimating (formerly Sage Timberline Estimating) Getting Started Guide. Version has been retired. This version of the software Sage Estimating (formerly Sage Timberline Estimating) Getting Started Guide Version 14.12 This version of the software has been retired This is a ublication of Sage Software, Inc. Coyright 2014. Sage Software,

More information

Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics

Lecture 2: Fixed-Radius Near Neighbors and Geometric Basics structure arises in many alications of geometry. The dual structure, called a Delaunay triangulation also has many interesting roerties. Figure 3: Voronoi diagram and Delaunay triangulation. Search: Geometric

More information

Simple example. Analysis of programs with pointers. Points-to relation. Program model. Points-to graph. Ordering on points-to relation

Simple example. Analysis of programs with pointers. Points-to relation. Program model. Points-to graph. Ordering on points-to relation Simle eamle Analsis of rograms with ointers := 5 tr := @ *tr := 9 := rogram S1 S2 S3 S4 deendences What are the deendences in this rogram? Problem: just looking at variable names will not give ou the correct

More information

Implementation of Evolvable Fuzzy Hardware for Packet Scheduling Through Online Context Switching

Implementation of Evolvable Fuzzy Hardware for Packet Scheduling Through Online Context Switching Imlementation of Evolvable Fuzzy Hardware for Packet Scheduling Through Online Context Switching Ju Hui Li, eng Hiot Lim and Qi Cao School of EEE, Block S Nanyang Technological University Singaore 639798

More information

42. Crash Consistency: FSCK and Journaling

42. Crash Consistency: FSCK and Journaling 42. Crash Consistency: FSCK and Journaling Oerating System: Three Easy Pieces AOS@UC 1 Crash Consistency AOS@UC 2 Crash Consistency Unlike most data structure, file system data structures must ersist w

More information

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101

Convex Hulls. Helen Cameron. Helen Cameron Convex Hulls 1/101 Convex Hulls Helen Cameron Helen Cameron Convex Hulls 1/101 What Is a Convex Hull? Starting Point: Points in 2D y x Helen Cameron Convex Hulls 3/101 Convex Hull: Informally Imagine that the x, y-lane is

More information

Collective communication: theory, practice, and experience

Collective communication: theory, practice, and experience CONCURRENCY AND COMPUTATION: PRACTICE AND EXPERIENCE Concurrency Comutat.: Pract. Exer. 2007; 19:1749 1783 Published online 5 July 2007 in Wiley InterScience (www.interscience.wiley.com)..1206 Collective

More information

GDP: Using Dataflow Properties to Accurately Estimate Interference-Free Performance at Runtime

GDP: Using Dataflow Properties to Accurately Estimate Interference-Free Performance at Runtime GDP: Using Dataflow Proerties to Accurately Estimate Interference-Free Performance at Runtime Magnus Jahre Deartment of Comuter Science Norwegian University of Science and Technology (NTNU) Email: magnus.jahre@ntnu.no

More information

Matlab Virtual Reality Simulations for optimizations and rapid prototyping of flexible lines systems

Matlab Virtual Reality Simulations for optimizations and rapid prototyping of flexible lines systems Matlab Virtual Reality Simulations for otimizations and raid rototying of flexible lines systems VAMVU PETRE, BARBU CAMELIA, POP MARIA Deartment of Automation, Comuters, Electrical Engineering and Energetics

More information

MSO Exam January , 17:00 20:00

MSO Exam January , 17:00 20:00 MSO 2014 2015 Exam January 26 2015, 17:00 20:00 Name: Student number: Please read the following instructions carefully: Fill in your name and student number above. Be reared to identify yourself with your

More information

An improved algorithm for Hausdorff Voronoi diagram for non-crossing sets

An improved algorithm for Hausdorff Voronoi diagram for non-crossing sets An imroved algorithm for Hausdorff Voronoi diagram for non-crossing sets Frank Dehne, Anil Maheshwari and Ryan Taylor May 26, 2006 Abstract We resent an imroved algorithm for building a Hausdorff Voronoi

More information