Skip to main content
. 2022 Apr 26;22(9):3323. doi: 10.3390/s22093323
Algorithm 3. Pseudo-code for action preparation
input: T with the bit-collision cases in each internal node
output: T with the bit-collision cases and their actions in each internal node

1.   HTπ

2.   function Hn
3.    if nl ≠ leaf node then Hnl end if
4.    if nr ≠ leaf node then Hnr end if
5.    for (i=1; i ≤ |Zn|, i++) do
6.      D ← get the largest group of tag IDs in Yn,i
7.     for each d∈D do
8.       if d appears in all combinations, where combination j has Yn,j=Yn,i then a ← “READ”
9.       else if d disappears in all combinations, where combination j has Yn,j=Yn,i then a ← “ABSENCE”
10.        else a← “COUPLING” end if
11.      end if
12.     add (d, Yn,i, a) into Actn
13.    end for
14.    if all actions in Actn are “COUPLING,” then a ← “SPLIT” end if
15.   end for
16. end function