The authors present an algorithm which considers a set of product types and a set of machine types. The algorithm works out a partition of p subsets of product types, called product families, and a partition of q subsets of machine types, called production subsystems such that: either p=q and there exists a one-to-one relationship between production subsystems and product families, or p=q+1 (or q=p+1) and there exists a one-to-one relationship between r production subsystems and product families, where r is the minimum value of p and q. The supplementary subset of product (or machine) types has corresponding subset of machine (or product) types. In both cases the partitions obtained maximize a criterion which is the weighted sum of normalized processing times of each product family in its related production subsystem and the complements of normalized processing times of each product family outside its related production subsystem. In the latter case the supplementary subset of product (or machine) types contains only products which have insignificant processing times (or machines which are only rarely or briefly involved by product transformation). The authors prove the convergence of the present algorithm and give some numerical results.