Partial derivative with respect to X when X is a subscript?

222 Views Asked by At

How do you take the derivative of a variable when that variable appears as the subset of another variable?

i.e. Would $\frac{\partial}{\partial i_1}[a_{i_1j}x_{i_1}]$ equate to $a_{i_1j}x_{i_1}$ because each $i_1$ is attached to a constant, which means you'd just get that constant?

I'm trying to work through the Set Cover Problem, using this video example.

Below I will walk through what I think I understand, please correct me if I'm wrong. This is the first time I've seen some of these concepts (and the first time I've written LaTeX).

Variables given

$ J \textrm{ a collection with 13 elements}\\ j \textrm{ is an element in collection } J\\ i \textrm{ is an element in a collection of subsets } I \textrm{ of the collection } J\\ a \textrm{ is a matrix of the collections } I \textrm{ and } J $

The model given

$\textrm{min} \quad \sum_i x_i$

$ \textrm{subject to} \\ \quad \sum\limits_{j}a_{ij}x_i \ge 1 \quad \forall i \\ \qquad x_i\in \{0,1\} \quad \forall i $

In the "min" function, I assume that $\sum_i$ is the same as $\sum\limits_{i=0}^n$ , resulting in summing the $x_i$ variables for every element i in a collection. ($x_1 + x_2 + ... + x_n$)

The first constraint formula under "subject to", has $\sum\limits_j$ which again is the same as $\sum\limits_{j=0}^n$.

In solving this problem, the Lagrangian must be used. Somewhere along the way, I get the partial derivative with respect to $i_1$, the first element in the subset collection I:

$L_{i_1}(i_1,i_2,...,\lambda) = \sum \frac{\partial}{\partial_{i_1}}[i^{x_i}] - \lambda(\sum\limits_j \frac{\partial}{\partial_{i_1}}[a_{{i_1}j}x_{i_1}]) = 0$

or expanded

$L_{i_1}(i_1,i_2,...,\lambda) = (\frac{\partial}{\partial_{i_1}}[i_1^{x_i}] + \frac{\partial}{\partial_{i_1}}[i_2^{x_i}] + ... + \frac{\partial}{\partial_{i_1}}[i_3^{x_i}]) - \lambda(\frac{\partial}{\partial_{i_1}}[a_{{i_1}j_1}x_{i_1}] + \frac{\partial}{\partial_{i_1}}[a_{{i_1}j_2}x_{i_1}] + ... + \frac{\partial}{\partial_{i_1}}[a_{{i_1}j_{13}}x_{i_1}]) = 0$

Here's where I'm stuck

all the $\frac{\partial}{\partial_{i_1}}[...]$ represents where I need to take the derivative of the variable inside the []. I need to take the derivative with respect to $i_1$, but i appears in several locations and as a subscript (or a superscript's subscript). I haven't had any luck in finding examples of how to solve this.

P.S. If anyone knows of a step-by-step example of a set cover problem being solved by hand that would be incredibly helpful in dissecting what everything means in relation to each other.