Блог пользователя achhadahappy

Автор achhadahappy, история, 20 месяцев назад, По-английски

I solved the problem by taking the maximum weight first and then further checking if one more child can be fit into the same gondola. As per the question, atmost 2 children can only sit in one gondola but I was thinking if this constraint was not present then will the same solution work i.e first try to make sit all the heavy weights children till weight does not exceed x and then add new children of small weights till we did not exceed the limit. I am confused will the same solution will work or not Question link

  • Проголосовать: нравится
  • 0
  • Проголосовать: не нравится

»
20 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Auto comment: topic has been updated by achhadahappy (previous revision, new revision, compare).

»
20 месяцев назад, # |
Rev. 2   Проголосовать: нравится 0 Проголосовать: не нравится

It does not: the resulting problem is NP-Complete (see for example Job Shop Scheduling).

»
20 месяцев назад, # |
  Проголосовать: нравится 0 Проголосовать: не нравится

Ohh, I was unaware that the new problem is an NP problem. Thanks, I learned something new applepi216