XML and Databases. Outline. Recall: Top-Down Evaluation of Simple Paths. Recall: Top-Down Evaluation of Simple Paths. Sebastian Maneth NICTA and UNSW

Size: px
Start display at page:

Download "XML and Databases. Outline. Recall: Top-Down Evaluation of Simple Paths. Recall: Top-Down Evaluation of Simple Paths. Sebastian Maneth NICTA and UNSW"

Transcription

1 Smll Pth Quiz ML n Dtss Cn you giv n xprssion tht rturns th lst / irst ourrn o h istint pri lmnt? Ltur 8 Strming Evlution: how muh mmory o you n? Sstin Mnth NICTA n UNSW <> <pri></pri> <pri></pri> <pri></pri> <pri></pri> <pri></pri> <pri>4</pri> <pri></pri> <pri>7</pri> </> Shoul rturn <pri></pri> <pri>4</pri> <pri></pri> <pri>7</pri> Shoul rturn <pri></pri> <pri></pri> <pri>4</pri> <pri>7</pri> CSE@UNSW -- Smstr, Rll Smll Pth Quiz Cn you giv n xprssion tht rturns th lst / irst ourrn o h istint pri lmnt? Evlution o Simpl Pths //// Aritrry Quris ovr //, /, * Outlin <> <pri>.0</pri> <pri></pri> <pri>.00</pri> <pri></pri> <pri></pri> <pri>4</pri> <pri>.000</pri> <pri>7</pri> </> Shoul rturn <pri></pri> <pri>4</pri> <pri>.000</pri> <pri>7</pri> Shoul rturn <pri>.0</pri> <pri></pri> <pri>4</pri> <pri>7</pri>. Automton Approh. Prlll Evlution o Multipl Quris. Sizs o Automt 4. How to l with Filtrs 5. Existing Systms or Strming Pth Evlution Wht i w mn numr-istintnss (not strings)? 4 Rll: p-down Evlution o Simpl Pths Rll: p-down Evlution o Simpl Pths vlut in on singl pr-orr trvrsl (using stk) vlut in on singl pr-orr trvrsl (using stk) /// =Q qury mth position: p = /// =Q qury mth position: p = [nelmnt( )] p = pop() = [strtelmnt( )] [strtelmnt( )] rsult no [strtelmnt( )] [nelmnt( )] [strtelmnt( )] [strtelmnt( )] [nelmnt( )] [strtelmnt( )] rsult no [strtelmnt( )] push() [nelmnt( )] p = pop() = [strtelmnt( )] push() [nelmnt( )] p = pop() = 5 Simpl Pth //_/_/_/... /_n Strming Algorithm! TIME on pss through oumnt tr. SPACE stk o qury positions. hight is oun y pth o oumnt tr. No n to stor th oumnt!! Cn vlut on SA vnt strm. BUT N output urs, i sutrs o mth nos shoul print! 6

2 Rll: p-down Evlution o Simpl Pths Rll: p-down Evlution o Simpl Pths vlut in on singl pr-orr trvrsl (using stk) vlut in on singl pr-orr trvrsl (using stk) I w print no-ids, thn no output urs r n! Tru Strming, with mmory n proportionl to hight. /// =Q qury mth position: p = Strming Algorithm! No n to stor th oumnt!! Cn vlut on SA vnt strm. I w print no-ids, thn no output urs r n! ny goo implmnttion o this lgorithm shoul work or oumnts with pth up to oupl o millions, n NO rstrition on oumnt siz! /// =Q qury mth position: p = Strming Algorithm! No n to stor th oumnt!! Cn vlut on SA vnt strm. Simpl Pth //_/_/_/... /_n TIME on pss through oumnt tr. SPACE stk o qury positions. hight is oun y pth o oumnt tr. BUT N output urs, i sutrs o mth nos shoul print! 7 Simpl Pth //_/_/_/... /_n TIME on pss through oumnt tr. SPACE stk o qury positions. hight is oun y pth o oumnt tr. Byt is nough or smll quris! 8 Aritrry Slsh+Slshslsh Aritrry Slsh+Slshslsh vlut in on singl pr-orr trvrsl (using stk) vlut in on singl pr-orr trvrsl (using stk) Aritrry quris with /,//,* multipl // s ///// qury mth position: p = Aritrry quris with /,//,* multipl // s ///// qury mth position: p = no mth sty in p=! [strtelmnt( )] push() [nelmnt( )] p = pop() = no mth sty in p=! [strtelmnt( )] push() [nelmnt( )] p = pop() = [strtelmnt( )] push() [strtelmnt( )] push() Rsult no! Mrk it, n sty in p=. 9 0 Aritrry Slsh+Slshslsh Aritrry Slsh+Slshslsh vlut in on singl pr-orr trvrsl (using stk) Aritrry quris with /,//,* ///// multipl // s qury mth position: p = vlut in on singl pr-orr trvrsl (using stk) Aritrry quris with /,//,* ///// multipl // s qury mth position: p = no mth sty in p=! [strtelmnt( )] push() [nelmnt( )] p = pop() = [strtelmnt( )] push() [strtelmnt( )] push() Rsult no! Mrk it, n sty in p=. no mth sty in p=! [strtelmnt( )] push() [nelmnt( )] p = pop() = [strtelmnt( )] push() [strtelmnt( )] push() [nelmnt( )] p = pop() = [strtelmnt( )] push() [strtelmnt( )] push() Output No-ID Strt opying to Output Bur

3 Aritrry Slsh+Slshslsh Aritrry Slsh+Slshslsh vlut in on singl pr-orr trvrsl (using stk) Aritrry quris with /,//,* ///// multipl // s qury mth position: p = vlut in on singl pr-orr trvrsl (using stk) Aritrry quris with /,//,* ///// multipl // s qury mth position: p = Optimiztions (or Output Burs) Sty t position, or th omplt sutr! Nvr go k to pos. or pos.! () I insi mth sutr, ror position (or rng within ur), inst o rting nw output ur. () I sutr is inish (w r not insi mth), thn w n writ its ur out n n strt with mpty ur gin. [ Worst Cs: root no slt. siz o o. N. ] 4 vlut in on singl pr-orr trvrsl Aritrry quris with /,//,* multipl // s Aritrry Slsh+Slshslsh (using stk) ///// qury mth position: p = vlut in on singl pr-orr trvrsl Aritrry quris with /,//,* multipl // s Aritrry Slsh+Slshslsh (using stk) ///// qury mth position: p = ///////*////g//h ///////*////g//h Sm s or jump k within /-squn. AT MOST to th ginning o th lst //. Us KMP within /-squn. For * s: uil svrl KMP-tls. Qury Prolm is solv! Lv optimiztions o >t il.xml [..7,.,..., ] OS/UNI hkrs.. I No-IDs r print, thn no output urs r n. Thn: Mmory proportionl to hight. Shoul run or ritrry lrg os! 5 6. Automton Approh. Automton Approh * g h * g h ///////*////g//h, not n not ///////*////g//h Sm s or jump k within /-squn. AT MOST to th ginning o th lst //. Us KMP within /-squn. For * s: uil svrl KMP-tls. Rll Dtrministi Automton runs in linr tim n onstnt sp (plus stk o stts, i w run on pths o tr) 7 Sm s or jump k within /-squn. AT MOST to th ginning o th lst //. Us KMP within /-squn. For * s: uil svrl KMP-tls. Rll Dtrministi Automton runs in linr tim n onstnt sp (plus stk o stts, i w run on pths o tr) 8

