Complex network is the abstract topology of a large number of nodes and edges in reality. How to reveal the influences of internal network topology on network connectivity and vulnerability characteristics is a hotspot of current research. In this paper, we analyze the influence of assortativity according to Newman's definition of assortativity in a given degree distribution. To fully understand the influence of assortativity we should change the assortativity to see how the topology of network changes. But we find the existing greedy algorithm cannot improve assortativity effectively. First we put forward a deterministic algorithm based on degree distribution and an uncertain algorithm based on probability distribution to increase assortativity. The deterministic algorithm can create a certain network which has a large assortativity without changing node degree. The uncertain algorithm can increase the assortativity continuously by changing the connection of edges. And the uncertain algorithm creates different graphs each time, so the result of the algorithm is uncertain. Then we test our algorithms on three networks (ER network, BA network, Email network) and compare with greedy algorithm, and the experimental results show that the uncertain algorithm performs better than greedy algorithm in three networks which have a large span of assortativity. And our deterministic algorithm performs well in a real world network. We find that we can increase assortativity coefficient up to 1 in ER network. This is because nodes in the ER network are peer to peer. We can also show that that the assortativity cannot increase up to 1 in some networks because nodes in these networks are not in the same status. Because we obtain a large span of assortativity, we can fully understand the change of network topology. On this basis, we analyze the changes of clustering coefficient when using the uncertain algorithm based on a probability distribution to increase the assortativity. We find that there is a certain correlation between assortativity and clustering. And we study the micro influence of uncertain algorithm on network, by which the reason of the change of clustering coefficient is explained. We calculate the changes of giant branches and small branches. The changes of the number of nodes in giant branches and the number of small branches show that the scale of giant branches becomes smaller, which means that the connection between nodes in giant branches becomes closer. The increase of the number of small branches means that the network as a whole becomes more fragile. So we can show how the uncertain algorithm changes the topology of the network without changing the degree of nodes in the network. Then we can use this algorithm to change the network to obtain a larger span of assortativity for further study.