How can we understand garbage collecting system by using Algorithms?

Mehmet Davut
Learning and Systems Thinking
4 min readMar 22, 2021

--

Algorithms are not incomprehensible things that only exist to help mathematicians and computers. In fact, we use them every day, even if we’re unaware of it. Algorithms contain a lot of problem-solving wisdom that can help you make good decisions, predict probable outcomes and become a more productive individual.¹

I want to discuss, how we can use algorithms to understand and solve problems in our daily life and, also how did it evolve in history. We can discuss about garbage collecting system to understand it easily, because everybody is part of it and may improve. First of all, what is the algorithm?

Algorithm is, a procedure for solving a mathematical problem in a finite number of steps that frequently involves repetition of an operation.²

In definition it says “a mathematical problem” but what is not about mathematic in the world? So, We have a problem about garbages in our home, after using some products. When it reach the maximum capacity, it may create health problems for us and we have to find a solution for this. Fortunately, the municipality offers a garbage collecting system to reduce amount of garbages and solve this problem quickly. This garbage collecting system, basically combination of some procedures which may be defined by algorithms. These are:

  • Collect garbages in a trash at home
  • When it is full, Throw them to the bigger trash bin nearby at public
  • Garbage collectors collect garbages in trash bin at street with their Truck
  • Garbages are collected at disposal central for destruction
  • Finally, they may be used for recycling

Let’s define the first step: Collecting garbages in a trash at home procedure’s algorithm. This has some additional steps to complete process and which may be applied by everybody at home. These are:

  • After using a material, if there is a spare part which will not be used again. Throw it to trash bin.
  • When trash bin is full, throw its contents to the bigger trash bin at street. Then in the next step, garbage collectors may collect it.

As we can see, our garbage collection system’s first procedure “collecting at home” may be solved by some easy steps which may be applied by everyone at home easily. They should just follow these steps to complete this jobs successfully. So, we have defined our algorithm for collecting garbages at home:

  • it solves the problem: “make home clean”
  • it has finite steps
  • it may be repetitive by everyone at home

It doesn’t seem mathematical at first like in algorithm definition, but I think it is. For example, we said that trash bin must be filled. To understand it is filled or not, we may calculate trash bin’s capacity and we may calculate trash’s weight and so on. So it contains mathematical calculations to solve this problem. For a human being may not need to be calculated by a mathematical operation but it contains.

Let’s assume that next procedures working well. And the good news is when this garbage collecting system working, we may improve our first step to make it faster, better, cheaper or more effective way, I mean we can start to think about these. Because when we follow steps defined above for solving home garbage collection problem, we will succeed. So for example, we may split our garbages by kind for recycling and next steps will work. Or, we may develop a robot which collects garbages at home and throw it to trash bin. When we define clearly steps of algorithm, we have a chance to improve it.

What did Al-Khwarizmi do and why it is important?

Statue of Al Khwarizmi, a ninth century mathematician, Ichan Kala, Khiva, Uzbekistan. (Getty Images)

Muhammad ibn Musa al-Khwarizmi, who is a Persian mathematician lived in 9th century in Baghdad, was founded Algorithm. Also, Algorithm name comes from his personal name. He created method of solving linear and quadratic equations worked by first reducing the equation to one of six standard forms (where b and c are positive integers)³

  • squares equal roots (ax2 = bx)
  • squares equal number (ax2 = c)
  • roots equal number (bx = c)
  • squares and roots equal number (ax2 + bx = c)
  • squares and number equal roots (ax2 + c = bx)
  • roots and number equal squares (bx + c = ax2)

By reducing the equation steps defined above, people started to solve complex mathematical equation and started to be able to create definition of solving problems. This is great because, we are able to define abstract steps to define our algorithm to solve real world problems.⁴

Evolution process of using Algorithms

Algorithms was started to use widely in Renaissance Age by building big structures like cathedrals. And then used in Industrial Age by building machines. And now, they are widely used in Computer systems. I’ve quickly jumped today, because computers use it really in wide area and computer scientists define algorithms so fast. Because computer technology gives us a quick calculation option about solving abstract problems. I want to share an algorithm video about searching a word in a dictionary. There are several ways to do this. Some algorithms gives exact results, some of them is quicker, but some clever algorithms both exact and quick, which you may see how to use it in daily life and how to define it abstractly to create a computer program:

--

--