Suppose $A(n,m,k)$ computes
for 1 < i < n do {
for 1 < j < m do {
/* some efficient cryptographic operation */
}
}
where $k$ is a security parameter and integers $n$ and $m$ are upper-bound by a polynomial in that parameter.
Algorithm $A$ has complexity $\mathcal O(n\cdot m)$, which is quadratic when $n=m$.
Complexity nevertheless seems better than $\mathcal O(max(n,m)^2)$, but we've just seen it isn't.
Can we better compare algorithms with complexity $\mathcal O(n\cdot m)$ and $\mathcal O(max(n,m)^2)$?
The above captures the core aspects of my question. The details are as follows: Algorithm $A$ is part of a voting protocol. Integer $n$ represents the number of candidates and integer $m$ represents the number of cast ballots. So, in practice, $n$ is small and $m$ is large, which gives meaning to $\mathcal O(n\cdot m)$ being seemingly better than $\mathcal O(max(n,m)^2)$, but Big O notation looses that meaning. Is there a way to express it? I suppose we could say "the complexity of algorithm $A$ is linear in the number of cast ballots for small values of $n$", but that seems rather informal. Can we be more precise with regards to "small values of $n$"? Perhaps we just say "the complexity of algorithm $A$ is linear in $n\cdot m$"?
some efficient computation
that is the only part belongs to secuirty parameter $k$. $\endgroup$