Search Results
Search type | Search syntax |
---|---|
Tags | [tag] |
Exact | "words here" |
Author |
user:1234 user:me (yours) |
Score |
score:3 (3+) score:0 (none) |
Answers |
answers:3 (3+) answers:0 (none) isaccepted:yes hasaccepted:no inquestion:1234 |
Views | views:250 |
Code | code:"if (foo != bar)" |
Sections |
title:apples body:"apples oranges" |
URL | url:"*.example.com" |
Saves | in:saves |
Status |
closed:yes duplicate:no migrated:no wiki:no |
Types |
is:question is:answer |
Exclude |
-[tag] -apples |
For more details on advanced search visit our help page |
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.
9
votes
Accepted
Efficiently computing $\prod_{i=1}^{n} A_i$
To be unambiguous about the order of multiplication, let $B(n) = A_1 A_2 \cdots A_n$. We have the D-finite recurrences
$B(n)_{r,1} = (\frac{n}{n-1})^k B(n-1)_{r,1} + n^k B(n-2)_{r,1}$
$B(n)_{r,2} = B …
4
votes
Accepted
Correctness of the algorithm for the A329369, A347205 and related sequences
Generalise to $$b(2^m(2k+1)) = \sum\limits_{j=0}^{m}C_{m+1,j} \, b(2^jk), \\
b(0) = 1$$
Consider the infinite matrices: $$M_0 = \begin{pmatrix} 0 & 1 & 0 & 0 & \cdots \\
0 & 0 & 1 & 0 & \cdots \\
0 & …
2
votes
Accepted
Is there an algorithm to generate non-isomorphic Halin graphs?
There is a theorem due to Jordan which is useful for enumerating or generating trees: every tree has a centre or a bicentre. To enumerate/generate suitable bicentral trees, enumerate/generate suitable …
1
vote
Accepted
Is there an efficient generalized algorithm to generate a set of binary words satisfying a p...
If $m = 2^a b$ where $b$ is odd, the words $(0^{2^k} 1^{2^k})^{2^{a-k-1}b}$ for $k < a$ have cross-correlation $2^{a-1}b$. This appears to give a (potentially one of many) set of maximum size which ac …
0
votes
Method to solve modular quadratic polynomial
If $q$ is prime then first solve $f(x) \equiv 0 \pmod q$ using the standard expression $\frac{-b \pm \sqrt{b^2-4ac}}{2a}$; there are three cases for $\sqrt{y} \pmod q$:
If $y$ is not a quadratic resi …
25
votes
Accepted
How can you find an integer coefficient polynomial knowing its values only at a few points (...
You can certainly do better than brute force by considering modular constraints. If the solution is $p(x) = \sum_i a_i x^i$ then $p(x) - \sum_{j=0}^{n-1} a_j x^j$ is divisible by $x^n$ and $$\frac{p(x …