Encyclopedia > Majority function

  Article Content

Majority function

The majority function is a logic function from n inputs to one output, defined as follows: If more inputs are TRUE than are FALSE, then the majority function returns TRUE. Otherwise, the function returns FALSE.

Representing TRUE as 1 and FALSE as 0 provides this alternate definition:

                         /                 
                        |  1   Σ pi - 1/2  |
 Majority(p1..n) = floor |  - + ----------  |
                        |  2        n      |
                                         /
where floor(n) represents the greatest integer less than or equal to n. The "- 1/2" in the formula serves to break ties in favor of FALSE.



All Wikipedia text is available under the terms of the GNU Free Documentation License

 
  Search Encyclopedia

Search over one million articles, find something about almost anything!
 
 
  
  Featured Article
Canadian Music Hall of Fame

... Doherty[?] 1996 John Kay[?] 1996 Dominic Troiano[?] 1996 Zal Yanovsky 1997 Gil Evans[?] 1997 Lenny Breau[?] 1997 Maynard Ferguson 1997 Moe Koffman[?] 1997 ...

 
 
 
This page was created in 36.4 ms