Is the following function a bijection?

60 Views Asked by At

During my work on hash functions, I try to prove/disprove that the a linear map function $f:\mathtt{Z}_2^n\to \mathtt{Z}_2^n$, where $n=64$, is bijection.

The function is defined as followed $$f(x_0,x_1,...,x_{n-1})=(y_0,y_1,...,y_{n-1}),$$ where $$y_i=x_i+x_{i+49}+x_{i+24} \mod 2,$$ for $0\leq i\leq n-1$ (the indices $i+49$ and $i+24$ are taken modulo $n$).

I tried to find the determinant of the transformation, but did not succeed.

1

There are 1 best solutions below

0
On

I solved my problem :)

I used simply the following python computer program

import numpy as np
from scipy.linalg import det

n=64

mat=np.zeros((n,n))


for i in range(n):
    j1=i
    j2=(i+24)%n
    j3=(i+49)%n

    mat[i][j1]=1
    mat[i][j2]=1
    mat[i][j3]=1

print(det(mat)%2)

The answer is 1. thus, the transformation must be a bijection.