Each Question is worth five marks. No plagiarism will be tolerated. If caught…
- User
Each Question is worth five marks. No plagiarism will be tolerated. If caught plagiarizing, there will be a zero in the assignment and a grade reduction from the final grades.
- Consider the following Subset Pair problem. Let U = {a1, a2, · · · , an} be a set of n items and let F be a family of two sized subsets of U. Moreover, let w : F → N be a weight function that assigns weight to each set in F. Find a subset S ⊆ F such that the following conditions are satisfied. (a) For every partition S1 ⊎S2 of S (S1 ∩S2 = ∅ and S1 ∪S2 = S), there exists a set Y ∈ S1 and Z ∈ S2 such that Y ∩ Z ̸= ∅. (b) S X∈S X = U (c) S is a set with a minimum possible weight that satisfies the above two conditions. Where weight of S is P
X∈S w(X).
Design an algorithm to solve the Subset Pair problem that runs in polynomial time. Prove the correctness of your algorithm and explain the running time analysis in detail. 2. Consider the following Permutation Computation problem. Given an n × n matrix A, with only 0, 1 entries, the goal is to find if there exists a permutation π : [n] → [n] such that the following holds: A[π(1), π(2)] = A[π(2), π(3)], · · · , A[π(n−1), π(n)] = 1. Design an algorithm for the Permutation Computation problem running in time 2nn
O(1). Prove the correctness of
your algorithm and explain the running time analysis in detail. 3. Consider the following Intersecting Set problem. Given a universe U, a family F of disjoint subsets of U and a family A of subsets of U. Each set X in A is associated with a budget b(X). The goal is to find a subset S ⊆ U of minimum size such that the following holds: For each set Y ∈ F, S ∩Y ̸= ∅ and for each set Z ∈ A, |Z ∩S| ≤ b(Z). Show that the Intersecting Set problem is NP-complete. Prove the correctness of your hardness reduction.
Give the complete detailed answers for this non plagiarized
- Assistant
- User
give a detailed answer for question 1
- Assistant
- User
give teh answer again
- Assistant