Path: csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: Update only if not already in array Date: Sat, 18 Mar 2017 20:12:38 +0000 Organization: A noiseless patient Spider Lines: 22 Message-ID: <87zigis5s9.fsf@bsb.me.uk> References: <567cadf8-91e1-4e1d-9183-09b60658ec39@googlegroups.com> <72c9bb07-427c-4256-bc82-0b0a3acd6cc5@googlegroups.com> <8e90e371-950e-4774-89f4-1c54566745fa@googlegroups.com> <20ca53b3-e664-4d34-86ec-1bc0e5fb4b1e@googlegroups.com> <87o9xhjb00.fsf@bsb.me.uk> <8fae31a5-24ba-46ac-a746-299a4eb57671@googlegroups.com> <87efyckbg4.fsf@bsb.me.uk> <6758a153-c068-4bbb-b890-52bc05066870@googlegroups.com> <8760jok1m3.fsf@bsb.me.uk> <3aa0dc8d-a808-4583-809c-c74fffda0e08@googlegroups.com> <87mvczhiq5.fsf@bsb.me.uk> <8737ep3o6e.fsf@bsb.me.uk> <8737eev420.fsf@bsb.me.uk> <87inn9ubhr.fsf@bsb.me.uk> <68caca55-421a-4642-b1d5-59365978f0ba@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="d9ae36ebfae9d8074f23677ea7215a3c"; logging-data="6304"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19uCo/m3giuvD2GfEgTakN6zbEQjmbjGfs=" Cancel-Lock: sha1:/m3DIzGqaVV4X6aWAuhSmsAVSCk= sha1:G4CEHAHafwnxExFJMxWKmcJj6kc= X-BSB-Auth: 1.74571d7f2aa43aae2a4a.20170318201238GMT.87zigis5s9.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:32807 "Michael Haufe (TNO)" writes: > Ben Bacarisse wrote: > >> No, I meant above or below n0. You simply can't say anything about any >> finite set of values of f(n), knowing only that f is O(n^2). > > While you could have a constant multiple at a given point, or some > multiple of the lower orders, I'm not convinced that it could be some > arbitrary value. If f was declared to be O(n^2), f(5) isn't going to > be n^3 with f(6) being at n^50. That would be a different rate. Give me a few values for f(n) (just list them: f(0) = ?, f(6) = ? and so on) for which you can be *certain* than f is not O(n^2). You seem to be saying that f(5) = 125, f(6) = 808281277464764060643139600456536293376 means that f can't be O(n^2) but that's not so. You can no idea what happens for n > 6. f might even be O(1). -- Ben.