Balanced Boolean function: Difference between revisions

Content deleted Content added
top: fmt
rm examples that are either incomplete (don't specify input ___domain) or wrong (depending on details of numerical encoding). Better to just stick with bits.
Line 1:
In [[mathematics]] and [[computer science]], a '''balanced boolean function''' is a [[boolean function]] whose output yields as many '''0'''s as '''1'''s over its [[Domain of a function|input set]]. This means that for a uniformly random input string of bits, the probability of getting a '''1''' is 1/2.
 
An exampleExamples of a balanced boolean functionfunctions isare the function that assignscopies athe '''1'''first tobit everyof [[evenits number]] and '''0'''input to all odd numbers (likewise the other way around). The same applies for functions assigning '''1''' to all positive numbers and '''0''' otherwise.output,
and the function that produces the [[exclusive or]] of the input bits.
 
A Boolean function of ''n'' bits is balanced if it takes the value 1 with probability 1⁄2.
 
== Usage ==