Algorithm Design and Analysis

Size: px
Start display at page:

Download "Algorithm Design and Analysis"

Transcription

1 Algorithm Design nd Anlysis LECTURE 5 Supplement Greedy Algorithms Cont d Minimizing lteness Ching (NOT overed in leture) Adm Smith 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne

2 Greedy Algorithms Build up solution to n optimiztion prolem t eh step shortsightedly hoosing the option tht urrently seems the est. Sometimes good Often does not work Proving orretness n e triky, euse lgorithm is unstrutured 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K.

3 Lst leture (KT, Chpter 4.1) Two types of orretness rguments Greedy stys hed Intervl sheduling prolem d e f g Struturl rgument Intervl prtitioning e d g h 1 1 j Time 2 h 1 f i Tody: exhnge 9 9: : : :30 1 1: : : :3 0 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K.

4 Sheduling to minimize lteness 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne

5 Sheduling to Minimizing Lteness Minimizing lteness prolem. Single resoure proesses one jo t time. Jo j requires t j units of proessing time nd is due t time d j. If j strts t time s j, it finishes t time f j = s j + t j. Lteness: j = mx { 0, f j - d j }. Gol: shedule ll jos to minimize mximum lteness L = mx j. Ex: t j d j lteness = 2 lteness = 0 mx lteness = 6 d 3 = 9 d 2 = 8 d 6 = 15 d 1 = 6 d 5 = 14 d 4 =

6 Greedy strtegies?

7 Minimizing Lteness: Greedy Algorithms Greedy templte. Consider jos in some order. [Shortest proessing time first] Consider jos in sending order of proessing time t j. [Erliest dedline first] Consider jos in sending order of dedline d j. [Smllest slk] Consider jos in sending order of slk d j - t j.

8 Minimizing Lteness: Greedy Algorithms Greedy templte. Consider jos in some order. [Shortest proessing time first] Consider jos in sending order of proessing time t j. t j d j ounterexmple [Smllest slk] Consider jos in sending order of slk d j - t j. 1 t j 1 2 d j ounterexmple

9 Minimizing Lteness: Greedy Algorithm Greedy lgorithm. Erliest dedline first. Sort n jos y dedline so tht d 1 d 2 d n t 0 for j = 1 to n Assign jo j to intervl [t, t + t j ] s j t, f j t + t j t t + t j output intervls [s j, f j ] mx lteness = 1 d 1 = 6 d 2 = 8 d 3 = 9 d 4 = 9 d 5 = 14 d 6 =

10 Minimizing Lteness: No Idle Time Oservtion. There exists n optiml shedule with no idle time. d = 4 d = d = d = 4 d = 6 d = Oservtion. The greedy shedule hs no idle time.

11 Minimizing Lteness: Inversions Def. An inversion in shedule S is pir of jos i nd j suh tht: i < j ut j sheduled efore i. inversion efore swp j i Oservtion. Greedy shedule hs no inversions. Oservtion. If shedule (with no idle time) hs n inversion, it hs one with pir of inverted jos sheduled onseutively.

12 Minimizing Lteness: Inversions Def. An inversion in shedule S is pir of jos i nd j suh tht: i < j ut j sheduled efore i. inversion f i efore swp j i fter swp i j f' j Clim. Swpping two djent, inverted jos redues the numer of inversions y one nd does not inrese the mx lteness. Pf. Let e the lteness efore the swp, nd let ' e it fterwrds. ' k = k for ll k i, j ' i i If jo j is lte: j f d j f d i f d i i j i j (definition) ( j finishes t time f ) ( i j ) (definition) i

13 Minimizing Lteness: Anlysis of Greedy Algorithm Theorem. Greedy shedule S is optiml. Pf. Define S* to e n optiml shedule tht hs the fewest numer of inversions, nd let's see wht hppens. Cn ssume S* hs no idle time. If S* hs no inversions, then S = S*. If S* hs n inversion, let i-j e n djent inversion. swpping i nd j does not inrese the mximum lteness nd stritly dereses the numer of inversions this ontrdits definition of S*

14 Greedy Anlysis Strtegies Greedy lgorithm stys hed. Show tht fter eh step of the greedy lgorithm, its solution is t lest s good s ny other lgorithm's. Exhnge rgument. Grdully trnsform ny solution to the one found y the greedy lgorithm without hurting its qulity. Struturl. Disover simple "struturl" ound sserting tht every possile solution must hve ertin vlue. Then show tht your lgorithm lwys hieves this ound.

15 Optiml Ching 9/8/10 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne

16 Optiml Offline Ching Ching. Che with pity to store k items. Sequene of m item requests d 1, d 2,, d m. Che hit: item lredy in he when requested. Che miss: item not lredy in he when requested: must ring requested item into he, nd evit some existing item, if full. Gol. Evition shedule tht minimizes numer of he misses. Ex: k = 2, initil he =, requests:,,,,,,,. Optiml evition shedule: 2 he misses. requests he

17 Suggestions for greedy pprohes?

18 Optiml Offline Ching: Frthest-In-Future Frthest-in-future. Evit item in the he tht is not requested until frthest in the future. urrent he: d e f future queries: g e d d e f d e f g h... he miss ejet this one Theorem. [Belldy, 1960s] FF is optiml evition shedule. Pf. Algorithm nd theorem re intuitive; proof is sutle.

19 Redued Evition Shedules Def. A redued shedule is shedule tht only inserts n item into the he in step in whih tht item is requested. Intuition. Cn trnsform n unredued shedule into redued one with no more he misses. (Ide is to defer unredued requests. Proof will e n exerise.) x d d d d d d x d n unredued shedule redued shedule

20 Frthest-In-Future: Anlysis Theorem. FF is optiml evition lgorithm. Pf. (y indution on numer or requests j) Invrint: There exists n optiml redued shedule S tht mkes the sme evition shedule s S FF through the first j+1 requests. Let S = opt. redued shedule tht stisfies invrint through j requests. We produe S' tht stisfies invrint fter j+1 requests. Consider (j+1) st request d = d j+1. Sine S nd S FF hve greed up until now, they hve the sme he ontents efore request j+1. Cse 1: (d is lredy in the he). S' = S stisfies invrint. Cse 2: (d is not in the he nd S nd S FF evit the sme element). S' = S stisfies invrint.

21 Frthest-In-Future: Anlysis Pf. (ontinued) Cse 3: (d is not in the he; S FF evits e; S evits f e). egin onstrution of S' from S y eviting e insted of f j sme e f sme e f S S' j+1 j sme e d sme d f S S' now S' grees with S FF on first j+1 requests; we show tht hving element f in he is no worse thn hving element e

22 Frthest-In-Future: Anlysis Let j' e the first time fter j+1 tht S nd S' tke different tion, nd let g e item requested t time j'. must involve e or f (or oth) j' sme e sme f S S' Cse 3: g = e. Cn't hppen with Frthest-In-Future sine there must e request for f efore e. Cse 3: g = f. Element f n't e in he of S, so let e' e the element tht S evits. if e' = e, S' esses f from he; now S nd S' hve sme he if e' e, S' evits e' nd rings e into the he; now S nd S' hve the sme he Note: S' is no longer redued, ut n e trnsformed into redued shedule tht grees with S FF through step j+1

23 Frthest-In-Future: Anlysis Let j' e the first time fter j+1 tht S nd S' tke different tion, nd let g e item requested t time j'. must involve e or f (or oth) j' sme e sme f S S' otherwise S' would tke the sme tion Cse 3: g e, f. S must evit e. Mke S' evit f; now S nd S' hve the sme he. j' sme g sme g S S'

