01.01.2013, 07:28
Hallo, ich brauche eure Hilfe mit einem Algorithmus. Entschuldigung, dass ich auf Englisch schreibe, ihr koennt auf Deutsch antworten.(Es ist mir ein bisschen schwer auf Deutsch ohne Fehler die Aufgabe richtig zu formulieren):
Let's say, we have a set A={1,2,3,.....49}.
Now, I am defining sets A1, A2, A3,....An as follow: A1={a1,a2,a3,....a30}, A2={b1,b2,b3,...b30}, and so on, where all elements of sets Ai are also elements of set A, which means they are subsets of set A. (All sets Ai have 30 elements).
Now, I am looking for a set C={ {A1},{A2},{A3},....{An} } so, that if I pick randomly 6 elements of set A, they will be (at least) in one of sets Ai.
What is n? Let's see: first of all, how much possibilities are to pick 6 elements of set A? There are (49*48*47*46*45*44)/6!=13.983.816
Secondly, how much of these posibilities covers one of sets Ai? Because set Ai has 30 elements, it covers (30*29*28*27*26*25)/6!=593.775
Now dividing both results, it gives 23,55 what means, that we need at least n=24 (probably more, I don't sure).
So the question is, how to find this set C?
Let's say, we can start so: A1={1,2,3,....30}, this will be first set. But what next? With some algorithm I can implement it in C or Java, but I dont know how to start. Thanks.
Let's say, we have a set A={1,2,3,.....49}.
Now, I am defining sets A1, A2, A3,....An as follow: A1={a1,a2,a3,....a30}, A2={b1,b2,b3,...b30}, and so on, where all elements of sets Ai are also elements of set A, which means they are subsets of set A. (All sets Ai have 30 elements).
Now, I am looking for a set C={ {A1},{A2},{A3},....{An} } so, that if I pick randomly 6 elements of set A, they will be (at least) in one of sets Ai.
What is n? Let's see: first of all, how much possibilities are to pick 6 elements of set A? There are (49*48*47*46*45*44)/6!=13.983.816
Secondly, how much of these posibilities covers one of sets Ai? Because set Ai has 30 elements, it covers (30*29*28*27*26*25)/6!=593.775
Now dividing both results, it gives 23,55 what means, that we need at least n=24 (probably more, I don't sure).
So the question is, how to find this set C?
Let's say, we can start so: A1={1,2,3,....30}, this will be first set. But what next? With some algorithm I can implement it in C or Java, but I dont know how to start. Thanks.