Questions tagged [algorithms]
Informally, an algorithm is a set of explicit instructions used to solve a problem (e.g. Euclid's algorithm for computing the greatest common divisor of two integers). For more specific questions on algorithms, this tag may be used in conjunction with the approximation-algorithms, algorithmic-randomness and algorithmic-topology tags.
1,677 questions
10
votes
2
answers
461
views
Algorithm for selecting a fixed-point free permutation $\varphi:\{1,\ldots,n\}\to\{1,\ldots,n\}$
Motivation. In my younger son's class, everyone has to give a (small) Christmas present to one other student. Let $n\in\mathbb{N}$ be the number of students in the class. If you pick a permutation $\...
0
votes
0
answers
32
views
$O(1)$ algorithm for factoring integers of the form $n=X (X^D+O(X^{D-1}))$
Factorization of integers of special forms are of both theoretical
interest and cryptographic implications.
Experimentally we found a seemingly "large" set of integers for which a divisor ...
0
votes
1
answer
115
views
Closed form solutions of $x^D+y^D=n$ and $y^D-x^D=n$ assuming $y>x^{D/(D-1)}$
Let $x,y,X,Y,D>1$ be positive integers.
Let $X^D+Y^D=n$ and assume $Y>X^{D/(D-1)}$.
Conjecture 1 $Y=\lfloor n^{1/D}\rfloor$ and $X=(n-Y^D)^{1/D}$
Let $Y^D-X^D=n$ and assume $Y>X^{D/(D-1)}$.
...
0
votes
0
answers
151
views
$O(1)$ algorithm for factoring integers of the form $p(p+O(\sqrt{p}))$?
Let $p,C$ be positive integers and assume $0 < C< \sqrt{p}$
Let $n=p (p+C) $ and assume $n$ is odd.
Conjecture 1 Given $n$ we can find $p,p+C$ with complexity computing two integer square roots ...
11
votes
1
answer
460
views
Is there any algorithm which can find a common divisor of two polynomials modulo $p^k$?
Let us consider two monic polynomials $f(X), g(X) \in \dfrac{\mathbb{Z}}{p^k\mathbb{Z}}[X]$. Now, we call $h(X)$ is a divisor of $f(X)$, if there exists a $l(X) \in \dfrac{\mathbb{Z}}{p^k\mathbb{Z}}[X]...
0
votes
1
answer
116
views
Optimal probing problem
We are provided with a set of $n$ targets.
Each target is characterized by a utility value.
We know the distribution of the utility value for each target, but do not know its current value.
Therefore, ...
1
vote
2
answers
315
views
Algorithms to count restricted injections
Let the following data be given.
Two positive integers $m$ and $n$.
A family of sets $B_a \subseteq \{1, \dots, n\}$ (for $a \in \{1, \dots, m\}$).
The task is to count the number $N$ of injective ...
0
votes
0
answers
188
views
Practical partial fraction decomposition
I have tried to implement Ramanujan's algorithm for Solvability of a system of polynomial equations but got stuck in the final step of calculating the partial fraction decomposition from which the ...
4
votes
1
answer
384
views
On the growth of an algorithm
The origin of the following question is irrelevant and will hence be skipped. Hopefully, it will be interesting without context.
Consider the following algorithm. We will use $p_i$ to denote the $i$-...
1
vote
0
answers
52
views
Optimal triangulation of points distributed on two parallel lines
Question:
what is the fastest algorithm for optimally triangulating a point set $P$ that is given as the union of two sorted sequences $A\cup B\ :=\ ([0,0],[x_{a_1},0],\,\dots,\,[x_{a_m},0],[1,0])\,\...
0
votes
0
answers
106
views
Double-looped algorithm for A000123
Let
$$ \ell(n) = \left\lfloor\log_2 n\right\rfloor. $$
$\operatorname{wt}(n)$ be A000120, i.e., number of ones in the binary expansion of $n$. Here $$ \operatorname{wt}(2n+1) = \operatorname{wt}(n) + ...
2
votes
1
answer
136
views
Lattice reduction in 3-dimensions with real basis vectors
There are several algorithms for lattice reductions in $n$-dimensions, LLL, etc. Here the lattice in question is in ${\mathbb R}^n$ and the basis vectors $b_1, \ldots, b_n$ are usually assumed to be ...
0
votes
0
answers
78
views
Algorithms for generalized sieves (step of removing, position of remained term and $n$-th remained term)
Let
$a$ be an arbitrary non-decreasing integer sequence such that $a(1) = 2$. Here $a(n)$ is $n$-th term of $a$.
$b$ be an integer sequence of numbers $k$ such that $a(k+1)>a(k)$. Here $b(n)$ is $...
2
votes
1
answer
490
views
Comparing two adjacency matrices for graph equality
I'm currently working on a project that partially involves graphs. One of the problems I'm tackling is determining whether two given matrices represent the same connected undirected graph.
So given ...
2
votes
0
answers
87
views
Fast and simple algorithm for A032188
Let
$a(n)$ be A032188 (i.e., number of labeled series-reduced mobiles (circular rooted trees) with $n$ leaves (root has degree $0$ or $\geqslant 2$)), whose exponential generating function is $A(x)$ ...
1
vote
1
answer
313
views
Generate all rooted trees with a given number of vertices
A graph $G$ is said to be a tree if it is a connected (i.e. every two distinct vertices of $G$ can be connected by a path of vertices of $G$), acyclic (i.e., $G$ has no cycles) and simple (i.e., $G$ ...
1
vote
0
answers
157
views
Algorithm that allows to get any value of A000123 if finite number of values of A002577 are known
Let
$T(n,k)$ be an integer coefficients such that $$ T(n,k) = \begin{cases} 1 & \text{if } k = 0 \vee n = k \\ \displaystyle{ \sum\limits_{i=k-1}^{n-1} T(n-1,i) T(i,k-1) } & \text{otherwise} \...
22
votes
2
answers
2k
views
What is this modified arithmetico-geometric mean function?
I acquired a vintage programmable calculator and thought I'd give it a spin by computing some interesting transcendental function. I wanted to compute the arithmetico-geometric mean but the calculator ...
3
votes
0
answers
224
views
Show that at every equilibrium in the given sequential game, the first player weakly prefers his bundle to everyone else's
Suppose we have a set $N$ of $n$ players and a set $M$ of $m$ items. We are given a matrix $P_{n \times m}$ whose element $p_{ij} \geq 0$ $(i \in N, m \in M)$ denotes the valuation of good $j$ by ...
0
votes
0
answers
39
views
Time complexity of modified Floyd-Warshall that adds each time $K$ intermediate vertexes
I am trying to calculate the time complexity of the Floyd-Warshall algorithm with the following modification:
Instead of adding a single intermediate node each time, I will be adding $K$ nodes at once....
1
vote
0
answers
68
views
Nonconvex analysis of primal averaging gradient descent algorithm
I've been looking at a specific optimization algorithm in the nonconvex setting, and I'm trying to analyze its convergence rate. Here's the quick setup:
Suppose we have a nonconvex, continuously ...
2
votes
0
answers
88
views
Algorithm for A103239
Let $a(n)$ be A103239. Here
$$
1 = \sum\limits_{n=0}^{\infty} a(n) \frac{x^n}{(1-x)^n} \prod\limits_{j=0}^{n} (1 - (j+2)x).
$$
Start with $A$ and vector $\nu$ of fixed length $m$ with elements $\nu_i =...
-2
votes
1
answer
552
views
Does this specific 5-state Turing machine halt? [closed]
Basic setups:
A Turing machine M operates on a doubly infinite tape. The tape is divided into cells. Each cell can hold either a 0 or a 1 (meaning, we will consider only TM’s with two symbols). The ...
15
votes
1
answer
717
views
The most efficient algorithm for finding a root of a polynomial over finite field
I have a polynomial of degree around $2^{35}$ over a finite field $\mathbb{F}_p$, where $p$ is a 64-bit prime number.
What is the most efficient algorithm for finding a root of such a polynomial? (...
1
vote
0
answers
134
views
Algorithm for inversion of A268407
Let $F(n)$ be A000045 (i.e., Fibonacci numbers). Here
$$
F(n) = F(n-1) + F(n-2), \\
F(0) = 0, F(1) = 1.
$$
Let $a(n)$ be A268407 (i.e., number of North-East lattice paths that do not bounce off the ...