Consider the following predicate: path(Start, End, Size, Path)
Start is a cell in the grid identified by the list [row, column]. End is a cell in the grid identified by the list [row, column]. Size is the list giving the maximum row and column values. Path consists of a list of adjacent cells, where adjacent is left/right and up/down. A path has no loops; i.e. a cell can only occur once in the list.
With the following query: path([1,1], [4,4], [4,4], Path]. A valid path would be: [[1,1], [1,2], [1,3], [1,4], [2,4], [2,3], [3,3], [3,4], [4,4)].
How would you solve this?