I read a paper titled "On the entropy of LEGO", which explains how to calculate the number of ways to combine $n$ $b\times w$ LEGO blocks of the same color. For example, six $2\times4$ bricks have $915103765$ ways to combine. I wonder if could we construct a funny cipher algorithm using LEGO bricks.
Some definitions and symbols:
A $2\times4$ brick $i$ can be defined as: $b_i:=\left( \begin{array}{cc} s_0,s_1,s_2,s_3 \\ s_4,s_5,s_6,s_7 \end{array} \right)$, where $s_{i,k}:=(0/1,-/b_j)$ means if a stud $s_{i,k}$ is occupied by another brick $b_j$, then $s_{i,k}=(1,b_j)$; else if no brick is put on this stud $s_{i,k}$, then $s_{i,k}=(0,-)$.
Then, we have a key space $\mathcal{K}=\{b_1\cup b_2\cup ...\cup b_n\}$, where $n$ is the number of bricks, $\cup$ means the combination of bricks (Sorry, I cannot find an appropriate symbol to present the meaning).
The number $num$ of ways to combine $n$ $2\times4$ bricks is: $num:=(2^{n-1} + 46^{n-1})/2$, therefore, the size of $\mathcal{K}$ is the number $num=|\mathcal{K}|$.
Assuming that there is an one way function $f(k,m)\to c,k\in\mathcal{K}, m\in\mathcal{M},c\in\mathcal{C}$, where $\mathcal{M}$ is the plaintext space, and $\mathcal{C}$ is the ciphertext space.
So far, I still cannot find a method to construct the one-way function and confirm whether the LEGO bricks can be used to construct a cipher algorithm or not.