Skip to main content
. 2019 Jan 19;21(1):92. doi: 10.3390/e21010092
Algorithm 2 Modified rejection algorithm—Protocol for the leader
Input: Value of t0
  • 1:

    Compute px(t0) for each xX

    {The leader needs information from the custodians in order to compute these approximations}

  • 2:

    Compute C and q=(qx)xX as per Equations (1) and (2)

  • 3:

    Sample X according to q

  • 4:

    Sample U uniformly on [0,1]

  • 5:

    fort=t0do

  • 6:

       if UCqXpX(t)2t then

  • 7:

         return X {X is accepted}

  • 8:

       else if UCqX>pX(t)+2t then

  • 9:

         go to line 3 {X is rejected}

  • 10:

      else

  • 11:

        Continue the for loop

        {We cannot decide whether to accept or reject because 2t<UCqxpx(t)2t;

        communication may be required in order for the leader to compute pX(t+1);

        it could be that bits previously communicated to compute px(t) can be reused.}

  • 12:

       end if

  • 13:

    end for