Subject: Declarations - how to compare two equations?
From: Richard Fateman
Date: Sun, 22 Jan 2012 11:56:54 -0800
On 1/22/2012 11:22 AM, Gerd Kortemeyer wrote:
....
> . Is there any better way to compare two equations (that LON-CAPA does
> not "know" the first thing about) inside MAXIMA, and if not, how could
> I begin to address the issue? Thanks! - Gerd.
say that you want to tell if A=B and C=D express the same truth.
let e1 = A-B and e2= C-D.
let X=[x1,x2,...,xn] be the set of variables that occur in e1 and e2.
Choose n random floating point numbers for x1, ..., xn, and evaluate e1
and e2.
If the results are the same, approximately, then you say "yes".
This can also be done with values chosen from a finite field, followed by
evaluation using modular arithmetic. This is called hash-coding of
expressions.
The results would be identical.
Details to consider:
how many times to repeat the test.
what to do with overflow, underflow, divide by zero.
how close is equal.
These ideas are not original with me, but (especially) the floating
point evaluation
has been proposed and maybe used in student test grading.