Created
February 6, 2014 19:05
-
-
Save johnynek/8850549 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
You can swap with only two registers if they point to elements of a group: | |
a = a + b | |
b = a - b | |
a = a - b | |
proof: | |
a1 = a + b | |
b1 = a1 - b = a | |
a2 = -b1 + a1 = (-a) + a + b | |
So it is sufficient to have a group. Can we show anything about what is neccesary to swap any two elements using say only two binary operators? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment