0
$\begingroup$

I have $4$ attributes $A,B,C,D$ each of them takes value between $[0,1]$ The more $A$ and $B$, the more the function value is. The more $C$ and $D$, the less the function value is. if C or D equals "one" the function value is one.

How can I model this function. I tried: $|AB-CD|$ but did not work.

UPDATE: I want this function also to return value between [0,1]

  • 0
    how about $AB(1-C)(1-D)$2012-08-25
  • 0
    @SeyhmusGüngören if C is 1, then the whole function will be 0.2012-08-25
  • 0
    @Sidd my function is $\infty$ at $C=1$?2012-08-25
  • 0
    @SeyhmusGüngören Wait just to clarify, if C=1, then wouldn't your function do AB(1-C)(1-D) = AB(1-1)(1-D) AB(0)(1-D) = 0?2012-08-25
  • 0
    ohhhhhh sorrrrryyy! I read completely mistakenly! I read as $0$ not $1$ you are right @Sidd2012-08-25

1 Answers 1

2

$$f(A,B,C,D)=AB(1-C)(1-D)+1$$ is increasing in $A$ and $B$ and decreasing in $C$ and $D$ as well as it satifies $f(A,B,C,D)=1\,\, for\,\, C=1\, or D=1$.

EDIT: Of course there are infinitely many such functions satisfying your conditions. Above is probably one of the simplest one.

One other thing is that one can not define $f(A,B,C,D)\in[0,1]$ satisfying your conditions and still continuous. Here is the reason:

$f$ is decreasing in $C$ and $D$. Let $f$ be somewhere in $[0,1]$ for given $A,B$. As $f\leq1$, $f$ starts decreasing in $C$ and $D$ at most from $1$ and for $C$, $D$, or both very close to $1$ we have $f<1+\Delta$ where $\Delta$ is not arbitrarily close to $0$ when $C\rightarrow 1$ or $D\rightarrow 1$ indicating that $0\leq f(x+\Delta)-f(x)\leq \Delta$ can not be bounded by arbitrary $\Delta$ $\rightarrow$ discontinuity at $C=1$, $D=1$ or $C=1,D=1$

  • 0
    Oh wow..Very nice, I was playing around with exponents and couldnt figure it out.2012-08-25
  • 0
    @Sidd )))) simple thinking sometimes helps2012-08-25
  • 0
    Thanks for all of your answers , it was really helpful Now let us play with this more :) , If I want the f(a,b,c,d) to return value between [0,1] is it possible ??2012-08-25
  • 0
    @Mohammed You cannot define such a **continuous** function. I will put it to EDIT. Meanwhile, have a look at this page: http://meta.math.stackexchange.com/questions/3399/why-should-we-accept-answers2012-08-25
  • 0
    thanks for your update. but what about: f(a,b,c,d)= $$(a*b)^{(1/(c*d))}$$2012-08-25
  • 0
    @Mohammed : "if C or D equals "one" the function value is one" the function is not one.2012-08-25