Modeling Yes/No Decisions with Binary Variables

Use binary (0/1) decision variables to represent yes/no choices, then translate counting requirements, budgets, and logical relationships into linear constraints in order to formulate integer programs.

Step 1 of 157%

Tutorial

Binary Variables for Yes/No Decisions

A binary variable is a decision variable restricted to the two values 00 and 11:

x{0,1}.x \in \{0, 1\}.

Binary variables model yes/no decisions. We set x=1x=1 when the action is taken and x=0x=0 when it is not. For instance, if a firm is deciding whether to launch a new product, we let

x={1if the product is launched,0otherwise.x = \begin{cases} 1 & \text{if the product is launched,} \\ 0 & \text{otherwise.} \end{cases}

Multiplying xx by a cost or revenue figure produces a quantity that activates only when the decision is "yes." If launching the product costs \80{,}000andyieldsand yields$140{,}000$ in revenue, then

  • Total launch cost: 80,000x80{,}000\, x
  • Total launch revenue: 140,000x140{,}000\, x
  • Net profit: 140,000x80,000x=60,000x.140{,}000\, x - 80{,}000\, x = 60{,}000\, x.

When x=1x=1 the profit is \60{,}000;whenwhenx=0everytermcollapsestoevery term collapses to0.$ This trick -- multiplying a constant by a binary -- is the foundation of every integer-programming formulation.

navigate · Enter open · Esc close · ⌘K/Ctrl K toggle