24 Ching Perspetive Online vs. offline lgorithms. Offline: full sequene of requests is known priori. Online (relity): requests re not known in dvne. Ching is mong most fundmentl online prolems in CS. LIFO. Evit pge rought in most reently. LRU. Evit pge whose most reent ess ws erliest. FF with diretion of time reversed! Theorem. FF is optiml offline evition lgorithm. Provides sis for understnding nd nlyzing online lgorithms. LRU is k-ompetitive. [Setion 13.8] LIFO is ritrrily d.

Algorithm Design and Analysis

Algorithm Design and Analysis Algorithm Design nd Anlysis LECTURE 8 Mx. lteness ont d Optiml Ching Adm Smith 9/12/2008 A. Smith; sed on slides y E. Demine, C. Leiserson, S. Rskhodnikov, K. Wyne Sheduling to Minimizing Lteness Minimizing

More information

4. GREEDY ALGORITHMS I

4. GREEDY ALGORITHMS I 4. GREEDY ALGORITHMS I coin chnging intervl scheduling scheduling to minimize lteness optiml cching Lecture slides by Kevin Wyne Copyright 2005 Person-Addison Wesley http://www.cs.princeton.edu/~wyne/kleinberg-trdos

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

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

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

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

Review of Gaussian Quadrature method

Review of Gaussian Quadrature method Review of Gussin Qudrture method Nsser M. Asi Spring 006 compiled on Sundy Decemer 1, 017 t 09:1 PM 1 The prolem To find numericl vlue for the integrl of rel vlued function of rel vrile over specific rnge

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

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

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

Greedy Algorithms. Greedy Algorithms. Piyush Kumar

Greedy Algorithms. Greedy Algorithms. Piyush Kumar Gree s goo. Gree s rght. Gree works. Gree lrfes, uts through, n ptures the essene of the evolutonry sprt. - Goron Geko (Mhel Dougls) Anlyss of Algorthms Pyush Kumr (Leture 4: Greey Algorthms) Welome to

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

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then

For a, b, c, d positive if a b and. ac bd. Reciprocal relations for a and b positive. If a > b then a ab > b. then Slrs-7.2-ADV-.7 Improper Definite Integrls 27.. D.dox Pge of Improper Definite Integrls Before we strt the min topi we present relevnt lger nd it review. See Appendix J for more lger review. Inequlities:

More information

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals

AP Calculus BC Chapter 8: Integration Techniques, L Hopital s Rule and Improper Integrals AP Clulus BC Chpter 8: Integrtion Tehniques, L Hopitl s Rule nd Improper Integrls 8. Bsi Integrtion Rules In this setion we will review vrious integrtion strtegies. Strtegies: I. Seprte the integrnd into

More information

6.5 Improper integrals

6.5 Improper integrals Eerpt from "Clulus" 3 AoPS In. www.rtofprolemsolving.om 6.5. IMPROPER INTEGRALS 6.5 Improper integrls As we ve seen, we use the definite integrl R f to ompute the re of the region under the grph of y =

More information

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows:

Improper Integrals. The First Fundamental Theorem of Calculus, as we ve discussed in class, goes as follows: Improper Integrls The First Fundmentl Theorem of Clculus, s we ve discussed in clss, goes s follows: If f is continuous on the intervl [, ] nd F is function for which F t = ft, then ftdt = F F. An integrl

More information

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar)

Lecture 3 ( ) (translated and slightly adapted from lecture notes by Martin Klazar) Lecture 3 (5.3.2018) (trnslted nd slightly dpted from lecture notes by Mrtin Klzr) Riemnn integrl Now we define precisely the concept of the re, in prticulr, the re of figure U(, b, f) under the grph of

More information

Golden Section Search Method - Theory

Golden Section Search Method - Theory Numericl Methods Golden Section Serch Method - Theory http://nm.mthforcollege.com For more detils on this topic Go to http://nm.mthforcollege.com Click on Keyword Click on Golden Section Serch Method You

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

Introduction to Olympiad Inequalities

Introduction to Olympiad Inequalities Introdution to Olympid Inequlities Edutionl Studies Progrm HSSP Msshusetts Institute of Tehnology Snj Simonovikj Spring 207 Contents Wrm up nd Am-Gm inequlity 2. Elementry inequlities......................

