Chapterبەش 4 · Lectureوانە 4.3

Counting and Permutationsژماردن و گۆڕینەکان

How to count outcomes without listing them: the multiplication principle (with tree diagrams and dependent choices), factorials and why zero factorial is 1, permutations with and without repetition, round tables, repeated letters such as STATISTICS, and what counting says about passwords and transposition ciphers.

چۆن بژمێریت بێ ئەوەی بیاننووسیت: (لەگەڵ و هەڵبژاردنی گرێدراو)، و بۆچی سفر 1ـە، بە دووبارەبوونەوە و بەبێ دووبارەبوونەوە، مێزی خڕ و پیتی دووبارەی وەک STATISTICS. لە کۆتاییدا دەبینیت ژماردن چی دەربارەی و دەڵێت.

19 min read21 خولەک خوێندنەوە · 20 stepsهەنگاو

What you will learnچی فێر دەبیت

  • Use the multiplication principle, and add separate cases when one choice limits another.
  • Compute n!n!, explain why 0!=10! = 1, and count arrangements with nPr{}^{n}P_{r} and nrn^r.
  • Count seatings around a round table and arrangements of objects that look the same.
  • Explain, with counting, why long random passwords are strong and why a transposition cipher alone is weak.
  • بەکار بهێنیت و کاتێک هەڵبژاردنێک هەڵبژاردنێکی تر سنووردار دەکات حاڵەتە جیاکان کۆ بکەیتەوە.
  • n!n! حیساب بکەیت، ڕوون بکەیتەوە بۆچی 0!=10! = 1 و ڕیزکردنەکان بە nPr{}^{n}P_{r} و nrn^r بژمێریت.
  • دانیشتن لە دەوری مێزی خڕ و ڕیزکردنی شتی وەک یەک بژمێریت.
  • بە ژماردن ڕوون بکەیتەوە بۆچی درێژ و هەڕەمەکی بەهێزن و بۆچی بە تەنها لاوازە.

The multiplication principleیاسای بنەڕەتی ژماردن

A probability is a count divided by a count: P(A)=n(A)/n(S)P(A) = n(A)/n(S). Listing every outcome works for a coin or a die, but 7 people can stand in a queue in 5,040 different orders, and nobody wants to write those down. Counting rules give the number without listing. The first one, and the base of all the others, is the multiplication principle:

ژمارەیەکە دابەشکراو بە ژمارەیەکی تر: P(A)=n(A)/n(S)P(A) = n(A)/n(S). نووسینی هەموو بۆ دراوێک یان بەردەزارێک کار دەکات، بەڵام 7 کەس بە ⁦5,040⁩ ڕیزبەندیی جیاواز دەتوانن لە ڕیزێکدا ڕابوەستن و کەس نایەوێت ئەوانە بنووسێت. یاساکانی ژماردن ژمارەکە دەدەن بێ نووسینی هەموو حاڵەتەکان. یەکەمیان، کە بنەمای هەموو ئەوانی ترە، :

m×nm \times n

If a first choice can be made in mm ways and, after it, a second choice in nn ways, then the two choices together can be made in m×nm \times n ways. With more steps, keep multiplying.

گەر هەڵبژاردنی یەکەم بە mm ڕێگا بکرێت و دوای ئەو هەڵبژاردنی دووەم بە nn ڕێگا، ئەوا هەردوو هەڵبژاردنەکە پێکەوە بە m×nm \times n ڕێگا دەکرێن. گەر هەنگاوی زیاتر هەبوو، هەر لێکیان بدە.

Example. You have 3 shirts and 4 pairs of trousers. Each shirt goes with each pair of trousers, so there are 3×4=123 \times 4 = 12 outfits. Picture a grid with one row for each shirt and one column for each pair of trousers: it has 3×43 \times 4 squares, one for every outfit.

نموونە. 3 کراس و 4 پانتۆڵت هەیە. هەر کراسێک لەگەڵ هەر پانتۆڵێک دەگونجێت، بۆیە 3×4=123 \times 4 = 12 جۆرە جلوبەرگت هەیە. تۆڕێک بهێنە بەرچاوت کە بۆ هەر کراسێک ڕیزێک و بۆ هەر پانتۆڵێک ستوونێکی هەیە: 3×43 \times 4 چوارگۆشەی تێدایە، بۆ هەر جلوبەرگێک یەکێک.

Quick checkپشکنینی خێراA café sells 4 kinds of sandwich and 3 drinks. A meal is one sandwich and one drink. How many different meals are there?کافتریایەک 4 جۆر ساندویچ و 3 جۆر خواردنەوە دەفرۆشێت. هەر ژەمێک یەک ساندویچ و یەک خواردنەوەیە. چەند ژەمی جیاواز هەیە؟

The multiplication principleیاسای بنەڕەتی ژماردن

More steps: a tree diagramهەنگاوی زیاتر: هێڵکاریی درەختی

A buyer chooses a new car in three steps: 2 body styles (sedan or hatchback), then 5 colours, then 3 models (GL, SS, SL). A tree diagram shows every possible choice as one path from the start to a leaf:

کڕیارێک لە سێ هەنگاودا ئۆتۆمبێلێکی نوێ هەڵدەبژێرێت: 2 شێوەی لەش (سیدان یان هاچباک)، پاشان 5 ڕەنگ، پاشان 3 مۆدێل (GL، SS، SL). هێڵکاریی درەختی هەموو هەڵبژاردنێکی گونجاو وەک یەک ڕێگا لە خاڵی دەستپێکەوە تا گەڵایەک نیشان دەدات:

A tree diagram. The start point branches into Sedan and Hatchback. Sedan branches into five colours: white, black, red, blue and silver. White branches into the three models GL, SS and SL; each other colour is marked with 'times 3'. The hatchback branch is folded up as '5 colours, 3 models each'. At the bottom: 2 × 5 × 3 = 30.هێڵکارییەکی درەختی. خاڵی دەستپێک دەبێتە دوو لق: سیدان و هاچباک. سیدان دەبێتە پێنج ڕەنگ: سپی، ڕەش، سوور، شین و زیوی. سپی دەبێتە سێ مۆدێلی GL، SS و SL؛ لە تەنیشت هەر ڕەنگێکی تر نووسراوە «× 3». لقی هاچباک بە کورتی نووسراوە «5 ڕەنگ، هەریەکە 3 مۆدێل». لە خوارەوە: 2 × 5 × 3 = 30.
Every path from the start to a leaf is one car. Each step multiplies the number of paths.هەر ڕێگایەک لە دەستپێکەوە تا گەڵایەک ئۆتۆمبێلێکە. هەر هەنگاوێک ژمارەی ڕێگاکان لێک دەدات.CêIT

You do not need to draw all 30 leaves: every colour has the same 3 models, and the hatchback branch looks exactly like the sedan branch. So the count is 2×5×3=302 \times 5 \times 3 = 30.

پێویست ناکات هەر ⁦30⁩ گەڵاکە بکێشیت: هەموو ڕەنگێک هەمان 3 مۆدێلی هەیە و لقی هاچباک ڕێک وەک لقی سیدانە. بۆیە ژمارەکە 2×5×3=302 \times 5 \times 3 = 30ـە.

