Processing math: 100%

Monday, April 7, 2025

Striking Ore while digging into Lipkovitz's Hamiltonian puzzle

A teacher is handing out candy to his students. He abides by the following rules:

  • He hands out candy to groups of three students (i.e., “trios”) at a time. Each member of the trio gets one piece of candy.
  • Each unique trio can ask for candy, but that same trio can’t come back for seconds. If students in the trio want more candy, they must return as part of a different trio.
  • When a trio gets candy, the next trio can’t contain any students from that previous trio.

It turns out that every possible trio can get a helping of candy together. What is the smallest class size for which this is possible?

Obviously, I assume that we are not talking about the trivial case of N=3 students, because, ... lame!

So let's assume that there are N>3 students. Then there will be M=(N3)=16N(N1)(N2) possible trios in the class. Let's assume that the set V={v1,v2,,vM} enumerates all such trios. Based on the teacher's final condition, we can see that if vi and vj share a common student, then vj cannot be the next trio to ask if vi has just received candy. Let's define a set of edges on the vertex set E={(vi,vj)V×Vj>i,vivj=}, that is, if the trio vi could immediately follow the trio vj (or vice versa), then there is an edge between vi and vj. We will call vertices vi and vj adjacent if there is an edge eE connecting vi and vj. Let's define the graph G=(V,E). Note that we define the degree of a vertex, denoted δ(v), to be the number of vertices wV that are adjacent to v, that is, δ(v)=#{wVe=(v,w)E}.

Since it turns out that every possible trio can get a helping of candy together, but based on the second condition each trio can only ask for candy once, then there must be some path that on G that visits each vertex exactly once. This type of path is known in graph theory as a Hamiltonian path. A graph is called Hamiltonian if it admits a Hamiltonian path starts and ends at adjacent vertices. The Norwegian graph theorist Øystein Ore provided the following sufficient condition for a graph to Hamiltonian based on the degrees of its vertices:

Ore's Theorem: A graph G=(V,E) with |V|=n is Hamiltonian if for every pair of non-adjacent vertices v,wV, δ(v)+δ(w)n.

Let's note that for our graph GN, since any vertex v is adjacent to any other trio made up of distinct students, we have δ(v)=(N33)=16(N3)(N4)(N5)=N312N2+47N606. So from an application of Ore's theorem, whenever M=N33N2+2N62N312N2+47N606 or equivalently, whenever N321N2+92N1200, then G is Hamiltonian. Since the real root of the polynomial p(t)=t321t2+92t120 is at t15.59.... we have that whenever N16, then every possible trio can have a helping of candy together.

No comments:

Post a Comment