1
vote
0answers
89 views

Who invented the breadth-first permutation algorithm?

My initial problem was solved here. It is about enumerating all n-tuples of a permutation in a specific order. The solution algorithm is very simple and I'm sure has been used before. However, I did ...
1
vote
1answer
77 views

Solving this permutation

I know this is an extremely noob question, but I need some help. since I am stuck Prove the formula $$p(n,r) = \frac{(n + 1 -r) \; (r^2 - 3r + 3) \; (r-2)!}{n!}$$ from this answer.
0
votes
0answers
69 views

Calculate pairing in a rotational system

I'm not even sure how to word this question. So I'll explain it out. I've got these values: A1, A2, B1, B2, B3, C1, C2, I need each A to be paired with each B and C each B with each A and C ...
2
votes
0answers
160 views

Optimal division sequences for divide-and-conquer algorithms

Say we have a discrete data set of some size, and we can use a recursive divide-and-conquer algorithm to process the data in some way (an FFT for example). The naive solution is, say, $n^2$ in ...