论一类以平面上直线为基础的优化算法

Well, better named 01 frac. P.

When you want to know the maxinum of \(\frac{\sum_ia_ix_i}{\sum_ib_ix_i}(x_i\in\{0,1\})\), you can suppose it as \(r\). Now let's bi-div. \(r\), so the constraint is \(\frac{\sum_ia_ix_i}{\sum_ib_ix_i}\ge r\). After arrangement, it's been \(\sum_i(a_i-rb_i)\cdot x_i\ge 0\). So we can modify the coef. to \(a_i-rb_i\), then we just need to check if it's bigger than 0.

Tarter version is soon available.

猜你喜欢

转载自www.cnblogs.com/utopia999/p/9694230.html
今日推荐