Meng Xin Shallow talk permutation combination small knowledge

Source: Internet
Author: User

The most important thought of permutation and combination: Enter the role, what you want to do, where you will be.

Permutation combinations

Two important properties: the principle of adding multiplication;

In Layman's words:

The principle of addition: every thing (each kind), can be completed successfully

Multiplication principle: Every step is to complete one thing " full unnecessary"

Specific methods are:

binding method, intervening spaces method, excluding sequence method, exclusion method, exhaustive method, baffle method;

Bezel Method (example):

Example 1:

x+y+z=100 (x, y, z all belong to a positive integer), ask how many combinations of solutions;

In fact, the problem is equivalent to having 100 balls, three barrels, and then the 100 balls are divided into each barrel to ensure that the bucket is not empty.

Ideas:

Now use a line of 0 to indicate that there are 100 balls:

000 ... 000000.....000

There are now two panels | |, to plug into this sequence, you can see the position can be inserted there are 101, we know that each number is a positive integer (each bucket is not empty), then the leftmost or most right can not plug, and can not be together, then means minus the two ends of the position, and then the rest of the position to take out two to the line; 2,99) (Note: This is the combination number representation);

Example 2:

x+y+z=100 (x, Y, Z is a natural number), there are many combinations of solutions

Method One:

or first to the problem of barrels and balls, which is equivalent to having 100 balls, three barrels, and then splitting the 100 balls into each barrel, the bucket can be empty;

Borrow 3 Ball first, put in each barrel first, then the question becomes now: have 103 ball, have three barrels, then divide this 103 ball into each barrel, make sure the bucket is not empty.

The answer is C (2,102);

Method Two:

According to the method of Example 1, then is where the board is where, the partition to participate in the activity, how many different positions of the partition;

The answer is C (2,102);

Various examples:

Example 1:

Test instructions: Existing: 3 1 cents, 6 cents, 4 10 yuan, total number of non-0 coins

Ideas:

This non-0 currency is bound to use 10 yuan, cents, cents composition;

So the difference might be: 5 * 7 * 4 But there's a situation where it's not all 0.

So we have to reduce it by 1;

Example 2:

Set A={A1,A2,A3,A4}; set B={B1,B2,B3,B4};

Now let a set go and B set combination, require B1 combination can not be A1,B4 combination cannot be A4;

Transformation is: A four people in a B-butyl run, a do not run the first stick, b do not run the fourth stick of the Run method;

The first approach:

Classification (a bit of skill), I let A1 go and B4 combination, A (3,3); I let A1 not and B4 combination, now is a1,a4 can not and B4 combination, so from the other two people to choose a and B4 combination, then A1 can not and B1 combination, and then from two people pick a and B1 combination, Then the remaining two random stations, namely C (*C) *a (2,2);

The second approach:

We are directly to let A and b randomly to mix, then is a (a), very much, when the A1 in the B1 when the A (3,3), when the A4 in B4 more A (3,3), now when a ( -2*a) 3,3, is obviously reduced, to add a (2,2);

So the answer is: A (bis) -2a (3,3) +a (2,2);

Example 3:

Set A={A1,A2,A3,A4}; set B={B1,B2,B3,B4};

Solution 1, the principle of tolerance: more reduction, minus the addition;

A (BIS)-C (1,4) *a (3,3) +c (2,4) *a (2,2)-C (3,4) *a (+) +c (bis);

Solution 2,A1 first pick;

3*3*1*1;

Another kind of queuing problem;

Queued issues:

Cases:

8 people take photos, according to the following requirements,

1, a ethylene-propylene must be adjacent to the adjacent, Ding-e;

A *a (2,5) *a (3,3) is a single piece of the bundle;

2, the middle of a B, C-butyl not both ends;

0 0 0 0 0 0 0 0

A (2,2) *a (2,4) *a (bis);

3, a not on the left side, a not on the right side of B

0 0 0 0 0 0 0 0

Total minus superfluous, except order,

       A (8,8)/A (2,2)-A (7,7)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.