I would like to calculate the complexity of an algorithm using the "inequality strategy".
This algorithm takes two integers as an entry $n, m$. Moreover this algorithm is recursive and if we denote $C_{n,m}$ the number of operations this algorithm does for entry $n, m$ we have the following inequality :
$$C_{n,m} \leq C_{n, (m-1)} + C_{(n-1), (m-1)} + O(1)$$
Moreover the algorithm terminates for the entry : $(0,k)$ and $(k, 0)$ for all $k \in \mathbb{N}$ and $C_{0,k} = O(1)$ and $C_{k, 0} = O(1)$.
So now I need to somehow solve the inequality to get $C_{n,m}$ for all $n, m$. Yet I don't really know how to do this.
The problem is that it seems to me that any function work. For example If I say : $C_{n,m} = O(m)$ then it's tre since by unduction we then have :
$C_{n,m} \leq O(m-1) + O(m-1) + O(1) = O(m-1)$
Moreover If I say that : $C_{n,m} = O(n)$ then it also work since by induction :
$C_{n,m} \leq O(n) + O(n-1) + O(1) $
So what is the problem with I am doing, and how to solve this inequality to get the complexity of $C_{n,m}$ ?
Thank you !