1

I am having trouble simplifying a summation I created. Let $S$ and $b_1$ be positive integers and the only given values. If you want to work out an example, have $S=5$ and $b_1 \geq 6$. Let $l(b_i, b_{i+1})$ be a function that outputs a positive integer.

$$\sum_{b_2=S}^{b_1-1} \left[l(b_1, b_2) \times \sum_{b_3=S-1}^{b_2-1} \left(l(b_2, b_3) \times \sum_{b_4=S-2}^{b_3-1} \left(l(b_3, b_4) \times \sum_{b_5=S-3}^{b_4-1} l(b_4, b_5) \right) \right)\right]$$

The problem is that the values in the index of one summation is necessary for the index of the next summation. It's similar to $\sum_{i=1}^{5}cx$, but $c$ is a summation instead of a given constant. Not only that, but I'm not completely sure it could be simplified, shown in the apparent inability to simplify $\sum f(x)g(x)$ (Sigma Notation, Multiplication). I looked at a few resources, like Rules of Double Sums and another question that listed many properties that I am having trouble finding again, but they offered little guidance.

I wrote out an example for $b_1=7$ to find another interpretation, yet this did not help at all. I thought about $$\prod_{i=1}^{S-1}\left[\sum_{b_{i+1}=S+1-i}^{b_i-1}l(b_i,b_{i+1})\right]$$ but that simplifies to $$\sum_{b_2=S}^{b_1-1} l(b_1,b_2) \times \sum_{b_3=S-1}^{b_2-1}l(b_2,b_3) \times\sum_{b_4=S-2}^{b_3-1}l(b_3,b_4)\times \sum_{b_5=S-3}^{b_4-1}l(b_4,b_5)$$ which is close, but not quite. Each summation must finish before going to the next summation, which I do not want. For $i=2$, the upper bound would be $b_2-1=b_1-2$, as the upper bound for $\sum_{b_2=S}^{b_1-1}$ is $b_2=b_1-1$. The summation runs only once when it needs to run multiple times. What can put me on the right track?

P.S.: I am excluding some information regarding the sums for conciseness. I do not think they subtract much from the fundamental issue.

EDIT (1): It turns out that this more complicated than I thought. I will consider changing my notation to what Matt Groff has, but not now. Some context about the problem. There is a video game called "Super Auto Pets" that's available on Steam for free. I thought it would be a fun and easy problem to count the number of ways your roster of pets can defeat an enemy's roster. My equation stated at the top is only part of one term (five in total) that counts the rosters we can win against when you have one pet, not considering pet abilities. You can have a maximum of five pets, so this is the beginning.

I began my adventure on January 2, 2022, at 12:50 pm (I date and time everything). From January 10 onward, I've been working exclusively on this. Yes, it took me a month to find the top equation. Now, more information.

The "function" $l(b_i, b_{i+1})$ is actually the sequence (source: Notation for sequences) $$l(b_i, b_{i+1}) = \left< \frac{b_i-b_{i+1}}{c_i} \in \mathbb{Z}: b_{i+1} \in [S+1-i, b_i-1], c_i \in [1, 50]\right>.$$ When creating a sequence, you choose only one $b_{i+1}$ and then concatenate all the integers $c_i$. For example, if $b_1=7$, the sequence becomes

$$l(7, b_{2}) = \left< \frac{7-b_{2}}{c_i} \in \mathbb{Z}: b_{2} \in [5, 6], c_i \in [1, 50]\right>.$$

It generates the following sequences:

$$l(7, 5) = \left< \frac{2}{c_1} \in \mathbb{Z}: b_{2}=5, c_1 \in [1, 50]\right>$$ $$l(7, 6) = \left< \frac{1}{c_1} \in \mathbb{Z}: b_{2}=6, c_1 \in [1, 50]\right>.$$

Writing out the sequences ($\phi$ is the empty set):

$$l(7, 5) = \left< \{2\}_{c_1=1}, \{1\}_{2}, \phi_{3}, \phi_{4}, \dotso, \phi_{50} \right>$$ $$l(7, 6) = \left< \{1\}_{c_1=1}, \phi_{2}, \phi_{3}, \phi_{4}, \dotso, \phi_{50} \right>.$$

Also, I'm not summing up the terms of the sequence. Rather, I'm summing the length (cardinality?) after the following operation:

$$|l(b_i, b_{i+1})-\left< \phi_{1}, \phi_{2}, \phi_{3}, \dotso, \phi_{50}\right>|.$$

When I'm subtracting, I mean the set difference, of a sort. Compare the $c_1$'th term of $l(b_1,b_2)$ and $\{\phi_{c_1}\}_{c_1=1}^{50}$. Then say "From the sequences $A$ and $B$, include the elements of $A$ that are not in $B$ at position $c_1$". So $\phi_{5}-\phi_{5}$ does not equal any mathematical object besides $\phi_{5}-\phi_{5}$, even $0$, $\phi$ and possibly $\phi_{6}-\phi_{6}$. It's like trying to simplify the number $0$. In fact, it destroys anything in that position, including the position itself. It's not mathematically accurate, but it's what I have. I'm trying to remove any instance of $\phi$. Continuing from my example,

