WOLFRAM

Majority[e1,e2,]

gives True if the majority of the ei are True, and False if the majority are False.

Details

Examples

open allclose all

Basic Examples  (1)Summary of the most common use cases

Return True when the majority of arguments are True:

Out[1]=1

Return False when an equal number of arguments are True and False:

Out[2]=2

Scope  (1)Survey of the scope of standard use cases

Automatic simplifications:

Out[1]=1
Out[2]=2
Out[3]=3
Out[4]=4
Out[5]=5

Properties & Relations  (1)Properties of the function, and connections to other functions

Truth table for binary Majority:

Out[1]=1

Ternary Majority:

Out[2]=2

Neat Examples  (1)Surprising or curious use cases

The 2D truth table for a Majority function of 12 variables:

Out[1]=1
Wolfram Research (2008), Majority, Wolfram Language function, https://reference.wolfram.com/language/ref/Majority.html.
Wolfram Research (2008), Majority, Wolfram Language function, https://reference.wolfram.com/language/ref/Majority.html.

Text

Wolfram Research (2008), Majority, Wolfram Language function, https://reference.wolfram.com/language/ref/Majority.html.

Wolfram Research (2008), Majority, Wolfram Language function, https://reference.wolfram.com/language/ref/Majority.html.

CMS

Wolfram Language. 2008. "Majority." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Majority.html.

Wolfram Language. 2008. "Majority." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Majority.html.

APA

Wolfram Language. (2008). Majority. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Majority.html

Wolfram Language. (2008). Majority. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Majority.html

BibTeX

@misc{reference.wolfram_2025_majority, author="Wolfram Research", title="{Majority}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Majority.html}", note=[Accessed: 04-May-2025 ]}

@misc{reference.wolfram_2025_majority, author="Wolfram Research", title="{Majority}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Majority.html}", note=[Accessed: 04-May-2025 ]}

BibLaTeX

@online{reference.wolfram_2025_majority, organization={Wolfram Research}, title={Majority}, year={2008}, url={https://reference.wolfram.com/language/ref/Majority.html}, note=[Accessed: 04-May-2025 ]}

@online{reference.wolfram_2025_majority, organization={Wolfram Research}, title={Majority}, year={2008}, url={https://reference.wolfram.com/language/ref/Majority.html}, note=[Accessed: 04-May-2025 ]}