The 2021 Shuwei Cup Mathematical Modeling C-question Sports Meeting optimizes the game mode to explore and solve the whole process documents and programs

2021 Shuwei Cup Mathematical Modeling

Exploration on Optimizing Competition Mode of C-question Games

Reproduction of the original title:

  Mid-May happens to be the time node for each university to hold the annual sports. The sports meeting has become a beautiful landscape on the university campus. The exciting opening ceremony, the applauding competition and the exciting award ceremony at the sports meeting have brought a spiritual enjoyment to the students participating in the sports meeting. During each sports meeting, the athletes on the sports field fought bravely, proved themselves with their own efforts, and showed their speed and passion. The cheerleaders of all classes under the sports field cheered for the players, showing their youthful vigor, and the sports meeting has still become an indispensable part of the campus.
  The sports meeting is not only a stage for students to show themselves, but more importantly, it is a rare opportunity to improve the team awareness and physical fitness of college students. However, the significant differences between the numbers and genders of different colleges have led to the monopoly of some college rankings for many years. This has also led to a decline in the enthusiasm for participating in a large number of college games, thus failing to play its due role. For this reason, it is imminent to introduce a scientific and reasonable sports meeting optimization competition mode.
  It is known that the scoring rules of a school sports meeting are as follows: the first place gets 9 points, and the second to eighth places get 7 to 1 point. The cumulative scores of boys and girls in each college constitute the group score. Attachment 1 shows the distribution data of 20 colleges, 104 majors, and a total of 28,523 students in a certain university. Please use this data to complete the following tasks: Question 1: If colleges are allowed to merge to participate in the competition,
  please You proposed an optimal distribution model with no less than 12 groups, the total number of people in each group and the gender comparison of men and women, and discussed the fairness index of the grouping plan; Question 2: How to classify each college into Group A and Group B
  ? For the competition, please propose the optimal grouping plan for A and B, and discuss the fairness index of this grouping plan;
  Question 3: If special students can participate in the competition across colleges, please propose a plan to ensure a more balanced competition among colleges. If the special students do not participate in the competition, can you propose a relatively fair weighting scheme for each college?
  Question 4: Can you prove which of the above four optimization game modes is better through computer simulation or theoretical derivation?

Overview of the overall solution process (abstract)

  In order to introduce a scientific and reasonable sports meeting optimization game mode, this paper uses a number of mathematical models based on dynamic programming to optimize the game mode of a college sports meeting.
  Aiming at problem 1, in order to satisfy the requirement that colleges are allowed to merge to participate in the competition together, the number of groups is not less than 12, the total number of people in each group and the gender of men and women are relatively balanced, and a mathematics based on the unbalanced assignment problem in dynamic programming is established. The model takes the number of people in each group and the balance of male and female ratios as the objective function, uses the Hungarian algorithm combined with lingo software to solve the optimal allocation plan, and defines a fair index to discuss the fairness of the game, and then performs an optimization on the obtained optimal allocation plan discuss.
  For problem 2, in order to divide each college into two groups for competition, in order to make the strength of each college more balanced, through analysis, consider grouping each college by major, and then use the optimal allocation of unbalanced assignments established in question 1 The model solves the optimal grouping scheme for each college, and finally determines the optimal allocation scheme for Group A and Group B.
  In response to question 3, in order to make the competition strength of each college more balanced, it is considered that the total number of students in each college is approximately equal as the equilibrium condition, and the special students are allocated to different colleges. Due to the significant difference in sports competition between special students and ordinary students, each special student is allocated to ordinary students in a ratio of 1:5. The allocation plan of special students is similar to the resource allocation problem in dynamic programming, so the data allocation problem model in dynamic programming is established to allocate special students. Considering that special students do not participate in the competition, in order to balance the strength of each college, a winning probability weight is introduced for each college, and then the established fair seat allocation model is used to adjust the winning probability weight of each college, so that All schools have an equal chance of winning.
  For question 4, on the basis of the models established in the previous three questions, it is planned to explore four optimal distribution models through computer simulation, and analyze four different fairness indices, so as to select an optimal distribution model .

problem analysis:

  Problem 1 is a mathematical optimization problem. To solve this type of problem, we need to focus on analyzing three important points to build a model. 1. The number of groups is twelve; 2. The total number of people in each group should be approximately the same; 3. The ratio of men and women in each group should be approximately equal. Due to the above reasons, we can first establish a mathematical model I of a statistical table, and then establish a mathematical model II of an assignment model (a special case of 0-1 programming), and then compare the number of people in each group with the total number of people in these 12 groups The standard deviation Z1 of the average value, the ratio of men to women in each group, and the standard deviation Z2 of the ratio of men to women in the total number are used as the objective function, and finally the solution is obtained to find out the fairness index of the grouping scheme.
  Question 2 is a mathematical optimization problem. To solve this kind of problem, each college is divided into Group A and Group A. We need to focus on analyzing two important points to build a model. 1. Group by major; 2. The number of people in each college is based on the total number of people in each group and the balance between men and women. Due to the above reasons, we can first use the optimal allocation model of unbalanced assignment established in Question 1 to solve the grouping of each college grouped by major, and then discuss the fairness index of the grouping method, and finally determine the optimal allocation plan for Group A and Group B.
  Question 3 belongs to the mathematical problem of resource allocation. This kind of problem can be a multi-stage decision-making process or a static programming problem. To solve this kind of problem, a dynamic programming model can be constructed to solve it. Due to the above reasons, we can first use the number of students in each college given in Appendix 1 plus the proportionately distributed number of special students and the standard deviation of the school’s average number of students in each college as the objective function, and then solve the maximum Finally, use the definition of fairness index defined in question 1 to discuss its fairness index.
  Question 4 is a validation question. On the basis of the models established in the previous three questions, it is planned to explore four optimal distribution models by means of computer simulation, and analyze four different fairness indices, so as to select an optimal distribution model.

