Answered step by step
Verified Expert Solution
Question
1 Approved Answer
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++!
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=8Step 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