$$|\left< \{2\}_{c_1=1}, \{1\}_{2}, \phi_{3}, \phi_{4}, \dotso, \phi_{50} \right>-\{\phi_{c_1}\}_{c_1=1}^{50}| = |\left< \{2\}_{c_1=1}, \{1\}_{2} \right>| = 2$$ $$|\left< \{1\}_{c_1=1}, \phi_{2}, \phi_{3}, \phi_{4}, \dotso, \phi_{50} \right>-\{\phi_{c_1}\}_{c_1=1}^{50}| = |\left< \{1\}_{1} \right>| = 1.$$

Observe that the result is always an integer. This is what I meant when I said, "Let $l(b_i, b_{i+1})$ be a function that outputs a positive integer." Hopefully this answers Matt Groff's question about the type of "function". I'm also worried about how I should finish my project, as I start college on Monday, January 31. I probably need six months, at least.

P.S.: Should I add the combinatorics tag?

  • Welcome to Math.StackExchange! You have an interesting sum. One thing you could try, if possible, is to try to put your sums $l(b_{n-1}, b_n)$ into the form $l_2(b_{n-1}, b_n + 1) - l_2(b_{n-1}, b_n)$. This is called the difference delta, and when you sum it, it gives you $l_2(b_{n-1}, b_n)$. If you are familiar with calculus, it's like integrating the derivative of a function. Anyways, you seem like you've invested some time into this, so you may want to look for "difference equations" texts (not differential equations). They cover summations in detail. – Matt Groff Jan 27 '22 at 04:15
  • You can find a list of functions and their "indefinite sum" at https://en.wikipedia.org/wiki/Indefinite_sum – Matt Groff Jan 27 '22 at 04:15
  • Is there any specific type of function that you want to sum over? If there is, we may be able to get you a much better summation method. – Matt Groff Jan 27 '22 at 04:41
  • @MattGroff I've updated my question to include more information. Hopefully it answers your question. – BugDoctor1 Jan 27 '22 at 19:06
  • I've included more insight, but this still does not cover the entire breadth of the problem. I'm still leaving some stuff out. Keep this in mind, and I will answer any questions. Thank you. – BugDoctor1 Jan 27 '22 at 19:18
  • So you have $l(b_i, b_{i+1}) = \left< \frac{b_i-b_{i+1}}{c_i} \in \mathbb{Z}: b_{i+1} \in [S+1-i, b_i-1], c_i \in [1, 50]\right>.$ I'm a little unsure of what things mean here. So I guess $S$ is maybe some sort of sum or something, it's not defined, and I'm a little confused about what the $c_i$ values are. Plus, you have subtraction, division, and set differences, and I'm not totally sure which is which. I think we're getting somewhere, but I'm not sure where the set differences come into play. If you do have division in your sums, things can get complicated. – Matt Groff Jan 27 '22 at 23:22
  • @MattGroff $S=5$ was defined at the very top, third sentence. $S$ actually denotes the size of an enemy roster. The $c_i$ values are the potential attack values of an enemy pet at a certain position $i$. The initial health of your pet $b_i$ is reduced to $b_{i+1}$. The values in the sequence $l(b_i, b_{i+1})$ shows how many times the enemy attacks your pet. For $l(7, 5)$ at $c_1 = 1$, the value is 2. For your pet's health to be reduced from 7 to 5 when the enemy pet has 1 attack, they must attack twice. After all, 1+1=2. Also, the enemy pet must faint after two attacks. Game: Super Auto Pets. – BugDoctor1 Jan 27 '22 at 23:44
  • The reason why it only accepts integers is because your pet's health cannot be reduced to a decimal amount and it does not make sense for the enemy pet to attack 2.5 times (for example). You have an attack $a_1$ and the enemy has health $d_i$. Since we are counting the number of rosters we can win against, when an enemy attacks twice, then it dies in two turns. Your pet always survives ($b_{S}\geq1$), though its new health value is reduced. Playing the game may help. I left out some variables in my question because I did not want to over complicate things. Turns out it's a complicated problem. – BugDoctor1 Jan 27 '22 at 23:58
  • Regarding the set difference, I'm a bit confused about the correct notation myself. I want to remove all the instances of $\phi$ in the sequence. I know that a sequence and a set are different in the sense one is ordered and repetitions are allowed while the other is not, but I do not know how set operations and sequence operations are related. This is the closest source I could find: https://math.stackexchange.com/questions/317730/correct-notation-or-operator-to-remove-elements-from-sequence. Also, I made a slight error. When I said "always survives ($b_S \geq 1$)", I meant $b_{S+1} \geq 1$. – BugDoctor1 Jan 28 '22 at 00:20
  • Some things are best described in English, not mathematical notation. Also, you may have much better luck with combinatorics. These sums look like they'll get rather ugly in a hurry. I know you spent a lot of time on them. I'm still trying to find what $c_1$ is. It looks like you sum over $b_2$ and $c_1$ in one of your examples. Did I interpret that right? Because it also looks like $c_1$ could be a constant, which would make things much easier. – Matt Groff Jan 28 '22 at 02:05
  • The variable $b_2$ is the constant for a sequence while $c_1$ is the index. The index divides the constant $b_1-b_2$ by $c_1$ for all $c_1$ in the interval $[1, 50]$. If $b_1=7, b_2=5$, then $7-5=2$. Now divide $2$ by all integers from $1$ to $50$ and each value becomes a term (element) in the sequence. So, we have $2/1, 2/2, 2/3, 2/4, 2/5, \dotso, 2/49, 2/50$. We only want answers that are integers, so we have $2, 1$, and all the other values are not integers. Regarding the notation, I only recently learned set notation in my intro to proofs class. Wanted to practice. Tag changed to combinat. – BugDoctor1 Jan 28 '22 at 16:31
  • I might be on to something from this post: https://math.stackexchange.com/questions/261676/whats-the-rule-for-solving-nested-sums. – BugDoctor1 Jan 28 '22 at 19:18
  • @MattGroff I'll talk to my professors and see if they can do anything. – BugDoctor1 Jan 29 '22 at 01:31
  • Here's one thing to consider... Do you know the floor function? It's the greatest integer less than or equal to $x$. For example, $\lfloor 5.4321 \rfloor = 5$. You seem to have something like $\quad l(b_x,b_x+1) = \displaystyle\sum_{b_{x+1} \in {{5,7}}} \left( \sum_{c=1}^{50}{ \left\lfloor \frac{ b_x + b_{x+1}}{c} \right\rfloor } \right)$. If this is what you're after, there's a very tedious way to do it with matrices, but you're probably better off trying something with probabilities. – Matt Groff Jan 29 '22 at 01:54
  • @MattGroff Funnily enough, the ceiling function is important for another sequence that I have and its pretty close to the summation for $c$. I'm still thinking about its representation because it can be represented as an $l$ sequence, though its simpler as something else. I didn't put it in the sum at the beginning of my question. About the floor function; unfortunately, the summation would overcount the number of enemy rosters we can win against by thousands. – BugDoctor1 Jan 29 '22 at 23:51
  • @MattGroff Oh my, I think I found something that may be in the right direction. I sometimes create graphs and I want to know how many points a function intersects with. I used this idea to prove $\frac{n(n+1)}{2}$, the summation formula of the integers one to $n$. Imagine a rectangle. For each row, put an integer. Convert each integer into a summation of ones. For each $1$, represent it as a dot. Place the dots on the rectangle. You have a triangle. Find the triangle's area, and the proof is done. I didn't know at the time, but these are lattice points. My summation counts the lattice points. – BugDoctor1 Jan 31 '22 at 14:09
  • Look on page two in this paper: http://ajmonline.org/Spring2007/3.pdf. It will better explain what I mean. The problem and ending formula are slightly different, but other than that, it's basically exact. – BugDoctor1 Jan 31 '22 at 14:16

