A
A
Andrey Golubkov2016-09-13 19:33:00
Combinatorics
Andrey Golubkov, 2016-09-13 19:33:00

How to calculate the number of options?

Task 1


How many solutions does the equation x + y + z = 8 have:
a) in non-negative integers;
b) in positive integers?

Wrote a program, went through the numbers in cycles, got the answers
A- will be 42
B- 21
Problem 2
How many can be made from the numbers 1, 2, 3, 4:
a) two-digit numbers;
b) two-digit numbers with different digits;

A-16
B-12
Please explain what formulas all this is considered.

Answer the question

In order to leave comments, you need to log in

2 answer(s)
A
Alexey, 2016-09-13
@Android97

Task 1 - look at math.hashcode.ru/questions/77079/%D0%BA%D0%BE%D0%B...
Task 2 - look at www.mathelp.spb.ru/book2/tv3.htm
Maybe not exactly the same, but similar cases, did not look in detail.

A
Andrew, 2016-09-14
@OLS

You put absolutely the right tag - Combinatorics. This branch of mathematics began as a method for counting the number of different options / combinations.
Most often, combinatorics tasks involve sequentially fixing the number of states of variables one by one.
Let's start with the second task - it is somewhat easier.
2a) The first digit of a two-digit number with given conditions can be chosen in 4 ways; after the first digit is determined, the second can be selected again in 4 ways. Total options 4x4=16.
2b) The first digit of a two-digit number with given conditions can be chosen in 4 ways; after the first digit is determined, the second can be chosen in only three ways, because the number cannot match the one in the first position. Total options 4x3=12.
1a) Non-negative integers that can play the role of "x" - 9 (from 0 to 8 inclusive). After "x" is fixed, "y" can be chosen in (8-x+1) ways, for example, if x=7, then only 0 and 1 remain for "y". After "x" and "y " are fixed, "z" can always be chosen in only 1 way, therefore, it does not increase the number of solutions. It remains to calculate the sum of the number of possible combinations (we count by "y"-kam) = (9+8+7+...+1) - according to the formula for the sum of an arithmetic progression - 10*9/2 = 45. And accordingly, your the answer is wrong.
1b) Similarly, but reducing the number of "x"s to 6 (from 1 to 6 inclusive), and the number of "y" to (7) ways. Sum (6+5+...+1) = 7*6/2 = 21.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question