(* 
      Priklad urcenia casovej zlozitosti roznych metod linearneho programovania na priklade Klee Mintyho
*) 

KleeMinty[n_] := 
        Module[{a, b, c, m, rhs}, c = Table[-(10^(n - i)), {i, n}]; 
          a[i_] := Join[Table[2 (10^(i - j)), {j, i - 1}], {1}, 
              Table[0, {n - i}]]; rhs[i_] := {(100^(i - 1)), -1}; 
          m = Table[a[i], {i, n}]; 
          b = Table[rhs[i], {i, n}]; {c, m, b}];

\(\(\(
\)\(\({c, m, b} = 
        KleeMinty[6];\)


    \(Print["Simplexova metoda"];\)

    Timing[
      LinearProgramming[c, m, 
        b, "Method" -> {"RevisedSimplex", "ScalingMethod" -> "None"}]]


    \(Print["Metoda vnutorneho bodu"];\)

    Timing[
      LinearProgramming[c, m, 
        b, "Method" -> {"InteriorPoint"}]]\)\)\)