Combinatorics. Basic formulas of combinatorics

Decor elements 20.07.2020
Decor elements

Abstract on the topic:

Completed by a student of grade 10 "B"

secondary school №53

Glukhov Mikhail Alexandrovich

Naberezhnye Chelny

2002
Content

From the history of combinatorics _______________________________________________ 3
Sum rule _________________________________________________ 4
-
Product rule _____________________________________________ 4
Examples of tasks __________________________________________________________ -
Intersecting sets ____________________________________________ 5
Examples of tasks __________________________________________________________ -
Euler circles _________________________________________________ -
Placements without repetitions ______________________________________________ 6
Examples of tasks __________________________________________________________ -
Permutations without repetitions _______________________________________ 7
Examples of tasks __________________________________________________________ -
Combinations without repetitions __________________________________________ 8
Examples of tasks __________________________________________________________ -
Placements and combinations without repetition ______________________________ 9
Examples of tasks __________________________________________________________ -
Permutations with repetitions 9
Examples of tasks __________________________________________________________ -
Tasks for independent solution ________________________________ 10
Bibliography___________________________________ 11

From the history of combinatorics

Combinatorics deals with various types of compounds that can be formed from elements of a finite set. Some elements of combinatorics were known in India as early as the 2nd century BC. BC e. The Nidians were able to calculate numbers, which are now called "combinations". In the XII century. Bhaskara calculated some kinds of combinations and permutations. It is assumed that Indian scientists studied compounds in connection with their use in poetics, the science of the structure of the verse and poetic works. For example, in connection with the calculation of possible combinations of stressed (long) and unstressed (short) syllables of the foot of n syllables. As a scientific discipline, combinatorics was formed in the 17th century. In the book "Theory and Practice of Arithmetic" (1656), the French author A. also devotes an entire chapter to combinations and permutations.
B. Pascal in the "Treatise on the Arithmetic Triangle" and in the "Treatise on Numerical Orders" (1665) expounded the doctrine of binomial coefficients. P. Fermat knew about the connections between mathematical squares and figurative numbers with the theory of compounds. The term "combinatorics" began to be used after the publication by Leibniz in 1665 of the work "Discourse on combinatorial art", in which for the first time a scientific substantiation of the theory of combinations and permutations was given. J. Bernoulli was the first to study placements in the second part of his book "Ars conjectandi" (the art of divination) in 1713. The modern symbolism of combinations was proposed by various authors of educational manuals only in the 19th century.

The whole variety of combinatorial formulas can be derived from two basic statements concerning finite sets - the sum rule and the product rule.

Sum rule

If the finite sets do not intersect, then the number of elements X U Y (or) is equal to the sum of the number of elements of the set X and the number of elements of the set Y.

That is, if there are X books on the first shelf, and Y on the second, then you can choose a book from the first or second shelf in X + Y ways.

Task examples

The student must complete practical work in mathematics. He was offered a choice of 17 topics in algebra and 13 topics in geometry. In how many ways can he choose one topic for practical work?

Solution: X=17, Y=13

According to the sum rule X U Y=17+13=30 topics.

There are 5 cash and clothing lottery tickets, 6 sports lotto tickets and 10 car lottery tickets. In how many ways can one ticket be chosen from a sports lottery or car lottery?

Solution: Since the money and clothing lottery does not participate in the choice, there are only 6 + 10 = 16 options.

product rule

If an element X can be chosen in k ways, and an element Y in m ways, then the pair (X,Y) can be chosen in k*m ways.

That is, if there are 5 books on the first shelf and 10 on the second, then you can choose one book from the first shelf and one from the second in 5 * 10 = 50 ways.

Task examples

The binder has to bind 12 different books in red, green and brown bindings. In how many ways can he do this?

Solution: There are 12 books and 3 colors, so according to the product rule, 12 * 3 = 36 binding options are possible.

How many five-digit numbers are there that read the same from left to right and from right to left?

Solution: In such numbers, the last digit will be the same as the first, and the penultimate - like the second. The third digit will be any. This can be represented as XYZYX, where Y and Z are any digits and X is not zero. So, according to the product rule, the number of digits that are equally read both from left to right and from right to left is 9 * 10 * 10 = 900 options.


Overlapping sets

But it happens that the sets X and Y intersect, then they use the formula

, where X and Y are sets, and is the area of ​​intersection. Task examples

20 people know English and 10 - German, 5 of them know both English and German. How many people in total?

Answer: 10+20-5=25 people.

Euler circles are also often used to visually solve the problem. For instance:

Out of 100 tourists traveling abroad, 30 people speak German, 28 - English, 42 - French. 8 people speak English and German at the same time, 10 people speak English and French, 5 German and French, and 3 all three languages. tourists do not speak any language?

Solution: Let us express the condition of this problem graphically. Let us designate a circle for those who know English, another circle for those who know French, and a third circle for those who know German.

