Content deleted Content added
add reflist |
Remove out of place unused ref that had been copied to the wrong place |
||
(16 intermediate revisions by 16 users not shown) | |||
Line 1:
{{short description|Algorithm for selecting the best sources for time estimation}}
The '''intersection algorithm''' is an
Equipment Corporation, 1989.</ref>
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
==Method==
Given ''M'' intervals of the form ''c''
The intersection algorithm begins by creating a table of tuples <offset, type>. 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''
Variables: This algorithm uses ''f'' as number of false tickers, ''endcount'' and ''midcount'' are integers. ''Lower'' and ''upper'' are values of offsets.
<ol start="0">
▲2) [find lower endpoint] Start 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.
▲3) [tentative lower endpoint found, initialize to find upper endpoint] set ''endcount''=0.
</ol>
▲4) [determine number of midpoints] Start 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.
▲5) if ''lower'' ≤ ''upper'' and ''midcount'' ≤ ''f'' then return interval [''lowerendpoint'',''upperendpoint''] as resulting confidence interval.
▲6) [increment number of falsetickers] ''f'' = ''f''+1. If ''f'' ≥ ''M''/2 then terminate and return FAILED, otherwise goto step 1.
==References ==
|