Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #10509

Re: Verifying a list is alphabetized

From Eric Sosman <esosman@ieee-dot-org.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: Verifying a list is alphabetized
Date 2011-12-04 21:17 -0500
Organization A noiseless patient Spider
Message-ID <jbh9j9$2eo$1@dont-email.me> (permalink)
References (6 earlier) <WPidnXX0kcoMSEbTnZ2dnUVZ_q6dnZ2d@earthlink.com> <ZrRCq.5933$cN1.371@newsfe12.iad> <jY6dnVhvedWQnkHTnZ2dnUVZ_r2dnZ2d@earthlink.com> <jbh1hf$m6j$1@dont-email.me> <JOGdnZ4NAKmfkEHTnZ2dnUVZ_rednZ2d@earthlink.com>

Show all headers | View raw


On 12/4/2011 7:14 PM, Patricia Shanahan wrote:
> [...]
> Usually, when it is quoted in Big-O notation it should mean "calculated
> average over all data sets".

     I must disagree. Big-Oh is a statement about some quantity, and
carries no implication about the nature of that quantity: average,
best case, worst case, or whatever.  We can say of Quicksort that the
average running time is O(N log N) and the worst is O(N*N), and the
big-Ohs in the two assertions are independent: They are statements
about two different quantities.

     In fact, Big-Oh is often used in an entirely different context,
describing a tiny quantity rather than a large one.  For example, we
can say that the sum 1/1 + 1/2 + ... + 1/N is ln(N) + O(1).  There is
no implication of an average of any kind in this statement, nor even
of a data set or a universe of data sets; there is only a statement
about the rate of growth of the discrepancy between the exact sum
and the approximation.

     If notions like "average over all data sets" appear, they do not
arise from the Big-Oh but from the nature of the quantity that Big-Oh
describes.  If we're talking about "average," we must describe the
genesis of this average: Over the entire universe of cases or over a
designated subset, weighted or unweighted, time-decayed or static,
whatever.  It's not Big-Oh that contributes such things, but the
definition of the quantity under consideration.

> Big-O is not really subject to
> experimentation, because it is about limits as size tends to infinity.

     Or, sometimes, as something tends to zero.  You'll find this sense
used all over the place in any textbook on numerical analysis: Integrate
by the trapezoidal rule with step size h and the error is O(h^2); use
Simpson's rule and you can get O(h^4).  These Big-Oh's still describe
upper bounds, but the quantities become smaller rather than larger in
the direction of interest.

-- 
Eric Sosman
esosman@ieee-dot-org.invalid

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Verifying a list is alphabetized laredotornado <laredotornado@zipmail.com> - 2011-11-30 07:52 -0800
  Re: Verifying a list is alphabetized Knute Johnson <nospam@knutejohnson.com> - 2011-11-30 08:05 -0800
    Re: Verifying a list is alphabetized Lew <lewbloch@gmail.com> - 2011-11-30 11:18 -0800
    Re: Verifying a list is alphabetized Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 19:54 -0500
      Re: Verifying a list is alphabetized Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-03 07:44 -0500
        Re: Verifying a list is alphabetized Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-03 09:02 -0500
        Re: Verifying a list is alphabetized Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 20:05 -0800
          Re: Verifying a list is alphabetized Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 22:13 -0800
            Re: Verifying a list is alphabetized Tom Anderson <twic@urchin.earth.li> - 2011-12-04 21:47 +0000
          Re: Verifying a list is alphabetized Martin Gregorie <martin@address-in-sig.invalid> - 2011-12-04 12:42 +0000
            Re: Verifying a list is alphabetized Patricia Shanahan <pats@acm.org> - 2011-12-04 12:18 -0800
              Re: Verifying a list is alphabetized Daniel Pitts <newsgroup.nospam@virtualinfinity.net> - 2011-12-04 13:17 -0800
                Re: Verifying a list is alphabetized Patricia Shanahan <pats@acm.org> - 2011-12-04 15:32 -0800
                Re: Verifying a list is alphabetized markspace <-@.> - 2011-12-04 15:59 -0800
                Re: Verifying a list is alphabetized Patricia Shanahan <pats@acm.org> - 2011-12-04 16:14 -0800
                Re: Verifying a list is alphabetized markspace <-@.> - 2011-12-04 17:12 -0800
                Re: Verifying a list is alphabetized Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-04 21:17 -0500
            Re: Verifying a list is alphabetized Tom Anderson <twic@urchin.earth.li> - 2011-12-04 22:11 +0000
              Re: Verifying a list is alphabetized Martin Gregorie <martin@address-in-sig.invalid> - 2011-12-04 23:41 +0000
              Re: Verifying a list is alphabetized Roedy Green <see_website@mindprod.com.invalid> - 2011-12-12 01:39 -0800
          Re: Verifying a list is alphabetized Eric Sosman <esosman@ieee-dot-org.invalid> - 2011-12-04 08:47 -0500
          Re: Verifying a list is alphabetized Gene Wirchenko <genew@ocis.net> - 2011-12-04 21:34 -0800
  Re: Verifying a list is alphabetized Patricia Shanahan <pats@acm.org> - 2011-11-30 12:52 -0800
    Re: Verifying a list is alphabetized laredotornado <laredotornado@zipmail.com> - 2011-12-01 06:43 -0800
  Re: Verifying a list is alphabetized Joshua Maurice <joshuamaurice@gmail.com> - 2011-11-30 13:16 -0800
  Re: Verifying a list is alphabetized Roedy Green <see_website@mindprod.com.invalid> - 2011-12-02 01:43 -0800
    Re: Verifying a list is alphabetized Patricia Shanahan <pats@acm.org> - 2011-12-02 05:58 -0800
      Re: Verifying a list is alphabetized Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 19:55 -0500
      Re: Verifying a list is alphabetized Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 02:54 -0800
        Re: Verifying a list is alphabetized Patricia Shanahan <pats@acm.org> - 2011-12-03 06:17 -0800
    Re: Verifying a list is alphabetized Roedy Green <see_website@mindprod.com.invalid> - 2011-12-03 03:10 -0800
  Re: Verifying a list is alphabetized Arne Vajhøj <arne@vajhoej.dk> - 2011-12-02 19:52 -0500

csiph-web