on the other hand the code dimension $K$, i.e. the number of information bits transmitted, can take any arbitrary value. The goal of code design of an $(N,K)$ polar code is to identify the $K$ best synthetic channels, namely the channels providing the highest reliability, and use them to transmit the information bits. The estimation of the reliability of each synthetic channel allows to sort them in reliability order and assign the $K$ information bits to the most reliable channels, whose indices constitute the *information set* $\mathcal{I}$ of the code. The remaining $N-K$ indices form the *frozen set* $\mathcal{F} = \mathcal{I}^C$ of the code, and the respective channels are “frozen”, not carrying any information.

Encoding
--------

An $(N,K)$ polar code is defined by its channel transformation matrix $\mathbf{G_N} = \mathbf{G_2}^{\otimes n}$ and its information set $\mathcal{I}$. The generator matrix of the code is given by the sub-matrix of $\mathbf{G_N}$ composed by the rows whose indices are stored in $\mathcal{I}$. However, the recursive structure of $\mathbf{G_N}$ allows to reduce the encoding complexity with the introduction of an auxiliary input vector $\mathbf{u}$ of length $N$. This input vector $\mathbf{u} = [u_0,u_1,\ldots,u_{N-1}]$ is generated by assigning $u_i = 0$ if $i \in \mathcal{F}$, 