ADVANCED ALGORITHMS Lecture 18: optimization, linear programming � 1
ANNOUNCEMENTS ➤ HW 4 is due on Monday, November 5 - ➤ Project meetings… � 2
RANDOMIZED ALGORITHMS — SUMMARY ➤ Typical use of randomness: ➤ “many” good solutions — think of checking if p(x) != q(x) _= ➤ Probability of failure — accuracy / running time ' ) ➤ Expected run time — quicksort, median selection ( random recurrence 1- I ➤ Random variables (key to analysis), expectation, linearity � 3
KEY EXAMPLES inkstand ➤ Balls and bins (random variables, expectation, etc.) . ➤ Sampling — “concentration” of random variables - Xx"tuEfx]w% ➤ Key result about sampling: if we want to estimate 0/1 outcome to an error +/- s, we need ~ 1/s 2 samples - ( want . of = being I of prob a GI . ) correct . Variance T . � 4
CONCENTRATION OF RANDOM VARIABLES ➤ Meta result: random variables do not deviate much from their = expectation . It prfx t.IE then X > . is > v.v o a ➤ Markov’s inequality . ➤ “Standard deviation” (also variance): amount we expect the variable to left deviate from expectation \ ) xD r → ➤ Chebychev’s inequality tr ] ↳ 1¥ Pr it ' > - f=¥E ➤ Stronger bounds for sums of independent variables ' . � 5
PARTING THOUGHTS IT . . . . T ➤ Is there “true randomness”? (semi-positive answers) # ➤ Can randomness help solve “truly hard” problems? Fpi admit that ) . algorithms ems time pay randomized ( " " Rp : aditi problems that P : " Derandomigakm " RP ? D= = - � 6
optimization Code - descent . inane Gradient . - algorithms Genetic . - objective , constraints - optimize . OPTIMIZATION � 7
OPTIMIZATION WITH CONSTRAINTS B { o , . ➤ {x 1 , x 2 , …, x n } are variables — values in some domain D ➤ find maximum value of f(x) subject to objective function ↳ . g 1 ( x ) ≥ 0 } g 2 ( x ) ≥ 0 constraints …. . → - Meta problem — can phrase many problems as optimization (why?) problems efficiently solve how to research . - Decades of on � 8
EXAMPLE: SCHEDULING JOBS ON MACHINES I , en , la jobs ➤ What are variables? ; . . . , , ✓ ypro-em.IM ➤ What are constraints? - # , T machines . . m fantasy ETI ➤ What is the objective? machines to assign jobs God ✓ : ly Is assigned 14 l lez is length of jobs , . total 5,3 at 3 2 2 I . / , , , hjj.ftgeh-hfhedwbiixij.is , machine given to any possible =3 m . small as . + ; where as = Wg O = . - wz = - . = . w , " variable set wi : : × ti ) mix ( to wit assigned ⑧ jdsj §Xwi min i ? machine . = � 9
EXAMPLE: SCHEDULING JOBS ON MACHINES I } if ! machine { is assigned job I - off Xij a- 0 variables : , , , , " " read off let to variables must you assignment Saheck : problem original to . solution a § Xij =L . for j jobs all Constraints ! , T " cfajobs ← I . assigned " length total tf E*i i i tejas T Objective . min , kiytxag.tl/sj=l ; . ¥jE6 - = T min . � 10
Xij Elo , l ) { Xij ) variables 21 LE kiss ejsb i 6 constraints I Xzjtxzj X = tf t ← , j j : Xzit2Xzit3Xyit5Xsit3Xi I X it I A i : . , f EL 3 constraint . L min . -
EXAMPLE: MATCHING VERTICES " : Eloi } : " 1- :ita : in ⇒ ruin : of wise is i & o . n Bni & feet i Nil ' ties " assignment find , , an . , ? Winn " is m ' at ) . I X - = jet fees it , permutation being a g - max E Xij Objective ' Wig : , j i all � 11
EXAMPLE: MATCHING VERTICES � 12
Variables ✓ ? - Constraint ? EXAMPLE: SHORTEST PATHS - Objective ? - ' Tufan ne :{ "didaF shortest for edge " e every , i fight o lookin :* . § graph Xe we . min ' Objective i path shortest find Goal .in#tiii:m:t*in:igixiiij : ::÷ have = . - • 's mm - " . degree =L out I I In I " " " small 2 ra � 13
EXAMPLE: SHORTEST PATHS i " ±s i z . . WHS ) . I et ÷ s . edges , . " is " cut in the edges the of one " " - . � 14
EXAMPLE: SPANNING TREE � 15
EXAMPLE: SPANNING TREE � 16
EXAMPLE: MAXIMUM FLOW � 17
ZOOMING OUT ➤ What are variables? ➤ What are constraints? ➤ What is the objective? ➤ Why? � 18
WHEN CAN WE SOLVE OPTIMIZATION? ➤ Linear constraints, objective ➤ Convexity � 19
Recommend
More recommend