Quick checkپشکنینی خێراA shop sells a phone in 3 sizes and 4 colours, with or without a case (2 options). How many different versions are there?دوکانێک مۆبایلێک بە 3 قەبارە و 4 ڕەنگ دەفرۆشێت، بە بەرگ یان بێ بەرگ (⁦2⁩ هەڵبژاردن). چەند جۆری جیاواز هەیە؟

The multiplication principleیاسای بنەڕەتی ژماردن

When one choice limits anotherکاتێک هەڵبژاردنێک هەڵبژاردنێکی تر سنووردار دەکات

Now suppose the hatchback is not sold in black. The simple product 30 is wrong, because the number of colours now depends on the body style. Split the count into separate cases and add them:

ئێستا وای دابنێ کە هاچباک بە ڕەنگی ڕەش نافرۆشرێت. لێکدانی سادەی ⁦30⁩ هەڵەیە، چونکە ئێستا ژمارەی ڕەنگەکان بە شێوەی لەشەکە دەگۆڕێت. ژماردنەکە بکە بە چەند حاڵەتێکی جیا و کۆیان بکەرەوە:

5×3+4×3=15+12=275 \times 3 + 4 \times 3 = 15 + 12 = 27

Sedan: 5 colours, each with 3 models. Hatchback: 4 colours, each with 3 models.

سیدان: 5 ڕەنگ، هەریەکە بە 3 مۆدێل. هاچباک: 4 ڕەنگ، هەریەکە بە 3 مۆدێل.

Quick checkپشکنینی خێراAll 5 colours are back for both body styles, but the GL model is not made in red. How many choices are there now?هەر 5 ڕەنگەکە بۆ هەردوو شێوەی لەش گەڕاونەتەوە، بەڵام مۆدێلی GL بە ڕەنگی سوور دروست ناکرێت. ئێستا چەند هەڵبژاردن هەیە؟

Arranging everything: the factorialڕیزکردنی هەمووان: فاکتۆریێل

In how many orders can A, B and C stand in a row? The first place has 3 choices, the second place has 2 letters left, and the last place has 1: 3×2×1=63 \times 2 \times 1 = 6. Watch all six being listed:

A، B و C بە چەند ڕیزبەندی دەتوانن لە ڕیزێکدا ڕابوەستن؟ شوێنی یەکەم 3 هەڵبژاردنی هەیە، بۆ شوێنی دووەم 2 پیت ماونەتەوە و بۆ دوایین شوێن 1: 3×2×1=63 \times 2 \times 1 = 6. سەیر بکە چۆن هەر شەشیان دەنووسرێن:

Animation: three empty boxes fill with the letters A, B and C in a different order on each frame, and each new order is added to a list on the right: ABC, ACB, BAC, BCA, CAB, CBA. Under the boxes: first place 3 choices, second 2 left, third 1 left. The last frame groups the orders by first letter and shows 3 × 2 × 1 = 3! = 6.
Animation: three empty boxes fill with the letters A, B and C in a different order on each frame, and each new order is added to a list on the right: ABC, ACB, BAC, BCA, CAB, CBA. Under the boxes: first place 3 choices, second 2 left, third 1 left. The last frame groups the orders by first letter and shows 3 × 2 × 1 = 3! = 6.
3 choices, then 2, then 1: six orders in all.3 هەڵبژاردن، پاشان 2، پاشان 1: بە گشتی شەش ڕیزبەندی.CêIT

This kind of product has its own name and sign. n factorial, written n!n!, is the product of all whole numbers from nn down to 1:

ئەم جۆرە لێکدانە ناو و نیشانەی تایبەتی خۆی هەیە. n، کە بە n!n! دەنووسرێت، لێکدانی هەموو ژمارە تەواوەکانە لە nnـەوە تا 1:

n!=n×(n−1)×(n−2)×⋯×2×1n! = n \times (n-1) \times (n-2) \times \cdots \times 2 \times 1

Theorem (1) of the lecture notes: nn different objects can be arranged in a row in n!n! ways. Example (3): 7 people can sit on a row of 7 chairs in 7!=5,0407! = 5{,}040 ways.

⁦(1)⁩ی تێبینییەکانی وانە: nn شتی جیاواز بە n!n! ڕێگا لە ڕیزێکدا ڕیز دەکرێن. نموونەی ⁦(3): 7⁩ کەس بە 7!=5,0407! = 5{,}040 ڕێگا دەتوانن لەسەر ڕیزێک 7 کورسی دابنیشن.

Quick checkپشکنینی خێراIn how many ways can 5 students line up at a bus stop?5 قوتابی بە چەند ڕێگا دەتوانن لە وێستگەی پاس ڕیز ببەستن؟

Arranging everything: the factorialڕیزکردنی هەمووان: فاکتۆریێل

Why zero factorial is 1بۆچی فاکتۆریێلی سفر 1ـە

Factorials grow very fast زۆر خێرا گەورە دەبن
nnnnn!n!n!n!
011
111
222
366
42424
5120120
6720720
75,0405{,}040
840,32040{,}320
9362,880362{,}880
103,628,8003{,}628{,}800

Each row is the row above it times nn: n!=n×(n−1)!n! = n \times (n-1)!. Read the table upwards and divide instead: 3!=24÷4=63! = 24 \div 4 = 6, 2!=6÷3=22! = 6 \div 3 = 2, 1!=2÷2=11! = 2 \div 2 = 1, and one more step gives 0!=1÷1=10! = 1 \div 1 = 1.

هەر ڕیزێک ڕیزی سەرەوەیەتی جارانی nn: n!=n×(n−1)!n! = n \times (n-1)!. خشتەکە بەرەو سەرەوە بخوێنەوە و لە جیاتی لێکدان دابەش بکە: 3!=24÷4=63! = 24 \div 4 = 6، 2!=6÷3=22! = 6 \div 3 = 2، 1!=2÷2=11! = 2 \div 2 = 1 و هەنگاوێکی تر 0!=1÷1=10! = 1 \div 1 = 1 دەدات.

Quick checkپشکنینی خێراWhat is 0!0!?0!0! چەندە؟

Why is 0! = 1?Eddie Woo · Englishئینگلیزی · 23.4M viewsبینین · 662K likesلایک

Why zero factorial equals 1: read the factorial table backwards, dividing by n each time, until you reach 0!.

بۆچی 0!=10! = 1: خشتەی بە پێچەوانەوە بخوێنەوە، هەر جارەی دابەش بە nn بکە، تا دەگەیتە 0!0!.

Arranging some of the objects: permutationsڕیزکردنی هەندێک لە شتەکان: گۆڕینەکان

A permutation is an arrangement in which order matters: gold for Aram and silver for Dilan is a different result from silver for Aram and gold for Dilan. Five runners finish a race. Gold can go to any of the 5, silver to one of the 4 left, and bronze to one of the 3 left:

ڕیزکردنێکە کە تێیدا ڕیزبەندی گرنگە: زێڕ بۆ ئارام و زیو بۆ دیلان ئەنجامێکی جیاوازە لە زیو بۆ ئارام و زێڕ بۆ دیلان. پێنج ڕاکەر پێشبڕکێیەک تەواو دەکەن. زێڕ دەتوانێت بۆ هەر یەک لە 5ـەکە بێت، زیو بۆ یەکێک لەو 4ـەی ماونەتەوە و برۆنز بۆ یەکێک لەو 3ـەی ماونەتەوە:

