How to find unknowns $w_1,w_2,w_3$ that satisfy $t=w_1f_1 + w_2f_2 + w_3f_3$?

1.3k Views Asked by At

For any $i \in \{1,2,3\}$, let:

  • $w_i \in [0,1]$ is an unknown number such that $\sum_{i \in \{1,2,3\}} w_i = 1$.
  • $t$ is a known number in $[0,1]$. Suppose that $t = 0.8$.
  • $f_i$ is also a known number in $[0,1]$. Suppose that $f_1 = 0.2$, $f_2=0.6$, and $f_3=0.5$.

Which are related by the equation: $t = \sum_{i \in \{1,2,3\}} w_i \times f_i$. It is assumed that there is only one true solution, and the rest are not true (maybe close estimations).

The questions are:

  • What are the possible values of $w_1, w_2, w_3$ that satisfy the equation above?
  • How to find them?
  • In case too many possible values exist, what is the best method in estimating the values of $w_1,w_2,w_3$?

A brute-force by Python

By brute-forcing answers, I found these which give a priority to ensuring that the sum $w_1+w_2+w_3=1$ (without ensuring that $t=0.8$):

w1, w2, w3, w1+w2+w3, t
0, 0.01, 0.99, 1.0, 0.501
0, 0.02, 0.98, 1.0, 0.502
0, 0.02, 0.99, 1.01, 0.507
0, 0.03, 0.98, 1.01, 0.508
0, 0.03, 0.99, 1.02, 0.513
0, 0.04, 0.98, 1.02, 0.514
0, 0.04, 0.99, 1.03, 0.519
0, 0.05, 0.98, 1.03, 0.52
0, 0.05, 0.99, 1.04, 0.525
0, 0.06, 0.98, 1.04, 0.526
0, 0.06, 0.99, 1.05, 0.531
0, 0.07, 0.98, 1.05, 0.532
0, 0.07, 0.99, 1.06, 0.537
0, 0.08, 0.98, 1.06, 0.538
0, 0.08, 0.99, 1.07, 0.543
0, 0.09, 0.98, 1.07, 0.544
0, 0.09, 0.99, 1.08, 0.549
0, 0.1, 0.98, 1.08, 0.55
0, 0.1, 0.99, 1.09, 0.555
0, 0.11, 0.98, 1.09, 0.556

There are solutions, but none of them correspond to a $t$ that is close enough to 0.8.

Here I gave a high priority to ensuring that $t=0.8$ (while ignoring the sum = 1):

w1, w2, w3, w1+w2+w3, t
0, 0.51, 0.99, 1.5, 0.801
0, 0.55, 0.94, 1.49, 0.8
0, 0.6, 0.88, 1.48, 0.8
0, 0.65, 0.82, 1.47, 0.8
0, 0.7, 0.76, 1.46, 0.8
0, 0.75, 0.7, 1.45, 0.8
0, 0.8, 0.64, 1.44, 0.8
0, 0.85, 0.58, 1.43, 0.8
0, 0.9, 0.52, 1.42, 0.8
0, 0.95, 0.46, 1.41, 0.8
0.01, 0.53, 0.96, 1.5, 0.8
0.01, 0.58, 0.9, 1.49, 0.8
0.01, 0.63, 0.84, 1.48, 0.8
0.01, 0.68, 0.78, 1.47, 0.8
0.01, 0.73, 0.72, 1.46, 0.8
0.01, 0.78, 0.66, 1.45, 0.8
0.01, 0.83, 0.6, 1.44, 0.8
0.04, 0.82, 0.6, 1.46, 0.8
0.06, 0.83, 0.58, 1.47, 0.8
0.07, 0.81, 0.6, 1.48, 0.8
0.09, 0.82, 0.58, 1.49, 0.8
0.1, 0.8, 0.6, 1.5, 0.8
0.11, 0.83, 0.56, 1.5, 0.8
0.12, 0.81, 0.58, 1.51, 0.8
0.13, 0.54, 0.9, 1.57, 0.8
0.13, 0.59, 0.84, 1.56, 0.8
0.13, 0.64, 0.78, 1.55, 0.8
0.13, 0.69, 0.72, 1.54, 0.8
0.13, 0.74, 0.66, 1.53, 0.8
0.13, 0.79, 0.6, 1.52, 0.8
0.14, 0.52, 0.92, 1.58, 0.8
0.14, 0.57, 0.86, 1.57, 0.8
0.14, 0.62, 0.8, 1.56, 0.8
0.14, 0.67, 0.74, 1.55, 0.8
0.14, 0.72, 0.68, 1.54, 0.8
0.14, 0.77, 0.62, 1.53, 0.8
0.14, 0.82, 0.56, 1.52, 0.8
0.15, 0.5, 0.94, 1.59, 0.8
0.15, 0.55, 0.88, 1.58, 0.8
0.15, 0.6, 0.82, 1.57, 0.8
0.15, 0.65, 0.76, 1.56, 0.8
0.15, 0.7, 0.7, 1.55, 0.8
0.15, 0.75, 0.64, 1.54, 0.8
0.15, 0.8, 0.58, 1.53, 0.8
0.16, 0.53, 0.9, 1.59, 0.8
0.16, 0.58, 0.84, 1.58, 0.8
0.16, 0.63, 0.78, 1.57, 0.8
0.16, 0.68, 0.72, 1.56, 0.8
0.16, 0.73, 0.66, 1.55, 0.8
0.16, 0.78, 0.6, 1.54, 0.8
0.16, 0.83, 0.54, 1.53, 0.8
0.17, 0.51, 0.92, 1.6, 0.8
0.17, 0.56, 0.86, 1.59, 0.8
0.17, 0.61, 0.8, 1.58, 0.8
0.17, 0.66, 0.74, 1.57, 0.8
0.17, 0.71, 0.68, 1.56, 0.8
0.17, 0.76, 0.62, 1.55, 0.8
0.17, 0.81, 0.56, 1.54, 0.8
0.18, 0.54, 0.88, 1.6, 0.8
0.18, 0.59, 0.82, 1.59, 0.8
0.18, 0.64, 0.76, 1.58, 0.8
0.18, 0.69, 0.7, 1.57, 0.8
0.18, 0.74, 0.64, 1.56, 0.8
0.18, 0.79, 0.58, 1.55, 0.8
0.19, 0.52, 0.9, 1.61, 0.8
0.19, 0.57, 0.84, 1.6, 0.8
0.19, 0.62, 0.78, 1.59, 0.8
0.19, 0.67, 0.72, 1.58, 0.8
0.19, 0.72, 0.66, 1.57, 0.8
0.19, 0.77, 0.6, 1.56, 0.8
0.19, 0.82, 0.54, 1.55, 0.8
0.2, 0.5, 0.92, 1.62, 0.8
0.2, 0.55, 0.86, 1.61, 0.8
0.2, 0.6, 0.8, 1.6, 0.8
0.2, 0.65, 0.74, 1.59, 0.8
0.2, 0.7, 0.68, 1.58, 0.8
0.2, 0.75, 0.62, 1.57, 0.8
0.2, 0.8, 0.56, 1.56, 0.8
0.21, 0.53, 0.88, 1.62, 0.8
0.21, 0.58, 0.82, 1.61, 0.8
0.21, 0.63, 0.76, 1.6, 0.8
0.21, 0.68, 0.7, 1.59, 0.8
0.21, 0.73, 0.64, 1.58, 0.8
0.21, 0.78, 0.58, 1.57, 0.8
0.21, 0.83, 0.52, 1.56, 0.8
0.22, 0.51, 0.9, 1.63, 0.8
0.22, 0.56, 0.84, 1.62, 0.8
0.22, 0.61, 0.78, 1.61, 0.8
0.22, 0.66, 0.72, 1.6, 0.8
0.22, 0.71, 0.66, 1.59, 0.8
0.22, 0.76, 0.6, 1.58, 0.8
0.22, 0.81, 0.54, 1.57, 0.8
0.23, 0.54, 0.86, 1.63, 0.8
0.23, 0.59, 0.8, 1.62, 0.8
0.23, 0.64, 0.74, 1.61, 0.8
0.23, 0.69, 0.68, 1.6, 0.8
0.23, 0.74, 0.62, 1.59, 0.8
0.23, 0.79, 0.56, 1.58, 0.8
0.24, 0.52, 0.88, 1.64, 0.8
0.24, 0.57, 0.82, 1.63, 0.8
0.24, 0.62, 0.76, 1.62, 0.8
0.24, 0.67, 0.7, 1.61, 0.8
0.24, 0.72, 0.64, 1.6, 0.8
0.24, 0.77, 0.58, 1.59, 0.8
0.24, 0.82, 0.52, 1.58, 0.8
0.25, 0.5, 0.9, 1.65, 0.8
0.25, 0.55, 0.84, 1.64, 0.8
0.25, 0.6, 0.78, 1.63, 0.8
0.25, 0.65, 0.72, 1.62, 0.8
0.25, 0.7, 0.66, 1.61, 0.8
0.25, 0.75, 0.6, 1.6, 0.8
0.25, 0.8, 0.54, 1.59, 0.8
0.26, 0.53, 0.86, 1.65, 0.8
0.26, 0.58, 0.8, 1.64, 0.8
0.26, 0.63, 0.74, 1.63, 0.8
0.26, 0.68, 0.68, 1.62, 0.8
0.26, 0.73, 0.62, 1.61, 0.8
0.26, 0.78, 0.56, 1.6, 0.8
0.26, 0.83, 0.5, 1.59, 0.8
0.27, 0.51, 0.88, 1.66, 0.8
0.27, 0.56, 0.82, 1.65, 0.8
0.27, 0.61, 0.76, 1.64, 0.8
0.27, 0.66, 0.7, 1.63, 0.8
0.27, 0.71, 0.64, 1.62, 0.8
0.27, 0.76, 0.58, 1.61, 0.8
0.27, 0.81, 0.52, 1.6, 0.8
0.28, 0.54, 0.84, 1.66, 0.8
0.28, 0.59, 0.78, 1.65, 0.8
0.28, 0.64, 0.72, 1.64, 0.8
0.28, 0.69, 0.66, 1.63, 0.8
0.28, 0.74, 0.6, 1.62, 0.8
0.28, 0.79, 0.54, 1.61, 0.8
0.29, 0.52, 0.86, 1.67, 0.8
0.29, 0.57, 0.8, 1.66, 0.8
0.29, 0.62, 0.74, 1.65, 0.8
0.29, 0.67, 0.68, 1.64, 0.8
0.29, 0.72, 0.62, 1.63, 0.8
0.29, 0.77, 0.56, 1.62, 0.8
0.29, 0.82, 0.5, 1.61, 0.8
0.3, 0.5, 0.88, 1.68, 0.8
0.3, 0.55, 0.82, 1.67, 0.8
0.3, 0.6, 0.76, 1.66, 0.8
0.3, 0.65, 0.7, 1.65, 0.8
0.3, 0.7, 0.64, 1.64, 0.8
0.3, 0.75, 0.58, 1.63, 0.8
0.3, 0.8, 0.52, 1.62, 0.8
0.31, 0.53, 0.84, 1.68, 0.8
0.31, 0.58, 0.78, 1.67, 0.8
0.31, 0.63, 0.72, 1.66, 0.8
0.31, 0.68, 0.66, 1.65, 0.8
0.31, 0.73, 0.6, 1.64, 0.8
0.31, 0.78, 0.54, 1.63, 0.8
0.31, 0.83, 0.48, 1.62, 0.8
0.32, 0.51, 0.86, 1.69, 0.8
0.32, 0.56, 0.8, 1.68, 0.8
0.32, 0.61, 0.74, 1.67, 0.8
0.32, 0.66, 0.68, 1.66, 0.8
0.32, 0.71, 0.62, 1.65, 0.8
0.32, 0.76, 0.56, 1.64, 0.8
0.32, 0.81, 0.5, 1.63, 0.8
0.33, 0.54, 0.82, 1.69, 0.8
0.33, 0.59, 0.76, 1.68, 0.8
0.33, 0.64, 0.7, 1.67, 0.8
0.33, 0.69, 0.64, 1.66, 0.8
0.33, 0.74, 0.58, 1.65, 0.8
0.33, 0.79, 0.52, 1.64, 0.8
0.34, 0.52, 0.84, 1.7, 0.8
0.34, 0.57, 0.78, 1.69, 0.8
0.34, 0.62, 0.72, 1.68, 0.8
0.34, 0.67, 0.66, 1.67, 0.8
0.34, 0.72, 0.6, 1.66, 0.8
0.34, 0.77, 0.54, 1.65, 0.8
0.34, 0.82, 0.48, 1.64, 0.8
0.35, 0.5, 0.86, 1.71, 0.8
0.35, 0.55, 0.8, 1.7, 0.8
0.35, 0.6, 0.74, 1.69, 0.8
0.35, 0.65, 0.68, 1.68, 0.8
0.35, 0.7, 0.62, 1.67, 0.8
0.35, 0.75, 0.56, 1.66, 0.8
0.35, 0.8, 0.5, 1.65, 0.8
0.36, 0.53, 0.82, 1.71, 0.8
0.36, 0.58, 0.76, 1.7, 0.8
0.36, 0.63, 0.7, 1.69, 0.8
0.36, 0.68, 0.64, 1.68, 0.8
0.36, 0.73, 0.58, 1.67, 0.8
0.36, 0.78, 0.52, 1.66, 0.8
0.36, 0.83, 0.46, 1.65, 0.8
0.37, 0.51, 0.84, 1.72, 0.8
0.37, 0.56, 0.78, 1.71, 0.8
0.37, 0.61, 0.72, 1.7, 0.8
0.37, 0.66, 0.66, 1.69, 0.8
0.37, 0.71, 0.6, 1.68, 0.8
0.37, 0.76, 0.54, 1.67, 0.8
0.37, 0.81, 0.48, 1.66, 0.8
0.38, 0.54, 0.8, 1.72, 0.8
0.38, 0.59, 0.74, 1.71, 0.8
0.38, 0.64, 0.68, 1.7, 0.8
0.38, 0.69, 0.62, 1.69, 0.8
0.38, 0.74, 0.56, 1.68, 0.8
0.38, 0.79, 0.5, 1.67, 0.8
0.39, 0.52, 0.82, 1.73, 0.8
0.39, 0.57, 0.76, 1.72, 0.8
0.39, 0.62, 0.7, 1.71, 0.8
0.39, 0.67, 0.64, 1.7, 0.8
0.39, 0.72, 0.58, 1.69, 0.8
0.39, 0.77, 0.52, 1.68, 0.8
0.39, 0.82, 0.46, 1.67, 0.8
0.4, 0.5, 0.84, 1.74, 0.8
0.4, 0.55, 0.78, 1.73, 0.8
0.4, 0.6, 0.72, 1.72, 0.8
0.4, 0.65, 0.66, 1.71, 0.8
0.4, 0.7, 0.6, 1.7, 0.8
0.4, 0.75, 0.54, 1.69, 0.8
0.4, 0.8, 0.48, 1.68, 0.8
0.41, 0.53, 0.8, 1.74, 0.8
0.41, 0.58, 0.74, 1.73, 0.8
0.41, 0.63, 0.68, 1.72, 0.8
0.41, 0.68, 0.62, 1.71, 0.8
0.41, 0.73, 0.56, 1.7, 0.8
0.41, 0.78, 0.5, 1.69, 0.8
0.41, 0.83, 0.44, 1.68, 0.8
0.42, 0.51, 0.82, 1.75, 0.8
0.42, 0.56, 0.76, 1.74, 0.8
0.42, 0.61, 0.7, 1.73, 0.8
0.42, 0.66, 0.64, 1.72, 0.8
0.42, 0.71, 0.58, 1.71, 0.8
0.42, 0.76, 0.52, 1.7, 0.8
0.42, 0.81, 0.46, 1.69, 0.8
0.43, 0.54, 0.78, 1.75, 0.8
0.43, 0.59, 0.72, 1.74, 0.8
0.43, 0.64, 0.66, 1.73, 0.8
0.43, 0.69, 0.6, 1.72, 0.8
0.43, 0.74, 0.54, 1.71, 0.8
0.43, 0.79, 0.48, 1.7, 0.8
0.44, 0.52, 0.8, 1.76, 0.8
0.44, 0.57, 0.74, 1.75, 0.8
0.44, 0.62, 0.68, 1.74, 0.8
0.44, 0.67, 0.62, 1.73, 0.8
0.44, 0.72, 0.56, 1.72, 0.8
0.44, 0.77, 0.5, 1.71, 0.8
0.44, 0.82, 0.44, 1.7, 0.8
0.45, 0.5, 0.82, 1.77, 0.8
0.45, 0.55, 0.76, 1.76, 0.8
0.45, 0.6, 0.7, 1.75, 0.8
0.45, 0.65, 0.64, 1.74, 0.8
0.45, 0.7, 0.58, 1.73, 0.8
0.45, 0.75, 0.52, 1.72, 0.8
0.45, 0.8, 0.46, 1.71, 0.8
0.46, 0.53, 0.78, 1.77, 0.8
0.46, 0.58, 0.72, 1.76, 0.8
0.46, 0.63, 0.66, 1.75, 0.8
0.46, 0.68, 0.6, 1.74, 0.8
0.46, 0.73, 0.54, 1.73, 0.8
0.46, 0.78, 0.48, 1.72, 0.8
0.46, 0.83, 0.42, 1.71, 0.8
0.47, 0.51, 0.8, 1.78, 0.8
0.47, 0.56, 0.74, 1.77, 0.8
0.47, 0.61, 0.68, 1.76, 0.8
0.47, 0.66, 0.62, 1.75, 0.8
0.47, 0.71, 0.56, 1.74, 0.8
0.47, 0.76, 0.5, 1.73, 0.8
0.47, 0.81, 0.44, 1.72, 0.8
0.48, 0.54, 0.76, 1.78, 0.8
0.48, 0.59, 0.7, 1.77, 0.8
0.48, 0.64, 0.64, 1.76, 0.8
0.48, 0.69, 0.58, 1.75, 0.8
0.48, 0.74, 0.52, 1.74, 0.8
0.48, 0.79, 0.46, 1.73, 0.8
0.49, 0.52, 0.78, 1.79, 0.8
0.49, 0.57, 0.72, 1.78, 0.8
0.49, 0.62, 0.66, 1.77, 0.8
0.49, 0.67, 0.6, 1.76, 0.8
0.49, 0.72, 0.54, 1.75, 0.8
0.49, 0.77, 0.48, 1.74, 0.8
0.49, 0.82, 0.42, 1.73, 0.8
0.5, 0.5, 0.8, 1.8, 0.8
0.5, 0.55, 0.74, 1.79, 0.8
0.5, 0.6, 0.68, 1.78, 0.8
0.5, 0.65, 0.62, 1.77, 0.8
0.5, 0.7, 0.56, 1.76, 0.8
0.5, 0.75, 0.5, 1.75, 0.8
0.5, 0.8, 0.44, 1.74, 0.8
0.51, 0.53, 0.76, 1.8, 0.8
0.51, 0.58, 0.7, 1.79, 0.8
0.51, 0.63, 0.64, 1.78, 0.8
0.51, 0.68, 0.58, 1.77, 0.8
0.51, 0.73, 0.52, 1.76, 0.8
0.51, 0.78, 0.46, 1.75, 0.8
0.51, 0.83, 0.4, 1.74, 0.8
0.52, 0.51, 0.78, 1.81, 0.8
0.52, 0.56, 0.72, 1.8, 0.8
0.52, 0.61, 0.66, 1.79, 0.8
0.52, 0.66, 0.6, 1.78, 0.8
0.52, 0.71, 0.54, 1.77, 0.8
0.52, 0.76, 0.48, 1.76, 0.8
0.52, 0.81, 0.42, 1.75, 0.8
0.53, 0.54, 0.74, 1.81, 0.8
0.53, 0.59, 0.68, 1.8, 0.8
0.53, 0.64, 0.62, 1.79, 0.8
0.53, 0.69, 0.56, 1.78, 0.8
0.53, 0.74, 0.5, 1.77, 0.8
0.53, 0.79, 0.44, 1.76, 0.8
0.54, 0.52, 0.76, 1.82, 0.8
0.54, 0.57, 0.7, 1.81, 0.8
0.54, 0.62, 0.64, 1.8, 0.8
0.54, 0.67, 0.58, 1.79, 0.8
0.54, 0.72, 0.52, 1.78, 0.8
0.54, 0.77, 0.46, 1.77, 0.8
0.54, 0.82, 0.4, 1.76, 0.8
0.55, 0.5, 0.78, 1.83, 0.8
0.55, 0.55, 0.72, 1.82, 0.8
0.55, 0.6, 0.66, 1.81, 0.8
0.55, 0.65, 0.6, 1.8, 0.8
0.55, 0.7, 0.54, 1.79, 0.8
0.55, 0.75, 0.48, 1.78, 0.8
0.55, 0.8, 0.42, 1.77, 0.8
0.56, 0.53, 0.74, 1.83, 0.8
0.56, 0.58, 0.68, 1.82, 0.8
0.56, 0.63, 0.62, 1.81, 0.8
0.56, 0.68, 0.56, 1.8, 0.8
0.56, 0.73, 0.5, 1.79, 0.8
0.56, 0.78, 0.44, 1.78, 0.8
0.56, 0.83, 0.38, 1.77, 0.8
0.57, 0.51, 0.76, 1.84, 0.8
0.57, 0.56, 0.7, 1.83, 0.8
0.57, 0.61, 0.64, 1.82, 0.8
0.57, 0.66, 0.58, 1.81, 0.8
0.57, 0.71, 0.52, 1.8, 0.8
0.57, 0.76, 0.46, 1.79, 0.8
0.57, 0.81, 0.4, 1.78, 0.8
0.58, 0.54, 0.72, 1.84, 0.8
0.58, 0.59, 0.66, 1.83, 0.8
0.58, 0.64, 0.6, 1.82, 0.8
0.58, 0.69, 0.54, 1.81, 0.8
0.58, 0.74, 0.48, 1.8, 0.8
0.58, 0.79, 0.42, 1.79, 0.8
0.59, 0.52, 0.74, 1.85, 0.8
0.59, 0.57, 0.68, 1.84, 0.8
0.59, 0.62, 0.62, 1.83, 0.8
0.59, 0.67, 0.56, 1.82, 0.8
0.59, 0.72, 0.5, 1.81, 0.8
0.59, 0.77, 0.44, 1.8, 0.8
0.59, 0.82, 0.38, 1.79, 0.8
0.6, 0.5, 0.76, 1.86, 0.8
0.6, 0.55, 0.7, 1.85, 0.8
0.6, 0.6, 0.64, 1.84, 0.8
0.6, 0.65, 0.58, 1.83, 0.8
0.6, 0.7, 0.52, 1.82, 0.8
0.6, 0.75, 0.46, 1.81, 0.8
0.6, 0.8, 0.4, 1.8, 0.8
0.61, 0.53, 0.72, 1.86, 0.8
0.61, 0.58, 0.66, 1.85, 0.8
0.61, 0.63, 0.6, 1.84, 0.8
0.61, 0.68, 0.54, 1.83, 0.8
0.61, 0.73, 0.48, 1.82, 0.8
0.61, 0.78, 0.42, 1.81, 0.8
0.61, 0.83, 0.36, 1.8, 0.8
0.62, 0.51, 0.74, 1.87, 0.8
0.62, 0.56, 0.68, 1.86, 0.8
0.62, 0.61, 0.62, 1.85, 0.8
0.62, 0.66, 0.56, 1.84, 0.8
0.62, 0.71, 0.5, 1.83, 0.8
0.62, 0.76, 0.44, 1.82, 0.8
0.62, 0.81, 0.38, 1.81, 0.8
0.63, 0.54, 0.7, 1.87, 0.8
0.63, 0.59, 0.64, 1.86, 0.8
0.63, 0.64, 0.58, 1.85, 0.8
0.63, 0.69, 0.52, 1.84, 0.8
0.63, 0.74, 0.46, 1.83, 0.8
0.63, 0.79, 0.4, 1.82, 0.8
0.64, 0.52, 0.72, 1.88, 0.8
0.64, 0.57, 0.66, 1.87, 0.8
0.64, 0.62, 0.6, 1.86, 0.8
0.64, 0.67, 0.54, 1.85, 0.8
0.64, 0.72, 0.48, 1.84, 0.8
0.64, 0.77, 0.42, 1.83, 0.8
0.64, 0.82, 0.36, 1.82, 0.8
0.65, 0.5, 0.74, 1.89, 0.8
0.65, 0.55, 0.68, 1.88, 0.8
0.65, 0.6, 0.62, 1.87, 0.8
0.65, 0.65, 0.56, 1.86, 0.8
0.65, 0.7, 0.5, 1.85, 0.8
0.65, 0.75, 0.44, 1.84, 0.8
0.65, 0.8, 0.38, 1.83, 0.8
0.66, 0.53, 0.7, 1.89, 0.8
0.66, 0.58, 0.64, 1.88, 0.8
0.66, 0.63, 0.58, 1.87, 0.8
0.66, 0.68, 0.52, 1.86, 0.8
0.66, 0.73, 0.46, 1.85, 0.8
0.66, 0.78, 0.4, 1.84, 0.8
0.66, 0.83, 0.34, 1.83, 0.8
0.67, 0.51, 0.72, 1.9, 0.8
0.67, 0.56, 0.66, 1.89, 0.8
0.67, 0.61, 0.6, 1.88, 0.8
0.67, 0.66, 0.54, 1.87, 0.8
0.67, 0.71, 0.48, 1.86, 0.8
0.67, 0.76, 0.42, 1.85, 0.8
0.67, 0.81, 0.36, 1.84, 0.8
0.68, 0.54, 0.68, 1.9, 0.8
0.68, 0.59, 0.62, 1.89, 0.8
0.68, 0.64, 0.56, 1.88, 0.8
0.68, 0.69, 0.5, 1.87, 0.8
0.68, 0.74, 0.44, 1.86, 0.8
0.68, 0.79, 0.38, 1.85, 0.8
0.69, 0.52, 0.7, 1.91, 0.8
0.69, 0.57, 0.64, 1.9, 0.8
0.69, 0.62, 0.58, 1.89, 0.8
0.69, 0.67, 0.52, 1.88, 0.8
0.69, 0.72, 0.46, 1.87, 0.8
0.69, 0.77, 0.4, 1.86, 0.8
0.69, 0.82, 0.34, 1.85, 0.8
0.7, 0.5, 0.72, 1.92, 0.8
0.7, 0.55, 0.66, 1.91, 0.8
0.7, 0.6, 0.6, 1.9, 0.8
0.7, 0.65, 0.54, 1.89, 0.8
0.7, 0.7, 0.48, 1.88, 0.8
0.7, 0.75, 0.42, 1.87, 0.8
0.7, 0.8, 0.36, 1.86, 0.8
0.71, 0.53, 0.68, 1.92, 0.8
0.71, 0.58, 0.62, 1.91, 0.8
0.71, 0.63, 0.56, 1.9, 0.8
0.71, 0.68, 0.5, 1.89, 0.8
0.71, 0.73, 0.44, 1.88, 0.8
0.71, 0.78, 0.38, 1.87, 0.8
0.71, 0.83, 0.32, 1.86, 0.8
0.72, 0.51, 0.7, 1.93, 0.8
0.72, 0.56, 0.64, 1.92, 0.8
0.72, 0.61, 0.58, 1.91, 0.8
0.72, 0.66, 0.52, 1.9, 0.8
0.72, 0.71, 0.46, 1.89, 0.8
0.72, 0.76, 0.4, 1.88, 0.8
0.72, 0.81, 0.34, 1.87, 0.8
0.73, 0.54, 0.66, 1.93, 0.8
0.73, 0.59, 0.6, 1.92, 0.8
0.73, 0.64, 0.54, 1.91, 0.8
0.73, 0.69, 0.48, 1.9, 0.8
0.73, 0.74, 0.42, 1.89, 0.8
0.73, 0.79, 0.36, 1.88, 0.8
0.74, 0.52, 0.68, 1.94, 0.8
0.74, 0.57, 0.62, 1.93, 0.8
0.74, 0.62, 0.56, 1.92, 0.8
0.74, 0.67, 0.5, 1.91, 0.8
0.74, 0.72, 0.44, 1.9, 0.8
0.74, 0.77, 0.38, 1.89, 0.8
0.74, 0.82, 0.32, 1.88, 0.8
0.75, 0.5, 0.7, 1.95, 0.8
0.75, 0.55, 0.64, 1.94, 0.8
0.75, 0.6, 0.58, 1.93, 0.8
0.75, 0.65, 0.52, 1.92, 0.8
0.75, 0.7, 0.46, 1.91, 0.8
0.75, 0.75, 0.4, 1.9, 0.8
0.75, 0.8, 0.34, 1.89, 0.8
0.76, 0.53, 0.66, 1.95, 0.8
0.76, 0.58, 0.6, 1.94, 0.8
0.76, 0.63, 0.54, 1.93, 0.8
0.76, 0.68, 0.48, 1.92, 0.8
0.76, 0.73, 0.42, 1.91, 0.8
0.76, 0.78, 0.36, 1.9, 0.8
0.76, 0.83, 0.3, 1.89, 0.8
0.77, 0.51, 0.68, 1.96, 0.8
0.77, 0.56, 0.62, 1.95, 0.8
0.77, 0.61, 0.56, 1.94, 0.8
0.77, 0.66, 0.5, 1.93, 0.8
0.77, 0.71, 0.44, 1.92, 0.8
0.77, 0.76, 0.38, 1.91, 0.8
0.77, 0.81, 0.32, 1.9, 0.8
0.78, 0.54, 0.64, 1.96, 0.8
0.78, 0.59, 0.58, 1.95, 0.8
0.78, 0.64, 0.52, 1.94, 0.8
0.78, 0.69, 0.46, 1.93, 0.8
0.78, 0.74, 0.4, 1.92, 0.8
0.78, 0.79, 0.34, 1.91, 0.8
0.79, 0.52, 0.66, 1.97, 0.8
0.79, 0.57, 0.6, 1.96, 0.8
0.79, 0.62, 0.54, 1.95, 0.8
0.79, 0.67, 0.48, 1.94, 0.8
0.79, 0.72, 0.42, 1.93, 0.8
0.79, 0.77, 0.36, 1.92, 0.8
0.79, 0.82, 0.3, 1.91, 0.8
0.8, 0.5, 0.68, 1.98, 0.8
0.8, 0.55, 0.62, 1.97, 0.8
0.8, 0.6, 0.56, 1.96, 0.8
0.8, 0.65, 0.5, 1.95, 0.8
0.8, 0.7, 0.44, 1.94, 0.8
0.8, 0.75, 0.38, 1.93, 0.8
0.8, 0.8, 0.32, 1.92, 0.8
0.81, 0.53, 0.64, 1.98, 0.8
0.81, 0.58, 0.58, 1.97, 0.8
0.81, 0.63, 0.52, 1.96, 0.8
0.81, 0.68, 0.46, 1.95, 0.8
0.81, 0.73, 0.4, 1.94, 0.8
0.81, 0.78, 0.34, 1.93, 0.8
0.81, 0.83, 0.28, 1.92, 0.8
0.82, 0.51, 0.66, 1.99, 0.8
0.82, 0.56, 0.6, 1.98, 0.8
0.82, 0.61, 0.54, 1.97, 0.8
0.82, 0.66, 0.48, 1.96, 0.8
0.82, 0.71, 0.42, 1.95, 0.8
0.82, 0.76, 0.36, 1.94, 0.8
0.82, 0.81, 0.3, 1.93, 0.8
0.83, 0.54, 0.62, 1.99, 0.8
0.83, 0.59, 0.56, 1.98, 0.8
0.83, 0.64, 0.5, 1.97, 0.8
0.83, 0.69, 0.44, 1.96, 0.8
0.83, 0.74, 0.38, 1.95, 0.8
0.83, 0.79, 0.32, 1.94, 0.8
0.84, 0.52, 0.64, 2.0, 0.8
0.84, 0.57, 0.58, 1.99, 0.8
0.84, 0.62, 0.52, 1.98, 0.8
0.84, 0.67, 0.46, 1.97, 0.8
0.84, 0.72, 0.4, 1.96, 0.8
0.84, 0.77, 0.34, 1.95, 0.8
0.84, 0.82, 0.28, 1.94, 0.8
0.85, 0.5, 0.66, 2.01, 0.8
0.85, 0.55, 0.6, 2.0, 0.8
0.85, 0.6, 0.54, 1.99, 0.8
0.85, 0.65, 0.48, 1.98, 0.8
0.85, 0.7, 0.42, 1.97, 0.8
0.85, 0.75, 0.36, 1.96, 0.8
0.85, 0.8, 0.3, 1.95, 0.8
0.86, 0.53, 0.62, 2.01, 0.8
0.86, 0.58, 0.56, 2.0, 0.8
0.86, 0.63, 0.5, 1.99, 0.8
0.86, 0.68, 0.44, 1.98, 0.8
0.86, 0.73, 0.38, 1.97, 0.8
0.86, 0.78, 0.32, 1.96, 0.8
0.86, 0.83, 0.26, 1.95, 0.8
0.87, 0.51, 0.64, 2.02, 0.8
0.87, 0.56, 0.58, 2.01, 0.8
0.87, 0.61, 0.52, 2.0, 0.8
0.87, 0.66, 0.46, 1.99, 0.8
0.87, 0.71, 0.4, 1.98, 0.8
0.87, 0.76, 0.34, 1.97, 0.8
0.87, 0.81, 0.28, 1.96, 0.8
0.88, 0.54, 0.6, 2.02, 0.8
0.88, 0.59, 0.54, 2.01, 0.8
0.88, 0.64, 0.48, 2.0, 0.8
0.88, 0.69, 0.42, 1.99, 0.8
0.88, 0.74, 0.36, 1.98, 0.8
0.88, 0.79, 0.3, 1.97, 0.8
0.89, 0.52, 0.62, 2.03, 0.8
0.89, 0.57, 0.56, 2.02, 0.8
0.89, 0.62, 0.5, 2.01, 0.8
0.89, 0.67, 0.44, 2.0, 0.8
0.89, 0.72, 0.38, 1.99, 0.8
0.89, 0.77, 0.32, 1.98, 0.8
0.89, 0.82, 0.26, 1.97, 0.8
0.9, 0.5, 0.64, 2.04, 0.8
0.9, 0.55, 0.58, 2.03, 0.8
0.9, 0.6, 0.52, 2.02, 0.8
0.9, 0.65, 0.46, 2.01, 0.8
0.9, 0.7, 0.4, 2.0, 0.8
0.9, 0.75, 0.34, 1.99, 0.8
0.9, 0.8, 0.28, 1.98, 0.8
0.91, 0.53, 0.6, 2.04, 0.8
0.91, 0.58, 0.54, 2.03, 0.8
0.91, 0.63, 0.48, 2.02, 0.8
0.91, 0.68, 0.42, 2.01, 0.8
0.91, 0.73, 0.36, 2.0, 0.8
0.91, 0.78, 0.3, 1.99, 0.8
0.91, 0.83, 0.24, 1.98, 0.8
0.92, 0.51, 0.62, 2.05, 0.8
0.92, 0.56, 0.56, 2.04, 0.8
0.92, 0.61, 0.5, 2.03, 0.8
0.92, 0.66, 0.44, 2.02, 0.8
0.92, 0.71, 0.38, 2.01, 0.8
0.92, 0.76, 0.32, 2.0, 0.8
0.92, 0.81, 0.26, 1.99, 0.8
0.93, 0.54, 0.58, 2.05, 0.8
0.93, 0.59, 0.52, 2.04, 0.8
0.93, 0.64, 0.46, 2.03, 0.8
0.93, 0.69, 0.4, 2.02, 0.8
0.93, 0.74, 0.34, 2.01, 0.8
0.93, 0.79, 0.28, 2.0, 0.8
0.94, 0.52, 0.6, 2.06, 0.8
0.94, 0.57, 0.54, 2.05, 0.8
0.94, 0.62, 0.48, 2.04, 0.8
0.94, 0.67, 0.42, 2.03, 0.8
0.94, 0.72, 0.36, 2.02, 0.8
0.94, 0.77, 0.3, 2.01, 0.8
0.94, 0.82, 0.24, 2.0, 0.8
0.95, 0.5, 0.62, 2.07, 0.8
0.95, 0.55, 0.56, 2.06, 0.8
0.95, 0.6, 0.5, 2.05, 0.8
0.95, 0.65, 0.44, 2.04, 0.8
0.95, 0.7, 0.38, 2.03, 0.8
0.95, 0.75, 0.32, 2.02, 0.8
0.95, 0.8, 0.26, 2.01, 0.8
0.96, 0.53, 0.58, 2.07, 0.8
0.96, 0.58, 0.52, 2.06, 0.8
0.96, 0.63, 0.46, 2.05, 0.8
0.96, 0.68, 0.4, 2.04, 0.8
0.96, 0.73, 0.34, 2.03, 0.8
0.96, 0.78, 0.28, 2.02, 0.8
0.96, 0.83, 0.22, 2.01, 0.8
0.97, 0.51, 0.6, 2.08, 0.8
0.97, 0.56, 0.54, 2.07, 0.8
0.97, 0.61, 0.48, 2.06, 0.8
0.97, 0.66, 0.42, 2.05, 0.8
0.97, 0.71, 0.36, 2.04, 0.8
0.97, 0.76, 0.3, 2.03, 0.8
0.97, 0.81, 0.24, 2.02, 0.8
0.98, 0.54, 0.56, 2.08, 0.8
0.98, 0.59, 0.5, 2.07, 0.8
0.98, 0.64, 0.44, 2.06, 0.8
0.98, 0.69, 0.38, 2.05, 0.8
0.98, 0.74, 0.32, 2.04, 0.8
0.98, 0.79, 0.26, 2.03, 0.8
0.99, 0.52, 0.58, 2.09, 0.8
0.99, 0.57, 0.52, 2.08, 0.8
0.99, 0.62, 0.46, 2.07, 0.8
0.99, 0.67, 0.4, 2.06, 0.8
0.99, 0.72, 0.34, 2.05, 0.8
0.99, 0.77, 0.28, 2.04, 0.8
0.99, 0.82, 0.22, 2.03, 0.8

It seems that the closest solution is: $w_1=0$, $w_2=0.9$, $w_3=0.52$, which gives the sum $w_1+w_2+w_3=1.42$, and maintains $t=0.8$.

Among all of the runs, I found this: $w_1=0$, $w_2=0.29$, $w_3=0.99$, $w_1+w_2+w_3=1.28$, $t=0.669$ --- is this a good compromise? (just an example).

Is there a mathematical method in identifying a solution that generally minimizes the error $((w_1+w_2+w_3) - 1)^2 + (t-0.8)^2$. Feel free to propose an alternative error metric.

A preliminary guess of mine:

How about finding $w_1,w_2,w_3$ that minimize $\Big(\big((w_1+w_2+w_3) - 1\big)^2 + (t-0.8)^2\Big)$?

Is there a way to do this using calculus?

4

There are 4 best solutions below

9
On BEST ANSWER

The first observation is that the closest you can get to $t=0.8$ while keeping your other restrictions is if $w_2=1$ and $w_1=w_3=0$. Increasing either of $w_1$ or $w_3$ means decreasing $w_2$ to keep the sum at $1$, which also decreases the value of $t$.

If you are trying to find the minimal value of $\left(w_1+w_2+w_3-1\right)^2+\left(t-0.8\right)^2$ you can so do with the following:

