1
$\begingroup$

How to calculate the maximum allowed number of snakes in the game of "snakes and ladders" from mathematical/algorithmic point of view assuming that there is a nxn board?

UPD: My thoughts are simple, but they might be incorrect: I suppose once any two fields on the board cannot be involved twice forming a snake it means that in nxn board there can be nxn/2 snakes

$\endgroup$
2
$\begingroup$

If we assume any given square can be the head or tail (but not both) of at most one snake then clearly an upper limit on the number of snakes on a $n \times n$ board is $\frac {n^2} 2$. For a $m \times n$ board we can generalise this to $\frac {mn} 2$. And we can reach this upper limit if either $m$ or $n$ is even. What happens if $m$ and $n$ are both odd ?

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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