Question 1202348
<font color=black size=3>
Answer: <font color=red>36 tunnels</font>
Total cost = $36


====================================================================


Explanation:

Let's say for example there are 5 burrows labeled A,B,C,D,E.


Make a 5 by 5 table with those labels along the left and top side.
<table border = "1" cellpadding = "5"><tr><td></td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr><tr><td>A</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>B</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>C</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>D</td><td></td><td></td><td></td><td></td><td></td></tr><tr><td>E</td><td></td><td></td><td></td><td></td><td></td></tr></table>


It's clear it makes no sense to build a tunnel connecting any given burrow to itself. We cannot connect A to A for instance.


Let's cross those entries out with an X.
<table border = "1" cellpadding = "5"><tr><td></td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr><tr><td>A</td><td>X</td><td></td><td></td><td></td><td></td></tr><tr><td>B</td><td></td><td>X</td><td></td><td></td><td></td></tr><tr><td>C</td><td></td><td></td><td>X</td><td></td><td></td></tr><tr><td>D</td><td></td><td></td><td></td><td>X</td><td></td></tr><tr><td>E</td><td></td><td></td><td></td><td></td><td>X</td></tr></table>
The 5*5 = 25 entries has now dropped to 25-5 = 20 entries. We've subtracted off the 5 cells marked with X.


In other words:
25 - 5
5*5 - 5*1
5*(5-1)
5*4


Meaning that if we had n burrows, then we'd have n^2 - n = n*(n-1) entries after removing the northwest diagonal.


But notice the symmetry of the table. The entries marked with Y represent connecting burrow A to C
<table border = "1" cellpadding = "5"><tr><td></td><td>A</td><td>B</td><td>C</td><td>D</td><td>E</td></tr><tr><td>A</td><td>X</td><td></td><td>Y</td><td></td><td></td></tr><tr><td>B</td><td></td><td>X</td><td></td><td></td><td></td></tr><tr><td>C</td><td>Y</td><td></td><td>X</td><td></td><td></td></tr><tr><td>D</td><td></td><td></td><td></td><td>X</td><td></td></tr><tr><td>E</td><td></td><td></td><td></td><td></td><td>X</td></tr></table>
We've double-counted things when marking two instances of Y.
So we ignore either the lower half or the upper half. The string of X's is the divider line.


This means we'll divide by 2 when ignoring half of the cells of the table.


There are 5*4/2 = 20/2 = 10 different tunnels connecting the five burrows together.
The ten tunnels are: 
<pre>
AB
AC
AD
AE

BC
BD
BE

CD
CE

DE
</pre>
A tunnel like AB is the same as BA. Order doesn't matter.


The formula in general is n*(n-1)/2 which is found in the nCr formula when r = 2.


If we had n = 9 burrows, then,
n*(n-1)/2
9*(9-1)/2
9*8/2
72/2
36


There are <font color=red>36 tunnels</font> connecting the 9 burrows to each other. Each tunnel costs $1.00, which means the total cost is $36.
</font>