minimal number of generators of a k-algebra over commutative rings I have that $R$ is the $k$-algebra ($k$ is a field) finitely generated by $S=\{f_1, ..., f_m \}\subset k[x_1, \cdots, x_n]$ and this set of polynomials is minimal with respect to inclusion (i.e., e dont have redundant elements). However, I know that the $f_i$'s are algebraically dependent. Can be the number $m=|S|$ unique? What are the conditions?
 A: This is not true. There are silly examples if the $f_i$ are reducible, and slightly less silly examples if the $f_i$ are required to be irreducible.
I am assuming that you fix the presentation $\phi \colon k[x_1,\ldots,x_n] \twoheadrightarrow R$ (and hence the ideal $I = \ker \phi$ cutting out $R$), but not the generators of $I$. Otherwise I cannot make sense of minimal with respect to inclusion.
Example 1. Let $R = k[x]/(x)$. Then the minimal number of generators of $I = (x)$ is $1$. However, $(x) = (x(x+1), x(x+2))$, since $(x+1,x+2) = (1)$. Then the set of generators $\{x(x+1),x(x+2)\}$ is inclusionwise minimal, because each element separately cuts out two points (instead of $1$) in $\mathbb A^1$.
Here is a less silly example, nonetheless of a similar flavour.
Example 2. Consider $R = k[x,y]/(x,y)$. The minimal number of generators of $I = (x,y)$ is $2$. But we also have $(x,y) = (y,y-x^2,(x-1)^2+y^2-1)$ (if $\operatorname{char}(k) \neq 2$). Geometrically, we are using the $x$-axis, the parabola $y = x^2$, and the circle around $(1,0)$ with radius $1$ to cut out the origin.
The axis and the parabola have a tangent direction in common, and the circle meets both other curves in more points than just the origin. Hence, no two of the three generate the same ideal, so the set of generators is inclusionwise minimal.
