Questions tagged [programming]
For mathematical questions related to programming, and questions where a computer-aided solution is strongly suggested. A strong connection with a mathematical topic is needed to make programming questions on-topic. This should not be the only tag. Consider also using the tags (algorithms), (numerical-methods), or (linear-programming).
742 questions
-1
votes
0
answers
23
views
Mathematical modeling of epidemic spread using the SIR model [closed]
I hope you are doing well.
I am currently a graduate student studying mathematics, and this year I need to prepare my graduation thesis. The title is: “Mathematical Modeling of Epidemic Spread Using ...
0
votes
0
answers
212
views
Efficient algorithm for solving Diophantine equation $x ^ 2+y ^ 3+z ^ 5=w ^ 7$ with $\gcd (x, y, z)=1$.
My Mathematica Codes:
...
0
votes
1
answer
28
views
Separating Axis Theorem for 2 arbitrary convex polygons. cannot work out how to make axis for projection, do projections from vertices for testing
i have watched numerous tutorials on implementing the SAT, but i think the math eludes me (as it usually does). Say, theoretically, that you are looping over each edge in a programming language, now ...
0
votes
0
answers
51
views
Best tool for solving MINLP
I would like to consider a rocket impulse plan from Earth to Mars for my Personal Project (IB-MYP) I am currently working on, and I am a student in high school in Hiroshima, Japan. Could you please ...
0
votes
0
answers
75
views
Rewriting a n-dimensional matrix of dot products as a matrix multiplication
I am currently working on a Fortran codebase for numerical simulation, I have managed to simplify some loops to the following code
...
2
votes
1
answer
110
views
A LCM/coprime-related question (Codeforces Round 1037 (Div. 3) - E)
The context of this question is a competitive programming contest that occurred in July 2025. Solving this would allow me to understand the solution posted here. Indeed, that would allow to prove &...
1
vote
0
answers
64
views
Algorithms for factoring high degree polynomials
I have been reading the literature "Factoring very-high-degree polynomials" by G.A. Sitton, C.S. Burrus, J.W. Fox, and S. Treitel". This algortihm seems to be efficient for very high ...
2
votes
2
answers
110
views
How do I find and classify a stationary point of the function $5x^3 - 3yx - 6y^3 - 2$ using Newton's method and the Hessian eigenvalues?
Setup to the problem:
We are going to determine the stationary points of the function
$5x^3 - 3yx - 6y^3 - 2$
in the region $-1 \leq x \leq 1, \ -1 \leq y \leq 1$.
Calculate the gradient $\nabla f(\...
0
votes
1
answer
101
views
Fitting general but "smooth" convex shape to points
I am aware that there are algorithms to fit, say, an ellipse to a bunch of given points on a plane. For instance, this SO question has answers which feature both literature on the algorithms and ...
1
vote
1
answer
82
views
Hidden Markov model (HMM) for multiple time series
I have a question regarding training HMM and then applying it to new data:
Is it possible to train a HMM with several time series as inputs? My point here is that it'd be convenient to have a ...
0
votes
2
answers
140
views
I have a system of $6$ matrix equations, where the matrices are $64 \times 64$. How can I approach this problem in a more efficient way?
I think this question is more of a mathematics question rather than a programming question, read below for further details.
Goal
I have a system of somwehat big ($64 \times 64$) matrix equations of ...
2
votes
1
answer
63
views
How to convert the square root of an integer n to an array index in an array consisting only of primes? [closed]
I have a function in javascript that is supposed to calculate the nth prime.
...
0
votes
2
answers
159
views
What am I doing wrong implementing minimal residue method?
The given scheme $AU = F,$ where $A$ is an operator, and $U, F$ are the square $(N+1)\times(N+1)$-sized matrices. The action of operator $A$ is given by:
$$
-a \frac{U_{i-1,j}-2U_{i,j}+U_{i+1,j}}{h^2} ...
5
votes
1
answer
110
views
Sequences that are rearrangements of $\{1,2,2,3,3,\dots, n,n\}$ such that each pair $(i,i)$ are exactly $i$ apart (where $i\ge 2$)
This question is inspired by leetcode. Obviously, this is a math website, so I will ask math questions.
Given an integer $n\ge 1$, consider the set of all sequences with elements in the range $[1, n]$...
2
votes
1
answer
227
views
Project Euler: A Claim in Problem $759$
I am interested in problem 759 in Project Euler.
For those who don’t know, here’s the problem statement:
The function $f$ is defined for all integers as follows:
$$\begin{align}
f(1) &= 1 \\
f(2n)...