Help needed regarding a greedy problem

Правка en1, от MotaSanyal, 2020-05-03 10:13:11

Hello everyone!!

Consider the Fitting Shelves Problem

The solution : We can consider all multiples of "m" less than equal to "w" to find the minimum remaining space.

My claim : We only have to consider the highest or second highest multiple of "m" to find the minimum remaining space.

Actually I have not been able to prove this but it works correctly on most of the inputs. So, any prove as to why this will work correctly or any contradictory test case that fails with this approach will be highly appreciated.

Thanks in advance :)

Теги #help, #greedy, #optimization

История

 
 
 
 
Правки
 
 
  Rev. Язык Кто Когда Δ Комментарий
en1 Английский MotaSanyal 2020-05-03 10:13:11 897 Initial revision (published)