4 . Automton Approh. Automton Approh * g h * g h,,,, not n not ///////*////g//h not n not ///////*////g//h Sm s or jump k within /-squn. AT MOST to th ginning o th lst //. Us KMP within /-squn. For * s: uil svrl KMP-tls. Rll Dtrministi Automton runs in linr tim n onstnt sp (plus stk o stts, i w run on pths o tr) 9 E.g., W shoul in stt! Prolm I it is NOT n hr, thn wht to o?? 0. Automton Approh. Automton Approh *= g h, not n not, ///////*////g//h *= g h,, not n not,, ///////*////g//h E.g., W shoul in stt! Prolm I it is NOT n hr, thn wht to o?? N to know wht th * ws!! *=? Whih othr lttrs n to onsir? x y splitting n t most #irnt symols mny *= g h,, not n not,, ///////*////g//h *= g h,, not n not,, ///////*////g//h *=? Whih othr lttrs n to onsir? *=? Whih othr lttrs n to onsir? x y or x, not importnt wht x is only x= / x mttrs x y or x, not importnt wht x is only x= / x mttrs 4 4

5 , gin+, gin+ *= g h,, mth stt not,, or n not = ///////*////g//h *=? Whih othr lttrs n to onsir? *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. mth stt or x y or x, not importnt wht x is only x= / x mttrs 5 6, gin+, gin+ *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. mth stt or *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. mth stt or =//// Q=/// Q =//// Q=/// Q Qustions. Whih trnsition is WRONG?,, 7,, 8, gin+, gin+ *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=///,, Q Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r missing? 9 *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=///,, Q Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r missing? 0 5

6 , gin+, gin+ *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=///,, Q, Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r missing? *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=///,, Q, Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r missing?, gin+, gin+ *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=///,, Q, Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r missing? *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=///,, Q, Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r missing? 4, gin+, gin+ *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=/// Q,,, Qustions mth stt or. Whih trnsition is WRONG?. How mny trnsitions r 5 missing? 5 *= g h, not n not,,, = ///////*////g//h Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=/// mth stt or ONE look-up Q pr no! Comin utomton: SIZE SIZE(A) x SIZE(A),,, 6 6

7 , gin+. Th Siz o th DFA *= g h, not n not,,, Avntg o utomt: n omin to vlut MANY quris in prlll. =//// Q=/// Qustion Wht is SIZE(A) wrt siz o? mth stt or Tk () SIZE(A) = #stts () SIZE(A) = #trnsitions ONE look-up Q pr no! Comin utomton: SIZE SIZE(A) x SIZE(A),,, 7 ///*/*/*/ Siz Siz o o DFA DFA = xponntil in in * s * s (not (not rl rl onrn) NFA 0 * * * 4 5 * 0 [othr] 0 [othr] 0 0 [othr] [othr] [othr] [othr] DFA (rgmnt, n without k gs). Th Siz o th DFA How to l with iltrs? //[.//]/// Thorm [GMOS 0] Th numr o stts in th DFA or on linr Pth xprssion P is t most: k+ P k s m Whn w mt th -nos (in pr orr trvrsl) w o not know yt i th iltr will vlut to tru. k = numr o // s = siz o th lpht (numr o tgs) m = mx numr o * twn two onsutiv // 40 How to l with iltrs? //[.//]/// How to l with iltrs? //[.//]/// Whn w mt th -nos (in pr orr trvrsl) w o not know yt i th iltr will vlut to tru. Siz o lrgst oumnts tht n strm in this wy pns on - #iltrs, - sizs o (pr) slt trs, - qulity o (), (), t.. W hv to us urs, s or. Qustion Howvr, now urs my lt without ing us. Optimiztions () Stor potntil mth trs s DAGs () Rls potntil mth trs s rly s possil! Must stor in mmory I w output no ID s, thn how muh mmory is n in th worst s or quris with iltrs? 4 Must stor in mmory 4 7

8 How to l with iltrs? //[.//]/// How to l with iltrs? //[.//]/// Siz o lrgst oumnts tht n strm in this wy pns on - #iltrs, - sizs o (pr) slt trs, - qulity o (), (), t.. Siz o lrgst oumnts tht n strm in this wy pns on - #iltrs, - sizs o (pr) slt trs, - qulity o (), (), t.. Rls potntil mth trs s rly s possil! Rls potntil mth trs s rly s possil! Fin rlist point t whih w know th iltr is tru. Fin rlist point t whih w know th iltr is tru. Must stor in mmory 4 No n to stor. Strm! 44 How to l with iltrs? How to l with iltrs? //[.//]/// //[.//]/// Siz o lrgst oumnts tht n strm in this wy pns on - #iltrs, - sizs o (pr) slt trs, - qulity o (), (), t.. Siz o lrgst oumnts tht n strm in this wy pns on - #iltrs, - sizs o (pr) slt trs, - qulity o (), (), t.. Fin rlist point t whih w know th iltr is tru. Hrr or Booln omintions: Fin rlist point t whih w know th iltr is tru. Hrr or Booln omintions: [not(.//) n (.// or ///)] [not(.//) n (.// or ///)] No n to stor. Strm! Qustion whr is th rlist point or this iltr? 45 No n to stor. Strm! Qustion whr is th rlist point or this iltr? n now? 46 How to l with iltrs? How to l with iltrs? //[.//]/// //[.//]/// Siz o lrgst oumnts tht n strm in this wy pns on - #iltrs, - sizs o (pr) slt trs, - qulity o (), (), t.. Anothr I Us -pss lgorithm: irst (ottom-up) phs to mrk sutrs with iltr inormtion. Son (top-own) phs to trmin mth nos. Why is this intrsting? W n lso onstrut utomt or iltr xprssions! Fst min mmory vlution Us isk s intrmit stor (strm twi) Us push-own or potntil nits. Push-Down Automton n proly sign so tht it pops/outputs nits s rly s possil

9 5. Strming Pth Algorithms 5. Strming Pth Algorithms Filtr n YFiltr [Altinl n Frnklin 00] [Dio t l 0] -sn [Ivs, Lvy, n Wl 00] MLTK [Avil-Cmpillo t l 0] Tri [Chn t l 0] SPE [Oltnu, Kisling, n Bry 0] Lzy DFAs [Grn t l 0] Th Push Mhin [Gupt n Suiu 0] SQ [Png n Chwth 0] TuroPth [Josiovski, Fontour, n Brt 04] Som ollowing slis r y T. Amgs n M Onizuk (Jpn) S Most o th ollowing slis r y Dn Suiu (th ov slis r Atully lso s on Suiu s slis ) S

10 0

