Introduction. Example
|
|
- Cody Nelson
- 5 years ago
- Views:
Transcription
1 OMS0 Introution isjoint sets n minimum spnning trees In this leture we will strt by isussing t struture use for mintining isjoint subsets of some bigger set. This hs number of pplitions, inluing to mintining onnete omponents of grph, n to fining minimum spnning trees in unirete grphs. eprtment of omputer Siene, University of ristol ristol, UK November 0 We will then isuss two lgorithms for fining minimum spnning trees: n lgorithm by Kruskl bse on isjoint-set strutures, n n lgorithm by Prim whih is similr to ijkstr s lgorithm. In both ses, we will see tht effiient implementtions of t strutures give us effiient lgorithms. OMS0: isjoint sets n MSTs Slie /48 OMS0: isjoint sets n MSTs Slie /48 isjoint-set t struture isjoint-set t struture mintins olletion S = {S,..., S k } of isjoint subsets of some lrger universe U. The t struture supports the following opertions:. MkeSet(x): rete new set whose only member is x. s the sets re isjoint, we require tht x is not ontine in ny of the other sets.. Union(x, y): ombine the sets ontining x n y (ll these S x, S y ) to reple them with new set S x S y.. inset(x): returns the ientity of the unique set ontining x. Opertion Returns S (strt) (empty) MkeSet() {} MkeSet(b) {}, {b} inset(b) b {}, {b} Union(, b) {, b} inset(b) {, b} inset() {, b} MkeSet() {, b}, {} The ientity of set is just some unique ientifier for tht set for exmple, the ientity of one of the elements in the set. OMS0: isjoint sets n MSTs Slie /48 OMS0: isjoint sets n MSTs Slie 4/48
2 Implementtion simple wy to implement isjoint-set t struture is s n rry of linke lists. We hve linke list for eh isjoint set. h element elem in the list stores pointer elem.next to the next element in the list, n the set element itself, elem.t. We lso hve n rry orresponing to the universe, with eh entry in the rry ontining pointer to the linke list orresponing to the set in whih it ours. Then to implement: MkeSet(x), we rete new list n set x s pointer to tht list. inset(x), we return the first element in the list to whih x points. Union(x, y), we ppen y s list to x s list n upte the pointers of everything in y s list to point to to x s list. Implementtion In more etil: MkeSet(x). [x] new linke list. elem new list element. elem.t x 4. [x].he elem 5. [x].til elem inset(x). return [x].he.t OMS0: isjoint sets n MSTs Slie 5/48 OMS0: isjoint sets n MSTs Slie 6/48 Implementtion Imgine we hve universe U = {, b,, }. The initil onfigurtion of the rry (orresponing to S = ) is Union(x, y). [x].til.next [y].he. [x].til [y].til. elem [y].he 4. while elem nil 5. [elem.t] [x] 6. elem elem.next Then the following sequene of uptes ours: MkeSet() b b he til OMS0: isjoint sets n MSTs Slie 7/48 OMS0: isjoint sets n MSTs Slie 8/48
3 MkeSet() b he til he til Union(, ) b he til OMS0: isjoint sets n MSTs Slie 9/48 OMS0: isjoint sets n MSTs Slie 0/48 MkeSet() b he til he til Union(, ) b he til OMS0: isjoint sets n MSTs Slie /48 OMS0: isjoint sets n MSTs Slie /48
4 Improvement: the weighte-union heuristi MkeSet n inset tke time O() but Union might tke time Θ(n) for universe of size n. Union(x, y) nees to upte til pointers in lists (onstnt time) but lso the informtion of every element in y s list. So the Union opertion is slow when y s list is long n x s is short. Heuristi: lwys ppen the shorter list to the longer list. Might still tke time Θ(n) in the worst se (if both lists hve the sme size), but we hve the following mortise nlysis: lim Using the linke-list representtion n the bove heuristi, sequene of m MkeSet, inset n Union opertions, n of whih re MkeSet opertions, uses time O(m + n log n). Improvement: the weighte-union heuristi lim Using the linke-list representtion n the bove heuristi, sequene of m MkeSet, inset n Union opertions, n of whih re MkeSet opertions, uses time O(m + n log n). Proof MkeSet n inset tke time O() eh, n there n be t most n non-trivil Union opertions. t eh Union opertion, n element s informtion is only upte when it ws in the smller set of the two sets. So, the first time it is upte, the resulting set must hve size t lest. The seon time, size t lest 4. The k th time, size t lest k. So eh element s informtion is only upte t most O(log n) times. So O(n log n) uptes re me in totl. ll other opertions use time O(), so the totl runtime is O(m + n log n). OMS0: isjoint sets n MSTs Slie /48 OMS0: isjoint sets n MSTs Slie 4/48 Improvements pplition: omputing onnete omponents nother wy to implement isjoint-set struture is vi isjoint-set forest (LRS.). This struture is bse on repling the linke lists with trees. simple pplition of the isjoint-set t struture is omputing onnete omponents of n unirete grph. One n show tht using isjoint-set forest, long with some optimistions, sequene of m opertions with n MkeSet opertions runs in time O(m α(n)), where α(n) is n extremely slowly growing funtion whih stisfies α(n) 4 for ny n or exmple: isjoint-set forests were introue in 964 by Gller n isher but this boun ws not proven until 975 by Trjn. G mzingly, it is known tht this runtime boun nnot be reple with boun O(m). OMS0: isjoint sets n MSTs Slie 5/48 OMS0: isjoint sets n MSTs Slie 6/48
5 pplition: omputing onnete omponents onneteomponents(g). for eh vertex v G: MkeSet(v). for eh ege u v in rbitrry orer. if inset(u) inset(v) 4. Union(u, v) Time omplexity: O( + V log V ) if implemente using linke lists, O( α(v )) if implemente using n optimise isjoint-set forest. fter onneteomponents ompletes, inset n be use to etermine whether two verties re in the sme omponent, in time O(). This tsk oul lso be hieve using breth-first serh, but using isjoint sets llows serhing n ing verties to be rrie out more effiiently in future. Minimum spnning trees Given onnete, unirete weighte grph G, subgrph T is spnning tree if: T is tree (i.e. oes not ontin ny yles) very vertex in G ppers in T. T is minimum spnning tree (MST) if the sum of the weights of eges of T is miniml mong ll spnning trees of G. spnning tree n minimum spnning tree of the sme grph. OMS0: isjoint sets n MSTs Slie 7/48 OMS0: isjoint sets n MSTs Slie 8/48 MSTs: pplitions generi pproh to MSTs Teleommunitions n utilities luster nlysis Txonomy Hnwriting reognition Mze genertion... The two lgorithms we will isuss for fining MSTs re both bse on the following bsi ie:. Mintin forest (i.e. olletion of trees) whih is subset of some minimum spnning tree.. t eh step, new ege to, mintining the bove property.. Repet until is minimum spnning tree. This pproh of mking lolly optiml hoie of n ege t eh step mkes them greey lgorithms. We will isuss: Kruskl s lgorithm, whih is bse on isjoint-set t struture. Prim s lgorithm, whih is bse on priority queue. Pis: ntionlgri.om, onnetiutvlleybiologil.om, Wikipei The lgorithms mke ifferent hoies for whih new ege to t eh step. OMS0: isjoint sets n MSTs Slie 9/48 OMS0: isjoint sets n MSTs Slie 0/48
6 How to hoose new eges? ut property Let X be subset of some MST T. Let S be subset of the verties of G suh tht X oes not ontin ny eges with extly one enpoint in S. Let e be lightest ege in G tht hs extly one enpoint in S. Then X {e} is subset of n MST. Proof or exmple: If e T, the lim is obviously true, so ssume e / T. s T is spnning tree, there must exist pth p in T between the enpoints of e, where p ontins n ege e with one enpoint in S.... How to hoose new eges? ut property Let X be subset of some MST T. Let S be subset of the verties of G suh tht X oes not ontin ny eges with extly one enpoint in S. Let e be lightest ege in G tht hs extly one enpoint in S. Then X {e} is subset of n MST. Proof xerise: or ny ege e on the pth p, if we reple e with e in T, the resulting set T is still spnning tree. urther, the totl weight of T is weight(t ) = weight(t ) + w(e) w(e ). s e is the lightest ege with one enpoint in S, w(e) w(e ). Hene weight(t ) weight(t ), so T is lso n MST. OMS0: isjoint sets n MSTs Slie /48 OMS0: isjoint sets n MSTs Slie /48 Kruskl s lgorithm The lgorithm hs similr flow to the lgorithm for omputing onnete omponents. It mintins forest, initilly onsisting of unonnete iniviul verties, n isjoint-set t struture. We use Kruskl s lgorithm to fin n MST in the following grph. Kruskl(G). for eh vertex v G: MkeSet(v). sort the eges of G into non-eresing orer by weight. for eh ege u v in orer 4. if inset(u) inset(v) 5. {u v} 6. Union(u, v) Informlly: the lightest ege between two omponents of. OMS0: isjoint sets n MSTs Slie /48 OMS0: isjoint sets n MSTs Slie 4/48
7 irst n rbitrry ege with weight is pike: Then ny other ege with weight : OMS0: isjoint sets n MSTs Slie 5/48 OMS0: isjoint sets n MSTs Slie 6/48 Then ny other ege with weight : The finl ege with weight nnot be pike beuse n re in the sme omponent, so one of the eges with weight is hosen: OMS0: isjoint sets n MSTs Slie 7/48 OMS0: isjoint sets n MSTs Slie 8/48
8 inlly, one of the other eges with weight is hosen n the MST is omplete. Proof of orretness Kruskl(G). for eh vertex v G: MkeSet(v). sort the eges of G into non-eresing orer by weight. for eh ege u v in orer 4. if inset(u) inset(v) 5. {u v} 6. Union(u, v) Proof of orretness Whenever inset(u) inset(v), the ege u v onnets two trees T, T. Set S = T in the ut property. This ege is lightest ege with one enpoint in S. So, by the ut property, {u v} is subset of n MST. OMS0: isjoint sets n MSTs Slie 9/48 OMS0: isjoint sets n MSTs Slie 0/48 omplexity nlysis of Kruskl s lgorithm Kruskl(G). for eh vertex v G: MkeSet(v). sort the eges of G into non-eresing orer by weight. for eh ege u v in orer 4. if inset(u) inset(v) 5. {u v} 6. Union(u, v) Prim s lgorithm Kruskl s lgorithm mintins forest n uses the rule: the lightest ege between two omponents of t eh step. ifferent pproh is use by Prim s lgorithm: mintin onnete tree T n exten T with the lightest possible ege. Prim s lgorithm is bse on the use of priority queue Q. V MkeSet opertions Time O( log ) to sort eges O() inset n Union opertions The flow of the lgorithm is lmost extly the sme s ijkstr s lgorithm; the only ifferene is the hoie of key for the queue. So, using isjoint-set struture implemente using n rry of linke lists, we get n overll runtime of O( log ). If the eges re lrey sorte, n we use n optimise isjoint-set forest, we n hieve O( α(v )). OMS0: isjoint sets n MSTs Slie /48 or eh vertex v, v.key is the weight of the lightest ege onneting v to T. OMS0: isjoint sets n MSTs Slie /48
9 Prim s lgorithm Prim(G). for eh vertex v G: v.key, v.π nil. hoose n rbitrry vertex r. r.key 0 4. every vertex in G to Q 5. while Q not empty 6. u xtrtmin(q) 7. for eh vertex v suh tht u v 8. if v Q n w(u, v) < v.key 9. v.π u 0. eresekey(v, w(u, v)) The lgorithm n be seen s mintining growing tree, efine by the preeessor informtion v.π, to whih eh vertex extrte from the queue is e. OMS0: isjoint sets n MSTs Slie /48 We use Prim s lgorithm to fin n MST in the following grph. OMS0: isjoint sets n MSTs Slie 4/48 The stte t the strt of the lgorithm: irst the lgorithm piks n rbitrry strting vertex r n uptes its key vlue to 0. In the bove igrm, the re text is the key vlues of the verties (i.e. v.key) n the green text is the preeessor vertex (i.e. v.π). Here we rbitrrily hoose s our strting vertex. OMS0: isjoint sets n MSTs Slie 5/48 OMS0: isjoint sets n MSTs Slie 6/48
10 Then is extrte from the queue, n the keys of its neighbours re upte: Then either or is extrte from the queue (here, we pik ):,,,,,, Vertex olours: lue: urrent vertex, green: verties e to tree. The re line shows the growing tree. OMS0: isjoint sets n MSTs Slie 7/48 OMS0: isjoint sets n MSTs Slie 8/48 Then is extrte from the queue: Then either or is extrte from the queue (here, we pik ):,,,,,,,,, OMS0: isjoint sets n MSTs Slie 9/48 OMS0: isjoint sets n MSTs Slie 40/48
11 Then is extrte from the queue: inlly is extrte from the queue n the lgorithm is omplete:,,,,,,,,,, OMS0: isjoint sets n MSTs Slie 4/48 OMS0: isjoint sets n MSTs Slie 4/48 orretness n omplexity Proof of orretness Prim s lgorithm mintins single, growing tree T strting with r, n to whih eh vertex remove from Q is ppene. h vertex e to T is vertex onnete to T by lightest ege. The ut property is therefore stisfie (tking S = T ), so when the lgorithm ompletes, T is n MST. The preeessor informtion v.π n be use to output T. omplexity nlysis: The omplexity is symptotilly the sme s ijkstr s lgorithm. If the priority queue is implemente using binry hep, we get n overll boun of O( log V ); if it is implemente using iboni hep, we get O( + V log V ). omprison of MST lgorithms To summrise the two MST lgorithms isusse: lgorithm Unerlying struture Runtime Kruskl isjoint-set O( log ) (linke lists) O( α(v )) (isjoint-set forest, eges lrey sorte) Prim Priority queue So whih lgorithm to use? O( log V ) (binry hep) O( +V log V ) (iboni hep) If the eges re not lrey sorte, n nnot be sorte in liner time, the most effiient lgorithm in theory is Prim with iboni hep (but in prtie, either Kruskl with isjoint-set forest or Prim with binry hep is likely to be quiker). If the eges re lrey sorte, or n be sorte in time O(), then Kruskl with n optimise isjoint-set forest is quikest. OMS0: isjoint sets n MSTs Slie 4/48 OMS0: isjoint sets n MSTs Slie 44/48
12 Summry isjoint-set struture provies n effiient wy to store olletion of isjoint subsets of some universe, n n be implemente using n rry of linke lists. isjoint-set strutures n be use to mintin set of onnete omponents of grph, n lso to fin minimum spnning trees using Kruskl s lgorithm. n lterntive wy of fining minimum spnning trees is Prim s lgorithm, whih is bse on the use of priority queue n is similr to ijkstr s lgorithm. oth lgorithms re greey lgorithms whih rely on the optiml substruture property of minimum spnning trees. urther Reing Introution to lgorithms T. H. ormen,.. Leiserson, R. L. Rivest n. Stein. MIT Press/MGrw-Hill, ISN: hpter t Strutures for isjoint Sets (N: presente slightly ifferently to leture) hpter Minimum Spnning Trees lgorithms S. sgupt,. H. Ppimitriou n U. V. Vzirni hpter 5 Greey lgorithms lgorithms leture notes, University of Illinois Jeff rikson Leture 8 Minimum spnning trees OMS0: isjoint sets n MSTs Slie 45/48 OMS0: isjoint sets n MSTs Slie 46/48 iogrphil notes iogrphil notes Joseph. Kruskl, Jr. (98 00) Robert. Prim III (9 ) Kruskl ws n merin mthemtiin n omputer sientist who i importnt work in sttistis n ombintoris, s well s omputer siene. His lgorithm ws isovere in 956 while t Prineton University; he spent most of his lter reer t ell Lbs. His two brothers Willim n Mrtin were lso fmous mthemtiins. Pi: ms.org Prim is n merin mthemtiin n omputer sientist, who evelope his lgorithm while working t ell Lbs in 957, where he ws lter iretor of mthemtis reserh. Prim s lgorithm ws originlly n inepenently isovere in 90 by Jrník. It ws lter reisovere gin by sger ijkstr in 959. Pi: ms.org OMS0: isjoint sets n MSTs Slie 47/48 OMS0: isjoint sets n MSTs Slie 48/48
Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.
Chpter 9 Greey Tehnique Copyright 2007 Person Aison-Wesley. All rights reserve. Greey Tehnique Construts solution to n optimiztion prolem piee y piee through sequene of hoies tht re: fesile lolly optiml
More informationMITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts. Introduction to Matroids and Applications. Srikumar Ramalingam
Cmrige, Msshusetts Introution to Mtrois n Applitions Srikumr Rmlingm MERL mm//yy Liner Alger (,0,0) (0,,0) Liner inepenene in vetors: v, v2,..., For ll non-trivil we hve s v s v n s, s2,..., s n 2v2...
More informationV = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V)
Definitions G = (V, E) V = set of verties (vertex / noe) E = set of eges (v, w) (v, w in V) (v, w) orere => irete grph (igrph) (v, w) non-orere => unirete grph igrph: w is jent to v if there is n ege from
More informationOutline. CS38 Introduction to Algorithms. Graphs. Graphs. Graphs. Graph traversals
Outline CS38 Introution to Algorithms Leture 2 April 3, 2014 grph trversls (BFS, DFS) onnetivity topologil sort strongly onnete omponents heps n hepsort greey lgorithms April 3, 2014 CS38 Leture 2 2 Grphs
More informationGreedy Algorithm. Algorithm Fall Semester
Greey Algorithm Algorithm 0 Fll Semester Optimiztion prolems An optimiztion prolem is one in whih you wnt to fin, not just solution, ut the est solution A greey lgorithm sometimes works well for optimiztion
More information10.2 Graph Terminology and Special Types of Graphs
10.2 Grph Terminology n Speil Types of Grphs Definition 1. Two verties u n v in n unirete grph G re lle jent (or neighors) in G iff u n v re enpoints of n ege e of G. Suh n ege e is lle inient with the
More informationGraph Contraction and Connectivity
Chpter 14 Grph Contrtion n Connetivity So fr we hve mostly overe tehniques for solving problems on grphs tht were evelope in the ontext of sequentil lgorithms. Some of them re esy to prllelize while others
More informationDistance vector protocol
istne vetor protool Irene Finohi finohi@i.unirom.it Routing Routing protool Gol: etermine goo pth (sequene of routers) thru network from soure to Grph strtion for routing lgorithms: grph noes re routers
More informationGraph theory Route problems
Bhelors thesis Grph theory Route prolems Author: Aolphe Nikwigize Dte: 986 - -5 Sujet: Mthemtis Level: First level (Bhelor) Course oe: MAE Astrt In this thesis we will review some route prolems whih re
More informationLesson 4.4. Euler Circuits and Paths. Explore This
Lesson 4.4 Euler Ciruits nd Pths Now tht you re fmilir with some of the onepts of grphs nd the wy grphs onvey onnetions nd reltionships, it s time to egin exploring how they n e used to model mny different
More informationLecture 13: Graphs I: Breadth First Search
Leture 13 Grphs I: BFS 6.006 Fll 2011 Leture 13: Grphs I: Bredth First Serh Leture Overview Applitions of Grph Serh Grph Representtions Bredth-First Serh Rell: Grph G = (V, E) V = set of verties (ritrry
More informationParadigm 5. Data Structure. Suffix trees. What is a suffix tree? Suffix tree. Simple applications. Simple applications. Algorithms
Prdigm. Dt Struture Known exmples: link tble, hep, Our leture: suffix tree Will involve mortize method tht will be stressed shortly in this ourse Suffix trees Wht is suffix tree? Simple pplitions History
More informationCS 241 Week 4 Tutorial Solutions
CS 4 Week 4 Tutoril Solutions Writing n Assemler, Prt & Regulr Lnguges Prt Winter 8 Assemling instrutions utomtilly. slt $d, $s, $t. Solution: $d, $s, nd $t ll fit in -it signed integers sine they re 5-it
More informationTable-driven look-ahead lexical analysis
Tle-riven look-he lexil nlysis WUU YANG Computer n Informtion Siene Deprtment Ntionl Chio-Tung University, HsinChu, Tiwn, R.O.C. Astrt. Moern progrmming lnguges use regulr expressions to efine vli tokens.
More informationContainers: Queue and List
Continers: Queue n List Queue A ontiner in whih insertion is one t one en (the til) n eletion is one t the other en (the he). Also lle FIFO (First-In, First-Out) Jori Cortell n Jori Petit Deprtment of
More informationLecture 8: Graph-theoretic problems (again)
COMP36111: Advned Algorithms I Leture 8: Grph-theoreti prolems (gin) In Prtt-Hrtmnn Room KB2.38: emil: iprtt@s.mn..uk 2017 18 Reding for this leture: Sipser: Chpter 7. A grph is pir G = (V, E), where V
More informationCS553 Lecture Introduction to Data-flow Analysis 1
! Ide Introdution to Dt-flow nlysis!lst Time! Implementing Mrk nd Sweep GC!Tody! Control flow grphs! Liveness nlysis! Register llotion CS553 Leture Introdution to Dt-flow Anlysis 1 Dt-flow Anlysis! Dt-flow
More informationCOMP108 Algorithmic Foundations
Grph Theory Prudene Wong http://www.s.liv..uk/~pwong/tehing/omp108/201617 How to Mesure 4L? 3L 5L 3L ontiner & 5L ontiner (without mrk) infinite supply of wter You n pour wter from one ontiner to nother
More informationCS453 INTRODUCTION TO DATAFLOW ANALYSIS
CS453 INTRODUCTION TO DATAFLOW ANALYSIS CS453 Leture Register llotion using liveness nlysis 1 Introdution to Dt-flow nlysis Lst Time Register llotion for expression trees nd lol nd prm vrs Tody Register
More informationUnion-Find Problem. Using Arrays And Chains. A Set As A Tree. Result Of A Find Operation
Union-Find Problem Given set {,,, n} of n elements. Initilly ech element is in different set. ƒ {}, {},, {n} An intermixed sequence of union nd find opertions is performed. A union opertion combines two
More informationPremaster Course Algorithms 1 Chapter 6: Shortest Paths. Christian Scheideler SS 2018
Premster Course Algorithms Chpter 6: Shortest Pths Christin Scheieler SS 8 Bsic Grph Algorithms Overview: Shortest pths in DAGs Dijkstr s lgorithm Bellmn-For lgorithm Johnson s metho SS 8 Chpter 6 Shortest
More informationHonors Thesis: Investigating the Algebraic Properties of Cayley Digraphs
Honors Thesis: Investigting the Algebri Properties of Cyley Digrphs Alexis Byers, Wittenberg University Mthemtis Deprtment April 30, 2014 This pper utilizes Grph Theory to gin insight into the lgebri struture
More information12/9/14. CS151 Fall 20124Lecture (almost there) 12/6. Graphs. Seven Bridges of Königsberg. Leonard Euler
CS5 Fll 04Leture (lmost there) /6 Seven Bridges of Königserg Grphs Prof. Tny Berger-Wolf Leonrd Euler 707-783 Is it possile to wlk with route tht rosses eh ridge e Seven Bridges of Königserg Forget unimportnt
More informationCS 551 Computer Graphics. Hidden Surface Elimination. Z-Buffering. Basic idea: Hidden Surface Removal
CS 55 Computer Grphis Hidden Surfe Removl Hidden Surfe Elimintion Ojet preision lgorithms: determine whih ojets re in front of others Uses the Pinter s lgorithm drw visile surfes from k (frthest) to front
More informationInternet Routing. Reminder: Routing. CPSC Network Programming
PS 360 - Network Progrmming Internet Routing Mihele Weigle eprtment of omputer Siene lemson University mweigle@s.lemson.eu pril, 00 http://www.s.lemson.eu/~mweigle/ourses/ps360 Reminer: Routing Internet
More informationLecture 12 : Topological Spaces
Leture 12 : Topologil Spes 1 Topologil Spes Topology generlizes notion of distne nd loseness et. Definition 1.1. A topology on set X is olletion T of susets of X hving the following properties. 1. nd X
More information1 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 informationCMPUT101 Introduction to Computing - Summer 2002
CMPUT Introdution to Computing - Summer 22 %XLOGLQJ&RPSXWHU&LUFXLWV Chpter 4.4 3XUSRVH We hve looked t so fr how to uild logi gtes from trnsistors. Next we will look t how to uild iruits from logi gtes,
More informationCOMMON FRACTIONS. or a / b = a b. , a is called the numerator, and b is called the denominator.
COMMON FRACTIONS BASIC DEFINITIONS * A frtion is n inite ivision. or / * In the frtion is lle the numertor n is lle the enomintor. * The whole is seprte into "" equl prts n we re onsiering "" of those
More informationPROBLEM OF APOLLONIUS
PROBLEM OF APOLLONIUS In the Jnury 010 issue of Amerin Sientist D. Mkenzie isusses the Apollonin Gsket whih involves fining the rius of the lrgest irle whih just fits into the spe etween three tngent irles
More informationIn the last lecture, we discussed how valid tokens may be specified by regular expressions.
LECTURE 5 Scnning SYNTAX ANALYSIS We know from our previous lectures tht the process of verifying the syntx of the progrm is performed in two stges: Scnning: Identifying nd verifying tokens in progrm.
More information6.045J/18.400J: Automata, Computability and Complexity. Quiz 2: Solutions. Please write your name in the upper corner of each page.
6045J/18400J: Automt, Computbility nd Complexity Mrh 30, 2005 Quiz 2: Solutions Prof Nny Lynh Vinod Vikuntnthn Plese write your nme in the upper orner of eh pge Problem Sore 1 2 3 4 5 6 Totl Q2-1 Problem
More informationOutline. Motivation Background ARCH. Experiment Additional usages for Input-Depth. Regular Expression Matching DPI over Compressed HTTP
ARCH This work ws supported y: The Europen Reserh Counil, The Isreli Centers of Reserh Exellene, The Neptune Consortium, nd Ntionl Siene Foundtion wrd CNS-119748 Outline Motivtion Bkground Regulr Expression
More informationFEEDBACK: The standard error of a regression is not an unbiased estimator for the standard deviation of the error in a multiple regression model.
Introutory Eonometris: A Moern Approh 6th Eition Woolrige Test Bnk Solutions Complete ownlo: https://testbnkre.om/ownlo/introutory-eonometris-moern-pproh-6th-eition-jeffreym-woolrige-test-bnk/ Solutions
More informationClass Overview. Database Design. Database Design Process. Database Design. Introduction to Data Management CSE 414
Introution to Dt Mngement CSE 44 Unit 6: Coneptul Design E/R Digrms Integrity Constrints BCNF Introution to Dt Mngement CSE 44 E/R Digrms ( letures) CSE 44 Autumn 08 Clss Overview Dtse Design Unit : Intro
More informationProblem Final Exam Set 2 Solutions
CSE 5 5 Algoritms nd nd Progrms Prolem Finl Exm Set Solutions Jontn Turner Exm - //05 0/8/0. (5 points) Suppose you re implementing grp lgoritm tt uses ep s one of its primry dt strutures. Te lgoritm does
More informationPattern Matching. Pattern Matching. Pattern Matching. Review of Regular Expressions
Pttern Mthing Pttern Mthing Some of these leture slides hve een dpted from: lgorithms in C, Roert Sedgewik. Gol. Generlize string serhing to inompletely speified ptterns. pplitions. Test if string or its
More informationAdvanced Programming Handout 5. Enter Okasaki. Persistent vs. Ephemeral. Functional Queues. Simple Example. Persistent vs.
Avne Progrmming Hnout 5 Purel Funtionl Dt Strutures: A Cse Stu in Funtionl Progrmming Persistent vs. Ephemerl An ephemerl t struture is one for whih onl one version is ville t time: fter n upte opertion,
More informationBayesian Networks: Directed Markov Properties (Cont d) and Markov Equivalent DAGs
Byesin Networks: Direte Mrkov Properties (Cont ) n Mrkov Equivlent DAGs Huizhen Yu jney.yu@s.helsinki.fi Dept. Computer Siene, Univ. of Helsinki Proilisti Moels, Spring, 2010 Huizhen Yu (U.H.) Byesin Networks:
More informationContext: Weighted, connected, undirected graph, G = (V, E), with w : E R.
Chapter 23: Minimal Spanning Trees. Context: Weighted, connected, undirected graph, G = (V, E), with w : E R. Definition: A selection of edges from T E such that (V, T ) is a tree is called a spanning
More informationA decision support system prototype for fuzzy multiple objective optimization
EUSFLAT - LFA A eision support system prototype for fuzzy multiple ojetive optimiztion Fengjie Wu Jie Lu n Gungqun Zhng Fulty of Informtion Tehnology University of Tehnology Syney Austrli E-mil: {fengjiewjieluzhngg}@it.uts.eu.u
More informationGENG2140 Modelling and Computer Analysis for Engineers
GENG4 Moelling n Computer Anlysis or Engineers Letures 9 & : Gussin qurture Crete y Grn Romn Joles, PhD Shool o Mehnil Engineering, UWA GENG4 Content Deinition o Gussin qurture Computtion o weights n points
More informationCHAPTER 14 GRAPH ALGORITHMS ORD SFO LAX DFW
SO OR HPTR 1 GRPH LGORITHMS LX W KNOWLGMNT: THS SLIS R PT ROM SLIS PROVI WITH T STRUTURS N LGORITHMS IN JV, GOORIH, TMSSI N GOLWSSR (WILY 16) 6 OS MINIMUM SPNNING TRS SO 16 PV OR 1 1 16 61 JK 1 1 11 WI
More information9 Graph Cutting Procedures
9 Grph Cutting Procedures Lst clss we begn looking t how to embed rbitrry metrics into distributions of trees, nd proved the following theorem due to Brtl (1996): Theorem 9.1 (Brtl (1996)) Given metric
More informationToday. CS 188: Artificial Intelligence Fall Recap: Search. Example: Pancake Problem. Example: Pancake Problem. General Tree Search.
CS 88: Artificil Intelligence Fll 00 Lecture : A* Serch 9//00 A* Serch rph Serch Tody Heuristic Design Dn Klein UC Berkeley Multiple slides from Sturt Russell or Andrew Moore Recp: Serch Exmple: Pncke
More information2 Computing all Intersections of a Set of Segments Line Segment Intersection
15-451/651: Design & Anlysis of Algorithms Novemer 14, 2016 Lecture #21 Sweep-Line nd Segment Intersection lst chnged: Novemer 8, 2017 1 Preliminries The sweep-line prdigm is very powerful lgorithmic design
More information13.1 Weighted Graphs and Their Representation
Chpter Shortet Pth In thi hpter we will over prolem involving fining the hortet pth etween vertie in grph with weight (length) on the ege. One oviou pplition i in fining the hortet route from one re to
More information5 ANGLES AND POLYGONS
5 GLES POLYGOS urling rige looks like onventionl rige when it is extene. However, it urls up to form n otgon to llow ots through. This Rolling rige is in Pington sin in Lonon, n urls up every Friy t miy.
More informationMidterm 2 Sample solution
Nme: Instructions Midterm 2 Smple solution CMSC 430 Introduction to Compilers Fll 2012 November 28, 2012 This exm contins 9 pges, including this one. Mke sure you hve ll the pges. Write your nme on the
More informationDuality in linear interval equations
Aville online t http://ijim.sriu..ir Int. J. Industril Mthemtis Vol. 1, No. 1 (2009) 41-45 Dulity in liner intervl equtions M. Movhedin, S. Slhshour, S. Hji Ghsemi, S. Khezerloo, M. Khezerloo, S. M. Khorsny
More informationA matching algorithm for measuring the structural similarity between an XML document and a DTD and its applications $
Informtion Systems 29 (2004) 23 46 A mthing lgorithm for mesuring the struturl similrity etween n XML oument n DTD n its pplitions $ Elis Bertino, Giovnn Guerrini, Mro Mesiti, * Diprtimento i Informti
More informationLINX MATRIX SWITCHERS FIRMWARE UPDATE INSTRUCTIONS FIRMWARE VERSION
Overview LINX MATRIX SWITCHERS FIRMWARE UPDATE INSTRUCTIONS FIRMWARE VERSION 4.4.1.0 Due to the omplex nture of this updte, plese fmilirize yourself with these instrutions nd then ontt RGB Spetrum Tehnil
More informationMcAfee Web Gateway
Relese Notes Revision C MAfee We Gtewy 7.6.2.11 Contents Aout this relese Enhnement Resolved issues Instlltion instrutions Known issues Additionl informtion Find produt doumenttion Aout this relese This
More informationUTMC APPLICATION NOTE UT1553B BCRT TO INTERFACE PSEUDO-DUAL-PORT RAM ARCHITECTURE INTRODUCTION ARBITRATION DETAILS DESIGN SELECTIONS
UTMC APPLICATION NOTE UT1553B BCRT TO 80186 INTERFACE INTRODUCTION The UTMC UT1553B BCRT is monolithi CMOS integrte iruit tht provies omprehensive Bus Controller n Remote Terminl funtions for MIL-STD-
More informationChapter 16. Shortest Paths Shortest Weighted Paths
Chpter 6 Shortet Pth Given grph where ege re lle with weight (or itne) n oure vertex, wht i the hortet pth etween the oure n ome other vertex? Prolem requiring u to nwer uh querie re roly known hortet-pth
More informationSolutions to Tutorial 2 (Week 9)
The University of Syney Shool of Mathematis an Statistis Solutions to Tutorial (Week 9) MATH09/99: Disrete Mathematis an Graph Theory Semester, 0. Determine whether eah of the following sequenes is the
More informationAnnouncements. CS 188: Artificial Intelligence Fall Recap: Search. Today. Example: Pancake Problem. Example: Pancake Problem
Announcements Project : erch It s live! Due 9/. trt erly nd sk questions. It s longer thn most! Need prtner? Come up fter clss or try Pizz ections: cn go to ny, ut hve priority in your own C 88: Artificil
More informationWidth and Bounding Box of Imprecise Points
Width nd Bounding Box of Impreise Points Vhideh Keikh Mrten Löffler Ali Mohdes Zhed Rhmti Astrt In this pper we study the following prolem: we re given set L = {l 1,..., l n } of prllel line segments,
More information3D convex hulls. Convex Hull in 3D. convex polyhedron. convex polyhedron. The problem: Given a set P of points in 3D, compute their convex hull
Convex Hull in The rolem: Given set P of oints in, omute their onvex hull onvex hulls Comuttionl Geometry [si 3250] Lur Tom Bowoin College onvex olyheron 1 2 3 olygon olyheron onvex olyheron 4 5 6 Polyheron
More informationSection 3.1: Sequences and Series
Section.: Sequences d Series Sequences Let s strt out with the definition of sequence: sequence: ordered list of numbers, often with definite pttern Recll tht in set, order doesn t mtter so this is one
More informationTight triangulations: a link between combinatorics and topology
Tight tringultions: link between ombintoris nd topology Jonthn Spreer Melbourne, August 15, 2016 Topologil mnifolds (Geometri) Topology is study of mnifolds (surfes) up to ontinuous deformtion Complited
More informationIntroduction. Example
OMS0 Introduction Priority queues and ijkstra s algorithm In this lecture we will discuss ijkstra s algorithm, a more efficient way of solving the single-source shortest path problem. epartment of omputer
More informationGraph Searching & Perfect Graphs
Grph Serhing & Perfet Grphs Lll Moutdid University of Toronto Astrt Perfet grphs, y definition, hve nie struture, tht grph serhing seems to extrt in, often non-inexpensive, mnner. We srth the surfe of
More informationAsurveyofpractical algorithms for suffix tree construction in external memory
Asurveyofprtil lgorithms for suffix tree onstrution in externl memory M. Brsky,, U. Stege n A. Thomo University of Vitori, PO Box, STN CSC Vitori, BC, VW P, Cn SUMMAY The onstrution of suffix trees in
More informationCSCI 446: Artificial Intelligence
CSCI 446: Artificil Intelligence Serch Instructor: Michele Vn Dyne [These slides were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI t UC Berkeley. All CS188 mterils re vilble t http://i.berkeley.edu.]
More informationInternet Routing. IP Packet Format. IP Fragmentation & Reassembly. Principles of Internet Routing. Computer Networks 9/29/2014.
omputer Networks 9/29/2014 IP Pket Formt Internet Routing Ki Shen IP protool version numer heder length (words) for qulity of servie mx numer remining hops (deremented t eh router) upper lyer protool to
More informationWORKSHOP 19 GLOBAL/LOCAL MODELING USING FEM FIELDS
WORKSHOP 19 GLOBAL/LOCAL MODELING USING FEM FIELDS WS19-1 WS19-2 Prolem Desription This exerise is use to emonstrte how to mp isplement results from the nlysis of glol(overll) moel onto the perimeter of
More informationConvex Hull Algorithms. Convex hull: basic facts
CG Leture D Conve Hull Algorithms Bsi fts Algorithms: Nïve, Gift wrpping, Grhm sn, Quik hull, Divide-nd-onquer Lower ound 3D Bsi fts Algorithms: Gift wrpping, Divide nd onquer, inrementl Conve hulls in
More informationMany analog implementations of CPG exist, typically using operational amplifier or
FPGA Implementtion of Centrl Pttern Genertor By Jmes J Lin Introuction: Mny nlog implementtions of CPG exist, typiclly using opertionl mplifier or trnsistor level circuits. These types of circuits hve
More informationCS 221: Artificial Intelligence Fall 2011
CS 221: Artificil Intelligence Fll 2011 Lecture 2: Serch (Slides from Dn Klein, with help from Sturt Russell, Andrew Moore, Teg Grenger, Peter Norvig) Problem types! Fully observble, deterministic! single-belief-stte
More informationGreedy Algorithms Spanning Trees
Greedy Algoritms Spnning Trees Cpter 1, Wt mkes greedy lgoritm? Fesible Hs to stisfy te problem s constrints Loclly Optiml Te greedy prt Hs to mke te best locl coice mong ll fesible coices vilble on tt
More informationToday. Search Problems. Uninformed Search Methods. Depth-First Search Breadth-First Search Uniform-Cost Search
Uninformed Serch [These slides were creted by Dn Klein nd Pieter Abbeel for CS188 Intro to AI t UC Berkeley. All CS188 mterils re vilble t http://i.berkeley.edu.] Tody Serch Problems Uninformed Serch Methods
More informationc s ha2 c s Half Adder Figure 2: Full Adder Block Diagram
Adder Tk: Implement 2-it dder uing 1-it full dder nd 1-it hlf dder omponent (Figure 1) tht re onneted together in top-level module. Derie oth omponent in VHDL. Prepre two implementtion where VHDL omponent
More informationCOSC 6374 Parallel Computation. Non-blocking Collective Operations. Edgar Gabriel Fall Overview
COSC 6374 Prllel Computtion Non-loking Colletive Opertions Edgr Griel Fll 2014 Overview Impt of olletive ommunition opertions Impt of ommunition osts on Speedup Crtesin stenil ommunition All-to-ll ommunition
More informationCOMPUTER EDUCATION TECHNIQUES, INC. (WEBLOGIC_SVR_ADM ) SA:
In orer to lern whih questions hve een nswere orretly: 1. Print these pges. 2. Answer the questions. 3. Sen this ssessment with the nswers vi:. FAX to (212) 967-3498. Or. Mil the nswers to the following
More informationCSCI 104. Rafael Ferreira da Silva. Slides adapted from: Mark Redekopp and David Kempe
CSCI 0 fel Ferreir d Silv rfsilv@isi.edu Slides dpted from: Mrk edekopp nd Dvid Kempe LOG STUCTUED MEGE TEES Series Summtion eview Let n = + + + + k $ = #%& #. Wht is n? n = k+ - Wht is log () + log ()
More informationSolving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016
Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence Winter 2016 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl
More informationCS 340, Fall 2016 Sep 29th Exam 1 Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.
CS 340, Fll 2016 Sep 29th Exm 1 Nme: Note: in ll questions, the speil symol ɛ (epsilon) is used to indite the empty string. Question 1. [10 points] Speify regulr expression tht genertes the lnguge over
More informationParallelization Optimization of System-Level Specification
Prlleliztion Optimiztion of System-Level Speifition Luki i niel. Gjski enter for Emedded omputer Systems University of liforni Irvine, 92697, US {li, gjski} @es.ui.edu strt This pper introdues the prlleliztion
More informationCooperative Routing in Multi-Source Multi-Destination Multi-hop Wireless Networks
oopertive Routing in Multi-Soure Multi-estintion Multi-hop Wireless Networks Jin Zhng Qin Zhng eprtment of omputer Siene n ngineering Hong Kong University of Siene n Tehnology, HongKong {zjzj, qinzh}@se.ust.hk
More informationXML and Databases. Sebastian Maneth NICTA and UNSW. Lecture 2 Memory Representations for XML: Space vs Access Speed. -- Semester 1, 2010
1 XML n Dtbses Leture 2 Memory Representtions for XML: Spe vs Aess Spee Sebstin Mneth NICTA n UNSW CSE@UNSW -- Semester 1, 2010 2 XML n Dtbses Leture 2 Memory Representtions for XML: Spe vs Aess Spee Sebstin
More informationType Checking. Roadmap (Where are we?) Last lecture Context-sensitive analysis. This lecture Type checking. Symbol tables
Type Cheking Rodmp (Where re we?) Lst leture Contet-sensitie nlysis Motition Attriute grmmrs Ad ho Synt-direted trnsltion This leture Type heking Type systems Using synt direted trnsltion Symol tles Leil
More informationCOP 4531 Complexity & Analysis of Data Structures & Algorithms
COP 4531 Complexity & Analysis of Data Structures & Algorithms Lecture 9 Minimum Spanning Trees Thanks to the text authors who contributed to these slides Why Minimum Spanning Trees (MST)? Example 1 A
More information10.5 Graphing Quadratic Functions
0.5 Grphing Qudrtic Functions Now tht we cn solve qudrtic equtions, we wnt to lern how to grph the function ssocited with the qudrtic eqution. We cll this the qudrtic function. Grphs of Qudrtic Functions
More information4.3 Balanced Trees. let us assume that we can manipulate them conveniently and see how they can be put together to form trees.
428 T FOU 4.3 Blned Trees T BT GOIT IN T VIOU setion work well for wide vriety of pplitions, ut they hve poor worst-se performne. s we hve noted, files lredy in order, files in reverse order, files with
More informationAnnouncements Problem Set 5 is out (today)!
CSC263 Week 10 Announcements Problem Set is out (today)! Due Tuesday (Dec 1) Minimum Spanning Trees The Graph of interest today A connected undirected weighted graph G = (V, E) with weights w(e) for each
More informationMath 227 Problem Set V Solutions. f ds =
Mth 7 Problem Set V Solutions If is urve with prmetriztion r(t), t b, then we define the line integrl f ds b f ( r(t) ) dr dt (t) dt. Evlute the line integrl f(x,y,z)ds for () f(x,y,z) xosz, the urve with
More informationComparing Hierarchical Data in External Memory
Compring Hierrhil Dt in Externl Memory Surshn S. Chwthe Deprtment of Computer Siene University of Mryln College Prk, MD 090 hw@s.um.eu Astrt We present n externl-memory lgorithm for omputing minimum-ost
More informationAlgorithm Design (5) Text Search
Algorithm Design (5) Text Serch Tkshi Chikym School of Engineering The University of Tokyo Text Serch Find sustring tht mtches the given key string in text dt of lrge mount Key string: chr x[m] Text Dt:
More informationComparison-based Choices
Comprison-se Choies John Ugner Mngement Siene & Engineering Stnfor University Joint work with: Jon Kleinerg (Cornell) Senhil Mullinthn (Hrvr) EC 17 Boston June 28, 2017 Preiting isrete hoies Clssi prolem:
More informationCOSC 6374 Parallel Computation. Communication Performance Modeling (II) Edgar Gabriel Fall Overview. Impact of communication costs on Speedup
COSC 6374 Prllel Computtion Communition Performne Modeling (II) Edgr Griel Fll 2015 Overview Impt of ommunition osts on Speedup Crtesin stenil ommunition All-to-ll ommunition Impt of olletive ommunition
More informationLesson6: Modeling the Web as a graph Unit5: Linear Algebra for graphs
Lesson6: Modeling the We s grph Unit5: Liner Alger for grphs Rene Pikhrdt Introdution to We Siene Prt 2 Emerging We Properties Rene Pikhrdt Institute CC-BY-SA-3. for We Siene nd Tehnologies Modeling the
More informationGenerating Editors for Direct Manipulation of Diagrams
Generting Eitors for Diret Mnipultion of Digrms Gerhr Viehstet n Mrk Mins Lehrstuhl für Progrmmiersprhen Universität Erlngen-Nürnerg Mrtensstr. 3, 91058 Erlngen, Germny E-mil: fviehste,minsg@informtik.uni-erlngen.e
More informationMinimal Memory Abstractions
Miniml Memory Astrtions (As implemented for BioWre Corp ) Nthn Sturtevnt University of Alert GAMES Group Ferury, 7 Tlk Overview Prt I: Building Astrtions Minimizing memory requirements Performnes mesures
More informationa < a+ x < a+2 x < < a+n x = b, n A i n f(x i ) x. i=1 i=1
Mth 33 Volume Stewrt 5.2 Geometry of integrls. In this section, we will lern how to compute volumes using integrls defined by slice nlysis. First, we recll from Clculus I how to compute res. Given the
More informationCS311H: Discrete Mathematics. Graph Theory IV. A Non-planar Graph. Regions of a Planar Graph. Euler s Formula. Instructor: Işıl Dillig
CS311H: Discrete Mthemtics Grph Theory IV Instructor: Işıl Dillig Instructor: Işıl Dillig, CS311H: Discrete Mthemtics Grph Theory IV 1/25 A Non-plnr Grph Regions of Plnr Grph The plnr representtion of
More informationWORKSHOP 9 HEX MESH USING SWEEP VECTOR
WORKSHOP 9 HEX MESH USING SWEEP VECTOR WS9-1 WS9-2 Prolem Desription This exerise involves importing urve geometry from n IGES file. The urves re use to rete other urves. From the urves trimme surfes re
More informationHash-based Subgraph Query Processing Method for Graph-structured XML Documents
Hsh-bse Subgrph Query Proessing Metho for Grph-struture XML Douments Hongzhi Wng Hrbin Institute of Teh. wngzh@hit.eu.n Jinzhong Li Hrbin Institute of Teh. lijzh@hit.eu.n Jizhou Luo Hrbin Institute of
More information[Prakash* et al., 5(8): August, 2016] ISSN: IC Value: 3.00 Impact Factor: 4.116
[Prksh* et l 58: ugust 6] ISSN: 77-9655 I Vlue: Impt Ftor: 6 IJESRT INTERNTIONL JOURNL OF ENGINEERING SIENES & RESERH TEHNOLOGY SOME PROPERTIES ND THEOREM ON FUZZY SU-TRIDENT DISTNE Prveen Prksh* M Geeth
More informationComputational geometry
Leture 23 Computtionl geometry Supplementl reding in CLRS: Chpter 33 exept 33.3 There re mny importnt prolems in whih the reltionships we wish to nlyze hve geometri struture. For exmple, omputtionl geometry
More information