-1
$\begingroup$

Given: Two $n × m$ matrices $A$ and $B$ with integer entries.
To Do: Make them completely identical. To achieve this goal, perform the following actions in a single move:
1. Choose one of the matrices, either A or B.
2. Choose either one row or one column of the selected matrix.
3. Increment all the numbers in the selected row or column by 1.

What is the minimal number of moves to perform in order to make matrices A and B equal? Or is it just impossible?

Ex: A = [1 1; 1 1] and B = [2 2; 0 0]. So in 2 moves we can make them equal (inc 1st row of A, then inc 2nd row of B)

  • 0
    What do we know about the entries of the matrices. If no restrictions are given, it may be impossible: if $B$ only has integers entries and then $a_{11} = 0.5$ for example2017-01-22
  • 0
    Both have Integer entries. And there still might be cases when its impossible.2017-01-22
  • 0
    Yes, there are cases where it is impossible. What do you wish to know then?2017-01-22
  • 0
    Minimal number of moves to make them equal.2017-01-22
  • 0
    As it is worded, we cannot provide a full answer, given that there may be cases where it is impossible and cases where it is possible. I doubt that you just want us to answer you "there are cases where it is possible; cases where it is impossible". plus, the minimal number of moves depends greatly on the two matrices involved. I can find $A, B$ such that the answer is $k$, for any natural $k$ you pick.2017-01-22
  • 0
    We can represent a solution using programming language too.2017-01-22

1 Answers 1

1

it is possible if and only if the Smith normal forms agree. I suggest you figure out (this is not difficult) how to start with an integer matrix $C$ and produce the Smith normal form $PCQ,$ where $P,Q$ are square invertible of the appropriate two sizes. Finding the Smith form for two different matrices therefore gives a method for getting from one to the other. That is, if $$ MAN = PBQ = S $$ is a Smith form, then $$ P^{-1}MAN Q^{-1} = B $$ You will need to do examples to write this in your "counting moves" style.