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


Groups > comp.lang.python > #65415 > unrolled thread

Finding size of Variable

Started byAyushi Dalmia <ayushidalmia2604@gmail.com>
First post2014-02-04 03:28 -0800
Last post2014-02-05 15:22 +0000
Articles 19 on this page of 159 — 30 participants

Back to article view | Back to comp.lang.python


Contents

  Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 03:28 -0800
    Re: Finding size of Variable Peter Otten <__peter__@web.de> - 2014-02-04 12:40 +0100
      Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 04:43 -0800
        Re: Finding size of Variable Asaf Las <roegltd@gmail.com> - 2014-02-04 04:53 -0800
          Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 05:18 -0800
        Re: Finding size of Variable Dave Angel <davea@davea.name> - 2014-02-04 08:09 -0500
          Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 05:19 -0800
            Re: Finding size of Variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-04 09:06 -0500
              Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 21:00 -0800
    Re:Finding size of Variable Dave Angel <davea@davea.name> - 2014-02-04 14:21 -0500
      Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 21:15 -0800
        Re: Finding size of Variable Peter Otten <__peter__@web.de> - 2014-02-05 09:27 +0100
    Re: Finding size of Variable Tim Golden <mail@timgolden.me.uk> - 2014-02-04 19:28 +0000
    Re: Finding size of Variable Tim Chase <python.list@tim.thechases.com> - 2014-02-04 13:29 -0600
      Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 21:35 -0800
        Re: Finding size of Variable Rustom Mody <rustompmody@gmail.com> - 2014-02-04 21:45 -0800
          Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-04 22:00 -0800
        Re: Finding size of Variable Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-05 11:00 +0000
          Re: Finding size of Variable Chris Angelico <rosuav@gmail.com> - 2014-02-05 22:44 +1100
            Re: Finding size of Variable wxjmfauth@gmail.com - 2014-02-06 02:15 -0800
              Re: Finding size of Variable Ned Batchelder <ned@nedbatchelder.com> - 2014-02-06 06:10 -0500
                Re: Finding size of Variable wxjmfauth@gmail.com - 2014-02-06 05:51 -0800
                  Re: Finding size of Variable wxjmfauth@gmail.com - 2014-02-06 06:15 -0800
                  Re: Finding size of Variable Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-08 02:48 +0000
                    Re: Finding size of Variable Ethan Furman <ethan@stoneleaf.us> - 2014-02-07 19:02 -0800
                    Re: Finding size of Variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-08 13:17 +0000
                    Re: Finding size of Variable David Hutto <dwightdhutto@gmail.com> - 2014-02-08 17:45 -0500
                      Re: Finding size of Variable Rustom Mody <rustompmody@gmail.com> - 2014-02-08 17:25 -0800
                        Re: Finding size of Variable David Hutto <dwightdhutto@gmail.com> - 2014-02-08 21:56 -0500
                        Re: Finding size of Variable Chris Angelico <rosuav@gmail.com> - 2014-02-09 13:59 +1100
                        Re: Finding size of Variable David Hutto <dwightdhutto@gmail.com> - 2014-02-08 22:07 -0500
                        Re: Finding size of Variable Ned Batchelder <ned@nedbatchelder.com> - 2014-02-08 22:09 -0500
                        Re: Finding size of Variable David Hutto <dwightdhutto@gmail.com> - 2014-02-08 22:09 -0500
                        Re: Finding size of Variable Ned Batchelder <ned@nedbatchelder.com> - 2014-02-08 22:16 -0500
                          Re: Finding size of Variable Rustom Mody <rustompmody@gmail.com> - 2014-02-08 19:30 -0800
                    Re: Finding size of Variable wxjmfauth@gmail.com - 2014-02-10 06:07 -0800
                      Re: Finding size of Variable Asaf Las <roegltd@gmail.com> - 2014-02-10 06:25 -0800
                        Re: Finding size of Variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-10 14:39 +0000
                      Re: Finding size of Variable Tim Chase <python.list@tim.thechases.com> - 2014-02-10 08:43 -0600
                        Re: Finding size of Variable wxjmfauth@gmail.com - 2014-02-11 10:53 -0800
                          Re: Finding size of Variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-11 19:04 +0000
                            Re: Finding size of Variable wxjmfauth@gmail.com - 2014-02-11 23:49 -0800
                              Re: Finding size of Variable Chris Angelico <rosuav@gmail.com> - 2014-02-12 19:06 +1100
                                Re: Finding size of Variable Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-02-12 10:57 +0200
                                  Re: Finding size of Variable Chris Angelico <rosuav@gmail.com> - 2014-02-12 20:24 +1100
                                    Re: Finding size of Variable Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-02-12 11:35 +0200
                              Working with the set of real numbers (was: Finding size of Variable) Ben Finney <ben+python@benfinney.id.au> - 2014-02-12 19:17 +1100
                                Re: Working with the set of real numbers (was: Finding size of Variable) wxjmfauth@gmail.com - 2014-02-12 00:35 -0800
                                  Re: Working with the set of real numbers (was: Finding size of Variable) wxjmfauth@gmail.com - 2014-02-12 00:46 -0800
                                  Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-02-12 19:52 +1100
                                Re: Working with the set of real numbers (was: Finding size of Variable) Grant Edwards <invalid@invalid.invalid> - 2014-02-12 15:24 +0000
                                  Re: Working with the set of real numbers (was: Finding size of Variable) "Gisle Vanem" <gvanem@yahoo.no> - 2014-02-12 17:23 +0100
                              Re: Working with the set of real numbers (was: Finding size of Variable) Chris Angelico <rosuav@gmail.com> - 2014-02-12 19:47 +1100
                                Re: Working with the set of real numbers (was: Finding size of Variable) Jussi Piitulainen <jpiitula@ling.helsinki.fi> - 2014-02-12 11:23 +0200
                                Re: Working with the set of real numbers (was: Finding size of Variable) albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-03-04 02:45 +0000
                                  Re: Working with the set of real numbers (was: Finding size of Variable) Chris Angelico <rosuav@gmail.com> - 2014-03-04 14:02 +1100
                                    Re: Working with the set of real numbers (was: Finding size of Variable) Rustom Mody <rustompmody@gmail.com> - 2014-03-03 19:13 -0800
                                      Re: Working with the set of real numbers (was: Finding size of Variable) Chris Angelico <rosuav@gmail.com> - 2014-03-04 14:46 +1100
                                        Re: Working with the set of real numbers (was: Finding size of Variable) Rustom Mody <rustompmody@gmail.com> - 2014-03-03 21:19 -0800
                                        Re: Working with the set of real numbers (was: Finding size of Variable) Steven D'Aprano <steve@pearwood.info> - 2014-03-04 05:53 +0000
                                          Re: Working with the set of real numbers (was: Finding size of Variable) Chris Angelico <rosuav@gmail.com> - 2014-03-04 17:35 +1100
                                            Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-05 00:05 +1300
                                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-03-04 23:43 +1100
                                            Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-03-04 21:49 +0200
                                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-03-05 06:58 +1100
                                              Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-04 20:55 +0000
                                                Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-03-04 23:05 +0200
                                                  Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-04 22:08 +0000
                                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-03-05 08:18 +1100
                                              Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-04 22:02 +0000
                                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-03-05 09:18 +1100
                                              Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-04 22:54 +0000
                                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-03-05 10:01 +1100
                                              Re: Working with the set of real numbers Dave Angel <davea@davea.name> - 2014-03-04 18:20 -0500
                                              Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-05 11:59 +0000
                                              Re: Working with the set of real numbers Dave Angel <davea@davea.name> - 2014-03-05 07:57 -0500
                                              Re: Working with the set of real numbers Dave Angel <davea@davea.name> - 2014-03-05 08:32 -0500
                                              Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-06 12:27 +0000
                                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-03-07 00:16 +1100
                                          Re: Working with the set of real numbers (was: Finding size of Variable) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-04 04:19 -0700
                                            Re: Working with the set of real numbers (was: Finding size of Variable) albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-03-05 02:27 +0000
                                          Re: Working with the set of real numbers (was: Finding size of Variable) Ian Kelly <ian.g.kelly@gmail.com> - 2014-03-04 04:23 -0700
                                    Re: Working with the set of real numbers (was: Finding size of Variable) albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-03-05 02:15 +0000
                                      Re: Working with the set of real numbers (was: Finding size of Variable) Steven D'Aprano <steve@pearwood.info> - 2014-03-05 03:41 +0000
                                        Re: Working with the set of real numbers (was: Finding size of Variable) Rustom Mody <rustompmody@gmail.com> - 2014-03-04 20:15 -0800
                                          Re: Working with the set of real numbers (was: Finding size of Variable) Roy Smith <roy@panix.com> - 2014-03-04 23:25 -0500
                                            Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-03-05 15:37 +1100
                                              Re: Working with the set of real numbers Rustom Mody <rustompmody@gmail.com> - 2014-03-04 20:57 -0800
                                              Re: Working with the set of real numbers Roy Smith <roy@panix.com> - 2014-03-05 00:29 -0500
                                            Re: Working with the set of real numbers (was: Finding size of Variable) Steven D'Aprano <steve@pearwood.info> - 2014-03-05 07:52 +0000
                                              Re: Working with the set of real numbers (was: Finding size of Variable) Steven D'Aprano <steve@pearwood.info> - 2014-03-05 08:38 +0000
                                                Re: Working with the set of real numbers (was: Finding size of Variable) wxjmfauth@gmail.com - 2014-03-05 01:00 -0800
                                                  Re: Working with the set of real numbers Ned Batchelder <ned@nedbatchelder.com> - 2014-03-05 06:23 -0500
                                              Re: Working with the set of real numbers (was: Finding size of Variable) Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-05 12:21 +0000
                                                Re: Working with the set of real numbers (was: Finding size of Variable) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-05 17:43 +0000
                                                  Re: Working with the set of real numbers (was: Finding size of Variable) Chris Angelico <rosuav@gmail.com> - 2014-03-06 05:01 +1100
                                                  Re: Working with the set of real numbers (was: Finding size of Variable) Chris Kaynor <ckaynor@zindagigames.com> - 2014-03-05 10:03 -0800
                                                    Re: Working with the set of real numbers (was: Finding size of Variable) Grant Edwards <invalid@invalid.invalid> - 2014-03-05 19:13 +0000
                                                  Re: Working with the set of real numbers (was: Finding size of Variable) Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-03-05 21:22 +0000
                                                  Re: Working with the set of real numbers (was: Finding size of Variable) Roy Smith <roy@panix.com> - 2014-03-05 21:31 -0500
                                                    Re: Working with the set of real numbers (was: Finding size of Variable) Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-06 03:06 +0000
                                                      Re: Working with the set of real numbers (was: Finding size of Variable) Chris Angelico <rosuav@gmail.com> - 2014-03-06 14:14 +1100
                                                      Re: Working with the set of real numbers (was: Finding size of Variable) Roy Smith <roy@panix.com> - 2014-03-05 23:05 -0500
                                                    Re: Working with the set of real numbers (was: Finding size of Variable) Grant Edwards <invalid@invalid.invalid> - 2014-03-06 03:34 +0000
                                              Re: Working with the set of real numbers Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-03-05 12:50 +0000
                                                Re: Working with the set of real numbers Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-03-05 17:49 +0000
                              Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-02-12 19:56 +1100
                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-12 20:16 +1100
                              Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-02-12 21:07 +1100
                                Re: Working with the set of real numbers Rustom Mody <rustompmody@gmail.com> - 2014-02-12 06:11 -0800
                                  Re: Working with the set of real numbers Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-12 13:45 -0700
                                    Re: Working with the set of real numbers Rustom Mody <rustompmody@gmail.com> - 2014-02-12 17:47 -0800
                                Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-13 11:09 +1300
                                Re: Working with the set of real numbers Steven D'Aprano <steve@pearwood.info> - 2014-02-13 03:31 +0000
                                  Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-02-13 14:45 +1100
                                  Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-13 15:17 +1100
                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-12 21:20 +1100
                                Re: Working with the set of real numbers wxjmfauth@gmail.com - 2014-02-12 02:55 -0800
                                  Re: Working with the set of real numbers Ned Batchelder <ned@nedbatchelder.com> - 2014-02-12 06:55 -0500
                                Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-02-12 14:48 +0200
                                  Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-13 00:20 +1100
                                    Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-02-12 16:13 +0200
                                      Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-13 04:52 +1100
                                        Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-13 11:24 +1300
                                          Re: Working with the set of real numbers Dave Angel <davea@davea.name> - 2014-02-12 17:56 -0500
                                            Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-14 18:26 +1300
                              Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-02-12 22:44 +1100
                              Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-12 22:58 +1100
                                Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-13 11:32 +1300
                                  Re: Working with the set of real numbers Grant Edwards <invalid@invalid.invalid> - 2014-02-12 23:23 +0000
                              Re: Finding size of Variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-12 14:04 +0000
                                Re: Finding size of Variable Rustom Mody <rustompmody@gmail.com> - 2014-02-12 06:14 -0800
                                  Re: Finding size of Variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-12 14:25 +0000
                                    Re: Finding size of Variable Rustom Mody <rustompmody@gmail.com> - 2014-02-12 06:32 -0800
                              Re: Working with the set of real numbers Oscar Benjamin <oscar.j.benjamin@gmail.com> - 2014-02-13 12:48 +0000
                                Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-02-13 16:00 +0200
                                  Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-14 06:25 +1100
                                    Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-02-13 21:47 +0200
                                      Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-14 07:08 +1100
                                      Re: Working with the set of real numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-02-13 22:05 -0800
                                        Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-15 00:30 +1300
                                          Re: Working with the set of real numbers Devin Jeanpierre <jeanpierreda@gmail.com> - 2014-02-14 16:26 -0800
                                      Re: Working with the set of real numbers albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-03-05 02:38 +0000
                                    Re: Working with the set of real numbers Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-02-14 19:37 +1300
                                      Re: Working with the set of real numbers Chris Angelico <rosuav@gmail.com> - 2014-02-14 17:44 +1100
                                        Re: Working with the set of real numbers Rustom Mody <rustompmody@gmail.com> - 2014-02-14 07:13 -0800
                                      Re: Working with the set of real numbers Dave Angel <davea@davea.name> - 2014-02-14 07:30 -0500
                                      Re: Working with the set of real numbers Grant Edwards <invalid@invalid.invalid> - 2014-02-14 15:09 +0000
                                  Re: Working with the set of real numbers Rotwang <sg552@hotmail.co.uk> - 2014-02-13 21:29 +0000
                                    Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-02-14 00:00 +0200
                                      Re: Working with the set of real numbers Rotwang <sg552@hotmail.co.uk> - 2014-02-13 22:21 +0000
                                        Re: Working with the set of real numbers Marko Rauhamaa <marko@pacujo.net> - 2014-02-14 01:16 +0200
                              Re: Working with the set of real numbers Ben Finney <ben+python@benfinney.id.au> - 2014-02-14 03:57 +1100
                      Re: Finding size of Variable Ned Batchelder <ned@nedbatchelder.com> - 2014-02-10 10:02 -0500
                      Re: Finding size of Variable Neil Cerutti <neilc@norwich.edu> - 2014-02-11 14:29 +0000
          Re: Finding size of Variable Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2014-02-05 22:14 -0500
        Re: Finding size of Variable Dave Angel <davea@davea.name> - 2014-02-05 08:43 -0500
          Re: Finding size of Variable Ayushi Dalmia <ayushidalmia2604@gmail.com> - 2014-02-05 06:33 -0800
            Re: Finding size of Variable Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-02-05 15:22 +0000

Page 8 of 8 — ← Prev page 1 2 3 4 5 6 7 [8]


#66291 — Re: Working with the set of real numbers

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2014-02-15 00:30 +1300
SubjectRe: Working with the set of real numbers
Message-ID<bm6d29F924U1@mid.individual.net>
In reply to#66284
Devin Jeanpierre wrote:
> There is no way to iterate over all the reals one at a time, no matter
> how fast you execute instructions. If you could, it would be trivial
> to show that the reals have the same cardinality as the positive
> integers: correspond n with the whatever is returned by the nth call
> to it.next.

You're assuming that the calls to it.next are discrete
events separated by some nonzero time interval.

A decent transfinite processor would make a continuum
of calls, and execute uncountably many of them in any
finite period of time.

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#66342 — Re: Working with the set of real numbers

FromDevin Jeanpierre <jeanpierreda@gmail.com>
Date2014-02-14 16:26 -0800
SubjectRe: Working with the set of real numbers
Message-ID<mailman.6946.1392424026.18130.python-list@python.org>
In reply to#66291
On Fri, Feb 14, 2014 at 3:30 AM, Gregory Ewing
<greg.ewing@canterbury.ac.nz> wrote:
> Devin Jeanpierre wrote:
>> There is no way to iterate over all the reals one at a time, no matter
>> how fast you execute instructions. If you could, it would be trivial
>> to show that the reals have the same cardinality as the positive
>> integers: correspond n with the whatever is returned by the nth call
>> to it.next.
>
>
> You're assuming that the calls to it.next are discrete
> events separated by some nonzero time interval.

I'm not. If you want to imagine infinitely fast computers, you must
allow for things to "precede" each other in the program's execution,
or else you can't execute any program at all.

In such an infinitely fast computer, if iteration works by calling a
.next() method repeatedly, it can't iterate uncountably many times, by
construction. If you're executing uncountably many instructions per
second, the loop would terminate immediately, having executed
countably infinitely many iterations.

> A decent transfinite processor would make a continuum
> of calls, and execute uncountably many of them in any
> finite period of time.

Yes, you could imagine a computer that does a thing for every real. My
issue is that the cited thing is transfinite induction, for which the
induction covers countably many values; handling of the rest of the
values is a second step. This is also the implication of such a word
as "iteration".

I suppose this was accidental on the part of the poster, and I
shouldn't have disagreed so strongly. I suspect they meant what you
are getting at, instead, which is that there is no successor to any
iteration, and between any two iterations there are uncountably many
iterations that happened. Operations occur in an order, but not
sequentially. (Of course, such a machine would be alien and absurd.)

-- Devin

[toc] | [prev] | [next] | [standalone]


#67783 — Re: Working with the set of real numbers

Fromalbert@spenarnc.xs4all.nl (Albert van der Horst)
Date2014-03-05 02:38 +0000
SubjectRe: Working with the set of real numbers
Message-ID<53168e1a$0$25064$e4fe514c@dreader37.news.xs4all.nl>
In reply to#66220
In article <87fvnm7q1n.fsf@elektro.pacujo.net>,
Marko Rauhamaa  <marko@pacujo.net> wrote:
>Chris Angelico <rosuav@gmail.com>:
>
>> On Fri, Feb 14, 2014 at 1:00 AM, Marko Rauhamaa <marko@pacujo.net> wrote:
>>> Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM
>>> and ran at ℵ₁ hertz and Python supported transfinite iteration, you
>>> could easily do reals:
>>>
>>>         for x in continuum(0, max(1, y)):
>>
>> How exactly do you iterate over a continuum, with a digital computer?
>
>How "digital" our idealized computers are is a matter for a debate.
>However, iterating over the continuum is provably "possible:"
>
>  http://en.wikipedia.org/wiki/Transfinite_induction
>
>> it would take a finite amount of time to assign to x the "next
>> number", ergo your algorithm can't guarantee to finish in finite time.
>
>My assumption was you could execute ℵ₁ statements per second. That
>doesn't guarantee a finite finish time but would make it possible. That
>is because
>
>   ℵ₁ * ℵ₁ = ℵ₁ = ℵ₁ * 1
>
>This computer is definitely more powerful than a Turing machine, which
>only has ℵ₀ bytes of RAM and thus can't even store an arbitrary real
>value in memory.

