Supply Chain

Supply Chain

This sage notebook is here to understand what the "right" values for supply chain and competition are. There is a fixed daily demand for food:

qF=101pF

The food (output) is produced by one or more food producers by hiring workers. Each worker every day turns one unit of beef into one unit of food. The labor supply curve is

wF=57qF

The beef (input) is produced by one or more beef producers by hiring workers. Each worker every day creates one unit of beef (no input). The labor supply curve is

wB=57qB
The two labor supplies are independent.

Perfect Competition

In perfect competition there are many food and beef producers. Each of them should act as a price taker.

The profit function of a competitive food producer is:

ΠF=pFqF57q2FpBqF

The profit function of a competitive beef producer is:

ΠB=pBqB57q2B

We also know that in equilibrium the amount of beef produced will be equal to the quantity consumed

qB=qF=q

When we add the demand curve we have 3 equations in 3 unknown

ΠFqFΠBqBqF=0=0=101pF

q, f,b = var('q,f,b') s=solve([ diff(f*q-q*q*5/7 - b*q,q)==0, diff(b*q-5/7*q^2,q)==0, q==101-f] ,f,b,q) s 
       
[[f == (2020/27), b == (1010/27), q == (707/27)]]
Then
qpFpB267537

Food Monopolist, Beef Competitive

Now we have a lot of beef producers but only one food seller which will act as a monopolist.

The beef producers profit function is the same:

ΠB=pBqB57q2B

The food producer instead will consider both prices as a function of its production:

ΠF=pF(qF)qF57q2FpB(qF)qF
Where the solution of the profit function of the beef producer will be the supply function pB(qF) since
qF=qB=q
to insert in the profit function of the food monopolist.

supplyBeef=solve(diff(b*q-5/7*q^2,q)==0,b) supplyBeef 
       
[b == 10/7*q]
solve(diff((101-q)*q-q*q*5/7 - 10/7*q*q,q)==0,q) 
       
[q == (707/44)]
qpFpB168523

Food Competitive, Beef Monopolist

This is the inverse of the previous function. Now the beef producer takes into consideration how its production affect prices:

ΠB=pB(qB)qB57q2B

The food producers instead take all prices as given:

ΠF=pFqF57q2FpBqF
So we need to build beef demand first to solve the monopolist problem

diff(f*q-q*q*5/7 - b*q,q)==0 
       
-b + f - 10/7*q == 0
solve(-b + 101-q - 10/7*q == 0,b) 
       
[b == -17/7*q + 101]
That should be the demand of beef
solve(diff((-17/7*q + 101)*q-5/7*q^2,q)==0,q) 
       
[q == (707/44)]
qpFpB168562