Three boxes labelled Gold, Silver and Bronze hold the numbers 5, 4 and 3 with multiplication signs between them. Under them: any of the 5; 4 are left; 3 are left. Below: 5 × 4 × 3 = 60.سێ چوارگۆشە بە ناوی زێڕ، زیو و برۆنز ژمارەکانی 5، 4 و 3یان تێدایە و نیشانەی لێکدان لە نێوانیاندایە. لە ژێریانەوە: هەر یەک لە 5؛ 4 ماونەتەوە؛ 3 ماونەتەوە. لە خوارەوە: 5 × 4 × 3 = 60.
Each place has one choice fewer than the place before it.هەر شوێنێک یەک هەڵبژاردنی کەمترە لە شوێنی پێش خۆی.CêIT

Who can win silver depends on who won gold, but the number of candidates for silver is always 4, so the multiplication principle still works. In general, to arrange rr of nn different objects, multiply rr numbers, starting at nn and going down by one:

ئەوەی کێ دەتوانێت زیو ببات بەوە دەگۆڕێت کە کێ زێڕی برد، بەڵام ژمارەی کاندیدەکانی زیو هەمیشە 4ـە، بۆیە هێشتا کار دەکات. بە گشتی، بۆ ڕیزکردنی rr شت لە nn شتی جیاواز، rr ژمارە لێک بدە کە لە nnـەوە دەست پێ دەکەن و یەک یەک کەم دەبنەوە:

nPr=n(n−1)(n−2)⋯(n−r+1)=n!(n−r)!{}^{n}P_{r} = n(n-1)(n-2)\cdots(n-r+1) = \frac{n!}{(n-r)!}

Dividing by (n−r)!(n-r)! cancels the factors we do not need: 5!2!=5×4×3×2×12×1=60\frac{5!}{2!} = \frac{5 \times 4 \times 3 \times 2 \times 1}{2 \times 1} = 60. The lecture notes write PrnP_r^n; other books write P(n,r)P(n, r). Without repetition, r≤nr \le n.

دابەشکردن بە (n−r)!(n-r)! ئەو لێکدەرانە لادەبات کە پێویستمان پێیان نییە: 5!2!=5×4×3×2×12×1=60\frac{5!}{2!} = \frac{5 \times 4 \times 3 \times 2 \times 1}{2 \times 1} = 60. تێبینییەکانی وانە PrnP_r^n دەنووسن و کتێبی تر P(n,r)P(n, r). بەبێ دووبارەبوونەوە، r≤nr \le n.

Quick checkپشکنینی خێراCompute 6P2{}^{6}P_{2}.6P2{}^{6}P_{2} حیساب بکە.

Arranging some of the objects: permutationsڕیزکردنی هەندێک لە شتەکان: گۆڕینەکان

Three examples of permutationsسێ نموونەی گۆڕین

Example (1). How many 2-letter "words" (any order of letters, real word or not) can be made from a, b, c, d without using a letter twice? 4P2=4!2!=242=12{}^{4}P_{2} = \frac{4!}{2!} = \frac{24}{2} = 12. Here they all are:

نموونەی ⁦(1)⁩. چەند «وشە»ی دوو پیتی (پیتەکان بە هەر ڕیزبەندییەک، وشەی ڕاستەقینە بێت یان نا) لە a، b، c، d دروست دەکرێت بەبێ ئەوەی پیتێک دوو جار بەکار بێت؟ 4P2=4!2!=242=12{}^{4}P_{2} = \frac{4!}{2!} = \frac{24}{2} = 12. ئەمە هەموویانن:

4 choices for the first letter, then 3 for the second: 12 words4 هەڵبژاردن بۆ پیتی یەکەم، پاشان 3 بۆ دووەم: ⁦12⁩ وشە
First letterپیتی یەکەمWordsوشەکان
aab ac ad
bba bc bd
cca cb cd
dda db dc
  • Example (2). 3 books out of 9 are arranged on a shelf: 9P3=9×8×7=504{}^{9}P_{3} = 9 \times 8 \times 7 = 504.
  • Three of five letters. Put 3 of the letters A, B, C, D, E in a row: 5P3=5!(5−3)!=60{}^{5}P_{3} = \frac{5!}{(5-3)!} = 60. If only which 3 letters matters, and not their order, the answer is 10: that is a selection, taught in Combinations.
  • نموونەی ⁦(2)⁩. 3 کتێب لە 9 کتێب لەسەر ڕەفەیەک ڕیز دەکرێن: 9P3=9×8×7=504{}^{9}P_{3} = 9 \times 8 \times 7 = 504.
  • سێ پیت لە پێنج. 3 لە پیتەکانی A، B، C، D، E لە ڕیزێکدا دابنێ: 5P3=5!(5−3)!=60{}^{5}P_{3} = \frac{5!}{(5-3)!} = 60. گەر تەنها گرنگ بێت کام 3 پیت هەڵدەبژێردرێن، نەک ڕیزبەندییان، وەڵامەکە ⁦10⁩ـە: ئەمە هەڵبژاردنە و لە وانەی گونجێنەکاندا دەخوێندرێت.
Quick checkپشکنینی خێراA club of 30 members elects a president, a secretary and a treasurer (three different people). In how many ways can this be done?یانەیەکی ⁦30⁩ ئەندامی سەرۆک، سکرتێر و گەنجینەدارێک هەڵدەبژێرێت (سێ کەسی جیاواز). بە چەند ڕێگا ئەمە دەکرێت؟

When repeats are allowedکاتێک دووبارەبوونەوە ڕێگەپێدراوە

So far each object could be used only once (without replacement). If an object can be used again (with replacement, also called with repetition), every place has all nn choices again, and the multiplication principle gives:

تا ئێستا هەر شتێک تەنها یەک جار بەکار دەهات (). گەر شتێک بتوانێت دووبارە بەکار بێتەوە (، یان بە دووبارەبوونەوە)، هەر شوێنێک دیسان هەموو nn هەڵبژاردنەکەی هەیە و دەدات:

n×n×⋯×n=nrn \times n \times \cdots \times n = n^r

rr places, nn choices in each.

rr شوێن، لە هەر یەکێکیاندا nn هەڵبژاردن.

Example (4). How many 2-digit numbers can be made from the digits 2, 5, 7, 8, 9 if a digit may repeat? 52=255^2 = 25. Without repetition it would be 5P2=5×4=20{}^{5}P_{2} = 5 \times 4 = 20: the 5 extra numbers are 22, 55, 77, 88 and 99.

نموونەی ⁦(4)⁩. چەند ژمارەی دوو ڕەقەمی لە ڕەقەمەکانی 2، 5، 7، 8، 9 دروست دەکرێت گەر ڕەقەمێک بتوانێت دووبارە بێتەوە؟ 52=255^2 = 25. بەبێ دووبارەبوونەوە دەبوو بە 5P2=5×4=20{}^{5}P_{2} = 5 \times 4 = 20: 5 ژمارە زیادەکە بریتین لە ⁦22⁩، ⁦55⁩، ⁦77⁩، ⁦88⁩ و ⁦99⁩.

