We deliver solutions for the AI eraâcombining symbolic computation, data-driven insights and deep technology expertise.
LinearProgramming[c,m,b]
finds a vector x that minimizes the quantity c.x subject to the constraints m.x≥b and x≥0.
LinearProgramming[c,m,{{b1,s1},{b2,s2},…}]
finds a vector x that minimizes c.x subject to x≥0 and linear constraints specified by the matrix m and the pairs {bi,si}. For each row mi of m, the corresponding constraint is mi.x≥bi if si==1, or mi.x==bi if si==0, or mi.x≤bi if si==-1.
LinearProgramming[c,m,b,l]
minimizes c.x subject to the constraints specified by m and b and x≥l.
LinearProgramming[c,m,b,{l1,l2,…}]
minimizes c.x subject to the constraints specified by m and b and xi≥li.
LinearProgramming[c,m,b,{{l1,u1},{l2,u2},…}]
minimizes c.x subject to the constraints specified by m and b and li≤xi≤ui.
LinearProgramming[c,m,b,lu,dom]
takes the elements of x to be in the domain dom, either Reals or Integers.
LinearProgramming[c,m,b,lu,{dom1,dom2,…}]
takes xi to be in the domain domi.
Examplesopen allclose all Basic Examples (3)Minimize , subject to constraint and implicit non-negative constraints:
LinearProgramming has been superseded by LinearOptimization:
Solve the problem with equality constraint and implicit non-negative constraints:
Use LinearOptimization to solve the problem:
Solve the problem with equality constraint and implicit non-negative constraints:
Use LinearOptimization to solve the problem:
Scope (6)Minimize , subject to constraint and lower bounds , :
Minimize , subject to constraint and bounds , :
Minimize , subject to constraint and upper bounds , :
Minimize , subject to constraint and implicit non-negative constraints:
Minimize subject to bounds and only:
Solve the same kind of problem, but with both variables integers:
Solve the same problem, but with the first variable an integer:
Solve larger LPs, in this case 200,000 variables and 10,000 constraints:
Options (2) Method (1)"InteriorPoint" is faster than "Simplex" or "RevisedSimplex", though it only works for machine-precision problems:
Tolerance (1)If an approximated solution is sufficient, a loose Tolerance option makes the solution process faster:
Properties & Relations (2)A linear programming problem can also be solved using Minimize:
NMinimize or FindMinimum can be used to solve inexact linear programming problems:
Possible Issues (4)The integer programming algorithm is limited to the machine-number problems:
The "InteriorPoint" method only works for machine numbers:
The "InteriorPoint" method may return a solution in the middle of the optimal solution set:
The "Simplex" method always returns a solution at a corner of the optimal solution set:
In this case the optimal solution set is the set of all points on the line segment between and :
The "InteriorPoint" method may not always be able to tell if a problem is infeasible or unbounded:
Neat Examples (1)This expresses the Klee–Minty problem of dimension in LinearProgramming syntax:
Because scaling is applied internally, the simplex algorithm converges very quickly:
HistoryIntroduced in 1991 (2.0) | Updated in 2003 (5.0) ▪ 2007 (6.0)
Wolfram Research (1991), LinearProgramming, Wolfram Language function, https://reference.wolfram.com/language/ref/LinearProgramming.html (updated 2007). TextWolfram Research (1991), LinearProgramming, Wolfram Language function, https://reference.wolfram.com/language/ref/LinearProgramming.html (updated 2007).
CMSWolfram Language. 1991. "LinearProgramming." Wolfram Language & System Documentation Center. Wolfram Research. Last Modified 2007. https://reference.wolfram.com/language/ref/LinearProgramming.html.
APAWolfram Language. (1991). LinearProgramming. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/LinearProgramming.html
BibTeX@misc{reference.wolfram_2025_linearprogramming, author="Wolfram Research", title="{LinearProgramming}", year="2007", howpublished="\url{https://reference.wolfram.com/language/ref/LinearProgramming.html}", note=[Accessed: 12-July-2025 ]}
BibLaTeX@online{reference.wolfram_2025_linearprogramming, organization={Wolfram Research}, title={LinearProgramming}, year={2007}, url={https://reference.wolfram.com/language/ref/LinearProgramming.html}, note=[Accessed: 12-July-2025 ]}
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4