FACTOID # 1: Guinea has the wettest capital on Earth, with 3.7 metres of rain a year.
 
 Home   Encyclopedia   Statistics   Countries A-Z   Flags   Maps   Education   Forum   FAQ   About 
 
WHAT'S NEW
RECENT ARTICLES
More Recent Articles »
 

FACTS & STATISTICS    Simple view

  1. Select countries to view: (hold down Control key and click to select several)

     

     

    Compare:

     

     

  1. Select fact or statistic: (* = graphable)

     

     

     

  2. (OPTIONAL) Compare to statistic: (both need to be graphable)

     

     

     

  3. View result as:

     

       
(OR) SEARCH ALL encyclopedia, stats & forums:   

Encyclopedia > Intersection algorithm

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. It is a modified form of Marzullo's algorithm.


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 repeated execution.


Method

Given M intervals c +/- r (which is [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). The best estimate is that which assumes the least number of 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 <offset,type>. For each interval there are three entries, the lower endpoint, the midpoint and the upper endpoint, labelled with types -1, 0 1 respectively. Thus interval c +/- r results in entries <c-r,-1> <c,0> <c+r,+1>. These 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.


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 midcount=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.


3) [tentative lower endpoint found, initialize to find upper endpoint] set endcount=0.


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.


  Results from FactBites:
 
Marzullo's algorithm - Wikipedia, the free encyclopedia (856 words)
Marzullo's algorithm, invented by Keith Marzullo for his Ph.D. dissertation, is an agreement algorithm used to select sources for estimating accurate time from a number of noisy time sources.
Marzullo's algorithm is efficient in terms of time for producing an optimal value from a set of estimates with confidence intervals where the actual value may be outside the confidence interval for some sources.
A more sophisticated approach would recognize that this could be throwing away useful information from the confidence intervals of the sources and that a probabilistic model of the sources could return a value other than the center.
UOR_7.2.4 (943 words)
The algorithm begins by sorting the 2n end points from left to right according to the values of their x-coordinates and then sweeps through the 2n end points from left to right.
During the sweep, the algorithm maintains a list of current line segments which is sorted according to the order in which the line segments intersect the vertical sweep line.
To prove that this algorithm works, (i.e., that it finds an intersection if there is at least one), it is sufficient to show (see Problem 7.5) that if the algorithm is not stopped when it finds its first intersection, it is guaranteed to find eventually the leftmost intersection of the line segments.
  More results at FactBites »


 

COMMENTARY     


Share your thoughts, questions and commentary here
Your name
Your comments
Please enter the 5-letter protection code

Want to know more?
Search encyclopedia, statistics and forums:

 


Lesson Plans | Student Area | Student FAQ | Reviews | Press Releases |  Feeds | Contact
The Wikipedia article included on this page is licensed under the GFDL.
Images may be subject to relevant owners' copyright.
All other elements are (c) copyright NationMaster.com 2003-5. All Rights Reserved.
Usage implies agreement with terms.