Quick checkپشکنینی خێراA bike lock has 4 wheels, each with the digits 0 to 9. How many codes are possible?قوفڵێکی پاسکیل 4 بازنەی هەیە و هەر یەکەیان ڕەقەمەکانی 0 تا 9ی لەسەرە. چەند کۆد دەگونجێت؟

Around a round tableلە دەوری مێزێکی خڕ

Five friends sit at a round table. Only who sits next to whom matters: if everyone moves one seat to the right, it is still the same seating. Each seating is therefore counted 5 times among the 5!5! row orders, once for each turn, so divide by 5. Or fix one person and arrange the other 4 around them:

پێنج هاوڕێ لە دەوری مێزێکی خڕ دادەنیشن. تەنها ئەوە گرنگە کێ لە تەنیشت کێ دادەنیشێت: گەر هەموو کەس یەک کورسی بەرەو ڕاست بجووڵێت، هێشتا هەمان دانیشتنە. بۆیە هەر دانیشتنێک لەناو 5!5! ڕیزبەندییەکەی ڕیزدا 5 جار ژمێردراوە، بۆ هەر سووڕانەوەیەک جارێک، بۆیە دابەشی بکە بە 5. یان یەک کەس جێگیر بکە و 4 کەسەکەی تر لە دەوری ئەو ڕیز بکە:

Two round tables with the seats A, B, C, D, E. On the right table everyone has moved one seat clockwise; an arrow between the tables says everyone moves one seat. Below: each person keeps the same neighbours, so fix one person and arrange the other 4: (5 − 1)! = 4! = 24.دوو مێزی خڕ بە کورسییەکانی A، B، C، D، E. لە مێزی ڕاستدا هەموو کەس یەک کورسی بە ئاڕاستەی میلی کاتژمێر جووڵاوە؛ تیرێک لە نێوان مێزەکاندا دەڵێت هەموو کەس یەک کورسی دەجووڵێت. لە خوارەوە: هەر کەسێک هەمان دراوسێی دەمێنێتەوە، بۆیە یەک کەس جێگیر بکە و 4 کەسەکەی تر ڕیز بکە: (5 − 1)! = 4! = 24.
Turning the whole table does not make a new seating.سووڕاندنی هەموو مێزەکە دانیشتنێکی نوێ دروست ناکات.CêIT
n!n=(n−1)!\frac{n!}{n} = (n-1)!

Example (5): 5 persons around a round table: (5−1)!=4!=24(5-1)! = 4! = 24.

نموونەی ⁦(5): 5⁩ کەس لە دەوری مێزێکی خڕ: (5−1)!=4!=24(5-1)! = 4! = 24.

Quick checkپشکنینی خێرا8 friends sit at a round table. How many different seatings are there, if turning everyone together gives the same seating?8 هاوڕێ لە دەوری مێزێکی خڕ دادەنیشن. چەند دانیشتنی جیاواز هەیە، گەر سووڕاندنی هەمووان پێکەوە هەمان دانیشتن بدات؟

Permutations and Combinations - Circular Arrangement | Don't Memorise | GMAT/CAT/Bank PO/SSC CGLSri Chaitanya Academy NEET · Englishئینگلیزی · 788K viewsبینین · 15K likesلایک

Why n people around a round table can sit in (n − 1)! ways: fix one person as a reference point.

بۆچی nn کەس لە دەوری مێزێکی خڕ بە (n−1)!(n-1)! ڕێگا دادەنیشن: یەک کەس وەک خاڵی پشتپێبەستن جێگیر بکە.

Compares a row with a circle, then seats the first person as the reference point.

ڕیزێک لەگەڵ بازنەیەک بەراورد دەکات، پاشان یەکەم کەس وەک خاڵی پشتپێبەستن دادەنیشێنێت.

When some objects look the sameکاتێک هەندێک لە شتەکان وەک یەکن

How many different "words" can be made from the letters A, A, B? If the two A's were different (A1A_1 and A2A_2) there would be 3!=63! = 6 orders. But swapping the two A's gives the same word, so every word has been counted 2!=22! = 2 times: 3!/2!=33!/2! = 3 words (AAB, ABA, BAA). In general:

چەند «وشە»ی جیاواز لە پیتەکانی A، A، B دروست دەکرێت؟ گەر دوو Aـەکە جیاواز بوونایە (A1A_1 و A2A_2)، 3!=63! = 6 ڕیزبەندی هەبوو. بەڵام گۆڕینەوەی شوێنی دوو Aـەکە هەمان وشە دەدات، بۆیە هەر وشەیەک 2!=22! = 2 جار ژمێردراوە: 3!/2!=33!/2! = 3 وشە (AAB، ABA، BAA). بە گشتی:

n!n1! n2!⋯nk!,n1+n2+⋯+nk=n\frac{n!}{n_1!\, n_2! \cdots n_k!}, \qquad n_1 + n_2 + \cdots + n_k = n

nn objects: n1n_1 of one kind, n2n_2 of a second kind, …, nkn_k of a kk-th kind. Divide by the factorial of each group, because swapping objects inside a group changes nothing.

nn شت: n1n_1 لە جۆرێک، n2n_2 لە جۆرێکی دووەم، … و nkn_k لە جۆری kkـەم. دابەشی بکە بە هەر کۆمەڵێک، چونکە گۆڕینەوەی شوێنی شتەکانی ناو یەک کۆمەڵ هیچ ناگۆڕێت.

Example (6). 3 red, 2 green, 4 black, 1 white and 1 yellow ball (11 balls) are put in a row. Balls of the same colour look alike:

نموونەی ⁦(6)⁩. 3 تۆپی سوور، 2 سەوز، 4 ڕەش، 1 سپی و 1 زەرد (⁦11⁩ تۆپ) لە ڕیزێکدا دادەنرێن. تۆپە هاوڕەنگەکان وەک یەک دەردەکەون:

11!3! 2! 4! 1! 1!=11×10×9×8×7×6×53!×2!=1,663,20012=138,600\frac{11!}{3!\,2!\,4!\,1!\,1!} = \frac{11 \times 10 \times 9 \times 8 \times 7 \times 6 \times 5}{3! \times 2!} = \frac{1{,}663{,}200}{12} = 138{,}600
Quick checkپشکنینی خێراHow many different orders of the letters of LEVEL are there?پیتەکانی LEVEL چەند ڕیزبەندیی جیاوازیان هەیە؟

Permutations: how do we account for repetitions?Eddie Woo · Englishئینگلیزی · 99K viewsبینین · 2K likesلایک

How to count arrangements when some letters repeat: count as if all were different, then divide by the factorial of each repeat.

چۆن ڕێگاکانی ڕیزبوونی پیتەکان دەژمێریت کاتێک هەندێک پیت دووبارە دەبنەوە: وا بژمێرە کە هەموویان جیاوازن، پاشان دابەش بە ژمارەی جارەکانی هەر پیتێکی دووبارە بکە.

When some objects look the sameکاتێک هەندێک لە شتەکان وەک یەکن

Example (7): the word STATISTICSنموونەی ⁦(7)⁩: وشەی STATISTICS

Example (7) was left as homework: in how many ways can the letters of the word STATISTICS be arranged?

