2026 USAAIO Round 1 Sample problems, Problem 7

Problem 7

Consider a dataset that consists of two samples (x^{(0)}, 1) and (x^{(1)}, -1), where x^{(0)}, x^{(1)} \in \mathbb{R}^d.

Define a separating hyperplane in the form

\hat{\theta}^{\top}x + b = 0,

where \hat{\theta} \in \mathbb{R}^d is a unit vector, b \in \mathbb{R}, x^{(0)} is in the upper half of this hyperplane and x^{(0)} and x^{(1)} have equal distance to this hyperplane.

Do the following tasks.

Part 7.1

Let x^{(0)} = (-3, 0) and x^{(1)} = (3, 0).

Compute \hat{\theta} and b. Reasoning is not required.

Part 7.2

Let x^{(0)} = (5, 7) and x^{(1)} = (-3, 2).

Compute \hat{\theta} and b. Reasoning is not required.

Part 7.3

This is a coding task. Write a function to compute \hat{\theta} and b.

  • In this function, the input is a NumPy array with shape (2,d).
  • In the output, \hat{\theta} is a NumPy array with shape (d,) and b is a NumPy array with shape

Part 7.1

\hat{\theta} = \begin{bmatrix}-1 \\ 0\end{bmatrix}, \quad b = 0

Part 7.2

\hat{\theta} = \begin{bmatrix}\frac{8}{\sqrt{89}} \\ \frac{5}{\sqrt{89}}\end{bmatrix}, \quad b = -\frac{30.5}{\sqrt{89}}

Part 7.3

import numpy as np

def solve_hyperplane(X):
    x0 = X[0]
    x1 = X[1]
    w = x0 - x1
    norm = np.linalg.norm(w)
    theta_hat = w / norm
    midpoint = (x0 + x1) / 2
    b = -np.dot(theta_hat, midpoint)
    return theta_hat, b