We show that while primitivity is algorithmically decidable, unless P=NP it is not possible to decide primitivity of a matrix set in polynomial time. Moreover, we show that the length of the shortest positive sequence can be superpolynomial in the dimension of the matrices. On the other hand, defining P to be the set of matrices with no zero rows or columns, we give a combinatorial proof of the Protasov–Voynov characterization (2012) of primitivity for matrices in P which can be tested in polynomial time. This latter observation is related to the well-known 1964 conjecture of 膶erný on synchronizing automata; in fact, any bound on the minimal length of a synchronizing word for synchronizing automata immediately translates into a bound on the length of the shortest positive product of a primitive set of matrices in P. In particular, any primitive set of n×n matrices in P has a positive product of length O(n3).