Faster Shortest Paths in Dense Distance Graphs, with Applications

Size: px
Start display at page:

Download "Faster Shortest Paths in Dense Distance Graphs, with Applications"

Transcription

1 Faster Shortest Paths n Dense Dstance Graphs, wth Applcatons Shay Mozes IDC Herzlya smozes@dc.ac.l Yahav Nussbaum Unversty of Hafa yahav.nussbaum@cs.tau.ac.l Oren Wemann Unversty of Hafa oren@cs.hafa.ac.l Abstract We show how to combne two technques for effcently computng shortest paths n drected planar graphs. The frst s the lnear-tme shortest-path algorthm of Henznger, Klen, Subramanan, and Rao [STOC 94]. The second s Fakcharoenphol and Rao s algorthm [FOCS 01] for emulatng Djkstra s algorthm on the dense dstance graph (DDG). A DDG s defned for a decomposton of a planar graph G nto regons of at most r vertces each, for some parameter r < n. The vertex set of the DDG s the set of Θ(nr 1/2 ) vertces of G that belong to more than one regon (boundary vertces). The DDG has Θ(n) arcs, such that dstances n the DDG are equal to the dstances n G. Fakcharoenphol and Rao s mplementaton of Djkstra s algorthm on the DDG (ncknamed FR-Djkstra) runs n O(n log(n)r 1/2 log r) tme, and s a key component n many state-of-the-art planar graph algorthms for shortest paths, mnmum cuts, and maxmum flows. By combnng these two technques we remove the log n dependency n the runnng tme of the shortest-path algorthm at the prce of an addtonal log r factor, makng t O(nr 1/2 log 2 r). Ths work s part of a research agenda that ams to develop new technques that would lead to faster, possbly lnear-tme, algorthms for problems n planar graphs such as mnmum-cut, maxmum-flow, and shortest paths wth negatve arc lengths. As mmedate applcatons, we show how to compute maxmum flow n drected weghted planar graphs n O(n log p) tme, and mnmum st-cut n undrected weghted planar graphs n O(n log log p) tme, where p s the mnmum number of edges on any path from the source to the snk. We also show how to compute any part of the DDG that corresponds to a regon wth r vertces and k boundary vertces n O(r log k) tme, whch s faster than has been prevously known for small values of k. The research was supported n part by Israel Scence Foundaton grants 794/13 and 592/17.

2 1 Introducton Fndng shortest paths and maxmum flows are among the most fundamental optmzaton problems n graph theory. On planar graphs, these problems are ntmately related and can all be solved n lnear or near-lnear tme. Obtanng strctly-lnear tme algorthms for these problems s one of the man current goals of the planar graphs communty [11,22]. Some of these problems are known to be solvable n lnear tme (mnmum spannng tree [33], shortest-paths wth non-negatve lengths [20], maxmum flow wth unt capactes [11], undrected unweghted global mn-cut [9]), but for many others, only nearly-lnear tme algorthms are known. These nclude shortest-paths wth negatve lengths [13, 31, 36], multple-source shortest-paths [6, 7, 28], max-flow/mn-st-cut [3 5, 12, 22], and global mn-cut [8, 32, 34]. Many of the results mentoned above were acheved farly recently, along wth the development of more sophstcated shortest paths technques n planar graphs. In ths paper we show how to combne two of these technques: the technque of Henznger, Klen, Rao, and Subramanan for computng shortest paths wth non-negatve lengths n lnear tme [20], and the technque of Fakcharoenphol and Rao to compute shortest paths on dense dstance graphs n nearly lnear tme n the number of vertces [13]. The dense dstance graph (DDG) s an mportant element n many of the algorthms mentoned above. It s a non-planar graph that represents (exactly) dstances among a subset of the vertces of the underlyng planar graph G. More precsely, an r-dvson [14] of an n-vertex planar graph G, for some r < n, s a dvson of G (.e., a partton of G s edge-set) nto O(n/r) subgraphs (called regons) {G }, where each regon has at most r vertces and O( r) boundary vertces (vertces that the regon shares wth other regons). There exst r-dvsons of planar graphs wth the addtonal property that the boundary vertces n each regon le on a constant number of faces (called holes) [1, 13, 30, 39]. Another property that we can obtan s that each boundary vertex belongs to a constant number of regons. Ths can be acheved by frst ensurng that each vertex of G has constant degree (say by trangulatng the dual graph wth zero-length edges) and then usng the algorthm of [30]. Consder an r-dvson of G for some r < n. Let K be the complete graph on the O( r) boundary vertces of the regon G, where the length of arc uv s the u-to-v dstance n G. The graph K s called the DDG of G. The unon K s called the DDG of G (or more precsely, the DDG of the gven r-dvson of G). 1 DDGs are useful for three man reasons. Frst, dstances n the DDG of G are the same as dstances n G. Second, t s possble (FR-Djkstra [13]) to compute shortest paths n DDGs n tme that s nearly lnear n the number of vertces of the DDG (.e., n sublnear tme n the number of vertces of G). Fnally, DDGs can be computed n nearly lnear tme ether by nvokng FR-Djkstra recursvely, or by usng a multple source shortest-path algorthm [7, 28] (MSSP). Untl the current work, the latter method was faster n all cases. Snce t was ntroduced n 2001, FR-Djkstra has been used creatvely as a subroutne n many algorthms. These nclude algorthms for shortest paths wth negatve lengths [13], maxmum flows and mnmum cuts [4, 5, 22, 32], dstance oracles [6, 13, 24, 28, 35, 37], and DDG constructons [13]. Improvng FR-Djkstra s therefore an mportant task wth mplcatons to all these problems. For example, consder the mnmum st-cut problem n undrected planar graphs. Italano et. al [22] gave an O(n log log n) algorthm for the problem, mprovng the O(n log n) algorthms of Frederckson [14] 1 DDGs are smlarly defned for decompostons whch are not r-dvsons, but our algorthm does not necessarly apply n such cases. 1

3 and of Ref [38] (usng [20]). Three of the technques used by Italano et al. are: () constructng an r-dvson wth r = polylog(n) n O(n log r) tme, () FR-Djkstra, and () constructng the DDG n O(n log r) tme. In a step towards a lnear tme algorthm for ths fundamental problem, Arge et al. [1], and ndependently Klen et al [30] gave an O(n) algorthm for constructng an r dvson wth few holes. 2 Ths leaves the constructon of the DDG as the only current bottleneck for obtanng mn-st-cut n O(n) tme. The work descrbed n the current paper s motvated by the desre to obtan such a lnear tme algorthm, and partally addresses technques () and (). It mproves the runnng tme of FR-Djkstra, and, as a consequence, mples faster DDG constructon, although for a lmted case whch s not the one requred n [22]. The lnear tme algorthm for shortest-paths wth nonnegatve lengths n planar graphs of Henznger, Klen, Rao, and Subramanan [20] (HKRS) s another landmark result that has been used n many subsequent algorthms. HKRS [20] dffers from Djkstra s algorthm n that the order n whch t relaxes the arcs s not determned by the vertex wth the current globally mnmum label. Instead, t works wth a recursve dvson of the nput graph nto regons. It handles a regon for a lmted tme perod, and then skps to other regons. Wthn ths tme perod t determnes the order of relaxatons accordng to the vertex wth mnmum label n the current regon, thus avodng the need to perform many operatons on a large heap. Planarty, or more precsely the exstence of small recursve separators, guarantees that local relaxatons have lmted global effects. Therefore, even though some arcs are relaxed by HKRS more than once, the overall runnng tme can be shown (by a farly complcated argument) to be O(n). Even though HKRS has been ntroduced roughly 20 years ago and has been used n many other algorthms, to the best of our knowledge, and unlke other mportant planarty explotng technques, t has always been used as a black box, and was not modfed or extended pror to the current work Our results By combnng the framework of Henznger et al. (HKRS) wth a modfcaton of the nternal buldng blocks of Fakcharoenphol and Rao s Djkstra mplementaton (FR-Djkstra), we obtan a faster algorthm for computng shortest paths on dense dstance graphs. On the conceptual level, ths work s the frst to suggest and acheve a combnaton of these two powerful technques. Furthermore, t s the frst to mprove the nternal buldng blocks of FR-Djkstra, and the frst to demonstrate a dfferent use for the framework of HKRS. Specfcally, for a DDG over an r dvson of an n-vertex graph, FR-Djkstra runs n O(n log(n)r 1/2 log r). We remove the logarthmc dependency on n, and present an algorthm whose runnng tme s O(nr 1/2 log 2 r). Ths s the frst asymptotc mprovement over FR-Djkstra. The mprovement s useful n algorthms that use an r-dvson when r s small (say r = polylog(n)). When r s large (say r = poly(n)) our algorthm has the same complexty as FR-Djkstra. However, for ths case, Gawrychowsk and Karczmarz [16] recently presented a followup on our work that acheves a runnng tme of O(nr 1/2 log 2 (n)/ log 2 (log n)). 2 The algorthm n [30] produces a recursve r-dvson wth few holes (.e., one n whch each regon s further dvded recursvely wth an r dvson untl constant szed regons are acheved) n lnear tme, whereas the one n [1] does not. A recursve r-dvson s used n ths paper and may be essental for obtanng lnear tme r dvson based algorthms. 3 Tazar and Müller-Hannemann [40] extended [20] to mnor-closed graph classes, but that extenson uses the algorthm of [20] wthout change. It deals wth the ssue of achevng constant degree n mnor-closed classes of graphs, whch was overlooked n [20]. 2

4 Our overall algorthm resembles that of HKRS [20]. However, n our algorthm, the bottom level regons are not ndvdual edges (as n HKRS), but hyperedges, whch are mplemented by a sutably modfed verson of bpartte Monge heaps (the man workhorse of FR-Djkstra [13]). One of the man challenges n combnng the two technques s that the effcency of FR-Djkstra crtcally reles on the order of relaxatons performed by Djkstra s algorthm, whereas HKRS does not mplement Djkstra s algorthm. In partcular, n Djkstra s algorthm, once a vertex s handled (.e., extracted from the heap), ts dstance wll never change agan. In HKRS ths s far from beng true. The dstance label of a vertex may decrease after t has been handled, causng t to be handled multple tmes. A new dea s requred to allow the specalzed data structure of FR to be used n an algorthm lke HKRS. We develop a new knd of dynamc Range Mnmum Query (RMQ) data structure for Monge matrces (see Secton 2.1 for the defnton). Ths data structure can be used to mplement some of the functonalty of Fakcharoenphol and Rao s bpartte Monge heaps. Our dynamc RMQ data structure s agnostc to the order of relaxatons. It allows us to deactvate a vertex when t s handled, and reactvate t f ts dstance label subsequently decreases. Another dffculty s that the HKRS algorthm requres accurate dstance labels as t shfts ts attenton between dfferent regons. Ths s acheved n HKRS by performng explct relaxatons. In our case, however, the relaxatons are performed mplctly, causng lmted avalablty of explct and accurate dstance labels. We use a new auxlary constructon and careful coordnaton n the mplementaton of the HKRS algorthm to resolve ths conflct. Fnally, the analyss of HKRS has to be modfed. Frst, t must be adapted to work wth hyperedges. Second, the choce of regon szes n the recursve r dvson needs to be carefully tghtened. Ths s because the analyss of HKRS proved lnear runnng-tme n the number of arcs of the planar graph G, whch s O(n). In our case the number of arcs n the DDG s stll O(n), but we want lnear runnng-tme n the number of vertces of the DDG, whch s only O(n/ r). 1.2 Applcatons We beleve that our fast shortest-path algorthm on dense dstance graphs s a step towards optmal algorthms for the mportant and fundamental problems mentoned n the ntroducton. In addton, we descrbe three current applcatons of our mprovement. In these applcatons we obtan a speedup over prevous algorthms by decomposng a regon of n vertces usng an r-dvson, and computng dstances among the boundary vertces of the regon n O((n/ r) log 2 r) tme usng our fast shortest-path algorthm. Drected Maxmum Flow. In drected weghted planar graphs, we show how to compute maxmum st-flow (and mn-st-cut) n O(n log p) tme f there s some path from s to t wth at most p vertces. The parameter p appears n the tme bounds of several prevous maxmum flow and mnmum cut algorthms [2,21,23,26]. Our O(n log p) bound matches the fastest prevously known maxmum flow algorthms n drected weghted planar graphs for p = Θ(1) [23] and for log p = Θ(log n) [3,12], and s asymptotcally faster than prevous algorthms for all other values of p. See Secton 5.2. Undrected Mnmum st-cut. In undrected weghted planar graphs, we show how to compute mnmum st-cut n O(n log log p) tme f there s some path from s to t wth at most p vertces. Ths mproves the fastest prevous algorthms of O(n log p) [26] and O(n log log n) [22] for small values of p. See Secton 5.3. Fast constructon of DDGs wth few boundary vertces. The current bottleneck n varous shortest 3

5 paths and maxmum flow algorthms n planar graphs (e.g., mn-st-cut n an undrected graph [22], shortest paths wth negatve lengths [36]) s computng all boundary-to-boundary dstances n a graph wth n vertces and k = O( n) boundary vertces that le on a sngle face. Currently, the fastest way to compute these k 2 dstances s to use the MSSP algorthm [7, 28]. After O(n log n) preprocessng, t can report the dstance from any boundary vertex to any other vertex (boundary or not) n O(log n) tme, so all boundary-to-boundary dstances can be found n O((n + k 2 ) log n) = O(n log n) tme. We gve an algorthm that computes the dstances among the k boundary vertces n O(n log k) tme. Ths algorthm can be used to construct a DDG of a regon wth n vertces and k = O( n) boundary vertces n O(n log k) tme. In general, ths does not mprove the O(n log n) DDG constructon tme usng MSSP snce typcally k = Θ( n). However, there s an mprovement when k s much smaller. For k = polylog(n), our algorthm takes O(n log log n) tme. See Secton 5.1. We conclude ths secton by dscussng the nterestng open problem of computng a DDG of a regon wth n vertces of whch k = O( n) are boundary vertces. As we already mentoned, the conventonal way of computng a DDG s applyng Klen s MSSP algorthm [12, 28], whch requres O(n log n) tme regardless of the value of k. The MSSP algorthm mplctly computes all the shortest-path trees rooted at vertces of a face φ by gong around the face φ and for every boundary vertex v of φ dentfyng the pvots (arc changes) from the tree rooted at the vertex precedng v on φ to the tree rooted at v. Esenstat and Klen [11] showed an Ω(n log k) lower bound on the number of comparsons that any MSSP algorthm requres for dentfyng all the pvots. 4 Our algorthm can be used to compute the DDG of a regon n O(n log k) tme wthout computng all the pvots. Note, however, that t does not break the Ω(n log k) lower bound. The DDG computaton problem may be an easer problem than the MSSP problem, snce we are nterested only n the O(k 2 ) dstances among the boundary vertces and we are not requred to compute the pvots. Whether the DDG of a regon can be computed n o(n log k) remans an open problem. 1.3 Roadmap We begn wth some prelmnares. In Secton 2.1 we descrbe Monge matrces and ther basc propertes. We contnue n Secton 2.2 wth a descrpton of Fakcharoenphol and Rao s FR-Djkstra algorthm and the Monge heap data structure. Ths descrpton s essental snce we modfy the nternal structure of the Monge heaps to acheve our results. In Secton 3 we gve a warmup mprovement of FR-Djkstra by ntroducng a new RMQ data structure nto the Monge heaps. Ths mprovement decouples the logarthmc dependency on n from the logarthmc dependency on r. In Secton 4 we present our man result that elmnates the logarthmc dependency on n altogether by combnng the shortest-path algorthm of Henznger et al. wth modfed Monge heaps smlar to those descrbed n the warmup. Fnally, the applcatons of our algorthm to drected maxmum flow, undrected mnmum st-cut, and DDG computaton are descrbed n Secton 5. 2 Prelmnares 2.1 Monge matrces A matrx M s Monge f for any par of rows < j and columns k < l we have that M k + M jl M l + M jk. A partal Monge matrx s a Monge matrx wth some undefned entres, such that the 4 In fact they showed an Ω(n log n) lower bound by usng a face φ wth n boundary vertces; generalzng the same proof for a face wth k vertces gves the Ω(n log k) bound. 4

6 defned entres n each row and n each column are contguous. It s well known (cf. [31]) that the upper and lower trangles of the (weghted) adjacency matrx M of K are partal Monge matrces. 5 Consder a Monge martx M wth m rows and n columns, where m n. Denote r(j) = f the mnmum element of M n column j les n row. The upper envelope E of all the rows of the matrx M conssts of the n values r(1),..., r(n). An mmedate consequence of the Monge property s that r(1)... r(n), and so E can be mplctly represented n O(m) space by storng only the r(j) s of O(m) columns called breakponts. Breakponts are the columns j where r(j) r(j + 1). The mnmum element r(π) of an entre column π can then be retreved n O(log m) tme by a bnary search for the frst breakpont column j after π, and settng r(π) = r(j). 2.2 FR-Djkstra [13] We now descrbe FR-Djkstra, whch s an emulaton of Djkstra s algorthm on the dense dstance graph. Parts of our descrpton devate from the orgnal descrpton of [13] and were adapted from [29]. We emphasze that ths descrpton s not new, and s provded as a bass for the modfcatons ntroduced n subsequent sectons. Recall Djkstra s algorthm. It mantans a heap of vertces labeled by estmates d( ) of ther dstances from the root. At each teraton, the vertex wth mnmum d( ) s Actvated; It s extracted from the heap, and all ts adjacent arcs are relaxed. FR-Djkstra mplements ExtractMn and Actvate effcently. Recall that the DDG s the unon of complete graphs {K }. The vertces of each K correspond to the O( r) boundary vertces of a regon of an r dvson wth a constant number of holes. We assume n our descrpton that each regon has a sngle hole. There s a standard way to handle a constant number of holes usng the sngle hole case wth only a constant factor overhead (cf. [13, Secton 5], [24, Secton 5.2], and [36, Secton 4.4]). There s a natural cyclc order on the vertces of K accordng to ther order on the sngle face (hole) of the correspondng regon. To mplement ExtractMn and Actvate effcently, each complete graph K n the DDG s decomposed nto complete bpartte graphs. The advantage of workng wth bpartte graphs s that ther weghted ncdence matrx s Monge (not just partal Monge). The vertces of K are frst splt nto two consecutve halves A and B, the complete bpartte graph on A and B s added to the decomposton, and the same process s appled recursvely on A and on B. Therefore, the total number of bpartte subgraphs n the decomposton of K s r. Each vertex of K appears n O(log r) bpartte subgraphs. See Fgure 1. 5 The order of the rows and columns n M s defned by orderng the boundary vertces of K n a clockwse or counterclockwse manner. 5

7 splt the remanng submatrces A A and B B n the same way, untl we get to sequ of length 1. See Fgure 18 for an llustraton. Together, all the submatrces defned b recursve parttonng of M are parwse dsjont and cover M. Note that each boundary s contaned n O(log r) submatrces. B A A v B A B (a) Submatrces resultng from the frst three levels of the recursve de- (b) Illustraton of the correspondng parttons of boundary nodes. Fgure 9.2: Illustraton of the decomposton of M nto Monge Submatrces. Fgure 1: The decomposton of K nto complete bpartte can also beallvewed asnawhch a partcular composton graphs are shown. (left) The shaded bparttons blocks requre further decomposnode v appears are ndcated. partton of the ncdence matrx of K nto Monge matrces (rght). ton. Fgure 18: Illustraton of the decomposton of M nto Monge Submatrces. Let H = {Hj } denote the set of all bpartte graphs n the decompostons of all K s. Note ntalzaton of the heap conssts of computng (explctly, all entres o that H = O(n/ r). The algorthm mantans The a data-structure MjMonge, called a Monge Heap, for each 6 splttng t nto submatrces, and constructng the range mnma bpartte graph Hj H. Let A, B be the bpartton of Hj s vertces. The Monge heap supports:data structures. Sn boundary nodes le on a sngle hole, computng the entres of M (.e., dstances betwe pars of boundary nodes) takes O(r log r) tme and O(r) space usng Klen s multple-s Actvate(a, d) - Sets the label of vertex ashortest-path A to bealgorthm d, and [38] mplctly relaxes allbeoutgong arcs (see also [14]). It can easly verfed that all the other task be performed wthn the same tme and space bounds. Ths entre process s done once, d from a. Ths operaton may be called at most once per vertex. preprocessng, before handlng any query or update. FndMn - Returns the vertex v B wth mnmum label among vertces not yet Durng a dstance computaton we mantan, for extracted. each submatrx M, a bpartte Mong heap (Fakcharoenphol and Rao call t a bpartte on-lne Monge searchng data structure), ExtractMn - Removes the vertex v B supports wth mnmum among vertces yetbpartte extracted. the Mongelabel heap operatons restrctednot to the subgraph that M repre usng the fact that the submatrx has the Monge property. The mnmum elements of all the Monge heaps are mantaned n a regular global heap Q. In bpartte Monge subheap. The bpartte Monge each teraton of FR-Djkstra, a vertex v wththe global mnmum label s extracted from Q. Thesubheap vertexh of a Monge subm M wth a set of rows A and a set of columns B mantans a dstance label (u) for every v s then extracted from the Monge heap Muj 2that contrbuted v, and the new mnmum vertex of A. Intally (u) = 1 for every u 2 A. The dstance label of a node v 2 B s defn Mj s added to Q. Note that snce a vertex be v appears nu multple H s, v may be extracted as the (v) = mn A { (u) + Muvj} (recall that Muv = dp (u, v)) and s not stored explctly every node v 2 Bonce we mantan a btmonge ndcatngheap whether v has already mnmum element of the global heap Q multple tmes, for each t appears n.been extracted from not.frst Intally all vnodes of B are n HAt. Athat node tme, v s extracted from at H when t has the sm However, the label d(v) of v s fnalzed at the tme s extracted. and only dstance label among all nodes n the global heap H and therefore also n the Monge heap that tme, the algorthm marks v as fnalzed,contanng actvates usng Actvate all Monge such H.vThe monotoncty of thensmallest label nheaps Djkstra s algorthm mples that that v A, and updates the representatves vofsthose Monge heaps n Q. decrease n (u) for a node u 2 A cannot cause extracted from H a subsequent decrease: the value of (u) (whch wll always be lower bounded by d(s, v)) cannot be sm Analyss of FR-Djkstra. Snce each vertex appears O(log graphs than the value ofn (v) whenr)t bpartte was extracted from HH. j n H, the The bpartte Monge subheap structure supports followngone operatons (H number of tmes each vertex s extracted from the global heap Q s O(log r). Snce Q the contans the followng notaton): representatve element from each Monge heap Mj, extractng the mnmum element from Q takes O(log(n/ r)) = O(log n) tme. Therefore, the total tme spent on extractng vertces from Q s 29 O((n/ r) log n log r). As for the cost of operatons on the Monge heaps, Actvate and ExtractMn are called at most once per vertex n each Monge heap, and the number of calls to FndMn s bounded by the number of calls to Actvate and ExtractMn. We next show how to mplement each of these operatons n O(log r) tme. Snce each vertex appears n O(log r) Monge heaps, the total tme spent on operatons on the Monge heaps s O((n/ r) log2 r). 6 In [13] these are called bpartte Monge heaps. All the bpartte Monge heaps that belong to the same complete graph K are aggregated nto a sngle data structure whch [13] calls Monge heap. We do not use ths aggregaton. 6 s mpl

8 Implementng Monge heaps. Let M be the Monge heap of a bpartte subgraph wth columns A and B and a correspondng ncdence matrx M. For every vertex v B we mantan a bt ndcatng whether v has already been extracted from M (.e., fnalzed) or not. The dstance label of a vertex v B s defned to be d(v) = mn u A {d(u)+m uv } and s not stored explctly. Instead, we say that u A s the parent of v B f d(u) s fnte and d(v) = d(u) + M uv. As the algorthm progresses, the dstance labels d(u) of vertces u A (hence the parents of vertces v B) may change. We mantan a bnary search tree T of trplets (a A, b 1 B, b 2 B) ndcatng that a s the current parent of all vertces of B between b 1 and b 2. Note that a vertex a A may appear n more than one trplet because, after extractng vertces of B, the non-extracted vertces of whch a s a parent mght consst of several ntervals. The Monge property of M guarantees that f a precedes a n A then all ntervals of a precede all ntervals of a. Fnally, the Monge heap structure also conssts of a standard heap Q B contanng, for every trplet (a, b 1, b 2 ) T, a vertex b between b 1 and b 2 that mnmzes d(b) = d(a) + M ab. The operatons on a Monge heap are mplemented as follows: FndMn: Return a vertex b wth mnmum dstance label n Q B. ExtractMn: Extract the vertex b wth mnmum dstance label from Q B and mark b as extracted. Fnd the (unque) trplet (a, b 1, b 2 ) contanng b n T. Let b and b be the members of B that precede and follow b, respectvely, wthn ths trplet. The algorthm replaces the trplet (a, b 1, b 2 ) wth two trplets (a, b 1, b ) and (a, b, b 2 ) (f these ntervals are defned). In each of these new trplets t fnds the vertex b that mnmzes d(b ) = d(a) + M ab and nserts b nto Q B. The vertex b s the mnmum entry of M n a gven row and a range of columns. It s found n O(log r) tme usng a standard 1-dmensonal statc RMQ data structure 7 on each column of M. Actvate(a, d): Set d(a) = d and fnd the chldren of a n B. If a s the frst vertex n the Monge heap for whch ths operaton s appled then all the vertces of B are chldren of a. Otherwse, we show how to fnd the chldren of a whose current parent precedes a n A (the ones whose current parent follows a n A are found symmetrcally). We traverse the trplets n T one by one backwards startng wth trplet t = (w, f 1, f 2 ) such that w precedes a n A. We contnue untl we reach a trplet t = (u, b 1, b 2 ) such that d(u) + M ub2 < d(a) + M ab2. If t = t we do nothng. If we scanned all trplets precedng t wthout fndng t then the frst chld of a must belong to the last trplet t = (v, g 1, g 2 ) that we scanned. It s found by a bnary search on the nterval of B between g 1 and g 2. Otherwse, the frst chld of a must belong to the trplet t = (v, g 1, g 2 ) followng t, and can agan be found va bnary search. Let x (resp., y) be the frst (resp., last) chld of a n B, as obtaned n the precedng step. Note that there are no extracted vertces between x and y n B. Ths s because we fnd the dstances n monotoncally ncreasng order, and when we extract a vertex b t s the mnmum n the global heap Q so t wll never acqure a new parent. We therefore nsert a new trplet (a, x, y) nto T. We remove from T all other trplets contanng vertces between x and y, and remove from Q B the elements contrbuted by these trplets. Let (u, b 1, b 2 ) be the removed trplet that contans x. If x b 1 then we nsert a new trplet (u, b 1, z 1 ) where z 1 s the vertex precedng x n B. Smlarly, f (w, b 1, b 2 ) s the removed trplet that contans y and y b 2 then we nsert a new trplet (w, z 2, b 2 ) where z 2 s the vertex followng y n B. Fnally, we update the three values that the new trplets (a, x, y), (u, b 1, z 1 ), and (w, z 2, b 2 ) contrbute to Q B. We fnd these values by a range mnmum query to the RMQ data structure. 7 Any balanced search tree can be used for such RMQ data structure. 7

9 Analyss of Monge heaps. Clearly, FndMn takes O(1) tme. Both ExtractMn and Actvate nsert a constant number of new trplets to T n O(log r) tme, make a constant number of range-mnmum queres n O(log r) tme, and update the representatves of the new trplets n the heap Q B n O(log r) tme. Actvate(a, d), however, may traverse many trplets to dentfy the chldren of a. Snce all except at most two of the trplets that t traverses are removed, we can charge ther traversal and removal to ther nserton n a prevous ExtractMn or Actvate. 3 A Warmup Improvement of FR-Djkstra In ths secton we show how to modfy FR-Djkstra from O((n/ r)(log n log r)) to O((n/ r)(log n+ log 2 r log log r)). Ths mproves FR-Djkstra for small values of r and s obtaned by avodng the vertex copes n the global heap Q usng a decremental RMQ data structure. Recall that, at any gven tme, the global heap Q of FR-Djkstra mantans O(n/ r) tems one tem for each Monge heap. However, each vertex has copes n O(log r) Monge heaps so overall O((n/ r) log r) tems are extracted from Q. Each extracton takes O(log(n/ r)) = O(log n) tme so the complexty of FR-Djkstra s O((n/ r) log r log n). In our modfed algorthm the global heap Q contans, for each vertex v, a sngle tem whose key s the mnmum label over all copes of v. In other words, Q mantans a total of O(n/ r) tems throughout the entre executon. An tem that corresponds to a vertex v s extracted from Q only once. The extracton takes O(log n) tme, but may cause O(log r) calls to DecreaseKey. Usng a Fbonacc heap [15] for Q, DecreaseKey only takes O(1) tme. Note that the total number of operatons on Q s stll O((n/ r) log r). The man problem wth havng one copy s that a trplet (a, x, y) n a Monge heap mght now contan extracted vertces between x and y n B. The orgnal mplementaton of FR-Djkstra uses an elementary RMQ data structure (a bnary search tree for each row of the r r matrx M). Ths data structure s only quered on ntervals [x, y] that have no extracted vertces. To cope wth query ntervals [x, y] that have extracted vertces we present a dynamc RMQ data structure that can handle extractons: Lemma 1. Gven an n n partal Monge matrx M, one can construct n O(n log n) tme a dynamc data structure that supports the followng operatons: (1) n O(log 3 n) tme, set all entres of a gven column as nactve (2) n O(log 3 n) tme, set all entres of a gven column as actve (3) n O(log 2 n) tme, report the mnmum actve entry n a query row and a contguous range of columns. For a decremental data structure n whch only operatons 1 and 3 are allowed, operaton 1 can be supported n amortzed O(log 2 n log log n) tme and operaton 3 n worst case O(log n log log n) tme. The proof of Lemma 1 appears below. Note that we stated the above lemma for partal Monge matrces and not full Monge matrces. Ths s because we apply the RMQ data structure to the upper and lower trangles of the r r ncdence matrx M of K (whch are partal Monge) as opposed to FR-Djkstra that uses a separate RMQ for each bpartte subgraph (whose correspondng submatrx s full Monge) of K s decomposton. In ths secton we only deactvate columns of M and never actvate columns. Therefore, we use the second data structure n Lemma 1. The frst data structure n Lemma 1 s used n Secton 4. We now prove Lemma 1. Proof. It s known that the undefned entres n a partal Monge matrx M can be mplctly replaced so that M becomes fully Monge and each entry M j can be returned n O(1) tme. Such procedure was frst shown n [18] but the proof had an error that was fxed n [17]. Note that ths procedure 8

10 does not preserve row mnma, as the mplctly replaced entres may be small. Therefore, such a transformaton s useless when dealng wth (entre) row mnmum queres n partal Monge matrces. However, we consder row mnmum queres restrcted to a contguous range of columns that does not nclude any replaced entres. Therefore, we may assume that M s fully Monge. To make the presentaton clear (and compatble wth [24]), we prove the lemma on the transpose of M (.e., we actvate and deactvate rows and a query s a column and a range of rows). Furthermore, although the lemma states that M s an n n matrx, we consder an m n matrx for some m n. The statc data structure of [24]. We frst revew the statc data structure of [24], and then modfy t to support row actvaton and deactvaton. The tree T h ntroduced n [24] s a full bnary tree T h whose leaves are the rows of M. A node u whose subtree contans k leaves (.e., k rows) stores the O(k) breakponts of the k n matrx M u defned by these k rows and all n columns of M (each breakpont also stores ts approprate row ndex). A leaf represents a sngle row and requres no computaton. For an nternal node u, we compute ts lst of breakponts by mergng the breakpont lsts of ts left chld u l and ts rght chld u r, where u l s the chld whose rows have lower ndces. By the Monge property, u s lst of breakponts starts wth a prefx of u l s breakponts and ends wth a suffx of u r s breakponts. Between these there s possbly one new breakpont j (the transton breakpont). The prefx and suffx parts can be found easly n O(k) tme by lnearly comparng the relatve order of the upper envelopes of M ul and M ur. Ths allows us to fnd an nterval of columns contanng the transton column j. Over ths nterval, the transton row s n one of two rows (a row n M ul and a row n M ur ), and so j can be found n O(log n) tme va bnary search. Summng O(k + log n) over all nodes of T h gves O(n log n) tme. The total sze of T h s O(m log m). A query to T h s performed as follows. The mnmum entry n a query column π and a contguous range of rows R s found by dentfyng O(log m) canoncal nodes of T h. A node u s canoncal f u s set of rows s contaned n R but the set of rows of u s parent s not. For each such canoncal node u, the mnmum element n column π amongst all the rows of u s found n O(log m) tme va bnary search on u s lst of breakponts. The output s the smallest of these. The total query tme s thus O(log 2 m). A dynamc data structure. The above T h data structure was used n [24] n a statc verson, whch allowed the query tme to be mproved from O(log 2 m) to O(log m) usng fractonal cascadng [10]. In order to allow actvatng/deactvatng of a row we slghtly modfy ths data structure and do not use fractonal cascadng. Instead of storng all ts breakponts, every node u of T h wll now only store ts sngle transton breakpont. In order to fnd the mnmum element n column π of M u, we need to fnd the predecessor breakpont of π n M u. Ths s done n O(log m) tme by followng a path n u s subtree startng from u and endng n a leaf. At each node v on ths path we decde whether to vst v s left or rght chld accordng to whether π s smaller than v s transton breakpont or not. Gven a query column and a contguous range of rows we agan dentfy O(log m) canoncal nodes. Each of them now requres followng a path of length O(log m) for a total of O(log 2 m) tme. In order to deactvate an entre row r, we mark ths row s leaf n T h as nactve and then fx the breakponts bottom-up on the entre path from r to the root of T h. When we handle a node u on ths path, the transton breakponts for all descendants of u are correct and we fnd the new transton breakpont j of u as follows: If u has left chld u l and rght chld u r then j should be 9

11 placed between a breakpont j l of M ul and a breakpont j r of M ur. Here, M ul and M ur correspond to the actve rows n u l s and u r s subtrees. If there are no actve rows n u l s or u r s subtrees then fndng j s trval. If both have actve rows then we now show how to fnd j l, fndng j r s done smlarly. To fnd j l, we follow a path from u l downwards (.e., toward the leaves) untl we reach a leaf or a node whose subtree contans no actve rows as follows. Recall that the node u l stores a sngle breakpont (a row ndex and a column ndex j ). Snce (, j ) s the mnmum entry n column j of M ul we want to compare t wth (, j ) = the mnmum entry n column j of M ur. If M[, j ] < M[, j ] then we know that j > j and so we can proceed from u l to u l s rght chld. Smlarly, f M[, j ] M[, j ] then j j and we proceed from u l to u l s left chld. The problem s we do not know. To fnd t, we need to fnd the mnmum entry n column j of M ur. We have already seen how to do ths n O(log m) tme by followng a downward path from u r. We therefore get that fndng j l (and smlarly j r ) can be done n O(log 2 m) tme. After fndng j l and j r we fnd where j s between them n O(log n) tme va bnary search. The overall tme for deactvatng an entre row r s thus O(log 3 m + log m log n) = O(log 3 n). In order to actvate an entre row r we mark ts leaf n T h as actve and fx the breakponts from r upwards usng a smlar process as above. Ths completes the proof of the dynamc data structure. A decremental data structure. We now proceed to provng the decremental data structure n whch nactve rows never become actve. We take advantage of ths fact by mantanng, for each node u of T h, not only ts transton breakpont but all the actve breakponts of M u. Snce breakponts are ntegers bounded by n, we can mantan u s k actve breakponts n an O(k)-space O(log log n) amortzed query-tme predecessor data structure such as Y-fast-tres [41]. Gven a query column and a contguous range of rows, we dentfy O(log m) canoncal nodes n T h and then only need to do a predecessor search on each of them n total O(log m log log n) tme. In order to deactvate a row r, we mark r s leaf n T h as nactve and fx the predecessor data structures of r s ancestors. For each node u on the r-to-root path we may need to change u s transton breakpont as well as nsert (possbly many) new breakponts nto u s predecessor data structure Y u. We show how to do ths assumng u s left chld u l s the ancestor of r and we ve already fxed ts predecessor data structure Y l. The case where u s rght chld u r s the ancestor of r s handled symmetrcally. Note that, f r s a descendent of u l, then the transton breakpont and the predecessor data structure Y r of u r undergo no changes. We frst check whether u s old transton breakpont has row ndex r. If not then we don t need to change u s transton breakpont. If t s, then we delete u s old transton breakpont from Y u and we fnd the new transton breakpont j of u va bnary search. The bnary search takes O(log n log log n) tme snce each comparson requres to query Y l and Y r n O(log log n) tme. After fndng the new transton breakpont j we nsert t nto Y u. Fnally, we need to nsert to Y u (possbly many) new breakponts, each n O(log log n) tme. These breakponts are precsely all the breakponts n Y l that are to the left of j and to the rght of predecessor(j) n Y u as well as all the breakponts n Y r that are to the rght of j and to the left of successor(j) n Y u. We clam that the above procedure requres O(log 2 n log log n) amortzed tme. Frst note that fndng the new transton breakponts of all O(log m) nodes on the r-to-root path takes O(log m log n log log n) tme. Insertng these new breakponts nto the predecessor data structures and deletng the old one takes O(log m log log n) tme. Next, we need to bound the overall number 10

12 of breakponts that are ever nserted nto predecessor data structures. In the begnnng, all rows are actve and the total number of breakponts n all predecessor data structures s O(m log m). Then, whenever we deactvate a row, each node u on the leaf-to-root path n T h may nsert a new transton breakpont j nto Y u. Ths breakpont j mght consequently be nserted nto every Y v where v s an ancestor of u. Let top(j) denote the depth of the hghest ancestor of u to whch we wll consequently nsert the breakpont j (the depth of the root s 0). Note that we mght also nsert to Y u other breakponts but that only means that ther top value would decrease. Snce every top value s at most O(log m) and snce top values only decrease (there are only deactvatons, no actvatons), ths means that over all the m row deactvatons only O(m log 2 m) breakponts are ever nserted. Ths means that all nsertons take O(m log 2 m log log n) tme. 3.1 Modfyng FR-Djkstra. We already mentoned that we want Q to be a Fbonacc heap and to nclude one tem per boundary vertex v. We also change the Monge heaps so that Q B now contans, for every trplet (a, b 1, b 2 ), a vertex that mnmzes d(b) = d(a) + M ab among vertces b between b 1 and b 2 that were not yet extracted from Q. If all vertces between b 1 and b 2 were already extracted then the trplet has no representatve n Q B. As n FR-Djkstra, n each teraton a mnmum tem, correspondng to a vertex v, s extracted from Q n O(log n) tme. In FR-Djkstra v s then extracted from the (unque) Monge heap M j that contrbuted v and the new mnmum vertex of M j s added to Q. In our algorthm, v s extracton from Q affects all the O(log r) M j s that nclude v n ther B. Before handlng any of them we apply operaton (1) of the RMQ data structure of Lemma 1 n O(log 2 r log log r) tme. Then, for each such M j, f v was the mnmum of some trplet (a, b 1, b 2 ) then we apply the followng operatons: (I) remove v from Q B n O(log r) tme, (II) query n O(log r log log r) tme the RMQ data structure of Lemma 1 for vertex b = RMQ(b 1, b 2 ), (III) nsert b nto Q B n O(log r) tme. Note that we do not replace the trplet (a, b 1, b 2 ) wth two trplets as done n ExtractMn n [13]. Fnally, f v was also the mnmum of Q B then let w be the new mnmum of Q B. If w s value n Q s larger than n Q B, then we update t n Q usng DecreaseKey n constant tme. Next, we need to actvate v n all M j s that have v n ther A. Ths s done exactly as n FR-Djkstra by removng (possbly many) trplets from T and nsertng three new trplets. We now fnd the mnmum n each of these three trplets by queryng the RMQ data structure of Lemma 1. Fnally, we update Q B and f ths changes the mnmum element w of Q B and w s value n Q s larger than n Q B, then we update t n Q usng DecreaseKey n constant tme. To summarze, each vertex v of the O(n/ r) vertces s extracted once from Q n O(log n) tme. For each such extracton we do a sngle RMQ column deactvaton n O(log 2 r log log r) tme, we do O(log r) RMQ queres n total O(log 2 r log log r) tme ncurrng O(log r) DecreaseKey operatons on Q n total O(log r) tme, we actvate v n O(log 2 r) tme, and fnally we do O(log r) updates to Q B n total O(log 2 r) tme ncurrng O(log r) DecreaseKey operatons on Q n total O(log r) tme. The overall complexty s thus O((n/ r)(log n + log 2 r log log r)). 4 The Man Algorthm In ths secton we descrbe our man result: Combnng the modfed FR-Djkstra from the prevous secton wth HKRS [20] to obtan a shortest-path algorthm that runs n O((n/ r) log 2 r) tme. 11

13 Algorthm 1 Preprocess(G, r) Requre: G s an n-vertex drected planar graph wth non-negatve arc lengths and degree at most 3. r < n. 1: let r = (r 1, r 2,..., r k ) be such that r 1 = r and r = r 1 2 for every > 1. 2: compute a recursve r dvson of G wth a constant number of holes 3: for each regon R of the r 1 dvson do 4: compute the dense dstance graph of R 5: ntalze all bpartte Monge heaps of R 6: end for Preprocessng. Our algorthm frst performs the preprocessng steps outlned n Algorthm 1, and descrbed here n more detal. A recursve r dvson wth r = (r 1, r 2,..., r k ) s a decomposton tree of G n whch the root corresponds to the entre graph G and the nodes at heght correspond to regons that form an r dvson of G. Throughout the paper we use r-dvsons wth a constant number of holes. Our algorthm dffers from HKRS [20] n our choce of r 1 = r and r = r 1 2 (n HKRS r 1 = θ(1), and r = 2 O(r 1) ). Ths results n a decomposton tree of heght roughly log log n (n HKRS t s roughly log n). For 1, the regons of the r dvson are called heght- regons. The heght of a vertex v s defned as the largest nteger such that v s a boundary vertex of a heght- regon. Our algorthm computes the recursve r dvson n lnear tme usng the algorthm of [30]. We assume the nput graph G has degree at most three (ths can be obtaned n lnear tme by trangulatng the dual graph wth zero-length edges). Wth ths assumpton the algorthm of [30] can be easly modfed to return an r dvson n whch, for every, each vertex v belongs to at most three heght- regons. We next descrbe the heght-0 regons. In [20], heght-0 regons consst of ndvdual arcs. We defne heght-0 regons dfferently. We begn by descrbng an auxlary constructon and then defne heght-0 regons of two types. Consder a heght-1 regon R (that s, R s a regon wth r 1 = r edges and O( r) boundary vertces). The DDG of R s a complete weghted graph over the boundary vertces of R, so t has O( r) vertces and O(r) edges. Consder the set of Monge Heaps (MHs) of R. Each MH h corresponds to a bpartte graph wth vertex sets A h and B h. Each boundary vertex v of R appears n O(log r) MHs. For each occurrence of v on the B h sde of some MH h, we create a copy v h of v. Vertces of G such as v are called natural vertces, and v h s called a copy of v. Each natural vertex has O(log r) copes. We add a zero length arc from every v h to v. Each of these newly added arcs s the sngle element n a dstnct heght-0 regon of R. The label of such an arc (and hence the label of the correspondng heght-0 regon) s defned (as n [20]) to be the label of ts tal. It s ntalzed to. Let h be a MH. For every vertex v A h, we construct a hyperarc e (drected hyperedge) whose tal s v and whose heads are {w h : w B h }. We assocate e wth the MH h. Each hyperarc e s the sngle element n a dstnct heght-0 regon of R. The label of ths heght-0 regon s defned to be the label of the tal of e, and t s ntalzed to. Note that the arcs of the DDG do not belong to any regon R n the algorthm. Rather, an arc of the DDG s represented n the algorthm n two ways; by a hyperarc, and by the Monge heap to whch t belongs. Therefore, from now on we may refer to an arc vw of the DDG as an arc vw h, and to a vertex w B h as the copy w h. To summarze, there are two types of heght-0 regons. The frst type contans a sngle arc from a copy v h of a natural vertex v to v. The second type contans a sngle hyperarc whose tal s a natural vertex v and that represents all the arcs emanatng from v n a MH h. 12

14 4.1 Modfed Monge Heaps We now descrbe a modfcaton of Monge Heaps. Let h be a MH. The arcs of the DDG represented by h all have ther tals n A h and heads n B h. Let d(v) denote the current label of vertex v, and let l(vw) denote the length of the v-to-w arc n the DDG. At any gven tme a vertex w h B h s the chld of exactly one vertex v A h (the only excepton s that upon ntalzaton, no vertex s assgned a parent). We defne a state of a vertex. A vertex w h B h can be ether actve or nactve. Intally all vertces are actve. Our modfed Monge Heaps support the followng operatons: MH-Relax(h, v) - Implctly relax all arcs of MH h emanatng from vertex v A h. Internally, adds to the set of chldren of v all the vertces n B h whose labels decreased because of these relaxatons. Ths operaton actvates any of the newly acqured chldren of v that were nactve. MH-GetMnChld(h, v) - Returns the actve chld w h of v n MH h mnmzng l(vw h ). MH-Extract(v h ) - Makes vertex v h nactve n MH h. Let u be the parent of v h n MH h. Returns the actve chld w h of u n h mnmzng l(uw h ). The dea for mplementng the modfed Monge heaps s to replace the rgd mechansm that handles vertex extracton n Fakcharoenphol and Rao s Monge heaps by dynamc RMQ data structures that support column deactvatons and reactvatons. We dscuss two mplementatons of the modfed Monge heaps. These mplementatons are summarzed n the followng lemma. Lemma 2. There exst two mplementatons of the above modfed MH wth the followng constructon tme (for all MHs of all regons n an r dvson of an n-vertex graph), and operaton tmes: 1. O((n/ r) log 2 r) constructon tme and O(log 3 r) tme per operaton. 2. O(n log r) constructon tme and O(log r) tme per operaton. In some applcatons, n partcular n those that work wth reduced lengths (such as the maxmum flow algorthm of secton 5.2), shortest path computatons on the DDG are performed multple tmes wth slghtly dfferent DDGs. In each tme, the new DDG can be obtaned quckly but the RMQ data structure needs to be bult from scratch. For such applcatons, the fast constructon tme of the frst mplementaton s crucal. For other applcatons, whch perform multple shortest path computatons on the same DDG such as the applcaton n Secton 5.1, the second mplementaton s approprate, and yelds slghtly faster shortest paths computatons. The O(n log r) constructon s not a bottleneck of such applcatons snce t s performed once, and matches the currently fastest known constructon of the DDG. In what follows we denote the tme to perform an MH operaton as O(log cq r) where the constant c q s ether 3 or 1 dependng on the mplementaton choce. In the remander of ths subsecton we prove Lemma 2. Implementaton 1 Ths mplementaton n the statement of the lemma s smlar to that of secton 3 and dffers only n the use of RMQ. In secton 3 we used one RMQ data structure for all MHs of a regon R. Here, each MH requres an RMQ data structure of ts own. Ths means that for = 1,..., log( r), a regon R requres 2 RMQ data structures for r/2 r/2 matrces. Furthermore, n secton 3 we only deactvated vertces and so we could use the decremental RMQ 13

15 of Lemma 1. Here, an nactve vertex can become actve agan and so we use the (slower) dynamc RMQ of Lemma 1. To mplement MH-GetMnChld(h, v) we smply query the RMQ data structure of h n O(log 2 r) tme. To mplement MH-Extract(v h ) we frst deactvate v h n the RMQ of h n O(log 3 r) tme (notce that the deactvaton s done only n h as opposed to secton 3 where a deactvaton apples to all MHs that contan the vertex). Then, we fnd w h by queryng the RMQ of h n O(log 2 r) tme. To mplement MH-Relax(h, v) we frst perform the same procedure as n secton 3 that creates one new trplet and destroys possbly many trplets. Ths takes amortzed O(log r) tme snce destroyng a trplet s pad for by that trplet s creaton (note that as opposed to secton 3 here a trplet of vertex v can be destroyed and then created agan multple tmes). Then, actvatng all the new chldren of v that were nactve takes amortzed O(1) tme snce we can charge the actvaton of a vertex to the tme t was deactvated (n a pror call to MH-Extract). Constructng the dynamc RMQ of Lemma 1 for an x x matrx takes O(x log x) tme. Therefore all RMQ data structures of a regon R are constructed n log( r) =1 2 r/2 log( r/2 ) = O( r log 2 r) tme, and so over all regons we need O((n/ r) log 2 r) tme. Implementaton 2 The second mplementaton n the statement of Lemma 2 s based on the followng smple RMQ. Observaton 1. Gven an n n Monge matrx M, one can construct n O(n 2 log n) tme and O(n 2 ) space a data structure that supports the followng operatons n O(log n) tme: (1) mark an entry as nactve (2) mark an entry as actve (3) report the mnmum actve entry n a query row and a contguous range of columns (or f no such entry exsts). Proof. The data structure s a very naïve one. We smply store, for each row of M, a separate balanced bnary search tree keyed by column number where each node stores the mnmum value n ts subtree. Deactvatng (resp. actvatng) an entry s done by deleton (resp. nserton) nto the tree, and a query s done by takng the mnmum value of O(log n) canoncal nodes dentfed by the query s endponts. Notce that the above naïve RMQ data structure actvates and deactvates sngle entres n M whle the specfcaton of MH-Extract seems to requre actvatng and deactvatng and entre columns of M (The specfcaton s to make v h nactve n the entre MH h). However, actvatng and deactvatng a sngle element suffces. Ths s because each vertex v h B h appears n exactly one trplet at any gven tme. Therefore, whether t s actve or nactve s only mportant n the RMQ of the vertex u A h whose trplet contans v h. Whenever an nactve v h changes parents, we make v h actve by rentroducng the correspondng element nto the RMQ f t was prevously deleted, and charge the actvaton to the tme v h was deactvated n a pror call to MH-Extract. Constructng the naïve data structure on all MHs of a regon R takes log( r) =1 2 ( r/2 ) 2 log( r/2 ) = O(r log r) tme, and so over all regons we need O(n log r) tme. Each operaton on the RMQ now takes only O(log r) tme. Ths means that MH-Relax, MH-GetMnChld, and MH-Extract can all be done n O(log r) amortzed tme. 4.2 Computng Shortest Paths on the DDG The pseudocode of the algorthm s gven below. Parts of the pseudocode appear n black and parts n blue. The black parts descrbe our algorthm, and at ths pont t s enough to focus only on them. 14

CE 221 Data Structures and Algorithms

CE 221 Data Structures and Algorithms CE 1 ata Structures and Algorthms Chapter 4: Trees BST Text: Read Wess, 4.3 Izmr Unversty of Economcs 1 The Search Tree AT Bnary Search Trees An mportant applcaton of bnary trees s n searchng. Let us assume

More information

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique

The Greedy Method. Outline and Reading. Change Money Problem. Greedy Algorithms. Applications of the Greedy Strategy. The Greedy Method Technique //00 :0 AM Outlne and Readng The Greedy Method The Greedy Method Technque (secton.) Fractonal Knapsack Problem (secton..) Task Schedulng (secton..) Mnmum Spannng Trees (secton.) Change Money Problem Greedy

More information

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour

6.854 Advanced Algorithms Petar Maymounkov Problem Set 11 (November 23, 2005) With: Benjamin Rossman, Oren Weimann, and Pouya Kheradpour 6.854 Advanced Algorthms Petar Maymounkov Problem Set 11 (November 23, 2005) Wth: Benjamn Rossman, Oren Wemann, and Pouya Kheradpour Problem 1. We reduce vertex cover to MAX-SAT wth weghts, such that the

More information

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions

Sorting Review. Sorting. Comparison Sorting. CSE 680 Prof. Roger Crawfis. Assumptions Sortng Revew Introducton to Algorthms Qucksort CSE 680 Prof. Roger Crawfs Inserton Sort T(n) = Θ(n 2 ) In-place Merge Sort T(n) = Θ(n lg(n)) Not n-place Selecton Sort (from homework) T(n) = Θ(n 2 ) In-place

More information

An Optimal Algorithm for Prufer Codes *

An Optimal Algorithm for Prufer Codes * J. Software Engneerng & Applcatons, 2009, 2: 111-115 do:10.4236/jsea.2009.22016 Publshed Onlne July 2009 (www.scrp.org/journal/jsea) An Optmal Algorthm for Prufer Codes * Xaodong Wang 1, 2, Le Wang 3,

More information

Design and Analysis of Algorithms

Design and Analysis of Algorithms Desgn and Analyss of Algorthms Heaps and Heapsort Reference: CLRS Chapter 6 Topcs: Heaps Heapsort Prorty queue Huo Hongwe Recap and overvew The story so far... Inserton sort runnng tme of Θ(n 2 ); sorts

More information

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe

CSCI 104 Sorting Algorithms. Mark Redekopp David Kempe CSCI 104 Sortng Algorthms Mark Redekopp Davd Kempe Algorthm Effcency SORTING 2 Sortng If we have an unordered lst, sequental search becomes our only choce If we wll perform a lot of searches t may be benefcal

More information

Greedy Technique - Definition

Greedy Technique - Definition Greedy Technque Greedy Technque - Defnton The greedy method s a general algorthm desgn paradgm, bult on the follong elements: confguratons: dfferent choces, collectons, or values to fnd objectve functon:

More information

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University

All-Pairs Shortest Paths. Approximate All-Pairs shortest paths Approximate distance oracles Spanners and Emulators. Uri Zwick Tel Aviv University Approxmate All-Pars shortest paths Approxmate dstance oracles Spanners and Emulators Ur Zwck Tel Avv Unversty Summer School on Shortest Paths (PATH05 DIKU, Unversty of Copenhagen All-Pars Shortest Paths

More information

1 Dynamic Connectivity

1 Dynamic Connectivity 15-850: Advanced Algorthms CMU, Sprng 2017 Lecture #3: Dynamc Graph Connectvty algorthms 01/30/17 Lecturer: Anupam Gupta Scrbe: Hu Han Chn, Jacob Imola Dynamc graph algorthms s the study of standard graph

More information

Parallel matrix-vector multiplication

Parallel matrix-vector multiplication Appendx A Parallel matrx-vector multplcaton The reduced transton matrx of the three-dmensonal cage model for gel electrophoress, descrbed n secton 3.2, becomes excessvely large for polymer lengths more

More information

Problem Set 3 Solutions

Problem Set 3 Solutions Introducton to Algorthms October 4, 2002 Massachusetts Insttute of Technology 6046J/18410J Professors Erk Demane and Shaf Goldwasser Handout 14 Problem Set 3 Solutons (Exercses were not to be turned n,

More information

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz

Compiler Design. Spring Register Allocation. Sample Exercises and Solutions. Prof. Pedro C. Diniz Compler Desgn Sprng 2014 Regster Allocaton Sample Exercses and Solutons Prof. Pedro C. Dnz USC / Informaton Scences Insttute 4676 Admralty Way, Sute 1001 Marna del Rey, Calforna 90292 pedro@s.edu Regster

More information

Discrete Applied Mathematics. Shortest paths in linear time on minor-closed graph classes, with an application to Steiner tree approximation

Discrete Applied Mathematics. Shortest paths in linear time on minor-closed graph classes, with an application to Steiner tree approximation Dscrete Appled Mathematcs 7 (9) 67 684 Contents lsts avalable at ScenceDrect Dscrete Appled Mathematcs journal homepage: www.elsever.com/locate/dam Shortest paths n lnear tme on mnor-closed graph classes,

More information

Hierarchical clustering for gene expression data analysis

Hierarchical clustering for gene expression data analysis Herarchcal clusterng for gene expresson data analyss Gorgo Valentn e-mal: valentn@ds.unm.t Clusterng of Mcroarray Data. Clusterng of gene expresson profles (rows) => dscovery of co-regulated and functonally

More information

Array transposition in CUDA shared memory

Array transposition in CUDA shared memory Array transposton n CUDA shared memory Mke Gles February 19, 2014 Abstract Ths short note s nspred by some code wrtten by Jeremy Appleyard for the transposton of data through shared memory. I had some

More information

CMPS 10 Introduction to Computer Science Lecture Notes

CMPS 10 Introduction to Computer Science Lecture Notes CPS 0 Introducton to Computer Scence Lecture Notes Chapter : Algorthm Desgn How should we present algorthms? Natural languages lke Englsh, Spansh, or French whch are rch n nterpretaton and meanng are not

More information

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound CSE 326: Data Structures Qucksort Comparson Sortng Bound Steve Setz Wnter 2009 Qucksort Qucksort uses a dvde and conquer strategy, but does not requre the O(N) extra space that MergeSort does. Here s the

More information

CHAPTER 2 DECOMPOSITION OF GRAPHS

CHAPTER 2 DECOMPOSITION OF GRAPHS CHAPTER DECOMPOSITION OF GRAPHS. INTRODUCTION A graph H s called a Supersubdvson of a graph G f H s obtaned from G by replacng every edge uv of G by a bpartte graph,m (m may vary for each edge by dentfyng

More information

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array

Insertion Sort. Divide and Conquer Sorting. Divide and Conquer. Mergesort. Mergesort Example. Auxiliary Array Inserton Sort Dvde and Conquer Sortng CSE 6 Data Structures Lecture 18 What f frst k elements of array are already sorted? 4, 7, 1, 5, 1, 16 We can shft the tal of the sorted elements lst down and then

More information

CSE 326: Data Structures Quicksort Comparison Sorting Bound

CSE 326: Data Structures Quicksort Comparison Sorting Bound CSE 326: Data Structures Qucksort Comparson Sortng Bound Bran Curless Sprng 2008 Announcements (5/14/08) Homework due at begnnng of class on Frday. Secton tomorrow: Graded homeworks returned More dscusson

More information

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search

Sequential search. Building Java Programs Chapter 13. Sequential search. Sequential search Sequental search Buldng Java Programs Chapter 13 Searchng and Sortng sequental search: Locates a target value n an array/lst by examnng each element from start to fnsh. How many elements wll t need to

More information

Parallelism for Nested Loops with Non-uniform and Flow Dependences

Parallelism for Nested Loops with Non-uniform and Flow Dependences Parallelsm for Nested Loops wth Non-unform and Flow Dependences Sam-Jn Jeong Dept. of Informaton & Communcaton Engneerng, Cheonan Unversty, 5, Anseo-dong, Cheonan, Chungnam, 330-80, Korea. seong@cheonan.ac.kr

More information

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following.

Complex Numbers. Now we also saw that if a and b were both positive then ab = a b. For a second let s forget that restriction and do the following. Complex Numbers The last topc n ths secton s not really related to most of what we ve done n ths chapter, although t s somewhat related to the radcals secton as we wll see. We also won t need the materal

More information

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms

Course Introduction. Algorithm 8/31/2017. COSC 320 Advanced Data Structures and Algorithms. COSC 320 Advanced Data Structures and Algorithms Course Introducton Course Topcs Exams, abs, Proects A quc loo at a few algorthms 1 Advanced Data Structures and Algorthms Descrpton: We are gong to dscuss algorthm complexty analyss, algorthm desgn technques

More information

Priority queues and heaps Professors Clark F. Olson and Carol Zander

Priority queues and heaps Professors Clark F. Olson and Carol Zander Prorty queues and eaps Professors Clark F. Olson and Carol Zander Prorty queues A common abstract data type (ADT) n computer scence s te prorty queue. As you mgt expect from te name, eac tem n te prorty

More information

Chapter 6 Programmng the fnte element method Inow turn to the man subject of ths book: The mplementaton of the fnte element algorthm n computer programs. In order to make my dscusson as straghtforward

More information

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss.

Today s Outline. Sorting: The Big Picture. Why Sort? Selection Sort: Idea. Insertion Sort: Idea. Sorting Chapter 7 in Weiss. Today s Outlne Sortng Chapter 7 n Wess CSE 26 Data Structures Ruth Anderson Announcements Wrtten Homework #6 due Frday 2/26 at the begnnng of lecture Proect Code due Mon March 1 by 11pm Today s Topcs:

More information

Programming in Fortran 90 : 2017/2018

Programming in Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Programmng n Fortran 90 : 2017/2018 Exercse 1 : Evaluaton of functon dependng on nput Wrte a program who evaluate the functon f (x,y) for any two user specfed values

More information

Sorting. Sorting. Why Sort? Consistent Ordering

Sorting. Sorting. Why Sort? Consistent Ordering Sortng CSE 6 Data Structures Unt 15 Readng: Sectons.1-. Bubble and Insert sort,.5 Heap sort, Secton..6 Radx sort, Secton.6 Mergesort, Secton. Qucksort, Secton.8 Lower bound Sortng Input an array A of data

More information

5 The Primal-Dual Method

5 The Primal-Dual Method 5 The Prmal-Dual Method Orgnally desgned as a method for solvng lnear programs, where t reduces weghted optmzaton problems to smpler combnatoral ones, the prmal-dual method (PDM) has receved much attenton

More information

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points;

Subspace clustering. Clustering. Fundamental to all clustering techniques is the choice of distance measure between data points; Subspace clusterng Clusterng Fundamental to all clusterng technques s the choce of dstance measure between data ponts; D q ( ) ( ) 2 x x = x x, j k = 1 k jk Squared Eucldean dstance Assumpton: All features

More information

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman)

CS221: Algorithms and Data Structures. Priority Queues and Heaps. Alan J. Hu (Borrowing slides from Steve Wolfman) CS: Algorthms and Data Structures Prorty Queues and Heaps Alan J. Hu (Borrowng sldes from Steve Wolfman) Learnng Goals After ths unt, you should be able to: Provde examples of approprate applcatons for

More information

Private Information Retrieval (PIR)

Private Information Retrieval (PIR) 2 Levente Buttyán Problem formulaton Alce wants to obtan nformaton from a database, but she does not want the database to learn whch nformaton she wanted e.g., Alce s an nvestor queryng a stock-market

More information

Computation of a Minimum Average Distance Tree on Permutation Graphs*

Computation of a Minimum Average Distance Tree on Permutation Graphs* Annals of Pure and Appled Mathematcs Vol, No, 0, 74-85 ISSN: 79-087X (P), 79-0888(onlne) Publshed on 8 December 0 wwwresearchmathscorg Annals of Computaton of a Mnmum Average Dstance Tree on Permutaton

More information

Summarizing Data using Bottom-k Sketches

Summarizing Data using Bottom-k Sketches Summarzng Data usng Bottom-k Sketches Edth Cohen AT&T Labs Research 8 Park Avenue Florham Park, NJ 7932, USA edth@research.att.com Ham Kaplan School of Computer Scence Tel Avv Unversty Tel Avv, Israel

More information

Hermite Splines in Lie Groups as Products of Geodesics

Hermite Splines in Lie Groups as Products of Geodesics Hermte Splnes n Le Groups as Products of Geodescs Ethan Eade Updated May 28, 2017 1 Introducton 1.1 Goal Ths document defnes a curve n the Le group G parametrzed by tme and by structural parameters n the

More information

Module Management Tool in Software Development Organizations

Module Management Tool in Software Development Organizations Journal of Computer Scence (5): 8-, 7 ISSN 59-66 7 Scence Publcatons Management Tool n Software Development Organzatons Ahmad A. Al-Rababah and Mohammad A. Al-Rababah Faculty of IT, Al-Ahlyyah Amman Unversty,

More information

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar

CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vidyanagar CHARUTAR VIDYA MANDAL S SEMCOM Vallabh Vdyanagar Faculty Name: Am D. Trved Class: SYBCA Subject: US03CBCA03 (Advanced Data & Fle Structure) *UNIT 1 (ARRAYS AND TREES) **INTRODUCTION TO ARRAYS If we want

More information

Mathematics 256 a course in differential equations for engineering students

Mathematics 256 a course in differential equations for engineering students Mathematcs 56 a course n dfferental equatons for engneerng students Chapter 5. More effcent methods of numercal soluton Euler s method s qute neffcent. Because the error s essentally proportonal to the

More information

Machine Learning: Algorithms and Applications

Machine Learning: Algorithms and Applications 14/05/1 Machne Learnng: Algorthms and Applcatons Florano Zn Free Unversty of Bozen-Bolzano Faculty of Computer Scence Academc Year 011-01 Lecture 10: 14 May 01 Unsupervsed Learnng cont Sldes courtesy of

More information

Ramsey numbers of cubes versus cliques

Ramsey numbers of cubes versus cliques Ramsey numbers of cubes versus clques Davd Conlon Jacob Fox Choongbum Lee Benny Sudakov Abstract The cube graph Q n s the skeleton of the n-dmensonal cube. It s an n-regular graph on 2 n vertces. The Ramsey

More information

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices

An Application of the Dulmage-Mendelsohn Decomposition to Sparse Null Space Bases of Full Row Rank Matrices Internatonal Mathematcal Forum, Vol 7, 2012, no 52, 2549-2554 An Applcaton of the Dulmage-Mendelsohn Decomposton to Sparse Null Space Bases of Full Row Rank Matrces Mostafa Khorramzadeh Department of Mathematcal

More information

CHAPTER 10: ALGORITHM DESIGN TECHNIQUES

CHAPTER 10: ALGORITHM DESIGN TECHNIQUES CHAPTER 10: ALGORITHM DESIGN TECHNIQUES So far, we have been concerned wth the effcent mplementaton of algorthms. We have seen that when an algorthm s gven, the actual data structures need not be specfed.

More information

Load Balancing for Hex-Cell Interconnection Network

Load Balancing for Hex-Cell Interconnection Network Int. J. Communcatons, Network and System Scences,,, - Publshed Onlne Aprl n ScRes. http://www.scrp.org/journal/jcns http://dx.do.org/./jcns.. Load Balancng for Hex-Cell Interconnecton Network Saher Manaseer,

More information

The Codesign Challenge

The Codesign Challenge ECE 4530 Codesgn Challenge Fall 2007 Hardware/Software Codesgn The Codesgn Challenge Objectves In the codesgn challenge, your task s to accelerate a gven software reference mplementaton as fast as possble.

More information

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1)

For instance, ; the five basic number-sets are increasingly more n A B & B A A = B (1) Secton 1.2 Subsets and the Boolean operatons on sets If every element of the set A s an element of the set B, we say that A s a subset of B, or that A s contaned n B, or that B contans A, and we wrte A

More information

A Binarization Algorithm specialized on Document Images and Photos

A Binarization Algorithm specialized on Document Images and Photos A Bnarzaton Algorthm specalzed on Document mages and Photos Ergna Kavalleratou Dept. of nformaton and Communcaton Systems Engneerng Unversty of the Aegean kavalleratou@aegean.gr Abstract n ths paper, a

More information

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort

Sorting: The Big Picture. The steps of QuickSort. QuickSort Example. QuickSort Example. QuickSort Example. Recursive Quicksort Sortng: The Bg Pcture Gven n comparable elements n an array, sort them n an ncreasng (or decreasng) order. Smple algorthms: O(n ) Inserton sort Selecton sort Bubble sort Shell sort Fancer algorthms: O(n

More information

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes

R s s f. m y s. SPH3UW Unit 7.3 Spherical Concave Mirrors Page 1 of 12. Notes SPH3UW Unt 7.3 Sphercal Concave Mrrors Page 1 of 1 Notes Physcs Tool box Concave Mrror If the reflectng surface takes place on the nner surface of the sphercal shape so that the centre of the mrror bulges

More information

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm

Non-Split Restrained Dominating Set of an Interval Graph Using an Algorithm Internatonal Journal of Advancements n Research & Technology, Volume, Issue, July- ISS - on-splt Restraned Domnatng Set of an Interval Graph Usng an Algorthm ABSTRACT Dr.A.Sudhakaraah *, E. Gnana Deepka,

More information

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning

Outline. Type of Machine Learning. Examples of Application. Unsupervised Learning Outlne Artfcal Intellgence and ts applcatons Lecture 8 Unsupervsed Learnng Professor Danel Yeung danyeung@eee.org Dr. Patrck Chan patrckchan@eee.org South Chna Unversty of Technology, Chna Introducton

More information

Analysis of Continuous Beams in General

Analysis of Continuous Beams in General Analyss of Contnuous Beams n General Contnuous beams consdered here are prsmatc, rgdly connected to each beam segment and supported at varous ponts along the beam. onts are selected at ponts of support,

More information

Lecture 5: Multilayer Perceptrons

Lecture 5: Multilayer Perceptrons Lecture 5: Multlayer Perceptrons Roger Grosse 1 Introducton So far, we ve only talked about lnear models: lnear regresson and lnear bnary classfers. We noted that there are functons that can t be represented

More information

Strong games played on random graphs

Strong games played on random graphs Strong games played on random graphs Asaf Ferber Department of Mathematcs Massachusetts Insttute of Technology Cambrdge, U.S.A. ferbera@mt.edu Pascal Pfster Insttute of Theoretcal Computer Scence ETH Zürch

More information

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming

Kent State University CS 4/ Design and Analysis of Algorithms. Dept. of Math & Computer Science LECT-16. Dynamic Programming CS 4/560 Desgn and Analyss of Algorthms Kent State Unversty Dept. of Math & Computer Scence LECT-6 Dynamc Programmng 2 Dynamc Programmng Dynamc Programmng, lke the dvde-and-conquer method, solves problems

More information

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009.

Assignment # 2. Farrukh Jabeen Algorithms 510 Assignment #2 Due Date: June 15, 2009. Farrukh Jabeen Algorthms 51 Assgnment #2 Due Date: June 15, 29. Assgnment # 2 Chapter 3 Dscrete Fourer Transforms Implement the FFT for the DFT. Descrbed n sectons 3.1 and 3.2. Delverables: 1. Concse descrpton

More information

S1 Note. Basis functions.

S1 Note. Basis functions. S1 Note. Bass functons. Contents Types of bass functons...1 The Fourer bass...2 B-splne bass...3 Power and type I error rates wth dfferent numbers of bass functons...4 Table S1. Smulaton results of type

More information

The Erdős Pósa property for vertex- and edge-disjoint odd cycles in graphs on orientable surfaces

The Erdős Pósa property for vertex- and edge-disjoint odd cycles in graphs on orientable surfaces Dscrete Mathematcs 307 (2007) 764 768 www.elsever.com/locate/dsc Note The Erdős Pósa property for vertex- and edge-dsjont odd cycles n graphs on orentable surfaces Ken-Ich Kawarabayash a, Atsuhro Nakamoto

More information

the nber of vertces n the graph. spannng tree T beng part of a par of maxmally dstant trees s called extremal. Extremal trees are useful n the mxed an

the nber of vertces n the graph. spannng tree T beng part of a par of maxmally dstant trees s called extremal. Extremal trees are useful n the mxed an On Central Spannng Trees of a Graph S. Bezrukov Unverstat-GH Paderborn FB Mathematk/Informatk Furstenallee 11 D{33102 Paderborn F. Kaderal, W. Poguntke FernUnverstat Hagen LG Kommunkatonssysteme Bergscher

More information

Support Vector Machines

Support Vector Machines /9/207 MIST.6060 Busness Intellgence and Data Mnng What are Support Vector Machnes? Support Vector Machnes Support Vector Machnes (SVMs) are supervsed learnng technques that analyze data and recognze patterns.

More information

Unsupervised Learning

Unsupervised Learning Pattern Recognton Lecture 8 Outlne Introducton Unsupervsed Learnng Parametrc VS Non-Parametrc Approach Mxture of Denstes Maxmum-Lkelhood Estmates Clusterng Prof. Danel Yeung School of Computer Scence and

More information

Concurrent Apriori Data Mining Algorithms

Concurrent Apriori Data Mining Algorithms Concurrent Apror Data Mnng Algorthms Vassl Halatchev Department of Electrcal Engneerng and Computer Scence York Unversty, Toronto October 8, 2015 Outlne Why t s mportant Introducton to Assocaton Rule Mnng

More information

GSLM Operations Research II Fall 13/14

GSLM Operations Research II Fall 13/14 GSLM 58 Operatons Research II Fall /4 6. Separable Programmng Consder a general NLP mn f(x) s.t. g j (x) b j j =. m. Defnton 6.. The NLP s a separable program f ts objectve functon and all constrants are

More information

O n processors in CRCW PRAM

O n processors in CRCW PRAM PARALLEL COMPLEXITY OF SINGLE SOURCE SHORTEST PATH ALGORITHMS Mshra, P. K. Department o Appled Mathematcs Brla Insttute o Technology, Mesra Ranch-8355 (Inda) & Dept. o Electroncs & Electrcal Communcaton

More information

Report on On-line Graph Coloring

Report on On-line Graph Coloring 2003 Fall Semester Comp 670K Onlne Algorthm Report on LO Yuet Me (00086365) cndylo@ust.hk Abstract Onlne algorthm deals wth data that has no future nformaton. Lots of examples demonstrate that onlne algorthm

More information

CS 534: Computer Vision Model Fitting

CS 534: Computer Vision Model Fitting CS 534: Computer Vson Model Fttng Sprng 004 Ahmed Elgammal Dept of Computer Scence CS 534 Model Fttng - 1 Outlnes Model fttng s mportant Least-squares fttng Maxmum lkelhood estmaton MAP estmaton Robust

More information

1 Introducton Gven a graph G = (V; E), a non-negatve cost on each edge n E, and a set of vertces Z V, the mnmum Stener problem s to nd a mnmum cost su

1 Introducton Gven a graph G = (V; E), a non-negatve cost on each edge n E, and a set of vertces Z V, the mnmum Stener problem s to nd a mnmum cost su Stener Problems on Drected Acyclc Graphs Tsan-sheng Hsu y, Kuo-Hu Tsa yz, Da-We Wang yz and D. T. Lee? September 1, 1995 Abstract In ths paper, we consder two varatons of the mnmum-cost Stener problem

More information

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data

A Fast Content-Based Multimedia Retrieval Technique Using Compressed Data A Fast Content-Based Multmeda Retreval Technque Usng Compressed Data Borko Furht and Pornvt Saksobhavvat NSF Multmeda Laboratory Florda Atlantc Unversty, Boca Raton, Florda 3343 ABSTRACT In ths paper,

More information

More on Sorting: Quick Sort and Heap Sort

More on Sorting: Quick Sort and Heap Sort More on Sortng: Quck Sort and Heap Sort Antono Carzanga Faculty of Informatcs Unversty of Lugano October 12, 2007 c 2006 Antono Carzanga 1 Another dvde-and-conuer sortng algorthm The heap Heap sort Outlne

More information

Constructing Minimum Connected Dominating Set: Algorithmic approach

Constructing Minimum Connected Dominating Set: Algorithmic approach Constructng Mnmum Connected Domnatng Set: Algorthmc approach G.N. Puroht and Usha Sharma Centre for Mathematcal Scences, Banasthal Unversty, Rajasthan 304022 usha.sharma94@yahoo.com Abstract: Connected

More information

Wishing you all a Total Quality New Year!

Wishing you all a Total Quality New Year! Total Qualty Management and Sx Sgma Post Graduate Program 214-15 Sesson 4 Vnay Kumar Kalakband Assstant Professor Operatons & Systems Area 1 Wshng you all a Total Qualty New Year! Hope you acheve Sx sgma

More information

More on the Linear k-arboricity of Regular Graphs R. E. L. Aldred Department of Mathematics and Statistics University of Otago P.O. Box 56, Dunedin Ne

More on the Linear k-arboricity of Regular Graphs R. E. L. Aldred Department of Mathematics and Statistics University of Otago P.O. Box 56, Dunedin Ne More on the Lnear k-arborcty of Regular Graphs R E L Aldred Department of Mathematcs and Statstcs Unversty of Otago PO Box 56, Dunedn New Zealand Ncholas C Wormald Department of Mathematcs Unversty of

More information

CS1100 Introduction to Programming

CS1100 Introduction to Programming Factoral (n) Recursve Program fact(n) = n*fact(n-) CS00 Introducton to Programmng Recurson and Sortng Madhu Mutyam Department of Computer Scence and Engneerng Indan Insttute of Technology Madras nt fact

More information

c 2009 Society for Industrial and Applied Mathematics

c 2009 Society for Industrial and Applied Mathematics SIAM J. MATRIX ANAL. APPL. Vol. 31, No. 3, pp. 1382 1411 c 2009 Socety for Industral and Appled Mathematcs SUPERFAST MULTIFRONTAL METHOD FOR LARGE STRUCTURED LINEAR SYSTEMS OF EQUATIONS JIANLIN XIA, SHIVKUMAR

More information

Sorting and Algorithm Analysis

Sorting and Algorithm Analysis Unt 7 Sortng and Algorthm Analyss Computer Scence S-111 Harvard Unversty Davd G. Sullvan, Ph.D. Sortng an Array of Integers 0 1 2 n-2 n-1 arr 15 7 36 40 12 Ground rules: sort the values n ncreasng order

More information

Intro. Iterators. 1. Access

Intro. Iterators. 1. Access Intro Ths mornng I d lke to talk a lttle bt about s and s. We wll start out wth smlartes and dfferences, then we wll see how to draw them n envronment dagrams, and we wll fnsh wth some examples. Happy

More information

A fault tree analysis strategy using binary decision diagrams

A fault tree analysis strategy using binary decision diagrams Loughborough Unversty Insttutonal Repostory A fault tree analyss strategy usng bnary decson dagrams Ths tem was submtted to Loughborough Unversty's Insttutonal Repostory by the/an author. Addtonal Informaton:

More information

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016)

Parallel Numerics. 1 Preconditioning & Iterative Solvers (From 2016) Technsche Unverstät München WSe 6/7 Insttut für Informatk Prof. Dr. Thomas Huckle Dpl.-Math. Benjamn Uekermann Parallel Numercs Exercse : Prevous Exam Questons Precondtonng & Iteratve Solvers (From 6)

More information

The Shortest Path of Touring Lines given in the Plane

The Shortest Path of Touring Lines given in the Plane Send Orders for Reprnts to reprnts@benthamscence.ae 262 The Open Cybernetcs & Systemcs Journal, 2015, 9, 262-267 The Shortest Path of Tourng Lnes gven n the Plane Open Access Ljuan Wang 1,2, Dandan He

More information

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers

Content Based Image Retrieval Using 2-D Discrete Wavelet with Texture Feature with Different Classifiers IOSR Journal of Electroncs and Communcaton Engneerng (IOSR-JECE) e-issn: 78-834,p- ISSN: 78-8735.Volume 9, Issue, Ver. IV (Mar - Apr. 04), PP 0-07 Content Based Image Retreval Usng -D Dscrete Wavelet wth

More information

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces

Range images. Range image registration. Examples of sampling patterns. Range images and range surfaces Range mages For many structured lght scanners, the range data forms a hghly regular pattern known as a range mage. he samplng pattern s determned by the specfc scanner. Range mage regstraton 1 Examples

More information

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints

Sum of Linear and Fractional Multiobjective Programming Problem under Fuzzy Rules Constraints Australan Journal of Basc and Appled Scences, 2(4): 1204-1208, 2008 ISSN 1991-8178 Sum of Lnear and Fractonal Multobjectve Programmng Problem under Fuzzy Rules Constrants 1 2 Sanjay Jan and Kalash Lachhwan

More information

NAG Fortran Library Chapter Introduction. G10 Smoothing in Statistics

NAG Fortran Library Chapter Introduction. G10 Smoothing in Statistics Introducton G10 NAG Fortran Lbrary Chapter Introducton G10 Smoothng n Statstcs Contents 1 Scope of the Chapter... 2 2 Background to the Problems... 2 2.1 Smoothng Methods... 2 2.2 Smoothng Splnes and Regresson

More information

Learning the Kernel Parameters in Kernel Minimum Distance Classifier

Learning the Kernel Parameters in Kernel Minimum Distance Classifier Learnng the Kernel Parameters n Kernel Mnmum Dstance Classfer Daoqang Zhang 1,, Songcan Chen and Zh-Hua Zhou 1* 1 Natonal Laboratory for Novel Software Technology Nanjng Unversty, Nanjng 193, Chna Department

More information

An Approach in Coloring Semi-Regular Tilings on the Hyperbolic Plane

An Approach in Coloring Semi-Regular Tilings on the Hyperbolic Plane An Approach n Colorng Sem-Regular Tlngs on the Hyperbolc Plane Ma Louse Antonette N De Las Peñas, mlp@mathscmathadmueduph Glenn R Lago, glago@yahoocom Math Department, Ateneo de Manla Unversty, Loyola

More information

Smoothing Spline ANOVA for variable screening

Smoothing Spline ANOVA for variable screening Smoothng Splne ANOVA for varable screenng a useful tool for metamodels tranng and mult-objectve optmzaton L. Rcco, E. Rgon, A. Turco Outlne RSM Introducton Possble couplng Test case MOO MOO wth Game Theory

More information

Algorithms for Computing the Triplet and Quartet Distances for Binary and General Trees

Algorithms for Computing the Triplet and Quartet Distances for Binary and General Trees Bology 2013, 2, 1189-1209; do:10.3390/bology2041189 Revew OPEN ACCESS bology ISSN 2079-7737 www.mdp.com/ournal/bology Algorthms for Computng the Trplet and Quartet Dstances for Bnary and General Trees

More information

An Entropy-Based Approach to Integrated Information Needs Assessment

An Entropy-Based Approach to Integrated Information Needs Assessment Dstrbuton Statement A: Approved for publc release; dstrbuton s unlmted. An Entropy-Based Approach to ntegrated nformaton Needs Assessment June 8, 2004 Wllam J. Farrell Lockheed Martn Advanced Technology

More information

An Efficient Label Setting/Correcting Shortest Path Algorithm

An Efficient Label Setting/Correcting Shortest Path Algorithm An Effcent Label Settng/Correctng Shortest Path Algorthm Antono Sedeño-Noda, Carlos González-Martín Departamento de Estadístca, Investgacón Operatva y Computacón (DEIOC) Unversdad de La Laguna,38205- La

More information

Brave New World Pseudocode Reference

Brave New World Pseudocode Reference Brave New World Pseudocode Reference Pseudocode s a way to descrbe how to accomplsh tasks usng basc steps lke those a computer mght perform. In ths week s lab, you'll see how a form of pseudocode can be

More information

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 5 Luca Trevisan September 7, 2017

U.C. Berkeley CS294: Beyond Worst-Case Analysis Handout 5 Luca Trevisan September 7, 2017 U.C. Bereley CS294: Beyond Worst-Case Analyss Handout 5 Luca Trevsan September 7, 207 Scrbed by Haars Khan Last modfed 0/3/207 Lecture 5 In whch we study the SDP relaxaton of Max Cut n random graphs. Quc

More information

Related-Mode Attacks on CTR Encryption Mode

Related-Mode Attacks on CTR Encryption Mode Internatonal Journal of Network Securty, Vol.4, No.3, PP.282 287, May 2007 282 Related-Mode Attacks on CTR Encrypton Mode Dayn Wang, Dongda Ln, and Wenlng Wu (Correspondng author: Dayn Wang) Key Laboratory

More information

SAO: A Stream Index for Answering Linear Optimization Queries

SAO: A Stream Index for Answering Linear Optimization Queries SAO: A Stream Index for Answerng near Optmzaton Queres Gang uo Kun-ung Wu Phlp S. Yu IBM T.J. Watson Research Center {luog, klwu, psyu}@us.bm.com Abstract near optmzaton queres retreve the top-k tuples

More information

Can We Beat the Prefix Filtering? An Adaptive Framework for Similarity Join and Search

Can We Beat the Prefix Filtering? An Adaptive Framework for Similarity Join and Search Can We Beat the Prefx Flterng? An Adaptve Framework for Smlarty Jon and Search Jannan Wang Guolang L Janhua Feng Department of Computer Scence and Technology, Tsnghua Natonal Laboratory for Informaton

More information

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory

Virtual Memory. Background. No. 10. Virtual Memory: concept. Logical Memory Space (review) Demand Paging(1) Virtual Memory Background EECS. Operatng System Fundamentals No. Vrtual Memory Prof. Hu Jang Department of Electrcal Engneerng and Computer Scence, York Unversty Memory-management methods normally requres the entre process

More information

Support Vector Machines

Support Vector Machines Support Vector Machnes Decson surface s a hyperplane (lne n 2D) n feature space (smlar to the Perceptron) Arguably, the most mportant recent dscovery n machne learnng In a nutshell: map the data to a predetermned

More information

A Topology-aware Random Walk

A Topology-aware Random Walk A Topology-aware Random Walk Inkwan Yu, Rchard Newman Dept. of CISE, Unversty of Florda, Ganesvlle, Florda, USA Abstract When a graph can be decomposed nto clusters of well connected subgraphs, t s possble

More information

Dijkstra s Single Source Algorithm. All-Pairs Shortest Paths. Dynamic Programming Solution. Performance. Decision Sequence.

Dijkstra s Single Source Algorithm. All-Pairs Shortest Paths. Dynamic Programming Solution. Performance. Decision Sequence. All-Pars Shortest Paths Gven an n-vertex drected weghted graph, fnd a shortest path from vertex to vertex for each of the n vertex pars (,). Dstra s Sngle Source Algorthm Use Dstra s algorthm n tmes, once

More information

A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS

A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS Proceedngs of the Wnter Smulaton Conference M E Kuhl, N M Steger, F B Armstrong, and J A Jones, eds A MOVING MESH APPROACH FOR SIMULATION BUDGET ALLOCATION ON CONTINUOUS DOMAINS Mark W Brantley Chun-Hung

More information