1 Answers1

1

I thought that the following example may help, although there are some issues with it. For instance, you need to be able to find the difference delta, or antidifference of the function with respect to each variable.

To see why we're interested in the antidifference, let's start with the function $f(x)$, and find the antidifference:

$$\Delta_x f(x) = f(x+1) - f(x) \tag{1}$$

Now sum over the antidifference:

$$\sum_{x=a}^b{(f(x+1) - f(x))}=$$ $$(-f(a) + \color{red}{f(a+1)}) + (\color{red}{-f(a+1)} + \color{blue}{f(a+2)}) + (\color{blue}{-f(a+2)}+f(a+3)) + \dots = $$ $$-f(a) + \color{red}{(f(a+1)-f(a+1))} + \color{blue}{(f(a+2)-f(a+2))} + \dots + f(b+1)=$$ $$-f(a) + f(b+1) \tag{2}$$


Two Variables

Let's now take a function of two variables, $f(x,y)$.

We'll nest the functions related to it in two functions. Let's start by taking the antidifference of $f(x,y)$ with respect to $x$. We write this as

$$\Delta_x f(x,y) = f(x+1,y) - f(x,y) \tag{3}$$

Next, we'll take the antidifference of $\Delta_x f(x,y)$ with respect to $y$

$$\Delta_y(\Delta_x f(x,y)) = \underbrace{(f(x+1,y+1) - f(x,y+1))}_{\Delta_x f(x,y+1)} - \underbrace{(f(x+1,y) - f(x,y))}_{\Delta_x f(x,y)} \tag{4}$$

So if we take this whole function, and sum over $x$ and $y$, we get:

$$\sum_x{ \sum_y { \Delta_y(\Delta_x f(x,y)) }} = f(x,y) \tag{5}$$

Matt Groff
  • 6,117