minimization

Using GNU Scientific "multimin" to find all local minima

The GNU Scientific library has a multi-dimensional function minimization framework. However, its caveats explicitly says that when used on a function with several different local minima it just returns one arbitrary solution. Does anybody know how you might go about adapting it so that it would return a list of all local minima (subject ...

How to find minimum of nonlinear, multivariate function using Newton's method (code not linear algebra)

I'm trying to do some parameter estimation and want to choose parameter estimates that minimize the square error in a predicted equation over about 30 variables. If the equation were linear, I would just compute the 30 partial derivatives, set them all to zero, and use a linear-equation solver. But unfortunately the equation is nonline...

Can a neural network be used to find a functions minimum(a)?

I had been interested in neural networks for a bit and thought about using one in python for a light project that compares various minimization techniques in a time domain (which is fastest). Then I realized I didn't even know if a NN is good for minimization. What do you think? ...

Compact-Framework: Minimise and restore isn't working

I've written an application with the following in the Program.cs: rsCursor.Wait(); // Load the settings rsAppConfig.LoadConfig("iVirtualDocket.exe.config"); fSplash splash = new fSplash(IvdConfig.VERSION); splash.Initialise(); DialogResult result = splash.ShowDialog(); rsCursor....

Minimization of f(x,y) where x and y are integers

Hi I was wondering if anyone had any suggestions for minimizing a function, f(x,y), where x and y are integers. I have researched lots of minimization and optimization techniques, like BFGS and others out of GSL, and things out of Numerical Recipes. So far, I have tried implenting a couple of different schemes. The first works by pick...

How Can I minimize the HTML code by making it one line of code?

So I have made a web page of HTML, Inline CSS and JS. Since this page will be produced through JS function opened.document.write(); I would like to put all the web page code into one line that can be taken in one of the previously mention function instead of repeating the same function for every new line. I can't affors doing this man...

Knight's Shortest Path Chess Question

I've been practicing for an upcoming programming competition and I have stumbled across a question that I am just completely bewildered at. However, I feel as though it's a concept I should learn now rather than cross my fingers that it never comes up. Basically, it deals with a knight piece on a chess board. You are given two inputs: s...

Faster/more efficient alternatives to Ruby's Marshal?

I'm looking for a drop-in replacement of Ruby's Marshal capability, which hopefully has one or more of the following advantages over Marshal: faster serialization/deserialization more concise (or simply smaller) object-graph Thanks!! ...

can backtracking be avoided when trying to minimize the rectangle space that encloses rectangles of different integer shapes?

The abstraction of my problem is that in a cartesian plane there are a lot of rectangles. These rectangles have known integer sizes and must have integer coordinates(their abscissas are known and fixed, only their ordinates may vary). The problem is to find those ordinates for which the smallest rectangle that contains all the given rec...

Minimize html, doubts and questions.

Hi all. Minimizing html is the only section on Google's Page Speed where there is still room for improvement. My site is all dynamic and the HTML is already Deflated so there is no reason to put any more pressure on the server (I don't want to minimize pages real time before sending). What I could do was to minimize the template fil...

Need Cost Minimization Algorithm for USPS Flat Rate Boxes

I have a client who ships fluids in USPS flat rate boxes. If you are unfamiliar with USPS flat rate boxes, they are boxes of a certain volume that ship regardless of weight. Anything that fits in the box, ships for one low price. My client uses two box sizes: the medium flat rate boxes, and the large flat rate boxes. Additionally, my cli...

Optimizing a 2 parameter distance function on line segments (ACM ICPC Regionals Elim.)

This problem is a subproblem of a problem posed in the ACM ICPC Kanpur Regionals Elimination Round: Given 2 line segments bounded by the 2D points (Pa, Pb) and (Pc, Pd) respectively, find p and q (in the range [0,1]) that minimizes the function f(p, q) = D(Px, Pa) + D(Py, Pd) + k D(Px, Py) where 2 <= k...