Re: Ordering in \bbold{C}

2010-03-29 Thread Darren Duncan

Leon Timmermans wrote:

Maybe it's just me, but I don't see the value of having some
*arbitrary* predefined order for complex numbers. If people really
want to order their complex numbers, let them do it themselves in
whatever way they want.
Leon


I agree actually that Complex shouldn't have a predefined order.  I just raised 
my algorithm since someone else raised another one. -- Darren Duncan




Re: Ordering in \bbold{C}

2010-03-29 Thread James Cloos
> "M" == Minimiscience   writes:

M> Assuming that the last line should be "A ≥ B if a₁ > b₁ ...",

Indeed, yes.  Is there a worse off-by-one typo than '<' vs '>'?

M> this is called lexicographic ordering,

Oh.  Yes.  Of course.  Obviosuly.  I should have noticed that and do not
know why I missed it.  [SIGH].  I guess I must think of lex ordering
mostly when thinking of /real/ polynomials  How narrow-minded. ☺

M> Specifically, because -1 is a square in ℂ, ℂ being an ordered field
M> would require that -1 > 0, which leads to a contradiction.

-JimC
-- 
James Cloos  OpenPGP: 1024D/ED7DAEA6


Re: Ordering in \bbold{C}

2010-03-29 Thread Leon Timmermans
Maybe it's just me, but I don't see the value of having some
*arbitrary* predefined order for complex numbers. If people really
want to order their complex numbers, let them do it themselves in
whatever way they want.

Leon

On Mon, Mar 29, 2010 at 6:10 AM, Darren Duncan  wrote:
> I was actually thinking, during the previous thread involving Complex
> numbers ...
>
> It may not have any practical use, but if one wanted to define an ordering
> for complex numbers that was deterministic and relatively unbiased, a way to
> do this would be based on what I'll call for now the "spiral distance".
>
> Conceptually, you take an infinite length spiral line that starts at and is
> centered on the origin, where for each turn the current spot on the spiral
> increases an infinitesimal radius from the origin, or a distance approaching
> zero, in the calculus sense.  Complex numbers closer to the origin on the
> spiral will be ordered earlier than those further from the spiral.
>
> Actually calculating this is a simple comparison of the radius and angle
> components of the two complex numbers in the polar coordinate system.  If
> the radius value is different, then the one with the smaller radius is
> ordered before the one with the larger; if the two radius values are the
> same, then the one with the smaller angle is ordered first; if both are the
> same, then the two complex numbers are equal.
>
> The math is just as simple as a naive comparison that just compares the real
> component and then imaginary component in a cartesian coordinate system, but
> the result is much more reasonable I think.
>
> This whole principle of "distance from origin" method of ordering does also,
> I suspect, scale to any number of dimensions; the one-dimensional version is
> simply comparing first the absolute value of the two numbers, and then
> saying that either the positive or negative version orders first.
>
> -- Darren Duncan
>


Re: Ordering in \bbold{C}

2010-03-28 Thread Darren Duncan

I was actually thinking, during the previous thread involving Complex numbers 
...

It may not have any practical use, but if one wanted to define an ordering for 
complex numbers that was deterministic and relatively unbiased, a way to do this 
would be based on what I'll call for now the "spiral distance".


Conceptually, you take an infinite length spiral line that starts at and is 
centered on the origin, where for each turn the current spot on the spiral 
increases an infinitesimal radius from the origin, or a distance approaching 
zero, in the calculus sense.  Complex numbers closer to the origin on the spiral 
will be ordered earlier than those further from the spiral.


Actually calculating this is a simple comparison of the radius and angle 
components of the two complex numbers in the polar coordinate system.  If the 
radius value is different, then the one with the smaller radius is ordered 
before the one with the larger; if the two radius values are the same, then the 
one with the smaller angle is ordered first; if both are the same, then the two 
complex numbers are equal.


The math is just as simple as a naive comparison that just compares the real 
component and then imaginary component in a cartesian coordinate system, but the 
result is much more reasonable I think.


This whole principle of "distance from origin" method of ordering does also, I 
suspect, scale to any number of dimensions; the one-dimensional version is 
simply comparing first the absolute value of the two numbers, and then saying 
that either the positive or negative version orders first.


-- Darren Duncan


Re: Ordering in \bbold{C}

2010-03-28 Thread Minimiscience

On Mar 28, 2010, at 3:09 PM, James Cloos wrote:

| Given A = a₁ + i·a₂ and B = b₁ + i·b₂, then:
|
|  A ≤ B if a₁ < b₁ || ( a₁ == b₁ && a₂ ≤ b₂ )
|  A ≥ B if a₁ < b₁ || ( a₁ == b₁ && a₂ ≥ b₂ )


Assuming that the last line should be "A ≥ B if a₁ > b₁ ...",  
this is called lexicographic ordering, and it's nothing new,  
especially not for complex numbers.  (Someone might even have  
suggested ordering Complexes this way in the original discussion, but  
I can't find it right now.)  The problem with this ordering and all  
other orderings of the complex plane is that it is impossible to make  
ℂ into an ordered field[1] that has all of the properties that we  
have come to expect from ordering the real numbers.  Specifically,  
because -1 is a square in ℂ, ℂ being an ordered field would require  
that -1 > 0, which leads to a contradiction.  I can give you a  
complete proof of this if you like.


-- Minimiscience

[1]