The median of a singleton set is the element itself. The median of a set with two elements is the average of the elements.
What should a machine return when required the median of an empty set?
The median of a singleton set is the element itself. The median of a set with two elements is the average of the elements.
What should a machine return when required the median of an empty set?
The median of a set $A$ is the value $\tilde\mu$ such that the sets $\{x \in A : x \lt \tilde\mu\}$ and $\{x \in A : x \gt \tilde\mu\}$ have the same number of elements, and if there is not one unique such value then it is the one that is the arithmetic mean of the largest element of the first set and the smallest element of the second.
If $A = \emptyset$, then the partitioned sets are both empty, and so do not have largest or smallest elements, so there is no such value, and so the median is undefined.