1 Reply Latest reply: Nov 9, 2013 11:30 AM by jschellSomeoneStoleMyAlias RSS

    Need help with designing an algorithm

    1f52358e-b7ee-467c-a8d4-d4b9b3e5b612

      Hello,

       

      Thank you for helping me with this. I need to design an algorithm for the following.

       

      From the table below, I want to find out a set of 7 names that gives the largest sum of marks possible with keeping the total fees less than 4000.

       

      Just to be clear, here is the problem in different words.

       

      Desired output:

      Set of 7 names (Name1,Name2,Name3,Name4,Name5,Name6,Name7)that gives the largest sum of Marks

      (Marks1+Marks2+Marks3+Marks4+Marks5+Marks6+Marks7) should be the largest, satisfying the given condition.

       

      Conditions:

      Sum of Fees of 7 names is less than 4000.

      Fees1+Fees2+Fees3+Fees4+Fees5+Fees6+Fees7 < 4000

       

      Name Marks Fees

      A 87 345

      B 4 897

      C 87 432

      D 34 435

      E 6 345

      F 3 789

      G 9 78

      H 8 345

      I 7 879

      J 8 324

      K 87 789

      L 43 4536

      M 65 234

      N 87 897

      O 65 978

      P 23 324

      Q 89 342

      R 9 789

      S 87 34

      T 76 234

      U 654 897

      V 76 23

      W 879 435

      X 0 897

      Y 435 54

      Z 56 23

       

       

      I really appreciate your response.

       

      Regards!