11 Bsi NFA Evlution Proprtis: Sp = linr Throughput = rss linrly Systms: Filtr [Altinl&Frnklin 99], YFiltr. Tri [Chn t l. 0] Bsi DFA Evlution Proprtis: Throughput = onstnt! Sp = GOOD QUESTION Systm: ML olkit [Univrsity o Wshington] Th Siz o th DFA Thorm [GMOS 0] Th numr o stts in th DFA or on linr Pth xprssion P is t most: k+ P k s m k = numr o // s = siz o th lpht (numr o tgs) m = mx numr o * twn two onsutiv // Siz o DFA: Multipl Exprssions //stion//ootnot //tl//ootnot //igur//ootnot //strt//ootnot 00 xprssions stts!!!! Thr is thorm hr too, ut it s not usul Solution: Comput th DFA Lzily Also us in txt srhing But will it work or 0 6 Pth xprssions? YES! For Pth it is provly tiv, or two rsons: ML t is not vry p Th nsting strutur in ML t tns to pritl

12 Lzy DFA n Simpl DTDs Doumnt Typ Dinition (DTD) Prt o th ML stnr Will rpl y ML Shm Exmpl DTD: <!ELEMENT oumnt (stion*)> <!ELEMENT stion ((stion strt tl igur)*)> <!ELEMENT igur (tl?,ootnot*)> Dinition A DTD is simpl i ll yls r loops Lzy DFA n Simpl DTDs Lzy DFA n Simpl DTDs igur Simpl DTD: oumnt stion ootnot tl strt Pth xprssions //stion//ootnot //tl//ootnot //igur//ootnot //strt//ootnot Egr DFA rmmrs 4 sts Lzy DFA rmmrs only 4 sts Thorm [GMOS 0] I th ML t hs simpl DTD, thn lzy DFA hs t most: +D(+n) stts. n = mx pths o Pth xprssions D = siz o th unol DTD = mx pths o sl-loops in th DTD Ft o li: Dt-lik ML hs simpl DTDs Lzy DFA n Dt Guis Non-simpl DTDs r uslss or th lzy DFA Evrything my ontin vrything Lzy DFA n Dt Guis Dinition [Golmn&Wiom 97] Th t gui or n ML t instn is th Tri o ll its root-to-l pths <!ELEMENT oumnt (stion*)> <!ELEMENT stion ((stion tl igur strt ootnot)*)> <!ELEMENT tl ((stion tl igur strt ootnot)*)> <!ELEMENT igur ((stion tl igur strt ootnot)*)> <!ELEMENT strt ((stion tl igur strt ootnot)*)> Ft o li: Txt -lik ML hs non-simpl DTDs

13 Lzy DFA n Dt Guis Lzy DFA n Simpl DTDs ML Dt stion stion tl tl tl oumnt stion stion igur stion tl Dt Gui stion tl igur oumnt stion igur stion tl igur Thorm [GMOS 0] I th ML t hs t gui with G nos, thn th numr o stts in th lzy DFA is t most: +G Ft o li: rl ML t hs smll t gui [Lik&S. 00] G = numr o nos in th t gui Numr o Lzy DFA Stts - SYNTHETIC Dt 0 Pth 0 4 Pth 0 5 Pth 4000 stts stts G = Numr o Lzy DFA Stts - REAL Dt 0 Pth 0 4 Pth 0 5 Pth 95 stts simpl prov BPSS protin ns trnk protin ns trnk Throughput or 0, 0 4, 0 5, 0 6 Pth xprssions 00MB/s 0MB/s [ pro(*)=0%, pro(//)=0% ] Prsr: 0MB/s Lzy DFA: 5.4MB/s END Ltur 9 MB/s 0.MB/s 0.0MB/s 0.00MB/s 0.000MB/s 5MB 0MB 5MB 0MB 5MB tl input siz prsr lzydfa (0 Pth) lzydfa (0 4 Pth) lzydfa (0 5 Pth) lzydfa (0 6 Pth) xiltr (0 Pth) xiltr (0 4 Pth) xiltr(0 5 Pth) xiltr(0 6 Pth) 78

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018

CSE 373: More on graphs; DFS and BFS. Michael Lee Wednesday, Feb 14, 2018 CSE 373: Mor on grphs; DFS n BFS Mihl L Wnsy, F 14, 2018 1 Wrmup Wrmup: Disuss with your nighor: Rmin your nighor: wht is simpl grph? Suppos w hv simpl, irt grph with x nos. Wht is th mximum numr of gs

More information

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s?

b. How many ternary words of length 23 with eight 0 s, nine 1 s and six 2 s? MATH 3012 Finl Exm, My 4, 2006, WTT Stunt Nm n ID Numr 1. All our prts o this prolm r onrn with trnry strings o lngth n, i.., wors o lngth n with lttrs rom th lpht {0, 1, 2}.. How mny trnry wors o lngth

More information

1 Introduction to Modulo 7 Arithmetic

1 Introduction to Modulo 7 Arithmetic 1 Introution to Moulo 7 Arithmti Bor w try our hn t solvin som hr Moulr KnKns, lt s tk los look t on moulr rithmti, mo 7 rithmti. You ll s in this sminr tht rithmti moulo prim is quit irnt rom th ons w

More information

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura

Module graph.py. 1 Introduction. 2 Graph basics. 3 Module graph.py. 3.1 Objects. CS 231 Naomi Nishimura Moul grph.py CS 231 Nomi Nishimur 1 Introution Just lik th Python list n th Python itionry provi wys of storing, ssing, n moifying t, grph n viw s wy of storing, ssing, n moifying t. Bus Python os not

More information

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology!

Cycles and Simple Cycles. Paths and Simple Paths. Trees. Problem: There is No Completely Standard Terminology! Outlin Computr Sin 331, Spnnin, n Surphs Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #30 1 Introution 2 3 Dinition 4 Spnnin 5 6 Mik Joson (Univrsity o Clry) Computr Sin 331 Ltur #30 1 / 20 Mik

More information

CSC Design and Analysis of Algorithms. Example: Change-Making Problem

CSC Design and Analysis of Algorithms. Example: Change-Making Problem CSC 801- Dsign n Anlysis of Algorithms Ltur 11 Gry Thniqu Exmpl: Chng-Mking Prolm Givn unlimit mounts of oins of nomintions 1 > > m, giv hng for mount n with th lst numr of oins Exmpl: 1 = 25, 2 =10, =

More information

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example

Outline. 1 Introduction. 2 Min-Cost Spanning Trees. 4 Example Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim's Alorithm Introution Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #33 3 Alorithm Gnrl Constrution Mik Joson (Univrsity o Clry)

More information

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp

CSE 373. Graphs 1: Concepts, Depth/Breadth-First Search reading: Weiss Ch. 9. slides created by Marty Stepp CSE 373 Grphs 1: Conpts, Dpth/Brth-First Srh ring: Wiss Ch. 9 slis rt y Mrty Stpp http://www.s.wshington.u/373/ Univrsity o Wshington, ll rights rsrv. 1 Wht is grph? 56 Tokyo Sttl Soul 128 16 30 181 140

More information

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes.

Math 61 : Discrete Structures Final Exam Instructor: Ciprian Manolescu. You have 180 minutes. Nm: UCA ID Numr: Stion lttr: th 61 : Disrt Struturs Finl Exm Instrutor: Ciprin nolsu You hv 180 minuts. No ooks, nots or lultors r llow. Do not us your own srth ppr. 1. (2 points h) Tru/Fls: Cirl th right

More information

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs.

Paths. Connectivity. Euler and Hamilton Paths. Planar graphs. Pths.. Eulr n Hmilton Pths.. Pth D. A pth rom s to t is squn o gs {x 0, x 1 }, {x 1, x 2 },... {x n 1, x n }, whr x 0 = s, n x n = t. D. Th lngth o pth is th numr o gs in it. {, } {, } {, } {, } {, } {,

More information

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)} Introution Computr Sin & Enginring 423/823 Dsign n Anlysis of Algorithms Ltur 03 Elmntry Grph Algorithms (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) I Grphs r strt t typs tht r pplil to numrous

More information

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely

(2) If we multiplied a row of B by λ, then the value is also multiplied by λ(here lambda could be 0). namely . DETERMINANT.. Dtrminnt. Introution:I you think row vtor o mtrix s oorint o vtors in sp, thn th gomtri mning o th rnk o th mtrix is th imnsion o th prlllppi spnn y thm. But w r not only r out th imnsion,

More information

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)}

