how do firms know what to produce how much will be produced how to produce it and for whom to produce it​