3 views

Uploaded by Senior Alonzo

me

- Lec10.4.4
- jirs99
- 338-398-1-PB (1).pdf
- 00899470
- Lecture-29-CS210-2012.pptx
- Matching (Graph Theory)
- Crossing the bridge at night.pdf
- Transcript
- 7a34d23dea74c8da124fcd73a65b8df9a5ba.pdf
- lec3_JWFILES
- Level Order
- W7636.pdf
- Uthesis.ps
- Comando Para Inserir Arvore de Probabilidade
- Dp After Cp3
- whyfp
- Ame
- TVRVek1qazROelV6TnpNMU1ETTROVGMxTlRZQk1UY3lOREE1TXpRek16TTNNRE16TkRrME1EY0JNRXRRVmsxWVYxTjJVVGhLQVRNQkFYWXk=
- Multinomial Logistic Regression Model.txt
- Btree algo

You are on page 1of 8

1. (10 points) The diagram below shows a graph and the partition data structure from some

intermediate point in the execution of Kruskal’s algorithm.

a 4 d a d

3 5 1

1

f 4 b 4 g b g e

f

6 2 4 3 5

c 7 e 2 i c h i

3 1

h

Which edges in the graph are in the partial MST solution computed so far?

Consider an alternate version of Kruskal’s algorithm that does not use the partition data

structure. Instead, when considering an edge {u,v} it does a tree traversal in the current

“blue tree” containing vertex u and checks to see if v is in the tree. Give a big-O bound on

the running time of this version of Kruskal’s algorithm and explain why the running time

can be as bad as your bound.

-1-

2. (15 points) Consider a find operation on the partition data structure in which the “find

path” has 21 nodes. What is the smallest number of nodes that the partition data structure

could contain. Explain your answer.

In the O(m log log n) analysis of the partition data structure, we defined the notion of a

dominant node. Suppose the partition data structure has 16 million nodes. If the root of the

tree involved in the above find operation has a rank of 30, what is the maximum number of

nodes along the find path that could be dominant? Explain your answer.

Consider a node x with rank(x)=0 and rank(p(x))=8. Suppose we perform three operations

involving node x and x is not dominant immediately before each of these find operations.

What is the smallest possible value that rank(p(x)) can have after these three find operations

have completed? Explain your answer.

-2-

3. (12 points) The diagram below shows a partial representation of the state of the round-robin

algorithm. Specifically, it shows the graph, the tree edges and the leftist heaps (with keys

and ranks omitted).

a 4 d 4 k h(d) --

1 3 5 1 2 5

-- im

f b g m

6 2 4 3 1 2 -- gk im

c e i

-- gi dk km

3 1 2 4

h 3 j dg dg im ij h(e) --

h(a) --

ad dk ig eg -- ej

af af h(c) --

bd gk eh eh hj ij

ab ad cf bc bc

eg ej ch hj

ch cf ab bd

be

List the sets defined by the partition data structure for this state. For each set in the

partition, circle the canonical element.

In the diagram above draw an X through all heap nodes in h(e) that are considered deleted

by the algorithm.

If the tree containing e is at the front of the round-robin queue at this point in time. List the

subtrees of h(e) that are returned by the purge method in the findmin operation at the start of

the main loop. Also, show the heap that is returned by the heapify method, within findmin.

-3-

4. (15 points) The figure below shows an intermediate stage in the execution of Edmonds

algorithm for finding a maximum size matching. The matching edges are not shown

explicitly, but parent pointers are shown and the partition data structure is shown.

d e c r

k a b j

s g h p

n m i q

n 1 i q a d r 1

0 0 0 0

b c e h j p

k s m g 0 0 0 0 0 0

0 0 0 0

Draw closed curves around the vertex sets which form blossoms in the current graph.

Mark even vertices with a plus sign and odd vertices with a minus sign.

Indicate which edges are in the current matching, by marking them with an M.

If edge {g,h} is processed next, an augmenting path is found. List the vertices in that

augmenting path.

-4-

a

5. The graph at right is an instance of the symmetric traveling 2

salesman problem with distances that satisfy the triangle 2 1

inequality. Show how to construct an optimal solution using

Christofides’ algorithm. First, mark the edges in a minimum b 4 c

spanning tree. 5

Next, draw a diagram of the “odd-degree subgraph” with edge

weights and mark a subset of the edges that correspond to a

3 6 4

minimum weight perfect matching. 3

d 6 e

List the edges in the Eulerian tour, based on your answers to the previous parts.

Consider another instance of TSP and a solution to Christofides’ algorithm. Suppose the

MST has a cost of 17, the min weight perfect matching has a cost of 12 and the TSP tour

produced by the algorithm has a cost of 26. Estimate how close this tour is to the optimal

tour. Justify your answer.

-5-

6. Consider the LP instance shown below.

! x1 # ! x #

% & % 1 &

% x2 & ! 1 4 −1 2 #% x2 & ! 5 #

maximize !" 2 1 3 1 #$% & subject to % &% & ≤% &

% x3 & " 2 −1 1 1 $% x3 & " 7 $

% x4 &$ % x4 &

" " $

Write the corresponding dual in matrix form.

Let X=[1 2 6 1]T and Z=[3 7]T be feasible solutions to the primal and dual problems. Write

out the corresponding slack vectors.

Consider another LP instance with primal and dual solutions X and Z. Suppose that for the

primal, the value of the objective function with respect to X is 17 and for the dual, the value

of the objective function is also 17. Do these solutions satisfy the complementary slackness

conditions? Explain.

-6-

7. The diagram below shows an intermediate state in the execution of Edmond’s algorithm for

