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

3
votes
1answer
63 views

How do computers compute the expected value of an infinite distribution?

I was trying to compute: $$E[X] = \int^{\infty}_{-\infty} xP(x)dx$$ but it might be a distribution over a sample space that is infinite. How do computers actually deal with this in an efficient and ...
0
votes
1answer
103 views

Newton Cotes Rule Derivation

I have this question Derive an open two-point Newton-Cotes quadrature rule for the interval $[a,b]$. I need to find what the resulting weights and nodes are. What is the degree of the resulting rule? ...
1
vote
2answers
54 views

Computing an induced matrix norm

Assume I have a $n \times n$ matrix and a norm defined as $\|A\| = \max \limits_{x \not = 0}\frac{\|Ax\|}{\|x\|}$, where $\|x\| = \sqrt{\sum x_i^2}$. How can I compute this norm?
2
votes
1answer
110 views

No advantage to the closed form for Fibonacci numbers?

The closed forms for the Fibonacci sequence, such as: $$F_n=\frac{\varphi^n-\widehat\varphi^n}{\sqrt5}=\frac{\varphi^n}{\sqrt5}-\frac{\widehat\varphi^n}{\sqrt5}\;,$$ the Binet formula, do not seem ...
13
votes
2answers
218 views

$e$ popping up in topic I'm unfamiliar with

I programmed up a little algorithm that goes like this: Fix two positive, real numbers, call them $\alpha$ and $\beta$. Generate a new, random, real number, $x \in [0,1]$ Set $\alpha$ = ...
4
votes
2answers
639 views

“Opposite” of idempotent operation?

What is the adjective given to a mathematical operation/expression on a variable whose new value can only be described in terms of that variable's existing value? Sequential operation? Example: i = ...
0
votes
3answers
258 views

How would I convert from frequency back to percent?

I'm working on a web application that uses an oscillator. It has a parameter that goes from 0 to 100 percent. I translate that percent into hertz using this equation: $$ \text{frequency} = ...
0
votes
2answers
143 views

Existing Algorithm / Code to calculate exact values of the Riemann Zeta function at even natural numbers?

I wanted to know if there's any existing algorithm to compute exact values of the Riemann Zeta function at even natural numbers? For example, it should compute $\zeta(4)$ as exactly $\frac{\pi^4}{90}$ ...
1
vote
1answer
92 views

mortage with monthly payment - mathematical modeling

$Question:$ Suppose that $x_n$ is the amount owed on a mortgage after n years, $\$m$ is the monthly repayment and $r$ is the annual percentage interest rate charged on the amount of the mortgage ...
1
vote
1answer
54 views

Echo State Network learning Mackey-Glass function, but how?

I got this example of a minimal Echo State Network (ESN) which I analyse while trying to understand Echo State Networks. Unfortunately I have some problems understanding why this really works. It all ...
2
votes
1answer
398 views

How To Generate Random Points on the Positive Side of a Plane in 3-D

Edit: The question can also be interpreted as: How to generate random coplanar points in a cube? Here is what I am struggling with: I have a cube, whose origin is $(0,0,0)$ and one edge length ...
2
votes
1answer
53 views

Find regular expression for a binary sequence dividable by 3

I am trying to find a short regular expression that matches to all binary sequences that are dividable by 3. This is homework. It would be great if I could only get some hints before the final ...
1
vote
0answers
30 views

Find allowed error of an argument regarding the allowed error of a function.

To what precision can $x$ be obtained with logarithmic table (with $5$ digit table) if $x$ lies between $300$ and $400$? Any ideas?
3
votes
4answers
193 views

Computing a large exp(x) in a numerically robust way.

I'm trying to compute $\lfloor e^x \rfloor$, where x is a 64-bit integer. The problem is that the result of the computation may be close to 2^64. In this range, 64-bit floating point numbers will be ...
2
votes
1answer
67 views

The “computability” of fundamental physical constants

I would like to ask if any of the fundamental physical quantities like the speed of light or plancks constant (all measured according to a common standard of of units) can be classified as computable ...
0
votes
1answer
124 views

Discretize an ellipsoid given its semi-major axes and orientation

An ellipsoid centered at the origin can be defined by the solutions to $$ \mathbf{x}^\text{T} A \mathbf{x} = 1 $$ where $A$ is symmetric and positive-definite. The eigenvectors of $A$ define the ...
2
votes
1answer
55 views

Generating Eulerian digraphs/isographs

