Hello Stephan,
you shouldn't, period. The manual help once again
http://katlas.org/wiki/DT_(Dowker-Thistlethwaite)_Codes
says
DTCode also acts as a "type caster", so for example, DTCode[K] where K is
is a named knot or link returns the DT code of K.
So one looks to the link table in the case of links
(http://katlas.org/wiki/The_Thistlethwaite_Link_Table), all links
KnotTheory knows about are listed. No need for iteration on integer lists
(that might take a very very very long time if the list is an n-tupel with
n > 1).
First get the DTCodes[] out of the list
In[13]:= DTCode[Link[8, Alternating, 1]]
During evaluation of In[13]:= KnotTheory::loading: Loading precomputed
data in PD4Links`.
Out[13]= DTCode[{6, 8}, {10, 14, 12, 16, 2, 4}]
In[14]:= DTCode[Link[8, NonAlternating, 1]]
Out[14]= DTCode[{6, -8}, {-10, 14, -12, -16, -2, 4}]
if for example a link with 8 crossings
(http://katlas.org/wiki/The_Thistlethwaite_Link_Table_L8n1-L8n8) has the
name 'L8n1' than this is
Link[8, NonAlternating, 1], and if it has the name 'L8a19' in the table,
then it is Link[8,Alternating, 19]. This can be plotted without actually
realizing the DTCode[]:
In[17]:= DrawPD[DTCode[Link[8, Alternating, 1]], {Gap -> 0.025}]
In[18]:= DrawPD[DTCode[Link[8, NonAlternating, 1]], {Gap -> 0.025}]
In[19]:= DrawPD[DTCode[Link[8, Alternating, 19]], {Gap -> 0.025}]
if you really want to iterate, here is a linear opportunity (may be you
meant that):
In[53]:= Clear[howManyLinks]
howManyLinks[k_Integer, a_Integer] := Block[{o = 1},
If[a == 1,
While[Depth[DTCode[Link[k, Alternating, o]]] == 3, o += 1];
Print["There are ", o - 1, " alternating links with ", k, " crossings
in KnotTheory."], (* else *)
While[Depth[DTCode[Link[k, NonAlternating, o]]] == 3, o += 1];
Print["There are ", o - 1, " non-alternating links with ", k, "
crossings in KnotTheory."]
]
] /; k > 1 && k != 3 && k < 12 && (a == 0 || a == 1)
In[56}:= howManyLinks[11, 0]
There are 459 non-alternating links with 11 crossings in KnotTheory.
In[58]:= howManyLinks[11, 1]
There are 548 alternating links with 11 crossings in KnotTheory.
Mit den besten grüssen
Udo.
On Mon, 06 Aug 2018 18:23:13 +0200, Stephan Rosebrock
<rosebrock@XXXXXXX.de> wrote:
Hi Udo and Peter, it is possible, to draw a knot or a link by giving its
Dowker notation: Show[DrawPD[DTCode[{6, -8}, {-10, 12, -14, 2, -4}],
{Gap -> 0.025}]] >Since I am interested to draw knots and links with
many crossings, this is interesting to me. I would like to write a small
mathematica program which takes >as input some dowker notation and a
number n. As output I would like to have the pictures of the next n
exisiting knots or links, where the program makes >the dowker notation
bigger in lexicographic order. I think I might be able to do this by
myself up to one point which I don't know: If I come to a dowker
>notation of a link which does not exist, I want the program just to
forget about it and go on to the next link. How can I do this? Best
wishes Stephan
_______________________________________________
DMUG Deutschsprachiges Mathematica-Forum demug@XXXXXXX.ch
http://www.mathematica.ch/mailman/listinfo/demug
Archiv: http://www.mathematica.ch/archiv.html