@@ -5,14 +5,14 @@ When the order doesn't matter, it is a **Combination**.
5
5
When the order ** does** matter it is a ** Permutation** .
6
6
7
7
** "My fruit salad is a combination of apples, grapes and bananas"**
8
- We don't care what order the fruits are in, they could also be
9
- "bananas, grapes and apples" or "grapes, apples and bananas",
8
+ We don't care what order the fruits are in, they could also be
9
+ "bananas, grapes and apples" or "grapes, apples and bananas",
10
10
its the same fruit salad.
11
11
12
12
## Combinations without repetitions
13
13
14
- This is how lotteries work. The numbers are drawn one at a
15
- time, and if we have the lucky numbers (no matter what order)
14
+ This is how lotteries work. The numbers are drawn one at a
15
+ time, and if we have the lucky numbers (no matter what order)
16
16
we win!
17
17
18
18
No Repetition: such as lottery numbers ` (2,14,15,27,30,33) `
@@ -30,12 +30,12 @@ It is often called "n choose r" (such as "16 choose 3"). And is also known as th
30
30
31
31
Repetition is Allowed: such as coins in your pocket ` (5,5,5,10,10) `
32
32
33
- Or let us say there are five flavours of ice cream:
33
+ Or let us say there are five flavours of ice cream:
34
34
` banana ` , ` chocolate ` , ` lemon ` , ` strawberry ` and ` vanilla ` .
35
35
36
36
We can have three scoops. How many variations will there be?
37
37
38
- Let's use letters for the flavours: ` {b, c, l, s, v} ` .
38
+ Let's use letters for the flavours: ` {b, c, l, s, v} ` .
39
39
Example selections include:
40
40
41
41
- ` {c, c, c} ` (3 scoops of chocolate)
@@ -46,23 +46,21 @@ Example selections include:
46
46
47
47
![ Formula] ( https://www.mathsisfun.com/combinatorics/images/combinations-repeat.gif )
48
48
49
- Where ` n ` is the number of things to choose from, and we
50
- choose ` r ` of them. Repetition allowed,
49
+ Where ` n ` is the number of things to choose from, and we
50
+ choose ` r ` of them. Repetition allowed,
51
51
order doesn't matter.
52
52
53
- ## Cheat Sheets
53
+ ## Cheatsheet
54
54
55
- Permutations cheat sheet
55
+ ![ Permutations and Combinations Overview ] ( ./images/overview.png )
56
56
57
- ![ Permutations Cheat Sheet ] ( https://cdn- images-1.medium.com/max/2000/1*JNK-n0Pt0Vbxk0lxVpgT5A.png )
57
+ ![ Combinations overview ] ( ./ images/combinations-overview.jpg )
58
58
59
- Combinations cheat sheet
59
+ | | |
60
+ | --- | --- |
61
+ | ![ Combinations with repetition] ( ./images/combinations-with-repetitions.jpg ) | ![ Combinations without repetition] ( ./images/combinations-without-repetitions.jpg ) |
60
62
61
- ![ Combinations Cheat Sheet] ( https://cdn-images-1.medium.com/max/2000/1*7cFRn8jW4g_91YgDAbmxRQ.png )
62
-
63
- Permutations/combinations algorithm ideas.
64
-
65
- ![ Algorithms Idea] ( https://cdn-images-1.medium.com/max/2000/1*vLsSsZMnesCFPCYTYMbxrQ.png )
63
+ * Made with [ okso.app] ( https://okso.app ) *
66
64
67
65
## References
68
66
0 commit comments