ADVANCED ALGORITHMS
Lecture 18: optimization, linear programming
1
ADVANCED ALGORITHMS Lecture 18: optimization, linear programming 1 - - PowerPoint PPT Presentation
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
ADVANCED ALGORITHMS
Lecture 18: optimization, linear programming
1ANNOUNCEMENTS
➤ HW 4 is due on Monday, November 5 ➤ Project meetings… 2RANDOMIZED ALGORITHMS — SUMMARY
3 ➤ 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 variables (key to analysis), expectation, linearity_=
'(
random recurrence)
1- IKEY EXAMPLES
4 ➤ Balls and bins (random variables, expectation, etc.) ➤ Sampling — “concentration” of random variables ➤ Key result about sampling: if we want to estimate 0/1 outcome to an error +/- s, we need ~ 1/s2 samplesinkstand
.( want
a prob . of GIT
.CONCENTRATION OF RANDOM VARIABLES
5 ➤ Meta result: random variables do not deviate much from their expectation ➤ Markov’s inequality ➤ “Standard deviation” (also variance): amount we expect the variable to deviate from expectation ➤ Chebychev’s inequality ➤ Stronger bounds for sums of independent variables = . X >prfx
> t.IEIt
.\
left
)
→ r ↳ PrxD
> tr ]1¥
' 'f=¥E
.PARTING THOUGHTS
6 ➤ Is there “true randomness”? (semi-positive answers) ➤ Can randomness help solve “truly hard” problems? IT . . . . T #(
" Rp " : randomized pay time algorithms P :problems
thataditi
)
D= RP ? " Derandomigakm "OPTIMIZATION
7OPTIMIZATION WITH CONSTRAINTS
8 ➤ {x1, x2, …, xn} are variables — values in some domain D ➤ find maximum value of f(x) subject to g1(x) ≥ 0 g2(x) ≥ 0 …. Meta problem — can phrase many problems as optimization (why?) {}
→ constraints .EXAMPLE: SCHEDULING JOBS ON MACHINES
9 ➤ What are variables? ➤ What are constraints? ➤ What is the objective? ✓ypro-em.IM
jobs;
I , , la , . . . , en m machines . T .God
: assign jobs to machines l , lez is 14 Is ly . I , 2 , 2 , 3 , 5,3 at . total length of jobs assigned to any given machineETI
/
+ ; as small as possible . w , = wz =hjj.ftgeh-hfhedwbiixij.is
jdsj
assigned to⑧
min§Xwi
mix (
wit ti ) = machine i ? .EXAMPLE: SCHEDULING JOBS ON MACHINES
10variables
:Xij
if
{
, I } , a- I!
, is assigned machineSaheck
: assignment to variables must let you " readfor
all jobs j ,§ Xij
=L . ← . tf i i " total lengthcfajobs
assigned " I TXij Elo ,
l) variables{ Xij )
kissLE
21 6 constraints i ejsb ← tfj
: X , j tXzjtxzj
= I A i : I . X ,it
I
Xzit2Xzit3Xyit5Xsit3Xi
f
EL
3 constraint . minL
.EXAMPLE: MATCHING VERTICES
11 Eloi } 1-⇒
in:
" ::ita
:
ruin " : & isfind
an assignment&
i , NilBni
, ties .feet
" ')
at . , ?Winn
is m " ' itjet
, fees X = IXij
Wig 'EXAMPLE: MATCHING VERTICES
12EXAMPLE: SHORTEST PATHS
13for
every edge e , ne :{ ' Tufan"didaF shortest
" ifight
:*
Objective i min§
Xe ' we graph . Goal : find shortest path have = .::÷
.in#tiii:m:t*in:igixiiij
's
I
I
I
In
" " small " 2 raEXAMPLE: SHORTEST PATHS
14z
. . i"±s
..
" "EXAMPLE: SPANNING TREE
15EXAMPLE: SPANNING TREE
16EXAMPLE: MAXIMUM FLOW
17ZOOMING OUT
18 ➤ What are variables? ➤ What are constraints? ➤ What is the objective? ➤ Why?WHEN CAN WE SOLVE OPTIMIZATION?
19 ➤ Linear constraints, objective ➤ Convexity