http://www.emse.fr/spip/IMG/pdf/RR_2007-500-009.pdfWe study a problem of lot-sizing and sequencing several discrete products on a single machine. A sequence dependent setup time is required between the lots of di erent products. The machine is imperfect in the sense that it can produce defective items, and furthermore, it can break down. The number of the defective items of each product is given as an integer valued non-decreasing function of the manufactured quantity of this product, and the total machine breakdown time is given as a real valued non-decreasing function of the manufactured quantities of all the products. Two problem settings are considered. In the rst setting, the objective is to minimize the completion time of the last item, provided that all the product demands for the good quality items are satis ed. In the second setting, the objective is to minimize the total cost of the demand dissatisfaction, provided that a given upper bound on the completion time of the last item has been satis ed. We derive properties of the optimal solutions, NP-hardness proofs for the general cases, and polynomial exact and approximation algorithms for the case, in which the number of the defective items is given by rounding down a linear function of the manufactured quantity. This case is known as the \fraction defective" case in the quality control literature