This program was made in order to help solve problem 8.4 from book Programming Pearls by Jon Bentley using STL and multithreading
It generates random vectors sample of numbers from interval [-1, 1) and finds average maximal subvector sum.
In order to compile it use:
make
To count expected value of maximal subvector sum from vector length n with given sample:
./expected_value n sample
where n and sample are positive integers