Message Boards Message Boards

GROUPS:

How to specify expressions and assumptions that contain summations?

Posted 2 months ago
539 Views
|
8 Replies
|
7 Total Likes
|

HI, I'd like to simplify (or prove) some symbolic expressions that include summations. I've gotten close, but no cigar. How is this done?

8 Replies

Richard, to get rid of the error message you should use Indexed instead of Part:

postulate = Sum[Abs[Indexed[x, {i}] - Indexed[y, {i}]], {i, 1, p}]/Sum[Max[Indexed[x, {i}], Indexed[y, {i}]], {i, 1, p}] == 
 1 - Sum[Min[Indexed[x, {i}], Indexed[y, {i}]], {i, 1, p}]/(Sum[Indexed[x, {i}], {i, 1, p}] + 
    Sum[Indexed[y, {i}], {i, 1, p}] - Sum[Min[Indexed[x, {i}], Indexed[y, {i}]], {i, 1, p}])

But I do not know how to prove this remarkable formula, unfortunately. Empirical checks always evaluate to True, e.g.:

dim = 50;
postulate /. {p -> dim, x -> RandomInteger[{-5, 5}, dim], y -> RandomInteger[{-5, 5}, dim]}

... well, not very helpful, I know!

Henrik, thank you. I'll give it a try later on today CA time. I've set up an alternate kernel for long computations ... we'll see what happens.

Also thank you for your example demonstrating substitution of values in formulas. I'd forgotten about that and it will come in handy, I'm sure.

Anonymous User
Anonymous User
Posted 2 months ago

I think I see what you are getting at and it is interesting use. However my intuition is that proving the below is the same as proving one term of the sums above. Therefore I suggest to prove in two steps. One step such as the below, and another step to prove that any step is not unique.

In:     Abs[x - y]/Max[x, y] + Min[x, y]/(x + y - Min[x, y]) // FullSimplify
Out:    1

I'm not familiar with a way to move your statement as x[[i]] (a random sequence of Z) and for Simplify[] to apply rules to it within a Sum[]. I feel the statistical library could do it. I believe it can be proven by Probability as "the sum of two complementary events equals 1", that is, P(E) + P(E') = 1, where each P is N(E)/N(S) in which E is the count of simple events and S is the total subspace.

POSTED BY: Anonymous User
Answer

The origin of this postulate is an empirical analysis of 2+ dozen distance metrics on a large sample of data. I was looking for common subsequences among the 400 combinations and was very surprised to find two equivalent whole sequences. There are algebraists who solve this sort of thing on the back of a napkin but I'm not one of them, so I thought to give Mathematica a try.

Ok, here - I guess/hope - comes a proof. If this turns out to be correct and useful, then all credits have to be given to John Hendrickson, because his remark gave me the crucial hint.

The postulate looks like this:

enter image description here

Using Johns relation we can rewrite the denominator of right hand side to

$$x+y-\text{Min}(x,y) = \frac{\text{Min}(x,y) \text{Max}(x,y)}{\text{Max}(x,y)-\text{Abs}(x-y)}$$

and here the right hand side simplifies to $\text{Max}(x,y)$:

FullSimplify[(Min[x, y] Max[x, y]/(Max[x, y] - Abs[x - y])) == 
  Max[x, y], {x, y} \[Element] Reals]

so now the postulate looks like so:

enter image description here

and what is left to do is simply to show that

FullSimplify[Max[x, y] - Min[x, y] == Abs[x - y], {x, y} \[Element] Reals]

which evaluates to True.

Richard - please - did I give not a valid general proof?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract