Message Boards Message Boards


How do I find out if something will stabilize as it approaches infinity?

Posted 9 years ago
7 Replies
4 Total Likes

I have this project in calculus that I'm having trouble with. I'm supposed to find the answer to this question:

Facebook and Twitter provide consistent competition for one another as the top two social media outlets. In daily polls, the companies ask users which of the two social media outlets they prefer. The results of these polls found that 70% of those people surveyed that already prefer Facebook will still prefer Facebook the next day while 30% of those initially listing their preference as Facebook will switch their social media ties to Twitter. On the other hand, people belonging the the Twitter craze decide to keep their loyalties with Twitter at a rate of 80%. The remaining 20% of Twitter users decide to shift to liking Facebook as their favorite social media outlet. Currently, 60% of the people using social media prefer Facebook while the remaining 40% prefer Twitter. Using the aforementioned data, determine if this model of social media preferences ever stabilizes, that is, determine if there exists an exact percentage of people preferring Facebook versus a percentage of people with a Twitter preference that this model tends to go to as the number of days get larger and larger. Provide supporting evidence for your claim.

I know that it has to do with the function as days approach infinity but I'm not really sure where to start.

7 Replies
Posted 9 years ago

And one more way with the discrete form. This relies on solving the linear system for stasis. (But this does not guarantee the stasis point will be reached.)

In[12]:= Solve[{-0.3 fb + 0.2 tw == 0, 0.3 fb - 0.2 tw == 0, tw == 1}]

Out[12]= {{fb -> 0.666667, tw -> 1.}}
POSTED BY: David Keith
Posted 9 years ago

Perhaps you are to turn it into a continuous problem, rather than discrete. The code below writes the relationship as coupled diffeqs and solves the system for general initial conditions. We find that Twitter will enjoy 60% of the market. When you apply the evolution rule to these numbers, you find that for the discrete system it is in steady state.

In[1]:= eqs = {
   fb'[d] == -0.3 fb[d] + 0.2 tw[d],
   tw'[d] == 0.3 fb[d] - 0.2 tw[d],
   fb[0] == fb0, tw[0] == tw0

In[2]:= sol = DSolve[eqs, {fb[d], tw[d]}, d][[1]];

In[3]:= Limit[{fb[d], tw[d]} /. sol, d -> Infinity]

Out[3]= {0.4 (1. fb0 + 1. tw0), 0.6 (1. fb0 + 1. tw0)}
POSTED BY: David Keith

My guess is, since this appears to be a programming problem to some extent, that the prof wants you to iterate the update rule (that's what those day-to-day transitions are) to see what happens over many iterations.

This might be more help than one is supposed to give, but here is some Mathematica code for doing this type of iteration.

Clear[f, t]
f[0] = .6;
t[0] = .4;
f[n_] := f[n] = .7*f[n - 1] + .2*t[n - 1]
t[n_] := t[n] = .3*f[n - 1] + .8*t[n - 1]

Now compute f and t for some positive integer values of n, and see what happens.

And stay calm (from your picture, you seem to be beside yourself).

POSTED BY: Daniel Lichtblau


I am not sure whether I typed something in wrong, but you could try this. Suppose that you write a vector, the first component of which is the percentage of Facebook users and the second the percentage of Twitter users. The process is Markovian. These transition matrices (or probability matrices) have the characteristic that the columns add up to one. In your case the matrix is

matrix = {{0.7, 0.2}, {0.3, 0.8}}

If you use


it looks more familiar.

enter image description here

Okay. After one step the things looks like this

matrix.{0.6, 0.4}

i.e. you multiply the matrix with the vector. You can use NestList to iterate that:

NestList[matrix.# &, matrix, 20].{0.6, 0.4}

The result of this is

{{0.5, 0.5}, {0.45, 0.55}, {0.425, 0.575}, {0.4125, 0.5875}, {0.40625,
   0.59375}, {0.403125, 0.596875}, {0.401563, 0.598438}, {0.400781, 
  0.599219}, {0.400391, 0.599609}, {0.400195, 0.599805}, {0.400098, 
  0.599902}, {0.400049, 0.599951}, {0.400024, 0.599976}, {0.400012, 
  0.599988}, {0.400006, 0.599994}, {0.400003, 0.599997}, {0.400002, 
  0.599998}, {0.400001, 0.599999}, {0.4, 0.6}, {0.4, 0.6}, {0.4, 0.6}}

This shows you that it settles down to a ratio of 40% Facebook vs 60% Twitter. you can also plot the process:

ListPlot[Transpose[NestList[matrix.# &, matrix, 20].{0.6, 0.4}]]

enter image description here

Of course this is not really a water-tight argument. There is however a theorem that helps. On page 107 of "A Course on the Web Graph" you find an argument that shows that the dominant eigenvector, i.e. the one with eigenvalue 1, gives under some conditions the final ratio. In Mathematica the eigenvectors are ordered with respect to their eigenvalues so


gives the correct ratio of

{-0.5547, -0.83205}

Note that the negative of this is also an eigenvector. Also we can normalise it to one, i.e. 100%, like so:

 Eigenvectors[matrix][[1]]/Total[ Eigenvectors[matrix][[1]]]

which gives:

{0.4, 0.6}

So if I haven't made some stupid typo, the ratio of Facebook/Twitter followers will invert the original ratio in the example you gave.

Hope this helps, Marco

PS: I am aware that this does not really add much to what Daniel already said, but I had already started typing...

POSTED BY: Marco Thiel

This is probably right but we haven't covered any of this matrix stuff yet so I think we're supposed to solve it a different way. My professor gave a similar example when he introduced limits at infinity (but he didn't show us how to solve for it), so that makes me think I can find out if it stabilizes if I can find some way to write it where the number of days approaches infinity and then find the limit. Is there any way to do that?

It involves linear algebra, or at least can be set up that way. A certain 2x2 matrix gives the transitions from one day to another. So multiplying that matrix by today's preference fraction vector of {.6,.4} will give tomorrow's preferences. Multiply again to get the prefs for the day after. Etc.

Some experimenting might give an idea of whether this stabilizes. If you have covered matrix powers, that could also be quite useful here.

This can also be set up as a recurrence problem (which, under the hood, will use similar technology to the linear algebra approach). If we denote days by n then one equation might be f[n+1]==7/10*f[n]+1/5*t[n]. For solving recurrences in Mathematica there is RSolve.

POSTED BY: Daniel Lichtblau

Thanks! I'll experiment with that. This is probably really obvious, but why is the function f(n+1)?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract