Logical disjunction
From Exampleproblems
|
In mathematics, logical disjunction (usual symbol or) is a logical operator that results in true if either of the operands is true.
DefinitionIn logic and mathematics, a disjunction is an "or statement". For example "John skis or Sally swims" is a disjunction. Note that in everyday language, use of the word "or" can sometimes mean "either, but not both" (e.g., "would you like tea or coffee?"). In logic, this is called an "exclusive disjunction" or "exclusive or" (xor). When used formally, "or" allows for both parts of the or statement (its disjuncts) to be true ("and/or"), therefore "or" is also called inclusive disjunction.1 For two inputs A and B, the truth table of the function is as follows.
More generally a disjunction is a logical formula that can have one or more literals separated only by ORs. A single literal is often considered to be a degenerate disjunction. SymbolThe mathematical symbol for logical disjunction varies in the literature. In addition to the abbreviation "or", one may see
All the following are disjunctions: A ∨ B¬A ∨ B<p> A ∨ ¬B ∨ ¬C ∨ D ∨ ¬E<p> The equivalent notion in set theory is the set-theoretic union. Associativity and CommutativityFor more than two inputs, or can be applied to the first two inputs, and then the result can be or'ed with each subsequent input:
Because or is associative, the order of the inputs does not matter: the same result will be obtained regardless of association. The operator xor is also commutative and therefore the order of the operands is not important:
Bitwise operationDisjunction is often used for bitwise operations. Examples:
Note that in computer science the OR operator can be used to set a bit to 1 by OR-ing the bit with 1.
NoteTemplate:Ent Boole, closely following analogy with ordinary mathematics, premised, as a necessary condition to the definition of "x + y", that x and y were mutually exclusive. Jevons, and practically all mathematical logicians after him, advocated, on various grounds, the definition of "logical addition" in a form which does not necessitate mutual exclusiveness. See alsoExternal Links
de:Disjunktion et:Disjunktsioon fr:Disjonction logique id:Logika disjungsi he:OR לוגי nl:Logische disjunctie no:Inklusiv disjunksjon ja:論理和 pl:Alternatywa pt:Disjunção lógica sv:Logisk disjunktion th:การเลือกเชิงตรรกศาสตร์ uk:Диз'юнкція |
|