More information

QUADRATIC EQUATION. Contents

QUADRATIC EQUATION. Contents QUADRATIC EQUATION Contents Topi Pge No. Theory 0-04 Exerise - 05-09 Exerise - 09-3 Exerise - 3 4-5 Exerise - 4 6 Answer Key 7-8 Syllus Qudrti equtions with rel oeffiients, reltions etween roots nd oeffiients,

More information

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4

Intermediate Math Circles Wednesday, November 14, 2018 Finite Automata II. Nickolas Rollick a b b. a b 4 Intermedite Mth Circles Wednesdy, Novemer 14, 2018 Finite Automt II Nickols Rollick nrollick@uwterloo.c Regulr Lnguges Lst time, we were introduced to the ide of DFA (deterministic finite utomton), one

More information

System Validation (IN4387) November 2, 2012, 14:00-17:00

System Validation (IN4387) November 2, 2012, 14:00-17:00 System Vlidtion (IN4387) Novemer 2, 2012, 14:00-17:00 Importnt Notes. The exmintion omprises 5 question in 4 pges. Give omplete explntion nd do not onfine yourself to giving the finl nswer. Good luk! Exerise

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

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

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

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

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

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

Solutions to Assignment 1

Solutions to Assignment 1 MTHE 237 Fll 2015 Solutions to Assignment 1 Problem 1 Find the order of the differentil eqution: t d3 y dt 3 +t2 y = os(t. Is the differentil eqution liner? Is the eqution homogeneous? b Repet the bove

More information

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable

INTEGRATION. 1 Integrals of Complex Valued functions of a REAL variable INTEGRATION NOTE: These notes re supposed to supplement Chpter 4 of the online textbook. 1 Integrls of Complex Vlued funtions of REAL vrible If I is n intervl in R (for exmple I = [, b] or I = (, b)) nd

More information

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp.

MA123, Chapter 10: Formulas for integrals: integrals, antiderivatives, and the Fundamental Theorem of Calculus (pp. MA123, Chpter 1: Formuls for integrls: integrls, ntiderivtives, nd the Fundmentl Theorem of Clculus (pp. 27-233, Gootmn) Chpter Gols: Assignments: Understnd the sttement of the Fundmentl Theorem of Clculus.

More information

Probability. b a b. a b 32.

Probability. b a b. a b 32. Proility If n event n hppen in '' wys nd fil in '' wys, nd eh of these wys is eqully likely, then proility or the hne, or its hppening is, nd tht of its filing is eg, If in lottery there re prizes nd lnks,

More information

More Properties of the Riemann Integral

More Properties of the Riemann Integral More Properties of the Riemnn Integrl Jmes K. Peterson Deprtment of Biologil Sienes nd Deprtment of Mthemtil Sienes Clemson University Februry 15, 2018 Outline More Riemnn Integrl Properties The Fundmentl

More information

Part 4. Integration (with Proofs)

Part 4. Integration (with Proofs) Prt 4. Integrtion (with Proofs) 4.1 Definition Definition A prtition P of [, b] is finite set of points {x 0, x 1,..., x n } with = x 0 < x 1

More information

Bases for Vector Spaces

Bases for Vector Spaces Bses for Vector Spces 2-26-25 A set is independent if, roughly speking, there is no redundncy in the set: You cn t uild ny vector in the set s liner comintion of the others A set spns if you cn uild everything

More information

University of Sioux Falls. MAT204/205 Calculus I/II

University of Sioux Falls. MAT204/205 Calculus I/II University of Sioux Flls MAT204/205 Clulus I/II Conepts ddressed: Clulus Textook: Thoms Clulus, 11 th ed., Weir, Hss, Giordno 1. Use stndrd differentition nd integrtion tehniques. Differentition tehniques

More information

T b a(f) [f ] +. P b a(f) = Conclude that if f is in AC then it is the difference of two monotone absolutely continuous functions.

T b a(f) [f ] +. P b a(f) = Conclude that if f is in AC then it is the difference of two monotone absolutely continuous functions. Rel Vribles, Fll 2014 Problem set 5 Solution suggestions Exerise 1. Let f be bsolutely ontinuous on [, b] Show tht nd T b (f) P b (f) f (x) dx [f ] +. Conlude tht if f is in AC then it is the differene

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

Connected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs

Connected-components. Summary of lecture 9. Algorithms and Data Structures Disjoint sets. Example: connected components in graphs Prm University, Mth. Deprtment Summry of lecture 9 Algorithms nd Dt Structures Disjoint sets Summry of this lecture: (CLR.1-3) Dt Structures for Disjoint sets: Union opertion Find opertion Mrco Pellegrini

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

Homework 3 Solutions

Homework 3 Solutions CS 341: Foundtions of Computer Science II Prof. Mrvin Nkym Homework 3 Solutions 1. Give NFAs with the specified numer of sttes recognizing ech of the following lnguges. In ll cses, the lphet is Σ = {,1}.

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

Alpha Algorithm: Limitations

Alpha Algorithm: Limitations Proess Mining: Dt Siene in Ation Alph Algorithm: Limittions prof.dr.ir. Wil vn der Alst www.proessmining.org Let L e n event log over T. α(l) is defined s follows. 1. T L = { t T σ L t σ}, 2. T I = { t

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

Beginning Darboux Integration, Math 317, Intro to Analysis II

Beginning Darboux Integration, Math 317, Intro to Analysis II Beginning Droux Integrtion, Mth 317, Intro to Anlysis II Lets strt y rememering how to integrte function over n intervl. (you lerned this in Clculus I, ut mye it didn t stick.) This set of lecture notes

More information

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz

Welcome. Balanced search trees. Balanced Search Trees. Inge Li Gørtz Welome nge Li Gørt. everse tehing n isussion of exerises: 02110 nge Li Gørt 3 tehing ssistnts 8.00-9.15 Group work 9.15-9.45 isussions of your solutions in lss 10.00-11.15 Leture 11.15-11.45 Work on exerises

More information

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS.

THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS. THE EXISTENCE-UNIQUENESS THEOREM FOR FIRST-ORDER DIFFERENTIAL EQUATIONS RADON ROSBOROUGH https://intuitiveexplntionscom/picrd-lindelof-theorem/ This document is proof of the existence-uniqueness theorem

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

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

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

Exercises with (Some) Solutions

Exercises with (Some) Solutions Exercises with (Some) Solutions Techer: Luc Tesei Mster of Science in Computer Science - University of Cmerino Contents 1 Strong Bisimultion nd HML 2 2 Wek Bisimultion 31 3 Complete Lttices nd Fix Points

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

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version

A Lower Bound for the Length of a Partial Transversal in a Latin Square, Revised Version A Lower Bound for the Length of Prtil Trnsversl in Ltin Squre, Revised Version Pooy Htmi nd Peter W. Shor Deprtment of Mthemtil Sienes, Shrif University of Tehnology, P.O.Bo 11365-9415, Tehrn, Irn Deprtment

More information

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7

CS103 Handout 32 Fall 2016 November 11, 2016 Problem Set 7 CS103 Hndout 32 Fll 2016 Novemer 11, 2016 Prolem Set 7 Wht cn you do with regulr expressions? Wht re the limits of regulr lnguges? On this prolem set, you'll find out! As lwys, plese feel free to drop

More information

Discrete Structures Lecture 11

Discrete Structures Lecture 11 Introdution Good morning. In this setion we study funtions. A funtion is mpping from one set to nother set or, perhps, from one set to itself. We study the properties of funtions. A mpping my not e funtion.

More information

Linear Inequalities. Work Sheet 1

Linear Inequalities. Work Sheet 1 Work Sheet 1 Liner Inequlities Rent--Hep, cr rentl compny,chrges $ 15 per week plus $ 0.0 per mile to rent one of their crs. Suppose you re limited y how much money you cn spend for the week : You cn spend

More information

Formal Methods in Software Engineering

Formal Methods in Software Engineering Forml Methods in Softwre Engineering Lecture 09 orgniztionl issues Prof. Dr. Joel Greenyer Decemer 9, 2014 Written Exm The written exm will tke plce on Mrch 4 th, 2015 The exm will tke 60 minutes nd strt

More information

2.4 Linear Inequalities and Interval Notation

2.4 Linear Inequalities and Interval Notation .4 Liner Inequlities nd Intervl Nottion We wnt to solve equtions tht hve n inequlity symol insted of n equl sign. There re four inequlity symols tht we will look t: Less thn , Less thn or

More information

1 Nondeterministic Finite Automata

1 Nondeterministic Finite Automata 1 Nondeterministic Finite Automt Suppose in life, whenever you hd choice, you could try oth possiilities nd live your life. At the end, you would go ck nd choose the one tht worked out the est. Then you

More information

Minimal DFA. minimal DFA for L starting from any other

Minimal DFA. minimal DFA for L starting from any other Miniml DFA Among the mny DFAs ccepting the sme regulr lnguge L, there is exctly one (up to renming of sttes) which hs the smllest possile numer of sttes. Moreover, it is possile to otin tht miniml DFA

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

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations.

Lecture 3. In this lecture, we will discuss algorithms for solving systems of linear equations. Lecture 3 3 Solving liner equtions In this lecture we will discuss lgorithms for solving systems of liner equtions Multiplictive identity Let us restrict ourselves to considering squre mtrices since one

More information

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution

Technische Universität München Winter term 2009/10 I7 Prof. J. Esparza / J. Křetínský / M. Luttenberger 11. Februar Solution Tehnishe Universität Münhen Winter term 29/ I7 Prof. J. Esprz / J. Křetínský / M. Luttenerger. Ferur 2 Solution Automt nd Forml Lnguges Homework 2 Due 5..29. Exerise 2. Let A e the following finite utomton:

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

Factorising FACTORISING.

Factorising FACTORISING. Ftorising FACTORISING www.mthletis.om.u Ftorising FACTORISING Ftorising is the opposite of expning. It is the proess of putting expressions into rkets rther thn expning them out. In this setion you will

More information

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths

Intermediate Math Circles Wednesday 17 October 2012 Geometry II: Side Lengths Intermedite Mth Cirles Wednesdy 17 Otoer 01 Geometry II: Side Lengths Lst week we disussed vrious ngle properties. As we progressed through the evening, we proved mny results. This week, we will look t

More information

QUADRATIC EQUATION EXERCISE - 01 CHECK YOUR GRASP

QUADRATIC EQUATION EXERCISE - 01 CHECK YOUR GRASP QUADRATIC EQUATION EXERCISE - 0 CHECK YOUR GRASP. Sine sum of oeffiients 0. Hint : It's one root is nd other root is 8 nd 5 5. tn other root 9. q 4p 0 q p q p, q 4 p,,, 4 Hene 7 vlues of (p, q) 7 equtions

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

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3

I1 = I2 I1 = I2 + I3 I1 + I2 = I3 + I4 I 3 2 The Prllel Circuit Electric Circuits: Figure 2- elow show ttery nd multiple resistors rrnged in prllel. Ech resistor receives portion of the current from the ttery sed on its resistnce. The split is

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

Topics Covered AP Calculus AB

Topics Covered AP Calculus AB Topics Covered AP Clculus AB ) Elementry Functions ) Properties of Functions i) A function f is defined s set of ll ordered pirs (, y), such tht for ech element, there corresponds ectly one element y.

More information

Data Structures and Algorithms CMPSC 465

Data Structures and Algorithms CMPSC 465 Dt Structures nd Algorithms CMPSC 465 LECTURE 10 Solving recurrences Mster theorem Adm Smith S. Rskhodnikov nd A. Smith; bsed on slides by E. Demine nd C. Leiserson Review questions Guess the solution

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

Spacetime and the Quantum World Questions Fall 2010

Spacetime and the Quantum World Questions Fall 2010 Spetime nd the Quntum World Questions Fll 2010 1. Cliker Questions from Clss: (1) In toss of two die, wht is the proility tht the sum of the outomes is 6? () P (x 1 + x 2 = 6) = 1 36 - out 3% () P (x 1

More information

AP CALCULUS Test #6: Unit #6 Basic Integration and Applications

AP CALCULUS Test #6: Unit #6 Basic Integration and Applications AP CALCULUS Test #6: Unit #6 Bsi Integrtion nd Applitions A GRAPHING CALCULATOR IS REQUIRED FOR SOME PROBLEMS OR PARTS OF PROBLEMS IN THIS PART OF THE EXAMINATION. () The ext numeril vlue of the orret

More information

Chapter 5 Plan-Space Planning

Chapter 5 Plan-Space Planning Lecture slides for Automted Plnning: Theory nd Prctice Chpter 5 Pln-Spce Plnning Dn S. Nu CMSC 722, AI Plnning University of Mrylnd, Spring 2008 1 Stte-Spce Plnning Motivtion g 1 1 g 4 4 s 0 g 5 5 g 2

More information

Chapter 2 Finite Automata

Chapter 2 Finite Automata Chpter 2 Finite Automt 28 2.1 Introduction Finite utomt: first model of the notion of effective procedure. (They lso hve mny other pplictions). The concept of finite utomton cn e derived y exmining wht

More information

MAT 403 NOTES 4. f + f =

MAT 403 NOTES 4. f + f = MAT 403 NOTES 4 1. Fundmentl Theorem o Clulus We will proo more generl version o the FTC thn the textook. But just like the textook, we strt with the ollowing proposition. Let R[, ] e the set o Riemnn

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

Now we must transform the original model so we can use the new parameters. = S max. Recruits

Now we must transform the original model so we can use the new parameters. = S max. Recruits MODEL FOR VARIABLE RECRUITMENT (ontinue) Alterntive Prmeteriztions of the pwner-reruit Moels We n write ny moel in numerous ifferent ut equivlent forms. Uner ertin irumstnes it is onvenient to work with

More information

15-451/651: Design & Analysis of Algorithms December 3, 2013 Lecture #28 last changed: November 28, 2013

15-451/651: Design & Analysis of Algorithms December 3, 2013 Lecture #28 last changed: November 28, 2013 15-451/651: Design & nlysis of lgorithms Deemer 3, 2013 Leture #28 lst hnged: Novemer 28, 2013 Lst time we strted tlking out mehnism design: how to llote n item to the person who hs the mximum vlue for

More information

1 The fundamental theorems of calculus.

1 The fundamental theorems of calculus. The fundmentl theorems of clculus. The fundmentl theorems of clculus. Evluting definite integrls. The indefinite integrl- new nme for nti-derivtive. Differentiting integrls. Tody we provide the connection

More information

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014

CMPSCI 250: Introduction to Computation. Lecture #31: What DFA s Can and Can t Do David Mix Barrington 9 April 2014 CMPSCI 250: Introduction to Computtion Lecture #31: Wht DFA s Cn nd Cn t Do Dvid Mix Brrington 9 April 2014 Wht DFA s Cn nd Cn t Do Deterministic Finite Automt Forml Definition of DFA s Exmples of DFA

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

Fingerprint idea. Assume:

Fingerprint idea. Assume: Fingerprint ide Assume: We cn compute fingerprint f(p) of P in O(m) time. If f(p) f(t[s.. s+m 1]), then P T[s.. s+m 1] We cn compre fingerprints in O(1) We cn compute f = f(t[s+1.. s+m]) from f(t[s.. s+m

More information

Logic, Set Theory and Computability [M. Coppenbarger]

Logic, Set Theory and Computability [M. Coppenbarger] 14 Orer (Hnout) Definition 7-11: A reltion is qusi-orering (or preorer) if it is reflexive n trnsitive. A quisi-orering tht is symmetri is n equivlene reltion. A qusi-orering tht is nti-symmetri is n orer

More information

Designing Information Devices and Systems I Spring 2018 Homework 7

Designing Information Devices and Systems I Spring 2018 Homework 7 EECS 16A Designing Informtion Devices nd Systems I Spring 2018 omework 7 This homework is due Mrch 12, 2018, t 23:59. Self-grdes re due Mrch 15, 2018, t 23:59. Sumission Formt Your homework sumission should

More information

First Midterm Examination

First Midterm Examination 24-25 Fll Semester First Midterm Exmintion ) Give the stte digrm of DFA tht recognizes the lnguge A over lphet Σ = {, } where A = {w w contins or } 2) The following DFA recognizes the lnguge B over lphet

More information

1 Probability Density Functions

1 Probability Density Functions Lis Yn CS 9 Continuous Distributions Lecture Notes #9 July 6, 28 Bsed on chpter by Chris Piech So fr, ll rndom vribles we hve seen hve been discrete. In ll the cses we hve seen in CS 9, this ment tht our

More information

Symmetrical Components 1

Symmetrical Components 1 Symmetril Components. Introdution These notes should e red together with Setion. of your text. When performing stedy-stte nlysis of high voltge trnsmission systems, we mke use of the per-phse equivlent

More information

Riemann Sums and Riemann Integrals

Riemann Sums and Riemann Integrals Riemnn Sums nd Riemnn Integrls Jmes K. Peterson Deprtment of Biologicl Sciences nd Deprtment of Mthemticl Sciences Clemson University August 26, 203 Outline Riemnn Sums Riemnn Integrls Properties Abstrct

More information

CS 188 Introduction to Artificial Intelligence Fall 2018 Note 7

CS 188 Introduction to Artificial Intelligence Fall 2018 Note 7 CS 188 Introduction to Artificil Intelligence Fll 2018 Note 7 These lecture notes re hevily bsed on notes originlly written by Nikhil Shrm. Decision Networks In the third note, we lerned bout gme trees

More information

Section 6.1 Definite Integral

Section 6.1 Definite Integral Section 6.1 Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot e determined

More information

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying

W. We shall do so one by one, starting with I 1, and we shall do it greedily, trying Vitli covers 1 Definition. A Vitli cover of set E R is set V of closed intervls with positive length so tht, for every δ > 0 nd every x E, there is some I V with λ(i ) < δ nd x I. 2 Lemm (Vitli covering)

More information

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2.

Suppose we want to find the area under the parabola and above the x axis, between the lines x = 2 and x = -2. Mth 43 Section 6. Section 6.: Definite Integrl Suppose we wnt to find the re of region tht is not so nicely shped. For exmple, consider the function shown elow. The re elow the curve nd ove the x xis cnnot

More information

Functions. mjarrar Watch this lecture and download the slides

Functions. mjarrar Watch this lecture and download the slides 9/6/7 Mustf Jrrr: Leture Notes in Disrete Mthemtis. Birzeit University Plestine 05 Funtions 7.. Introdution to Funtions 7. One-to-One Onto Inverse funtions mjrrr 05 Wth this leture nd downlod the slides

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

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms

The Minimum Label Spanning Tree Problem: Illustrating the Utility of Genetic Algorithms The Minimum Lel Spnning Tree Prolem: Illustrting the Utility of Genetic Algorithms Yupei Xiong, Univ. of Mrylnd Bruce Golden, Univ. of Mrylnd Edwrd Wsil, Americn Univ. Presented t BAE Systems Distinguished

More information

CS 330 Formal Methods and Models

CS 330 Formal Methods and Models CS 330 Forml Methods nd Models Dn Richrds, George Mson University, Spring 2017 Quiz Solutions Quiz 1, Propositionl Logic Dte: Ferury 2 1. Prove ((( p q) q) p) is tutology () (3pts) y truth tle. p q p q

More information