#P10640. Inequality Existence in Homogeneous Polynomials
Inequality Existence in Homogeneous Polynomials
Inequality Existence in Homogeneous Polynomials
Let \( f(x,y) \) and \( g(x,y) \) be two binary homogeneous polynomials with non-negative coefficients. In other words, if \( f(x,y) \) is of degree \( k \) then it can be written as
[ f(x,y)=a_0x^k+a_1x^{k-1}y+\cdots+a_k y^k, \quad a_i \ge 0, ]
and similarly, if \( g(x,y) \) is of degree \( l \) then
[ g(x,y)=b_0x^l+b_1x^{l-1}y+\cdots+b_l y^l, \quad b_i \ge 0. ]
Your task is to determine whether there exist positive constants \( A > 0 \) and \( r > 0 \) such that the following inequality holds for all \( x, y > 0 \):
[ f(x,y) \ge A, [g(x,y)]^r \quad \text{for all } x,y>0. ]
Note: Because the polynomials are homogeneous, by substituting \( x=t \) and \( y=1 \), the inequality becomes \[ f(t,1) \ge A\, [g(t,1)]^r \quad \text{for all } t>0. \]
Moreover, a scaling argument shows that if \( k>0 \) and \( l>0 \) then in order for the inequality to hold for all \( t>0 \), we must have \[ r=\frac{k}{l}. \]
Thus, for the case \( k,l>0 \), the problem reduces to checking whether \[ \inf_{t>0} \frac{f(t,1)}{[g(t,1)]^{\frac{k}{l}}} > 0. \]
In the special case when both polynomials are constant (i.e. \( k=l=0 \)), the inequality becomes an inequality between two positive constants.
Determine and output YES
if such constants exist, or NO
otherwise.
inputFormat
The first line contains two integers \( d_f \) and \( d_g \) representing the degrees of \( f(x,y) \) and \( g(x,y) \) respectively. Note that if a polynomial is of degree \( d \), it has \( d+1 \) coefficients.
The second line contains \( d_f+1 \) non-negative numbers: the coefficients of \( f(x,y) \) in descending order with respect to the power of \( x \) (i.e. the first number is the coefficient of \( x^{d_f} \) and the last is the coefficient of \( y^{d_f} \)).
The third line contains \( d_g+1 \) non-negative numbers: the coefficients of \( g(x,y) \) in descending order with respect to the power of \( x \).
outputFormat
Output a single line containing either YES
if there exist positive constants \( A \) and \( r \) (with \( r=\frac{d_f}{d_g} \) when \( d_f,d_g>0 \)) such that for all \( x, y > 0 \) the inequality holds, or NO
otherwise.
sample
0 0
5
3
YES