The closest answer will always be where $w_1=w_3=0$, so I have eliminated them to start off with.

$$(w_2-1)^2+(0.6w_2-0.8)^2$$

$$w_2^2-2w_2+1+0.36w_2^2-0.96w_2+0.64$$

$$1.36w_2^2-2.96w_2+1.64$$

This curve is a parabola above 0. We want to find the point on the curve where it is closest to 0. This is where the curve changes from negative to positive. To do this we find where the derivative of the curve is 0:

$$2.72w_2-2.96=0$$

$$2.72w_2=2.96$$

$$34w_2=37$$

$$w_2={37 \over 34} \approx 1.088235294$$

So, your answer is $w_i=[0, {37 \over 34}, 0]$ giving $t={111 \over 170}\approx 0.652941176$. The error is ${1 \over 34}\approx 0.029411765$


If, however, you absolutely require all values of $w_i$ to be between 0 and 1, an alternative solution can be worked out like this:

Set $w_2$ to 1, $w_1$ to 0 and work out the best fit for $w_3$:

$$(1+w_3-1)^2+(0.6+0.5w_3-0.8)^2$$

$$(w_3 )^2+(0.5w_3-0.2)^2$$

$$w_3^2+0.25w_3^2-0.2w_3+0.04$$

$$1.25w_3^2-0.2w_3+0.04$$

