Trapdoor implementation
From the paper, $f$ is a pseudo-random function that produces a result of $s$ bits.

You can think of the master key as a vector of $r$ values each $s$ bits long and for pedagogical purposes I'm sure the trapdoor for $w$ could be thought of as the result of hashing the concatenation of each key value $k$ with the word $w$.