نموونەی ⁦(7)⁩ وەک ئەرک بەجێ هێڵرابوو: پیتەکانی وشەی STATISTICS بە چەند ڕێگا ڕیز دەکرێن؟

  1. Count the lettersپیتەکان بژمێرە

    n=10n = 10 letters: S three times, T three times, I twice, A once, C once. Check: 3+3+2+1+1=103 + 3 + 2 + 1 + 1 = 10.

    n=10n = 10 پیت: S سێ جار، T سێ جار، I دوو جار، A یەک جار، C یەک جار. پشکنین: 3+3+2+1+1=103 + 3 + 2 + 1 + 1 = 10.

  2. Use the formulaیاساکە بەکار بهێنە

    Divide 10!10! by the factorial of each group:

    10!10! دابەش بکە بە هەر کۆمەڵێک:

    10!3! 3! 2! 1! 1!=3,628,8006×6×2=3,628,80072=50,400\frac{10!}{3!\,3!\,2!\,1!\,1!} = \frac{3{,}628{,}800}{6 \times 6 \times 2} = \frac{3{,}628{,}800}{72} = 50{,}400
  3. Check by computerبە کۆمپیوتەر بیپشکنە

    Listing all 10!10! orders and removing duplicates also leaves 50,400 (see the Python screen below).

    نووسینی هەموو 10!10! ڕیزبەندییەکە و لابردنی دووبارەکان هەروەها ⁦50,400⁩ دەهێڵێتەوە (بڕوانە شاشەی Pythonـی خوارەوە).

Quick checkپشکنینی خێراHow many different orders of the letters of BANANA are there?پیتەکانی BANANA چەند ڕیزبەندیی جیاوازیان هەیە؟

Counting passwordsژماردنی تێپەڕەوشەکان

A password is an arrangement of characters, so counting tells us how many guesses a brute-force attack may need. Take the 62 characters a–z, A–Z and 0–9, and choose every character at random:

ڕیزکردنێکی ، بۆیە ژماردن پێمان دەڵێت لەوانەیە پێویستی بە چەند هەوڵ بێت. ⁦62⁩ ⁦a–z⁩، ⁦A–Z⁩ و ⁦0–9⁩ وەربگرە و هەموو بە هەڕەمەکی هەڵبژێرە:

PasswordPossible passwordsژمارەی
8 characters, repeats allowed8 ، دووبارەبوونەوە ڕێگەپێدراوە628≈2.18×101462^8 \approx 2.18 \times 10^{14}
8 different characters8 جیاواز62P8≈1.36×1014{}^{62}P_{8} \approx 1.36 \times 10^{14}
15 lowercase letters⁦15⁩ پیتی بچووک2615≈1.68×102126^{15} \approx 1.68 \times 10^{21}

Forbidding repeats makes the count smaller, not bigger. And length wins: each extra character multiplies the count again, so 15 plain lowercase letters give about 7.7 million times more possibilities than 8 mixed characters. At 10 billion guesses a second, trying them all takes about 6 hours for 62862^8 but about 5,000 years for 261526^{15} (Why length beats complexity).

قەدەغەکردنی دووبارەبوونەوە ژمارەکە بچووکتر دەکات، نەک گەورەتر. درێژی دەباتەوە: هەر زیادە ژمارەکە دیسان لێک دەداتەوە، بۆیە ⁦15⁩ پیتی بچووکی ئاسایی نزیکەی ⁦7.7⁩ ملیۆن جار حاڵەتی گونجاوی زیاتر دەدەن لە 8 تێکەڵ. بە ⁦10⁩ ملیار هەوڵ لە چرکەیەکدا، تاقیکردنەوەی هەموویان بۆ 62862^8 نزیکەی 6 کاتژمێر دەخایەنێت، بەڵام بۆ 261526^{15} نزیکەی ⁦5,000⁩ ساڵ (بۆچی درێژی لە ئاڵۆزی گرنگترە).

Quick checkپشکنینی خێراWhich kind of password has the most possibilities?کام جۆرە زۆرترین حاڵەتی گونجاوی هەیە؟

Counting passwordsژماردنی تێپەڕەوشەکان

Shuffling is not enoughتێکدانی ڕیزبەندی بەس نییە

The course note on permutations and cryptography suggests making a password by picking 8 characters, for example nQwZ2f6U, and then using a permutation of them, such as UfQ2Z6wn. Random choice does help, but the shuffle itself adds very little.

تێبینیی کۆرسەکە دەربارەی و پێشنیار دەکات بەم شێوەیە دروست بکرێت: 8 هەڵبژێرە، بۆ نموونە nQwZ2f6U، پاشان بەکار بهێنە، وەک UfQ2Z6wn. هەڵبژاردنی هەڕەمەکی یارمەتی دەدات، بەڵام خودی تێکدانەکە زۆر کەم زیاد دەکات.

Quick checkپشکنینی خێراYou take the 6 letters of your name and shuffle them to make a password. Why is this weak?6 پیتی ناوەکەت وەردەگریت و تێکیان دەدەیت بۆ دروستکردنی . بۆچی ئەمە لاوازە؟

Permutations in cryptography: transposition ciphersگۆڕینەکان لە کریپتۆگرافیدا: شفرەی جێگۆڕکێ

Classical ciphers use two techniques. A substitution cipher replaces letters with other letters, numbers or symbols but keeps their places, like the Caesar cipher. A transposition cipher keeps the letters but moves them by a fixed rule, the key, so the ciphertext is a permutation of the plaintext:

لە کۆندا دوو تەکنیک بەکار دێت. پیتەکان بە پیت، ژمارە یان هێمای تر دەگۆڕێتەوە بەڵام شوێنەکانیان دەهێڵێتەوە، وەک شفرەی قەیسەر. پیتەکان دەهێڵێتەوە بەڵام بە یاسایەکی جێگیر، کە ، دەیانجووڵێنێت، بۆیە :

The plaintext CODE in four numbered boxes (1 to 4). Arrows carry each letter to a new box below, giving the ciphertext OECD: the key takes letters 2, 4, 1, 3. Below: only 4! = 24 possible keys for 4 letters.دەقی ئاشکرا CODE لە چوار چوارگۆشەی ژمارەدار (1 تا 4). تیرەکان هەر پیتێک دەبەن بۆ چوارگۆشەیەکی نوێی خوارەوە و دەقی شفرەکراو OECD دروست دەکەن: کلیلی شفرەکردن پیتەکانی 2، 4، 1، 3 وەردەگرێت. لە خوارەوە: بۆ 4 پیت تەنها 24 کلیلی شفرەکردنی جیاواز هەیە.
The same letters, in new places: CODE → OECD with the key 2, 4, 1, 3.هەمان پیتەکان لە شوێنی نوێدا: CODE بە 2، 4، 1، 3 دەبێتە OECD.CêIT

The note's picture used the same key on JOHN (→ ONJH) and NASH (→ AHNS). For blocks of 4 letters there are only 4!=244! = 24 keys, and even blocks of 10 letters have 10!=3,628,80010! = 3{,}628{,}800, a small number for a computer. The letters are also unchanged (an E stays an E), which is one more clue for a code-breaker. So transposition alone is weak; modern ciphers such as AES repeat substitution and permutation steps in many rounds (see symmetric encryption).

