The teacher suggested at his leisure to think about the following task:
There are n students. The student learned m tickets. There are more tickets than n .
Find the probability that if he enters the audience by the k th, then he gets a ticket that he learned.

Closed due to the fact that the essence of the issue is incomprehensible to the participants Kromster , user194374, ermak0ff , Denis Bubnov , Cerbo 17 Feb '17 at 9:37 .

Try to write more detailed questions. To get an answer, explain what exactly you see the problem, how to reproduce it, what you want to get as a result, etc. Give an example that clearly demonstrates the problem. If the question can be reformulated according to the rules set out in the certificate , edit it .

  • 2
    What difference does it make? - Akina
  • @Igor But some of the tickets that this student taught will generally remain the same ... - Harry
  • @Igor This does not affect anything. - Akina
  • @Akina The difference is that the tickets that he taught can be pulled by students who came to him. - Kamil NHOT
  • one
    "The teacher suggested thinking at a leisure .." - think so - Kromster

2 answers 2

Ehhh ... imagine that you signed ALL of the ticket layout options in the "deck". In the form of an awesome table of X! lines, where X is the number of tickets. Accordingly, the column number k of this table displays for each individual variant the number of the ticket, which will be taken by the k-th student.

Is it necessary to explain that if you cut out this entire column from this table and calculate how many records of each number of questions are present in it, it will be revealed that it is the same for all numbers?

Do I need to explain that the above described does not depend on which of the columns we cut out?

Do I need to explain that the result does not depend on the fact that we swap some columns (let’s say that they are in the order in which students are pulling tickets out of the pack)?

But in general, the probability is A / B, where A is the number of tickets learned, and B is their total number. But on the number of students and how a particular student will go, this probability does not depend in principle.

    The probability will be the same - because previous students will pull tickets with exactly the same probability :) So the probability must be the same - m/N , where N is the number of tickets.

    If you do not believe - here is an experiment. Tickets learned are from 0 to m-1 . Tickets are shuffled. If the k th ticket is less than m - this is success.
    Why this model is adequate - think for yourself.

    I cite the code, see the results here . You can experiment on your own ...

     #include <vector> #include <iostream> #include <iomanip> #include <algorithm> using namespace std; double experiment(int n, int m, int k, int count = 10000) { int succ = 0; vector<int> b; for(int i = 0; i < n; ++i) b.push_back(i); for(int j = 0; j < count; ++j) { random_shuffle(b.begin(), b.end()); if (b[k] < m) succ++; } return double(succ)/count; } int main() { for(int k = 0; k < 30; ++k) { cout << "k = " << setw(2) << k << " Success = " << setw(10) << experiment(50,10,k) << endl; } } 
    • not really, you do not take into account the fact that if a person comes in at the l <k -th place, then he can get a ticket that you taught. For example, 30 people, you learned 15, you go 25th, then it may happen that the 25 first students took 15 of your learned students - Kamil NHOT
    • @KamilNHOT And it may happen that only learned tickets left you. These are independent events. - vp_arth
    • 3
      Can. Are you interested in what? PROBABILITY So consider the probability :) In general, dear, go read the tutorial. If I didn’t understand anything ... And just in case - here, in fact, the appeal to "you" is accepted ... - Harry
    • I am a slightly familiar person ( - Kamil NHOT