Functions and Sets

Robert, Susan, and Thomas are the sole contestants in a lottery in which two prizes will be awarded. Three tickets with their names on them are placed in a hat. The person whose name is on the first ticket drawn wins prize #1. That ticket is placed back in. Then the second ticket is drawn. You can win both prizes. Let $A = \{1, 2\}$, $B = \{r, s, t\}$ where $R = \text {robert}$, etc a.) Explain how each possible assignment of prizes to contestants may be thought of as a function from $A$ to $B$ and why $B^A$ may be thought of as representing the set of all such possible assignments. d.) In terms of assignments of prizes in the lottery, what does it mean to say that an element of $B^A$ is an injection?

My attempt:

a.) So it's essentially f(1) = r, s, t f(2) = r, s, t

Because either prize can map to any contestant. But then these aren't functions, are they? Because the same value maps to multiple people (potentially).

And the function A --> B is the set of all possible assignments because it explains how awards can be matched to contestants?

d.) So an injective function is 1 to 1. If an element of A --> B is an injection, that means each value in A (domain) only maps to one value in the codomain (B), and no two values in A map to the same value in B. That is to say, an element of B^A that is an injection means that a player did not win both of the prizes.

Am I vaguely close?

• I would say your answer to d) is definitely correct. I think your a) needs a bit of work. Let's say Susan wins prize 1 and Thomas wins prize 2. This would correspond to the function $1\mapsto s$ and $2\maps to t$. Other configurations would be handled by other functions. Mar 26, 2015 at 2:20

What you’re missing in (a) is that although $f(1)$ can be any of the values $r,s$, and $t$ (and similarly for $f(2)$, for any specific assignment of prizes it is exactly one of those three possible values. You don’t have one non-function somehow taking three values at once: you have several different functions. Specifically, there are $3^2=9$ possible functions from $A$ to $B$:

\begin{align*} &f(1)=r,f(2)=r\\ &f(1)=r,f(2)=s\\ &f(1)=r,f(2)=t\\ &f(1)=s,f(2)=r\\ &f(1)=s,f(2)=s\\ &f(1)=s,f(2)=t\\ &f(1)=t,f(2)=r\\ &f(1)=t,f(2)=s\\ &f(1)=t,f(2)=t\\ \end{align*}\tag{1}

To complete (a) you could offer something like $(1)$ illustrating how the functions correspond to the possible assignments of prizes, with $f(i)=x$ meaning that prize $i$ goes to participant $x$.

As others have noted, your answer to (d) is correct: if we consider only the injective functions, we get the functions corresponding to a version of the lottery in which no participant may receive both prizes: the ticket drawn first is not returned to the hat.

• Hi Brian, quick (kinda random) conceptual question if you don't mind: for example, given the position of a ball as a function of time $f(t)=x$ is it correct to say that this function is well defined because at each time $t$ the ball’s position $x$ is unique? Furthermore, if we wanted this description to refer to an injective function would we have to also say something like "the ball's position can't be the same for different times" (because for an injective function, each element of the range has exactly one preimage or equivalently, each element of the codomain has at most one preimage)? Jul 13, 2022 at 16:24
• @TaylorRendon: Yes, that’s all correct. Jul 13, 2022 at 18:55

For a,it is OK for a function to map different inputs to the same output. For functions of the reals, $f(x)=0$ is a fine function-it takes any real as an input and returns $0$. A function just has to return a single value for any input. You haven't done the last sentence of the problem, showing how $B^A$ can represent all assignments.

For d, "each value in A (domain) only maps to one value in the codomain (B)" is required of any function, so is not peculiar to injective functions and could be deleted. The rest of the answer is good.