c programs generating voter model in a box invariant distribution sample configuration