4
See
[
3
]
for a similar algorithm.