Question: Find routes through vertices - networks


I have a network problem –I think - but have never used Maple to solve a network problem (nor have I ever solved a network problem as far as I am aware).
My problem is of this form. I have sixteen vertices, four on each side of a square with sides a, b, c and d
An example
a2 connects to bj, cm       j=1..4, m=1..4
a3 connects to dn           n=1..4
b3 connects to cm, dn
b4 connects to ai            i=1..4
c1 connects to bj
c4 connects to ai, dn
d1 connects to ai, bj
d2 connects to cm
what I want to find are all of the different routes which connect all four sides ie I want to identify all the combinations of ai,bj, cm, dn.   You cannot connect to the same side. The order of the route does not matter ie a2,b3,d1,c4 is fine.
Any help most appreciated
Please Wait...