# Design and Application of Secret Codes for Learning Medical Data
## 3 Design of Secret Codes for Distributed Systems
The information of a user is not included to that of the other users even after separating the resources. Construction B describes a case in which the support is separated from only one user, but it can be easily generalized to a case in which the information is extracted from different users. When we consider merging two disjoint distributed systems with secret codes, it is impossible to preserve the non-inclusive property of supports if the two codes are unified  
Figure 3: A framework for distributed systems with secret codes. without any additional modification of the structure. The interleaving of blocks is a well-known technique in the design of pseudorandom sequences [25]. We apply the technique to the structure of minimal codes as in the following construction. **Construction C.**_For minimal codes \(C_{1}\) and \(C_{2}\) of odd length \(N\) and size \(l\), where \(C_{1}=\left\{x_{1,1},\ldots,x_{1,l}\right\}\) and \(C_{2}=\left\{x_{2,1},\ldots,x_{2,l}\right\}\). Define codewords of length \(y_{i}=\left\{y_{i}[n]\mid y_{i}[n]\in\left\{0,1\right\},0\leq k\leq 2N-1\right\}\), \(1\leq i\leq l\), as_  
\[y_{i}[n]=\left\{ \begin{array}{ll}x_{1,i}\big{[}\big{\lfloor}\frac{n}{2} \big{\rfloor}\big{\rfloor},&\text{if $n$ is even;}\\ x_{2,i}\big{\lfloor}\big{\lfloor}\frac{n}{2}\big{\rfloor}\big{\rfloor},&\text{ if $n$ is odd,}\end{array} \right. \tag{6}\]  
_where \(\lfloor x\rfloor\) is the greatest integer less than \(x\). Define a new code \(C_{\text{C}}\) as the set of all combination of \(C_{1}\) and \(C_{2}\)._  
In Construction C, if the index of \(y_{i}[n]\) is even, the code structure follows \(C_{1}\). Otherwise, it follows \(C_{2}\). Since the non-inclusive properties and linearity are preserved by the structure of the original codes, the new code could be used in merging two disjoint systems. Moreover, the extension can be generalized to the case of merging three or more distinct systems. Therefore, when two or more distributed systems are merged, we do not need to design a new code for the new system. When we have two distinct secret codes of relatively prime lengths, it is possible to enlarge the number of codewords and the length as in the following construction. **Construction D.**_For two minimal codes, \(C_{1}=\left\{x_{1,1},\ldots,x_{1,l_{1}}\right\}\) of length \(N_{1}\) and size \(l_{1}\), and \(C_{2}=\left\{x_{2,1},\ldots,x_{2,l_{2}}\right\}\) of lengths \(N_{2}\) and size \(l_{2}\), assume that \(N_{1}\) and \(N_{2}\) are relatively prime. Define codewords of length \(y_{i,j}=\left\{y_{i,j}[n]\mid y_{i,j}[n]\in\left\{0,1\right\},\,0\leq n\leq N_ {1}N_{2}-1\right\}\), \(1\leq i\leq l_{1}\), \(1\leq j\leq l_{2}\), as_  
\[y_{i,j}[n]= \begin{cases}1,&\text{if $(n\text{ mod }N_{1})\in supp(x_{1,i})$ and $(n\text{ mod }N_{2})\in supp \big{(}x_{2,j}\big{)}$;}\\ 0,&\text{otherwise.}\end{cases}  \tag{7}\]  
_where \((x\text{ mod }y)\) means the remainder of \(x\) divided by \(y\). Define a new code \(C_{D}\) as collection of all \(y_{i,j}\)s for \(1\leq i\leq l_{1}\) and \(1\leq i\leq l_{2}\)._  
Figure 4 shows application scenarios for Constructions A and B. The two constructions correspond to a case in which a user or a device leaves or joins the federation, respectively. Construction C can be applied to a situation where two distributed systems are merged into one, as shown in Figure 5. The original codes are embedded into the extended code without a change in the structure in Construction C. Therefore, any new algebraic design of the distribution is not required for that case. It is also easy to generalize to a case in which three or more systems are merged. Note that the three constructions can be combined according to the application scenarios, and several known constructions, including those in Table 1, can be applied to the four constructions. Figure 4: Corresponding scenarios for Constructions (**a**) A and (**b**) B.  
Figure 5: Corresponding scenario for Construction C.