Under perfect competition (when input prices are fixed and there are no external economies or diseconomies), the industry supply curve is derived by

vertically adding the average cost curves
horizontally adding the average cost curves
vertically adding the marginal cost curves
horizontally adding the marginal cost curves

The correct answer is: D. horizontally adding the marginal cost curves.

Under perfect competition, firms are price-takers, meaning that they cannot influence the market price. As a result, they will produce at the point where marginal cost equals price. The industry supply curve is then derived by horizontally adding the marginal cost curves of all the firms in the industry.

Option A is incorrect because average cost curves are not relevant in the long run, when all costs are variable. Option B is incorrect because average cost curves do not reflect the marginal cost of production. Option C is incorrect because marginal cost curves do not reflect the average cost of production.