Keywords

These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

1 Introduction

We discuss an online discrete optimization problem called the buyback problem. In the literature of the buyback problem, the valuation function representing the value of a set of elements is given by a linear (or additive) function. We refer to this variant of the buyback problem as the linear buyback problem. In this paper, we consider the nonlinear buyback problem, a generalization of the buyback problem with a nonlinear valuation function.

1.1 Model of Nonlinear Buyback Problem

To explain the nonlinear buyback problem, we consider a situation where a company wants to hire some workers from a set N of n applicants. Each applicant arrives one by one sequentially, and an interviewer of the company, which corresponds to an online algorithm, must decide immediately whether or not to hire the applicant. The company can hire at most \(m > 0\) applicants; in addition, there may be some other constraints for a set of hired applicants due to their job skills and/or their human relationship. We denote by \(\mathcal{F}\subseteq 2^N\) the set of feasible combinations of applicants. The interviewer wants to maximize the profit v(X) obtained from a set \(X\in \mathcal{F}\) of hired applicants. The function v is a nonlinear function in X in general since the job skill of applicants may overlap. It is natural to assume that function v is monotone nondecreasing and satisfies \(v(\emptyset )=0\) and \(v(X) > 0\) for \(X \ne \emptyset \). It is often the case that a good applicant comes for an interview but addition of the applicant violates the feasibility. In such a case, the interviewer can add the applicant by canceling the contract with some previously hired applicant at the cost of some compensatory payment. In this paper, we assume that cancellation cost is given by a constant \(c>0\). It should be noted that applicants that are rejected at the interview or once accepted but canceled cannot be recovered later. The goal of the interviewer is to make an online decision to maximize the value v(X) of hired applicants X, minus the total cancellation cost.

This online problem is called the buyback problem. More formally, the buyback problem is formulated as an online version of the following discrete optimization problem:

$$ \text{ Maximize } v(A \setminus C) - c |C| \qquad \text{ subject } \text{ to } C \subseteq A \subseteq N,\ A \setminus C \in \mathcal{F}, $$

where A (resp., C) corresponds to a set of accepted (resp., once accepted but later canceled) elements, respectively. It is assumed that the set family \(\mathcal{F}\) and the function v are accessible via appropriate oracles; that is, for a given set \(X \subseteq N\), whether \(X \in \mathcal{F}\) or not can be checked in constant time, and if \(X \in \mathcal{F}\) then the function value v(X) can be obtained in constant time.

For a special case of the buyback problem with a linear valuation function given as \(v(X) = \sum _{i \in X}w(i)\) and a matroid constraint, Kawase, Han, and Makino [17] obtained the following result. It is assumed that a value \(\ell > 0\) with \(\ell \le \min _{i \in N}w(i)\) is known in advance, and let

$$\begin{aligned} r^*(\ell , c) = 1+ \frac{c + \sqrt{c^2+4\ell c}}{2\ell }. \end{aligned}$$
(1)

Note that the value \(r^*(\ell , c)\) is dependent only on the ratio \(\ell /c\). For example, if \(\ell /c=2\) then \(r^*(\ell , c)=2\), and if \(\ell /c=6\) then \(r^*(\ell , c)=1.5\).

Theorem 1.1

[17]. Suppose that \(v: 2^N \rightarrow \mathbb {R}\) is a linear valuation function and \(\mathcal{F}\subseteq 2^N\) is the family of independent sets of a matroid. Then, the buyback problem admits an online algorithm with the competitive ratio \(r^*(\ell , c)\). Moreover, there exists no online deterministic algorithm with a competitive ratio smaller than \(r^*(\ell , c)\), even in the special case with \(\mathcal{F}= \{X \subseteq N \mid |X| \le 1\}\).

The main aim of this paper is to generalize this result to the buyback problem with discrete concave valuation functions.

1.2 Our Result

In this paper, we present the first online algorithm for the nonlinear buyback problem and analyze its competitive ratio theoretically. Our main results given in Theorems 1.2 and 1.3 are proved in Sect. 3 by generalizing the approach used in [17] for the linear buyback problem. The analysis of competitive ratio in our setting, however, is much more difficult due to the nonlinearity of valuation function. We overcome this difficulty by utilizing discrete concavity of the function called M\(^\natural \)-concavity. M\(^\natural \)-concavity of the valuation function plays a crucial role in the analysis of competitive ratio of our online algorithm. It should be noted that while M\(^\natural \)-concave functions satisfy some kind of submodular inequality, submodularity alone is not enough to obtain the current result; see Concluding Remarks.