Three tourists speak all three languages, which means that in the common part of the circles we enter the number 3. 10 people speak English and French, and 3 of them also speak German. Therefore, only English and French are spoken by 10-3=7 people.

Similarly, we get that only English and German are spoken by 8-3=5 people, and German and French by 5-3=2 tourists. We enter this data in the relevant parts.

Let us now determine how many people speak only one of the listed languages. 30 people know German, but 5+3+2=10 of them also speak other languages, so only 20 people know German. Similarly, we get that 13 people speak one English, and 30 people speak one French.

According to the condition of the problem, there are only 100 tourists. 20 + 13 + 30 + 5 + 7 + 2 + 3 = 80 tourists know at least one language, therefore, 20 people do not speak any of these languages.


Placements without repetition.

How many phone numbers can be made up of 6 digits each so that all digits are distinct?

This is an example of a placement problem with no repetitions. 10 digits of 6 are placed here. And options in which the same numbers are in a different order are considered different.

If an X-set consisting of n elements, m≤n, then an ordered set X containing m elements is called an ordered set X containing m elements.

The number of all arrangements of n elements by m is denoted by

n! - n-factorial (factorial English factor) the product of natural numbers from 1 to any number n Task

In how many ways can 4 boys ask 4 out of 6 girls to dance?

Solution: Two boys cannot invite the same girl at the same time. And the options in which the same girls dance with different boys are considered different, therefore:

360 options are possible.


Permutations without repetition

In the case of n=m (see placements without repetitions) of n elements by m is called a permutation of the set x.

The number of all permutations of n elements is denoted by P n.

Valid for n=m:

Task examples

How many different six-digit numbers can be made from the digits 0, 1, 2, 3, 4.5 if the numbers do not repeat in the number?

1) Find the number of all permutations of these numbers: P 6 =6!=720

2) 0 cannot be in front of the number, so from this number it is necessary to subtract the number of permutations in which 0 is in front. And this is P 5 =5!=120.

P 6 -P 5 \u003d 720-120 \u003d 600

naughty monkey

Yes, clubfoot Mishka

Started to play a quartet

Stop, brothers, stop! -

Monkey shouts, - wait!

How does the music go?

You don't sit like that...

And so, and so transplanted - again the music is not going well.

Combinatorics is a branch of mathematics. The basic concepts and formulas of combinatorics as a science are applied in all spheres of life.

It is not surprising that it is included in the 11th grade program, as well as in entrance examinations in many universities of the Russian Federation. Its foundations lie in the applied art of many spheres of human activity.

Its history spans over 6 centuries. The first combinatorial problems appeared in the works of philosophers and mathematicians of the Middle Ages.

Representatives of that scientific world tried to find methods for solving such problems, their basic rules and concepts, to approve unique formulas and equations for those who had not yet met them. Such information in our time is called information "for dummies".

Let's try to understand the aspects of this field of science: what are the elements, properties, rules, methods and its main application in our life? Of course, it is impossible to cover the whole area in one article. Therefore, below will be presented all the most basic.

What is combinatorics in mathematics

The essence of this term is given by books of past years: it branch of mathematics that deals with operations on a set of elements.

On the Internet there are textbooks on computer science and mathematics for children, schoolchildren, collections of materials and tasks for beginners, where “entertaining” combinatorics is explained in an accessible form. We need to figure out how to solve such problems.

In the lower grades, problems on this topic are solved in additional circles, and in schools with in-depth study of mathematics - in the main lessons. In addition, tasks in combinatorics are included in Olympiads of all levels.

Basic concepts

There are several of them:

  1. Element- any object or phenomenon included in the desired set.
  2. Combination are subsets that are in an arbitrary order in the original set.
  3. Permutation- the elements in the set are in a strictly defined order.
  4. Accommodation are ordered subsets in the original set.

product rule

It is one of the basic rules for solving such problems and sounds like this:

When choosing element A fromnways and choosing element B frommways, the statement is true that it is possible to choose a pair of A and B at the same timen* mways.

Let's look at specific examples.

Task number 1.

The box contains 2 balls and 6 jump ropes. How many ways are there to get 1 ball and 1 rope?

The answer is simple: 2 * 6 = 12.

Task number 2.

There are 1 cube, 2 balls, 3 flowers and 4 candies. In how many ways can you draw a cube, a ball, a flower and a candy?

The solution is similar: 1 * 2 * 3 * 4 = 24.

Moreover, the left side can be written much more simply: 4!

! in this case is not a punctuation mark, but a factorial. With it, you can calculate more complex options and solve difficult problems (there are different formulas, but more on that later).

Task number 3.

How many two digit numbers can be made from 2 digits?

Answer: 2! = 2.

Task number 4.

How many 10 digit numbers can be made from 10 digits?

Sum rule

It is also the basic rule of combinatorics.

