The probable combinations

Dkk -  
 Anonymous user -
Hello
How can I make and obtain the combinations of 4 digits from 1 to 48?

6 réponses

yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   Ambassadeur 1 587
 
Hello,
to get on a piece of paper?
0
Anonymous user
 
Hi, is there anything surprising to you in the statement?


combinations of 4 digits from 1 to 48
, 48 contains 2 digits so there are no combinations of 4 digits between 0 and 48, unless the non-significant 0s count in which case there are 49.
0
Dkk1
 
I didn't understand.
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 587 > Dkk1
 
Can you give an example of a combination?
0
brucine Posted messages 24409 Registration date   Status Membre Last intervention   4 104 > Anonymous user
 
Good evening,

There is obviously no combination of 4 digits in the number 48, but there is a finite number of 4-digit combinations using (with or without repetition, that is the question) all the series of 4 digits from 1 to 48.
0
Dkk1 > yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention  
 
29-40-44-47
Here is an example of the latest draw
0
Anonymous user
 
We write words with letters, for example
Hello
is a word made up of 5 letters. There are words of "all sizes", even words with one letter, for instance in this sentence
C is when y a rained
we find 3.

It's the same with numbers. We write them with digits. There are 10 digits from 0 to 9. Just like words, there are one-digit numbers and numbers with lots of digits. When I say there is 1 apple tree, 1 counts the quantity of apple trees, it’s a one-digit number. But if there are 100 apple trees, 1 is a digit that makes up the number 100.

In your case, you are talking about combinations of 4 digits but up to 48 which contains only 2, that is not coherent, unless you accept 0000, 0001, ….. 0048. But in that case, you shouldn't have too much need for us.

And if we consider that you confused digit and number, that's not coherent either, we don't combine numbers. Indeed 123 is a combination of 1, 2 and 3 or of 1 and 12 or of 12 and 3?

When I was little, the Dead Sea was only sick.
George Burns
0
vortex
 
Hello,

You're being nitpicky ^^

In
the combinations of 4 digits from 1 to 48
, I've understood, and it's pretty clear, that the goal is to obtain all combinations of 4 numbers between 1 and 48, which is ((1,2,3,4), (1,2,3,5), ..., (45,46,47,48)).

What intrigues me more is rather what is the point of generating 194,580 values?
0
brucine Posted messages 24409 Registration date   Status Membre Last intervention   4 104 > vortex
 
Hello,

It depends, as I mentioned, if the question is not the number of combinations (the interest then is only to do an exercise to obtain this number) but rather the probability of obtaining a particular combination of 4 digits, with or without replacement.
0
Pitet Posted messages 2845 Status Membre 530 > brucine Posted messages 24409 Registration date   Status Membre Last intervention  
 
Hello,

Unless I'm mistaken (which is very likely, I'm not a math whiz), according to this page: https://fr.wikipedia.org/wiki/Combinaison_(math%C3%A9matiques)

Let E be a finite set of cardinal n and k a natural integer (in your case n = 48, k = 4).

The number of combinations corresponds to the binomial coefficient, which for k <= n can be written as: n! / (k! (n-k)!)
So 48! / (4! * 44!) = 194580

The probability of getting a combination of 4 elements from a set of 48 numbers would therefore be 1/194580?
0
brucine Posted messages 24409 Registration date   Status Membre Last intervention   4 104 > Pitet Posted messages 2845 Status Membre
 
Hello,

Not quite, besides the fact that you've misquoted the formula since by definition k is less than n:

n! / (k! (n-k)!)

The number 194580 that you mentioned and that I do not dispute is the number of different combinations (a, b, c, d) when a, b, c, and d are chosen from the integers between 1 and 48, regarding combinations without repetition (or "without replacement") which means that you cannot use the same number twice.

A probability is the chance that an event occurs, and it must be between 0 (if it's impossible) and 1 (if it's certain).

Formally speaking, we can only write that the probability that the draw (without replacement on the principle of lottery balls) of 4 different numbers between 1 and 48 has a precise value (a1, b1, c1, d1) is indeed 1 in 194580.

It is indeed interesting for the die-hard lottery players: to win the jackpot, you not only need to replace 4 and 48 with 5 and 49, but also dilute this initial probability by 10 due to the choice of the complementary number.

But well, I'm nitpicking even in my previous intervention, where I'm not sure that the author of the question is interested in the number of combinations as mathematically defined (and whose calculation is then indisputable).

If it is, and to answer vortex's valid question, to find an interest, it is probably about doing your IT homework by creating a program to perform this calculation; you just need to "translate" the appropriate algorithm, but the program to be used has not been specified.
0
Dkk1 > brucine Posted messages 24409 Registration date   Status Membre Last intervention  
 
