Abstract:
The disclosure relates to noiseless coding and, in particular, to the use of twisted polar code in data encoding and decoding. The disclosure increases the speed of encoding and/or decoding through the reduction in the number of iterations to be performed. The object is attained in method for encoding data, comprising the steps of: pre-coding, by a pre-coding module, data presented in the form of k-dimensional binary vector x, the pre-coding consists in computing u (0) =xW, where W is a matrix of dimension κ×2 m , and m is a code parameter; performing, by the pre-coding module, m-layer twisted polarization transformation of vector u (0) , wherein i-th transformation layer consists in partitioning vector u (i−1)  into 2 m−1  subvectors of length 2, multiplying the subvectors by matrix 
     
       
         
           
             
               ( 
               
                 
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                   
                     1 
                   
                 
               
               ) 
             
             , 
           
         
       
     
     merging the resulting subvectors into one vector of dimension 2 m .

Description:
CROSS-REFERENCE TO RELATED APPLICATION AND CLAIM OF PRIORITY 
       [0001]    The present application is related to and claims the benefit under 35 U.S.C. §119(a) of a Russian patent application filed on Apr. 10, 2014 in the Russian Intellectual Property Office and assigned Serial No. 2014114215, the entire disclosure of which is hereby incorporated by reference. 
       TECHNICAL FIELD 
       [0002]    The present application relates generally to noiseless coding and, more specifically, to the use of twisted polar code in data encoding and decoding. 
       BACKGROUND 
       [0003]    Polar codes proposed by E. Arikan “Channel polarization: A method for constructing capacity achieving codes for symmetric binary-input memoryless channels” (IEEE Transactions On Information Theory, Volume 55, No. 7, pages 3051-3073, July 2009 (REF 1)) represent a first class of correcting codes that achieve the bandwidth of a broad class of communications channels. Polar codes are linear block codes generated by a submatrix of matrix A=B m           =         B m , where B m  is a bit-organized permutation matrix 
         [0000]    
       
         
           
             
               R 
               = 
               
                 ( 
                 
                   
                     
                       1 
                     
                     
                       0 
                     
                   
                   
                     
                       1 
                     
                     
                       1 
                     
                   
                 
                 ) 
               
             
             , 
           
         
       
     
         [0000]    and           is m-fold Kronecker product of the matrix by itself. Thus, the code word of the polar code is c=uA, c∈GF(2) n , n=2 m , where u i , i∈(0, 1, . . . , n−1)\F are coded information symbols, and u i , i∈F are assumed to be 0 (frozen symbols, such as symbols whose values never change). Classic method of decoding y obtained by transmission of c over a memory-free channel, symmetric by output, is the successive cancellation method (SC). The method comprises successively finding the most probable a posteriori values u i  using values u 0 , . . . , u i−1 , y 0 , . . . , y n−1 . The found value u i  is used in the subsequent steps of the decoding algorithm. It can be shown that the combination of a linear transformation specified by matrix A, physical data channel and SC decoder (assuming that intermediate solutions are correct) are represented as a set of n bit subchannels of various quality, such as each u i  is assumed to be transmitted over i-th subchannel. A quality (such as bandwidth, probability of error per bit) of these subchannels is analyzed using the probability density evolution method consisting in computing the density of distribution of log likelihood ratios computed at various stages of the SC method (I. Tal and A. Vardy “How to construct polar codes”, IEEE Transactions On Information Theory, Volume 59, No. 10, October 2013 (REF 2)), or its Gaussian approximation (P. Trifonov “Efficient design and decoding of polar codes”, IEEE Transactions on Communications, Volume 60, No. 11, pages 3221-3227, November 2012 (REF 3)). A possible method of constructing a polar code of length n and dimension k is to select F as a plurality of indices of the worst bit subchannels. 
       SUMMARY 
       [0004]    Noiseless coding is widely used in current systems of communication and storage of information. It is a primary object to provide a new structure of error-correcting codes and respective methods of encoding and decoding data. The present codes represent a generalization of recently suggested polar codes. The present approach solves the problem of small minimum distance, because of which the error correction capability of existing polar codes is significantly worse than that of LDPC and turbo codes. As a result, the present codes provide a lower probability of error in the waterfall region and a lower level of error probability saturation than LDPC and turbo codes. The present decoding method relies on the successive cancellation stack algorithm and improves it through the use of directed search methods. It also takes into account the structure of inventive twisted polar codes. Use of this decoding method with twisted polar codes provides some reduction in the decoding complexity as compared to classical polar codes. 
         [0005]    In a first example, a method of encoding data is provided. The method includes pre-coding, by a pre-coding module, data presented in the form of k-dimensional binary vector x. The coding includes in computing u (0) =xW, where W is a matrix of dimension κ×2 m , and in is a code parameter. The method also includes performing, by a pre-coding module, m-layer twisted polarization transformation of vector u (0) . The i-th transformation layer includes in partitioning vector u (i−1)  into 2 m−1  sub-vectors of length 2 and multiplying the subvectors by matrix 
         [0000]    
       
         
           
             
               ( 
               
                 
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                   
                     1 
                   
                 
               
               ) 
             
             . 
           
         
       
     
         [0000]    The method further includes merging the resulting subvectors in one vector of dimension 2 m  and permuting elements of the resulting vector to obtain vector u (i) , so that vector u (m)  is obtained on m-th layer. The permutations are selected from a common affinity group. The method includes obtaining, by a multiplexer of an encoding apparatus, data encoded with twisted polar code by multiplexing elements of vector u (m) . Use of matrix Wallows representing some elements (symbols) of vector u (0) , the number of which is equal to n−k, as linear functions of its other elements (symbols). Such symbols are referred to as dynamically frozen. Note that classical polar codes is a special case of this structure, in which all these linear functions are identically equal to 0 and respective symbols are referred to as (statically) frozen. 
         [0006]    In further aspects of the invention, matrix W is selected so that the resulting codewords are codewords of base extended BCH (Bose-Chaudhuri-Hocquenghem) code. The permutations are specified for subvectors of vector u (i)  including 2 i  contiguous elements by indexing elements of the subvectors with binary vectors of length i and specifying basis of i-dimensional linear spaces for each of the vectors, so that the output index is obtained as the product of input index by the matrix corresponding to this basis. 
         [0007]    In a second example, a method of decoding encoded data is provided. The encoded data is encoded, for example, according to the above method of encoding where decoded data is obtained in a decoding apparatus using a successive cancellation method. In the successive cancellation method probabilities of paths in a code tree are computed recursively on m layers, and probabilities on layer i—1 are computed from probabilities permuted on layer i, wherein the used permutation is the same as used in the above method of encoding, and the decoding apparatus selects paths with regard to values of dynamically frozen symbols. 
         [0008]    In further aspects of disclosure, values of dynamically frozen symbol are obtained from equation u (0) V T =0, where WV T =0. The matrix V has the form in which no more than one row starts in each column, and no more than one row ends in each column. Values of dynamically frozen symbols are found using symbolic expressions of intermediate data of the decoding apparatus. The decoding apparatus stores a plurality of paths corresponding to sequences (u 0   (0) , . . . , u φl−1   (0) ), and iteratively selects one of them for expansion to obtain one or two paths (u 0   (0) , . . . , u φl−1   (0) , u φl   (0) , u φl   (0) ∈{0, 1}, so that constraints of dynamic freezing of symbols are met, wherein the selected path corresponds to the highest value P(u o   (0) , . . . u φl−1   (0) |y 0   n−1 |ψ(φ l ), where ψ(φ l ) is the heuristic function defined by expression ψ(i)=Π j−i   n−1 (1−P j ), P j  is the probability of error per bit in j-th bit subchannel specified by polarization transformation. 
         [0009]    In a third embodiment an encoding apparatus is provided. The encoding apparatus includes a module configured to precode data presented in the form of k-dimensional binary vector x, adapted to compute u (0) =xW, where W is a matrix of dimension κ×2 m  and m is a code parameter. The module is configured to perform “exclusive or” logic function. The module is also configured to transmit data without change. The data is joined to in layers to enable m-layer twisted polarization transformation of vector u (0)  and obtain vector u (m) , wherein i-th transformation layer consists in partitioning vector u (i−1)  into 2 m−1  subvectors of length 2, multiplying the subvectors by matrix 
         [0000]    
       
         
           
             
               ( 
               
                 
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                   
                     1 
                   
                 
               
               ) 
             
             , 
           
         
       
     
         [0000]    merging the resulting subvectors in one vector of dimension 2 m  and permuting elements of the resulting vector to obtain vector u (i) , wherein the permutations are selected from a common affinity group. The apparatus also includes a multiplexer configured to produce a codeword encoded with twisted code from vector u (m)  obtained on m-th transformation layer from vector u (0) . 
         [0010]    In a fourth example a decoding apparatus is provided. The decoding apparatus includes a first module configured to compute probabilities adapted to compute probabilities of intermediate symbols on m layers. The probabilities on (i−1)-th layer are obtained from permuted probabilities on layer i, the used permutation being the same that in the above encoding method. The first module is also configured to transmit the computed probability to second module for sequential processing. The apparatus also includes a second module configured to iteratively build paths in a code tree by retrieving a path with maximum metric from a stack. The second module is also configured to expand the path. The second module is further configured to store obtained paths in the stack. The second module is configured to determine values of decoded symbols. The decoding apparatus further includes a stack configured to store path identifiers and metrics. The stack is connected communicatively to the second module. The decoding apparatus includes a third module configured to update values of intermediate symbols. The third module is also configured to recursively compute values of intermediate symbols on m layers. The third module is configured to transmit the computed values of intermediate symbols to a memory device. The decoding apparatus also includes a memory device configured to store values of intermediate symbols u (i)  and transmit the values of intermediate symbols to the module for sequential processing and the first module to compute probabilities. 
         [0011]    The present invention offers a code structure and respective methods and apparatus for encoding and decoding, which provide higher correction capability and lower decoding complexity compared to classical polar codes and their improvements discussed above. Numerical results show that twisted polar codes provide a coding gain of up to 0.5 dB as compared with turbo and LDPC codes, and a better error correction capability compared with untwisted and classic polar codes with external CRC. Twisted polar codes also allow reducing the level of error probability saturation (the phenomenon observed with turbo codes and untwisted polar codes). Furthermore, the present decoding method uses heuristic function, which enables the number of iterations performed by the stack decoding algorithm to be significantly reduced. 
         [0012]    The present invention increases the speed of encoding and/or decoding through the reduction in the number of iterations to be performed. 
         [0013]    Before undertaking the DETAILED DESCRIPTION below, it may be advantageous to set forth definitions of certain words and phrases used throughout this patent document: the terms “include” and “comprise,” as well as derivatives thereof, mean inclusion without limitation; the term “or,” is inclusive, meaning and/or; the phrases “associated with” and “associated therewith,” as well as derivatives thereof, may mean to include, be included within, interconnect with, contain, be contained within, connect to or with, couple to or with, be communicable with, cooperate with, interleave, juxtapose, be proximate to, be bound to or with, have, have a property of, or the like; and the term “controller” means any device, system or part thereof that controls at least one operation, such a device may be implemented in hardware, firmware or software, or some combination of at least two of the same. It should be noted that the functionality associated with any particular controller may be centralized or distributed, whether locally or remotely. Definitions for certain words and phrases are provided throughout this patent document, those of ordinary skill in the art should understand that in many, if not most instances, such definitions apply to prior, as well as future uses of such defined words and phrases. 
     
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
         [0014]    For a more complete understanding of the present disclosure and its advantages, reference is now made to the following description taken in conjunction with the accompanying drawings, in which like reference numerals represent like parts: 
           [0015]      FIG. 1  illustrates an example structure of a polar code encoder according to this disclosure; 
           [0016]      FIG. 2  illustrates an example recursive computation of RecursivelyCalcP (l,λ,φ) probabilities according to this disclosure; 
           [0017]      FIG. 3  illustrates an example recursive computation of intermediate symbols RecursivelyUpdateC(l,λ,φ) according to this disclosure; 
           [0018]      FIG. 4  illustrates an example stack decoding algorithm according to this disclosure; 
           [0019]      FIG. 5  illustrates an example twisted polar code encoder according to this disclosure; 
           [0020]      FIG. 6  illustrates an example digital communications system according to this disclosure; 
           [0021]      FIG. 7  illustrates an example recursive computation of probabilities for twisted polar code RecursivelyCalcP(l,λ,φ) according to this disclosure; 
           [0022]      FIG. 8  illustrates an example recursive computation of values of intermediate symbols for twisted polar code RecursivelyUpdateC(l,λ,φ) according to this disclosure; 
           [0023]      FIG. 9  illustrates an example improved stack decoding method with directed search according to this disclosure; 
           [0024]      FIG. 10  illustrate an example decoding apparatus according to this disclosure; 
           [0025]      FIG. 11  an example error correction capability of codes with a rate of ½ according to this disclosure; 
           [0026]      FIG. 12  an example error correction capability of codes with a rate of ¾ according to this disclosure; 
           [0027]      FIG. 13  illustrate an example error correction capability of codes with a rate of ⅓ according to this disclosure; 
           [0028]      FIG. 14  illustrates an example number of decoder iterations for codes (1024, 512) according to this disclosure; 
           [0029]      FIG. 15  illustrates an example number of iterations in a stack decoding algorithm according to this disclosure; 
           [0030]      FIG. 16  illustrates an example comparison of twisted polar and concatenated codes with external Reed-Solomon and inner polar codes according to this disclosure; 
           [0031]      FIG. 17  illustrate an example comparison of error correction capability of twisted polar and LDPC codes according to this disclosure; 
           [0032]      FIG. 18  illustrates an example comparison of the number of additions in decoding algorithms of twisted polar and LDPC codes according to this disclosure; and 
           [0033]      FIG. 19  illustrates an example comparison of the number of non-linear function calls in decoding algorithms of twisted polar and LDPC codes according to this disclosure. 
       
    
    
     DETAILED DESCRIPTION 
       [0034]      FIGS. 1 through 19 , discussed below, and the various embodiments used to describe the principles of the present disclosure in this patent document are by way of illustration only and should not be construed in any way to limit the scope of the disclosure. Those skilled in the art will understand that the principles of the present disclosure may be implemented in any suitably arranged electronic device. 
         [0035]    Polar codes proposed by E. Arikan “Channel polarization: A method for constructing capacity achieving codes for symmetric binary-input memoryless channels” (IEEE Transactions On Information Theory, Volume 55, No. 7, pages 3051-3073, July 2009 (REF 1)) represent a first class of correcting codes that achieve the bandwidth of a broad class of communications channels. Polar codes are linear block codes generated by a submatrix of matrix A=B m           =         B m , where B m  is a bit-organized permutation matrix 
         [0000]    
       
         
           
             
               R 
               = 
               
                 ( 
                 
                   
                     
                       1 
                     
                     
                       0 
                     
                   
                   
                     
                       1 
                     
                     
                       1 
                     
                   
                 
                 ) 
               
             
             , 
           
         
       
     
         [0000]    and           is m-fold Kronecker product of the matrix by itself. Thus, the code word of the polar code is c=uA, c∈GF(2) n , n=2 m , where u i , i∈(0, 1, . . . , n−1)\F are coded information symbols, and u i , i∈F are assumed to be 0 (frozen symbols, such as symbols whose values never change). Classic method of decoding y obtained by transmission of c over a memory-free channel, symmetric by output, is the successive cancellation method (SC). The method comprises successively finding the most probable a posteriori values u i  using values u 0 , . . . , u i−1 , y 0 , . . . , y n−1 . The found value u i  is used in the subsequent steps of the decoding algorithm. It can be shown that the combination of a linear transformation specified by matrix A, physical data channel and SC decoder (assuming that intermediate solutions are correct) are represented as a set of n bit subchannels of various quality, such as each u i  is assumed to be transmitted over i-th subchannel. A quality (such as bandwidth, probability of error per bit) of these subchannels is analyzed using the probability density evolution method consisting in computing the density of distribution of log likelihood ratios computed at various stages of the SC method (I. Tal and A. Vardy “How to construct polar codes”, IEEE Transactions On Information Theory, Volume 59, No. 10, October 2013 (REF 2)), or its Gaussian approximation (P. Trifonov “Efficient design and decoding of polar codes”, IEEE Transactions on Communications, Volume 60, No. 11, pages 3221-3227, November 2012 (REF 3)). A possible method of constructing a polar code of length n and dimension k is to select F as a plurality of indices of the worst bit subchannels.  FIG. 1  illustrates an example structure of a polar code encoder according to this disclosure. Encoding operation is partitioned into m layers. On layer i intermediate vector u (i+1)  is obtained by applying a transformation specified by matrix R to subvectors u (i) . Symbols on layer 0 are initialized by useful data symbols (for unfrozen symbols) or zeros (frozen symbols). Codeword is obtained on the last layer. 
         [0036]    The polar code is represented as a tree whose leaves are its codewords, and paths from the root to the leaves are defined by possible values of symbols u 0 , . . . , u n−1 . Optimal decoder find the most probable path in the tree, corresponding to received vector (y 0 , . . . , y n−1 ). The above approach is used to construct codes reaching the channel bandwidth at n→∞. However, the error correction capability of polar codes of average length when they are decoded by the SC method is quite low. I. Tal and A. Vardy “List decoding of polar codes”, IEEE International Symposium on Information Theory, 2011 (REF 4) has shown this problem is solved by list SC decoding. That is, instead of making a single decision on u i  at each step of the SC decoder two paths can be analyzed, which correspond to different values of unfrozen symbol u i . As a result, the number of paths (u 0 , . . . , u i ) monitored by the decoder is doubled at each step i∉F. To prevent the exponential growth of complexity and memory consumption it is suggested (as shown in REF 4) to retain no more than L most probable paths at every step. Probability of path P n   (i) (u 0   i |y 0   n−1 ) is computed according to 
         [0000]    
       
         
           
             
               
                 
                   
                     
                       
                         P 
                         N 
                         
                           ( 
                           
                             2 
                              
                             i 
                           
                           ) 
                         
                       
                        
                       
                         ( 
                         
                           
                             u 
                             0 
                             
                               2 
                                
                               i 
                             
                           
                            
                           
                             y 
                             0 
                             
                               N 
                               - 
                               1 
                             
                           
                         
                         ) 
                       
                     
                     = 
                     
                       
                         ∑ 
                         
                           
                             u 
                             
                               
                                 2 
                                  
                                 i 
                               
                               + 
                               1 
                             
                           
                           = 
                           0 
                         
                         1 
                       
                        
                       
                         
                           P 
                           
                             N 
                             2 
                           
                           
                             ( 
                             i 
                             ) 
                           
                         
                          
                         
                           ( 
                           
                             
                               u 
                               
                                 0 
                                 , 
                                 e 
                               
                               
                                 
                                   2 
                                    
                                   i 
                                 
                                 + 
                                 1 
                               
                             
                             + 
                             
                               
                                 u 
                                 
                                   0 
                                   , 
                                   o 
                                 
                                 
                                   
                                     2 
                                      
                                     i 
                                   
                                   + 
                                   1 
                                 
                               
                                
                               
                                  
                                 
                                   y 
                                   0 
                                   
                                     
                                       N 
                                       2 
                                     
                                     - 
                                     1 
                                   
                                 
                                 ) 
                               
                                
                               
                                 
                                   P 
                                   
                                     N 
                                     2 
                                   
                                   
                                     ( 
                                     i 
                                     ) 
                                   
                                 
                                 ( 
                                 
                                   u 
                                   
                                     0 
                                     , 
                                     e 
                                   
                                   
                                     
                                       2 
                                        
                                       i 
                                     
                                     + 
                                     1 
                                   
                                 
                                  
                               
                                
                               
                                 y 
                                 
                                   N 
                                   2 
                                 
                                 
                                   N 
                                   - 
                                   1 
                                 
                               
                             
                           
                           ) 
                         
                       
                     
                   
                    
                   
                       
                   
                 
               
               
                 
                   ( 
                   1 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       P 
                       N 
                       
                         ( 
                         
                           
                             2 
                              
                             i 
                           
                           + 
                           1 
                         
                         ) 
                       
                     
                      
                     
                       ( 
                       
                         
                           u 
                           0 
                           
                             
                               2 
                                
                               i 
                             
                             + 
                             1 
                           
                         
                         | 
                         
                           y 
                           0 
                           
                             N 
                             - 
                             1 
                           
                         
                       
                       ) 
                     
                   
                   = 
                   
                     
                       P 
                       
                         N 
                         2 
                       
                       
                         ( 
                         i 
                         ) 
                       
                     
                      
                     
                       ( 
                       
                         
                           u 
                           
                             0 
                             , 
                             e 
                           
                           
                             
                               2 
                                
                               i 
                             
                             + 
                             1 
                           
                         
                         + 
                         
                           
                             u 
                             
                               0 
                               , 
                               o 
                             
                             
                               
                                 2 
                                  
                                 i 
                               
                               + 
                               1 
                             
                           
                            
                           
                              
                             
                               y 
                               0 
                               
                                 
                                   N 
                                   2 
                                 
                                 - 
                                 1 
                               
                             
                             ) 
                           
                            
                           
                             
                               P 
                               
                                 N 
                                 2 
                               
                               
                                 ( 
                                 i 
                                 ) 
                               
                             
                             ( 
                             
                               u 
                               
                                 0 
                                 , 
                                 o 
                               
                               
                                 
                                   2 
                                    
                                   i 
                                 
                                 + 
                                 1 
                               
                             
                              
                           
                            
                           
                             y 
                             
                               N 
                               2 
                             
                             
                               N 
                               - 
                               1 
                             
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   2 
                   ) 
                 
               
             
           
         
       
     
         [0000]    where α i   j =(α i , α i+1 , . . . α j ), α i,e   j  and α i,0   j  are subvectors α/with even and odd numbered components, respectively, and P 1   (0) (α|y) is the probability that symbol α∈GF(2) was transmitted with the proviso that the channel outputs symbol y (see REF 4).  FIG. 2  is a flowchart of an example recursive function RecursivelyCalcP (l,λ,φ), which computes the probabilities for l-th path u 0   φ  for the case of N=2 λ  according to this disclosure. See REF 4 for an example recursive function. Note that for even φ the function produces a recursive call to find values that appear on the right side of the above equations. Direct computations are performed in blocks that implement equations (1) and (2). Results are stored in variables P 1λ [β,b]=P 2     λ     (φ) (u 0   φ |y φ2     λ     (φ+1)2     λ     −1 ) where u φ =b. Furthermore, the successive cancellation decoder stores values of intermediate symbols corresponding to each path.  FIG. 3  is a flowchart of an example recursive function RecursivelyCalcC(l,λ,φ), which solves this task in accordance with REF 4. For i-th path u 0   φ  the flowchart finds values of C i,β [β, φ mod 2]=u φ=2λβ   (m−X) , which are used in computations of equations (1) and (2) according to this disclosure. The computations are performed in a block which corresponds to the encoder structure shown in  FIG. 1 . 
         [0037]    The described approach significantly improves the error correction capability of polar codes in the low SNR domain. However, classical polar codes exhibit the effect of error probability saturation of a sufficiently high level, since their minimum Hamming distance is min i∉F wt(A i ), where A i  is i-th row of matrix A, and wt(x) is the Hamming weight of vector x. Data is encoded with CRC error detection code before it is encoded with polar code (see REF 4). Then among L paths in the code tree, found by the above algorithm, paths that have correct CRC checksum are chosen. It was shown experimentally that this approach provides a fairly good error correction capability, although no non-trivial estimates of the minimum distance have been found. 
         [0038]    To reduce the complexity of decoding, K. Niu and K. Chen “CRC-aided decoding of polar codes”, IEEE Communications Letters, Volume 16, No. 10, October 2012 (REF (5), suggests that at every step of the SC decoder the most probable path, such as the path with the highest P{u 0 , . . . , u i−1 |y}, is to be chosen for further disclosure. The decoder maintains a stack (such as a priority queue) that contains paths of different lengths, so to effectively select the most probable of them. This approach (stack SC decoding) ensures 2-3-fold reduction in complexity compared to the list SC decoding without any loss in the error correction capability.  FIG. 4  illustrates a flowchart of an example algorithm to implement this approach according to this disclosure. The algorithm uses data structures and support functions. (as shown in REF 4). It uses a stack (such as a priority queue) supporting operation Push(s,l), which stores in the stack integer l together with its metric s, PoPMax( ) and PopMin( ), which retrieves elements with the highest and lowest metrics, respectively, from the stack. Then an initial path is created, which is identified by integer l. The probabilities of codeword symbols are computed for this path using channel transition probabilities function P(a|y)=P 1   (0) (α|y). Then, the path is placed in the stack. At each iteration of the algorithm the most probable path l, corresponding to a sequence of symbols u 0 , . . . , u φl−1 , where φ l  is the path phase, is taken out from the stack together with its metric M. Then probabilities P l,m [0,0]=P(u 0 , . . . , u φl−1 , u φl =0|y 0   n−1 ) and P l,m [0,1]=P(u 0 , . . . , u φl−1 , u φl =1|y 0   n−1 ) are computed using function RecursivelyCalcP(l,m,φ l ). When symbol u φl  is frozen, its value is assumed to be 0, and identifier l is placed in the stack with the previous value of metric M. Otherwise, the path is cloned (such as respective intermediate data is selectively replicated, as described in REF 4), in a new path identified by number l′. Initial path corresponds to u φl =C l,m [0,φ l  mod 2]=0, while the cloned one corresponds to u φl =C l′,m [0,φ l  mod 2]=1. These paths are placed in the stack together with respective probabilities. Before this operation, it is checked whether the number of paths in stack J exceeds its maximum capacity Q after the cloning operation. If so, the least likely paths are removed from the stack. In both cases, if φ l ≡1 mod 2, values of intermediate symbols for paths placed in the stack are updated using RecursivelyUpdateC function. Furthermore, if number q φl  of return of the decoder to φ l  phase exceeds a threshold L, all paths shorter than φ l  are removed in order to prevent the decoder from going around short irregular paths. The main disadvantage of this approach is that the decoder has to compare probabilities P(u 0 , . . . , u φl−l , u φl |y) of paths of different lengths. It can be seen that P(u 0 , . . . , u φl−1 , u φl |y)≦P(u 0 , . . . , u φl−1 , u φl−1 |y). Thus, the probability of a correct long path appears to be less than the probabilities of wrong short paths. As a result, the decoder switches between correct and wrong paths, thereby making a great amount of useless computations. 
         [0039]    Another implementation of this approach in case of polar codes with external CRC is presented by B. Li, H. Shen, D. Tse “An Adaptive Successive Cancellation List Decoder for Polar Codes with Cyclic Redundancy Check”, IEEE Communications Letters, 16 (12), December 2012 [6], and B. Li, H. Shen “Decoding method and decoding apparatus for polar code concatenated with cyclic redundancy check, patent application” (WO2013107140) (REF 7). The implementation comprises application of the Tala-Vardi algorithm of list decoding with a certain size of list L, searching among the found codewords for words with correct CRC and, in the absence thereof, restarting the list decoder with double size of the list. These steps are repeated until a code word with correct CRC is found or the size of the list exceeds a predetermined value. The main disadvantage of this approach is its high computational complexity that is proportional to the maximum size of the list. 
         [0040]    The problem of decoding polar codes is also analyzed by W. Gross, G. Sarkis, A. Raymond, S. Leroux, I. Tal, A. Vardy “Methods and Systems for Decoding Polar Codes” (US20130117344) (REF 8), where some methods are suggested to reduce the complexity of a non-list SC decoder. However the methods do not increase the error correction capability. Data encoding methods according to this disclosure provide a much smaller probability of decoding error per codeword as compared to REF 8. 
         [0041]    The present disclosure provides an apparatus and methods to provide a regular structure of encoder  010  and decoder, like many modern designs of LDPC codes, for example, RU2395902, T. Richardson, X. Jin, “Methods and Apparatus for LDPC-encoding” (REF 9). However, the error correction capability of the present code structure is much better. 
         [0042]    Basic idea of the present approach, which is reflected in respective methods for encoding and decoding, relies on the introduction of permutation of intermediate symbols appearing in the polarization transformation before forwarding them to the next layer of polarization transformation. This allows dynamic freezing of symbols, providing a sufficiently large minimum distance of the code, where all quite bad bit subchannels are frozen. Constrains of dynamic freezing are obtained using a parent extended BCH (Bose-Chaudhuri-Hocquenghem) code, and permutations are selected from a common affinity group, which is a group of automorphisms of Reed-Muller sub-codes for this code (F. J. MacWilliams and N. J. A. Sloane “The Theory of Error-Correcting Codes”, 1977 (REF 10)). More specifically, elements of sub-blocks of intermediate vectors of polarization transformation are indexed with binary vectors which are equivalently considered as integers. For each layer and each sub-block, C i,j,0 , . . . , C i,j,i−1  basis of corresponding l-dimensional linear subspace is indicated, so that output index x is computed from input s=s 0 +2s 1 + . . . +2 i−2 S i−2 , S j ∈{0,1} as x=s 0 C i,j,1 ⊕s 1 C i,j,2  . . . ⊕s i−2 C i,j,2 . This defines permutation of vector elements. For example, matrix 
         [0000]    
       
         
           
               
             
               ( 
               
                 
                   
                     0 
                   
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     1 
                   
                   
                     1 
                   
                   
                     0 
                   
                 
                 
                   
                     0 
                   
                   
                     0 
                   
                   
                     1 
                   
                 
               
               ) 
             
           
         
       
     
         [0000]    corresponds to permutation 0→0, 2→3, 4→4, 6→7, 1→2, 3→1, 5→6, 7→. Formally, the present method of encoding for a code of length n=2 m  comprises the following steps: 
         [0043]    At a first step, binary vector u (0)  are constructed so that the dynamic freezing constraints, specified by a matrix V, are observed, such as u (0) V T =0. 
         [0044]    At a second step, let i=1. 
         [0045]    At a third step, let u 2     i     j+x   (i) =u 2     i     j+s   (i−1) ⊕y 2     i     j+2     i−1     +s   (i−1) , u 2     i     j+(x⊕C     i,j,0     )   (i) =u 2     i     j+2     i−1     +s   (i−1) , 0≦j&lt;2 m−1 , 0≦s&lt;2 i−1 , where ⊕ is bitwise “exclusive or” operation; x=s 0 C i,j,0 ⊕s l C i,j,2 ⊕ . . . ⊕s i−2 C i,j,i−l s=s 0 +2s l + . . . +2 i−2 s i−2 , s j ∈{0,1} and (C i,j,0 , . . . C i,j,i−1 ) is a plurality of linearly independent binary vectors of length i, which is equivalently considered as integers. 
         [0046]    At a fourth step, let i=i+l. If i≦m, and return to the third step. 
         [0047]    It is seen that the encoder  010  structure described in the third step is similar to the structure used in the encoder of classical Arikan polar codes. Note that the latter are obtained by selecting C i,j,l  equal to l-th unit vector and using only statically frozen symbols. This allows the use of SC decoder and its modifications taking into account inventive modifications. In particular, the effective embodiment of a list SC decoder described in the fourth step or its stack version, illustrate in  FIG. 4 , is used. As the present structure uses dynamically frozen symbols, in decoding the need arises to restore their values at steps i∈F, using values u j   (0) , j&lt;i. However, the embodiment suggested in the fourth step does not store these values. Thus, a method is suggested to recover them from intermediate variables of the algorithm taught in the fourth step. 
         [0048]    Let A′ is n×n matrix corresponding to the transformation defined by the third and fourth steps of the above algorithm. To provide a sufficiently large minimum distance of the resulting code an additional constraint is applied, which consist in the fact that codewords u (0) A′ obtained in the aforementioned manner belong to another code (herein it is assumed that this code is an extended BCH code) with test matrix H, such as u (0) A′H T =0. Then matrix V, used in the first step of the encoding algorithm, is obtained as V T =A′H T Q, where Q is an invertible matrix. It is suggested to select matrix Q so that the complexity of recovery of intermediate symbols in processing of dynamic freezing constraints is minimal. 
         [0049]    To reduce complexity of the stack decoding algorithm it is suggested to use values P l,m [0,a]ψ(φ l +1) instead of P l,m [0,α], α∈{0,1} as path metrics, where ψ(i) is the heuristic function, which defines the average probability of correct decisions after phase i. This allows the decoder to avoid frequent switching between short and long paths, thereby reducing the total number of iterations. 
         [0050]      FIG. 5  illustrates an example encoding method for m=4 according to this disclosure. Encoded data  001 , represented as binary vector x of length k, is input to precoder  002 , which computes u (0) =xW so that u (0) ∈GF(2) n , n=2 m , u (0) V T =0, where W and V are binary matrices satisfying WV T =0. Resulting initial vector  003 , denoted by u (0) , is subjected to twisted polarization transformation. It is constructed by recursively applying the transformation specified by 
         [0000]    
       
         
           
             
               u 
               ″ 
             
             = 
             
               
                 
                   u 
                   ′ 
                 
                  
                 
                   ( 
                   
                     
                       
                         1 
                       
                       
                         0 
                       
                     
                     
                       
                         1 
                       
                       
                         1 
                       
                     
                   
                   ) 
                 
               
               . 
             
           
         
       
     
         [0000]    This transformation is realized by “exclusive or” unit  004 , which computes the modulo-2 sum of input values, and pass-through unit  005 , which outputs the input value without change. This yields vector u (1) , which is further processed in a similar manner. The module configured to perform “exclusive or” function and the pass-through module (configured to transmit data unchanged) are arranged in m layers. On layer i intermediate vector u (i+1)  is represented as 2 m−i−l  subvectors of length 2 i+1 . Prior to transmitting the intermediate vector to the next layer, its components are permuted, and components of different subvectors are permuted in different manner. Vector c=u (4)  thus obtained is denoted by final vector  007 . Its elements are multiplexed using a multiplexor  008  into codeword  009  of twisted polar code. This codeword is further transmitted over a communications channel or stored by a recording device. Note that the rearrangement on the last layer is not obligatory. This rearrangement is shown here only to illustrate a specific permutation structure described below. 
         [0051]    It should be understood that the twisted polar code is a linear block code. The above encoding method corresponds to computing: 
         [0000]        c=xG   (3)
 
         [0052]    where G=WA′ is a code generator k×n matrix, and A′ specifies twisted polarization transformation. However, the same code is obtained by replacing G in equation (3) by G′=QG, where Q is an invertible k×k matrix. In particular, in some applications it is advisable to use systematic encoding, such as select G′=(I|S)P, where I is a unity matrix, S is a k×(n−k) matrix and P is a permutation matrix. In this case, the resulting codeword contains useful data vector x as a subvector. Although the structure of systematic (or any other) encoder differs from that described above for example as illustrate in  FIG. 5 , it still generates the same code. In particular, the method described in  11  is used to construct an effective systematic encoder  010  for twisted polar codes. Furthermore, standard techniques of shortening and puncturing codes are used to obtain codes of different length from the above twisted polar code. 
         [0053]    Matrix V is used to provide a sufficiently large minimum distance d≧d 0  of the resulting code. It is constructed as follows. Let H is a test matrix of a base code of length n with minimum distance d 0 . Let A′ is an n×n matrix corresponding to twisted polarization transformation. Vector u (0)  should be constructed so that the respective codeword c of the twisted polar code is also a codeword of the base code, such as u (0) A′H T =0. Thus, V=Q T HA′ T  is obtained, where Q is an arbitrary invertible matrix. To increase the error correction capability, matrix V is obtained and is supplemented with rows of weight 1. Particular added rows are defined with account of the error probability in bit subchannels defined by the polarization transformation A′. l′ i =min(j|V ij =l) and l″ i =max(j|V ij =l) are made to be the initial and final position of row i, respectively. With elementary operations performed on the rows of matrix HA T , V is obtained such that no more than one row begins and no more than one row ends at position i, 0≦i&lt;n. The latter property means that 
         [0000]        u   i   (0) =Σ j&lt;i:Vtj=l   u   j   (0)   , i∈F   (4)
 
         [0054]    where t is the index of the row ending at position i, F={i|∃j:l j ″=i}, and modulo-2 sum is computed. The first property generally reduces the number of terms in REF 4 and simplifies computing the expression. Symbols u i   (0) , i∈F are referred to as frozen. Frozen symbols for which l′ i =l″ i  (such as u i   (0) =0) are referred to as statically frozen symbols, while those for which l′ i ≠l″ i  are referred to as dynamically frozen symbols. 
         [0055]    Preferably, extended BCH code is used as the base code in the described structure. With this, the number of positions i, for which REF 4 comprises a non-trivial sum, is small, which simplifies decoding. Furthermore, this allows the use of a specific structure of permutations, which is compactly specified. The permutations are determined by indexing elements of sub-vectors of length 2 i  of vectors u (i)  with binary vectors of length i and specifying different basis of corresponding i-dimensional linear spaces. For each layer i and each subvector (u 2     j       i     (l) , u 2     j       i     +l   (l) , . . . , u 2(j+1)−1   (l) ) of length 2 i  of vector u (i) C i,j,0 , . . . , C i,j,i−1  basis is specified (which is represented as i×i matrix with rows C i,j,l ) of corresponding i-dimensional linear subspace, so that output index x within j-th block is obtained from input index s=s o +2s l + . . . +2 i−2 S j−2 , s j ∈{0,1} as x=S 0 C i,j,2 ⊕ . . . ⊕S i−2 C i,j,i−1 . This defines a permutation of elements of the vector. More specifically, the encoder  010  is implemented as follows: 
         [0056]    At a first step it is assumed that u i   (0) , i∉F are equal to elements of payload vector x, and compute remaining elements u i   (0)  according to (2). Note that this is equivalent to computing u (0) =xW for corresponding matrix W. 
         [0057]    At a second step, let i=1. 
         [0058]    At a third step, u 2     i     j+x   (i) =u 2     i     j+s   (i−1) ⊕u 2     i     j+2      i−1     +s , u 2     i     j+(x⊕C     i,j,0     )   (i) =u 2     i     j+2     l−1     +s   (l−1) , 0≦j&lt;2 m−1 ′, 0≦s&lt;2 i−1  is computed, where ⊕ is bitwise “exclusive or” operation; x=s 0 C i,j,0 ⊕s 1 C i,j,2 ⊕ . . . ⊕s i−2 C i,j,i−1′  s=s 0 +2s 1 + . . . +2 i−2 s i−2 , s j ∈{0,1} and (C i,j,0 , . . . , C i,j,i−1 ) is a set of linearly independent vectors of length i, which is equivalently represented as integers. 
         [0059]    At a fourth step i=i+l. If i≦m, then go to the third step. 
         [0060]    At a fifth step a codeword is obtained as u (m) . 
         [0061]    It should be appreciated that there are other equivalent encoding methods, which generate the same plurality of codewords. All these methods are obtained by replacing matrix W with W′=QW in the above algorithm, where Q is a reversible k×k matrix. 
         [0062]    For example,  FIG. 5  corresponds to the following basis vectors that define permutations:
       C 1,j,0 =(1), 0≦j&lt;8   C 2,j,0 =(1,0) 2 =2, C 2,j,1 =(0,1) 2 =1, 0≦j&lt;4,   C 3,0,0 =(0,1,0) 2 =2, C 3,0,1 =(0,0,1) 2 =1, C 3,0,2 =(1,0,0) 2 =4,   C 3,1,0 =(1,0,0) 2 =4, C 3,1,1 =(0,0,1) 2 =1, C 3,1,2 =(0,1,0) 2 =2,   C 4,0,0 =(1,1,0,0) 2 =12, C 4,0,1 =(0,0,0,1) 2 =1, C 4,0,2 =(0,0,1,0) 2 =2,   C 4,0,3 =(0,1,0,0) 2 =4.       
 
         [0069]    It is seen that there are two distinctions over the classical polar encoder as illustrated in  FIG. 1 : availability of precoder  002 , and the edges connecting successive layers are permuted. 
         [0070]    Note that it is sufficient to only indicate C i,j,0 , and specify a deterministic algorithm for finding linearly independent vectors C i,j,s , 1≦s≦i−l. Thus, each permutation is specified by i bits only, which is significantly less than log 2  2 t l bits for an arbitrary permutation. 
         [0071]    The specific form of permutations used should be determined such that to minimize the probability of errors in resulting bit subchannels. This is accomplished, for example, by complete enumeration (or one or more randomized searches) of all possible permutations defined by nondegenerate m×m binary matrices and computation of the error probability in corresponding unfrozen bit subchannels using density evolution. 
         [0072]    The present encoder is used in data transmission or data storage systems.  FIG. 6  illustrates an example of a data transmission or data storage system according to this disclosure. Respective decoders must take into account the specific structure of permutations and constraints (see REF 2) in order to find the most probable codeword corresponding to the received noisy vector. Successive cancellation decoder and its list option  4  or stack option  5  must compute probabilities of paths similarly to how it is done in the case of classical polar codes.  FIG. 7  illustrates a flowchart of an example modified RecursivelyCalcP function for computing these probabilities according to this disclosure. The example function illustrated in  FIG. 7  uses the same approach as in  4 , which takes into account the above described permutation structure. It is seen that it coincides with the function in  FIG. 2 , except for new block  021 , which computes input indexes in accordance with the above permutation method, while blocks  011  and  012  are replaced by blocks  022  and  023  using the index computed in block  021 . Furthermore, the SC decoder takes into account values of intermediate symbols  006  corresponding to each path. This is realized by appropriately modified RecursivelyCalcC algorithm as shown in  FIG. 8 . It also contains index computation unit  021 , and performs the same steps as in block  013 . 
         [0073]    The SC decoder, its list option  4  and stack option  5  should take a decision on each symbol u i   (0) . In the case of dynamic frozen symbols these decisions are made based on the values of symbols found at the previous algorithm steps. However, the embodiment described in  4  does not store these values explicitly. In this regard, it is suggested to recover them from the intermediate values stored in array C filled by RecursivelyCalcC function as shown in  FIG. 8 . This is accomplished as follows: Let u j   (0) , j&lt;i, is one of members the right side terms of REF 2. To recover it at phase i of path l, u j   (0) =E(m−[log 2 (i−j)],m,0,j) is computed, where: 
         [0000]    
       
         
           
             
               E 
                
               
                 ( 
                 
                   
                     λ 
                     0 
                   
                   , 
                   λ 
                   , 
                   β 
                   , 
                   φ 
                 
                 ) 
               
             
             = 
             
               { 
               
                 
                   
                     
                       
                         E 
                          
                         
                           ( 
                           
                             
                               
                                 
                                   λ 
                                   0 
                                 
                                  
                                 λ 
                               
                               - 
                               1 
                             
                             , 
                             
                               
                                 C 
                                 
                                   
                                     m 
                                     - 
                                     
                                       λ 
                                       0 
                                     
                                     + 
                                     
                                       φ 
                                       2 
                                     
                                   
                                   , 
                                   0 
                                 
                               
                               + 
                               
                                 
                                   ∑ 
                                   i 
                                 
                                  
                                 
                                     
                                 
                                  
                                 
                                   
                                     β 
                                     i 
                                   
                                    
                                   
                                     C 
                                     
                                       
                                         m 
                                         - 
                                         
                                           λ 
                                           0 
                                         
                                         + 
                                         1 
                                       
                                       , 
                                     
                                   
                                    
                                   
                                     ⌊ 
                                     
                                       φ 
                                       2 
                                     
                                     ⌋ 
                                   
                                 
                               
                             
                           
                           ) 
                         
                       
                       , 
                     
                   
                   
                     
                       
                         λ 
                         0 
                       
                       &lt; 
                       
                         λ 
                         ⋀ 
                         φ 
                       
                       ≡ 
                       
                         1 
                          
                         
                             
                         
                          
                         mod 
                          
                         
                             
                         
                          
                         2 
                       
                     
                   
                 
                 
                   
                     
                       
                         
                           
                             
                               
                                 E 
                                  
                                 
                                   ( 
                                   
                                     
                                       
                                         
                                           
                                             λ 
                                             0 
                                           
                                           , 
                                           
                                             λ 
                                             - 
                                             1 
                                           
                                           , 
                                           
                                             
                                               C 
                                               
                                                 
                                                   m 
                                                   - 
                                                   
                                                     λ 
                                                     0 
                                                   
                                                   + 
                                                   1 
                                                 
                                                 , 
                                                 
                                                   φ 
                                                   2 
                                                 
                                                 , 
                                                 0 
                                               
                                             
                                             + 
                                           
                                         
                                       
                                     
                                     
                                       
                                         
                                           
                                             
                                               ∑ 
                                               i 
                                               
                                                   
                                               
                                             
                                              
                                             
                                                 
                                             
                                              
                                             
                                               
                                                 β 
                                                 i 
                                               
                                                
                                               
                                                 C 
                                                 
                                                   
                                                     m 
                                                     - 
                                                     
                                                       λ 
                                                       0 
                                                     
                                                     + 
                                                     1 
                                                   
                                                   , 
                                                   
                                                     φ 
                                                     2 
                                                   
                                                   , 
                                                   
                                                     i 
                                                     + 
                                                     1 
                                                   
                                                 
                                               
                                             
                                           
                                           , 
                                           
                                             ⌊ 
                                             
                                               φ 
                                               2 
                                             
                                             ⌋ 
                                           
                                         
                                       
                                     
                                   
                                   ) 
                                 
                               
                               + 
                             
                           
                         
                         
                           
                             
                               E 
                                
                               
                                 ( 
                                 
                                   
                                     λ 
                                     0 
                                   
                                   , 
                                   
                                     λ 
                                     - 
                                     1 
                                   
                                   , 
                                   
                                     
                                       ∑ 
                                       i 
                                       
                                           
                                       
                                     
                                      
                                     
                                         
                                     
                                      
                                     
                                       
                                         β 
                                         i 
                                       
                                        
                                       
                                         C 
                                         
                                           
                                             m 
                                             - 
                                             
                                               λ 
                                               0 
                                             
                                             + 
                                             1 
                                           
                                           , 
                                           
                                             φ 
                                             2 
                                           
                                           , 
                                           
                                             i 
                                             + 
                                             1 
                                           
                                         
                                       
                                     
                                   
                                   , 
                                   
                                     ⌊ 
                                     
                                       φ 
                                       2 
                                     
                                     ⌋ 
                                   
                                 
                                 ) 
                               
                             
                           
                         
                       
                       , 
                     
                   
                   
                     
                       
                         λ 
                         0 
                       
                       &lt; 
                       
                         λ 
                         ⋀ 
                         φ 
                       
                       ≡ 
                       
                         0 
                          
                         
                             
                         
                          
                         mod 
                          
                         
                             
                         
                          
                         2 
                       
                     
                   
                 
                 
                   
                     
                       
                         
                           C 
                           
                             l 
                             , 
                             λ 
                           
                         
                          
                         
                           [ 
                           
                             β 
                             , 
                             
                               φ 
                                
                               
                                   
                               
                                
                               mod 
                                
                               
                                 
                                     
                                 
                                  
                                 
                                     
                                 
                               
                                
                               2 
                             
                           
                           ] 
                         
                       
                       , 
                     
                   
                   
                     
                       
                         λ 
                         0 
                       
                       = 
                       
                         λ 
                         1 
                       
                     
                   
                 
               
             
           
         
       
     
         [0000]    and β=Σ i B i 2 i . This expression is constructed in the symbolic form when designing the decoder, so that REF 4 is expressed in terms C l,λ [β,τ]. It is seen that the number of terms in the obtained expression for u j   (0) , such as its computation complexity, increases with i−j. This fact justifies the need for matrix V, such that no more than one row starts and ends at every position, since in this case i−j is usually minimized. 
         [0074]    Furthermore, the following method is suggested to reduce the complexity of stack decoding, which is used both with twisted and conventional polar codes. Note that the MAP decoder must find a vector u (0)  such that the value: 
         [0000]        P ( u   0   (0)   , . . . , u   n−1   (0)   |y   0   n−1 )= P ( u   0   (0)   , . . . , u   φ−1   (0)   |y   0   n−1 )Π j=φ   n−1   P ( u   j   (0)   |u   0   (0)   , . . . , u   j−1   (0)   , y   0   n−1 )  (5)
 
         [0000]    is maximum. The original stack algorithm operates locally on the code tree, choosing at each step a path which maximizes the first term in expression (3), as the remaining terms are unknown. Assuming that u 0   (0) , . . . , u j−1   (0)  are correct values of information symbols, find that each of the remaining terms is the probability of correct finding of u j   (0)  by the SC decoder [1] for given vector y 0   n−1 . Values average for y 0   n−1  of these probabilities is easily computed using the density evolution method or its approximations at the second and third steps. Then, instead of maximizing P(u 0   (0) , . . . , u φ−1   (0) |y 0   n−1 ) at each step of the stack algorithm 
         [0000]        E[P ( u   0   (0)   , . . . , u   n−1   (0)   |y   0   n−1 )]= P ( u   0   (0)   , . . . , u   φ−1   (0)   |y   0   n−1 )Π j=φ   n−1   E[P ( u   j   (0)   |u   0   (0)   , . . . , u   j−1   (0)   ,y   0   n−1 )]  (6)
 
         [0000]    is maximized. 
         [0075]    By introducing heuristic function ψ(y)=Π j=l   n−1 (1−P j ), where P j =1−E[P(u j   (0) , . . . , u j−1   (0) , y n−1   (0) , yn−1)] 0  is the error probability in j-th bit subchannel specified by polarization transformation, an improved stack decoding algorithm is obtained as illustrated in  FIG. 9 . Its distinctions over the original option as illustrated in  FIG. 4  are: 
         [0076]    P l,m [0,a]ψ(φ l +1 is used instead of P l,m [0,α] as a path metric in blocks  027  and  028 . 
         [0077]    Computation of dynamically frozen symbols u φl   (0)  is performed in block  026  in accordance with (2) and the fast algorithm for φ l ∈F described above, which is necessary in decoding twisted polar codes with dynamically frozen symbols. However, the present method is also used for polar codes with only statically frozen symbols. 
         [0078]    Modified algorithms RecursivelyCalcP and RecursivelyCalcC (7, 8) should be used to account for the structure of twisted polarization transformation in blocks  025 ,  029 ,  030 . Initial versions thereof as illustrated in  FIGS. 2 and 3  are special cases of modified versions. 
         [0079]    It should be understood that those skilled in the art implement the present method in many ways. In particular, instead of path probabilities their logarithms are used. Probabilities are computed approximately. Computations of some of them, corresponding to frozen symbols, are omitted. Furthermore, more accurate heuristic functions ψ(1) are used. For example, such functions take into account the initial part of the path in the code tree to estimate the probability of remaining symbols. In general, increasing the accuracy of estimating the probability of remaining symbols, defined by function ψ(1), enables the number of iterations in the decoder to be reduced. 
         [0080]    The methods of encoding and decoding described above is implemented in hardware (such as in ASIC) or software, which allows constructing encoding and decoding apparatus. The present encoding apparatus includes a precoder that performs a computation u (0) =xW. The encoding apparatus also includes an “exclusive or” unit and pass-through unit as illustrated in  FIG. 5 . The encoding apparatus further includes connecting edges performing a permutation. 
         [0081]    As illustrated in  FIG. 10 , a decoding apparatus includes a stack  031  which stores identifiers of paths l together with their metrics M, and supports retrieval of records with the highest and lowest M, as well as remove of an arbitrary record. The decoding apparatus also includes a first module  032  is configured to compute probabilities as illustrated in  FIG. 7 . The decoding apparatus further includes a second apparatus  033  configured to update intermediate symbols as illustrated in  FIG. 8 . The decoding apparatus includes a memory device  037  configured to store values u j   (0) . The decoding apparatus includes a third module  036  for sequential processing, which performs computations as illustrated in  FIG. 9 . The decoding apparatus includes a fourth module  035 , which stores or computes values of heuristic function ψ(1). The decoding apparatus includes a fifth module  034  configured to compute dynamically frozen symbols, which computes u j   (0) =E(m=[log 2 (i−j)],m,0,j). 
         [0082]    Note that modules  035  and  034  are not obligatory. Modules  032 ,  033 ,  037  are used to implement a list decoder of twisted polar codes. 
         [0083]    The present methods of encoding and decoding are used in wireless and wireline communication systems, magnetic and optical data storage systems.  FIGS. 11 ,  12  and  13  illustrate error correction capability examples of twisted and untwisted polar codes based on extended BCH codes as compared to polar codes with external CRC  4 , LDPC and turbo codes of varying length and rate. It is noticed that twisted polar codes provide a coding gain of up to 0.5 dB as compared to LDPC and turbo codes, and have a higher error correction capability than classical polar codes with external CRC. Twisted polar codes allow reducing the error probability saturation level as compared to turbo codes and untwisted polar codes.  FIG. 16  illustrates an example comparison of the error correction capability of twisted polar codes and generalized concatenated code with external Reed-Solomon codes and internal polar codes suggested in  12 . It is seen that twisted polar codes provide a significantly better error correction capability. 
         [0084]    Furthermore, as shown in  FIG. 14 , twisted codes require less iterations in the improved stack decoding algorithm, such as they is subjected to decoding with less complexity.  FIG. 15  illustrates an example comparison of the average number of iterations required for decoding (1024, 512) of untwisted polar code with dynamically frozen symbols using undirected stack algorithm 5 as illustrated in  FIG. 4  and the present stack algorithm with directed search as illustrated in  FIG. 9 . It is seen that the use of directed search significantly reduces the number of iterations, especially in the high SNR domain.  FIG. 17  illustrates an example of a more detailed comparison of the error correction capability of twisted polar and LDPC codes according to this disclosure. Error probabilities are presented for various values of parameter L (for polar codes) and maximum number of iterations in the confidence propagation algorithm. Both parameters determine the complexity of decoding. It is seen that the reduction in decoding complexity results in a less significant deterioration of the error correction capability with twisted polar codes as compared to LDPC. Moreover, increasing the decoding complexity ensures a greater error correction capability with twisted polar codes, whereas increasing the maximum number of iterations from 80 to 200 practically has no result with LDPC. 
         [0085]      FIGS. 18 and 19  represent the number of additions and computations of nonlinear function in max-log-MAP embodiment of the present decoding algorithm, and in the embodiment of confidence propagation algorithm in the logarithmic domain, used to decode LDPC codes. It is seen that twisted polar codes require fewer operations, especially in the high SNR domain. Max-Log-Map embodiment of the decoding algorithm involves computation of values L N   (i) (u 0   i |y 0   N−1 )=ln P N   (i) (u 0   i |y 0   N−1 ) instead of P N   (i) (u 0   i |y 0   N−1 ). In this case, expressions (1) and (2) are reduced to 
         [0000]    
       
         
           
             
               
                 L 
                 N 
                 
                   ( 
                   
                     2 
                      
                     i 
                   
                   ) 
                 
               
                
               
                 ( 
                 
                   
                     u 
                     0 
                     
                       2 
                        
                       i 
                     
                   
                   | 
                   
                     y 
                     0 
                     
                       N 
                       - 
                       1 
                     
                   
                 
                 ) 
               
             
             = 
             
               1 
                
               
                 ( 
                 
                   
                     
                       
                         
                           
                             
                               L 
                               
                                 N 
                                 2 
                               
                               
                                 ( 
                                 i 
                                 ) 
                               
                             
                              
                             
                               ( 
                               
                                 
                                   
                                     u 
                                     
                                       0 
                                       , 
                                       e 
                                     
                                     
                                       
                                         2 
                                          
                                         i 
                                       
                                       - 
                                       1 
                                     
                                   
                                   + 
                                   
                                     u 
                                     
                                       0 
                                       , 
                                       o 
                                     
                                     
                                       
                                         2 
                                          
                                         i 
                                       
                                       - 
                                       1 
                                     
                                   
                                 
                                 , 
                                 
                                   
                                     u 
                                     
                                       2 
                                        
                                       i 
                                     
                                   
                                   | 
                                   
                                     y 
                                     0 
                                     
                                       
                                         N 
                                         2 
                                       
                                       - 
                                       1 
                                     
                                   
                                 
                               
                               ) 
                             
                           
                           + 
                           
                             
                               L 
                               
                                 N 
                                 2 
                               
                               
                                 ( 
                                 i 
                                 ) 
                               
                             
                              
                             
                               ( 
                               
                                 
                                   u 
                                   
                                     0 
                                     , 
                                     o 
                                   
                                   
                                     
                                       2 
                                        
                                       i 
                                     
                                     - 
                                     1 
                                   
                                 
                                 , 
                                 
                                   
                                     u 
                                     
                                       
                                         2 
                                          
                                         i 
                                       
                                       + 
                                       1 
                                     
                                   
                                   = 
                                   
                                     0 
                                     | 
                                     
                                       y 
                                       
                                         N 
                                         2 
                                       
                                       
                                         N 
                                         - 
                                         1 
                                       
                                     
                                   
                                 
                               
                               ) 
                             
                           
                         
                         , 
                       
                     
                   
                   
                     
                       
                         
                           
                             L 
                             
                               N 
                               2 
                             
                             
                               ( 
                               i 
                               ) 
                             
                           
                            
                           
                             ( 
                             
                               
                                 
                                   u 
                                   
                                     0 
                                     , 
                                     e 
                                   
                                   
                                     
                                       2 
                                        
                                       i 
                                     
                                     - 
                                     1 
                                   
                                 
                                 + 
                                 
                                   u 
                                   
                                     0 
                                     , 
                                     o 
                                   
                                   
                                     
                                       2 
                                        
                                       i 
                                     
                                     - 
                                     1 
                                   
                                 
                               
                               , 
                               
                                 
                                   
                                     u 
                                     
                                       2 
                                        
                                       i 
                                     
                                   
                                   + 
                                   1 
                                 
                                 | 
                                 
                                   y 
                                   0 
                                   
                                     
                                       N 
                                       2 
                                     
                                     - 
                                     1 
                                   
                                 
                               
                             
                             ) 
                           
                         
                         + 
                         
                           
                             L 
                             
                               N 
                               2 
                             
                             
                               ( 
                               i 
                               ) 
                             
                           
                            
                           
                             ( 
                             
                               
                                 u 
                                 
                                   0 
                                   , 
                                   o 
                                 
                                 
                                   
                                     2 
                                      
                                     i 
                                   
                                   - 
                                   1 
                                 
                               
                               , 
                               
                                 
                                   u 
                                   
                                     
                                       2 
                                        
                                       i 
                                     
                                     + 
                                     1 
                                   
                                 
                                 = 
                                 
                                   1 
                                   | 
                                   
                                     y 
                                     
                                       N 
                                       2 
                                     
                                     
                                       N 
                                       - 
                                       1 
                                     
                                   
                                 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
                 ) 
               
             
           
         
       
       
         
           
             
                 
             
              
             
               
                 
                   
                     L 
                     N 
                     
                       ( 
                       
                         
                           2 
                            
                           i 
                         
                         + 
                         1 
                       
                       ) 
                     
                   
                    
                   
                     ( 
                     
                       
                         u 
                         0 
                         
                           
                             2 
                              
                             i 
                           
                           + 
                           1 
                         
                       
                       | 
                       
                         y 
                         0 
                         
                           N 
                           - 
                           1 
                         
                       
                     
                     ) 
                   
                 
                 = 
                 
                   
                     
                       L 
                       
                         N 
                         2 
                       
                       
                         ( 
                         i 
                         ) 
                       
                     
                      
                     
                       ( 
                       
                         
                           
                             u 
                             
                               0 
                               , 
                               e 
                             
                             
                               
                                 2 
                                  
                                 i 
                               
                               + 
                               1 
                             
                           
                           + 
                           
                             u 
                             
                               0 
                               , 
                               o 
                             
                             
                               
                                 2 
                                  
                                 i 
                               
                               + 
                               1 
                             
                           
                         
                         | 
                         
                           y 
                           0 
                           
                             
                               N 
                               2 
                             
                             - 
                             1 
                           
                         
                       
                       ) 
                     
                   
                   + 
                   
                     
                       L 
                       
                         N 
                         2 
                       
                       
                         ( 
                         i 
                         ) 
                       
                     
                      
                     
                       ( 
                       
                         
                           u 
                           
                             0 
                             , 
                             o 
                           
                           
                             
                               2 
                                
                               i 
                             
                             + 
                             1 
                           
                         
                         | 
                         
                           y 
                           
                             N 
                             2 
                           
                           
                             N 
                             - 
                             1 
                           
                         
                       
                       ) 
                     
                   
                 
               
               , 
             
           
         
       
     
         [0086]    where j(A,B)=max(A,B)+ln(l+e −|A−B| ). 
         [0087]    Embodiments of the inventions are not limited to the embodiments described herein; those skilled in the art will appreciate based on the information described herein and the knowledge in the art that the invention is practiced by other than the described embodiments without departing from the spirit and scope of this disclosure. 
         [0088]    The description does not specify hardware and software for implementing the invention, but those skilled in the art will appreciate that the essence of the invention is not limited to a particular hardware or software, and therefore the disclosure uses any hardware and software known in the art. Thus, hardware is implemented in one or more application specific integrated circuits, digital signal processors, digital signal processing devices, programmable logic devices, field programmable gate arrays, processors, controllers, microcontrollers, microprocessors, electronic devices, other electronic units capable to perform the described functions, computer, or a combination thereof. 
         [0089]    Although not specifically mentioned, it is evident that storage of data, programs, etc., implies that there is a computer readable storage medium; examples of computer readable media include read-only memory, random access memory, register, cache memory, semiconductor memory devices, magnetic media such as internal hard disks and removable disks, magneto-optical media and optical media such as CD-ROM disks and digital versatile disks (DVD), as well as any conventional other storage media. 
         [0090]    Although the present disclosure has been described with an exemplary embodiment, various changes and modifications is suggested to one skilled in the art. It is intended that the present disclosure encompass such changes and modifications as fall within the scope of the appended claims.