V = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V)

Size: px
Start display at page:

Download "V = set of vertices (vertex / node) E = set of edges (v, w) (v, w in V)"

Transcription

1 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 v to w ege my e (v, w, ) where is ost omponent (e.g. istne) 05/12/2016 DFR - DSA - Grphs 1 1

2 Exmples 05/12/2016 DFR - DSA - Grphs 1 2

3 Mening & Use A grph is use to represent ritrry reltionships mong t ojets e.g. unirete grphs ommunitions network trnsport network (ro, ril, ir, se) with osts/istnes (trvelling slesmn prolem) e.g. irete grphs (igrph) flow of ontrol in omputer progrms University ourse plnning (epeneny grph) stte trnsition igrms 05/12/2016 DFR - DSA - Grphs 1 3

4 Other ADTs linke list irete yli grph (g) (g) tree 05/12/2016 DFR - DSA - Grphs 1 4

5 Terminology PATH: sequene of verties v 1, v 2, v n suh tht v 1 -> v 2, v 2 -> v 3, v n-1 -> v n re eges LENGTH: SIMPLE PATH: SIMPLE CYCLE: numer of eges in pth (v enotes pth length 0 from v to v) ll verties re istint (exept possily the first n the lst) simple pth of length >= 1 tht egins (irete grph) n ens t the sme vertex 05/12/2016 DFR - DSA - Grphs 1 5

6 Grphs & Cyles A yle is pth whih egins n ens t the sme vertex A grph with no yles is yli A irete grph with no yles is irete yli grph (DAG) DAG irete grphs unirete grphs 05/12/2016 DFR - DSA - Grphs 1 6

7 Unirete Grphs For yles in unirete grphs, the eges must e istint sine (u,v) n (v, u) re the sme ege onnete: if there exists pth from every vertex to every other vertex non-onnete: onnete: 05/12/2016 DFR - DSA - Grphs 1 7

8 Direte Grphs A onnete irete grph is lle strongly onnete i.e. there is pth from every vertex to every other vertex if the igrph is not strongly onnete BUT the unerlying grph, without istintion to the iretion, is onnete, then the grph is si to e wekly onnete strong: wek: not: 05/12/2016 DFR - DSA - Grphs 1 8

9 Complete Grph A grph is omplete if there is n ege etween every pir of verties 12 eges 6 eges n * (n - 1) n * (n - 1) / 2 05/12/2016 DFR - DSA - Grphs 1 9

10 Ajeny Mtrix For eh ege (u, v) set [u, v] = 1 storge => omeg(n 2 ) re in/ serh => O(n 2 ) /12/2016 DFR - DSA - Grphs 1

11 Ajeny List Use list of noes where eh noe points to list of jent noes (etter for sprse grphs) spe = O( V + E ) (for nme verties - use hsh tle) 05/12/2016 DFR - DSA - Grphs 1 11

12 Opertions insert remove fin vertex ege list opertions nvigte is_pth is_yle shortest pth spnning forest topologil sort 05/12/2016 DFR - DSA - Grphs 1 12

13 Shortest Pth 1 Dijkstr s lgorithm Single soure shortest pth (non-negtive osts) Determines the shortest pth from soure to every other vertex in the grph where the length of the pth is the sum of the osts of the eges S - set of verties; shortest istne from soure lrey known eh step s vertex v whose istne from S is s short s possile the visite verties (noes) speil pth: shortest pth from the soure to v pssing through u rry D: length of shortest speil pth to eh vertex C[i,j]: ost of v i to v j (no ege ost is infinite ) 05/12/2016 DFR - DSA - Grphs 1 13

14 Dijkstr s lgorithm priniples Given strt noe x, note the ege lengths from x to the remining noes in the grph. Choose the shortest ege from x to noe y. Mrk noes x n y s visite. S = {x,y} Chek to see if there is shorter pth to the remining (unvisite) noes, {V-S}, in the grph from x vi y. If so, upte the pth lengths so fr lulte. Repet the proess until ll noes hve een visite. y x {V-S} unvisite noes 05/12/2016 DFR - DSA - Grphs 1 14