Buyback Problem with Gross Substitutes Valuations and Matching Weight Valuations. We first consider a nonlinear valuation function called a gross substitutes valuation. A valuation function \(v: 2^N \rightarrow \mathbb {R}\) on \(2^N\) is called a gross substitutes valuation (GS valuation, for short) if it satisfies the following condition:

\(\forall p, q \in {\mathbb {R}}^N\) with \(p \le q\), \(\displaystyle \forall X \in \arg \max _{U \subseteq N}\{v(U) - \sum _{i \in U}p(i)\}\),

\(\displaystyle \exists Y \in \arg \max _{U \subseteq N}\{v(U) - \sum _{i \in U} q(i)\}\) such that \(\{i \in X \mid p(i) {=} q(i)\} \subseteq Y\).

Intuitively, this condition is understood as follows, where N is regarded as a set of discrete items, and p and q are price vectors: if a buyer wants a set X of items at price p but some of the item prices are increased, then the buyer still wants items in X with unchanged prices (and possibly other items not in X).

A natural but nontrivial example of GS valuations arises from the maximum-weight matching problem on a complete bipartite graph, called assignment valuations [28] (or OXS valuation [20]). Going back to the situation at a company in Sect. 1.1, we suppose that the company has a set J of m jobs, to which hired workers are assigned. Each worker is assigned to at most one job in J, each job is assigned to at most one worker, and if worker \(i \in N\) is assigned to a job \(j \in J\), then profit \(p(i,j) \in {\mathbb {R}}_{++}\) is obtained. Given a set \(X \subseteq N\) of workers, the maximum total profit v(X) obtained by assigning workers in X to jobs in J can be formulated as the maximum-weight matching problem on a complete bipartite graph G with the vertex sets N and J:

$$\begin{aligned} v(X) = \max \bigg \{\sum _{(i, j) \in M} p(i, j) \ \bigg | \ M: \text{ matching } \text{ in } G \text{ s.t. } \partial _N M =X \bigg \}, \end{aligned}$$
(2)

where \(\partial _N M\) denotes the set of vertices in N covered by edges in M. It is known that this function \(v: 2^N \rightarrow {\mathbb {R}}\) is a GS valuation function [20, 28].

The concept of GS valuation is introduced in Kelso and Crawford [18], where the existence of a Walrasian equilibrium is shown in a fairly general two-sided matching model. Since then, this concept plays a central role in mathematical economics and in auction theory, and is widely used in various economic models (see, e.g., [5, 6, 1113, 20]). The class of GS valuations is a proper subclass of submodular functions, and includes natural classes of valuations such as weighted rank functions of matroids [7, 9] and laminar concave function [23] (or S-valuation [5]), in addition to assignment valuations explained above. While GS valuation is a sufficient condition for the existence of a Walrasian equilibrium [18], it is also a necessary condition in some sense [13]. GS valuation is also related to desirable properties in the auction design [6, 11, 20]. See also [26, 30] for more details on GS valuations as well as other related concepts.

We propose an online algorithm for the nonlinear buyback problem with a GS valuation and a cardinality constraint. We assume that a positive real number \(\ell \) satisfying

$$\begin{aligned} \ell \le \min \{v(X)/|X| \mid \emptyset \ne X \in \mathcal{F}\} \end{aligned}$$
(3)

is known in advance. Note that this condition is a natural generalization of the condition used in [17]; indeed, for a linear valuation function, condition (3) is equivalent to \(\ell \le \min _{i \in N}w(i)\). In addition, if v is an assignment valuation function in (2), then every \(\ell \) with \(\ell \le \min \{p(i,j) \mid i \in N,\ j \in J\}\) satisfies (3).

Theorem 1.2

For a gross substitutes valuation function \(v: 2^N \rightarrow \mathbb {R}\) and a cardinality constraint \(\mathcal{F}=\{X \subseteq N \mid |X| \le m\}\), the nonlinear buyback problem admits an online algorithm with the competitive ratio \(r^*(\ell , c)\) in (1).

