Questions tagged [computational-mathematics]

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

1,676 questions
Filter by
Sorted by
Tagged with
22 views

Creation of "customisable" structures in Magma - Computer Algebra System

Good evening! I am trying to implement some structures in the Computer Algebra System "Magma". My goal is to be able to specify a set and a binary operation on that set. I want to create a ...
24 views

need to show working of how to obtain the largest choicest given a preference relation

Consider the relationship x ≼ y if and only if x^2 ≥ y. What is the largest choice set (a subset of the real numbers ] − ∞, ∞[) such that ≼ defines a preference?
24 views

Understanding this Inclusive Notation

I am learning about splines in my computational analysis class, and this question came up: I have not seen this notation before (that is "$(-1 \leq x \leq 0.5)$"), and it is confusing me ...
42 views

Example of matrices where computing the inverse is the most efficient method

I know there exists matrices where for example LU-factorization is not the most efficient way of solving the linear system of equations: $$Ax=b \tag{1}$$ Examples of such matrices are triangular or ...
78 views

Consider the non-homogeneous linear recurrence relations $a_n = 2a_{n−1} + 2^n$ find all solutions.

I can show that $a_n^{(h)}$characteristic equation $r-2=0 \to a_n^{(h)}=\alpha2^n$ But I'm stuck on $a_n^{(p)}$ characteristic equation $A2^n = 2A2^{n-1} + 2^n$ Simplifies to $-A = 2$ $A = 2A + 2$
43 views

Solving the matrix equation $X^T A X = B$ where X is the unknown matrix.

I have seen people ask about solving this equation where A is the unknown matrix but I have never seen people talking about X being the unknown. The matrices are square matrices. In my situation X ...
100 views

Using a simulation to show that any obtuse triangle whose largest angle is $\leq100^{\circ}$ has a stable periodic billiard orbit

In 2009, Richard Schwartz proved that any obtuse triangle whose largest angle is $\leq100^{\circ}$ has a stable periodic billiard orbit. My question then, is: How can I reproduce Schwartz's result ...
26 views

Euclidean division algorithm for (quadratic) number rings

I implemented in the computer Euclidean division for Gaussian integers. I’d like to implement it for other Euclidean number rings, or at least for the few norm-Euclidean quadratic rings. Any reference?...
31 views

Determine programmatically whether an expression is always defined

I would like to determine programmatically whether a given expression is always defined, or if it could have an undefined result. For instance, take the following computation: ...
76 views

How to integrate PDEs back to the original function, e.g. $x e^{-x^2-y^2}$? (Generic or numeric approaches are welcome.)

I have to solve tasks computationally, where integrations increasingly play a role. This practically addressed question aims later at a general approach. However, I would first like to understand the ...
31 views

Need to check the logic of this theorem related approximation ratio among A, B,C

I am a student outside the mathematics major. I need a help to check the logic and formulation of this theorem. Let A= 2B =2C is best-case, where A and B are Known values. C is unknown value. Given ...
38 views

Efficiency of a root finding algorithm

I'm writing some code regarding polynomials and I have a few questions about a root-finding algorithm I've come up with based on my current knowledge. Moreover, Given a polynomial, I would like to ...
58 views

Fast mod 29 on 28 bit number

I have a 64-bit number ($x$) that I want to programmatically display as base 58. I have currently found two solutions, the first one is the double dabble and the second one is mod-and-divide. I'm ...
190 views

Can we compute all digits of the Euler-Mascheroni constant?

Let $\gamma$ be the Euler-Mascheroni constant from calculus. Is there an algorithm that computes the $n$-th digit of the decimal expansion of $\gamma$ given $n$ as input? For all we know $\gamma$ ...
22 views

Are Python/MATLAB/Mathematica numerical eigenvectors affected by eigenvalue degeneracies outside region of calculation?

I have a discretized 2D mesh over which I calculate eigenvalues and eigenvectors of some Hermitian 2 x 2 matrix at each point along a closed loop parameterized by parameter t. The eigenvectors are ...
12 views

Convex Optimisation - How to convert from the LP Formulation into Interior Point Format

I am currently learning about convex optimisation and now looking at implementing some methods with code. I am starting from the Linear Programming formulation for the L1 norm, which I have ...
5 views

...
24 views

clustering coefficient and average distance in Watt-Strogatz networks

we want to prove that clustering coefficient in Watts–Strogatz Graphs when p=0 (probability of having random edges) can be obtained using the following formula: C(0) = 3(c-1)/2(2c-1) where 2c= mean k(...
59 views

Finding appropriate step size for ODE system numerically solved without ODE solver in Matlab

This is a post piggy backing off a post made earlier yesterday, I have made considerable progress towards completion but I'm having difficulty with this part, and I'm sure it's last hurdle I need to ...
18 views

Determine L(M), the language recognized by M.

Below is provided a nondeterministic Turing machine. Could anyone explain to me how can I determine the language that is recognized by it? Thanks a lot!
44 views

Computing Complex[CReal] roots of a polynomial

I have a type CReal = (precision: Int) -> (approximation: BigInt). I have a Polynomial[CReal] as well. I want to get the ...
75 views

Reproduce this figure using matlab for system of ODE's solved numerically

So I believe that I am working with the Becker-Doring equations or the spatially uniform mass-action equations, either way, this was taken from a research paper and I'm trying to reproduce the results ...
12 views

Efficiently solving two system of equations from block-matrix

I know that the solution of the system $(X^\top X)\beta = X^\top y$ is simply $\hat{\beta} = (X^\top X)^{-1}X^\top y$. Suppose that $X$ and $y$ are a block-matrix and block-vector respectively. Then ...
39 views

Normalizing floats dataset to (0f-1f) range while minimizing variance

I have software that will output a fixed amount of floats every iteration. I've got no idea about the magnitude of the outputs, but I need to remap them to stay in range (0f, 1f). I could use a simple ...
60 views

Model Theory Question for Predicate Logic in van Dalen's Logic and Structure

Let L be a language without identity and with at least one constant. Let σ = ∃x1 ··· xnϕ(x1,...,xn), where σ is a formula in predicate logic. Let Σ = {ϕ(t1,...,tn)|tᵢ closed in L}, where ϕ is ...
67 views

Bilinear form of a matrix [duplicate]

Let V be the vector space Mn×n(R), and let B: V×V→R be the bilinear form B(X, Y) = tr(XY). Calculate the signature of B. Here, tr means the trace of the matrix. Edits I'm stuck here as I was only able ...
40 views

Need help to write a proof regarding first order formula

I'm trying to write a proof for the following question: For any formula φ, given two assignments g and g′ which differ only in what they assign to variables not in φ, and any model M (of appropriate ...
55 views

Palindrome Subtraction

A palindrome number is a number that is inverted, but the number remains the same. A four-digit palindrome number is 6226. Suppose, you subtract another four-digit palindrome number from such a four-...
87 views

unexpected high precision of the Simpson's rule

I tried to use the Simpson's rule to calculate the following integral $$\pi = 4 \int_0^1 \frac{dx}{1+x^2} .$$ The Matlab code is as follows. I expected a scaling law $error \propto h^4$ ...
40 views

57 views

Weighted mean or average including negative numbers

Let's say I have have multiple values: [12, 8, -6, 0, -1] with weights [20%, 20%, 30%, 15%, 15%], how could I calculate its ...
22 views

Can program be used to simplify algebraic complex expressions?

I have several expressions of this kind $$\frac{p_1(1+|p_1|^2)}{(1-|p_1|^2)^2}-\frac{(1-|p_1|^2)p_2(1+p_2\overline{p_1})}{(1-\overline{p_1}p_2)|1-p_1\overline{p_2}|^2}\ .$$ Does there exists a ...