Advanced Programming Handout 5. Enter Okasaki. Persistent vs. Ephemeral. Functional Queues. Simple Example. Persistent vs.

 Ami Paul
 7 months ago
 Views:
Transcription
1 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, the struture s it eiste efore the upte is lost. A persistent struture is one where multiple versions re simultneousl essile: fter n upte, oth ol n new versions n e use. Persistent vs. Ephemerl In impertive lnguges, most t strutures re ephemerl. It is generll epte tht persistent vrints, when the re possile t ll, will e more omple to oe n smptotill less effiient. In purel funtionl lnguges like Hskell, ll t strutures re persistent! Sine there is no ssignment, there is no w to estro ol informtion. When we re one with it, we just rop it on the floor n let the grge olletor tke re of it. So one might worr tht effiient t strutures might e hr or even impossile to oe in Hskell. Enter Okski Interestingl, it turns out tht mn ommon t strutures hve purel funtionl vrints tht re es to unerstn n hve el the sme smptoti effiien s their impertive, ephemerl vrints. These strutures hve een eplore in n influentil ook, Purel Funtionl Dt Strutures, Chris Okski, n in long series of reserh ppers Okski n others. Simple Emple To get strte, let s tke quite simple trik tht ws known to funtionl progrmmers long efore Okski... Funtionl Queues A queue (of vlues of tpe ) is struture supporting the following opertions: enqueue :: > Queue > Queue equeue :: Queue > (, Queue ) We epet tht eh opertion shoul run in O(1)  i.e., onstnt  time, no mtter the sie of the queue.
2 Nive Implementtion A queue of vlues of tpe is just list of s: tpe Queue = [] To equeue the first element of the queue, use the he n til opertors on lists: equeue q = (he q, til q) To enqueue n element, ppen it to the en of the list: enqueue e q = q ++ [e] Nive Implementtion This works, ut the effiien of enqueue is isppointing: eh enqueue requires O(n) ons opertions! Of ourse, ons opertions re not the onl things tht tke time! But ounting just onses tull iels prett goo estimte of the (smptoti) wlllok effiien of progrms. Here, it is ertinl ler tht the rel effiien n e no etter thn O(n). Better Implementtion Better Implementtion Ie: Represent queue using two lists: 1. the front prt of the queue 2. the k prt of the queue in reverse orer E.g.: ([1,2,3],[7,6,5,]) represents the queue with elements 1,2,3,,5,6,7 ([],[3,2,1]) n ([1,2,3],[]) oth represent the queue with elements 1,2,3 To enqueue n element, just ons it onto the k list. To equeue n element, just remove it from the front list......unless the front list is empt, in whih se we reverse the k list n use it s the front list from now on. Better Implementtion t Queue = Queue [] [] enqueue :: > Queue > Queue enqueue e (Queue front k) = Queue front (e:k) Effiien Intuition: equeue m require O(n) ons opertions (to reverse the k list), ut this nnot hppen too often. equeue :: Queue > (, Queue ) equeue (Queue (e:front) k) = (e, (Queue front k)) equeue (Queue [] k) = equeue (Queue (reverse k) [])
3 Effiien In more etil: Note tht eh element n prtiipte in t most one list reversl uring its lifetime in the queue. When n element is enqueue, we n hrge two tokens for two ons opertions. One of these is performe immeitel; the other we put in the nk. At ever moment, the numer of tokens in the nk is equl to the length of the k list. When we fin we nee to reverse the k list to perform equeue, we will lws hve just enough tokens in the nk to p for ll of the ons opertions involve. Effiien So we n s tht the mortie ost of eh enqueue opertion is two onses. The mortie ost of eh equeue is ero (i.e., no onses  just some pointer mnipultion). Cvet: This effiien rgument is somewht rough n re  it is intene just to give n intuition for wht is going on. Mking everthing preise requires more work, espeill in l lnguge. Morl We n implement persistent queue t struture whose opertions hve the sme (smptoti, mortie) effiien s the stnr (ephemerl, oulepointer) impertive implementtion. Binr Serh Trees Suppose we wnt to implement tpe Set supporting the following opertions: empt :: Set memer :: Or => > Set > Bool insert :: Or => > Set > Set One ver simple implementtion for sets is in terms of inr serh trees... Binr Serh Trees t Set = E  empt T (Set ) (Set )  nonempt empt = E memer E = Flse memer (T ) < = memer > = memer True = True insert E = T E E insert (T ) < = T (insert ) > = T (insert ) True = T Quik Digression on Ptterns The insert funtion is little hr to re euse it is not immeitel ovious tht the phrse T in the o just mens return the input. insert E = T E E insert (T ) < = T (insert ) > = T (insert ) True = T
4 Quik Digression on Ptterns Hskell for suh situtions. insert E = T E E insert ) < = T (insert ) > = T (insert ) True = t The pttern ) mens hek tht the input vlue ws onstrute with T, in its prts to,, n, n itionll let t stn for the whole input vlue in wht follows... Blne Trees If our sets grow lrge, we m fin tht the simple inr tree implementtion is not fst enough: in the worse se, eh insert or memer opertion m tke O(n) time! We n o muh etter keeping the trees lne. There re mn ws of oing this. Let s look t one firl simple (ut still ver fst) one tht ou hve prol seen efore in n impertive setting: relk trees. ReBlk Trees Invrints A relk tree is inr serh tree where ever noe is itionll mrke with olor (re or lk) n in whih the following invrints re mintine... The empt noes t the leves re onsiere lk. Invrints The root is lws lk. Invrints From eh noe, ever pth to lef hs the sme numer of lk noes. Re noes hve lk hilren
5 Invrints Together, these invrints impl tht ever relk tree is pproimtel lne, in the sense tht the longest pth to n empt noe is no more thn twie the length of the shortest. From this, it follows tht ll opertions will run in O(log2 n) time. Now let s look t the etils... Tpe Delrtion The t elrtion is strightforwr moifition of the one for unlne trees: t Color = R B t ReBlkSet = E T Color (ReBlkSet ) (ReBlkSet ) Memership The empt tree is the sme s efore. Memership testing requires just trivil hnge. pronoune where empt = E memer E = Flse memer (T _ ) < = memer > = memer True = True Insertion Insertion is implemente in terms of reursive uilir funtion ins, whih wlks own the tree until it either gets to n empt lef noe, in whih se it onstruts new (re) noe ontining the vlue eing inserte... ins E = T R E E Insertion is more interesting... Insertion... or isovers tht the vlue eing inserte is lre in the tree, in whih se it returns the input unhnge: ins olor ) < =... > =... The reursive ses re where the rel work hppens... Insertion In the reursive se, ins etermines whether the new vlue elongs in the left or right sutree, mkes reursive ll to insert it there, n reuils the urrent noe with the new sutree. ins olor ) < =... (T olor (ins ) ) > =... (T olor (ins ))
6 Insertion Before returning it, however, we m nee to relne to mintin the relk invrints. The oe to o this is enpsulte in helper funtion lne. ins olor ) < = lne (T olor (ins ) ) > = lne (T olor (ins )) Blning The ke insight in writing the lning funtion is tht we o not tr to relne s soon s we see re noe with re hil. Inste, we return this tree sis n wit until we re lle with the lk prent of this noe. I.e., the jo of the lne funtion is to relne trees with lkrere pth strting t the root. Sine the root hs two hilren n four grnhilren, there re four ws in whih suh pth n hppen. Blning Blning Blning Blning All tht remins is to turn these pitures into oe...
7 Blning lne (T B (T R (T R ) ) ) = T R (T B ) (T B ) lne (T B (T R (T R )) ) = T R (T B ) (T B ) lne (T B (T R (T R ) )) = T R (T B ) (T B ) lne (T B (T R (T R ))) = T R (T B ) (T B ) lne t = t One Finl Detil Sine we onl relne lk noes with re hilren n grnhilren, it is possile tht the ins funtion oul return re noe with re hil s its finl result. We n fi this foring the root noe of the returne tree to e lk, regrless of the olor returne ins. Finl Version insert t = mkerootblk (ins t) where ins E = T R E E ins olor ) < = lne (T olor (ins ) ) > = lne (T olor (ins )) mkerootblk (T _ ) = T B The Whole Bnn t Color = R B t ReBlkSet = E T Color (ReBlkSet ) (ReBlkSet ) empt = E memer E = Flse memer (T _ ) < = memer > = memer otherwise = True lne (T B (T R (T R ) ) ) = T R (T B ) (T B ) lne (T B (T R (T R )) ) = T R (T B ) (T B ) lne (T B (T R (T R ) )) = T R (T B ) (T B ) lne (T B (T R (T R ))) = T R (T B ) (T B ) lne t = t insert t = olorrootblk (ins t) where ins E = T R E E ins olor ) < = lne (T olor (ins ) ) > = lne (T olor (ins )) otherwise = s olorrootblk (T _ ) = T B For Comprison... /* This funtion n e lle onl if K2 hs left hil */ /* Perform rotte etween noe (K2) n its left hil */ /* Upte heights, then return new root */ stti Position SingleRotteWithLeft( Position K2 ) Position K1; K1 = K2>Left; K2>Left = K1>Right; K1>Right = K2; return K1; /* New root */ /* This funtion n e lle onl if K1 hs right hil */ /* Perform rotte etween noe (K1) n its right hil */ /* Upte heights, then return new root */ stti Position SingleRotteWithRight( Position K1 ) Position K2; K2 = K1>Right; K1>Right = K2>Left; K2>Left = K1; return K2; /* New root */ /* Perform rottion t noe X */ /* (whose prent is psse s prmeter) */ /* The hil is eue emining Item */ stti Position Rotte( ElementTpe Item, Position Prent ) if( Item < Prent>Element ) return Prent>Left = Item < Prent>Left>Element? SingleRotteWithLeft( Prent>Left ) : SingleRotteWithRight( Prent>Left ); else return Prent>Right = Item < Prent>Right>Element? SingleRotteWithLeft( Prent>Right ) : SingleRotteWithRight( Prent>Right ); stti Position X, P, GP, GGP; stti voi HnleReorient( ElementTpe Item, ReBlkTree T ) X>Color = Re; /* Do the olor flip */ X>Left>Color = Blk; X>Right>Color = Blk; if( P>Color == Re ) /* Hve to rotte */ GP>Color = Re; if( (Item < GP>Element)!= (Item < P>Element) ) P = Rotte( Item, GP ); /* Strt oule rotte */ X = Rotte( Item, GGP ); X>Color = Blk; T>Right>Color = Blk; /* Mke root lk */ ReBlkTree Insert( ElementTpe Item, ReBlkTree T ) X = P = GP = T; NullNoe>Element = Item; while( X>Element!= Item ) /* Desen own the tree */ GGP = GP; GP = P; P = X; if( Item < X>Element ) X = X>Left; else X = X>Right; if( X>Left>Color == Re && X>Right>Color == Re ) HnleReorient( Item, T ); if( X!= NullNoe ) return NullNoe; /* Duplite */ X = mllo( sieof( strut ReBlkNoe ) ); if( X == NULL ) FtlError( "Out of spe!!!" ); X>Element = Item; X>Left = X>Right = NullNoe; if( Item < P>Element ) /* Atth to its prent */ P>Left = X; else P>Right = X; HnleReorient( Item, T ); /* Color it re; me rotte */ return T;
Distance 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 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 informationType Checking. Roadmap (Where are we?) Last lecture Contextsensitive analysis. This lecture Type checking. Symbol tables
Type Cheking Rodmp (Where re we?) Lst leture Contetsensitie nlysis Motition Attriute grmmrs Ad ho Syntdireted trnsltion This leture Type heking Type systems Using synt direted trnsltion Symol tles Leil
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 information23 search trees redblack BSTs Btrees
23 serch trees redlck BTs Btrees 3 23 tree llow 1 or 2 keys per node. 2node: one key, two children. 3node: two keys, three children. ymmetric order. Inorder trversl yields keys in scending order.
More informationEXPONENTIAL & POWER GRAPHS
Eponentil & Power Grphs EXPONENTIAL & POWER GRAPHS www.mthletics.com.u Eponentil EXPONENTIAL & Power & Grphs POWER GRAPHS These re grphs which result from equtions tht re not liner or qudrtic. The eponentil
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 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 worstse performne. s we hve noted, files lredy in order, files in reverse order, files with
More informationIntroduction to Algebra
INTRODUCTORY ALGEBRA MiniLeture 1.1 Introdution to Alger Evlute lgeri expressions y sustitution. Trnslte phrses to lgeri expressions. 1. Evlute the expressions when =, =, nd = 6. ) d) 5 10. Trnslte eh
More informationimplementation sequential search (unordered list) binary search (ordered array) BST N N N log N log N N compareto()
OBT DGWIK KVIN WYN lgorithms OBT DGWIK KVIN WYN ymol tle review lgorithms F O U T D I T I O N http://lgs4.s.prineton.edu 3.3 BND T 2 3 serh trees red lk BTs Btrees implementtion sequentil serh (unordered
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 informationBalanced Trees. 23 trees redblack trees Btrees. 23 trees redblack trees Btrees smaller than. 2node. 3node E J S X A C.
ymol tle review Blned Trees implementtion gurntee verge se serh insert delete serh hit insert delete ordered itertion? opertions on keys sequentil serh (linked list) N N N N/2 N N/2 no equls() 23 trees
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 informationParallelization Optimization of SystemLevel Specification
Prlleliztion Optimiztion of SystemLevel 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 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 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 informationCompilers. Topic 4. The Symbol Table and Block Structure PART II. Mick O Donnell: Alfonso Ortega:
Compilers Topi 4 The ol Tle nd Blok Struture PART II Mik O Donnell: mihel.odonnell@um.es Alfonso Orteg: lfonso.orteg@um.es Topi 2: Blok Struture 2 1 ol tles with lok strutures Blok Struture Progrmming
More informationCICS Application Design
CICS Applition Design 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) 9673498. Or. Mil the
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 informationWORKSHOP 19 GLOBAL/LOCAL MODELING USING FEM FIELDS
WORKSHOP 19 GLOBAL/LOCAL MODELING USING FEM FIELDS WS191 WS192 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 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 BredthFirst Serh Rell: Grph G = (V, E) V = set of verties (ritrry
More informationWhat are suffix trees?
Suffix Trees 1 Wht re suffix trees? Allow lgorithm designers to store very lrge mount of informtion out strings while still keeping within liner spce Allow users to serch for new strings in the originl
More informationMatrices and Systems of Equations
Mtrices Mtrices nd Sstems of Equtions A mtri is rectngulr rr of rel numbers. CHAT PreClculus Section 8. m m m............ n n n mn We will use the double subscript nottion for ech element of the mtri.
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 informationPointers and Arrays. More Pointer Examples. Pointers CS 217
Pointers nd Arrs CS 21 1 2 Pointers More Pointer Emples Wht is pointer A vrile whose vlue is the ddress of nother vrile p is pointer to vrile v Opertions &: ddress of (reference) *: indirection (dereference)
More informationMa/CS 6b Class 1: Graph Recap
M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Adm Sheffer. Office hour: Tuesdys 4pm. dmsh@cltech.edu TA: Victor Kstkin. Office hour: Tuesdys 7pm. 1:00 Mondy, Wednesdy, nd Fridy. http://www.mth.cltech.edu/~201415/2term/m006/
More informationInformation Retrieval and Organisation
Informtion Retrievl nd Orgnistion Suffix Trees dpted from http://www.mth.tu.c.il/~himk/seminr02/suffixtrees.ppt Dell Zhng Birkeck, University of London Trie A tree representing set of strings { } eef d
More informationINTEGRATED WORKFLOW ART DIRECTOR
ART DIRECTOR Progrm Resoures INTEGRATED WORKFLOW PROGRAM PLANNING PHASE In this workflow phse proess, you ollorte with the Progrm Mnger, the Projet Mnger, nd the Art Speilist/ Imge Led to updte the resoures
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 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 informationMIPS I/O and Interrupt
MIPS I/O nd Interrupt Review Floting point instructions re crried out on seprte chip clled coprocessor 1 You hve to move dt to/from coprocessor 1 to do most common opertions such s printing, clling functions,
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 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 informationUnit #9 : Definite Integral Properties, Fundamental Theorem of Calculus
Unit #9 : Definite Integrl Properties, Fundmentl Theorem of Clculus Gols: Identify properties of definite integrls Define odd nd even functions, nd reltionship to integrl vlues Introduce the Fundmentl
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 informationAll in One Kit. Quick Start Guide CONNECTING WITH OTHER DEVICES SDE4003/ * 27. English1
All in One Kit Quik Strt Guide SDE00/00 CONNECTING WITH OTHER DEVICES Lol PC Brodnd Modem Brodnd Router or HUB CH CH CH CH 9 0 G 9 0 ALARM RS OUT G DC V If you do not use the Internet, just follow the
More informationSuffix trees, suffix arrays, BWT
ALGORITHMES POUR LA BIOINFORMATIQUE ET LA VISUALISATION COURS 3 Rluc Uricru Suffix trees, suffix rrys, BWT Bsed on: Suffix trees nd suffix rrys presenttion y Him Kpln Suffix trees course y Pco Gomez LinerTime
More information2014 Haskell January Test Regular Expressions and Finite Automata
0 Hskell Jnury Test Regulr Expressions nd Finite Automt This test comprises four prts nd the mximum mrk is 5. Prts I, II nd III re worth 3 of the 5 mrks vilble. The 0 Hskell Progrmming Prize will be wrded
More informationLexical Analysis. Amitabha Sanyal. (www.cse.iitb.ac.in/ as) Department of Computer Science and Engineering, Indian Institute of Technology, Bombay
Lexicl Anlysis Amith Snyl (www.cse.iit.c.in/ s) Deprtment of Computer Science nd Engineering, Indin Institute of Technology, Bomy Septemer 27 College of Engineering, Pune Lexicl Anlysis: 2/6 Recp The input
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 informationA Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards
A Tutology Checker loosely relted to Stålmrck s Algorithm y Mrtin Richrds mr@cl.cm.c.uk http://www.cl.cm.c.uk/users/mr/ University Computer Lortory New Museum Site Pemroke Street Cmridge, CB2 3QG Mrtin
More informationCOMBINATORIAL PATTERN MATCHING
COMBINATORIAL PATTERN MATCHING Genomic Repets Exmple of repets: ATGGTCTAGGTCCTAGTGGTC Motivtion to find them: Genomic rerrngements re often ssocited with repets Trce evolutionry secrets Mny tumors re chrcterized
More informationAI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley
AI Adjcent Fields Philosophy: Logic, methods of resoning Mind s physicl system Foundtions of lerning, lnguge, rtionlity Mthemtics Forml representtion nd proof Algorithms, computtion, (un)decidility, (in)trctility
More informationLists in Lisp and Scheme
Lists in Lisp nd Scheme Lists in Lisp nd Scheme Lists re Lisp s fundmentl dt structures, ut there re others Arrys, chrcters, strings, etc. Common Lisp hs moved on from eing merely LISt Processor However,
More informationRolling Back Remote Provisioning Changes. Dell Command Integration for System Center
Rolling Bk Remote Provisioning Chnges Dell Commn Integrtion for System Center Notes, utions, n wrnings NOTE: A NOTE inites importnt informtion tht helps you mke etter use of your prout. CAUTION: A CAUTION
More informationThe Reciprocal Function Family. Objectives To graph reciprocal functions To graph translations of reciprocal functions
 The Reciprocl Function Fmil Objectives To grph reciprocl functions To grph trnsltions of reciprocl functions Content Stndrds F.BF.3 Identif the effect on the grph of replcing f () b f() k, kf(), f(k),
More informationThe Greedy Method. The Greedy Method
Lists nd Itertors /8/26 Presenttion for use with the textook, Algorithm Design nd Applictions, y M. T. Goodrich nd R. Tmssi, Wiley, 25 The Greedy Method The Greedy Method The greedy method is generl lgorithm
More informationOutline. Introduction Suffix Trees (ST) Building STs in linear time: Ukkonen s algorithm Applications of ST
Suffi Trees Outline Introduction Suffi Trees (ST) Building STs in liner time: Ukkonen s lgorithm Applictions of ST 2 3 Introduction Sustrings String is ny sequence of chrcters. Sustring of string S is
More informationcalled the vertex. The line through the focus perpendicular to the directrix is called the axis of the parabola.
Review of conic sections Conic sections re grphs of the form REVIEW OF CONIC SECTIONS prols ellipses hperols P(, ) F(, p) O p =_p REVIEW OF CONIC SECTIONS In this section we give geometric definitions
More informationSystems I. Logic Design I. Topics Digital logic Logic gates Simple combinational logic circuits
Systems I Logic Design I Topics Digitl logic Logic gtes Simple comintionl logic circuits Simple C sttement.. C = + ; Wht pieces of hrdwre do you think you might need? Storge  for vlues,, C Computtion
More informationSMALL SIZE EDGEFED SIERPINSKI CARPET MICROSTRIP PATCH ANTENNAS
Progress In Eletromgnetis Reserh C, Vol. 3, 195 22, 28 SMALL SIZE EDGEFED SIERPINSKI CARPET MICROSTRIP PATCH ANTENNAS W.L. Chen nd G.M. Wng Rdr Engineering Deprtment Missile Institute of Air Fore Engineering
More informationthis grammar generates the following language: Because this symbol will also be used in a later step, it receives the
LR() nlysis Drwcks of LR(). Lookhed symols s eplined efore, concerning LR(), it is possile to consult the net set to determine, in the reduction sttes, for which symols it would e possile to perform reductions.
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 informationImplementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona
Implementing utomt Sc 5 ompilers nd Systems Softwre : Lexicl nlysis II Deprtment of omputer Science University of rizon collerg@gmil.com opyright c 009 hristin ollerg NFs nd DFs cn e hrdcoded using this
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 information6.3 Volumes. Just as area is always positive, so is volume and our attitudes towards finding it.
6.3 Volumes Just s re is lwys positive, so is volume nd our ttitudes towrds finding it. Let s review how to find the volume of regulr geometric prism, tht is, 3dimensionl oject with two regulr fces seprted
More informationCompression Outline :Algorithms in the Real World. LempelZiv Algorithms. LZ77: Sliding Window LempelZiv
Compression Outline 15853:Algorithms in the Rel World Dt Compression III Introduction: Lossy vs. Lossless, Benchmrks, Informtion Theory: Entropy, etc. Proility Coding: Huffmn + Arithmetic Coding Applictions
More informationSlides for Data Mining by I. H. Witten and E. Frank
Slides for Dt Mining y I. H. Witten nd E. Frnk Simplicity first Simple lgorithms often work very well! There re mny kinds of simple structure, eg: One ttriute does ll the work All ttriutes contriute eqully
More informationShared Memory Architectures. Programming and Synchronization. Today s Outline. Page 1. Message passing review Cosmic Cube discussion
Tody s Outline Arhitetures Progrmming nd Synhroniztion Disuss pper on Cosmi Cube (messge pssing) Messge pssing review Cosmi Cube disussion > Messge pssing mhine Shred memory model > Communition > Synhroniztion
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 informationGraphs with at most two trees in a forest building process
Grphs with t most two trees in forest uilding process rxiv:802.0533v [mth.co] 4 Fe 208 Steve Butler Mis Hmnk Mrie Hrdt Astrct Given grph, we cn form spnning forest y first sorting the edges in some order,
More informationTroubleshooting. Verify the Cisco Prime Collaboration Provisioning Installation (for Advanced or Standard Mode), page
Trouleshooting This setion explins the following: Verify the Ciso Prime Collortion Provisioning Instlltion (for Advned or Stndrd Mode), pge 1 Upgrde the Ciso Prime Collortion Provisioning from Smll to
More informationGeorge Boole. IT 3123 Hardware and Software Concepts. Switching Algebra. Boolean Functions. Boolean Functions. Truth Tables
George Boole IT 3123 Hrdwre nd Softwre Concepts My 28 Digitl Logic The Little Mn Computer 1815 1864 British mthemticin nd philosopher Mny contriutions to mthemtics. Boolen lger: n lger over finite sets
More informationSimplifying Algebra. Simplifying Algebra. Curriculum Ready.
Simplifying Alger Curriculum Redy www.mthletics.com This ooklet is ll out turning complex prolems into something simple. You will e le to do something like this! ( 9 # + 4 ' ) ' ( 9 + 7) ' ' Give this
More informationCOMPUTER EDUCATION TECHNIQUES, INC. (XML ) 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) 9673498. Or. Mil the nswers to the following
More informationUT1553B BCRT True Dualport Memory Interface
UTMC APPICATION NOTE UT553B BCRT True Dulport Memory Interfce INTRODUCTION The UTMC UT553B BCRT is monolithic CMOS integrted circuit tht provides comprehensive MISTD 553B Bus Controller nd Remote Terminl
More informationUninformed Search. Hal Daumé III. Computer Science University of Maryland CS 421: Introduction to Artificial Intelligence 31 Jan 2012
1 Hl Dumé III (me@hl3.nme) Uninformed Serch Hl Dumé III Comuter Science University of Mrylnd me@hl3.nme CS 421: Introduction to Artificil Intelligence 31 Jn 2012 Mny slides courtesy of Dn Klein, Sturt
More informationInterdomain Routing
COMP 631: NETWORKED & DISTRIBUTED SYSTEMS Interdomin Routing Jsleen Kur Fll 2016 1 Internetsle Routing: Approhes DV nd linkstte protools do not sle to glol Internet How to mke routing slle? Exploit
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 informationEXPRESS NORTH PARKING LOT NORTH REMOTE PARKING LOT TERMINAL A TERMINAL B TERMINAL C TERMINAL D EXPRESS SOUTH TERMINAL E PARKING LOT
FW INTERNTIONL IRPORT ESIGN, OE & ONSTRUTION 00 SOUTH SERVIE RO FW IRPORT, TES 756 EPRESS NORTH PRKING LOT NORTH REMOTE PRKING LOT TERMINL TERMINL hristopher. oons, P.E. /08/7 TERMINL TERMINL EPRESS SOUTH
More informationAlgebra II Notes Unit Ten: Conic Sections
Sllus Ojective: 0. The student will sketch the grph of conic section with centers either t or not t the origin. (PARABOLAS) Review: The Midpoint Formul The midpoint M of the line segment connecting the
More informationLast Time? Ray Casting II. Explicit vs. Implicit? Assignment 1: Ray Casting. ObjectOriented Design. Graphics Textbooks
Csting II Lst Time? Csting / Tring Orthogrphi Cmer epresenttion (t) = origin + t * diretion Sphere Intersetion lne Intersetion Impliit vs. Epliit epresenttions MIT EECS 6.837, Cutler nd Durnd 1 MIT EECS
More informationHashbased Subgraph Query Processing Method for Graphstructured XML Documents
Hshbse Subgrph Query Proessing Metho for Grphstruture 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 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 informationHyperbolas. Definition of Hyperbola
CHAT PreClculus Hyperols The third type of conic is clled hyperol. For n ellipse, the sum of the distnces from the foci nd point on the ellipse is fixed numer. For hyperol, the difference of the distnces
More informationStart Here. Remove all tape and lift display. Locate components
HP Photosmrt 2600/2700 series llinone User Guide Strt Here 1 USB cle users: Do not connect the USB cle until this guide instructs you to or the softwre my not instll properly. Use this guide to set up
More informationChapter Spline Method of Interpolation More Examples Computer Engineering
Chpter. Splne Metho of Interpolton More Emples Computer Engneerng Emple A root rm wth rp lser snner s ong quk qulty hek on holes rlle n " " retngulr plte. The enters of the holes n the plte esre the pth
More informationOUTPUT DELIVERY SYSTEM
Differences in ODS formtting for HTML with Proc Print nd Proc Report Lur L. M. Thornton, USDAARS, Animl Improvement Progrms Lortory, Beltsville, MD ABSTRACT While Proc Print is terrific tool for dt checking
More informationHow to Design REST API? Written Date : March 23, 2015
Visul Prdigm How Design REST API? Turil How Design REST API? Written Dte : Mrch 23, 2015 REpresenttionl Stte Trnsfer, n rchitecturl style tht cn be used in building networked pplictions, is becoming incresingly
More informationbinary trees, expression trees
COMP 250 Lecture 21 binry trees, expression trees Oct. 27, 2017 1 Binry tree: ech node hs t most two children. 2 Mximum number of nodes in binry tree? Height h (e.g. 3) 3 Mximum number of nodes in binry
More informationThis Unit: Processor Design. What Is Control? Example: Control for sw. Example: Control for add
This Unit: rocessor Design Appliction O ompiler U ory Firmwre I/O Digitl ircuits Gtes & Trnsistors pth components n timing s n register files ories (RAMs) locking strtegies Mpping n IA to tpth ontrol Exceptions
More informationCSCE 531, Spring 2017, Midterm Exam Answer Key
CCE 531, pring 2017, Midterm Exm Answer Key 1. (15 points) Using the method descried in the ook or in clss, convert the following regulr expression into n equivlent (nondeterministic) finite utomton: (
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 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 informationSection 9.2 Hyperbolas
Section 9. Hperols 597 Section 9. Hperols In the lst section, we lerned tht plnets hve pproimtel ellipticl orits round the sun. When n oject like comet is moving quickl, it is le to escpe the grvittionl
More informationCPSC 213. Polymorphism. Introduction to Computer Systems. Readings for Next Two Lectures. Back to Procedure Calls
Redings for Next Two Lectures Text CPSC 213 Switch Sttements, Understnding Pointers  2nd ed: 3.6.7, 3.101st ed: 3.6.6, 3.11 Introduction to Computer Systems Unit 1f Dynmic Control Flow Polymorphism nd
More informations 1 t 4 s 2 4 t 2 a b r 2 r 8 r10 g 4
kpirs NonCrossing Shortest Pths in Simple Polgon Evnthi Ppdopoulou Northwestern Universit, Evnston, Illinois 60208, USA Astrt. This pper presents n O(n + k) time lgorithm to ompute the set of k nonrossing
More informationstyle type="text/css".wpb_animate_when_almost_visible { opacity: 1; }/style
style type="text/css".wpb_nimte_when_lmost_vible { opcity: 1; }/style You cn chrome homepge for internet explorer quickly chrome homepge for internet explorer get chrome homepge for internet explorer every
More informationToday. Search Problems. Uninformed Search Methods. DepthFirst Search BreadthFirst Search UniformCost 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 informationIntermediate Information Structures
CPSC 335 Intermedite Informtion Structures LECTURE 13 Suffix Trees Jon Rokne Computer Science University of Clgry Cnd Modified from CMSC 423  Todd Trengen UMD upd Preprocessing Strings We will look t
More informationProduct of polynomials. Introduction to Programming (in C++) Numerical algorithms. Product of polynomials. Product of polynomials
Product of polynomils Introduction to Progrmming (in C++) Numericl lgorithms Jordi Cortdell, Ricrd Gvldà, Fernndo Orejs Dept. of Computer Science, UPC Given two polynomils on one vrile nd rel coefficients,
More informationScalable Spatiotemporal Continuous Query Processing for Locationaware Services
Slle Sptiotemporl Continuous uery Proessing for Lotionwre Servies iopeng iong Mohme F. Mokel Wli G. Aref Susnne E. Hmrush Sunil Prhkr Deprtment of Computer Sienes, Purue University, West Lfyette, IN
More informationDon Thomas, 1998, Page 1
The Verilog Hrdwre Desription Lnguge Professor Don Thoms Crnegie Mellon University (CMU) thoms@ee.mu.edu http://www.ee.mu.edu/~thoms This is not one ohesive presenttion on Verilog. The slides ontined here
More informationCMSC 331 First Midterm Exam
0 00/ 1 20/ 2 05/ 3 15/ 4 15/ 5 15/ 6 20/ 7 30/ 8 30/ 150/ 331 First Midterm Exm 7 October 2003 CMC 331 First Midterm Exm Nme: mple Answers tudent ID#: You will hve seventyfive (75) minutes to complete
More informationStructure in solution spaces: Three lessons from JeanClaude
Struture in solution spes: Three lessons from JenClue Dvi Eppstein Computer Siene Deprtment, Univ. of Cliforni, Irvine Conferene on Meningfulness n Lerning Spes: A Triute to the Work of JenClue Flmgne
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 Alltoll ommunition Impt of olletive ommunition
More informationRight Angled Trigonometry. Objective: To know and be able to use trigonometric ratios in rightangled
C2 Right Angled Trigonometry Ojetive: To know nd e le to use trigonometri rtios in rightngled tringles opposite C Definition Trigonometry ws developed s method of mesuring ngles without ngulr units suh
More informationAn Efficient Divide and Conquer Algorithm for Exact Hazard Free Logic Minimization
An Efficient Divide nd Conquer Algorithm for Exct Hzrd Free Logic Minimiztion J.W.J.M. Rutten, M.R.C.M. Berkelr, C.A.J. vn Eijk, M.A.J. Kolsteren Eindhoven University of Technology Informtion nd Communiction
More information520 Principles of Programming Languages. Memory Management. Memory Management... 35: Garbage Collection
Dynmic Memory Mngement 50 Principles of Progrmming Lnguges 35: Grbge Collection Christin Collberg collberg@cs.rizon.edu Deprtment of Computer Science University of Arizon The runtime system linked in
More information