It should be noted that our online algorithm does not require the information about the number of elements in N and the integer m.

Buyback Problem with Discrete Concave Valuations. Moreover, we consider a more general setting where \(\mathcal{F}\) is a matroid and valuation function \(v: \mathcal{F}\rightarrow {\mathbb {R}}\) is a discrete concave function called \(M^\natural \) -concave function. It is known that a family \(\mathcal{F}\subseteq 2^N\) of matroid independent sets satisfies the following property [25]:

\( \mathbf{(B^\natural -EXC)}\) \(\forall X, Y \in \mathcal{F}\), \(\forall i \in X \setminus Y\), at least one of (i) and (ii) holds:

(i) \(X -i \in \mathcal{F},\ Y + i \in \mathcal{F}\), (ii) \(\exists j \in Y \setminus X\): \(X -i+j \in \mathcal{F}\), \(Y +i-j \in \mathcal{F}\),

where \(X-i+j\) is a short-hand notation for \((X \setminus \{i\})\cup \{j\}\). We consider a function \(v: \mathcal{F}\rightarrow {\mathbb {R}}\) defined on matroid independent sets \(\mathcal{F}\). A function v is said to be \(M^\natural \) -concave [25] (read “M-natural-concave”) if it satisfies the following:

\(\mathbf{(M^\natural -EXC)}\) \(\forall X, Y \in \mathcal{F}\), \(\forall i \in X \setminus Y\), at least one of (i) and (ii) holds:

(i) \(X -i \in \mathcal{F},\ Y +i \in \mathcal{F}\), and \(v(X)+v(Y)\le v(X -i)+ v(Y +i)\),

(ii) \(\exists j \in Y \setminus X\): \(X -i +j \in \mathcal{F}\), \(Y +i-j \in \mathcal{F}\),

      and \(v(X)+v(Y)\le v(X -i +j)+ v(Y +i-j)\).

The concept of M\(^\natural \)-concave function is introduced by Murota and Shioura [25] (independently of GS valuations) as a class of discrete concave functions. M\(^\natural \)-concavity is originally introduced for functions defined on integer lattice points (see, e.g., [23]), and the present definition of M\(^\natural \)-concavity for set functions can be obtained by specializing the original definition through the one-to-one correspondence between set functions and functions defined on \(\{0,1\}\)-vectors. The concept of M\(^\natural \)-concave function is an extension of the concept of M-concave function introduced by Murota [21, 22]. The concepts of M\(^\natural \)-concavity/M-concavity play primary roles in the theory of discrete convex analysis [23], which provides a framework for tractable nonlinear discrete optimization problems.

M\(^\natural \)-concave functions have various desirable properties as discrete concavity. Global optimality is characterized by local optimality, which implies the validity of a greedy algorithm for M\(^\natural \)-concave function maximization. Maximization of an M\(^\natural \)-concave function can be done efficiently in polynomial time (see, e.g., [23, 25]).

The class of M\(^\natural \)-concave functions includes linear functions on matroids. Hence, the M\(^\natural \)-concave buyback problem (i.e., the buyback problem with an M\(^\natural \)-concave valuation) is a proper generalization of the linear buyback problem with a matroid constraint discussed in Kawase et al. [17]. Furthermore, the M\(^\natural \)-concave buyback problem also includes the problem with a GS valuation function and a cardinality constraint as a special case.

In this paper, we show the following result for the M\(^\natural \)-concave buyback problem.

Theorem 1.3

If \(\mathcal{F}\subseteq 2^N\) is the family of independent sets of a matroid and \(v: \mathcal{F}\rightarrow {\mathbb {R}}\) is an M\(^\natural \)-concave function, then the nonlinear buyback problem admits an online algorithm with the competitive ratio \(r^*(\ell , c)\) in (1).

This theorem implies Theorem 1.2 as a corollary. In addition, this theorem also implies the former statement of Theorem 1.1, hence generalizing the result of Kawase et al. [17]. The latter statement in Theorem 1.1 shows that our competitive ratio in Theorem 1.3 is the best possible for the M\(^\natural \)-concave buyback problem.

1.3 Related Work

