Quadrilateral inequalities optimize DP

usage

If there is a state equation $f[i][j]=min(f[i][k]+f[k+1][j])+w[i][j]$ or replace min with max

and w satisfies the monotonicity of interval inclusion and the quadrilateral inequality

Monotonicity of interval inclusion:

If for $\forall i_1<i_2$ and $j_1>j_2$ (ie $[i_2,j_2]\subset[i_1,j_1]$), there are $$

Quadrilateral inequality:

 

Guess you like

Origin http://43.154.161.224:23101/article/api/json?id=324972099&siteId=291194637