I follow, more or less, the derivation of the KS test statistics's distribution that is given on Wikipedia. The following section on the two-sample test also makes sense if all I want to do is reject the null hypothesis of distribution equality. However, I want to calculate a p-value, not just know that I can reject at $\alpha=0.05$ but not at $\alpha=0.01$. I see how to do the algebra to find $\alpha$, but from where is that $\sqrt{-\frac{1}{2}\text{log}(\alpha)}$ derived?
Could someone please point me to the derivation of the test statistic's distribution in the two-sample case? Is it the same as in the one-sample case but taking one of the empirical CDFs as the distribution for which goodness of fit is determined? (If so, does it matter which empirical CDF we choose, or is there symmetry?) I do not have access to the Knuth book cited but can chase it down if someone knows that to give the derivation I want.
https://en.wikipedia.org/wiki/Kolmogorov%E2%80%93Smirnov_test#Kolmogorov_distribution