AQ4.3: Activity Question 3 - Not graded

996 views
Skip to first unread message

Ram Mohan M

unread,
Nov 16, 2020, 2:46:14 AM11/16/20
to Discussion forum for Computational Thinking
As mentioned in the lecture, assume that a computer can do 108 comparisons in a second. How many seconds will it take for the computer to do pairwise comparisons of one million (1, 000, 000) elements? 


can anyone pls explain
 

Computational Thinking Support 2

unread,
Nov 16, 2020, 6:02:12 AM11/16/20
to Discussion forum for Computational Thinking, Ram Mohan M
Hi,
Number of comparisons can be done by computer per second = 10^8
Number of pairwise comparisons of 10^6 elements = 10^6*(10^6 - 1)/2 ~ 0.5*10^12
Time taken by computer to do 0.5*10^12 comparisons = (0.5*10^12)/10^8 = 0.5*10^4 = 5000
So answer will be 5000.

Regards,
Deepak
IITM Online Degree Team
Reply all
Reply to author
Forward
Message has been deleted
0 new messages