All Questions

Filter by
Sorted by
Tagged with
28
votes
4answers
16k views

Dealing with the inverse of a positive definite symmetric (covariance) matrix?

In statistics and its various applications, we often calculate the covariance matrix, which is positive definite (in the cases considered) and symmetric, for various uses. Sometimes, we need the ...
7
votes
2answers
167 views

Is it possible to represent non-linear ranking type constraints as equivalent linear constraints?

I have formulated a linear program with binary indicator variables $z_i(a)$ which is equal to $1$ if the $i^{th}$ document is of rank $a$ and $0$ otherwise. The other variables in the linear program,...
19
votes
1answer
625 views

Difficulty with Spectral Method using Chebyshev Polynomials

I am having a bit of difficulty in trying to understand a paper. The paper uses spectral method to solve for an eigenvalue that comes from a system of coupled ODEs. I will write out only one equation ...
5
votes
3answers
1k views

Computational cost of numerical methods for PDEs

Say I need to solve a PDE numerically. Depending on the problem and the numerical method chosen, I can usually see some issues coming: implementation issues (e.g. boundary conditions, parallelization),...
12
votes
2answers
1k views

Absolute Value in Linear Constraints

I have the following optimization problem where I have absolute value in my constraints: Let $\mathbf{x} \in \mathbb{R}^n$ and $\mathbf{f}_0, \mathbf{f}_1, \ldots, \mathbf{f}_m$ be column vectors of ...
9
votes
2answers
362 views

Fastest way to find eigenpairs of a small nonsymmetric matrix on a GPU in shared memory

I have a problem where I need to find all positive (as in the eigenvalue is positive) eigenpairs of a small (usually smaller than 60x60) nonsymmetric matrix. I can stop calculating when the eigenvalue ...
39
votes
7answers
10k views

Is it a good idea to use vector<vector<double>> to form a matrix class for high performance scientific computing code?

Is it a good idea to use vector<vector<double>> (using std) to form a matrix class for high performance scientific computing code? If the answer is no. ...
3
votes
2answers
203 views

How to prove that my problem is np-hard

For an assignment i need to program an application to schedule conversations. Something similar to speeddating or Pta meeting. The problem is that i know that this is hard to solve, but i dont know if ...
6
votes
3answers
806 views

What is the best way to get erfi with scipy?

I want this: http://mathworld.wolfram.com/Erfi.html But apparently scipy does not have this in its extensive special functions library. http://docs.scipy.org/doc/scipy/reference/special.html It is ...
3
votes
2answers
202 views

Efficiently changing basis on many diagonal matrices

I have to perform a [complex] basis transformation on a large number of [real] diagonal matrices: $$ \langle b_i | A | b_j \rangle = \sum_k \langle b_i | \bar{b}_k\rangle \langle\bar{b}_k | A | \bar{b}...
5
votes
1answer
784 views

What is the scaling or order of molecular dynamics (MD) simulations?

Often in computational science, we talk about the scaling or order of a particular method ($\mathcal{O}(N)$, $\mathcal{O}(N^2)$, $\mathcal{O}(N \log N)$, etc.). I am having a really difficult time ...
3
votes
2answers
601 views

Solving Poisson equation with free boundaries and adaptively refined mesh

Assume we want to solve the Poisson equation $$ \Delta u = f $$ with free (Neumann) boundary conditions. So, the right hand side function $f$ must fulfill the compatibility condition to integrate to ...
3
votes
1answer
342 views

Understanding wall time jitter in MATLAB computations

I am studying a research paper on iterative methods to compute generalized inverses of an arbitrary matrix $A$. I am studying the following iterative method: $$Y_{k+1} = Y_{k} + Y_{k}(I - AY_{k}),$$ ...
6
votes
2answers
1k views

Transitional flow in OpenFOAM

Is it possible to simulate transitional flow in OpenFOAM? Or, alternatively, does it make sense to use k-epsilon or k-omega model with low Reynolds number? If not, why? What kind of errors would ...
8
votes
1answer
169 views

Sudden drops in matrix multiplication performance

I've been reading about implementing dense matrix multiplication when the matrix doesn't fit in cache. One of the graphs I've seen (slide 9 from these slides) shows sudden drops in performance using ...
5
votes
3answers
247 views

How to efficiently structure simulation data in memory for cells with varying degrees of freedom?

For a discontinuous Galerkin-based simulation I need to store cell-based simulation data in memory. Since the order of the polynomial approximation $N_p$ may vary between cells, I wonder what the most ...
11
votes
3answers
308 views

Under what circumstances is Monte Carlo integration better than quasi-Monte Carlo?

A simple enough question: to do a multidimensional integral, given that one has decided that some sort of Monte Carlo method is appropriate, is there any advantage that a regular MC integration using ...
3
votes
1answer
294 views

Random placement of euclidean points with constrained inter-point distances in a fixed area

I'd like to place as many random points as possible in a 2D square $S=[0,1]x[0,1]$ such that the euclidean distance $d$ between any two points $d$ is greater than a given value $b$ (b is small). I'm ...
9
votes
2answers
726 views

Higher precision floating-point arithmetic in numerical PDE

I have the impression, from very different resources and talks with researches, that there is a growing demand for high precision computations in numerical partial differential equations. Here, high ...
12
votes
3answers
1k views

Numeric integration of multi-dimensional integral with known boundaries

I have a (2-dimensional) improper integral $$I=\int_A \frac{W(x,y)}{F(x,y)}\,\mbox{d}x\mbox{d}y$$ where the domain of integration $A$ is smaller than $x=[-1,1]$, $y=[-1,1]$ but further restricted by ...
5
votes
1answer
160 views

Is there a way to inspect the graph of a sparse matrix with PETSc?

I am currently trying to code the CA-CG method within the PETSc framework. A mandatory step in this process is the implementation of the "matrix powers kernel" algorithm for a generic sparse matrix. ...
2
votes
1answer
185 views

Root Convergence rate of Iterative Scheme

I have an iterative sequence for optimizing an EM (Expectation Maximization) algorithm based loss function $L(X)$ with $t$ being the iteration number as: $X_t=ABX_{t-1}+CX_{t-1}+X_{t-1}$ where $A$ is ...
5
votes
1answer
182 views

Linear Programming with constraints of the form $Cx \nless d$ where $C\in R^{m\times n}$

I have an optimization problem that has a linear objective function. The constraints are of the form: $(Ax \leq b) \wedge (Cx \nless d)$. In other words, I have: \begin{align} \min &f^T x \...
1
vote
0answers
142 views

Determine set of dividend and divisor for quotient

I have the following Problem: I know the range within the results of a division must lie. [ quotientrange ] Additionally, the quotient should not exceed a certain number of fractions. I know, that ...
2
votes
1answer
1k views

Where is the bug in my fourth order Runge-Kutta method implementation?

I am trying to build a Runge-Kutta code to integrate the equations of motion for a simple harmonic oscillator. However, when I run the code, I only see first order improvement in the error as I ...
7
votes
2answers
1k views

Minimum image convention for triclinic unit cell

The minimum image convention (MIC), see for example a short note of W. Smith, is often used in molecular dynamics or monte carlo simulations of periodic systems with an orthorhombic unit cell. For ...
9
votes
3answers
212 views

How to intellligently attempt to rule out convexity?

I want to minimize a complicated objective function, and I'm not sure if it is convex. Is there a nice algorithm that attempts to prove that it is not convex? Of course the algorithm could fail to ...
2
votes
3answers
405 views

derivative of linsolve

Consider a vector $\mathbf{g} \in \mathbb{R}^{m}$ and a matrix $\mathbf{A} \equiv \mathbf{A(g)} \in \mathcal{M}_{p\times q} [\mathbb{R}]$, a function of $\mathbf{g}$. Furthermore, let $\mathbf{S} \...
4
votes
2answers
2k views

Implementing a finite difference method in Mathematica

I am trying to iterate the following equation $$ x_{k}(n+1)=x_k (n)-\epsilon (x_{k+1}(n)-2x_k(n) +x_{k-1}(n))+\sqrt{\epsilon}\; \eta_{k}(n) $$ where $n$ denotes which time step I'm on and $k$ is the ...
8
votes
5answers
360 views

Iterative solution to a nonlinear equation

I appologize in advance if this question is silly. I need to compute the root of \begin{equation} u -f(u) =0 \end{equation} Where $u$ is a real vector and $f(u)$ is a real-vector valued function. ...
2
votes
0answers
84 views

function over conditional probability

I need to create a scoring model out of estimated conditional probability functions for two events, A and B. Let 0.5 be the threshold value. Ideally, the probability is in the interval $[0,0.5)$ for A ...
3
votes
1answer
126 views

Calculation of Multivariate Coherence

I trying to detecting whether a data set of time series has a global change in frequencies. Calculating the average (or median) pairwise coherence, I feel, misses the point because I am trying to get ...
3
votes
1answer
140 views

How should I calculate the average repositioning distance for empty trucks given known supply and demand at the postal code level?

I have calculated estimates of the daily supply of empty trucks and daily demand for empty trucks at the US postal code level. I would like to optimize the routing of supply to demand to minimize the ...
3
votes
1answer
93 views

