Discrete Mathematics
Perform basic number theory operations such as factoring:
In[1]:= |
Out[1]= | ![]() |
Find the GCD (or LCM) of any two integers:
In[2]:= |
Out[2]= | ![]() |
Display the 4th prime number:
In[1]:= |
Out[1]= | ![]() |
Test the primality of a number:
In[2]:= |
Out[2]= | ![]() |
This works with coprime numbers as well:
In[3]:= |
Out[3]= | ![]() |
Get all possible permutations of a list:
In[1]:= |
Out[1]= | ![]() |
Apply Permute to a list using disjoint Cycles:
(Cycles takes a list of lists as an argument.)In[2]:= |
Out[2]= | ![]() |
Find the permutation order:
In[3]:= |
Out[3]= | ![]() |
Generate a Graph from a list of edges:
(Use ESCueESC for an UndirectedEdge or ESCdeESC for a DirectedEdge.)In[1]:= |
Out[1]= | ![]() |
Find the shortest path between two vertices:
In[2]:= |
Out[2]= | ![]() |
Explore well-known graphs using natural-language input:
In[3]:= |
Out[3]= | ![]() |
The Wolfram Language also includes functions for combinatorics, probability, integer sequences and much more.
QUICK REFERENCE: Number Theoretic Functions »
QUICK REFERENCE: Discrete Mathematics »