I was computing the follow position of a regular expression R.E = (a|b)*abb
by using these algorithms. From given algorithm by using second property i found a problem and can not get the answer. How can be the i is a position in lastposition(n)
1.If n is a cat-node with left child C1 and right child C2 then for every position i in lastpos(C1) , all positions in firstpos(C2) are in
followpos(i).
2.If n is a star-node, and i is a position in lastpos(n) , then all positions in firstpos(n) are in followpos(i).
The fistpostion and the lastposition at every node computed first.