Secret Santa Combinatorics with couples I have researched this site and find several secret Santa related questions but none that I can find that relates to couples. If there are three couples (6 people) and no one can draw their own name or the name of their significant other, how many ways can this be done?
Thanks in advance.
 A: Drawing names for secret santa is equivalent to permutating (rearranging) the names, against a list of the names.
Let 1,a ; 2,b ; 3,c be the 3 couples. Under your conditions, 1,a,2,b,3,c; must be rearranged such that the (original) positions of 1 and a should contain neither of 1 and a, that of 2 and b should have neither of 2 and b, and those of 3 and c should be filled with neither of 3 and c.  


*

*If 1 and a occupy the (original)positions of 3 and c, 2 and b can be given positions in 2 ways. So, 3 and c have to occupy the positions 2 and b. This accounts for 2.2.2 = 8 ways.

*If 1 and a occupy the positions 2 and b, 2 and b have to be both in the places of 3,c. Now, 3 and c can be positioned in 2 ways. This accounts for 2.2.2 =8 ways.

*If 1 and a occupy positions such that one of them is assigned a place of 3,c and the other has a place in 2,b, 2 and b can be placed in 4 ways(the other 2 ways are not allowed since both the positions 3,c have to be filled before placing 3 and c).Now, 3,c can be placed in 2 ways.
There are 4.4.2 = 32 ways under this.


Hence, there are 48 ways in total.
A: Suppose that the couples are Adam and Alice, Bob and Brenda, and Cathy and Charles.
If you just want the answer, you can calculate it online with Sage.
Open a notebook and type 

D = Derangements(['A','A','B','B','C','C'])
D.cardinality()

and click "evaluate". The answer is 10. 
You can, of course, choose different numbers of couples. You could also throw in singles, triples, etc.

If you want a list of them, then evaluate

D.list()

For instance, the entries in ['B','B','C','C','A','A'] are the first letter in the names drawn by Adam, Alice, Bob, Brenda, Cathy, and Charles respectively. 
There are 8 ways to assign names to each arrangement, so the number of named permutations is 80. This result also follows from the formula in joriki's answer here. We have
$$\int_0^\infty (2-4x+x^2)^3 e^{-x}\,dx=80. $$   

Update: 
The Sage program that I suggested outputs a list of ten permutations, for example: ['B', 'B', 'C', 'C', 'A', 'A'].
What does this mean, and how come the answer to this question is sometimes 10 and sometimes 80?
First of all, we may as well  suppose that the six people line up in alphabetical order to randomly choose a name. 
We interpret  ['B', 'B', 'C', 'C', 'A', 'A'] as follows:
$$\begin{array}{c||c|c|c|c|c|c}
\text{Chooser} &\text{Adam}&\text{Alice}&\text{Bob}&\text{Brenda}&\text{Cathy}&\text{Charles}\\ \hline
\text{First letter in}&\text{B}&\text{B}&\text{C}&\text{C}&\text{A}&\text{A}\\
\text{name chosen}\\
\end{array}$$ 
There are a total of ${6!\over 2!\,2!\,2!}=90$ possible permutations, and exactly 10 of them (including the one above) 
correspond to the situation where nobody gets their own name or the name of their partner.
This is why the Sage program returns the answer 10.
Notice that the table above does not tell us what person chose which name, as
this information is not needed. All we need to know is that everyone  chose a name 
 whose first letter differs from the first letter of their own name. The good permutations are 
those with no $A$s in the first two spots, no $B$s in the second two spots, and no $C$s in the final two spots. 
Suppose, though, that we want all that information anyway. One possible 
outcome consistent with the example above is:
$$
\begin{array}{c||c|c|c|c|c|c}
\text{Chooser} &\text{Adam}&\text{Alice}& \text{Bob}& \text{Brenda}& \text{Cathy}& \text{Charles}\\ \hline
\text{Name chosen}&\text{Bob}&\text{Brenda}&\text{Charles}&\text{Cathy}&\text{Adam}&\text{Alice}\\
\end{array} 
$$
There are a total of $6!=720$ "named" permutations and exactly 80 of them 
correspond to the situation where nobody gets their own name or the name of their partner.
You see that every permutation of "first letters" corresponds to exactly $2!\times 2!\times 2!=8$ 
 permutations of "names". That's because you could write, in either order, "Adam, Alice" or "Alice, Adam" for the $A$s.  That is, you have two ways to write in the A-names. Similarly there are two ways to write in the B-names and two ways to write in the C-names. There are eight times as many named permutations as un-named permutations. 
So what is the right answer: 10 or 80? Well, that's up to you. An argument could be made for either choice, but once you know one of them, it is easy to calculate the other one. 
A: I wrote up this algorithm and tested in Maxima. It takes as arguments n for number of total people participating in secret santa and k couples.
It is using inclusion/exclusion with forbidden positions. https://en.wikipedia.org/wiki/Inclusion%E2%80%93exclusion_principle
$$ \sum_{i=0}^{n}{{\left( -1\right) }^{i}}\cdot \left( n-i\right) !\cdot \sum_{j=0}^{\frac{i}{2}}{{2}^{j}}\cdot \begin{pmatrix}k\cr j\end{pmatrix}\cdot \sum_{p=0}^{k-j}{{2}^{2\cdot p}}\cdot \begin{pmatrix}k-j\cr p\end{pmatrix}\cdot \begin{pmatrix}n-2\cdot k\cr i-2\cdot j-p\end{pmatrix} $$
