The Shortest Path Problem Graph Algorithms - 3

Size: px
Start display at page:

Download "The Shortest Path Problem Graph Algorithms - 3"

Transcription

1 Algorithm Deign nd Anli Vitor Admhik C - pring Leture Feb, Crnegie Mellon Univerit The hortet Pth Problem Grph Algorithm - The hortet Pth Problem Given poitivel weighted grph G with oure verte, find the hortet pth from to ll other vertie in the grph Greed pproh When lgorithm proeed ll vertie re divided into two group - vertie whoe hortet pth from the oure i known - vertie whoe hortet pth from the oure i NOT known Move vertie (hortet ditne) one t time from the unknown et to the known et. Mintin PQ of ditne from the oure to verte. The hortet Pth Problem Compleit O (V Log V + E log V) Let D(v) denote length from the oure to verte v. We tore ditne D(v) in PQ. O(V) INIT: D() = ; D(v)= PQ h V vertie LOOP: O(log V) Delete node v from PQ uing deletemin() Updte D(w) for ll w in dj(v) uing dereeke() O(log V) We do O(E) updte D(w) = min[d(w), D(v) + (v, w)]

2 PQ i liner rr Aume tht unorted rr i ued inted of priorit queue. Wht would the lgorithm' running time in thi e? findmin tke O(V) - for one verte findmin tke O(V ) - for ll vertie Updting tke O() - for one edge totl edge djutment O(E) the lgorithm running time O(E + V ) Wh Dijktr lgorithm doe not work on grph with negtive weight? The ellmn-ford lgorithm (98) A repet V - time: for ll e in E: updte(e) -9 The ellmn-ford Algorithm for (k = ; k < V; k++) dit[k] = INFINITY; Queue q = new Queue(); dit[] = ; q.enqueue(); while (!q.iempt()) { v = q.dequeue(); for eh w in dj(v) do if (dit[w] > dit[v] + weight[v,w]) { dit[w] = dit[v] + weight[v,w]; if (!q.iinqueue(w)) q.enqueue(w); }} Wht i the wort-e ompleit of the ellmn-ford lgorithm? for (k = ; k < V; k++) dit[k] = INFINITY; Queue q = new Queue(); V dit[] = ; q.enqueue(); while (!q.iempt()) { v = q.dequeue(); E for eh w in dj(v) do if (dit[w] > dit[v] + weight[v,w]) { dit[w] = dit[v] + weight[v,w]; if (!q.iinqueue(w)) q.enqueue(w); }} O(V E)

3 Grph with negtive le? A How would ou ppl the ellmn-ford lgorithm to find out if grph h negtive le? -9 How would ou ppl the ellmn- Ford lgorithm to find out if grph h negtive le? Do not top fter V- itertion, perform one more round. If there i uh le, then ome ditne will be redued ellmn-ford Dnmi progrmming pproh We will be ounting the number of edge in the hortet pth Dnmi progrmming pproh For eh node, find the length of the hortet pth to t tht ue t mot edge, or write down if there i no uh pth. uppoe for ll v we hve olved for length of the hortet pth to t tht ue k or fewer edge. How n we ue thi to olve for the hortet pth tht ue k or fewer edge? We go to ome neighbor of v, nd then tke the hortet pth from to t tht ue k or fewer edge. All-Pir hortet Pth (APP) Given weighted grph, find hortet pth from n verte to n other verte. Note, no ditinguihed verte All-Pir hortet Pth One pproh: run Dijktr' lgorithm uing ever verte oure. Compleit: O(V E Log V) pre: O(V Log V) dene: O(V Log V) ut wht bout negtive weight

4 APP: ellmn-ford APP : Dnmi progrmming pproh Compleit : O(V E) Flod-Wrhll, O(V ) Note, for dene grph we hve O(V ). We won t diu it APP: Johnon lgorithm Compleit: O(V E + V E log V) for dene grph -- O(V log V). Johnon Algorithm It improve the runtime onl when grph h negtive weight. A bird view: - Reweight the grph, o ll weight re nonnegtive (b running ellmn-ford ) - Run Dijktr on ll vertie for pre grph -- O(V log V). Compleit: O(V E + V E log V) Johnon Algorithm: intuition Wrong reweighting (dding the fi mount) The w to improve the runtime i to run Dijktr from eh verte. A ut Dijktr doe not work on negtive edge. o wht bout if we hnge the edge weight to be nonnegtive? We hve to be reful on hnging the edge weight to preerve the hortet pth - C The tul hortet pth to i --C- Let u dd to ll edge

5 Wrong reweighting (dding the fi mount) A Adding the fi mount doe not work, ine ever hortet pth h different number of edge C hortet pth to i -A- Johnon Algorithm: reweighting Ever edge (v, u) with the ot w(v, u) i repled b where p(v) will be deided lter. w * (v, u) = + (-) = - v p(v)=- w(v, u) = u p(u)= Johnon Algorithm: reweighting Theorem. All pth between the me two vertie re reweighted b the me mount. Proof. Conider pth v = v v v n = u Then we hve w * (v,u) = w * (v, v ) + + w * (v n-, v n ) = w(v, v ) + p(v ) p(v ) + w(v, v ) + p(v ) p(v ) + Teleoping um Johnon reweighting hnge n pth between u nd v b the me mount nd therefore preerve the hortet pth unhnged Find verte lbeling P(v) Firt we need to rete new verte nd onnet it to ll other vertie with zero weight. Note thi hnge in the grph won t hnge the hortet ditne between vertie. - - b - z -

6 Running P Net we run ellmn-ford trting t verte. hortet Pth - i -b i - - i - nd o on b - z - Now we define p(v) the hortet ditne -v. - - Johnon Reweighting Here we redrw the emple b uing Edge (,b): -+-(-) = Edge (b,): -+(-)-(-) = Edge (z,): +-(-) = b - z - - New grph After Johnon reweighting we get new grph with non-negtive weight. Remember, Johnon reweighting preerve the hortet pth. Now we n ue Dijktr z b Johnon Algorithm: reweighting Theorem. After reweighting ever edge h nonnegtive ot. Proof. Conider edge (v, u) p(v) i the hortet ditne from to v p(u) i the hortet ditne from to u p(u) p(v) + w(v, u) v u ine the hortet pth -u nnot be longer then p(v) + (v, u). QED Johnon Algorithm. Add new verte nd onnet it with ll other vertie.. Run ellmn-ford lgorithm from to ompute p(v). Note tht ellmn-ford lgorithm will orretl report if the originl grph h negtive ot le.. Reweight ll edge: w * (v,u) =w(v,u)+p(v) p(u). Run Dijktr lgorithm from ll vertie. Compute the tul ditne b ubtrting p(v) p(u) Compleit. Add new verte nd onnet it with ll other vertie.. Run ellmn-ford lgorithm from to ompute p(v). O(V) O(V E). Reweight ll edge: w * (v,u) =w(v,u)+p(v) p(u) O(E). Run Dijktr lgorithm from ll vertie O(V E log V). Compute the tul ditne b ubtrting p(v) p(u) O(E) Totl: O(V E log V)

7 Johnon Algorithm It hine for pre grph with negtive edge O(V log V) etter thn Flod-Wrhll, whih i O(V ) 7

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours

Mid-Term Examination - Spring 2014 Mathematical Programming with Applications to Economics Total Score: 45; Time: 3 hours Mi-Term Exmintion - Spring 0 Mthemtil Progrmming with Applitions to Eonomis Totl Sore: 5; Time: hours. Let G = (N, E) e irete grph. Define the inegree of vertex i N s the numer of eges tht re oming into

More information

MATH4455 Module 10 Evens, Odds and Ends

MATH4455 Module 10 Evens, Odds and Ends MATH4455 Module 10 Even, Odd nd End Min Mth Conept: Prity, Ple Vlue Nottion, Enumertion, Story Prolem Auxiliry Ide: Tournment, Undireted grph I. The Mind-Reding Clultor Prolem. How doe the mind-reding

More information

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18

Global alignment. Genome Rearrangements Finding preserved genes. Lecture 18 Computt onl Biology Leture 18 Genome Rerrngements Finding preserved genes We hve seen before how to rerrnge genome to obtin nother one bsed on: Reversls Knowledge of preserved bloks (or genes) Now we re

More information

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides.

1 PYTHAGORAS THEOREM 1. Given a right angled triangle, the square of the hypotenuse is equal to the sum of the squares of the other two sides. 1 PYTHAGORAS THEOREM 1 1 Pythgors Theorem In this setion we will present geometri proof of the fmous theorem of Pythgors. Given right ngled tringle, the squre of the hypotenuse is equl to the sum of the

More information

SIMPLE NONLINEAR GRAPHS

SIMPLE NONLINEAR GRAPHS S i m p l e N o n l i n e r G r p h s SIMPLE NONLINEAR GRAPHS www.mthletis.om.u Simple SIMPLE Nonliner NONLINEAR Grphs GRAPHS Liner equtions hve the form = m+ where the power of (n ) is lws. The re lle

More information

] dx (3) = [15x] 2 0

] dx (3) = [15x] 2 0 Leture 6. Double Integrls nd Volume on etngle Welome to Cl IV!!!! These notes re designed to be redble nd desribe the w I will eplin the mteril in lss. Hopefull the re thorough, but it s good ide to hve

More information

Artificial Intelligence Markov Decision Problems

Artificial Intelligence Markov Decision Problems rtificil Intelligence Mrkov eciion Problem ilon - briefly mentioned in hpter Ruell nd orvig - hpter 7 Mrkov eciion Problem; pge of Mrkov eciion Problem; pge of exmple: probbilitic blockworld ction outcome

More information

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points.

a) Read over steps (1)- (4) below and sketch the path of the cycle on a P V plot on the graph below. Label all appropriate points. Prole 3: Crnot Cyle of n Idel Gs In this prole, the strting pressure P nd volue of n idel gs in stte, re given he rtio R = / > of the volues of the sttes nd is given Finlly onstnt γ = 5/3 is given You

More information

PHYSICS 211 MIDTERM I 22 October 2003

PHYSICS 211 MIDTERM I 22 October 2003 PHYSICS MIDTERM I October 3 Exm i cloed book, cloed note. Ue onl our formul heet. Write ll work nd nwer in exm booklet. The bck of pge will not be grded unle ou o requet on the front of the pge. Show ll

More information

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs

Counting Paths Between Vertices. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs. Isomorphism of Graphs Isomorphism of Grphs Definition The simple grphs G 1 = (V 1, E 1 ) n G = (V, E ) re isomorphi if there is ijetion (n oneto-one n onto funtion) f from V 1 to V with the property tht n re jent in G 1 if

More information

CSCI565 - Compiler Design

CSCI565 - Compiler Design CSCI565 - Compiler Deign Spring 6 Due Dte: Fe. 5, 6 t : PM in Cl Prolem [ point]: Regulr Expreion nd Finite Automt Develop regulr expreion (RE) tht detet the longet tring over the lphet {-} with the following

More information

CS 347 Parallel and Distributed Data Processing

CS 347 Parallel and Distributed Data Processing CS 347 Prllel nd Distriuted Dt Proessing Spring 06 Network Prtitions Susets of nodes m e isolted or nodes m e slow in responding Notes 8: Network Prtitions CS 347 Notes 8 Network Prtitions Cuses ired network

More information

Exercise sheet 6: Solutions

Exercise sheet 6: Solutions Eerise sheet 6: Solutions Cvet emptor: These re merel etended hints, rther thn omplete solutions. 1. If grph G hs hromti numer k > 1, prove tht its verte set n e prtitioned into two nonempt sets V 1 nd

More information

The Double Integral. The Riemann sum of a function f (x; y) over this partition of [a; b] [c; d] is. f (r j ; t k ) x j y k

The Double Integral. The Riemann sum of a function f (x; y) over this partition of [a; b] [c; d] is. f (r j ; t k ) x j y k The Double Integrl De nition of the Integrl Iterted integrls re used primrily s tool for omputing double integrls, where double integrl is n integrl of f (; y) over region : In this setion, we de ne double

More information

CISC 320 Introduction to Algorithms Spring 2014

CISC 320 Introduction to Algorithms Spring 2014 CISC 20 Introdution to Algorithms Spring 2014 Leture 9 Red-Blk Trees Courtes of Prof. Lio Li 1 Binr Serh Trees (BST) ke[x]: ke stored t x. left[x]: pointer to left hild of x. right[x]: pointer to right

More information

Section The Precise Definition Of A Limit

Section The Precise Definition Of A Limit Section 2.4 - The Precise Definition Of A imit Introduction So fr we hve tken n intuitive pproch to the concept of limit. In this section we will stte the forml definition nd use this definition to prove

More information

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106

18.06 Problem Set 4 Due Wednesday, Oct. 11, 2006 at 4:00 p.m. in 2-106 8. Problem Set Due Wenesy, Ot., t : p.m. in - Problem Mony / Consier the eight vetors 5, 5, 5,..., () List ll of the one-element, linerly epenent sets forme from these. (b) Wht re the two-element, linerly

More information

Prefix-Free Regular-Expression Matching

Prefix-Free Regular-Expression Matching Prefix-Free Regulr-Expression Mthing Yo-Su Hn, Yjun Wng nd Derik Wood Deprtment of Computer Siene HKUST Prefix-Free Regulr-Expression Mthing p.1/15 Pttern Mthing Given pttern P nd text T, find ll sustrings

More information

AQA Further Pure 2. Hyperbolic Functions. Section 2: The inverse hyperbolic functions

AQA Further Pure 2. Hyperbolic Functions. Section 2: The inverse hyperbolic functions Hperbolic Functions Section : The inverse hperbolic functions Notes nd Emples These notes contin subsections on The inverse hperbolic functions Integrtion using the inverse hperbolic functions Logrithmic

More information

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite!

Solutions for HW9. Bipartite: put the red vertices in V 1 and the black in V 2. Not bipartite! Solutions for HW9 Exerise 28. () Drw C 6, W 6 K 6, n K 5,3. C 6 : W 6 : K 6 : K 5,3 : () Whih of the following re iprtite? Justify your nswer. Biprtite: put the re verties in V 1 n the lk in V 2. Biprtite:

More information

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example

Connectivity in Graphs. CS311H: Discrete Mathematics. Graph Theory II. Example. Paths. Connectedness. Example Connetiit in Grphs CSH: Disrete Mthemtis Grph Theor II Instrtor: Işıl Dillig Tpil qestion: Is it possile to get from some noe to nother noe? Emple: Trin netork if there is pth from to, possile to tke trin

More information

AVL Trees. D Oisín Kidney. August 2, 2018

AVL Trees. D Oisín Kidney. August 2, 2018 AVL Trees D Oisín Kidne August 2, 2018 Astrt This is verified implementtion of AVL trees in Agd, tking ides primril from Conor MBride s pper How to Keep Your Neighours in Order [2] nd the Agd stndrd lirr

More information

Project 6: Minigoals Towards Simplifying and Rewriting Expressions

Project 6: Minigoals Towards Simplifying and Rewriting Expressions MAT 51 Wldis Projet 6: Minigols Towrds Simplifying nd Rewriting Expressions The distriutive property nd like terms You hve proly lerned in previous lsses out dding like terms ut one prolem with the wy

More information

CS 491G Combinatorial Optimization Lecture Notes

CS 491G Combinatorial Optimization Lecture Notes CS 491G Comintoril Optimiztion Leture Notes Dvi Owen July 30, August 1 1 Mthings Figure 1: two possile mthings in simple grph. Definition 1 Given grph G = V, E, mthing is olletion of eges M suh tht e i,

More information

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4.

Tutorial Worksheet. 1. Find all solutions to the linear system by following the given steps. x + 2y + 3z = 2 2x + 3y + z = 4. Mth 5 Tutoril Week 1 - Jnury 1 1 Nme Setion Tutoril Worksheet 1. Find ll solutions to the liner system by following the given steps x + y + z = x + y + z = 4. y + z = Step 1. Write down the rgumented mtrix

More information

Algebra Readiness PLACEMENT 1 Fraction Basics 2 Percent Basics 3. Algebra Basics 9. CRS Algebra 1

Algebra Readiness PLACEMENT 1 Fraction Basics 2 Percent Basics 3. Algebra Basics 9. CRS Algebra 1 Algebr Rediness PLACEMENT Frction Bsics Percent Bsics Algebr Bsics CRS Algebr CRS - Algebr Comprehensive Pre-Post Assessment CRS - Algebr Comprehensive Midterm Assessment Algebr Bsics CRS - Algebr Quik-Piks

More information

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of:

22: Union Find. CS 473u - Algorithms - Spring April 14, We want to maintain a collection of sets, under the operations of: 22: Union Fin CS 473u - Algorithms - Spring 2005 April 14, 2005 1 Union-Fin We wnt to mintin olletion of sets, uner the opertions of: 1. MkeSet(x) - rete set tht ontins the single element x. 2. Fin(x)

More information

Precalculus Due Tuesday/Wednesday, Sept. 12/13th Mr. Zawolo with questions.

Precalculus Due Tuesday/Wednesday, Sept. 12/13th  Mr. Zawolo with questions. Preclculus Due Tuesd/Wednesd, Sept. /th Emil Mr. Zwolo (isc.zwolo@psv.us) with questions. 6 Sketch the grph of f : 7! nd its inverse function f (). FUNCTIONS (Chpter ) 6 7 Show tht f : 7! hs n inverse

More information

SECTION A STUDENT MATERIAL. Part 1. What and Why.?

SECTION A STUDENT MATERIAL. Part 1. What and Why.? SECTION A STUDENT MATERIAL Prt Wht nd Wh.? Student Mteril Prt Prolem n > 0 n > 0 Is the onverse true? Prolem If n is even then n is even. If n is even then n is even. Wht nd Wh? Eploring Pure Mths Are

More information

Arrow s Impossibility Theorem

Arrow s Impossibility Theorem Rep Voting Prdoxes Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Voting Prdoxes Properties Arrow s Theorem Leture Overview 1 Rep

More information

CIT 596 Theory of Computation 1. Graphs and Digraphs

CIT 596 Theory of Computation 1. Graphs and Digraphs CIT 596 Theory of Computtion 1 A grph G = (V (G), E(G)) onsists of two finite sets: V (G), the vertex set of the grph, often enote y just V, whih is nonempty set of elements lle verties, n E(G), the ege

More information

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA

Common intervals of genomes. Mathieu Raffinot CNRS LIAFA Common intervls of genomes Mthieu Rffinot CNRS LIF Context: omprtive genomis. set of genomes prtilly/totlly nnotte Informtive group of genes or omins? Ex: COG tse Mny iffiulties! iology Wht re two similr

More information

Unit 2 Exponents Study Guide

Unit 2 Exponents Study Guide Unit Eponents Stud Guide 7. Integer Eponents Prt : Zero Eponents Algeric Definition: 0 where cn e n non-zero vlue 0 ecuse 0 rised to n power less thn or equl to zero is n undefined vlue. Eple: 0 If ou

More information

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition

Data Structures LECTURE 10. Huffman coding. Example. Coding: problem definition Dt Strutures, Spring 24 L. Joskowiz Dt Strutures LEURE Humn oing Motivtion Uniquel eipherle oes Prei oes Humn oe onstrution Etensions n pplitions hpter 6.3 pp 385 392 in tetook Motivtion Suppose we wnt

More information

CS 188: Artificial Intelligence Spring 2007

CS 188: Artificial Intelligence Spring 2007 CS 188: Artificil Intelligence Spring 2007 Lecture 3: Queue-Bsed Serch 1/23/2007 Srini Nrynn UC Berkeley Mny slides over the course dpted from Dn Klein, Sturt Russell or Andrew Moore Announcements Assignment

More information

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4

CSE 332. Sorting. Data Abstractions. CSE 332: Data Abstractions. QuickSort Cutoff 1. Where We Are 2. Bounding The MAXIMUM Problem 4 Am Blnk Leture 13 Winter 2016 CSE 332 CSE 332: Dt Astrtions Sorting Dt Astrtions QuikSort Cutoff 1 Where We Are 2 For smll n, the reursion is wste. The onstnts on quik/merge sort re higher thn the ones

More information

Physics 111. Lecture 11 (Walker: 6.1-2) Friction Forces. Frictional Forces. Microscopic Friction. Friction vs. Area

Physics 111. Lecture 11 (Walker: 6.1-2) Friction Forces. Frictional Forces. Microscopic Friction. Friction vs. Area Phyi 111 Leture 11 (Wler: 6.1-2) rition ore ritionl ore rition h it bi in urfe tht re not ompletely mooth: September 25, 2009 Leture 11 1/28 Leture 11 2/28 Surfe Roughne Miroopi rition Adheion rition v.

More information

Green s Theorem. (2x e y ) da. (2x e y ) dx dy. x 2 xe y. (1 e y ) dy. y=1. = y e y. y=0. = 2 e

Green s Theorem. (2x e y ) da. (2x e y ) dx dy. x 2 xe y. (1 e y ) dy. y=1. = y e y. y=0. = 2 e Green s Theorem. Let be the boundry of the unit squre, y, oriented ounterlokwise, nd let F be the vetor field F, y e y +, 2 y. Find F d r. Solution. Let s write P, y e y + nd Q, y 2 y, so tht F P, Q. Let

More information

Applications of Definite Integral

Applications of Definite Integral Chpter 5 Applitions of Definite Integrl 5.1 Are Between Two Curves In this setion we use integrls to find res of regions tht lie between the grphs of two funtions. Consider the region tht lies between

More information

April 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then.

April 8, 2017 Math 9. Geometry. Solving vector problems. Problem. Prove that if vectors and satisfy, then. pril 8, 2017 Mth 9 Geometry Solving vetor prolems Prolem Prove tht if vetors nd stisfy, then Solution 1 onsider the vetor ddition prllelogrm shown in the Figure Sine its digonls hve equl length,, the prllelogrm

More information

GM1 Consolidation Worksheet

GM1 Consolidation Worksheet Cmridge Essentils Mthemtis Core 8 GM1 Consolidtion Worksheet GM1 Consolidtion Worksheet 1 Clulte the size of eh ngle mrked y letter. Give resons for your nswers. or exmple, ngles on stright line dd up

More information

Languages & Automata

Languages & Automata Lnguges & Automt Dr. Lim Nughton Lnguges A lnguge is sed on n lphet which is finite set of smols such s {, } or {, } or {,..., z}. If Σ is n lphet, string over Σ is finite sequence of letters from Σ, (strings

More information

4. UNBALANCED 3 FAULTS

4. UNBALANCED 3 FAULTS 4. UNBALANCED AULTS So fr: we hve tudied lned fult ut unlned fult re more ommon. Need: to nlye unlned ytem. Could: nlye three-wire ytem V n V n V n Mot ommon fult type = ingle-phe to ground i.e. write

More information

Solutions to assignment 3

Solutions to assignment 3 D Sruure n Algorihm FR 6. Informik Sner, Telikeplli WS 03/04 hp://www.mpi-.mpg.e/~ner/oure/lg03/inex.hml Soluion o ignmen 3 Exerie Arirge i he ue of irepnie in urreny exhnge re o rnform one uni of urreny

More information

Tutorial 2 Euler Lagrange ( ) ( ) In one sentence: d dx

Tutorial 2 Euler Lagrange ( ) ( ) In one sentence: d dx Tutoril 2 Euler Lgrnge In one entene: d Fy = F d Importnt ft: ) The olution of EL eqution i lled eterml. 2) Minmum / Mimum of the "Mot Simple prolem" i lo n eterml. 3) It i eier to olve EL nd hek if we

More information

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/

Running an NFA & the subset algorithm (NFA->DFA) CS 350 Fall 2018 gilray.org/classes/fall2018/cs350/ Running n NFA & the suset lgorithm (NFA->DFA) CS 350 Fll 2018 gilry.org/lsses/fll2018/s350/ 1 NFAs operte y simultneously exploring ll pths nd epting if ny pth termintes t n ept stte.!2 Try n exmple: L

More information

CS 573 Automata Theory and Formal Languages

CS 573 Automata Theory and Formal Languages Non-determinism Automt Theory nd Forml Lnguges Professor Leslie Lnder Leture # 3 Septemer 6, 2 To hieve our gol, we need the onept of Non-deterministi Finite Automton with -moves (NFA) An NFA is tuple

More information

Nondeterministic Finite Automata

Nondeterministic Finite Automata Nondeterministi Finite utomt The Power of Guessing Tuesdy, Otoer 4, 2 Reding: Sipser.2 (first prt); Stoughton 3.3 3.5 S235 Lnguges nd utomt eprtment of omputer Siene Wellesley ollege Finite utomton (F)

More information

1. Extend QR downwards to meet the x-axis at U(6, 0). y

1. Extend QR downwards to meet the x-axis at U(6, 0). y In the digrm, two stright lines re to be drwn through so tht the lines divide the figure OPQRST into pieces of equl re Find the sum of the slopes of the lines R(6, ) S(, ) T(, 0) Determine ll liner functions

More information

NON-DETERMINISTIC FSA

NON-DETERMINISTIC FSA Tw o types of non-determinism: NON-DETERMINISTIC FS () Multiple strt-sttes; strt-sttes S Q. The lnguge L(M) ={x:x tkes M from some strt-stte to some finl-stte nd ll of x is proessed}. The string x = is

More information

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points:

Algorithms & Data Structures Homework 8 HS 18 Exercise Class (Room & TA): Submitted by: Peer Feedback by: Points: Eidgenössishe Tehnishe Hohshule Zürih Eole polytehnique fédérle de Zurih Politenio federle di Zurigo Federl Institute of Tehnology t Zurih Deprtement of Computer Siene. Novemer 0 Mrkus Püshel, Dvid Steurer

More information

20.2. The Transform and its Inverse. Introduction. Prerequisites. Learning Outcomes

20.2. The Transform and its Inverse. Introduction. Prerequisites. Learning Outcomes The Trnform nd it Invere 2.2 Introduction In thi Section we formlly introduce the Lplce trnform. The trnform i only pplied to cul function which were introduced in Section 2.1. We find the Lplce trnform

More information

Project 3: Using Identities to Rewrite Expressions

Project 3: Using Identities to Rewrite Expressions MAT 5 Projet 3: Usig Idetities to Rewrite Expressios Wldis I lger, equtios tht desrie properties or ptters re ofte lled idetities. Idetities desrie expressio e repled with equl or equivlet expressio tht

More information

H (2a, a) (u 2a) 2 (E) Show that u v 4a. Explain why this implies that u v 4a, with equality if and only u a if u v 2a.

H (2a, a) (u 2a) 2 (E) Show that u v 4a. Explain why this implies that u v 4a, with equality if and only u a if u v 2a. Chpter Review 89 IGURE ol hord GH of the prol 4. G u v H (, ) (A) Use the distne formul to show tht u. (B) Show tht G nd H lie on the line m, where m ( )/( ). (C) Solve m for nd sustitute in 4, otining

More information

Transfer Functions. Chapter 5. Transfer Functions. Derivation of a Transfer Function. Transfer Functions

Transfer Functions. Chapter 5. Transfer Functions. Derivation of a Transfer Function. Transfer Functions 5/4/6 PM : Trnfer Function Chpter 5 Trnfer Function Defined G() = Y()/U() preent normlized model of proce, i.e., cn be ued with n input. Y() nd U() re both written in devition vrible form. The form of

