Sum operator precedence The 2019 Stack Overflow Developer Survey Results Are In ...

What's the point in a preamp?

Word for: a synonym with a positive connotation?

US Healthcare consultation for visitors

Why did Peik Lin say, "I'm not an animal"?

Is there a way to generate uniformly distributed points on a sphere from a fixed amount of random real numbers per point?

how can a perfect fourth interval be considered either consonant or dissonant?

Why not take a picture of a closer black hole?

Homework question about an engine pulling a train

Using dividends to reduce short term capital gains?

Didn't get enough time to take a Coding Test - what to do now?

What happens to a Warlock's expended Spell Slots when they gain a Level?

1960s short story making fun of James Bond-style spy fiction

What is the padding with red substance inside of steak packaging?

Do warforged have souls?

"is" operation returns false with ndarray.data attribute, even though two array objects have same id

Make it rain characters

different output for groups and groups USERNAME after adding a username to a group

Why can't wing-mounted spoilers be used to steepen approaches?

Can each chord in a progression create its own key?

Why don't hard Brexiteers insist on a hard border to prevent illegal immigration after Brexit?

Do working physicists consider Newtonian mechanics to be "falsified"?

How to politely respond to generic emails requesting a PhD/job in my lab? Without wasting too much time

Would an alien lifeform be able to achieve space travel if lacking in vision?

Intergalactic human space ship encounters another ship, character gets shunted off beyond known universe, reality starts collapsing



Sum operator precedence



The 2019 Stack Overflow Developer Survey Results Are In
Announcing the arrival of Valued Associate #679: Cesar Manara
Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern)A Ramanujan-like summation: is it correct? Is it extensible?how to sum the floors of ratios n/k when prime factorization of n is knownWhy does this partial derivative of a summation work?Asymptotic behaviour of sum over the inverse japanese symbolOn sharp bounds of some dyadic operatorsClosed form for $sum_k frac{1}{sqrt{k}}$Fractional part summation and asymptotic expansion errorWhat can be said about the series $sum_{n=1}^{infty} left[ frac{1}{n} - frac{1}{sqrt{ n^2 + x^2 }} right]$Closed forms of sums of rational or real powersA logarithmic integral, generalization of a result of Shalev












3












$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{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}$$



should I treat it like this



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



or like this?



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



Could you please clarify those for me?










share|cite|improve this question









$endgroup$












  • $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$
    – M. Nestor
    Mar 22 at 12:50


















3












$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{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}$$



should I treat it like this



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



or like this?



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



Could you please clarify those for me?










share|cite|improve this question









$endgroup$












  • $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$
    – M. Nestor
    Mar 22 at 12:50
















3












3








3


0



$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{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}$$



should I treat it like this



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



or like this?



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



Could you please clarify those for me?










share|cite|improve this question









$endgroup$




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{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}$$



should I treat it like this



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



or like this?



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



Could you please clarify those for me?







summation operator-theory products






share|cite|improve this question













share|cite|improve this question











share|cite|improve this question




share|cite|improve this question










asked Mar 22 at 12:38









Most WantedMost Wanted

1326




1326












  • $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$
    – M. Nestor
    Mar 22 at 12:50




















  • $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$
    – M. Nestor
    Mar 22 at 12:50


















$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$
– M. Nestor
Mar 22 at 12:50






$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$
– M. Nestor
Mar 22 at 12:50












1 Answer
1






active

oldest

votes


















3












$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) cdotgamma &=sum left(p(s,a)cdotgammaright)
end{align*}



The $max$ operator binds stronger than the $+$ operator, so
begin{align*}
underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}
&=left(underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a)right) + sqrt{frac{2log 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.






share|cite|improve this answer











$endgroup$














    Your Answer








    StackExchange.ready(function() {
    var channelOptions = {
    tags: "".split(" "),
    id: "69"
    };
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function() {
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled) {
    StackExchange.using("snippets", function() {
    createEditor();
    });
    }
    else {
    createEditor();
    }
    });

    function createEditor() {
    StackExchange.prepareEditor({
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader: {
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    },
    noCode: true, onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    });


    }
    });














    draft saved

    draft discarded


















    StackExchange.ready(
    function () {
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3158090%2fsum-operator-precedence%23new-answer', 'question_page');
    }
    );

    Post as a guest















    Required, but never shown

























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    3












    $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) cdotgamma &=sum left(p(s,a)cdotgammaright)
    end{align*}



    The $max$ operator binds stronger than the $+$ operator, so
    begin{align*}
    underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}
    &=left(underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a)right) + sqrt{frac{2log 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.






    share|cite|improve this answer











    $endgroup$


















      3












      $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) cdotgamma &=sum left(p(s,a)cdotgammaright)
      end{align*}



      The $max$ operator binds stronger than the $+$ operator, so
      begin{align*}
      underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}
      &=left(underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a)right) + sqrt{frac{2log 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.






      share|cite|improve this answer











      $endgroup$
















        3












        3








        3





        $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) cdotgamma &=sum left(p(s,a)cdotgammaright)
        end{align*}



        The $max$ operator binds stronger than the $+$ operator, so
        begin{align*}
        underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}
        &=left(underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a)right) + sqrt{frac{2log 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.






        share|cite|improve this answer











        $endgroup$




        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) cdotgamma &=sum left(p(s,a)cdotgammaright)
        end{align*}



        The $max$ operator binds stronger than the $+$ operator, so
        begin{align*}
        underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a) + sqrt{frac{2log t}{N_t(a)}}
        &=left(underset{ainmathcal{A}}{operatorname{argmax}} Q_t(a)right) + sqrt{frac{2log 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.







        share|cite|improve this answer














        share|cite|improve this answer



        share|cite|improve this answer








        edited Mar 22 at 19:24

























        answered Mar 22 at 19:17









        Markus ScheuerMarkus Scheuer

        64.1k460152




        64.1k460152






























            draft saved

            draft discarded




















































            Thanks for contributing an answer to Mathematics Stack Exchange!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid



            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.


            Use MathJax to format equations. MathJax reference.


            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function () {
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f3158090%2fsum-operator-precedence%23new-answer', 'question_page');
            }
            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Nidaros erkebispedøme

            Birsay

            Where did Arya get these scars? Unicorn Meta Zoo #1: Why another podcast? Announcing the arrival of Valued Associate #679: Cesar Manara Favourite questions and answers from the 1st quarter of 2019Why did Arya refuse to end it?Has the pronunciation of Arya Stark's name changed?Has Arya forgiven people?Why did Arya Stark lose her vision?Why can Arya still use the faces?Has the Narrow Sea become narrower?Does Arya Stark know how to make poisons outside of the House of Black and White?Why did Nymeria leave Arya?Why did Arya not kill the Lannister soldiers she encountered in the Riverlands?What is the current canonical age of Sansa, Bran and Arya Stark?