Probability of 2 Cards being adjacent I read about a magic trick yesterday that relied on probability - I gave it a try a few times and it seemed to work, but I was wondering what the actual probability of success is. I understand basic probability but I'm not quite sure how I would calculate this. 
The basic premise stands as follows: choose two distinct card ranks (without a suit) e.g. king and a 7 (but you cannot choose both the same). Shuffle the cards and now fan them out. There should be a king and a 7 adjacent to each other in the pack, just based on probabilities.
My question is what are the chances of success here? Or how do you calculate it?
 A: This can be calculated precisely using the theorem of total probability. There are 8 mutually exclusive conditioning cases: 8 spaces next to 4 kings (the kings sufficiently well spread out in the pack), down to only 1 space next to 4 kings (all 4 kings at one side or the other). Clearly the more spaces you have, the more chance there is of one of the spaces being occupied by a 7. So an upper bound on the probability is given by the probability of getting at least one 7 in one of the 8 spaces, which is $1 -$ the probability of getting no 7s in any one of the 8 spaces.
$$\begin{eqnarray*}
1 - \rm{Pr}(\mbox{no 7s in 8 spaces}) &=& 1 - \frac{44}{48}\frac{43}{47}\frac{42}{46}\frac{41}{45}\frac{40}{44}\frac{39}{43}\frac{38}{42}\frac{37}{41} \\
&=& 1 - \frac{40 \times 39 \times 38 \times 37}{48 \times 47\times 46\times 45} \\
&=& 0.53
\end{eqnarray*}$$
which isn't as high as the question suggests.
Edit: It's possible to calculate the probability programmatically, by running through all the $\frac{52!}{4!4!44!}$ = 52677670500 possible permutations. Using the following C++ program, which took an hour or two to run, the probability comes to 0.486279. I would prefer it if there were a more elegant way of computing the probability however!
#include <stdio.h>
#include <algorithm>
#include <math.h>

int main(int argc, char* argv[])
{
    const int n = 52;
    int x[52] = {
        0,0,0,0,
        1,1,1,1,
        3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3,3};
    double count = 0;
    double total = 0;
    double lastFreqPrinted = 0;
    do {
        total++;
        for(int i=1; i<n; ++i) {
            if ((x[i-1] + x[i]) == 1) {
                count++;
                double freq = count/total;
                if (fabs(lastFreqPrinted - freq) > 0.0001) {
                    printf("%.4f out of %.0f\n", freq, total);
                    lastFreqPrinted = freq;
                }
                break;
            }
        }
    } while (std::next_permutation(x,x+n));
    printf("%f out of %.0f\n", count/total, total);
    return 0;
}

A: 4 (Queens) x 4 (Kings) x 2 (swap QK order) x 51 (places in the deck) x 50! (rest of cards) / 52! (every possible deck) 
=0.6153846154
Does this even make sense? It's been a long time since I've done any probabilities. 
A: Inspired by the exact answer of the elusive User $940$, I decided to try a different tack to obtain the same answer
Considering the Kings and $7's$ arranged amongst themselves, there are $\frac{8!}{2!2!} = 70$ permutations. Using symmetry, for the $35$ reversible patterns, we can find the minimum number of spacers needed to keep just the Kings and $7's$ apart as
\begin{array}{| c | c | c | c | c | c | c | c | c|}\hline \\Spacers &1 &2 &3 &4 &5 &6 &7 \\ \hline Cases & 1 & 3 & 9 & 9 & 9 & 3 & 1\\ \hline \end{array}
We can now view it as a stars and bars problem with  $52$ minus preplaced spacers as stars and the $8$ (kings plus $7's$) as bars, and compute the probability that no two Kings and $7's$ are adjacent as
$$\frac{\binom{51}8+3\binom{50}8 + 9\binom{49}8 + 9\binom{48}8 + 9\binom{47}8 +3\binom{46}8 +\binom{45}8}{35\binom{52}8}$$
$$= \frac{300684703}{585307450},\approx 0.513721$$
A: A very rough estimation (it does not consider the fact that in your example a king may be the first or last card, and that there may be two consecutive kings) is that there are four kings, each of which has two neighboroughs: so the probability there is no 7 near a king is $1 -(\frac{12}{13})^8 \approx .473$... I thought it would be higher.
The kings are accounted for, so (in this approximation) it should be $1 -(\frac{11}{12})^8 \approx 0.5015$.  Better is to account for the fact that you have used up some of the non-sevens, so $1-\frac{44\cdot 43\cdot 42\dots 37}{48\cdot 47 \cdot 46 \dots 41}=1-\frac {44!40!}{48!36!}\approx 0.5303$
A: I just hacked together a Monte Carlo simulation.
After 100.000.000 tries, the average success rate of your "trick" is 48.625%, which is quite close to the value in the answer of TonToe.
When using a smaller 32 card deck instead, the success rate increases to about 68%.
