A combinatorial approach to the set-theoretic solutions of the Yang–Baxter equation