Re: Big oh Notation
From: Stewart Gordon (smjg_1998_at_yahoo.com)
Date: 02/27/04
- Next message: Dr John Stockton: "Re: S.O.S!!"
- Previous message: FISH: "Re: S.O.S!!"
- In reply to: Oskar Sigvardsson: "Re: Big oh Notation"
- Next in thread: Stewart Gordon: "[OT] Re: Big oh Notation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Fri, 27 Feb 2004 17:34:37 +0000
Oskar Sigvardsson wrote:
> I learned about Big-Oh from Concrete Mathematics by Graham, Knuth,
> Patashnik, excellent book. And also Donald Knuths monumental (well,
> three volumes so far) The Art Of Computer Programming.
>
> And by the way, I'm almost positve that QS is of order O(n log n).
In the average case, yes. It's O(n^2) worst case, O(n) best case.
> (And even if it isn't most people would write it O(n log n) anyway
> because
>
> O(n log 2n) = O(n(log 2 + log n)) = O(n log n + n log 2) = O(n log n)
Either something is O(n log n) or it isn't. O(n log 2n) is indeed
identical to O(n log n). An order is an order, not the way some
convention chooses to write it down.
Stewart.
-- My e-mail is valid but not my primary mailbox, aside from its being the unfortunate victim of intensive mail-bombing at the moment. Please keep replies on the 'group where everyone may benefit.
- Next message: Dr John Stockton: "Re: S.O.S!!"
- Previous message: FISH: "Re: S.O.S!!"
- In reply to: Oskar Sigvardsson: "Re: Big oh Notation"
- Next in thread: Stewart Gordon: "[OT] Re: Big oh Notation"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|