V={A,B,C,D,E} E={ (A,D),(A,E),(B,D), (B,E),(C,D),(C,E)} s s of s Computr Sin & Enginring 423/823 Dsign n Anlysis of Ltur 03 (Chptr 22) Stphn Sott (Apt from Vinohnrn N. Vriym) s of s s r strt t typs tht r pplil to numrous prolms Cn ptur ntitis, rltionships twn

More information

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review

CSE 373: AVL trees. Warmup: Warmup. Interlude: Exploring the balance invariant. AVL Trees: Invariants. AVL tree invariants review rmup CSE 7: AVL trs rmup: ht is n invrint? Mihl L Friy, Jn 9, 0 ht r th AVL tr invrints, xtly? Disuss with your nighor. AVL Trs: Invrints Intrlu: Exploring th ln invrint Cor i: xtr invrint to BSTs tht

More information

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem)

12/3/12. Outline. Part 10. Graphs. Circuits. Euler paths/circuits. Euler s bridge problem (Bridges of Konigsberg Problem) 12/3/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 Ciruits Cyl 2 Eulr

More information

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs

5/9/13. Part 10. Graphs. Outline. Circuits. Introduction Terminology Implementing Graphs Prt 10. Grphs CS 200 Algorithms n Dt Struturs 1 Introution Trminology Implmnting Grphs Outlin Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 2 Ciruits Cyl A spil yl

More information

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS

ECE COMBINATIONAL BUILDING BLOCKS - INVEST 13 DECODERS AND ENCODERS C 24 - COMBINATIONAL BUILDING BLOCKS - INVST 3 DCODS AND NCODS FALL 23 AP FLZ To o "wll" on this invstition you must not only t th riht nswrs ut must lso o nt, omplt n onis writups tht mk ovious wht h

More information

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management

, each of which is a tree, and whose roots r 1. , respectively, are children of r. Data Structures & File Management nrl tr T is init st o on or mor nos suh tht thr is on sint no r, ll th root o T, n th rminin nos r prtition into n isjoint susts T, T,, T n, h o whih is tr, n whos roots r, r,, r n, rsptivly, r hilrn o

More information

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, *