We review some previous results on the linear buyback problem and some related results. In the literature of the linear buyback problem, two types of cancellation cost are considered so far: proportional cost and unit cost; the latter one is used in this paper. In the case of proportional cost, we are given a constant \(f>0\) and the cancellation cost of each element u is equal to f w(u) if w(u) is the value of u. In the case of unit cost, we are given a constant \(c>0\) and the cancellation cost of each element u is equal to c. Note that in the nonlinear buyback problem, unit cancellation cost is more suitable since proportional cancellation cost is heavily dependent on the linearity of a valuation function.

The linear buyback problem is originally modeled by using proportional cost. In this setting, Babaioff et al. [3] and Constantin et al. [10] independently proposed deterministic online algorithms for the problem with single matroid constraint, where the competitive ratio is \(1+2f+2 \sqrt{f(1+f)}\). Babaioff et al. [4] also showed that this competitive ratio is the best possible bound for deterministic algorithms, and presented a randomized algorithm with a better competitive ratio in the case of small f. Later, Ashwinkumar and Kleinberg [2] proposed a randomized algorithm with an improved competitive ratio, which is shown to be the best possible. Ashwinkumar [1] considered a more general constraints such as the intersection of multiple matroids, and proposed online algorithms with theoretical bounds for the competitive ratio. Some variants of knapsack constraint were also considered in [3, 4, 14].

The linear buyback problem with unit cost was first introduced by Han et al. [14]. Some variants of knapsack constraints are considered in [14, 17], while single matroid constraint is considered by Kawase et al. [17] (see Theorem 1.1).

Variants of the buyback problem with zero cancellation cost are also extensively discussed in the literature. One such example is the problem under a knapsack constraint, which is referred to as the online removal knapsack problem (see, e.g., [15, 16]). Recently, the nonlinear buyback problem with zero cancellation cost and submodular valuation function (called the online submodular maximization with preemption) is considered by Buchbinder et al. [8]. Note that the linear buyback problem with a single matroid constraint is trivial if the cancellation cost is zero; indeed, existing online algorithms for this problem reduce to variants of greedy algorithms that find an (offline) optimal solutions.

The buyback problem with an assignment valuation function can be seen as a variant of online bipartite matching problems, where vertices on the one side of a bipartite graph (corresponding to applicants) arrive online one by one (see, e.g., [19] and the references therein). Among many variants of such online matching problems, our problem setting is different in the following two points. First, we allow re-assignment of previously accepted vertices to the vertices on the other side whenever a newly arrived vertex is accepted. Second, we allow exchange of a previously accepted vertex with a newly arrived vertex by paying a cancellation cost. Without a cancellation cost, our online matching problem is trivial since we allow re-assignment; indeed, it is easy to construct an online algorithm that finds an (offline) optimal matching under this setting.

2 M\(^\natural \)-concave Functions and GS Valuations

In this section we review the concept of M\(^\natural \)-concavity and its connection with GS valuation.

Let \(\mathcal{F}\) be the family of independent sets of a matroid. A function \(v: \mathcal{F}\rightarrow {\mathbb {R}}\) is said to be \(M^\natural \) -concave if it satisfies the condition (M\(^\natural \)-EXC). It is known that every M\(^\natural \)-concave function is a submodular function in the following sense (cf. [23]):

Proposition 2.1

[23, Theorem 6.19]. Let \(f: \mathcal{F}\rightarrow {\mathbb {R}}\) be an M\(^\natural \)-concave function defined on a family \(\mathcal{F}\subseteq 2^N\) of matroid independent sets. For \(X, Y \in \mathcal{F}\) with \(X \cup Y \in \mathcal{F}\), it holds that \(v(X) + v(Y) \ge v(X \cup Y) + v(X \cap Y)\).

From the condition (M\(^\natural \)-EXC) we can obtain the following property.

Proposition 2.2

[25, Theorem 4.2]. Let \(f: \mathcal{F}\rightarrow {\mathbb {R}}\) be an M\(^\natural \)-concave function defined on matroid independent sets \(\mathcal{F}\). For every \(X, Y \in \mathcal{F}\) with \(|X|=|Y|\) and \(u \in X \setminus Y\), there exists some \(v \in Y \setminus X\) such that \(f(X)+f(Y) \le f(X-u+v)+f(Y+u-v)\).

