4.10.21 · D4 · HinglishAdvanced Topics (Elite Level)

ExercisesLinear programming — simplex method (intro)

2,726 words12 min read↑ Read in English

4.10.21 · D4 · Maths › Advanced Topics (Elite Level) › Linear programming — simplex method (intro)

Hum ek chhota sa dictionary baar baar use karte rahenge, toh pehle use plain words mein pin kar lete hain.

Ye recipe hai, taaki aap kabhi thread na khoyen:


Level 1 — Recognition

L1.1

Recall Solution

(a) Choices hain 2 decision variables. (b) Har constraint ke liye ek slack (na ki ke liye, kyunki woh variables ko non-negative rakhke handle hota hai). Do constraints → 2 slacks . (c) Total = decisions + slacks .

L1.2

Recall Solution

Non-basic , toh corner ==origin == hai. Phir . Slacks bas yeh kehte hain ki "origin par saara resource abhi bhi unused hai" — dono constraints slack hain, koi bhi tight nahi hai.


Level 2 — Application

L2.1

Recall Solution

Slacks: . -row hai , yani coefficients . Enter: sabse zyada negative hai ke neeche → enters (per unit badhane se sabse tezi se badhta hai). Ratio test — sirf woh rows jahaan -column entry positive ho:

  • Row : -entry hai → skip (ek kabhi increase ko bound nahi karta).
  • Row : .
  • Row : .

Sabse chhota ratio hai → leaves. ko tak push karne se ho jaata hai (constraint tight ho jaata hai) jabki baaki rehte hain. Naya corner: , toh aur .

L2.2

Recall Solution

Pehle pivot ke baad, basic hai (), aur -row mein ke neeche abhi bhi negative hai, toh hum dobara pivot karte hain. Row-reduction ko completion tak le jaana (enter , ratio test row choose karta hai) humein aur ke intersection par le jaata hai: Corner , aur . -row ab sab hai → optimal. Raaste mein teesra constraint check karo: ✓, dono sensibly use ho gaye. Neeche figure mein corner walk dekho.

Figure — Linear programming — simplex method (intro)

Level 3 — Analysis

L3.1

Recall Solution

-row equation hai (negatives ko doosri taraf le jaao). Toh , sabse bada positive rate. enters — ise badhane se per unit badhta hai, ke se zyada; columns ( aur ) ya toh kuch nahi karte ya kam kar dete hain, toh hum unhe kabhi nahi badhaaenge. "-row mein sabse zyada negative" exactly "sabse bada positive rate of gain" hai.

L3.2

Recall Solution

Haan — optimal hai, kyunki har -row coefficient hai. padhne par: kisi bhi currently-non-basic variable ko badhane se sirf kam ho sakta hai (ek ise unchanged rakhta hai). Improvement ki koi direction nahi bachi, toh hum top corner par baithe hain. Yeh parent note ka optimality test ek picture ki tarah hai: objective ramp ab kisi bhi feasible direction mein upar ki taraf nahi jhukti.


Level 4 — Synthesis

L4.1

Recall Solution

Negate kyun? Simplex loop maximize karne ke liye bana hai. minimize karna same hai jaise maximize karna, kyunki . Slacks: . -row coefficients hain . Pivot 1 — enter (most negative ). Ratios: , leaves. Naya corner: line par ke saath → , giving , . -row abhi bhi ke neeche negative dikhata hai, toh continue karo. Pivot 2 — enter . Binding pair hai aur . Solve: Corner : ? Dono objectives carefully check karo: . se compare karo: . Kyunki , corner actually ke liye behtar hai — column yahan improve nahi karega, toh -row pivot 1 ke baad already sab hai. Optimum: , . Isliye at . (Moral: hamesha evaluate karo — ratio/entering rules ek move propose karte hain, lekin optimality test hi confirm karta hai ki aap pahunch gaye hain.)

Figure — Linear programming — simplex method (intro)

L4.2

Recall Solution

Strong duality se, dual ka optimal (ek minimization) primal ke optimal ke barabar hota hai. Toh dual optimum hai . Usefulness: simplex se primal finish karne ke baad, value wala koi bhi feasible dual solution compute karna prove karta hai ki aap true optimum par pahunche — "z-row sab non-negative ho gayi" se pare ek doosra, independent certificate. Isliye tableau ke final -row entries slack columns ke neeche exactly dual variable values hoti hain.


Level 5 — Mastery (edge cases)

L5.1 — Degeneracy (ratio test mein tie)

Recall Solution

Tie ka matlab hai entering variable exact same value par do constraints hit karta hai — ek corner se se zyada constraints guzarti hain. Woh corner degenerate hai (over-determined). Practical danger: ek pivot basis variables swap kar sakta hai jabki nahi badalta (ek "stall"), aur rare cases mein method ek basis par cycle back kar sakta hai jo woh pehle visit kar chuka hai, kabhi terminate nahi karta. Fixes: Bland's rule (smallest index wala variable choose karke ties break karo) termination guarantee karta hai. Geometrically vertex theek hai; bookkeeping ko bas ek anti-cycling tie-break chahiye.

L5.2 — Unbounded objective

Recall Solution

Slack: . -row hai ; maano enter karta hai. Sirf ek constraint row mein uska column entry hai (negative). Ratio test sirf positive entries use karta hai — yahan koi nahi hai. Matlab: badhne par, bhi badhta hai, toh koi constraint kabhi ko nahi rokti. Hum (aur ) bina kisi limit ke badha sakte hain → LP unbounded hai, . Tableau mein signal: ek negative -row entry jiske poore column mein koi positive entry nahi = unbounded objective. (Figure dekho — feasible region upar hamesha ke liye khulti hai.)

Figure — Linear programming — simplex method (intro)

L5.3 — Infeasibility / no start

Recall Solution

convert karo: , jiska RHS hai. Basic starting solution slack deta hai → feasible nahi, toh origin ek valid starting corner nahi hai; plain simplex ko chahiye. Ek-line reason ki koi solution exist nahi karta: ek sum dono aur nahi ho sakta, toh feasible region empty hai (dono half-planes kabhi overlap nahi karte). Handle karne ke liye two-phase ya Big-M method chahiye jo pehle ek feasible corner dhoonde — jo yahan infeasibility report karta hai.


Connections

  • Convex Sets and Polytopes — har corner jis par aap hop karte hain woh ek convex polytope ka vertex hai.
  • Gaussian Elimination — har pivot ek feasibility guard ke saath row reduction ka ek round hai.
  • Duality in Linear Programming — L4.2 ka matching optimal value ek proof certificate hai.
  • Gradient and Level Sets — L5.2 ka unbounded ramp ek level-set hai jo hamesha upar slide karta rehta hai.
  • Integer Programming — kya badalta hai jab whole numbers hone chahiye (corners integer nahi bhi ho sakte).
  • Optimization (Lagrange Multipliers) — in corner walks ka smooth-constraint cousin.
Recall Self-test cloze

Entering variable woh hota hai jiska -row coefficient most negative ho. Leaving variable smallest positive ratio RHS ÷ column entry se choose hota hai. Hum tab rukते hain jab har -row coefficient == ho. Ratio-test column jisme no positive entries hon woh unbounded objective signal karta hai. Ratio test mein tie ek degenerate== vertex signal karta hai aur cycling ka risk hota hai.