# Linear Programming

> The Linear Programming is an approach used to achieve the best outcome in a model with linear relationships.

## What is linear programming and what is it used for?

The mathematical optimization method that finds the best value of a linear objective function under linear constraints. Despite the name, it is not a coding style; it's used in scheduling, logistics and resource allocation.

- Topic: Programming Approaches
- Type: approach

## Common mistakes

- Assuming linear programming is a coding style or paradigm.
- Using it for problems where variables must be whole numbers, which needs integer programming.

## Interview questions

### Is linear programming related to writing code?

No. Here "programming" means planning or optimization. It is a mathematical method, though solvers are called from code.

### What is the difference between linear and integer programming?

Linear programming lets variables take any real value. Integer programming requires some or all variables to be whole numbers, which is much harder to solve.

### What is the simplex method?

The classic algorithm for solving linear programming problems. It moves along the corners of the feasible region until it reaches the best value of the objective.

## Related cards

- [Dynamic Programming](https://wonderium.dev/engineering/dynamic-programming.md)
- [Greedy Algorithms](https://wonderium.dev/algorithms/greedy-algorithms.md)
- [Algorithm Analysis](https://wonderium.dev/algorithms/algorithm-analysis.md)
- [Matrix](https://wonderium.dev/algorithms/matrix.md)

---

- Level: [Engineering](https://wonderium.dev/engineering.md)
- HTML version: https://wonderium.dev/engineering/linear-programming
- Last updated: 2026-11-25
