Whether you're a student or a professional, IDNLearn.com has answers for everyone. Ask your questions and receive detailed and reliable answers from our experienced and knowledgeable community members.
We have that O(n²) is the theta notation for 7n² + 4n + 2.
Let's give big-Oh a formal definition:
O(g(n)) = {the set of all f such that 0 [tex]\leq[/tex] f(n) [tex]\leq[/tex] cg(n) for any n >= n₀ fulfilling positive constants c and n₀}
To show this
We need to find c and n₀ such that:
7n² + 4n + 2 <= cn² for all n >= n₀ .
Divide both sides by n², getting:
7 + 4/n + 2/(n²) <= c for all n >= n₀ .
If we choose n₀ equal to 1, then we need a value of c such that:
7 + 4 + 2 <= c
We can set c equal to 13. Now we have:
7n² + 4n + 2 <= 13n² for all n >= 1 .
Hence, 7n² + 4n + 2=O(n²)
Learn more about Big-Oh notation here-
brainly.com/question/14438669
#SPJ10