Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:

Введение в комбинаторику и теорию вероятностей

..pdf
Скачиваний:
13
Добавлен:
15.11.2022
Размер:
865.19 Кб
Скачать

2.THE COMBINATORIAL ANALYSIS

2.1.SOME INFORMATION ABOUT COMBINATORIAL

ANALYSIS. THE MAIN RULE OF COMBINATORICS

A man often has to deal with problems where it is necessary to count all possible ways of placing some objects or the number of all possible ways of performing some action. The hero of a Russian fairy-tale having to cross one of three roads used to read in a stone: “If you go straight, you’ll lose your head, if you go left, you’ll lose your sword, if you go right, you’ll lose your horse.” Then the story told us, how to solve the problem he had had to make his own choice. But a modern man also has to choose different ways or variants. They are formed in different combinations. The part of mathematics called combinatorial analysis deals with solving the problem of how many different combinations there can be in this or that case.

Every day people of many professions have to deal with combinatorial values: a chemistwhen he considers different possible types of atomic and molecular bonds; a biologistwhen he studies different possible sequences of alternating amino acids in albuminous compounds; a designerwhen he designs different machines and mechanisms; a dispatcherwhen he makes schedule of movement and so on.

When evaluating average total results on the whole, we are forced to assess how many different combinations of elements under some conditions can be constructed from the objects given. Now it will be clear that the combinatorial analysis is a body of the theory of probability. Combinatorial analysis is the science of the number of combinations of elements satisfying certain conditions.

113

В последнее время усилился интерес к комбинаторике, что также обусловливается бурным развитием кибернетики и вычислительной техники.

Основной прием подсчета элементов, обладающих некоторым свойством, состоит в выделении в структуре задачи других элементов, число которых подсчитывается проще.

Большинство комбинаторных задач решается с помощью двух основных правил: правила суммы и правила произведения (основного правила комбинаторики).

Правилосуммы. ЕслинекоторыйобъектАможновыбрать m способами, а другой объект В можно выбрать n способами, то выбор«АилиВ» можноосуществить (m + n) способами.

Пример 1. От Октябрьской площади до цирка можно проехать через Северную и Южную дамбы. В первом случае количество дорог равно 4, а во втором – 3. Сколькими способами можно добраться от Октябрьской площади до цирка?

Решение. Очевидно, число разных путей от Октябрьской площади до цирка равно 4 + 3 = 7.

Введем еще одно правило, которое носит название правила произведения (основного правила комбинаторики) и часто применяется при решении комбинаторных задач. Приведем пример задачи, в которой мы вынуждены использовать это правило.

Пример 2. Из Перми до Чайковского можно добраться пароходом, поездом, автобусом или самолетом; из Чайковского до Ижевска – пароходом или автобусом. Сколькими способами можно осуществить путешествие по маршруту Пермь – Чайковский – Ижевск?

Решение. Число разных путей из Перми до Ижевска равно 4 2 = 8, так как, выбрав один из возможных способов путешествия из Перми до Чайковского, имеем два возможных способа путешествия из Чайковского до Ижевска.

Соображения, которые были приведены при решении примера 2, доказывают справедливость следующего простого утверждения, которое и называется основным правилом комбинаторики (правилом произведения).

124

Ever increasing interest to the combinatorial analysis is justified by rapid development of cybernetics and computers.

The main way to count the elements that have one common property, is to pick out other elements in the structure of the problem the number of which is calculated more easily.

The majority of combinatorial problems is solved with the help of two rules: the rule of sum and the rule of product (the main rule of combinatorial analysis).

The rule of sum. If an object A can be chosen in m ways and another object B can be chosen in n ways, then the choice of “A or B” can be done in m+n ways.

Example 1. You can go from St. Louis to Chicago via the southern or the northern ways. In the first case the number of roads is equal to 4, in the second case – 3. How many ways are there from St. Louis to Chicago?

Solution. It is easy to note that the number of different ways from St. Louis to Chicago is equal to 3 + 4 = 7.

