Group Project. Imagine that there are n students in CMPSC 465, ranked from 1 to n...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Group Project. Imagine that there are n students in CMPSC 465, ranked from 1 to n by how comfortable they are with the course material, with 1 being the most comfortable. For the sake of this problem, a project has just been assigned that may be completed in pairs. Every student has a set of friends in the class, though these friendships may not be reciprocal. To maximize their odds of getting a good grade on the project, each student leverages their social network to find a friend of a friend of a friend (and so on) who is doing well in the course. When looking for a partner, the person with the best rank in each student's social network will be their first pick, regardless of any other students who share the same first pick. Note that students are in their own social network and that students may work alone, which is represented by being their own first pick. Your goal is to write an algorithm that, for every student, computes who their first pick will be. You may identify each student by their distinct ranking number. (a) Model this as a graph problem: give a precise definition of the graph involved. For each student, what question do you need to answer about your graph to find their first pick? (b) Give an algorithm that computes every student's first pick in O(V+E). Store the computed values in an array first-pick, where first pick[j] = i means student j's first pick is student i. (Hint: Consider the reverse graph of the graph you gave in part (a).) Group Project. Imagine that there are n students in CMPSC 465, ranked from 1 to n by how comfortable they are with the course material, with 1 being the most comfortable. For the sake of this problem, a project has just been assigned that may be completed in pairs. Every student has a set of friends in the class, though these friendships may not be reciprocal. To maximize their odds of getting a good grade on the project, each student leverages their social network to find a friend of a friend of a friend (and so on) who is doing well in the course. When looking for a partner, the person with the best rank in each student's social network will be their first pick, regardless of any other students who share the same first pick. Note that students are in their own social network and that students may work alone, which is represented by being their own first pick. Your goal is to write an algorithm that, for every student, computes who their first pick will be. You may identify each student by their distinct ranking number. (a) Model this as a graph problem: give a precise definition of the graph involved. For each student, what question do you need to answer about your graph to find their first pick? (b) Give an algorithm that computes every student's first pick in O(V+E). Store the computed values in an array first-pick, where first pick[j] = i means student j's first pick is student i. (Hint: Consider the reverse graph of the graph you gave in part (a).)
Expert Answer:
Answer rating: 100% (QA)
a Graph Definition The graph can be represented as an undirected graph GV E where V is the set of vertices representing students labeled from 1 to n E ... View the full answer
Related Book For
Introduction to Operations Research
ISBN: 978-1259162985
10th edition
Authors: Frederick S. Hillier, Gerald J. Lieberman
Posted Date:
Students also viewed these programming questions
-
year Project Nightglow has the following cash flows: Cash flow () 52417000 0 1 16361000 2 22356000 3 24456000 4 29975000 The required return is 13% per annum What The project's NPV (to the nearest )?
-
Planning is one of the most important management functions in any business. A front office managers first step in planning should involve determine the departments goals. Planning also includes...
-
The Crazy Eddie fraud may appear smaller and gentler than the massive billion-dollar frauds exposed in recent times, such as Bernie Madoffs Ponzi scheme, frauds in the subprime mortgage market, the...
-
The following image shows a 2 . 0 kg box being pulled by a rope along a horizontal, smooth surface for 4 meters. A constant force of 6 N is applied from 1 to 2 meters. The force decreases at a...
-
The semicircular arch is subjected to a uniform distributed load along its axis of w0 per unit length. Determine the internal normal force, shear force, and moment in the arch at angle . Given: = 45...
-
Yet another Director asks you about the logic of estimating the cost of equity (Ke) using CAPM. You know the Director's background includes having been a high yield bond analyst. Explain the...
-
Consider the patient satisfaction data in Table B.17. Fit a regression model to the satisfaction response using age and severity as the predictors. Perform an influence analysis of the date and...
-
Using the data from Exercise 6.18, compute the equivalent units of production for each of the four departments using the FIFO method. In exercise The following data are for four independent...
-
Calculate Rm (market return from market price index) and Rj (return of share prices). Date PERIOD 1 AORD R company m m Feb-14 5403 0.008 0.3370 Mar-14 5470.8 0.008 0.3354 Apr-14 5473.8 0.008 0.3298...
-
During the year, your clients Omar and Maria Mansour had the following investment transactions: Interest and dividend income reported to them: 1099-INT from Chase Bank Interest income (1099-INT from...
-
Complete the function Whatlslt such that: The output logical variable onTime is true only if no Traffic is true and gasEmpty is false. The output logical variable delayed is false only if no Traffic...
-
What is the value of a derivative that pays off \($100\) in 6 months if an index is greater than 1,000 and zero otherwise? Assume that the current level of the index is 960, the risk-free rate is 8%...
-
Aerotron Electronics is considering purchasing a water filtration system to assist in circuit board manufacturing. The system costs \(\$ 40,000\). It has an expected life of 7 years at which time its...
-
Two incinerators are being considered by a waste management company. Design A has an initial cost of \($2\),500,000, has annual operating and maintenance costs of \($800\),000, and requires overhauls...
-
When writing a cover letter, its relatively easy to identify key words from a particular employers help wanted ad or website. When you write a LinkedIn profile, you are casting a wider net. What are...
-
Repeat Problem 9 assuming that the cost of capital has increased due to weak market conditions and MARR is now 6 percent/year. Data from problem 9 Bailey, Inc., is considering buying a new gang punch...
-
Continuous systems have an infinite number of degrees of freedom that require solution with partial differential equations. A multiple degree of freedom, or MDOF, lumped element system can...
-
a. Why does the Wi-Fi Alliance release compatibility testing profiles in waves instead of combining the entire standards features initially? 27a1.) An 802.11ac Wi-Fi compatibility testing profile...
-
A basic property of any linear programming problem with a bounded feasible region is that every feasible solution can be expressed as a convex combination of the CPF solutions (perhaps in more than...
-
Consider variation 3 of the political campaign problem (see table 15.6). refer to the resulting linear programming model for player 1 given near the end of sec. 15.5. ignoring the objective function...
-
Consider the following function: Show that f (x) is convex by expressing it as a sum of functions of one or two variables and then showing (see Appendix 2) that all these functions are convex. fix) =...
-
Consider an experiment that selects a cell phone camera and records the recycle time of a flash (the time taken to ready the camera for another flash). The possible values for this time depend on the...
-
Suppose that the recycle times of two cameras are recorded. The extension of the positive real line \(R\) is to take the sample space to be the positive quadrant of the plane \[ S=R^{+} \times R^{+}...
-
As in Example 2.1, camera recycle times might use the sample space \(S=R^{+}\), the set of positive real numbers. Let \[ E_{1}=\{x \mid 10 \leq x <12\} \quad \text { and } \quad E_{2}=\{x \mid 11 0\}...
Study smarter with the SolutionInn App