The ancient holivar about whether a programmer needs a mathematician has received an unexpected continuation in the debate on the exam. The idea that there is no need to test knowledge at all, but the ability to quickly search for answers, began to move actively. Well, as a conclusion - the replacement of the exam on the championship search Google / Yandex. In my opinion, with the same success you can hold an exam in the form of a search in the school library. For some reason, no one notices such an obvious truth that those who know what to look for quickly find answers, that is, they have knowledge. To confirm this idea, I made 3 problems for programmers, whose algorithms I would find in a couple of minutes. Try it and you do it. It seems to me that only people who have a good knowledge of mathematics can quickly cope. If you quickly fail, then think about how much information you cannot find simply because ignorance of mathematics does not allow you to properly formulate a question.
Task 1: The guard at the enterprise must work for April 6 days (from 00:00 to 23:59). Output all ways of arranging these 6 days in the format 00100111000, where 0 is a holiday, 1 is a working day. The guard can work 6 days in a row. Task 2: The director of the company Melkosoft set before you the task to write a screensaver, which simulates a maze bypass according to the rule of the left hand from a random point. The second programmer has written a function that generates connected labyrinths (you can walk to any point from any point), but in some cases the detour by the rule of left becomes a detour in a circle around the wall. It is necessary to add new walls to the labyrinth so that it remains connected, but there would be no circular routes left in it, which do not cost the entire labyrinth. Task 3: The first player has N coins, and the second one does not have them at all. Players decide whose move by throwing a coin. If you walked first, he puts 1 coin on the table. If to the second, he takes 1 coin from the table, if the table is not empty. As soon as one player has made N moves, only the other goes on, until he also makes N moves. How many coin fallout sequences are there in which the second player will take all the coins? Example 1: N = 4. 11112222. With such a sequence of moves, first the first will lay out N coins, and then the second will take them all. The second won. Example 2: N = 1. 21. During the turn of the second player, the table is still empty, so he will not take a single coin and lose.
What would I have been looking for?After a little thought, I would have driven into a search engine:
Task 1: Generate Combinations Task 2: spanning tree Problem 3: Catalan numbers
')
UPD. Important
The task was not to solve these problems at any cost (they are very simple), but to find a ready-made solution or description of the algorithm on the Internet. I believe that everything is smart here and they will solve these problems in a dozen ways without any mathematics. I just tried to prove that lack of knowledge will force you to reinvent the wheel, instead of finding a ready-made algorithm or answer.
UPD2. Kill yourself
For those who believe that tasks are sucked from the finger:
If the result of solving your “applied” tasks was seen by more people than the solution of this “sucked-out” task - you can be proud of yourself.