# A Simple Auction Game

You are playing the following game.

• You have a budget of $$B$$ dollars. There are $$n$$ days. Every day $$d$$, you have to make a bid $$b_d\geq0$$ that does not exceed your budget. After making the bid, a product appears with price $$p_d\leq B$$ dollars. If your bid is larger than the price, you buy the product, i.e., $$b_d\geq p_d$$, and you lose $$b_d$$ from your budget. Otherwise, you will be left with the same budget as before but you don't buy the product, i.e., if $$b_d. The next day the same thing happens and so forth. You stop the game when you spend all of your budget or day $$n$$ is reached. Your objective is to buy as much products as possible with budget $$B$$.

Can we find a policy that competes against an adversary and buy a "good" number of products? Good here means, for example, a policy with low regret, so the difference between what the adversary bought and what you bought is not large. If we can't, what assumptions could we make to make the regret low?

My policy so far is:

• For each day $$d=1..n$$, bid $$b_d=B_r/(n-d+1)$$, where $$B_r$$ is your remaining budget.

I was trying to find an input sequence that makes my policy perform badly but I didn't succeed (for large $$n$$). I think if $$n$$ is large, then we may reach a low regret with this policy. I am still trying to prove this.

• What's the relation to your other post cstheory.stackexchange.com/questions/45934/… ? You've made a sequence of several related, slightly ill-defined posts. Would it be better to resolve some of them before posting more? – Neal Young Nov 30 at 0:18
• I will probably remove my old post as this one is a special case. I am working to solve this special case with a competitive algorithm but I think it is not possible with further assumptions. So I said maybe trying to find a low regret policy is easier. – zdm Nov 30 at 0:25
• Re: your proposed policy (bid $b_d = B_d/(n-d+1)$, where $B_d$ is your remaining budget at day $d$). The adversary can set the price just out of reach for you every day, so you never buy. Then in each of the first $n/2$ days, the price is at most $2B/n$, so the adversary can buy on each of those days. You get nothing, while the adversary gets at least $n/2$ products. – Neal Young Nov 30 at 1:40
• In the last day, if I don't buy any product before, I will have a budget of $B$. So, I can buy (unless the price is larger than $B$). If the price is larger than $B$, than the adversary does not buy either in the last day. Do you mean that the adversary sets the prices larger than $B$ in the last $n/2$ days? I also assumed that the price on any day is less than $B$. – zdm Nov 30 at 1:57
• Price on day $d$ is, say, $B/(n-d+1)+\epsilon$ for some infinitesimal $\epsilon>0$. So yes, on day $d$, the price is just over $B$. If that's not allowed, set the price on day $d$ to $B$. Then you'll get 1 purchase, but adversary will still get at least $n/2$ (days $d\in\{1,2,\ldots, n/2\}$). – Neal Young Nov 30 at 2:04

The problem is equivalent to online knapsack problem. Let $$n$$ represents the number of items. Let the knapsack has capacity $$B$$. Every item $$i$$, has value $$v_i=1$$ and weight $$w_i=p_i$$.

The offline optimal solution:

• Sort the items in increasing order of their weights ($$p_{\sigma(1)}\leq p_{\sigma(2)}\leq \cdots \leq p_{\sigma(n)}$$ for some permutation $$\sigma$$).
• Let $$S\gets\emptyset$$.
• For $$i\gets1$$ to $$n$$: add $$\sigma(i)$$ to $$S$$ unless $$\sum_{i\in S}p_i>B$$.
• For each $$i\in S$$, bid $$b_i=p_i$$ and for each $$i\notin S$$, bid $$b_i=0$$.

Claim: No online algorithm can achieve any non-trivial competitive ratio .

If we assume that $$p_i=o(B)$$ and $$L\leq p_i\leq U$$, then there is a competitive ratio of $$\ln(U/L)+1$$ .

For the regret, I don't know if there is some algorithm that achieves low regret (under some assumptions).