Question 1096350
<font color="black" face="times" size="3">
The note you posted, where you mentioned "<font color=blue>I have considered using methodologies such as assigning a customer name to each sales agent such as assigning customers 1,2,3,4 to agent 1 all the way to 37,38,39,40 to agent 10</font>", is a bit confusing. Why are you counting all the way up to agent 40? There are only ten agents. 


I think you should strike out the "to 37,38,39,40" like so
<font color=blue>I have considered using methodologies such as assigning a customer name to each sales agent such as assigning customers 1,2,3,4 to agent 1 all the way <font color=red><s>to 37,38,39,40</s></font> to agent 10</font>


If you do that, then it would make a lot more sense. Anyways, onto the problem.


-------------------------------------------------------------------------------------------

Part A) 


Imagine we have four empty slots (much like a slot machine) where the agent numbers (1 through 10) can be assigned. Each slot represents a customer. Call these slots A, B, C, and D. 


Slot A: we have 10 choices for this first slot as there are <font color=red>10</font> agents to choose from. 
Slot B: after the first customer (in slot A) chooses their agent, there are 10-1 = <font color=blue>9</font> agents left
Slot C: Similar to the previous slot: we have 9-1 = <font color=green>8</font> choices left
Slot D: Similar to the previous slot: we have 8-1 = <font color=purple>7</font> choices left
Notice we have a countdown going. We start at 10 and stop after counting exactly four items down.


So we have the countdown: <font color=red>10</font>, <font color=blue>9</font>, <font color=green>8</font>, <font color=purple>7</font>. 


Multiply out these four values: 
<font color=red>10</font>*<font color=blue>9</font>*<font color=green>8</font>*<font color=purple>7</font> = 90*56 = 5040


The value 5040 is the final answer to part A. 


An alternative route is to use the nPr permutation formula. Permutations apply to determining how many ways we can arrange a group (or subgroup) of items. Order matters. 


Here we have n = 10 as our overall sample size and r = 4 as the selection size
Plug those values into the nPr formula below to get...


nPr = (n!)/((n-r)!)
10P4 = (10!)/((10-4)!)
10P4 = (10!)/(6!)
10P4 = (10*9*8*7*6!)/(6!)
10P4 = 10*9*8*7 .... notice how the "6!" terms cancel
10P4 = 5040


and we get the same result as before (5040)


Side Note 1: The exclamation mark means factorial indicating we start at the given value and count our way down to 1. We multiply all of these values in the countdown (eg: 5! = 5*4*3*2*1 = 120). See the "further reading" section at the bottom of the page for more info about factorials. 


Side Note 2: With expanding out 10!, we could do 10*9*8*7*6*5*4*3*2*1 which is a bit cumbersome. Luckily we can stop at 6 leaving the factorial symbol. That allows for easily cancellation. See the mini proof below for confirmation how this works. 


Side Note 3: 10P4 = 5040 = 7! (A bit curious. I'm not sure if it's a coincidence or something stronger. I'll have to look into it later)



Proof for side note 2 above:
10! = 10*9*8*7*6*5*4*3*2*1
10! = 10*9*8*7*<font color=red>6*5*4*3*2*1</font>
10! = 10*9*8*7*<font color=red>(6*5*4*3*2*1)</font>
10! = 10*9*8*7*<font color=red>(6!)</font>
10! = 10*9*8*7*6!

-------------------------------------------------------------------------------------------

Part B)


Unlike with part A, we now don't care what the order is. For example, the sequence {10,9,8,7} is identical to {7,8,9,10}. Order does not matter. For any group of four items, there are exactly 4! = 4*3*2*1 = 24 ways to arrange the group. This means that we have 24 times more listings than we want. So simply divide the result from part A (5040) by 24 to get: 5040/24 = 210


The answer to part B is 210.


Following the formula path, we can use the nCr combination formula. With combinations order does not matter. 


Side Note: A typical locker is often secured with a "combination" lock, which is a misnomer. It should be called a permutation lock. If it were truly a combination lock (in the context of algebra), then a sequence like "1-2-3" is identical to "3-1-2". However, those sequences are clearly different for purposes of securing valuables.


Use the nCr formula, with n = 10 and r = 4 as before, to get...


n C r = (n!)/(r!(n-r)!)
10 C 4 = (10!)/(4!*(10-4)!)
10 C 4 = (10!)/(4!*6!)
10 C 4 = (10*9*8*7*6!)/(4!*6!)
10 C 4 = (10*9*8*7)/(4!) .... again the "6!" terms cancel
10 C 4 = (10*9*8*7)/(4*3*2*1)
10 C 4 = (5040)/(24)
10 C 4 = 210


We get 210 again. Notice on the second to last step we have (5040)/(24) which confirms the previous line of thinking. The connection between permutations and combinations is such that we simply divide the permutation result by r! (r factorial) to get the combination value we want. In other words


n C r = (n P r)/(r!)
10 C 4 = (10 P 4)/(4!)
10 C 4 = (5040)/(24)
10 C 4 = 210


-------------------------------------------------------------------------------------------
-------------------------------------------------------------------------------------------


In summary:


The answer to part A is <font color=red size=4>5040</font>
The answer to part B is <font color=red size=4>210</font>


-----------------------

Further Reading (optional but encouraged)
<ul>
<li>Article about the factorial function.
Page Source: <a href="https://www.mathsisfun.com/numbers/factorial.html">https://www.mathsisfun.com/numbers/factorial.html</a></li>
<li>Article about combinations, permutations, and similar topics. The general concepts are explained, some handy examples are discussed, and formulas are mentioned as well.
Page Source: <a href = http://www.mathsisfun.com/combinatorics/combinations-permutations.html>http://www.mathsisfun.com/combinatorics/combinations-permutations.html</a></li>
<li>A handy factorial calculator to help check your work. It also lists out all the possible ways to order a group of items. Be warned: if you have too large a sample size, then you'll be overwhelmed with outcomes. Such large listings might slow down your computer. Fortunately you have the option to skip over that portion.
Page Source: <a href="https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html">https://www.mathsisfun.com/combinatorics/combinations-permutations-calculator.html</a></li>
</ul>All of the articles are from the same website. They all connect and link together in some way. So (in hindsight) it probably only makes sense to just post one link. However I'll leave it as it is for you to explore. </font>