Questions on the optimization functions of Mathematica such as FindMinimum/FindMaximum, Minimize/Maximize, NMinimize/NMaximize, etc.

learn more… | top users | synonyms (2)

1
vote
2answers
47 views

Maximum likelihood estimation based on frequency table

I have a frequency table of grades, I'm trying to estimate the distribution as a truncated normal distribution (a grade below 65 is a failing grade and doesn't count). Since I don't have the actual ...
0
votes
0answers
38 views

Nash equilibrium in game theory?

Are there examples of the solution of Nash non-cooperative games with mixed or pure strategies? How could be implemented in Mathematica 10?
-1
votes
1answer
61 views

My code of plotting a two-variable function is too slow [on hold]

I have a code in which my complicated function to be plotted is F(x,p). I would like to graph it for 5 values of p equal to 10^7, 10^8, 10^9, 10^10 and 10^11 for x values between 0.01 and 0.99. All ...
1
vote
1answer
69 views

How to properly apply NumericQ or s.th. similar here? - NDSolve inside NMaximize

I wrote a function that numerically solves a given Schrodinger equation and returns replacement rules to obtain the time evolution operator. It looks and is used as follows: ...
0
votes
0answers
42 views

Using Jacobi Method [closed]

I am solving matrix with Jacobi method on Mathematica 5.2 Got problem, It needs to be 40 iterations, Initial approximation is x1=0, x2=0, x3=0 Please help to fix it. In[14]:= !(* RowBox[{( (Q5) ...
1
vote
1answer
66 views

How to find Lagrange multipliers corresponding to constraints?

I have a constrained optimisation problem that I solved using Mathematica's FindMinimum function. I would like to know how to get the dual variables corresponding to the constraints I have. Obviously ...
0
votes
0answers
41 views

Set first line in CSV as header in mathematica list

New to stackexchange. Need some help with mathematica - also new to this!. I have a CSV file with 80 something columns and 6000 something rows = 500,000ish elements in total. I am trying to import ...
0
votes
0answers
32 views

How to solve a multi-vector optimization problem efficiently?

How to efficiently solve a optimization problem which involves multiple vectors? My optimization problem is: $\min_{\bf{K}_{i}} \sum_{i<j}\left[\bf{t}\cdot(\bf{K}_i-\bf{K}_j)\right]^2$, s.t. ...
0
votes
1answer
67 views

NMaximize against LinearProgramming [closed]

i'm starting my studies of Operational Research with Mathematica and i'm stuck on a problem with 12 variables. In fact, I was able to solve the problem using ...
0
votes
0answers
97 views

How to speed up my code with constructing matrices

I have run this program for a long time to get the result for n = 2048(about 5hours) and no more result till now (can't run with n = 4096). I would know how to make it more efficient. Any help or ...
0
votes
1answer
89 views

How to determine if directories with executable permission and not

I have some directories that have the UNIX executable permission some does not. What tests could I write in Mathematica to test it?
0
votes
1answer
45 views

Search optimum on connected simulation

Do you know how can I find minimum/maximum of a simulation written in a Module. The simulation calculates a potential value to a territory after some steps. It would seem like this: ...
2
votes
1answer
96 views

Symbolic quadratic constrained maximization with non-negativity constraints?

Dear Mathematica users, I attempted to maximize the below quadratic function K, subject to x1+x2<=A, and a series of ...
8
votes
3answers
264 views

Collatz optimization

I'm VERY new to Mathematica programming (and by new I mean two days), and was solving Project Euler question 12, which states: Which starting number, under one million, produces the longest ...
-1
votes
1answer
137 views
7
votes
0answers
120 views

Bug in plotting function using FindMinimum?

Bug introduced in 10.0.1 (or 10.0.0) and persisting through 10.0.2 or later While working on an answer to RegionPlot from NDSolve, I came across this strange behavior of ...
1
vote
1answer
60 views

Why does NMaximize does not follow the constraints that were given to it?

(someone may want to mark it as a duplicate, but I still have to ask! I just can't figure out why!) ...
1
vote
0answers
61 views

The problem (time) caused by ?NumericQ

In here, I asked a related (similar) question. Using ?NumericQ seems have slowed down the entire calculation. But I now have a more serious problem: ...
1
vote
0answers
65 views

What are the differences between these functions when used for NMaximize?

In short, the question is how to construct the function you want to optimize? ...
0
votes
0answers
33 views
0
votes
0answers
29 views

Maximization of n-variable and n-constraint in matrix form

I am trying to do some maximization using matrix algebra: very simple one is with n = 3 as the following: ...
1
vote
2answers
82 views

Incorporating the minimum and maximum of the function in a Dynamic plot

I'm working on my project for class and it's supposed to be a graph that can take functions from the user and display it along with finding the max and min of the graph. But I just don't know how to ...
0
votes
0answers
63 views
0
votes
0answers
36 views

3D Ploting in Mathematica Function is getting smeared [duplicate]

A = x^2 + y^2 + Sqrt[x^2 + y^2]; B = x^2 + y^2 - Sqrt[x^2 + y^2]; Plot3D[{B}, {x, -1.5, 1.5}, {y, -1.5, 1.5}] I want to remove this sky blue region from the ...
0
votes
0answers
52 views

NMinimize tries to find the fit to paramters which are not in the objective function

Consider the codes below: fun[x_] := (x - 4)^2 NMinimize[{fun[x]}, {x, y}] it returns: ...
1
vote
1answer
60 views
0
votes
0answers
57 views

Constrained Nonlinear Optimization with expectations functions in the constraints

I am modeling an optimal compensation contract with a CRRA utility function : ...
0
votes
0answers
58 views

Optimiazation method L-BFGS-B

I am comparing a result of optimization using R and Mathematica. Mathematica (NMaximize) has found a significantly better (global optimum) result then R (using ...
0
votes
1answer
93 views

Optimizing a System of 5 Equations

I have a system of 5 equations that each define a parameter for a metal I-beam. The common variables are beam width (W), web thickness (Tw), and flange thickness (Tf). I would like to find the best ...
1
vote
0answers
94 views

Mathematica + System Modeler or Matlab + Simulink [closed]

I want to learn control systems(Using Ogata Modern Control Systems Book) and I am not sure in which should I invest : Matlab+Simulink+Control systems = aprox 220 euro Mathematica + Workbench + ...
5
votes
2answers
139 views

Test existence of a path from one side of a graph to another

I'm trying to determine how I can test if a path exists from one side of a graph to another as efficiently as possible. If I have the Lines given by: ...
5
votes
2answers
77 views

Optimization problems over the Integers

Should be an easy question. How can I define a function which gets only integers in a form that I can use to find max and min for instance? Example: Find the Max of the expression ...
0
votes
1answer
72 views

Array element problem in optimization

I have the following piece of code in Mathematica: ...
0
votes
1answer
67 views

FindMinimum runs out of Memory

I have a function (its rather long, but does not matter) which when evaluated (1000s of times) runs fine. However, when I try to find its optimal parameters using ...
1
vote
1answer
39 views

Minimization problem in a subset of Complex matrices

I would like to minimize $||\mathbf{A} \rho -v||$ (where $\rho , v$ are fixed vectors) with respect to the matrix $\mathbf{A}$ elements, but with $\mathbf{A}$ in a subset of complex matrices (i.e. ...
4
votes
2answers
393 views

Finding minimal distance between two surfaces

This code will display two parametric surfaces: ...
0
votes
0answers
43 views

Transform NMinimze into LinearProgramming formulation

I have the following maximization problem that I currently try to solve with Minimize/NMinimize. Unfortunately, this kind of solution method takes really long for large systems of equations and ...
2
votes
1answer
75 views

Array in Sum in Minimize - error “Part specification x[1] is neither a machine-sized integer”

Help please M = 10; z = Array[x, M] {x[1], x[2], x[3], x[4], x[5], x[6], x[7], x[8], x[9], x[10]} ...
3
votes
2answers
125 views

NMinimize/NMaximize is unable to generate initial points

Mathematica 10 generates a warning that it is unable to generate initial points for numerical optimization problems. I picked a particularly simple example. The problem goes away when ...
1
vote
0answers
89 views

Is there any way to solve this convex-concave like optimization problem?

This is a bit of a non-standard way of asking a question perhaps but I couldnt even think of writing any code about the following optimization problem. I wonder if it could be at all solvable and if ...
0
votes
1answer
108 views

Optimizing Chi-square distance between two distribution

I want to program the chi-square between two distribution Xu and Vu with length N. This function is defined as below: Xu and Vu are real and positive. ...
1
vote
0answers
63 views

Updating procedural fitting algorithm to more efficient style?

For some time now, I have used this procedural programming approach to fit data in my research that is too cumbersome for the built in Mathematica functions. (Although this simple example works fine ...
0
votes
0answers
59 views

Improve on timing of NMinimize

I got a little performance problem with the function NMinimize (it takes mathematica approximately 10 minutes to compute the results). Here i s my sample code: ...
0
votes
0answers
57 views

Using FindFit to return a list of possible best fits

Can I use some variant of FindFit that will return a list of the best fit and some worse fits, not just the best fit? This is for a function where the residual function can have several local ...
1
vote
1answer
100 views

Optimization in MMA for time resolved spectroscopy

I want to fit some spectroscopic data with a model. I detect the fluorescence of something over different wavelengths. The detection over each wavelength is one data set in time. The lifetimes of ...
5
votes
0answers
119 views

PenaltyFunction Option in NMinimize

I am curious if anybody has some experience in using the built-in Option "PenaltyFunction" in any of the numerical optimization functions like NMinimize. According to the documentation the user ...
0
votes
0answers
38 views

How to set the step in NMinimize

I want to fit multiple data sets with 104 variables. I use NMinimize to do that. I minimize the difference between data and my objective function. How can I tell ...
0
votes
0answers
31 views

Optimization of two functions under one common constraint

Is it possible to optimize two functions under one common constraint? So to find the common maximum? For example, Optimization of (* 1 *) x*y^2-x^2 (* 2 *) x*y ...