وێنەکەی تێبینییەکە هەمان بۆ JOHN و NASH بەکار هێنا: JOHN بووە ONJH و NASH بووە AHNS. بۆ بلۆکی 4 پیتی تەنها 4!=244! = 24 هەیە و تەنانەت بلۆکی ⁦10⁩ پیتی 10!=3,628,80010! = 3{,}628{,}800ـی هەیە، کە بۆ ژمارەیەکی بچووکە. پیتەکانیش ناگۆڕێن (E هەر E دەمێنێتەوە)، کە سەرەداوێکی ترە بۆ شفرەشکێنەر. بۆیە جێگۆڕکێ بە تەنها لاوازە؛ وەک AES هەنگاوەکانی جێگرتنەوە و لە چەندین خولدا دووبارە دەکەنەوە (بڕوانە شفرەکردنی هاوچەشن).

Quick checkپشکنینی خێراWith the key 2, 4, 1, 3 (take letters 2, 4, 1, 3 in that order), what is the ciphertext of WORD?بە 2، 4، 1، 3 (پیتەکانی 2، 4، 1، 3 بەو ڕیزبەندییە وەربگرە)، WORD چییە؟

Counting in Pythonژماردن لە Pythonـدا

Python's math module has math.factorial(n) and math.perm(n, r), and itertools.permutations lists the arrangements themselves. This program recomputes the lecture's examples and checks STATISTICS the slow way:

mathـی Python math.factorial(n) و math.perm(n, r)ـی تێدایە و itertools.permutations خودی ڕیزکردنەکان دەنووسێت. ئەم بەرنامەیە نموونەکانی وانەکە دووبارە حیساب دەکاتەوە و STATISTICS بە ڕێگا خاوەکە دەپشکنێت:

Factorials and permutationsفاکتۆریێلەکان و گۆڕینەکانPYTHON
import math
from itertools import permutations

print(math.factorial(7))       # 7 people in a row: 7!
print(math.perm(9, 3))         # 3 of 9 books on a shelf: 9P3
print(5 ** 2)                  # 2-digit numbers from 2, 5, 7, 8, 9, repeats allowed
print(math.factorial(5 - 1))   # 5 people around a round table: (5 - 1)!

words = ["".join(p) for p in permutations("abcd", 2)]
print(len(words), words)       # Example (1): every 2-letter word from a, b, c, d