If A can be chosenntimes, and B -mtimes, then A or B can be chosen (n+ m) once.

Task number 5.

The box contains 5 red, 3 yellow, 7 green, 9 black pencils. How many ways are there to draw any 1 pencil?

Answer: 5 + 3 + 7 + 9 = 24.

Combinations with repetitions and without repetitions

This term is understood as combinations in an arbitrary order from a set of n by m elements.

The number of combinations is equal to the number of such combinations.

Task number 6.

The box contains 4 different fruits. In how many ways can you get 2 different fruits at the same time?

The solution is simple:

Where 4! - a combination of 4 elements.

With repetitions A little more complicated, combinations are calculated according to the following formula:

Task number 7.

Let's take the same case, but on the condition that one fruit is returned to the box.

In this case:

Placements with and without repetitions

This definition means a set of m elements from a set of n elements.

Task number 8.

From 3 digits, you need to choose 2 to get different two-digit numbers. How many options?

The answer is simple:

But how to be with repetitions? Here, each element can be placed multiple times! In this case, the general formula will look like this:

Task number 9.

From 12 letters of the Latin alphabet and 10 digits of the natural series, you need to find all the options for compiling an automobile region code.

Permutations with and without repetitions

This term is understood as all possible combinations of the n element set.

Task number 10.

How many possible 5-digit numbers can be made from 5 digits? What about six digits of 6 digits? Seven digits out of 7 digits?

The solutions, according to the above formula, are as follows:

But how to be with repetitions? If in such a set there are elements of equal importance, then there will be fewer permutations!

Task number 11.

There are 3 identical pencils and one pen in the box. How many permutations can be made?

The answer is simple: 4! / (3! * 1!) = 4.

Combinatorial problems with solutions

Examples of all possible types of problems with solutions have been given above. Here we will try to deal with more complex cases that occur in our life.

Task types What to find Solution Methods
magic square A figure in which the sum of the numbers in the rows and columns must be the same (its variety is the Latin square). Recurrent relations. A similar problem is solved, but with a much smaller set of elements according to known rules and formulas.
Placement problem A standard production problem (for example, in patchwork technique) is to find possible ways to decompose a quantity of products into cells in a certain order. Inclusions and exclusions. As a rule, it is used in the proof of various expressions.
Tasks about merchants The point is to find all possible ways for people to get from point A to point B. Trajectories. This type of problem is characterized by the geometric construction of possible solutions.

Conclusion

It is worth studying this science, because in an age of rapid technological modernization, specialists will be needed who can provide various solutions to various practical problems.

In this section, we will consider several more combinatorial problems, in the solution of which we will use the formulas and rules established above.

Example 1. In a certain state, every two people differ in a set of teeth. What is the maximum possible number of inhabitants of this state if the maximum number of teeth in a person is 32?

Solution. This problem can be solved in two ways. The first way is that we first look for how many people can have teeth, and then sum the results from to . It is clear that places from 32 can be chosen in ways. Therefore, exactly k teeth have at most inhabitants. And then the total number of inhabitants does not exceed

The answer obtained in this way turned out to be very cumbersome. It is more advantageous to choose another way, which we have already used in solving Example 5 in Section 2 - to apply the method of induction.

If we are talking about one tooth, then only two people are possible - one with a tooth and the second without it. With two teeth, the number of possible sets of teeth becomes four: there is no tooth, there is the first, there is the second, and there are both.

By increasing the number of teeth to three, we double the number of possibilities and get eight different sets. Indeed, each of the considered sets of two teeth can meet twice - when there is no third tooth and when it is.