High-dimensional representation of arbitrary input

Given a symmetric matrix $A\in\mathbb{R}^{n\times n}$ with positive entries and zero diagonal, is it always possible to construct a high-dimensional configuration in Euclidean space, such that these ...
6
votes
1answer
265 views

Dense generalized hermitian indefinite eigenvalue problem

Lapack contains a driver routine to solve dense generalized Hermitian positive definite eigenvalue problems of the form $Ax=\lambda Bx$, where $A$ and $B$ are both Hermitian, and $B$ is positive ...
9
votes
2answers
771 views

Initially Bracketing Minimum for Line Search

Leafing through a few textbooks, I've noticed that the problem of initially bracketing a minimum during a line search tends be an afterthought (at least in my undergraduate texts). Are there well-...
15
votes
1answer
2k views

Visualizing discontinuous Galerkin/finite element data

I would like to visualize simulation results, obtained using the discontinuous Galerkin (DG) approach, within ParaView. Similarly to finite volume methods, the problem domain is divided into cube-...
5
votes
3answers
4k views

Storing a large, sparse array for R and Python

I've been working in R but sometimes switching to python. I'd like a more inter-language portable way of storing a large array than a csv file. (The particular csv file I'm dealing with is about 10^6 ...
11
votes
4answers
1k views

good (free) software for producing publishable images?

I am producing 1d and 2d images using Matlab right now for comparison of accuracy against a given model. I need to compare my methods with the standard Gaussian .wfn model and I am going to do that by ...
3
votes
1answer
148 views

What is the worst case complexity of the symmetric tridiagonal QR eigenvalue algorithm?

Ignoring eigenvectors, the shifted QR algorithm for computing eigenvalues in the symmetric tridiagional case costs $O(n)$ per iteration, converges globally, and converges cubically near the end. What ...
-1
votes
3answers
159 views

How to solve numerically such system of equations

I have a system of equations $$ S_{m}(\xi) +P_{m}(\xi)=f(\xi) $$ where $\xi$ can be choosen arbitrary in some domain in $\mathbb{C}$, $f$ is known, $P_m$ is a polynomial of degree at most $m$. ...
14
votes
4answers
6k views

Boundary conditions for the advection equation discretized by a finite difference method

I am trying to find some resources to help explain how to choose boundary conditions when using finite difference methods to solve PDEs. The books and notes which I currently have access to all say ...
4
votes
2answers
180 views

most adequate edit distance for misspellings in names?

Algorithms for edit distance give a measure of the distance between two strings. Question: which of these measures would be most relevant to detect two different persons names which are actually the ...
6
votes
2answers
190 views

Is there a backward stable $\tilde{O}(n \log(1/\epsilon))$ algorithm to factor a complex polynomial?

Finding the roots of a complex polynomial is in general extremely numerically unstable, as discussed in (1). According to Pan ((2), (3)), this produces a cubic complexity lower bound, and he presents ...
6
votes
1answer
168 views

Identifying the name/provenance of a technique to find the nullspace vectors of a matrix by random sampling and the conjugate residual method

I have got a large sparse matrix $A \in \mathbb R^{n \times n}$ and I want to find non-trivial elements in the kernel/nullspace of this matrix. How can this be done? I would like to learn more about a ...
1
vote
1answer
11k views

MATLAB Code Evaluation for Least Squares Regression (LSR) [closed]

Below is my own approach to implement the Least Squares Regression algorithm in MATLAB. Could you please take a look and tell me if it makes sense; if it does exactly what is supposed to do? EDIT: ...
3
votes
1answer
150 views

What is a good introduction to mixed quantum-classical modelling

Currently, I have some experience with classical molecular dynamics simulations, and I've had undergraduate course in quantum mechanics (the course was "analytical" one, no approaches to computer ...
15
votes
4answers
1k views

Testing numerical optimization methods: Rosenbrock vs. real test functions

There seem to be two main kinds of test function for no-derivative optimizers: one-liners like the Rosenbrock function ff., with start points sets of real data points, with an interpolator Is it ...
4
votes
0answers
105 views

Existing software/scripts for spiral graphs?

I am looking for existing software or scripts to generate spiral graphs from cyclical (time) data, as presented by Webber and Muller. The graphs shown in the paper look like a great means of ...
2
votes
1answer
132 views

Factor a non-symmetric matrix into the product of a sparse symmetric matrix and a diagonal matrix plus a low rank correction

I have a non-symmetric matrix, where the non-symmetry only appears at a subset of points. This arises due to the particular manner on which boundary conditions are applied in a Cartesian grid method. ...

15 30 50 per page
1 151 152 153 154 155 170