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
    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
    @Mohammed : "if C or D equals "one" the function value is one" the function is not one.2012-08-25