AQ 4.4 qs 3

798 views
Skip to first unread message

shaun pai

unread,
Nov 11, 2020, 8:03:52 PM11/11/20
to Discussion forum for Computational Thinking
QS :  We distribute the 20 objects into bins of equal size. How many bins should we choose to make the least number of comparisons overall?
ANS : 10

Query: Why can't there be 20 bins with 1 object each, so that the total no. of camparisons go down to zero. That is the best case scenario,right?

Computational Thinking Support 2

unread,
Nov 12, 2020, 12:52:33 AM11/12/20
to Discussion forum for Computational Thinking, shaun...@gmail.com
Hi,
Conceptually you are correct but in the question it is asked to make the least number of comparisons. When you choose 20 bins, there is only one element therefore there is no any comparison. Then what is purpose of creating bins? Purpose of binning is to exclude the unnecessary comparisons and also we should create bin in  such a way that there should no any comparisons between them (bins).
Yes, In the question we should had to tell about the excluding of one element case.

Hope your doubt is cleared if not write us again.

Regards,
Deepak
IITM Online Degree Team
Reply all
Reply to author
Forward
0 new messages