I'm a programmer and I need to write an algebraic notation for a LOOP made in one of our programs. I don't have Mathematica software, but just MathType to write formulas and notations.
The program executes 2 kinds of operation with bytes and bits sets:
BYTE OPERATION related to BIT POSITION and BIT OPERATION related to BIT POSITION
The first operation provides a kind of TRANSPOSITION of the bytes in the set. The second operation provides a kind of SUBSTITUTION of the bytes in the same set.
Let me make a sample of these ops:
I have two groups of numbers, (A) and (B):
A = {1,0,0,1,1,0} and B = {14,45,98,23,99,09)
In the first step, I get all 'bits' from (A) and order (B) if the related position bit of (A) = 1. In the second step, I do the same but considering the 0 bits. At the end, I do an UNION of the both sets.
Ex.: First Step: A = {1,0,0,1,1,0} - B={14,45,98,23,99,09) Result = {14,23,99}
Second Step: A = {1,0,0,1,1,0} - B={14,45,98,23,99,09) Result = {45,98,09}
Result = {14,23,99,45,98,09}
In the second operation (bit by bit) the same algorithm is performed BUT instead to get the bytes of (B) I select bit-by-bit for the (B) set. But, it's fundamentaly the same operation.
My questions:
1- Is it a Permutation, an Arragement, a Simple Set?
2- How do I make a math/algebraic notation of these operations?
3- Can I point the total possibilities of these operations as (B!)? Is it really a factorial, even if I'm not exploring ALL arragements but just the achieved by the interaction of (A)?
Thanks in advance for ANY kind of help. Kind regards, David
The answer to question $1$ is that it is neither.
The answer to question $2$ is you can make any notation you want.
As for question three I will answer the question when all of the numbers in $B$ are different.
Notice if $A$ is made up of consecutive ones and then consecutive zeroes the result is always going to be the same as $B$. As an example when $A=\{1,2,3,4,5,6\}$ and $B=\{1,1,1,0,0,0\}$ you'll get back $B$.
Excluding those two cases if you take different values for $A$ you get different results.
The reason is that if $B$ is not of the type described above it contains a sub-string $01$, and because of that $B$ is uniquely determined. (Try to see why this happens).
So there are $2^n-n$ ways to arrange them (where $n$ is the number of elements in the set). In your case it is $2^6-6=58$