Questions tagged [algorithms]

A description of the specific steps needed to solve a particular problem in an unambiguous way, expressed in an abstract form.

447 questions
133 views

Choosing hardware to use with PETSc

I would like to know more on choosing hardware to get the maximum price/performance when using the PETSc library (and various third-party preconditionners) I am currently working on a 2 cpu (2*E5-...
83 views

Finding most efficient route (distance/number of nodes) that uses nodes at least X amount away from another node

I'm trying to find the "looped" route with the lowest value of D/n, where D=Distance, and ...
924 views

How can calculations cause an arithmetic overflow even if the final value fits?

I am reading Algorithm Design Manual by Skiena, which says in Chapter 8, Section 8.1.4 when talking about the calculation of binomial coefficients: Intermediate calculations can easily cause ...
190 views

Compute eigenvectors of a matrix with known eigenvalue spectrum

If I have already accurately known the eigenvalue spectrum (i.e. all eigenvalues) of a matrix, is there any efficient numerical algorithm to compute all the eigenvectors corresponding to these ...
331 views

Propagating Schrodinger equation

My task is to simulate quantum evolution. To do that I need to perform this operation $$w = e^{-itH}v$$ where $H$ is a sparse matrix and $v$ is the initial column vector. I am wondering if there is ...
237 views

Languages Speed [closed]

Suppose a program was written in two distinct languages, let them be language X and language Y, if their compilers generate the same byte code, why I should use language X instead of the language Y? ...
32 views

I'm looking at your standard definition of the TSP.... (see wikipedia).... and in the statement leading up to the definition, it states that we must return to the city we began from. Which ...
25 views

Using HMM for speech synthesis [closed]

I am trying to make a speech synthesizer using a Hidden Markov Model. I read the wikipedia page and several whitepapers and presentations (such as this one) but I am still not sure how this algorithm ...
393 views

MCNPX for nuclear simulation [closed]

is it legal here to ask this problem? I need someone help. I run mcnpx. I try to calculate f4:n using nps:1000. But, it stop directly before culculate f4. There is comment: stack trace terminated ...
119 views

HDF5 Many Writers, One External Reader

I have an application where I want to have 3 different machines writing to their own independent HDF5 files at a high rate, but have a way to read data from them externally and combine it. Is HDF5 a ...
81 views

How to fix time intervals to store data in a stochastic simulation (continous time markov chain)

I am using FORTRAN to implement Gillespie's stochastic simulation algorithm. I would be running many simulations in parallel (both parallel instances with different seed and parallel functions); if I ...
98 views

1k views

Newton iteration for cube root without division

It's a fairly well known trick to avoid division in calculating square-roots to apply Newton's method to finding $1/\sqrt{x}$, and probably better known, using Newton's method to find reciprocals ...
79 views

Bracket Algebra, Straightening Algorithm

My apologies if the question is simple. I need to write a code for straightening algorithm. Which includes defining bracket algebra. I tried to write it in CoCoA-5, but it wasn't possible because ...
173 views

I have a medical physics problem - I want to maximise the dose absorbed by a brain tumour whilst minimising the dose in the rest of the brain, especially certain organs, such as the pituitary gland, ...
79 views

How to Check a Hyper-Cube for Defects

I would greatly appreciate some help/references on solving the following problem: You are in charge of searching through a n-dimensional hyper-cube $[0,1]^n$ to make sure that it does not contain ...
304 views

Faster methods for projecting a mesh onto a hierachally unrelated mesh?

I have a set of independent meshes whose results I would like to project onto another non-hierachally related mesh. Until now, I've been accomplishing this by finding the nearest-distance node in the ...
264 views

Using SVD to biorthogonalize left and right eigenvectors?

I have a set of left and right eigenvectors from an nonsymmetric eigenproblem, and I'd like to biorthogonalize them. I tried Gram-Schmidt, but this fails for most cases. I then read that the SVD is ...
618 views

Algorithm to compute the intersection of two lines given their cartesian equations

I'm looking for a way to compute the coordinates of the intersection of two lines. Each lines are defined with a point and a normal vector. We can assume than the normal vectors are not zero and ...
257 views

Active Elements in Projected Newton's Method?

To those who are familiar with the projected Newton's method or projected gradient method... We consider a constrained optimization problem with simple bounds. Particularly, minimize f(x) subject to ...
52 views

248 views

Parameter ESTimation (PEST) algorithm? Steps and purposes? [closed]

I'm reading up on the Parameter ESTimation algorithm, (Link to PEST homepage 1), and having trouble understanding the broad strokes, as I keep getting lost in null spaces, different regularized ion ...
103 views

How to measure trajectory regularity?

I have two animal running trajectories. A regular one with repeated back and forth running between point A and B, like the one on top in the figure. The other one is very irregular, animal paused and ...
435 views

How to minimize the artefact of a cartesian to polar transform followed by a polar to cartesian transform?

I'm transforming cartesian images into polar images. (x,y) => (angle, radius) I fill the polar image by iterating on each of its pixels and filling them by doing the reverse polar transform. For a ...
114 views

Numerically compute one-to-one mapping

I have a set of points defined by their coordinates $(x_1,y_1)$ after changing some parameters of the problem I obtain a second set of points defined by their coordinates $(x_2, y_2)$. There exists a ...
97 views

Appropriate algorithm for (non-linear) ODE with integral equilibrium constraint: collocation?

I have a problem of the following structure: For some scalar $g$, functions $F(z)$ and $h(z)$ defined on $[0,\bar{z}]$ , and a non-linear operator $\phi(F,z)$ (in reality, $F$ and $h$ are vector ...
60 views

Algorithm for distributing members over activites (with individual preferences)

So in my school we have a day where everybody participates in different activities. Each projects can have like 10 members. The whole day is divided in 2 or 3 different blocks, in which the pupils ...
70 views

Finding roots without knowing much about the function

Consider solving numerically for roots: $( x_0, y_0): f(x_0, y_0) = 0, g(x_0, y_0) = 0$ where you only know that f, g continuously differentiable but the theoretical differentiation is not a ...
77 views

Algorithm for optimizing graph interconnectivity

I have a partiuclar kind of graph problem and (not having a background in graph algorithms) I would like to know how this kind of problem is called in the literature and what algorithms exist for ...
515 views

Why are Octrees used for Multipole space decomposition?

In most (all?) implementations of the Fast Multipole Method (FMM), octrees are used to decompose the relevant domain. Theoretically, octrees provide a simple volumetric bound, which is useful for ...
232 views

How to compute the weight matrix for tomography applications?

I am trying to compute the weight matrix for a set of straight ray paths through a reconstruction region. Ideally, I would like to be able to do this for both a rectangular grid region, where each ...
I have to write an algorithm/code to reconstruct an unknown 3D scalar potential $V(\mathbf{r})$ up to a specified threshold $E_c$ (assume that the potential is monotonic) The problem has the ...