Till KTH:s startsida Till KTH:s startsida

Assignment 2

Assignment 2 has deadline 18.00, December 16. This is a strict deadline. Send your solutions to me (Jens Lagergren <jensl@csc.kth.se>) and Kristoffer (Kristoffer Sahlin <kristoffer.sahlin@scilifelab.se>). 

OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS OBS!

As I announced at the lecture today, forget about the weights for the tree case and merely consider Independent Set also for that case. Also notice that I want polynomial time algorithms and that there may be exponentially many maximum size independent sets in graph, so merely computing al of them will not be sufficient. In fact, all the algorithms are supposed to be based on Dynamic Programming. 

Lärare Jens Lagergren skapade sidan 1 december 2014

kommenterade 2 december 2014

Could you recommend any chapters that will be included in the assignment?

Lärare kommenterade 3 december 2014

This assignment is concerned with exact inference in Graphical Models (Ch. 20 and other). It builds a lot on the material covered during the lectures the past two weeks. 

Lärare Jens Lagergren ändrade rättigheterna 3 december 2014

Kan därmed läsas av alla och ändras av lärare.
kommenterade 4 december 2014

If we provide an algorithm for the graph. We do not have to provide an algorithm for the trees. Is that correct?

Lärare kommenterade 4 december 2014

That is correct, but I advise you to do the tree case first as an exercise.

kommenterade 4 december 2014

Is the assignment just to provide and explain the algorithms or should we create the algorithms ourselves?

Lärare kommenterade 4 december 2014

Yes you should construct them rather than find them somewhere. Actually they should not be available in the book or the slides. 

kommenterade 5 december 2014

Hi, I do not really understand what I should do in 2.
"Provide an algorithm for uniformly generating a maximum weight independent sets in a tree T"
Does this mean that I should find all maximum weight independent sets, or one (any) maximum weight independent set?

Lärare kommenterade 6 december 2014

Say that there are k maximum independent sets in the given graph, then you should output one of them and the probability for outputting any particular of them should be 1/k. Moreover, which independent set you output in one run should be independent of the output in any other run.  So, we have a uniform distribution over the maximum independent  sets and your algorithm should sample from it. 

kommenterade 10 december 2014

Just to clarify, the new assignment for the first part of question 1 is to count the number of maximum size independent sets in a tree? (Missed the lecture.)

Lärare kommenterade 10 december 2014

Yes, using a Dynamic Programming algorithm. 

kommenterade 10 december 2014

What do you recommend we read to solve these problems?

Lärare kommenterade 10 december 2014

The exact inference chapter, i.e., Chapter 20, and the slides for Lecture  6-9. 

kommenterade 10 december 2014

I guess the new no-weights tree case also applies to the second assignment question? So that we should uniformly generate maximum size independent sets in a tree (with dynamic programming).

Lärare kommenterade 10 december 2014

Correct.

kommenterade 11 december 2014

Handing in only the graph algorithm will give maximum points? Is that correct?

Lärare kommenterade 11 december 2014

Yes more or less, i.e., correct solutions for the graph case gives maximum points.

kommenterade 11 december 2014

I'm a bit confused about the assignment, are we not finding/counting the maximum weight independent set(s) for graphs as well? Or if we want to get full score on exercise 1 and 2, should we solve the count/find the maximum weight independent set(s) for a graph given a junction tree? Or just the independent sets?

And one more thing, why can't we just find all the maximum weight independent sets for both exercise one and two? I mean you said it was fine that the algorithm was exponential in the case of the tree width right? And just count them / randomize over them and return one uniformly? Sorry if the question is stupid but I've been reading the chapters and the lecture notes and I can't find any way to do it except this way.

Lärare kommenterade 11 december 2014

I believe that all of this been treated in earlier comments, but anyway please see below :).

Consider only with maximum independent sets. 

There may be an exponential number of maximum independent sets in the size of the graph, i.e., Omega(c^n) (c a constant, n the number of vertices). Your algorithms may be exponential in w, the width of the junction tree, e.g., O(n2^w). 

The fact that w may be very small compared to n, e.g., constant, is the reason why this entire junction tree methodology has been developed. 

kommenterade 11 december 2014

Yeah sorry, the comments are a bit blurry. Maybe you could update the assignment pdf?

Ok, nice, so if we solve exercise 1 and 2 with the complexity you wrote that's fine (O(n * 2^w)?

Lärare kommenterade 11 december 2014

Yes. 

kommenterade 13 december 2014

"Provide an algorithm for counting the number of maximum
size independent sets in a graph given together with a junction tree" does this mean "count the maximum size independent sets in a graph that IS a junction tree" ? 

Lärare kommenterade 14 december 2014

No the graph has a junction tree of with w. It is a graph.