Confusion regarding the notation used for in the Handbook of Applied Cryptography (integers subtracted from functions, cardinality of functions, etc)

255 Views Asked by At

I'm currently reading "The Handbook of Applied Cryptography" (The full textbook is available as pdf documents from that page) and I'm struggling to understand some of the notation in Chapter 2 that's used on pages 51 and 52.

I've screenshotted the relevant sections:


Calculating Variance


Law of large numbers


My source of confusion comes from the (X-μ) in the first image. I don't really get it since X is meant to be a function and p is a number, I don't get how I can do integer subtraction (or maybe it's set difference) with that type mismatch? There must be something about the notation I'm not understanding.

My confusion with the second piece of notation is similar, how does one compute the cardinality of a function minus an number? Looking at this from a programmer's perspective there seems to be type violations here.

2

There are 2 best solutions below

5
On

The numbers subtracted from $X$ are to be understood as constant functions; subtraction is done pointwise. So $(X-\mu)(z)=X(z)-\mu$, and similarly with $p$ in place of $\mu$. The vertical lines in the second confusion mean absolute value (again computed pointwise), not cardinality.

22
On

For your first question, it's assumed when dealing with expectations of random variables that you are acting on the range of the random variable, which is a set of numbers. So no type violation. The second notation question is absolute value, not cardinality.

In general, math "abuses notation" a lot. I imagine this is disconcerting from a programming perspective, but doing math is not the same as doing programming, and it is often clear from context what the abuse of notation is. In your first example, it is understood that we are acting on the range of $X$, but it first needs to be explained that we are doing this.