Research Article

Parallel Redundancy Protocol for Railway Wireless Data Communication Network

Algorithm 3

Query operation
1. y: elements to be queried.
2. k: the number of hash functions.
3. hash: a hash function whose value range is [0, m-1], and m is the length of array B.
4. for i ←1 to k do.
5.  index ← hash(y, i);
6.  if B(index) = 0 do.
7.   return false;
8.  end if.
9. end for
10. return true