More information

The Ellipse. is larger than the other.

The Ellipse. is larger than the other. The Ellipse Appolonius of Perg (5 B.C.) disovered tht interseting right irulr one ll the w through with plne slnted ut is not perpendiulr to the is, the intersetion provides resulting urve (oni setion)

More information

8.3 THE HYPERBOLA OBJECTIVES

8.3 THE HYPERBOLA OBJECTIVES 8.3 THE HYPERBOLA OBJECTIVES 1. Define Hperol. Find the Stndrd Form of the Eqution of Hperol 3. Find the Trnsverse Ais 4. Find the Eentriit of Hperol 5. Find the Asmptotes of Hperol 6. Grph Hperol HPERBOLAS

More information

Lecture 6: Coding theory

Lecture 6: Coding theory Leture 6: Coing theory Biology 429 Crl Bergstrom Ferury 4, 2008 Soures: This leture loosely follows Cover n Thoms Chpter 5 n Yeung Chpter 3. As usul, some of the text n equtions re tken iretly from those

More information

A recursive construction of efficiently decodable list-disjunct matrices

A recursive construction of efficiently decodable list-disjunct matrices CSE 709: Compressed Sensing nd Group Testing. Prt I Lecturers: Hung Q. Ngo nd Atri Rudr SUNY t Bufflo, Fll 2011 Lst updte: October 13, 2011 A recursive construction of efficiently decodble list-disjunct

More information

12.4 Similarity in Right Triangles

12.4 Similarity in Right Triangles Nme lss Dte 12.4 Similrit in Right Tringles Essentil Question: How does the ltitude to the hpotenuse of right tringle help ou use similr right tringles to solve prolems? Eplore Identifing Similrit in Right

More information

Applications of Definite Integral

Applications of Definite Integral Chpter 5 Applitions of Definite Integrl 5.1 Are Between Two Curves In this setion we use integrls to find res of regions tht lie between the grphs of two funtions. Consider the region tht lies between

More information

These slides are from 2014 and contain a semi-serious error at one point in the

These slides are from 2014 and contain a semi-serious error at one point in the Hello Internet! Hello Internet! These slides re rom 2014 nd ontin semi-serious error t one point in the These slides re rom 2014 nd ontin semi-serious error t one point in the presenttion. For more up-to-dte

More information

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved.

Calculus Module C21. Areas by Integration. Copyright This publication The Northern Alberta Institute of Technology All Rights Reserved. Clculus Module C Ares Integrtion Copright This puliction The Northern Alert Institute of Technolog 7. All Rights Reserved. LAST REVISED Mrch, 9 Introduction to Ares Integrtion Sttement of Prerequisite

More information

Chapter 4 State-Space Planning

Chapter 4 State-Space Planning Leture slides for Automted Plnning: Theory nd Prtie Chpter 4 Stte-Spe Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Motivtion Nerly ll plnning proedures re serh proedures Different

More information

1. Twelve less than five times a number is thirty three. What is the number

1. Twelve less than five times a number is thirty three. What is the number Alger 00 Midterm Review Nme: Dte: Directions: For the following prolems, on SEPARATE PIECE OF PAPER; Define the unknown vrile Set up n eqution (Include sketch/chrt if necessr) Solve nd show work Answer

More information

CSC 373: Algorithm Design and Analysis Lecture 9

CSC 373: Algorithm Design and Analysis Lecture 9 CSC 373: Algorihm Deign n Anlyi Leure 9 Alln Boroin Jnury 28, 2013 1 / 16 Leure 9: Announemen n Ouline Announemen Prolem e 1 ue hi Friy. Term Te 1 will e hel nex Mony, Fe in he uoril. Two nnounemen o follow

More information

Arrow s Impossibility Theorem

Arrow s Impossibility Theorem Rep Fun Gme Properties Arrow s Theorem Arrow s Impossiility Theorem Leture 12 Arrow s Impossiility Theorem Leture 12, Slide 1 Rep Fun Gme Properties Arrow s Theorem Leture Overview 1 Rep 2 Fun Gme 3 Properties

More information

Nondeterminism and Nodeterministic Automata

Nondeterminism and Nodeterministic Automata Nondeterminism nd Nodeterministic Automt 61 Nondeterminism nd Nondeterministic Automt The computtionl mchine models tht we lerned in the clss re deterministic in the sense tht the next move is uniquely

More information

Myriad of applications

Myriad of applications Shortet Path Myriad of application Finding hortet ditance between location (Google map, etc.) Internet router protocol: OSPF (Open Shortet Path Firt) i ued to find the hortet path to interchange package

More information

Reference : Croft & Davison, Chapter 12, Blocks 1,2. A matrix ti is a rectangular array or block of numbers usually enclosed in brackets.

Reference : Croft & Davison, Chapter 12, Blocks 1,2. A matrix ti is a rectangular array or block of numbers usually enclosed in brackets. I MATRIX ALGEBRA INTRODUCTION TO MATRICES Referene : Croft & Dvison, Chpter, Blos, A mtri ti is retngulr rr or lo of numers usull enlosed in rets. A m n mtri hs m rows nd n olumns. Mtri Alger Pge If the

More information

We will see what is meant by standard form very shortly

We will see what is meant by standard form very shortly THEOREM: For fesible liner progrm in its stndrd form, the optimum vlue of the objective over its nonempty fesible region is () either unbounded or (b) is chievble t lest t one extreme point of the fesible

More information

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms

Preview 11/1/2017. Greedy Algorithms. Coin Change. Coin Change. Coin Change. Coin Change. Greedy algorithms. Greedy Algorithms Preview Greed Algorithms Greed Algorithms Coin Chnge Huffmn Code Greed lgorithms end to e simple nd strightforwrd. Are often used to solve optimiztion prolems. Alws mke the choice tht looks est t the moment,

More information

Section 1.3 Triangles

Section 1.3 Triangles Se 1.3 Tringles 21 Setion 1.3 Tringles LELING TRINGLE The line segments tht form tringle re lled the sides of the tringle. Eh pir of sides forms n ngle, lled n interior ngle, nd eh tringle hs three interior

More information

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh

Computational Biology Lecture 18: Genome rearrangements, finding maximal matches Saad Mneimneh Computtionl Biology Leture 8: Genome rerrngements, finding miml mthes Sd Mneimneh We hve seen how to rerrnge genome to otin nother one sed on reversls nd the knowledge of the preserved loks or genes. Now

More information

Adding and Subtracting Rational Expressions

Adding and Subtracting Rational Expressions 6.4 Adding nd Subtrcting Rtionl Epressions Essentil Question How cn you determine the domin of the sum or difference of two rtionl epressions? You cn dd nd subtrct rtionl epressions in much the sme wy

More information

50 AMC Lectures Problem Book 2 (36) Substitution Method

50 AMC Lectures Problem Book 2 (36) Substitution Method 0 AMC Letures Prolem Book Sustitution Metho PROBLEMS Prolem : Solve for rel : 9 + 99 + 9 = Prolem : Solve for rel : 0 9 8 8 Prolem : Show tht if 8 Prolem : Show tht + + if rel numers,, n stisf + + = Prolem

More information

A-Level Mathematics Transition Task (compulsory for all maths students and all further maths student)

A-Level Mathematics Transition Task (compulsory for all maths students and all further maths student) A-Level Mthemtics Trnsition Tsk (compulsory for ll mths students nd ll further mths student) Due: st Lesson of the yer. Length: - hours work (depending on prior knowledge) This trnsition tsk provides revision

More information

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4

Data Compression Techniques (Spring 2012) Model Solutions for Exercise 4 58487 Dt Compressio Tehiques (Sprig 0) Moel Solutios for Exerise 4 If you hve y fee or orretios, plese ott jro.lo t s.helsii.fi.. Prolem: Let T = Σ = {,,, }. Eoe T usig ptive Huffm oig. Solutio: R 4 U

More information

Core 2 Logarithms and exponentials. Section 1: Introduction to logarithms

Core 2 Logarithms and exponentials. Section 1: Introduction to logarithms Core Logrithms nd eponentils Setion : Introdution to logrithms Notes nd Emples These notes ontin subsetions on Indies nd logrithms The lws of logrithms Eponentil funtions This is n emple resoure from MEI

More information

GRAND PLAN. Visualizing Quaternions. I: Fundamentals of Quaternions. Andrew J. Hanson. II: Visualizing Quaternion Geometry. III: Quaternion Frames

GRAND PLAN. Visualizing Quaternions. I: Fundamentals of Quaternions. Andrew J. Hanson. II: Visualizing Quaternion Geometry. III: Quaternion Frames Visuliing Quternions Andrew J. Hnson Computer Siene Deprtment Indin Universit Siggrph Tutoril GRAND PLAN I: Fundmentls of Quternions II: Visuliing Quternion Geometr III: Quternion Frmes IV: Clifford Algers

More information

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6

CS311 Computational Structures Regular Languages and Regular Grammars. Lecture 6 CS311 Computtionl Strutures Regulr Lnguges nd Regulr Grmmrs Leture 6 1 Wht we know so fr: RLs re losed under produt, union nd * Every RL n e written s RE, nd every RE represents RL Every RL n e reognized

More information

Logarithms. Logarithm is another word for an index or power. POWER. 2 is the power to which the base 10 must be raised to give 100.

Logarithms. Logarithm is another word for an index or power. POWER. 2 is the power to which the base 10 must be raised to give 100. Logrithms. Logrithm is nother word for n inde or power. THIS IS A POWER STATEMENT BASE POWER FOR EXAMPLE : We lred know tht; = NUMBER 10² = 100 This is the POWER Sttement OR 2 is the power to which the

More information

( ) 1. 1) Let f( x ) = 10 5x. Find and simplify f( 2) and then state the domain of f(x).

( ) 1. 1) Let f( x ) = 10 5x. Find and simplify f( 2) and then state the domain of f(x). Mth 15 Fettermn/DeSmet Gustfson/Finl Em Review 1) Let f( ) = 10 5. Find nd simplif f( ) nd then stte the domin of f(). ) Let f( ) = +. Find nd simplif f(1) nd then stte the domin of f(). ) Let f( ) = 8.

More information

Introduction to Algebra - Part 2

Introduction to Algebra - Part 2 Alger Module A Introduction to Alger - Prt Copright This puliction The Northern Alert Institute of Technolog 00. All Rights Reserved. LAST REVISED Oct., 008 Introduction to Alger - Prt Sttement of Prerequisite

More information

p-adic Egyptian Fractions

p-adic Egyptian Fractions p-adic Egyptin Frctions Contents 1 Introduction 1 2 Trditionl Egyptin Frctions nd Greedy Algorithm 2 3 Set-up 3 4 p-greedy Algorithm 5 5 p-egyptin Trditionl 10 6 Conclusion 1 Introduction An Egyptin frction

More information

6. Suppose lim = constant> 0. Which of the following does not hold?

6. Suppose lim = constant> 0. Which of the following does not hold? CSE 0-00 Nme Test 00 points UTA Stuent ID # Multiple Choie Write your nswer to the LEFT of eh prolem 5 points eh The k lrgest numers in file of n numers n e foun using Θ(k) memory in Θ(n lg k) time using

More information

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005

CARLETON UNIVERSITY. 1.0 Problems and Most Solutions, Sect B, 2005 RLETON UNIVERSIT eprtment of Eletronis ELE 2607 Swithing iruits erury 28, 05; 0 pm.0 Prolems n Most Solutions, Set, 2005 Jn. 2, #8 n #0; Simplify, Prove Prolem. #8 Simplify + + + Reue to four letters (literls).

More information

Hamiltonian Connectedness of Toeplitz Graphs

Hamiltonian Connectedness of Toeplitz Graphs Hmiltonin Connectedne of Toeplitz Grph Muhmmd Fil Ndeem, Aeh Shir, nd Tudor Zmfirecu Introduction A imple undirected grph T with vertice ;;:::;n i clled Toeplitz grph if it djcenc mtri A.T / i Toeplitz.

More information

Lesson 1: Quadratic Equations

Lesson 1: Quadratic Equations Lesson 1: Qudrtic Equtions Qudrtic Eqution: The qudrtic eqution in form is. In this section, we will review 4 methods of qudrtic equtions, nd when it is most to use ech method. 1. 3.. 4. Method 1: Fctoring

More information

5. Every rational number have either terminating or repeating (recurring) decimal representation.

5. Every rational number have either terminating or repeating (recurring) decimal representation. CHAPTER NUMBER SYSTEMS Points to Rememer :. Numer used for ounting,,,,... re known s Nturl numers.. All nturl numers together with zero i.e. 0,,,,,... re known s whole numers.. All nturl numers, zero nd

More information

Vector Integration. Line integral: Let F ( x y,

Vector Integration. Line integral: Let F ( x y, Vetor Integrtion Thi hpter tret integrtion in vetor field. It i the mthemti tht engineer nd phiit ue to deribe fluid flow, deign underwter trnmiion ble, eplin the flow of het in tr, nd put tellite in orbit.

More information

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Vector Integration

VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Vector Integration www.boopr.om VTU NOTES QUESTION PAPERS NEWS RESULTS FORUMS Vetor Integrtion Thi hpter tret integrtion in vetor field. It i the mthemti tht engineer nd phiit ue to deribe fluid flow, deign underwter trnmiion

More information

CS241 Week 6 Tutorial Solutions

CS241 Week 6 Tutorial Solutions 241 Week 6 Tutoril olutions Lnguges: nning & ontext-free Grmmrs Winter 2018 1 nning Exerises 1. 0x0x0xd HEXINT 0x0 I x0xd 2. 0xend--- HEXINT 0xe I nd ER -- MINU - 3. 1234-120x INT 1234 INT -120 I x 4.

More information

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018

DATA Search I 魏忠钰. 复旦大学大数据学院 School of Data Science, Fudan University. March 7 th, 2018 DATA620006 魏忠钰 Serch I Mrch 7 th, 2018 Outline Serch Problems Uninformed Serch Depth-First Serch Bredth-First Serch Uniform-Cost Serch Rel world tsk - Pc-mn Serch problems A serch problem consists of:

More information

Chapter 9 Definite Integrals

Chapter 9 Definite Integrals Chpter 9 Definite Integrls In the previous chpter we found how to tke n ntiderivtive nd investigted the indefinite integrl. In this chpter the connection etween ntiderivtives nd definite integrls is estlished

More information

Surface maps into free groups

Surface maps into free groups Surfce mps into free groups lden Wlker Novemer 10, 2014 Free groups wedge X of two circles: Set F = π 1 (X ) =,. We write cpitl letters for inverse, so = 1. e.g. () 1 = Commuttors Let x nd y e loops. The

More information

Math 1431 Section M TH 4:00 PM 6:00 PM Susan Wheeler Office Hours: Wed 6:00 7:00 PM Online ***NOTE LABS ARE MON AND WED

Math 1431 Section M TH 4:00 PM 6:00 PM Susan Wheeler Office Hours: Wed 6:00 7:00 PM Online ***NOTE LABS ARE MON AND WED Mth 43 Section 4839 M TH 4: PM 6: PM Susn Wheeler swheeler@mth.uh.edu Office Hours: Wed 6: 7: PM Online ***NOTE LABS ARE MON AND WED t :3 PM to 3: pm ONLINE Approimting the re under curve given the type

More information

The Intouch Triangle and the OI-line

The Intouch Triangle and the OI-line Forum Geometriorum Volume 4 004 15 134. FORUM GEOM ISSN 1534-1178 The Intouh Tringle nd the OI-line Eri Dnneel Abtrt. We prove ome intereting reult relting the intouh tringle nd the OI line of tringle.

More information

Chapter 3 Exponential and Logarithmic Functions Section 3.1

Chapter 3 Exponential and Logarithmic Functions Section 3.1 Chpter 3 Eponentil nd Logrithmic Functions Section 3. EXPONENTIAL FUNCTIONS AND THEIR GRAPHS Eponentil Functions Eponentil functions re non-lgebric functions. The re clled trnscendentl functions. The eponentil

More information

G8-11 Congruence Rules

G8-11 Congruence Rules G8-11 ogruee Rules If two polgos re ogruet, ou ple the oe o top of the other so tht the th etl. The verties tht th re lled orrespodig verties. The gles tht th re lled orrespodig gles. The sides tht th

More information