I'm trying to understand the complexity of computing the Merkle root for stateful hash based signature schemes. Section 4.1 of the chapter on hash based signatures in "Post Quantum Cryptography" – by Bernstein, Buchmann and Dahmen (Springer Berlin Heidelberg states) -
($H$ in the following excerpt is the height of the Merkle tree, and $N$ is the number of leaf nodes such that $H = \log_{2}(N$))
"Average Costs. Each node in the tree is eventually part of an authentication path, so one useful measure is the total cost of computing each node value exactly once. There are $2^{H−h}$ right (respectively, left) nodes at height $h$, and if computed independently, each costs $2^{h+1} −1$ operations. Rounding up, this is $2^{H+1} = 2N$ operations, or two per round. Adding together the costs for each height $h$ with $(0 ≤ h< H)$, we expect, on average, $2H = 2\log(N)$ operations per round to be required"
I follow the analysis up to the point of needing $2^{H+1} = 2N$ operations. Then I lose the script, specifically I am confused about the subsequent statement "we expect, on average, $2H = 2\log(N)$ operations per round to be required". I am not sure what this means - its seems that computing the root would require at most $2N$ operations. I am not sure what the $2H=2\log_{2}(N)$ operations per round is referring to. Can someone shed some light on this and confirm that in the worst case computing the Merkle root ab initio requires $2N$ operations?
In addition, I have a follow on question around the space complexity - is it always the case that ab initio computation of the Merkle root from the leaves requires space linear in the tree height $H$?