Let us denote the number of possible sets of teeth as . By the previous reasoning we have proved that Let us assume that equality holds for some and prove that a similar equality holds for the case of teeth. Among all the different sets included in there are exactly sets in which there is no tooth (to the tooth, and the same number of sets in which the tooth is present. Therefore

Thus, with possible teeth, the number of all people who differ in the set of teeth is equal to . In our case, therefore, we get As is known, . Therefore, so that the possible population of this state is greater than the current population of the entire globe.

Note that our result actually gives more than just an estimate of the possible population of a funny state. Comparing the resulting value with the expression written above as the sum of combinations, we arrive at the formula:

Moreover, it follows from the above proof by induction that a similar equality holds for any, that is, that the formula

Example 2. Given a rectangular grid of squares of size . What is the number of different roads on this grid leading from the upper left corner to the lower right (Fig. 46)? (All links of the road are assumed to go either to the right or down - without returning;

a similar situation arises, say, when choosing one of the shortest routes between two urban intersections.)

Solution. Any road is a broken line containing horizontal and vertical links, that is, consisting of links. Different roads differ from each other only in the order of alternation of horizontal and vertical links. Therefore, the number of possible roads is equal to the number of ways in which vertical segments can be chosen from the total number of segments, and therefore there are

We could consider the number of ways to choose not vertical, but horizontal segments, and then we would get the answer But formula (9) from § 3 shows that

The result obtained can be used to derive another interesting formula. Let our grid be square, that is, have dimensions. Then from the above solution it follows that the number of different roads connecting the upper left corner to the lower right is equal to .

However, the number of these roads can be calculated differently. Let's consider a diagonal going from the lower left corner to the upper right one, and denote the vertices lying on this diagonal by . Since each road necessarily passes through one - and, moreover, the only point of this diagonal, the total number of roads is the sum of the number of roads going through the point through the point through the point through the point .

Let us find the number of possible roads going through the point If the points are numbered from bottom to top, as

this is shown in fig. 47, then the point is separated from the lower horizontal at a distance, counting the length of the side of the grid square as a unit of measurement. From the right vertical it is then separated by a horizontal segment.

There will then be roads connecting the upper left corner with the point, and there will be roads connecting the point with the lower right corner (this can be seen from the consideration of equal rectangles, the opposite vertices of which are the upper left corner of the original square and the point and, respectively, the point and the lower right corner of the square). Therefore, the total number of roads connecting the upper left corner to the lower right corner and passing through is equal. But then the total number of all roads is equal to the sum

Comparing the resulting sum with the expression found above for the number of roads, we arrive at the formula:

Example 3. Six passengers board a tram train consisting of three tram cars at a stop. How many different ways can they be distributed in the wagons?

Solution. First of all, it must be pointed out that the problem is not formulated precisely enough and allows two different interpretations. We may be interested either only in the number of passengers in each car, or who exactly is in which car. Consider both possible formulations.

First, consider the case when it is taken into account who is in which car, that is, when the cases “passenger A is in the first car, and passenger B is in the second” and “passenger B is in the first car, and passenger A is in the second” are considered different.

Here we have arrangements with repetitions of three elements of six elements: there are three possibilities for each of the six passengers. Using formula (1) from § 4, we obtain that the number of different ways in which six passengers can be distributed in three cars is equal to:

A different result is obtained if we are only interested in the number of passengers in each car, so that the case "one passenger in the first car and one in the second" is the only one, regardless of which of the passengers is where. Here you need

But counting is no longer placements, but Combinations with repetitions. Using formula (4) from §4, we find that the number of different ways of distributing passengers in this case is equal to

Example 4. In how many ways can 28 dominoes be distributed among 4 players so that everyone gets 7 dominoes?

Solution. The first player can choose 7 dice in ways. After that, the second player must choose 7 dice from the remaining 21 dice. This can be done in ways. The third player can choose C bones in ways, and the fourth player can choose in a way. In total we get

ways of dividing bones.

This problem can be solved differently. We arrange all the bones and give the first 7 bones to the first player, the second 7 bones to the second player, etc. Since 28 bones can be ordered 28! ways, we get 28! section ways. But some of these methods lead to the same results - it doesn't matter to the players in what order the dice come to them, but only what kind of dice they get. Therefore, the result will not change if we somehow rearrange the first 7 bones with each other, then the second 7 bones, etc. The first 7 bones can be rearranged 7! ways, the second 7 bones are also 7! ways, etc. In total, we get permutations that give the same distribution of bones as the given one. Therefore, the number of ways to divide the bones is

Example 5. In how many ways can 40 apples be divided among 4 boys (all apples are considered the same)?

Combinatorics is a branch of mathematics that studies the question of how many combinations of a certain type can be made from given objects (elements).

Multiplication rule (basic combinatorics formula)

The total number of ways in which you can select one element from each group and arrange them in a certain order (that is, get an ordered collection) is equal to:

Example 1

The coin was flipped 3 times. How many different roll results can you expect?

Solution

The first coin has alternatives - either heads or tails. There are also alternatives for the second coin, etc., i.e. .

The desired number of ways:

Addition rule

If any two groups and do not have common elements, then the choice of one element either from , or from , ... or from can be done in ways.

Example 2

There are 30 books on the shelf, 20 of them are mathematical, 6 are technical and 4 are economic. How many ways are there to choose one mathematical or one economic book.

Solution

A mathematical book can be chosen in ways, an economic book in ways.

According to the sum rule, there is a way to choose a mathematical or economic book.

Placements and permutations

Accommodations- These are ordered collections of elements that differ from each other either in composition or in the order of elements.

Placements without repetition when the selected element is not returned to the population before the selection of the next one. Such a choice is called a sequential choice without replacement, and its result is a placement without repetitions from elements by .

The number of different ways in which a sequential selection can be made without returning elements from the population of volume is:

Example 3

The daily schedule consists of 5 different lessons. Determine the number of schedule options when choosing from 11 disciplines.

Solution

Each variant of the schedule represents a set of 5 disciplines out of 11, differing from other variants both in composition and order. That's why:

Permutations are ordered collections that differ from each other only in the order of the elements. The number of all permutations of a set of elements is

Example 4

In how many ways can 4 people be seated at one table?

Solution

Each seating option differs only in the order of the participants, that is, it is a permutation of 4 elements:

Placements with repetitions when the selected element is returned to the population before the selection of the next one. Such a choice is called a sequential choice with return, and its result is a placement with repetitions of elements by .

The total number of different ways in which a choice can be made, returning elements from a population of volume , is

Example 5

The elevator stops at 7 floors. In how many ways can 6 passengers in the elevator go out on these floors?

Solution

Each of the ways to distribute passengers over floors is a combination of 6 passengers over 7 floors, which differs from other combinations both in composition and in their order. Since both one and several passengers can leave the same floor, the same passengers can be repeated. Therefore, the number of such combinations is equal to the number of placements with repetitions of 7 elements by 6:

Combinations

Combinations of n elements by k are called unordered collections that differ from each other by at least one element.

Let several elements be taken from the general population at once (or elements are taken sequentially, but the order of their appearance is not taken into account). As a result of such a simultaneous unordered selection of elements from the general population of volume, combinations are obtained, which are called combinations without repetition from elements by .

The number of combinations of elements is equal to:

Example 6

There are 9 apples in a box. In how many ways can 3 apples be chosen from the box?

Solution

Each choice consists of 3 apples and differs from the others only in composition, that is, it is a combination without repetitions of 9 elements:

Number of ways to choose 3 apples out of 9:

Let elements be selected from the general population of volume, one by one, and each selected element is returned to the general population before the selection of the next. It keeps a record of which elements appeared and how many times, but the order of their appearance is not taken into account. The resulting collections are called combinations with repetitions from elements by .

The number of combinations with repetitions of elements by:

Example 7

The post office sells postcards of 3 types. In how many ways can 6 postcards be bought?

This is a task to find the number of combinations with repetitions of 3 to 6:

Partitioning a set into groups

Let the set of different elements be divided into groups in such a way that elements fall into the first group, elements into the second, elements into the -th group, and . This situation is called partitioning the set into groups.

The number of partitions into groups, when elements fall into the first group, elements into the second, elements into the k-th group, is equal to:

Example 8

A group of 16 people needs to be divided into three subgroups, the first of which should have 5 people, the second - 7 people, and the third - 4 people. In how many ways can this be done?

It should be noted that combinatorics is an independent section of higher mathematics (and not a part of terver) and weighty textbooks have been written in this discipline, the content of which, at times, is no easier than abstract algebra. However, a small share of theoretical knowledge will be enough for us, and in this article I will try to analyze the basics of the topic with typical combinatorial problems in an accessible form. And many of you will help me ;-)