Let us introduce into practice one more rule known as the main rule of combinatorial analysis or the rule of product. It is used very often in the solution of combinatorial problems. It will be good to give here the problem where we are forced to use this rule.

Example 2. You can get from St. Louis to Chicago by bus, by car, by plane, by train and from Chicago to Baltimore by car and by plane. How many ways are there from St. Louis to Baltimore?

Solution. The number of different ways of traveling from St. Louis to Baltimore is 4·2 = 8 because each of the four ways of traveling from St. Louis to Chicago corresponds to two ways of traveling from Chicago to Baltimore.

The thoughts we have used in example 2 give us the possibility to formulate the following simple statement which is usually called the main rule of combinatorial analysis.

135

Пусть некоторый выбор требуется для выполнения одного за другим k действий. Если первое действие можно выполнить n1 способами, второе (после него) – n2, третье (после выполнения первых двух) – n3 способами и так до k-го действия, которое можно выполнить nk способами (после выполнения предыдущих k – 1 действий), то все k действий можно выполнить n1 n2 n3 nk способами.

Пример 3. Сколько четырехзначных чисел можно составить из цифр 0, 1, 2, 3, 4, 5, если:

а) ни одна из цифр не повторяется больше одного раза в записи числа;

б) цифры в записи числа могут повторяться; в) цифры в записи числа могут повторяться, но число

должно быть нечетным.

Решение.

а) Первой цифрой может быть одна из 5 цифр 1, 2, 3, 4, 5 (0 не может быть первой цифрой, потому что в таком случае число не четырехзначное). Если первая цифра выбрана, то вторая может быть выбрана 5 способами, третья – 4 способами, четвертая – 3 способами. Согласно правилу умножения общее число способов равно 5 5 4 3 = 300.

б) Для первой цифры имеем 5 возможностей (1, 2, 3, 4, 5),

для каждой из следующих цифр –

6 возможностей (0, 1, 2,

3, 4, 5). Следовательно, число

искомых чисел равно

5 6 6 6 =1800.

 

в) Первой цифрой может быть одна из 5 цифр 1, 2, 3, 4, 5, а последней 1, 3, 5. Следовательно, общее количество чисел рав-

но 5 6 6 3 = 540.

Пример 4. Известно, что при подборе команд корабля возникает вопрос о психологической совместимости. Пусть требуется составить команду из трех человек: командира, инженера, врача. На место командира есть 4 кандидата a1, a2, a3, a4, на место инженера есть 3 кандидата b1, b2, b3, на место врача есть 3 кандидата c1, c2, c3. Проведенная проверка показала, что

146

If a choice requires realization of k actions one after another. If the first action can be accomplished in n1 ways, the second one-in n2 ways, the third one-in n3 ways and so on up to the k-th action that can be accomplished in nk ways (after realization of k-1 actions), then all the actions can be accomplished in thestated order in

n1*n2*...*nk ways.

Example 3. How many 4-digit numbers can we construct from the digits 0, 1, 2, 3, 4, 5, if

a) no one digit can be repeated more than once in the writing of the number we need;

b)all digits can be repeated;

c)all digits can be repeated, but the number must be odd;

Solution.

a)The first digit can be been any digit from 1, 2, 3, 4, 5 (zero is impossible here, because in this case we will have a 3-digit number). When we have already done the choice of the first digit, the second one can be chosen in 5 ways, the third onein 4 ways, the fourth one-in 3 ways. According to the rule of product, we have the common number of ways: 5·5·4·3 = 300.

b)For the first digit we have 5 possibilities (1, 2, 3, 4, 5) and for every next one-6. That is why there are 5·6·6·6 = 1080 ways to construct the number we need.

c)Here we have the same possibilities for the first, the second and the third digits as in the previous case. But the last digit can be chosen in 3 ways (0, 2, 4), because of number must be odd. As a result we have 5·6·6·3 = 540 ways.

Example 4. It is known that when we select a ship team, there will be a question of psychological compatibility. Let us suppose that the team consists of 3 members: a captain, an engi-

