Doubt in Week 4 Activity 3 Q3

93 views
Skip to first unread message

Shambhavi Singh

unread,
Nov 7, 2020, 9:11:39 AM11/7/20
to Discussion forum for Computational Thinking
The question is, "as mentioned in the lecture, assume that a computer can do 10^8 comparisons in a second. How many seconds will it take for the computer to do pairwise comparisons of one million (1, 000, 000) elements?"

The correct answer happens to be nearly 5000 seconds.
I didn't understand how it is calculated.

1, 000, 000 is 10^6 which is less than 10^8 so the answer according to me should be less than 1 second.

Can someone kindly explain the method used in solving this question.

Would be very helpful.
Thank you.

Goutam Basu

unread,
Nov 7, 2020, 10:06:24 AM11/7/20
to Shambhavi Singh, Discussion forum for Computational Thinking
{1000000x(1000000-1)/2}/100000000=4999.995

--
You received this message because you are subscribed to the Google Groups "Discussion forum for Computational Thinking" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cs1001-discus...@nptel.iitm.ac.in.
To view this discussion on the web visit https://groups.google.com/a/nptel.iitm.ac.in/d/msgid/cs1001-discuss/03b0761c-bf48-440f-926f-e82d12759308n%40nptel.iitm.ac.in.

Shambhavi Singh

unread,
Nov 7, 2020, 3:03:41 PM11/7/20
to Discussion forum for Computational Thinking, bas...@gmail.com, Discussion forum for Computational Thinking
Thank you so much for the explanation :)
Message has been deleted

Anand Iyer

unread,
Nov 18, 2020, 9:51:48 PM11/18/20
to Discussion forum for Computational Thinking, lavany...@gmail.com, Shambhavi Singh, bas...@gmail.com, Discussion forum for Computational Thinking
Lavanya, How many zeros are there in 10^2?  What about 10^3?  think from there...

On Wednesday, November 18, 2020 at 9:26:47 PM UTC+5:30 lavany...@gmail.com wrote:
shouldn't we divide it by 10^8 (9 zeroes) ? 

Lavanya S

unread,
Nov 19, 2020, 1:59:34 AM11/19/20
to Discussion forum for Computational Thinking, anandd...@gmail.com, Lavanya S, Shambhavi Singh, bas...@gmail.com, Discussion forum for Computational Thinking
oops!! yeah sorry
Reply all
Reply to author
Forward
0 new messages