Matlab code for Cops robber puzzle solution