Answered step by step
Verified Expert Solution
Link Copied!

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++!

image text in transcribed

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Put Your Data To Work 52 Tips And Techniques For Effectively Managing Your Database

Authors: Wes Trochlil

1st Edition

0880343079, 978-0880343077

More Books

Students also viewed these Databases questions

Question

c. What groups were least represented? Why do you think this is so?

Answered: 1 week ago