Question
In this course for this term, problem set partners do not have to come from the same course section and students are allowed to work
In this course for this term, problem set partners do not have to come from the same course section and students are allowed to work as individuals. In some other terms, groups were only legal if the student was working solo or if the two partners were registered in the same section. The MarkUs system produces a file that has one line per submission and contains the login of each partner. If the submission is from an individual, that students login is listed in both places (so partner1 is partner1 and partner2.) The function below determines if all groups on a MarkUs submission list are legal according to the stricter definition from previous terms.
Perform an average-case analysis of this code. State explicitly the operation or operations that you are counting in your analysis and give exact counts. For the average-case analysis, you will discover that you need to determine the probability at each point in the list (p), that a group contains an across-section partnership (i.e. the partners come from two different sections.) For the sake of this analysis, you may make the simplification that this probability is independent of the position in the list and independent of the other values in the list. Since you dont know the best value to use for p, do as much of your analysis as you can with the variable. Then, make a good argument for two different values of p to investigate and carry out both investigations using actual numbers. One of your scenarios should assume that students are no more likely to pick someone from their own section than to pick a random student from the course. There are three sections of the course and the enrolment is respectively 240, 240 and 220 students. We know from past course data that the probability that a student works without a partner is 0.20 and that the distribution of students working alone matches the distribution of students across the various course sections.
def all_groups_legal (submissions): 1. for submission in submissions: 2. course_section_pl = student_to_section[submission.partnerl] 3. course_section_p2 student_to_section[submission.partner2] 4. if not course_section_pl course_section_p2: 5. return false 6. return True def all_groups_legal (submissions): 1. for submission in submissions: 2. course_section_pl = student_to_section[submission.partnerl] 3. course_section_p2 student_to_section[submission.partner2] 4. if not course_section_pl course_section_p2: 5. return false 6. return TrueStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started