Binary Variable¶
Definition¶
A binary variable is a decision variable restricted to . For a yes-or-no choice , the course convention is
Interpretation¶
A binary variable turns a yes-or-no decision into a number, 1 for yes and 0 for no, so that the decision can appear in linear objectives and constraints. Its practical meaning must be stated explicitly: which decision it describes and which value means yes.
Only the two endpoints are allowed values. The light band between them is the relaxation , which also admits values such as that correspond to no decision at all.
The 0–1 coding gives linear expressions a logical meaning. The sum counts the yes decisions, adds up the costs of the chosen alternatives only, allows at most one of two alternatives, and allows alternative 2 only if alternative 1 is chosen.
Key Results¶
- The continuous bounds alone do not enforce binarity.
- Summing binary variables counts the selected decisions.
- Auxiliary binary variables can activate or relax constraints.
Examples¶
The red points are the allowed values 0 and 1; the shaded interval belongs to the continuous relaxation.
- A station-location variable is 1 exactly when an ambulance station is built in that town.
- prohibits selecting both alternatives.
Prerequisites¶
Related Concepts¶
Sources¶
- OR Modelling · Week 2
Aliases: 0-1 variable, binary decision variable, zero-one variable Symbols: sum
Last updated: 20 October 2026 03:02
Binary VariableBinary Integer ProgramCapacity Expansion ModelContingent DecisionsEither-Or ConstraintsFinite-Value ConstraintMixed Integer ProgramMutually Exclusive DecisionsParity ConstraintDecision Variable