max weight matchings in bipartite graphs. The numbers next the vertices are the labels.

2+ 4 4

a 4 u 8 c

6 1 6 2

4 x 8 b 4 y 2+ z 3

4

4 4 1 6

d e 3

3

6 2

v

3

If the algorithm proceeds from this point, it builds a set of trees. Show these trees on the

diagram using arrows to indicate parent pointers and plus/minus signs to indicate the state

of vertices in the collection of trees.

Once the algorithm builds the set of trees, it stops to relabel the vertices. What are the values

it computes for δ1, δ2 and δ3 in this step?

What are the labels for vertices b, c and d after this step takes place?

The relabeling creates some new equality edges. What are the new equality edges?

-7-

8. The diagram at right is a partial representation of the state of Edmonds algorithm for finding

max weight matchings in general graphs. The numbers next to the vertices are their labels.

The labels for the two blossoms are also shown.

3 u

4 v 3

z b 5 unreached

B2– B1 2 3

6 3

1 x y

c

2+

1

a

4

Which of the edges in the blossoms belong to the matching?

If a relabeling step is done next, what are the values of δ1, δ2, δ3 and δ4 (assuming no other

information)?

-8-

- Lec10.4.4Uploaded byalukard_2010
- jirs99Uploaded bysexy katri
- 338-398-1-PB (1).pdfUploaded byAlvaroSilva
- 00899470Uploaded byMulti Vac
- Lecture-29-CS210-2012.pptxUploaded byMoazzam Hussain
- Matching (Graph Theory)Uploaded byMohit Gupta
- Crossing the bridge at night.pdfUploaded byDeepa Kiran
- TranscriptUploaded byKelvinator
- 7a34d23dea74c8da124fcd73a65b8df9a5ba.pdfUploaded byAdrianTegu
- lec3_JWFILESUploaded bySravan Kumar
- Level OrderUploaded byMahmoudKhedr
- W7636.pdfUploaded bysharmila
- Uthesis.psUploaded byAnonymous901
- Comando Para Inserir Arvore de ProbabilidadeUploaded byFabio Costa
- Dp After Cp3Uploaded byVikash Kumar
- whyfpUploaded bykrabava
- AmeUploaded byShashwatAg
- TVRVek1qazROelV6TnpNMU1ETTROVGMxTlRZQk1UY3lOREE1TXpRek16TTNNRE16TkRrME1EY0JNRXRRVmsxWVYxTjJVVGhLQVRNQkFYWXk=Uploaded byTrọng Ân
- Multinomial Logistic Regression Model.txtUploaded byHitesh Takhtani
- Btree algoUploaded bysmilysky
- DS-3Uploaded bySreehari E
- API ObjectsUploaded byfalmay
- lab upload today.docxUploaded byanjali
- Priority QueueUploaded byKarthikeya Cool
- Representing User Navigation in XML Retrieval with Structural Summaries.pdfUploaded byLiew2020
- Evolving Ant ColonyUploaded bywillrat
- b+treeUploaded byrebv
- final written codydillUploaded byapi-458912322
- [Answers] Questions and Exercises for MidtermUploaded byRaul Zhn
- DownloadUploaded byJack Dunn

- Candidate Advice Sample ExamUploaded bySenior Alonzo
- misUploaded bySenior Alonzo
- Linear RegressionUploaded bySaad Ahmed
- KWAKUSS2Uploaded bySenior Alonzo
- 20130916161219990 (1)Uploaded bySenior Alonzo
- ps07_16_fiadzigbey_0849Uploaded bySenior Alonzo
- Management Information System by Mr. hussyUploaded bynilud.it2182

- Chapter 2Uploaded byAnup Shukla
- Algo HomeworkUploaded bypatelnabil_11
- 5 Bounded Variable Problem With GraphUploaded byAravind Sudheesan
- Shell SortUploaded byAmit Swami
- DPD_61025_2012-13Uploaded byMartin Lau
- Programs in CUploaded bybrainkiller007
- Pajek ManualUploaded bymnkrose
- KPI Dashboard - revisited IIUploaded byRupee Rudolf Lucy Ha
- Mathcounts Mini#33 SolutionsUploaded bywshen1468
- Automata QuestionsUploaded byYawar Sohail
- Marilia Matte (Resumo)Uploaded byAline Raldi
- Chapter 2. Convolutional CodesUploaded bycoolkad81
- Notation for Social Network DataUploaded byPoonam Naidu
- Algorithm Analysis Design Lecture1 PowerPoint PresentationUploaded byPedro Ped
- irrational numbers study guide keyUploaded byapi-276774049
- Grade 8 Olympiad PhUploaded bycarina_aquino_5
- EXPONENTS.docxUploaded byIffa Nadifa Riza
- Tony Forbes-Congruence Properties of the Partition FunctionUploaded bygermanschultze
- G - Hamming Code-2Uploaded byNiftyviews
- Quantitative Aptitude - Vol 1Uploaded byRuby Sheela
- Cse-IV-graph Theory and Combinatorics [10cs42]-NotesUploaded byRajesh Kanna
- Cauchy-Davenport Theorem for Finite GroupsUploaded byBatominovski
- Chapter 3 - ExerciesUploaded byJorge Franco Ibañez
- High School Textbook ResourcesUploaded byyraghav23
- Solving Exponential and Logarithmic EquationsUploaded byUday Prakash Sahu
- SolutionsUploaded byincubusinside
- ADA Reference CardUploaded byfranco.didio1945
- Crypt 95Uploaded byJoohi Choudhary
- LEC_BCDUploaded byNurul Izzati Ahmad
- Algebraic properties of Chromatic polynomial of a graph.pdfUploaded byThilak