L = []
Q = []
for i in range(1,51):
    T = []
    S = []
    for j in range(7):
        A = random_matrix(GF(2),10**4,10**4,density=ZZ(i)/10**4)
        t = cputime()
        A.echelonize('heuristic')
        T.append(cputime(t))
    for j in range(5):
        A = random_matrix(GF(2),10**4,10**4,density=ZZ(i)/10**4)
        t = cputime()
        A.echelonize('pluq')
        S.append(cputime(t))
    L.append((i,sorted(T)[3]))
    Q.append((i,sorted(S)[2]))
    print L[-1],Q[-1]
    sys.stdout.flush()
(line(L)+line(Q,rgbcolor=(1,0,0))).save("/home/malb/heuristic.png")
