# C&O 355 Mathematical Programming PowerPoint Presentation 2018-03-17 32K 32 0 0

##### Description

Fall 2010. Lecture 22. N. Harvey. TexPoint. fonts used in EMF. . Read the . TexPoint. manual before you delete this box. .: . A. A. A. A. A. A. A. A. A. A. Topics. Kruskal’s. Algorithm for the. Max Weight Spanning Tree Problem. ID: 654300

Embed code:

DownloadNote - The PPT/PDF document "C&O 355 Mathematical Programming" is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.

### Presentations text content in C&O 355 Mathematical Programming

Slide1

C&O 355Mathematical ProgrammingFall 2010Lecture 22

N. Harvey

TexPoint

fonts used in EMF.

TexPoint

manual before you delete this box

.:

A

A

A

A

A

A

A

A

A

A

Slide2

TopicsKruskal’s Algorithm for the

Max Weight Spanning Tree ProblemVertices of the Spanning Tree Polytope

Slide3

Review of Lecture 21Defined spanning tree

polytope where ∙

(C) = # connected components in (V,C).

We showed, for any spanning tree T,

its

characteristic vector

is in PST.We showed how to optimize over PST in polynomial time by the ellipsoid method, even though there are exponentially many constraintsThis is a bit complicated: it uses the Min s-t Cut problem as a separation oracle.

P

ST

=

Slide4

How to solve combinatorial IPs?(From Lecture 17)

Two common approachesDesign combinatorial algorithm that directly solves IPOften such algorithms have a nice LP interpretation

Relax IP to an LP; prove that they give same solution; solve LP by the ellipsoid method

Need to show special structure of the LP’s extreme points

Sometimes we can analyze the extreme points

combinatorially

Sometimes we can use algebraic structure of the constraints.For example, if constraint matrix is Totally Unimodular

then IP and LP are equivalent

Perfect

Matching

Max Flow,

Max Matching

TODAY

Slide5

Kruskal’s AlgorithmLet G = (V,E) be a connected graph, n=|V|, m=|E|

Edges are weighted: we2R for every e

2

E

We will show:

Claim:

When this algorithm adds an edge to T, no cycle is created.Claim: At the end of the algorithm, T is connected.Theorem: This algorithm outputs a maximum-cost spanning tree.Order E as (e1, ..., e

m), where we1 ¸

we2 ¸ ... ¸ wem

Initially T = ;For i=1,...,m

If the ends of

e

i

are in different components of (V,T)

e

i to T

Slide6

Kruskal’s AlgorithmLet G = (V,E) be a connected graph, n=|V|, m=|E|

Edges are weighted: we2R for every e

2

E

Order E as (e

1

, ..., em), where we1 ¸ we2 ¸ ... ¸ w

emInitially T = ;

For i=1,...,m If the ends of ei are in different components of (V,T)

8

7

1

2

2

2

3

2

4

1

3

5

1

8

1

3

Slide7

Claim: When this algorithm adds an edge to T, no cycle is created.Proof:

Let ei = {u

,

v

}.

