Definition:Can't Happen

From ProofWiki
Jump to: navigation, search


Probability Theory

Let $A$ be an event in a probability space $\left({\Omega, \Sigma, \Pr}\right)$.

Suppose $\Pr \left({A}\right) = 0$.

Then we say (colloquially) that $A$ can't happen.

Computer Science

A branch of a program which, because of the way the flow is structured, cannot be accessed, is referred to as can't happen:

if (x == 1) then {
    do.something (x)
} else if (x != 1) then {
    do.somethingElse (x)
} else {
    // can't happen

There are sometimes reasons for doing stuff like this, but professionals usually wince when they have to maintain it.