We settle complexity questions of two problems about the free monoid L * generated by a finite set L of words over an alphabet Σ. The first one is the Frobenius monoid problem, which is whether for a given finite set of words L, the language L * is cofinite. The open question concerning its computational complexity was originally posed by Shallit and Xu in 2009. The second problem is whether L * is factor universal, which means that every word over Σ is a factor of some word from L * . It is related to the longstanding Restivo's open question from 1981 about the maximal length of the shortest words which are not factors of any word from L * . We show that both problems are PSPACE-complete, which holds even if the alphabet is binary. Additionally, we exhibit families of sets L that show exponential (in the sum of the lengths of words in L or in the length of the longest words in L) worst-case lower bounds on the lengths related to both problems: the length of the longest words not in L * when L * is cofinite, and the length of the shortest words that are not a factor of any word in L * when L * is not factor universal. The second family essentially settles in the negative the Restivo's conjecture and its weaker variations. As auxiliary tools, we introduce the concept of set rewriting systems. Finally, we note upper bounds on the computation time and the length for both problems, which are exponential only in the length of the longest words in L.