neer, and a doctor. 4 candidates want to be a captain: a1, a2, a3, a4; 3 candidates want to be an engineer: b1, b2, b3 and 3 candidates want to be a doctor: c1, c2, c3. The verification has shown the first captain is psychologically compatible only with the second and the

157

первый командир психологически совместим только с первым и третьим инженерами и со вторым и третьим врачами; второй командир психологически совместим лишь с первым и вторым инженерами, но зато со всеми врачами; третий командир психологически совместим с первым и вторым инженерами и с первым и третьим врачами; четвертый командир психологически совместим со всеми инженерами, но только со вторым врачом. Кроме того, первый инженер не совместим с третьим врачом, второй инженер несовместим с первым врачом, а третий инженер несовместим со вторым врачом. Сколькими способами в этих условиях можно составить команду?

Решение. Если бы не было ограничений, связанных с психологической совместимостью, то число возможных команд по правилу произведения равно 4·3·3 = 36. С учетом же данных психологических тестов таких вариантов всего 10. Последнее можно проследить, составив дерево психологической совместимости.

2.2. СОЕДИНЕНИЯ В КОМБИНАТОРИКЕ (СОЧЕТАНИЯ, ПЕРЕСТАНОВКИ, РАЗМЕЩЕНИЯ)

Всякая совокупность элементов произвольного рода, обладающая некоторым общим свойством, образует множество (со-

единение). Можно рассматривать множество всех действительных чисел, множество натуральных чисел, множество всех учащихся данной школы, множество парт в данном классе и т.п. Множество считается определенным, если указаны все его элементы или их общее свойство. Эти элементы могут быть указаны с помощью некоторого общего признака или просто с помощью некоторого списка, где указаны все элементы. Последний способ возможен лишь в том случае, если множество имеет конечное число элементов; такие множества называются конечными. Характеристикой конечногомножества являетсячисло его элементов.

168

third doctors, the second captain is psychologically compatible only with the first and the second engineers, but with all the doctors, the third captain is psychologically compatible with the first and the third doctors, the fourth captain is psychologically compatible with all an engineers but only with the second doctor. Besides, the first engineer is not psychologically compatible with the third doctor, the second engineer is not psychologically compatible with the first doctor, the third engineer is not psychologically compatible with the second doctor. How many teams are possible are under these conditions?

Solution. If we didn’t have any restrictions to psychological compatibility, then according to the rule of product, the number of possible teams would be 4·3·3 = 36. But taking into account the data of psychological tests there are only 10 variants like these. The last one can be described by drawing a tree of psychological compatibility (without combinatorial analysis).

2.2. THE CONNECTIONS IN COMBINATORICS

(COMBINATIONS, PERMUTATIONS, ARRANGEMENTS)

Every aggregate of different elements, that have one common property, is called a set. It is possible to consider a set of natural numbers, set of pupils who study at one school, a set of chairs in one room and so on. A set is considered to be definite, if all the elements of the sets or their common property are indicated. These elements can be described with the help of their common criterion or a list of all the elements. The latter is possible for describing a definite set. It is the set that has the finite number of its elements. The number of its elements is a characteristic of the finite set.

179

Множества обозначаются большими латинскими буквами, а их элементы – малыми ( a A означает, что a есть элемент множества А или элемент a принадлежит множеству А). Количество элементов конечного множества обозначается ( N (A) ).

Если каждый элемент множества В принадлежит множеству А, то В называется подмножеством множества А ( B A ). Если задано некоторое множество А, то можно рассматривать новое множество M (A) – множество всех его подмножеств. Через Mk (A) бу-

дем обозначать множество всех подмножеств А, которые имеют k элементов: B M k (A), если B M (A) и N (B) = k.

С помощью введенных двух правил можно решить фактически все перечислительные задачи теории множеств, но некоторые типы задач встречаются чаще других. Их определяют как базовые и вводят как особые функции. Прежде чем сделать это, обратим внимание на то, что при решении перечислительных задач оказываются принципиальными следующие моменты.

