ArticleslgStudy

mathematics

Majority function

Majority function is a mathematics topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Majority function rather than just read about it. In short: 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. Boolean circuits A majority gate is a logical gate used in circuit complexity and other applications of Boolean circuits.

Majority function — main illustration
Majority function — illustration

Key takeaways

  • Majority function belongs to mathematics; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Majority function to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Majority function from memory before moving on to harder problems.

Reference excerpt

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.

Boolean circuits

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.

Properties 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. Other useful properties of the ternary median operator function include:

given ⟨x, y, z⟩ = w, ⟨x, y, w⟩ = z ⟨¬x, ¬y, ¬z⟩ = ¬⟨x, y, z⟩ ⟨x, y, x ⊕ y ⊕ z⟩ = ⟨x, y, ¬z⟩ ⟨¬x, y, x ⊕ y ⊕ z⟩ = ⟨¬x, y, z⟩

Ties 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.

Monotone formulae for majority For n = 1 the median operator is just the unary identity operation x. For n = 3 the ternary median operator can be expressed using conjunction and disjunction as xy + yz + zx. For an arbitrary n there exists a monotone formula for majority of size O(n5.3). This is proved using probabilistic method. Thus, this formula is non-constructive. Approaches exist for an explicit formula for majority of polynomial size:

Take the median from a sorting network, where each compare-and-swap "wire" is simply an OR gate and an AND gate. The Ajtai–Komlós–Szemerédi (AKS) construction is an example. Combine the outputs of smaller majority circuits. Derandomize the Valiant proof of a monotone formula.

See also Boolean algebra (structure) Boolean algebras canonically defined Boyer–Moore majority vote algorithm Majority problem (cellular automaton)

Notes

References Knuth, Donald E. (2008). Introduction to combinatorial algorithms and Boolean functions. The Art of Computer Programming. Vol. 4a. Upper Saddle River, NJ: Addison-Wesley. pp. 64–74. ISBN 978-0-321-53496-5.

External links Media related to Majority functions at Wikimedia Commons

Illustrations

Majority function: Four-bit majority circuit
Four-bit majority circuit

Worked examples

Example 1 — a first encounter with Majority function

Start with the simplest possible case. Write down what Majority function claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In mathematics, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Majority function before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Majority function ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Majority function

In research
Majority function appears in mathematics research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Majority function in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Majority function is common in secondary-school and first-year university syllabi. It links to neighbouring topics Boolean algebra, Circuit complexity, Logic gates, so understanding it makes those chapters shorter.
In everyday life
Look for Majority function outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Majority function in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Majority function means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Majority function out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Majority function in simple terms?

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. Boolean circuits A majority gate is a lo…

Why does Majority function matter?

Because it connects several mathematics ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Majority function?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Majority function.

Tags

  • Boolean algebra
  • Circuit complexity
  • Logic gates

Keep exploring