# Linear programming constraints

How do I formulate a linear constraint using LP for the following?

$$x_1 + x_2 + \cdots + x_n \geq 5$$ then $$z$$ takes a value of $$1$$, where $$x_1, x_2, \dots, x_n, z \in \{0,1\}$$.

• Do you mean, if $x_1 + \cdots x_n \ge 5$ then $z$ should equal 1? – LarrySnyder610 Apr 13 at 1:37

For example $$(n-4)z+4\geq\Sigma x_i$$.