What are we going to do? In a narrow sense, combinatorics is the calculation of various combinations that can be made from a certain set discrete objects. Objects are understood as any isolated objects or living beings - people, animals, mushrooms, plants, insects, etc. At the same time, combinatorics does not care at all that the set consists of a plate of semolina, a soldering iron and a marsh frog. It is fundamentally important that these objects are enumerable - there are three of them. (discreteness) and it is essential that none of them are alike.

With a lot sorted out, now about the combinations. The most common types of combinations are permutations of objects, their selection from a set (combination) and distribution (placement). Let's see how this happens right now:

Permutations, combinations and placements without repetition

Do not be afraid of obscure terms, especially since some of them are really not very successful. Let's start with the tail of the title - what does " without repetition"? This means that in this section we will consider sets that consist of various objects. For example, ... no, I won’t offer porridge with a soldering iron and a frog, something tastier is better =) Imagine that an apple, a pear and a banana materialized on the table in front of you (if there are any, the situation can be simulated in real). We lay out the fruits from left to right in the following order:

apple / pear / banana

Question one: In how many ways can they be rearranged?

One combination has already been written above and there are no problems with the rest:

apple / banana / pear
pear / apple / banana
pear / banana / apple
banana / apple / pear
banana / pear / apple

Total: 6 combinations or 6 permutations.

Well, it was not difficult to list all possible cases here, but what if there are more objects? Already with four different fruits, the number of combinations will increase significantly!

Please open reference material (Manual is easy to print) and in paragraph number 2, find the formula for the number of permutations.

No torment - 3 objects can be rearranged in ways.

Question two: In how many ways can you choose a) one fruit, b) two fruits, c) three fruits, d) at least one fruit?

Why choose? So they worked up an appetite in the previous paragraph - in order to eat! =)

a) One fruit can be chosen, obviously, in three ways - take either an apple, or a pear, or a banana. The formal count is based on formula for the number of combinations:

The entry in this case should be understood as follows: “in how many ways can you choose 1 fruit out of three?”

b) We list all possible combinations of two fruits:

apple and pear;
apple and banana;
pear and banana.

The number of combinations is easy to check using the same formula:

