Why is set theory so important to computation?

Asked

Viewed 3,574 times

14

For computer theory, formal languages among other areas as well as for programming (development) set theory is always present, I know that mathematics is strongly linked to computation, but why do we have such a large emphasis on sets?!

2 answers

12


Is that some of the mathematical truths that affect sets also affect computation.

For example, one can prove that each computer program can be related to an integer number. Just imagine all the bits of an application as a single integer, quite large number. Therefore, the set of existing programs is similar to the set of integers (they have the same "cardinality").

Computational problems can be related to the set of real numbers. This set has a higher cardinality than the integers, that is, we can say that there are many more real numbers than integers, although they are two infinite sets.

From this conclusion regarding the sets, we conclude that there are many more computational problems than computer programs. To put it another way, there are numerous computational problems that have no solution, cannot be solved by a computer program.

One of these problems is precisely the "halting problem", where one program must analyze another and decide whether it will run for a finite time, or not. Solving this problem would be very useful because it would make it possible for a development environment to automatically "prove" that a program is bug-free, etc.

But unfortunately the halting problem has no solution. Of course, the static analyzers manage to catch some bugs and conclude that some programs will stop or not. What is impossible is to find a generic algorithm, universal, able to analyze any other program including itself.

So there’s an example of the importance of set theory. Because of her we know that there are some limits to what a computer can do, which saves the trouble of trying :)

  • 1

    An addition: Set theory is the basis for creating analysis programs, Developers use set theory for instructions of repetition and variation between processes and activities developed in the execution of the program.

9

In addition to the context explained by colleague @epx, I think it is important to mention that set theory is the basis for the Relational Model, widely implemented by relational database Engineering.

In more detail, the Relational Model is based on Relational Algebra. Serious database disciplines do not introduce any technology (Oracle, Mysql, SQL Server, Sqlite) or even SQL, without first exposing the student to Relational Algebra.

The operations of Relational Algebra are Projection (columns selected in SELECT), Selection (what is put in the WHERE clause), Product (a cross-Join, also known as Cartesian product), Junction (an INNER JOIN), Union (operator UNION and UNION ALL), Difference (MINUS operator and EXCEPT in some databases).

More details:

Relational Model

Relational Algebra

  • 2

    Yes, I had included this in the answer, but as I understand very little of this business, I preferred to leave it out. But from a practical point of view it is a very important use. A developer is much more likely to run into a database than an impossible problem :)

Browser other questions tagged

You are not signed in. Login or sign up in order to post.