Note that the sum of an M\(^\natural \)-concave function and a linear function is again an M\(^\natural \)-concave function, while the sum of two M\(^\natural \)-concave functions is not M\(^\natural \)-concave in general.

The next property shows the connection between M\(^\natural \)-concavity and gross substitute valuation. In particular, the property below shows that the buyback problem with a gross substitute valuation function is a special case of M\(^\natural \)-concave buyback problem.

Theorem 2.1

cf. [12]. Let \(v: 2^N \rightarrow {\mathbb {R}}\) be a function defined on \(2^N\).

(i) v is a GS valuation function if and only if it is M\(^\natural \)-concave.

(ii) Suppose that v is a GS valuation function and let m be a nonnegative integer. Then, the function \(v_m: \mathcal{F}_m \rightarrow {\mathbb {R}}\) given by \(\mathcal{F}_m = \{X \in 2^N \mid |X| \le m\}\) and \(v_m(X)= v(X)\) \((X\in \mathcal{F}_m)\) is an M\(^\natural \)-concave function.

A simple example of M\(^\natural \)-concave function is a linear function \(f(X) = w(X)\) \((X\in \mathcal{F})\) defined on a family \(\mathcal{F}\subseteq 2^N\) of matroid independent sets, where \(w \in {\mathbb {R}}^N\). In particular, if \(\mathcal{F}= 2^N\) then f is a GS valuation function. Below we give some nontrivial examples of M\(^\natural \)-concave functions and GS valuation functions. See [23, 24] for more examples.

Example 2.1

(Maximum-weight bipartite matching). In Sect. 1.2 we explained an assignment valuation as an example of GS valuations, where a complete bipartite graph is used. By using a non-complete bipartite graph instead, we can obtain an example of M\(^\natural \)-concave functions as follows.

Consider a bipartite graph G with two vertex sets NJ and an edge set \(E\ (\subseteq N \times J)\), where N and J correspond to workers and jobs, respectively. An edge \((i, j) \in E\) means that worker \(i \in N\) has ability to process job \(j \in J\), and profit \(p(i,j) \in {\mathbb {R}}_{++}\) can be obtained by assigning worker i to job j. Consider a matching between workers and jobs, and define \(\mathcal{F}\subseteq 2^N\) by

$$ \mathcal{F}= \{X \subseteq N \mid \exists M: \text{ matching } \text{ in } G \text{ s.t. } \partial _N M =X \}. $$

It is well known that \(\mathcal{F}\) is a family of independent sets in a transversal matroid (see, e.g., [27]). Define \(v: \mathcal{F}\rightarrow {\mathbb {R}}\) by

$$\begin{aligned} v(X) = \max \big \{\sum _{(i, j) \in M} p(i, j) \ \big | \ M: \text{ matching } \text{ in } G \text{ s.t. } \partial _N M =X \big \} \quad (X \in \mathcal{F}). \end{aligned}$$

Then, v is an M\(^\natural \)-concave function [24, Sect. 11.4.2].    \(\square \)

Example 2.2

(Laminar concave functions). Let \(\mathcal{T}\subseteq 2^N\) be a laminar family, i.e., \(X \cap Y= \emptyset \) or \(X\subseteq Y\) or \(X \supseteq Y\) holds for every \(X, Y \in \mathcal{T}\). For \(Y \in \mathcal{T}\), let \(\varphi _Y: {\mathbb {Z}}_+ \rightarrow {\mathbb {R}}\) be a univariate concave function. Define a function \(v: 2^N \rightarrow {\mathbb {R}}\) by

$$ v(X) = \sum _{Y \in \mathcal{T}} \varphi _Y(|X \cap Y|) \quad (X \in 2^N), $$

which is called a laminar concave function [23, Sect. 6.3] (also called an S-valuation in [5]). Special cases of laminar concave functions are a downward sloping symmetric function [11] given as \(v(X) = \varphi (|X|)\) and a nested concave function given as

$$ v(X) = \sum _{i=1}^n \varphi _i(|X \cap \{1,2,\ldots , i\}|), $$

where \(\varphi \) and \(\varphi _i\) \((i \in N)\) are univariate concave functions. Every laminar concave function is a GS valuation function.    \(\square \)

Example 2.3

