Implemented successful algorithm for creating graphs of k reuglarity