Divide-and-conquer algorithms 1

Size: px
Start display at page:

Download "Divide-and-conquer algorithms 1"

Transcription

1 * 1 Multipliation Divide-and-onquer algorithms 1 The mathematiian Gauss one notied that although the produt of two omplex numbers seems to! involve four real-number multipliations it an in fat be done with just three: and sine " # $ %&( This speeds up the omputation but only by a onstant fator whih to our big-) way of thinking is negligible Can something more substantial be salvaged from Gauss observation? The seemingly modest improvement in omputation time beomes very signifiant if this same trik is applied reursively Let s move away from omplex numbers and see how this helps with regular multipliation Suppose * and are two -bit integers As a first step towards multiplying them split eah of them into their left and right halves whih are -0 bits long: For instane if * 1 3 * 1 * 1 1 *21 *43 <;$=>;8; then <;$= *? 687:*21 607: 1 <;8; and * 3 87: * 1 3 *43 and 3 The produt is We will ompute *2 via the expression on the right-hand side The additions take linear time as do the multipliations by powers of two (whih are left-shifts) The signifiant operations are the four -0 -bit multipliations * 1 1 * 1 3 * 3 1 * 3 3 ; these we an handle by four reursive alls If A denotes the time taken to multiply -bit numbers by this method then A an be written as a reurrene relation BDC A A -0 ) We will soon examine general strategies for solving suh equations In the meantime this partiular one works out to ) whih is disappointing beause it is no better than the traditional grade-shool multipliation tehnique So we would like to speed up our reursive algorithm somehow and now Gauss trik omes to mind Although the expression for *2 seems to demand four -0 -bit multipliations H as before just& three will do: * 1 1 *21 *43 E1 3 sine *F1(3 *43GE1 *21 *F3 E1 3 *F1(E1 *F3I3 running time is BKJ A A -0 ) * 3 1 L 1 Copyright 2004 S Dasgupta CH Papadimitriou and V * 3 3 * 3 3 and The improved 1

2 Q J d d Figure 11 A divide-and-onquer algorithm for integer multipliation funtion multiply(* ) * Input: Two -bit numbers and Output: Their produt M; if : return *? * 1 * 3 leftmost rightmost NO-06P bits of * 1 3 leftmost rightmost NO-06P bits of QR multiply * 1 1 multiply QTS * 3 3 multiply Q RV * W 1 * return Q S Q R Q Q S 87: At first glane this seems only a onstant fator better than the previous attempt But the improvement ours at every level ofryx the ZY[ reursion and this ompounding effet leads to a dramatially lower time bound of ) The algorithmi strategy we have been using (see Figure 11) is alled divide-and-onquer: it takles a problem by seleting subproblems reursively solving them and then gluing together these partial answers All the work is done in the seleting and gluing and in the base ase of the reursion The running time of our algorithm follows from its pattern of reursive alls whih form a tree struture as in Figure 12 Let s try to understand the shape of \^]8_ this tree `^a At eah suessive level of reursion the subproblems get halved in size At the level the subproblems \b]8_ get down to size one and so the reursion ends Therefore the height of the tree is The branhing fator is three eah problem reursively produes three smaller ones with the result that at depth Jd in the tree there are subproblems eah of size -0 For eah subproblem a linear amount of work is done in seleting further subproblems and gluing together answers Therefore the total time spent at depth in the tree is J d )<e dff )hgji lk Gm n= <\b]8_ At the J0oqpYrs very top level when this works oqpyr sout S to ) At the bottom when it is ) whih an be rewritten as ) (hek!) oqpyr s S Between these two endpoints the work done inreases geometrially from ) to ) J by a fator of -0 per level The sum of any inreasing geometri series is within a onstant fator simply the last term of oqpyr the s S series: suh is the RYX rapidity ZY[ of the inrease Therefore the overall running time is ) whih is about ) In the absene of Gauss trik the reursion C oqpyr s tree would have the same height but with a branhing fator of four There would be G leaves and therefore the running time would be at least this muh In divide-and-onquer algorithms the number of subproblems translates into the branhing fator of the reursion tree; small hanges in this oeffiient an 2

3 A P ƒ e y f A P Figure 12 The first few levels of reursion of divide-and-onquer integer multipliation size t size ttu6v size tuxw have a big impat on running time One pratial note: it generally does not make sense to reurse all the way down to one bit For most proessors 16 or 32-bit multipliation is a single operation so by the time the numbers get into this range they should be handed over to the built-in proedure 2 Reurrene relations Claim If A! A large number of divide-and-onquer algorithms onform to a generi pattern: they takle a problem of size by reursively solving subproblems of size - and then ombining these answers in ) Iy 2zx {}= ~ x time for some Their running time is therefore A NO- ) y We now find a losed-form solution to this general reurrene so that we no longer have to solve it expliitly in eah new instane NO- A ) Iy for some positive onstants?zx then q ) y \b]8_ ) Gy oqpyrzˆ6 ) } if W y if {} y if y This single theorem tells us the running times of most of the divide-and-onquer proedures we are likely to use To prove the laim let s start by assuming for onveniene that is a power of ; this will not influene the final bound and will allow us to ignore the rounding effet in NO- P The size of the subproblems dereases by a fator of with eah level of reursion and therefore reahes the \b]8_š base ase `^a after levels This is the height of the reursion tree Its branhing fator is so the d d level of the tree is made up of subproblems eah of size - The total work done at this level is d )<e dff y ) y d (the leaves) these numbers form a geometri series y To determine the sum of the series there are three ases we need to onsider If the ratio is less than one then the series is dereasing in whih ase the first term is dominant If the ratio is more than one the series is inreasing and the last term As goes = \b]8_š from (the root) to with ratio - ) Gy 3

