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.

Filter by
Sorted by
Tagged with
1 vote
3 answers
5k views

Which are good algorithms for finding Hamiltonian path (not necessarily a circle) up to now?

I am not expertise in graph theory. So have to ask this question here. The term "good" means that the algorithms should be efficient for general undirected simple connected graphs with a higher ...
0 votes
0 answers
12 views

Time complexity of Magma's `NormEquation` for quadratic extensions of $2$-adic fields

Note: This is similar to, but easier than, a previous question I asked here. It is a different question! I'm hoping this one might get an answer because it concerns a standard algorithm, whereas the ...
7 votes
7 answers
3k views

Efficient Hamiltonian cycle algorithms for graph classes

Generally speaking, finding a Hamiltonian cycle is NP-Hard and so tough. But if $G=L(H)$ is the line graph of $H$, then we can reduce the problem of finding a Hamiltonian cycle in $G$ to finding an ...
2 votes
1 answer
229 views

How to solve this set of equations as efficiently as possible (with "efficiently" measured in FLOPS)?

The system of equations is the following: $$ \Gamma_i^{\ -1} = \sum_{i=1}^nA_{ij}\Gamma_j, $$ where $\Gamma = (\Gamma_i)$ is a vector of size $n$ and $A$ is a matrix of size $n\times n$, with $n \gt ...
4 votes
1 answer
145 views

Algorithms to count perfect matchings in near planar graphs

