You are given $n \ge 2$ distinct positive integers. For every pair $a<b$ of them, Vlada writes on the board the largest power of $2$ that divides $b-a$. At most how many distinct powers of $2$ could Vlada have written? 

[i]Proposed by Oleksiy Masalitin[/i]
1. **Define the Problem and Setup:**
   We are given \( n \ge 2 \) distinct positive integers. For every pair \( a < b \) of these integers, we need to determine the largest power of 2 that divides \( b - a \). We aim to find the maximum number of distinct powers of 2 that can be written.

2. **Graph Representation:**
   Let \( a_1 < a_2 < \ldots < a_n \) be the \( n \) numbers. Consider a graph \( G \) with \( n \) vertices, where each vertex represents one of the \( n \) numbers. Draw an edge between every pair of vertices. The weight of an edge is defined as the largest power of 2 that divides the difference of its vertices.

3. **Subgraph with Distinct Weights:**
   Consider a subgraph \( G' \) of \( G \) that has the same vertices as \( G \) and the maximum number of edges with distinct weights. If there are multiple such subgraphs, choose one arbitrarily. We need to prove that \( G' \) has at most \( n-1 \) edges.

4. **Claim 1: \( G' \) has no cycles.**
   - **Proof:**
     Suppose \( G' \) contains a cycle. Without loss of generality, let the cycle be \( a_1, a_2, \ldots, a_k, a_1 \) with \( k \geq 3 \). Assume the edge between \( a_1 \) and \( a_2 \) has the minimal weight among the edges in the cycle. Then, \( a_k - a_1 = (a_2 - a_1) + (a_3 - a_2) + \ldots + (a_k - a_{k-1}) \). Since all weights are distinct, the largest power of 2 dividing \( a_k - a_1 \) must be the same as that dividing \( a_2 - a_1 \), which is a contradiction. Hence, \( G' \) cannot contain any cycles. \(\blacksquare\)

5. **Claim 2: Any acyclic simple undirected graph on \( n \) vertices has at most \( n-1 \) edges.**
   - **Proof:**
     We proceed by induction on \( n \).
     - Base case: For \( n = 2 \), the graph can have at most 1 edge, which is \( n-1 \).
     - Inductive step: Assume the statement is true for graphs with \( n \) vertices. Consider a graph with \( n+1 \) vertices. We need to show there exists a vertex with degree at most 1. Take a maximal path \( v_1, v_2, \ldots, v_t \) in the graph. Vertex \( v_1 \) has no neighbors among \( v_i \) (for \( i > 2 \)), otherwise, a cycle would form. Since the path is maximal, \( v_1 \) can have no neighbor other than \( v_2 \), so \( \deg(v_1) = 1 \). Removing \( v_1 \) leaves a subgraph with \( n \) vertices, which by the inductive hypothesis has at most \( n-1 \) edges. Adding back \( v_1 \) and its single edge gives at most \( n \) edges in total. Thus, the graph with \( n+1 \) vertices has at most \( n \) edges. \(\blacksquare\)

6. **Application to the Problem:**
   Claims 1 and 2 imply that \( G' \) has at most \( n-1 \) edges. To show that \( n-1 \) distinct powers of 2 are attainable, consider the sequence \( a_1 = 1 \) and \( a_i = 2^i + 1 \) for \( i \neq 1 \). For these numbers, \( v_2(a_i - a_1) = i \) for all \( i \neq 1 \), giving \( n-1 \) distinct powers of 2.

The final answer is \( \boxed{ n-1 } \).