Concept

Majority function

In Boolean logic, the majority function (also called the median operator) is the Boolean function that evaluates to false when half or more arguments are false and true otherwise, i.e. the value of the function equals the value of the majority of the inputs. Representing true values as 1 and false values as 0, we may use the (real-valued) formula: The "−1/2" in the formula serves to break ties in favor of zeros when the number of arguments n is even. If the term "−1/2" is omitted, the formula can be used for a function that breaks ties in favor of ones. Most applications deliberately force an odd number of inputs so they don't have to deal with the question of what happens when exactly half the inputs are 0 and exactly half the inputs are 1. The few systems that calculate the majority function on an even number of inputs are often biased towards "0"—they produce "0" when exactly half the inputs are 0 -- for example, a 4-input majority gate has a 0 output only when two or more 0's appear at its inputs. In a few systems, the tie can be broken randomly. A majority gate is a logical gate used in circuit complexity and other applications of Boolean circuits. A majority gate returns true if and only if more than 50% of its inputs are true. For instance, in a full adder, the carry output is found by applying a majority function to the three inputs, although frequently this part of the adder is broken down into several simpler logical gates. Many systems have triple modular redundancy; they use the majority function for majority logic decoding to implement error correction. A major result in circuit complexity asserts that the majority function cannot be computed by AC0 circuits of subexponential size. For any x, y, and z, the ternary median operator 〈x, y, z〉 satisfies the following equations. 〈x, y, y〉 = y 〈x, y, z〉 = 〈z, x, y〉 〈x, y, z〉 = 〈x, z, y〉 〈〈x, w, y〉, w, z〉 = 〈x, w, 〈y, w, z〉〉 An abstract system satisfying these as axioms is a median algebra. For n = 1 the median operator is just the unary identity operation x.

About this result
This page is automatically generated and may contain information that is not correct, complete, up-to-date, or relevant to your search query. The same applies to every other page on this website. Please make sure to verify the information with EPFL's official sources.

Graph Chatbot

Chat with Graph Search

Ask any question about EPFL courses, lectures, exercises, research, news, etc. or try the example questions below.

DISCLAIMER: The Graph Chatbot is not programmed to provide explicit or categorical answers to your questions. Rather, it transforms your questions into API requests that are distributed across the various IT services officially administered by EPFL. Its purpose is solely to collect and recommend relevant references to content that you can explore to help you answer your questions.