Re: Simplify formula for iterative programming
- From: alfps@xxxxxxxx (Alf P. Steinbach)
- Date: Fri, 03 Jun 2005 15:09:41 GMT
* stefaan.lhermitte@xxxxxxxxxxxxxxxxxx:
>
> I am looking for the simplification of a formula to improve the
> calculation speed of my program. Therefore I want to simplify the
> following formula:
>
> H =3D Si (Sj ( sqrt [ (Ai - Aj)=B2 + (Bi - Bj)=B2 ] ) )
I'm just guessing here, but possibly the above means
H = Si[ Sj[ sqrt( (Ai-Aj)^2 + (Bi-Bj)^2 ) ] ] for i, j in 1...n
> n is not fixed, but it changes with every run for my program. Therefore
> for I am looking for a simplication of H in order to calculate it when
> my A and B get extendend by 1 element (n =3D n + 1).
let n' = n + 1
H' = H + Si[ sqrt( (Ai-An')^2 + (Bi-Bn')^2 ) ]
where H'-H is the sum of distances in the plane from the point
(a,b) = (An',Bn').
The question is then how this sum of distances varies as (a,b) is
varied: can the formula be reduced to involve just a few numbers?
I imagine n points spread out on a line, and the point (a, b) moving
on a parallell line. I hypothesize that the sum of distances then has
n minima. Which, if true, means that the formula requires on the order
of n numbers, except if special relationships between the points'
coordinates (e.g., constant spacing between the points) allows some
simplification -- which I gather is not the case here.
So, most probably, sorry: I don't think you can reduce that to a constant
time computation.
--
A: Because it messes up the order in which people normally read text.
Q: Why is it such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
.
- References:
- Simplify formula for iterative programming
- From: stefaan . lhermitte
- Simplify formula for iterative programming
- Prev by Date: Re: Simplify formula for iterative programming
- Next by Date: Re: Simplify formula for iterative programming
- Previous by thread: Re: Simplify formula for iterative programming
- Next by thread: Re: Simplify formula for iterative programming
- Index(es):
Relevant Pages
|