Questions tagged [mathematical-optimization]

Mathematical optimization deals with maximizing or minimizing an objective function by choosing values from within an allowed feasible set of possible values. Mathematical optimization is often also referred to as mathematical programming or simply as optimization.

Mathematical optimization deals with maximizing or minimizing a real function by choosing values from within an allowed feasible set of possible values. Mathematical optimization is often also referred to as mathematical programming or simply as optimization.

Thus, the study of Mathematical optimization includes formulating the problem (as a set of mathematical equations), and developing several solution techniques. These techniques exploit the underlying structure of the problem. Different optimization algorithms are suited for different types of problems and vary in solution times and computational complexity.

The goal (to be maximized or minimized) is called the "Objective Function." The set of equations that limit the solution space are the "constraints" and the possible solution space is the "feasible region." In some problems, the aim is to just find any acceptable solution, and these are called "constraint satisfaction problems" in which case there is no real objective function to be minimized or maximized.

Broadly, Mathematical Optimization falls under the area of "Applied Mathematics."

3356 questions
9
votes
5 answers

Matrix completion in Python

Say I have a matrix: > import numpy as nap > a = np.random.random((5,5)) array([[ 0.28164485, 0.76200749, 0.59324211, 0.15201506, 0.74084168], [ 0.83572213, 0.63735993, 0.28039542, 0.19191284, 0.48419414], [ 0.99967476, …
9
votes
3 answers

Optimization with discrete parameters in Matlab

I have 12 sets of vectors (about 10-20 vectors each) and i want to pick one vector of each set so that a function f that takes the sum of these vectors as argument is maximized. In addition i have constraints for some components of that sum. …
Johannes
  • 3,300
  • 2
  • 20
  • 35
9
votes
1 answer

Finding the local maxima/peaks and minima/valleys of histograms

Ok, so I have a histogram (represented by an array of ints), and I'm looking for the best way to find local maxima and minima. Each histogram should have 3 peaks, one of them (the first one) probably much higher than the others. I want to do several…
9
votes
2 answers

Course Scheduling Algorithms: why use of DFS or Graph coloring is not suggested?

I need to develop a Course Timetabling software which can allot timeslots and rooms efficiently. This is a curriculum based routine, not post-enrollment based. And efficiently means classes are assigned timeslots according to staff time preferences…
9
votes
3 answers

k-shortest (alternative) path algorithm, java implementations

Could you recommend any java library which implements k-shortest algorithm -> searching for alternative ways, not the only shortest one in directed multigraph ? I found only JGraphT but there is actually bug (which i submitted) but it will take a…
Martin V.
  • 3,560
  • 6
  • 31
  • 47
9
votes
4 answers

Constrained optimization for nonlinear multivariable function in Java

I am looking for an open source implementation of a method doing constrained optimization for nonlinear multivariable function in Java.
seinecle
  • 10,118
  • 14
  • 61
  • 120
9
votes
3 answers

quadprog optimization

Here's an interesting puzzle. Below is an R snippet that identifies the tangency point of a quadratic function with respect to a line drawn from the point (0,rf) on the y-axis. For those familiar with portfolio theory, this point is in return and…
8
votes
2 answers

Predicting the number of digits of a multiplication

I need to find the number of digits of very large multiplications (about 300 digits each). I was wondering if there is a trick to predict the number of digits that the product will be without actually performing the calculation.
Descartes
  • 503
  • 2
  • 7
  • 22
8
votes
4 answers

Has anyone seen a simplex library for javascript/nodejs

I've been writing a lot of my scripts in NodeJs, but I need to use something like the GLPK libraries in order to handle some of the optimizations in my scripts. Has anyone heard of a javascript driver? I wonder how hard it would be to port coin to…
BHP
  • 985
  • 2
  • 14
  • 18
8
votes
3 answers

Mapping a set of 3D points to another set with minimal sum of distances

Given are two sets of three-dimensional points, a source and a destination set. The number of points on each set is arbitrary (may be zero). The task is to assign one or no source point to every destination point, so that the sum of all distances is…
mafu
  • 31,798
  • 42
  • 154
  • 247
8
votes
3 answers

Efficiently picking combinations of Integers

Let's say we have a 5x5 matrix, filled with 0s. myMatrix <- matrix(rep(0, 25), ncol = 5) Now, let's pick a triplet of integers between 1 and 5. triplet <- c(1,2,3) For all combinations of this triplet we now add 1 in the matrix, with this…
Georgery
  • 7,643
  • 1
  • 19
  • 52
8
votes
1 answer

Fitting two curves with linear/non-linear regression

I need to fit two curves(which both should belong to cubic functions) into a set of points with JuMP. I've done fitting one curve, but I'm struggling at fitting 2 curves into same dataset. I thought that if I can distribute points to curves - so if…
8
votes
3 answers

L1 constrained Regression in C

I need Lasso/L1 constrained Regression Library in C. AFAIK, NAG does not support it. R has a package to do it but I need to do it in C. Any idea?
Pratik Poddar
  • 1,353
  • 3
  • 18
  • 36
8
votes
1 answer

Why does scipy.optimize.least_squares exist when scipy.optimize.minimize could potentially be used for the same things?

I am trying to understand why the scipy.optimize.least_squares exists in scipy. This function can be used to perform model-fitting. However, one could use scipy.optimize.minimize to do the same thing. The only difference is that…
AstrOne
  • 3,569
  • 7
  • 32
  • 54
8
votes
3 answers

Split a vector into chunks such that sum of each chunk is approximately constant

I have a large data frame with more than 100 000 records where the values are sorted For example, consider the following dummy data set df <- data.frame(values = c(1,1,2,2,3,4,5,6,6,7)) I want to create 3 groups of above values (in sequence only)…
Hardik Gupta
  • 4,700
  • 9
  • 41
  • 83