**4. Determination of Times and Paths of the Fastest Sound Propagation Using Dijkstra's Algorithm**

In this paper, Dijkstra's algorithm [40] was used to evaluate the shape of paths of the fastest propagation of ultrasound waves and the time needed for them to travel in concrete elements. The physical basis for this type of calculations is Fermat's principle [36]. Implementation of Dijkstra's algorithm in this type of problem in a compact material area *<sup>V</sup>* <sup>∈</sup> *<sup>R</sup>*<sup>2</sup> (plane case) may be described as follows (e.g., Reference [42]). Let a sonic pulse be given at point *S* ∈ *V* which triggers the propagation of a specific wave type (e.g., longitudinal). Then, a graph from nodes with numbers *i* assigned to points *Xi* ∈ *V* (*i* = 1, 2, ... , *m*) should be built. *S* is one of the points *Xi*, and edges of the graph will be created only between those nodes which the *XiXj* ⊂ *V* (*i*, *j* = 1, 2, ... , *m*) condition is met for. Weight values *w*(*i*, *j*) for the particular edges will be the pass-through times of sound between the points, assuming that it is moving in a straight line section *XiXj*. Hence:

$$w(i,j) = \int\_{\chi\_i}^{\chi\_j} \frac{dl\_{ij}}{c},\tag{21}$$

where: *c*—considered wave speed (m/s), *lij*—variable describing the position on a straight line section joining points *Xi* and *Xj* (m). In general, it can be seen that the more nodes evenly covering the *V* area (e.g., assuming an orthogonal grid of points *Xi*—Figure 7), the more accurate the calculation will be carried out. To increase the time efficiency of the method, when we are only interested in the time of sound propagation between selected two points, the number of nodes can be reduced only to those that lie within a reasonable distance from the straight line connecting these points and/or do not place nodes in a sub-areas where it is known that *D* ≈ 0. If the graph is constructed, it is possible to use Dijkstra's method in a standard way, i.e.,:


**Figure 7.** Illustrative orthogonal node arrangement for a graph in a plane problem (based on Reference [42]).

In the final effect of the algorithm operation, the vector components *di* are equal to the time after which, from the moment of excitation of the wave at point *S*, it reaches the point *Xi* assuming that the wave can only move on the edges of the graph. Remembering during the calculation also the next nodes indicated in point 3 of the algorithm, you can recreate the path of the fastest wave propagation in the graph.
