S
S
StepanZharychev2016-02-01 12:52:05
Mathematics
StepanZharychev, 2016-02-01 12:52:05

How and where can discrete mathematics be applied in programming?

Very often I hear that discrete mathematics is essential for a programmer, but I have not seen a clearly reasoned answer anywhere with examples of why it is needed and where it is applied.
Therefore, I want to ask programming gurus or people who are simply proficient in this area to provide either educational materials (you can also in Russian and English), or examples from life, where it would be desirable to explain in detail exactly how this section of mathematics is applied.
We kindly ask you to refrain from commenting on the obviousness of this issue, because For me it is not obvious and I would like to understand it.
Thanks in advance.

Answer the question

In order to leave comments, you need to log in

5 answer(s)
V
Vitaly Vitrenko, 2016-02-01
@StepanZharychev

There is such a book Discrete Mathematics for Programmers . There, in my opinion, at the end of each chapter, the application of the chosen topic in programming.

A
AVKor, 2016-02-01
@AVKor

if (c == ' ' || c == '\n' || c == '\t')
(from the classics: KR).

A
Andrey, 2016-02-01
@VladimirAndreev

in logistics, for example ..
find a route, or an algorithm for loading a car, taking into account the route, in order to transport it as much as possible at a time.

V
Vladimir Martyanov, 2016-02-01
@vilgeforce

Cryptography, for example.

M
Mercury13, 2016-02-01
@Mercury13

The Discrete Mathematics program of my department included…
• set
theory • graph theory
• combinatorics
• algebra of logic, propositional calculus
• automata
theory Set theory is the foundation of ALL university mathematics. It is not for nothing that it was also repeated in turbidity analysis. The correspondence is everywhere definite, functional, surjective, injective, bijective. Database theory. Let's say we have an employee and a phone, how do they compare? Do all employees have telephones? Does an employee have two phones? Do all telephones have employees? Does a phone have two employees? Well, the bijective is the correspondence "1: 1". Graph theory - of course, in algorithms on networks. Creation, destruction, detour, pathfinding...
In addition, there are two cool concepts in set theory - the equivalence relation and the order relation. Operations == and <= had to be overloaded?
Combinatorics is a) the number of elements in one or another finite set; b) ways to enumerate them all. For example, I really had to sort through combinations of N elements no more than M. Non-recursively.
The algebra of logic is the basis of how computers work. When a boolean condition is multi-level - how to write it in an understandable form and how to simplify it?
The theory of automata is an extremely simplified principle of how processors work. Therefore, if you need to write an extremely simple virtual machine, see finite automata. And also the Moore automaton is a lexical analyzer in any programming language.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question