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
1answer
27 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
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
27 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 ...
5
votes
3answers
559 views

The J programming language: is it useful for mathematics?

I just stumbled upon the J programming language, which has the description: J is particularly strong in the mathematical, statistical, and logical analysis of data. It is a powerful tool in ...
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
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
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 β ...
2
votes
2answers
495 views

Space spanned by matrices

I have a set of $5$ by $5 $matrices, $M_1,M_2,...,M_{19} ,M_{20}$. I want to try to find a basis from this set and also to find relationships between these matrices. This is how I think I should ...
4
votes
2answers
666 views

Software for numerical solution of a non-linear ODE system?

I have been given a nonlinear system of ODEs which has arisen out of a colleague's engineering research: $$\begin{array}{rcl} \dot{x}_0&=&x_1\\ ...
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 ...
9
votes
2answers
3k views

Fast Matlab Code for hypergeometric function $_2F_1$

I am looking for a good numerical algorithm to evaluate the hypergeometric function $_2F_1$ in Matlab (hypergeom in Matlab is very slow). I looked across the ...
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 ...
2
votes
1answer
41 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
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 ...
0
votes
1answer
395 views

Probability of breaking the enigma cipher

I assume that most of you are already familiar with how the ENIGMA machine works, that the germans used during WWII. We now that the enigma machine has 3 scramblers with each 26 setting each. That ...
29
votes
0answers
408 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)} = ...
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 = ...
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
1answer
221 views

Interpolating Z-Values when given complete and incomplete XYZ pairs

I am building an application that works with PolyLineZ (ESRI Shapefile) data and rewrites outlying Z values. The minimum and maximum Z-values are defined by the user through the interface Let's take ...
1
vote
0answers
18 views

create polygon section with equal sides

I have to create essentially these sections of a polygon. I have width(W) and height (H), and number of sides (3 on left abc and 4 on right image ABCD) I need each side to be equal. How can I ...
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 ...
4
votes
3answers
161 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 ...
1
vote
1answer
269 views

Write two (or more) numbers as sum of multiples of other numbers (one, two or more)

I have the following problem: Numbers 32, 35 and 57 can be written as sum of multiples of 7 and 9: 32 = (7*2) + (9*2) 35 = (7*5) + (9*0) 57 = (7*3) + (9*4) Is ...
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
1answer
101 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 ...
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
87 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 ...
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
1answer
27 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 ...
0
votes
0answers
45 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 ...
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 ...
5
votes
1answer
594 views

Cylinder-ray intersections equation

I found an article involving infinite cylinder-ray intersections, and I don't know how they develop this equation: $$(q - p_a - (v_a, q - p_a)v_a)^2 - r^2 = 0$$ In the end of the first page I quote: ...
0
votes
2answers
29 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 ...
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 ...
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 ...
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
1answer
993 views

Fast methods to check linearity of differentials? Generalizing linearity?

The L1 Mat-1.1010 -course here has taught me the linearity conditions $f(a x)=a f(x)$ and $f(a+b)=f(a)+f(b)$. I want to generalize it, some quite irrelevant slow investigation here. It requires time ...
2
votes
1answer
97 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
1answer
23 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 ...