Note that there are some explanatory texts on larger screens.

plurals
  1. POAd distribution problem: an optimal solution?
    primarykey
    data
    text
    <p>I'm asked to find a 2 approximate solution to this problem:</p> <p>You’re consulting for an e-commerce site that receives a large number of visitors each day. For each visitor i, where i € {1, 2 ..... n}, the site has assigned a value v[i], representing the expected revenue that can be obtained from this customer.</p> <p>Each visitor i is shown one of m possible ads A1, A2 ..... Am as they enter the site. The site wants a selection of one ad for each customer so that each ad is seen, overall, by a set of customers of reasonably large total weight. </p> <p>Thus, given a selection of one ad for each customer, we will define the <em>spread</em> of this selection to be the minimum, over j = 1, 2 ..... m, of the total weight of all customers who were shown ad Aj.</p> <p>Example: Suppose there are six customers with values 3, 4, 12, 2, 4, 6, and there are m = 3 ads. Then, in this instance, one could achieve a spread of 9 by showing ad A1 to customers 1, 2, 4, ad A2 to customer 3, and ad A3 to customers 5 and 6.</p> <p>The ultimate goal is to find a selection of an ad for each customer that <em>maximizes</em> the spread. </p> <p>Unfortunately, this optimization problem is NP-hard (you don’t have to prove this). </p> <p>So instead give a polynomial-time algorithm that approximates the maximum spread within a factor of 2.</p> <p>The solution I found is the following:</p> <pre><code>Order visitors values in descending order Add the next visitor value (i.e. assign the visitor) to the Ad with the current lowest total value Repeat </code></pre> <p>This solution actually seems to always find the optimal solution, or I simply can't find a counterexample. Can you find it? Is this a non-polinomial solution and I just can't see it?</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload