Question: PLEASE IMPLEMENT THE SOLUTION IN JAVA , not in C++! 2 Branch and Bound [30 marks] Problem: Given a list of n integers, a1,a2,,an, split

PLEASE IMPLEMENT THE SOLUTION IN JAVA, not in C++!

PLEASE IMPLEMENT THE SOLUTION IN JAVA, not in C++! 2 Branch and

2 Branch and Bound [30 marks] Problem: Given a list of n integers, a1,a2,,an, split the list into k lists, such that the division is as fairly distributed as possible such that you have to minimize the Favour. The Favour is defined as the maximum total that cannot be avoided in one of the k sets. Note: The elements in the list are NOT distinct. Return the minimum Favour (bound) of all distributions. You are required to: 1 1. Implement a brute force Branch and Bound algorithm to find that. 2. Implement an algorithm that uses Backtracking with Heuristics to implement the above problem. 3. Provide the time difference in finding the solution for the problem with the above approaches. Implement your algorithm in C++ or Java. Here is specification for the input an output of your program. Input: Standard input. First line provides total number of elements in the set. Then the next n lines give the elements of that set. After which you are given the value of k. Sample input: 8 6 1 3 2 2 4 2 2 3 Output: 6+2=83+2+2=74+1+2=7Favour=8

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!