Results 1 to 6 of 6

Thread: degrade towards zero

  1. #1

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    degrade towards zero

    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
    ?
    'What's this bit for anyway?
    For Jono

  2. #2
    type Woss is new Grumpy; wossname's Avatar
    Join Date
    Aug 2002
    Location
    #!/bin/bash
    Posts
    5,682

    Re: degrade towards zero

    Basicaly you are having sign problems, t can be positive or negative but d is always positive?

    If you make d the same sign as t then..... (-10) - (-4) = (-6)
    I don't live here any more.

  3. #3

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Re: degrade towards zero

    Quote Originally Posted by wossname
    Basicaly you are having sign problems, t can be positive or negative but d is always positive?

    If you make d the same sign as t then..... (-10) - (-4) = (-6)
    In the main yes.

    However I would like to create a formula where

    10 function 11 is 0
    -9 function -22 is 0
    10 function 9 is 1
    -10 function 9 is -1
    etc. etc.

    I'm prity sure the answer should involve x*-1 but it's been a very long time since I did all that larking about... what I'm hoping is that the formula can be constructed such that t and d coiuld be anything but T (the result) never crosses 0.

    It doesn't even need to be linier such that the larger the value of t the faster towards 0 it travels (so that back in the real worl the more extream a view is the more it takes to sustain that view). So that larger numbers are naturalised back towards x = 0.

    I guess I'm trying to create a deviation towards the mean with a mean of 0. I just realy don't want to use the IF function on a mathmatical problem.

    sqrt(t^2)-d would do part of it...

    Even if I give in and describe a series of if statments or other logic I still must address the issue for somefunction of T against d with repect to ?

    any ideas there.

    I've set it in my mind like this

    Source = (A, B, C)
    Subject = (E, F, G)
    T (A(1), B(10), C(-1))

    I now take the t for E from A who got it from B who got it from C
    I now take the t for F from A who got it from B
    I now take the t for G from C who got it from B who got it from A

    now rather than just asses the d (3,2,3) and drive the value of t towards zero by this factor I wish to also adjust this by some reasonable function of my T for these sources in the first case it should be something like
    T(C)/3 + T(B)/2 + T(A)/1 = D

    So I guess I have something like

    sum(T(n)/d) = D

    which then has to be if-then-elsed which seems a shame.

    would a percentage reduction function be a reasonable action here?
    ?
    'What's this bit for anyway?
    For Jono

  4. #4

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Re: degrade towards zero

    Which leaves me with this rather unified theory


    Code:
    		D = SUM( T(n) / d )
    		
    		T = (t - D) -> 0
    		where D > t :: t = 0
    		where t < -1 :: t = t + D
    		else t = t - D
    ?
    'What's this bit for anyway?
    For Jono

  5. #5

    Thread Starter
    Fanatic Member Matt_T_hat's Avatar
    Join Date
    Dec 2001
    Location
    '76 Male Body Evil-Errors: 666
    Posts
    774

    Re: degrade towards zero

    Any one?
    ?
    'What's this bit for anyway?
    For Jono

  6. #6
    Frenzied Member zaza's Avatar
    Join Date
    Apr 2001
    Location
    Borneo Rainforest Habits: Scratching
    Posts
    1,486

    Re: degrade towards zero

    Why don't you just multiply t by 1/d ?

    If the abs of the resulting value drops below 1 (such as 10 * (1/11)) then you set your result to 0.


    zaza
    I use VB 6, VB.Net 2003 and Office 2010



    Code:
    Excel Graphing | Excel Timer | Excel Tips and Tricks | Add controls in Office | Data tables in Excel | Gaussian random number distribution (VB6/VBA,VB.Net) | Coordinates, Vectors and 3D volumes

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width