1
$\begingroup$

Given an N×N chessboard, with two pieces, a black pawn and a white pawn randomly placed on the chessboard. What is the minimum number of steps required by the white pawn to reach the black pawn under the following assumptions?

  1. The pawns are always inside the board.
  2. The white pawn can move in either of the 8 directions.
  3. The black pawn is always stationary.
  4. The white pawn can move only 1 step at a time.
$\endgroup$
  • $\begingroup$ Shouldn't the minimum always be 1, assuming the RNG cooperates? $\endgroup$ – Excited Raichu Jul 3 at 12:49
  • $\begingroup$ I am not sure...is this question related to probability? $\endgroup$ – susane Jul 3 at 12:52
  • 1
    $\begingroup$ Well, asking for the minimum in the context of this question doesnt make all that sense. If you mean the minimum across all of the possibilities, it's definitely 1. If you mean something else, I'm not sure if we have enough information. $\endgroup$ – Excited Raichu Jul 3 at 12:55
  • $\begingroup$ Hi @susane and welcome to Puzzling. Unfortrunately, we're a bit strict around here about what actually counts as a puzzle and this question doesn't really fit. Also, it sounds as if this is a question you got from somewhere else, and for those we require proper attribution -- we need to know where it's from, so that the source gets appropriate credit. So I've closed this as off-topic. I'm sorry if this is a discouraging introduction to Puzzling; if you're interested in puzzles, I hope you'll stay around anyway! $\endgroup$ – Gareth McCaughan Jul 3 at 14:50
1
$\begingroup$

If we number both rows and columns, then the minimum number of moves is MAX(ABS(WHITE.Row - BLACK.Row),ABS(WHITE.Column - BLACK.Column)), for any random placements of the two pawns. (In other words, the minimum number of moves is the GREATER of the difference in row number and the difference in column number .)

$\endgroup$
  • $\begingroup$ I think that is a correct answer. Thank you very much. $\endgroup$ – susane Jul 3 at 13:07

Not the answer you're looking for? Browse other questions tagged or ask your own question.