title: How to do matrix conversions by row and columns toggles?
body: <p>I have got a square matrix consisting of elements either 1
  or 0. An ith row toggle toggles all the ith row elements (1
  becomes 0 and vice versa) and jth column toggle toggles all
  the jth column elements. I have got another square matrix of
  similar size. I want to change the initial matrix to the
  final matrix using the minimum number of toggles. For example</p>
  
  <pre><code>|0 0 1|
  |1 1 1|
  |1 0 1|
  </code></pre>
  
  <p>to</p>
  
  <pre><code>|1 1 1|
  |1 1 0|
  |1 0 0|
  </code></pre>
  
  <p>would require a toggle of the first row and of the last
  column.</p>
  
  <p>What will be the correct algorithm for this?</p>