首先将问题简单抽象一下:abcd 代表四个人,R 或 L 代表火把位置, - 代表桥
[abcd - ]L ab --->过河 [ cd - ab]R time: 2
[ cd - ab]R b <---返回 [ bcd - a]L time: 2
[ bcd - a]L cd --->过河 [ b - acd]R time: 10
[ b - acd]R a <---返回 [ ab - cd]L time: 1
[ ab - cd]L ab --->过河 [ - abcd]R time: 2
合计:17
[abcd - ]L ab --->过河 [ cd - ab]R time: 2
[ cd - ab]R a <---返回 [ acd - b]L time: 1
[ acd - b]L cd --->过河 [ a - bcd]R time: 10
[ a - bcd]R b <---返回 [ ab - cd]L time: 2
[ ab - cd]L ab --->过河 [ - abcd]R time: 2
合计:17
部分其他路径,太多就不全列出
[abcd - ]L ab --->过河 [ cd - ab]R time: 2
[ cd - ab]R a <---返回 [ acd - b]L time: 1
[ acd - b]L ad --->过河 [ c - abd]R time: 10
[ c - abd]R a <---返回 [ ac - bd]L time: 1
[ ac - bd]L ac --->过河 [ - abcd]R time: 5
合计:19
[abcd - ]L ab --->过河 [ cd - ab]R time: 2
[ cd - ab]R b <---返回 [ bcd - a]L time: 2
[ bcd - a]L bc --->过河 [ d - abc]R time: 5
[ d - abc]R c <---返回 [ cd - ab]L time: 5
[ cd - ab]L cd --->过河 [ - abcd]R time: 10
合计:24
30 个状态节点,neighbor 是他的邻居,可以改变过去
[ - abcd] R id: 1 neighbor:[2,4,6,8,10,12,14,16,18,20]
[ a - bcd] L id: 2 neighbor:[1]
[ a - bcd] R id: 3 neighbor:[10,12,14,22,24,26]
[ b - acd] L id: 4 neighbor:[1]
[ b - acd] R id: 5 neighbor:[10,16,18,22,24,28]
[ c - abd] L id: 6 neighbor:[1]
[ c - abd] R id: 7 neighbor:[12,16,20,22,26,28]
[ d - abc] L id: 8 neighbor:[1]
[ d - abc] R id: 9 neighbor:[14,18,20,24,26,28]
[ ab - cd] L id:10 neighbor:[1,3,5]
[ ab - cd] R id:11 neighbor:[22,24,30]
[ ac - bd] L id:12 neighbor:[1,3,7]
[ ac - bd] R id:13 neighbor:[22,26,30]
[ ad - bc] L id:14 neighbor:[1,3,9]
[ ad - bc] R id:15 neighbor:[24,26,30]
[ bc - ad] L id:16 neighbor:[1,5,7]
[ bc - ad] R id:17 neighbor:[22,28,30]
[ bd - ac] L id:18 neighbor:[1,5,9]
[ bd - ac] R id:19 neighbor:[24,28,30]
[ cd - ab] L id:20 neighbor:[1,7,9]
[ cd - ab] R id:21 neighbor:[26,28,30]
[ abc - d] L id:22 neighbor:[3,5,7,11,13,17]
[ abc - d] R id:23 neighbor:[30]
[ abd - c] L id:24 neighbor:[3,5,9,11,15,19]
[ abd - c] R id:25 neighbor:[30]
[ acd - b] L id:26 neighbor:[3,7,9,13,15,21]
[ acd - b] R id:27 neighbor:[30]
[ bcd - a] L id:28 neighbor:[5,7,9,17,19,21]
[ bcd - a] R id:29 neighbor:[30]
[abcd - ] L id:30 neighbor:[11,13,15,17,19,21,23,25,27,29]
节点数:30
两两之间112条通路
[ a - bcd]L a --->过河 [ - abcd]R time: 1
[ b - acd]L b --->过河 [ - abcd]R time: 2
[ c - abd]L c --->过河 [ - abcd]R time: 5
[ d - abc]L d --->过河 [ - abcd]R time: 10
[ ab - cd]L ab --->过河 [ - abcd]R time: 2
[ ab - cd]L b --->过河 [ a - bcd]R time: 2
[ ab - cd]L a --->过河 [ b - acd]R time: 1
[ ac - bd]L ac --->过河 [ - abcd]R time: 5
[ ac - bd]L c --->过河 [ a - bcd]R time: 5
[ ac - bd]L a --->过河 [ c - abd]R time: 1
[ ad - bc]L ad --->过河 [ - abcd]R time: 10
[ ad - bc]L d --->过河 [ a - bcd]R time: 10
[ ad - bc]L a --->过河 [ d - abc]R time: 1
[ bc - ad]L bc --->过河 [ - abcd]R time: 5
[ bc - ad]L c --->过河 [ b - acd]R time: 5
[ bc - ad]L b --->过河 [ c - abd]R time: 2
[ bd - ac]L bd --->过河 [ - abcd]R time: 10
[ bd - ac]L d --->过河 [ b - acd]R time: 10
[ bd - ac]L b --->过河 [ d - abc]R time: 2
[ cd - ab]L cd --->过河 [ - abcd]R time: 10
[ cd - ab]L d --->过河 [ c - abd]R time: 10
[ cd - ab]L c --->过河 [ d - abc]R time: 5
[ abc - d]L bc --->过河 [ a - bcd]R time: 5
[ abc - d]L ac --->过河 [ b - acd]R time: 5
[ abc - d]L ab --->过河 [ c - abd]R time: 2
[ abc - d]L c --->过河 [ ab - cd]R time: 5
[ abc - d]L b --->过河 [ ac - bd]R time: 2
[ abc - d]L a --->过河 [ bc - ad]R time: 1
[ abd - c]L bd --->过河 [ a - bcd]R time: 10
[ abd - c]L ad --->过河 [ b - acd]R time: 10
[ abd - c]L ab --->过河 [ d - abc]R time: 2
[ abd - c]L d --->过河 [ ab - cd]R time: 10
[ abd - c]L b --->过河 [ ad - bc]R time: 2
[ abd - c]L a --->过河 [ bd - ac]R time: 1
[ acd - b]L cd --->过河 [ a - bcd]R time: 10
[ acd - b]L ad --->过河 [ c - abd]R time: 10
[ acd - b]L ac --->过河 [ d - abc]R time: 5
[ acd - b]L d --->过河 [ ac - bd]R time: 10
[ acd - b]L c --->过河 [ ad - bc]R time: 5
[ acd - b]L a --->过河 [ cd - ab]R time: 1
[ bcd - a]L cd --->过河 [ b - acd]R time: 10
[ bcd - a]L bd --->过河 [ c - abd]R time: 10
[ bcd - a]L bc --->过河 [ d - abc]R time: 5
[ bcd - a]L d --->过河 [ bc - ad]R time: 10
[ bcd - a]L c --->过河 [ bd - ac]R time: 5
[ bcd - a]L b --->过河 [ cd - ab]R time: 2
[abcd - ]L cd --->过河 [ ab - cd]R time: 10
[abcd - ]L bd --->过河 [ ac - bd]R time: 10
[abcd - ]L bc --->过河 [ ad - bc]R time: 5
[abcd - ]L ad --->过河 [ bc - ad]R time: 10
[abcd - ]L ac --->过河 [ bd - ac]R time: 5
[abcd - ]L ab --->过河 [ cd - ab]R time: 2
[abcd - ]L d --->过河 [ abc - d]R time: 10
[abcd - ]L c --->过河 [ abd - c]R time: 5
[abcd - ]L b --->过河 [ acd - b]R time: 2
[abcd - ]L a --->过河 [ bcd - a]R time: 1
[ - abcd]R a <---返回 [ a - bcd]L time: 1
[ - abcd]R b <---返回 [ b - acd]L time: 2
[ - abcd]R c <---返回 [ c - abd]L time: 5
[ - abcd]R d <---返回 [ d - abc]L time: 10
[ - abcd]R ab <---返回 [ ab - cd]L time: 2
[ - abcd]R ac <---返回 [ ac - bd]L time: 5
[ - abcd]R ad <---返回 [ ad - bc]L time: 10
[ - abcd]R bc <---返回 [ bc - ad]L time: 5
[ - abcd]R bd <---返回 [ bd - ac]L time: 10
[ - abcd]R cd <---返回 [ cd - ab]L time: 10
[ a - bcd]R b <---返回 [ ab - cd]L time: 2
[ a - bcd]R c <---返回 [ ac - bd]L time: 5
[ a - bcd]R d <---返回 [ ad - bc]L time: 10
[ a - bcd]R bc <---返回 [ abc - d]L time: 5
[ a - bcd]R bd <---返回 [ abd - c]L time: 10
[ a - bcd]R cd <---返回 [ acd - b]L time: 10
[ b - acd]R a <---返回 [ ab - cd]L time: 1
[ b - acd]R c <---返回 [ bc - ad]L time: 5
[ b - acd]R d <---返回 [ bd - ac]L time: 10
[ b - acd]R ac <---返回 [ abc - d]L time: 5
[ b - acd]R ad <---返回 [ abd - c]L time: 10
[ b - acd]R cd <---返回 [ bcd - a]L time: 10
[ c - abd]R a <---返回 [ ac - bd]L time: 1
[ c - abd]R b <---返回 [ bc - ad]L time: 2
[ c - abd]R d <---返回 [ cd - ab]L time: 10
[ c - abd]R ab <---返回 [ abc - d]L time: 2
[ c - abd]R ad <---返回 [ acd - b]L time: 10
[ c - abd]R bd <---返回 [ bcd - a]L time: 10
[ d - abc]R a <---返回 [ ad - bc]L time: 1
[ d - abc]R b <---返回 [ bd - ac]L time: 2
[ d - abc]R c <---返回 [ cd - ab]L time: 5
[ d - abc]R ab <---返回 [ abd - c]L time: 2
[ d - abc]R ac <---返回 [ acd - b]L time: 5
[ d - abc]R bc <---返回 [ bcd - a]L time: 5
[ ab - cd]R c <---返回 [ abc - d]L time: 5
[ ab - cd]R d <---返回 [ abd - c]L time: 10
[ ab - cd]R cd <---返回 [abcd - ]L time: 10
[ ac - bd]R b <---返回 [ abc - d]L time: 2
[ ac - bd]R d <---返回 [ acd - b]L time: 10
[ ac - bd]R bd <---返回 [abcd - ]L time: 10
[ ad - bc]R b <---返回 [ abd - c]L time: 2
[ ad - bc]R c <---返回 [ acd - b]L time: 5
[ ad - bc]R bc <---返回 [abcd - ]L time: 5
[ bc - ad]R a <---返回 [ abc - d]L time: 1
[ bc - ad]R d <---返回 [ bcd - a]L time: 10
[ bc - ad]R ad <---返回 [abcd - ]L time: 10
[ bd - ac]R a <---返回 [ abd - c]L time: 1
[ bd - ac]R c <---返回 [ bcd - a]L time: 5
[ bd - ac]R ac <---返回 [abcd - ]L time: 5
[ cd - ab]R a <---返回 [ acd - b]L time: 1
[ cd - ab]R b <---返回 [ bcd - a]L time: 2
[ cd - ab]R ab <---返回 [abcd - ]L time: 2
[ abc - d]R d <---返回 [abcd - ]L time: 10
[ abd - c]R c <---返回 [abcd - ]L time: 5
[ acd - b]R b <---返回 [abcd - ]L time: 2
[ bcd - a]R a <---返回 [abcd - ]L time: 1
深度为 5 的状态树,这里面总共有37条路,深度越大找到的路越多,但是生成的树就太大了
有了这棵树,手工也能很快找到一条路线
[abcd - ]L
|---[ ab - cd]R
| |---[ abc - d]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abd - c]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ acd - b]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ac - bd]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| |---[ abd - c]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ acd - b]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ad - bc]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ cd - ab]R
| | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ cd - ab]R
|---[ ac - bd]R
| |---[ abc - d]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abd - c]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ acd - b]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ab - cd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| |---[ acd - b]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ bc - ad]R
| | | |---[ abd - c]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ad - bc]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ bd - ac]R
| | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
|---[ ad - bc]R
| |---[ abd - c]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ acd - b]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ cd - ab]R
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ab - cd]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ cd - ab]R
| |---[ acd - b]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ abd - c]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ bd - ac]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ac - bd]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ bc - ad]R
| | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
|---[ bc - ad]R
| |---[ abc - d]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abd - c]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ acd - b]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ bd - ac]R
| | | | |---[ cd - ab]R
| | |---[ ab - cd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | |---[ ac - bd]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| |---[ bcd - a]L
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ bd - ac]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | |---[ cd - ab]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
|---[ bd - ac]R
| |---[ abd - c]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ acd - b]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ bc - ad]R
| | | | |---[ cd - ab]R
| | |---[ ab - cd]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | |---[ ad - bc]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ cd - ab]R
| |---[ bcd - a]L
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | | | |---[ cd - ab]R
| | |---[ bc - ad]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | |---[ cd - ab]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
|---[ cd - ab]R
| |---[ acd - b]L
| | |---[ a - bcd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ abd - c]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ bcd - a]L
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ bc - ad]R
| | | | |---[ bd - ac]R
| | |---[ ac - bd]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ bc - ad]R
| | |---[ ad - bc]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ bd - ac]R
| |---[ bcd - a]L
| | |---[ b - acd]R
| | | |---[ ab - cd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | |---[ c - abd]R
| | | |---[ ac - bd]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bc - ad]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ d - abc]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | | | |---[ bc - ad]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ d - abc]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | |---[ d - abc]R
| | | |---[ ad - bc]L
| | | | |---[ - abcd]R
| | | | |---[ a - bcd]R
| | | |---[ bd - ac]L
| | | | |---[ - abcd]R
| | | | |---[ b - acd]R
| | | |---[ cd - ab]L
| | | | |---[ - abcd]R
| | | | |---[ c - abd]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
| | | | |---[ bd - ac]R
| | | |---[ acd - b]L
| | | | |---[ a - bcd]R
| | | | |---[ c - abd]R
| | | | |---[ ac - bd]R
| | | | |---[ ad - bc]R
| | |---[ bc - ad]R
| | | |---[ abc - d]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ c - abd]R
| | | | |---[ ab - cd]R
| | | | |---[ ac - bd]R
| | |---[ bd - ac]R
| | | |---[ abd - c]L
| | | | |---[ a - bcd]R
| | | | |---[ b - acd]R
| | | | |---[ d - abc]R
| | | | |---[ ab - cd]R
| | | | |---[ ad - bc]R
|---[ abc - d]R
|---[ abd - c]R
|---[ acd - b]R
|---[ bcd - a]R