ruby-math and "why is ** not abelian?"

V

Van Jacques

I was reading the 1st thread in the ruby-math discussion at

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-math/

(it in Japanese, but Excite has an auto translater--its interesting to
see
how it translates Japanese to English).

If anyone cares, what I got was basically this.

If + is commutative, and the successor operation to + is *, which is
also commutative;
(a*b = b*a), then why isn't a**b = b**a since ** is successor
operation to * ?

Some discussion of induction and Peano axioms, which I didn't think
through.

Van
 
P

Peter Hickman

Van said:
I was reading the 1st thread in the ruby-math discussion at

http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-math/

(it in Japanese, but Excite has an auto translater--its interesting to
see
how it translates Japanese to English).

If anyone cares, what I got was basically this.

If + is commutative, and the successor operation to + is *, which is
also commutative;
(a*b = b*a), then why isn't a**b = b**a since ** is successor
operation to * ?

Some discussion of induction and Peano axioms, which I didn't think
through.

Van
The problem is that ** is the 'raise to the power of' operator

so 2**3 = 8
but 3**2 = 9

So a**b != b**a except when a=b.

What operation did you think that ** would actually do?
 
E

Emmanuel Touzery

Van said:
If + is commutative, and the successor operation to + is *, which is
also commutative;
(a*b = b*a), then why isn't a**b = b**a since ** is successor
operation to * ?

Some discussion of induction and Peano axioms, which I didn't think
through.
this should probably be posted to ruby-math, it's really quite off-topic
here.

emmanuel
 
E

Emmanuel Touzery

Peter said:
The problem is that ** is the 'raise to the power of' operator

OK, i didn't realise the OP didn't know that (hence my initial
reaction)... that post wasn't off-topic after all :O)

sorry for the noise.

emmanuel
 
J

Josef 'Jupp' SCHUGT

Hi!

* Van Jacques:
If + is commutative, and the successor operation to + is *, which
is also commutative;
(a*b = b*a), then why isn't a**b = b**a since ** is successor
operation to * ?

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

Josef 'Jupp' SCHUGT
 
J

Joel VanderWerf

Josef said:
Hi!

* Van Jacques:



Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

But non-groups can be commutative.
 
V

Van Jacques

Josef 'Jupp' SCHUGT said:
Hi!

* Van Jacques:

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

Josef 'Jupp' SCHUGT

Hi Josef,

Why is " Neither (Float, +) nor (Float, *)" a group?

Is it because of limits on Float? (I just read that all numbers in
ruby are either int or float--I have never even seen the E-n, as
1.0E5, notation in ruby, though Float(nul) = 0.0.) Are you speaking of
the inability to rep very large and small floats, (machines are not
infinite), and/or round off error here?

Mathematically, (though Z != ruby Integers, or any machine integers)

(Z,+) and (R,+) and (Q,+) are groups, though
(Z,*) is not, because of no division, which is what leads to Q, so
that
(Q,*) is a group, and of course (R,*).

[a bunch of nonsense about iterated + and * deleted, as it made no
sense]
---------
But _why_ is 3*2 = 2 + 2 + 2 = 2*3 = 3 + 3 ?

Is it because a + b = b + a that x*y = y*x?

I don't see it, and its starting to make my head hurt.

I must admit I haven't thought about this and don't really have any
insight into it--maybe its just the properties of numbers--just the
way things are.

Van
 
V

Van Jacques

BTW, I found that my link to the ruby-math site did not work for me. But

http://blade.nagaokaut.ac.jp/ruby/

does work (for me).

Its the 1st thread in ruby-math. Japanese intimidates me as it
is so unfamiliar to a westerner. I wish I had been taught something
about the east in school, I feel that easterners find out more about
the west than vice versa.

Sorry, I am rambling.

Van
 
T

Tim Sutherland

Josef 'Jupp' SCHUGT said:
Hi!

* Van Jacques:

Neither (Float, +) nor (Float, *) is a group. A non-group cannot be
an Abelian group.

Josef 'Jupp' SCHUGT

Hi Josef,

Why is " Neither (Float, +) nor (Float, *)" a group?

Is it because of limits on Float? (I just read that all numbers in
ruby are either int or float--I have never even seen the E-n, as
1.0E5, notation in ruby, though Float(nul) = 0.0.) Are you speaking of
the inability to rep very large and small floats, (machines are not
infinite), and/or round off error here?

Mathematically, (though Z != ruby Integers, or any machine integers) [...]
(Z,+) and (R,+) and (Q,+) are groups, though
(Z,*) is not, because of no division, which is what leads to Q, so
that
(Q,*) is a group, and of course (R,*).
[...]

(Q, *) and (R, *) are not groups since the `0' element has no (multiplicative)
inverse.

(Q, +, *) and (R, +, *) are rings though.
[a bunch of nonsense about iterated + and * deleted, as it made no
sense]

No. We can have "non-commmutative rings" where x*y!=y*x for some x,y.
(Z, +, *) happens to be a "commutative ring".

See http://planetmath.org/encyclopedia/CommutativeRing.html
I don't see it, and its starting to make my head hurt.

I must admit I haven't thought about this and don't really have any
insight into it--maybe its just the properties of numbers--just the
way things are.
[...]

NB: Sorry everyone for off-topic comments. I will try not to post in this
thread again ;)

Van Jacques and others, http://math.wolfram.com/ and http://planetmath.org/
are useful.
 
J

Josef 'Jupp' SCHUGT

Hi!

* Van Jacques:
Why is " Neither (Float, +) nor (Float, *)" a group?

The associative law is violated. Using machine numbers

(a + b) + c = a + (b + c)

does not hold for all machine numbers a, b, c. Proof is by
counterexample.

Simply Assume a = 1.0 and b, c = 0.6 * eps where eps is the smallest
number that added to 1.0 results in something different from 1.0.

(a + b) results in 1.0 because b is smaller than eps and so (a + b) +
c results in 1.0 as well.

(b + c) results in a number larger than eps so a + (b + c) is larger
than 1.0.

Similar holds for multiplication (it is more complicated so I only
sketch the proof): If a is a huge number and b and c are tiny numbers
the product of b and c can be zero so that a * (b * c) is zero as
well while a * b can still be a number that multiplied by c does not
result in zero.

To put it that way: The most challenging tasks in numerical
mathematics is providing an error estimate. Unfortunately it is one
of the most important as well.

It is often important to know how precisely a value is known. What
happens if one falsely assumes a precision that is not present shows
the Mars Polar Impactor.

Josef 'Jupp' SCHUGT
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,141
Messages
2,570,818
Members
47,367
Latest member
mahdiharooniir

Latest Threads

Top