V
V
Vladislav Orlov2020-09-08 18:22:17
Discrete Math
Vladislav Orlov, 2020-09-08 18:22:17

Where does a programmer really need knowledge of discrete mathematics?

I will be grateful if you give a detailed answer

Answer the question

In order to leave comments, you need to log in

1 answer(s)
W
Wataru, 2020-09-08
@nagibator2281337

If you write something more complicated than forms, then it may come in handy.
For example, if you need to move a looped array by some positions, then to do this without using extra memory, you can only understand how permutations work and a little bit of number theory.
Then, graph theory pops up quite often. The same build systems that need to determine in what order to build parts of the project. It is unlikely that you will ever have to write an assembly system, but if you have some kind of business application and there are some "tasks" that depend on each other, then topological sorting and all sorts of bypasses to find cyclic dependencies are also discrete.
Finite automata are a very convenient tool for organizing non-trivial logic, and finding the shortest path is a fairly common task in game development. In general, igrodel requires mathematics.
Dynamic programming, which is essentially computation on an acyclic directed state graph, is also sometimes useful. For example, somehow at work I had to break some data into network packets, but so that the packets were minimal and the largest packet was the smallest, and at the same time, data could be cut only in strictly defined places. Solved by dynamic programming.
If you need to implement a search in a document, some kind of data compression is algorithms for working with strings.
The Trie data structure is very cool and I used it when I needed to download and parse a site to store downloaded urls. At the same time, there is a bit of graph theory to bypass.
And if you are a developer of a compiler or some kind of media codec, then the discrete one climbs out of all the cracks (theory of languages, formal parsers, discrete Fourier transform).

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question