Groebner bases, initial ideals and initial algebras