Wolfram Function Repository
Instant-use add-on functions for the Wolfram Language
Function Repository Resource:
Find the integer corresponding to a given Gray code
ResourceFunction["InverseGrayCode"][{b1,b2,…}] gives the integer corresponding to the Gray code represented by the bits bi. |
Find the integer corresponding to a given Gray code:
| In[1]:= |
|
| Out[1]= |
|
Use InverseGrayCode to generate the Thue–Morse sequence:
| In[2]:= |
|
| Out[2]= |
|
Compare with the built-in ThueMorse:
| In[3]:= |
|
| Out[3]= |
|
Use InverseGrayCode to generate the Rudin–Shapiro sequence:
| In[4]:= |
|
| Out[4]= |
|
Compare with the built-in RudinShapiro:
| In[5]:= |
|
| Out[5]= |
|
InverseGrayCode is the inverse of the resource function GrayCode:
| In[6]:= |
|
| Out[6]= |
|
This work is licensed under a Creative Commons Attribution 4.0 International License