Skip to main content
. 2024 Nov 9;24(22):7191. doi: 10.3390/s24227191
Algorithm 5 Random Selection Algorithm
  •   1:

    Input: S a collection of sets made up by the user locations

  •   2:

    Output: SS, covering set

  •   3:

    function RANDOM SELECTION(S)

  •   4:

        G

  •   5:

        C0

  •   6:

        US

  •   7:

        while U do

  •   8:

            select SiU based on a random selection of ui

  •   9:

            if C+ciL then

  • 10:

                 GGSi

  • 11:

                 CC+ci

  • 12:

            end if

  • 13:

            UUSi

  • 14:

        end while

  • 15:

        return G

  • 16:

    end function