Answered step by step
Verified Expert Solution
Question
1 Approved Answer
3. [6 Marks] Klutzy Pty Ltd's CEO has asked you to help organise its end of the year splurge. Every- body invited, one of
3. [6 Marks] Klutzy Pty Ltd's CEO has asked you to help organise its end of the year splurge. Every- body invited, one of which must be the CEO, has to attend. Employees at Klutzy are organised into a strict hierarchical structure resembling a binary tree, where the root node represents the CEO. The data scientists at human resources have assigned to each employee an awkwardness score, a. An a > 0 indicates that the staff member and its supervisor dislike each other, whereas an a < 0 indicates that they actually like each other. If the guest list does not include an employee and its supervisor, then the added awkwardness is zero. To help you model Klutzy Pty Ltd assume that each node has the following fields: (a) L is a pointer to the left child or NULL if there is no left child; (b) R is a pointer to the right child or NULL if there is no right child; and (c) alpha is the awkwardness score of the inviting the employee and its supervisor. Provide a method that finds the score of the least awkward party, i.e., minimise the overall awkwardness score. For example, your algorithm should return -1' and '0' for the two trees in the figure below. You must provide: (a) [2 Marks] A description of the optimisation problem to be solved, including an equation of the recursive relationship. (b) [4 Marks] The pseudo-code of your method, in about 15 lines of code. 1 7 8 2 -2 3 0 0 0 0
Step by Step Solution
★★★★★
3.45 Rating (158 Votes )
There are 3 Steps involved in it
Step: 1
a Description of the optimization problem and recursive relationship The optimization problem here i...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