Skip to main content
. 2020 Dec 31;23(1):57. doi: 10.3390/e23010057
Algorithm 1 Random-Permutation algorithm
Input: Size of random numbers, n, the polynomial p(x), α, and β.
Output: S, the random permutation of the integers {1,2,,n}.
Step 1: Set S=1, x0=(α+β)/2, x=p(x0)fix(p(x0))
Step 2: For i=2 to n, compute
              S=[Si]
              k=ceil(ix)
              S([ki])=S([ik])
              x1=x0p(x0)/p(x0)
              x=p(x1)fix(p(x1))
              x0=x1
            End For
Step 3: S