(* 
 For now, I am not sharing my source code for the functions tableau[] and thetas[] to give you a chance of coding it yourself, following our discussion in class.
 *)

A={{1,2,1,0,0,4},{3,1,0,1,0,6},{1,0,0,0,1,2}};
target={1,1,0,0,0,0};
A//MatrixForm

(* Initial tableau, with feasible basis B={3,4,5} *)
tab1=tableau[A,target,{3,4,5}]
thetas[tab1,1]

(* Choose x1 as entering variable, x4 as departing variable, new feasible basis is B={1,3,5} *)
tab2=tableau[A,target,{1,3,5}]
thetas[tab2,2]

(* Choose x2 as entering variable, x3 as departing variable, new feasible basis is B={1,2,5} *)
tab3=tableau[A,target,{1,2,5}]

(*Minimum -14/5 is achieved at x=(8/5,6/5,0,0,2/5).*)

(*Checking the answer above:*)
Minimize[-x1-x2,A[[1;;3,1;;5]].{x1,x2,x3,x4,x5}=={4,6,2}&&x1≥0&&x2≥0&&x3≥0&&x4≥0&&x5≥0,{x1,x2,x3,x4,x5}]