4 - Q y Œ ) y oqpyrzˆ \^]8_ ) oqpyrzˆ6 x is dominant Finally it ould be that the ratio is exatly one in whih ase all ) terms of the series are equal to ) %y These ases translate diretly into the three ontingenies of the theorem 3 Matrix multipliation The produt of two In general Œ Œ R d Œ d matries and is a third d$ matrix is not the same as Œ ; matrix multipliation is not ommutative The formula above implies an ) S ŽŒ with `^a entry algorithm for matrix multipliation: there are entries to be omputed and eah takes linear time For quite a while this was widely believed to be the best running time possible and it was even proved that no algorithm whih used just additions and multipliations ould do better It was therefore a soure of great exitement when in 16 Strassen announed a signifiantly more effiient algorithm based upon divide-and-onquer Matrix multipliation is partiularly easy to break into subproblems beause it an be performed blokwise To see what this means arve into four -0 š ž Ÿ š Ÿ -0 bloks and also Œ : Then their produt an be expressed in terms of these bloks and is exatly as if the bloks were single elements ŽŒ š ž Ÿ š Ÿ š ž ž Ÿ We now have a divide-and-onquer strategy: to ompute the size- produt ŽŒ reursively ompute eight size--0 produts ž ž and then do a few ) - time additions The total running time is desribed by the reurrene relation whih omes out to ) S A Wª A -0 the same as for the default algorithm However an improvement in the time bound is possible and as with integer multipliation it relies upon algebrai triks It turns out that Œ an be omputed from just seven subproblems ) Q~R QS ž QI«ž QZ ž Q ž QT ŽŒ š QTZ Q«Q QTS Q«Q Q~R Q QR QZ QTS Q Ÿ 4

5 ±»» This translates into a running time of A A -0 ) oqpyr s whih by the result of the previous setion is ) ) G X R 4 Mergesort The problem of sorting a list of numbers lends itself immediately to a divide-and-onquer strategy: split the list into two halves reursively sort eah half and then merge the two sorted sublists 4%$$ funtion mergesort( 4 ) F%$$ Input: An array of numbers 4 Output: A sorted version of this array {; if return merge(mergesort( 4%$$6-06µ$ ) mergesort( 4± -06µ else return W; $$ 4 )) The orretness of this algorithm is self-evident %$$ as long%$$ as a orret merge subroutine is speified If we are given two sorted %$$ arrays } * and how do we effiiently merge them into a single sorted array ±¹? Well the very first element of is either * or whihever is smaller The rest of an then be onstruted reursively %$$ %$$ funtion = merge(* %$$ ) if : return G= %$$ if : return * if * : $$ return * >º merge * else: %$$ return º merge * %$$ ± $$ This kind of tail reursion an be unraveled into a purely iterative algorithm as shown in Figure 41 It performs a onstant number of operations for eah element of the ombined array and therefore takes linear time ) in all The overall running time of mergesort is then whih works out to ) Medians \b]8_ A xa -0 The median of a list of numbers is its 0th perentile: half the numbers are bigger than it and half are smaller In other words it ± C»¼;0¼;$=zJ0= is the middle element when the numbers are arranged in order For instane the median of is If the list has even length there are two hoies for the middle element and the median is defined to be their average The purpose of the median is to summarize a set of numbers by a single typial value The mean or average is also ommonly used for this but it has the tremendous disadvantage that )

6 * ƒ Ä Figure 41 The merge proedure %$$ %$$ funtion merge(* ) Input: Two sorted arrays * Output: A sorted array ½?¾ ½? <; for ½FÀ <; to if ½2 {! ±½2À ±½?¾ ½ ¾ ½ ¾ ; else return ±½2À ±½? ½? ½2 ; %$$ %$$ %$$ and ontaining the ombined elements of * Positions in the two input arrays : or * ±½?¾ ±½? : it an be ompletely thrown off by a single large or small number For instane the mean of a list of a hundred 1 s is (rightly) 1 as is the median However if just one of these numbers gets aidentally hanged to the mean shoots up above 100 while the median is unaffeted Computing \b]8_ the median of numbers is easy: just sort them The only problem is that this takes ) time whereas we would ideally like something linear We have reason to be hopeful beause sorting is doing far more work than we really need we just want the middle element and don t are about the relative ordering of the rest of them Often a problem beomes learer and easier to solve when we onsider a more general version of it In this ase the generalization we will onsider is seletion SELECTION Input: A list of numbers Á ; an integer `^a Output: The smallest element of Á Â; For instane if the minimum of Á is sought whereas if setting appropriately all the perentiles of Á an be found  Á it is the maximum By Here s a divide-and-onquer approah to seletion For any number Ä imagine splitting list Á into three ategories: elements smaller than Ä those equal to Ä (there might be dupliates) and those greater than Ä Call these Á Å(Æ Á Æ and ÁTÇ(Æ respetively By heking against the sizes of these subarrays we an quikly determine whih of them holds the desired element: selet Á ~ The three sublists Á Å(Æ q selet ÁTÅ(Æ Á Æ selet Á Ç(Æ Ê Á Å(Æ 0Ë Á Æ q È if > ÁTÅ(Æ if ÁÅ(Æ {È if Á Å(Æ È $É ÁÅ(Æ Á ¼ Æ Á Ì Æ Á Ç(Æ an be omputed from Á in linear time and in fat this omputation an be done in plae that is without alloating new memory for them using three pointers (an you figure out this neat trik?) One they are obtained exatly one of the three senarios an hold and so the original array Á effetively shrinks to one of size at most ÍÏÎ6ÐFÑ Ìx ÓÒ ÁÅ(Æ ÁÇ(Æ 6

7 ; A R C Á C The hoie of Ä is ruial It should be8 n piked8 quikly and it should shrink the array substantially the ideal situation being Á~Å(Æ ÁÇ(Æ If we ould always guarantee this situation we would get a running time of A A -0 whih is linear as desired But this requires piking Ä to be the median whih is what we are trying to do in the first plae! Instead our method of hoosing Ä is muh simpler: we just pik it randomly from Á The running time of our algorithm depends on the random hoies of Ä It is possible that due to persistent bad luk we keep piking Ä to be the smallest element of the array (or the largest element) and thereby shrink the array by only one element eah time This worst ase senario takes ) steps but is extremely unlikely to our Equally unlikely is the best possible ase in whih eah randomly hosen Ä just happens to be the median so that as above the running time is ) Where in this spetrum from ) to ) does the average running time lie? Fortunately it lies very lose to the best-ase time To distinguish» `^a 0» between `^a luky and unluky hoies of Ä we will all Ä good if it lies any- to perentile of the array that it is hosen from The following property where in follows from the definition of perentile Property When Ä is hosen randomly from an array it has a probability ; -0 of being good of its size (why?) This is very promising but how many times on average do we need to pik Ä before we get a good one? There is an equivalent question whih might be more familiar: on average how many times must we toss a fair oin before getting heads? Let be the expeted number of tosses We ertainly need at least one toss and if it s heads we re done Otherwise (and this ours with probability -0 ) we need to repeat In other words <; so J Therefore after every two reursive alls on average the array will shrink to - of its be the expeted running time Then A good Ä auses the array to shrink to at most J - size Let A whih means A in an average of ) A J - I CI R ) ) 6 is linear In short on any input our algorithm returns the orret answer steps 7

1 Disjoint-set data structure.

1 Disjoint-set data structure. CS 124 Setion #4 Union-Fin, Greey Algorithms 2/20/17 1 Disjoint-set ata struture. 1.1 Operations Disjoint-set ata struture enale us to effiiently perform operations suh as plaing elements into sets, querying

More information

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking

Algorithms for External Memory Lecture 6 Graph Algorithms - Weighted List Ranking Algorithms for External Memory Leture 6 Graph Algorithms - Weighted List Ranking Leturer: Nodari Sithinava Sribe: Andi Hellmund, Simon Ohsenreither 1 Introdution & Motivation After talking about I/O-effiient

More information

Gray Codes for Reflectable Languages

Gray Codes for Reflectable Languages Gray Codes for Refletable Languages Yue Li Joe Sawada Marh 8, 2008 Abstrat We lassify a type of language alled a refletable language. We then develop a generi algorithm that an be used to list all strings

More information

Dynamic Algorithms Multiple Choice Test

Dynamic Algorithms Multiple Choice Test 3226 Dynami Algorithms Multiple Choie Test Sample test: only 8 questions 32 minutes (Real test has 30 questions 120 minutes) Årskort Name Eah of the following 8 questions has 4 possible answers of whih

More information

The Happy Ending Problem

The Happy Ending Problem The Happy Ending Problem Neeldhara Misra STATUTORY WARNING This doument is a draft version 1 Introdution The Happy Ending problem first manifested itself on a typial wintery evening in 1933 These evenings

More information

This fact makes it difficult to evaluate the cost function to be minimized

This fact makes it difficult to evaluate the cost function to be minimized RSOURC LLOCTION N SSINMNT In the resoure alloation step the amount of resoures required to exeute the different types of proesses is determined. We will refer to the time interval during whih a proess

More information

Dynamic Programming. Lecture #8 of Algorithms, Data structures and Complexity. Joost-Pieter Katoen Formal Methods and Tools Group

Dynamic Programming. Lecture #8 of Algorithms, Data structures and Complexity. Joost-Pieter Katoen Formal Methods and Tools Group Dynami Programming Leture #8 of Algorithms, Data strutures and Complexity Joost-Pieter Katoen Formal Methods and Tools Group E-mail: katoen@s.utwente.nl Otober 29, 2002 JPK #8: Dynami Programming ADC (214020)

More information

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework

Definitions Homework. Quine McCluskey Optimal solutions are possible for some large functions Espresso heuristic. Definitions Homework EECS 33 There be Dragons here http://ziyang.ees.northwestern.edu/ees33/ Teaher: Offie: Email: Phone: L477 Teh dikrp@northwestern.edu 847 467 2298 Today s material might at first appear diffiult Perhaps

More information

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425)

Automatic Physical Design Tuning: Workload as a Sequence Sanjay Agrawal Microsoft Research One Microsoft Way Redmond, WA, USA +1-(425) Automati Physial Design Tuning: Workload as a Sequene Sanjay Agrawal Mirosoft Researh One Mirosoft Way Redmond, WA, USA +1-(425) 75-357 sagrawal@mirosoft.om Eri Chu * Computer Sienes Department University

More information

Extracting Partition Statistics from Semistructured Data

Extracting Partition Statistics from Semistructured Data Extrating Partition Statistis from Semistrutured Data John N. Wilson Rihard Gourlay Robert Japp Mathias Neumüller Department of Computer and Information Sienes University of Strathlyde, Glasgow, UK {jnw,rsg,rpj,mathias}@is.strath.a.uk

More information

Calculation of typical running time of a branch-and-bound algorithm for the vertex-cover problem

Calculation of typical running time of a branch-and-bound algorithm for the vertex-cover problem Calulation of typial running time of a branh-and-bound algorithm for the vertex-over problem Joni Pajarinen, Joni.Pajarinen@iki.fi Otober 21, 2007 1 Introdution The vertex-over problem is one of a olletion

More information

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract

Learning Convention Propagation in BeerAdvocate Reviews from a etwork Perspective. Abstract CS 9 Projet Final Report: Learning Convention Propagation in BeerAdvoate Reviews from a etwork Perspetive Abstrat We look at the way onventions propagate between reviews on the BeerAdvoate dataset, and

More information

1 The Knuth-Morris-Pratt Algorithm

1 The Knuth-Morris-Pratt Algorithm 5-45/65: Design & Analysis of Algorithms September 26, 26 Leture #9: String Mathing last hanged: September 26, 27 There s an entire field dediated to solving problems on strings. The book Algorithms on

More information

A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR

A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR Malaysian Journal of Computer Siene, Vol 10 No 1, June 1997, pp 36-41 A DYNAMIC ACCESS CONTROL WITH BINARY KEY-PAIR Md Rafiqul Islam, Harihodin Selamat and Mohd Noor Md Sap Faulty of Computer Siene and

More information

Drawing lines. Naïve line drawing algorithm. drawpixel(x, round(y)); double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx; double y = y0;

Drawing lines. Naïve line drawing algorithm. drawpixel(x, round(y)); double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx; double y = y0; Naïve line drawing algorithm // Connet to grid points(x0,y0) and // (x1,y1) by a line. void drawline(int x0, int y0, int x1, int y1) { int x; double dy = y1 - y0; double dx = x1 - x0; double m = dy / dx;

More information

Pipelined Multipliers for Reconfigurable Hardware

Pipelined Multipliers for Reconfigurable Hardware Pipelined Multipliers for Reonfigurable Hardware Mithell J. Myjak and José G. Delgado-Frias Shool of Eletrial Engineering and Computer Siene, Washington State University Pullman, WA 99164-2752 USA {mmyjak,

More information

Folding. Hardware Mapped vs. Time multiplexed. Folding by N (N=folding factor) Node A. Unfolding by J A 1 A J-1. Time multiplexed/microcoded

Folding. Hardware Mapped vs. Time multiplexed. Folding by N (N=folding factor) Node A. Unfolding by J A 1 A J-1. Time multiplexed/microcoded Folding is verse of Unfolding Node A A Folding by N (N=folding fator) Folding A Unfolding by J A A J- Hardware Mapped vs. Time multiplexed l Hardware Mapped vs. Time multiplexed/mirooded FI : y x(n) h

More information

HEXA: Compact Data Structures for Faster Packet Processing

HEXA: Compact Data Structures for Faster Packet Processing Washington University in St. Louis Washington University Open Sholarship All Computer Siene and Engineering Researh Computer Siene and Engineering Report Number: 27-26 27 HEXA: Compat Data Strutures for

More information

A Novel Validity Index for Determination of the Optimal Number of Clusters

A Novel Validity Index for Determination of the Optimal Number of Clusters IEICE TRANS. INF. & SYST., VOL.E84 D, NO.2 FEBRUARY 2001 281 LETTER A Novel Validity Index for Determination of the Optimal Number of Clusters Do-Jong KIM, Yong-Woon PARK, and Dong-Jo PARK, Nonmembers

More information

UCSB Math TI-85 Tutorials: Basics

UCSB Math TI-85 Tutorials: Basics 3 UCSB Math TI-85 Tutorials: Basis If your alulator sreen doesn t show anything, try adjusting the ontrast aording to the instrutions on page 3, or page I-3, of the alulator manual You should read the

More information

A Partial Sorting Algorithm in Multi-Hop Wireless Sensor Networks

A Partial Sorting Algorithm in Multi-Hop Wireless Sensor Networks A Partial Sorting Algorithm in Multi-Hop Wireless Sensor Networks Abouberine Ould Cheikhna Department of Computer Siene University of Piardie Jules Verne 80039 Amiens Frane Ould.heikhna.abouberine @u-piardie.fr

More information

Recommendation Subgraphs for Web Discovery

Recommendation Subgraphs for Web Discovery Reommation Subgraphs for Web Disovery Arda Antikaioglu Department of Mathematis Carnegie Mellon University aantika@andrew.mu.edu R. Ravi Tepper Shool of Business Carnegie Mellon University ravi@mu.edu

More information

Outline: Software Design

Outline: Software Design Outline: Software Design. Goals History of software design ideas Design priniples Design methods Life belt or leg iron? (Budgen) Copyright Nany Leveson, Sept. 1999 A Little History... At first, struggling

More information

O Type of array element

O Type of array element ! " #! $ % % # & : ; a ontiguous sequene of variables. all of the sae type. Eah variable is identified by its index. Index values are integers. Index of first entry is. ' ( ) * + May /,. - ( & ( ( J K

More information

Using Game Theory and Bayesian Networks to Optimize Cooperation in Ad Hoc Wireless Networks

Using Game Theory and Bayesian Networks to Optimize Cooperation in Ad Hoc Wireless Networks Using Game Theory and Bayesian Networks to Optimize Cooperation in Ad Ho Wireless Networks Giorgio Quer, Federio Librino, Lua Canzian, Leonardo Badia, Mihele Zorzi, University of California San Diego La

More information

Finding the Equation of a Straight Line

Finding the Equation of a Straight Line Finding the Equation of a Straight Line You should have, before now, ome aross the equation of a straight line, perhaps at shool. Engineers use this equation to help determine how one quantity is related

More information

Chapter 4. Divide-and-Conquer. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

Chapter 4. Divide-and-Conquer. Copyright 2007 Pearson Addison-Wesley. All rights reserved. Chapter 4 Divide-and-Conquer Copyright 2007 Pearson Addison-Wesley. All rights reserved. Divide-and-Conquer The most-well known algorithm design strategy: 2. Divide instance of problem into two or more

More information

represent = as a finite deimal" either in base 0 or in base. We an imagine that the omputer first omputes the mathematial = then rounds the result to

represent = as a finite deimal either in base 0 or in base. We an imagine that the omputer first omputes the mathematial = then rounds the result to Sientifi Computing Chapter I Computer Arithmeti Jonathan Goodman Courant Institute of Mathemaial Sienes Last revised January, 00 Introdution One of the many soures of error in sientifi omputing is inexat

More information

Acoustic Links. Maximizing Channel Utilization for Underwater

Acoustic Links. Maximizing Channel Utilization for Underwater Maximizing Channel Utilization for Underwater Aousti Links Albert F Hairris III Davide G. B. Meneghetti Adihele Zorzi Department of Information Engineering University of Padova, Italy Email: {harris,davide.meneghetti,zorzi}@dei.unipd.it

More information

Sparse Certificates for 2-Connectivity in Directed Graphs

Sparse Certificates for 2-Connectivity in Directed Graphs Sparse Certifiates for 2-Connetivity in Direted Graphs Loukas Georgiadis Giuseppe F. Italiano Aikaterini Karanasiou Charis Papadopoulos Nikos Parotsidis Abstrat Motivated by the emergene of large-sale

More information

with respect to the normal in each medium, respectively. The question is: How are θ

with respect to the normal in each medium, respectively. The question is: How are θ Prof. Raghuveer Parthasarathy University of Oregon Physis 35 Winter 8 3 R EFRACTION When light travels from one medium to another, it may hange diretion. This phenomenon familiar whenever we see the bent

More information

Boosted Random Forest

Boosted Random Forest Boosted Random Forest Yohei Mishina, Masamitsu suhiya and Hironobu Fujiyoshi Department of Computer Siene, Chubu University, 1200 Matsumoto-ho, Kasugai, Aihi, Japan {mishi, mtdoll}@vision.s.hubu.a.jp,

More information

A {k, n}-secret Sharing Scheme for Color Images

A {k, n}-secret Sharing Scheme for Color Images A {k, n}-seret Sharing Sheme for Color Images Rastislav Luka, Konstantinos N. Plataniotis, and Anastasios N. Venetsanopoulos The Edward S. Rogers Sr. Dept. of Eletrial and Computer Engineering, University

More information

And, the (low-pass) Butterworth filter of order m is given in the frequency domain by

And, the (low-pass) Butterworth filter of order m is given in the frequency domain by Problem Set no.3.a) The ideal low-pass filter is given in the frequeny domain by B ideal ( f ), f f; =, f > f. () And, the (low-pass) Butterworth filter of order m is given in the frequeny domain by B

More information

13.1 Numerical Evaluation of Integrals Over One Dimension

13.1 Numerical Evaluation of Integrals Over One Dimension 13.1 Numerial Evaluation of Integrals Over One Dimension A. Purpose This olletion of subprograms estimates the value of the integral b a f(x) dx where the integrand f(x) and the limits a and b are supplied

More information

PHYS 3437: Computational Methods in Physics, Assignment 2

PHYS 3437: Computational Methods in Physics, Assignment 2 PHYS 3437: Computational Methods in Physis, Assignment 2 Set January 27th due Feb 26th NOTE: This assignment is potentially quite lengthy if you are urrently developing your programming skills. If so,

More information

Parametric Abstract Domains for Shape Analysis

Parametric Abstract Domains for Shape Analysis Parametri Abstrat Domains for Shape Analysis Xavier RIVAL (INRIA & Éole Normale Supérieure) Joint work with Bor-Yuh Evan CHANG (University of Maryland U University of Colorado) and George NECULA (University

More information

An Optimized Approach on Applying Genetic Algorithm to Adaptive Cluster Validity Index

An Optimized Approach on Applying Genetic Algorithm to Adaptive Cluster Validity Index IJCSES International Journal of Computer Sienes and Engineering Systems, ol., No.4, Otober 2007 CSES International 2007 ISSN 0973-4406 253 An Optimized Approah on Applying Geneti Algorithm to Adaptive

More information

Approximate logic synthesis for error tolerant applications

Approximate logic synthesis for error tolerant applications Approximate logi synthesis for error tolerant appliations Doohul Shin and Sandeep K. Gupta Eletrial Engineering Department, University of Southern California, Los Angeles, CA 989 {doohuls, sandeep}@us.edu

More information

Analysis of input and output configurations for use in four-valued CCD programmable logic arrays

Analysis of input and output configurations for use in four-valued CCD programmable logic arrays nalysis of input and output onfigurations for use in four-valued D programmable logi arrays J.T. utler H.G. Kerkhoff ndexing terms: Logi, iruit theory and design, harge-oupled devies bstrat: s in binary,

More information

Unit-2 Divide and conquer 2016

Unit-2 Divide and conquer 2016 2 Divide and conquer Overview, Structure of divide-and-conquer algorithms, binary search, quick sort, Strassen multiplication. 13% 05 Divide-and- conquer The Divide and Conquer Paradigm, is a method of

More information

Implementing Load-Balanced Switches With Fat-Tree Networks

Implementing Load-Balanced Switches With Fat-Tree Networks Implementing Load-Balaned Swithes With Fat-Tree Networks Hung-Shih Chueh, Ching-Min Lien, Cheng-Shang Chang, Jay Cheng, and Duan-Shin Lee Department of Eletrial Engineering & Institute of Communiations

More information

Divide-and-Conquer. The most-well known algorithm design strategy: smaller instances. combining these solutions

Divide-and-Conquer. The most-well known algorithm design strategy: smaller instances. combining these solutions Divide-and-Conquer The most-well known algorithm design strategy: 1. Divide instance of problem into two or more smaller instances 2. Solve smaller instances recursively 3. Obtain solution to original

More information

Flow Demands Oriented Node Placement in Multi-Hop Wireless Networks

Flow Demands Oriented Node Placement in Multi-Hop Wireless Networks Flow Demands Oriented Node Plaement in Multi-Hop Wireless Networks Zimu Yuan Institute of Computing Tehnology, CAS, China {zimu.yuan}@gmail.om arxiv:153.8396v1 [s.ni] 29 Mar 215 Abstrat In multi-hop wireless

More information

Cluster-based Cooperative Communication with Network Coding in Wireless Networks

Cluster-based Cooperative Communication with Network Coding in Wireless Networks Cluster-based Cooperative Communiation with Network Coding in Wireless Networks Zygmunt J. Haas Shool of Eletrial and Computer Engineering Cornell University Ithaa, NY 4850, U.S.A. Email: haas@ee.ornell.edu

More information

Abstract. Key Words: Image Filters, Fuzzy Filters, Order Statistics Filters, Rank Ordered Mean Filters, Channel Noise. 1.

Abstract. Key Words: Image Filters, Fuzzy Filters, Order Statistics Filters, Rank Ordered Mean Filters, Channel Noise. 1. Fuzzy Weighted Rank Ordered Mean (FWROM) Filters for Mixed Noise Suppression from Images S. Meher, G. Panda, B. Majhi 3, M.R. Meher 4,,4 Department of Eletronis and I.E., National Institute of Tehnology,

More information

8 Instruction Selection

8 Instruction Selection 8 Instrution Seletion The IR ode instrutions were designed to do exatly one operation: load/store, add, subtrat, jump, et. The mahine instrutions of a real CPU often perform several of these primitive

More information

Orientation of the coordinate system

Orientation of the coordinate system Orientation of the oordinate system Right-handed oordinate system: -axis by a positive, around the -axis. The -axis is mapped to the i.e., antilokwise, rotation of The -axis is mapped to the -axis by a

More information

Menu. X + /X=1 and XY+X /Y = X(Y + /Y) = X

Menu. X + /X=1 and XY+X /Y = X(Y + /Y) = X Menu K-Maps and Boolean Algera >Don t ares >5 Variale Look into my... 1 Karnaugh Maps - Boolean Algera We have disovered that simplifiation/minimization is an art. If you see it, GREAT! Else, work at it,

More information

Chapter 8: Right Triangle Trigonometry

Chapter 8: Right Triangle Trigonometry Haberman MTH 11 Setion I: The Trigonometri Funtions Chapter 8: Right Triangle Trigonometry As we studied in Part 1 of Chapter 3, if we put the same angle in the enter of two irles of different radii, we

More information

Algorithms, Mechanisms and Procedures for the Computer-aided Project Generation System

Algorithms, Mechanisms and Procedures for the Computer-aided Project Generation System Algorithms, Mehanisms and Proedures for the Computer-aided Projet Generation System Anton O. Butko 1*, Aleksandr P. Briukhovetskii 2, Dmitry E. Grigoriev 2# and Konstantin S. Kalashnikov 3 1 Department

More information

8 : Learning Fully Observed Undirected Graphical Models

8 : Learning Fully Observed Undirected Graphical Models 10-708: Probabilisti Graphial Models 10-708, Spring 2018 8 : Learning Fully Observed Undireted Graphial Models Leturer: Kayhan Batmanghelih Sribes: Chenghui Zhou, Cheng Ran (Harvey) Zhang When learning

More information

Facility Location: Distributed Approximation

Facility Location: Distributed Approximation Faility Loation: Distributed Approximation Thomas Mosibroda Roger Wattenhofer Distributed Computing Group PODC 2005 Where to plae ahes in the Internet? A distributed appliation that has to dynamially plae

More information

Introduction to Algorithms February 24, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Handout 8

Introduction to Algorithms February 24, 2004 Massachusetts Institute of Technology Professors Erik Demaine and Shafi Goldwasser Handout 8 Introduction to Algorithms February 24, 2004 Massachusetts Institute of Technology 6046J/18410J Professors Erik Demaine and Shafi Goldwasser Handout 8 Problem Set 2 This problem set is due in class on

More information

Background/Review on Numbers and Computers (lecture)

Background/Review on Numbers and Computers (lecture) Bakground/Review on Numbers and Computers (leture) ICS312 Mahine-Level and Systems Programming Henri Casanova (henri@hawaii.edu) Numbers and Computers Throughout this ourse we will use binary and hexadeimal

More information

Vertex Cover Approximations

Vertex Cover Approximations CS124 Lecture 20 Heuristics can be useful in practice, but sometimes we would like to have guarantees. Approximation algorithms give guarantees. It is worth keeping in mind that sometimes approximation

More information

Query Evaluation Overview. Query Optimization: Chap. 15. Evaluation Example. Cost Estimation. Query Blocks. Query Blocks

Query Evaluation Overview. Query Optimization: Chap. 15. Evaluation Example. Cost Estimation. Query Blocks. Query Blocks Query Evaluation Overview Query Optimization: Chap. 15 CS634 Leture 12 SQL query first translated to relational algebra (RA) Atually, some additional operators needed for SQL Tree of RA operators, with

More information

Bayesian Belief Networks for Data Mining. Harald Steck and Volker Tresp. Siemens AG, Corporate Technology. Information and Communications

Bayesian Belief Networks for Data Mining. Harald Steck and Volker Tresp. Siemens AG, Corporate Technology. Information and Communications Bayesian Belief Networks for Data Mining Harald Stek and Volker Tresp Siemens AG, Corporate Tehnology Information and Communiations 81730 Munih, Germany fharald.stek, Volker.Trespg@mhp.siemens.de Abstrat

More information

Review (Law of sines and cosine) cosines)

Review (Law of sines and cosine) cosines) Date:03/7,8/01 Review 6.1-6. Objetive: Apply the onept to use the law of the sines and osines to solve oblique triangles Apply the onept to find areas using the law of sines and osines Agenda: Bell ringer

More information

Adapting K-Medians to Generate Normalized Cluster Centers

Adapting K-Medians to Generate Normalized Cluster Centers Adapting -Medians to Generate Normalized Cluster Centers Benamin J. Anderson, Deborah S. Gross, David R. Musiant Anna M. Ritz, Thomas G. Smith, Leah E. Steinberg Carleton College andersbe@gmail.om, {dgross,

More information

Selection (deterministic & randomized): finding the median in linear time

Selection (deterministic & randomized): finding the median in linear time Lecture 4 Selection (deterministic & randomized): finding the median in linear time 4.1 Overview Given an unsorted array, how quickly can one find the median element? Can one do it more quickly than bysorting?

More information

Gradient based progressive probabilistic Hough transform

Gradient based progressive probabilistic Hough transform Gradient based progressive probabilisti Hough transform C.Galambos, J.Kittler and J.Matas Abstrat: The authors look at the benefits of exploiting gradient information to enhane the progressive probabilisti

More information

Self-Adaptive Parent to Mean-Centric Recombination for Real-Parameter Optimization

Self-Adaptive Parent to Mean-Centric Recombination for Real-Parameter Optimization Self-Adaptive Parent to Mean-Centri Reombination for Real-Parameter Optimization Kalyanmoy Deb and Himanshu Jain Department of Mehanial Engineering Indian Institute of Tehnology Kanpur Kanpur, PIN 86 {deb,hjain}@iitk.a.in

More information

System-Level Parallelism and Throughput Optimization in Designing Reconfigurable Computing Applications

System-Level Parallelism and Throughput Optimization in Designing Reconfigurable Computing Applications System-Level Parallelism and hroughput Optimization in Designing Reonfigurable Computing Appliations Esam El-Araby 1, Mohamed aher 1, Kris Gaj 2, arek El-Ghazawi 1, David Caliga 3, and Nikitas Alexandridis

More information

Lecture 15 : Review DRAFT

Lecture 15 : Review DRAFT CS/Math 240: Introduction to Discrete Mathematics 3/10/2011 Lecture 15 : Review Instructor: Dieter van Melkebeek Scribe: Dalibor Zelený DRAFT Today slectureservesasareviewofthematerialthatwillappearonyoursecondmidtermexam.

More information

Introductory Programming, IMM, DTU Systematic Software Test. Software test (afprøvning) Motivation. Structural test and functional test

Introductory Programming, IMM, DTU Systematic Software Test. Software test (afprøvning) Motivation. Structural test and functional test Introdutory Programming, IMM, DTU Systemati Software Test Peter Sestoft a Programs often ontain unintended errors how do you find them? Strutural test Funtional test Notes: Systemati Software Test, http://www.dina.kvl.dk/

More information

DECT Module Installation Manual

DECT Module Installation Manual DECT Module Installation Manual Rev. 2.0 This manual desribes the DECT module registration method to the HUB and fan airflow settings. In order for the HUB to ommuniate with a ompatible fan, the DECT module

More information

Chapter 2: Introduction to Maple V

Chapter 2: Introduction to Maple V Chapter 2: Introdution to Maple V 2-1 Working with Maple Worksheets Try It! (p. 15) Start a Maple session with an empty worksheet. The name of the worksheet should be Untitled (1). Use one of the standard

More information

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions

Department of Electrical Engineering and Computer Science MASSACHUSETTS INSTITUTE OF TECHNOLOGY Fall Test I Solutions Department of Eletrial Engineering and Computer iene MAACHUETT INTITUTE OF TECHNOLOGY 6.035 Fall 2016 Test I olutions 1 I Regular Expressions and Finite-tate Automata For Questions 1, 2, and 3, let the

More information

1. The collection of the vowels in the word probability. 2. The collection of real numbers that satisfy the equation x 9 = 0.

1. The collection of the vowels in the word probability. 2. The collection of real numbers that satisfy the equation x 9 = 0. C HPTER 1 SETS I. DEFINITION OF SET We begin our study of probability with the disussion of the basi onept of set. We assume that there is a ommon understanding of what is meant by the notion of a olletion

More information

A Unified Subdivision Scheme for Polygonal Modeling

A Unified Subdivision Scheme for Polygonal Modeling EUROGRAPHICS 2 / A. Chalmers and T.-M. Rhyne (Guest Editors) Volume 2 (2), Number 3 A Unified Subdivision Sheme for Polygonal Modeling Jérôme Maillot Jos Stam Alias Wavefront Alias Wavefront 2 King St.

More information

9.4 Exponential Growth and Decay Functions

9.4 Exponential Growth and Decay Functions Setion 9. Eponential Growth and Dea Funtions 56 9. Eponential Growth and Dea Funtions S Model Eponential Growth. Model Eponential Dea. Now that we an graph eponential funtions, let s learn about eponential

More information

Comparison Sorts. Chapter 9.4, 12.1, 12.2

Comparison Sorts. Chapter 9.4, 12.1, 12.2 Comparison Sorts Chapter 9.4, 12.1, 12.2 Sorting We have seen the advantage of sorted data representations for a number of applications Sparse vectors Maps Dictionaries Here we consider the problem of

More information

Plot-to-track correlation in A-SMGCS using the target images from a Surface Movement Radar

Plot-to-track correlation in A-SMGCS using the target images from a Surface Movement Radar Plot-to-trak orrelation in A-SMGCS using the target images from a Surfae Movement Radar G. Golino Radar & ehnology Division AMS, Italy ggolino@amsjv.it Abstrat he main topi of this paper is the formulation

More information

COMP Data Structures

COMP Data Structures COMP 2140 - Data Structures Shahin Kamali Topic 5 - Sorting University of Manitoba Based on notes by S. Durocher. COMP 2140 - Data Structures 1 / 55 Overview Review: Insertion Sort Merge Sort Quicksort

More information

Allocating Rotating Registers by Scheduling

Allocating Rotating Registers by Scheduling Alloating Rotating Registers by Sheduling Hongbo Rong Hyunhul Park Cheng Wang Youfeng Wu Programming Systems Lab Intel Labs {hongbo.rong,hyunhul.park,heng..wang,youfeng.wu}@intel.om ABSTRACT A rotating

More information

Graph-Based vs Depth-Based Data Representation for Multiview Images

Graph-Based vs Depth-Based Data Representation for Multiview Images Graph-Based vs Depth-Based Data Representation for Multiview Images Thomas Maugey, Antonio Ortega, Pasal Frossard Signal Proessing Laboratory (LTS), Eole Polytehnique Fédérale de Lausanne (EPFL) Email:

More information

the data. Structured Principal Component Analysis (SPCA)

the data. Structured Principal Component Analysis (SPCA) Strutured Prinipal Component Analysis Kristin M. Branson and Sameer Agarwal Department of Computer Siene and Engineering University of California, San Diego La Jolla, CA 9193-114 Abstrat Many tasks involving

More information

Improved Circuit-to-CNF Transformation for SAT-based ATPG

Improved Circuit-to-CNF Transformation for SAT-based ATPG Improved Ciruit-to-CNF Transformation for SAT-based ATPG Daniel Tille 1 René Krenz-Bååth 2 Juergen Shloeffel 2 Rolf Drehsler 1 1 Institute of Computer Siene, University of Bremen, 28359 Bremen, Germany

More information

A Comparison of Hard-state and Soft-state Signaling Protocols

A Comparison of Hard-state and Soft-state Signaling Protocols University of Massahusetts Amherst SholarWorks@UMass Amherst Computer Siene Department Faulty Publiation Series Computer Siene 2003 A Comparison of Hard-state and Soft-state Signaling Protools Ping Ji

More information

Capturing Large Intra-class Variations of Biometric Data by Template Co-updating

Capturing Large Intra-class Variations of Biometric Data by Template Co-updating Capturing Large Intra-lass Variations of Biometri Data by Template Co-updating Ajita Rattani University of Cagliari Piazza d'armi, Cagliari, Italy ajita.rattani@diee.unia.it Gian Lua Marialis University

More information

Anonymity Trilemma: Strong Anonymity, Low Bandwidth, Low Latency Choose Two

Anonymity Trilemma: Strong Anonymity, Low Bandwidth, Low Latency Choose Two Anonymity Trilemma: Strong Anonymity, Low Bandwidth, Low Lateny Choose Two Debajyoti Das Purdue University, USA das48@purdue.edu Sebastian Meiser University College London, U s.meiser@ul.a.uk Esfandiar

More information

The Alpha Torque and Quantum Physics

The Alpha Torque and Quantum Physics The Alpha Torque and Quantum Physis Zhiliang Cao, Henry Cao williamao15000@yahoo.om, henry.gu.ao@gmail.om July 18, 010 Abstrat In the enter of the unierse, there isn t a super massie blak hole or any speifi

More information

1 Introduction. Abstract

1 Introduction. Abstract Computing Faes in Segment and Simplex Arrangements (Preliminary Version) NANCY M. AMATO MICHAEL T. GOODRICH y EDGAR A. RAMOS z Texas A&M Univ. Johns Hopkins Univ. Univ. of Illinois amato@s.tamu.edu goodrih@s.jhu.edu

More information

Lecture Notes 3: Data summarization

Lecture Notes 3: Data summarization Lecture Notes 3: Data summarization Highlights: Average Median Quartiles 5-number summary (and relation to boxplots) Outliers Range & IQR Variance and standard deviation Determining shape using mean &

More information

Accommodations of QoS DiffServ Over IP and MPLS Networks

Accommodations of QoS DiffServ Over IP and MPLS Networks Aommodations of QoS DiffServ Over IP and MPLS Networks Abdullah AlWehaibi, Anjali Agarwal, Mihael Kadoh and Ahmed ElHakeem Department of Eletrial and Computer Department de Genie Eletrique Engineering

More information

Divide-and-Conquer. Dr. Yingwu Zhu

Divide-and-Conquer. Dr. Yingwu Zhu Divide-and-Conquer Dr. Yingwu Zhu Divide-and-Conquer The most-well known algorithm design technique: 1. Divide instance of problem into two or more smaller instances 2. Solve smaller instances independently

More information

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2

On - Line Path Delay Fault Testing of Omega MINs M. Bellos 1, E. Kalligeros 1, D. Nikolos 1,2 & H. T. Vergos 1,2 On - Line Path Delay Fault Testing of Omega MINs M. Bellos, E. Kalligeros, D. Nikolos,2 & H. T. Vergos,2 Dept. of Computer Engineering and Informatis 2 Computer Tehnology Institute University of Patras,

More information

Reduced-Complexity Column-Layered Decoding and. Implementation for LDPC Codes

Reduced-Complexity Column-Layered Decoding and. Implementation for LDPC Codes Redued-Complexity Column-Layered Deoding and Implementation for LDPC Codes Zhiqiang Cui 1, Zhongfeng Wang 2, Senior Member, IEEE, and Xinmiao Zhang 3 1 Qualomm In., San Diego, CA 92121, USA 2 Broadom Corp.,

More information

12 Rational Functions

12 Rational Functions Funtions Conepts: The Definition of a Funtion Identifing Funtions Finding the Domain of a Funtion The Big-Little Priniple Vertial and Horizontal Asmptotes The Graphs of Funtions (Setion.) Definition. A

More information

Improved Consensus Clustering via Linear Programming

Improved Consensus Clustering via Linear Programming Pro. 33rd Australasian Computer Siene Conferene (ACSC 2010), Brisbane, Australia Improved Consensus Clustering via Linear Programming Niholas Downing 1 Peter J. Stukey 1,2 Anthony Wirth 1 1 Department

More information

(Refer Slide Time: 01.26)

(Refer Slide Time: 01.26) Data Structures and Algorithms Dr. Naveen Garg Department of Computer Science and Engineering Indian Institute of Technology, Delhi Lecture # 22 Why Sorting? Today we are going to be looking at sorting.

More information

Performance of Histogram-Based Skin Colour Segmentation for Arms Detection in Human Motion Analysis Application

Performance of Histogram-Based Skin Colour Segmentation for Arms Detection in Human Motion Analysis Application World Aademy of Siene, Engineering and Tehnology 8 009 Performane of Histogram-Based Skin Colour Segmentation for Arms Detetion in Human Motion Analysis Appliation Rosalyn R. Porle, Ali Chekima, Farrah

More information

Scheduling Multiple Independent Hard-Real-Time Jobs on a Heterogeneous Multiprocessor

Scheduling Multiple Independent Hard-Real-Time Jobs on a Heterogeneous Multiprocessor Sheduling Multiple Independent Hard-Real-Time Jobs on a Heterogeneous Multiproessor Orlando Moreira NXP Semiondutors Researh Eindhoven, Netherlands orlando.moreira@nxp.om Frederio Valente Universidade

More information

XML Data Streams. XML Stream Processing. XML Stream Processing. Yanlei Diao. University of Massachusetts Amherst

XML Data Streams. XML Stream Processing. XML Stream Processing. Yanlei Diao. University of Massachusetts Amherst XML Stream Proessing Yanlei Diao University of Massahusetts Amherst XML Data Streams XML is the wire format for data exhanged online. Purhase orders http://www.oasis-open.org/ommittees/t_home.php?wg_abbrev=ubl

More information

NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION. Ken Sauer and Charles A. Bouman

NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION. Ken Sauer and Charles A. Bouman NONLINEAR BACK PROJECTION FOR TOMOGRAPHIC IMAGE RECONSTRUCTION Ken Sauer and Charles A. Bouman Department of Eletrial Engineering, University of Notre Dame Notre Dame, IN 46556, (219) 631-6999 Shool of

More information

1. Inversions. A geometric construction relating points O, A and B looks as follows.

1. Inversions. A geometric construction relating points O, A and B looks as follows. 1. Inversions. 1.1. Definitions of inversion. Inversion is a kind of symmetry about a irle. It is defined as follows. he inversion of degree R 2 entered at a point maps a point to the point on the ray

More information

The Implementation of RRTs for a Remote-Controlled Mobile Robot

The Implementation of RRTs for a Remote-Controlled Mobile Robot ICCAS5 June -5, KINEX, Gyeonggi-Do, Korea he Implementation of RRs for a Remote-Controlled Mobile Robot Chi-Won Roh*, Woo-Sub Lee **, Sung-Chul Kang *** and Kwang-Won Lee **** * Intelligent Robotis Researh

More information

CleanUp: Improving Quadrilateral Finite Element Meshes

CleanUp: Improving Quadrilateral Finite Element Meshes CleanUp: Improving Quadrilateral Finite Element Meshes Paul Kinney MD-10 ECC P.O. Box 203 Ford Motor Company Dearborn, MI. 8121 (313) 28-1228 pkinney@ford.om Abstrat: Unless an all quadrilateral (quad)

More information

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Divide and Conquer

Computer Science 385 Analysis of Algorithms Siena College Spring Topic Notes: Divide and Conquer Computer Science 385 Analysis of Algorithms Siena College Spring 2011 Topic Notes: Divide and Conquer Divide and-conquer is a very common and very powerful algorithm design technique. The general idea:

More information