This is the simple exercise I am trying to solve, where I have to say if $R$ is a function, but I would like to have some feedback on my solution:
John, Mary, Susan, and Fred go out to dinner and sit at a round table. Let $P = \{John, Mary, Susan, Fred \}$, and let $R = \{ (p,q) \in P \times P \mid$ the person p is sitting immediately to the right of the person q $\}$. Is $R$ a function from $P$ to $P$?
I think this is a function, because if they are sitting in a round table, each person $p$ in the group has just 1 person $q$ to its left.
I know this is a simple simple problem, but just to make sure I am not studying wrongly.
Yes, your reasoning is perfect. In fact, it's not too hard to show that this function is also injective (one-to-one) and surjective (onto). Since the domain is equal to the codomain, we say that $R$ is a special type of bijection known as a permutation.