Identifying Knots within a List: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
No edit summary
Line 6: Line 6:
{{Startup Note}}
{{Startup Note}}


<!--$$Import["http://katlas.org/wiki/IdentifyWithin.m&action=raw"];$$--><!--END-->
<!--$$Import["http://katlas.org/wiki/IdentifyWithin.m&action=raw"];$$-->
<!--Robot Land, no human edits to "END"-->
{{In|
n = 2 |
in = <nowiki>Import["http://katlas.org/wiki/IdentifyWithin.m&action=raw"];</nowiki>}}
<!--END-->


<!--$$SubLink[pd_PD, js_List] := Module[
<!--$$SubLink[pd_PD, js_List] := Module[
Line 25: Line 30:
];
];
SubLink[pd_PD, j_] := SubLink[pd, {j}];
SubLink[pd_PD, j_] := SubLink[pd, {j}];
SubLink[L_, js_] := SubLink[PD[L], js];$$--><!--END-->
SubLink[L_, js_] := SubLink[PD[L], js];$$-->
<!--Robot Land, no human edits to "END"-->
{{In|
n = 3 |
in = <nowiki>SubLink[pd_PD, js_List] := Module[
{k, t0, t, t1, t2, S, P},
t0 = Flatten[List @@@ Skeleton[pd][[js]]];
t = pd /. x_X :> Select[x, MemberQ[t0, #] &];
t = DeleteCases[t, X[]];
k = 1;
While[
k <= Length[t],
If[ Length[t[[k]]] < 4,
t = Delete[t, k] /. (Rule @@ t[[k]]), ++k];
];
t1 = List @@ Union @@ t;
t2 = Thread[(t1) -> Range[Length[t1]]];
S = t /. t2;
P = If[S != PD[] && Length[S] >= 3, S, PD[Knot[0, 1]], S]
];
SubLink[pd_PD, j_] := SubLink[pd, {j}];
SubLink[L_, js_] := SubLink[PD[L], js];</nowiki>}}
<!--END-->


<!--$$IdentifyWithin[SubLink[Link["L11n150"], 2], AllKnots[]]$$-->
<!--$$IdentifyWithin[SubLink[Link["L11n150"], 2], AllKnots[]]$$-->
<!--Robot Land, no human edits to "END"-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
{{InOut|
n = 2 |
n = 4 |
in = <nowiki>IdentifyWithin[SubLink[Link["L11n150"], 2], AllKnots[]]</nowiki> |
in = <nowiki>IdentifyWithin[SubLink[Link["L11n150"], 2], AllKnots[]]</nowiki> |
out= <nowiki>{Knot[5, 2]}</nowiki>}}
out= <nowiki>{Knot[5, 2]}</nowiki>}}

Revision as of 21:16, 18 November 2007


IdentifyWithin[L,H], whose code is available here, returns those elements from the list of knots , whose invariant matches that of the knot . It can also recognize mirrors and connected sums of the knots in the list. Its options include turning off (on) the search for connected sums with ConnectedSum->False (True) and choosing the invariants to be used in identification by selecting, for example, Invariants->{Jones[#][q]&, HOMFLYPT[#][a,z]&}. IdentifyWithin can be used together with SubLink to determine the components of a link. For the second component of link L11n150, for instance, we get:

(For In[1] see Setup)

In[2]:= Import["http://katlas.org/wiki/IdentifyWithin.m&action=raw"];
In[3]:= SubLink[pd_PD, js_List] := Module[ {k, t0, t, t1, t2, S, P}, t0 = Flatten[List @@@ Skeleton[pd][[js]]]; t = pd /. x_X :> Select[x, MemberQ[t0, #] &]; t = DeleteCases[t, X[]]; k = 1; While[ k <= Length[t], If[ Length[t[[k]]] < 4, t = Delete[t, k] /. (Rule @@ t[[k]]), ++k]; ]; t1 = List @@ Union @@ t; t2 = Thread[(t1) -> Range[Length[t1]]]; S = t /. t2; P = If[S != PD[] && Length[S] >= 3, S, PD[Knot[0, 1]], S] ]; SubLink[pd_PD, j_] := SubLink[pd, {j}]; SubLink[L_, js_] := SubLink[PD[L], js];
In[4]:= IdentifyWithin[SubLink[Link["L11n150"], 2], AllKnots[]]
Out[4]= {Knot[5, 2]}
L11n150.gif
L11n150
5 2.gif
5_2

Unfortunately, the program does not provide absolute identification when all the used invariants cannot distinguish between two or more different knots. In that case, a list of possible candidates for is returned.