Skip to content

Maximum sum of the independent set problem solution by using the DP approach.

Notifications You must be signed in to change notification settings

beyzabasaran/DynamicProgramming

Repository files navigation

DynamicProgramming

INTRODUCTION


In this assignment, we were expected to develop dynamic programming approach and greedy approach to maximize the output result for the given specific scenario.

The scenario is stated belove.

Scenario of the Assignment: A large family of lions is preparing for a hunt.

- Each lion in the family has hunting ability and this ability is scored between 0 and 100.

- In addition, this family has a criterion for those who will be chosen to go hunting;

- “No lion can go hunting with his/her immediate parent”.

- The reason for this is to ensure that there will be a lion (s) who will stay at home to protect their house.

- Lions will be selected so that the ‘total hunting ability’ should be maximum.



Based on the scenario, we were expected to establish two criteria.

First one is no lion is allowed to go hunting with his/her immediate parent and second one is we must provide maximum possible ‘‘total hunting ability’’ for the selected lion group with two different approaches that we develop.

To sum up, in this assignment we were expected to design a dynamic programming approach and greedy approach that selects lions to optimize the maximum ‘total hunting ability’ with the given criteria.

Furthermore, we were expected to return total maximum hunting ability of the selected lion group and selected lion group members which is specified with dynamic programming approach and greedy approach that we have developed.

And finally, we were expected to compare stated two different approaches above in the meaning of running time complexity and space complexity.

About

Maximum sum of the independent set problem solution by using the DP approach.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages