Skip to main content
replaced http://crypto.stackexchange.com/ with https://crypto.stackexchange.com/
Source Link

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer herehere:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \approx 0. \end{eqnarray}$$

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer here:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \approx 0. \end{eqnarray}$$

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer here:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \approx 0. \end{eqnarray}$$

Mod Moved Comments To Chat
added 11 characters in body
Source Link
Artjom B.
  • 2.1k
  • 1
  • 23
  • 53

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer here:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \end{eqnarray}$$$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \approx 0. \end{eqnarray}$$

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer here:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \end{eqnarray}$$

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer here:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \approx 0. \end{eqnarray}$$

Source Link
Artjom B.
  • 2.1k
  • 1
  • 23
  • 53

Both are correct, you've just made an error calculating it.

Here is a simplification from my answer here:

$$\begin{eqnarray} p(n) & = & 1 - \frac{q!}{q^n\left(q-n\right)!}\\ & = & 1 - \frac{\prod^q_{i=q-n+1}i}{q^n}\\ & = & 1 - \prod^q_{i=q-n+1}\frac{i}{q} \end{eqnarray}$$

So,

$$\begin{eqnarray} p(2) & = & 1 - \prod^q_{i=q-2+1}\frac{i}{q} \\ & = & 1 - \prod^q_{i=q-1}\frac{i}{q} \\ & = & 1 - \frac{q-1}{q}\cdot \frac{q}{q} \\ & = & 1 - \frac{q-1}{q} \\ & = & 1 - (\frac{q}{q} - \frac{1}{q}) \\ & = & \frac{1}{q} \end{eqnarray}$$