Computing Distances: Evaluating Sums in Polynomials

  • Thread starter drago
  • Start date
  • Tags
    Computing
In summary, The conversation discusses a problem involving the evaluation of sums of polynomial values at different points. The question is whether or not these sums can be represented as a function of the previous sum, and if so, if it can be evaluated in constant time. The conversation also includes clarifications on the indices used in the problem and the time complexity of computing the sums.
  • #1
drago
6
0
Hi,
I would appreciate if you could point me some resources that you have seen and think could be related to the following problem:

Given are the values of two polynomials Y(x) and Q(x) in n consecutive points (x0, x1,…, xn-1): (y0, y1,…,yn-1) and (q0, q1,…,qn-1) respectively.
We would like to evaluate the following sums:

S0 = (y0 – q0)^2 + (y1 – q1)^2 + …. + (yn-1 – qn-1)^2
S1 = (y0 – q1)^2 + (y1 – q2)^2 + …. + (yn-2 – qn-1)^2
S2 = (y0 – q2)^2 + (y1 – q3)^2 + …. + (yn-3 – qn-1)^2
….
Sn-1 = (y0 – qn-1)^2

Now, the question is, can I represent Sk as function of Sk-1? The point is, that I can evaluate Sk from the above representation, but this would have linear time complexity O(n), and there should be some way for this to be done in constant time, once we know S0 through Sk-1.

Thank you

drago
 
Physics news on Phys.org
  • #2
are you sure your indices are correct on the last terms of your expressions, Sj?
 
  • #3
Yes, they are. That is as if we shift right the y segment one point at a time and compute the sum of the distances between the new segments leaving out the leftmost point of q and rigthmost point of y:

for S0 : (q0, q1, ..., qn-1)
(y0, y1, ..., yn-1)

for S1: (q0, q1,..., qn-1)
(y0, y1,..., yn-2, yn-1) //y shifted right
...
for Sn-1: (q0, q1,..., qn-1)
(y0, ..., yn-1)

Well, the more I think about this, the more it seems to me that computing all of the sums cannot be done in less than O(n^2) time.

Thank you anyway!

drago
 
  • #4
Sorry, the example should be like that:

for S1:
(q1, ..., qn-1)
(y0,..., yn-2) //y shifted rigth and compared with the remaining of q

...
for Sn-1:
(qn-1)
(y0) //y after the n-1st shift

drago
 

1. What is the purpose of computing distances in polynomials?

Computing distances in polynomials is used to evaluate the sum of the distances between the coefficients in a polynomial equation. This can help in determining the overall magnitude or magnitude change in the polynomial, which is useful in analyzing and solving mathematical problems.

2. How do you calculate the distance between coefficients in a polynomial equation?

The distance between coefficients in a polynomial equation is calculated by finding the difference between the coefficients and then taking the absolute value of that difference. This can be done for each set of coefficients in the equation and then added together to get the overall sum of distances.

3. Can computing distances in polynomials be done for any degree of polynomials?

Yes, computing distances in polynomials can be done for polynomials of any degree. The process remains the same regardless of the degree of the polynomial, as long as the coefficients are known.

4. How is computing distances in polynomials helpful in solving equations?

Computing distances in polynomials can help in solving equations by providing information about the magnitude and magnitude change in the equation. This can give insights into the behavior of the equation and help in finding solutions or identifying patterns.

5. Are there any tools or software available for computing distances in polynomials?

Yes, there are many tools and software available for computing distances in polynomials. Some popular examples include Wolfram Alpha, GeoGebra, and Microsoft Excel. These tools can help in simplifying the process and providing accurate results.

Similar threads

Replies
2
Views
597
  • Linear and Abstract Algebra
Replies
1
Views
2K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
Replies
5
Views
1K
  • Calculus and Beyond Homework Help
Replies
3
Views
401
  • Introductory Physics Homework Help
Replies
1
Views
2K
  • Programming and Computer Science
Replies
2
Views
1K
  • Engineering and Comp Sci Homework Help
Replies
6
Views
1K
  • Calculus and Beyond Homework Help
Replies
12
Views
2K
Replies
1
Views
2K
Back
Top