
This literary work is a weak attempt to attract your consciousness to the modern problem of ensuring the safety of physical objects. In this story, only stationary means of physical protection (hereinafter FZ) and a continuously moving intruder with variable speed are considered.
Imagine that you were offered to head the security service ...
')
There are possible options: you were offered to head the security service of the president, oligarch or nuclear facility located in the city of Ch-70. You have been given the task: to increase the level of security and prevent unauthorized access to the protected object.
Why would you start your work activity in a new workplace at a massive desk?
Right. You lay out on this table a map of the protected object.
The map shows the country residence of a high-ranking official or a nuclear reactor. Both are located on the terrain, enclosed by a wire fence, referred to in official language as the term "perimeter", denoted by the letter L
D. The same map displays the characteristics of the fenced area, such as forests, mountains and other rivers and landscape features. Conventional icons on the same map (secret!) Marked detection devices, sentry posts, minefields and secret hidden noise mines buried in the ground. Also all the additional buildings, roads, paths and other ways of communication are marked. The protected building is marked on the map with the letter M
0 .

Put yourself in the shoes of a person who will be referred to as the “violator”. How is it “more convenient” for the intruder to get to his goal, marked with the letter M
0 ?
Main questions
Two main issues that you need to solve, taking up the direct execution of their new responsibilities.
- What is the effectiveness of a physical protection system?
The ambiguity of the meaning of this term will lead to the fact that, like in a fairy tale, you will have to find something, not knowing what, and at the same time do not know what - How did your predecessors build their work in your new post?
What methods solved the emerging problems?
To the first question, the answer lies on the surface; by the effectiveness of the FZ system, we mean the probability of finding the offender and suppressing his criminal intent.
From a security point of view, probability means that if out of a hundred (100) violators who independently selected their route to a goal, ten (10) reached it safely, then the probability of reaching the goal is 0.1.
If out of a hundred violators, half get to the house marked with the letter M
0 , then it will no longer be a probability, but a passing house. And if without jokes, then the probability will be exactly 0.5 in this case.
However, when using such a definition, the question arises - on every possible path of the intruder from the perimeter to the intended target, this probability is different and does not coincide with the one just calculated. The intruder may be lucky - he will not meet a single sentry, no one will ask him for a pass. On the contrary, upon encountering a guard on the way and not having a pass with him, the intruder finds himself instantly.
Stepping on a mine, the intruder also instantly discovers himself (or rather, the guard discovers his remains).
And having chosen a ravine encountered on the way for his movement, the intruder doesn’t find himself for a long time and can get close to his goal. By crossing the security system equipped with alarms, it can with some degree of probability overcome the intruder (for example, having a means of neutralizing electronic protection systems, or accidentally overcoming the system at the time of its repair).
Two additional questions arise: how to find the probability of overcoming an obstacle (the means of the Federal Law), and how to go through all possible trajectories of the violator to follow, in order to choose the one on which the probability of success of the violator is maximum. If the first task is solved by the creators of the protection tools, and you can find all the necessary data in the secret reference books, then it is simply impossible to sort through all possible paths.
Basic formula
And you write the first formula to write at least something and give a scientific view to your problem.

You translate written into Russian:
The efficiency of the FZ system is the minimum of all possible probabilities of detecting an intruder on the set of all possible trajectories of its movement from the perimeter L D to the target M 0 .
We have already said that it’s impossible to search all the trajectories and we smoothly passed to the second question - how did your predecessors as the head of the security service bypass this impossibility?
The study of this issue also took not a lot of time.
Classical FZ Theory
Your predecessors took a sheet of paper with a map, broke up the entire protected area into sub-areas, replaced each sub-area with a circle, and then connected the drawn circles into straight line segments. In the resulting figure, which in science is called "graph", segments of straight lines, called "edges of the graph", supplied with some numbers, meaning the probability of detection when moving along this edge. In reality, no edges exist. This graph is only a mathematical model of the protected object, it is convenient to use it, because there is a developed graph theory, which allowed, firstly, to reduce an infinite number of imaginable movements of the offender to a finite set of paths (graph edges) and effectively finding such a route along the edges of the graph, which gives the minimum of the possible (I emphasize, by virtue of the finiteness of the trajectories in the model of the protected object!) detection probabilities.
Thus, we have the opportunity to find the value of the efficiency of the FZ system. However, at the same time, a large share of subjectivity is preserved when replacing a real map with a graph, connecting vertices with edges, assigning a detection probability to each edge, and much more. They try to reduce subjectivity by reducing the procedure for replacing a real card with a graph to a set of standard replacements, but this is only a UNIFORM procedure and not an increase in objectivity. This price went to your predecessors the transition from infinity to "finiteness".
You were surprised to find out, by studying the secret literature, that they are doing so in the WHOLE WORLD! And you, as a former student of the Fur-Mat, absolutely dislike it.
Basics of the continuous FZ algorithm
First: we must abandon the imposition of intruders on routes for the intruder;
Each point of the protected area M is assigned a “distribution function” of a random variable, which is the time it takes to detect a subject who is motionless at that point. This function is obtained based on the characteristics of the terrain, the visibility of this point from observation posts (both hourly and instruments) and other factors. I note that this procedure has not yet been formalized!
Instead of the distribution function, its derivative, called the “density of the distribution function”, is used hereinafter, and not even this derivative itself, but its value when the value of the argument t is zero.
This function is called the “risk function” and, defined in all points of the region, forms the risk field
p (M) . The figure shows a territory with a risk field defined in this way, in which areas with the minimum value of this function are represented by a light tone, and the maximum is represented by a dark one.
In the same figure, a red line depicts one of the possible (their infinite number!) Routes of the offender.

The trajectory passes through the points and "accumulates" all the values ​​of the risk function encountered. By exact mathematical means, it is possible to associate the term "effectiveness" with the following formula

The integral is a curvilinear integral of the first kind along the curve, which is the trajectory of the movement of the offender. The function
V (M) is the speed of the intruder. By specifying the type of curve, you can easily find the probability of the goal being achieved by the intruder, and, at the same time, the probability of its detection. Both of these values ​​are equal to one in total. The effectiveness of the FZ system acquires a slightly different, more meaningful expression than before.

Before us is the classic task of the calculus of variations. True, the classical methods of finding both the exact solution and the approximate one are extremely rare in security tasks. And therefore, a beautiful and concise expression for efficiency is useless until an effective means of solving the indicated variational calculus problem appears.
Effective means of solving the problem of variation calculus
Looking at the written functional, remember the lectures on physics. Nothing like? It is in the “Geometrical Optics” section that such an integral is called “eikonal”. Its minimum on all possible paths of the "photon" gives the time for the passage of light from the source to the receiver. In physics, this is called the Fermat principle.
Consequently, a remarkable analogy has been found between the real world and the abstract concept of "security." If we present a picture drawn above as an inhomogeneous optical medium with a local speed of light, then light (“photon”) emitted simultaneously from all points of the perimeter L
D will reach the goal M
0 in a time equal to the efficiency of the FZ system represented by the drawn picture of the risk field, and his (light) path will coincide with the optimal trajectory of the violator. Bingo.
Light wave front
It is rather simple to build a front of a light wave emitted by points on the border of a region — the Huygens principle of the same optics says that each point of the front of a light wave can be considered as a source of light.
Therefore, by constructing a set of circles with centers lying on the former front line and radii equal to (where a sufficiently short time interval), and then constructing the envelope of all the circles constructed in this way, we get a new position of the wave front.
It is more difficult to construct the trajectory of the “desired photon”, which will determine the safest way for the violator and, at the same time, will indicate to the security service the most vulnerable point of protection. I built such an algorithm in an application like a maze for iOS, but it is not optimal and needs to be upgraded.
In addition, there is the task of transferring the resulting algorithm to three-dimensional space, which will allow to effectively solve spatial security problems.