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

How do I use a function with parameters in optim in R

I am trying to use the optim function in R - I have no problems with this: funk=function(param){ x=c(1,2,3,4,5) z=c(3,4,2,2,1) y=c(30,40,22,33,40) a=rep(param[1],5) b=param[2] d=param[3] fit=sum((y-(a+b*x+z*d))^2) …
user311020193
  • 327
  • 2
  • 4
  • 10
21
votes
5 answers

How can I find local maxima in an image in MATLAB?

I have an image in MATLAB: y = rgb2gray(imread('some_image_file.jpg')); and I want to do some processing on it: pic = some_processing(y); and find the local maxima of the output. That is, all the points in y that are greater than all of their…
Nathan Fellman
  • 122,701
  • 101
  • 260
  • 319
20
votes
4 answers

"Anagram solver" based on statistics rather than a dictionary/table?

My problem is conceptually similar to solving anagrams, except I can't just use a dictionary lookup. I am trying to find plausible words rather than real words. I have created an N-gram model (for now, N=2) based on the letters in a bunch of text.…
user132748
20
votes
5 answers

Where is it best to use svm with linear kernel?

I am currently studing svm and was wondering what the application of svm`s with linear kernel is. In my opinion it must be something applied to solving a linear optimization problem. Is this correct? I appreciate your answer!
Carol.Kar
  • 4,581
  • 36
  • 131
  • 264
19
votes
4 answers

OpenCV, C++: Distance between two points

For a group project, we are attempting to make a game, where functions are executed whenever a player forms a set of specific hand gestures in front of a camera. To process the images, we are using Open-CV 2.3. During the image-processing we are…
Marc Pilgaard
  • 588
  • 1
  • 5
  • 20
19
votes
2 answers

Python Pulp using with Matrices

I am still very new to Python, after years and years of Matlab. I am trying to use Pulp to set up an integer linear program. Given an array of numbers: {P[i]:i=1...N} I want to maximize: sum( x_i P_i ) subject to the constraints A x <= b A_eq x =…
19
votes
4 answers

Approximation of a solid by a union of spheres

I've got a 3D solid, represented as the union of a set of polyhedral convex hulls. (Or a single convex, if that makes things easier.) I'd like to approximate that solid as the union of a set of spheres, in a way which minimizes both the number of…
19
votes
3 answers

Given a target sum and a set of integers, find the closest subset of numbers that add to that target

I have a set of integers M and a target sum k. I want to find the subset of M that when added together is the closest to k without going over. For example: M = {1, 3, 5, 5, 14} k = 12 answer = {1, 5, 5} because 1 + 5 + 5 = 11 and there is no way…
18
votes
9 answers

Sorting algorithm for a non-comparison based sort problem?

I am currently faced with a difficult sorting problem. I have a collection of events that need to be sorted against each other (a comparison sort) and against their relative position in the list. In the simplest terms I have list of events that each…
ARKBAN
  • 3,419
  • 4
  • 24
  • 22
17
votes
2 answers

Finding all combinations based on multiple conditions for a large list

I am trying to calculate the optimal team for a Fantasy Cycling game. I have a csv-file containing 176 cyclist, their teams, the amount of points they have scored and the price to put them in my team. I am trying to find the highest scoring team of…
17
votes
5 answers

Finding three integers such that their sum of cosine values become max

There are three integers x, y and z (each of them >= 1) and a given upper bound integer n < 10^6. Also, n = x + y + z and output = cos(x) + cos(y) + cos(z). The exercise is to maximize output. I wrote a simple script for this, but the time…
17
votes
1 answer

How to convert quadratic to linear program?

I have an optimization problem that has in the objective function 2 multiplied variables, making the model quadratic. I am currently using zimpl, to parse the model, and glpk to solve it. As they don't support quadratic programming, I would need to…
17
votes
1 answer

How to replicate excel solver in R

I used excel solver to solve an optimization problem, and I am trying to replicate it in R. I found many packages like optim, ROI etc., but it seems all of them only take a vector as the object to optimize and allow the variables to take any…
Yoki
  • 863
  • 4
  • 14
  • 26
17
votes
4 answers

how to find global minimum in python optimization with bounds?

I have a Python function with 64 variables, and I tried to optimise it using L-BFGS-B method in the minimise function, however this method have quite a strong dependence on the initial guess, and failed to find the global minimum. But I liked its…
dilyar
  • 251
  • 1
  • 3
  • 11
16
votes
3 answers

Optimizing (minimizing) the number of lines in file: an optimization problem in line with permutations and agenda scheduling

I have a calendar, typically a csv file containing a number of lines. Each line corresponds to an individual and is a sequence of consecutive values '0' and '1' where '0' refers to an empty time slot and '1' to an occupied slot. There cannot be two…