I have a chess board N*M. Two "magical" knights are standing in random positions (x1,y1) and (x2,y2). They are magical, because they make moves simultaneously. The question is: "how many moves are required for them to meet (minimal amount)?"
As far as I understood if amount of moves for one knight to get into position of second is odd they won t meet otherwise divide by two the minimal path. But something tells me that I am wrong! Please help!)

The knight can meet iff they start on a square of the same color. Each move each knight changes color, so if they start on different colors, they'll always be on different colors. And conversely, if they do start on the same color, any path from one knight to the other is even, so you can divide its length by 2.