You're very much off the track here. A Turing machine is an abstraction
for a computer were the limitations of size are gone.
The most obvious feature of a Turing machine is an infinite tape.
A Turing machine happily calculates Ackerman functions long after
a real machine runs out of memory to represent it, with as a result
a number of ones on that tape.
But it only happens in the mathematicians mind.

>
>
>Marko
-- 
Albert van der Horst, UTRECHT,THE NETHERLANDS
Economic growth -- being exponential -- ultimately falters.
albert@spe&ar&c.xs4all.nl &=n http://home.hccnet.nl/a.w.m.van.der.horst

[toc] | [prev] | [next] | [standalone]


#66285 — Re: Working with the set of real numbers

FromGregory Ewing <greg.ewing@canterbury.ac.nz>
Date2014-02-14 19:37 +1300
SubjectRe: Working with the set of real numbers
Message-ID<bm5rspFr2l7U1@mid.individual.net>
In reply to#66213
Chris Angelico wrote:
> Even adding to your requirements that it have an ℵ₁ Hz bus (which, by
> the way, I *totally* want - the uses are endless), it would take a
> finite amount of time to assign to x the "next number", ergo your
> algorithm can't guarantee to finish in finite time.

If it's a quantum computer, it may be able to execute
all branches of the iteration in parallel. But it
would only have a probability of returning the right
answer (in other cases it would kill your cat).

-- 
Greg

[toc] | [prev] | [next] | [standalone]


#66286 — Re: Working with the set of real numbers

FromChris Angelico <rosuav@gmail.com>
Date2014-02-14 17:44 +1100
SubjectRe: Working with the set of real numbers
Message-ID<mailman.6909.1392360280.18130.python-list@python.org>
In reply to#66285
On Fri, Feb 14, 2014 at 5:37 PM, Gregory Ewing
<greg.ewing@canterbury.ac.nz> wrote:
> Chris Angelico wrote:
>>
>> Even adding to your requirements that it have an ℵ₁ Hz bus (which, by
>> the way, I *totally* want - the uses are endless), it would take a
>>
>> finite amount of time to assign to x the "next number", ergo your
>> algorithm can't guarantee to finish in finite time.
>
>
> If it's a quantum computer, it may be able to execute
> all branches of the iteration in parallel. But it
> would only have a probability of returning the right
> answer (in other cases it would kill your cat).

Oh, that's fine, he's not my cat anyway. Go ahead, build it.

ChrisA

[toc] | [prev] | [next] | [standalone]


#66298 — Re: Working with the set of real numbers

FromRustom Mody <rustompmody@gmail.com>
Date2014-02-14 07:13 -0800
SubjectRe: Working with the set of real numbers
Message-ID<09f907b2-dba0-4b5d-8387-1f8ea453d020@googlegroups.com>
In reply to#66286
On Friday, February 14, 2014 12:14:31 PM UTC+5:30, Chris Angelico wrote:

> Oh, that's fine, he's not my cat anyway. Go ahead, build it.

Now Now! I figured you were the cat out here!

[toc] | [prev] | [next] | [standalone]


#66294 — Re: Working with the set of real numbers

FromDave Angel <davea@davea.name>
Date2014-02-14 07:30 -0500
SubjectRe: Working with the set of real numbers
Message-ID<mailman.6915.1392380812.18130.python-list@python.org>
In reply to#66285
 Chris Angelico <rosuav@gmail.com> Wrote in message:
> On Fri, Feb 14, 2014 at 5:37 PM, Gregory Ewing

>>
>>
>> If it's a quantum computer, it may be able to execute
>> all branches of the iteration in parallel. But it
>> would only have a probability of returning the right
>> answer (in other cases it would kill your cat).
> 
> Oh, that's fine, he's not my cat anyway. Go ahead, build it.
> 

That cat has got to be at least 79 by now. Probably starved by now.

-- 
DaveA

[toc] | [prev] | [next] | [standalone]


#66297 — Re: Working with the set of real numbers

FromGrant Edwards <invalid@invalid.invalid>
Date2014-02-14 15:09 +0000
SubjectRe: Working with the set of real numbers
Message-ID<ldlbiu$2dk$1@reader1.panix.com>
In reply to#66285
On 2014-02-14, Gregory Ewing <greg.ewing@canterbury.ac.nz> wrote:

> If it's a quantum computer, it may be able to execute
> all branches of the iteration in parallel. But it
> would only have a probability of returning the right
> answer (in other cases it would kill your cat).

I know somebody who would claim that _is_ the right answer.

-- 
Grant Edwards               grant.b.edwards        Yow! Hello, GORRY-O!!
                                  at               I'm a GENIUS from HARVARD!!
                              gmail.com            

[toc] | [prev] | [next] | [standalone]


#66252 — Re: Working with the set of real numbers

FromRotwang <sg552@hotmail.co.uk>
Date2014-02-13 21:29 +0000
SubjectRe: Working with the set of real numbers
Message-ID<ldjdg5$n9e$1@dont-email.me>
In reply to#66178
What's this? A discussion about angels dancing on a the head of a pin? 
Great, I'm in.

On 13/02/2014 14:00, Marko Rauhamaa wrote:
> Oscar Benjamin <oscar.j.benjamin@gmail.com>:
>
>> This isn't even a question of resource constraints: a digital computer
>> with infinite memory and computing power would still be limited to
>> working with countable sets, and the real numbers are just not
>> countable. The fundamentally discrete nature of digital computers
>> prevents them from being able to truly handle real numbers and real
>> computation.
>
> Well, if your idealized, infinite, digital computer had ℵ₁ bytes of RAM
> and ran at ℵ₁ hertz and Python supported transfinite iteration, you
> could easily do reals:
>
>      def real_sqrt(y):
>          for x in continuum(0, max(1, y)):
>              # Note: x is not traversed in the < order but some other
>              # well-ordering, which has been proved to exist.
>              if x * x == y:
>                  return x
>          assert False
>
> The function could well return in finite time with a precise result for
> any given nonnegative real argument.


Minor point: ℵ₁ does not mean the cardinality c of the continuum, it 
means the smallest cardinal larger than ℵ₀. It has been proved that the 
question of whether ℵ₁ == c is independent of ZFC, so it is in a sense 
unanswerable.

More importantly, though, such a computer could not complete the above 
iteration in finite time unless time itself is not real-valued. That's 
because if k is an uncountable ordinal then there is no strictly 
order-preserving function from k to the unit interval [0, 1]. For 
suppose otherwise, and let f be such a function. Let S denote the set of 
successor ordinals in k, and let L denote the set of limit ordinals in 
k. Then lambda x: x + 1 is an injective function from L (or L with a 
single point removed if k is the successor of a limit ordinal) to S, so 
that S is at least as large as L and since k == S | L it follows that S 
is uncountable.

For each x + 1 in S, let g(x + 1) = f(x + 1) - f(x) > 0. Let F be any 
finite subset of S and let y = max(F). It is clear that f(y) >= sum(g(x) 
for x in F). Since also f(y) <= 1, we have sum(g(x) for x in F) if <= 1 
for all finite F. In particular, for any integer n > 0, the set S_n = {x 
for x in S if g(x) > 1/n} has len(S_n) < n. But then S is the union of 
the countable collection {S_n for n in N} of finite sets, so is 
countable; a contradiction.


On 13/02/2014 19:47, Marko Rauhamaa wrote:
> My assumption was you could execute ℵ₁ statements per second. That
> doesn't guarantee a finite finish time but would make it possible. That
> is because
>
>     ℵ₁ * ℵ₁ = ℵ₁ = ℵ₁ * 1

I don't think that's enough - assuming the operations of your processor 
during a second can be indexed by some ordinal k with len(k) == c, if 
each of the c operations per iteration must be complete before the next 
step of the for loop is complete then you need an injective function 
from c * c to k that preserves the lexicographic ordering. I don't know 
whether such a function exists for arbitrary such k, but k can be chosen 
in advance so that it does.

[toc] | [prev] | [next] | [standalone]


#66261 — Re: Working with the set of real numbers

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-02-14 00:00 +0200
SubjectRe: Working with the set of real numbers
Message-ID<877g8y7jwa.fsf@elektro.pacujo.net>
In reply to#66252
Rotwang <sg552@hotmail.co.uk>:

>>          for x in continuum(0, max(1, y)):
>>              # Note: x is not traversed in the < order but some other
>>              # well-ordering, which has been proved to exist.
>>              if x * x == y:
>>                  return x
>
> [...]
>
> More importantly, though, such a computer could not complete the above
> iteration in finite time unless time itself is not real-valued. That's
> because if k is an uncountable ordinal then there is no strictly
> order-preserving function from k to the unit interval [0, 1].

If you read the code comment above, the transfinite iterator yields the
whole continuum, not in the < order (which is impossible), but in some
other well-ordering (which is known to exist). Thus, we can exhaust the
continuum in ℵ₁ discrete steps.

(Yes, the continuum hypothesis was used to make the notation easier to
read.)


Marko

[toc] | [prev] | [next] | [standalone]


#66263 — Re: Working with the set of real numbers

FromRotwang <sg552@hotmail.co.uk>
Date2014-02-13 22:21 +0000
SubjectRe: Working with the set of real numbers
Message-ID<ldjghn$9f1$1@dont-email.me>
In reply to#66261
On 13/02/2014 22:00, Marko Rauhamaa wrote:
> Rotwang <sg552@hotmail.co.uk>:
>
>>>           for x in continuum(0, max(1, y)):
>>>               # Note: x is not traversed in the < order but some other
>>>               # well-ordering, which has been proved to exist.
>>>               if x * x == y:
>>>                   return x
>>
>> [...]

Restoring for context:

>>> The function could well return in finite time with a precise result
>>> for any given nonnegative real argument.


>> More importantly, though, such a computer could not complete the above
>> iteration in finite time unless time itself is not real-valued. That's
>> because if k is an uncountable ordinal then there is no strictly
>> order-preserving function from k to the unit interval [0, 1].
>
> If you read the code comment above, the transfinite iterator yields the
> whole continuum, not in the < order (which is impossible), but in some
> other well-ordering (which is known to exist). Thus, we can exhaust the
> continuum in ℵ₁ discrete steps.

Yes, I understood that. But my point was that it can't carry out those 
ℵ₁ discrete steps in finite time (assuming that time is real-valued), 
because there's no way to embed them in any time interval without 
changing their order. Note that this is different to the case of 
iterating over a countable set, since the unit interval does have 
countable well-ordered subsets.

[toc] | [prev] | [next] | [standalone]


#66269 — Re: Working with the set of real numbers

FromMarko Rauhamaa <marko@pacujo.net>
Date2014-02-14 01:16 +0200
SubjectRe: Working with the set of real numbers
Message-ID<8738jm7gec.fsf@elektro.pacujo.net>
In reply to#66263
Rotwang <sg552@hotmail.co.uk>:

> But my point was that it can't carry out those ℵ₁ discrete steps in
> finite time (assuming that time is real-valued), because there's no
> way to embed them in any time interval without changing their order.

I'd have to think so I take your word for it.


Marko

[toc] | [prev] | [next] | [standalone]


#66191 — Re: Working with the set of real numbers

FromBen Finney <ben+python@benfinney.id.au>
Date2014-02-14 03:57 +1100
SubjectRe: Working with the set of real numbers
Message-ID<mailman.6848.1392310653.18130.python-list@python.org>
In reply to#66004
Oscar Benjamin <oscar.j.benjamin@gmail.com> writes:

> I think Chris' statement above is pretty clear.

I disagree, as explained.

> Also I didn't find the original statement confusing

I'm happy for you.

> and it is a reasonable point to make.

Yes, and I was not addressing that.

-- 
 \          “It is well to remember that the entire universe, with one |
  `\   trifling exception, is composed of others.” —John Andrew Holmes |
_o__)                                                                  |
Ben Finney

[toc] | [prev] | [next] | [standalone]


#65821

FromNed Batchelder <ned@nedbatchelder.com>
Date2014-02-10 10:02 -0500
Message-ID<mailman.6625.1392044581.18130.python-list@python.org>
In reply to#65815
On 2/10/14 9:43 AM, Tim Chase wrote:
> On 2014-02-10 06:07, wxjmfauth@gmail.com wrote:
>> Python does not save memory at all. A str (unicode string)
>> uses less memory only - and only - because and when one uses
>> explicitly characters which are consuming less memory.
>>
>> Not only the memory gain is zero, Python falls back to the
>> worse case.
>>
>>>>> sys.getsizeof('a' * 1000000)
>> 1000025
>>>>> sys.getsizeof('a' * 1000000 + 'oe')
>> 2000040
>>>>> sys.getsizeof('a' * 1000000 + 'oe' + '\U00010000')
>> 4000048
>
> If Python used UTF-32 for EVERYTHING, then all three of those cases
> would be 4000048, so it clearly disproves your claim that "python
> does not save memory at all".
>
>> The opposite of what the utf8/utf16 do!
>>
>>>>> sys.getsizeof(('a' * 1000000 + 'oe' +
>>>>> '\U00010000').encode('utf-8'))
>> 1000023
>>>>> sys.getsizeof(('a' * 1000000 + 'oe' +
>>>>> '\U00010000').encode('utf-16'))
>> 2000025
>
> However, as pointed out repeatedly, string-indexing in fixed-width
> encodings are O(1) while indexing into variable-width encodings (e.g.
> UTF8/UTF16) are O(N).  The FSR gives the benefits of O(1) indexing
> while saving space when a string doesn't need to use a full 32-bit
> width.
>
> -tkc
>
>
>

Please don't engage in this debate with JMF.  His mind is made up, and 
he will not be swayed, no matter how persuasive and reasonable your 
arguments.  Just ignore him.


-- 
Ned Batchelder, http://nedbatchelder.com

[toc] | [prev] | [next] | [standalone]


#65910

FromNeil Cerutti <neilc@norwich.edu>
Date2014-02-11 14:29 +0000
Message-ID<mailman.6670.1392128988.18130.python-list@python.org>
In reply to#65815
On 2014-02-10, Ned Batchelder <ned@nedbatchelder.com> wrote:
> On 2/10/14 9:43 AM, Tim Chase wrote:
>>> The opposite of what the utf8/utf16 do!
>>>
>>>>>> sys.getsizeof(('a' * 1000000 + 'oe' +
>>>>>> '\U00010000').encode('utf-8'))
>>> 1000023
>>>>>> sys.getsizeof(('a' * 1000000 + 'oe' +
>>>>>> '\U00010000').encode('utf-16'))
>>> 2000025
>>
>> However, as pointed out repeatedly, string-indexing in
>> fixed-width encodings are O(1) while indexing into
>> variable-width encodings (e.g. UTF8/UTF16) are O(N).  The FSR
>> gives the benefits of O(1) indexing while saving space when a
>> string doesn't need to use a full 32-bit width.
>
> Please don't engage in this debate with JMF.  His mind is made
> up, and he will not be swayed, no matter how persuasive and
> reasonable your arguments.  Just ignore him.

I think reasonable criticisms should be contested no matter who
posts them. I agree jmf shouldn't be singled out for abuse,
summoned, insulted, or have his few controversial opinions
brought into other topics. Tim's post was responding to a
specific, well-presented criticism of Python's string
implementation. Left unchallenged, it might linger unhappily in
the air, like a symphony ended on a dominant 7th chord.

-- 
Neil Cerutti

[toc] | [prev] | [next] | [standalone]


#65504

FromDennis Lee Bieber <wlfraed@ix.netcom.com>
Date2014-02-05 22:14 -0500
Message-ID<mailman.6433.1391656482.18130.python-list@python.org>
In reply to#65474
On Wed, 5 Feb 2014 22:44:47 +1100, Chris Angelico <rosuav@gmail.com>
declaimed the following:

>On Wed, Feb 5, 2014 at 10:00 PM, Steven D'Aprano
><steve+comp.lang.python@pearwood.info> wrote:
>>> where stopWords.txt is a file of size 4KB
>>
>> My guess is that if you split a 4K file into words, then put the words
>> into a list, you'll probably end up with 6-8K in memory.
>
>I'd guess rather more; Python strings have a fair bit of fixed
>overhead, so with a whole lot of small strings, it will get more
>costly.
>
>>>> sys.version
>'3.4.0b2 (v3.4.0b2:ba32913eb13e, Jan  5 2014, 16:23:43) [MSC v.1600 32
>bit (Intel)]'
>>>> sys.getsizeof("asdf")
>29
>

>>> import sys
>>> indata = "221B or not to be seeing you again"
>>> sys.getsizeof(indata)
67
>>> worddata = indata.split()
>>> worddata
['221B', 'or', 'not', 'to', 'be', 'seeing', 'you', 'again']
>>> sys.getsizeof(worddata) + sum(sys.getsizeof(wd) for wd in worddata)
451

	That's a 7X expansion for just splitting a single line into a list of
words.
-- 
	Wulfraed                 Dennis Lee Bieber         AF6VN
    wlfraed@ix.netcom.com    HTTP://wlfraed.home.netcom.com/

[toc] | [prev] | [next] | [standalone]


#65477

FromDave Angel <davea@davea.name>
Date2014-02-05 08:43 -0500
Message-ID<mailman.6420.1391607624.18130.python-list@python.org>
In reply to#65470
 Ayushi Dalmia <ayushidalmia2604@gmail.com> Wrote in message:
> On Wednesday, February 5, 2014 12:59:46 AM UTC+5:30, Tim Chase wrote:
>> On 2014-02-04 14:21, Dave Angel wrote:
>> 
>> > To get the "total" size of a list of strings,  try (untested):
>> 
>> > 
>> 
>> > a = sys.getsizeof (mylist )
>> 
>> > for item in mylist:
>> 
>> >     a += sys.getsizeof (item)
>> 
>> 
>> 
>> I always find this sort of accumulation weird (well, at least in
>> 
>> Python; it's the *only* way in many other languages) and would write
>> 
>> it as
>> 
>> 
>> 
>>   a = getsizeof(mylist) + sum(getsizeof(item) for item in mylist)
>> 
>> 
>> 
>> -tkc
> 
> This also doesn't gives the true size. I did the following:
> 
> import sys
> data=[]
> f=open('stopWords.txt','r')
> 
> for line in f:
>     line=line.split()
>     data.extend(line)
> 
> print sys.getsizeof(data)
> 

Did you actually READ either of my posts or Tim's? For a
 container,  you can't just use getsizeof on the container.
 

a = sys.getsizeof (data)
for item in mylist:
      a += sys.getsizeof (data)
print a

-- 
DaveA

[toc] | [prev] | [next] | [standalone]


#65478

FromAyushi Dalmia <ayushidalmia2604@gmail.com>
Date2014-02-05 06:33 -0800
Message-ID<e83e857f-f0e0-4aa7-8955-dcb9922a655c@googlegroups.com>
In reply to#65477
On Wednesday, February 5, 2014 7:13:34 PM UTC+5:30, Dave Angel wrote:
> Ayushi Dalmia <ayushidalmia2604@gmail.com> Wrote in message:
> 
> > On Wednesday, February 5, 2014 12:59:46 AM UTC+5:30, Tim Chase wrote:
> 
> >> On 2014-02-04 14:21, Dave Angel wrote:
> 
> >> 
> 
> >> > To get the "total" size of a list of strings,  try (untested):
> 
> >> 
> 
> >> > 
> 
> >> 
> 
> >> > a = sys.getsizeof (mylist )
> 
> >> 
> 
> >> > for item in mylist:
> 
> >> 
> 
> >> >     a += sys.getsizeof (item)
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >> I always find this sort of accumulation weird (well, at least in
> 
> >> 
> 
> >> Python; it's the *only* way in many other languages) and would write
> 
> >> 
> 
> >> it as
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >>   a = getsizeof(mylist) + sum(getsizeof(item) for item in mylist)
> 
> >> 
> 
> >> 
> 
> >> 
> 
> >> -tkc
> 
> > 
> 
> > This also doesn't gives the true size. I did the following:
> 
> > 
> 
> > import sys
> 
> > data=[]
> 
> > f=open('stopWords.txt','r')
> 
> > 
> 
> > for line in f:
> 
> >     line=line.split()
> 
> >     data.extend(line)
> 
> > 
> 
> > print sys.getsizeof(data)
> 
> > 
> 
> 
> 
> Did you actually READ either of my posts or Tim's? For a
> 
>  container,  you can't just use getsizeof on the container.
> 
>  
> 
> 
> 
> a = sys.getsizeof (data)
> 
> for item in mylist:
> 
>       a += sys.getsizeof (data)
> 
> print a
> 
> 
> 
> -- 
> 
> DaveA

Yes, I did. I now understand how to find the size.

[toc] | [prev] | [next] | [standalone]


#65480

FromMark Lawrence <breamoreboy@yahoo.co.uk>
Date2014-02-05 15:22 +0000
Message-ID<mailman.6421.1391613798.18130.python-list@python.org>
In reply to#65478
On 05/02/2014 14:33, Ayushi Dalmia wrote:

Please stop sending double line spaced messages, just follow the 
instructions here https://wiki.python.org/moin/GoogleGroupsPython to 
prevent this happening, thanks.

-- 
My fellow Pythonistas, ask not what our language can do for you, ask 
what you can do for our language.

Mark Lawrence

[toc] | [prev] | [standalone]


Page 8 of 8 — ← Prev page 1 2 3 4 5 6 7 [8]

Back to top | Article view | comp.lang.python


csiph-web