2
votes
1answer
95 views

number of derangements

In the normal derangement problem we have to count the number of derangement when each counter has just one correct house,what if some counters have shared houses. A derangement of n numbers is a ...
0
votes
0answers
69 views

How is the algorithm for recursively printing permutations of a set of numbers this equation our professor gave us?

I'm having a great amount of trouble understanding where my prof got $T(m, n) = n(T(m+1, n-1) + m+1 + n)$ if $n > 1$ as the recursive formula for the algorithm for recursively printing the ...
0
votes
2answers
463 views

all possible sequences of positive integers that sum upto N and are strictly increasing

I have $N$ bricks and i have to build a staircase. A staircase will consist of steps of different sizes in decreasing order, no two step size should be same. Each step should consists of atleast one ...
1
vote
0answers
172 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
83 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
74 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 ...