Review: Binary Trees. CSCI 262 Data Structures. Search Trees. In Order Traversal. Binary Search Trees 4/10/2018. Review: Binary Tree Implementation
|
|
- Dylan Fletcher
- 6 years ago
- Views:
Transcription
1 Rviw: Binry Trs CSCI 262 Dt Struturs 21 Binry Srh Trs A inry tr is in rursivly: = or A inry tr is (mpty) root no with lt hil n riht hil, h o whih is inry tr. Rviw: Binry Tr Implmnttion Just ollow th rursiv inition to t simpl implmnttion: lss inry_tr_no { puli: T t; inry_tr_no<t>* lt; inry_tr_no<t>* riht; Srh Trs Dt strutur or holin omprl lmnts Eiint srhin, insrtion, ltion Unrlyin strutur or sts, mps (BSTs) Also us in ts inxin (B-Trs) Th si strutur: Nos hol uniqu t vlus n pointrs to hil nos Dt ts s prtitionin lmnt in th tr: Chil nos/trs to th lt o th t lmnt hv vlu lss thn th t lmnt Chil nos/trs to th riht hv vlu rtr thn th t lmnt Binry Srh Trs In Orr Trvrsl Hr s inry srh tr (BST): Nos ontin strins Lt hil sutr ontins only vlus lss thn root Root vlu is lss thn ll riht hil sutr vlus Visit lt sutr, visit root, visit riht sutr. voi print_inorr(inry_tr_no<t>* root) { i (root!= NULL) { print_inorr(root->lt); out << root->t << ; print_inorr(root->riht); ppl nn hrry uv lmon orn ph pr quin 1
2 Srhin Insrtin Exmpl: srh (root, ) Whr o w insrt n itm into th tr? How woul you to this tr? inry_tr_no<t>* srh(inry_tr_no<t>* root, T vl) { i (root == NULL) rturn NULL; i (vl == root->t) rturn root; i (vl < root->t) rturn srh(root->lt, vl); ls rturn srh(root->riht, vl); Answr: put it whr you xpt to in it! Insrtin Rmovin voi insrt(inry_tr_no<t>*& root, T vl) { i (root == NULL) root = nw inry_tr_no<t>(vl); ls i (vl < tr->ino) insrt(tr->lt, vl); ls i (vl > tr->ino) insrt(tr->riht, vl); Exmpl: insrt(root, ) voi rmov(inry_tr_no<t>* root, T vl) { // this is trikir!... Wht i ws lry in our tr? Wht o w o irst? Wht is th s s? Rmovin Rmovin Cs 1: No Chil 3 Css whn no is in tr: 1. No hilrn 2. On hil 3. Two hilrn 1. Fin th itm 2. Dth n lt Exmpl: rmov(root, ) 2
3 Rmovin Cs 2: On Chil Rmovin Cs 3: Two Chilrn 1. Fin th itm 2. Link hil to prnt 3. Dlt Exmpl: rmov(root, ) 1. Fin th itm 2. Swp with rihtmost itm in lt sutr (why?) 3. Rmov rihtmost no in lt sutr (Cs 1 or 2) Exmpl: rmov(root, ) Rmovin: Co Prti With BSTs voi rmov(inry_tr_no<t>*& root, T vl) { i (root == NULL) rturn NULL; i (vl < root->t) rmov(root->lt, vl); ls i (vl > root->t) rmov(root->riht, vl); ls { // itm oun! i (root->lt == NULL root->riht == NULL) { inry_tr_no<t>* tmp; i (root->lt == NULL) tmp = root->riht; ls tmp = root->lt; lt root; root = tmp; ls { inry_tr_no<t>* tmp = root->lt; // in rihtmost no inry_tr_no<t>* prnt = root; // in lt sutr whil (tmp->riht!= NULL) { prnt = tmp; tmp = tmp->riht; root->t = tmp->t; // opy t to root i (prnt == root) // th n lt rihtmost no root->lt = tmp->lt; // in lt sutr ls prnt->riht = tmp->lt; lt tmp; Bs s: itm not oun, o nothin. Rursiv lls to in itm to lt. Css 1 n 2, oth. Cn you s why s 1 is hnl y this lok? Cs Anlysis Complxity o Srh Wht is th i-o omplxity o: Srhin? Insrtin? Rmovin? srh(root, ) How mny rursiv stps? A. <= hiht o tr 3
4 Hiht o Trs So how hih is tr with N nos? Hiht-Bln Trs (AVL) Ain, rursiv inition: Lt n riht sutrs r hiht-ln Lt n riht sutrs ir in hiht y no mor thn 1 Bst s: h = lo 2 (N+1) = O(lo N) Worst s: h = N Whih o ths r hiht ln? h Anlysis on Bln BSTs Whn trs r ln: Eh sutr ontins rouhly hl th nos Eh stp own th tr rouhly hlvs th prolm inry_tr_no<t>* srh(inry_tr_no<t>* root, T vl) { i (root == NULL) rturn NULL; i (vl == root->t) rturn root; i (vl < root->t) rturn srh(root->lt, vl); rturn srh(root->riht, vl); Srh, insrt, lt r ll O(lo N) Sl Blnin BSTs Trs om unln throuh sris o insrts n lts Sl-lnin: prorm O(lo N) or wr oprtions to rln tr insrt, lt Exmpls o sl-lnin BSTs: R-Blk trs AVL trs Sply trs Rottions Rlnin Exmpl (AVL) W hn th ln t no vi rottion: y x x y C A A B This is th riht rottion. Th lt rottion is th mirror im o this on. B C Rmovin this no unlns th tr t. A sinl riht rottion rstors ln. I th tr shown ws BST, is th nw tr BST? 4
5 Tr Blnin (AVL) Finl Wors Why BSTs mttr: Linux krnl: shulrs, xt3 ilsystm, virtul mmory, mny mor (R-Blk trs) Orr st n mp typs (.., C++ STL, Jv) (R-Blk trs in!) Dts inxin (B-trs not xtly BSTs, ut rlt) Filsystm mtt inxin (B-trs or R-B) Lurkin in your vorit OS? Up Nxt Friy, April 13 E-DAYS NO CLASS Mony, April 16 Mitrm rviw APT 5 u Wnsy, April 18 Mitrm 2 (in lss) Friy, April 20 Fun & Gms inst o l (optionl) 5
Lecture Outline. Memory Hierarchy Management. Register Allocation. Register Allocation. Lecture 19. Cache Management. The Memory Hierarchy
Ltur Outlin Mmory Hirrhy Mngmnt Rgistr Allotion Ltur 19 Rgistr Allotion Rgistr intrrn grph Grph oloring huristis Spilling Ch Mngmnt Pro. Boik CS 164 Ltur 17 1 Pro. Boik CS 164 Ltur 17 2 Th Mmory Hirrhy
More informationReachability. Directed DFS. Strong Connectivity Algorithm. Strong Connectivity. DFS tree rooted at v: vertices reachable from v via directed paths
irt Grphs OR SFO FW LX JFK MI OS irph is rph whos s r ll irt Short or irt rph pplitions on-wy strts lihts tsk shulin irphs ( 12.) irt Grphs 1 irt Grphs 2 irph Proprtis rph G=(V,) suh tht h os in on irtion:
More informationReading. K-D Trees and Quad Trees. Geometric Data Structures. k-d Trees. Range Queries. Nearest Neighbor Search. Chapter 12.6
Rn Cptr 12.6 K-D Trs n Qu Trs CSE 326 Dt Struturs Ltur 9 2/2/05 K-D Trs n Qu Trs - Ltur 9 2 Gomtr Dt Struturs Ornzton o ponts, lns, plns, to support str prossn Appltons Astropsl smulton voluton o ls Grps
More informationHistory Rgistr Allotion Exmpl As ol s intrmit o Consir this progrm with six vrils: := + := + := - 1 Us in th originl FORTRAN ompilr (1950 s) Vry ru lg
Th Mmory Hirrhy Avn Compilrs CMPSCI 710 Spring 2003 Highr = smllr, str, losr to CPU A rl sktop mhin (min) Rgistr Allotion Emry Brgr rgistrs 8 intgr, 8 loting-point; 1-yl ltny L1 h 8K t & instrutions; 2-yl
More informationGlobal Register Allocation
Ltur Outlin Glol Rgistr Allotion Mmory Hirrhy Mngmnt Rgistr Allotion vi Grph Coloring Rgistr intrrn grph Grph oloring huristis Spilling Ch Mngmnt 2 Th Mmory Hirrhy Rgistrs 1 yl 256-8000 yts Ch 3 yls 256k-16M
More informationLecture Outline. Memory Hierarchy Management. Register Allocation. Register Allocation. Lecture 38. Cache Management. Managing the Memory Hierarchy
Ltur Outlin Mmory Hirrhy Mngmnt Rgistr Allotion Ltu8 (rom nots y G. Nul n R. Boik) Rgistr Allotion Rgistr intrrn grph Grph oloring huristis Spilling Ch Mngmnt 4/27/08 Pro. Hilingr CS164 Ltu8 1 4/27/08
More informationOutline. Graphs Describing Precedence. Graphs Describing Precedence. Topological SorFng of DAGs. Graphs Describing Precedence 4/25/12. Part 10.
4// Outlin Prt. Grphs CS Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits Grphs Dsriing Prn Grphs Dsriing
More informationCS 331: Artificial Intelligence Bayesian Networks (Inference) Inference
S 331: rtificil Intllignc ysin Ntworks Infrnc 1 Infrnc Suppos you r givn ysin ntwork with th grph structur n th prmtrs ll figur out Now you woul lik to us it to o infrnc You n infrnc to mk prictions or
More informationWORKSHOP 2 Solid Shell Composites Modeling
WORKSHOP 2 Soli Shll Composits Moling WS2-1 WS2-2 Workshop Ojtivs Bom fmilir with stting up soli omposit shll mol Softwr Vrsion Ptrn 2011 MD Nstrn 2011.1 Fils Rquir soli_shll. WS2-3 Prolm Dsription Simult
More informationFinding a Funicular Curve Through Two Points
This is th glss pyrmi t th Louvr Musum in Pris, sign y rhitt I.M. Pi. It is support from nth y stl ls. In signing strutur suh s this, it is oftn most usful to slt l of rtin siz n tnsil strngth, n thn to
More informationRegister Allocation. Register Allocation
Rgistr Allocation Jingk Li Portlan Stat Univrsity Jingk Li (Portlan Stat Univrsity) CS322 Rgistr Allocation 1 / 28 Rgistr Allocation Assign an unboun numbr of tmporaris to a fix numbr of rgistrs. Exampl:
More informationOrthogonal line segment intersection
Computtionl Geometry [csci 3250] Line segment intersection The prolem (wht) Computtionl Geometry [csci 3250] Orthogonl line segment intersection Applictions (why) Algorithms (how) A specil cse: Orthogonl
More informationObjectives. Two Ways to Implement Lists. Lists. Chapter 24 Implementing Lists, Stacks, Queues, and Priority Queues
Chaptr 24 Implmnting Lists, Stacks, Quus, and Priority Quus CS2: Data Structurs and Algorithms Colorado Stat Univrsity Original slids by Danil Liang Modifid slids by Chris Wilcox Objctivs q To dsign common
More information1. Trace the array for Bubble sort 34, 8, 64, 51, 32, 21. And fill in the following table
1. Trac th array for Bubbl sort 34, 8, 64, 51, 3, 1. And fill in th following tabl bubbl(intgr Array x, Intgr n) Stp 1: Intgr hold, j, pass; Stp : Boolan switchd = TRUE; Stp 3: for pass = 0 to (n - 1 &&
More informationPresentation Martin Randers
Presenttion Mrtin Rnders Outline Introduction Algorithms Implementtion nd experiments Memory consumption Summry Introduction Introduction Evolution of species cn e modelled in trees Trees consist of nodes
More informationCompiling: Examples and Sample Problems
REs for Kywors Compiling: Exmpls n mpl Prolms IC312 Mchin-Lvl n ystms Progrmming Hnri Csnov (hnric@hwii.u) It is sy to fin RE tht scris ll kywors Ky = if ls for whil int.. Ths cn split in groups if n Kywor
More informationMERGE-BASED SpMV PERFECT WORKLOAD BALANCE. GUARANTEED. Duane Merrill, NVIDIA Research
MERGE-BASED SpMV PERFECT WORKLOAD BALANCE. GUARANTEED. Dun Mrrill, NVIDIA Rsr SPARSE MATRIX-VECTOR MULTIPLICATION SpMV (Ax = y) -- -- -- -- -- -- -- -- * = 2.0 0.0 2.0 4.0 sprs mtrix A ns vtor x ns vtor
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 informationHSHM-H110AX-5CPX HSHM-H105BX-5CPX TYPE B21, 105 SIGNAL CONTACTS HSHM-HXXXXXX-5CPX-XXXXX
M TM HSHM PRSS-FIT HR, -ROW, HSHM SRIS FOR HIGH SP HR MTRI PPLITIONS * UP TO Gb/s T RTS * LOW ROSSTLK T HIGH FRQUNIS * / (SINGL-N/IFFRNTIL) IMPN * MOULR/SLL FORMT I -- * MT LINS PR INH * SHIPS WITH PROTTIV
More informationOverview Linear Algebra Review Linear Algebra Review. What is a Matrix? Additional Resources. Basic Operations.
Oriw Ro Jnow Mon, Sptmr 2, 24 si mtri oprtions (, -, *) Cross n ot prouts Dtrminnts n inrss Homonous oorints Ortonorml sis itionl Rsours 8.6 Tt ook 6.837 Tt ook 6.837-stff@rpis.sil.mit.u Ck t ours wsit
More informationEE 231 Fall EE 231 Homework 10 Due November 5, 2010
EE 23 Fall 2 EE 23 Homwork Du Novmbr 5, 2. Dsign a synhronous squntial iruit whih gnrats th following squn. (Th squn should rpat itslf.) (a) Draw a stat transition diagram for th iruit. This is a systm
More informationITEC2620 Introduction to Data Structures
ITEC0 Introduction to Dt Structures Lecture 7 Queues, Priority Queues Queues I A queue is First-In, First-Out = FIFO uffer e.g. line-ups People enter from the ck of the line People re served (exit) from
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 informationInterference graph. Register Allocation. A bigger example. Units of allocation
Rgistr Alloation Intrfrn graph Th prolm: assign mahin rsours (rgistrs, stak loations) to hol run-tim ata Constraint: simultanously liv ata alloat to iffrnt loations Goal: minimiz ovrha of stak loas & stors
More informationTries. Yufei Tao KAIST. April 9, Y. Tao, April 9, 2013 Tries
Tries Yufei To KAIST April 9, 2013 Y. To, April 9, 2013 Tries In this lecture, we will discuss the following exct mtching prolem on strings. Prolem Let S e set of strings, ech of which hs unique integer
More informationCSE P 501 Compilers. Register Allocation Hal Perkins Spring UW CSE P 501 Spring 2018 P-1
CSE P 501 Compilrs Rgistr Allotion Hl Prkins Spring 2018 UW CSE P 501 Spring 2018 P-1 Agn Rgistr llotion onstrints Lol mthos Fstr ompil, slowr o, ut goo nough or lots o things (JITs, ) Glol llotion rgistr
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 informationStore Tours Washington DC
Things To Look For: Th Customr Journy == Entrn == Cln n inviting? Opning hours post? Wht o you noti vn for you ntr? == First Imprssion == Lighting? Musi plying? Dos th stor fl wloming? Dos somon grt you
More informationDeletion The Two Child Case 10 Delete(5) Deletion The Two Child Case. Balanced BST. Finally
Deletion Te Two Cild Cse Delete() Deletion Te Two Cild Cse Ide: Replce te deleted node wit vlue gurnteed to e etween te two cild sutrees! Options: succ from rigt sutree: findmin(t.rigt) pred from left
More informationQuadrilateral Decomposition by Two-Ear Property Resulting in CAD Segmentation
Quriltrl Domposition y wo-er Proprty Rsulting in CAD Sgmnttion Mhrvo Rnrinrivony Astrt W minly im t splitting simply onnt polygon into st o onvx quriltrls without insrting nw ounry nos. Our pproh is s
More informationLecture 39: Register Allocation. The Memory Hierarchy. The Register Allocation Problem. Managing the Memory Hierarchy
Ltur 39: Rgistr Alloation [Aapt rom nots y R. Boik an G. Nula] Topis: Mmory Hirarhy Managmnt Rgistr Alloation: Rgistr intrrn graph Graph oloring huristis Spilling Cah Managmnt Th Mmory Hirarhy Computrs
More informationPerformance, Scalability, and Numerical Stability of Manycore. Wen-mei Hwu University of Illinois at Urbana-Champaign
Prformn, Slility, nd Numril Stility of Mnyor Algorithms Wn-mi Hwu Univrsity of Illinois t Urn-Chmpign Cry XE6 Nods Blu Wtrs ontins,64 Cry XE6 omput nods. Dul-sokt Nod Two AMD Intrlgos hips 6 or moduls,
More informationGraph Theory & Applications. Boundaries Using Graphs. Graph Search. Find the route that minimizes. cost
Graph Thory & Appliations Bounaris Using Graphs 3 4 3 4 5 Fin th rout that minimizs osts Fin th ritial path in a projt Fin th optimal borr aroun a rgion Fin loop an no quations or analog iruit analysis
More informationSection 2.3 Functions. Definition: Let A and B be sets. A function (mapping, map) f from A to B, denoted f :A B, is a subset of A B such that
Setion 2.3 Funtions Definition: Let n e sets. funtion (mpping, mp) f from to, enote f :, is suset of suh tht x[x y[y < x, y > f ]] n [< x, y 1 > f < x, y 2 > f ] y 1 = y 2 Note: f ssoites with eh x in
More informationUnhiding Redundancy in SAT
Armin Bir Institut or Forml Mols n Vriition Jonns Kplr Univrsity Linz, Austri joint work wit Mrijn Hul n Mtti Järvislo Dution t Sl 2011 Rinr Cstl, Trns, Grmny Mony, Mr 7, 2011 Motivtion 1/21 SAT solvrs
More informationWORKSHOP 12 ANCHOR LOADS AND BOUNDARY CONDITIONS USING A FIELD
WORKSHOP 12 ANCHOR LOADS AND BOUNDARY CONDITIONS USING A FIELD WS12-1 WS12-2 Workshop Ojtivs Using fil for prssur loing, n rting onstrints t th lotions for wshrs Prolm Dsription Crt fil with th sin funtion,
More information1⅝" - 3¾" (40-95mm) FIXTURE BASE. 3/4" (19mm) 4" - 6¾" ( mm) ALLEN KEY (INCLUDED)
PG: 1 O 7 IMPORTNT - R RULLY OR INSTLLING IXTUR. RTIN THS INSTRUTIONS OR UTUR RRN. THIS PROUT MUST INSTLL IN ORN WITH TH NTIONL LTRIL O N LL PPLIL LOL OS, Y PRSON MILIR WITH TH ONSTRUTION N OPRTION O TH
More informationDOCUMENT STATUS: - NOTICE OF PROPRIETARY INFORMATION
RVSON STORY RV T SRPTON O Y 50 /0/00 PROUTON RLS 4 MM //0 RPL P/N 40- WT 40-; RPL P/N 40-00 & 40-0 WT 40-45 N RMOV P/N 40-54 & 40-000 ROM T SSMLY 55 S //0 UPT NLR N ST SSY 5 MM 0//0 RPL 40- WT 40- TO SR
More informationCSE 401/M501 Compilers
CSE 401/M501 Compilrs Compilr Bckn Survy Hl Prkins Spring 2018 UW CSE 401/M501 Spring 2018 Q-1 Aministrivi Compilr projct: floting-point u tomorrow (plus lt ys if you hv thm); short rport u Stury night
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 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 informationCS153: Compilers Lecture 20: Register Allocation I
CS153: Copilrs Ltur 20: Ristr Alloation I Stpn Con ttps://www.sas.arvar.u/ourss/s153 Pr-lass Puzzl Wat s t iniu nur o olors n to olor a ap o t USA? Evry stat is assin on olor Aant stats ust ivn irnt olors
More informationThis module calculates the motor speed based on a rotor position measurement when the direction information is available.
SPEED_FRQ Spd Calulator Basd on Rotor Angl With Dirtion Information Dsription This modul alulats th motor spd basd on a rotor position masurmnt whn th dirtion information is availabl. thta_l dir_qep SPEED_FRQ
More informationISO VIEW COVER, EXPRESS EXIT 4X4 FLIP COVER OPEN VIEW EXPRESS EXIT ON TROUGH VIEW
RV MO WN T 00899MO OVL 07-JN-5 0078MO HUH 7-SP-5 5.90 RF.87 RF.000 RF ISO VIW SL OVR, 0.50 OVR XTNSION X FLIP OVR FGS-MX-- (NOT INLU IN KIT).07 RF 7.7 RF FLIP OVR OPN VIW SL X STRIGHT STION RF RKT, XPRSS
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 informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy Recognition of Tokens if expressions nd reltionl opertors if è if then è then else è else relop
More informationCOMP 423 lecture 11 Jan. 28, 2008
COMP 423 lecture 11 Jn. 28, 2008 Up to now, we hve looked t how some symols in n lphet occur more frequently thn others nd how we cn sve its y using code such tht the codewords for more frequently occuring
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 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 informationDistributed Systems Principles and Paradigms. Chapter 11: Distributed File Systems
Distriuted Systems Priniples nd Prdigms Mrten vn Steen VU Amsterdm, Dept. Computer Siene steen@s.vu.nl Chpter 11: Distriuted File Systems Version: Deemer 10, 2012 2 / 14 Distriuted File Systems Distriuted
More informationDistributed Systems Principles and Paradigms
Distriuted Systems Priniples nd Prdigms Christoph Dorn Distriuted Systems Group, Vienn University of Tehnology.dorn@infosys.tuwien..t http://www.infosys.tuwien..t/stff/dorn Slides dpted from Mrten vn Steen,
More informationMotivation. Synthetic OOD concepts and reuse Lecture 4: Separation of concerns. Problem. Solution. Deleting composites that share parts. Or is it?
Synthtic OOD concpts and rus Lctur 4: Sparation of concrns Topics: Complx concrn: Mmory managmnt Exampl: Complx oprations on composit structurs Problm: Mmory laks Solution: Rfrnc counting Motivation Suppos
More information1 Which of the following keyword can not be appeared inside the class? a)virtual b)static c)template d)friend c
1 Whih of the following keywor n not e ppere insie the lss? )virtul )stti )templte )frien 2 Wht is templte? )Templte is formul for reting generi lss )Templte is use to mnipulte lss )Templte is use for
More informationA positional container ("pcontainer" for short) is a generic container that is organized by position, which means
Chaptr: Gnric Positional Containrs and Doul Endd Quus Gnric Positional Containrs A positional containr is a gnric containr that stors lmnts y position at th discrtion of a clint. For xampl, a vctor stors
More informationΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών. Lecture 3b Lexical Analysis Elias Athanasopoulos
ΕΠΛ323 - Θωρία και Πρακτική Μταγλωττιστών Lecture 3 Lexicl Anlysis Elis Athnsopoulos elisthn@cs.ucy.c.cy RecogniNon of Tokens if expressions nd relnonl opertors if è if then è then else è else relop è
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 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 informationCS201 Discussion 10 DRAWTREE + TRIES
CS201 Discussion 10 DRAWTREE + TRIES DrwTree First instinct: recursion As very generic structure, we could tckle this problem s follows: drw(): Find the root drw(root) drw(root): Write the line for the
More informationCD _. _. 'p ~~M CD, CD~~~~V. C ~'* Co ~~~~~~~~~~~~- CD / X. pd.0 & CD. On 0 CDC _ C _- CD C P O ttic 2 _. OCt CD CD (IQ. q"3. 3 > n)1t.
n 5 L n q"3 +, / X g ( E 4 11 " ') $ n 4 ) w Z$ > _ X ~'* ) i 1 _ /3 L 2 _ L 4 : 5 n W 9 U~~~~~~ 5 T f V ~~~~~~~~~~~~ (Q ' ~~M 3 > n)1 % ~~~~V v,~~ _ + d V)m X LA) z~~11 4 _ N cc ', f 'd 4 5 L L " V +,
More informationLecture T1: Pattern Matching
Introduction to Theoreticl CS Lecture T: Pttern Mtchin Two fundmentl questions. Wht cn computer do? Wht cn computer do with limited resources? Generl pproch. Don t tlk out specific mchines or prolems.
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 informationFinal Exam Review F 06 M 236 Be sure to look over all of your tests, as well as over the activities you did in the activity book
inl xm Review 06 M 236 e sure to loo over ll of your tests, s well s over the tivities you did in the tivity oo 1 1. ind the mesures of the numered ngles nd justify your wor. Line j is prllel to line.
More informationbox Boxes and Arrows 3 true 7.59 'X' An object is drawn as a box that contains its data members, for example:
Boxes nd Arrows There re two kinds of vriles in Jv: those tht store primitive vlues nd those tht store references. Primitive vlues re vlues of type long, int, short, chr, yte, oolen, doule, nd flot. References
More informationShift. Reduce. Review: Shift-Reduce Parsing. Bottom-up parsing uses two actions: Bottom-Up Parsing II. ABC xyz ABCx yz. Lecture 8.
Rviw: Shift-Rduc Parsing Bottom-up parsing uss two actions: Bottom-Up Parsing II Lctur 8 Shift ABC xyz ABCx yz Rduc Cbxy ijk CbA ijk Prof. Aikn CS 13 Lctur 8 1 Prof. Aikn CS 13 Lctur 8 2 Rcall: h Stack
More informationTorrance Transit Park and Ride. Regional Terminal. PHASE II CLIENT PROJECT #: B Drawing Title
I M QUIMNT LGN VI SITION T I M ONTOL NL MIN I M TMINL INT I M NNUNITO NL WTH-OO MULTI N HON/STO, WLL MOUNT MULTI N HON/STO, WLL MOUNT HON, WLL MOUNT HON, ILING MOUNT MULTI N HON/STO, ILING MOUNT WTH-OO
More informationSuffix Tries. Slides adapted from the course by Ben Langmead
Suffix Tries Slides dpted from the course y Ben Lngmed en.lngmed@gmil.com Indexing with suffixes Until now, our indexes hve een sed on extrcting sustrings from T A very different pproch is to extrct suffixes
More informationSoftware Pipelining Can we decrease the latency? Goal of SP Lecture. Seth Copen Goldstein Software Pipelining
5-4 Ltur 5-745 Sotwr Piplinin Copyrit St Copn Goltin -8 Sotwr Piplinin Sotwr piplinin i n IS tniqu tt rorr t intrution in loop. Poily movin intrution rom on itrtion to t prviou or t nxt itrtion. Vry lr
More informationMDP NO VALIDO PARA NAVEGACION REAL MAR DEL PLATA, ARGENTINA .RADAR.MINIMUM.ALTITUDES. GES NDB MDP VILLA GESSELL MAR DEL PLATA ASTOR PIAZZOLLA
SZM/MQ MR EL PLT pproach pt Elev 118.75 Spanish ly 73' lt Set: hpa MR EL PLT, RGENTIN.RR.MINIMUM.LTITUES. Trans level: y T Trans alt: 36-30 10 20 30 40 50 37-00 37-30 330^ 300^ 55 NM 230^ 2300 20 80 60
More informationChapter 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 informationCS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08
CS412/413 Introduction to Compilers Tim Teitelum Lecture 4: Lexicl Anlyzers 28 Jn 08 Outline DFA stte minimiztion Lexicl nlyzers Automting lexicl nlysis Jlex lexicl nlyzer genertor CS 412/413 Spring 2008
More informationCS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata
CS 432 Fll 2017 Mike Lm, Professor (c)* Regulr Expressions nd Finite Automt Compiltion Current focus "Bck end" Source code Tokens Syntx tree Mchine code chr dt[20]; int min() { flot x = 42.0; return 7;
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 informationSummary: Semantic Analysis
Summary: Smantic Analysis Chck rrors not dtctd by lxical or syntax analysis Intrmdiat Cod Scop rrors: Variabls not dfind Multipl dclarations Typ rrors: Assignmnt of valus of diffrnt typs Invocation of
More informationMidterm 2 - Solutions 1
COS 26 Gnral Computr Scinc Spring 999 Midtrm 2 - Solutions. Writ a C function int count(char s[ ]) that taks as input a \ trminatd string and outputs th numbr of charactrs in th string (not including th
More informationVAT GX - IP VIDEO FIELD ADD-ON/RETROFIT SINGLE CHANNEL ENCODER
L00 LL -800-999-600 VT GX - IP VIDO ILD DD-ON/RTROIT SINGL HNNL NODR NTWORK ONNTORS SING: MTRIL: P + BS X7240 OLOR: DRK BLU SUSTINBILITY: MMORY: PV R 256 MB RM, 256 MB LSH BTTRY BKD- RL TIM LOK POWR: POWR
More informationProtection relays. 3-pole thermal overload relays LR2 or LR3-D. Dimensions
-pol thrmal ovrloa rlays LR or LR-D pags 70/ an 70/ pags 70/ to 70/ Shms : pag 70/ Dimnsions LR. LR-D Mounting bnath ontators LC-D09 to D8, LP-D09 to D8 an LP-D b M-DP00 M-DE00 9. 7() 9 8 7 g b() g LC-D09,
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 informationCalculus Differentiation
//007 Clulus Differentition Jeffrey Seguritn person in rowot miles from the nerest point on strit shoreline wishes to reh house 6 miles frther down the shore. The person n row t rte of mi/hr nd wlk t rte
More informationMore Binary Search Trees AVL Trees. CS300 Data Structures (Fall 2013)
More Binary Search Trees AVL Trees bstdelete if (key not found) return else if (either subtree is empty) { delete the node replacing the parents link with the ptr to the nonempty subtree or NULL if both
More informationairservices AERODROME CHART - Page 1 SYDNEY/BANKSTOWN, NSW (YSBK) AD ELEV 34 S E Airservices Australia 2017 ATIS APP/DEP (SY) TWR SMC
D V 34 S33 55 28 150 59 18 TIS PP/DP (SY) TWR SM RODROM HRT - Page 1 SYDNY/NKSTOWN, NSW (YSK) FI (H) TF+FRU (H) earings are Magnetic levations in FT MS 150 59 00 151 00 00 12 S33 55 00 F V 23 1 1 H 2 2
More informationTiling the plane with equilateral convex pentagons
Prol Volum 52, Issu 3 (2016) Tiling th pln with quiltrl onvx pntgons Mri Fishr 1 Mthmtiins n non-mthmtiins hv n onrn with fining pntgonl tilings for lmost 100 yrs, yt tiling th pln with onvx pntgons rmins
More informationModule 4: Index Structures Lecture 13: Index structure. The Lecture Contains: Index structure. Binary search tree (BST) B-tree. B+-tree.
The Lecture Contains: Index structure Binary search tree (BST) B-tree B+-tree Order file:///c /Documents%20and%20Settings/iitkrana1/My%20Documents/Google%20Talk%20Received%20Files/ist_data/lecture13/13_1.htm[6/14/2012
More informationHere is an example where angles with a common arm and vertex overlap. Name all the obtuse angles adjacent to
djcent tht do not overlp shre n rm from the sme vertex point re clled djcent ngles. me the djcent cute ngles in this digrm rm is shred y + + me vertex point for + + + is djcent to + djcent simply mens
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 informationMore BSTs & AVL Trees bstdelete
More BSTs & AVL Trees bstdelete if (key not found) return else if (either subtree is empty) { delete the node replacing the parents link with the ptr to the nonempty subtree or NULL if both subtrees are
More informationCS-184: Computer Graphics. Today
CS-184: Computer Grphics Lecture #10: Clippin n Hien Surces Pro. Jmes O Brien University o Cliorni, Berkeley V2006-F-10-1.0 Toy Clippin Clippin to view volume Clippin ritrry polyons Hien Surce Removl Z-Buer
More informationH SERIES. Percentage Basics. Curriculum Ready.
Prntg Bsis Curriulum Ry www.mtltis.om Copyrigt 009 P Lrning. All rigts rsrv. First ition print 009 in Austrli. A tlogu ror or tis ook is vill rom P Lrning Lt. ISBN 98--986--0 Ownrsip o ontnt T mtrils in
More informationITEM NO: 660. Dream On Me Inc. 125 Helen Street. S.Plainfield NJ TEL:
Dram On M Inc. 125 Hln Strt ASSEMBLY INSTRUCTIONS S.Plainfild NJ 07080 TEL: 908-791-0555 ITEM NO: 660 FAX: 908-791-1809 Follow warnins on all products in a cri. Adult assmly rquird. Small parts may prsnt
More informationDate Version Description 04/15/ Original document. User Experience/Information Architecture Site Redesign V 1.0
ate Version escription 04/15/14 1.0 Original document User xperience/information rchitecture Site Redesign V 1.0 MPL STORY SIT RSIGN SIT MP Global Nav Games Manage ccount Get NX Get Support Logout 1.0
More informationSeries C7 Electronic Metering Pump. Metering Pump Component Diagram INJECTION CHECK VALVE DISCHARGE TUBING COUPLING NUT 4 FUNCTION VALVE
INJCTION CHCK VALV COUPLING NUT DISCHARG TUBING 4 FUNCTION VALV PUMP HAD RTURN LIN (PRSSUR RLIF) SUCTION FITTING SPACR,.P.U MTRING PUMP HOUSING SPD KNOB PRSSUR CONTROL STROK KNOB SUCTION TUBING WIGHT POWR
More informationATTACHMENT FOUR REFERENCE DOCUMENTS. This information is not a part of the Contract or any Addenda. This is provided for informational purposes only.
Step One-Section One TTMNT OUR RRN OUMNTS This information is not a part of the ontract or any ddenda. This is provided for informational purposes only. 8 0 ate 0-0- ORMOY OM MOIITION 80. (0) () RMOVL
More informationGreedy Algorithms. Interval Scheduling. Greedy Algorithm. Optimality. Greedy Algorithm (cntd) Greed is good. Greed is right. Greed works.
Algorithm Grdy Algorithm 5- Grdy Algorithm Grd i good. Grd i right. Grd work. Wall Strt Data Structur and Algorithm Andri Bulatov Algorithm Grdy Algorithm 5- Algorithm Grdy Algorithm 5- Intrval Schduling
More informationLionbridge ondemand for Adobe Experience Manager
Lionbridge ondemand for Adobe Experience Manager Version 1.1.0 Configuration Guide October 24, 2017 Copyright Copyright 2017 Lionbridge Technologies, Inc. All rights reserved. Published in the USA. March,
More informationReducing a DFA to a Minimal DFA
Lexicl Anlysis - Prt 4 Reducing DFA to Miniml DFA Input: DFA IN Assume DFA IN never gets stuck (dd ded stte if necessry) Output: DFA MIN An equivlent DFA with the minimum numer of sttes. Hrry H. Porter,
More informationTYPICAL RAISED POSITION
UPPR 1. TH LOTION OF RMP LOSUR GTS ND MOUNTING HIGHT OF PIVOT SHLL VRIFID Y TH NGINR.. HIGHT OF GUIDS MY VRID S RQUIRD FOR WRNING LIGHT LRN. 3. FIRGLSS/LUMINUM ND SHLL SUPPLID Y TH SM VNDOR. 4. TO MOUNTD
More informationInternet Technology 3/21/2016
Intrnt Tchnolog //6 Roting algorithm goal st hop rotr = sorc rotr last hop rotr = dstination rotr rotr Intrnt Tchnolog 8. Roting sitch rotr LAN Pal Kranoski Rtgrs Unirsit Spring 6 LAN Roting algorithm:
More informations1 s2 d B (F/D.IR.RS1 == D/X.IR.RD) (F/D.IR.RS2 == D/X.IR.RD) (F/D.IR.RS1 == X/M.IR.RD) (F/D.IR.RS2 == X/M.IR.RD) = 1 = 1
Hrwre Interlock Exmple: cycle Hrwre Interlock Exmple: cycle ile s s / / / t em / ile s s / / / t em / nop nop hzr hzr $,$,$ $,$,$ (/..R == /..R) (/..R == /..R) (/..R == /..R) (/..R == /..R) = (/..R ==
More informationVAT GX - IP VIDEO FIELD ADD-ON/RETROFIT SPECIFICATIONS PERSPECTIVE SIDE VIEW MOUNTING CONNECTIONS CALL SINGLE CHANNEL ENCODER
VT GX - IP VIDO ILD DD-ON/RTROIT L00 LL -800-999-600 SINGL HNNL NODR SPIITIONS NTWORK ONNTORS SING: MTRIL: P + BS X7240 OLOR: DRK BLU DIMNSIONS IN MILLIMTRS (DIMNSIONS IN INHS) SUSTINBILITY: MMORY: PV
More informationEECS 281: Homework #4 Due: Thursday, October 7, 2004
EECS 28: Homework #4 Due: Thursdy, October 7, 24 Nme: Emil:. Convert the 24-bit number x44243 to mime bse64: QUJD First, set is to brek 8-bit blocks into 6-bit blocks, nd then convert: x44243 b b 6 2 9
More informationx )Scales are the reciprocal of each other. e
9. Reciprocls A Complete Slide Rule Mnul - eville W Young Chpter 9 Further Applictions of the LL scles The LL (e x ) scles nd the corresponding LL 0 (e -x or Exmple : 0.244 4.. Set the hir line over 4.
More information