It is well known that counting perfect matchings is tractable in planar graphs (due to Kastelyn). I am interested in classes of (for lack of a better word) "near" planar graphs (1-planar, ...
2 votes
1 answer
174 views

Generating all possible subsets in order of sum

Given a set of positive integers, I am looking for method to algorithmically generate all possible subsets in order of their sum. Because the the count of possible subsets is exponential ($2^n$), it ...
3 votes
0 answers
31 views

Implementation of Friedman's algorithm of reconstructing simple polytopes

In Finding a Simple Polytope from Its Graph in Polynomial Time, Friedman gave a polynomial time algorithm on reconstructing a simple polytope from its graph. Has this algorithm been actually ...
0 votes
0 answers
27 views

Prove the NP-hardness of the following problem: Whether there exists a partition for a set of data points

Can anybody help me prove the NP-hardness of the following question: Given $x_0, x_1, ..., x_m \in \mathbb{R}^n$, determine whether there exists a partition $S\cup [m]\backslash S$, such that $x_0 \in ...
32 votes
3 answers
2k views

Are these fast convergent series for $\log(2)$, $\log(3)$ and $\log(5)$ already known and proven?

Updated on Feb.16.2024 Fortunately for three of these series, Eqs. (1), (3) and (4), I have found a proof using classical methods which I placed in the Answers section below. (I doubt that there is a ...
12 votes
1 answer
366 views

Euclid's algorithm as a combinatorial game

Consider the following two player game based on the Euclidean algorithm: Positions are given by $(a,b)$ in $\mathbb N^2\setminus\{(0,0)\}$ (where $\mathbb N=\{0,1,2,\ldots\}$) defining a greatest ...
0 votes
1 answer
87 views

Graph vertices selection for paths sum minimalization

Let $G = (V, E)$ be a simple, finite, weighted, undirected, connected graph. Let $P = \{p_{ij}, p_{kl}, p_{il}, ... \}$ be a set of paths, where $p_{ij}$ is a path from $i$-th to $j$-th vertex. Is ...
-1 votes
0 answers
32 views

What are the assumptions when dealing with the EM Algorithm in order to calculate $f_{\textbf{Y}|\textbf{X},\theta}(\textbf{Y}|\textbf{X},\theta)$?

Consider the EM Algorithm. In order to apply it, we are given the observed data $\textbf{X}$ (generated by some distribution depending on some parameters), which can be a vector, a matrix or a matrix ...
0 votes
0 answers
64 views

What is the complexity of computing isomorphism of two non-regular graphs?

Regular graphs are the graphs in which the degree of each vertex is the same. Much research has gone into investigating isomorphism of regular graphs, and we know that computing isomorphism for ...
1 vote
0 answers
159 views

Fast algorithm for computing certain signal transformations

Let $f,g,h:\mathbb Z\to\mathbb C$ supported on $[-n,n]$.  For $\tau\in \mathbb Z$, let $\operatorname{sh}_\tau f$ be the shift of $f$ by $\tau$ (i.e. $(\operatorname{sh}_\tau f)(t) = f(t-\tau)$). ...
3 votes
2 answers
246 views

Probability that the solution to a combinatorial optimization problem changes after random modifications

Given a combinatorial optimization problem, say the Traveling Salesman Problem, the optimal solution is a set of elements (edges in this case) that satisfy certain constraints (constituting to a ...
65 votes
2 answers
23k views

Does there exist a complete implementation of the Risch algorithm?

Is there a generally available (commercial or not) complete implementation of the Risch algorithm for determining whether an elementary function has an elementary antiderivative? The Wikipedia article ...
1 vote
1 answer
103 views

$\mathrm{LP}$ formulation for $\mathrm{k}$-$\operatorname{opt}$ moves

$\mathrm{k}$-$\operatorname{opt}$ moves are an idea to improve non-optimal Hamilton cycles in weighted symmetric graphs by exchanging $\mathrm{k}$ tour-edges with $\mathrm{k}$ edges that do not belong ...
13 votes
6 answers
2k views

Which model of computation is "the best"?

In 1937 Turing described a Turing machine. Since then many models of computation have been decribed in attempt to find a model which is like a real computer but still simple enough to design and ...
2 votes
1 answer
239 views

Size of forbidden minors for treewidth

For any $k$, the class of graphs of treewidth at most $k$ can be characterized by a finite set of forbidden minors. For treewidth $1$ and $2$, the set is of size $1$. Then for treewidth $3$, the set ...
0 votes
0 answers
23 views

Building hypercubes from the bottom up

let $H^k$ denote a $k$-dimensional hypercube in a complete symmetric graph $G(V,E)$ without self-loops and parallel edges; let $|V|=2^n$ be the number of vertices. setting $\mathbb{H}^0 := V$, i.e. ...
17 votes
5 answers
1k views

Algorithm generalizing continued fractions for non-quadratic algebraic numbers

The continued fraction algorithm generates an integer sequence which terminates for a rational number, is periodic for the roots of irreducible integer quadratics, and is non-periodic for other ...
14 votes
3 answers
2k views

Guaranteed correct digits of elementary expressions

Let $E$ be the set of elementary expressions, defined as the smallest set of mathematical expressions such that $1 \in E$, and if $a,b \in E$ then $a + b$, $a - b$, $ab$, $a/b$, $\exp(a)$, $\log(a)$ ...
3 votes
1 answer
774 views

Language equivalence between deterministic and non-deterministic counter net

One-Counter Nets (OCNs) are finite-state machines equipped with an integer counter that cannot decrease below zero and cannot be explicitly tested for zero. An OCN $A$ over alphabet $\sum$ accepts a ...
1 vote
0 answers
62 views

Algorithm to generate configurations with kissing number 12

That the kissing number of a sphere in dimension 3 is 12 is well known. However, it is also known that there is a lot of empty space between the 12 spheres. I deduce (am I wrong?) that there are many ...
4 votes
2 answers
315 views

Max weighted matching where edge weight depends on the matching

Given a bipartite graph $G$, we seek a maximal weighted matching $E$. The particularity is below. Once an edge $e$ is chosen, the action of choosing $e$ adds a negative weight $w(e,e')$ to any other ...
1 vote
0 answers
60 views

A small lemma on cache resets (Bloom filters in particular)

Assume a fixed set of message $D$ and an associated distribution for selecting each message $d_i$ such that the total probability $\sum_{i \in D} d_i = 1$. We create a cache with $M$ bits and $k$ ...
3 votes
3 answers
5k views

Determining the space complexity of van Emde Boas trees

We call $S(u)$ the space complexity of the vEB tree holding elements in the range $0$ to $u-1$, and suppose without loss of generality that $u$ is of the form $2^{2^k}$. It's easy to get the ...
2 votes
0 answers
91 views

What is the complexity / name of word search problem in linear groups?

This is a question about a search problem associated with user6976's question. Suppose we are given a finite set of elements $S \subset \mathrm{GL}_n(\mathbb{Q})$ containing inverses of all its ...
1 vote
0 answers
93 views

Algorithms to decompose a graded module over $R[x]$, where $R$ is a PID

There is a certain class of objects, which can be thought of either as modules over a ring $R[x]$ or as functors. A few equivalent definitions are given below. The question is what computer algorithms ...
0 votes
0 answers
36 views

Weighted matroid intersection algorithm

From Combinatorial Optimization, Theory and Algorithms, Sixth Edition, 2018, by Bernhard Korte and Jens Vygen: ...
1 vote
0 answers
38 views

Recurrence relation quicksort median-of-three

I am looking for a recurrence relation that describes the average number of comparisons of the quicksort algorithm considering an input array of size $n$. If the pivot element is picked randomly, the ...
12 votes
1 answer
929 views

Apéry's constant $\zeta(3)$ fastest convergent series

UPDATE Feb.02.2024 The series below, Eq.(3) for computing and Eq.(2) for verifying, were applied by Andrew Sun on Dec.22.2023 to get over $2\cdot10^{12}$ decimal digits and break the number of ...
6 votes
4 answers
2k views

Question about this ratio in Metropolis-Hastings MCMC algorithm

I have a stupid question about the Metropolis-Hastings sampling algorithm. If I got this right, for every variable $X$ in turn, which currently has value $x_{old}$, you generate a new sample $x_{new}$....
6 votes
1 answer
418 views

How to find the Eulerian circuit with the minimum accumulative angular distance within an Eulerian graph?

Note: I originally posed this question to Mathematics, but it was recommended that I try here as well. Context For context, this problem is part of my attempt to determine the path of least inertia ...
2 votes
1 answer
414 views

Integrality certification for product of two matrices $A B^{-1}$

Let's consider two non-singular integer matrices $A,B \in\mathbb{Z}^{n\times n}$. I want a test to check if $A\times B^{-1}$ is integral (or no denominators). I am referring the unimodular ...
0 votes
0 answers
23 views

Online algorithms for MSTs from time series

Is it possible to construct the MST (minimum-weight spanning tree) for an potentially infinite sequence of points $\lbrace (i,Y[i]): i\in\mathbb{N}_0,\,c_{\text{min}} \le Y[i]\le c_{\text{max}}\rbrace$...
2 votes
1 answer
109 views

Convexity of a function

Let: $F_{j+1,y}(s)$ be the cumulative distribution function of a binomial distribution with mean $y$, $j+1$ independent trials considered for $s$ successes. Is it possible to show in any way that: $\...
1 vote
1 answer
262 views

maximal sets of vertices that avoids a clique

I am looking for some known algorithm that finds, for a given graph, all the maximal sets of vertices that avoid a clique of some given size $k$. I'd prefer one written in MATLAB, but other languages ...
0 votes
2 answers
191 views

Compute the average path weights of paths with the same path length in a directed acyclic graph (DAG)

Given a weighted directed acyclic graph (DAG) $G=(V,E)$ with each edge $e\in E$ has a non-negative weight $w(e)$. For a path $p=(e_1,e_2,\dotsc,e_n)$ in $G$, define the path weight as : $w(p)=\sum_{i=...
2 votes
1 answer
311 views

Worst case performance of heuristic for the non-Eulerian windy postman problem

The windy postman problem seeks the cheapest tour in a complete undirected graph, that traverses each edge at least once; the cost of traversing an edge is positive and may depend on the direction, in ...
4 votes
3 answers
286 views

How to recover integer part from known fractional root part?

Suppose you have $r=n+f$ where $n\in\mathbb{N}$ and $f\in (0,1)$. I know that $r^2$ is an integer and I can also get as many digits of $f$ as I like, is there a way to recover the value of $n$? Thank ...
2 votes
0 answers
475 views

Are these finite semirings known?

I am trying to prove the properties below, and by doing this, I hope to find a way to speed up the computation of the below defined addition and multiplication. I am also interested if these finite ...
5 votes
0 answers
78 views

Recovering a binary function on a lattice by studying its sum along closed walks

I recently posted this question on MSE. While it attracted interest, no answers were submitted, so I thought to try and post it here. I have a binary function $f:\mathbb N^2\rightarrow\{0,1\}$. While ...
3 votes
1 answer
343 views

Lot sizing problem: how to add these cuts efficiently

Consider the set of constraints of the uncapacitated lot sizing problem: $$ \{(x,s,y)\in \mathbb{R}^n_+ \times \mathbb{R}^n_+ \times \mathbb{B}^n \;|\;s_{t-1}+x_t = d_t+s_t,\; x_t \le My_t,\; t=1,\...
3 votes
1 answer
432 views

Generating uniquely $k$-optimal point sets

This question is motivated by the observation that finding an optimal tour through a set of points in the Euclidean plane is especially simple, if the points are in convex configuration and, that the ...
5 votes
1 answer
346 views

Details of generation programs supplied with nauty

The program nauty comes with gtools which contains, among others, several generation programs like geng, genbg, ... I was ...
5 votes
1 answer
187 views

Bounds on how many Sidon sets required to cover an integer range from 0-N

If I have a range from 0-N (0,1,2,3...N) and I want to cover that set with some number of Sidon sets, is there a tighter bound than N for how many sets I would need. For instance: 0,1,2,3 can be split ...
9 votes
3 answers
2k views

SDP Feasibility

I have a decision problem that I have formulated as a feasibility SDP. The answer to the decision problem depends on whether the SDP is feasible or not. It is known that a SDP can be solved to ...
0 votes
0 answers
13 views

Complexity of finding single source paths with capacity constraints and length constraints

Let $G=(V,A)$ be a directed graph with distinguished vertex $s\in V$ and let $c:A\rightarrow{\mathbb N}$ denote arc capacities. For any $t\in V,t\not=s$ we are given two numbers: $C_{t},L_{t}$. Let $...
1 vote
1 answer
70 views

Algorithmic complexity of calculating maximum weight $k$-regular subgraphs

Question: what is known about the complexity of calculating the heaviest $k$-regular subgraph of a weighted symmetric graph if edge-weights can also be negative? Please note that in contrast to $k$-...

1
2 3 4 5
32