Pensieve Header: The GPV Algorithm; work in progress.

<< KnotTheory`

The sample gc below was studied at http://katlas.math.toronto.edu/drorbn/bbs/show?shot=Roukema-090518-213820.jpg

gc=GC[Ar[4,1,1],Ar[2,5,1],Ar[6,8,1],Ar[3,7,-1]]

P[gc_GC] := Module[
{n=Length[gc], k, currentarrow, currentdir},
For[k=1, k<2n, ++k,
{{currentarrow, currentdir}} = DeleteCases[Position[gc, k], {_,3}];
If[currentdir==2 && gc[[currentarrow,1]] > k,
vjgfrku
]
]

n=Length[gc]

otherend= Table[0, {2n}];
gc /. Ar[i_,j_, s_] :> (otherend[[{i,j}]] = {j,i});
otherend

DeleteCases[Position[gc, 5], {_,3}]