Lightly Documented Features: Difference between revisions

From Knot Atlas
Jump to navigationJump to search
No edit summary
 
No edit summary
 
(8 intermediate revisions by 3 users not shown)
Line 4: Line 4:


<!--$$?NumberOfKnots$$-->
<!--$$?NumberOfKnots$$-->
<!--Robot Land, no human edits to "END"-->
{{HelpLine|
n = 2 |
in = <nowiki>NumberOfKnots</nowiki> |
out= <nowiki>NumberOfKnots[n] returns the number of knots with n crossings.
NumberOfKnots[n, Alternating&#124;NonAlternating] returns the number of knots of the specified type.</nowiki>}}
<!--END-->
<!--END-->


<!--$$NumberOfKnots[16, NonAlternating]$$-->
<!--$$NumberOfKnots[16, NonAlternating]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 3 |
in = <nowiki>NumberOfKnots[16, NonAlternating]</nowiki> |
out= <nowiki>1008906</nowiki>}}
<!--END-->
<!--END-->


<!--$$?MorseLink$$-->
<!--$$?AlternatingQ$$-->
<!--Robot Land, no human edits to "END"-->
{{HelpLine|
n = 4 |
in = <nowiki>AlternatingQ</nowiki> |
out= <nowiki>AlternatingQ[D] returns True iff the knot/link diagram D is alternating.</nowiki>}}
<!--END-->
<!--END-->


Among the knots with up to 11 crossings, 564 are alternating and 238 are not:
<!--$$MorseLink[Knot[3, 1]]$$-->
<!--END-->

<!--$$?DrawMorseLink$$-->
<!--END-->


<!--$$?Show[DrawMorseLink[Link[11, Alternating, 548]]]$$-->
<!--$$Total[AlternatingQ /@ AllKnots[{0,11}]]$$-->
<!--Robot Land, no human edits to "END"-->
{{InOut|
n = 5 |
in = <nowiki>Total[AlternatingQ /@ AllKnots[{0,11}]]</nowiki> |
out= <nowiki>238 False + 564 True</nowiki>}}
<!--END-->
<!--END-->

Latest revision as of 18:24, 21 February 2013


(For In[1] see Setup)

In[2]:= ?NumberOfKnots
NumberOfKnots[n] returns the number of knots with n crossings. NumberOfKnots[n, Alternating|NonAlternating] returns the number of knots of the specified type.
In[3]:= NumberOfKnots[16, NonAlternating]
Out[3]= 1008906
In[4]:= ?AlternatingQ
AlternatingQ[D] returns True iff the knot/link diagram D is alternating.

Among the knots with up to 11 crossings, 564 are alternating and 238 are not:

In[5]:= Total[AlternatingQ /@ AllKnots[{0,11}]]
Out[5]= 238 False + 564 True