# Next-Generation Blockchain Technology:
## 2 Calculating the Information Entropy  
Let us assume that a given set \(X\) contains \(N\) characters, each chosen from a set with radix \(U\geq 2\). Let \(N_{l}\), where \(l=1,2,3,\ldots,U\), be the number of \(a_{l}\) characters in the set \(X\). The fractions \(p=\{p_{1},p_{2},\ldots,p_{U}\}\) can be defined for the set \(X\), where \(p_{l}=N_{l}/N\) is the fraction of the occurrence of a character \(a_{l}\) within the set \(X\). According to [PERSON] [5], the average information extracted per character, or the number of bits of information per character, or the information entropy of the set \(X\), is  
\[\mathrm{IE}=-\sum_{j=1}^{U}p_{j}\cdot\log_{b}(p_{j}), \tag{1}\]  
where the base \(b\) gives the units of information (e.g., \(b=2\) for bits), and the total bit content of the set is \(N\cdot\mathrm{IE}\).  
For a given set, the maximum IE is obtained when the fractions are equal to each other (similarly as normal numbers); that is \(p_{j}=1/U\), so  
\[\max(\mathrm{IE})=\log_{b}(U). \tag{2}\]  
The IE given by (1) is computed when the fractions refer to single characters within a set. However, a useful extrapolation could be the generalization of relation (1) to \(m\)-block information entropy [7]:  
\[\mathrm{IE}^{(m)}=-\sum_{j=1}^{\Omega}p_{j}^{(m)}\cdot\log_{b}\Big{(}p_{j}^{(m )}\Big{)}, \tag{3}\]  
where instead of single characters, combinations of \(m\) characters are used to define a new set of characters, called \(m\)-blocks. In this case, \(p^{(m)}\) are the fractions of the \(m\)-block characters, and the summation extends over all possible combinations of distinct \(m\)-blocks. For a given set of \(N\) characters, each chosen from a set of radix \(U\), the maximum number of distinct \(m\)-blocks of the newly constructed set of \(m\)-block characters is  
\[\Omega=U^{m}. \tag{4}\]  
The maximum value of the IE theoretically permitted for the new set of \(m\)-blocks is  
\[\max(\mathrm{IE}^{(m)})=\log_{b}(\Omega)=\log_{b}(U^{m})=m\log_{b}(U). \tag{5}\]  
Combining (2) and (5), we deduce that \(\max(\mathrm{IE}^{(m)})=m\cdot\max(\mathrm{IE})\), so using \(m\)-blocks increases the IE value by a factor of \(m\) relative to the set of single characters. In order to clarify the methodology proposed here, it is useful to show a few examples. Let us assume that a given set of characters contains characters form a set of radix \(U=2\) (only two distinct single characters). Using bits, \(b=2\) and relations (4) and (5), then the following apply:  
If \(m=1\), \(\Omega=U^{m}=2\), indicating that we have two possible states, and each state encodes \(\mathrm{IE}=1\) bit per character:  
\[\{0,1\}.\]  
If \(m=2\), \(\Omega=U^{m}=4\), indicating that we have four possible states, and each state encodes \(\mathrm{IE}=2\) bits per character:  
\[\{01,00,10,11\}.\]  
If \(m=3\), \(\Omega=U^{m}=8\), indicating that we have eight possible states, and each state encodes \(\mathrm{IE}=3\) bits per character:  
\[\{000,001,011,101,110,100,111,010\}.\]  
If \(m=4\), \(\Omega=U^{m}=16\), indicating that we have sixteen possible states, and each state encodes \(\mathrm{IE}=4\) bits per character:  
\[\{0000,0001,0011,0111,1111,1001,0100,0101,0111,0010,1110,1101,1110,1000,0110\}.\]  
If the set has \(N\) characters and we take \(m=N\), then \(\Omega=U^{m}=2^{N}\) is the number of possible states, and each state encodes \(\mathrm{IE}=N\) bits per character.