Link prediction is an elemental challenge in network science, which has already found applications in guiding laboratorial experiments, digging out drug targets, recommending online friends, probing network evolution mechanisms, and so on. With a simple assumption that the likelihood of the existence of a link between two nodes can be unfolded by a linear summation of neighboring nodes' contributions, we obtain the analytical solution of the optimal likelihood matrix, which shows remarkably better performance in predicting missing links than the state-of-the-art algorithms for not only simple networks, but also weighted and directed networks. To our surprise, even some degenerated local similarity indices from the solution outperform well-known local indices, which largely refines our knowledge, for example, the number of 3-hop paths between two nodes more accurately predicts missing links than the number of 2-hop paths (i.e., the number of common neighbors), while in previous methods, longer paths are always considered to be less important than shorter paths.Thanks to the breakthrough in uncovering the structural complexity (e.g., small-world 1 and scale-free 2 properties) in real networks, the recent twenty years have witnessed an explosion in the studies of networks, which is turning the so-called network science from niche branches of science in mathematics (i.e., graph theory) and social science (i.e., social network analysis) to an interdisciplinary focus that attracts increasing attentions from physicists, mathematicians, social scientists, computer scientists, biologists, and so on. Recently, the research focus of network science has been shifting from macroscopic statistical regularities 3 to different roles played by microscopic elements, such as nodes 4 and links 5 , in network structure and functions. Therein, link prediction is an elemental challenge that aims at estimating the likelihood that a nonobserved link exists, on the basis of observed links in a network 6 .Link prediction is of particular significance. Theoretically speaking, link prediction can be used as a probe to quantify to which extent the network formation and evolution can be explained by a mechanism model, since a better model should be in principle transferred to a more accurate algorithm 7, 8 . Beyond theoretical interests, link prediction has already found many applications.For example, our knowledge of biological interactions is highly limited, with approximately 99.7% of the molecular interactions in human beings still unknown 9 . Instead of blindly checking all possible interactions, to predict based on known interactions and focus on those links most likely to exist can sharply reduce the experimental costs if the predictions are accurate enough 10 . Analogously, the known interactions between drugs and target proteins are very limited, while it is believed that any single drug can interact with multiple targets 11 . By this time, link prediction algorithms have already played a critical role in finding out new uses of old d...