This tag concerns computational problems central to mathematical and scientific computating. The scope includes algorithms, numerical analysis, optimization, and linear algebra, computational topology, computational geometry, symbolic methods, and inverse problems.

learn more… | top users | synonyms

0
votes
0answers
10 views

Finding a quadratic function the bounds any function below.

Given a function $f(x)$ I need to find another function $g(x)$, where $g(x) = Ax^2 + C$, where $A$ and $C$ are constants, such that $g(x) \le f(x)$, for all $x$. I can use a computer to do this for me ...
2
votes
1answer
21 views

What is the algorithm used by Matlab for computing the Bessel function?

I am quite curious about the algorithm behind. It is definitely not the power series expansion, right? So, what is the trick? I cannot find it in the help file of Matlab.
1
vote
0answers
12 views

Good numerical method for finding the eigenvalues and eigenfunctions of the Dirichlet-Laplacian?

Let us confine ourselves to 2D. What is the best numerical method for solving the eigenvalues and eigenfunctions of the Dirichlet-Laplacian operator? Possibly, it depends on the shape of the domain? ...
-1
votes
0answers
14 views

Rejection method in R

I need to generate pseudo random numbers using the rejection method in R X is a random variable normally distributed N(6,1). I did as follows, but I get a error message. Can someone give me a hint? ...
-2
votes
0answers
49 views

What are the Correct Conditions for Akra-Bazzi Master Theorem?

The Akra-Bazzi method solves recurrences of the form: $$T(n) = g(n) + \sum\limits_{i=1}^k a_iT(b_in + h_i(n))$$ In the Wikipedia article about the topic, it says that the condition on $g(n)$ is: ...
1
vote
0answers
21 views

How to use CVXOPT to solve an semidefinite programming problem

I'm using Sage to solve a problem and would like to use cvxopt to solve a sdp problem. Specifically, I have a list of expressions of the form $$c + \sum_{i,j} a_{i,j} q_{i,j}$$ where each $c$ and all ...
1
vote
1answer
21 views

Can gauss quadrature integrate this function exactly $f(x) = \frac{2x}{\sqrt{x^3 + 2x + 5}}$?

Suppose I had a function $$f(x) = \frac{2x}{\sqrt{x^3 + 2x + 5}},$$ that I wanted to integrate on the interval $[\pi, 2\pi]$. Can Gauss quadrature of order $2$ (ie. with two points ...
0
votes
0answers
13 views

Help with Hidden Markov model and SMC methods

So its quite a long background i don't really know where to start but here goes. The background is as follows: Background Observation model As the target is moving, it measures the signal (RSSI) ...
0
votes
1answer
25 views

Is the problem decidable with Turing machine M that inputs x,y,z does M halts on these 3 instances

Is the following problem is decidable? Given a Turing machine M inputs x,y,z does M halts on these 3 instances? Hint: make y and z any two artificial inputs that the program stops with these inputs. ...
0
votes
0answers
33 views

Positivity of the last component of non negative least squares based on active set method

I have followed the instructions given in Lawson and Hanson book for non-negative least squares using active set method. I am having a trouble in justifying one of the statements they have made about ...
0
votes
1answer
29 views

Finding distance from valid number

I have a game related problem that is pretty complex. Here is the simplified version of the problem. I have a list of "good" numbers. ...
0
votes
0answers
20 views

Computationally check for roots/positiveness of a big polynomial in a given interval

For a proof, I need to check that given a little interval $(0, 0.28)$ some concrete polynomials $\in \mathbb{Q}[w]$ (polynomials in one variable ranging over the real numbers, with degrees around 50) ...
0
votes
0answers
18 views

Help with a proof of the computability of the monus function by recursion

Reading a text on computability by a guy called Cutland, and he basically asserts the following, which is suppose to be a proof by recursion that x ∸ 1 is a computable function: (1) 0 ∸ 1 = 0 (2) ...
-1
votes
0answers
8 views

Numerical Solution of Matrix with Diagonal Elements of Highly Varying Order

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 β ...
1
vote
1answer
24 views

compute probability density function of a bivariate function without sampling

Suppose $X_1 \sim f_{X_1}(x_1)$, $X_2 \sim f_{X_2}(x_2)$ are random variables with known probability density function. Is there any way to compute the probability density function of a bivariate ...
1
vote
1answer
44 views

How to find b ( the most efficient way) in $ax^2+bxy+ cy^2$?

I know the very basic way to find the b in this quadratic expression: $$P(x,y)=ax^2+bxy+ cy^2$$ I can first evaluate $P(0,1)=c$. Similarly, I can do $P(1,0)=a$ and then I can do ...
0
votes
0answers
10 views

solving a self-consistency relation.

I would like to solve a self-consistency relation analytically or numerically. The self-consistency relation is: Sigma = int_{-pi}^{pi} dk 1/(E_F - cos(k) - Sigma) Does someone know the best ...
0
votes
1answer
20 views

Simple Formula to workout intervals

Say we have scale from $1$ to $12$ We pick two numbers on this scale and trying to figure the shortest distance. Say $x_1 = 2, x_2 = 4$ and we need to figure out y which in this case would be $y = 2$ ...
1
vote
0answers
52 views

Looking for a perfect square

I have a base number and I add to this number in increments. Is it possible to calculate where is the nearest perfect square without going through all the numbers? Example: Base number 11 Increment ...
1
vote
0answers
31 views

How to find the ground energy state solution in a quantum harmonic oscillator?

Recently, I came across a question which asks to solve the Schrödinger equation for a harmonic oscillator on $ [a, b] $ : $-\frac{\hbar^2}{2m}\frac{d^2\psi}{d x^2} + \frac{1}{2} m \omega^2 x^2 \psi = ...
1
vote
1answer
32 views

n-th number with given prime divisors

I would like to compute th $n$-th positive integer whose prime divisors are among numbers $2$, $3$ and $5$. $n$ is at most $12500$. My first approach was sieving but i found out that there are less ...
9
votes
1answer
217 views

How many numbers $ N \le 10^{10}$ are the product of $3$ distinct primes?

How many numbers $ N \le10^{10}$ are the product of $3$ distinct primes? I can realistically calculate any $\pi(n), n < 10^{15} $ but I don't think it's possible to list all primes $>10^8$ in ...
0
votes
2answers
22 views

Are there alternatives to polygons in mathematical (computational) modelling?

So polygons are pretty standard in computer graphics, but from a mathematical perspective, one'd expect something more refined and sophisticated to be possible right? Polygons are not very ...
0
votes
0answers
9 views

Understanding the bound given by Johnson–Lindenstrauss lemma

Here I choose to use the statement made by S.Dasgupta: For any $0<\epsilon<1$ and any integer $n$, let $k$ be a positive integer s.t. $$k \geq 4(\epsilon^2/2-\epsilon^3/3)^{-1} \ln n $$ Then ...
2
votes
0answers
25 views

Egyptian fraction with least possible sum

Suppose that $~a~$ and $~b~$ are coprime positive integers. Then there exists representation of $~\frac{a}{b}~$ as egyptian fraction: $$~\frac{a}{b} = \frac{1}{d_1} + \cdots + \frac{1}{d_s} ~$$ There ...
0
votes
0answers
19 views

Short-term stability

In numerical analysis, if we get a solution for a differential equation stable for a particular time (not for infinity), what we call this stability? Thanks
1
vote
1answer
21 views

Algorithm for generating all elements of a set consisting of specific $n$-tuples

I was working on functional analysis last night, and then my mind got distracted by the following problem. Consider a set $$I=\{0,1\}$$Now consider a subset of $\mathbb{R^n}$ $$X=\{(x_1,x_2,\dots ...
4
votes
2answers
77 views

Strange divisors

Let $~m~$ and $~n~$ be positive integers. Let's call (my term - not sure there is any official term for such thing) number $~m~$ a "strange divisor" of number $~n~$ if dividing $~n~$ by $~m~$ we get ...
3
votes
2answers
88 views

What programing language Thomas Hales used in 1998 to prove Kepler’s conjecture?

Mathematicians have been studying sphere packings since at least 1611, when Johannes Kepler conjectured that the densest way to pack together equal-sized spheres in space is the familiar pyramidal ...
0
votes
1answer
103 views

Pseudo-primality test for Mersenne numbers faster than Lucas-Lehmer test?

Definition Let $M_p=2^p-1$ with $p$ prime and $p>2$ . Lucas-Lehmer Test $M_p$ is prime if and only if $S_{p-2} \equiv 0 \pmod {M_p}$ where $S_{k+1}=S^2_{k}-2$ and $S_0=4$ . Pseudo-Primality ...
1
vote
1answer
49 views

Find binomial coefficient by its value

Given any positive integer $~m~$ there always exist pair of positive integers $~(n,k)~$ such that $~\binom{n}{k} = m~$. At least we can take $~n = m~$ and $~k = 1~$. How can we efficiently find all ...
0
votes
0answers
46 views

Good books on Algorithms for a math major without any programming experience?

I couldn't find this question anywhere else so it may not be apt. I am an undergraduate mathematics major and during my discrete math class I really enjoyed the study of algorithms and recursive ...
1
vote
1answer
20 views

Expected number of rows of the full rank matrix

Let A be a m by n random matrix over finite fields F_q. Suppose the rank of A is n. How much does expected number of m? I think m maybe qlogq by bins and balls property But I do not know exactly ...
0
votes
0answers
17 views

Matrix reduction in Computational Topology: An Introduction

I'm working on learning Persistent Homology from "Computational Topology: AN Introduction" by Herbert Edelsbrunner and John L. Harer. In section VII.1, Persistant Homology, they start with a ...
30
votes
0answers
412 views

On Ramanujan's curious equality for $\sqrt{2\,(1-3^{-2})(1-7^{-2})(1-11^{-2})\cdots} $

In Ramanujan's Notebooks, Vol IV, p.20, there is the rather curious, $$\sqrt{2\,\Big(1-\frac{1}{3^2}\Big) \Big(1-\frac{1}{7^2}\Big)\Big(1-\frac{1}{11^2}\Big)\Big(1-\frac{1}{19^2}\Big)} = ...
0
votes
0answers
15 views

Bezout coefficients with least absolute sum

Let $a$ and $b$ be some integers and $d$ is their gcd. By Bezout's identity there exist such $x$ and $y$ that $ax+by=d$. I wonder when sum of absolute values of $x$ and $y$ is minimal? I'm ...
0
votes
0answers
34 views

How to Solve an Integral Equation for an Unknown Integrand numericlaly?

I am working on an astrophysical research in which we relate the cumulative number of Damped Lyman Alpha HI clouds/galaxies, namely their number densities, $\frac{dN_{DLA}}{dz}(>M, z=0),$ to the ...
2
votes
2answers
250 views

Playing with Fermat's little theorem

Fermat's little theorem states that if $~p~$ is a prime number then for any integer $~a~$ the number $~a^p - a~$ is divisible by $~p~$. What if one fixes the exponent $~n~$ and tries to find all ...
1
vote
1answer
42 views

Proper code for $p\to q$ in GAP

I’d like to know if gap> IsBool(not(p) or q)=true; is the only code for checking the trueness of a conditional statement ...
0
votes
2answers
30 views

Using only postage stamps of value 64 and 55, how can I work out the way to get closest to a high parcel value?

Searching has shown many questions like this for values of 4 and 7 cents, but nothing for higher values. For British postage, first class stamps are £0.64 and second class are £0.55. Low value stamps ...
0
votes
1answer
17 views

In the Miller–Rabin primality condition why do we know the odd power case is congruent to 1?

A prime number n satisfies $a^{d} \equiv 1\pmod{n}$ or $a^{2^r\cdot d} \equiv -1\pmod{n}$ where $n - 1 = 2^s·d$, d is odd and $r = 0, 1, ..., s-1$ Why does the second condition being false imply ...
4
votes
3answers
162 views

What exactly are the numbers we use everyday?

Pi can be defined as diameter / circunference of a circle. But what is a circle? You can't tell a computer: "build a circle and divide its diameter by its ...
2
votes
1answer
33 views

Harshad numbers with given sum

By definition Harshad number for base $~10~$ is any number divisible by sum of its decimal digits. Wikipedia gives some information on such numbers but i still have some questions and unforunately i ...
1
vote
0answers
20 views

A Maths Budgeting Puzzle

A maths puzzle is as follows: Bonger have a printing budget of $119.40. Bonger have 5 children. Each children may do some printing, subject to the printing limit that their father impose, at any ...
0
votes
0answers
11 views

Determining eigenvalues of a differential or integral operator in Matlab?

Say I have a differential operator such as $L[\phi] = \frac{\partial \phi}{\partial x}$, or $L = \Delta \phi$, or an integral operator such as $L[\phi](x) = \int_{\partial D} \log(x - y) \phi(y) ...
1
vote
0answers
44 views

Can this integral be computed? $\int_E^{\infty} \frac{1}{4\pi t} e^{\omega^2 t - \frac{|x - n - y|^2}{4t}} dt$

I am working with periodic Green's functions for a scattering problem and the form of the Green's function given is as follows - $$G(x, y) = -\sum_{n \in \mathbb{Z}^2} e^{i n \cdot \alpha} ...
0
votes
0answers
29 views

Product of first values of totient function

Let $~p~$ be prime and $~n~$ some positive integer below $~10^9$. Is there an efficient way to compute product $~ \phi(1) \cdots \phi(n) \mod p~$? It is known that $~p > \sqrt{n}~$ (i don't know if ...
0
votes
1answer
48 views

Can this integral be evaluated numerically?

I am working with periodic Green's functions for a scattering problem and the form of the Green's function given is as follows - $$G(x, y) = -\sum_{n \in \mathbb{Z}^2} e^{i n \cdot \alpha} \int_0^E ...
2
votes
1answer
98 views

Largest prime gap under $2^{64}$

Thanks to Tomás Oliveira e Silva's extensive calculations, it is known that the largest prime gap less than $4\cdot10^{18}\approx2^{61.8}$ is 1476. I'd like an upper bound for the largest prime gap ...
0
votes
0answers
50 views

Instability of Kuramoto solutions with Runge Kutta 4th order method

I am currently trying to solve the Kuramoto model: $\ddot{\theta_i} = P_i - \alpha\dot{\theta_i} + K \underset{i \neq j}{\sum}\sin(\theta_i - \theta_j)$ I split this second order differential ...