3

I know this question has been asked here a couple of times.

We have four charged batteries, four uncharged batteries, and a radio which needs two charged batteries to work. We do not know which batteries are charged and which ones are uncharged. What is the least number of attempts that suffices to make sure the radio will work? (An attempt consists of putting two batteries in the radio and checking if the radio works or not).

It also has a brilliant solution using graph theory, but I'm interested in general problem, as it can be applicable to variety of other things.

My question is: What approach would be optimal to take if there were $n$ number of batteries, out of which $m$ batteries are charged, and most important: $k$ working batteries were needed start the radio?

EDIT: What I'm trying to do is bring some of the optimization to the program that I have. It's not about batteries, but this analogy helps me reason about it. I'm not only interested in the number of combinations (even though it's really helpful), but also the exact combinations.

I was thinking about example $k = 6$, and $n = 48$, and let's say $m=28$. I figured that dividing the batteries into groups of 8 like:

1 2 3 4 5 6
1 2 3 4 7 8
1 2 5 6 7 8
3 4 5 6 7 8

would require 2 of those not working in order not to fire, and then divided the complete pile into 6 smaller piles, then I thought about combining the piles in order to maximize the number of the broken batteries required to drop the combination set, and this is where I know I'm not doing something optimal and that it must exist mathematical approach to the problem.

I also figured out based on Daniels answer that this is not a trivial thing, and I am willing to accept the answer which points me to the right direction. (with $k,n,m$ from example above or with general case)

Andrej
  • 91
  • Why the downvote? – Andrej Nov 25 '20 at 21:03
  • 3
    People like to see an account of why you care about the problem, and what you have tried so far, both of which are lacking here. Try looking for guidelines on "how to ask a good question." That said, this seems like a totally reasonable question to ask. – Hew Wolff Nov 26 '20 at 04:59

1 Answers1

4

The solution in the linked question readily generalizes via $k$-uniform hypergraphs, in which edges are $k$-element subsets of the vertex set. The problem thus can be equivalently formulated in the following way.

What is the minimum number of edges that a $k$-uniform hypergraph on $n$ vertices has to have to ensure that its complement doesn't contain a clique of size $m$?

The answer to this question is called the Turán number $T(n,m,k)$. Unfortunately, its value seems to be unknown currently for basically any $k > 2$; for some bounds, see e.g. Section 9 of this survey.

Dániel Garamvölgyi
  • 5,020
  • 14
  • 25