# STATISTICS: the formula, and a slow check by listing every order
print(math.factorial(10) // (math.factorial(3) * math.factorial(3) * math.factorial(2)))
print(len(set(permutations("STATISTICS"))))
Explain the codeڕوونکردنەوەی کۆدەکە
Lineدێڕی 5

math.perm(9, 3) is 9P3=9!/6!{}^{9}P_{3} = 9!/6!.

math.perm(9, 3) هەمان 9P3=9!/6!{}^{9}P_{3} = 9!/6!ـە.

Lineدێڕی 9

permutations("abcd", 2) gives every ordered pair of different letters; join turns each pair into a word.

permutations("abcd", 2) هەموو جووتێکی ڕیزکراوی پیتی جیاواز دەدات؛ join هەر جووتێک دەکات بە وشەیەک.

Lineدێڕی 14

set(...) throws away duplicate orders, such as the two that only swap two S's.

set(...) ڕیزبەندییە دووبارەکان فڕێ دەدات، وەک ئەو دووانەی تەنها شوێنی دوو S دەگۆڕنەوە.

Common mistakesهەڵە باوەکان

MistakeهەڵەCorrect ideaبیرۆکەی ڕاست
Adding when the choices are made together: 3 shirts and 4 trousers give 3+4=73 + 4 = 7.کۆکردنەوە کاتێک هەڵبژاردنەکان پێکەوە دەکرێن: 3 کراس و 4 پانتۆڵ دەکەنە 3+4=73 + 4 = 7.Multiply along one path: 3×4=123 \times 4 = 12. Add only separate cases (either a sedan or a hatchback).بە درێژایی یەک ڕێگا لێک بدە: 3×4=123 \times 4 = 12. تەنها حاڵەتە جیاکان کۆ بکەرەوە (یان سیدان یان هاچباک).
Using nPr{}^{n}P_{r} when repeats are allowed, for example a PIN as 10P4{}^{10}P_{4}.بەکارهێنانی nPr{}^{n}P_{r} کاتێک دووبارەبوونەوە ڕێگەپێدراوە، بۆ نموونە PIN وەک 10P4{}^{10}P_{4}.With repetition every place has all nn choices: nrn^r, so 10410^4.بە دووبارەبوونەوە هەر شوێنێک هەموو nn هەڵبژاردنەکەی هەیە: nrn^r، بۆیە 10410^4.
Thinking rr can never be bigger than nn.بیرکردنەوە کە rr هەرگیز لە nn گەورەتر نابێت.That is true only without repetition. Codes of 3 letters from A and B: 23=82^3 = 8.ئەمە تەنها بەبێ دووبارەبوونەوە ڕاستە. کۆدی 3 پیتی لە A و B: 23=82^3 = 8.
Treating a round table like a row: 5!5! for 5 people.مامەڵەکردن لەگەڵ مێزی خڕ وەک ڕیز: 5!5! بۆ 5 کەس.Turning everyone gives the same seating: (5−1)!=24(5-1)! = 24.سووڕاندنی هەمووان هەمان دانیشتن دەدات: (5−1)!=24(5-1)! = 24.
Treating identical letters as different: 10!10! for STATISTICS.دانانی پیتە وەک یەکەکان وەک جیاواز: 10!10! بۆ STATISTICS.Divide by the factorial of each repeat count: 10!/(3! 3! 2!)=50,40010!/(3!\,3!\,2!) = 50{,}400.دابەشی بکە بە ژمارەی دووبارەبوونەوەی هەر پیتێک: 10!/(3! 3! 2!)=50,40010!/(3!\,3!\,2!) = 50{,}400.
Writing 0!=00! = 0.نووسینی 0!=00! = 0.0!=10! = 1 by definition.0!=10! = 1 بە پێناسە.
Quick checkپشکنینی خێراWhich rule fits "a 3-digit code in which digits may repeat"?کام یاسا لەگەڵ «کۆدێکی 3 ڕەقەمی کە ڕەقەمەکانی دەتوانن دووبارە ببنەوە» دەگونجێت؟

Exercisesڕاهێنانەکان

Exerciseڕاهێنان1. Outfits and cars1. جلوبەرگ و ئۆتۆمبێل

(a) How many outfits can be made from 3 shirts and 4 pairs of trousers? (b) A car comes in 2 body styles, 5 colours and 3 models: how many choices? (c) The same, but the hatchback is not sold in black?

(أ) لە 3 کراس و 4 پانتۆڵ چەند جلوبەرگ دروست دەکرێت؟ (ب) ئۆتۆمبێلێک بە 2 شێوەی لەش، 5 ڕەنگ و 3 مۆدێل هەیە: چەند هەڵبژاردن؟ (ج) هەمان شت، بەڵام هاچباک بە ڕەنگی ڕەش نافرۆشرێت؟

Show answerوەڵامەکە پیشان بدە
  • (a) 3×4=123 \times 4 = 12
  • (b) 2×5×3=302 \times 5 \times 3 = 30
  • (c) 5×3+4×3=275 \times 3 + 4 \times 3 = 27: add the two separate cases.
  • بەشی (أ): 3×4=123 \times 4 = 12
  • بەشی (ب): 2×5×3=302 \times 5 \times 3 = 30
  • بەشی (ج): 5×3+4×3=275 \times 3 + 4 \times 3 = 27: دوو حاڵەتە جیاکە کۆ بکەرەوە.
Exerciseڕاهێنان2. Examples (1) to (3)2. نموونەکانی ⁦(1)⁩ تا ⁦(3)⁩

(a) How many 2-letter words can be made from a, b, c, d with no letter used twice? (b) In how many ways can 3 books out of 9 be arranged on a shelf? (c) In how many ways can 7 persons sit in a row?

(أ) چەند وشەی دوو پیتی لە a، b، c، d دروست دەکرێت بەبێ ئەوەی پیتێک دوو جار بەکار بێت؟ (ب) 3 کتێب لە 9 کتێب بە چەند ڕێگا لەسەر ڕەفەیەک ڕیز دەکرێن؟ (ج) 7 کەس بە چەند ڕێگا لە ڕیزێکدا دادەنیشن؟

Show answerوەڵامەکە پیشان بدە
  • (a) 4P2=4!/2!=12{}^{4}P_{2} = 4!/2! = 12
  • (b) 9P3=9×8×7=504{}^{9}P_{3} = 9 \times 8 \times 7 = 504
  • (c) 7!=5,0407! = 5{,}040
  • بەشی (أ): 4P2=4!/2!=12{}^{4}P_{2} = 4!/2! = 12
  • بەشی (ب): 9P3=9×8×7=504{}^{9}P_{3} = 9 \times 8 \times 7 = 504
  • بەشی (ج): 7!=5,0407! = 5{,}040
Exerciseڕاهێنان3. Example (4), with and without repetition3. نموونەی ⁦(4)⁩، بە دووبارەبوونەوە و بەبێ دووبارەبوونەوە

How many 2-digit numbers can be made from 2, 5, 7, 8, 9 (a) if digits may repeat, (b) if they may not?

چەند ژمارەی دوو ڕەقەمی لە 2، 5، 7، 8، 9 دروست دەکرێت (أ) گەر ڕەقەمەکان بتوانن دووبارە ببنەوە، (ب) گەر نەتوانن؟

Show answerوەڵامەکە پیشان بدە
  • (a) 52=255^2 = 25
  • (b) 5P2=20{}^{5}P_{2} = 20; the difference is 22, 55, 77, 88, 99.
  • بەشی (أ): 52=255^2 = 25
  • بەشی (ب): 5P2=20{}^{5}P_{2} = 20؛ جیاوازییەکە ⁦22⁩، ⁦55⁩، ⁦77⁩، ⁦88⁩، ⁦99⁩ـە.
Exerciseڕاهێنان4. Example (5) and a bigger table4. نموونەی ⁦(5)⁩ و مێزێکی گەورەتر

In how many ways can (a) 5 persons, (b) 6 persons sit around a round table?

(أ) 5 کەس، (ب) 6 کەس بە چەند ڕێگا لە دەوری مێزێکی خڕ دادەنیشن؟

Show answerوەڵامەکە پیشان بدە
  • (a) (5−1)!=24(5-1)! = 24
  • (b) (6−1)!=120(6-1)! = 120
  • بەشی (أ): (5−1)!=24(5-1)! = 24
  • بەشی (ب): (6−1)!=120(6-1)! = 120

Exercisesڕاهێنانەکان

More exercisesڕاهێنانی زیاتر

Exerciseڕاهێنان5. Examples (6) and (7)5. نموونەکانی ⁦(6)⁩ و ⁦(7)⁩

(a) In how many ways can 3 red, 2 green, 4 black, 1 white and 1 yellow ball be put in a row? (b) In how many ways can the letters of STATISTICS be arranged? (c) And the letters of MISSISSIPPI?

(أ) 3 تۆپی سوور، 2 سەوز، 4 ڕەش، 1 سپی و 1 زەرد بە چەند ڕێگا لە ڕیزێکدا دادەنرێن؟ (ب) پیتەکانی STATISTICS بە چەند ڕێگا ڕیز دەکرێن؟ (ج) پیتەکانی MISSISSIPPI چی؟

Show answerوەڵامەکە پیشان بدە
  • (a) 11!/(3! 2! 4! 1! 1!)=138,60011!/(3!\,2!\,4!\,1!\,1!) = 138{,}600
  • (b) 10!/(3! 3! 2! 1! 1!)=50,40010!/(3!\,3!\,2!\,1!\,1!) = 50{,}400
  • (c) 11 letters: I four times, S four times, P twice, M once: 11!/(4! 4! 2!)=34,65011!/(4!\,4!\,2!) = 34{,}650.
  • بەشی (أ): 11!/(3! 2! 4! 1! 1!)=138,60011!/(3!\,2!\,4!\,1!\,1!) = 138{,}600
  • بەشی (ب): 10!/(3! 3! 2! 1! 1!)=50,40010!/(3!\,3!\,2!\,1!\,1!) = 50{,}400
  • بەشی (ج): ⁦11⁩ پیت: I چوار جار، S چوار جار، P دوو جار، M یەک جار: 11!/(4! 4! 2!)=34,65011!/(4!\,4!\,2!) = 34{,}650.
Exerciseڕاهێنان6. Homework: why is 0!=10! = 1?6. ئەرک: بۆچی 0!=10! = 1؟

Explain why 0!=10! = 1.

ڕوونی بکەرەوە بۆچی 0!=10! = 1.

Show answerوەڵامەکە پیشان بدە

From n!=n×(n−1)!n! = n \times (n-1)! we get (n−1)!=n!/n(n-1)! = n!/n. Going down: 3!=24/4=63! = 24/4 = 6, 2!=6/3=22! = 6/3 = 2, 1!=2/2=11! = 2/2 = 1, 0!=1/1=10! = 1/1 = 1. Strictly, 0!=10! = 1 is a definition that keeps this rule and the counting formulas working (for example nPn=n!/0!=n!{}^{n}P_{n} = n!/0! = n!).

لە n!=n×(n−1)!n! = n \times (n-1)!ـەوە (n−1)!=n!/n(n-1)! = n!/n وەردەگرین. بەرەو خوارەوە: 3!=24/4=63! = 24/4 = 6، 2!=6/3=22! = 6/3 = 2، 1!=2/2=11! = 2/2 = 1، 0!=1/1=10! = 1/1 = 1. بە وردی، 0!=10! = 1 پێناسەیەکە کە ئەم یاسایە و یاساکانی ژماردن بە کارکردن دەهێڵێتەوە (بۆ نموونە nPn=n!/0!=n!{}^{n}P_{n} = n!/0! = n!).

Exerciseڕاهێنان7. PINs7. کۆدی PIN

(a) How many 4-digit PINs are there if digits may repeat? (b) If no digit may repeat? (c) A thief tries 3 different PINs on a phone that locks after 3 wrong tries. What is the probability of getting in, if the PIN was chosen at random from all PINs of (a)?

(أ) چەند PINـی 4 ڕەقەمی هەیە گەر ڕەقەمەکان بتوانن دووبارە ببنەوە؟ (ب) گەر هیچ ڕەقەمێک دووبارە نەبێتەوە؟ (ج) دزێک ⁦3 PIN⁩ـی جیاواز لەسەر مۆبایلێک تاقی دەکاتەوە کە دوای 3 هەوڵی هەڵە دادەخرێت. لەم حاڵەتەدا چوونە ژوورەوە چەندە، گەر PINـەکە بە هەڕەمەکی لە هەموو PINـەکانی (أ) هەڵبژێردرابێت؟

Show answerوەڵامەکە پیشان بدە
  • (a) 104=10,00010^4 = 10{,}000
  • (b) 10P4=10×9×8×7=5,040{}^{10}P_{4} = 10 \times 9 \times 8 \times 7 = 5{,}040
  • (c) 3 of the 10,000 equally likely PINs: 3/10,000=0.00033/10{,}000 = 0.0003. This is why phones limit wrong tries.
  • بەشی (أ): 104=10,00010^4 = 10{,}000
  • بەشی (ب): 10P4=10×9×8×7=5,040{}^{10}P_{4} = 10 \times 9 \times 8 \times 7 = 5{,}040
  • بەشی (ج): 3 لە ⁦10,000 PIN⁩ـی : 3/10,000=0.00033/10{,}000 = 0.0003. لەبەر ئەمەیە مۆبایلەکان هەوڵی هەڵە سنووردار دەکەن.
Exerciseڕاهێنان8. Decrypt8. شفرەکە بکەرەوە

A message was encrypted with the transposition key 2, 4, 1, 3 and reads OECD. Find the plaintext.

نامەیەک بە جێگۆڕکێی 2، 4، 1، 3 شفرە کراوە و دەبێتە OECD. بدۆزەرەوە.

Show answerوەڵامەکە پیشان بدە

The ciphertext's 1st letter came from position 2, the 2nd from position 4, the 3rd from position 1, the 4th from position 3. Put them back: C goes to place 1, O to place 2, D to place 3 and E to place 4, so the plaintext is CODE.

پیتی یەکەمی لە شوێنی 2ـەوە هاتووە، دووەم لە شوێنی 4، سێیەم لە شوێنی 1 و چوارەم لە شوێنی 3. بیانگەڕێنەرەوە: C بۆ شوێنی 1، O بۆ شوێنی 2، D بۆ شوێنی 3 و E بۆ شوێنی 4، بۆیە CODEـە.

Summaryپوختە

  • Multiplication principle: mm ways, then nn ways, gives m×nm \times n; add only separate cases.
  • All nn different objects in a row: n!n!, with 0!=10! = 1.
  • rr of nn, order matters, no repeats: nPr=n!/(n−r)!{}^{n}P_{r} = n!/(n-r)!.
  • Repeats allowed: nrn^r (here rr may be bigger than nn).
  • Round table: (n−1)!(n-1)!. Identical objects: n!/(n1! n2!⋯nk!)n!/(n_1!\,n_2!\cdots n_k!).
  • Passwords: length and random choice make them strong; shuffling known characters adds only n!n! orders. A transposition cipher is a permutation of the letters.
  • : mm ڕێگا و پاشان nn ڕێگا، m×nm \times n دەدات؛ تەنها حاڵەتە جیاکان کۆ بکەرەوە.
  • هەموو nn شتە جیاوازەکە لە ڕیزێکدا: n!n!؛ هەروەها 0!=10! = 1.
  • rr لە nn، ڕیزبەندی گرنگە، بێ دووبارەبوونەوە: nPr=n!/(n−r)!{}^{n}P_{r} = n!/(n-r)!.
  • دووبارەبوونەوە ڕێگەپێدراوە: nrn^r (لێرەدا rr دەتوانێت لە nn گەورەتر بێت).
  • مێزی خڕ: (n−1)!(n-1)!. شتی وەک یەک: n!/(n1! n2!⋯nk!)n!/(n_1!\,n_2!\cdots n_k!).
  • : درێژی و هەڵبژاردنی هەڕەمەکی بەهێزیان دەکەن؛ تێکدانی تەنها n!n! ڕیزبەندی زیاد دەکات. پیتەکانە.
Review questionsپرسیارەکانی پێداچوونەوە
When do you add instead of multiply?کەی لە جیاتی لێکدان کۆ دەکەیتەوە؟

When the cases are separate alternatives (either this or that), as in 5×3+4×3=275 \times 3 + 4 \times 3 = 27.

کاتێک حاڵەتەکان جێگرەوەی جیان (یان ئەمە یان ئەوە)، وەک لە 5×3+4×3=275 \times 3 + 4 \times 3 = 27.

What is the difference between nPr{}^{n}P_{r} and nrn^r?جیاوازیی نێوان nPr{}^{n}P_{r} و nrn^r چییە؟

nPr{}^{n}P_{r} uses each object at most once; nrn^r lets objects repeat.

nPr{}^{n}P_{r} هەر شتێک زۆرترین یەک جار بەکار دەهێنێت؛ nrn^r ڕێگە دەدات شتەکان دووبارە ببنەوە.

Why divide by 2!2! for the two A's in AAB?بۆچی بۆ دوو Aـەکەی AAB بە 2!2! دابەش دەکەین؟

Swapping the two A's gives the same word, so each word was counted 2!=22! = 2 times.

گۆڕینەوەی شوێنی دوو Aـەکە هەمان وشە دەدات، بۆیە هەر وشەیەک 2!=22! = 2 جار ژمێردرابوو.

Videoڤیدیۆ

Watch a videoسەیری ڤیدیۆیەک بکە

A video that viewers liked a lot and praised in their comments, chosen for this lesson.ڤیدیۆیەک کە بینەران زۆریان پێ خۆش بووە و لە کۆمێنتەکانیاندا ستایشیان کردووە، بۆ ئەم وانەیە هەڵبژێردراوە.

Permutations and Combinations TutorialThe Organic Chemistry Tutor · Englishئینگلیزی · 5M viewsبینین · 97K likesلایک · Partبەشی 0:00–11:16 (ofلە 17:40)

Counting arrangements step by step: listing permutations, the nPr formula with factorials, and several arrangement word problems.

ژماردنی ئەو ڕێگایانەی شتەکان پێیان ڕیز دەکرێن، هەنگاو بە هەنگاو: نووسینی ، nPr{}_nP_r بە ، هەروەها چەند پرسیارێکی وشەیی.

Plays 0:00-11:16: understanding and listing permutations, the permutation formula and arrangement examples; the combination part after 11:16 belongs to the next lesson.

لە ⁦0:00⁩ تا ⁦11:16⁩ پەخش دەبێت: تێگەیشتن لە و نووسینیان، و نموونەی ڕیزبەندی؛ بەشی دوای ⁦11:16⁩ هی وانەی داهاتووە.

Lesson complete!وانەکە تەواو بوو!

Well done. Review the key terms, then go on to the next lesson.دەستخۆش. سەیرێکی زاراوە سەرەکییەکان بکەرەوە، پاشان بڕۆ بۆ وانەی داهاتوو.

Key termsزاراوە سەرەکییەکان

Next lessonوانەی داهاتوو

Combinationsگونجێنەکان

References and further readingسەرچاوەکان و خوێندنەوەی زیاتر

This lecture is a first edition. The Kurdish text and terminology are waiting for review by Kurdish IT teachers.ئەم وانەیە چاپی یەکەمە. دەقە کوردییەکە و زاراوەکانی چاوەڕێی پێداچوونەوەی مامۆستایانی کوردی بواری IT ن.