1
$\begingroup$

I am trying to solve the following problem:

The Problem

Assume $S_n$ is the set of all ordered $n$-tuples of 0 and 1 and let $A_1, A_2, \ldots, A_{32}$ be a permutation of the elements of $S_5$. Also assume that $f(A_1) = 1$ and for every $1 \le i \le 32$ the value of $f(A_i)$ is equal to the smallest positive integer such that for every $j$ ($1 \le j < i$), where $A_i$ and $A_j$ differ in exactly one coordinate, it holds that $f(A_i) \neq f(A_j)$. (For instance, if $A_i = (0,1,1,0,1)$ and $A_j = (0,1,0,0,1)$ then $A_i$ and $A_j$ differ only in the third coordinate). What is the maximum possible value of $\max\{f(A_1), f(A_2), \ldots, f(A_{32})\}$?

Here's my progress till now:

Instead of 5-tuples, I took 3-tuples to understand the problem. So there are $2^3 = 8$ elements in $S_3$.

Suppose $A_1=(0,0,0)$, $A_2=(0,0,1)$, $A_3=(0,1,0)$. By definition, $f(A_1)=1$.

For $A_2$, since $A_2$ and $A_1$ differ by one coordinate, we must have $f(A_2) \neq f(A_1)$. The smallest positive integer for $f(A_2)$ is $2$.

For $A_3$, since $A_3$ and $A_1$ differ by one coordinate, we must have $f(A_3) \neq f(A_1)$. The smallest positive integer for $f(A_3)$ is also $2$.

I did this for the following permutation of the 8 elements: $$A_1 = (0,0,0)$$ $$A_2 = (0,0,1)$$ $$A_3 = (0,1,0)$$ $$A_4 = (0,1,1)$$ $$A_5 = (1,0,0)$$ $$A_6 = (1,0,1)$$ $$A_7 = (1,1,0)$$ $$A_8 = (1,1,1)$$

For this ordering, I calculated the following function values: $$f(A_1) = 1, f(A_2) = 2, f(A_3) = 2, f(A_4) = 1, f(A_5) = 2, f(A_6) = 1, f(A_7) = 3, f(A_8) = 2$$

So, for this specific permutation, $\max\{f(A_i)\} = 3$.

However, this result is only for one specific ordering of the $A_i$. Since any permutation is possible, maybe the maximum value could be 4 or 5? I don't know.

I related this to the Greedy algorithm, since the selection of the $A_i$'s would matter, but I don't know exactly what to do with that insight.

$\endgroup$
1
  • 3
    $\begingroup$ We have $f(A_7)=1$, because $A_7$ differ in exactly one coordinate with $A_3$ and $A_5$, and $f(A_3)=f(A_5)=2$. $\endgroup$ Commented Sep 12 at 2:34

1 Answer 1

4
+50
$\begingroup$

The $\max{\{f(A_i)\}} \leq 6$. This is true, since if $f(A_i)=k+1$ for some $i$, then for each $1\leq j\leq k$, there exists a $5$-tuple $A_{i_j}$ such that $f(A_{i_j})=j$ and such that $A_{i_j}$ differs in precisely one coordinate with $A_i$. Since $A_i$ has only $5$ coordinates to change, then $k\leq 5$ and the max must be less than or equal to $k+1=6$.

There is an ordering which yields a max of $6$. After the first $19$ vectors listed below, the remaining vectors can be concatenated at the end in an arbitrary order. \begin{array}{|c|c|c|} \hline Order & 5-tuple & f \\ \hline 1 & (0,1,0,1,1) & 1 \\ \hline 2 & (1,1,0,0,0) & 1 \\ \hline 3 & (1,0,0,1,1) & 1 \\ \hline 4 & (0,1,0,0,1) & 2 \\ \hline 5 & (1,1,0,1,0) & 2 \\ \hline 6 & (0,1,0,0,0) & 3 \\ \hline 7 & (1,0,0,1,0) & 3 \\ \hline 8 & (1,1,1,0,0) & 2 \\ \hline 9 & (0,0,0,0,0) & 1 \\ \hline 10 & (0,1,1,0,1) & 1 \\ \hline 11 & (1,1,1,1,0) & 1 \\ \hline 12 & (0,0,1,1,1) & 1 \\ \hline 13 & (0,0,1,1,0) & 2 \\ \hline 14 & (0,1,1,0,0) & 4 \\ \hline 15 & (0,0,0,1,0) & 4 \\ \hline 16 & (1,1,1,1,1) & 2 \\ \hline 17 & (0,1,1,1,1) & 3 \\ \hline 18 & (0,1,1,1,0) & 5 \\ \hline 19 & (0,1,0,1,0) & 6 \\ \hline 20 & \ldots & \ldots \\ \hline \ldots & \ldots & \ldots \\ \hline \end{array}

$\endgroup$
2
  • $\begingroup$ I suppose you can reorder this so that all the uples with $f$ equal to $1$ come first, then the uples with $f$ equal to $2$, etc. $\endgroup$ Commented Sep 13 at 6:37
  • 1
    $\begingroup$ @EwanDelanoy It is easy to check that the enumeration of any permutation of $A_1,\dots,A_{32}$ reordered in such a way is still produced by the given algorithm. $\endgroup$ Commented Sep 14 at 9:36

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.