The question is what is the steady-state average for cwnd?
Write a program to find out, through simulation.
Using Visual C++, you can get a random number in the range 0..1 with
double(rand())/RAND_MAX
If this quantity is less than p, then set cwnd=cwnd/2 (minimum 1!);
otherwise set cwnd+=1/cwnd.
(Note cwnd must be of type double, initially 1.0.)
Run this for "a long time", and see what steady-state behavior you get.
(I used 100,000 runs to get the average; you can probably get away with a smaller number.)
Do this for a variety of different values of p, and try to find a relationship. Hint: as p gets smaller, the limiting cwnd gets larger; you might try plotting 1/p versus cwnd.
Note that cwnd will continue to oscillate in an irregular sawtooth; what you are trying to measure is the average value. It is very important that the data you collect represents long-term averages of cwnd.
If you use a 15-bit random-number generator, then you can probably only get p down to about 0.002 before roundoff issues overwhelm things. Try a random-number generator with more bits, or concatenate two 15-bit random numbers to get a 30-bit number, or just try to figure the relationship based on data using p=0.1 down to p=0.002.
In trying to establish the relationship, it is also very important that you don't compress one of the axes, without care. If you want to use a logarithmic axis for p (or 1/p), that works, but you must then also use a logarithmic axis for cwnd!. Otherwise just stick with linear axes (but plot 1/p).