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
36
votes
1 answer

Using min/max *within* an Integer Linear Program

I'm trying to set up a linear program in which the objective function adds extra weight to the max out of the decision variables multiplied by their respective coefficients. With this in mind, is there a way to use min or max operators within the…
solvingPuzzles
  • 8,541
  • 16
  • 69
  • 112
32
votes
9 answers

How computer multiplies 2 numbers?

How does a computer perform a multiplication on 2 numbers say 100 * 55. My guess was that the computer did repeated addition to achieve multiplication. Of course this could be the case for integer numbers. However for floating point numbers there…
ckv
  • 10,539
  • 20
  • 100
  • 144
28
votes
2 answers

How to create an optimizer in Tensorflow

I want to write a new optimization algorithm for my network on Tensorflow. I hope to implement the Levenberg Marquardt optimization algorithm, which now is excluded from TF API. I found poor documentation on how to write a custom optimizer, so i ask…
26
votes
6 answers

What is the difference between gradient descent and gradient ascent?

I am not able to find anything about gradient ascent. Any good link about gradient ascent demonstrating how it is different from gradient descent would help.
25
votes
10 answers

Find local maxima in grayscale image using OpenCV

Does anybody know how to find the local maxima in a grayscale IPL_DEPTH_8U image using OpenCV? HarrisCorner mentions something like that but I'm actually not interested in corners ... Thanks!
Durin
  • 687
  • 1
  • 8
  • 18
25
votes
5 answers

Fast max-flow min-cut library for Python

Is there a reliable and well-documented Python library with a fast implementation of an algorithm that finds maximum flows and minimum cuts in directed graphs? pygraph.algorithms.minmax.maximum_flow from python-graph solves the problem but it is…
Jukka Suomela
  • 12,070
  • 6
  • 40
  • 46
24
votes
4 answers

scipy.optimize.leastsq with bound constraints

I am looking for an optimisation routine within scipy/numpy which could solve a non-linear least-squares type problem (e.g., fitting a parametric function to a large dataset) but including bounds and constraints (e.g. minima and maxima for the…
user1293231
  • 351
  • 1
  • 2
  • 3
24
votes
2 answers

Minimize function with parameters

Currently I have the following code that defines the function f. a = #something b = #something c = #something def f(x): """Evaluates some function that depends on parameters a, b, and c""" someNumber = #some calculation return…
Nate Stemen
  • 1,235
  • 3
  • 15
  • 27
24
votes
2 answers

How to handle boundary constraints when using `nls.lm` in R

I asked this question a while ago. I am not sure whether I should post this as an answer or a new question. I do not have an answer but I "solved" the problem by applying the Levenberg-Marquardt algorithm using nls.lm in R and when the solution is…
Zhenglei
  • 988
  • 1
  • 10
  • 21
23
votes
6 answers

What libraries should I use for linear programming in python?

A quick search on "python linear programming" turns up a lot of hits (e.g. this one). Looking through them, I see a fair number of complaints about outdated dependencies, poor documentation, etc. Can anybody recommend a headache-free (e.g. fast,…
Abe
  • 22,738
  • 26
  • 82
  • 111
23
votes
5 answers

Connect nodes to maximize total edge weight

I am working on a problem which could be reduced to a graph optimization problem as below. A set of colored nodes is given. They are all unconnected i.e. there is no edge in the graph. The edges are to be inserted between the nodes. A node can have…
23
votes
5 answers

Constrained Linear Regression in Python

I have a classic linear regression problem of the form: y = X b where y is a response vector X is a matrix of input variables and b is the vector of fit parameters I am searching for. Python provides b = numpy.linalg.lstsq( X , y ) for solving…
ulmangt
  • 5,343
  • 3
  • 23
  • 36
22
votes
9 answers

Which algorithm for assigning shifts (discrete optimization problem)

I'm developing an application that optimally assigns shifts to nurses in a hospital. I believe this is a linear programming problem with discrete variables, and therefore probably NP-hard: For each day, each nurse (ca. 15-20) is assigned a…
22
votes
3 answers

What's a good convex optimization library?

I am looking for a C++ library, and I am dealing with convex objective and constraint functions.
areslp
  • 383
  • 1
  • 4
  • 17
22
votes
10 answers

How to concatenate two integers in C

Stack Overflow has this question answered in many other languages, but not C. So I thought I'd ask, since I have the same issue. How does one concatenate two integers in C? Example: x = 11; y = 11; I would like z as follows: z = 1111; Other…
101010
  • 14,866
  • 30
  • 95
  • 172