Karmarkar's algorithm is an algorithm introduced by Narendra Karmarkar in 1984 for solving linear programming problems. It was the first reasonably efficient algorithm that solves these problems in polynomial time. The ellipsoid method is also polynomial time but proved to be inefficient in practice. Denoting by n {\displaystyle n} the number of variables, m the number of inequality constraints, and L {\displaystyle L} the number of bits of input to the algorithm, Karmarkar's algorithm requires O ( m 1.5 n 2 L ) {\displaystyle O(m^{1.5}n^{2}L)} operations on O ( L ) {\displaystyle O(L)} -digit numbers, as compared to O ( n 3 ( n + m ) L ) {\displaystyle O(n^{3}(n+m)L)} such operations for the ellipsoid algorithm. In "square" problems, when m is in O(n), Karmarkar's algorithm requires O ( n 3.5 L ) {\displaystyle O(n^{3.5}L)} operations on O ( L ) {\displaystyle O(L)} -digit numbers, as compared to O ( n 4 L ) {\displaystyle O(n^{4}L)} such operations for the ellipsoid algorithm. The runtime of Karmarkar's algorithm is thus
O ( n 3.5 L 2 ⋅ log L ⋅ log log L ) , {\displaystyle O(n^{3.5}L^{2}\cdot \log L\cdot \log \log L),}
using FFT-based multiplication (see Big O notation). Karmarkar's algorithm falls within the class of interior-point methods: the current guess for the solution does not follow the boundary of the feasible set as in the simplex method, but moves through the interior of the feasible region, improving the approximation of the optimal solution by a definite fraction with every iteration and converging to an optimal solution with rational data.
The algorithm Consider a linear programming problem in matrix form:
Karmarkar's algorithm determines the next feasible direction toward optimality and scales back by a factor 0 < γ ≤ 1. It is described in a number of sources. Karmarkar also has extended the method to solve problems with integer constraints and non-convex problems.
Example
Consider the linear program
maximize x 1 + x 2 subject to 2 p x 1 + x 2 ≤ p 2 + 1 , p = 0.0 , 0.1 , 0.2 , … , 0.9 , 1.0. {\displaystyle {\begin{array}{lrclr}{\text{maximize}}&x_{1}+x_{2}\\{\text{subject to}}&2px_{1}+x_{2}&\leq &p^{2}+1,&p=0.0,0.1,0.2,\ldots ,0.9,1.0.\end{array}}}
That is, there are 2 variables x 1 , x 2 {\displaystyle x_{1},x_{2}} and 11 constraints associated with varying values of p {\displaystyle p} . This figure shows each iteration of the algorithm as red circle points. The constraints are shown as blue lines.
… excerpt ends here. Continue reading the full article.

