## 3 3D-VWZCC Code Construction
### 1D-VWZCC Code Construction  
_Step 1_  
First, we generate a vector \(V_{c}\) depending on the weight value and number of users, where the number of zeros is \(K\)-\(W\):  
\[V_{c}=\left[ \begin{array}{c}1\\ \vdots\\ 1\\ 0\\ \vdots\\ \vdots\\ \vdots\\ \vdots\\ 0\end{array} \right] \tag{2}\]_Step 2_  
A single-bit vertical shift operation is applied to the vector \(V_{c}\) where the number of shift operations is equal to \(N_{d}=K-1\)  
For example, \(K=3\), \(W=2\), the number of shift operations equal to \(N_{d}=2\), and we obtain three vectors \(V_{c}\)  
\[V_{\text{C1}}=\left[ \begin{array}{c}1\\ 1\\ 0\end{array} \right],\ V_{\text{C2}}=\left[ \begin{array}{c}0\\ 1\\ 1\end{array} \right],\ V_{\text{C3}}=\left[ \begin{array}{c}1\\ 0\\ 1\end{array} \right] \tag{3}\]  
_Step 3_  
Novel matrix [P] designed from vectors \(V_{cs}\), is a combination between vectors \(V_{cs}\):  
\[P=\left[V_{ci}\right]=\left[ \begin{array}{cc}V_{c1}&V_{c2}&\ldots&\ldots&V_ {ck}\end{array} \right] \tag{4}\]  
where \(i=1,\ldots,K\)  
\[P=\left[V_{ci,\ldots,K}\right]=\left[ \begin{array}{cc}V_{c1}&V_{c2}&V_{c3} \end{array} \right]=\left[ \begin{array}{c}\left[\begin{array}{c}1\\ 1\\ 0\end{array}\right]&\left[\begin{array}{c}0\\ 1\end{array}\right]&\left[\begin{array}{c}1\\ 0\\ 1\end{array}\right]\end{array} \right]\]  
Hence, \(P\) can be written as:  
\[P=\left[ \begin{array}{ccc}1&0&1\\ 1&1&0\\ 0&1&1\end{array} \right] \tag{5}\]  
After that, we notice there are overlaps between the ones (1); to remove these interferences, a new horizontal summation method \({}^{\prime}H\)' has been used, as defined by the following relation:  
\[H=\sum\limits_{i=1}^{C}\ C_{i} \tag{6}\]  
where \(H\) is the sum of the bits of each user, \(C_{i}\) is a binary bit (0 or 1), and \(C\) is the length of code. We take the previous matrix \(P\):  
\[H_{1}=\sum\
olimits_{i=1}^{3}C_{i}=1+0+1=2,\ H_{2}=\sum\
olimits_{i=1}^{3}C_ {i}=1+1+0=2,\ H_{3}=\sum\
olimits_{i=1}^{3}C_{i}=0+1+1=2\]  
\[P=\left[ \begin{array}{ccc}1&0&1\\ 1&1&0\\ 0&1&1\end{array} \right] \begin{array}{ccc}\rightarrow&H_{1}\\ \rightarrow&H_{2}\\ \rightarrow&H_{3}\end{array} \]  
The value of \(H\) is equal to 2 for all codes and is the same value of weight \(W\), so we can write \(H\) as \(W\):  
\[P=\left[ \begin{array}{ccc}\ldots&H&\ldots\\ \ldots&H&\ldots\\ \ldots&H&\ldots\end{array} \right]=\left[ \begin{array}{ccc}\ldots&W&\ldots\\ \ldots&W&\ldots\\ \ldots&W&\ldots\end{array} \right]\]  
The positions of the Hs in the \(P\) matrix are diagonal and the rest is filled with zeros. Accordingly, the result of the matrix \(P\) is divided on \(H\) in order to obtain the identity matrix of size \(K\times K\) denoted by \(P_{I}\):  
\[P_{I}=\left[\frac{P}{H}\right]=\left[ \begin{array}{ccc}H&0&0\\ 0&H&0\\ 0&0&\text{H}\\ \hline&H&\\ 0&0&\frac{H}{H}\end{array} \right]=\left[ \begin{array}{ccc}\frac{H}{H}&0&0\\ 0&\frac{H}{H}&0\\ 0&0&\frac{H}{H}\end{array} \right] \tag{7}\]For the previous example:  
\[P_{I}=\left[\frac{P}{H}\right]=\left[ \begin{array}{ccc}3&0&0\\ 0&3&0\\ 0&0&3\\ \hline&3\\ &&\\ \end{array} \right]=\left[ \begin{array}{ccc}\frac{3}{3}&0&0\\ 0&\frac{3}{3}&0\\ 0&0&\frac{3}{3}\\ \end{array} \right]=\left[ \begin{array}{ccc}1&0&0\\ 0&1&0\\ 0&0&1\\ \end{array} \right]_{K\times K}\]  
_Step 4_  
Depending on the parameters \(K\) and \(W\) in the first phase, the matrix \(P_{I}\) has a weight equal to 1 for each code, whereas the weight must be equal to 2. For that, the sub-columns \(A_{i}\) of matrix \(P_{I}\) are regenerated several times according to the requested weight. \[P_{I}=[A_{i}]=\left[ \begin{array}{cccccc}A_{1}&A_{2}&\ldots&\ldots&A_{k}\\ \end{array} \right] \tag{8}\]  
\[P_{I}=\left[ \begin{array}{cccc}\left[\begin{array}{c}1\\ 0\\ 0\end{array}\right]&\left[\begin{array}{c}0\\ 1\\ 0\end{array}\right]&\left[\begin{array}{c}0\\ 0\\ 1\end{array}\right]\end{array} \right]_{K\times K} \tag{9}\]  
\[A_{1}=\left[ \begin{array}{c}1\\ 0\\ 0\end{array} \right],\;A_{2}=\left[ \begin{array}{c}0\\ 1\\ 0\end{array} \right],\;A_{3}=\left[ \begin{array}{c}0\\ 0\\ 1\end{array}