HI, I have been thinking about Brian's "cancellation" approach and maybe we can sort of formalize it.
Associative relations for cancelling paths: 0 = N + S = S + N 0 = NE + SW = SW + NE 0 = NW + SE = SE + NW Associative relations for simplifying paths: N = NE + NW = NW + NE S = SE + SW = SE + SW NE = N + SE = SE + N NW = N + SW = SW + N SE = S + NE = NE + S SW = S + NW = NW + S Please note that destinations are equivalent but the paths are different. Now we can do symbolic algebraic simplification. For example : ┌──┬──┬─┬──┬──┬──┬──┬─┬──┬──┐ │SE│NE│N│NW│NW│NE│NE│S│SW│SW│ └──┴──┴─┴──┴──┴──┴──┴─┴──┴──┘ N = NW + NE and SE = NE + S ┌──┬──┬─┬──┬──┬──┬──┬─┬──┬──┐ │SE│NE│N│NW│N │ │SE│ │SW│SW│ └──┴──┴─┴──┴──┴──┴──┴─┴──┴──┘ S = SE + SW ┌──┬──┬─┬──┬──┬──┬──┬─┬──┬──┐ │SE│NE│N│NW│N │ │S │ │ │SW│ └──┴──┴─┴──┴──┴──┴──┴─┴──┴──┘ 0 = N + S ┌──┬──┬─┬──┬──┬──┬──┬─┬──┬──┐ │SE│NE│N│NW│ │ │ │ │ │SW│ └──┴──┴─┴──┴──┴──┴──┴─┴──┴──┘ 0 = SE + NW ┌──┬──┬─┬──┬──┬──┬──┬─┬──┬──┐ │ │NE│N│ │ │ │ │ │ │SW│ └──┴──┴─┴──┴──┴──┴──┴─┴──┴──┘ 0 = NE + SW ┌──┬──┬─┬──┬──┬──┬──┬─┬──┬──┐ │ │ │N│ │ │ │ │ │ │ │ └──┴──┴─┴──┴──┴──┴──┴─┴──┴──┘ The count of remaining symbols is the distance in number of steps. Programming this is left as an exercise to the reader. On Tue, Dec 12, 2017 at 3:08 PM, Brian Schott <[email protected]> wrote: > No. That's not right. I need to repair my approach. > > On Tue, Dec 12, 2017 at 2:04 PM, Brian Schott <[email protected]> > wrote: > > > Another way to approach this problem first part, which was refined by > > Jimmy's > > elegant solution, follows. > > > > > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