I would like to be able to quickly generate (all) non-isomorphic isographs (that is, digraphs where each node has the same indegree and outdegree - also called "balanced networks" in the distributed ...
0
votes
2answers
138 views

logarithm and exponent computation performance

Using glibc on a x86 processor, which takes more CPU time? $a\ log\ b$ or $b^a$? For which values of $a$ is one faster than the other? Optional: Does the base used matter? See also: What algorithm ...
2
votes
1answer
494 views

Calculating eigenvectors and eigenvalues of a 2x2 complex matrix

I've previously asked elsewhere, http://stackoverflow.com/questions/21118820/non-trivial-eigenvectors-of-a-22-matrix-in-code, how to calculate the eigenvectors and eigenvalues of a 2x2 matrix in a ...
1
vote
1answer
61 views

Is it possible to reduce a lambda expression to it's smallest equivalent form?

In the Untyped Lambda Calculus, is it possible to reduce any arbitrary expression to it's smallest equivalent form? (defined as an expression with the smallest number of lambda terms) If so, is there ...
2
votes
2answers
351 views

Galois group command for Magma online calculator?

I need to test if a family of 7th deg and 13 deg equations are solvable. I'm new to Magma, so my apologies, but what would I type in, http://magma.maths.usyd.edu.au/calc/ to determine the Galois ...
3
votes
0answers
79 views

Computing the decomposition of a representation of $S_n$

I have an explicitly defined representation of the symmetric group that I would like to decompose into irreducibles. How to do this most easily? The best approach I have so far is as follows: Find a ...
3
votes
0answers
59 views

Algorithm for primary decomposition of ideals in a power series ring over a field

Let $K$ be a field such that there exists an algorithm for factoring a polynomial over $K$ into the product of irreducible polynomials. For example, the field of rational numbers $\mathbb{Q}$ is such ...
5
votes
3answers
484 views

FFT with powers of 3

Classic Fast Fourier Transfrom (FFT) works fine, when $n$ is power of 2. How to generalize FFT procedure when $n$ is power of 3? Is it possible to easily modify the algorithm and preserve its ...
1
vote
2answers
39 views

Subtlety about the definition of B-splines

I came across the following definition for the zero'th order B-spline $$b_0(x) = \left\{ \begin{array}{lr} 0 & |x|>1/2\\ 1 & |x|<1/2\\ 1/2& |x|=1/2. \end{array} ...
2
votes
0answers
63 views

How calculators compute. [duplicate]

I would like to teach a class on the "magic" behind the calculator, so I would like to generate a list of "algorithms" for how a calculator computes the things we want it to. I will get the ball ...
3
votes
2answers
213 views

Calling GAP's StructureDescription from SAGE

Given a sage group object $G$, I want to obtain its structure description using GAP, as follows: sage: gap.StructureDescription(G) The command works fine in ...
2
votes
3answers
85 views

Satisfying equality between logarithmic expressions

Apologies in advance for any misused terminology, or if this is the wrong place for the question (I think it's okay though). I am given a group of logarithmic expressions such as: $- (a \log(a) + ...
1
vote
0answers
59 views

What exactly is 'computer mathematics'?

I'm looking at some potential things to study next semester and I see a full B.sc. degree called 'Computer mathematics'. It says it's a hybrid between computer-science and mathematics. Does anyone ...
0
votes
1answer
75 views

Which strings belong to the regular set represented by the regular expression (1∗01∗0)?

I know the string should be like 1…101…10, but not sure how to describe it. Can anyone help me?
4
votes
1answer
525 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\\ ...
2
votes
0answers
384 views

Two-layer Perceptron for XOR

I'm reading Neural Networks for Pattern Recognition by Christopher M. Bishop. It's for a physics class, but I think the problem is closer to mathematics so I'm asking here instead of PSE. Chapter 4 of ...
2
votes
0answers
52 views

LLL and factoring polynomials in $\Bbb Z[x]$

Given a degree $2k$ reducible polynomial $f(x)=\sum_{i=0}^{2k}a_ix^i\in\Bbb Z[x]$ with $gcd(a_{2k},\dots,a_0)=1$ that is known to be of the form $f_1(x)f_2(x)$ with $deg(f_i(x))=\frac{deg(f(x)}{2}=k$ ...
1
vote
3answers
51 views

Linear algebra computable

I'm working in a linear algebra software, but I have a problem. If I try to reduce the matrix to reduced echelon form, many resources will be consumed. That is, if I perform many basic operations ...
1
vote
2answers
590 views

Minimum number of iterations in Newton's method to find a square root

I am writing an algorithm that evaluates the square root of a positive real number $y$. To do this I am using the Newton-Raphton method to approximate the roots to $f(x)=x^2-y$. The $n^{th}$ iteration ...
0
votes
2answers
278 views

Inverse Percentage.

Sorry for asking this foolish question. Here is the data i have. I purchased the product as $5 and additional fee is 2%. So Here is the total dollor ...
4
votes
0answers
67 views

Finding every $n$ such that $n\times$ ('reverse' number of $n)=m^2$ such as $1584\times 4851={2772}^2$

Let $r(n)$ be the 'reverse' number of $n$ in the decimal system. For example, $r(1234)=4321$. Then, here is my question. Question : Can we find every $n(\in\mathbb N)$, which is not a square ...
3
votes
3answers
84 views

A good way to find $a_{50000}$ where $a_n$ is a number in the form of $2^j\cdot 3^k$

Letting $A=\{2^j\cdot 3^k| j,k \ \text{are non-negative integers} \}$, let us define $a_n$ as the $n$-th element of $A$ in ascending order. We can see $$a_1=1, ...
0
votes
1answer
37 views

computing and algebra

I have a question: Let $f(x)=\sqrt{x^2 +1} - 1$. When $x=10^{-3}$ compute $f(x)$ working to 5 sf. Show algebriacally $f(x)=\frac{x^2}{\sqrt{x^2+1}+1}.$ After desperately rearranging I'm just going ...
1
vote
0answers
94 views

Lamé's equation - elliptic PDE?

I have a specific PDE in 3-dimensional space + time (the right one). u(x,t) is the unknown function (values are in R^3) and F(x,t) the right hand side, mu and lambda are positive constants. Now ...
1
vote
0answers
29 views

Nonlinear optimization using parallel input/output

I have a system that accepts a vector and returns a function value. The goal is to change the elements of the vector such that the function value is minimized using a derivative-free solver, eg. using ...
2
votes
0answers
59 views

The Command “TzGoGo” in GAP

I am learning GAP and would like to ask one question about a command called "TzGoGo": If $P$ is a finite presentation of a group $G$, then will the eventual result of the command "TzGoGo(P)" be ...
3
votes
1answer
106 views

GAP Responding Time

I am running GAP 4.6.5 on my six-year-old computer and sometimes it takes like forever for GAP to respond to my simple commands. An easy example is as follows: ...
2
votes
1answer
103 views

Need help for a beginner to floating-point arithmetic

I have this question that I need to complete and I literally have zero idea on what to do. I basically need someone to talk me through it and will appreciate all the help I can get. The question ...
1
vote
1answer
52 views

Survey/encyclopaedia/website of mathematical theorems connected

Is there, or is someone creating a survey/encyclopaedia/website of mathematical theorems which connects theorems together with their assumptions (axioms, other theorems, hypotheses etc.)? I'm thinking ...
0
votes
1answer
157 views

Multi layer perceptron activation function

How can you show that the Fourier series approximation of a function (so $f(x)=\sum\limits_{n=0}^{\infty} (a_n cos(nx) + b_n sin(nx))$ can be approximated to arbitrary precision by a feedforward ...
1
vote
1answer
82 views

Ackermann function and primitive recursiveness

If we define $b_n(m) := a(n,m)$ for all $n$ and $m \in \mathbb{N}$. For which $n$ is the function $b_n$ primitive recursive and for which $n$ it is not a primitive recursive function? Can anyone ...
12
votes
1answer
168 views

On $1^2+2^2+\dots+24^2 = 70^2$, and $15^3+16^3+\dots+34^3 = 70^3$

It is quite well-known that, $$1^2+2^2+\dots+24^2 = 70^2$$ Not so well-known is, $$15^3+16^3+\dots+34^3 = 70^3$$ The formula for the sum of $m$ consecutive squares starting with $a^2$ is, ...
2
votes
0answers
142 views

Using GAP to compute the abelianization of a subgroup

Let $K$ be the group generated by four elements $x_1,\cdots,x_4$ with relations that each generator commutes with all its conjugates. (An equivalent relation is, any simple commutator with repeated ...
4
votes
1answer
155 views

What is the upper bound on the error of a matrix multiplication

When both A and B are n x n upper-triangular matrices, the entries of C = AB are defined as follows: $$ c_{ij} = \begin{cases} \sum _{k=i}^ja_{ik}b_{kj} & 1\leq i\leq j\leq n \\0 & 1\leq j\lt ...