HOME

TheInfoList



OR:

The intersection algorithm is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources. It forms part of the modern
Network Time Protocol The Network Time Protocol (NTP) is a networking protocol for clock synchronization between computer systems over packet-switched, variable- latency data networks. In operation since before 1985, NTP is one of the oldest Internet protocols in c ...
. It is a modified form of Marzullo's algorithm.Digital Time Service Functional Specification Version T.1.0.5. Digital Equipment Corporation, 1989. While Marzullo's algorithm will return the smallest interval consistent with the largest number of sources, the returned interval does not necessarily include the center point (calculated offset) of all the sources in the intersection. The intersection algorithm returns an interval that includes that returned by Marzullo's algorithm but may be larger since it will include the center points. This larger interval allows using additional statistical data to select a point within the interval, reducing the
jitter In electronics and telecommunications, jitter is the deviation from true periodicity of a presumably periodic signal, often in relation to a reference clock signal. In clock recovery applications it is called timing jitter. Jitter is a significa ...
in repeated execution.


Method

Given ''M'' intervals of the form ''c'' ± ''r'' (which means 'c''−''r'',''c''+''r'', the algorithm seeks to find an interval with ''M''−''f'' sources. The value ''f'' is referred to as the number of falsetickers, those sources which are in error (the actual value is outside the
confidence band A confidence band is used in statistical analysis to represent the uncertainty in an estimate of a curve or function based on limited or noisy data. Similarly, a prediction band is used to represent the uncertainty about the value of a new data-p ...
). The best estimate is that which assumes the fewest falsetickers, ''f''. The results will be considered valid if ''f'' < ''M''/2, otherwise the algorithm will return failure instead of an interval. The intersection algorithm begins by creating a table of tuples . For each interval there are three entries: the lower endpoint, the midpoint and the upper endpoint, labelled with types −1, 0 and +1 respectively. Thus the interval ''c'' ± ''r'' results in the entries <''c''−''r'',−1>, <''c'',0> and <''c''+''r'',+1>. These entries are then sorted by offset. Variables: This algorithm uses ''f'' as number of false tickers, ''endcount'' and ''midcount'' are integers. ''Lower'' and ''upper'' are values of offsets.
  1. nitialize best fStart with ''f''=0, assuming all input intervals are valid. Each time no interval is found f will be incremented until either an interval is found or ''f'' ≥ ''M''/2.
  2. nitialize''endcount''=0 and ''midcount''=0.
  3. ind lower endpointStart at beginning of the list (lowest offset) consider each tuple in order. ''endcount'' = ''endcount''−''type''. If ''endcount'' ≥ ''M''−''f'' then ''lower'' = ''offset'' and goto step 3 because the (possible) lower endpoint has been found. If the ''type'' = 0 then ''midcount'' = ''midcount''+1. Repeat with next tuple. If reach end of list then goto step 6.
  4. entative lower endpoint found, initialize to find upper endpointset ''endcount''=0.
  5. etermine number of midpointsStart from end of list and work towards lower offsets. ''endcount'' = ''endcount''+''type''. If ''endcount'' ≥ ''M''−''f'' then ''upper'' = ''offset'', goto step 5. If ''type'' = 0 then ''midcount'' = ''midcount''+1. Repeat for next tuple. If reach end of list then goto step 6.
  6. if ''lower'' ≤ ''upper'' and ''midcount'' ≤ ''f'' then return interval 'lowerendpoint'', ''upperendpoint''as resulting confidence interval.
  7. ncrement number of falsetickers''f'' = ''f''+1. If ''f'' ≥ ''M''/2 then terminate and return FAILED, otherwise goto step 1.


References

{{reflist Agreement algorithms