Efficient construction of binomial tree

The goal is to build a $n$ step binomial tree knowing the end nodal probabibilities $p_1, \dots, p_m$, which correspond to the time $T$ states $S_1, \dots, S_m$. We assume that all paths ending in the same nodes have the same probabibilities and that todays state $S_0$ is known.

Is there some efficient algo out there, which encorporates dividends?

• Do you mean like computational in terms of data-structures? – SmallChess Nov 18 '15 at 9:37
• Something like that I just want to construct the tree. – Phun Nov 18 '15 at 9:40
• If this is the case, the question is more related to programmers.overflow, because this is really a question for computer scientist. – SmallChess Nov 18 '15 at 9:48
• Not in my view. A binomial tree is clearly a quantitative tool and its fast construction is a relevant problem for quant finance. – Phun Nov 18 '15 at 9:51
• You know what a binomial tree is and about its applications in finance? – Phun Nov 18 '15 at 9:57