A mathematical model of market competition