<?xml version="1.0" encoding="UTF-8"?>
<quiz>
  <question type="description">
    <name>
      <text>9.1.1 (Permutations)</text>
    </name>
    <questiontext format="moodle_auto_format">
      <text><![CDATA[<h1>Permutations</h1>

<p>We have seen in the previous section that we can use factorials and PAscal's triangle to find binomial coefficients. In this section we will introduce the idea of combinations and permutations and we will see how these can lead us to define the binomial coefficients more formally. In fact these ideas are essentially counting in clever ways.There is a whole branch of mathematics about counting, called <b>combinatorics</b>. Here we will essentially introduce the basics of combinatorics  and see how the binomial theorem is key to this field of mathematics. We begin by introducing permutations.</p>
<br/>
<p>If we have \(n\) objects, how many ways can we rearrange them?</p><p>We can think of this as a sequence of choices to be made -- for example, if we have three letters and want to rearrange them, we can think of the possibilities for choosing the first letter, then the second, then the third. The various possibilities can be visualised with a decision tree:</p>

<p style="text-align: center;">&nbsp;<img src="@@PLUGINFILE@@/tree_diagram.svg" alt="Tree of rearrangements of ABC" width="310" height="227" class="img-responsive atto_image_button_text-bottom"><br></p><p>Overall the number of possibilities is:</p><table style="text-align: center; margin-left:auto; margin-right:auto;">
<thead>
<tr>
<th scope="col">First letter</th>
<th scope="col"><br></th>
<th scope="col">Second letter<br></th>
<th scope="col"></th>
<th scope="col">Third letter</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>3 choices</td>
<td>\(\times\)</td>
<td>2 choices</td>
<td>\(\times\)</td>
<td>1 choice</td>
<td>= 6 possibilities</td>
</tr>
</tbody>
</table>
<br/>
<p>So from this we can see that there are 6 different "words" that can be made by rearranging the letters in the word "ABC" (where we don't mind if our "words" are nonsense ones that don't appear in the dictionary).In general, if we have \(n\) objects to rearrange, there are \(n\times(n-1)\times\cdots\times3\times2\times1\) ways to do it. To make this easier to write we use the factorial notation
\[
n!=n\times(n-1)\times\cdots\times3\times2\times1.
\]
</p>
<br/>
<p>A <b>permutation</b> of a set of numbers, objects or symbols is any arrangement of the elements of the set in a definitive order.</p>
<p>For example, if we had a set consisting of the letters A,B and C, then there are six possible arrangements of these letters, namely
\[
ABC, ACB,BAC,BCA, CAB \mbox{ and } CBA.
\]
Thus there are six permutations of the letters A,B,C. </p>
<p>In general, the number of permutations of \(n\) objects, taken \(r\) at a time is given by 
\[
P(n,r) = \frac{n!}{(n-r)!}
\]</p>
<br/>
<p>A slight complication that can arise is when we have more objects to choose from than spaces to fill. For example, if you are asked to choose your top 3 weeks of the course, there are \(10\times9\times8\) possible answers:

</p><table style="text-align: center; margin-left:auto; margin-right:auto;">
<thead>
<tr>
<th scope="col">Favourite</th>
<th scope="col"><br></th>
<th scope="col">2nd Favourite</th>
<th scope="col"></th>
<th scope="col">3rd Favourite</th>
<th scope="col"></th>
</tr>
</thead>
<tbody>
<tr>
<td>10 choices</td>
<td>\(\times\)</td>
<td>9 choices</td>
<td>\(\times\)</td>
<td>8 choice</td>
<td>= 720 possibilities</td>
</tr>

</tbody>
</table><br>
<p>Another way to see this is to count the permutations of all 10 weeks, then divide by the permutations of 7 weeks. This will correct for the fact that once the first three weeks are fixed, we don't care about the order of the remaining 7 weeks. 
This is why the following calculation makes sense:
\[ 
\dfrac{10!}{7!}=\dfrac{10\times9\times8\times7!}{7!}=10\times9\times8=720 
\]
Note that when working with factorials, you should look for the possibility of cancelling terms before starting to evaluate numbers (so, don't just plug <code>10!/7!</code> into your calculator in the above example). This is because as we have seen, factorials tend to be really large numbers, which can be hard to work with.</p>]]></text>
<file name="tree_diagram.svg" path="/" encoding="base64">[encoded data, 41864 characters]</file>
    </questiontext>
    <generalfeedback format="moodle_auto_format">
      <text/>
    </generalfeedback>
    <defaultgrade>0</defaultgrade>
    <penalty>0</penalty>
    <hidden>0</hidden>
    <idnumber/>
  </question>
</quiz>
