comp.lang.ada
 help / color / mirror / Atom feed
* Natural data type ?
@ 2002-03-27  2:13 Peter I. Hansen
  2002-03-27  2:57 ` Chad R. Meiners
                   ` (2 more replies)
  0 siblings, 3 replies; 12+ messages in thread
From: Peter I. Hansen @ 2002-03-27  2:13 UTC (permalink / raw)


Hello

I'm new to Ada and I'm reading a book by Feldman & Koffman.
Now I see that the datatype 'Natural' is the integers {0,1,2,3,4,...}, 
and type Positive is {1,2,3,4,5,....}. I know this is all akademic, but 
why this definition.
We learn in mathematics that the natural numbers are positive integers 
not including zero..., So to me the 'Natural' way of defining these 
datatypes would be :

Natural :  {1,2,3,4,5, ... }
Positive : {0,1,2,3,4, ... }

Am I all wrong here or have I stumbled across a misprint ???

/Peter




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-27  2:13 Natural data type ? Peter I. Hansen
@ 2002-03-27  2:57 ` Chad R. Meiners
  2002-03-27 23:18   ` Peter I. Hansen
  2002-03-27 14:25 ` Marin David Condic
  2002-03-28 16:30 ` Georg Bauhaus
  2 siblings, 1 reply; 12+ messages in thread
From: Chad R. Meiners @ 2002-03-27  2:57 UTC (permalink / raw)


No misprint.  The natural numbers can be define as containing zero as well
as not containing zero.  I know a good deal of mathematicians that define N
to include zero; I also know a good deal of mathematicians that prefer N to
only include positive whole numbers (zero is neither positive nor negative).

-CRM

"Peter I. Hansen" <pih@oek.dk> wrote in message
news:3CA12AD4.2030807@oek.dk...
> Hello
>
> I'm new to Ada and I'm reading a book by Feldman & Koffman.
> Now I see that the datatype 'Natural' is the integers {0,1,2,3,4,...},
> and type Positive is {1,2,3,4,5,....}. I know this is all akademic, but
> why this definition.
> We learn in mathematics that the natural numbers are positive integers
> not including zero..., So to me the 'Natural' way of defining these
> datatypes would be :
>
> Natural :  {1,2,3,4,5, ... }
> Positive : {0,1,2,3,4, ... }
>
> Am I all wrong here or have I stumbled across a misprint ???
>
> /Peter
>





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-27  2:13 Natural data type ? Peter I. Hansen
  2002-03-27  2:57 ` Chad R. Meiners
@ 2002-03-27 14:25 ` Marin David Condic
  2002-03-28 16:45   ` Peter I. Hansen
  2002-03-28 16:30 ` Georg Bauhaus
  2 siblings, 1 reply; 12+ messages in thread
From: Marin David Condic @ 2002-03-27 14:25 UTC (permalink / raw)


I've often wondered this myself. What Ada calls "Natural" numbers are what
used to be called "Whole" numbers when I was learning The New Math. What Ada
calls "Positive" would have been called "Natural" back then too. I don't
know if this is some version of "The All New And More Improved Math" or if
it was just some mistake that got institutionalized & now we're stuck with
it.

The secret is not to take the names too seriously - just understand what
they give you and work with it...

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Peter I. Hansen" <pih@oek.dk> wrote in message
news:3CA12AD4.2030807@oek.dk...
> Hello
>
> I'm new to Ada and I'm reading a book by Feldman & Koffman.
> Now I see that the datatype 'Natural' is the integers {0,1,2,3,4,...},
> and type Positive is {1,2,3,4,5,....}. I know this is all akademic, but
> why this definition.
> We learn in mathematics that the natural numbers are positive integers
> not including zero..., So to me the 'Natural' way of defining these
> datatypes would be :
>
> Natural :  {1,2,3,4,5, ... }
> Positive : {0,1,2,3,4, ... }
>
> Am I all wrong here or have I stumbled across a misprint ???
>
> /Peter
>





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-27  2:57 ` Chad R. Meiners
@ 2002-03-27 23:18   ` Peter I. Hansen
  2002-03-28  3:55     ` Chad R. Meiners
  0 siblings, 1 reply; 12+ messages in thread
From: Peter I. Hansen @ 2002-03-27 23:18 UTC (permalink / raw)


Chad R. Meiners wrote:

>No misprint.  The natural numbers can be define as containing zero as well
>as not containing zero.  I know a good deal of mathematicians that define N
>to include zero; I also know a good deal of mathematicians that prefer N to
>only include positive whole numbers (zero is neither positive nor negative).
>
>-CRM
>
So, your answer is that someone just made a random decision ?

/Peter




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-27 23:18   ` Peter I. Hansen
@ 2002-03-28  3:55     ` Chad R. Meiners
  2002-03-28 15:40       ` Marin David Condic
  2002-03-28 16:47       ` Peter I. Hansen
  0 siblings, 2 replies; 12+ messages in thread
From: Chad R. Meiners @ 2002-03-28  3:55 UTC (permalink / raw)


I seriously doubt that someone made a random decision.  There are many
reasons to define N to include zero, for instance, the positive integers can
easily represented as Z^+ while the negative integers may be represented as
Z^-.   There is a very nice symmetry with these representations of disjoint
sets.  It doesn't make sense to define the natural numbers to simply be the
set of positive integer because you then have two competing names for the
same set.  Thus, it is better for the natural numbers (N) to be a different
set from the positive integers (Z^+).  Since zero isn't positive, this
leaves N as the only candidate for containing zero.

Very likely, whoever made this decision for Ada's data type of natural and
positive had a similar rational reason for making this choice.  I just don't
see the designers flipping a coin or playing paper, scissors, rock to
determine which data type gets zero ;)  I wasn't around during Ada's initial
design process; perhaps someone on comp.lang.ada was, and they know why or
who made this decision or even if the decision was contested.

-CRM

"Peter I. Hansen" <pih@oek.dk> wrote in message
news:3CA25342.1080906@oek.dk...
> Chad R. Meiners wrote:
>
> >No misprint.  The natural numbers can be define as containing zero as
well
> >as not containing zero.  I know a good deal of mathematicians that define
N
> >to include zero; I also know a good deal of mathematicians that prefer N
to
> >only include positive whole numbers (zero is neither positive nor
negative).
> >
> >-CRM
> >
> So, your answer is that someone just made a random decision ?
>
> /Peter
>





^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-28  3:55     ` Chad R. Meiners
@ 2002-03-28 15:40       ` Marin David Condic
  2002-03-28 16:47       ` Peter I. Hansen
  1 sibling, 0 replies; 12+ messages in thread
