The optimal order for items in the game with random early completion

I have n elements. Each element has a value v_i and a probability of continuation p_i. I will play a game where I select an item, get its value and get the opportunity to play with the appropriate probability. If I continue, I can pick up any remaining element, add its value to my sum and again expose it to the probability of continuation. If I'm lucky, I can play until there are no items left. I want to select an order to maximize the expected value.

Is there an efficient algorithm to solve this problem?

+4
source share
1 answer

! v_i/(1 - p_i) .

, , . , (v1, p1) (v2, p2). - & ge; , (v1, p1) & ge; (v2, p2), (v1, p1) (v2, p2).

(v1, p1), - v1 + p1 v2, (v2, p2), - v2 + p2 v1. ,

v1 + p1 v2 & ge; v2 + p2 v1

. , ,

v1 - p2 v1 & ge; v2 - p1 v2

v1 (1 - p2) & ge; v2 (1 - p1)

v1/(1 - p1) & ge; v2/(1 - p2)

, .

, . v1, v2,..., vn . , , , . , - , . v_i - , .

v1 + p1 (v2 + p2 (v3 + p3 (... (v_i + p_i (v_ {i + 1} + p_ {i + 1} X))...)

X - . , v_ {i + 1} v_i .

v1 + p1 (v2 + p2 (v3 + p3 (... (v_ {i + 1} + p_ {i + 1} (v_i + p_i X))...)

,

v_i + p_i (v_ {i + 1} + p_ {i + 1} X)

v_ {i + 1} + p_ {i + 1} (v_i + p_i X)

, v_i v_ {i + 1} ,

v_i + p_i v_ {i + 1} & le; v_ {i + 1} + p_ {i + 1} v_i

, , , ,

v_i + p_i (v_ {i + 1} + p_ {i + 1} X)

= v_i + p_i v_ {i + 1} + p_i p_ {i + 1} X

& ; v_ {i + 1} + p_ {i + 1} v_i + p_i p_ {i + 1} X

= v_ {i + 1} + p_ {i + 1} (v_i + p_i X)

, , , v_i/(1 - p_i) !

, . v_i/(1 - p_i) .

+2

Source: https://habr.com/ru/post/1648302/


All Articles