起因
(由图可知是23年扬州期末,但是我找不到解析就此作罢)
试进行分析
A
数组 | $ X_1$ | \(X_2\) |
---|---|---|
数组容量 | \(N_1\) | \(N_2\) |
平均数 | \(M_1\) | \(M_2\) |
合并后数据的平均值为\(N_1M_1+N_2M_2\over N_1+N_2\)
那么,由于\(N_1+N_2\)是正整数,
考虑上述三个平均值的大小关系,
等价于考虑\(N_1M_1+N_2M_1\), \(N_1M_1+N_2M_2\),\(N_1M_2+N_2M_2\)的大小关系
记
\(\alpha\)=\(N_1M_1+N_2M_1\)
\(\beta\)=\(N_1M_1+N_2M_2\)
\(\gamma\)=\(N_1M_2+N_2M_2\)
则
\(\alpha\)-\(\beta\)=(\(M_1\) -\(M_2\) )\(\times\) \(N_2\) (1)
\(\beta\)-\(\gamma\)=(\(M_1\) -\(M_2\) )\(\times\) \(N_1\) (2)
显然(1)(2)同号,即
当\(M_1\) \(\le\)\(M_2\),\(\alpha\)\(\le\)\(\beta\)\(\le\)\(\gamma\)
当\(M_1\) \(\ge\)\(M_2\),\(\alpha\)\(\ge\)\(\beta\)\(\ge\)\(\gamma\)
综上,A正确