Notes¶
Intervals¶
Although an interval is usually represented using two variables, such as \(I = (a, b]\), in reality, four variables are required to define an interval, namely representing the left endpoint, the right endpoint, the left openness/closedness, and the right openness/closedness.
That is, an interval is represented by a four tuple
where \(a \leq b\).
For our purposes, we shall represent \(I_{\sigma}\) and \(J_{\xi}\) as
Here, the third and the fourth coordinates represent whether the endpoints are included or not. For example,
will represent a half open interval \(I = (a, b]\) in the usual notation.
For convenience, we will be mixing different notations going forward, but there should be no confusion as to which type of notation is being used as the number of arguments are different.
Indicator function¶
Given set \(A \subseteq \mathbb{R}\), we have
Note that the relation between \(x\) and \(e\) is not linear. So we somehow need to convert this into a set of linear relations. For now, let’s consider the cases \(A = \mathbb{R}^{+}\) and \(A = I = [a, b]\).
If \(A = \mathbb{R}^{+}\), then we have
Assuming that \(e\) is binary, this assignment can be achieved by giving the constraints
This gives
Also note that if \(N\) is sufficiently large, there is effectively no upper bound for \(x\) when \(e = 1\).
Note that when \(e = 1\), the latter constraint becomes
Although this is not technically the same as \(0 < x\), if \(N\) is sufficiently large, it is practically the same.
Note
Suppose \(0 < x < \frac{1}{N}\). Then we have
as \(e = 0\) gets ruled out. This in turn implies
which is contradictory to our assumption that \(x < \frac{1}{N}\). Hence the range \((0, \frac{1}{N})\) is effectively ruled out for the possible values of \(x\).
However, it may be sometimes desirable to use a separate variable \(\varepsilon\) instead of \(\frac{1}{N}\). Then we can use the following set of constraints instead
Now, if \(A = I = [a, b]\), then this translates to
Now consider the constraints
which implies
As for
we use the constraints
where \(e^{*}\) is another independent binary variable.
Note
Let \(e = 0\). Then the constraints above become
Depending on the value of \(e^{*}\), only one of the two is effectively enforced.
Hence the full list of constraints becomes
As for bounded open intervals, or even half-open intervals, the list of constraints can be derived in a similar manner. For example, if we had \(A = I = (a, b)\), we would have obtained instead
Combining the two, let \(A = I = (a, b, c, d)\). Then the full list of constraints covering all cases becomes
However, by pairing open and closed cases, such as
we see that this can be reduced to a single constraint
Performing similar reductions on all other pairs, we get
Redacted Header¶
Content redacted.
Redacted Header¶
Content redacted.
Variable separation¶
Continuing on with a previous subsection, we want to define \(x_{1}, \dots, x_{n}\) where
with
Now, together with the constraints that were constructed in the previous subsection
consider the following additional constraints
The first one is obvious. As at most one of \(e_{k}\)’s can be nonzero, the second one enforces that also at most one of \(x_{k}\)’s is nonzero.
Note that we have
since \(\sum_{l} x_{l} = x\).
Nearest Integer Function¶
Let \(x \in \mathbb{R}\) and \([\cdot]\) be a nearest integer function. We want to express
where \(n \in \mathbb{N},\) in terms of constraints. To do this, we introduce an intermediary variable \(m \in \mathbb{N}\) and require
Then we effectively have
Now \(n\) can be redefined as
For this, we introduce a yet another conditional binary variable \(e\) where
We can now simply define \(n\) as
In simple terms, we round up \(x\) if \(e = 1\) and round down if \(e = 0\). Putting everything together, we have
Simpler Nearest Integer Function¶
Note that, from
we can use
as our constraints to eliminate the necessity of an additional variable.