Uploading already done work. This is the initial program and the start of a second version with directed graphs