Current location - Training Enrollment Network - Mathematics courses - How to calculate Q value and find formula in mathematical modeling?
How to calculate Q value and find formula in mathematical modeling?
Code is a fair seat allocation problem in mathematical modeling. You can enter the number of distribution parties m, the total number of seats and the number of people per party, and allocate according to the Q-value method.

Quantitative indicators to measure fairness:

P 1/n 1=p2/n2. At this time, it is fair to AB.

p 1/n 1 & gt; P2/n2. At this time, it is unfair to A, because for A, the proportion of people corresponding to each seat is larger.

/* Situation 1 */

p 1= 150,n 1= 10,p 1/n 1 = 15p 2 = 100,n2= 10,p2/n2= 10

/* Situation 2 */

p 1= 1050,n 1= 10,p 1/n 1 = 105 p2 = 1000,n2= 10,p2/n2= 100

The evaluation models in mathematical modeling are:

1, analytic hierarchy process, constructing a pairwise comparison judgment matrix, calculating the relative weights of elements under a single criterion, performing consistency check, and calculating the total ranking weights of elements of each layer to the target layer;

2. Grey relational analysis system;

3.DEA evaluation system, ratio model, super-efficiency model, linear programming model and super-efficiency multi-level ranking model;

4. Fuzzy mathematics evaluation model.

Mathematical modeling is to establish a mathematical model according to actual problems, solve the mathematical model, and then solve the actual problems according to the results. When it is necessary to analyze and study a practical problem from a quantitative point of view, people should use mathematical symbols and language to establish a mathematical model on the basis of in-depth investigation, understanding of object information, making simplified assumptions and analyzing internal laws.