算法代写 | COMP523 – 2020 – Second CA Assignment

这个作业是完成图相关的算法编程
COMP523 – 2020 – Second CA Assignment
Advanced Algorithmic Techniques

Problem 1
An independent set of a graph G = (V, E) is a set S ⊆ V of vertices, such that for every two vertices u and v, there
is not an edge (u, v) in E. Also, recall the definition of a vertex cover, i.e., a set T of vertices such that for every edge
(u, v) ∈ E, at least one of u and v is in T.
Prove that S is an independent set if any only if V − S is a vertex cover. [10 marks]
Consider the decision version of the Maximum Independent Set problem: given a graph G = (V, E) and an integer k,
decide whether there is an independent set S of size at least k in G (i.e., whether |S| ≥ k.) Also recall the decision
version of the (minimum) Vertex Cover problem: given a graph G = (V, E) and an integer k, decide whether there is
a vertex cover of size at most k in G.
Assume that you have an algorithm A for solving the decision version of the Vertex Cover problem in O(1) time.
Design a polynomial time algorithm B that uses the algorithm A, which solves the decision version of the Maximum
Independent Set problem. Provide an argument for the correctness of the algorithm. What is the implication of the
existence of algorithm B on the computational complexity of the decision version of the Maximum Independent Set
problem? [15 marks]
Assume that you have an algorithm A for solving the decision version of the Vertex Cover problem in O(n
2
· 2
k
) time,
where n = |V | and k is the input integer parameter for the decision version of Vertex Cover. Does algorithm B solve
the decision version of the Maximum Independent Set problem in time O(n
2
· 2
k
), where n = |V | and k is the input
integer parameter for the decision version of Maximum Independent Set? Justify your answer. [5 marks]
Problem 2
Dr. Rasi Flosi-Starkasi has prepared 50 problems for the exam of his module “Advanced Algorithmic Techniques”.
Each one of these problems has two attributes:
– Its type: it is either a problem on graph algorithms, approximation algorithms or randomised algorithms.
– Its difficulty: it is either easy, moderate or difficult.
For example, it could be that Problem #34 is an easy problem on approximation algorithms.
Dr. Flosi-Starkasi would like to prepare an exam consisting of 24 of those problems, but he wants to make sure that
the exam containts 8 problems on graph algorithms, 8 problems on approximation algorithms and 8 problems on randomised algorithms and at the same time 8 easy problems, 8 moderate problems and 8 difficult problems.
Model this problem as a maximum flow problem, by explaining all the parameters of the flow network. Explain how
to find a feasible exam set (i.e., satisfying the constraints set by Dr. Flosi-Starkasi above) from the maximum flow in
the network, if it exists, or how to decide that it does not exist. [20 marks]
It turned out that the exam set by Dr. Flosi-Starkasi in the previous part of the problem was really boring. For that
reason, he decided to record an additional attribute for each problem, its entertainment value, which is a real number
between 0 and 1. Dr. Flosi-Starkasi would now like to find a feasible exam (satisfying the constraints set in the
previous part) which maximises the total entertainment value (i.e., the sum of the entertainment values of the problems
included in the exam).
Model this problem and an integer linear program (ILP). Explain the variables and the constraints of your ILP.
. [15 marks]
Problem 3
Dr. Rasi Flosi-Starkasi aims to schedule a series of 1-hour Q&A sessions with n students and has set up a doodle poll
where there are m available time slots. Every student has indicated which slots they could attend and it turns out that
any student appears in at least 1 and at most k time slots in the doodle poll. Dr. Flosi-Starkasi would like to minimise
the number of sessions that he will have to do, making sure that he does at least one session for every student (i.e.,
every student will have a chance to attend some session).
Model this problem as an integer linear program (ILP). Explain the variables and the constraints of your ILP.
. [10 marks]
Write the LP-relaxation of the ILP that you constructed above. [5 marks]
Design a rounding scheme for the LP-relaxation that results in an approximation algorithm for the problem with approximation ratio at most k. Argue about the correctness of your algorithm. [15 marks]
Is this the best approximation algorithm that one can design for this problem? Can the problem be solved in polynomial
time? If not, what is the best possible approximation that one could hope for (assuming P6=NP)? [5 marks]