Possible Duplicate:
How can I remove B -> A from a list if A -> B is in the list?
I'm working toward building a graph and use some code to construct my rules which results in a form as follows:
g = {1 -> 2, 1 -> 3, 2 -> 1, 2 -> 3, 2 -> 4, 3 -> 2, 3 -> 4, 3 -> 1, 4 -> 3, 4 -> 2}
I would like to delete all reverse duplicate entries form the list, i.e. both 1->2 and 2->1 appear in the list. I would like to get rid of one of them and do this for all reverse duplicates in the list g.
@namenotification when responding; I didn't see your message until now.) – Mr.Wizard Jun 28 '12 at 07:10