5
$\begingroup$

I'm trying to read some simple equations and in order to interpret them in the right way I need to know $\sum$ and $\prod $ operator range/precedence.

$$ \sum p(s, a) +\gamma $$

is equal to $\sum(p(s,a) + \gamma)$ or $\sum(p(s,a)) + \gamma$.

The same question is for product operator.

Also, for UCB1 formula

$$ A_t = \underset{a\in\mathcal{A}}{\operatorname{argmax}} Q_t(a) + \sqrt{\frac{2\log t}{N_t(a)}}$$

should I treat it like this

$$ A_t = \underset{a\in\mathcal{A}}{\operatorname{argmax}}\Bigl( Q_t(a) + \sqrt{\frac{2\log t}{N_t(a)}} \Bigr) $$

or like this?

$$ A_t = \underset{a\in\mathcal{A}}{\operatorname{argmax}}\Bigl( Q_t(a) \Bigr) + \sqrt{\frac{2\log t}{N_t(a)}} $$

Could you please clarify those for me?

$\endgroup$
1
  • $\begingroup$ For $A_t$ it is the first option since the root term depends on $a$ which is iterated by $\text{argmax}$. In other words $a$ cannot appear outside $\text{argmax}$ like it does in the second option. For the sum I think it depends on the context. $\endgroup$
    – user519413
    Mar 22, 2019 at 12:50

1 Answer 1

6
$\begingroup$

The $\sum$ operator and $+$ have the same precedence level, so \begin{align*} \sum p(s, a) +\gamma &=\left(\sum p(s,a)\right)+\gamma \end{align*} contrary to

\begin{align*} \sum p(s, a) \cdot\gamma &=\sum \left(p(s,a)\cdot\gamma\right) \end{align*}

The $\max$ operator binds stronger than the $+$ operator, so \begin{align*} \underset{a\in\mathcal{A}}{\operatorname{argmax}} Q_t(a) + \sqrt{\frac{2\log t}{N_t(a)}} &=\left(\underset{a\in\mathcal{A}}{\operatorname{argmax}} Q_t(a)\right) + \sqrt{\frac{2\log t}{N_t(a)}} \end{align*}

Hint: You might find chapter 2: Sums in Concrete Mathematics by R.L. Graham, D.E. Knuth and O. Patashnik helpful. It provides a thorough introduction in the usage of sums.

$\endgroup$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .