Help in solving this interesting problem

Правка en3, от Apptica, 2017-12-10 06:47:19

You are given a set S of n strings. Sum of length of all the strings <= 2 * 10^5. Now you have to find the size of the smallest generating set for these n strings. The smallest generating set is the minimal subset of the set S such that by concatenating some of its strings multiple times you can generate all the strings in the set S.
For example let the set S contains strings "ab" , "abb" , "b" and "a" then the answer is 2 as you can have a set {"a" , "b"} which is the subset of set S and using these strings you can generate all the 4 strings. Also you can concatenate any string >= 0 times.
Link to the problem statement.

Теги string algorithms, #help

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en3 Английский Apptica 2017-12-10 06:47:19 31
en2 Английский Apptica 2017-12-10 06:38:41 78
en1 Английский Apptica 2017-12-09 22:28:03 755 Initial revision (published)