Argmax as the parameter of a function?

517 Views Asked by At

Let $P = \{p_1,\dots,p_n\}$ and $Q = \{q_1,\dots,q_n\}$ be two sets of points and $d(p,q)$ a distance function between points. Given an element $p_k$ I would like to know which is the maximum distance to any element of $Q$.

The $arg\max$ returns the argument that maximizes the values of function. So, how should I write that?

$maxDistance = d(p_k,arg\max_q(d(p_k,q)))$ ?

Thanks!

1

There are 1 best solutions below

1
On

That would work (provided all the points have different distances to $p_k$, so the maximizing argument is unique). However, there is a much simpler solution: The value of a function at its arg max is its maximum, so for each $p \in P$ the maximum distance to any element of $Q$ is simply$$\max_{q \in Q} d(p, q).$$