Sospecho que el problema T U T es NP-hard. Mostraré cómo transformar el problema de modo que esté fuertemente relacionado con un problema que es NP-hard. (Sí, todo esto es bastante vago. Básicamente creo que mi enfoque general es correcto, pero actualmente no puedo continuar).TUT
Primero, tenga en cuenta que el problema T U T puede reformularse de la siguiente manera:TUT
Dado un conjunto de preguntas Q de tamaño k , un conjunto de n subconjuntos F Q ⊆ P ( Q ) y un entero C , que hace existe una secuencia Σ : ⟨ S 1 , ... , S k ⟩ tal que, para todo i ∈ { 1 , ... , k } :QknFQ⊆P(Q)CΣ:⟨S1,…,Sk⟩i∈{1,…,k}
- S i ⊆ Q y | S i | = i ; ySi⊆Q|Si|=i
- Si⊂SjSi⊂Sj for all j>ij>i; and
- ∑ki=1|{q∈FQ∣q⊈Si}|≤C∑ki=1|{q∈FQ∣q⊈Si}|≤C ?
Note that the set SiSi represent the first ii questions that will be explained. Conditions 1 and 2 ensure that the subsets are well formed according to this interpretation. Condition 3 counts the amount of students that haven't left at every moment in time, so it indeed sums up to the total waiting time among all students.
Now, we restrict the size of the subsets in FQFQ to 22, so we can represent these subsets as edges on a graph where the vertices are the elements from QQ. (A hardness result for this special case is sufficient for hardness of the general problem)
Now, the problem of minimizing |{q∈FQ∣q⊈Si}||{q∈FQ∣q⊈Si}| for a single ii (this is essentially ignoring condition 2) is equivalent to the following problem, which I dub 'Double max k-vertex-coverDouble max k-vertex-cover':
Given an undirected graph G=(V,E)G=(V,E) and integers kk and tt, does there exist a set of vertices V′⊆VV′⊆V of size at most kk such that the set {(u,v)∈E∣u∈V′∧v∈V′}{(u,v)∈E∣u∈V′∧v∈V′} has a size of at least tt?
This problem is NP-hard, since kk-clique is a special case of this problem, as this answer shows. However, this is not sufficient to prove TUTTUT to be NP-hard, since we need to find the maximum for every ii, while respecting condition 2. This conditions are not satisfied by every sequence ΣΣ that satisfies only condition 1 and 3: consider the graph on 77 vertices with two disjoint cycles, one of size 44, the other size 33. For i=3i=3, selecting all vertices in the 33-cycle gives the maximum, while selecting all vertices of the 44-cycle is optimal for i=4i=4.
It seems that condition 2 makes the problem even harder and most certainly not easier, which means TUTTUT should be NP-hard, but I haven't seen a method to formally prove this.
So, to summarize, I have reduced the question to the following:
- Is it possible to include condition 2 to complete the hardness proof for TUTTUT?
Side note: The formulation I gave makes it tempting to try an iterative algorithm which finds |{q∈FQ∣q⊈Si}||{q∈FQ∣q⊈Si}| under condition 2 from i=1…ki=1…k, by finding all maximum 'extenstions' of all found maximum sets for i−1i−1. This does not lead to an efficient algorithm, as the amount of maximum sets at a single iteration may be exponential in k. Additionally, I have not seen a method to determine whether a subset for some i would eventually become the 'global' maximum to prevent checking an exponential amount of subsets.