The entry is understood similarly: “in how many ways can you choose 2 fruits out of three?”.

c) And finally, three fruits can be chosen in a unique way:

By the way, the formula for the number of combinations also makes sense for an empty sample:
In this way, you can choose not a single fruit - in fact, take nothing and that's it.

d) In how many ways can you take at least one fruit? The “at least one” condition implies that we are satisfied with 1 fruit (any) or any 2 fruits or all 3 fruits:
ways you can choose at least one fruit.

Readers who have carefully studied the introductory lesson on probability theory already figured something out. But about the meaning of the plus sign later.

To answer the next question, I need two volunteers ... ... Well, since no one wants, then I will call to the board =)

Question three: In how many ways can one fruit be distributed to Dasha and Natasha?

In order to distribute two fruits, you must first select them. According to paragraph "be" of the previous question, this can be done in ways, I will rewrite them again:

apple and pear;
apple and banana;
pear and banana.

But now there will be twice as many combinations. Consider, for example, the first pair of fruits:
you can treat Dasha with an apple, and Natasha with a pear;
or vice versa - Dasha will get the pear, and Natasha will get the apple.

And such a permutation is possible for every pair of fruits.

Consider the same student group that went to the dance. In how many ways can a boy and a girl be paired?

Ways you can choose 1 young man;
ways you can choose 1 girl.

So one young man and one girl can be chosen: ways.

When 1 object is selected from each set, then the following principle of counting combinations is valid: “ each an object from one set can form a pair with every object of another set.

That is, Oleg can invite any of the 13 girls to dance, Evgeny can also invite any of the thirteen, and other young people have a similar choice. Total: possible pairs.

It should be noted that in this example, the "history" of pair formation does not matter; however, if initiative is taken into account, then the number of combinations must be doubled, since each of the 13 girls can also invite any boy to dance. It all depends on the conditions of a particular task!

A similar principle is valid for more complex combinations, for example: in how many ways can two young men be chosen and two girls to participate in a KVN skit?

Union AND hints unambiguously that the combinations must be multiplied:

Possible groups of artists.

In other words, each pair of boys (45 unique pairs) can compete with any a couple of girls (78 unique couples). And if we consider the distribution of roles between the participants, then there will be even more combinations. ... I really want to, but still I will refrain from continuing, so as not to instill in you an aversion to student life =).

The multiplication rule applies to more multipliers:

Task 8

How many three-digit numbers are there that are divisible by 5?

Solution: for clarity, we denote this number with three asterisks: ***

V hundreds place you can write any of the numbers (1, 2, 3, 4, 5, 6, 7, 8 or 9). Zero is not good, because in this case the number ceases to be three-digit.

But in tens place(“in the middle”) you can choose any of the 10 digits: .

By condition, the number must be divisible by 5. The number is divisible by 5 if it ends in 5 or 0. Thus, in the least significant digit, we are satisfied with 2 digits.

Total, there is: three-digit numbers that are divisible by 5.

At the same time, the work is deciphered as follows: “9 ways you can choose a number in hundreds place and 10 ways to select a number in tens place and 2 ways in unit digit»

Or even simpler: each from 9 digits to hundreds place combined with each of 10 digits tens place and with each of two digits units digit».

Answer: 180

And now…

Yes, I almost forgot about the promised commentary to problem No. 5, in which Borya, Dima and Volodya can be dealt one card each in different ways. Multiplication here has the same meaning: in ways you can extract 3 cards from the deck AND in each sample to rearrange them ways.

And now the problem for an independent solution ... now I’ll come up with something more interesting, ... let it be about the same Russian version of blackjack:

Task 9

How many winning combinations of 2 cards are there in a "point" game?

For those who don't know: wins combination 10 + ACE (11 points) = 21 points and, let's consider the winning combination of two aces.

(the order of the cards in any pair does not matter)

Short solution and answer at the end of the lesson.

By the way, it is not necessary to consider an example primitive. Blackjack is almost the only game for which there is a mathematically justified algorithm that allows you to beat the casino. Those who wish can easily find a lot of information about the optimal strategy and tactics. True, such masters quickly fall into the black list of all establishments =)

It's time to consolidate the material covered with a couple of solid tasks:

Task 10

Vasya has 4 cats at home.

a) In how many ways can the cats be seated in the corners of the room?
b) In how many ways can cats be allowed to roam?
c) in how many ways can Vasya pick up two cats (one on the left, the other on the right)?

We decide: first, it should again be noted that the problem is about different objects (even if the cats are identical twins). This is a very important condition!

a) Silence of cats. This execution is subject to all cats at once
+ their location is important, so there are permutations here:
ways you can seat cats in the corners of the room.

I repeat that when permuting, only the number of different objects and their relative position matters. Depending on his mood, Vasya can seat the animals in a semicircle on the sofa, in a row on the windowsill, etc. - there will be 24 permutations in all cases. For convenience, those who wish can imagine that the cats are multi-colored (for example, white, black, red and striped) and list all possible combinations.

b) In how many ways can cats be allowed to roam?

It is assumed that cats go for a walk only through the door, while the question implies indifference about the number of animals - 1, 2, 3 or all 4 cats can go for a walk.

We consider all possible combinations:

Ways you can let go for a walk one cat (any of the four);
ways you can let two cats go for a walk (list the options yourself);
ways you can let three cats go for a walk (one of the four sits at home);
way you can release all the cats.

You probably guessed that the obtained values ​​​​should be summed up:
ways to let cats go for a walk.

For enthusiasts, I offer a complicated version of the problem - when any cat in any sample can randomly go outside, both through the door and through the window of the 10th floor. There will be more combinations!

c) In how many ways can Vasya pick up two cats?

The situation involves not only the choice of 2 animals, but also their placement on the hands:
ways you can pick up 2 cats.

The second solution: in ways you can choose two cats and ways to plant every a couple in hand:

Answer: a) 24, b) 15, c) 12

Well, to clear my conscience, something more specific on the multiplication of combinations .... Let Vasya have 5 extra cats =) How many ways can you let 2 cats go for a walk and 1 cat?

That is, with each a couple of cats can be released every cat.

Another button accordion for an independent decision:

Task 11

3 passengers got into the elevator of a 12-storey building. Everyone, independently of the others, can exit on any (starting from the 2nd) floor with the same probability. In how many ways:

1) Passengers can get off at the same floor (exit order doesn't matter);
2) two people can get off on one floor and a third on another;
3) people can get off at different floors;
4) Can passengers exit the elevator?

And here they often ask again, I clarify: if 2 or 3 people go out on the same floor, then the order of exit does not matter. THINK, use formulas and rules for addition/multiplication combinations. In case of difficulty, it is useful for passengers to give names and reason in what combinations they can get out of the elevator. No need to be upset if something does not work out, for example, point number 2 is quite insidious, however, one of the readers found a simple solution, and once again I express my gratitude for your letters!

Complete solution with detailed comments at the end of the tutorial.

The final paragraph is devoted to combinations that also occur quite often - according to my subjective assessment, in about 20-30% of combinatorial problems:

Permutations, combinations and placements with repetitions

The listed types of combinations are outlined in paragraph No. 5 of the reference material Basic formulas of combinatorics, however, some of them may not be very clear on first reading. In this case, it is advisable to first familiarize yourself with practical examples, and only then comprehend the general formulation. Go:

Permutations with repetitions

In permutations with repetitions, as in "ordinary" permutations, the whole set of objects at once, but there is one thing: in this set, one or more elements (objects) are repeated. Meet the next standard:

Task 12

How many different letter combinations can be obtained by rearranging cards with the following letters: K, O, L, O, K, O, L, L, H, I, K?

Solution: in the event that all letters were different, then a trivial formula should be applied, however, it is quite clear that for the proposed set of cards, some manipulations will work "idle", so, for example, if you swap any two cards with the letters "K in any word, it will be the same word. Moreover, physically the cards can be very different: one can be round with a printed letter “K”, the other is square with a drawn letter “K”. But according to the meaning of the problem, even such cards considered the same, since the condition asks about letter combinations.

Everything is extremely simple - in total: 11 cards, including the letter:

K - repeated 3 times;
O - repeated 3 times;
L - repeated 2 times;
b - repeated 1 time;
H - repeated 1 time;
And - repeats 1 time.

Check: 3 + 3 + 2 + 1 + 1 + 1 = 11, which is what we wanted to check.

According to the formula number of permutations with repetitions:
various letter combinations can be obtained. More than half a million!

For a quick calculation of a large factorial value, it is convenient to use the standard Excel function: we score in any cell =FACT(11) and click Enter.

In practice, it is quite acceptable not to write down the general formula and, in addition, to omit the unit factorials:

But preliminary comments about repeated letters are required!

Answer: 554400

Another typical example of permutations with repetitions is found in the problem of arranging chess pieces, which can be found in the warehouse ready-made solutions in the corresponding pdf. And for an independent solution, I came up with a less template task:

Task 13

Alexey goes in for sports, and 4 days a week - athletics, 2 days - strength exercises and 1 day of rest. In how many ways can he schedule his weekly classes?

The formula doesn't work here because it takes into account overlapping permutations (for example, when strength exercises on Wednesday are swapped with strength exercises on Thursday). And again - in fact, the same 2 strength training sessions can be very different from each other, but in the context of the task (in terms of the schedule), they are considered the same elements.

Two-line solution and answer at the end of the lesson.

Combinations with repetitions

A characteristic feature of this type of combination is that the sample is drawn from several groups, each of which consists of the same objects.

Everyone worked hard today, so it's time to refresh yourself:

Task 14

The student cafeteria sells sausages in dough, cheesecakes and donuts. In how many ways can five cakes be purchased?

Solution: immediately pay attention to the typical criterion for combinations with repetitions - according to the condition, not a set of objects as such, but different kinds objects; it is assumed that there are at least five hot dogs, 5 cheesecakes and 5 donuts on sale. The pies in each group, of course, are different - because absolutely identical donuts can only be simulated on a computer =) However, the physical characteristics of the pies are not essential for the meaning of the problem, and hot dogs / cheesecakes / donuts in their groups are considered the same.

What can be in the sample? First of all, it should be noted that there will definitely be identical pies in the sample (because we choose 5 pieces, and 3 types are offered to choose from). Options here for every taste: 5 hot dogs, 5 cheesecakes, 5 donuts, 3 hot dogs + 2 cheesecakes, 1 hot dog + 2 + cheesecakes + 2 donuts, etc.

As with "regular" combinations, the order of selection and placement of pies in the sample does not matter - they just chose 5 pieces and that's it.

We use the formula number of combinations with repetitions:
way you can buy 5 pies.

Bon Appetit!

Answer: 21

What conclusion can be drawn from many combinatorial problems?

Sometimes, the most difficult thing is to understand the condition.

A similar example for a do-it-yourself solution:

Task 15

The wallet contains a fairly large number of 1-, 2-, 5- and 10-ruble coins. In how many ways can three coins be taken out of the wallet?

For self-control purposes, answer a couple of simple questions:

1) Can all coins in the sample be different?
2) Name the "cheapest" and the most "expensive" combination of coins.

Solution and answers at the end of the lesson.

From my personal experience, I can say that combinations with repetitions are the rarest guest in practice, which cannot be said about the following type of combinations:

Placements with repetitions

From a set consisting of elements, elements are selected, and the order of the elements in each sample is important. And everything would be fine, but a rather unexpected joke is that we can choose any object of the original set as many times as we like. Figuratively speaking, from "the multitude will not decrease."

When does it happen? A typical example is a combination lock with several disks, but due to the development of technology, it is more relevant to consider its digital descendant:

Task 16

How many 4-digit pin codes are there?

Solution: in fact, to solve the problem, it is enough to know the rules of combinatorics: you can choose the first digit of the pin code in ways and ways - the second digit of the pin code and in as many ways - a third and as many - the fourth. Thus, according to the rule of multiplication of combinations, a four-digit pin code can be composed: in ways.

And now with the formula. By condition, we are offered a set of numbers, from which numbers are selected and placed in a certain order, while the numbers in the sample can be repeated (i.e. any digit of the original set can be used an arbitrary number of times). According to the formula for the number of placements with repetitions:

Answer: 10000

What comes to mind here ... ... if the ATM "eats" the card after the third unsuccessful attempt to enter the pin code, then the chances of picking it up at random are very illusory.

And who said that there is no practical sense in combinatorics? A cognitive task for all readers of the site:

Problem 17

According to the state standard, a car license plate consists of 3 numbers and 3 letters. In this case, a number with three zeros is not allowed, and the letters are selected from the set A, B, E, K, M, H, O, R, C, T, U, X (only those Cyrillic letters are used, the spelling of which matches the Latin letters).

How many different license plates can be composed for a region?

Not so, by the way, and a lot. In large regions, this number is not enough, and therefore for them there are several codes for the inscription RUS.

Solution and answer at the end of the lesson. Don't forget to use the rules of combinatorics ;-) …I wanted to brag about being exclusive, but it turned out to be not exclusive =) I looked at Wikipedia - there are calculations there, however, without comments. Although for educational purposes, probably, few people solved it.

Our fascinating lesson has come to an end, and in the end I want to say that you did not waste your time - for the reason that the combinatorics formulas find another vital practical application: they are found in various tasks on probability theory,
and in tasks on the classical definition of probability- especially often

Thank you all for your active participation and see you soon!

Solutions and answers:

Task 2: Solution: find the number of all possible permutations of 4 cards:

When a card with a zero is in 1st place, the number becomes three-digit, so these combinations should be excluded. Let zero be in the 1st place, then the remaining 3 digits in the least significant digits can be rearranged in ways.

Note : because there are few cards, it is easy to list all such options here:
0579
0597
0759
0795
0957
0975

Thus, from the proposed set, you can make:
24 - 6 = 18 four-digit numbers
Answer : 18

Task 4: Solution: 3 cards can be selected from 36 ways. and
2) The “cheapest” set contains 3 ruble coins, and the most “expensive” set contains 3 ten-ruble coins.

Task 17: Solution: ways you can make a digital combination of a license plate, while one of them (000) should be excluded:.
ways you can make a letter combination of a car number.
According to the rule of multiplication of combinations, everything can be composed:
car numbers
(each digital combination combined with each letter combination).
Answer : 1726272

We recommend reading

Top