minimum cost path with left right bottom and up moves allowed