public int PermanentRandomization()
        {
            RNGCrypto rand = new RNGCrypto();

            int e1 = rand.Next(0, existingEdges.Count - 1);
            int e2 = rand.Next(0, existingEdges.Count - 1);

            while (e1 == e2 ||
                existingEdges[e1].Key == existingEdges[e2].Key ||
                existingEdges[e1].Value == existingEdges[e2].Value ||
                existingEdges[e1].Key == existingEdges[e2].Value ||
                existingEdges[e1].Value == existingEdges[e2].Key ||
                AreConnected(existingEdges[e1].Key, existingEdges[e2].Key) ||
                AreConnected(existingEdges[e1].Value, existingEdges[e2].Value))
            {
                e1 = rand.Next(0, existingEdges.Count - 1);
                e2 = rand.Next(0, existingEdges.Count - 1);
            }

            int vertex1 = existingEdges[e1].Key, vertex2 = existingEdges[e1].Value;
            int vertex3 = existingEdges[e2].Key, vertex4 = existingEdges[e2].Value;
            RemoveConnection(vertex1, vertex2);
            RemoveConnection(vertex3, vertex4);
            // Calculate removed cycles count
            int removedCyclesCount = Cycles3ByVertices(vertex1, vertex2) +
                Cycles3ByVertices(vertex3, vertex4);

            AddConnection(vertex1, vertex3);
            AddConnection(vertex2, vertex4);
            // Calculate removed cycles count
            int addedCyclesCount = Cycles3ByVertices(vertex1, vertex3) +
                Cycles3ByVertices(vertex2, vertex4);

            return addedCyclesCount - removedCyclesCount;
        }
        public int NonPermanentRandomization()
        {
            RNGCrypto rand = new RNGCrypto();

            int edgeToRemove = rand.Next(0, existingEdges.Count - 1);
            int rvertex1 = existingEdges[edgeToRemove].Key;
            int rvertex2 = existingEdges[edgeToRemove].Value;

            int edgeToAdd = rand.Next(0, nonExistingEdges.Count - 1);
            int avertex1 = nonExistingEdges[edgeToAdd].Key;
            int avertex2 = nonExistingEdges[edgeToAdd].Value;

            RemoveConnection(rvertex1, rvertex2);
            // Calculate removed cycles count
            int removedCyclesCount = Cycles3ByVertices(rvertex1, rvertex2);

            AddConnection(avertex1, avertex2);
            // Calculate removed cycles count
            int addedCyclesCount = Cycles3ByVertices(avertex1, avertex2);

            return addedCyclesCount - removedCyclesCount;
        }