User gilead - MathOverflowmost recent 30 from http://mathoverflow.net2013-06-19T04:16:13Zhttp://mathoverflow.net/feeds/user/7851http://www.creativecommons.org/licenses/by-nc/2.5/rdfhttp://mathoverflow.net/questions/123927/avoiding-epsilon-in-mixed-integer-linear-and-quadratically-constrained-programs/123928#123928Answer by Gilead for Avoiding epsilon in mixed integer linear and quadratically constrained programsGilead2013-03-08T00:32:58Z2013-03-08T00:32:58Z<p>If you're solving this problem numerically (using floating point numbers), $x > 0$ really means $x \geq \epsilon$ where $\epsilon$ is the next representable floating-point number on the number line for the given precision, in the increasing direction.</p>
<p>If you think about it, floating point numbers are essentially a discrete approximation to real numbers, therefore strict inequalities can only be approximated. Therefore in numerical optimization, one cannot directly formulate constraints with $\gt, \lt$ or $\neq$. There is always an $\epsilon$ involved. </p>
<p>As for $\epsilon$ not being numerically nice, in theory yes. But in practice that rarely happens if one is careful to avoid catastrophic cancellations. Also in many applications $\epsilon$ is chosen to be the numerical tolerance (which is usually many orders of magnitude larger than the machine epsilon). </p>
http://mathoverflow.net/questions/104717/if-then-condition-on-mixed-linear-integer-programming/104721#104721Answer by Gilead for If then condition on mixed linear integer programmingGilead2012-08-14T20:57:52Z2012-08-14T20:57:52Z<p>Yes.</p>
<p>$a_{\text{max}} y \leq a \leq (1-y)(a_{\text{max}} - \epsilon) + a_{\text{max}}y$</p>
<p>$0 \leq b \leq b_{\text{max}} y$</p>
<p>where $y \in \{{0,1\}}$ and $\epsilon$ is a small positive real.</p>
http://mathoverflow.net/questions/76420/quadratic-problem-solving-with-absolute-value-constraint/76431#76431Answer by Gilead for Quadratic problem solving with absolute value constraintGilead2011-09-26T16:33:18Z2011-09-26T17:16:36Z<p>Well, you have a non-smooth unconstrained problem but there exists a standard reformulation of the absolute function into linear constraints.</p>
<p><code>$
\begin{align}
&\max_{x} -\frac{1}{2}x^T A x + b^T x - C \sum_{i} z_{i}\\
s.t.\quad
& z_{i} = s_{i}^{+} + s_{i}^{-}, \quad \forall i\\
& x_{i} = s_{i}^{+} - s_{i}^{-}, \quad \forall i\\
& s_{i}^{+}, s_{i}^{-} \geq 0, \quad \forall i\\
\end{align}
$</code></p>
<p>with $A \succ 0$.</p>
<p>Mind you, this formulation may not give you the correct results if you decide to add constraints on $x_{i}$; if you are constraining $x_{i}$, you may need to reformulate this into a Mixed Integer Quadratic Program (MIQP). </p>
http://mathoverflow.net/questions/52033/another-question-about-formulating-absolute-value-constraint-in-optimization-sor/52041#52041Answer by Gilead for Another question about formulating absolute value constraint in optimization (Sorry for the mistake I made in the previous posting)Gilead2011-01-14T06:37:01Z2011-01-14T17:19:22Z<p>This is really a question for <a href="http://www.or-exchange.com" rel="nofollow">http://www.or-exchange.com</a> (since the answer requires practical know-how rather than mathematical abillity). However, since linear programming questions are of some interest to some folks here, I'll make an attempt at an answer that is not completely useless.</p>
<p>There are many ways of formulating an absolute function in an LP (some bad, some good). I'm going to discuss the bad ways, in case you are tempted to use them.</p>
<p><strong>The bad ways</strong></p>
<p>You can try these approaches, but bear in mind that they are not rigorous unless the absolute function is the sole term in the objective (I believe the $l_{1}$-norm LP in compressed sensing fulfills this criterion). </p>
<p>As far as I am aware, there is no 100% reliable way of formulating an absolute function that appears in the <em>constraint set</em> in an LP if there exists a competing objective $\Phi$. </p>
<ul>
<li><p>The standard LP approach that is often used (but IMHO, is a poor method) is as follows: introduce a dummy variable $z$ (that is, $z=|C - D|$) and nonnegative slack variables $s_{0},s_{1}$. Write the LP as below:
<code>$$
\begin{align}
&\min \Phi + z\\
s.t.\;\; & z = s_{0} + s_{1}\\
& C - D = s_{0} - s_{1}\\
& s_{0} \geq 0, s_{1} \geq 0\\
& A - B = C - D\\
&A + B = z
\end{align}
$$</code>
where $\Phi$ is the original objective. In theory, this seems like it will work, but in practice, depending on how the other constraints are posed, and the "downward pressure" of $z$ with respect to $\Phi$, this might not always give you the correct answer. For instance, if $\Phi$ makes the absolute function $z$ tend toward a non-minimum value, it will depend on the weighting between $z$ and $\Phi$ to determine which term "wins".</p></li>
<li><p>A similar (but equally flawed) approach is to use the fact that $|C - D| = \max(C-D,D-C)$, and to write this:
<code>$$
\begin{align}
&\min \Phi + z\\
s.t.\;\; & z \geq D-C \\
& z \geq C-D\\
& A - B = C - D\\
&A + B = z
\end{align}
$$</code></p></li>
</ul>
<p><strong>The good ways (but your problem will no longer remain an LP)</strong></p>
<p>The only reliable way to formulate an absolute function in the constraint set is to reformulate your LP as MIP (Mixed Integer Program). </p>
<ul>
<li><p>If your solver supports indicator constraints, you can write the following:
<code>$$
\begin{align}
&\min \Phi\\
s.t.\;\;
& z \geq D - C\\
& z \geq C - D\\
& z \leq D - C\text{ or }z\leq C - D \\
& A - B = C - D\\
&A + B = z
\end{align}
$$</code>
where the "or" is handled as an indicator constraint. Most solvers will use a Big-M formulation to convert the problem into an MIP.</p></li>
<li><p>The best way is to use a mixed-integer (MIP) formulation. In order to do that, you need to know the upper bound for $C \in [0,C^{U}]$. (Since $D$ is a known, we'll assume it is constant.) If you have no idea what the upper bound is, choose an adequately large value for $C^U$, bearing in mind that very large values of $C^{U}$ can cause conditioning problems. Also, the larger the $C^{U}$, the poorer your LP-relaxation for branching will be, which in turn will adversely impact the performance of the solution process. So choose $C^{U}$ carefully. First, define an upper-bound $U$ as follows, $U = \max(D,C^{U})$. Then write the following constraints:</p></li>
</ul>
<p><code>$$
\begin{align}
&\min \Phi\\
s.t.\;\;
& 0 \leq C \leq C^{U}\\
& 0 \leq z - (C - D) \leq (2U)\delta_{1}\\
& 0 \leq z - (D - C) \leq (2U)\delta_{2}\\
& \delta_{1} + \delta_{2} = 1\\
& A - B = C - D\\
&A + B = z
\end{align}
$$</code>
where <code>$\delta_{1},\delta_{2} \in \{0,1\}$</code> (binary variables).</p>
http://mathoverflow.net/questions/46117/sampling-arbitrary-point-from-system-of-linear-inequalities/46121#46121Answer by Gilead for Sampling arbitrary point from system of linear inequalitiesGilead2010-11-15T15:55:10Z2010-11-15T15:55:10Z<p>I agree with Boris -- you want to solve an LP. If you would like to solve it numerically, just pose it like this:
<code>$$
\begin{align}
& \min 0 \\
s.t. \quad & Ax + e\leq b
\end{align}
$$</code>
where $e \in \mathbb{R}^m$ is a vector containing $\epsilon$'s, which is some numerical tolerance.</p>
http://mathoverflow.net/questions/45770/optimal-knot-placement-for-fitting-piecewise-continuous-linear-functions-to-a-nonOptimal knot placement for fitting piecewise-continuous linear functions to a nonlinear functionGilead2010-11-12T00:56:18Z2010-11-12T05:29:41Z
<p>I encountered this problem in my research and it is turning out to be a surprisingly difficult one(for me, at least). </p>
<p>Suppose we have a univariate nonlinear function $f(x)$ where $x \in [L,U]$. Our goal is to approximate this nonlinear function with $n$ piecewise-continuous linear functions $g_{i}(x)$ within the given domain. We assume that $n$ is a pre-specified number. We define each line segment as follows:
$$
g_{i}(x) = \frac{f(a_{i}) - f(a_{i-1})}{a_{i} - a_{i-1}} (x - a_{i-1}) + f(a_{i-1})\text{ for }a_{i-1} \leq x \leq a_{i}
$$
where $a_{i}$ are knot points in $[L,U]$ and $i = 1,\ldots,n$. The first and the last knot points are fixed at the boundaries, that is, $a_{0} = L, a_{n} = U$. Also, the knot points are ordered and unique: $ a_{i} > a_{i-1}$ for $i=1,\ldots,n$.</p>
<p>I want to find the optimal placements for the knot points $a_{1},\ldots,a_{n-1}$, such that the overall squared-approximation error $e$ is minimized. We can pose the objective as follows:
<code>$$
\min_{a_{1},\ldots,a_{n-1}} \left\{ e = \int_{L}^{U} [f(x) - g_{i}(x)]^2 dx \right\}
$$</code></p>
<p>This picture illustrates the problem:
<img src="http://dl.dropbox.com/u/6809582/linearfunctions.png" alt="Piecewise Linear functions"></p>
<p>The final optimization problem looks like the following (after a simple reformulation into a optimal-control-like form):
<code>$$
\begin{align*}
&\min_{a_{1},\ldots,a_{n-1}} e(U)\\
s.t.\quad & \frac{de(x)}{dx} = [f(x) - g_{i}(x)]^2, \quad e(L) = 0\\
&g_{i}(x) = \frac{f(a_{i}) - f(a_{i-1})}{a_{i} - a_{i-1}} (x - a_{i-1}) + f(a_{i-1})\text{ for }a_{i-1} \leq x \leq a_{i}\\
& a_{0} = L, a_{n} = U\\
& a_{i} \geq a_{i-1} + \epsilon,\quad i=1,\ldots,n
\end{align*}
$$</code>
This optimization problem is extremely difficult to solve numerically, owing to its nonsmoothness and nonconvexity. </p>
<p>Question: How do I solve this problem to global optimality? Can anyone provide any attacks (even partial ones)? Any simplifying properties?</p>
http://mathoverflow.net/questions/45296/one-variable-optimization-problem/45313#45313Answer by Gilead for One-Variable Optimization ProblemGilead2010-11-08T15:20:20Z2010-11-08T16:19:49Z<p>Hmm, you could rewrite it this way: (I'm going to assume that $\pi_0, \pi_1, \xi'', \mu, \lambda$ are pre-defined constants, and $\alpha,W$ are variables)</p>
<p><code>$$
\begin{align}
&\max_{W}\; \pi_{0} (1 - e^{-\mu W}) - \frac{\pi_{1}}{W}z_{1}(W)\\
s.t.\;& \frac{dz_{0}(\alpha)}{d\alpha} = 1 - e^{-\mu \alpha},\quad z_{0}(0) = 0\\
& \frac{dz_{1}(\alpha)}{d\alpha} = 1 - e^{-\lambda \alpha},\quad z_{1}(0) = 0\\
& z_{0}(W) + \epsilon \leq \xi''\\
& W \geq 0
\end{align}
$$</code>
where $z_{0},z_{1}$ are auxiliary variables and $\epsilon$ is a numerical tolerance value. This then becomes a DAE (differential-algebraic equation) optimization problem, which can be solved numerically. (though given that your decision variable is also the independent variable in the differential equations, some further bilinear transformations may be required. See <a href="http://dx.doi.org/10.1016/j.na.2005.03.066" rel="nofollow">http://dx.doi.org/10.1016/j.na.2005.03.066</a>. Some software packages do this automatically.).</p>
<p>Edit: I just realized, if indeed $\xi''$ is a constant as I have assumed, the inequality constraint can easily be converted into a bound.
<code>$$
\begin{align}
\int_{0}^{W^U} 1-e^{-\mu \alpha}\,d\alpha = \xi'' - \epsilon\\
\frac{e^{-\mu W^{U}}}{\mu} + W^{U} - \frac{1}{\mu} = \xi'' - \epsilon\\
\end{align}
$$</code>
Solve for $W^{U}$, and replace the above inequality constraints with:
$$ 0 \leq W \leq W^{U}
$$
You may be able to solve this using optimal control methods.</p>
http://mathoverflow.net/questions/44015/how-do-i-approach-optimal-control/44052#44052Answer by Gilead for How do I approach Optimal Control?Gilead2010-10-29T03:43:13Z2010-10-29T03:43:13Z<p>My field is mathematical programming, and I tend to look at optimal control as just optimization with ODEs in the constraint set; that is, it is the optimization of dynamic systems. I would start by studying some optimization theory (not LPs but NLPs) and getting an intuitive feel for the motivations behind stationarity and optimality conditions -- that will lead naturally into optimal control theory.</p>
<p>I should mention there is another facet of optimal control, related to control systems. The systems considered are discrete time (as opposed to continuous in PMP) therefore it's difference equations instead of differential equations. Examples of optimal control laws in this latter sense are Linear Quadratic Regulators (LQRs), Linear Quadratic Gaussian (LQGs), Model Predictive Control (MPC). It is this latter type of optimal control that is actually applied in industry. The Pontryagin principle, while useful for analysis, is generally intractable for real-time application to nontrivial plants.</p>
http://mathoverflow.net/questions/42820/expressions-for-the-square-of-an-integral/42869#42869Answer by Gilead for Expressions for the Square of an IntegralGilead2010-10-20T03:27:02Z2010-10-20T03:32:17Z<p>I'm not sure about simplifying, but you can easily write your objective functional in Bolza form like this:</p>
<p><code>$$
\begin{align}
&\min_{u(t) \in \Omega(t)} \, J = z(T)^2 + \int_{0}^{T} s(t)u(t)dt \\
s.t. &\frac{dz(t)}{dt} = r(t)u(t),\quad z(0) = 0
\end{align}
$$</code></p>
http://mathoverflow.net/questions/39479/kalman-filtering-1d-case/39566#39566Answer by Gilead for Kalman filtering: 1D caseGilead2010-09-22T01:05:48Z2010-09-22T01:05:48Z<p>A few remarks on your problem:</p>
<ul>
<li><p>You have to assume something for your initial variance (not covariance in this case, since it's univariate). The same applies in the multivariate case -- you have to know something about $P_{0|0}$. You do not <em>calculate</em> the initial variance.</p></li>
<li><p>If you really have no idea what to choose for your initial variance, choose a large number. This is equivalent to saying "I don't know what's going on in the system, so I'm going to be conservative and assume the worst." As the Kalman filter iterates, it will generally converge and the variance will tend to decrease.</p></li>
<li><p>Given a measurement $z_{0}$, you can do the rest (Kalman gain, prediction etc.). In fact in the linear case, it is proven that the Kalman gain can be calculated off-line (see "Separation Principle" <a href="http://en.wikipedia.org/wiki/Separation_principle" rel="nofollow">http://en.wikipedia.org/wiki/Separation_principle</a>). </p></li>
<li><p>If your filter is having trouble converging (very unlikely in this simple case), you can use something called a Re-iterative Kalman Filter (http://tinyurl.com/2fokknm). This Kalman filters iterates $n$ steps and uses the information collected to correct $x_{0}$. At $n+1$, it uses to the corrected $x_{0}$ and recursively calculates $x_{n+1}$; thereafter the Kalman filter will usually converge rapidly. </p></li>
</ul>
<p>Peter D. Joseph (a pioneer in the use of Kalman Filters in the 1960s) wrote a simple tutorial on the subject in which he gives the reader an intuitive understanding of what these filters do -- in it he motivates the subject through the derivation of a 1-D example. Unfortunately the webpage no longer exists; however I managed to find the original document in text format: <a href="http://www.humintel.com/hajek/kalman.txt" rel="nofollow">http://www.humintel.com/hajek/kalman.txt</a></p>
<p>If you're willing to reformat it into $\LaTeX$, I think you'll find the document helpful. </p>
http://mathoverflow.net/questions/36796/applications-of-math-theory-vs-practice/38396#38396Answer by Gilead for Applications of Math: Theory vs. PracticeGilead2010-09-11T07:29:25Z2010-09-11T07:29:25Z<p>My work draws on various bodies of mathematics. Here's a brief description (by no means exhaustive) of how I use math in my work:</p>
<ul>
<li><strong>Mathematical programming/optimization</strong>: Optimization is used for anything from reconciling actual data to a model's (regression), estimating unknown parameters in a system, to finding the best inputs that will extremize some functional in a dynamic system. The applications are endless. When people think mathematical programming, they think Linear Programming. But convex nonlinear programming is actually very well-established. In fact, large problems in <em>nonconvex</em> optimization are routinely solved (although modeling a nonconvex system can be quite an art). </li>
<li><strong>Real/functional analysis</strong>: useful for understanding optimization algorithms. An understanding of convex functions and sets is crucial -- they lead to global solutions (with guarantees) without solving an NP-hard problem, so we exploit convexity properties whenever possible. (Lipschitz) continuity is another important idea, subgradients etc. are important concepts in nonsmooth optimization. Real analysis is not applied directly, but a good understanding of it is required for reading convergence proofs or descriptions of optimization algorithms.</li>
<li><strong>Computational Geometry</strong>: ideas like convex hulls, Voronoi diagrams, etc. are useful in optimization. I use them to partition a problem space into convex regions, or to parametrize a space. The region bounded by convex polytopes can be represented by a set of inequality constraints that can be enforced in an optimization problem. Discrete optimization is used to optimally switch between these regions. </li>
<li><strong>ODE/DAE theory</strong>: used for modeling dynamic systems. In particular, understanding the notion of index in DAEs can help one develop models that are amenable to reliable numerical solution. </li>
<li><strong>Calculus</strong>. Differential calculus is used everywhere (e.g. model sensitivity analysis, automatic differentiation, postoptimality analysis)</li>
<li><strong>Statistics</strong>: projection methods like the Karhunen-Loewe transform (related to SVD) are used to reduce the dimensionality of large models constructed from data. They're also the only way to handled correlated/collinear data (in practice, most large datasets in the real world are correlated. The assumption of factor independence built into standard regression techniques often does not hold, so methods like multiple linear regression often have to be modified for instance into principal components regression in order for them to be usable on real world large datasets). Also, tools like time-series analysis are used to construct time series models from data. </li>
<li><strong>Linear algebra</strong>: used almost everywhere. They're the basic building blocks for working with nonlinear systems. In particular, efficient numerical solution of sparse structured matrices is crucial to the efficiency of large-scale nonlinear optimization algorithms (the bottleneck is often in the linear algebra solvers, not in the optimization algorithm itself). Tools like SVD are frequently used. </li>
<li><strong>Numerical methods</strong>: used everywhere. Understanding concepts like numerical conditioning is crucial; when modeling, one wants to end up with a system with a Jacobian that is well-conditioned with respect to inversion.</li>
<li><strong>Misc</strong>: Diophantine equations are used to derive certain control laws. Laplace transforms are used for modeling linear-time-invariant systems because they allow differential equations to be manipulated as algebraic ones. Algebraic Riccati equations are solved in the derivation of the Kalman gain. Fixed-point iteration is used to converge decomposed models. </li>
</ul>
http://mathoverflow.net/questions/38139/converting-an-ode-system-to-state-space-formulation/38197#38197Answer by Gilead for Converting an ODE system to State space formulationGilead2010-09-09T16:54:17Z2010-09-10T02:21:48Z<p>Ok, let me give this a shot:</p>
<ul>
<li>Because your system is nonlinear, I'm assuming you want the nonlinear state-space form. You can easily get the linear form by doing a Taylor series expansion on it around some equilibrium point.</li>
<li>The fact that most of the states are not measurable is not a big problem. You can estimate them using your output variables (subject to observability conditions), using an state observer such as a Kalman filter, Moving Horizon Estimator (MHE) or a Luenberger observer. Also note for a nonlinear system, only local observability can be checked.</li>
<li>Because you have conditional statements, I don't believe you'll be able to write the above as a single state-space system. You have 4 conditions, but they can be reduced to 3 disjunctions, so you'll need 3 state-space systems and a conditional switching equation that "activates" the correct state-space system depending on the values of $v$ and $y$. This is known as a hybrid (or switched) system.</li>
<li>As to the treatment of a hybrid system, perhaps you could clarify what the purpose is of getting your model into state-space form. Is it for simulation reasons? Do you need it in order to do analysis (i.e. controllability, observability)? Or do you need to do optimization? If it is the last case, you can write the logic as a disjunctive program, which will allow you generate a very efficient mixed-integer programming (MIP) problem.</li>
</ul>
<p>Anyway, this is one way of writing your state-space system:</p>
<p><code>$$
\begin{align}
\frac{dy_{i}}{dt} &= g_{i}^{m}(v_{i},y_{i}) + p_{i} c_{i} + q_{i} e_{i},\quad i=0,\ldots,N-1\\
v_{i} &= \sum_{j=0}^{N-1} a_{ij}y_{j},\quad i=0,\ldots,N-1
\end{align}
$$</code>
where <code>$p_{i},q_{i} \in \{0,1\}$</code> = coefficients, $N$ = number of states, and <code>$m \in \{1,2,3\}$</code> = modes of the system. In addition, you will need a switching function $T(m,v_{i},y_{i}) = 0$ to select the appropriate modes based on the current states of your system. This can be done programmatically through <code>IF-THEN-ELSE</code> clauses (or via integer variables in an optimization problem). </p>
<ul>
<li>For $m = 1$ (where $v_{i} < 0, y_{i} < \varepsilon$):</li>
</ul>
<p>$$g_{i}^{1}(v_{i},y_{i}) = v_{i} \left[1-\exp\left(\frac{{v_i}^2S_i}{{v_i}(\varepsilon -y_{i})^2}\right)\right]$$</p>
<ul>
<li>For $m = 2$ (where $v_{i} \leq 0, y_{i} \geq \varepsilon$):</li>
</ul>
<p>$$g_{i}^{2}(v_{i},y_{i}) = v_{i}$$</p>
<ul>
<li>For $m = 3$ (where $v_{i} > 0, y_{i} \in \mathbb{R}$):</li>
</ul>
<p>$$g_{i}^{3}(v_{i},y_{i}) = \frac{{v_i}}{1+\frac{{v_i}}{S_i}(1-\exp(-{v_i}/S_i))}$$</p>
http://mathoverflow.net/questions/36078/continuous-optimization/36089#36089Answer by Gilead for Continuous optimizationGilead2010-08-19T15:26:24Z2010-08-19T15:43:51Z<p>This is how I would develop the formulation (conceptually). </p>
<ul>
<li><p>Investment costs, $Q$:
$$Q = \sum_{i} m_{i} c_{i}$$</p></li>
<li><p>Investment returns for $i$ at time $t$: we know that the return for $i$ is $m_{i} r_{i}$ if $t \geq t_{i}$, otherwise it is 0. To model this <code>if</code> logical condition:
$$ R = \sum_{i} \delta_{i} m_{i} r_{i} $$
$$ \delta_{i} = 1, \text{ if } t \geq t_{i} $$
$$ \delta_{i} = 0, \text{ if } t < t_{i} $$
where $R$ = overall returns. In this case, $t$ and $t_{i}$ are parameters, therefore $\delta_{i}$ are parameters too, not binary variables. They can be pre-calculated for a specified $t$.</p></li>
</ul>
<hr>
<p>In summary, your problem can be represented as follows:</p>
<p>$$ \max_{m_{i}} (R - Q)$$
s.t.
$$ Q = \sum_{i} m_{i} c_{i}$$
$$ R = \sum_{i} \delta_{i} m_{i} r_{i}$$
$$ Q \leq C $$
$$ m_{i} \geq 0\quad \forall i$$</p>
<p>where $C, c_{i}, r_{i}, \delta_{i}, t, t_{i}$ are parameters.</p>
<p>So, if $m_{i} \in \mathbb{R}$, this would be a linear program. If $m_{i} \in \mathbb{N}$, this becomes a mixed-integer linear program. (Note: for tractability in the integer case, you may need to specify a reasonably small upper-bound for $m_{i}$ or use partial integer variables)</p>
<p>For $t \rightarrow \infty$ (i.e. all the investments have reached maturity), simply set all $\delta_{i} = 1$.</p>
http://mathoverflow.net/questions/34148/efficient-computation-of-ab-1-for-matrices/34156#34156Answer by Gilead for Efficient computation of AB^-1 for matricesGilead2010-08-01T21:19:45Z2010-08-01T21:35:42Z<p>What are the sizes of $\mathbf{A}$ and $\mathbf{B}$? This information is important.</p>
<p>Let me assume you mean you want the efficient <em>numerical</em> computation of the matrix $ \mathbf{A} \mathbf{B}^{-1}$.</p>
<p>The general strategy would be to do this: Let $\mathbf{J} = \mathbf{A} \mathbf{B}^{-1}$; therefore $\mathbf{J}\mathbf{B} = \mathbf{A}$. You must then rewrite this into $\mathbf{P}\mathbf{x} = \mathbf{Q}$ form (this depends on the dimensions of your matrices). </p>
<p>For instance, for $\mathbf{A} \in \mathbb{R}^{m \times n}$, $\mathbf{B} \in \mathbb{R}^{n \times n}$ and $\mathbf{J} \in \mathbb{R}^{m \times n}$, you can write a system of equations:</p>
<p>$J_{i,*} \cdot B_{*,j} = A_{i,j}$</p>
<p>(Notation: for a matrix $\mathbf{X}$, we define $X_{i,*}$ as the $i$-th row vector and $X_{*,j}$ as the $j$-th column vector, and $X_{i,j}$ as the element in the $i$-th row and $j$-th column).</p>
<p>From here, you can use a fast linear solver to solve the resulting linear equation system -- you will get a solution for the elements of $\mathbf{J}$. </p>
<p>By solving a linear system of equations and not taking the inverse directly, you're not only cutting down on the no. of operations required, you can exploit also properties like sparsity, inertia, etc. and have capabilities like pre-conditioning at your disposal.</p>
http://mathoverflow.net/questions/33242/continuous-linear-programming-estimating-a-solution/33254#33254Answer by Gilead for Continuous Linear Programming: Estimating a SolutionGilead2010-07-25T07:12:05Z2010-07-25T07:12:05Z<p>Hi again. I've been poking around, and it looks like you may be able to solve your problem as a semi-infinite program (SIP).</p>
<p>There is a solver caled nsips that handles SIPs. It accepts input in the AMPL modeling language.
<a href="http://neos.mcs.anl.gov/neos/solvers/sio:nsips/AMPL.html" rel="nofollow">http://neos.mcs.anl.gov/neos/solvers/sio:nsips/AMPL.html</a></p>
<p>In the documentation -- <a href="http://plato.la.asu.edu/ftp/sipampl.pdf" rel="nofollow">http://plato.la.asu.edu/ftp/sipampl.pdf</a> -- it says it accepts problems of this form:</p>
<p>$\min_{x\in\mathbb{R}^n} f(x)$</p>
<p>s.t. $g_{i}(x,t) \leq 0$</p>
<p>$h_{i}(x) \leq 0$</p>
<p>$h_{i}(x) = 0$</p>
<p>$\forall t \in T$.</p>
<p>However, I'm not sure if it assumes $T$ is bounded (in your case, it is not). However, even if it does, I'm sure you can define $T$ as the interval $(2,M]$ where $M$ is a very big number standing in for $\infty$.</p>
<p>Disclaimer: I've never worked with SIPs before and I have no idea how well this will work out for you. However, there is a good deal of theory behind it. SIPs are related to semi-definite programs; the latter can be solved very efficiently using interior-point methods. See <a href="http://www.stanford.edu/~boyd/papers/pdf/sip.pdf" rel="nofollow">http://www.stanford.edu/~boyd/papers/pdf/sip.pdf</a></p>
<p>Noah Stein (comment above) probably knows much much more about this. ;-)</p>
http://mathoverflow.net/questions/15147/minimizing-a-function-containing-an-integral/33134#33134Answer by Gilead for Minimizing a function containing an integralGilead2010-07-23T20:06:18Z2010-07-23T20:06:18Z<p>It looks like a mixed-integer dynamic optimization problem. Your problem can be rewritten as follows: (notice the transformation of the integral into a differential equation? It's a standard trick. Also, note that you need an initial condition for $Y$)</p>
<p>$\min_{x(t)} L(T)$</p>
<p>s.t.
$ \frac{dL(t)}{dt} = AR(t)-x(t)$, with $L(0) = 0$</p>
<p>$ \frac{dR(t)}{dt} = ax(t)R(t)Y(t) - bR(t)$, with $R(0) = R_{0}$</p>
<p>$\frac{dY(t)}{dt}=−x(t)R(t)Y(t)$, with $Y(0) = Y_{0}$</p>
<p>$x(t) = \delta(t) x_{min} + (1 - \delta(t)) x_{max}$ where $\delta(t) \in {0,1}$</p>
<p>To solve this problem numerically, simply discretize the differential equations using backward Euler (easy), or implicit Runge Kutta (harder, but more accurate). Pose this as a Mixed Integer Nonlinear Program (MINLP) and use one of these solvers to find the solution.</p>
<p>Bonmin
<a href="https://projects.coin-or.org/Bonmin" rel="nofollow">https://projects.coin-or.org/Bonmin</a></p>
<p>Couenne
<a href="https://projects.coin-or.org/Couenne" rel="nofollow">https://projects.coin-or.org/Couenne</a></p>
<p>These solvers will traverse the branch-and-bound tree more intelligently and efficiently than your method of enumerating every single case, which will grow with the no. of discretization grid points you have. (e.g. let's say you discretize over 20 points; the no. of cases you have to search is $2^{20} = 1048576$. Not nice.)</p>
<p>With a branch-and-bound|cut|reduce MINLP solver (and a bit of luck), on average you are unlikely to hit the worst case scenario where every single case is enumerated.</p>
<p>There are other ways of solving this problem -- multiple-shooting, sequential dynamic optimization, etc. In my opinion, optimal control methods (Pontryagin's maximum principle) are typically intractable on problems like this.</p>
http://mathoverflow.net/questions/29215/minimization-under-non-linear-constraints/33130#33130Answer by Gilead for Minimization under non-linear constraintsGilead2010-07-23T19:32:40Z2010-07-23T19:32:40Z<p>As I understand, your problem looks like this:</p>
<p>$\min_{x,y} \Phi=a_{1} x + a_{2}y$</p>
<p>s.t.
$f(x,y) = 0$</p>
<p>where $f(x,y)$ looks something like this: $f(x,y) = a_{3} \exp{(a_{4}x)} + a_{5} \exp{(a_{6}y)}$</p>
<p>This looks like a nonconvex NLP can be trivially solved using any NLP solver.</p>
<p>Or are you looking for a closed form solution? </p>
<p>Normally, the first thing I would try is to see if I can substitute constraints into the objective to transform the problem into an unconstrained one, but it looks like it's not possible here.</p>
<p>As mentioned above, you can write the first order optimality conditions for the above system and solve the resulting nonlinear system of equations.</p>
<p>$\nabla L(x,y,\lambda) = \nabla\Phi + \lambda \nabla f(x,y) = 0$</p>
<p>In your case, it would be:</p>
<p>$a_{1} + \lambda a_{3} a_{4} \exp{(a_{4}x)} = 0$</p>
<p>$a_{2} + \lambda a_{5} a_{6} \exp{(a_{6}x)} = 0$</p>
<p>$a_{3} \exp{(a_{4}x)} + a_{5} \exp{(a_{6}y)} = 0$</p>
<p>Solve the above system for $x,y,\lambda$. And bam! You're done.</p>
http://mathoverflow.net/questions/32533/is-all-non-convex-optimization-heuristic/33026#33026Answer by Gilead for Is all non-convex optimization heuristic?Gilead2010-07-23T00:00:22Z2010-07-23T13:35:03Z<p>Hi there, I'm coming to this from a practitioner's point of view. Your question as to whether non-convex optimization is always heuristically driven can be answered as follows:</p>
<p>No.</p>
<p>There are many gradient-based techniques for nonconvex global optimization out there that DO NOT rely on any heuristics at all. They are usually based on partitioning the solution space, and performing some sort of branch and bound search using tight convex relaxations (the tightest relaxations obtainable for nonlinear functions are McCormick relaxations). As mentioned, these algorithms have a worst case exponential complexity, but they are rigorous (non-heuristic) and are able to give you a provably global solution.</p>
<p>Global nonconvex optimization is an active area of research:
<a href="http://www.mat.univie.ac.at/~neum/glopt/techniques.html#branch" rel="nofollow">http://www.mat.univie.ac.at/~neum/glopt/techniques.html#branch</a></p>
<p>The well-known BARON software for instance, can rigorously find the global optimum of a nonlinear nonconvex problem. </p>
<p>Other software/algorithms include:</p>
<p>LaGO
<a href="https://projects.coin-or.org/LaGO" rel="nofollow">https://projects.coin-or.org/LaGO</a></p>
<p>Couenne
<a href="https://projects.coin-or.org/Couenne" rel="nofollow">https://projects.coin-or.org/Couenne</a></p>
<p>Papers that provide mathematical details for all the above solvers can be found in the open literature.</p>
<p>Practitioners in this area have come to realize that procedures for finding the global solution to a general nonconvex problem are usually NP-hard (so far no exceptions have been found). </p>
<p>A special case of this can be seen in polynomial programming, where a nonconvex polynomial optimization problem can be solved by decomposing its KKT (optimality) conditions into its Groebner basis.
<a href="http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.6266" rel="nofollow">http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.39.6266</a></p>
<p>On the surface, this looks attractive because it would seem that any nonconvex optimization problem can then be approximated as a polynomial programming problem by taking its Taylor expansion. However, the computation of Groebner bases is NP-hard.</p>
<p>I hope that gives you a few leads.</p>
http://mathoverflow.net/questions/129312/quadratic-optimization-with-parameter-in-constraintComment by GileadGilead2013-05-01T17:09:27Z2013-05-01T17:09:27Zp.s. KKT conditions are undefined for open-sets. However if $\Omega + \lambda I \succeq 0$, it would seem that the infimum is 0, attained at $r = 0$.http://mathoverflow.net/questions/129312/quadratic-optimization-with-parameter-in-constraintComment by GileadGilead2013-05-01T17:00:58Z2013-05-01T17:00:58ZIs $\Omega + \lambda I$ positive semi-definite? Are you interested in an approximate numerical solution, or a closed-form expression?http://mathoverflow.net/questions/126120/does-this-matrix-shape-have-a-nameComment by GileadGilead2013-03-31T19:28:29Z2013-03-31T19:28:29ZIt looks like a special-case of a symmetric matrix, but I'm not sure if there's a specific name for it. You might want to go through the list here: <a href="http://en.wikipedia.org/wiki/List_of_matrices" rel="nofollow">en.wikipedia.org/wiki/List_of_matrices</a>http://mathoverflow.net/questions/123677/rigorous-numerical-integrationComment by GileadGilead2013-03-10T14:26:18Z2013-03-10T14:26:18ZDoes VNODE do what you want? <a href="http://www.cas.mcmaster.ca/~nedialk/Software/VNODE/VNODE.shtml" rel="nofollow">cas.mcmaster.ca/~nedialk/Software/VNODE/…</a>
Or VSPODE?
<a href="http://www3.nd.edu/~markst/lin-stadtherr-vspode-apnum.pdf" rel="nofollow">www3.nd.edu/~markst/…</a>http://mathoverflow.net/questions/123543/what-kind-is-this-optimization-problemComment by GileadGilead2013-03-04T16:39:21Z2013-03-04T16:39:21ZIt looks like a nonlinear fractional program (<a href="http://en.wikipedia.org/wiki/Fractional_programming" rel="nofollow">en.wikipedia.org/wiki/Fractional_programming</a>). You can solve it as a general nonlinear program, but there may be specific properties you can exploit if you treat it as a fractional program.http://mathoverflow.net/questions/119226/set-up-linear-program-for-graphical-solvingComment by GileadGilead2013-01-18T00:18:12Z2013-01-18T00:18:12ZThis sounds like a homework problem. http://mathoverflow.net/questions/112027/how-to-formulate-or-statement-in-ilpComment by GileadGilead2012-11-10T21:16:12Z2012-11-10T21:16:12ZDo you mean "else"? What does "or" mean in this case? Also, try this forum: <a href="http://www.or-exchange.com/" rel="nofollow">or-exchange.com</a> for formulation questions instead of MathOverflow. http://mathoverflow.net/questions/104717/if-then-condition-on-mixed-linear-integer-programming/104721#104721Comment by GileadGilead2012-08-15T05:30:26Z2012-08-15T05:30:26ZIn general, you cannot write strict inequality constraints (< or >) in numerical math programs. The $\epsilon$ is used as an approximation, and is usually set to your solver's numerical tolerance.http://mathoverflow.net/questions/102566/solving-a-system-of-linear-inequalitiesComment by GileadGilead2012-07-18T20:45:14Z2012-07-18T20:45:14ZWhy do you want to avoid linear programming? http://mathoverflow.net/questions/102454/optimization-of-a-separable-functionComment by GileadGilead2012-07-17T21:31:28Z2012-07-17T21:31:28ZYou can either solve this to a local optima using nonlinear programming (fast), solve to global optima using global optimization code (potentially computationally expensive), or solve a separable programming problem using piecewise-linear approximation of the [possibly] nonconvex objective function using SOS2 constraints--which is designed for problems like this--or simply using MIP constraints. Your method of minimizing $x$'s one-by-one (essentially solving $n$ univariate problems) may not give you a global solution unless a global solver is used in each instance.http://mathoverflow.net/questions/100350/consistency-of-a-system-of-linear-equationsComment by GileadGilead2012-06-22T14:56:32Z2012-06-22T14:56:32ZSee here: <a href="http://amsterdamoptimization.com/pdf/lineq.pdf" rel="nofollow">amsterdamoptimization.com/pdf/lineq.pdf</a>http://mathoverflow.net/questions/100350/consistency-of-a-system-of-linear-equationsComment by GileadGilead2012-06-22T14:56:18Z2012-06-22T14:56:18ZAs it turns out, using an LP solver to solve linear equations isn't a terrible idea in practice. This may sound counter-intuitive, because it sounds overkill. However, because the efficiency of an LP solution depends so much on the linear algebra, good commercial LP solvers like CPLEX or Gurobi tend to incorporate highly optimized linear algebra routines (with excellent sparse matrix handling). There are other advantages to using an LP solvers: 1. matrix does not have to be square; 2. detection of inconsistencies through slacks; 3. inequality constrained solutions for underdefined systems.http://mathoverflow.net/questions/100350/consistency-of-a-system-of-linear-equationsComment by GileadGilead2012-06-22T14:51:51Z2012-06-22T14:51:51ZIs $m > n$ or vice-versa? http://mathoverflow.net/questions/95497/find-optimal-solution-from-muliple-sets-of-valuesComment by GileadGilead2012-04-29T20:07:35Z2012-04-29T20:07:35ZSince yours is an operations research questions, you may want to ask your question here: <a href="http://www.or-exchange.com" rel="nofollow">or-exchange.com</a>. http://mathoverflow.net/questions/90918/sufficient-conditions-for-gradient-descent-convergence/91006#91006Comment by GileadGilead2012-03-12T22:50:09Z2012-03-12T22:50:09Z@Brian, in a comment, he mentioned that the objective $f$ was a sum of hinge losses. <a href="http://en.wikipedia.org/wiki/Hinge_loss" rel="nofollow">en.wikipedia.org/wiki/Hinge_loss</a>