Model building and solving

  From operations research, we know that we often encounter such problems in work: there are m tasks that need to be undertaken by n people, and everyone can complete each of the tasks, but because each person has different characteristics and expertise, each person can complete each task. The time, cost or benefits generated by each task are different, and because of the requirements of the nature of the task and the needs of management, each task can only be completed by one person, and each person can only undertake part of it. A task. Ask which person should be assigned to complete which task so that the total time spent on completing each task is the shortest or the total cost is the least, or the total benefit generated is the best. We call this type of optimal matching problem assignment Problem.
  In practical application, there are usually two types of assignment problems: balanced and unbalanced. That is, there are n tasks, and n people are assigned to complete them. It is called a balanced assignment problem; there are m tasks, and n people are assigned to complete them. Assign questions to unbalanced. According to the subject conditions, 20 colleges are allowed to be combined into more than 12 groups, and a distribution model is required to make the number of each group and the ratio of men and women balanced. Therefore, problem 1 adopts an unbalanced assignment problem to establish an optimal assignment model.
insert image description here

Establishment of Optimal Allocation Model for Bi-Objective Unbalanced Assignment

insert image description here
insert image description here
insert image description here

Model Solving Based on Hungarian Algorithm

  The solution process for this kind of multi-traveling salesman problem is quite complicated, and it is considered as an NP problem. And choosing an algorithm is relatively difficult. In this paper, the Hungarian algorithm is chosen to solve the optimal solution of the assignment problem.
  1. The basic principle of the Hungarian algorithm
insert image description here
  2.
insert image description here
insert image description here
  The results of the problem-solving steps of the Hungarian algorithm:
  1. Construct the efficiency matrix
insert image description here
insert image description here
  2. Model solution
insert image description here
  If you want to classify each college into Group A and Group B for competition, according to the given data in the topic, you can follow Men and women are divided into Group A and Group B. It can also be considered to group each college by major, and divide the total number of students in each college into Group A and Group B according to different majors. Combined with question 1, in order to make the total number of people in each group and the male and female gender more balanced, we choose to group each college by major. Then use the optimal allocation model of unbalanced assignment established in question 1 to solve the grouping of each college grouped by major, and discuss the fairness index of the grouping method, and finally determine the optimal allocation plan for group A and group B.

Establishment of the grouping model by specialty

insert image description here
insert image description here

Model solution

insert image description here
insert image description here
  result
insert image description here
insert image description here

Establishment of distribution model for special students based on resource allocation

  Resource allocation is a problem of distributing one or several resources (including funds) to several users, or investing in several enterprises, in order to obtain the maximum benefit. The resource allocation problem can be a multi-stage decision-making process or a static programming problem, and a dynamic programming model can be constructed to solve it. Taking the number of students in each college given in Appendix 1 plus the proportionately distributed number of special students and the standard deviation of the school’s average number of students in each college as the objective function, solve the optimal distribution plan for special students, and then use the problem 1 DEFINED EQUITY INDEX The definition discusses its fairness index.
insert image description here
insert image description here
insert image description here

Build a weighted points model based on fair seat allocation

insert image description here
insert image description here
insert image description here
insert image description here
insert image description here
insert image description here

Paper Thumbnail:

insert image description here

code:

#include<stdio.h>
int main(){
    
    
//int a[]={},b[]={};
//int z=6,x=6,c=6,v=6,b=6,n=6,m=6,l=6;
int z,x,c,v,b;
int man=714,woman=101,l=0;
double a[9]={
    
    135,145,41,170,112,192,143,250,240},
s[9]={
    
    5,10,7,21,33,34,4,42,47},
h,j,k,p=0.127,q=0.625;
for(z=8;z>=0;z--)
for(x=8;x>=0;x--)
for(c=8;c>=0;c--)
for(v=8;v>=0;v--)
{
    
    
if(z!=x)
if(z!=c)
if(z!=v)
if(x!=c)
if(x!=v)
if(c!=v)
{
    
    h=p*(man-(a[z]+a[x]+a[c]+a[v]));
j=q*(woman-(s[z]+s[x]+s[c]+s[v]));
if(h<0)
{
    
    h=-h;}
if(j<0)
{
    
    j=-j;}
k=100-h-j;
l++;
printf("%d-----%lf-----%d%d%d%d%d-----%lf------%lf\n",l,k,z,x,c,v,b,h,j)
;
}}
return 0;
}
x1=[]#x1 为对应组数的最低前 n 位学院的男生人数,需自行输入进列表
y1=[]#y1 为对应组数的最低前 n 位学院的女生人数,需自行输入进列表
x2=[]#x2 为对应组数的最低次 n 位学院的男生人数,需自行输入进列表
y2=[]#y2 为对应组数的最低次 n 位学院的女生人数,需自行输入进列表
renshu1=[]#此为对应组数的最低前 n 位学院的总人数
renshu2=[]#此为对应组数的最低次 n 位学院的总人数
nansheng=[]#此为对应组数的男生总人数
nvsheng=[]#此为对应组数的女生总人数
zongrenshu=[]
bili=[]
for i in range(len(x1)):
a=x1[i]+y1[i]
renshu1.append(a)
b=x2[i]+y2[i]
renshu2.append(b)
for j in renshu1:
for m in renshu2:
c=j+m
zongrenshu.append(c)
n=1
for k in range(0,len(zongrenshu),n):
zongrenshus=zongrenshu[k:k+n]
print(zongrenshus)
for i in range(len(x1)):
d=x1[i]+x2[i]
nansheng.append(d)
e=y1[i]+y2[i]
nvsheng.append(e)
for j in nansheng:
for m in nvsheng:
f=j/m
bili.append(f)
for k in range(0,len(bili),n):
bilis=bili[k:k+n]
print(bilis)
52,104,54,73,66,43,46,22,68,83,51
192,201,151,148,121,177,163,76,155,188,145
#include<stdio.h>
int main(){
    
    
//int a[]={},b[]={};
//int z=6,x=6,c=6,v=6,b=6,n=6,m=6,l=6;
int z,x,c,v,b;
//double q[8]={7.35 ,7.21 ,8.04 ,7.97 ,8.28 ,8.22 ,7.63 ,7.09 },
//w[8]={6.47 ,7.15 ,7.14 ,7.25 ,7.46 ,7.34 ,7.89 ,7.99 },
//e[8]={7.09 ,7.82 ,7.08 ,7.58 ,7.41 ,7.42 ,7.89 ,7.71 },
//r[8]={7.25 ,7.24 ,7.96 ,8.02 ,8.30 ,8.14 ,7.70 ,7.15 },
//t[8]={7.47 ,7.55 ,7.87 ,8.18 ,8.19 ,8.23 ,7.68 ,7.14 },
//y[8]={7.23 ,7.66 ,7.71 ,7.96 ,8.04 ,8.02 ,7.87 ,7.33 },
//u[8]={7.66 ,7.50 ,7.97 ,8.13 ,8.16 ,8.28 ,7.54 ,6.99 },
//i[8]={7.26 ,6.74 ,8.12 ,7.62 ,8.04 ,7.92 ,7.51 ,6.82 },
//h;
int man=331,woman=858,l=0;
double a[11]={
    
    52,104,54,73,66,43,46,22,68,83,51},
s[11]={
    
    192,201,151,148,121,177,163,76,155,188,145},
h,j,k;
//printf("%lf",y[0]);
//for(m=10;m>=0;m--)
//for(l=7;l>=0;l--)
for(z=10;z>=0;z--)
for(x=10;x>=0;x--)
for(c=10;c>=0;c--)
for(v=10;v>=0;v--)
for(b=10;b>=0;b--)
//for(n=7;n>=0;n--)
{
    
    
if(z!=x)
if(z!=c)
if(z!=v)
if(z!=b)
//if(z!=n)
if(x!=c)
if(x!=v)
if(x!=b)
//if(x!=n)
if(c!=v)
if(c!=b)
//if(c!=n)
if(v!=b)
//if(v!=n)
//if(b!=n)
//if(l!=z)
//if(l!=x)
//if(l!=c)
//if(l!=v)
//if(l!=b)
//if(l!=n)h
//if(m!=z)
//if(m!=x)
//if(m!=c)
//if(m!=v)
//if(m!=b)
//if(m!=n)
//if(m!=l)
//
{
    
    
h=0.417*(man-(a[z]+a[x]+a[c]+a[v]+a[b]));
j=0.227*(woman-(s[z]+s[x]+s[c]+s[v]+s[b]));
//printf("%lf--%lf\n",h,j);
if(h<0){
    
    
h=-h;
}
if(j<0){
    
    
j=-j;
}
k=100-h-j;
//if(z==10) z=A;
//if(z==11) z=B;
//if(x==10) x=A;
//if(x==11) x=B;
//if(c==10) c=A;
//if(c==11) c=B;
//if(v==10) v=A;
//if(v==11) v=B;
//if(b==10) b=A;
//if(b==11) b=B;
l++;
printf("%d-----%lf-----%d%d%d%d%d-----%lf------%lf\n",l,k,z,x,c,v,b,h,j);
}
}

Guess you like

Origin blog.csdn.net/weixin_43292788/article/details/127620433#comments_27564316