We use the same derivative method to find the closest point to 0:

$$2.5w_3-0.2=0$$

$$2.5w_3=0.2$$

$$25w_3=2$$

$$w_3={2\over 25}$$

Now the answer is $w_i=[0, 1, 0.08]$ giving $t={16 \over 25}= 0.64$. The error is only slightly higher at ${4 \over 125}= 0.032$.

0
On

Answering the first two of your questions:

You have 3 variables and two linear equations. You can solve this equation system on the classical way by hand or in matrix form. See e.g. Wikipedia System of linear equations

The solutions of the equation system are:

\begin{equation}w_{1}=\frac{w_{2}}{3}-1,\ w_{3}=2-\frac{4w_{2}}{3}\end{equation}

2
On

I will keep it all strict and you see if that answers your question:

$$\sum\limits_{k=1}^{3} w_{k}=1 \implies w_{1}=1-w_{2}-w_{3}$$

$$w_{1}f_{1}+w_{2}f_{2}+w_{3}f_{3}=t$$ $$f_{1}+w_{2}(f_{2}-f_{1})+w_{3}(f_{3}-f_{1})=t$$

Now $f_{1},f_{2},f_{3}$ do not have any special connection between them so we can simply replace $f'_{2}=f_{2}-f_{1}$ and $f'_{3}=f_{3}-f_{1}$, taking $f'_{2}$ and $f'_{3}$ to be another set of constants. (In your case you can calculate their values, but in the equation we consider them constants in contrast to $w_{2}$ and $w_{3}$.)

$$f_{1}+f'_{2}w_{2}+f'_{3}w_{3}=t$$

This simply makes a function $$w_{3}(w_{2})= -\frac{f'_{2}}{f'_{3}}w_{2}+\frac{t-f_{1}}{f'_{3}}$$

If this functions goes through the quadrant $(0,0),(1,0),(0,1),(1,1)$ then we have many solutions which you can restrict further.

If it does not then since $w_{1}$ and $w_{2}$ are restricted to $[0,1]$, depending on the angle of $w_{3}(w_{2})$ in general the best choice is one of $(w_{3},w_{2}) \in \{(0,0),(0,1),(1,0),(1,1)\}$ unless you impose other restrictions over them. One of these points is closest to the quadrant.

There are a few special cases like $f'_{3}=0$ but you can either avoid this by making another less problematic choice or you can analyze it as it is.

0
On

The first and the last conditions define $t$ as a convex combination of $f_i$. Since $t$ is a scalar as well as each $f_i$, we can consider them as $x$-coordinates of points on a line segment $[0,1]$.

Let \begin{align} a&=\min_i(f_i),\ b=\max_i(f_i). \end{align}

If $t<a$ or $t>b$ then there is no valid solution for $w_i\in[0,1]$. This is the case in the original question, $a=0.2,b=0.6,t=0.8$, hence no solution. The closest solution would be a set of $w_i$ that results in the point $t'\in[a,b]$, which is closest to $t$, i.e. $t'=0.6$.

In case when $t\in[a,b]$, $t=a(1-s)+b$ for some real $s\in[0,1]$, an obvious choice for $w_i$ would be values $1-s$ (for the minimal $f_i$), $s$ (for the maximal $f_i$) and $0$ for the other $f_i$.