Hello Brucine
Thank you for your replies????. So I wanted to ask based on these numbers: 29-40-44-47. To get the likely upcoming numbers. Thank you.
0
Anonymous user
 
Hello

@vortex, no I'm not nitpicking, because combining 4 digits and "drawing" 49 numbers (which is still different from digits and numbers) is not the same thing.

49 numbers make me think of the lottery, so without replacement (one more to brucine) or without duplicates, if you prefer, and it's not the same algorithm nor the same probability calculation as combinations.

For combinations, it comes down to "writing" all the numbers in base 49, and we arrive at the number calculated by Pitet.
But in the case of the lottery, we have a one in 49 chance of getting the first number, then one in 4 of getting the second, etc... definitely not the same result.

And in the end, is the question to list all the cases of one type or to have a probability...

Basically, if DDk doesn't express his needs clearly, he will get a wrong answer 9 times out of 10....

--
When I was little, the Dead Sea was only sick.
George Burns
0
Anonymous user
 
Ah, my apologies, I realize while reading Brucine's last intervention that I misread Pitet's.

In the case of combinations with replacement, there are 4^49 possibilities, which is about 3.17 * 10^29.
0
Dkk1
 
Hello Whismeril.
Thank you for your responses even though some were off from my idea, but thank you,
by the way I wanted to get a series of 4 likely digits based on these numbers: 29-40-44-47.
0
brucine Posted messages 24409 Registration date   Status Membre Last intervention   4 104 > Dkk1
 
Hello,

Am I the only one who didn't understand anything?
0
vortex
 
Hello,

Everyone is actually right on this subject, and at least I've learned that the lottery has changed its format and it's no longer 6 numbers out of 49 ^^

I'm not good with math at all, but Dkk1, what you're saying makes no sense! What you're asking would be more in the realm of clairvoyance...
We couldn't care less in a sequence of random draws of 4 numbers out of 48 what the previous draw numbers were.

Perhaps that's not what you meant; in that case, you should express yourself correctly and clearly about your need. If it's really about making a prediction, just forget it.
0
Anonymous user
 
At least I learned that the lottery has changed its format and that it's no longer 6 numbers out of 49 ^^
That's not what I said ;) A draw from 49 numbers makes me think of a lottery, yes, but it's definitely not the lottery from the French Games.


In that case, you should express yourself correctly and clearly about your needs
Well, yes.
0
Dkk2 > Anonymous user
 
Okay, I see. I thought there was a calculation method based on past results to have a probability for the next one. That's a bit what I wanted to know, thank you.
0
Dkk2
 
Sure, the previous output was 29*40*44*47. So how can we find the likely next ones?
0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830
 
You know that if it were possible, there would be a lot more lottery winners... :-)
0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830 > jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention  
 
However, these questions are more about mathematics than programming languages... the theme of this forum...
0
brucine Posted messages 24409 Registration date   Status Membre Last intervention   4 104 > jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention  
 
Hello,

Well yes, but the question suggested that there was a need to program an algorithm to calculate the number of combinations of 4 integers from 1 to 48, not a winning strategy...
0
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830 > brucine Posted messages 24409 Registration date   Status Membre Last intervention  
 
even that ... finding the number of combinations among ..N numbers... it's math.
0
brucine Posted messages 24409 Registration date   Status Membre Last intervention   4 104 > jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention  
 
No: years ago, I was given an exercise involving solving a second-degree binomial in Basic.
"The goal" wasn't to solve the famous binomial, as everyone knows how to do that, but to write a program to calculate the results, including tricky cases (negative discriminant).
0
Anonymous user
 
One can calculate the probability of an outcome based on previous outcomes, but since a probability is only what it is, it doesn't really help much.
For example: When you flip a coin, the more a particular outcome occurs consecutively, the lower the probability of an additional outcome becomes, but since it is never equal to zero (asymptote), an additional outcome is never excluded.
-1
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 587
 
The example is incorrect.
0
Anonymous user > yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention  
 
I wouldn't say incorrect example but incorrect reasoning.

1st draw 1 in 2 chance of getting heads
2nd draw 1 in 2 chance of getting heads
....
100th draw 1 in 2 chance of getting heads
And even if you've had heads 100 times, on the 101st draw you have a 1 in 2 chance of getting heads.
0
Anonymous user > Anonymous user
 
"Cite: "And even if you have faced it 100 times, on the 101st draw you have a 1 in 2 chance of getting heads "
In theory, but not in practice."
-1
jordane45 Posted messages 30426 Registration date   Status Modérateur Last intervention   4 830 > Anonymous user
 
Hello
One must not confuse probabilities and statistics...
0
yg_be Posted messages 23437 Registration date   Status Contributeur Last intervention   1 587 > Anonymous user
 
in practice, as in theory.
0