ADVANCED ALGORITHMS Lecture 18: optimization, linear programming 1 - - PowerPoint PPT Presentation

advanced algorithms
SMART_READER_LITE
LIVE PREVIEW

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


slide-1
SLIDE 1

ADVANCED ALGORITHMS

Lecture 18: optimization, linear programming

1
slide-2
SLIDE 2

ANNOUNCEMENTS

➤ HW 4 is due on Monday, November 5 ➤ Project meetings… 2
slide-3
SLIDE 3

RANDOMIZED 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- I
slide-4
SLIDE 4

KEY 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 samples

inkstand

.
  • Xx"tuEfx]w%
  • =
I

( want

a prob . of GI
  • f
being Variance correct .) .

T

.
slide-5
SLIDE 5

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 >
  • is
a v.v . then

prfx

> t.IE

It

.

\

left

)

r Pr
  • it

xD

> tr ]

' '

f=¥E

.
slide-6
SLIDE 6

PARTING THOUGHTS

6 ➤ Is there “true randomness”? (semi-positive answers) ➤ Can randomness help solve “truly hard” problems? IT . . . . T #

Fpi

ems that admit .

(

" Rp " : randomized pay time algorithms P :

problems

that

aditi

)

D= RP ? " Derandomigakm "
  • =
slide-7
SLIDE 7

OPTIMIZATION

7
  • Code
  • ptimization
descent .
  • Gradient
inane .
  • Genetic
algorithms .
  • bjective
, constraints
  • ptimize
.
slide-8
SLIDE 8

OPTIMIZATION 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?) {
  • ,
B .
  • bjective function
.

}

constraints .
  • Decades
  • f
research
  • n
how to solve problems efficiently .
slide-9
SLIDE 9

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 machine

ETI

, #

m =3 .

/

+ ; as small as possible . w , = wz =
  • .
. = Wg = O . where
  • ×
set variable

fantasy

: wi : "

hjj.ftgeh-hfhedwbiixij.is

jdsj

assigned to

min

§Xwi

mix (

wit ti ) = machine i ? .
slide-10
SLIDE 10

EXAMPLE: SCHEDULING JOBS ON MACHINES

10

variables

:

Xij

if

{

, I } , a- I
  • ff
job ,

!

, is assigned machine

Saheck

: assignment to variables must let you " read
  • ff
" a solution to
  • riginal
problem . Constraints !

for

all jobs j ,

§ Xij

=L . . tf i i " total length

cfajobs

assigned " I T

E*i

Objective ; min T . tejas .
  • =
¥jE6 , kiytxag.tl/sj=l min T .
slide-11
SLIDE 11

Xij Elo ,

l) variables

{ Xij )

kiss

LE

21 6 constraints i ejsb tf

j

: X , j t

Xzjtxzj

= I A i : I . X ,

it

I

Xzit2Xzit3Xyit5Xsit3Xi

f

EL

3 constraint . min

L

.
slide-12
SLIDE 12

EXAMPLE: MATCHING VERTICES

11 Eloi } 1-

in

:

" :

:ita

:

ruin " : & is
  • f wise
. i n

find

an assignment

&

i , Nil

Bni

, ties .

feet

" '

)

at . , ?

Winn

is m " ' it

jet

, fees X = I
  • g
being a permutation Objective : max E

Xij

Wig '
  • all
i , j
slide-13
SLIDE 13

EXAMPLE: MATCHING VERTICES

12
slide-14
SLIDE 14

EXAMPLE: SHORTEST PATHS

13
  • Variables
?
  • Constraint
?
  • Objective ?

for

every edge e , ne :{ ' Tufan

"didaF shortest

" i
  • lookin
.

fight

:*

Objective i min

§

Xe ' we graph . Goal : find shortest path have = .
  • mm

::÷

.in#tiii:m:t*in:igixiiij

's

  • ut
. degree =L "

I

I

I

In

" " small " 2 ra
slide-15
SLIDE 15

EXAMPLE: SHORTEST PATHS

14

z

. . i

i

. . edges et WHS ) s , I

÷

"±s

.
  • ne
  • f
the edges in the " cut " is

.

" "
slide-16
SLIDE 16

EXAMPLE: SPANNING TREE

15
slide-17
SLIDE 17

EXAMPLE: SPANNING TREE

16
slide-18
SLIDE 18

EXAMPLE: MAXIMUM FLOW

17
slide-19
SLIDE 19

ZOOMING OUT

18 ➤ What are variables? ➤ What are constraints? ➤ What is the objective? ➤ Why?

slide-20
SLIDE 20

WHEN CAN WE SOLVE OPTIMIZATION?

19 ➤ Linear constraints, objective ➤ Convexity