Gröbner bases, local cohomology and reduction number