1.Имеем мы дело с упорядоченными множествами (наборами, для которых порядок элементов существен) или с неупорядоченными (наборы, отличающиеся только порядком упаковки, – неразличимы). В первом случае говорят, что мы подсчитываем число размещений, а во втором – число сочетаний.

2.Элементы, входящие в набор, различны и не могут повторяться, или допустимо повторное использование одних и тех же элементов в наборе.

Приведем примеры различного типа перечисленных задач. У продавца 10 цветков. Сколько различных букетов можно составить из них, если в каждом букете 3 цветка? (число

сочетаний без повторений).

Есть 10 красок. Сколько может быть двуцветных флагов? (число размещений без повторений).

У продавца цветы 10 сортов. Сколько можно составить букетов из трех цветов? (число сочетаний с повторениями).

Есть 10 цифр. Сколько можно составить двузначных чисел? (число размещений с повторениями).

1820

Sets are denoted by big Latin letters and their elements - by small ones. (the writing a A means that ‘a’ is an element of the set A). The number of elements of the finite set is denoted by N(A). If every element of the set B is an element of the set A, then the set B is called a proper subset of the set A (B Α). If we have the set A, then a new set M(A) (the set of all its subsets) can be under consideration. Let us denote by Mk(A) the set of all subsets of the k-ele-

ment set A. We can write B Mk(Α), if B M(Α) and N(B) = k.

Now we can practically solve any problems of the theory of sets, but some types of these problems are used more often than others. They are defined as the basic problems and are given as special functions. Before doing it, let us note it is very important to list the following moments that help you to solve combinatorial problems.

1) When we have ordered sets, where the order of elements in our collections is very considerable, in this case me must find the number of arrangements. When we deal with non-ordered sets, where two elements in our collection are considered to be indiscernible, if they are distinguished from each other only by the order of elements, in this case we must find the number of combinations.

2) The elements we have in our collection are different and can not be repeated or some repeated using the same elements in the collection is possible.

We cite a few examples of different types of the problems in question.

A seller has 10 flowers. How many bouquets can he make up, if every bunch consists of 3 flowers? (the number of nonrecurrent combinations);

There are 10 colors. How many two-colored flags can we have? (the number of non-recurrent arrangements);

A seller has flowers of 10 different types. How many bouquets can he make up, if every bouquet consists of 3 flowers? (the number of recurrent combinations);

There are 10 digits. How many two-digit numbers can we make up? (the number of recurrent arrangements).

1921

В дальнейшем нам понадобится понятие n!.

Будем обозначать n! (читается n-факториал) произве-

дение всех

натуральных чисел от 1 до n включительно

( n!= 1 2 3

n ). Условились считать, что 0!= 1!= 1.

Перейдемтеперьк стандартнымперечислительнымзадачам.

Произвольное k-элементное подмножество n-элемент- ного множества называется сочетанием (комбинацией) из n

элементов по k. Порядок элементов в подмножестве не имеет значения.

Число сочетаний из n элементов по k обозначается Cnk

n

или .

k

Теорема. Число сочетаний из n элементов по k вычисляется следующим образом:

Cnk =

n(n 1) (n k + 1)

=

n!

 

.

(2.1)

 

k!(n k)!

 

1 2 k

 

 

Доказательство. Пусть A – множество из n элементов.

Чтобы построить его k-элементное подмножество,

нужно к

(k 1) -элементному подмножеству присоединить один из оставшихся n (k 1) = n k + 1 элементов. Поскольку (k 1) -эле-

ментных подмножеств имеется Cnk 1 и каждое из них можно сделать k-элементным n k + 1 способами, то, таким образом, мы получим (n k + 1)Cnk 1 подмножеств. Но не все они будут различными, так как любое k-элементное подмножество может быть построено из (k 1) -элементного подмножества k способами присоединением элемента перед первым, перед вторым ит.д. до (k 1) элементом. Как уже отмечалось, порядок элементов в подмножестве не имеет значения, поэтому вычисленное нами число в k раз больше, чем Cnk , т.е. k Cnk = (n k + 1)Cnk 1 .

20