Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Get subsets of a given set in minimum change order
ResourceFunction["GrayCodeSubsets"][l] gives a binary reflected Gray code on set l. |
In a Gray code, each subset differs in exactly one element from its neighbors:
In[1]:= |
Out[1]= |
This work is licensed under a Creative Commons Attribution 4.0 International License