Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

What a strange use of the word "symmetric": "Two grid paths are symmetric if they share the same start and end point and one can be derived from the other by swapping the order of the constituent vectors."


How so? That would be a 2-fold rotational symmetry, wouldn't it?

http://en.wikipedia.org/wiki/Rotational_symmetry


Two pieces are rotated, that doesn't make the whole thing symmetric.


I can see how defining symmetry for a pathfinding domain might be non-intuitive. What the quoted definition is trying to communicate is that paths sharing such a relation are permutations of one another and thus, symmetric.


I understand that they are "equivalent" in a certain sense, but "symmetric"?


Two equivalent paths share the same endpoints and have the same length. Two symmetric paths also have these properties but they can also be shown to be permutations of each other.

Seeing the permutation property isn't straightforward until you change your definition of a path: from an ordered sequence of edges to an ordered sequence of vectors.

Take the following two paths as examples:

p1 = {up, up, up, right, right, right} p2 = {up, right, up, right, up, right}

Not only are they equivalent but I can derive one from the other by just changing the order of the moves.

Such symmetries are plentiful on grid maps: as soon as you have a large open area, you introduce lots of possible ways to cross it.




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: