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

learn more… | top users | synonyms

-5
votes
0answers
26 views

would you please write 'optimal strong stability preserving 4 stage 3 order explicit scheme for fortran'?

We want to write an explicit scheme to solve ODE at Fortran by optimal SSPRK 4 stage 3 order. Would you please write the algorithm to solve this problem.
1
vote
0answers
12 views

Enumerating set combinations in an order that maximises the number of previously unseen subsets

Consider a set $S=\{a,b,c,d,e,f,g,h,i,j,k\}$, $\left|S\right|=11$. There are ${11 \choose 5} = 462$ combinations of $S$'s members of size $5$. There are $462! \approx 1.419 × 10^{1032}$ possible ...
1
vote
3answers
55 views

Should a randomly seeded genetic algorithm give deterministic optmized solutions on each run?

I am going to rewrite an algorithm using genetic methods for mutating my solutions and I am wondering if I should expect and it only consider my algorithm "optimized" or "finished" if various runs of ...
-2
votes
0answers
162 views

Sequence & convergent series [closed]

I have discovered the following solution (one real root for trinomial equation of bellow form), can you kindly check my solution, Thanks, Define a function f(x) Where $x$ is any real number between 0 ...
0
votes
1answer
75 views

What is the fastest algorithm for computing the inverse matrix and its determinant for positive definite symmetric matrices?

Given a positive definite symmetric matrix, what is the fastest algorithm for computing the inverse matrix and its determinant? For problems I am interested in, the matrix dimension is 30 or less. ...
1
vote
1answer
36 views

Determining if samples fit a 3D Gaussian distribution

I have a collection of sample particles, with (x,y,z) coordinates generated by a simplified Monte Carlo-like code. I expect that these particles will follow an anisotropic diffusion process, which ...
0
votes
0answers
33 views

Optimization of nonlocal stencil-like operator on subset of regular grid

I am trying to optimize the execution time for this particular piece of fortran code. Details: i_gc is a (ngpts, 3) array of containing (i,j,k) indices for each grid point. This is a subset of the ...
0
votes
0answers
26 views

Percentage based weight ditribution

I have a say 3 different algorithm which gives a total weight value for individual algorithm. I would like to give weights for each algorithm. Currently I am using e.g. Algorithm 1 - 8 elements - sum ...
1
vote
0answers
21 views

Minimum effort merging of two sets

I have the following problem. I have two sequences of elements $A = [a_1,a_2,\cdots,a_n]$ and $B = [b_1,b_2,\cdots,b_m]$. I can build a matrix $D[n \times m]$ where $d_{ij} = d(a_i,b_j)$ My greedy ...
0
votes
1answer
51 views

Is there general algorithms to solve such 3D cutting problems?

Suppose a cuboid $\mathbb{A}$ has $L$,$M$ and $N$ as its length, width and height respectively, where $L\ge{M}\ge{N}>0$; Now we want to cut $\mathbb{A}$ into smaller cuboids with length $x$, width ...
3
votes
1answer
91 views

What is the case of trade-off in different Runge Kutta methods

There are so many Runge Kutta methods, including Dormand-Prince 45 Cash-Karp 54 Fehlberge 78 Is there any comparison between them? What is each approach sacrificing? What is the general ...
2
votes
2answers
93 views

Calculate contour line length

I would like to know the algorithm to calculate contour line length. Suppose we have numerical data set of an function $f(x,y)$. How could I calculate the length of the line from $(x_1,y_1)$ to ...
0
votes
1answer
65 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
votes
0answers
43 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 ...
0
votes
0answers
24 views

Genetic Algorithm in linear cut optimization with reuse

As stated in the title i have a problem of linear cut optimization that i need to solve with a genetic algorithm. No problem if i have all the possible pieces to cut that are stically defined when ...
3
votes
2answers
867 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 ...
6
votes
1answer
108 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 ...
4
votes
3answers
230 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 ...
0
votes
0answers
25 views

Find out the expression for angular speed in terms of time

The orbit of a small mass orbiting to a much larger mass (e.g. a small planet relative to a fixed star) is described by $$ u=\dfrac{1+e\cos{\theta}}{l} $$ where $u = 1/r$, $r$ and $\theta$ are the ...
1
vote
3answers
206 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? ...
0
votes
1answer
28 views

Travelling Salesman Problem - where's the “return to city”-constraint? [closed]

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 ...
1
vote
0answers
20 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 ...
0
votes
0answers
20 views

An algorithm to produce, not necessarily efficiently, another algorithm that efficiently solves the Rubik cube

How complex is the task to formulate an algorithm that produces, not necessarily efficiently, another algorithm to efficiently solves the Rubik cube? Has it been attempted before? What is the latest ...
1
vote
0answers
53 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 ...
0
votes
0answers
67 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 ...
2
votes
0answers
59 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 ...
4
votes
1answer
87 views

How to evaluate a series of derivatives?

Consider the function $$f(\mathbf{x}) = \sum_{n=0}^{N} a_n \left( (\mathbf{b}-\mathbf{x})\cdot \nabla \right)^n \frac{1}{r}$$ where $r = |\mathbf{x}| = \sqrt{(x-x_0)^2 + (y-y_0)^2}$ and $a_n$ and ...
1
vote
3answers
147 views

Numerical integration algorithm for this set of ODEs

I have to solve numerically the following initial value problem, which physical origin is discussed in this article by G.I. Taylor (1941). Here $\eta$ is the independent variable and ranges beetween ...
7
votes
1answer
134 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 ...
2
votes
0answers
40 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 ...
3
votes
3answers
146 views

Algorithms for radiation treatment planning

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, ...
3
votes
1answer
70 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 ...
0
votes
2answers
78 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 ...
2
votes
0answers
89 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 ...
1
vote
3answers
148 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 ...
4
votes
1answer
132 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 ...
1
vote
0answers
44 views

Finding a scalar field in order to generate a solenoidal vector from a given vector

I am working on generating a (complex) solenoidal vector field $\mathbf{A}$ from a prescribed (complex) vector $\mathbf{a}$ and the gradient of a scalar, $b$, such that $$\mathbf{A} = \mathbf{a} + ...
1
vote
2answers
96 views

How to prove time complexity of merge sort

I was asked to prove that the time complexity of merge sort is $ O(log_2n)$ but I cannot find a way to continue my method. Any help? $T(n)=2T(\frac{n}{2} )+n$ $T(n)= 2[2T(\frac{n}{4})+n] +n = ...
0
votes
1answer
39 views

MAX-SAT and MAX-cut

I have been using MAX-SAT solver to obtain the exact ground state of ising spin glass model: For 1D periodic model, for systems with 50 binary variables and interaction range of 15th nearest ...
0
votes
1answer
69 views

Help me analyze the computational cost of two kinds of operations

everyone, I have a question about computational costs for a algorithm. That is: I have two vectors $u_n,\ v_n\in \mathbb{C}^N$, a matrix $A\in \mathbb{C}^{N\times N}$ (can be both sparse and dense) ...
0
votes
0answers
53 views

Proof of corollary to Chinese remainder theorem

I was puzzled regarding corollary 31.29 of the Chinese remainder theorem as presented in the chapter on number theoretic algorithms by Cormen et al. I found another person who asked the same question ...
1
vote
1answer
93 views

Efficient way to compute the cumulative weights of all subtrees rooted at each node in a tree?

I have a tree data structure (rooted, unbalanced, with unbounded branching factor), where each individual node has an associated 'weight'. For every node $n$ in the tree, I'd like to compute the ...
3
votes
1answer
63 views

Computing the (non-convex) boundary of a set of paths between two points

I have a set of paths between two fixed points (marked in red below). Each of these paths consists of an ordered series of $\{x, y\}$ points (marked in blue). I am trying to find the ordered set of ...
1
vote
1answer
47 views

Adjusting Keplerian orbits for thrust with numerical stability

I'm writing a mod for a game that models orbital physics (Kerbal Space Program, or KSP). I'm attempting to model the effects of thrust on spacecraft in certain states where the game only models them ...
6
votes
2answers
374 views

A method to determine whether a point can be contained within a circle with no neighbouring points

I have been working on a particularly challenging problem and was hoping for some guidance. Here is my problem. I have a point cloud containing millions of points. For each point in the set, I need to ...
0
votes
0answers
17 views

Max weighted subset (max sum diversification)

Given a set of elements $V$, with known cost $\pi_S$ for each subset $S \subset V$ and a monotone increasing function on the subsets $f(S)$ . I'm wondering if there is a pseudo-polynomial algorithm ...
2
votes
2answers
93 views

fastest and most efficent way to count all combinations in many sets and sum them together

I am a Java programmer who has reached the limits of brute computer power. My relational database (and non relational databases) is not producing results quick enough and I have hit a bottleneck in ...
6
votes
0answers
140 views

Are there improved method of computing the following expression?

given a symmetric matrix $Y \in \mathbb{R}^{n \times n}$, and an arbitrary matrix $X \in \mathbb{R}^{n \times n}$, and a vector $v \in \mathbb{R}^{n \times 1}$, is it possible to compute the following ...
1
vote
1answer
117 views

What is the algorithm that matlab used in its built-in function 'pca'?

Do anyone know what is the algorithm that MATLAB used in its built-in function "pca"? I have the following data set: 148.9820 55.8438 210.2150 149.3030 56.8891 208.4280 151.4400 ...
1
vote
2answers
532 views

Patankar's algorithms for Numerical Heat Transfer and Fluid Flow

I am looking for the algorithm of Patankar (for example, SIMPLE, SIMPLER, SIMPLEC and PISO) written in Fortran for the simulation of heat transfer and fluid flow.