FSA. CmSc 365 Theory of Computation. Finite State Automata and Regular Expressions (Chapter 2, Section 2.3) ALPHABET operations: U, concatenation, * CmSc 365 Thory of Computtion Finit Stt Automt nd Rgulr Exprssions (Chptr 2, Sction 2.3) ALPHABET oprtions: U, conctntion, * otin otin Strings Form Rgulr xprssions dscri Closd undr U, conctntion nd * (if

More information

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation

A Simple Code Generator. Code generation Algorithm. Register and Address Descriptors. Example 3/31/2008. Code Generation A Simpl Co Gnrtor Co Gnrtion Chptr 8 II Gnrt o for singl si lok How to us rgistrs? In most mhin rhitturs, som or ll of th oprnsmust in rgistrs Rgistrs mk goo tmporris Hol vlus tht r omput in on si lok

More information

Planar Upward Drawings

Planar Upward Drawings C.S. 252 Pro. Rorto Tmssi Computtionl Gomtry Sm. II, 1992 1993 Dt: My 3, 1993 Sri: Shmsi Moussvi Plnr Upwr Drwings 1 Thorm: G is yli i n only i it hs upwr rwing. Proo: 1. An upwr rwing is yli. Follow th

More information

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS

COMPLEXITY OF COUNTING PLANAR TILINGS BY TWO BARS OMPLXITY O OUNTING PLNR TILINGS Y TWO RS KYL MYR strt. W show tht th prolm o trmining th numr o wys o tiling plnr igur with horizontl n vrtil r is #P-omplt. W uil o o th rsults o uquir, Nivt, Rmil, n Roson

More information

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V

An undirected graph G = (V, E) V a set of vertices E a set of unordered edges (v,w) where v, w in V Unirt Grphs An unirt grph G = (V, E) V st o vrtis E st o unorr gs (v,w) whr v, w in V USE: to mol symmtri rltionships twn ntitis vrtis v n w r jnt i thr is n g (v,w) [or (w,v)] th g (v,w) is inint upon

More information

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph

Algorithmic and NP-Completeness Aspects of a Total Lict Domination Number of a Graph Intrntionl J.Mth. Comin. Vol.1(2014), 80-86 Algorithmi n NP-Compltnss Aspts of Totl Lit Domintion Numr of Grph Girish.V.R. (PES Institut of Thnology(South Cmpus), Bnglor, Krntk Stt, Ini) P.Ush (Dprtmnt

More information

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs

Outline. Computer Science 331. Computation of Min-Cost Spanning Trees. Costs of Spanning Trees in Weighted Graphs Outlin Computr Sin 33 Computtion o Minimum-Cost Spnnin Trs Prim s Mik Joson Dprtmnt o Computr Sin Univrsity o Clry Ltur #34 Introution Min-Cost Spnnin Trs 3 Gnrl Constrution 4 5 Trmintion n Eiiny 6 Aitionl

More information

Last time: introduced our first computational model the DFA.

Last time: introduced our first computational model the DFA. Lctur 7 Homwork #7: 2.2.1, 2.2.2, 2.2.3 (hnd in c nd d), Misc: Givn: M, NFA Prov: (q,xy) * (p,y) iff (q,x) * (p,) (follow proof don in clss tody) Lst tim: introducd our first computtionl modl th DFA. Tody

More information

CS 461, Lecture 17. Today s Outline. Example Run

CS 461, Lecture 17. Today s Outline. Example Run Prim s Algorithm CS 461, Ltur 17 Jr Si Univrsity o Nw Mxio In Prim s lgorithm, th st A mintin y th lgorithm orms singl tr. Th tr strts rom n ritrry root vrtx n grows until it spns ll th vrtis in V At h

More information

Present state Next state Q + M N

Present state Next state Q + M N Qustion 1. An M-N lip-lop works s ollows: I MN=00, th nxt stt o th lip lop is 0. I MN=01, th nxt stt o th lip-lop is th sm s th prsnt stt I MN=10, th nxt stt o th lip-lop is th omplmnt o th prsnt stt I

More information

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2

Graph Isomorphism. Graphs - II. Cayley s Formula. Planar Graphs. Outline. Is K 5 planar? The number of labeled trees on n nodes is n n-2 Grt Thortil Is In Computr Sin Vitor Amhik CS 15-251 Ltur 9 Grphs - II Crngi Mllon Univrsity Grph Isomorphism finition. Two simpl grphs G n H r isomorphi G H if thr is vrtx ijtion V H ->V G tht prsrvs jny

More information

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA.

S i m p l i f y i n g A l g e b r a SIMPLIFYING ALGEBRA. S i m p l i y i n g A l g r SIMPLIFYING ALGEBRA www.mthltis.o.nz Simpliying SIMPLIFYING Algr ALGEBRA Algr is mthmtis with mor thn just numrs. Numrs hv ix vlu, ut lgr introus vrils whos vlus n hng. Ths

More information

Problem solving by search

Problem solving by search Prolm solving y srh Tomáš voo Dprtmnt o Cyrntis, Vision or Roots n Autonomous ystms Mrh 5, 208 / 3 Outlin rh prolm. tt sp grphs. rh trs. trtgis, whih tr rnhs to hoos? trtgy/algorithm proprtis? Progrmming

More information

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals

Integration Continued. Integration by Parts Solving Definite Integrals: Area Under a Curve Improper Integrals Intgrtion Continud Intgrtion y Prts Solving Dinit Intgrls: Ar Undr Curv Impropr Intgrls Intgrtion y Prts Prticulrly usul whn you r trying to tk th intgrl o som unction tht is th product o n lgric prssion

More information

CS 241 Analysis of Algorithms

CS 241 Analysis of Algorithms CS 241 Anlysis o Algorithms Prossor Eri Aron Ltur T Th 9:00m Ltur Mting Lotion: OLB 205 Businss HW6 u lry HW7 out tr Thnksgiving Ring: Ch. 22.1-22.3 1 Grphs (S S. B.4) Grphs ommonly rprsnt onntions mong

More information

0.1. Exercise 1: the distances between four points in a graph

0.1. Exercise 1: the distances between four points in a graph Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 pg 1 Mth 707 Spring 2017 (Drij Grinrg): mitrm 3 u: W, 3 My 2017, in lss or y mil (grinr@umn.u) or lss S th wsit or rlvnt mtril. Rsults provn in th nots, or in

More information

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem)

Outline. Circuits. Euler paths/circuits 4/25/12. Part 10. Graphs. Euler s bridge problem (Bridges of Konigsberg Problem) 4/25/12 Outlin Prt 10. Grphs CS 200 Algorithms n Dt Struturs Introution Trminology Implmnting Grphs Grph Trvrsls Topologil Sorting Shortst Pths Spnning Trs Minimum Spnning Trs Ciruits 1 2 Eulr s rig prolm

More information

QUESTIONS BEGIN HERE!

QUESTIONS BEGIN HERE! Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt of Computr n Informtion Sins CSCI 710 (Trnoff) Disrt Struturs TEST for Fll Smstr, 00 R this for strtin! This tst is los ook

More information

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata

CSE303 - Introduction to the Theory of Computing Sample Solutions for Exercises on Finite Automata CSE303 - Introduction to th Thory of Computing Smpl Solutions for Exrciss on Finit Automt Exrcis 2.1.1 A dtrministic finit utomton M ccpts th mpty string (i.., L(M)) if nd only if its initil stt is finl

More information

Section 3: Antiderivatives of Formulas

Section 3: Antiderivatives of Formulas Chptr Th Intgrl Appli Clculus 96 Sction : Antirivtivs of Formuls Now w cn put th is of rs n ntirivtivs togthr to gt wy of vluting finit intgrls tht is ct n oftn sy. To vlut finit intgrl f(t) t, w cn fin

More information

CS September 2018

CS September 2018 Loil los Distriut Systms 06. Loil los Assin squn numrs to msss All ooprtin prosss n r on orr o vnts vs. physil los: rport tim o y Assum no ntrl tim sour Eh systm mintins its own lol lo No totl orrin o

More information

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013

Exam 1 Solution. CS 542 Advanced Data Structures and Algorithms 2/14/2013 CS Avn Dt Struturs n Algorithms Exm Solution Jon Turnr //. ( points) Suppos you r givn grph G=(V,E) with g wights w() n minimum spnning tr T o G. Now, suppos nw g {u,v} is to G. Dsri (in wors) mtho or

More information

Constructive Geometric Constraint Solving

Constructive Geometric Constraint Solving Construtiv Gomtri Constrint Solving Antoni Soto i Rir Dprtmnt Llngutgs i Sistms Inormàtis Univrsitt Politèni Ctluny Brlon, Sptmr 2002 CGCS p.1/37 Prliminris CGCS p.2/37 Gomtri onstrint prolm C 2 D L BC

More information

Numbering Boundary Nodes

Numbering Boundary Nodes Numring Bounry Nos Lh MBri Empori Stt Univrsity August 10, 2001 1 Introution Th purpos of this ppr is to xplor how numring ltril rsistor ntworks ffts thir rspons mtrix, Λ. Morovr, wht n lrn from Λ out

More information

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1

Graphs. Graphs. Graphs: Basic Terminology. Directed Graphs. Dr Papalaskari 1 CSC 00 Disrt Struturs : Introuon to Grph Thory Grphs Grphs CSC 00 Disrt Struturs Villnov Univrsity Grphs r isrt struturs onsisng o vrs n gs tht onnt ths vrs. Grphs n us to mol: omputr systms/ntworks mthml

More information

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1

Solutions for HW11. Exercise 34. (a) Use the recurrence relation t(g) = t(g e) + t(g/e) to count the number of spanning trees of v 1 Solutions for HW Exris. () Us th rurrn rltion t(g) = t(g ) + t(g/) to ount th numr of spnning trs of v v v u u u Rmmr to kp multipl gs!! First rrw G so tht non of th gs ross: v u v Rursing on = (v, u ):

More information

Designing A Concrete Arch Bridge

Designing A Concrete Arch Bridge This is th mous Shwnh ri in Switzrln, sin y Rort Millrt in 1933. It spns 37.4 mtrs (122 t) n ws sin usin th sm rphil mths tht will monstrt in this lsson. To pro with this lsson, lik on th Nxt utton hr

More information

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12

CS61B Lecture #33. Administrivia: Autograder will run this evening. Today s Readings: Graph Structures: DSIJ, Chapter 12 Aministrivi: CS61B Ltur #33 Autogrr will run this vning. Toy s Rings: Grph Struturs: DSIJ, Chptr 12 Lst moifi: W Nov 8 00:39:28 2017 CS61B: Ltur #33 1 Why Grphs? For xprssing non-hirrhilly rlt itms Exmpls:

More information

QUESTIONS BEGIN HERE!

QUESTIONS BEGIN HERE! Points miss: Stunt's Nm: Totl sor: /100 points Est Tnnss Stt Univrsity Dprtmnt o Computr n Inormtion Sins CSCI 2710 (Trno) Disrt Struturs TEST or Sprin Smstr, 2005 R this or strtin! This tst is los ook

More information

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari

Graphs. CSC 1300 Discrete Structures Villanova University. Villanova CSC Dr Papalaskari Grphs CSC 1300 Disrt Struturs Villnov Univrsity Grphs Grphs r isrt struturs onsis?ng of vr?s n gs tht onnt ths vr?s. Grphs n us to mol: omputr systms/ntworks mthm?l rl?ons logi iruit lyout jos/prosss f

More information

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently?

Register Allocation. How to assign variables to finitely many registers? What to do when it can t be done? How to do so efficiently? Rgistr Allotion Rgistr Allotion How to ssign vrils to initly mny rgistrs? Wht to o whn it n t on? How to o so iintly? Mony, Jun 3, 13 Mmory Wll Disprity twn CPU sp n mmory ss sp improvmnt Mony, Jun 3,

More information

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016

Winter 2016 COMP-250: Introduction to Computer Science. Lecture 23, April 5, 2016 Wintr 2016 COMP-250: Introduction to Computr Scinc Lctur 23, April 5, 2016 Commnt out input siz 2) Writ ny lgorithm tht runs in tim Θ(n 2 log 2 n) in wors cs. Explin why this is its running tim. I don

