Simplex Algorithm implementation