ComputersProgramming

Eratosthenes sieve in programming

Mathematics is a science that has appeared for several thousand years and was actively used already in Ancient Greece. At the same time, many theoreticians who lived at that time made discoveries that had become great and brilliant, but real recognition was received several centuries later, when technologies made it possible to understand the full potential of the studies of ancient arithmeticians. It should be noted that all calculations in distant eras were conducted "in the mind" or contained large-scale records of calculations. One of the most famous Greek specialists was Eratosthenes, secretly called the great-great-grandfather of programming. With the advent of computer science, it was precisely his calculations, theories and axioms that were often transformed into computer "languages". In the arsenal of mathematics there were several interesting discoveries, but the most common was the Eratosthenes sieve, helping to quickly find a prime number from the presented sequence.

Biography of the scientist

Despite the fact that all the activities of a specialist took place on the territory of Ancient Greece, a future genius was born in Africa in the third century BC. A scientist was studying in the largest cities of Greece, where he stayed on a permanent basis. His teachers were famous poets, philosophers and grammars of the time. Thanks to the many-sided development and respect in the circle of like-minded people, the ingenious theorist is invited to the position of the librarian of Alexandria, where he served until his death, creating opuses and studies unbelievable for that period in various fields, including the sieve of Eratosthenes. Contemporary scholar - the legendary Archimedes - spoke of him only in flattering tones and even devoted his work to a separate work.

Achievements

The main feature of the ancient scientist is considered to be the versatility of the studied directions. In almost all spheres, he achieved outstanding results. Philosophy, poetry, mathematics, astronomy, music, philology, geography - for such a unique universalism in the search for knowledge, the theorist received the nickname Pentatl, by association with sports all-around. Of course, he did not become great in one of the studied areas, but in each of them it was possible to achieve good results. This is evidenced by the surviving fragments of his works and studies. Despite finding some shadow of his contemporaries, the scientist made a huge contribution to the history of mathematics, and the Eratosthenes sieve with a number of other known calculations rightfully became one line with the famous geometric and arithmetical discoveries.

History of the name and details of location

In ancient times, all records, including mathematical calculations were made on special plates of wax. Therefore, in calculations of an algebraic and arithmetical nature, especially during the deletion of figures in sequences, scientists "punctured" them on writing utensils. After all the works, the tablet resembled an item of household utensils, for which the study was named - the sieve of Eratosthenes . The impetus for the discovery was the thought of a genius about finding prime numbers in a natural row. The work lasted several months, until the final result was achieved. In the third century BC it became a real breakthrough.

What is an algorithm?

A quick way to find all the prime numbers in a natural row has been of interest to scientists since time immemorial. After all, they do not have a strict sequence and are arranged in a conditionally random order. At the moment, the specialists have largely figured out and learned how to produce the necessary calculations quickly enough. In this they helped a simple algorithm - the sieve of Eratosthenes. The ancient genius opened it in several stages:

  • Take a natural series from one to any number (the universal term N). It should be noted that a few millennia ago a unit was considered a prime number. Now he is referred to a special species that does not have a strict definition.
  • Further, all the numbers divisible by the deuce are deleted.
  • Then the first of the remaining (in this case, the triple) is taken and all the digits that are divided into it are deleted.
  • The calculation continues to the last number in the sequence.
  • The remaining series will contain only simple indicators.

This option has long been considered the only effective, and with the advent of computer science specialists were able to make calculations of more complex sequences. Even with new technologies, Eratosthenes' sieve is the most important mathematical theory.

Programming languages in the field of arithmetic calculations

Technology, computers and informatics allowed mathematicians studying algebraic theories to enter a new stage in the development of science. First of all, taking advantage of a unique opportunity, they began to integrate well-known arithmetic and geometric studies into programming. One of the most popular electronic-computational languages at that time was, including the calculation of the algorithm of the sieve Eratosthenes, Pascal. With its help in a few seconds it was possible to find prime numbers in a sequence of natural numbers that for a long time were inaccessible or counted by grandiose records, taking a long time. As a result, the practical basis of the new potential has been improved version of the ancient discovery and practical unlimited possibilities of calculations.

Use at modern Olympiad in Informatics

At the moment, the competition for students in various subjects is gaining popularity again. Laureates and winners of such events reach a new level of education and can get good prospects in further activities, including material grants. Olympiad in Informatics includes not only complex problems, but also finding such known concepts as prime numbers. The Eratosthenes sieve is used as the most relevant method for calculating sequences, by integrating the axiom into program code. Despite the antiquity of the discovery, this theory helps to quickly and effectively learn in hard-to-reach calculations.

Similar articles

 

 

 

 

Trending Now

 

 

 

 

Newest

Copyright © 2018 en.delachieve.com. Theme powered by WordPress.