# Google Spanner principle: The largest single database on the planet

Source: Internet
Author: User

10 great algorithms for truly dominating the world

Some day ago, I was browsing Reddit and found an interesting article, "Ten Algorithms to rule the world," in which George Dvorsky tried to explain the importance of algorithms to the world today, and which algorithms are most important to human civilization.

At this point, if you've learned the algorithm, the first thing that comes to mind when you're reading that article, perhaps, is "does the author know what the algorithm is?" " or " Facebook's news Feed is an algorithm? "because if Facebook's news feed is an algorithm, you can eventually classify almost everything as an algorithm. So in this article I'll try to explain what the algorithm is, and which 10 (and perhaps more) algorithms are really governing the world.

What is an algorithm?

Frankly, the algorithm is any well-defined calculation process that receives some value or set as input and produces some value or set as output. Thus, the algorithm is a series of computational processes that convert input into output. Source: Thomas H. Cormen, Chales E. Leiserson (2009), third edition of the introduction to algorithms. **

In short, we can say that the algorithm is a series of steps to solve a particular task (yes, not only the computer is using the algorithm, the same is true for humans). Currently, an effective algorithm should contain three important features:

1. It must be limited: If you design an algorithm that never endlessly tries to solve a problem, then it is useless.
2. It must have a well-defined directive: every step of the algorithm must be precisely defined, and the instruction should be unambiguous in any scenario.
3. It must be valid: an algorithm is designed to solve a problem, then it should be able to solve the problem, and only using paper and pens can prove that the algorithm is convergent.

Another important point to note is that the algorithm is not only used in computer science, but also in the field of mathematics. In fact, the first documented mathematical algorithm dates back to the 1600 BC, when the ancient Babylonians developed the earliest known algorithm for factoring and calculating square roots. Here, we answer the first question in the previous article, which says that the algorithm is the entity of the computer category, but if you know the true meaning of the word algorithm, the ten algorithms that truly dominate the world can be found in mathematical books (addition, subtraction, product, and so on).

But in this article, let's limit the definition of the algorithm to computer algorithms, so the remaining question is: which 10 algorithms dominate the world? Here I have organized a small list, ranked in no particular order.

1. Merge sort, quick sort and heap sort

Which sorting algorithm is best? It depends on your needs, which is why I'm putting these three high-frequency sorting algorithms in one place. Maybe you prefer one of them, but they are all equally important.

The merge sort algorithm is one of the most important algorithms we have so far. It is a sort algorithm based on comparison, which solves the problem that the original complexity is O (n^2) by using the divide-and-conquer method. The merge sort was invented by mathematician John von Neumann in 1945.

The quick sort is another way to solve the sorting problem, it uses the in-place decomposition algorithm, and it is also a kind of divide and conquer algorithm. The problem with this algorithm is that it is an unstable sorting algorithm, but it is really efficient in memory-based array sequencing.

Finally, the heap sorting algorithm uses a priority queue to reduce the data lookup time, which is also an in-place sorting algorithm, which is also an unstable sorting algorithm.

Compared to other sorting algorithms that have been used (such as bubble sorting), the algorithms above have brought significant improvements. In fact, thanks to them, today we have data mining, artificial intelligence, link analysis, and most of the world's computer tools, including the Internet.

(Recommended reading: "Visual intuitive experience 7 kinds of commonly used sorting algorithm")

2. Fourier transform and fast Fourier transform

The entire digital world is using these simple and powerful algorithms to convert signals from the frequency domain to the last domain, and vice versa. In fact, thanks to these algorithms, you can only see this article.

The Internet, your wifi, smartphones, phones, computers, routers, satellites, almost everything built into the computer will use these algorithms in various ways to achieve their respective functions. If you don't learn these important algorithms, you won't get a degree in electronics, computers or communications.

Note: About Fourier transform, you can look at Han Hao wrote this article, "The popular explanation of Fourier transform" full version.

3. Dijkstra algorithm

It is no exaggeration to say that without this algorithm, the Internet will not work effectively today. This is a graph search algorithm, which is widely used in the problem that can be modeled as a graph to find the shortest path between two nodes.

Currently, even if we already have a better way to solve the shortest path problem, the Dijkstra algorithm is still being applied in systems that value stability.

4. RSA Algorithm

Without information encryption and network security, the Internet will not be as important as it is now. You can assume that "security is a matter of course for the NSA and other intelligence agencies" or "You think you're safe on the internet, it's naïve". However, people need to be safe when they spend money, after all, you don't enter your credit card number on a Web server, if you know it's unsafe.

In the field of information encryption, an algorithm is always one of the most important algorithms in the world, it is the RSA algorithm. The algorithm was established by the founder of RSA, which makes the information encryption benefit millions of households, and lays the foundation for the operation of information encryption today. The RSA algorithm is used to solve a simple and complex problem: how to share the public key between different platforms and end users, and then encrypt the information (I want to show that this problem is not completely solved, I think we need to do more work in this direction).

5. Secure Hash Algorithm

To be precise, it cannot be called an algorithm, it is a member of the family of cryptographic hashing functions defined by the American National Institute of Standards and Technology, but this family of algorithms is essential to the operation of the whole world. From your App store, your email, your anti-virus software, to your browser, and so on, all of these are using a secure hashing algorithm that can tell if you've downloaded what you want, and whether you're the victim of a man-in-the-middle attack or phishing attack.

6. Integer factorization

This is a mathematical algorithm that is used extensively in the field of computers, and without this algorithm, information encryption will be less secure. The algorithm defines a series of steps to decompose a composite into a smaller factor. This is considered to be a FNP problem, it is an extension of NP classification problem, it is extremely difficult to solve.

Many cryptographic protocols, such as the RSA algorithm, are based on the principle that factoring large composite is very difficult. If an algorithm can quickly factorization any integer, RSA's public key cryptography system loses its security.

The birth of quantum computing makes it easier to solve such problems, and it opens up a whole new field that allows us to take advantage of the characteristics of the quantum world to ensure system security.

In the internet age, it is very important to analyze the relationship between different entities. From search engines to social networks to marketing analytics tools, everyone is constantly looking for the real structure of the Internet.

There is evidence to suggest that link analysis is one of the most misunderstood and misleading algorithms in the public mind. The problem here is that there are many different ways to link analysis, and there are many features that make these algorithms look slightly different (these differences allow the algorithm to patent independently), but they are essentially similar.

The idea behind link analysis is very simple, drawing a graph in matrix form to transform the problem into a eigenvalue problem. Eigenvalues are a good channel for showing the structure of diagrams and the relative importance of each node. The algorithm was established in 1976 by Gabriel Pinski and Francis Narin.

Who is using this algorithm? Google's page rank algorithm, a news feed that Facebook shows you (which is why Facebook's news feeds are not algorithms, just the results of using algorithms), Google + and Facebook's friend referrals, LinkedIn works and contacts testimonials, Netflix and Hulu movies, YouTube videos, and more. Although each has different goals and parameters, the mathematical philosophy behind them is the same.

Finally, I want to make it clear that although Google is the first company to use such algorithms, in 1996 (two years before Google), a small search engine, "Rankdex", built by Robin Li, has already used this idea in its web ranking mechanism. Later, Hypersearch's founder, Massimo Marchiori, used another page ranking algorithm based on the relationship between the pages. (Google mentions the two founders in its patent)

(Recommended reading: "Zhang Yang: Analysis of PageRank algorithm)

8. Proportional Integral differential algorithm

Have you ever used a plane, car, satellite service or cellular network? Have you ever worked in a factory or seen a robot? If the answer is yes, then you should have seen the algorithm.

In general, the algorithm uses a control loop feedback mechanism to minimize errors between the expected output signal and the actual output signal. Wherever you need to signal processing, or if you need an electronic system to automate the control of mechanical, hydraulic, or thermal systems, this algorithm will work.

It can be said that without this algorithm, modern civilization will cease to exist.

9. Data compression algorithm

It is difficult to determine which data compression algorithm is most important because it depends on different application environments. They can be applied to both zip and MP3, as well as to JPEG and MPEG-2. But it is well known that these algorithms are extremely important in all structures.

In addition to the obvious zip file, where can we find these algorithms? This page is compressed and downloaded to you locally, and we can find these algorithms in video games, videos, music, data storage, cloud computing, databases, and more. It can be said that data compression algorithms are everywhere, they make the system cost less and more efficient.

10. Random Number Generation

Now we don't have a "real" random number generator, but we already have some pseudo-random number generators, which is enough. The use of random number generators is very extensive, from interconnection, data encryption, security hashing algorithms, video games, artificial intelligence, optimization analysis, to the initial conditions of the problem, finance and so on, have their figure.

(Recommended reading: "When random enough random: a lesson in online poker games")

Finally, I would like to emphasize that the above list is for reference, it is not complete. Because there are algorithms in the fields of machine learning, matrix multiplication, and classification, they are equally important to our world, but not mentioned here.

Google Spanner principle: The largest single database on the planet

Related Keywords:

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

## A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

• #### Sales Support

1 on 1 presale consultation

• #### After-Sales Support

24/7 Technical Support 6 Free Tickets per Quarter Faster Response

• Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.