View the Most Wanted LQ Wiki articles.
 Home Forums HCL Reviews Tutorials Articles Register Search Today's Posts Mark Forums Read
 LinuxQuestions.org Big-O and Big-Omega Problem
 Programming This forum is for all programming questions. The question does not have to be directly related to Linux and any language is fair game.

Notices

 10-04-2010, 09:21 PM #1 jfhebb LQ Newbie   Registered: Oct 2010 Posts: 1 Rep: Big-O and Big-Omega Problem So, I have a problem to show an example of a positive function f(n) so f(n) is neither O(n) or Ω(n). Any help?
 10-05-2010, 12:01 AM #2 dugan Guru   Registered: Nov 2003 Location: Canada Distribution: distro hopper Posts: 5,005 Rep: I started writing an example (because this is an exceptionally easy question), but I thought better of it: doing your homework for you isn't right. Hint: it's really easy to come up with a function involving nested loops where the best case and the worst case are both n-squared. Last edited by dugan; 10-05-2010 at 12:03 AM.
 10-05-2010, 12:04 AM #3 Berhanie Senior Member   Registered: Dec 2003 Location: phnom penh Distribution: Fedora Posts: 1,625 Rep: without getting into details, the idea is this: start with f which is not O(n), and g which is not Ω(n). use those two functions to define another function h which is guaranteed to be neither O(n) nor Ω(n).

 Posting Rules You may not post new threads You may not post replies You may not post attachments You may not edit your posts BB code is On Smilies are On [IMG] code is Off HTML code is Off Forum Rules

 Similar Threads Thread Thread Starter Forum Replies Last Post oulevon Programming 7 05-26-2010 08:18 AM VodkaRocks Linux - Wireless Networking 11 06-26-2009 08:08 AM LXer Syndicated Linux News 0 12-23-2007 02:20 PM basshead62887 Linux - Hardware 5 09-12-2007 01:33 AM rhonneil Linux - Software 2 09-25-2003 09:13 PM

All times are GMT -5. The time now is 02:42 AM.

 Contact Us - Advertising Info - Rules - LQ Merchandise - Donations - Contributing Member - LQ Sitemap -