Skip to main content
. 2021 Nov 27;23(12):1592. doi: 10.3390/e23121592
Algorithm A1 Correct one insertion symbol
  • Input: 

    n,a,y,0xjn+1.

  • Output: 

    c=(c1,c2,,cn)C(n,4).

  •  1:

    Calculate Δ and h1 as in Table 3.

  •  2:

    Set j=1.

  •  3:

    while  jn+1 do

  •  4:

       if Δ<r then

  •  5:

         if mod(Δ,2)=1 then

  •  6:

            if k0xjn+1(j1)+1=Δ then

  •  7:

              c=ins1_correct1(n,a,y,j,h1)

  •  8:

            else

  •  9:

              jj+1

  •  10:

            end if

  •  11:

         else

  •  12:

            if k0xjn+1(j1)=Δ then

  •  13:

              c=ins1_correct1(n,a,y,j,h1)

  •  14:

            else

  •  15:

              jj+1

  •  16:

            end if

  •  17:

         end if

  •  18:

       else

  •  19:

         if k0xjn+1(j1)+2(nj+1)+1=Δ then

  •  20:

            c=ins1_correct1(n,a,y,j,h1)

  •  21:

         else

  •  22:

            jj+1

  •  23:

         end if

  •  24:

       end if

  •  25:

    end while