A Place for Latest Exam wise Questions, Videos, Previous Year Papers, Study Stuff for MCA Examinations - NIMCET
Previous Year Question (PYQs)
4
Divide Rs. 1074 (in whole Rs., having incremental amounts) into a number of bags so that any amount between Rs. 1 and Rs. 1074 can be given by selecting some bags without opening them. What is the minimum number of bags required?
Solution
This is a binary-weight problem.
Minimum bags needed = smallest n such that
1 + 2 + 4 + … + 2ⁿ ≥ 1074
2¹¹ − 1 = 2047 ≥ 1074
So minimum bags = 11
Online Test Series, Information About Examination, Syllabus, Notification and More.