15 Dijkstr - Exmple ( ) ( 30) ( e 0) ( 50) ( e ) ( 20) ( e 60) Strt visite {}, unvisite {,,, e}, shortest pth ( ) = infinity e Visite {, }, unvisite {,, e} D = [,, 30, 0] (-- 60) (-- ) (--e ) D = [, 60, 30, 0] Shortest pth (- 30) visite {,, }, unvisite {, e} (-- 50) (--e 90) D = [, 50, 30, 90] Shortest pth (- 50) visite {,,, }, unvisite {e} (--e 60) D = [, 50, 30, 60] Shortest pth (-e 60) visite {,,,, e}, unvisite { } No noes left! Finl nswer:- D = [, 50, 30, 60] 05/12/2016 DFR - DSA - Grphs 1 15

16 Dijkstr - Exmple Itertion S w D[] D[] D[] D[e] 0 initil {} {,} {,,} {,,,} {,,,,e} e See seprte notes on worke exmple:- (i) Revision notes (ii) stuy pln e 60 05/12/2016 DFR - DSA - Grphs 1 16

17 Dijkstr Exmple - pitures e e e e D [,, 30, 0 ] D [,, 30, 0 ] D [, 60, 30, 0 ] E [,,, ] E [,,, ] E [,,, ] L [,, 30, 0 ] L [,, 30, 0 ] L [, 50, 30, 0 ] e e 60 05/12/2016 DFR - DSA - Grphs 1 17

18 Dijkstr Exmple - pitures e e e e D [, 60, 30, 0 ] D [, 50, 30, 90 ] D [, 50, 30, 60 ] E [,,, ] E [,,, ] E [,,, ] L [, 50, 30, 0 ] L [, 20, 30, 60 ] L [, 20, 30, ] e e 60 05/12/2016 DFR - DSA - Grphs 1 18

19 Dijkstr s Algorithm Grph (G) + Cost Mtrix (C) 0 30 e e e NB ount the numer of eges in the grph n the ost mtrix 05/12/2016 DFR - DSA - Grphs 1 19

20 Dijkstr s Algorithm Dijkstr () { S = {} // G = (V, E) for ( i in V-S) D[i] = C[, i] // initilistion while (!is_empty(v-s)) { hoose w in V-S suh tht D[w] is minimum S = S + {w} foreh ( v in V-S) D[v] = min(d[v], D[w]+C[w,v]) } // proess } // D[i] = istne; C[i,j] = ost mtrix; S = {visite noes} 05/12/2016 DFR - DSA - Grphs 1 20

21 Dijkstr s Algorithm Dijkstr () -- is the strt noe { S = {} -- S represents the noes visite for ( i in V-S) D[i] = C[, i] -- initilise D (pth lengths) -- from the strt noe while (!is_empty(v-s)) { hoose w in V-S suh tht D[w] is minimum -- unvisite noe with shortest pth from strt_noe S = S + {w} -- this noe to visite noes foreh ( v in V-S) D[v] = min(d[v], D[w]+C[w,v]) -- relulte pths vi w to unvisite noes } } 05/12/2016 DFR - DSA - Grphs 1 21

22 Dijkstr - Comment greey lgorithm - lol est solution is est overll hoose w in V-S suh tht D[w] is minimum (mening?) rell tht D[i] mens the length of the shortest pth to eh vertex note tht the lgorithm prtitions the noes into two spes S (initilly with the strt noe) n V-S (the remining noes) visite / unvisite foreh ( v in V-S) D[v] = min(d[v], D[w]+C[w,v]) (mening?) w is the noe with the minimum istne from the soure (not in S) D[v] mens the shortest (speil) pth length so fr lulte D[w] is the ost (so fr) to w (gin shortest (speil) pth length) C[w,v] is the ost from noe w to noe v (ege ost) 05/12/2016 DFR - DSA - Grphs 1 22

23 Dijkstr priniples revisite Choose the strt noe S = {} G = (V, E) S represents visite noes; V-S represents unvisite noes D represents the pth lengths from to the remining noes (V-) C[x,y] represents the ost mtrix the ost of the ege x y Algorithm Choose the shortest pth to n unvisite noe (my e n ege) A this noe (w) to the set of visite noes S Clulte n lterntive pth vi w to ll noes v in {V-S} hoose if istne D[w]+C[w,v] is shorter thn D[v] pth length - D[w] w C[w,v] - ege weight for eh v in {V-S} D[v] previous pth length 05/12/2016 DFR - DSA - Grphs 1 23

24 Dijkstr s Algorithm + Shortest Pth Tree Dijkstr () { S = {} for ( i in V-S) { D[i] = C[, i]; E[i] = ; L[i] = C[,i]; } while (!is_empty(v-s)) { hoose w in V-S suh tht D[w] is minimum } S = S + {w} foreh ( v in V-S) if (D[w]+C[w,v])< D[v] ) { D[v] = D[w]+C[w,v]; E[v] = w; L[v] = C[w,v]; } } 05/12/2016 DFR - DSA - Grphs 1 24

