In every step one of the variables is divided by 2, so I think the depth must be $\log n + \log m$. So the solution is $O(nm(\log n + \log m))$
However for some reason an article I am reading claims for some problem that it should be $O(nm(\log n \log m))$
so either my idea for the solution of this recurrence is wrong, or the recurrence I used to describe the problem is wrong.
https://cs.uwaterloo.ca/~imunro/cs840/ProjectPapers/SODA10_014_yuanh.pdf page 155
– jsguy Dec 15 '15 at 16:42So the actual formulation is T(n,m) = 2T(n/2,m) + 2T(n,m/2) + nm. But I ignored the 2 part in my question. Should I have included it?
– jsguy Dec 15 '15 at 17:09for example T(n) = T(n/2) + n is O(n) but T(n) = 2T(n/2) + n is O(nlogn)
– jsguy Dec 15 '15 at 17:17