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


Groups > comp.lang.python > #47164

Dijkstra (was Re: Source code to identify user through browser?)

From Terry Jan Reedy <tjreedy@udel.edu>
Subject Dijkstra (was Re: Source code to identify user through browser?)
Date 2013-06-05 20:07 -0400
References <53e74d68-7bd0-4ee6-bb6c-f3f7724c9342@qz2g2000pbb.googlegroups.com> <BLU176-W33D15C8DB2588AC486B3E1D79F0@phx.gbl>
Newsgroups comp.lang.python
Message-ID <mailman.2774.1370477231.3114.python-list@python.org> (permalink)

Show all headers | View raw


On 6/5/2013 6:07 PM, Carlos Nepomuceno wrote:

> Didn't know he was such a humorist! lol
>
> Although I prefer when he's serious:
>
> http://www.cs.utexas.edu/~EWD/transcriptions/EWD10xx/EWD1094.html

pythonic summary:
Let S be an finite iterable of numbers (make it not an iterable if one 
interprets the conclusion as requiring reiteration) and let n = len(S) 
(or len(list(S)) if need be). The if n > 2 and len(set(S)) > 1,
n * min(S) < sum(S) < max(S)  # easily shown by induction on n

If the n = 1 or the items in S are all the same,
n*min == sum == n*max

I might call this the 'Averages are not extreme' theorem.

Corollary: if min(s) == 1 and sum(S) > n, then max(S) > 1
'Pigeonhole Principle'

--
Terry Jan Reedy


Back to comp.lang.python | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

Source code to identify user through browser? Gilles <nospam@nospam.com> - 2013-06-05 15:08 +0200
  Re: Source code to identify user through browser? Joel Goldstick <joel.goldstick@gmail.com> - 2013-06-05 10:28 -0400
  RE: Source code to identify user through browser? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-05 18:10 +0300
    Re: Source code to identify user through browser? rusi <rustompmody@gmail.com> - 2013-06-05 08:18 -0700
      Re: Source code to identify user through browser? Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-06-05 16:31 +0100
        Re: Source code to identify user through browser? rusi <rustompmody@gmail.com> - 2013-06-05 09:20 -0700
      RE: Source code to identify user through browser? Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-06-06 01:07 +0300
      Dijkstra (was Re: Source code to identify user through browser?) Terry Jan Reedy <tjreedy@udel.edu> - 2013-06-05 20:07 -0400

csiph-web