Let there be a functions $f$ and $g$ such that, $$f:A \times B \mapsto \Re$$ $$g: B \mapsto A$$ where $\forall b \in B$, $g(b)$ is some $a$ such that, $\forall a' \in A, f(a,b) \geq f(a',b)$. (This is because there could be many elements in $A$ that suffices $\forall a' \in A, f(a,b) \geq f(a',b)$)
My question is, is there a simple notation to write this function $g$?
e.g. I can write $g$ as a relation as, $$g(b) = \{a|\forall a' \in A, f(a,b) \geq f(a',b)\}$$ But $g$ is a function that chooses one element from the set $\{a|\forall a' \in A, f(a,b) \geq f(a',b)\}$. The mechanism of choosing an element from the set is random.
--EDIT--
I said random to mean that it could be any of those values. No statistics involved. What I have is a computer program that computes the maximum (using a linear searching method) as described and returns (i.e. outputs) it. I want to explain it mathematically. Pardon me since I am a novice to mathematics.
I think it would be best if you would define $g$ in plain words, e.g. first define $$A_b = \{a \mid \forall a' \in A.\ f(a,b) \geq f(a', b)\}$$ and then say that $$g : B \to A \quad \quad \text{ or } \quad \quad g : B \to \bigcup_{b \in B}A_b$$ is a function that assigns any $b \in B$ a random element from $A_b$ (I guess that your $A_b$ is finite and random means uniform distribution).
However, be aware that this isn't very formal. The problem isn't that its text (there is no problem with text-only definition being formal), but the notion of randomness. To speak about random events and probability you need to define a probability space (usually denoted $\Omega$) and your function would have to depend on it, that is, in math you could have one function
$$g : \Omega \times B \to A$$
or a set
$$g_b : \Omega \to A_b$$
for $b \in B$. To emphasize the difference, functions are deterministic by definition, i.e. for same inputs you get the same outputs. The usual computer-science $\mathtt{rand}$ is not a function, because for same input it returns different outputs (the same goes for things which read from $\mathtt{stdin}$, etc.). Therefore, to simulate the probabilistic behavior, you introduce a dependency on the probability space. That might get messy (I am not saying that it will, only that it might), so I would advise you to avoid formality in this case (unless you really need it), just make the textual description clear enough to get the meaning through.
Some other thoughts, I'm not sure, but it might be easier for you to define a relation $\leq_b$ by $x \leq_b y \iff f(x,b) \leq f(y,b)$ instead of writing $f(x,b)$ everywhere. On the other hand, the construction of $A_b$ suggests that $\leq_b$ is not a partial order, as so consider using some other symbol, as $\leq_b$ might be misleading.
I hope that helps $\ddot\smile$