# Asymptotic notation

[THIS IS HOMEWORK so please, don't just provide solutions, help me reasoning]

I'm dealing with the following problem:
Let $f(n)$ be the worst case time complexity of an algorithm A. Assume that there exist $c > 0$ and $n_{0}$, such that for each $n > n_{0}$ there exists an input of size $n$ for which A runs in exactly $c\cdot{g(n)}$ steps.

a. Is it necessarily true that $f(n) = \Omega(g(n))$?
b. Assume $f(n) = O(g(n))$. Is it necessarily true that $f(n) = \Theta(g(n))$?

For a. I think it must be true since the $\Omega$ notation has on it all the elements that are either $f(n) = c\cdot g(n)$ or $f(n) > c\cdot g(n)$ so following the assumption leads to $f(n) = c\cdot g(n)$ being always true, therefore making the whole sentence true. (hope I'm right).
For b. I assume $f(n) = O(g(n))$ and $f(n)=c\cdot{g(n)}$ ($\forall{n>n_{0}}$... of course) then I concluded that since (a) is true then $f(n) = \Theta(g(n))$.

any help will be appreciated, thanks.

-
Part b. seems a little strange. If you're already given that $f(n) = c\,g(n)$ when $n$ is large enough why do you need to assume that $f(n) = O(g(n))$? Is that exactly how the question was written? – Antonio Vargas Apr 15 '12 at 13:15
@Antonio yes by 100% – JanosAudron Apr 15 '12 at 13:27

1
In that case then I think your reasoning is correct. Everything is easy if you know that $f(n) = c \,g(n)$ eventually. – Antonio Vargas Apr 15 '12 at 14:07
{"extraction_info": {"found_math": true, "script_math_tex": 0, "script_math_asciimath": 0, "math_annotations": 0, "math_alttext": 0, "mathml": 0, "mathjax_tag": 0, "mathjax_inline_tex": 21, "mathjax_display_tex": 0, "mathjax_asciimath": 0, "img_math": 0, "codecogs_latex": 0, "wp_latex": 0, "mimetex.cgi": 0, "/images/math/codecogs": 0, "mathtex.cgi": 0}, "config": {"markdown_headings": true, "markdown_code": true, "boilerplate_config": {"ratio_threshold": 0.18, "absolute_threshold": 10, "end_threshold": 15, "enable": false}, "remove_buttons": true, "remove_image_figures": true, "remove_link_clusters": true, "table_config": {"min_rows": 2, "min_cols": 3, "format": "github"}, "remove_chinese": true, "remove_edit_buttons": true, "extract_latex": true}, "english_confidence": 0.9411389231681824, "perplexity_flag": "head"}