Identifier
Identifier
Values
[1] => 0
[1,2] => 0
[2,1] => 0
[1,2,3] => 0
[1,3,2] => 0
[2,1,3] => 0
[2,3,1] => 0
[3,1,2] => 0
[3,2,1] => 1
[1,2,3,4] => 0
[1,2,4,3] => 0
[1,3,2,4] => 0
[1,3,4,2] => 0
[1,4,2,3] => 0
[1,4,3,2] => 1
[2,1,3,4] => 0
[2,1,4,3] => 0
[2,3,1,4] => 0
[2,3,4,1] => 0
[2,4,1,3] => 0
[2,4,3,1] => 1
[3,1,2,4] => 0
[3,1,4,2] => 0
[3,2,1,4] => 1
[3,2,4,1] => 1
[3,4,1,2] => 0
[3,4,2,1] => 2
[4,1,2,3] => 0
[4,1,3,2] => 1
[4,2,1,3] => 1
[4,2,3,1] => 2
[4,3,1,2] => 2
[4,3,2,1] => 8
[1,2,3,4,5] => 0
[1,2,3,5,4] => 0
[1,2,4,3,5] => 0
[1,2,4,5,3] => 0
[1,2,5,3,4] => 0
[1,2,5,4,3] => 1
[1,3,2,4,5] => 0
[1,3,2,5,4] => 0
[1,3,4,2,5] => 0
[1,3,4,5,2] => 0
[1,3,5,2,4] => 0
[1,3,5,4,2] => 1
[1,4,2,3,5] => 0
[1,4,2,5,3] => 0
[1,4,3,2,5] => 1
[1,4,3,5,2] => 1
[1,4,5,2,3] => 0
[1,4,5,3,2] => 2
[1,5,2,3,4] => 0
[1,5,2,4,3] => 1
[1,5,3,2,4] => 1
[1,5,3,4,2] => 2
[1,5,4,2,3] => 2
[1,5,4,3,2] => 8
[2,1,3,4,5] => 0
[2,1,3,5,4] => 0
[2,1,4,3,5] => 0
[2,1,4,5,3] => 0
[2,1,5,3,4] => 0
[2,1,5,4,3] => 2
[2,3,1,4,5] => 0
[2,3,1,5,4] => 0
[2,3,4,1,5] => 0
[2,3,4,5,1] => 0
[2,3,5,1,4] => 0
[2,3,5,4,1] => 1
[2,4,1,3,5] => 0
[2,4,1,5,3] => 0
[2,4,3,1,5] => 1
[2,4,3,5,1] => 1
[2,4,5,1,3] => 0
[2,4,5,3,1] => 3
[2,5,1,3,4] => 0
[2,5,1,4,3] => 2
[2,5,3,1,4] => 2
[2,5,3,4,1] => 3
[2,5,4,1,3] => 5
[2,5,4,3,1] => 15
[3,1,2,4,5] => 0
[3,1,2,5,4] => 0
[3,1,4,2,5] => 0
[3,1,4,5,2] => 0
[3,1,5,2,4] => 0
[3,1,5,4,2] => 2
[3,2,1,4,5] => 1
[3,2,1,5,4] => 2
[3,2,4,1,5] => 1
[3,2,4,5,1] => 1
[3,2,5,1,4] => 2
[3,2,5,4,1] => 6
[3,4,1,2,5] => 0
[3,4,1,5,2] => 0
[3,4,2,1,5] => 2
[3,4,2,5,1] => 3
[3,4,5,1,2] => 0
[3,4,5,2,1] => 5
[3,5,1,2,4] => 0
[3,5,1,4,2] => 2
[3,5,2,1,4] => 5
[3,5,2,4,1] => 11
[3,5,4,1,2] => 5
[3,5,4,2,1] => 30
[4,1,2,3,5] => 0
[4,1,2,5,3] => 0
[4,1,3,2,5] => 1
[4,1,3,5,2] => 2
[4,1,5,2,3] => 0
[4,1,5,3,2] => 5
[4,2,1,3,5] => 1
[4,2,1,5,3] => 2
[4,2,3,1,5] => 2
[4,2,3,5,1] => 3
[4,2,5,1,3] => 2
[4,2,5,3,1] => 11
[4,3,1,2,5] => 2
[4,3,1,5,2] => 5
[4,3,2,1,5] => 8
[4,3,2,5,1] => 15
[4,3,5,1,2] => 5
[4,3,5,2,1] => 30
[4,5,1,2,3] => 0
[4,5,1,3,2] => 5
[4,5,2,1,3] => 5
[4,5,2,3,1] => 16
[4,5,3,1,2] => 16
[4,5,3,2,1] => 77
[5,1,2,3,4] => 0
[5,1,2,4,3] => 1
[5,1,3,2,4] => 1
[5,1,3,4,2] => 3
[5,1,4,2,3] => 3
[5,1,4,3,2] => 15
[5,2,1,3,4] => 1
[5,2,1,4,3] => 6
[5,2,3,1,4] => 3
[5,2,3,4,1] => 6
[5,2,4,1,3] => 11
[5,2,4,3,1] => 36
[5,3,1,2,4] => 3
[5,3,1,4,2] => 11
[5,3,2,1,4] => 15
[5,3,2,4,1] => 36
[5,3,4,1,2] => 16
[5,3,4,2,1] => 91
[5,4,1,2,3] => 5
[5,4,1,3,2] => 30
[5,4,2,1,3] => 30
[5,4,2,3,1] => 91
[5,4,3,1,2] => 77
[5,4,3,2,1] => 384
[1,2,3,4,5,6] => 0
[1,2,3,4,6,5] => 0
[1,2,3,5,4,6] => 0
[1,2,3,5,6,4] => 0
[1,2,3,6,4,5] => 0
[1,2,3,6,5,4] => 1
[1,2,4,3,5,6] => 0
[1,2,4,3,6,5] => 0
[1,2,4,5,3,6] => 0
[1,2,4,5,6,3] => 0
[1,2,4,6,3,5] => 0
[1,2,4,6,5,3] => 1
[1,2,5,3,4,6] => 0
[1,2,5,3,6,4] => 0
[1,2,5,4,3,6] => 1
[1,2,5,4,6,3] => 1
[1,2,5,6,3,4] => 0
[1,2,5,6,4,3] => 2
[1,2,6,3,4,5] => 0
[1,2,6,3,5,4] => 1
[1,2,6,4,3,5] => 1
[1,2,6,4,5,3] => 2
[1,2,6,5,3,4] => 2
[1,2,6,5,4,3] => 8
[1,3,2,4,5,6] => 0
[1,3,2,4,6,5] => 0
[1,3,2,5,4,6] => 0
[1,3,2,5,6,4] => 0
[1,3,2,6,4,5] => 0
[1,3,2,6,5,4] => 2
[1,3,4,2,5,6] => 0
[1,3,4,2,6,5] => 0
[1,3,4,5,2,6] => 0
[1,3,4,5,6,2] => 0
[1,3,4,6,2,5] => 0
[1,3,4,6,5,2] => 1
[1,3,5,2,4,6] => 0
[1,3,5,2,6,4] => 0
[1,3,5,4,2,6] => 1
[1,3,5,4,6,2] => 1
[1,3,5,6,2,4] => 0
[1,3,5,6,4,2] => 3
[1,3,6,2,4,5] => 0
[1,3,6,2,5,4] => 2
[1,3,6,4,2,5] => 2
[1,3,6,4,5,2] => 3
[1,3,6,5,2,4] => 5
[1,3,6,5,4,2] => 15
[1,4,2,3,5,6] => 0
[1,4,2,3,6,5] => 0
[1,4,2,5,3,6] => 0
[1,4,2,5,6,3] => 0
[1,4,2,6,3,5] => 0
[1,4,2,6,5,3] => 2
[1,4,3,2,5,6] => 1
[1,4,3,2,6,5] => 2
[1,4,3,5,2,6] => 1
[1,4,3,5,6,2] => 1
[1,4,3,6,2,5] => 2
[1,4,3,6,5,2] => 6
[1,4,5,2,3,6] => 0
[1,4,5,2,6,3] => 0
[1,4,5,3,2,6] => 2
[1,4,5,3,6,2] => 3
[1,4,5,6,2,3] => 0
[1,4,5,6,3,2] => 5
[1,4,6,2,3,5] => 0
[1,4,6,2,5,3] => 2
[1,4,6,3,2,5] => 5
[1,4,6,3,5,2] => 11
[1,4,6,5,2,3] => 5
[1,4,6,5,3,2] => 30
[1,5,2,3,4,6] => 0
[1,5,2,3,6,4] => 0
[1,5,2,4,3,6] => 1
[1,5,2,4,6,3] => 2
[1,5,2,6,3,4] => 0
[1,5,2,6,4,3] => 5
[1,5,3,2,4,6] => 1
[1,5,3,2,6,4] => 2
[1,5,3,4,2,6] => 2
[1,5,3,4,6,2] => 3
[1,5,3,6,2,4] => 2
[1,5,3,6,4,2] => 11
[1,5,4,2,3,6] => 2
[1,5,4,2,6,3] => 5
[1,5,4,3,2,6] => 8
[1,5,4,3,6,2] => 15
[1,5,4,6,2,3] => 5
[1,5,4,6,3,2] => 30
[1,5,6,2,3,4] => 0
[1,5,6,2,4,3] => 5
[1,5,6,3,2,4] => 5
[1,5,6,3,4,2] => 16
[1,5,6,4,2,3] => 16
[1,5,6,4,3,2] => 77
[1,6,2,3,4,5] => 0
[1,6,2,3,5,4] => 1
[1,6,2,4,3,5] => 1
[1,6,2,4,5,3] => 3
[1,6,2,5,3,4] => 3
[1,6,2,5,4,3] => 15
[1,6,3,2,4,5] => 1
[1,6,3,2,5,4] => 6
[1,6,3,4,2,5] => 3
[1,6,3,4,5,2] => 6
[1,6,3,5,2,4] => 11
[1,6,3,5,4,2] => 36
[1,6,4,2,3,5] => 3
[1,6,4,2,5,3] => 11
[1,6,4,3,2,5] => 15
[1,6,4,3,5,2] => 36
[1,6,4,5,2,3] => 16
[1,6,4,5,3,2] => 91
[1,6,5,2,3,4] => 5
[1,6,5,2,4,3] => 30
[1,6,5,3,2,4] => 30
[1,6,5,3,4,2] => 91
[1,6,5,4,2,3] => 77
[1,6,5,4,3,2] => 384
[2,1,3,4,5,6] => 0
[2,1,3,4,6,5] => 0
[2,1,3,5,4,6] => 0
[2,1,3,5,6,4] => 0
[2,1,3,6,4,5] => 0
[2,1,3,6,5,4] => 2
[2,1,4,3,5,6] => 0
[2,1,4,3,6,5] => 0
[2,1,4,5,3,6] => 0
[2,1,4,5,6,3] => 0
[2,1,4,6,3,5] => 0
[2,1,4,6,5,3] => 3
[2,1,5,3,4,6] => 0
[2,1,5,3,6,4] => 0
[2,1,5,4,3,6] => 2
[2,1,5,4,6,3] => 3
[2,1,5,6,3,4] => 0
[2,1,5,6,4,3] => 8
[2,1,6,3,4,5] => 0
[2,1,6,3,5,4] => 3
[2,1,6,4,3,5] => 3
[2,1,6,4,5,3] => 8
[2,1,6,5,3,4] => 8
[2,1,6,5,4,3] => 40
[2,3,1,4,5,6] => 0
[2,3,1,4,6,5] => 0
[2,3,1,5,4,6] => 0
[2,3,1,5,6,4] => 0
[2,3,1,6,4,5] => 0
[2,3,1,6,5,4] => 3
[2,3,4,1,5,6] => 0
[2,3,4,1,6,5] => 0
[2,3,4,5,1,6] => 0
[2,3,4,5,6,1] => 0
[2,3,4,6,1,5] => 0
[2,3,4,6,5,1] => 1
[2,3,5,1,4,6] => 0
[2,3,5,1,6,4] => 0
[2,3,5,4,1,6] => 1
[2,3,5,4,6,1] => 1
[2,3,5,6,1,4] => 0
[2,3,5,6,4,1] => 4
[2,3,6,1,4,5] => 0
[2,3,6,1,5,4] => 3
[2,3,6,4,1,5] => 3
[2,3,6,4,5,1] => 4
[2,3,6,5,1,4] => 9
[2,3,6,5,4,1] => 24
[2,4,1,3,5,6] => 0
[2,4,1,3,6,5] => 0
[2,4,1,5,3,6] => 0
[2,4,1,5,6,3] => 0
[2,4,1,6,3,5] => 0
[2,4,1,6,5,3] => 5
[2,4,3,1,5,6] => 1
[2,4,3,1,6,5] => 3
[2,4,3,5,1,6] => 1
[2,4,3,5,6,1] => 1
[2,4,3,6,1,5] => 3
[2,4,3,6,5,1] => 8
[2,4,5,1,3,6] => 0
[2,4,5,1,6,3] => 0
[2,4,5,3,1,6] => 3
[2,4,5,3,6,1] => 4
[2,4,5,6,1,3] => 0
[2,4,5,6,3,1] => 9
[2,4,6,1,3,5] => 0
[2,4,6,1,5,3] => 5
[2,4,6,3,1,5] => 11
[2,4,6,3,5,1] => 19
[2,4,6,5,1,3] => 14
[2,4,6,5,3,1] => 63
[2,5,1,3,4,6] => 0
[2,5,1,3,6,4] => 0
[2,5,1,4,3,6] => 2
[2,5,1,4,6,3] => 5
[2,5,1,6,3,4] => 0
[2,5,1,6,4,3] => 16
[2,5,3,1,4,6] => 2
[2,5,3,1,6,4] => 5
[2,5,3,4,1,6] => 3
[2,5,3,4,6,1] => 4
[2,5,3,6,1,4] => 5
[2,5,3,6,4,1] => 19
[2,5,4,1,3,6] => 5
[2,5,4,1,6,3] => 14
[2,5,4,3,1,6] => 15
[2,5,4,3,6,1] => 24
[2,5,4,6,1,3] => 14
[2,5,4,6,3,1] => 63
[2,5,6,1,3,4] => 0
[2,5,6,1,4,3] => 16
[2,5,6,3,1,4] => 16
[2,5,6,3,4,1] => 35
[2,5,6,4,1,3] => 56
[2,5,6,4,3,1] => 190
[2,6,1,3,4,5] => 0
[2,6,1,3,5,4] => 3
[2,6,1,4,3,5] => 3
[2,6,1,4,5,3] => 11
[2,6,1,5,3,4] => 11
[2,6,1,5,4,3] => 66
[2,6,3,1,4,5] => 3
[2,6,3,1,5,4] => 17
[2,6,3,4,1,5] => 6
[2,6,3,4,5,1] => 10
[2,6,3,5,1,4] => 26
[2,6,3,5,4,1] => 70
[2,6,4,1,3,5] => 11
[2,6,4,1,5,3] => 42
[2,6,4,3,1,5] => 36
[2,6,4,3,5,1] => 70
[2,6,4,5,1,3] => 56
[2,6,4,5,3,1] => 224
[2,6,5,1,3,4] => 21
[2,6,5,1,4,3] => 133
[2,6,5,3,1,4] => 91
[2,6,5,3,4,1] => 210
[2,6,5,4,1,3] => 314
[2,6,5,4,3,1] => 1071
[3,1,2,4,5,6] => 0
[3,1,2,4,6,5] => 0
[3,1,2,5,4,6] => 0
[3,1,2,5,6,4] => 0
[3,1,2,6,4,5] => 0
[3,1,2,6,5,4] => 3
[3,1,4,2,5,6] => 0
[3,1,4,2,6,5] => 0
[3,1,4,5,2,6] => 0
[3,1,4,5,6,2] => 0
[3,1,4,6,2,5] => 0
[3,1,4,6,5,2] => 3
[3,1,5,2,4,6] => 0
[3,1,5,2,6,4] => 0
[3,1,5,4,2,6] => 2
[3,1,5,4,6,2] => 3
[3,1,5,6,2,4] => 0
[3,1,5,6,4,2] => 11
[3,1,6,2,4,5] => 0
[3,1,6,2,5,4] => 5
[3,1,6,4,2,5] => 5
[3,1,6,4,5,2] => 11
[3,1,6,5,2,4] => 16
[3,1,6,5,4,2] => 66
[3,2,1,4,5,6] => 1
[3,2,1,4,6,5] => 2
[3,2,1,5,4,6] => 2
[3,2,1,5,6,4] => 3
[3,2,1,6,4,5] => 3
[3,2,1,6,5,4] => 16
[3,2,4,1,5,6] => 1
[3,2,4,1,6,5] => 3
[3,2,4,5,1,6] => 1
[3,2,4,5,6,1] => 1
[3,2,4,6,1,5] => 3
[3,2,4,6,5,1] => 8
[3,2,5,1,4,6] => 2
[3,2,5,1,6,4] => 5
[3,2,5,4,1,6] => 6
[3,2,5,4,6,1] => 8
[3,2,5,6,1,4] => 5
[3,2,5,6,4,1] => 28
[3,2,6,1,4,5] => 3
[3,2,6,1,5,4] => 22
[3,2,6,4,1,5] => 17
[3,2,6,4,5,1] => 29
[3,2,6,5,1,4] => 56
[3,2,6,5,4,1] => 168
[3,4,1,2,5,6] => 0
[3,4,1,2,6,5] => 0
[3,4,1,5,2,6] => 0
[3,4,1,5,6,2] => 0
[3,4,1,6,2,5] => 0
[3,4,1,6,5,2] => 5
[3,4,2,1,5,6] => 2
[3,4,2,1,6,5] => 8
[3,4,2,5,1,6] => 3
[3,4,2,5,6,1] => 4
[3,4,2,6,1,5] => 11
[3,4,2,6,5,1] => 28
[3,4,5,1,2,6] => 0
[3,4,5,1,6,2] => 0
[3,4,5,2,1,6] => 5
[3,4,5,2,6,1] => 9
[3,4,5,6,1,2] => 0
[3,4,5,6,2,1] => 14
[3,4,6,1,2,5] => 0
[3,4,6,1,5,2] => 5
[3,4,6,2,1,5] => 21
[3,4,6,2,5,1] => 49
[3,4,6,5,1,2] => 14
[3,4,6,5,2,1] => 112
[3,5,1,2,4,6] => 0
[3,5,1,2,6,4] => 0
[3,5,1,4,2,6] => 2
[3,5,1,4,6,2] => 5
[3,5,1,6,2,4] => 0
[3,5,1,6,4,2] => 21
[3,5,2,1,4,6] => 5
[3,5,2,1,6,4] => 16
[3,5,2,4,1,6] => 11
[3,5,2,4,6,1] => 19
[3,5,2,6,1,4] => 21
[3,5,2,6,4,1] => 84
[3,5,4,1,2,6] => 5
[3,5,4,1,6,2] => 14
[3,5,4,2,1,6] => 30
[3,5,4,2,6,1] => 63
[3,5,4,6,1,2] => 14
[3,5,4,6,2,1] => 112
[3,5,6,1,2,4] => 0
[3,5,6,1,4,2] => 21
[3,5,6,2,1,4] => 42
[3,5,6,2,4,1] => 126
[3,5,6,4,1,2] => 70
[3,5,6,4,2,1] => 414
[3,6,1,2,4,5] => 0
[3,6,1,2,5,4] => 5
[3,6,1,4,2,5] => 5
[3,6,1,4,5,2] => 16
[3,6,1,5,2,4] => 21
[3,6,1,5,4,2] => 112
[3,6,2,1,4,5] => 9
[3,6,2,1,5,4] => 56
[3,6,2,4,1,5] => 26
[3,6,2,4,5,1] => 55
[3,6,2,5,1,4] => 112
[3,6,2,5,4,1] => 370
[3,6,4,1,2,5] => 16
[3,6,4,1,5,2] => 56
[3,6,4,2,1,5] => 91
[3,6,4,2,5,1] => 224
[3,6,4,5,1,2] => 70
[3,6,4,5,2,1] => 462
[3,6,5,1,2,4] => 42
[3,6,5,1,4,2] => 224
[3,6,5,2,1,4] => 294
[3,6,5,2,4,1] => 882
[3,6,5,4,1,2] => 468
[3,6,5,4,2,1] => 2625
[4,1,2,3,5,6] => 0
[4,1,2,3,6,5] => 0
[4,1,2,5,3,6] => 0
[4,1,2,5,6,3] => 0
[4,1,2,6,3,5] => 0
[4,1,2,6,5,3] => 3
[4,1,3,2,5,6] => 1
[4,1,3,2,6,5] => 3
[4,1,3,5,2,6] => 2
[4,1,3,5,6,2] => 3
[4,1,3,6,2,5] => 5
[4,1,3,6,5,2] => 17
[4,1,5,2,3,6] => 0
[4,1,5,2,6,3] => 0
[4,1,5,3,2,6] => 5
[4,1,5,3,6,2] => 11
[4,1,5,6,2,3] => 0
[4,1,5,6,3,2] => 21
[4,1,6,2,3,5] => 0
[4,1,6,2,5,3] => 5
[4,1,6,3,2,5] => 14
[4,1,6,3,5,2] => 42
[4,1,6,5,2,3] => 16
[4,1,6,5,3,2] => 133
[4,2,1,3,5,6] => 1
[4,2,1,3,6,5] => 3
[4,2,1,5,3,6] => 2
[4,2,1,5,6,3] => 3
[4,2,1,6,3,5] => 5
[4,2,1,6,5,3] => 22
[4,2,3,1,5,6] => 2
[4,2,3,1,6,5] => 8
[4,2,3,5,1,6] => 3
[4,2,3,5,6,1] => 4
[4,2,3,6,1,5] => 11
[4,2,3,6,5,1] => 29
[4,2,5,1,3,6] => 2
[4,2,5,1,6,3] => 5
[4,2,5,3,1,6] => 11
[4,2,5,3,6,1] => 19
[4,2,5,6,1,3] => 5
[4,2,5,6,3,1] => 49
[4,2,6,1,3,5] => 5
[4,2,6,1,5,3] => 32
[4,2,6,3,1,5] => 42
[4,2,6,3,5,1] => 90
[4,2,6,5,1,3] => 77
[4,2,6,5,3,1] => 350
[4,3,1,2,5,6] => 2
[4,3,1,2,6,5] => 8
[4,3,1,5,2,6] => 5
[4,3,1,5,6,2] => 9
[4,3,1,6,2,5] => 16
[4,3,1,6,5,2] => 56
[4,3,2,1,5,6] => 8
[4,3,2,1,6,5] => 40
[4,3,2,5,1,6] => 15
[4,3,2,5,6,1] => 24
[4,3,2,6,1,5] => 66
[4,3,2,6,5,1] => 168
[4,3,5,1,2,6] => 5
[4,3,5,1,6,2] => 14
[4,3,5,2,1,6] => 30
[4,3,5,2,6,1] => 63
[4,3,5,6,1,2] => 14
[4,3,5,6,2,1] => 112
[4,3,6,1,2,5] => 16
[4,3,6,1,5,2] => 77
[4,3,6,2,1,5] => 133
[4,3,6,2,5,1] => 350
[4,3,6,5,1,2] => 140
[4,3,6,5,2,1] => 876
[4,5,1,2,3,6] => 0
[4,5,1,2,6,3] => 0
[4,5,1,3,2,6] => 5
[4,5,1,3,6,2] => 16
[4,5,1,6,2,3] => 0
[4,5,1,6,3,2] => 42
[4,5,2,1,3,6] => 5
[4,5,2,1,6,3] => 16
[4,5,2,3,1,6] => 16
[4,5,2,3,6,1] => 35
[4,5,2,6,1,3] => 21
[4,5,2,6,3,1] => 126
[4,5,3,1,2,6] => 16
[4,5,3,1,6,2] => 56
[4,5,3,2,1,6] => 77
[4,5,3,2,6,1] => 190
click to show generating function       
Description
The number of long braid edges in the graph of braid moves of a permutation.
Given a permutation $\pi$, let $\operatorname{Red}(\pi)$ denote the set of reduced words for $\pi$ in terms of simple transpositions $s_i = (i,i+1)$. We now say that two reduced words are connected by a long braid move if they are obtained from each other by a modification of the form $s_i s_{i+1} s_i \leftrightarrow s_{i+1} s_i s_{i+1}$ as a consecutive subword of a reduced word.
For example, the two reduced words $s_1s_3s_2s_3$ and $s_1s_2s_3s_2$ for
$$(124) = (12)(34)(23)(34) = (12)(23)(34)(23)$$
share an edge because they are obtained from each other by interchanging $s_3s_2s_3 \leftrightarrow s_3s_2s_3$.
This statistic counts the number of such short braid moves among all reduced words.
Code
def long_braid_move_graph(pi):
    V = [ tuple(w) for w in pi.reduced_words() ]
    is_edge = lambda w1,w2: w1 != w2 and any( w1[:i] == w2[:i] and w1[i+3:] == w2[i+3:] and w1[i] != w2[i] and w1[i+2] != w2[i+2] and w1[i] == w1[i+2]for i in range(len(w1)-2) )
    return Graph([V,is_edge])

def statistic(pi):
    return len( long_braid_move_graph(pi).edges() )

Created
Jul 03, 2017 at 16:58 by Christian Stump
Updated
Apr 01, 2018 at 22:25 by Martin Rubey