Hey i need to do nim multiplication of numbers: a) 6 ⊗ 24 b)25 ⊗ 40
I starded with a) and calculate that $6\otimes 24= 96\oplus(6\otimes 8)$ and I dont know how to calculate this to the end. In point b) and dont know how to start
Hey i need to do nim multiplication of numbers: a) 6 ⊗ 24 b)25 ⊗ 40
I starded with a) and calculate that $6\otimes 24= 96\oplus(6\otimes 8)$ and I dont know how to calculate this to the end. In point b) and dont know how to start
Here is an inefficient method to calculate nim products:
Write both factors as a sum of powers of two. (e.g. $14=8+4+2$)
Write each power of two in each summation as a product of Fermat $2$-powers, meaning numbers of the form $2^{2^n}$ for some $n\ge 0$. For example, $2^{11}=2^{8+2+1}=2^{2^3}\cdot 2^{2^1}\cdot 2^{2^0}$.
Expand out with the distributive property.
You now how have a sum of products of Fermat-two powers. If all of the Fermat $2$-powers within each product are distinct, you can simply multiply them as normal, then compute the nim sum of all summands (i.e. canceling equal $2$-powers). Otherwise, find a summand with a repeated Fermat $2$-power $2^{2^n}\otimes 2^{2^n}$, and replace it with the $2^{2^n}+2^{(2^n-1)}$.
Return to step $2$.
For example, you wanted to compute $6\otimes 8$. This goes like $$ \def\x{\otimes} \begin{align} 6\otimes 8 &\stackrel{1}=(4+2)\otimes 8 \\&\stackrel{2}=(4+2)\otimes (4\otimes 2) \\&\stackrel{3}=4\x 4 \otimes 2+2\x4\x2 \\&\stackrel{4}= (4+2)\x 2 + 4\x(2 +1) \\&\stackrel{3}=4\x 2 + 2\x2+4\x 2+4\x1 \\&\stackrel{4}=4\x 2+(2+1)+4\x 2+4 \end{align} $$ At this point, all products are of distinct Fermat $2$-powers, so you know what to do.
I can get you started for $(b)$:
$$ \begin{align} 25\otimes 40 &= (1+8+16)\x(8+32) \\&= (1+4\x2+16)(4\x 2+16\x2) \\&= \color{green}{4\x2}+\color{green}{16\x2}+(4\x4\x2\x2) \\&\;\;+(16\x4\x2\x2)+\color{green}{(16\x4\x2)}+(16\x16\x2) \end{align} $$ To simplify things somewhat, note the green summands are "done," because they have been reduced to a product of distinct Fermat $2$-powers. You can then work on each remaining summand separately. For example, the last one: $$ \begin{align} (16\x16\x2) &= (16+8)\x 2 \\&= (16+4\x 2)\x 2 \\&= 16\x 2+4\x 2\x 2 \end{align} $$ Now the $16\x 2$ part is done, and you work on $4\x 2\x 2$ by expanding $2\x 2$ into $2+1$, and so on. (I said it was inefficient!)