Skip to main content
. 2023 Jan 30;25(2):250. doi: 10.3390/e25020250
Algorithm 3: Signal detection using dynamic programming with an unknown number of signal occurrences.
  •  Input:

    yRN, xRL, Kmax

  •    1:

    forK=1 to Kmax do

  •    2:

       Compute g(N,K) with respect to y using Algorithm 1

  •    3:

       for i=1 to P do

  •    4:

         Compute gi(N,K) with respect to yi (a permutation of y) using Algorithm 1

  •    5:

       end for

  •    6:

       Compute GapN(K)=1Pi=1Pgi(N,k)g(N,k)

  •    7:

    end for

  •    8:

    Compute K^=argmaxGapN(K)

  •    9:

    return K^ (an estimate of the number of signal occurrence in the measurement), g(N,K^), and estimates of the locations of the signal occurrences n^1,,n^K^