T[{ei} contains a cycle iff there is a path from u to v in (V,T).

Order E as (e1, ..., em

), where we1 ¸ we2 ¸ ...

¸ wemInitially T = ;For

i

=1,...,m

If the ends of

e

i

are in different components of (V,T)

e

i

to T

1

8

7

1

2

2

e

i

u

v

2

3

2

4

1

3

5

1

8

3

Slide8

Claim: When this algorithm adds an edge to T, no cycle is created.Proof:

Let ei = {u

,

v

}.

T[{ei} contains a cycle iff there is a path from u to v in (V,T). Since ei only added when u

and v are in different components, no such path exists. Therefore (V,

T) is acyclic throughout the algorithm. ¥

Order E as (e1, ..., em), where we1 ¸

w

e2

¸

...

¸

wem

Initially T =

;

For

i

=1,...,m

If the ends of

e

i

are in different components of (V,T)

ei to T

1

8

7

1

2

2

e

i

u

v

2

3

2

4

1

3

5

1

8

3

Slide9

Claim:

At the end of the algorithm,

T

is connected.

Proof:

Suppose not.

Then there are vertices

u

and

v

in different

components

of (V,

T

).

Order E as (e

1

, ...,

e

m

), where w

e1

¸

w

e2

¸

...

¸ w

emInitially T = ;For i

=1,...,m If the ends of ei are in different components of (V,T) Add

ei to T

1

8

7

1

2

2

u

v

2

3

2

4

1

3

5

1

8

3

Slide10

Claim:

At the end of the algorithm,

T

is connected.

Proof:

Suppose not.

Then there are vertices

u

and

v

in different

components

of (V,

T

).

Since G is connected, there is a

u

-

v

path

P

in G.

Some edge

e

2

P

must connect different components of (V,

T

).

When the algorithm considered e, it would have added it.

¥

Order E as (e1, ..., em), where we1

¸ we2 ¸ ...

¸ wemInitially T = ;

For i=1,...,m If the ends of ei are in different components of (V,T)

3

1

8

7

1

5

1

2

2

2

3

2

4

1

8

u

v

e

3

Slide11

We have shown:Claim: When this algorithm adds an edge to T, no cycle is created.Claim: At the end of the algorithm, T is connected.

So T is an acyclic, connected subgraph, i.e., a spanning tree.We will show:Theorem: This algorithm outputs a

maximum-cost

spanning tree.

Our Analysis So Far

Order E as (e

1, ..., em), where we1 ¸ w

e2 ¸ ... ¸

wemInitially T = ;For i

=1,...,m If the ends of ei are in different components of (V,T) Add e

i

to T

Slide12

Main TheoremIn fact, we will show a stronger fact:

Theorem: Let x be the characteristic vector of T at end of algorithm.Then x is an optimal solution of max { wT

x

: x

2

P

ST },where PST is the spanning tree polytope:

P

ST

=

Order E as (e

1

, ...,

e

m

), where w

e1

¸

w

e2

¸

...

¸

w

em

Initially T = ;For i=1,...,m If the ends of

ei are in different components of (V,T) Add ei to T

Slide13

Optimal LP SolutionsWe saw last time that the characteristic vector

of any spanning tree is feasible for PST.We will modify Kruskal’s Algorithm to output a feasible

dual

solution as well.

These primal & dual solutions will satisfy the

complementary slackness conditions

,and hence both are optimal.The dual of max { wTx : x2PST } is

Slide14

Complementary Slackness Conditions(From Lecture 5)

Primal

Dual

Objective

max

c

Txmin bT

yVariables

x1, …, xn

y1

,…,

y

m

Constraint matrix

A

A

T

Right-hand vector

b

c

Constraints

versus

Variables

i

th

constraint:

·

i

th constraint: ¸

ith constraint: =

x

j ¸ 0

xj · 0

xj unrestricted

yi

¸ 0yi

· 0y

i unrestricted

jth constraint: ¸

jth constraint: ·

jth constraint: =

for all

i

,

equality holds eitherfor primal or dual

for all j,

equality holds either

for primal or dual

Let x be feasible for primal and y be feasible for dual.

and

,

x and y are

both optimal

Slide15

Complementary SlacknessPrimal:

Dual:Complementary Slackness Conditions:

If x and y satisfy these conditions, both are optimal.

Slide16

“Primal-Dual” Kruskal Algorithm

Claim: y is feasible for dual LP.Proof:

y

C

¸

0 for all C

(E, since wei ¸ wei+1. (Except when i=m) Consider any edge

ei. The only non-zero y

C with ei2C are yR

k for k¸i. So

.

¥

Order E as (e

1

, ...,

e

m

), where w

e1

¸

w

e2

¸

...

¸

wem

Initially T = ; and y = 0For i=1,...,m

Set yRi

= wei - w

ei+1 If the ends of ei are in different components of (V,T)

Notation:

Let

R

i

= {e

1,...,

ei

} and wem+1

= 0

Slide17

Lemma: Suppose BµE and CµE satisfy |B

ÅC| < n-∙(C). Let

=

(C).

Let the components of (V,C) be (V1,C1), ..., (V∙,C∙).Then for some j, (Vj, BÅCj

) is not connected.Proof: We showed last time that

So So, for some j, |B Å Cj| < |V

j|-1. So BÅCj

doesn’t have enough edges to form a tree spanning

V

j

.

So (

V

j

,B

Å

C

j

) is not connected.

¥

Slide18

Let x be the characteristic vector of T at end of algorithm.Claim: x and y satisfy the complementary slackness conditions.Proof:

We showed for every edge e, so CS1 holds. Let’s check CS2. We only have yC

>0 if C=

R

i

for some

i. So suppose x(Ri) < n - ∙(Ri) for some i. Recall that x(Ri)=|TÅR

i|. (Since x is characteristic vector of T.)

Let the components of (V,Ri) be (V1,C1), ..., (V∙

,C∙). By previous lemma, for some a, (Va

,T

Å

C

a

)

is not connected.

There are vertices u,v

2

V

a

such that

u

and

v

are not connected in (V

a,TÅCa)

there is a path PµCa connecting

u and v in (Va,Ca)

So, some edge eb2P

connects two components of (Va,TÅC

a),which are also two components of (V,TÅ

Ri). Note that TÅ

Ri is the partial tree at step i of the algorithm. So when the algorithm considered e

b, it would have added it. ¥

Slide19

Vertices of the Spanning Tree PolytopeCorollary:

Every vertex of PST is the characteristic vector of a spanning tree.Proof:Consider any vertex

x

of spanning tree

polytope

.

By definition, there is a weight vector w such thatx is the unique optimal solution of max{ wTx : x2PST }.

If we ran Kruskal’s algorithm with the weights w, it would output an

optimal solution to max{ wTx : x2P

ST }that is the characteristic vector of a spanning tree T.

Thus

x

is the characteristic vector of

T

.

¥

Corollary: The World’s Worst Spanning Tree Algorithm

(in Lecture 21)

outputs a max weight spanning tree.

Slide20

What’s Next?Future C&O classes you could take

If you’re unhappy that the ellipsoid method is too slow, you can learn about practical methods in:

C&O 466: Continuous Optimization

If you liked…

You might like…

Max Flows, Min Cuts,

Spanning TreesC&O 351 “Network Flows”C&O 450 “Combinatorial Optimization”C&O 453 “Network Design”Integer Programs,

PolyhedraC&O 452 “Integer Programming”

Konig’s TheoremC&O 342 “Intro to Graph Theory”C&O 442 “Graph Theory”C&O 444 “Algebraic Graph Theory”

Convex Functions,Subgradient Inequality,KKT TheoremC&O 367 “Nonlinear Optimization”C&O 463 “Convex Optimization”

C&O 466 “Continuous Optimization”

Semidefinite

Programs

C&O 471 “

Semidefinite

Optimization”

Slide21
{"ft_lang_label":"__label__en","ft_lang_prob":0.77410674,"math_prob":0.9768123,"size":9391,"snap":"2020-10-2020-16","text_gpt3_token_len":3095,"char_repetition_ratio":0.11505273,"word_repetition_ratio":0.29855716,"special_character_ratio":0.29368544,"punctuation_ratio":0.18040293,"nsfw_num_words":0,"has_unicode_error":false,"math_prob_llama3":0.9960148,"pos_list":[0,1,2],"im_url_duplicate_count":[null,null,null],"WARC_HEADER":"{\"WARC-Type\":\"response\",\"WARC-Date\":\"2020-02-26T14:21:10Z\",\"WARC-Record-ID\":\"<urn:uuid:5892f19b-d258-428c-8a9d-7d30f0686e70>\",\"Content-Length\":\"78536\",\"Content-Type\":\"application/http; msgtype=response\",\"WARC-Warcinfo-ID\":\"<urn:uuid:2de63614-7eb1-41be-a51d-a40eb509557b>\",\"WARC-Concurrent-To\":\"<urn:uuid:9d3f30d7-4a39-4958-8c1c-7da67676ccf8>\",\"WARC-IP-Address\":\"148.72.41.22\",\"WARC-Target-URI\":\"https://www.docslides.com/stefany-barnette/c-amp-o-355-mathematical-programming-1253682\",\"WARC-Payload-Digest\":\"sha1:L7FYRNX6JMMNU2EK4WA3EVH5BE5AGFGQ\",\"WARC-Block-Digest\":\"sha1:HQMBN3SNHV75U2LS53D5RCFLVLHMIZFC\",\"WARC-Identified-Payload-Type\":\"text/html\",\"warc_filename\":\"/cc_download/warc_2020/CC-MAIN-2020-10/CC-MAIN-2020-10_segments_1581875146342.41_warc_CC-MAIN-20200226115522-20200226145522-00123.warc.gz\"}"}