School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become an Expert!

Join 307,131 Programmers for FREE! Get instant access to thousands of experts, tutorials, code snippets, and more! There are 2,042 people online right now. Registration is fast and FREE... Join Now!




big O notation proof

 

big O notation proof

akj_

18 Oct, 2009 - 12:09 PM
Post #1

New D.I.C Head
*

Joined: 23 Mar, 2009
Posts: 31

i know this is kinda math related but always in my computer science problem question
how do you proof that n^2-2n+1 is big O of n^2
i started like this and i got stuck
let c = 1 and choose for all n>1

n^2-2n+1 <= n^2

i proofed the base step for n=2
an proceeded the inductive step where i got stucked

(n+1)^2-2(n+1)+1 <= (n+1)^2

User is offlineProfile CardPM
+Quote Post


Neumann

RE: Big O Notation Proof

18 Oct, 2009 - 02:57 PM
Post #2

I can judge a book by its cover
Group Icon

Joined: 8 Jul, 2009
Posts: 686



Thanked: 93 times
Dream Kudos: 225
My Contributions
http://www.dreamincode.net/forums/showtopic131395.htm
User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/21/09 02:38PM

Live Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

Tutorials

Programming

Web Development

Reference Sheets

Code Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month