[Study notes] slope optimization

[Study notes] slope optimization

[ SDOI2012] task scheduling

The slope Optimization Starter questions:

Set \ (f (x) \) of \ (F (x) \) of the post- conjugation and, \ (T (X) \) of \ (T (x) \) prefix and. \ (dp (i) \) indicating the completion of the first \ (i \) mandate minimum cost transfer:

\(dp(i)=\min \{dp(j) +f(j+1)\times(S+t(i)-t(j)) \}\)

Remove:

  • And \ (j \) has nothing: no
  • And only \ (j \) Related: \ (dp (J) + f (J + 1) \ Times (St (J)) \)
  • And \ (i, j \) Related: \ (F (J +. 1) \ Times T (I) \)

We only found and (j \) \ can be directly related to the pre-treatment, the question now is to determine the \ (i \) How to quickly find a \ (j \)

Order \ (y_j = DP (J) + F (J +. 1) \ Times (St (J)) \) , \ (x_j = F (J +. 1) \) , the original formula can be written as:
\ [DP (I ) = y_j + x_jt (i) \]

Click conversion equation
\ [y_j = -t (i) x_j + dp (i) \]

The question now becomes identified a \ (i \) , to quickly find a previous \ (j \) so that \ (dp (i) \) Minimum

This thing as a straight line, it becomes I have a translation in the plane of the slope \ (- t (i) \ ) is a straight line, find a point now \ ((x_j, y_j) \ ) makes too at this point the slope is \ (- t (i) \ ) a straight line intercept as small as possible.

Blue: slope \ (- t (i) \ ) line

Purple Point: \ ((x_j, y_j) \)

Obviously, there can be seen in a \ (y \) is negative infinity axle has slowly move in a straight line (intercept gradually become larger), this line passes through the point in a sudden we set it At this intercept is the smallest of the intercept.

references:

Vanuatu Hogg wood Cige gryffindor unparalleled divinity invincible super-God big get together yyb's blog

Guess you like

Origin www.cnblogs.com/winlere/p/10992557.html