Groebner basis, resultants and the generalized Mandelbrot set