More information

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal?

NP-Completeness. CS3230 (Algorithm) Traveling Salesperson Problem. What s the Big Deal? Given a Problem. What s the Big Deal? What s the Big Deal? NP-Compltnss 1. Polynomil tim lgorithm 2. Polynomil tim rution 3.P vs NP 4.NP-ompltnss (som slis y P.T. Um Univrsity o Txs t Dlls r us) Trvling Slsprson Prolm Fin minimum lngth tour tht visits h ity on

More information

Seven-Segment Display Driver

Seven-Segment Display Driver 7-Smnt Disply Drivr, Ron s in 7-Smnt Disply Drivr, Ron s in Prolm 62. 00 0 0 00 0000 000 00 000 0 000 00 0 00 00 0 0 0 000 00 0 00 BCD Diits in inry Dsin Drivr Loi 4 inputs, 7 outputs 7 mps, h with 6 on

More information

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017

COMP 250. Lecture 29. graph traversal. Nov. 15/16, 2017 COMP 250 Ltur 29 rp trvrsl Nov. 15/16, 2017 1 Toy Rursv rp trvrsl pt rst Non-rursv rp trvrsl pt rst rt rst 2 Hs up! Tr wr w mstks n t sls or S. 001 or toy s ltur. So you r ollown t ltur rorns n usn ts

More information

DFA (Deterministic Finite Automata) q a

DFA (Deterministic Finite Automata) q a Big pictur All lngugs Dcidl Turing mchins NP P Contxt-fr Contxt-fr grmmrs, push-down utomt Rgulr Automt, non-dtrministic utomt, rgulr xprssions DFA (Dtrministic Finit Automt) 0 q 0 0 0 0 q DFA (Dtrministic

More information

CSI35 Chapter 11 Review

CSI35 Chapter 11 Review 1. Which of th grphs r trs? c f c g f c x y f z p q r 1 1. Which of th grphs r trs? c f c g f c x y f z p q r . Answr th qustions out th following tr 1) Which vrtx is th root of c th tr? ) wht is th hight

More information

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1.

Why the Junction Tree Algorithm? The Junction Tree Algorithm. Clique Potential Representation. Overview. Chris Williams 1. Why th Juntion Tr lgorithm? Th Juntion Tr lgorithm hris Willims 1 Shool of Informtis, Univrsity of Einurgh Otor 2009 Th JT is gnrl-purpos lgorithm for omputing (onitionl) mrginls on grphs. It os this y

More information

COMP108 Algorithmic Foundations

COMP108 Algorithmic Foundations Grdy mthods Prudn Wong http://www.s.liv..uk/~pwong/thing/omp108/01617 Coin Chng Prolm Suppos w hv 3 typs of oins 10p 0p 50p Minimum numr of oins to mk 0.8, 1.0, 1.? Grdy mthod Lrning outoms Undrstnd wht

More information

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017

MAT3707. Tutorial letter 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS. Semester 1. Department of Mathematical Sciences MAT3707/201/1/2017 MAT3707/201/1/2017 Tutoril lttr 201/1/2017 DISCRETE MATHEMATICS: COMBINATORICS MAT3707 Smstr 1 Dprtmnt o Mtmtil Sins SOLUTIONS TO ASSIGNMENT 01 BARCODE Din tomorrow. univrsity o sout ri SOLUTIONS TO ASSIGNMENT

More information

12. Traffic engineering

12. Traffic engineering lt2.ppt S-38. Introution to Tltrffi Thory Spring 200 2 Topology Pths A tlommunition ntwork onsists of nos n links Lt N not th st of nos in with n Lt J not th st of nos in with j N = {,,,,} J = {,2,3,,2}

More information

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations

More Foundations. Undirected Graphs. Degree. A Theorem. Graphs, Products, & Relations Mr Funtins Grphs, Pruts, & Rltins Unirt Grphs An unirt grph is pir f 1. A st f ns 2. A st f gs (whr n g is st f tw ns*) Friy, Sptmr 2, 2011 Ring: Sipsr 0.2 ginning f 0.4; Stughtn 1.1.5 ({,,,,}, {{,}, {,},

More information

Compression. Compression. Compression. This part of the course... Ifi, UiO Norsk Regnesentral Vårsemester 2005 Wolfgang Leister

Compression. Compression. Compression. This part of the course... Ifi, UiO Norsk Regnesentral Vårsemester 2005 Wolfgang Leister Kurs INF5080 Ifi, UiO Norsk Rgnsntrl Vårsmstr 2005 Wolfgng Listr This prt of th ours...... is hl t Ifi, UiO... (Wolfgng Listr) n t ontins mtril from Univrsity Collg Krlsruh (Ptr Ol, Clmns Knorzr) Informtion

More information

Garnir Polynomial and their Properties

Garnir Polynomial and their Properties Univrsity of Cliforni, Dvis Dprtmnt of Mthmtis Grnir Polynomil n thir Proprtis Author: Yu Wng Suprvisor: Prof. Gorsky Eugny My 8, 07 Grnir Polynomil n thir Proprtis Yu Wng mil: uywng@uvis.u. In this ppr,

More information

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths.

# 1 ' 10 ' 100. Decimal point = 4 hundred. = 6 tens (or sixty) = 5 ones (or five) = 2 tenths. = 7 hundredths. How os it work? Pl vlu o imls rprsnt prts o whol numr or ojt # 0 000 Tns o thousns # 000 # 00 Thousns Hunrs Tns Ons # 0 Diml point st iml pl: ' 0 # 0 on tnth n iml pl: ' 0 # 00 on hunrth r iml pl: ' 0

More information

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e)

Improving Union. Implementation. Union-by-size Code. Union-by-Size Find Analysis. Path Compression! Improving Find find(e) POW CSE 36: Dt Struturs Top #10 T Dynm (Equvln) Duo: Unon-y-Sz & Pt Comprsson Wk!! Luk MDowll Summr Qurtr 003 M! ZING Wt s Goo Mz? Mz Construton lortm Gvn: ollton o rooms V Conntons twn t rooms (ntlly

More information

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008

The University of Sydney MATH2969/2069. Graph Theory Tutorial 5 (Week 12) Solutions 2008 Th Univrsity o Syny MATH2969/2069 Grph Thory Tutoril 5 (Wk 12) Solutions 2008 1. (i) Lt G th isonnt plnr grph shown. Drw its ul G, n th ul o th ul (G ). (ii) Show tht i G is isonnt plnr grph, thn G is

More information

(a) v 1. v a. v i. v s. (b)

(a) v 1. v a. v i. v s. (b) Outlin RETIMING Struturl optimiztion mthods. Gionni D Mihli Stnford Unirsity Rtiming. { Modling. { Rtiming for minimum dly. { Rtiming for minimum r. Synhronous Logi Ntwork Synhronous Logi Ntwork Synhronous

More information

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012

Register Allocation. Register Allocation. Principle Phases. Principle Phases. Example: Build. Spills 11/14/2012 Rgistr Allotion W now r l to o rgistr llotion on our intrfrn grph. W wnt to l with two typs of onstrints: 1. Two vlus r liv t ovrlpping points (intrfrn grph) 2. A vlu must or must not in prtiulr rhitturl

More information

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016

Greedy Algorithms, Activity Selection, Minimum Spanning Trees Scribes: Logan Short (2015), Virginia Date: May 18, 2016 Ltur 4 Gry Algorithms, Ativity Sltion, Minimum Spnning Trs Sris: Logn Short (5), Virgini Dt: My, Gry Algorithms Suppos w wnt to solv prolm, n w r l to om up with som rursiv ormultion o th prolm tht woul

More information

Similarity Search. The Binary Branch Distance. Nikolaus Augsten.

Similarity Search. The Binary Branch Distance. Nikolaus Augsten. Similrity Srh Th Binry Brnh Distn Nikolus Augstn nikolus.ugstn@sg..t Dpt. of Computr Sins Univrsity of Slzurg http://rsrh.uni-slzurg.t Vrsion Jnury 11, 2017 Wintrsmstr 2016/2017 Augstn (Univ. Slzurg) Similrity

More information

Nondeterministic Automata vs Deterministic Automata

Nondeterministic Automata vs Deterministic Automata Nondeterministi Automt vs Deterministi Automt We lerned tht NFA is onvenient model for showing the reltionships mong regulr grmmrs, FA, nd regulr expressions, nd designing them. However, we know tht n

More information

Decimals DECIMALS.

Decimals DECIMALS. Dimls DECIMALS www.mthltis.o.uk ow os it work? Solutions Dimls P qustions Pl vlu o imls 0 000 00 000 0 000 00 0 000 00 0 000 00 0 000 tnths or 0 thousnths or 000 hunrths or 00 hunrths or 00 0 tn thousnths

More information

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim

Nefertiti. Echoes of. Regal components evoke visions of the past MULTIPLE STITCHES. designed by Helena Tang-Lim MULTIPLE STITCHES Nrtiti Ehos o Rgl omponnts vok visions o th pst sign y Hln Tng-Lim Us vrity o stiths to rt this rgl yt wrl sign. Prt sping llows squr s to mk roun omponnts tht rp utiully. FCT-SC-030617-07

More information

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality:

CS200: Graphs. Graphs. Directed Graphs. Graphs/Networks Around Us. What can this represent? Sometimes we want to represent directionality: CS2: Grphs Prihr Ch. 4 Rosn Ch. Grphs A olltion of nos n gs Wht n this rprsnt? n A omputr ntwork n Astrtion of mp n Soil ntwork CS2 - Hsh Tls 2 Dirt Grphs Grphs/Ntworks Aroun Us A olltion of nos n irt

More information

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am

16.unified Introduction to Computers and Programming. SOLUTIONS to Examination 4/30/04 9:05am - 10:00am 16.unii Introution to Computrs n Prormmin SOLUTIONS to Exmintion /30/0 9:05m - 10:00m Pro. I. Kristin Lunqvist Sprin 00 Grin Stion: Qustion 1 (5) Qustion (15) Qustion 3 (10) Qustion (35) Qustion 5 (10)

More information

Minimum Spanning Trees

Minimum Spanning Trees Minimum Spnning Trs Minimum Spnning Trs Problm A town hs st of houss nd st of rods A rod conncts nd only houss A rod conncting houss u nd v hs rpir cost w(u, v) Gol: Rpir nough (nd no mor) rods such tht:

More information

Instructions for Section 1

Instructions for Section 1 Instructions for Sction 1 Choos th rspons tht is corrct for th qustion. A corrct nswr scors 1, n incorrct nswr scors 0. Mrks will not b dductd for incorrct nswrs. You should ttmpt vry qustion. No mrks

More information

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued...

a b c cat CAT A B C Aa Bb Cc cat cat Lesson 1 (Part 1) Verbal lesson: Capital Letters Make The Same Sound Lesson 1 (Part 1) continued... Progrssiv Printing T.M. CPITLS g 4½+ Th sy, fun (n FR!) wy to tch cpitl lttrs. ook : C o - For Kinrgrtn or First Gr (not for pr-school). - Tchs tht cpitl lttrs mk th sm souns s th littl lttrs. - Tchs th

More information

EE1000 Project 4 Digital Volt Meter

EE1000 Project 4 Digital Volt Meter Ovrviw EE1000 Projt 4 Diitl Volt Mtr In this projt, w mk vi tht n msur volts in th rn o 0 to 4 Volts with on iit o ury. Th input is n nlo volt n th output is sinl 7-smnt iit tht tlls us wht tht input s

More information

Designing finite automata II

Designing finite automata II Designing finite utomt II Prolem: Design DFA A such tht L(A) consists of ll strings of nd which re of length 3n, for n = 0, 1, 2, (1) Determine wht to rememer out the input string Assign stte to ech of

More information

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata

A 4-state solution to the Firing Squad Synchronization Problem based on hybrid rule 60 and 102 cellular automata A 4-stt solution to th Firing Squ Synhroniztion Prolm s on hyri rul 60 n 102 llulr utomt LI Ning 1, LIANG Shi-li 1*, CUI Shung 1, XU Mi-ling 1, ZHANG Ling 2 (1. Dprtmnt o Physis, Northst Norml Univrsity,

More information

Multipoint Alternate Marking method for passive and hybrid performance monitoring

Multipoint Alternate Marking method for passive and hybrid performance monitoring Multipoint Altrnt Mrkin mtho or pssiv n hyri prormn monitorin rt-iool-ippm-multipoint-lt-mrk-00 Pru, Jul 2017, IETF 99 Giuspp Fiool (Tlom Itli) Muro Coilio (Tlom Itli) Amo Spio (Politnio i Torino) Riro

More information

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas

Using the Printable Sticker Function. Using the Edit Screen. Computer. Tablet. ScanNCutCanvas SnNCutCnvs Using th Printl Stikr Funtion On-o--kin stikrs n sily rt y using your inkjt printr n th Dirt Cut untion o th SnNCut mhin. For inormtion on si oprtions o th SnNCutCnvs, rr to th Hlp. To viw th

More information

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk

Announcements. Not graphs. These are Graphs. Applications of Graphs. Graph Definitions. Graphs & Graph Algorithms. A6 released today: Risk Grphs & Grph Algorithms Ltur CS Spring 6 Announmnts A6 rls toy: Risk Strt signing with your prtnr sp Prlim usy Not grphs hs r Grphs K 5 K, =...not th kin w mn, nywy Applitions o Grphs Communition ntworks

More information

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem

5/7/13. Part 10. Graphs. Theorem Theorem Graphs Describing Precedence. Outline. Theorem 10-1: The Handshaking Theorem Thorm 10-1: Th Hnshkin Thorm Lt G=(V,E) n unirt rph. Thn Prt 10. Grphs CS 200 Alorithms n Dt Struturs v V (v) = 2 E How mny s r thr in rph with 10 vrtis h of r six? 10 * 6 /2= 30 1 Thorm 10-2 An unirt

More information

Section 10.4 Connectivity (up to paths and isomorphism, not including)

Section 10.4 Connectivity (up to paths and isomorphism, not including) Toy w will isuss two stions: Stion 10.3 Rprsnting Grphs n Grph Isomorphism Stion 10.4 Conntivity (up to pths n isomorphism, not inluing) 1 10.3 Rprsnting Grphs n Grph Isomorphism Whn w r working on n lgorithm

More information

Outline. Binary Tree

Outline. Binary Tree Outlin Similrity Srh Th Binry Brnh Distn Nikolus Austn nikolus.ustn@s..t Dpt. o Computr Sins Univrsity o Slzur http://rsrh.uni-slzur.t 1 Binry Brnh Distn Binry Rprsnttion o Tr Binry Brnhs Lowr Boun or

More information

Module 2 Motion Instructions

Module 2 Motion Instructions Moul 2 Motion Instrutions CAUTION: Bor you strt this xprimnt, unrstn tht you r xpt to ollow irtions EXPLICITLY! Tk your tim n r th irtions or h stp n or h prt o th xprimnt. You will rquir to ntr t in prtiulr

More information

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1

Chapter Five: Nondeterministic Finite Automata. Formal Language, chapter 5, slide 1 Chpter Five: Nondeterministic Finite Automt Forml Lnguge, chpter 5, slide 1 1 A DFA hs exctly one trnsition from every stte on every symol in the lphet. By relxing this requirement we get relted ut more

More information

RAM Model. I/O Model. Real Machine Example: Nehalem : Algorithms in the Real World 4/9/13

RAM Model. I/O Model. Real Machine Example: Nehalem : Algorithms in the Real World 4/9/13 4//3 RAM Mol 5-853: Algorithms in th Rl Worl Lolity I: Ch-wr lgorithms Introution Sorting List rnking B-trs Bur trs Stnr thortil mol or nlyzing lgorithms: Ininit mmory siz Uniorm ss ost Evlut n lgorithm

More information

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees

5/1/2018. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees. Huffman Coding Trees /1/018 W usully no strns y ssnn -lnt os to ll rtrs n t lpt (or mpl, 8-t on n ASCII). Howvr, rnt rtrs our wt rnt rquns, w n sv mmory n ru trnsmttl tm y usn vrl-lnt non. T s to ssn sortr os to rtrs tt our

More information

Case Study VI Answers PHA 5127 Fall 2006

Case Study VI Answers PHA 5127 Fall 2006 Qustion. A ptint is givn 250 mg immit-rls thophyllin tblt (Tblt A). A wk ltr, th sm ptint is givn 250 mg sustin-rls thophyllin tblt (Tblt B). Th tblts follow on-comprtmntl mol n hv first-orr bsorption

More information

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling.

4.1 Interval Scheduling. Chapter 4. Greedy Algorithms. Interval Scheduling: Greedy Algorithms. Interval Scheduling. Interval scheduling. Cptr 4 4 Intrvl Suln Gry Alortms Sls y Kvn Wyn Copyrt 005 Prson-Ason Wsly All rts rsrv Intrvl Suln Intrvl Suln: Gry Alortms Intrvl suln! Jo strts t s n nss t! Two os omptl ty on't ovrlp! Gol: n mxmum sust

More information

Formal Concept Analysis

Formal Concept Analysis Forml Conpt Anlysis Conpt intnts s losd sts Closur Systms nd Implitions 4 Closur Systms 0.06.005 Nxt-Closur ws dvlopd y B. Gntr (984). Lt M = {,..., n}. A M is ltilly smllr thn B M, if B A if th smllst

More information

CS553 Lecture Register Allocation I 3

CS553 Lecture Register Allocation I 3 Low-Lvl Issus Last ltur Intrproural analysis Toay Start low-lvl issus Rgistr alloation Latr Mor rgistr alloation Instrution shuling CS553 Ltur Rgistr Alloation I 2 Rgistr Alloation Prolm Assign an unoun

More information

Organization. Dominators. Control-flow graphs 8/30/2010. Dominators, control-dependence. Dominator relation of CFGs

Organization. Dominators. Control-flow graphs 8/30/2010. Dominators, control-dependence. Dominator relation of CFGs Orniztion Domintors, ontrol-pnn n SSA orm Domintor rltion o CFGs postomintor rltion Domintor tr Computin omintor rltion n tr Dtlow lorithm Lnur n Trjn lorithm Control-pnn rltion SSA orm Control-low rphs

More information

Let's start with an example:

Let's start with an example: Finite Automt Let's strt with n exmple: Here you see leled circles tht re sttes, nd leled rrows tht re trnsitions. One of the sttes is mrked "strt". One of the sttes hs doule circle; this is terminl stte

More information

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x)

INTEGRALS. Chapter 7. d dx. 7.1 Overview Let d dx F (x) = f (x). Then, we write f ( x) Chptr 7 INTEGRALS 7. Ovrviw 7.. Lt d d F () f (). Thn, w writ f ( ) d F () + C. Ths intgrls r clld indfinit intgrls or gnrl intgrls, C is clld constnt of intgrtion. All ths intgrls diffr y constnt. 7..

More information

N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f

N=4 L=4. Our first non-linear data structure! A graph G consists of two sets G = {V, E} A set of V vertices, or nodes f lulu jwtt pnlton sin towr ounrs hpl lpp lu Our irst non-linr t strutur! rph G onsists o two sts G = {V, E} st o V vrtis, or nos st o E s, rltionships twn nos surph G onsists o sust o th vrtis n s o G jnt

More information

ME 522 PRINCIPLES OF ROBOTICS. FIRST MIDTERM EXAMINATION April 19, M. Kemal Özgören

ME 522 PRINCIPLES OF ROBOTICS. FIRST MIDTERM EXAMINATION April 19, M. Kemal Özgören ME 522 PINCIPLES OF OBOTICS FIST MIDTEM EXAMINATION April 9, 202 Nm Lst Nm M. Kml Özgörn 2 4 60 40 40 0 80 250 USEFUL FOMULAS cos( ) cos cos sin sin sin( ) sin cos cos sin sin y/ r, cos x/ r, r 0 tn 2(

More information

Convert the NFA into DFA

Convert the NFA into DFA Convert the NF into F For ech NF we cn find F ccepting the sme lnguge. The numer of sttes of the F could e exponentil in the numer of sttes of the NF, ut in prctice this worst cse occurs rrely. lgorithm:

More information