AQ4.4: Activity Question 4 - Not Graded. Please Explain why the answer is NO for Question no. 5

163 views
Skip to first unread message

Ashok Singh

unread,
Nov 17, 2020, 7:30:39 AM11/17/20
to Discussion forum for Computational Thinking
Question no. 5.
We want to find the number of pairs of students who satisfy both the conditions given below:
  • Both students in the pair have the same total marks.
  • Both students do not belong to the same gender.
We now divide the students into two bins, one which contains boys and the other which contains girls, and perform pairwise comparisons within the bins. Will this approach give us the correct answer for the number of pairs?

Correct answer apparently is NO.

Can someone explain what is wrong in binning it the way shown in the question.


Barath Vignesh

unread,
Nov 17, 2020, 10:16:31 AM11/17/20
to Discussion forum for Computational Thinking, capt.a...@gmail.com
No, u should not bin by gender. because the second condition is the gender should be different. If u bin by gender and compare it, u would be comparing the cards of same gender i.e., M and F . So u shouldn't bin by gender  

Ashok Singh

unread,
Nov 17, 2020, 10:28:25 AM11/17/20
to Discussion forum for Computational Thinking, Barath Vignesh, Ashok Singh
Thanks for clearing it up. I forgot that comparison is done WITHIN the bin elements and NOT between elements of different bins.

Barath Vignesh

unread,
Nov 18, 2020, 1:24:56 AM11/18/20
to Discussion forum for Computational Thinking, Ashok Singh, Barath Vignesh
Your Welcome...
Reply all
Reply to author
Forward
0 new messages