有多少种不同的结果组合在大学课程中是可能的?

huangapple go评论73阅读模式
英文:

How many different combinations of results are possible in a University course?

问题

在大学课程中,作业的不同组合有多少可能性?

我有兴趣计算我完成的这门课程的独特方式数量。为了简化问题,没有部分分数。

以下是一些条件:

  • 有四个可评估的任务

    • 作业1:占10%
    • 作业2:占15%
    • 作业3:占15%
    • 作业4:占60%
  • 每个评估的可能分数:

    • 作业1:/10
    • 作业2:/10
    • 作业3:/10
    • 作业4:/100

我在组合离散数学方面有点生疏。

从算法的角度来看,您会如何解决这个问题?
我想找出如何遍历每门课程所给出的每个分数,并返回在这种情况下可以实现的独特组合数量。

我尝试过:

public static void main(String[] args) {
    int m = 0;
    for (int i = 0; i < 11; i++) {
        for (int j = 0; j < 11; j++) {
            for (int k = 0; k < 11; k++) {
                for (int l = 0; l < 101; l++) {
                    m++;

                }
            }
        }
    }
    System.out.println(m);
    // 输出:134431 
}

我发现在这种情况下有134431种分数组合。但我也想知道,比如说在50-59(及格)或60-69(优秀)之间有多少种组合。这是我困惑的地方。

TL/DR:在课程中,个体评分任务有多少组合可能?最终学期分数的范围是什么?

感谢您的时间。

英文:

How many different combinations of results in assignments are possible in a University course?

I am interesting in calculating the number of unique ways I can finish this course that I am doing. To make things easier, there are no partial marks.

Here are some conditions:

  • There are four assessable tasks

    • Assignment 1: Weighted 10%
    • Assignment 2: Weighted 15%
    • Assignment 3: Weighted 15%
    • Assignment 4: Weighted 60%
  • Possible marks for each assessment:

    • Assignment 1: /10
    • Assignment 2: /10
    • Assignment 3: /10
    • Assignment 4: /100

I am a little rusty on my combinations discrete mathematics.

From an algorithmic point of view, how would you go about solving this?
What I want to find out is how to iterate through each grade given for each course and return the number of unique combinations that can be achieved in this situation.

I have tried:

 public static void main(String[] args) {
    int m = 0;
    for (int i = 0; i < 11; i++) {
        for (int j = 0; j < 11; j++) {
            for (int k = 0; k < 11; k++) {
                for (int l = 0; l < 101; l++) {
                    m++;

                }
            }
        }
    }
    System.out.println(m);
    //out: 134431 
}

What I found was that there is 134431 combinations of grades in this situation. But what I want to know also, is how many combinations there are between say the grade of 50-59 (pass) or 60-69(credit). This is what I am confused with.

TL/DR: How many combinations of indiviudal graded assessments can you get in a course? What is the range of end of semester marks possible?

Thank you for your time.

答案1

得分: 1

继续执行你的想法,在增加了你的 m 变量之后,你可以使用你的公式计算组合的最终成绩,然后根据该成绩决定将该成绩放入“通过组”或“学分组”。

例如我的:

public static void main(String[] args) {
    int m = 0;
    int pass = 0;
    int credit = 0;
    for (int i = 0; i < 11; i++) {
        for (int j = 0; j < 11; j++) {
            for (int k = 0; k < 11; k++) {
                for (int l = 0; l < 101; l++) {
                    m++;
                    float finalGrade = (float) (i * 0.1 + j * 0.15 + k * 0.15 + l * 0.6);
                    if (finalGrade >= 50 && finalGrade < 60) {
                        pass += 1;
                    } else if (finalGrade >= 60 && finalGrade < 70) {
                        credit += 1;
                    }
                }
            }
        }
    }
    System.out.println(m);
    System.out.println(pass);
    System.out.println(credit);
    //out: 134431
}
英文:

Just continue with your idea, after you increase your m variable, you can calculate the final grade of your combination by using your formula, then from that grade, you can decide put that grade to pass group or credit group.

Mine for example:

public static void main(String[] args) {
    int m = 0;
    int pass = 0;
    int credit = 0;
    for (int i = 0; i &lt; 11; i++) {
        for (int j = 0; j &lt; 11; j++) {
            for (int k = 0; k &lt; 11; k++) {
                for (int l = 0; l &lt; 101; l++) {
                    m++;
                    float finalGrade = (float) (i * 0.1 + j * 0.15 + k * 0.15 + l * 0.6);
                    if (finalGrade &gt;= 50 &amp;&amp; finalGrade &lt; 60) {
                        pass += 1;
                    } else if (finalGrade &gt;= 60 &amp;&amp; finalGrade &lt; 70) {
                        credit += 1;
                    }
                }
            }
        }
    }
    System.out.println(m);
    System.out.println(pass);
    System.out.println(credit);
    //out: 134431
}

huangapple
  • 本文由 发表于 2020年8月13日 14:26:46
  • 转载请务必保留本文链接:https://go.coder-hub.com/63389323.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定