We’re rewarding the question askers & reputations are being recalculated! Read more.

# All Questions

76 questions
Filter by
Sorted by
Tagged with
30 views

### Is there a feasible computation?

I have to find the values of $p_1$ and $p_2$ which minimizes the expression $G$. However, when I took the partial differentiation of $G$ with respect to $p_1$ and $p_2$, the equations I obtained were ...
644 views

### MaxDetect speed

What's the fastest way to find the local maxima of a 2D list? E.g. ...
135 views

### Linear programming with lazy constraints

Does Mathematica offer any means for solving linear programming problems with "lazy constraints", as described e.g. here? While I am not very familiar with linear programming, my understanding of the ...
25 views

### Wish to increase speed of MaximizeOverPermutationMH merit function

I am working with MaximizeOverPermutationMH (see Link to discussion about function and would like to optimize the execution speed of the merit function. This function accepts a 100-digit permutation ...
84 views

### Finding extremes in discrete data by the fastest code

everybody! I'm new and that's my first post. I have such a problem: need to extract from a matrix (with dimensions n x 2) such points which have second coordinate smaller than -500 or higher than 500....
58 views

### How to disable symbolic preprocessing in NMinimize without performance loss?

I want to find a global minimum of a function which is defined only numerically and cannot be evaluated with symbolic arguments. For example, this could be a minimum of a compiled function. ...
70 views

### Memory leak in simple program

I am trying to solve a simple optimization problem on the sphere, and for some reason, I got some memory leak that I am not able to solve. To decompose the problem in step, what I wan to do is Take ...
53 views

### Rearrange a symbolic function in order that the result contains a minimum number of SQRT() and CBRT() calculations

I use mathematica for analytically calculating a function, which solves two equations: ...
117 views

### Speedup of DimensionReduce

I am interested in accelerating DimensionReduce using the "TSNE" method. I have a matrix with a size of 30000 * 10, and I want to reduce to 30000 * 8. But the calculation is very slow, any suggestions ...
42 views

### How can I specify the region for every variable simultaneously in NMinimize?

I want to use NMinimize to find the unknown unitary matrix that solves a (possibly nonlinear) matrix equation. For example, the one that transforms the Pauli matrix ...
157 views

### Anyway to Speed up this code?

I have the following code: ...
116 views

### Programming with Mathematica Syntax - Dunford decomposition

I am always amazed while I am reading some solutions of problems in mathematical problems of this site with Mathematica. For instance, look at the problem 48. Whereas I am writing 100 lines of code ...
100 views

### Find k largest edges with unique nodes (kind of maximum weighted matching)

I have a weighted graph, and I am interested to find k largest edges with unique nodes. Currently, I do it in the following manner ...
58 views

### Unable to use Solve to solve simultaneous equations, or use Maximize for exact maximum solution

Mathematica has found that the maximum of the following function is negative using NMaximize, but I am trying to prove that the maximum is negative (i.e. that the ...
45 views

### Optimization with constraint or with the constraint embedded into the problem?

I need to find the minimum of a function. However, the condition is that the final state should be normalized i.e. sum of the squares must be one. One way to deal with it is just add the constraint ...
215 views

### Automated searching for maximal 2D point configurations

I have some black-box function that takes lists of 2D points, and I would like to find some practical methods of searching for collections of points that maximize it. Motivation I've come across ...
123 views

### Speedup of reduce function?

I tried to run this $15$ variable feasibility linear programming to see what the solution looks like. Unfortunately it is taking too much time on my laptop. Is there a way to speed it up? Any tips ...
66 views

### Improve speed in Sum of probabilities ~ Normal Distribution

I am having some performance problems, and I need some advice. I understand that my code is not well written ...
228 views

### Is there any way to speed up this code that's Maximizing a function got from numerical integration?

I have this code below, which is calculating the Binding energy of an electron in a Quantum Well Wire with a hydrogenic impurity in it. Well you don't have to care much about what kind of calculation ...
62 views

### My method for finding local minima takes too long

I am trying to find all the local minima of a function, in a specified region of space. Unfortunately this is taking way too long for large system sizes, and I am wondering whether it's just because ...
51 views

### Using FindMinimum to solve equations as constraints

As suggested here, a system of equations can be seen as constraints in a minimization procedure with a zero cost function. For instance: ...
441 views

### Optimizing and Improving Gradient Descent Function

In an effort to create an interactive gradient descent visualization I am using the following gradient descent function, ...
380 views

### Maximize area of intersecting triangle and square with constraints

There is this nice problem on mathoverflow to find a maximum intersection area of a square and a triangle with a constraint that they both have unit areas. I tried to solve it with a help of ...
83 views

### Improving the efficiency of applying FindMinimum to a very large table

I am working with a large table that has around 200,000 elements. Each element is a function of a single variable u. For example, one element looks like ...
140 views

### How to improve the speed of NMaximize function

My problem is as follows: Consider a 5*5 matrix Obj with 0 and 1 Obj = Array[x, {5, 5}]; The objective function is: ...
188 views

### Can Minimize work faster and/or be parallelized?

Having executed ...
126 views

### Calculating minimum potential energies for Thomson problem

I have found a table of values for minimum potential energies up to 470 electrons on Wikipedia. However, the method I used for calculating energies is not efficient enough for configurations that have ...
49 views

### How can I speed up the evaluation of my equations?

Calculation of eigenvalues and eigenvectors in dependence of the parameters ...
102 views

120 views

### NMinimize error

I want to use NMinimize in the following way: ...
249 views

### Parallel function evaluation for minimal value

I am asking myself, if the evaluation of a function f looking for a minimal value over a discrete set of values can be parallelize (brute scan for a potential ...
146 views

### Speeding up constrained optimization problem solving

I have a problem on my homework with Lagrangian multipliers that Mathematica has now been bashing at fruitlessly for 10 minutes. I'm not sure whether I did something horribly wrong codewise, but it's ...
149 views

### Improving the speed of an optimization algorithm via compilation and parallellization

I have written an implementation of eight variants of the PSO-algorithm and I want to test them over a set of test functions. I am using parallelization as it improves the speed a lot and I have also, ...
92 views

### NIntegrate within NMinimize - how to optimize the code?

How I can optimize these numerical calculations? Most annoying is encountering instabilities (numerical errors). I have a predefined function: ...
71 views

### Evaluation of likelihood very slow

I am trying to implement a simple statistical model for the first time in Mathematica. My model is made my one random variable which is the sum of background and signal. Background is an exponential ...
117 views

### Simplifying sums of rational trigonometric functions

After simplifying the trigonometric functions as advised before (cf. Simplifying Expressions for FindMinimum), I obtained a sum of 62 similar expressions, the first three as in the below: ...
180 views

### Simplifying Expressions for FindMinimum

I am currently trying to apply the FindMinimum function to find the lowest energy of an expression. My current expression as of now is relatively complicated. It is the summation of 48 similar terms, ...
209 views

### Performance of a bootstrap - time of computation not linear with number of iterations

I'm doing a bootstrap based on this thread with the following code (file.txt here): ...