Replication in the multi-period binomial model. 

For the solution: 
Just wanted to ask for $V_{3}(HTH)$ I get $S_{1}(H)$ and $S_{3}(HTH)$ to give me the same maximum value of $16$ so would it also be right if I used $S_{1}(H)$ nstead of $S_{3}(HTH)$?
Same applies for $V_{3}(THT)$ for which I get $S_{0}$ and $S_{2}(TH)$ which both give me a maximum value of $8$ so could I have used $S_{3}(TH)$ instead of $S_{0}$? 
Any help would be much appreciated.
 A: First, you have to compute the value of the payoff of your lookback option. 
For example consider path $THT$. You have:
$S_{0}=8$, $S_{1}=4$, $S_{2}=8$ and $S_{3}=4$ 
It means that 
$$\max\left\{S_{0},S_{1},S_{2},S_{3}\right\}=\max\left\{8,4,8,4\right\}=8$$
So the payoff is of the form 
$$V_{3}(THT)=\max_{0\leq n\leq 3}S_{n}-S_{3}=8-4=4$$
It doesn't matter if you choose $S_{0}$ or $S_{2}$ to compute the maximum.

If you compute all $8$ payoffs you have two methods for pricing: replication and risk-neutral pricing method.
In the case of risk-neutral pricing method the martingale measure is of the form $Q(p^{*},1-p^{*})$, where
$$p^{*}=\frac{1+r-d}{u-d}$$
And you have to compute the following steps:
First step:
$C(HH)=\frac{1}{1.25}\left(p^{*}V_{3}(HHH)+(1-p^{*})V_{3}(HHT)\right)$
$C(HT)=\frac{1}{1.25}\left(p^{*}V_{3}(HTH)+(1-p^{*})V_{3}(HTT)\right)$
$C(TH)=\frac{1}{1.25}\left(p^{*}V_{3}(THH)+(1-p^{*})V_{3}(THT)\right)$
$C(TT)=\frac{1}{1.25}\left(p^{*}V_{3}(TTH)+(1-p^{*})V_{3}(TTT)\right)$
Second step:
$C(H)=\frac{1}{1.25}\left(p^{*}C(HH)+(1-p^{*})C(HT)\right)$
$C(T)=\frac{1}{1.25}\left(p^{*}C(TH)+(1-p^{*})C(TT)\right)$
Last step:
$C(0)=\frac{1}{1.25}\left(p^{*}C(H)+(1-p^{*})C(T)\right)$
The price of the lookback option is equal to $C(0)$.
