Skip to content

Instantly share code, notes, and snippets.

ordering of the seifert circles
{1: [18, 4], 2: [9, 3, 19, 11, 17, 5, 13, 7, 1], 3: [10, 20, 16, 12, 6, 14, 22, 8, 2], 4: [21, 15]}
different crossings belonging to different seifert circles
{1: [[18, 4, 19, 3], [17, 4, 18, 5]], 2: [[1, 9, 2, 8], [9, 3, 10, 2], [5, 13, 6, 12], [13, 7, 14, 6], [22, 7, 1, 8], [19, 11, 20, 10], [16, 11, 17, 12], [18, 4, 19, 3], [17, 4, 18, 5]], 3: [[1, 9, 2, 8], [9, 3, 10, 2], [5, 13, 6, 12], [13, 7, 14, 6], [22, 7, 1, 8], [19, 11, 20, 10], [16, 11, 17, 12], [21, 14, 22, 15], [20, 16, 21, 15]], 4: [[21, 14, 22, 15], [20, 16, 21, 15]]}
leaving of the crossings
[[[4, 19], [18, 5]], [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [4, 19], [18, 5]], [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [22, 15], [16, 21]], [[22, 15], [16, 21]]]
entering of the crossings
[[9, 2], [13, 6], [1, 8], [9, 2], [13, 6], [1, 8], [4, 19], [4, 19], [18, 5], [18, 5], [3, 10], [7, 14], [7, 14], [11, 20], [11, 20], [17, 12], [4, 19], [18, 5], [7, 14], [11, 20], [22, 15], [16, 21]]
[[3, 10], [7, 14], [9, 2], [3, 10], [7, 14], [9, 2], [11, 20], [18, 5], [13, 6], [4, 19], [11, 20], [1, 8], [22, 15], [17, 12], [16, 21], [13, 6], [11, 20], [13, 6], [22, 15], [16, 21], [16, 21], [22, 15]]
[[9, 2], [13, 6], [1, 8], [9, 2], [13, 6], [1, 8], [4, 19], [4, 19], [18, 5], [18, 5], [3, 10], [7, 14], [7, 14], [11, 20], [11, 20], [17, 12], [4, 19], [18, 5], [7, 14], [11, 20], [22, 15], [16, 21]]
[[3, 10], [7, 14], [9, 2], [3, 10], [7, 14], [9, 2], [11, 20], [18, 5], [13, 6], [4, 19], [11, 20], [1, 8], [22, 15], [17, 12], [16, 21], [13, 6], [11, 20], [13, 6], [22, 15], [16, 21], [16, 21], [22, 15]]
[[9, 2], [13, 6], [1, 8], [4, 19], [4, 19], [18, 5], [18, 5], [3, 10], [7, 14], [7, 14], [11, 20], [11, 20], [17, 12], [4, 19], [18, 5], [7, 14], [11, 20], [22, 15], [16, 21]]
[[3, 10], [7, 14], [9, 2], [11, 20], [18, 5], [13, 6], [4, 19], [11, 20], [1, 8], [22, 15], [17, 12], [16, 21], [13, 6], [11, 20], [13, 6], [22, 15], [16, 21], [16, 21], [22, 15]]
Actually the problem is this ... we start with [4,19] and then look whether [4,19] has an intersection with the second dict with the same value that is 1 and if the length of intersection of it is 2 then we correspond that element to [4,19] otherwise we look an intersection in the second dict with value 2 and here we need to find a some array whose intersection with the element [4,19] is 1 now we take that element of the second dict adn continue the process ....
{1: [[4, 19], [18, 5]], 2: [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [4, 19], [18, 5]], 3: [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [22, 15], [16, 21]], 4: [[22, 15], [16, 21]]}
{1: [[18, 3], [17, 4]], 2: [[1, 8], [9, 2], [5, 12], [13, 6], [22, 7], [19, 10], [16, 11], [18, 3], [17, 4]], 3: [[1, 8], [9, 2], [5, 12], [13, 6], [22, 7], [19, 10], [16, 11], [21, 14], [20, 15]], 4: [[21, 14], [20, 15]]}
[[9, 2], [13, 6], [1, 8], [4, 19], [4, 19], [18, 5], [18, 5], [3, 10], [7, 14], [7, 14], [11, 20], [11, 20], [17, 12], [22, 15], [16, 21]]
[[3, 10], [7, 14], [9, 2], [11, 20], [18, 5], [13, 6], [4, 19], [11, 20], [1, 8], [22, 15], [17, 12], [16, 21], [13, 6], [16, 21], [22, 15]]
{1: [[4, 19], [18, 5]], 2: [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [4, 19], [18, 5]], 3: [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [22, 15], [16, 21]], 4: [[22, 15], [16, 21]]}
{1: [[18, 3], [17, 4]], 2: [[1, 8], [9, 2], [5, 12], [13, 6], [22, 7], [19, 10], [16, 11], [18, 3], [17, 4]], 3: [[1, 8], [9, 2], [5, 12], [13, 6], [22, 7], [19, 10], [16, 11], [21, 14], [20, 15]], 4: [[21, 14], [20, 15]]}
[[9, 2], [13, 6], [1, 8], [4, 19], [18, 5], [3, 10], [7, 14], [11, 20], [17, 12], [22, 15], [16, 21]]
[[3, 10], [7, 14], [9, 2], [11, 20], [13, 6], [11, 20], [22, 15], [16, 21], [13, 6], [16, 21], [22, 15]]
{1: [[4, 19], [18, 5]], 2: [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [4, 19], [18, 5]], 3: [[9, 2], [3, 10], [13, 6], [7, 14], [1, 8], [11, 20], [17, 12], [22, 15], [16, 21]], 4: [[22, 15], [16, 21]]}
{1: [[18, 3], [17, 4]], 2: [[1, 8], [9, 2], [5, 12], [13, 6], [22, 7], [19, 10], [16, 11], [18, 3], [17, 4]], 3: [[1, 8], [9, 2], [5, 12], [13, 6], [22, 7], [19, 10], [16, 11], [21, 14], [20, 15]], 4: [[21, 14], [20, 15]]}
@amitjamadagni
amitjamadagni / gist:3243505749bbf8ff8a1a
Created July 4, 2014 20:53
this is the code i have been working through ....
def seifert_to_braid(self):
#x = self.final()
sc = self.final()[0]
regions = self.final()[1]
pd_code = self.final()[2]
sign = []
for i in pd_code:
if i[1] > i[3]:
sign.append('-')
elif i[1] < i[3]:
def seifert_to_braid(self):
#x = self.final()
sc = self.final()[0]
regions = self.final()[1]
pd_code = self.final()[2]
sign = []
for i in pd_code:
if i[1] > i[3]:
sign.append('-')
elif i[1] < i[3]: