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

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 $\frac{P(1,1)-P(1,-1)}...
0
votes
0answers
11 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 approach?...
0
votes
1answer
21 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
53 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
218 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
24 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
10 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
29 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 ...
1
vote
1answer
24 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 ,x_n)...
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
91 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
112 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
50 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 ...
1
vote
0answers
50 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
25 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 why....
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 ...
31
votes
0answers
517 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)} = \Big(1+\frac{...
0
votes
0answers
17 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
252 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 $~m~$...
1
vote
1answer
43 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
33 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
18 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
167 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
36 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
23 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 day(...
0
votes
0answers
13 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) d\...
1
vote
0answers
46 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} \int_E^{\...
0
votes
0answers
30 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
49 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 \...
3
votes
1answer
101 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
58 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 ...
0
votes
1answer
24 views

Help with Legendre Plot Matlab

I've written a code to change a Chebyshev into a Legendre Polynomial, however it will not plot the graph after and I'm not sure why the graph will not plot? The code i have is: function LegendrePoly(n)...
4
votes
3answers
105 views

How to calculate $10^{0.4}$ without using calculator

How to calculate $10^{0.4}$ without using calculator or if not what is the closest answer you can get just using pen and paper within say $2$ min?
1
vote
2answers
35 views

Computing midpoint of an interval overflow

For computing the midpoint m of an interval $[a, b]$, which of the following two formulas is preferable in floating-point arithmetic? Why? When? (Hint: Devise examples for which the "midpoint" given ...
0
votes
0answers
14 views

Equivalence and interoperability of computation systems using a calculus

I am trying to prove that two computational systems are interoperable and both can be converted into another parent system . So computational system A,B can be mapped into computational system C. I ...
0
votes
1answer
52 views

Cannot understand solution (Turing Machine & Reduction)

Photo of my problem that I don't understand About question above in photo, I just can't understand its solution provided. We know the complement of Atm = {...
2
votes
0answers
19 views

Method to Linearise PDE

I have a Monge-Ampere-type PDE I wish to solve using a finite difference method: $$(1-u_{xx})(1-u_{yy}) -u_{xy}^2 = f(x,y).$$ Is there generally a preferred method for linearising the system after ...
0
votes
0answers
22 views

Different methodology for maximizing entropy in continuous random variable case

Suppose we want to maximize the well-known Shannon entropy $S=-∫_{0}^{x_{max}}f(x)lnf(x)dx$ subject to the following constraints $∫_{0}^{x_{max}}f(x)dx=1$, $∫_{0}^{x_{max}}xf(x)dx=x ̅$ and so on (...
0
votes
0answers
12 views

Transitivity Proof on graphs: computational or by hand?

I am stuck to transitivity consideration with graphs where $x^a,x^b$ are boolean monomials such as $x_1x_3$ and $x_5$, the cut sets contains $C=\{x^{C_i}=0\mid C_i\in C\}$, $C=\{C_1,C_2,\ldots,C_n\}...
2
votes
1answer
72 views

Algorithm for isomorphic groups?

As I understand There can't be a general algorithm to decide if two finite groups are isomorphic, Wikipedia. But are there efficient algorithms for all subgroups of $S_n$ for say $n=10$ or so? ...
0
votes
0answers
57 views

Problem with 4-body Matlab code

I'm trying to model the 4 body problem to see how Jupiter, Earth and Mercury orbit the Sun. I found a two body script and adapted it as accordingly to modify my problem, but for some reason the ...
4
votes
1answer
43 views

How to simplify this equation regarding pronic numbers for integer solutions

A pronic number is a number that can be expressed as the product of two consecutive positive integers. For instance, $42 = 6 \cdot 7$ is a pronic number. I've become interested in solving for the ...
2
votes
1answer
50 views

Converting Integers from One Base to Another Digit by Digit

So I’ve done some hands-on work with converting integers from one base to another using the well-known method of division and taking the remainder. The most generic algorithm involves dividing the ...
0
votes
1answer
38 views

Compute Christoffel symbols & Riemann tesors in Maple 17

I invented a metric tensor g and now I'm trying to compute my first Christoffel symbol but an error message is popping up "Error, bad index into matrix" Is there a way for maple to compute Christoffel ...
0
votes
1answer
25 views

Method to study obvious properties

Most of the time studying mathematics we come across various properties like associative, commutative,...etc. These properties are obvious and sometimes I feel why at all they are given in the text. ...
2
votes
0answers
34 views

Algorithm for numerically calculating $\log x$

It was while fiddling yesterday that I came up with this rather pretty approximation: $$\log x = \frac{1}{2\epsilon}(x^{\epsilon}-x^{-\epsilon})+\mathcal{O}(\epsilon^2)$$ To be more precise, $$\...
0
votes
0answers
15 views

Finding All Combinations of a Hierarchical list Where Conditions Are Involved

I want to find all possible combinations of a list that looks like this. a) Option 1 Sub Option 1 b) Option 2 Sub Option 2 c) Option 3 The catch is that there are some simple and some ...