I have a 4 inputs/variables in which 3 of them are boolean values and 1 is a time value. I want to model a function which gives the quality of a system based on those inputs.For eg if all 3 booleans are 1 and the time is 5 sec(assume it to be the perfect time) the function should give an output of 1 and if all 3 booleans are 0 and the time is 0 sec(assume it to be the worst time) , the function should give an output of 0. And it should give a value between 0 and 1 depending on all other possible values of the 3 booleans and the time variable between 0 and 5 sec which represents the quality of my system.How can I start modelling this kind of a function? Any hints would be really helpfull.Thanks.
How to make a mathematical model/function which outputs a value between 0 and 1 depending on the input variables?
0
$\begingroup$
functions
boolean-algebra
mathematical-modeling
1 Answers
0
Here is a first model:
$$(B_1,B_2,B_3,T)\mapsto (B_1*4+B_2*2+B_3)/8+T/40$$
(a combination of base 2 computation (with max. value 7/8) + a normalized real (max value 1/8).
In this case, the maximum value is
$$\begin{cases}0 & \text{if} & B_1=0,B_2=0,B_3=0,T=0\\1 & \text{if} & B_1=1, B_2=1,B_3=1,T=5\end{cases}$$
This meet your requirements... upside down.
Thus, let us take the "complement to 1":
$$(B_1,B_2,B_3,T)\mapsto 1-((B_1*4+B_2*2+B_3)/8+T/40)$$
Of course, the relative weighing of the boolean group wrt the time variable can be modified, instead of taking $7/8 vs. 1/8$ it can be $1/2 vs. 1/2$ under the form:
$$(B_1,B_2,B_3,T)\mapsto 1-((B_1*4+B_2*2+B_3)/14+T/10)$$
-
0Thanks for your answer.But can you explain me how you derived this ""(a combination of base 2 computation (with max. value 7/8) + a normalized real (max value 1/8)"" It would be great to know so that I can add more inputs like booleans if I wanted and modify the function. – 2017-01-30
-
0If you add more booleans, for example with $\boxed{5}$ of them $B_1,... B_5$, the range of values of $B_1+2*B_2+4*B_3+8*B_4+16*B_5$ which ranges from $1$ to $1+2+4+8+16=31=2^\boxed{5}-1$. Then $$(B_1+2*B_2+4*B_3+8*B_4+16*B_5)/62+T/10$$ would be a candidate. – 2017-01-31