Re: Simplify formula for iterative programming



* 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?
.



Relevant Pages

  • Re: Simplifying
    ... And arbitrarily large expressions can be multiplied, ... in simplification you are preferring a sum of basic ... Save other multiples for the end, ...
    (sci.math)
  • Re: Simplify infinite series with Sines???
    ... galathaea wrote: ... if you are looking at finite or infinite products ... Depending, of course, on your definition of "simplification." ... into a sum of 512 terms. ...
    (sci.math)
  • Re: Q - binomial theorem and complex numbers
    ... I knew that (I understand the binomial theorem and De Moivre's :-)), ... n/2 is a neat expression for the sum of x from 1 to n? ... is there a simplification of the summation I gave (or some ... There's the simple linear algorithm ^n = ...
    (sci.math)
  • Re: Simplification of complex expression
    ... >there exist a formula for simplification of this expression? ... which I'll do for now defining that Sqrt[] is ... If the sum of the two arguments of the factors on the ...
    (sci.math)