0

I saw this relationship in my exercise. max{n,k}= Ө(n+k) Could somebody prove it?

Raphael
  • 73,212
  • 30
  • 182
  • 400
Luk Aron
  • 111
  • 1

1 Answers1

2

Assuming n and k to be non-negative, $n\leq n+k$ and $k\leq n+k$. Hence,$\max(n, k) \in \mathcal{O}(n+k)$. Next, $n+k≤2\max(n,k)$. Hence, $\max(n,k)\in\mathcal{\Omega}(n+k)$.
Hence, we get that $\max(n,k)\in \mathcal{\Theta}(n+k)$.

Arka Pal
  • 331
  • 1
  • 7