1.Find the number of pairwise comparisons that would take place in an election with 13 candidates

Answer :78

2.If there are 171 total pairwise comparisons in a different election, how many candidates are running?how would i find the answer for question 2 i need help pls!!!

2 answers

19
78 is correct for the first one

2nd:
n(n-1)/2 = 171
n^2 - n - 342
(n - 19)(n + 18) = 0
n = 19 or n = -18, but n > 0

n=19, there were 19 running