instruction stringlengths 43 28.1k |
|---|
Given a set of integers $\{l_1,l_2,\ldots,l_n\}$, where each integer is associated with a set $m_k\in\{-l_k,-l_k+1,\ldots,l_k\}$, I need to find all combinations $\{m_1,m_2,\ldots,m_n\}$ that sum to a given integer $M$.
As an example, let's say the input is $\{1,3\}$ and $M=2$. This means that $m_1\in\{-1,0,1\}$ and $m... |
I wrote a number of 1D/2D FE and FD programs as a bachelor student, but the main problem I continually came into contact with was gradient shocks related to convection/diffusion problems in convection-dominated flows. From my limited research this seems to be an inherent problem in continuous Galerkin FE methods.
Now I... |
It is necessary for me to find the shape functions on $L^2(\Omega)$(piecewise constant functions),
I searched a lot but that, could not find anything, all of them are about higher degree polynomial.
If we define the space as follow:
$${\cal Dp0}=\{v \in L^2(\Omega):v|_T \in {\cal p0(T)}, \forall T \in {\cal T}\}$$
whe... |
I try to familiarize myself with iterative eigenvalue solvers such as Lanczos. So I tried rewrite it to python directly according to wiki. But it doesn't seem to work.
The problem:
it approximates quite well the largest eigenvalue $\epsilon_{max}$ of matrix $A$
but the rest of eigenvalues obtained by solution of proje... |
I am trying to minimize a non-linear vector-valued function in MATLAB. As a test case for my code, I try to minimize a function whose solution I know apriori.
The problem is that one of the solutions is widely distributed in scale. They are [175,164,854,3.7e5,6000];
As you can see, the 3.7e5 has a wide difference in ... |
I just knew how to do Newton-Raphson iteration in time-independent 1D nonlinear differential equation. Then I applied to time-dependent 1D nonlinear differential equation, and I got confused.
Below is just test time-dependent 1D nonlinear differential equation I want to solve (I just made this up from heat equation, to... |
I would like to solve the following optimization problem
\begin{align}
\min_{x\in [0,1]^n} x^T p+ \frac{1}{2\lambda} x^T Q x
\end{align}
$Q$ is a positive semidefinite matrix. $\lambda>0$ is a constant (a real number).
I want to solve this problem repeatedly, with the slight change of $p$ and $Q$ in each iteration. Th... |
I know that in outflow boundary we assume a zero normal gradient condition and use upwind scheme for approximation. However, I saw this sentence in a book which I do not understand; "Convective fluxes are usually assumed to be independent of the coordinate normal to an outflow boundary." What does it exactly mean and w... |
In standard finite element method, when we want to find $L^2$ error of a solution, we only find the error on Gaussian points that are inside of each triangle, for $DG$ method can we do this in a same way or we should add some boundary error term, because of the jump?
|
Recently, I came across a comment claiming that almost all researchers doing Monte Carlo methods are doing it wrong. It went on to elaborate that merely choosing different seeds for different instances of a PRNG such as the Mersenne Twister is not sufficient to ensure unbiased results as bad collisions can occur. The W... |
I am kind of new in finite elements and I am solving simple "Poisson nonlinear" problem.
$- \nabla ((1 + u^2) \nabla u) = f$
$u = 0 \ \text{on} \ \Omega $
I am using Newton solver, where I have defined step as following
$J = s * ( -g )$,
where $ J = \int (2 \delta u \nabla u_h) \nabla v + (( 1 + u_h^2) \nabla \delt... |
I need to solve a tridiagonal system (positive definite, diagonally dominant) $Ax = b$ in a time stepping loop. $A \in \mathbb{R}^{N \times N}$ remains constant but $b$ changes during each time step.
I was thinking which of the following would be faster :
Compute and store $\mathbf{z_i}$ that solves $A\mathbf{z_i} ... |
I am solving an unsteady flow using the dual-time Navier-Stokes equation in which I write my momentum equation as:
$$\frac{\partial u}{\partial \tau} + \frac{\partial u}{\partial t} + \frac{\partial u^2}{\partial x} + \frac{\partial uv}{\partial y} = -\frac{\partial p}{\partial x} + \frac{\partial^2 u}{\partial x ^2}... |
I am trying to figure out how to deal coupling. I am trying to model a polymer chain. I have to deal with the angle between adjacent angles, dihedral angles, and vibration. I am able to compute all three separately: I create an acceleration matrix by computing the forces. The acceleration matrix has rows=dimension and ... |
Background & Problem formulation
I'm trying to write a simple program in C++ that performs adaptive numerical integration of vector valued integrands (in one variable), i.e.
$$\int_a^b \bar{f}(x) \ dx $$
where $\bar{f} = \{f_1, f_2, ..., f_n\}$.
I know that there are good libraries that can do this (for example GSL ... |
Recently, I am trying to solve 2D Euler Equation using FV-WENO reconstruction. For the smooth initial problem, component-wise WENO reconstruction works well. My problem is, if I want to solve double mach reflection problem, do I need to do characteristic decomposition? It seems that doing characteristic decomposition i... |
I have a standard set of linear equations $Ax=b$ where the Hessian matrix $A$ has the special block structure as shown:
$A=
\begin{pmatrix}
T & U\\
U^T & V
\end{pmatrix}$,
$x=
\begin{pmatrix}
c\\
d
\end{pmatrix}$
Where $A$ is square Hessian matrix and each dimension is of size $n = c_n + d_n$. This compound dimension... |
In Single-Photon Emission Computerized Tomography (SPECT) parallel beam reconstruction using Maximum-Likelihood Expectation–Maximization(MLEM), is it sufficient to scan the object around 180 degree? or it is required to perform full 360 scan?
|
I couldn't find a simple answer to this thing I'm trying to do in Matlab. I have a function file that does some calculation for a given parameter a:
[]=my_function(...,a)
...
Calculations to obtain some functions y_1(x),y_2(x),... for a given parameter a.
...
figure(1);
plot(x,y_1);
title('y_1(x)');
xlabel('x');
ylab... |
I'm working in laboratories where molecular dynamics data are almost always analysed usign block average as stated in the famous Allen and Tildesley book.
We divide the datas in blocks of size $M$ on which we compute our interesting quantities. We consider that for large enough blocks, the fluctuations converge so: $$ ... |
I am trying to write a program to compute the advection equation.
$$u_t +u_x = 0$$
I use the spectral method for the spatial derivative $u_x$ and the leapfrog method for the time derivative $u_t$.
That will give the an equation for the next time step:
$$u_{j}^{k+1} = u_{j}^{k-1} - \frac{\Delta t}{n}[f^{-1}(iN \pi f(U_{... |
What is the most efficient and numerically stable algorithm for computing the inverse CDF $F^{-1}(y)$ of a probability function, assuming that both the PDF $f(x)$ and the CDF $F(x)$ are known analytically but the inverse CDF is not?
Clearly, this is the same as finding the root of the nonlinear function $G(x) \equiv F(... |
A common approach to image reconstruction is to solve the convex optimization problem
\begin{equation}
\text{minimize} \quad \frac12 \| Ax - b \|^2 + \gamma \| Dx \|_1
\end{equation}
where $b$ is a vector of measurements (perhaps a blurry, noisy image), $A$ is a linear transformation that maps the reconstructed image ... |
I have a computer simulation system of bodies connected by springs, so their movement is governed by:
$x_{n+1} = x_n-\Delta tk(x_n-r)$
Where $r$ is the idea distance between every two bodies, and $\Delta t$ is the timestep.
Using the Backward Euler method, I end up with the equation:
$x_{n+1} = x_n-\Delta tk(x_{n+1}-r)... |
Hello I hope I'm asking this in the right community, please feel free to redirect me some better place if you don't think it fits here.
As I learned when I went to university half an eternity ago, modern CPUs typically have large pipelines for instructions to gain performance by being able to do many simple things in p... |
I regularly compete in so called "Programming Contests", where you solve difficult algorithmic problems with your own code and problem solving skills during a limited time-frame. For referential examples of what those might look like, search for competitions like e.g. Google Code Jam, or ACM-ICPC.
(If you know what pr... |
I have a sort of reverse problem, and I'm not sure if there is a simple solution.
I have a tridiagonal Hermitian matrix:
$$
A = \begin{bmatrix}
0 & a_1 & 0 & 0 & 0 \\
a_1 & 0 & a_2 & 0 & 0 \\
0 & a_2 & 0 & a_3 & 0 \\
0 & 0 & a_3 & 0 & a_n \\
0 & 0 & 0 & a_n & 0 \\
\end{bmatrix}
$$
where $a_n$ are unknown; however, I kn... |
I wanted to try to implement part of the method in the following article using Fourier transforms.
http://www.shodor.org/media/content/jocse/student_submissions/nocito2010/nocito2010_pdf
Right now I am using the FFT to approximate the gradients at each point and using this to calculate the force on each body. I am cur... |
I was told by a class mate that the smallest exponent that we can represent by a single-precision floating-point number (which uses 8 bits for the exponent) is $-126$ and the greatest is $127$.
I know that exponents are represented using excess or bias notation, that is, we represent all exponents, including the negati... |
Suppose I have an algorithms which I want to implement ona GPU. The algorithm consists of a main loop, and all iterations of the loop can be run in parallel. Also, each iteration of the loop has an inner loop whose iterations can be run in parallel. Lets say that I need N iterations of the main loop, and M iterations o... |
I'm trying to use CVX to solve SDP problem.
I have a constraint with positive definite matrix, but if i read the document of CVX, I can only find variable with positive semidefinite matrix.
Can anyone know how I should define positive definite matrix in CVX?
|
I want to solve a system of coupled nonlinear 1-D PDE $(\partial_{tt} + \alpha\partial_t)u_i(x,t)=\partial_{xx}(\sum_{j=1}^{j<i}ju_j(x,t)+i\sum_{j=i}^{n}u_j(x,t))-\sin(u_i(x,t))+f$, using method of lines and for this I defined a spatial grid of about $N\approx1000$ points. Since my PDE is second order both in time and ... |
I've been reading books which refers to vector update operations of the form: y := y + ax, where y and x are vector variables and a is a scalar as SAXPY. I understand ax plus y part, but why "single precision"?
I'm seeing it in the context of complexity estimates of iterative linear solvers, where I assume that most va... |
Intro:
I am developing a Galerkin FEM code in matlab - starting small with a simple 1D ODE. The equation I'm trying to solve is: $$a u_x = cos(x), x \in [0, 2\pi]$$ Which has a known exact solution $$ u = sin(x)/a $$
When I solve the equation using my code on an odd number of linear elements (nodes = N+1), the solution... |
I have seen sparse matrix-matrix multiplication commonly referred to as SpGEMM, which means general/generalised sparse matrix-matrix multiplication. I've seen it once or twice (forgot where) as SpMM.
My question is, what is "general" referring to? The type of sparse matrix? Does there exist a non-general sparse matrix... |
Does anyone know of a book that will outline which quantum chemical methods are appropriate for what problems? I am trying to make informed choices before I start using computational resources. It is very difficult to figure out if a particular method is appropriate for the material and problem I am looking at. If ther... |
If we have the weak form of an equation like Poisson equation with discontinuous Galerkin method, to get the weak form of continuous discontinuous Galerkin method what terms are changed?
Is it true if just remove the term contained $[u][v]$ in the following:
$$a(u,v)= (f,v)$$ where$$a(u,v)=\sum_{T \in \cal T}(\nabla u... |
I often hear the phrase "good" or "bad" parallel scaling/efficiency.
What exactly do people mean when they say that?
For example, let $p = 1,\ldots 16$ be the number of processing elements, and A and B be parallel algorithms and consider weak parallel scaling.
If the efficiency of $A$ decreases linearly from $100\%$ (a... |
I need to build some CNN's using very large numbers of photos, to classify which photos contain certain features.
I've run into a number of road blocks.
As much as I love both Linux and virtualization, I've found that Linux-only solutions like Berkeley's Caffe and NYU's pre-trained OverFeat don't work for large scale ... |
I've read in several articles/answer written by CS (grad) students or other people that the advanced knowledge of pure math that's required for certain areas of computer vision is sometimes too high for the CS student themselves, and requires the involvement actual math people.
I do wonder if it's true at all? I don't ... |
The lifting operator $\mathbf{r}(\mathbf{v_h})$ for the '2nd version' of Bassi-Rebay scheme for elliptic problems in $d$ dimensions is defined as
$$
\int_{\Omega_h} \mathbf{w}_h \cdot \mathbf{r}(\mathbf{v}_h)\,\mathrm{d}\mathbf{x} = -\int_{E} \{\mathbf{w}_h\}\cdot \mathbf{v}_h \,\mathrm{d}S,
$$
where
$$
\mathbf{v}_h ... |
So-called quadtree and octree grids are quite attractive for applications requiring adaptive mesh refinement. They are for example used in Gerris and Paramesh. Is anyone aware of a good file format for such grids, and supporting visualization software? See also this answer in the Gerris FAQ. The only potential candidat... |
I recently started to perform natural resonance theory (NRT) analysis with NBO6. This program may automatically create a chemical markup language (cml) file with the treated structures. Unfortunately I don't speak cml well enough to judge if the file generated is any good.
What I would like to do is to convert this gen... |
I'm working on some problems that ultimately boil down into a simple assembly of an overdetermined system of equations, $Ax=b$, where $A$ is $m \times n$ for $m \gg n$. I'm leveraging Armadillo's C++ library, which I'm linking against MKL. I computed my root mean square error on my training data by computing $E = \frac... |
I am a beginner in CFD having written few codes for laminar flow cases using SIMPLE and some other explicit solvers. Now, I want to use my solvers and some other models to solve for the turbulent flow cases. In this regard, problem of decaying turbulence got my attention.
Since I absolutely do not know about how to mak... |
I want to solve the problem below
\begin{equation}
\begin{aligned}
\eta u-\Delta u &=f, &\text{in $\Omega$}\\
\end{aligned}
\end{equation}
where $\Omega=(0,1)\times (0,1)$, My boundary are like this $\frac{\partial u}{\partial n} = 0$ if $y=0$ or $1$, and $u=0$ if $x=0$ or $1$. Using ghost node... |
I implement Runge--Kutta method for time integration of the system of nonlinear conservation laws
$$ u_t + f(u)_x = 0. $$
As the system is nonlinear, we have to recompute time step dt on each time step. Then we have to find new current time by using code like this:
cur_time = cur_time + dt
However, if we want to integ... |
In the book Mixed Finite Element Methods and Applications by Boffi, Brezzi, and Fortin there is a pretty long discussion about why the Raviart-Thomas (RT) projection is only defined for functions in $H^1$ (Remark 2.5.1). In addition, For DG methods there are similar projections, only defined for functions in $H^1.$ ... |
I'am trying to implement a path following algorithm based on MPC (Model Predictive Control), found in this paper : Path Following Mobile Robot in the Presence of Velocity Constraints
Principle: Using the robot model and the path, the algorithm predict the behavior of the robot over N future steps to compute a sequence... |
I have many 3x3 real symmetric matrices for which I need to determine the eigenvalues. Wikipedia gives a nice non-iterative algorithm for this case, which I have translated into C++:
#include <iostream>
#include <vector>
#include <cmath>
#include <boost/math/constants/constants.hpp>
template<typename Real>
std::vector... |
I am solving incompressible 2D Navier-Stokes equations with zero y-component velocity. The geometry is a simple 2D pipe of a length $L$ and diameter $W$ and there is only two boundary conditions:
Non-slip on the pipe walls: $u = 0$
Flow velocity at inlet $u = U_{max}$
and so, the two equations I have are:
$$ \frac{\p... |
Consider this integro-differential heat equation taken from SciPy documentation page:
$
\nabla^2 P = \alpha \left(\iint_\Omega \cosh(P)dx dy \right)^2
$
which was found in this question.
In the considered python code the Newton-Krylov iterations are applied and perform quite nice for $\alpha=10$. However this method f... |
I need to efficiently rotate a 2D (and 3D) vector in a CUDA kernel. I was thinking about generating random unitary rotation matrices. I don't need to know the angle, it just has to be randomly distributed.
Is there some clever way to avoid the computational complexity of the division and the square root for the norm? O... |
Suppose that $y(t)$ is the exact solution of the ivp $$y'(t)=f(t,y(t)), y(0)=y_0$$ and $u(t)$ is any approximation to $y(t)$ with $u(0)=y(0)$. Define the error $e(t)=y(t)-u(t)$.
How can I show that $e(t)$ satisfies the ivp $$e'(t)=f(t,u(t)+e(t))-u'(t), e(0)=0$$ And if we say that $f(t,y)=\lambda y$ for some constant... |
I am trying to use the subroutine twofft which in turn uses subroutine four1 in the book(Numerical Recipes in Fortran) to compute the FFT of two double precision data arrays. If you carefully look at the twofft routine, the arrays fft1 and fft2 are declared as complex which are sent as arguments to four1 which declares... |
The goal is to couple system of two nonlinear differential equations by applying appropriate space and time discretization and Newton-Raphson scheme.
The equations system is
$$\left[
\begin{array}{c}
F_{1}(u,v) \\
F_{2}(u,v)
\end{array}\right]
=
\left[
\begin{aligned}
-\frac{\partial^2 u}{\partial x^2} &= v \... |
I need to find $X$ for which the following expression is minimized:
$$ \min ||Y - F^{-1}(X)||_2 + ||X||_1 $$
where $Y$ is an array (of length approx 44000, an audio sample I will be reading using Matlab's audioread( ) function) and $F^{-1}$ is the inverse fast Fourier transform ifft( ). Subscripts indicate 2-norm and 1... |
I am using staggered grid FDTD for solving elastic wave equation. A description of which can be found at (geodynamics.usc.edu/~becker/teaching/557/reading/Virieux1987.pdf). I have generated a synthetic seismogram (description below) using it.
Synthetic seismogram : To generate a synthetic seismogram, a source is place... |
I am interested in evolving the (cubic) self-focusing nonlinear Schrödinger equation,
$$i\frac{\partial \psi}{\partial t}+\frac{1}{2}\frac{\partial^2 \psi}{\partial x^2}+\left|\psi\right|^2\psi=0$$
from an initial condition $\psi(x,t_0)=f(x)$, where I am going to restrict my attention to a finite region $x\in [a,b]$. S... |
I'm working on a custom discrete and constrained multi-objective optimization problem and I'd like to know which libraries or platforms that implement algorithms like SPEA2 and NSGA in C++ and that allow the addition of custom algorithms.
I'd like it to be easily customizable to my problem, efficient, cross-platform an... |
Suppose I want to solve the below equation numerically.
$$
\frac{dy}{dx}=y
$$
I'd like to normalize the space discretization by choosing
$$
a\bar{x}=x
$$
where I assume $\bar{x}$ is unity.
Then the equation is
$$
\frac{1}{a}\frac{dy}{d\bar{x}}=y
\qquad\rightarrow\qquad
\frac{dy}{d\bar{x}}=ay
$$
Thus, my discretization ... |
I'm not sure if this SE site is the best one for this question, so let me know where it should be moved to if you think it doesn't belong here.
After learning about the quadratic formula, I'm interested in visualizing how the nature of the roots of a quadratic equation, $ax^2+bx+c$ change with respect its discriminant... |
I have a simulated system as shown in the following image:
$L_0$ is attached to two other bodies $L_1$ and $L_2$. Furthermore, body $L_3$ is also in the simulation (it is attached to $L_2$ but that is not important). Each body has a position, so $L_0$'s position is $\vec{P}^0 = (x_0, y_0)$, $L_1$'s position is $\vec{P... |
Consider the following Schrodinger equation for the harmonic oscillator with real $x$:
$$
−ψ''(x) + x^ 2 ψ(x) = Eψ(x).
$$
I solve the last equation using shooting method and implicit Runge-Kutta integration. For the eigenvalue $E=1$, the corresponding eigenfunction looks like:
where I set $x=4$ as $+∞$ and $x=-4$ as $... |
I need to calculate the second variation of displacement interpolation function $u = \sum N_a u_a$ in Finite Element Analysis, where $N_a$ are the shape functions and $u_a$ are the nodal values. Someone told me the second variation is 0. The reason is as shown below. But I don't understand why $\delta u_a$ is a constan... |
I am having an unconstrained optimization problem, where the Hessian is positive semidefinite and block diagonal. The function is strictly convex, hence, the curvature condition ($ s^{T}_{k}y_{k} > 0$) is supposed to be always satisfied. Here, $s_{k}$ and $y_{k}$ are the usual secant pairs, where $s_{k} = x_{k}-x_{k-1}... |
I would like to know how to compute the "best" cell center for pressure calculation in case of concave polyhedral cells, if it makes any sense. My face centers are defined as faces barycenters and I'm just wondering how to correctly determine the pressure-point.
Any hint?
|
Consider the PDE
\begin{equation}
\frac{d^2}{dx^2} g(x) = \frac{d}{dx} \delta(x-x_0),
\end{equation}
with $x, x_0 \in [0,1]$ and $g(0)=g(1)=0$. What is the best method to discretise the derivative of the delta function using finite differences?
|
My problem is
$$\text{minimize}: \phantom{2} f(x) \\
\text{subject to }: \phantom{2} x_4 \ge 0$$
where $x=(x_1,x_2,x_3,x_4)$.
I know that the fourth component $x_4$ of the desired local minimizer is greater than zero, so the inequality constraint at the solution is inactive. However, there are other local minimizers ... |
This is a 16-bit PRNG function, transcribed from assembly to C for easier reading:
#define LOW(exp) ((exp) & 0x00FF)
#define HIGH(exp) (((exp) & 0xFF00) >> 8)
uint16_t prng(uint16_t v) {
uint16_t low = LOW(v);
uint16_t high = HIGH(v);
uint16_t mul_low = low * 5;
uint16_t mul_high = high * 5;
... |
Can any on help me understand how from the simple delta function on the right hand and performing the integration we can get values as in the left? Note that $h = x_i + 1 - x_i$
The diffusion and mass matrices are given by
$$D_{ij} = \int_0^L \frac{d\phi_i}{dx}\frac{d\phi_j}{dx} dx =
\left\{\begin{matrix}
\frac{1}{h_1}... |
I am a bit confused with nodal basis functions $h_i$ and the corresponding lagrange polynomials $l_i$. For linear functions, it's quite clear, on $[x_0,x_1]$ the nodal basis is $h_0 = l_0 = 1-x$.
But with quadratic basis functions, there are $l_0^1 = 1-x^2$ and $l_0^2=\frac{(x-1)(x-2)}{2}$ associated with the node and ... |
I am learning how to use pseudo random number generators but the instructor just told us how they work without explaining why they work.
For example, can one prove that the numbers generated by LCG methods are really uniform deviates in [0,1)? Experiments show that it looks like yes. But can we prove this mathematicall... |
I want to run a simulation which involves rates between different states. Each state is label by a pair of indices $(m,n)$, so that a certain rate $R_{(m,n)\rightarrow(m',n')}$ requires four indices in total.
What I try to do is to convert these double indices into a single index $j$. This would allow me to use stan... |
A factory has $A$ and $B$ products. $A$ is made with $4X + 2Y$ raw materials. $B$ is made $2X + 4Y$ raw materials.
We want to maximize total profit.
Input
amount of profit $A$ per item, amount of profit $B$ per item and
number of $X$ and number of $Y$ raw materials.
Output
Number of A which will be produced,
number ... |
I wish to solve the two-dimensional Navier Stokes equations using multigrid method on a collocated grid using the Predictor-Corrector method mentioned below. But first, let me elaborate on what I had already did. Previously, I used a staggered grid and a artificial compressibility based solver. So my governing equation... |
I'm using a lot of linear solvers and preconditioners, but mostly, they are magical black boxes to me. Since I'll also have to implement some of them in future, I would like to learn a bit more, exactly how they work an which one is "good" for what.
Since I'm quite fit in the basics (linear algebra, numerics), I do not... |
I have a model given by a system of differential equations
$$ \frac{dy}{dt}=f(y)$$
with $y=(y_1,y_2,y_3)$ and $f:\mathbb{R}^3 \to \mathbb{R}^3$. The system works as follows : integrate the ode's with initial values $(y_1^0,y_2^0,y_3^0)$ until $y_1$ reaches a certain value (say $y_1=0$), get the time $t_f$ when this ... |
I am trying to solve following set of equations:
A(i,i-2)*u(i-2) + A(i,i-1)*u(i-1) + (A(i,i)+β(i) )*u(i) + A(i,i+1)*u(i+1) + A(i,i+2)*u(i+2)= B(i) + β(i)
where i=1:1000000
If values of β varies(several orders) greatly then what would be the best strategy to solve this equation numerically. Should I expect oscillations ... |
Which one of the following is suitable for judging convergence in Two-Fluid Flow Solver?
1) Absolute Residual (L^2-Norm).
2) Relative Residual.
3) Fraction Change in Velocity, Pressure and Volume Fraction.
I am asking this question because due to large value of momentum exchange coefficients one can get very high value... |
In these notes (section 2.3), it is stated that:
A point $x^*$ is a minimizer of a function $f$ (not necessarily convex) if and only if $f$ is subdifferentiable at $x^*$ and $0 \in\partial f(x^*).$
Could anybody provide me with references for a proof of the above statement?
Is there a reference where we can learn mo... |
Analytically, the expression
$$\exp(\ln(x))-x \enspace,$$
should give 0.
However, in Matlab, it does not.
x = linspace(1, 10, 10);
exp(log(x)) - x;
for $x \in [1, 10]$, the answer is
0
0
-4.44089209850063e-16
0
0
0
0
-1.77635683940025e-15
1.77635683940025e-15
1.77635683940025e-15
What is ... |
Consider a voice recording split into it's phonemes as our sample $S=(s_1,...,s_k) \in \Omega = P^k$. The number of phonemes is $|P| = 40$. Then I have a word $w = (w_1,...,w_n) \in P^n$. I want to analyze with what chance I can reconstruct $w$ by just cutting out parts of the sample and chaining them together in the r... |
On a grid I am having the values of a physical quantity say for example Temperature, at the E,W,N,S and P node all of them being calculated using a second order discretization scheme. I want a second order accurate estimate of the value of Temperature at point X. How to get that.
Note- I can get a second order accurate... |
I have a symmetric $ 3 \times 3 $ matrix $A$ and I need to compute the eigenvectors and eigenvalues of this. I know that I can use something like Lapack, but I also know that this can be computed analytically.
The physics suggest that this will have only real eigenvalues, but the analytic expression allows for imaginar... |
What is computational complexity for computing perimeter of a polygon of $n$ vertices? The polygon is not necessarily regular and can be convex or non-convex.
|
I'm working with the cylindrical coordinates. I'm using the central difference to convert the radial part of Laplace operator into a matrix.
$\nabla^2 u = \frac{\partial ^2u}{\partial r^2}+\frac{1}{r}\frac{\partial u}{\partial r}$
which in the discretized form gives:
$\nabla^2 u_i = \frac{u_{i+1} - 2u_i +u_{i-1}}{h^2}+... |
I want to program an integration routine in C++ using the GSL library but for complex functions.
How should I split my integrand to apply the gsl_integration_qag function on it.
Just integrate the real and imaginary parts by themselves is not correct I guess.
I have the following function:
$$S(a,N) = S(a, \infty) - \su... |
I am totally confused between ODEs which I am familiar with, and differential algebraic equations (DAE) and algebraic differential equations (ADE). Are they the same but just different names or what is the key difference between them (their nature and solution methods)?
|
I'm interested in a function that would allow me to weight my system similar to using the error function; however computing the error function at scale would be a bottleneck. Is there something like erf, but that is much faster to compute and with the following properties?
Given any value [-inf, inf], returns an output... |
Is there a divide and conquer algorithm for optimizing weakly unimodal continuous functions?
Adding more details:
My function has a flat line on the left and right and then there is a global minima in between but this global minima repeats for a while on what would seem like a straight line. To the left of the minima... |
Are there papers that deal with the (nondimensionalized) Stokes equation for incompressible fluid flow in a "doubly mixed" form like the following?
\begin{align*}
0&=\underline{\epsilon} + \frac{1}{2} (\vec{\nabla} \vec{u}+ (\vec{\nabla} \vec{u})^{T})\\
\vec{f}&= \vec{\nabla} \cdot \underline{\epsilon} + \nabla p\\
0&=... |
I have implemented Carlson's algorithm for $E(k)$ from Numerical computation
of real or complex elliptic integrals (available from ArXiv eprint, see
also DLMF). It is essentially his formula (46) which simultaneously
computes $K(k), E(k)$ for complex $k$ using the arithmetic-geometric sequence $a_m, b_m$ to
get
$$K(k) ... |
I am using the PETSc libraries, in particular using the SNES solver package to solve a nonlinear matrix equation. Is there a way of parallelising the solution to this problem problem without using the DMDA distributed array methods?
I have looked through the pets manual and the coverage of parallel nonlinear solvers ... |
Given a block structured grid with a refinement factor of two, what are some of the common ways to discretize a Laplacian near a refinement boundary? See also the picture below, in which $u_H$ and $u_h$ indicate coarse and fine values with the given indices. I'm particularly interested in the computation of $\nabla^2 u... |
I have a linear system of equations that can be expressed $$A=B+AB,$$ where $A$ and $B$ are real, symmetric matrices. I would like to solve for $A$ given $B$. At present, I solve for $A$ directly via $$A=B(I-B)^{-1},$$ with the inverse computed via $LU$ factorization. For most relevant inputs $B$, the inversion goes we... |
I'm looking for an algorithm to take the entire vector space of length n Boolean vectors and partition it into vectors that are the same up to a rotation of the entries.
For example if n=3 the partitions would be:
-{(0,0,0)}
-{(0,0,1),(0,1,0),(1,0,0)}
-{(0,1,1),(1,1,0),(1,0,1)}
-{(1,1,1)}
One (seemingly slow) way to do... |
I want to know what are the differences between two data structures in MATLAB: Structure Arrays and Cell Array.
In what circumstances we can use each of them?
|
I have a collection of different scrap aluminium alloys. I want to mix them together to make new alloys with customer-defined compositions.
Sometimes this will involve little more than melting down several tonnes of scrap aluminium cans to make ingots, which are then sold to manufacturers of aluminium cans so that the... |
I have to vectors $X_1$ and $X_2$ with 3 dimensional points $p_i$ and $p_j$ contained. As long as $X_1$ is not empty, I want to find the closest pair $p_i$ and $p_j$. The point $p_i$ of this pair I need to remove from $X_1$ and add to $X_2$. To make the following analysis easier, both $X_1$ and $X_2$ contain $n$ points... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.