**The stability of dynamical systems and invariant polyhedra of matrices**

Linear switching system is a system of ODE x’(t) = A(t)x(t) with the matrix A(t) chosen from a given control set U independently for each t. In other words, this is a linear system with a matrix control. The system is Lyapunov asymptotically stable if its trajectory tends to zero for every switching low A(t). The stability problem has been studied in great details starting with due to many engineering applications. Even for two-element sets U, this problem is in general algorithmically undecidable (Blondel, Tsitsiclis, 2000). It can be solved approximately by the Lyapunov function, which diverges along every trajectory. Among them, invariant Lyapunov functions (Barabanov norms) are especially interesting. In 2017 in a joint work with N.Guglielmi we develop a method of construction of invariant functions. Moreover, recently it was proved that for a generic system, the invariant function is unique and has a simple structure: it is either piecewise linear or piecewise quadratic. This fact is rather surprising since all specialists believed that the general Barabanov norm possesses fractal properties and can hardly be found explicitly. To solve the stability problem one needs first to discretize the system, and the main issue is to estimate the discretization step (the dwell time). We derive that estimate by the sharp constants in the Markov-Bernstein inequality for exponential polynomials