Content deleted Content added
m Typography: use ± instead of "+/-" |
m More typographic improvements |
||
Line 1:
The '''Intersection Algorithm''' is an [[agreement algorithm]] used to select sources for estimating accurate time from a number of [[noise|noisy]] time sources, it forms part of the modern Network Time Protocol.
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.
==Method==
Given ''M'' intervals of the form ''c'' ± ''r'' (which
The intersection algorithm begins by creating a table of tuples <offset,type>.
Variables: This algorithm uses ''f'' as number of false tickers, ''endcount'' and ''midcount'' are integers. ''Lower'' and ''upper'' are values of offsets.
0) [initialize best f] Start 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.
1) [initialize] ''endcount''=0
2) [find lower endpoint] Start at begining of the list (lowest offset) consider each tuple in order. ''endpoint'' = ''endpoint''−''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.
|