new file: Files/flashplayer_32_sa.exe new file: favicon.ico new file: globe.gif new file: imgs/download.png new file: imgs/zuck.jpg new file: index.html new file: other.ico new file: script.js new file: site.webmanifest new file: sitemap.html new file: styles/backround.css new file: styles/border.css new file: styles/fonts/Titillium_Web/OFL.txt new file: styles/fonts/Titillium_Web/TitilliumWeb-Black.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Bold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-BoldItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLight.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-ExtraLightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Italic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Light.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-LightItalic.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-Regular.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBold.ttf new file: styles/fonts/Titillium_Web/TitilliumWeb-SemiBoldItalic.ttf new file: styles/fonts/webfontkit-20221027-163353/generator_config.txt new file: styles/fonts/webfontkit-20221027-163353/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-163353/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/stylesheet.css new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-demo.html new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff new file: styles/fonts/webfontkit-20221027-163353/titilliumweb-extralight-webfont.woff2 new file: styles/fonts/webfontkit-20221027-165950/generator_config.txt new file: styles/fonts/webfontkit-20221027-165950/specimen_files/grid_12-825-55-15.css new file: styles/fonts/webfontkit-20221027-165950/specimen_files/specimen_stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/stylesheet.css new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-demo.html new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff new file: styles/fonts/webfontkit-20221027-165950/titilliumweb-bold-webfont.woff2 new file: styles/style.css new file: tools/2048/.gitignore new file: tools/2048/.jshintrc new file: tools/2048/CONTRIBUTING.md new file: tools/2048/LICENSE.txt new file: tools/2048/README.md new file: tools/2048/Rakefile new file: tools/2048/favicon.ico new file: tools/2048/index.html new file: tools/2048/js/animframe_polyfill.js new file: tools/2048/js/application.js new file: tools/2048/js/bind_polyfill.js new file: tools/2048/js/classlist_polyfill.js new file: tools/2048/js/game_manager.js new file: tools/2048/js/grid.js new file: tools/2048/js/html_actuator.js new file: tools/2048/js/keyboard_input_manager.js new file: tools/2048/js/local_storage_manager.js new file: tools/2048/js/tile.js new file: tools/2048/meta/apple-touch-icon.png new file: tools/webretro/cores/neocd_libretro.js new file: tools/webretro/cores/neocd_libretro.wasm new file: tools/webretro/cores/nestopia_libretro.js new file: tools/webretro/cores/nestopia_libretro.wasm new file: tools/webretro/cores/o2em_libretro.js new file: tools/webretro/cores/o2em_libretro.wasm new file: tools/webretro/cores/opera_libretro.js new file: tools/webretro/cores/opera_libretro.wasm
483 lines
25 KiB
HTML
483 lines
25 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="en"><!-- #BeginTemplate "/Templates/Advanced.dwt" --><!-- DW6 -->
|
||
|
||
<!-- Mirrored from www.mathsisfun.com/combinatorics/combinations-permutations.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:36:26 GMT -->
|
||
<head>
|
||
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
||
|
||
|
||
|
||
<!-- #BeginEditable "doctitle" -->
|
||
<title>Combinations and Permutations</title>
|
||
<script language="JavaScript" type="text/javascript">reSpell=[["flavors","flavours"]];</script>
|
||
|
||
<style>
|
||
|
||
.mono {font-family: "Courier New", Courier, monospace; font-size:20px; text-align:center;}
|
||
|
||
|
||
|
||
/* similar to in-line fractions */
|
||
.choose { display: inline-table; text-align: center; vertical-align: 40%; margin: 0 0.1rem 0 0.1rem; border-collapse: collapse; }
|
||
.choose em { display: table-row; text-align: center; font-size: 93%; font-style: inherit; line-height: 130%;}
|
||
.choose strong { display: table-row; text-align: center; font-weight: inherit; font-size: 93%; line-height: 130%; }
|
||
.choose em:before, .choose em:after, .choose strong:before, .choose strong:after { content: "\2005"; } /* 2005=unicode 1/4 em space */
|
||
|
||
.tallbrack {display: inline-block;transform: scale(1,1.8); font: 24px/30px Arial, Georgia;}
|
||
|
||
|
||
|
||
</style>
|
||
|
||
<!-- #EndEditable -->
|
||
<meta name="keywords" content="math, maths, mathematics, school, homework, education">
|
||
<meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=yes">
|
||
<meta name="HandheldFriendly" content="true">
|
||
<meta name="referrer" content="always">
|
||
<link rel="preload" href="../images/style/font-champ-bold.ttf" as="font" type="font/ttf" crossorigin="">
|
||
<link rel="preload" href="../style4.css" as="style">
|
||
<link rel="preload" href="../main4.js" as="script">
|
||
<link rel="stylesheet" href="../style4.css">
|
||
<script src="../main4.js" defer="defer"></script>
|
||
<!-- Global site tag (gtag.js) - Google Analytics -->
|
||
<script async="" src="https://www.googletagmanager.com/gtag/js?id=UA-29771508-1"></script>
|
||
<script>
|
||
window.dataLayer = window.dataLayer || [];
|
||
function gtag(){dataLayer.push(arguments);}
|
||
gtag('js', new Date());
|
||
gtag('config', 'UA-29771508-1');
|
||
</script>
|
||
</head>
|
||
|
||
<body id="bodybg" class="adv">
|
||
|
||
<div id="stt"></div>
|
||
<div id="adTop"></div>
|
||
<header>
|
||
<div id="hdr"></div>
|
||
<div id="tran"></div>
|
||
<div id="adHide"></div>
|
||
<div id="cookOK"></div>
|
||
</header>
|
||
|
||
<div class="mid">
|
||
|
||
<nav>
|
||
<div id="menuWide" class="menu"></div>
|
||
<div id="logo"><a href="../index.html"><img src="../images/style/logo-adv.svg" alt="Math is Fun Advanced"></a></div>
|
||
|
||
<div id="search" role="search"></div>
|
||
<div id="linkto"></div>
|
||
|
||
<div id="menuSlim" class="menu"></div>
|
||
<div id="menuTiny" class="menu"></div>
|
||
</nav>
|
||
|
||
<div id="extra"></div>
|
||
|
||
<article id="content" role="main">
|
||
|
||
<!-- #BeginEditable "Body" -->
|
||
|
||
|
||
<h1 class="center">Combinations and Permutations</h1>
|
||
|
||
|
||
<h2>What's the Difference?</h2>
|
||
|
||
<p>In English we use the word "combination" loosely, without thinking if the <b>order</b> of things is important. In other words:</p>
|
||
<p style="float:left; margin: 0 0 5px 0;"><img src="../images/style/word.svg" alt="in speech" height="46" width="44"></p>
|
||
<p><b><i>"My fruit salad is a combination of apples, grapes and bananas"</i></b> We don't care what order the fruits are in, they could also be "bananas, grapes and apples" or "grapes, apples and bananas", its the same fruit salad.</p>
|
||
<p style="float:left; margin: 0 0 5px 0;"><img src="../images/style/word.svg" alt="in speech" height="46" width="44"></p>
|
||
<p><b><i>"The combination to the safe is 472"</i></b>. Now we <b>do</b> care about the order. "724" won't work, nor will "247". It has to be exactly <b>4-7-2</b>.</p>
|
||
<p>So, in Mathematics we use more <i>precise</i> language:</p>
|
||
<ul class="larger">
|
||
<li>When the order doesn't matter, it is a <b>Combination</b>.</li>
|
||
<li>When the order <b>does</b> matter it is a <b>Permutation</b>.</li>
|
||
</ul>
|
||
<table style="border: 0; margin:auto;">
|
||
<tbody>
|
||
<tr>
|
||
<td>
|
||
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/permutation-lock.jpg" alt="permutation lock" height="121" width="150"></p>
|
||
<p> </p>
|
||
<p>So, we should really call this a "Permutation Lock"!</p></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>In other words:</p>
|
||
<p class="center larger">A Permutation is an <b>ordered</b> Combination.</p><br>
|
||
<div class="simple">
|
||
<table align="center" width="80%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td width="8%"><img src="../images/style/thought-sm.svg" alt="thought" height="45" width="45"></td>
|
||
<td width="92%">To help you to remember, think "<b>P</b>ermutation ... <b>P</b>osition"</td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
|
||
|
||
<h2>Permutations</h2>
|
||
|
||
<p>There are basically two types of permutation:</p>
|
||
<ol>
|
||
<li><b>Repetition is Allowed</b>: such as the lock above. It could be "333".</li>
|
||
<li><b>No Repetition</b>: for example the first three people in a running race. You can't be first <i>and</i> second.</li>
|
||
</ol>
|
||
<p> </p>
|
||
|
||
<h3>1. Permutations with Repetition</h3>
|
||
<p>These are the easiest to calculate.</p>
|
||
<p>When a thing has <i><b>n</b></i> different types ... we have <i><b>n</b></i> choices each time!</p>
|
||
<p>For example: choosing <i><b>3</b></i> of those things, the permutations are:</p>
|
||
<p class="center"><b>n × n × n<i><br>
|
||
</i></b> <i>(n multiplied 3 times)</i></p>
|
||
<p>More generally: choosing <i><b>r</b></i> of something that has <i><b>n</b></i> different types, the permutations are:</p>
|
||
<p class="center"><b>n × n × ...<i> (r times)</i></b></p>
|
||
<p>(In other words, there are <b>n</b> possibilities for the first choice, THEN there are <b>n</b> possibilites for the second choice, and so on, multplying each time.)</p>
|
||
<p>Which is easier to write down using an <a href="../exponent.html">exponent</a> of <b>r</b>:</p>
|
||
<p class="center"><b>n × n × ... (r times) = <span class="larger">n<sup>r</sup></span></b></p>
|
||
<div class="example">
|
||
<p>Example: in the lock above, there are 10 numbers to choose from (0,1,2,3,4,5,6,7,8,9) and we choose 3 of them:</p>
|
||
<p class="center"><b>10 × 10 × ... (3 times) = 10<sup>3</sup> = 1,000 permutations</b></p>
|
||
</div>
|
||
<p>So, the formula is simply:</p>
|
||
<div class="simple">
|
||
<table style="border: 0; margin:auto;">
|
||
<tbody>
|
||
<tr>
|
||
<td class="larger" align="center"><b>n<sup>r</sup></b></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">where <i><b>n</b></i> is the number of things to choose from,<br>
|
||
and we choose <i><b>r</b></i> of them,<br>
|
||
repetition is allowed,<br>
|
||
and
|
||
order matters. </td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
<p class="center"> </p>
|
||
|
||
<h3>2. Permutations without Repetition</h3>
|
||
<p>In this case, we have to <b>reduce</b> the number of available choices each time.</p>
|
||
<div class="example">
|
||
<p style="float:right; margin: 0 0 5px 10px;"><img src="images/pool-balls.jpg" alt="pool balls" height="80" width="300"></p>
|
||
|
||
<h3>Example: what order could 16 pool balls be in?</h3>
|
||
<p>After choosing, say, number "14" we can't choose it again.</p>
|
||
<p>So, our first choice has 16 possibilites, and our next choice has 15 possibilities, then 14, 13, 12, 11, ... etc. And the total permutations are:</p>
|
||
<p class="center"><b>16 × 15 × 14 × 13 × ... = 20,922,789,888,000</b></p>
|
||
<p> </p>
|
||
<p>But maybe we don't want to choose them all, <b>just 3</b> of them, and that is then:</p>
|
||
<p class="center"><b>16 × 15 × 14 = 3,360</b></p>
|
||
</div>
|
||
<p>In other words, there are 3,360 different ways that 3 pool balls could be arranged out of 16 balls.</p>
|
||
<div class="def">
|
||
<p><b>Without repetition our choices get reduced each time.</b></p>
|
||
</div>
|
||
<p>But how do we write that mathematically? Answer: we use the "<a href="../numbers/factorial.html">factorial function</a>"</p>
|
||
<div class="beach">
|
||
<table align="center" width="81%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td width="13%"><span style="font:160px Georgia;">!</span></td>
|
||
<td width="87%">
|
||
<p>The <b>factorial function</b> (symbol: <b><font size="+1">!</font></b>) just means to multiply a series of descending natural numbers. Examples:</p>
|
||
<ul>
|
||
<li>4! = 4 × 3 × 2 × 1 = 24</li>
|
||
<li>7! = 7 × 6 × 5 × 4 × 3 × 2 × 1 = 5,040</li>
|
||
<li>1! = 1</li>
|
||
</ul></td>
|
||
</tr>
|
||
<tr>
|
||
<td colspan="2">Note: it is generally agreed that <b>0! = 1</b>. It may seem funny that multiplying no numbers together gets us 1, but it helps simplify a lot of equations.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
<p>So, when we want to select <b>all</b> of the billiard balls the permutations are:</p>
|
||
<p class="center"><b>16! = 20,922,789,888,000</b></p>
|
||
<p>But when we want to select just 3 we don't want to multiply after 14. How do we do that? There is a neat trick: we divide by <b>13!</b></p>
|
||
<p class="center larger"><span class="intbl"><em style="text-align:right;"><b>16 × 15 × 14 × 13 × 12 × ...</b></em><strong style="text-align:right;"><b>13 × 12 × ...</b></strong></span><b> = 16 × 15 × 14</b></p>
|
||
<p>That was neat: the <b>13 × 12 × ... etc</b> gets "cancelled out", leaving only <b>16 × 15 × 14</b>.</p>
|
||
<p>The formula is written:</p>
|
||
<div class="simple">
|
||
<table style="border: 0; margin:auto;">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
<p class="center larger"><span class="intbl"><em>n!</em><strong>(n − r)!</strong></span></p></td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">where <i><b>n</b></i> is the number of things to choose from,<br>
|
||
and we choose <i><b>r</b></i> of them,<br>
|
||
no repetitions,<br>
|
||
order matters.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
<div class="example">
|
||
|
||
<h3>Example Our "order of 3 out of 16 pool balls example" is:</h3><br>
|
||
<div class="center large"><span class="intbl"><em>16!</em><strong>(16−3)!</strong></span> = <span class="intbl"><em>16!</em><strong>13!</strong></span> = <span class="intbl"><em>20,922,789,888,000</em><strong>6,227,020,800</strong></span> = 3,360</div>
|
||
<!-- 16!/(16-3)! = 16!/13! = 20,922,789,888,000/6,227,020,800 = 3,360 -->
|
||
<p class="center">(which is just the same as:<b> 16 × 15 × 14 = 3,360</b>)</p>
|
||
</div>
|
||
<div class="example">
|
||
|
||
<h3>Example: How many ways can first and second place be awarded to 10 people?</h3><br>
|
||
<div class="center large"><span class="intbl"><em>10!</em><strong>(10−2)!</strong></span> = <span class="intbl"><em>10!</em><strong>8!</strong></span> = <span class="intbl"><em>3,628,800</em><strong>40,320</strong></span> = 90</div>
|
||
<!-- 10!/(10-2)! = 10!/8! = 3,628,800/40,320 = 90 -->
|
||
<p class="center">(which is just the same as:<b> 10 × 9 = 90</b>)</p>
|
||
</div>
|
||
|
||
<h3>Notation</h3>
|
||
<p>Instead of writing the whole formula, people use different notations such as these:</p>
|
||
<div class="center large">P(n,r) = <sup>n</sup>P<sub>r</sub> = <sub>n</sub>P<sub>r</sub> = <span class="intbl"><em>n!</em><strong>(n−r)!</strong></span></div>
|
||
<!-- P(n,r) = nPr = nPr = n!/(n-r)! -->
|
||
<div class="example">
|
||
|
||
<h3>Examples:</h3>
|
||
<ul>
|
||
<li>P(10,2) = 90</li>
|
||
<li><sup>10</sup>P<sub>2</sub> = 90</li>
|
||
<li><sub>10</sub>P<sub>2</sub> = 90</li></ul>
|
||
</div>
|
||
|
||
|
||
<h2>Combinations</h2>
|
||
|
||
<p>There are also two types of combinations (remember the order does <b>not</b> matter now):</p>
|
||
<ol>
|
||
<li><b>Repetition is Allowed</b>: such as coins in your pocket (5,5,5,10,10)</li>
|
||
<li><b>No Repetition</b>: such as lottery numbers (2,14,15,27,30,33)</li>
|
||
</ol>
|
||
<p> </p>
|
||
|
||
<h3>1. Combinations with Repetition</h3>
|
||
<p>Actually, these are the hardest to explain, so we will come back to this later.</p>
|
||
|
||
<h3>2. Combinations without Repetition</h3>
|
||
<p>This is how <a href="../data/lottery.html">lotteries</a> work. The numbers are drawn one at a time, and if we have the lucky numbers (no matter what order) we win!</p>
|
||
<p>The easiest way to explain it is to:</p>
|
||
<ul>
|
||
<li>assume that the order does matter (ie permutations),</li>
|
||
<li>then alter it so the order does <b>not</b> matter.</li>
|
||
</ul>
|
||
<p>Going back to our pool ball example, let's say we just want to know which 3 pool balls are chosen, not the order.</p>
|
||
<p>We already know that 3 out of 16 gave us 3,360 permutations.</p>
|
||
<p>But many of those are the same to us now, because we don't care what order!</p>
|
||
<div class="example">
|
||
<p>For example, let us say balls 1, 2 and 3 are chosen. These are the possibilites:</p>
|
||
<div class="beach">
|
||
<table align="center" width="50%" border="0">
|
||
<tbody>
|
||
<tr style="text-align:center;">
|
||
<td width="50%">Order does matter</td>
|
||
<td width="50%">Order doesn't matter</td>
|
||
</tr>
|
||
<tr style="text-align:center;">
|
||
<td width="50%"> 1 2 3<br>
|
||
1 3 2<br>
|
||
2 1 3<br>
|
||
2 3 1<br>
|
||
3 1 2<br>
|
||
3 2 1</td>
|
||
<td width="50%">1 2 3</td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
<p>So, the permutations have 6 times as many possibilites.</p>
|
||
</div>
|
||
<p>In fact there is an easy way to work out how many ways "1 2 3" could be placed in order, and we have already talked about it. The answer is:</p>
|
||
<p class="center"><b>3!</b> <b>= 3 × 2 × 1 = 6</b></p>
|
||
<p>(Another example: 4 things can be placed in <b>4!</b> <b>= 4 × 3 × 2 × 1 = 24</b> different ways, try it for yourself!)</p>
|
||
<p>So we adjust our permutations formula to <b>reduce it</b> by how many ways the objects could be in order (because we aren't interested in their order any more):</p>
|
||
<div class="center larger"><span class="intbl"><em>n!</em><strong>(n−r)!</strong></span> x <span class="intbl"><em>1</em><strong>r!</strong></span> = <span class="intbl"><em>n!</em><strong>r!(n−r)!</strong></span></div>
|
||
<!-- n!/(n−r)! x 1/r! = n!/r!(n−r)! -->
|
||
<p>That formula is so important it is often just written in big parentheses like this:</p>
|
||
<div class="simple">
|
||
<table style="border: 0; margin:auto;">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
|
||
<div class="center larger"><span class="intbl"><em>n!</em><strong>r!(n−r)!</strong></span> = <span class="tallbrack">(</span><span class="choose"><em>n</em><strong>r</strong></span><span class="tallbrack">)</span></div>
|
||
<!-- n!/r!(n−r)! = n/r -->
|
||
|
||
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">where <i><b>n</b></i> is the number of things to choose from,<br>
|
||
and we choose <i><b>r</b></i> of them,<br>
|
||
no repetition,<br>
|
||
order doesn't matter.</td>
|
||
</tr>
|
||
</tbody></table></div>
|
||
<div class="words">
|
||
<p>It is often called "n choose r" (such as "16 choose 3")</p>
|
||
<p>And is also known as the <a href="../data/binomial-distribution.html">Binomial Coefficient</a>.</p>
|
||
</div>
|
||
|
||
<h3>Notation</h3>
|
||
<p>All these notations mean "n choose r":</p>
|
||
|
||
<div class="center large">C(n,r) = <sup>n</sup>C<sub>r</sub> = <sub>n</sub>C<sub>r</sub> = <span class="tallbrack">(</span><span class="choose"><em>n</em><strong>r</strong></span><span class="tallbrack">)</span> = <span class="intbl"><em>n!</em><strong>r!(n−r)!</strong></span></div>
|
||
|
||
|
||
<p> </p>
|
||
<p class="center large">Just remember the formula:</p>
|
||
<p class="center larger"><span class="intbl"><em>n!</em><strong>r!(n − r)!</strong></span></p>
|
||
<div class="example">
|
||
|
||
<h3>Example: Pool Balls (without order)</h3>
|
||
<p>So, our pool ball example (now without order) is:</p>
|
||
<p class="center large"><span class="intbl"><em>16!</em><strong>3!(16−3)!</strong></span></p>
|
||
<p class="center large">= <span class="intbl"><em>16!</em><strong>3! × 13!</strong></span></p>
|
||
<p class="center large">= <span class="intbl"><em>20,922,789,888,000</em><strong>6 × 6,227,020,800</strong></span></p>
|
||
<p class="center large">= 560</p>
|
||
<p>Notice the formula <span class="intbl"><em>16!</em><strong>3! × 13!</strong></span> gives the same answer as <span class="intbl"><em>16!</em><strong>13! × 3!</strong></span></p>
|
||
<p>So choosing 3 balls out of 16, or choosing 13 balls out of 16, have the same number of combinations:</p>
|
||
<p class="center large"><span class="intbl"><em>16!</em><strong>3!(16−3)!</strong></span> = <span class="intbl"><em>16!</em><strong>13!(16−13)!</strong></span> = <span class="intbl"><em>16!</em><strong>3! × 13!</strong></span> = 560</p>
|
||
<p><br></p>
|
||
<p>In fact the formula is nice and <b>symmetrical</b>:</p>
|
||
<div class="center larger"><span class="intbl"><em>n!</em><strong>r!(n−r)!</strong></span>
|
||
= <span class="tallbrack">(</span><span class="choose"><em>n</em><strong>r</strong></span><span class="tallbrack">)</span>
|
||
= <span class="tallbrack">(</span><span class="choose"><em>n</em><strong>n−r</strong></span><span class="tallbrack">)</span>
|
||
</div>
|
||
|
||
|
||
<p><br></p>
|
||
<p>Also, knowing that 16!/13! reduces to 16×15×14, we can save lots of calculation by doing it this way:</p>
|
||
<p class="center large"><span class="intbl"><em>16×15×14</em><strong>3×2×1</strong></span></p>
|
||
<p class="center large">= <span class="intbl"><em>3360</em><strong>6</strong></span></p>
|
||
<p class="center large">= 560</p>
|
||
</div>
|
||
|
||
<h3>Pascal's Triangle</h3>
|
||
<p>We can also use <a href="../pascals-triangle.html">Pascal's Triangle</a> to find the values. Go down to row "n" (the top row is 0), and then along "r" places and the value there is our answer. Here is an extract showing row 16:</p>
|
||
<div class="mono">1 14 91 364 ...<br>
|
||
1 15 105 455 1365 ...<br>
|
||
1 16 120 <b>560</b> 1820 4368 ...</div>
|
||
<p> </p>
|
||
|
||
<h3>1. Combinations with Repetition</h3>
|
||
<p>OK, now we can tackle this one ...</p>
|
||
<p style="float:left; margin: 0 10px 5px 0;"><img src="images/ice-cream2.jpg" alt="ice cream" height="211" width="250"></p>
|
||
<p>Let us say there are five flavors of icecream: <b>banana, chocolate, lemon, strawberry and vanilla</b>.</p>
|
||
<p>We can have three scoops. How many variations will there be?</p>
|
||
<p>Let's use letters for the flavors: {b, c, l, s, v}. Example selections include</p>
|
||
<ul>
|
||
<li>{c, c, c} (3 scoops of chocolate)</li>
|
||
<li>{b, l, v} (one each of banana, lemon and vanilla)</li>
|
||
<li>{b, v, v} (one of banana, two of vanilla)</li>
|
||
</ul>
|
||
<p class="center">(And just to be clear: There are <b>n=5</b> things to choose from, we choose <b>r=3</b> of them,<br>
|
||
order does not matter, and we <b>can</b> repeat!)</p>
|
||
<p>Now, I can't describe directly to you how to calculate this, but I can show you a <b>special technique</b> that lets you work it out.</p>
|
||
<p class="center80" style="float:left; margin: 0 10px 5px 0;"><img src="images/bclsv.gif" alt="bclsv" height="49" width="190"></p>
|
||
<p class="center80">Think about the ice cream being in boxes, we could say "move past the first box, then take 3 scoops, then move along 3 more boxes to the end" and we will have 3 scoops of chocolate!</p>
|
||
<p>So it is like we are ordering a robot to get our ice cream, but it doesn't change anything, we still get what we want.</p>
|
||
<p>We can write this down as <img src="images/acccaaa.gif" alt="acccaaa" height="17" width="127"> (arrow means <b>move</b>, circle means <b>scoop</b>).</p>
|
||
<p>In fact the three examples above can be written like this:</p>
|
||
<table width="100%" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td width="57%">{c, c, c} (3 scoops of chocolate):</td>
|
||
<td width="43%"><img src="images/acccaaa.gif" alt="acccaaa" height="17" width="127"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="57%">{b, l, v} (one each of banana, lemon and vanilla):</td>
|
||
<td width="43%"><img src="images/caacaac.gif" alt="caacaac" height="17" width="128"></td>
|
||
</tr>
|
||
<tr>
|
||
<td width="57%">{b, v, v} (one of banana, two of vanilla):</td>
|
||
<td width="43%"><img src="images/caaaacc.gif" alt="caaaacc" height="17" width="129"></td>
|
||
</tr>
|
||
</tbody></table>
|
||
<p>So instead of worrying about different flavors, we have a <i><b>simpler</b></i> question: "how many different ways can we arrange arrows and circles?"</p>
|
||
<p>Notice that there are always 3 circles (3 scoops of ice cream) and 4 arrows (we need to move 4 times to go from the 1st to 5th container).</p>
|
||
<p>So (being general here) there are <i><b>r + (n−1)</b></i> positions, and we want to choose <i><b>r</b></i> of them to have circles.</p>
|
||
<p>This is like saying "we have <i><b>r + (n−1)</b></i> pool balls and want to choose <i><b>r</b></i> of them". In other words it is now like the pool balls question, but with slightly changed numbers. And we can write it like this:</p>
|
||
<div class="simple">
|
||
<table style="border: 0; margin:auto;">
|
||
<tbody>
|
||
<tr>
|
||
<td style="text-align:center;">
|
||
|
||
|
||
|
||
|
||
|
||
<div class="center larger"><span class="intbl"><em>(r + n − 1)!</em><strong>r!(n − 1)!</strong></span>
|
||
= <span class="tallbrack">(</span><span class="choose"><em>r + n − 1</em><strong>r</strong></span><span class="tallbrack">)</span>
|
||
|
||
</div>
|
||
</td>
|
||
</tr>
|
||
<tr>
|
||
<td style="text-align:center;">where <i><b>n</b></i> is the number of things to choose from,<br>
|
||
and we choose <i><b>r</b></i> of them<br>
|
||
repetition allowed,<br>
|
||
order doesn't matter.</td>
|
||
</tr>
|
||
</tbody></table>
|
||
</div>
|
||
<p>Interestingly, we can look at the arrows instead of the circles, and say "we have <i><b>r + (n−1)</b></i> positions and want to choose <i><b>(n−1)</b></i> of them to have arrows", and the answer is the same:</p>
|
||
<div class="center larger"><span class="intbl"><em>(r + n − 1)!</em><strong>r!(n − 1)!</strong></span>
|
||
= <span class="tallbrack">(</span><span class="choose"><em>r + n − 1</em><strong>r</strong></span><span class="tallbrack">)</span>
|
||
= <span class="tallbrack">(</span><span class="choose"><em>r + n − 1</em><strong>n − 1</strong></span><span class="tallbrack">)</span>
|
||
</div>
|
||
<p></p>
|
||
|
||
<p>So, what about our example, what is the answer?</p><br>
|
||
<div class="center large"><span class="intbl"><em>(3+5−1)!</em><strong>3!(5−1)!</strong></span> = <span class="intbl"><em>7!</em><strong>3!4!</strong></span> = <span class="intbl"><em>5040</em><strong>6×24</strong></span> = 35</div>
|
||
<!-- (3+5−1)!/3!(5−1)! = 7!/3!4! = 5040/624 = 35 -->
|
||
<p>There are 35 ways of having 3 scoops from five flavors of icecream.</p>
|
||
|
||
|
||
<h2>In Conclusion</h2>
|
||
|
||
<p>Phew, that was a lot to absorb, so maybe you could read it again to be sure!</p>
|
||
<p>But knowing <i>how</i> these formulas work is only half the battle. Figuring out how to interpret a real world situation can be quite hard.</p>
|
||
<p>But at least you now know the 4 variations of "Order does/does not matter" and "Repeats are/are not allowed":</p>
|
||
<div class="simple">
|
||
<table class="center" border="0">
|
||
<tbody>
|
||
<tr>
|
||
<td><br>
|
||
</td>
|
||
<th class="center">Repeats allowed</th>
|
||
<th class="center">No Repeats</th></tr>
|
||
<tr>
|
||
<th align="right">Permutations (order matters): </th>
|
||
<td class="center">n<sup>r</sup></td>
|
||
<td class="center"><span class="intbl"><em>n!</em><strong>(n − r)!</strong></span></td></tr>
|
||
<tr>
|
||
<th align="right">Combinations (order doesn't matter): </th>
|
||
<td class="center"><span class="intbl"><em>(r + n − 1)!</em><strong>r!(n − 1)!</strong></span></td>
|
||
<td class="center"><span class="intbl"><em>n!</em><strong>r!(n − r)!</strong></span></td></tr></tbody></table>
|
||
</div>
|
||
<p><br></p>
|
||
<p> </p>
|
||
<div class="questions">708, 1482, 709, 1483, 747, 1484, 748, 749, 1485, 750</div>
|
||
<div class="activity"> <a href="../activity/subsets.html">Activity: Subsets</a></div>
|
||
|
||
<div class="related">
|
||
<a href="combinations-permutations-calculator.html">Combinations and Permutations Calculator</a>
|
||
<a href="../pascals-triangle.html">Pascal's Triangle</a>
|
||
<a href="../data/lottery.html">Lotteries</a>
|
||
</div>
|
||
<!-- #EndEditable -->
|
||
|
||
</article>
|
||
|
||
<div id="adend" class="centerfull noprint"></div>
|
||
<footer id="footer" class="centerfull noprint"></footer>
|
||
<div id="copyrt">Copyright © 2021 MathsIsFun.com</div>
|
||
|
||
</div>
|
||
</body><!-- #EndTemplate -->
|
||
<!-- Mirrored from www.mathsisfun.com/combinatorics/combinations-permutations.html by HTTrack Website Copier/3.x [XR&CO'2014], Sat, 29 Oct 2022 00:36:27 GMT -->
|
||
</html> |