I am working on a project that will hopefully be written in several programming langauges and I therefore need to explain useing maths and words only.

The project deals with trust.



We have a trust value let's call it t and a second value indicating the degrees of seperation between the holder of t and the issuer I'll call that d (for deviation).
The target is T the trust I have based on my deviation from the issuer

If t = 10 and d=4 T=6 - T=t-d
However if t=-10 and d=4 T is -6

So I need to cause T to approach zero from either direction based on the value of d.

However I need to also explain a more complex situation where I use D not d where D is some function of my T for my source of t (d=1).

This will allow me to degrade towards 0 values of d fast or slow based the value T placed upon the source (d=1).

If that was not enough it may be possible that the system might record the source for d=1, d=2 and so forth so that D is some function of T for each stage from issuer to d=1 (I'm d=0 and my trust is theoretically unlimited for myself).

because at each stage on the journy the value t is the sum of all the T recorded at that level (degraded towards 0 against time) the value of t that is recieved could be any number at all negative or possative.

The rest of the math I have a hold on: the average biased against T for example is simply a case of multiplying all the t agaisnt the T for that source and deviding by the sum of T.

Degrad to 0 against time should be so similar to the simple solution as mentioned first that I should be able to work it out for myself.

However I am stuck on two points basic degrade towards 0 (I'm sure it should be simple but my mind is stuck) and the complex based upon the T for the final stage of the journy or all of them (or whatever I have).

I hope to goodness that some one followed all that and that a formula can be created that I can attempt to impliment (php first then VB second I'm guessing after that...)

I think I ned a cup of tea