tag:blogger.com,1999:blog-4115025577315673827.post8922224145888904535..comments2019-12-04T14:40:09.489+05:30Comments on CSE Blog - quant, math, computer science puzzles: Determinant of Binary MatrixPratik Poddarhttp://www.blogger.com/profile/11577606981573330954noreply@blogger.comBlogger9125tag:blogger.com,1999:blog-4115025577315673827.post-9200211286957604192016-10-18T14:09:15.885+05:302016-10-18T14:09:15.885+05:30Consider Matrix [[1,0,1],[1,1,0],[0,1,0]] now if y...Consider Matrix [[1,0,1],[1,1,0],[0,1,0]] now if you subtract 2-1 than matrix will be [[1,0,1],[0,1,-1],[0,1,0]] now how will you make it binary array?Unknownhttps://www.blogger.com/profile/05884562272461792646noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-37811053430010124642013-06-02T18:38:59.531+05:302013-06-02T18:38:59.531+05:30Aurko's solution expanded :
If there is any r...Aurko's solution expanded : <br />If there is any row which does not contain any 1, then the determinant is 0. Otherwise in every row, there is at least one 1. Say the rows of this matrix are R_1,R_2,...,R_n. They have the property that whenever 1's occur in any R_i, they occur consecutively. Denote the position of the first 1 in row R_i by l_i and last 1 by r_i. It is clear that the row R_i gets uniquely determined by the tuple (l_i,r_i) and vice versa. Of course 1 <= l_i <= n and 1 <= l_i <= n. Further if there exist R_i,R_j such that l_i=l_j and r_i=r_j then det=0 (det is a multilinear function of rows). <br />If there exist R_i,R_j such that l_i=l_j and r_i>r_j, then by transforming R_i to R_i-R_j we obtain a new matrix whose determinant is same as original and the row R_i is now associated with tuple (1+r_j,r_i). By repeating this process, we obtain a matrix in which we have l_i \neq l_j for every i,j and that 1 <= l_i <= n for every i. Now by Aurko's argument, the determinant would either be 1 or -1.Sumit Bhagwanihttps://www.blogger.com/profile/00094235259094340406noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-28558488905879985662013-03-08T03:22:24.858+05:302013-03-08T03:22:24.858+05:30In case you are interested in a non-inductive proo...In case you are interested in a non-inductive proof: Say the rows of this matrix are R_1,R_2,...,R_n. They have the property that whenever 1's occur in any R_i, they occur consecutively. Denote the position of the first 1 in row R_i by l_i. It is clear that the row R_i gets uniquely determined by the value of l_i and vice versa. Of course 1 <= l_i <= n. If any l_i=n for some R_i, then clearly det=0. Further if there exist R_i,R_j such that l_i=l_j then det=0 (det is a multilinear function of rows). Suppose the determinant is non-zero. Note that we then have l_i \neq l_j for every i,j and that 1 <= l_i < n for every i. Thus there is a permutation p, such that 1 <= l_p(1) < l_p(2) < ... < l_p(n) < n (basically we are re-ordering the rows in increasing value of l_i's). Since the l_i's are integral it is immediately obvious that 1=l_p(1) and that l_p(i+1)=l_p(i)+1. Since the rows were permuted by p, depending on sign of p, we would get det either 1 or -1Aurko Royhttps://www.blogger.com/profile/15797065679885590711noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-83706737773893898502013-02-04T00:28:35.725+05:302013-02-04T00:28:35.725+05:30Thanks Amol, Piyush and Pritish (posted by me) for...Thanks Amol, Piyush and Pritish (posted by me) for correct solution! :)Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-71973958127020029672013-02-04T00:28:04.874+05:302013-02-04T00:28:04.874+05:30I am not able to understand your solution. Please ...I am not able to understand your solution. Please explain clearly. ThanksPratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-21382921625935383072013-02-04T00:25:03.403+05:302013-02-04T00:25:03.403+05:30Solution provided by Pritish Kamath:
[Proof by in...<br />Solution provided by Pritish Kamath:<br /><br />[Proof by induction]<br />Base case : The result is clearly true for 1x1 matrices.<br /><br />Induction step : Assume that the result is true for (N-1)x(N-1) matrices with this property.<br /><br />For an NxN matrix, there are two possibilities.<br />(a) M does not have any row with 1 as it's first column entry<br />In this case the determinant is clearly zero.<br /><br />(b) M has atleast 1 row with 1 as it's first column entry<br />Take one such row and interchange it with the first row of M and subtract this row from every other row which has 1 as it's first column entry. The resulting matrix has the property that for any row, all it's non-zero entries appear consecutively and all of them are either +1 or all of them are -1. Multiply -1 to all the rows which have -1 entries. Also, note that the (1,1) entry is 1, and it is the only non-zero entry in the entire first column. Hence the determinant is equal to the determinant of the minor of (1,1). Because we have multiplied by -1's here and there, the sign of the determinant might change, but it'll either be +1 or -1.<br />Pratik Poddarhttps://www.blogger.com/profile/11577606981573330954noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-38136711941712833062013-01-27T13:27:42.481+05:302013-01-27T13:27:42.481+05:30Here's a crude method for 3X3 matrix: by dispr...Here's a crude method for 3X3 matrix: by disproving contradiction<br /><br />Take a 3X3 matrix M. In order for it to be not equal to +1,0,-1, the co-factor of M[1][2] should be either 0 or -1. Other case will be when co-factor of one of either M[1][1] or M[1][3] is 0 and relevant are assigned to cofactors of M[1][2].<br />In the first case:<br />If cofactor of M[1][2] is zero, then last 2 elements in first and last column are zero or one; or one of them is all zero and the other one is all one. the condition is imposed that 1's will not be discontinuous in the matrix. After formulating the required matrix, we can see that determinant of matrix is not 2 or -2.<br />If cofactor of M[1][2] is -1, the cofactors of M[1][1] and M[1][3] are -1, so the determinant becomes -1.<br /> ABhttps://www.blogger.com/profile/09216897044407198742noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-38168504589169338662013-01-27T09:20:20.996+05:302013-01-27T09:20:20.996+05:30I think this can be proved using induction and a b...I think this can be proved using induction and a bit of LU factorization type procedure. My arguments goes as follows.<br /><br />For N =1 , it is trivial.<br /><br />With strong induction hypothesis, we assume that it is also true for N=1,2... k-1.<br /><br />Now for N=k, and any arbitrary matrix A, with given property, We apply following operations which keeps absolute value of determinant invariant.<br /><br />1. Permute rows of A such that, rows in which streak of 1's start at first position, are in the begining<br /><br />example :<br />[ 0, 1 <br /> 1, 1] <br /><br />becomes <br />[ 1, 1 <br /> 0, 1] <br /><br />2. And, among those rows, one with least number of 1's , comes first<br />i.e. <br /><br />example :<br />[ 1, 1, 1<br /> 1, 1, 0<br /> ..] <br /><br />becomes <br />[ 1, 1, 0<br /> 1, 1, 1<br /> ..]<br /><br />3. Now among all those rows where streak of 1's start at first position, Subtract first row from it<br /><br />example :<br />[ 1, 1, 0<br /> 1, 1, 1<br /> ..]<br /><br />becomes <br />[ 1, 1, 0<br /> 0, 0, 1<br /> ..]<br /><br />4. After this operation, Only in first row would be the only row with 1 in the first column, and the lower right N-1*N-1 block would be again a block with the stated property, hence by priciple of mathematical induction, determinant would be either of 1,0 or -1, so would be of the original matrix<br /><br /><br /> <br />Piyushhttps://www.blogger.com/profile/03036531175753773520noreply@blogger.comtag:blogger.com,1999:blog-4115025577315673827.post-63422895163591713132013-01-26T11:49:05.241+05:302013-01-26T11:49:05.241+05:30First post so pardon the formatting.Use induction....First post so pardon the formatting.Use induction. Assume the property be true for all (N-1)x (N-1)matrices . It is trivially true for 2x2 matrices. let S={R_i} be set of rows with a 1 in first column. If this set is empty then determinant is 0 and we are done. Other wise arrange the rows in S by the number of 1s in the row so that R_1 has less 1's than R_2 and so on. Subtract R_1 from all rows in S. Since all the ones are together, this operation cannot introduce a -1 in the matrix and preserves determinant. Now expand along the first column which has only one `1'. It is easy to see that the cofactor(Minor?) satisfies the binary property so that by induction determinant is either +1,-1 or 0.Amol Sahasrabuddhehttps://www.blogger.com/profile/08476311554528976224noreply@blogger.com