4.10.21 · HinglishAdvanced Topics (Elite Level)

Linear programming — simplex method (intro)

1,669 words8 min readRead in English

4.10.21 · Maths › Advanced Topics (Elite Level)


Linear program KYA hota hai?

YEH form KYU? Har "≥" constraint se multiply karke "≤" ban jaata hai; equalities do inequalities mein split hoti hain; minimization maximization hoti hai. Toh yeh ek form fully general hai.


HOW: Inequalities ko equations mein kaise convert karein: slack variables

YEH KYU karte hain? Equations linear algebra se aasani se solve hoti hain (Gaussian elimination). Polytope ke corners kuch variables ko set karke aur baaki solve karke correspond karte hain — slacks humaare paas exactly yahi karne ke liye ek clean bookkeeping system deti hain.


Simplex tableau ko scratch se derive karna

Neeche diye example ko lekar sab kuch haath se banayenge.

Step 1 — Slacks add karo. KYU? Equations paane ke liye.

Step 2 — Initial tableau. KYU? Basic variables hain (set ); yeh corner deta hai jahan — ek valid starting vertex kyunki .

Basis RHS
1 1 1 0 4
1 3 0 1 6
0 0 0

Step 3 — Entering variable choose karo. KYU? Bottom row padhti hai . ke neeche negative entry ka matlab hai badhane se badhta hai. Sabse zyada negative pick karo: enter karta hai.

Step 4 — Ratio test (leaving variable). KYU? Hum ko upar push karte hain, lekin pehle koi constraint bind karega. Compute : row 1 , row 2 . Sabse chhota ratio jeet ta hai (row 1) — aage jaane se ho jaayega (infeasible). Toh nikalta hai.

Step 5 — Pivot -row1 entry (=1) pe. KYU? Us column ko unit vector banaao taaki basic ban jaaye. Row1 waisi rehti hai; Row2 Row2 − Row1; -row -row Row1.

Basis RHS
1 1 1 0 4
0 2 1 2
0 1 3 0 12

Ab corner hai, . Bottom row mein koi negative entry nahi → optimal!

Figure — Linear programming — simplex method (intro)

Graphically verify karo: Vertices hain , , , dono lines ka intersection . Maximum sach mein hai pe.


Simplex method KYU kaam karta hai (logic ko steel-man karo)

  1. Maximum vertex pe hota hai — Kyunki linear hai, uske level sets parallel hyperplanes hain; improving direction mein slide karte hue, tum polytope ki boundary pe rukoge, ek corner pe jaake.
  2. Har pivot ek corner-to-corner move hai ek aisi edge ke saath jo ko increase karta hai.
  3. Finitely many corners ⇒ process terminate hota hai (rare degeneracy ignore karke).

Ek doosra worked example (minimization negation ke zariye)


Flashcards

LP ki feasible region kaisi shape ki hoti hai?
Ek convex polytope (half-spaces ka intersection).
Linear objective apna optimum kahan attain karta hai?
Feasible region ke ek vertex (corner) pe.
Slack variable kya hota hai?
Ek non-negative variable jo constraint ko equality mein convert karne ke liye add ki jaati hai, unused resource measure karta hai.
Max-problem tableau mein kaunsa variable enter karta hai?
Woh non-basic variable jiska -row mein sabse zyada negative coefficient ho.
Leaving variable kaise choose karte hain?
Minimum-ratio test: sabse chhota RHS ÷ (positive entry) pivot column mein.
Simplex method (maximization) mein kab rukna hai?
Jab sab objective-row coefficients hon.
Ratio test mein sirf positive entries KYU use karte hain?
Negative/zero entries bound nahi karti ki entering variable kitna badh sakta hai bina infeasible hue.
Minimization LP ko kaise handle karte hain?
Objective ka negative maximize karo; min .
Basic feasible solution geometrically kya represent karta hai?
Polytope ka ek vertex ( non-basic vars ko 0 set karo, basic walo ko solve karo).
constraint ko standard form mein kaise convert karte hain?
se multiply karo taaki mein flip ho jaaye (phir slack add karo).

Recall Feynman: 12-saal ke bachche ko explain karo

Ek aisa fenced playground imagine karo jo bahut-se-corners wale khet jaisa ho. Tum wahan khade rehna chahte ho jahan zameen sabse oonchi ho, lekin zameen ek ramp ki tarah flatly tilted hai. Ek fenced khet ke andar flat ramp pe sabse oonchi jagah hamesha fence ke corner pe hoti hai. Toh tum ek corner pe shuru karte ho aur tab hi agale corner pe chalte ho jab woh oocha ho. Jab koi bhi neighbouring corner oocha na ho, tum sabse upar khade ho — ho gaya! Fence ke saath-saath yeh chalne wala trick hi simplex method hai.


Connections

  • Convex Sets and Polytopes — KYU optima vertices pe hote hain.
  • Gaussian Elimination — pivoting, row reduction hai ek feasibility rule ke saath.
  • Duality in Linear Programming — har LP ka ek partner hota hai; optimal values match karte hain.
  • Gradient and Level Sets — KYU linear objectives boundaries ki taraf slide karte hain, uski geometry.
  • Integer Programming — kya change hota hai jab variables whole numbers hone chahiye.
  • Optimization (Lagrange Multipliers) — smooth-constraint wala cousin.

Concept Map

maximize

subject to

carve out

max attained at

add leftover

convert le into

solved by

corresponds to

arranged as

most negative row

ratio test

walk to next

no better neighbour

Linear program

Objective z equals c dot x

Constraints Ax le b

Convex polytope

Vertex corner

Slack variables

Equations

Basic feasible solution

Simplex tableau

Entering variable

Leaving variable

Simplex method

Optimal vertex