GATE | GATE-CS-2004 | Question 76

In an M’N matrix such that all non-zero entries are covered in a rows and b columns. Then the maximum number of non-zero entries, such that no two are on the same row or column, is
(A) ≤ a + b
(B) ≤ max {a, b}
(C) ≤ min {M-a, N-b}
(D) ≤ min {a, b}


Answer: (D)

Explanation: Suppose a < b, for example let a = 3, b= 5, then we can put non-zero entries only in 3 rows and 5 columns. So suppose we put non-zero entries in any 3 rows in 3 different columns. Now we can’t put any other non-zero entry anywhere in matrix, because if we put it in some other row, then we will have 4 rows containing non-zeros, if we put it in one of those 3 rows, then we will have more than one non-zero entry in one row, which is not allowed.

So we can fill only “a” non-zero entries if a < b, similarly if b < a, we can put only “b” non-zero entries. So answer is ≤min(a,b), because whatever is less between a and b, we can put atmost that many non-zero entries.

So option (D) is correct.



Source: http://www.cse.iitd.ac.in/~mittal/gate/gate_math_2004.html

Quiz of this Question

My Personal Notes arrow_drop_up
Article Tags :

Be the First to upvote.


Please write to us at contribute@geeksforgeeks.org to report any issue with the above content.