(Weighted rank functions). Let \(\mathcal{I}\subseteq 2^N\) be the family of independent sets of a matroid, and \(w \in {\mathbb {R}}^N_+\). Define a function \(v: 2^N \rightarrow {\mathbb {R}}_+\) by

$$ v(X) = \max \{w(Y) \mid Y \subseteq X,\ Y \in \mathcal{I}\} \quad (X \in 2^N), $$

which is called the weighted rank function [9]. If \(w(i) =1\) \((i \in N)\), then v is an ordinary rank function of the matroid \((N, \mathcal{I})\). Every weighted rank function is a GS valuation function [29].    \(\square \)

3 Our Online Algorithm and Analysis

In this section, we propose an online algorithm for M\(^\natural \)-concave buyback problem and analyze its competitive ratio.

3.1 Algorithm

Recall that the cancellation cost c and the value \(\ell \) satisfying (3) is known in advance. We assume that \(N=\{i_1, i_2, \ldots , i_n\}\) and the elements in N arrive in this order. In each iteration, the algorithm maintains a set \(B_k \in \mathcal{F}\). To control the number of cancellations, we use an increasing sequence of real numbers \(\psi (t)\) \((t=1,2,\ldots )\) as parameters, which will be determined later by using c and \(\ell \). We assume that \(\psi (1)=0\) and \(\psi (t+1)-\psi (t)\) is nondecreasing with respect to t.

In the k-th iteration, the algorithm adds an element \(i_k\) (i.e., set \(B_k=B_{k-1} + i_k\)) if \(B_{k-1} +i_k\in \mathcal{F}\) and \(v(B_{k-1} +i_k)>v(B_{k-1} )\). Otherwise, the algorithm tries to exchange an element \(j_{k}\) in \(B_{k-1}\) satisfying \(B_{k-1} - j_k +i_k \in \mathcal{F}\) and

$$\begin{aligned} v(B_{k-1} - j_k +i_k) = \max \{v(B_{k-1} - j +i_k) \mid j \in B_{k-1},\ B_{k-1} - j +i_k \in \mathcal{F}\}. \end{aligned}$$
(4)

If the value \(v(B_{k-1} - j_k +i_k)\) is large enough compared to \(v(B_{k-1})\), then the algorithm replace \(j_k\) with \(i_k\); otherwise, the algorithm does not add and sets \(B_k=B_{k-1}\). A detailed description of the algorithm is as follows.

\(\mathbf{Algorithm\,{M^\natural }BP}\)

Step 0: Set \(B_0 = \emptyset \).

Step 1: For each element \(i_k\), \(k=1,2, \ldots , n\), in order of arrival, do the following:

[Case 1: \(B_{k-1} +i_k \in \mathcal{F}\)]    Set \(B_k = B_{k-1} +i_k\).

[Case 2: \(B_{k-1} +i_k \not \in \mathcal{F}\)]    Let \(j_k \in B_{k-1}\) be an element satisfying (4).

   If \(v(B_{k-1} - j_k + i_k) \ge \psi (t) + \ell \cdot |B_{k-1}| > v(B_{k-1})\) for some t, then

   set \(B_k=B_{k-1} - j_k + i_k\) (“cancel \(j_k\)”); otherwise, set \(B_k = B_{k-1}\) (“reject \(i_k\)”).

Step 2: Output \(B_n\).    \(\square \)

3.2 Bounding the Optimal Value

Let \(B^* \in \mathcal{F}\) be an (offline) optimal solution of M\(^\natural \)-concave buyback problem. That is, \(B^* \in \arg \max \{v(B) \mid B \in \mathcal{F}\}\). To analyze the competitive ratio of the algorithm above, we need to bound the value of \(v(B^*)\) from above.

For \(k=1,2,\ldots , n\), let \(t_k\) be the integer with \(v(B_k) - \ell \cdot |B_k| \in [\psi (t_k), \psi (t_k + 1))\). We will derive the following upper bound of \(v(B^*)\).

Lemma 3.1

\(v(B^*) \le v(B_n)+ m (\psi (t_n + 1) - \psi (t_n))\).

To prove Lemma 3.1, we first show that the value \(v(B^*)\) can be bounded from above in terms of the output \(B_n\) of the algorithm.

For two sets \(B, B' \in \mathcal{F}\) with \(|B|=|B'|\), we define \(G(B, B')\), called the exchangeability graph, as a bipartite graph having \((B\setminus B', B' \setminus B)\) as the vertex bipartition and

$$ \{(j,i) \mid j \in B\setminus B',\ i \in B' \setminus B, \ B - j + i \in \mathcal{F}\} $$

as the edge set. Note that \(|B\setminus B'|=|B' \setminus B|\) holds since B and \(B'\) have the same cardinality, and \(G(B, B')\) has a perfect matching (see, e.g., [27, Corollary 39.12a]).

For each edge (ji) in \(G(B, B')\), we define the weight of (ji) by v(Bji) given by

$$ v(B, j,i) = v(B- j + i) - v(B). $$

Denote by \(\widehat{v}(B,B')\) the maximum weight of a perfect matching in \(G(B,B')\) with respect to the edge weight v(Bji). We can bound the value \(v(B')\) from above by using v(B) and \(\widehat{v}(B,B')\) as follows.

Lemma 3.2

[cf. [21, Lemma 3.4]]. For \(B, B' \in \mathcal{F}\) with \(|B|=|B'|\), it holds that \(v(B')\le v(B) + \widehat{v}(B,B')\).

We denote \(m = \max \{|X| \mid X \in \mathcal{F}\}\). Note that \(|B_n| = |B^*|=m\) holds since \(\mathcal{F}\) is a family of matroid independent sets and v is monotone nondecreasing. Hence, the following inequality follows immediately from Lemma 3.2.

Lemma 3.3

\(v(B^*)\le v(B_n) + \sum _{i \in B^* \setminus B_n} \max \{v(B_n, j, i) \mid j \in B_n\}\).

To bound the value \(\max \{v(B_n, j, i) \mid j \in B_n\}\) in Lemma 3.3, we show a useful inequality for the value \(v(B_k, j, i)\), which plays a key role in the analysis. For \(k=1,2,\ldots , n\), let

$$\begin{aligned} C_k&= \{j_t \mid j_t \text{ is } \text{ canceled } \text{ in } \text{ Case } \text{2 } \text{ of } \text{ the } \text{ h-th } \text{ iteration, } 1 \le h \le k \},\\ R_k&= \{i_t \mid i_t \text{ is } \text{ rejected } \text{ in } \text{ Case } \text{2 } \text{ of } \text{ the } \text{ h-th } \text{ iteration, } 1 \le h \le k \}. \end{aligned}$$

Note that the sets \(B_k\), \(C_k\), and \(R_k\) provide a partition of set \(\{1,2,\ldots , k\}\).

Lemma 3.4

For \(k= 1, 2,\ldots , n\), \(j \in B_k\), and \(i \in C_k \cup R_k\), it holds that

$$\begin{aligned} v(B_k, j, i) \le \left\{ \begin{array}{ll} 0 &{} (\text{ if } i \in C_k),\\ \max \{v(B_{h-1}, j', i_h) \mid j' \in B_{h-1}\} &{} (\text{ if } i = i_h \in R_k \text{ with } h \le k). \end{array} \right. \end{aligned}$$
(5)

Using Lemma 3.4, we get a bound for \(\max \{v(B_n, j, i) \mid j \in B_n\}\).

Lemma 3.5

For \(i \in N \setminus B_n\), \(\max \{v(B_n, j, i) \mid j \in B_n\} \le \psi (t_n+1) - \psi (t_n)\).

Lemma 3.1 follows immediately from Lemmas 3.3 and 3.5.

3.3 Analysis of Competitive Ratio

We now prove that our online algorithm achieves the competitive ratio \(r^*(\ell , c)\) in (1) by setting values \(\psi (t)\) \((t=1,2,\ldots )\) appropriately.

We consider the set of intervals given by values \(\psi (t)\), and denote the length of the t-th interval as \(\lambda (t) = \psi (t+1) - \psi (t)\). Note that whenever some element is canceled in some iteration of our algorithm, the value \(v(B_k) - \ell |B_k|\) moves to some upper interval. Since \(v(B_n) - \ell m \in [\psi (t_n), \psi (t_n + 1))\), our algorithm cancels some elements at most \(t_n-1\) times, and therefore the payoff obtained by the algorithm is at least \(v(B_n) - (t_n-1) c\). By this fact and Lemma 3.1, the competitive ratio of the algorithm is at most

$$\begin{aligned} \frac{v(B^*) }{v(B_n) - (t_n-1)c} \le \frac{v(B_n) + m \lambda (t_n)}{v(B_n) - (t_n-1)c}&\le \frac{(\psi (t_n) +\ell m) + m \lambda (t_n)}{(\psi (t_n) +\ell m) - (t_n-1)c} \nonumber \\&\le \max _{t \ge 1}\frac{(\psi (t) +\ell m)+ m \lambda (t)}{(\psi (t) +\ell m) - (t-1)c}, \end{aligned}$$
(6)

where the second inequality follows from the inequality \(\psi (t_n) + \ell m \le v(B_n)\) and the fact that for \(p,q \in {\mathbb {R}}_+\) the function \((x+p)/(x-q)\) in x is nonincreasing in the interval \((q, + \infty )\). We denote by r the ratio in the last term of (6). In the following, we analyze the minimum value r of the ratio. Note that \(r > 1\).

We will set values \(\psi (t)\) so that

$$\begin{aligned} \frac{(\psi (t)+\ell m)+ m \lambda (t)}{(\psi (t)+\ell m) - (t-1)c} = \frac{(\psi (t)+\ell m) + m (\psi (t+1) - \psi (t))}{(\psi (t)+\ell m) - (t-1)c} = r \end{aligned}$$

holds for all \(t \ge 1\). This implies the following recursive formula for \(\psi (t)\):

$$\begin{aligned} \psi (1) =0, \qquad \psi (t+1) = \frac{m - 1 + r}{m} (\psi (t) + \ell m) - \frac{c r}{m} (t-1) + \ell . \end{aligned}$$
(7)

By solving this recursive formula, we have \(r = 1+ \frac{c + \sqrt{c^2+4\ell c}}{2\ell } = r^*(\ell , c)\), i.e., the competitive ratio of our algorithm is \(r^*(\ell , c)\). This concludes the proof of Theorem 1.3.

4 Concluding Remarks

We have shown that the competitive ratio of our online algorithm for M\(^\natural \)-concave buyback problem is \(r^*(\ell , c)\). Note that \(r^*(\ell , 0)=1\), which means that our online algorithm finds an offline optimal solution by setting \(c=0\).

It should be noted that our approach does not extend to the nonlinear buyback problem with a submodular valuation function. To illustrate this, let us consider an instance of the buyback problem, where \(N=\{i_1, i_2, i_3, i_4\}\), the valuation function \(v: 2^N \rightarrow {\mathbb {R}}\) is given by

$$\begin{aligned}&v(\emptyset )=0,\quad v(\{i_1\}) = v(\{i_2\}) =2,\ v(\{i_3\}) = v(\{i_4\}) =3,\\&v(X) = 6 \text{ if } |X|\ge 2 \text{ and } X \supseteq \{i_3, i_4\}\\&v(X) =4 \text{ if } |X| =2 \text{ and } X \ne \{i_3, i_4\},\\&v(N \setminus \{i_3\}) = v(N \setminus \{i_4\}) =5, \end{aligned}$$

and the constraint is \(\mathcal{F}=\{X\in 2^N \mid |X| \le 2 \}\). It can be checked that the function v is submodular but not M\(^\natural \)-concave.

Suppose that our online algorithm is applied to this instance, where the elements \(i_1, i_2, i_3, i_4\) arrive in this order. Then, the algorithm first accepts elements \(i_1\) and \(i_2\), and then rejects \(i_3\) and \(i_4\) since the function value cannot be increased by swapping new elements with old elements one by one. Hence, the value of the output is \(v(\{i_1, i_2\})=4\). Note that this behavior of the algorithm is irrelevant to the choice of the cancellation cost c. On the other hand, an offline optimal solution is \(B^* = \{i_3, i_4\}\), for which \(v(B^*)= 6\). Hence, the competitive ratio of our algorithm is at least \(6/4=1.5\), while the ratio \(r^*(\ell , c)\) can be close to 1 if we choose a sufficiently small positive c. This fact shows that our algorithm and analysis in this paper do not extend to submodular valuation functions.