25 Dijkstr s Algorithm + Shortest Pth Tree Dijkstr () -- is the strt noe { S = {} -- S represents the noes visite for ( i in V-S) { D[i] = C[, i]; E[i] = ; L[i] = C[,i]; } -- initilise D + SPT (E + L) while (!is_empty(v-s)) { hoose w in V-S suh tht D[w] is minimum -- unvisite noe with shortest pth from strt_noe S = S + {w} foreh ( v in V-S) if (D[w]+C[w,v])< D[v] ) { D[v] = D[w]+C[w,v]; E[v] = w; L[v] = C[w,v]; } -- relulte pths n SPT (E + L) } } 05/12/2016 DFR - DSA - Grphs 1 25

26 Dijkstr Exmple - pitures e e e e D [,, 30, 0 ] D [,, 30, 0 ] D [, 60, 30, 0 ] E [,,, ] E [,,, ] E [,,, ] L [,, 30, 0 ] L [,, 30, 0 ] L [, 50, 30, 0 ] e e 60 05/12/2016 DFR - DSA - Grphs 1 26

27 Dijkstr Exmple - pitures e e e e D [, 60, 30, 0 ] D [, 50, 30, 90 ] D [, 50, 30, 60 ] E [,,, ] E [,,, ] E [,,, ] L [, 50, 30, 0 ] L [, 20, 30, 60 ] L [, 20, 30, ] e e 60 05/12/2016 DFR - DSA - Grphs 1 27

28 Shortest Pth 2 All pirs shortest pth prolem (i.e. Shortest pth etween ny two verties) pply Dijkstr s lgorithm to eh noe in turn pply Floy s lgorithm Floy given G = (V,E), non-negtive osts C[v,w], for eh orere pir (v,w) fin the shortest pth note the initil onitions use n rry A[i,j] whih is initilise to C[i,j], i.e. the initil ege osts if no ege exists C[i,j]= (infinite ost) for n verties there re n itertions over the rry A Floy is thus O(n 3 ) 05/12/2016 DFR - DSA - Grphs 1 28

29 Floy s Algorithm Floy ( ) { A[i,k] A[i,j] A[k,j] for (i in 1..n) for (j in 1..n) if (i <> j) A[i, j] = C[i, j] for (i in 1..n) A[i, i] = 0 -- initilistion for (k in 1..n) for (i in 1..n) for (j in 1..n) } if ( A[i, k] + A[k, j] < A[i, j]) A[i, j] = A[i, k] + A[k, j] 05/12/2016 DFR - DSA - Grphs 1 29

30 Floy - Exmple A 0 [i,j] = A 1 [i,j] = A 2 [i,j] = A 3 [i,j] = = infinity /12/2016 DFR - DSA - Grphs 1 30

31 Floy - Comment Initilistion is the osts in C (i.e. Initil ege osts) with the igonl (i.e. v => v) set to 0 for eh noe (k = 1..n) go through the rry (i, j = 1..n) n ompute osts - i.e. hek if there is heper pth from noe i to noe j vi noe k - if so hnge A[i, j] if ( A[i, k] + A[k, j] < A[i, j]) A[i, j] = A[i, k] + A[k, j] 05/12/2016 DFR - DSA - Grphs 1 31

32 Trnsitive Closure & Wrshll s Algorithm Determine if pth exists from vertex i to vertex j C[i, j] = 1 if n ege exists (i <> j), otherwise = 0 ompute A[i, j], suh tht A[i, j] = 1 if there exists pth of length 1 or more from vertex i to vertex j A is lle the trnsitive losure of the jeny mtrix Note tht this is speil se of Floy s where we re not iretly intereste in the osts 05/12/2016 DFR - DSA - Grphs 1 32

33 Wrshll s Algorithm Wrshll ( ) { A[i,k] A[i,j] A[k,j] for (i in 1..n) for (j in 1..n) A[i, j] = C[i, j] for (i in 1..n) A[i, i] = 0 -- initilistion for (k in 1..n) for (i in 1..n) for (j in 1..n) if (A[i, j] = 0) A[i, j] = A[i, k] n A[k, j] } 05/12/2016 DFR - DSA - Grphs 1 33

34 Wrshll - Exmple A 0 [i,j] = A 1 [i,j] = A 2 [i,j] = A 3 [i,j] = /12/2016 DFR - DSA - Grphs 1 34

35 Wrshll - Comment if (A[i, j] = 0) A[i, j] = A[i, k] n A[k, j] - (mening?) i.e. there is pth from noe i to noe j IF there is pth from noe i to noe k AND pth from noe k to noe j t vrious stges in the lultion for k, i, j, the ifferent pths re isovere (1, 2, 2) - A[2,2] =A[2,1] n A[1,2] - i.e. 2 to 1 to 2 => 2 to 2 (1, 2, 3) - A[2,3] =A[2,1] n A[1,3] - i.e. 2 to 1 to 3 => 2 to 3 (2, 3, 1) - A[3,1] =A[3,2] n A[2,1] - i.e. 3 to 2 to 1 => 3 to 1 (2, 3, 3) - A[3,3] =A[3,2] n A[2,3] - i.e. 3 to 2 to 3 => 3 to 3 05/12/2016 DFR - DSA - Grphs 1 35

36 Summry irete grphs Definitions & implementtions Algorithms Dijkstr single noe shortest pth Dijkstr-SPT + shortest pth tree Floy ll pirs shortest pth Wrshll trnsitive losure is there pth from to? 05/12/2016 DFR - DSA - Grphs 1 36

Chapter 9. Greedy Technique. Copyright 2007 Pearson Addison-Wesley. All rights reserved.

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 information

Greedy Algorithm. Algorithm Fall Semester

Greedy 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 information

Outline. CS38 Introduction to Algorithms. Graphs. Graphs. Graphs. Graph traversals

Outline. 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

10.2 Graph Terminology and Special Types of Graphs

10.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 information

Distance vector protocol

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 information

Lecture 13: Graphs I: Breadth First Search

Lecture 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 information

Graph theory Route problems

Graph 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 information

MITSUBISHI ELECTRIC RESEARCH LABORATORIES Cambridge, Massachusetts. Introduction to Matroids and Applications. Srikumar Ramalingam

MITSUBISHI 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 information

Premaster Course Algorithms 1 Chapter 6: Shortest Paths. Christian Scheideler SS 2018

Premaster 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 information

COMP108 Algorithmic Foundations

COMP108 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 information

Internet Routing. Reminder: Routing. CPSC Network Programming

Internet 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 information

Lecture 8: Graph-theoretic problems (again)

Lecture 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 information

Lesson 4.4. Euler Circuits and Paths. Explore This

Lesson 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 information

Introduction. Example

Introduction. Example 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

More information

Minimal Memory Abstractions

Minimal 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 information

CMPUT101 Introduction to Computing - Summer 2002

CMPUT101 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 information

COSC 6374 Parallel Computation. Dense Matrix Operations

COSC 6374 Parallel Computation. Dense Matrix Operations COSC 6374 Prllel Computtion Dense Mtrix Opertions Edgr Griel Fll Edgr Griel Prllel Computtion Edgr Griel erminology Dense Mtrix: ll elements of the mtrix ontin relevnt vlues ypilly stored s 2-D rry, (e.g.

More information

CS 241 Week 4 Tutorial Solutions

CS 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 information

UTMC APPLICATION NOTE UT1553B BCRT TO INTERFACE PSEUDO-DUAL-PORT RAM ARCHITECTURE INTRODUCTION ARBITRATION DETAILS DESIGN SELECTIONS

UTMC 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 information

Lexical Analysis: Constructing a Scanner from Regular Expressions

Lexical Analysis: Constructing a Scanner from Regular Expressions Lexicl Anlysis: Constructing Scnner from Regulr Expressions Gol Show how to construct FA to recognize ny RE This Lecture Convert RE to n nondeterministic finite utomton (NFA) Use Thompson s construction

More information

5 ANGLES AND POLYGONS

5 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 information

Lesson6: Modeling the Web as a graph Unit5: Linear Algebra for graphs

Lesson6: 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 information

Table-driven look-ahead lexical analysis

Table-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 information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Winter 2016

Solving 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 information

Problem Final Exam Set 2 Solutions

Problem 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 information

CS 551 Computer Graphics. Hidden Surface Elimination. Z-Buffering. Basic idea: Hidden Surface Removal

CS 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 information

CS553 Lecture Introduction to Data-flow Analysis 1

CS553 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 information

Graph Contraction and Connectivity

Graph 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 information

Paradigm 5. Data Structure. Suffix trees. What is a suffix tree? Suffix tree. Simple applications. Simple applications. Algorithms

Paradigm 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 information

Adjacency. Adjacency Two vertices u and v are adjacent if there is an edge connecting them. This is sometimes written as u v.

Adjacency. Adjacency Two vertices u and v are adjacent if there is an edge connecting them. This is sometimes written as u v. Terminology Adjeny Adjeny Two verties u nd v re djent if there is n edge onneting them. This is sometimes written s u v. v v is djent to nd ut not to. 2 / 27 Neighourhood Neighourhood The open neighourhood

More information

In the last lecture, we discussed how valid tokens may be specified by regular expressions.

In 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 information

Internet Routing. IP Packet Format. IP Fragmentation & Reassembly. Principles of Internet Routing. Computer Networks 9/29/2014.

Internet 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 information

LINX MATRIX SWITCHERS FIRMWARE UPDATE INSTRUCTIONS FIRMWARE VERSION

LINX 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 information

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence

Solving Problems by Searching. CS 486/686: Introduction to Artificial Intelligence Solving Prolems y Serching CS 486/686: Introduction to Artificil Intelligence 1 Introduction Serch ws one of the first topics studied in AI - Newell nd Simon (1961) Generl Prolem Solver Centrl component

More information

Chapter 4 Fuzzy Graph and Relation

Chapter 4 Fuzzy Graph and Relation Chpter 4 Fuzzy Grph nd Reltion Grph nd Fuzzy Grph! Grph n G = (V, E) n V : Set of verties(node or element) n E : Set of edges An edge is pir (x, y) of verties in V.! Fuzzy Grph ~ n ( ~ G = V, E) n V :

More information

Network Layer: Routing Classifications; Shortest Path Routing

Network Layer: Routing Classifications; Shortest Path Routing igitl ommuniction in the Modern World : Routing lssifictions; Shortest Pth Routing s min prolem: To get efficiently from one point to the other in dynmic environment http://.cs.huji.c.il/~com com@cs.huji.c.il

More information

Finite Automata. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 21, 2015

Finite Automata. Lecture 4 Sections Robb T. Koether. Hampden-Sydney College. Wed, Jan 21, 2015 Finite Automt Lecture 4 Sections 3.6-3.7 Ro T. Koether Hmpden-Sydney College Wed, Jn 21, 2015 Ro T. Koether (Hmpden-Sydney College) Finite Automt Wed, Jn 21, 2015 1 / 23 1 Nondeterministic Finite Automt

More information

Structure in solution spaces: Three lessons from Jean-Claude

Structure in solution spaces: Three lessons from Jean-Claude Struture in solution spes: Three lessons from Jen-Clue Dvi Eppstein Computer Siene Deprtment, Univ. of Cliforni, Irvine Conferene on Meningfulness n Lerning Spes: A Triute to the Work of Jen-Clue Flmgne

More information

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs.

If you are at the university, either physically or via the VPN, you can download the chapters of this book as PDFs. Lecture 5 Wlks, Trils, Pths nd Connectedness Reding: Some of the mteril in this lecture comes from Section 1.2 of Dieter Jungnickel (2008), Grphs, Networks nd Algorithms, 3rd edition, which is ville online

More information

Convex Hull Algorithms. Convex hull: basic facts

Convex 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 information

ΕΠΛ323 - Θεωρία και Πρακτική Μεταγλωττιστών

ΕΠΛ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 information

WORKSHOP 9 HEX MESH USING SWEEP VECTOR

WORKSHOP 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 information

Class Overview. Database Design. Database Design Process. Database Design. Introduction to Data Management CSE 414

Class 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 information

Chapter 16. Shortest Paths Shortest Weighted Paths

Chapter 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 information

12/9/14. CS151 Fall 20124Lecture (almost there) 12/6. Graphs. Seven Bridges of Königsberg. Leonard Euler

12/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 information

Definition of Regular Expression

Definition of Regular Expression Definition of Regulr Expression After the definition of the string nd lnguges, we re redy to descrie regulr expressions, the nottion we shll use to define the clss of lnguges known s regulr sets. Recll

More information

Pattern Matching. Pattern Matching. Pattern Matching. Review of Regular Expressions

Pattern 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 information

Solids. Solids. Curriculum Ready.

Solids. Solids. Curriculum Ready. Curriulum Rey www.mthletis.om This ooklet is ll out ientifying, rwing n mesuring solis n prisms. SOM CUES The Som Cue ws invente y Dnish sientist who went y the nme of Piet Hein. It is simple 3 # 3 #

More information

Introduction to Algebra

Introduction to Algebra INTRODUCTORY ALGEBRA Mini-Leture 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 information

3D convex hulls. Convex Hull in 3D. convex polyhedron. convex polyhedron. The problem: Given a set P of points in 3D, compute their convex hull

3D 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 information

Bayesian Networks: Directed Markov Properties (Cont d) and Markov Equivalent DAGs

Bayesian 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 information

13.1 Weighted Graphs and Their Representation

13.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 information

Ma/CS 6b Class 1: Graph Recap

Ma/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/~2014-15/2term/m006/

More information

CS 340, Fall 2016 Sep 29th Exam 1 Note: in all questions, the special symbol ɛ (epsilon) is used to indicate the empty string.

CS 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 information

Containers: Queue and List

Containers: 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 information

Outline. Graphs Describing Precedence. Graphs Describing Precedence. Topological SorFng of DAGs. Graphs Describing Precedence 4/25/12. Part 10.

Outline. 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 information

Distributed Systems Principles and Paradigms. Chapter 11: Distributed File Systems

Distributed 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 information

Ma/CS 6b Class 1: Graph Recap

Ma/CS 6b Class 1: Graph Recap M/CS 6 Clss 1: Grph Recp By Adm Sheffer Course Detils Instructor: Adm Sheffer. TA: Cosmin Pohot. 1pm Mondys, Wednesdys, nd Fridys. http://mth.cltech.edu/~2015-16/2term/m006/ Min ook: Introduction to Grph

More information

6.045J/18.400J: Automata, Computability and Complexity. Quiz 2: Solutions. Please write your name in the upper corner of each page.

6.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 information

Error Numbers of the Standard Function Block

Error Numbers of the Standard Function Block A.2.2 Numers of the Stndrd Funtion Blok evlution The result of the logi opertion RLO is set if n error ours while the stndrd funtion lok is eing proessed. This llows you to rnh to your own error evlution

More information

Doubts about how to use azimuth values from a Coordinate Object. Juan Antonio Breña Moral

Doubts about how to use azimuth values from a Coordinate Object. Juan Antonio Breña Moral Douts out how to use zimuth vlues from Coordinte Ojet Jun Antonio Breñ Morl # Definition An Azimuth is the ngle from referene vetor in referene plne to seond vetor in the sme plne, pointing towrd, (ut

More information

Fig.25: the Role of LEX

Fig.25: the Role of LEX The Lnguge for Specifying Lexicl Anlyzer We shll now study how to uild lexicl nlyzer from specifiction of tokens in the form of list of regulr expressions The discussion centers round the design of n existing

More information

Shared Memory Architectures. Programming and Synchronization. Today s Outline. Page 1. Message passing review Cosmic Cube discussion

Shared 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 information

COSC 6374 Parallel Computation. Non-blocking Collective Operations. Edgar Gabriel Fall Overview

COSC 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 information

COMMON FRACTIONS. or a / b = a b. , a is called the numerator, and b is called the denominator.

COMMON 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 information

Implementing Automata. CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

Implementing 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 hrd-coded using this

More information

Type Checking. Roadmap (Where are we?) Last lecture Context-sensitive analysis. This lecture Type checking. Symbol tables

Type 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 information

Lecture 12 : Topological Spaces

Lecture 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 information

PROBLEM OF APOLLONIUS

PROBLEM 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 information

CS453 INTRODUCTION TO DATAFLOW ANALYSIS

CS453 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 information

COMP 423 lecture 11 Jan. 28, 2008

COMP 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 information

Comparing Hierarchical Data in External Memory

Comparing 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 information

Compression Outline :Algorithms in the Real World. Lempel-Ziv Algorithms. LZ77: Sliding Window Lempel-Ziv

Compression Outline :Algorithms in the Real World. Lempel-Ziv Algorithms. LZ77: Sliding Window Lempel-Ziv Compression Outline 15-853:Algorithms in the Rel World Dt Compression III Introduction: Lossy vs. Lossless, Benchmrks, Informtion Theory: Entropy, etc. Proility Coding: Huffmn + Arithmetic Coding Applictions

More information

Distributed Systems Principles and Paradigms

Distributed 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 information

Midterm Exam CSC October 2001

Midterm Exam CSC October 2001 Midterm Exm CSC 173 23 Otoer 2001 Diretions This exm hs 8 questions, severl of whih hve suprts. Eh question indites its point vlue. The totl is 100 points. Questions 5() nd 6() re optionl; they re not

More information

A Tautology Checker loosely related to Stålmarck s Algorithm by Martin Richards

A 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 information

An Efficient Algorithm for the Physical Mapping of Clustered Task Graphs onto Multiprocessor Architectures

An Efficient Algorithm for the Physical Mapping of Clustered Task Graphs onto Multiprocessor Architectures An Effiient Algorithm for the Physil Mpping of Clustere Tsk Grphs onto Multiproessor Arhitetures Netrios Koziris Pnyiotis Tsnks Mihel Romesis George Ppkonstntinou Ntionl Tehnil University of Athens Dept.

More information

CSCI 446: Artificial Intelligence

CSCI 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 information

Reducing a DFA to a Minimal DFA

Reducing 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 information

CICS Application Design

CICS 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) 967-3498. Or. Mil the

