Markov Chains
Three companies provide internet service in a city of 20,000 people. At the beginning of the year, the
market shares of each company are as follows: 11,800 people use company A, 6200 people use company
B, and only 2000 people use company C. Each month, 5% of company A’s customers switch to company
B, and 3% of company A’s customers switch to company C. During the same time, 4% of company B’s
customers switch to A, and 6.5% switch to C. Also during the same time, 2% of company C’s customers
switch to company A, and 1.5% switch to company B. Let Ak represent the probability that a randomly
chosen consumer on day k will be using company A’s service, Bk be the probability they will be using
company B’s service, and Ck be the probability that they go with company C.
1) Find the probable market share of each company after the first month.
2) Find the probable market share of each company after six months.
C program code:
#include <stdio.h>
int main()
{
float t, a, b, c, a_, b_, c_, i;
a_ = 11800;
b_ = 6200;
c_ = 2000;
scanf("%f", &t);
for(i = 0; i < t; i++)
{
a = -0.08*a_ + 0.04*b_ + 0.02*c_;
b = -0.105*b_ + 0.05*a_ + 0.015*c_;
c = -0.035*c_ + 0.03*a_ + 0.065*b_;
a_ = a_ + a;
b_ = b_ + b;
c_ = c_ + c;
}
printf("%f %f %f", a_, b_, c_);
return 0;
}
Get Answers For Free
Most questions answered within 1 hours.