This preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full DocumentThis preview has intentionally blurred sections. Sign up to view the full version.
View Full Document
Unformatted text preview: DIS'I’INWISIIED LECTURE SIRIES c All m“ V
 MAY 23. 2011 '_:__' u 7.4 ”gnu. :l“ u. ",5. ‘ 1 ”v.4 Monday, May 2. 4 pm in 1404 Siebel Center
Natural Language Applications Across Genres:
From News to Novels Prof. Kathleen McKeown. Columbia University Monday, May 2, 6 pm In 2405 Slebel Center
Attending Graduate School: A panel discussion Tuesday, May 3. 10 am 2405 Slebel Center
Machine Learning  Modern Times
Dr Corinna Cortes (Head of Google Research, NY) Announcements: MP 7 available. Due 5/4. 11:59p.
“Ml ‘h'.1"o, Algorithms  MST Graphs: Traversal  quiz
Aloudtttm (Ox): . VISITED) WHO NEW) p__(V)
For al w In G. _(V) II MW)  WEXPLORED
m(v.w).msoovenv)
MW. VISITEO)
9—0”) Oh. I M030)  UNEXPLCXIED
M(v.w).—) Running time:
If we do not assume an
Increases to . Why? implementation. the running time Minimum Spanning Tree Algorithms:
input: connected. undirected graph G with unconstrained edge weights
oOutput: a graph G' with the following characteristics 
06' is a spanning subgraph of G
G' is connected and acyclic (a tree)
6' has minimal total weight among all such spanning trees  Kruskal‘s Algoﬁthm mmmmmmmmmmmmmmmﬁ Kruskal's Algorithm (1956) oat/at. Let :t Consost of all n VerzﬂCes and no edges. 2. bmtIa/IZQ a div/out Jet‘s Structure where each Vertex
is represented 4/ a Set. —a> “new!“ from P4 mm
W, add the edge to Tam! taée duo» of the VertICes taco Jets, cat/venous: do
not/rug (eyed ado/ A4...— edges are added to 7‘. 3 m
m
m
m
m
m
m
m
m
m
m
m
m
m N“ ". K ‘7, V? Algorithm KWSTIG)
Kruskal's Algorithm  preanalysls disjolnLS'etsforrsl: for each vertex v In Vdo
forestmakeSeuv): for! near Q.
rLsel‘te eges into Q. keyed by weights graph 1'  (ME) with E  a: while 1' has fewer than 0! edges do
edge e  QwenmwMino Let u. v be the end ints oft
If oust. m! v : Eamaaudluz then
gfﬂﬂ cgﬂ'e :1 to
or Union 0“)
éﬁmatﬁumv’fmuﬂnﬂu» return 1' Priority Sorted I re, 5 1' ad '9
—l:mlmcm , °3 ‘ "3" ' .15.
giﬁ Ahorltllm KruskclMSTlG) disjointSem forest: 0‘ .3
for each vertex v in Vdo 0( \
faresamakeSedv): n magmam by waste '
graph r  ms) with E  a. 06!“ while Thas fewer than nl edges do
edge e  ernmveMin Let u. v be I f c
lfforcsaﬂmﬂv) : or:st.ﬂnd(u) then
Add edge e to forest. smartUnion
(forestﬁnﬂwfmstﬁndmﬁ Kruskal's Algorithm  analysis Prim's algorithms (1957)
is based on the Partition Property: Consider a partition of the vertices
of 6 Into subsets U and V. Let e be an edge of minimum
weight across the partition. Then e is part of some minimum
spanning tree. Proof:
See (3473 .—? Example of Prim's algorithm  Example of Prim's algorithm  Fat II v. dlv] = ﬂnﬁnly'. .
luluIn. source: dls] = 0 lnlllalln priority (R) quoooJI']
lnlllallusotoflabolodvonlcabe. Fat II unlabelled neighbors w of v. If oost(v.w) < dlw]
dlw] I coct(v.w)
PM = V MW ‘ELW‘ Prim’s Algorithm (momma graph wlth ammo v  . Initialize structure:
' 1. For II V. dlv] = "lnllnlty'. pM = nul mil
2. mum m: an] x 0 Cl 0 3. hltlnllze pdorlty (min) queudn)lt 0 n
4. hummduwvmmaot Repeat these steps n times:  mmszrmsmam 2. Lebelvettexv(seteleg) ob) >For el unlabelled nelglbon w of v.
If ooet(v.w) < dlw] ptw] = v Prim's Algorithm (momma graph wan unconstrained edge mm): Initialize structure:
1 . For al v. dlv] = "Inﬁnity'. 9M = ml 2. “who am: dls] I 0
3. hidliz ptlomy (min) queue
4. hummdhbdodmba Repeat those steps n times: 1. Find minimum dll "WW m” V Which is best? Depends a» density of the W”:
Spa5c 3. Forlunhbollodndgtbonwofv. 1' : 2. Labelqu I‘ eastern) < dlw]
dlw] 8 ooct(v.w)
9M = v ...
View
Full Document
 Spring '09
 Heeren

Click to edit the document details