r/MathHelp • u/Gianja98 • Nov 04 '20
Need an explanation about combinatorics
Hi guys, next week I have a Discrete Math exam and I'm struggling with this calcs. Let me explain.
Studying combinatorics comes an example exercise, already done that says:
"How many numbers in base 5 have 4 digits and at least one zero?"
So the explaination seems pretty straightfoward, we have to consider the numbers in the interval (1000, 4444). So we sum : #numberWithFourZeros + #numberWithThreeZeros + #numberWithTwoZeros + #numberWithOneZero.
So of course #numberWithFourZero = 0.
#numberWithThreeZeros = 4 (we have to exclude the ones that start with 0 )
#numberWithTwoZeros = 4^2 * 3. This *3 is my struggle, I understand that it's because we can move the other non-zero number (not the MSB) in three different position, but when it comes in other exercises and I apply the same approach my calcs are wrong!
Just to finish, we have the similar situation with #numberWithOneZero = 4^3 * 3
summing everything up we have 244
The exercise
How many numbers in base 4, with 7 digits have at least three zeros.
I think we have two ways:
Summing the amount of numbers with numberOfZeros >= 3
Summing the amount of numbers with numberOfZeros < 3 and remove this amount from the amount of numbers with 7 digits
Going for the 2. because is faster:
with one zero: 3^6 * 6, and it's okay here (I've done a python script to check my calculations... yes i'm desperate).
with two zeros: I tought it could be 3^5 * 6, like the example exercise, but due to my confrontations it's wrong. I think i haven't understood how can I calc " how many times can I move this numbers to make different numbers", also I have to delete the numbers that are equal....
I need an explation, a YT video.. Evetyrhing you think could help. Thank you if you reached the end of the post.
1
u/yvaine369 Nov 04 '20
I also have a combinatorics exam next week. What country you in?
1
u/Gianja98 Nov 05 '20
It's not just combinatorics, combinatorics it's a chapter of my Discrete math exam. Btw I'm from Italy :)
1
0
u/Shadowsca Nov 04 '20
In the example with two zeroes, you have the " *3 " because there is only one other non zero element that can freely move, and it can go in three places
In the exercise, with two zeroes there are then 4 digits that may move freely in any of the 6 open digit slots. There are therefore more ways for these 4 to be spread amongst 6 positions than just 6
Here it's better to think about placing the 0's in the 6 available since choosing where the 0's are forces the positions of the non zero terms, and vice versa. With two zero's and 6 digits, there are 6C2 or (6 x 5)/2 = combinations of positions for the two 0's. A few examples are as follows:
A 0 0 _ _ _ _
A 0 _ 0 _ _ _
A 0 _ _ 0 _ _
A 0 _ _ _ 0 _
A 0 _ _ _ _ 0
A _ 0 0 _ _ _
A _ 0 _ 0 _ _
This is just to demonstrate that there are actually more then 6 ways to place the two zeroes amongst the 6 free digits. A is a just a placeholder, non-zero digit
2
u/Gianja98 Nov 04 '20
Sorry what do you mean for C2?
Thank you for the fast answer
1
u/Shadowsca Nov 04 '20
Sorry, 6C2 is just read as (6 choose 2) and is a short hand to denote the number of ways you choose 2 objects out of a collection of 6, where you dont care about the order. You're choosing 2 digits out of 6 possible digits and you dont care which one you pick first
2
u/Gianja98 Nov 04 '20
Oh okay, isn't like the number of subsets of size 2 from a subset of size 6?
2
0
Nov 04 '20
[deleted]
1
u/edderiofer Nov 05 '20
Your comment has been removed because giving out full solutions is not allowed. (See sidebar, rule #2 under "Rules for Answering".)
2
u/Gianja98 Nov 04 '20
Now i retry the exercise, thank you so much, hope you the best