Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8117721
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T04:15:55+00:00 2026-06-06T04:15:55+00:00

Just started learning algorithms. So the exercise is to find if statement is always/sometimes

  • 0

Just started learning algorithms. So the exercise is to find if statement is always/sometimes true or false. Em, where does my logic fails here?

f(n) != O(g(n)) and g(n) != O(f(n))

O-notation is 0 <= f(n) <= cg(n) where c is some constant. So not equal here means:

f(n) > cg(n) and g(n) > cf(n)

If f(n) = g(n) = 1, and let’s say c = 1/2:

1 > (1/2)*1 and 1 > (1/2)*1

So it is true in this case. But the book says it’s false in this particular case. What part do I misunderstand?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-06T04:15:57+00:00Added an answer on June 6, 2026 at 4:15 am

    Big-O is not 0 <= f(n) <= c g(n) for some constant, per se. It’s that there exists a number c such that the relation holds for “large enough” values of n. (This is the “asymptotic” that we refer to when we call Big-O an asymptotic notation, the other common ones being Big-Theta and Big-Omega.)

    For example, let’s say there’s an algorithm that operates on some data structure with n elements, and takes 3n^2 + 7n + 18 steps. Call this f(n). We say that the Big-O of this expression is O(n^2) because there exists a constant (in this case anything larger than 3) such that for all “large enough” values of n, f(n) <= c n^2.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Just started learning Rails (3). I am tearing my hair out trying to find
I just started learning C and am not sure what the issue is here.
I just started learning swing, and couldn't find any clear instructions for this: I'd
Just started learning Jquery - here's my problem: I have six divs on a
Just started learning OpenGL and couldn't find a decent tutorial to get me going.
Started learning algorithms. I understand how to find theta-notation from a 'regular recurrence' like
I just started learning C++(coming from Java & Python) and am trying to learn
I just started learning how to make a website. I'm making a comment box
I just started learning C but I don't understand this part of the code.
I´ve just started learning GWT and I´m trying to implement http://gwt.google.com/samples/Showcase/Showcase.html#!CwFileUpload and but failing

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.