5 added 24 characters in body

I guess what you are after is the Hilbert function of ideal. More precisely, if you have a multigraded polynomial ring $k[x_1,\ldots,x_n]$ and the ideal is given by $I=(f_1,\ldots,f_r)$, the Hilbert function is simply the number $$h(\alpha)=\dim_k (k[x_1,\ldots,x_n]/I)_\alpha.$$Here $\alpha$ may take values in the multigrading. When $|\alpha|$ is large, the Hilbert-Serre theorem says that $h(\alpha)$ is actually a polynomial function in $\alpha$ and so the generating function is actually a rational function. There are many algorithms to compute the Hilbert function of such rings based on the theory of Gröbner basis and you could try them out in Macaulay2.

In certain special cases there are other alternatives though. As in your case, you can often turn this problem into a counting problem. Note that polynomials monomials of degree $n$ in $\mathbb{P}_{2,2,2,4}$ correspond bijectively to non-negative solutions of the equation $$2a+2b+2c+4d=n$$Let $s(n)$ denote this number. Then since the ideal $I=(P_1,P_2)$ is a complete intersection of two degree 8 polynomials, we get that the dimension of polynomials of degree $n$ modulo $I$ is exactly $$s(n)-2s(n-8). s(n)-2s(n-8)+s(n-16)$$If $n=18$, I we get dimension 57$125-2\cdot 35+3=60$. In particular, if the ideal is c.i., this argument shows that it suffices to know the number of degree $k$ polynomials in the polynomial ring. In the general case however, you might not be so lucky that your ideal is a c.i. and then perhaps Hilbert-functions are better suited.

4 added 143 characters in body

I guess what you are after is the Hilbert function of ideal. More precisely, if you have a multigraded polynomial ring $k[x_1,\ldots,x_n]$ and the ideal is given by $I=(f_1,\ldots,f_r)$, the Hilbert function is simply the number $$h(\alpha)=\dim_k (k[x_1,\ldots,x_n]/I)_\alpha.$$Here $\alpha$ may take values in the multigrading. When $|\alpha|$ is large, the Hilbert-Serre theorem says that $h(\alpha)$ is actually a polynomial function in $\alpha$ and so the generating function is actually a rational function. There are many algorithms to compute the Hilbert function of such rings based on the theory of Gröbner basis and you could try them out in Macaulay2.

In certain special cases there are other alternatives though. As in your case, you can often turn this problem into a counting problem. Note that polynomials of degree $n$ in $\mathbb{P}_{2,2,2,4}$ correspond bijectively to non-negative solutions of the equation $$2a+2b+2c+4c=n 2a+2b+2c+4d=n$$Let $s(n)$ denote this number. Then since the ideal $I=(P_1,P_2)$ is a complete intersection of two degree 8 polynomials, we get that the dimension of polynomials of degree $n$ modulo $I$ is exactly $$s(n)-2s(n-8).$$If $n=18$, I get dimension 57. In particular, if the ideal is c.i., this argument shows that it suffices to know the number of degree $k$ polynomials in the polynomial ring. In the general case however, you might not be so lucky that your ideal is a c.i. and then perhaps Hilbert-functions are better suited.

3 deleted 18 characters in body

I guess what you are after is the Hilbert function of the affine scheme cut out by the ideal. More precicelyprecisely, if you have a (multigraded) multigraded polynomial ring $k[x_1,\ldots,x_n]$ and the ideal is given by $I=(f_1,\ldots,f_r)$, the Hilbert function is simply the number $$h(\alpha)=\dim_k (k[x_1,\ldots,x_n]/I)_\alpha.$$Here $\alpha$ may take values in the multigrading. When $|\alpha|$ is large, the Hilbert-Serre theorem says that $h(\alpha)$ is actually a polynomial function in $\alpha$ and so the generating function is actually a rational function. There are many algorithms to compute the Hilbert function of such rings and most of them are based on the theory of Gröbner basis . I guess my main suggestion would be to test and you could try them out the software in Macaulay2.

There are of course in some

In certain special cases there are other alternatives though. As in you your case, you can often turn this problem into a counting problem. Note that polynomials of degree n $n$ in $\mathbb{P}_{2,2,2,4}$ correspond bijectively to non-negative solutions of the equation $$2a+2b+2c+4c=n$$Let $s(n)$ denote this number. Then since the ideal $I=(P_1,P_2)$ is a complete intersection of two degree 8 polynomials, we get that the dimension of polynomials of degree $n$ modulo $I$ is exactly $$s(n)-2s(n-8).$$In other cases $If$n=18\$, I get dimension 57. In the general case however, you might not be so lucky that your ideal is a c.i. and then perhaps Hilbert-functions are better suited.

2 added 605 characters in body
1