(*Primal LP*)
Maximize[2x1+3x2,4x1+8x2≤12&&2x1+x2≤3&&3x1+2x2≤4&&x1≥0&&x2≥0,{x1,x2}](*Dual LP*)
Minimize[12y1+3y2+4y3,4y1+2y2+3y3≥2&&8y1+y2+2y3≥3&&y1≥0&&y2≥0&&y3≥0,{y1,y2,y3}]

(*Primal LP*)
Maximize[34x1+31x2,5x1+2x2≤16&&3x1+7x2≤27&&x1≥0&&x2≥0,{x1,x2}]
(*Dual LP*)
Minimize[16y1+27y2,5y1+3y2≥34&&2y1+7y2≥31&&y1≥0&&y2≥0,{y1,y2}]