random contraction algorithm

not such an effective realisation, ‘cos i read every time from the file