1

If a function $f(x)$ is constant complexity $f(x) = O(1)$ , describe $C$ and $k$.

This needs to be described in terms of the relation of $C$ and $k$.

There exists constants $C$ and $k$ such that $C|f(x)| \le |1|$, for all $x > k$.

The above cannot be true because using the explanation from the book of discrete math:

$f(x)$ is $O(g(x))$ if there are constants $C$ and $k$ such that $$\forall x > k, |f(x)| \le C|g(x)|.$$

So if $f(x) = O(1)$, then it would mean $O(1) \le C|g(x)|$ , or $C|g(x)| \ge O(1)$.

Instead the below statement is true.

There exists constants $C$ and $k$ such that $C|f(x)| \ge |1|$ for all $x > k$.

Is this a correct understanding?

311411
  • 3,537
  • 9
  • 19
  • 36

1 Answers1

1

I submitted my work and got it wrong, just wanted to share with others who are looking for answers to this quesion. It is :

There exists constants $C$ and $k$ such that $|f(x)| ≤ C$ for all $x > k$.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers in the help center. – Community Oct 21 '21 at 02:00