let us assume that in 1 step/computation we can do either 1 sum or 1 product. i'm talking about a formula that is computationally efficient in this sense.
evaluation of X(i)^2 + Y(i)^2 for all 'i' requires 100+100 steps. evaluation of X(m)*X(n) requires about 100*99 steps. your formula would expand to about 20,000 computations.
99[sum of X(i)^2+Y(i)^2]-2[sum of {X(m)X(n) + Y(m)Y(n)}
ReplyDeletewhere i---> 1to 100,
m---> "
n----> " & m =/= n
let us assume that in 1 step/computation we can do either 1 sum or 1 product. i'm talking about a formula that is computationally efficient in this sense.
ReplyDeleteevaluation of X(i)^2 + Y(i)^2 for all 'i' requires 100+100 steps. evaluation of X(m)*X(n) requires about 100*99 steps. your formula would expand to about 20,000 computations.
101(sum of x2)+101(sum of y2)-2(sum of x)2-2(sum of y)2
ReplyDeleteafsdsdf
ReplyDeletewe don't have a correct answer yet.
ReplyDelete99*[summation(Xi^2+Yi^2)]
ReplyDeletedouble sum j=1 to 100 i=1 to 100 [ (xi -xj)^2 + (yi-yj)^2 ]
ReplyDeleteNice one Bhaiya!
ReplyDeletebhaiya
ReplyDeleteur soln isn't giving correct ans
maybe it shud be -200[summation Xi] & Yi
pls see
sorry..
ReplyDeleteanswer is:
100*(summation Xi^2)-(summation Xi)^2
+100*(summation Yi^2)-(summation Yi)^2.
yup a nice one i just did a very silly mistake
ReplyDelete