Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find all overlap-free strings of a specified length
ResourceFunction["OverlapFreeStringTuples"][n] gives strings composed of two characters with lengths up to n that do not self overlap. | |
ResourceFunction["OverlapFreeStringTuples"][k,n] gives strings composed of k characters with lengths up to n that do not self overlap. | |
ResourceFunction["OverlapFreeStringTuples"][k,n,s] gives s-tuples of strings of k characters with lengths up to n that do not overlap themselves or each other. |
Find overlap-free strings with lengths up to 5:
In[1]:= |
|
Out[1]= |
|
Find overlap-free strings with lengths up to 4 and a 3-letter alphabet:
In[2]:= |
|
Out[2]= |
|
Find overlap-free pairs of strings with 2-letter alphabets and lengths up to 5:
In[3]:= |
|
Out[3]= |
|
There are no triples of non-overlapping strings up to length 5:
In[4]:= |
|
Out[4]= |
|
At length 6, there are overlap-free triples of strings:
In[5]:= |
|
Out[5]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License