Question: 2 . ( ( 1 0 + 4 ) bonus pts . ) You are given an ( n times n

2.(\(10+4\) bonus pts.) You are given an \( n \times n \) binary matrix \( M \), unlimited number of \( k \times 1\) column vectors and \(1\times k \) rows vectors for all \(1\leq k \leq n \). Each length \( k \) column/row vector can be used to cover continuous \( k \) elements of one column/row of \( M \).
(a) Devise a polynomial-time algorithm to compute the minimum number of vectors such that each 1 is covered by at least one vector and that each 0 is not covered by any vector. See an example below. Hint: transform this problem into a minimum vertex cover problem on a bipartite graph.
(b) Prove that your algorithm is correct.
CMPSC 465, Fall 2024, HW 8
input: matrix M
output: 4 vectors can cover all 1 s .
2 . ( \ ( 1 0 + 4 \ ) bonus pts . ) You are given

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!