More information

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5

CS321 Languages and Compiler Design I. Winter 2012 Lecture 5 CS321 Lnguges nd Compiler Design I Winter 2012 Lecture 5 1 FINITE AUTOMATA A non-deterministic finite utomton (NFA) consists of: An input lphet Σ, e.g. Σ =,. A set of sttes S, e.g. S = {1, 3, 5, 7, 11,

More information

Today. Search Problems. Uninformed Search Methods. Depth-First Search Breadth-First Search Uniform-Cost Search

Today. 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 information

All in One Kit. Quick Start Guide CONNECTING WITH OTHER DEVICES SDE-4003/ * 27. English-1

All in One Kit. Quick Start Guide CONNECTING WITH OTHER DEVICES SDE-4003/ * 27. English-1 All in One Kit Quik Strt Guide SDE-00/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 information

COSC 6374 Parallel Computation. Communication Performance Modeling (II) Edgar Gabriel Fall Overview. Impact of communication costs on Speedup

COSC 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 information

To access your mailbox from inside your organization. For assistance, call:

To access your mailbox from inside your organization. For assistance, call: 2001 Ative Voie, In. All rights reserved. First edition 2001. Proteted y one or more of the following United Sttes ptents:,070,2;,3,90;,88,0;,33,102;,8,0;,81,0;,2,7;,1,0;,90,88;,01,11. Additionl U.S. nd

More information

Rolling Back Remote Provisioning Changes. Dell Command Integration for System Center

Rolling 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 information

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona

CSc 453. Compilers and Systems Software. 4 : Lexical Analysis II. Department of Computer Science University of Arizona CSc 453 Compilers nd Systems Softwre 4 : Lexicl Anlysis II Deprtment of Computer Science University of Arizon collerg@gmil.com Copyright c 2009 Christin Collerg Implementing Automt NFAs nd DFAs cn e hrd-coded

More information

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

Advanced 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 information

Section 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

Section 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 information

Graph Searching & Perfect Graphs

Graph 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 information

Final 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

Final 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 information

CS 432 Fall Mike Lam, Professor a (bc)* Regular Expressions and Finite Automata

CS 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 information

AI Adjacent Fields. This slide deck courtesy of Dan Klein at UC Berkeley

AI 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 information

Section 5.3 : Finding Area Between Curves

Section 5.3 : Finding Area Between Curves MATH 9 Section 5. : Finding Are Between Curves Importnt: In this section we will lern just how to set up the integrls to find re etween curves. The finl nswer for ech emple in this hndout is given for

More information

CS412/413. Introduction to Compilers Tim Teitelbaum. Lecture 4: Lexical Analyzers 28 Jan 08

CS412/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 information

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) *

Languages. L((a (b)(c))*) = { ε,a,bc,aa,abc,bca,... } εw = wε = w. εabba = abbaε = abba. (a (b)(c)) * Pln for Tody nd Beginning Next week Interpreter nd Compiler Structure, or Softwre Architecture Overview of Progrmming Assignments The MeggyJv compiler we will e uilding. Regulr Expressions Finite Stte

More information

WORKSHOP 19 GLOBAL/LOCAL MODELING USING FEM FIELDS

WORKSHOP 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 information

A distributed edit-compile workflow

A distributed edit-compile workflow Time Synhroniztion nd Logil Cloks Tody 1. The need for time synhroniztion 2. Wll lok time synhroniztion 3. Logil Time: Lmport Cloks COS 418: Distriuted Systems Leture 4 Kyle Jmieson 2 A distriuted edit-ompile

More information

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the

this grammar generates the following language: Because this symbol will also be used in a later step, it receives the LR() nlysis Drwcks of LR(). Look-hed 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 information

Can Pythagoras Swim?

Can Pythagoras Swim? Overview Ativity ID: 8939 Mth Conepts Mterils Students will investigte reltionships etween sides of right tringles to understnd the Pythgoren theorem nd then use it to solve prolems. Students will simplify

More information