From: Marin David Condic @ 2002-03-28 15:40 UTC (permalink / raw)


In the end, its just a name. A rose by any other name would still give you
sets with and without zero... :-)

MDC
--
Marin David Condic
Senior Software Engineer
Pace Micro Technology Americas    www.pacemicro.com
Enabling the digital revolution
e-Mail:    marin.condic@pacemicro.com


"Chad R. Meiners" <crmeiners@hotmail.com> wrote in message
news:a7u4as$ec8$1@msunews.cl.msu.edu...
> I seriously doubt that someone made a random decision.  There are many
> reasons to define N to include zero, for instance, the positive integers
can
> easily represented as Z^+ while the negative integers may be represented
as
> Z^-.   There is a very nice symmetry with these representations of
disjoint
> sets.  It doesn't make sense to define the natural numbers to simply be
the
> set of positive integer because you then have two competing names for the
> same set.  Thus, it is better for the natural numbers (N) to be a
different
> set from the positive integers (Z^+).  Since zero isn't positive, this
> leaves N as the only candidate for containing zero.
>
> Very likely, whoever made this decision for Ada's data type of natural and
> positive had a similar rational reason for making this choice.  I just
don't
> see the designers flipping a coin or playing paper, scissors, rock to
> determine which data type gets zero ;)  I wasn't around during Ada's
initial
> design process; perhaps someone on comp.lang.ada was, and they know why or
> who made this decision or even if the decision was contested.
>






^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-27  2:13 Natural data type ? Peter I. Hansen
  2002-03-27  2:57 ` Chad R. Meiners
  2002-03-27 14:25 ` Marin David Condic
@ 2002-03-28 16:30 ` Georg Bauhaus
  2002-03-28 16:42   ` Peter I. Hansen
  2 siblings, 1 reply; 12+ messages in thread
From: Georg Bauhaus @ 2002-03-28 16:30 UTC (permalink / raw)


Peter I. Hansen <pih@oek.dk> wrote:
: We learn in mathematics that the natural numbers are positive integers 
: not including zero..., So to me the 'Natural' way of defining these 

Natural, the way it is defined, allows me to very naturally
answer the question, 'How many?'

- Georg



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-28 16:30 ` Georg Bauhaus
@ 2002-03-28 16:42   ` Peter I. Hansen
  2002-03-28 18:33     ` Darren New
  2002-03-29 16:19     ` Georg Bauhaus
  0 siblings, 2 replies; 12+ messages in thread
From: Peter I. Hansen @ 2002-03-28 16:42 UTC (permalink / raw)


Georg Bauhaus wrote:

>Peter I. Hansen <pih@oek.dk> wrote:
>: We learn in mathematics that the natural numbers are positive integers 
>: not including zero..., So to me the 'Natural' way of defining these 
>
>Natural, the way it is defined, allows me to very naturally
>answer the question, 'How many?'
>
>- Georg
>
No, this is a misunderstanding. The natural numbers are defined to be 
the numbers you can count to. You can count to 1, you can count to 2, 
you can count to 3, ... and so forth. You cannot count to Zero.

The question 'How many?' is the reason for defining other numbers than 
natural.
'Q: How many apples did you eat ? A: 2 and a half (=2.5 a rational number)'.

/Peter




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-27 14:25 ` Marin David Condic
@ 2002-03-28 16:45   ` Peter I. Hansen
  0 siblings, 0 replies; 12+ messages in thread
From: Peter I. Hansen @ 2002-03-28 16:45 UTC (permalink / raw)


Marin David Condic wrote:

>I've often wondered this myself. What Ada calls "Natural" numbers are what
>used to be called "Whole" numbers when I was learning The New Math. What Ada
>calls "Positive" would have been called "Natural" back then too. I don't
>know if this is some version of "The All New And More Improved Math" or if
>it was just some mistake that got institutionalized & now we're stuck with
>it.
>
>The secret is not to take the names too seriously - just understand what
>they give you and work with it...
>
>MDC
>
Yes, I'll just work with it. It dosn't make any difference to me. I just 
wondered :)

/Peter




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-28  3:55     ` Chad R. Meiners
  2002-03-28 15:40       ` Marin David Condic
@ 2002-03-28 16:47       ` Peter I. Hansen
  1 sibling, 0 replies; 12+ messages in thread
From: Peter I. Hansen @ 2002-03-28 16:47 UTC (permalink / raw)


Chad R. Meiners wrote:

>I seriously doubt that someone made a random decision.  There are many
>reasons to define N to include zero, for instance, the positive integers can
>easily represented as Z^+ while the negative integers may be represented as
>Z^-.   There is a very nice symmetry with these representations of disjoint
>sets.  It doesn't make sense to define the natural numbers to simply be the
>set of positive integer because you then have two competing names for the
>same set.  Thus, it is better for the natural numbers (N) to be a different
>set from the positive integers (Z^+).  Since zero isn't positive, this
>leaves N as the only candidate for containing zero.
>
>Very likely, whoever made this decision for Ada's data type of natural and
>positive had a similar rational reason for making this choice.  I just don't
>see the designers flipping a coin or playing paper, scissors, rock to
>determine which data type gets zero ;)  I wasn't around during Ada's initial
>design process; perhaps someone on comp.lang.ada was, and they know why or
>who made this decision or even if the decision was contested.
>
>-CRM
>
Thanks, this is a very good answer.

/Peter




^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-28 16:42   ` Peter I. Hansen
@ 2002-03-28 18:33     ` Darren New
  2002-03-29 16:19     ` Georg Bauhaus
  1 sibling, 0 replies; 12+ messages in thread
From: Darren New @ 2002-03-28 18:33 UTC (permalink / raw)


"Peter I. Hansen" wrote:
> No, this is a misunderstanding. The natural numbers are defined to be
> the numbers you can count to. You can count to 1, you can count to 2,
> you can count to 3, ... and so forth. You cannot count to Zero.

Well, when I was in grade school, we had Whole Numbers (0, 1, 2, ...)
and Counting Numbers (1, 2, 3, ...). But we were all smart enough to get
over such an artificial distinction within a couple of days, when
negative integers came into the picture, along with the number line. ;-)

-- 
Darren New 
San Diego, CA, USA (PST). Cryptokeys on demand.
      Remember, drive defensively if you drink.



^ permalink raw reply	[flat|nested] 12+ messages in thread

* Re: Natural data type ?
  2002-03-28 16:42   ` Peter I. Hansen
  2002-03-28 18:33     ` Darren New
@ 2002-03-29 16:19     ` Georg Bauhaus
  1 sibling, 0 replies; 12+ messages in thread
From: Georg Bauhaus @ 2002-03-29 16:19 UTC (permalink / raw)


Peter I. Hansen <pih@oek.dk> wrote:

: No, this is a misunderstanding. The natural numbers are defined to be 
: the numbers you can count to.

There exists a book, the author of which has defined the
natural numbers such that "You can count to 1, you can count to 2, 
: you can count to 3, ... and so forth." (Does there exist
a book on theretical computer science that defines N without 0?)

: You cannot count to Zero.
How many coins will this ticket vending machine throw out?
How do you answer that questions with N = {1,2,...}?

If you read characters into storage from some input
you count how many have arrived. There might be zero.
I like this very natural idea.

What is the neutral element when you want to do the very natural
thing of adding natural numbers? (O.K., that leads nowhere. But
you see an advantage, do you?)

OTOH, positive has a meaning outside mathematics.  And even if
you do not refer to Latin, take medicine.
A test may be positive, because there was at least one thing
that makes the doctors say so.

: 
: The question 'How many?' is the reason for defining other numbers than 
: natural.
: 'Q: How many apples did you eat ? A: 2 and a half (=2.5 a rational number)'.

That is dealt with by computers by introducing half-apples :-)

- Georg



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2002-03-29 16:19 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-03-27  2:13 Natural data type ? Peter I. Hansen
2002-03-27  2:57 ` Chad R. Meiners
2002-03-27 23:18   ` Peter I. Hansen
2002-03-28  3:55     ` Chad R. Meiners
2002-03-28 15:40       ` Marin David Condic
2002-03-28 16:47       ` Peter I. Hansen
2002-03-27 14:25 ` Marin David Condic
2002-03-28 16:45   ` Peter I. Hansen
2002-03-28 16:30 ` Georg Bauhaus
2002-03-28 16:42   ` Peter I. Hansen
2002-03-28 18:33     ` Darren New
2002-03-29 16:19     ` Georg Bauhaus

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox