Partitioning axis-parallel lines in 3D

Abstract: Let $L$ be a set of $n$ axis-parallel lines in $\mathbb{R}^3$. We are are interested in partitions of $\mathbb{R}^3$ by a set $H$ of three planes such that each open cell in the arrangement $\mathcal{A}(H)$ is intersected by as few lines from $L$ as possible. We study such partitions in three settings, depending on the type of splitting planes that we allow. We obtain the following results.$\bullet$ There are sets $L$ of $n$ axis-parallel lines such that, for any set $H$ of three splitting planes, there is an open cell in $\mathcal{A}(H)$ that intersects at least~$\lfloor n/3 \rfloor-1 \approx \frac{1}{3}n$ lines.$\bullet$ If we require the splitting planes to be axis-parallel, then there are sets $L$ of $n$ axis-parallel lines such that, for any set $H$ of three splitting planes, there is an open cell in $\mathcal{A}(H)$ that intersects at least $\frac{3}{2}\lfloor n/4 \rfloor -1 \approx \left( \frac{1}{3}+\frac{1}{24}\right) n$ lines. Furthermore, for any set $L$ of $n$ axis-parallel lines, there exists a set $H$ of three axis-parallel splitting planes such that each open cell in $\mathcal{A}(H)$ intersects at most $\frac{7}{18} n = \left( \frac{1}{3}+\frac{1}{18}\right) n$ lines.$\bullet$ For any set $L$ of $n$ axis-parallel lines, there exists a set $H$ of three axis-parallel and mutually orthogonal splitting planes, such that each open cell in $\mathcal{A}(H)$ intersects at most $\lceil \frac{5}{12} n \rceil \approx \left( \frac{1}{3}+\frac{1}{12}\right) n$ lines.

\section{Introduction}
Partitioning problems of point sets in $\mathbb{R}^d$ have been studied extensively. For instance, the famous Ham-Sandwich Theorem states that,
given $d$ finite point sets in $\mathbb{R}^d$, there exists a hyperplane that bisects each of the sets, in the sense of having at most half of the set in each of its two open halfspaces.  Another well-known result is that for any set of $n$ points in the plane, there are two lines that partition the plane into four open cells that each contain at most $\floor{n/4}$ points (a \emph{4-partition}).  The latter result has several stronger forms, where one can specify the orientation of one of the lines, or that the two lines be orthogonal to each other~\cite{courant1942mathematics} (but not both).  The 4-partition question naturally generalizes to the problem of $2^d$-partitioning of a point set in~$\mathbb{R}^d$ by $d$~hyperplanes.  Such a triple of planes indeed always exists in $\mathbb{R}^3$~\cite{H66, Yao89}, in fact, with the orientation of one of the planes prespecified.  Alternatively, one of the partitioning planes can be required to be perpendicular to the other two~\cite{BK}.  It is known that $2^d$-partition does not always exist in $d>4$~\cite{avis1984}.  The case $d = 4$ remains stubbornly open.
Results on other partitioning problems for finite point sets can be found in the surveys by Kaneko and Kano~\cite{kaneko2003} and by Kano and Urrutia~\cite{ku21}.

Similar theorems have been obtained for equipartitioning continuous measures.
For example, the Ham-Sandwich theorem~\cite{roldan2021survey} is traditionally stated in continuous setting: Given $d$ finite absolutely continuous measures in $\mathbb{R}^d$, there exists a hyperplane that bisects each measure, in the sense of having half of the mass of each measure on each side; see \cite{BZ04} for some early history of the theorem.
The $2^d$-partition problem mentioned above was originally asked by Gr{\"u}nbaum in 1960 \cite{grunbaum1960} for measures, as well; for a survey, see~\cite{blagojevic2018topology}.  For an overview of equipartitioning problems, see \cite{roldan2021survey,vzivaljevic2017}.
\medskip

In this paper we are interested in the following question: given a set $L$ of $n$~lines,
partition the space into open cells such that each cell intersects only few lines. This problem has been studied extensively,
in the context of cuttings and polynomial partitions, but these works typically focus on
asymptotic results that use a (possibly constant but) large number  of partitioning planes, or the zero set of a (constant but) large degree polynomial.  For example, a classical result on \emph{cuttings} in the plane~\cite{chazelle2018cuttings} is that, for any choice of parameter $r$, $1 \leq r \leq n$, there exists a tiling of the plane by $O(r^2)$ trapezoids so that each open trapezoid meets $n/r$ of the lines of~$L$.  In a similar spirit, a result of Guth~\cite{Guth} states that, for any degree $D>1$, there exists a non-zero bivariate polynomial $f$ of degree at most~$D$, such that the removal of its zero set $Z(f)$ from the plane produces $O(D^2)$ open connected sets, each meeting at most $n/D$ of the lines of $L$.  Analogous results are known for higher dimensions.

In contrast to the above settings, we are interested in what can be achieved with a very small number of planes, similar
to the results on Ham-Sandwich cuts and equipartitions. In particular, we are interested
in partitions for a set $L$ of $n$ lines in $\mathbb{R}^3$ that use only three planes.
More precisely, we want to partition $\mathbb{R}^3$ using a set $H$ of three planes such that
each open cell in the arrangement $\ensuremath{\mathcal{A}}(H)$ meets only few of the lines from~$L$. Note that if the
planes of $H$ are in general position, each such cell is an ``octant.''

We are not aware of any work directly addressing this question in three or higher dimensions,
for unrestricted sets of lines.  The two-dimensional case was settled in \cite[Lemma 7]{MR2066580}:
for any set of $n$ lines in the plane in general position, there exists a pair of lines with the
property that each open quadrant formed by them is met by at most $\floor{n/4}$ of the lines.
We will focus on the axis-parallel case in~$\mathbb{R}^3$.

\paragraph{Problem statement and results.}
Let $L$ be a set of $n$ axis-parallel lines in $\mathbb{R}^3$.
We would like to partition the space by three planes $h_1,h_2,h_3$, so that each of the open
cells of $\ensuremath{\mathcal{A}}(H)$ meets as few lines of $L$ as possible, where $H\coloneqq \{h_1,h_2,h_2\}$.
We consider three variants, of increasing generality. The variants depend on the orientation of the
planes used in the partitioning. To this end we define a plane to be \emph{axis-parallel} if it
is parallel to two of the main coordinate axes, we define it to be \emph{semi-tilted} if
it is parallel to exactly one of the main coordinate axis, and we define it to be
\emph{tilted} if not parallel to any coordinate axis.
We will consider the following three types of partitionings.
\begin{itemize}[nosep]
\item The set $H$ must consist of three mutually orthogonal axis-parallel planes;  let $g_{\perp}$ be the corresponding function.
\item The planes in $H$ must all be axis-parallel ($g_{\|}$), but need not be pairwise orthogonal.
\item The planes in $H$ can be chosen arbitrarily  ($g$), that is, $H$ can also use semi-tilted or tilted planes.
\end{itemize}
For a set $L$ of lines, we let $g(L)$ be the minimum integer $k$, such that there is a set~$H$ of three planes in $\mathbb{R}^3$ with every open cell of $\ensuremath{\mathcal{A}}(H)$ meeting at most $k$ lines of $L$.  Define $g_{\|}(L)$ and $g_{\perp}(L)$ analogously.
Now define $g(n)\coloneqq\max_{|L|=n} g(L)$, with the maximum taken over all sets of axis-parallel lines of size $n$.
Define $g_{\|}(n)$ and~$g_{\perp}(n)$ similarly.
Clearly, $g(n)  \le g_{\|} (n) \le g_{\perp} (n)$.
Table~\ref{fig:results-table} summarizes our results.

\medskip
The rest of the paper is organized as follows.  In Section~\ref{sec:three-bundles} we introduce our simplest ``three bundle'' construction, which implies lower bounds on all three functions and illustrates some of the methods used in the rest of the paper.  We prove stronger lower bounds on $g_{\perp}(n)$ and $g_{\|}(n)$ in Section~\ref{sec:lower-bounds}.
In Section~\ref{sec:upper-bounds} we present constructive upper bounds on $g_{\|}$ and $g_{\perp}$, and consequently also on $g$.
\begin{table}
  \renewcommand{\arraystretch}{1.25}
  \centering
  \begin{tabular}{l|ll|ll}
  Function & Lower bound & Reference & Upper bound & Reference \\
  \hline
  $g_{\perp}(n)$ &
  $\frac{3}{2}\left\lfloor \frac{n}{4} \right\rfloor \approx \left( \frac{1}{3} + \frac{1}{24} \right)n$
  & Theorem~\ref{th:unbalancedlb} &
  $\left\lceil \frac{5}{12}n \right\rceil \approx \left( \frac{1}{3} + \frac{1}{12} \right)n$ & Theorem~\ref{thm:512upper-orig} \\[2mm]
  $g_{\|}(n)$ &   $\frac{3}{2}\left\lfloor \frac{n}{4} \right\rfloor-1 \approx \left( \frac{1}{3} + \frac{1}{24} \right)n$ & Theorem~\ref{th:unbalancedlb} & $\left\lfloor \frac{7}{18}n \right\rfloor \approx \left( \frac{1}{3} + \frac{1}{18} \right)n$ & Theorem~\ref{th:7nover18} \\[2mm]
  $g(n)$ & $\left\lfloor \frac{1}{3}n \right\rfloor -1  \approx \frac{1}{3}n$ & Corollary~\ref{cor:lb-general} &
  $\left\lfloor \frac{7}{18}n \right\rfloor \approx \left( \frac{1}{3} + \frac{1}{18} \right)n$ & Theorem~\ref{th:7nover18} \\
  \end{tabular}
  \caption{Summary of general results}
  \label{fig:results-table}
\end{table}

\medskip

We will use the following convention throughout the paper: we say that a line $\ell$~\emph{crosses} a plane~$h$ in~$\mathbb{R}^3$, if $\ell$~meets~$h$, but is not contained in it.

\input{sec-bundles}
\input{sec-lower-bounds}
\input{sec-upper-bounds}

\section{Conclusions}
\label{sec:concl}

Two obvious open problems remain:
\begin{itemize}
    \item Close the gaps between the upper and the lower bounds for axis-parallel lines.
    \item Answer the same question for lines with arbitrary orientations in $\mathbb{R}^3$: given a set $L$ of $n$~lines, minimize the number of lines meeting each open cell of the arrangement $\ensuremath{\mathcal{A}}(H)$ formed by a set~$H$ of three planes.
    A simple calculation shows that if $L$  is in general position, then
    at least one of the open cells of $\ensuremath{\mathcal{A}}(H)$ meets at least $4(n-3)/8\approx n/2$
    lines from $L$, since any plane can contain or be parallel to at most one of the lines of~$L$.
    Can we prove larger lower bounds, and what upper bounds
    can we obtain?
\end{itemize}

\bibliographystyle{plainurl}

\section{Three bundles}
\label{sec:three-bundles}
As a warm-up exercise we analyze a simple and natural configuration of lines.
The analysis will give a first lower bound on the functions $g_{\perp}(n)$, $g_{\|}(n)$, and $g(n)$.
In fact, the bound we obtain for $g(n)$ is the best bound we have for this case,
where the splitting planes can be completely arbitrary.
The configuration consists of three bundles of $n/3$ lines, where $n$ is a multiple of~3;
see Fig.~\ref{fig:bundles-construction} for an illustration.
\begin{figure}
\begin{center}
\includegraphics{Figures/3-bundle.pdf}
\end{center}
\caption{(i)~Rough illustration of the set $L^\mathrm{3}$ for the case $n=9$.
         (ii)~A more accurate illustration of~$L^\mathrm{3}$, which also shows three splitting
         planes that partition space into eight cells, each containing at most two lines.
         The dark grey lines are contained in a splitting plane.
         The front, left, and top views show that the construction is symmetric
         with respect to the axes, up to reversing the directions of some axes.}
\label{fig:bundles-construction}
\end{figure}
We call this configuration the \emph{three-bundle configuration}, and denote it by~$L^\mathrm{3}(n)$, or just $L^\mathrm{3}$ for short.
It is defined as $L^\mathrm{3} \coloneqq \Ltb_x \cup \Ltb_y \cup \Ltb_z$, where
\begin{align*}
\Ltb_x & \coloneqq \{ (0,i,i) + \lambda (1,0,0): 1\leq i \leq n/3 \},\\
\Ltb_y & \coloneqq \{ (i,0,2n/3+1-i) + \lambda (0,1,0):  1\leq i \leq n/3 \}, \text{ and} \\
\Ltb_z & \coloneqq \{ (i,i,0) + \lambda (0,0,1): n/3 < i \leq 2n/3 \}.
\end{align*}
To be able to handle the case of tilted splitting planes, we need to slightly shift the lines
in~$L^\mathrm{3}$, so that no plane (titled or otherwise) contains three or more lines.
For example, $\Ltb_x$ is actually defined as
$\Ltb_x \coloneqq \{ (0,i+\varepsilon_i,i) + \lambda (1,0,0): 1\leq i \leq n/3 \}$,
where the $\varepsilon_i$'s are small, distinct real numbers that guarantee that
no plane contains more than two of the lines from~$\Ltb_x$.
The sets $\Ltb_y$ and $\Ltb_z$ are shifted similarly. Thus no plane
can contain more than two lines from the same bundle.
Note that a plane cannot contain two lines from different bundles either.
With a slight abuse of notation we will still
denote the shifted sets by $\Ltb_x$, $\Ltb_y$, and $\Ltb_z$. For simplicity,
we will refrain from showing the perturbations in our figures.
\medskip

It is straightforward to verify that $g_{\perp}(L^\mathrm{3}) \leq n/3 -1$. Indeed, if we take
$h_1 \coloneqq \{x=n/3+1\}$, and $h_2 \coloneqq \{y=n/3\}$, and $h_3 \coloneqq \{z=n/3+1\}$,
then six of the eight cells in the resulting arrangement $\ensuremath{\mathcal{A}}(H)$ are
intersected\footnote{Recall that we consider the cells to be open,
so lines fully contained in a splitting plane do not contribute to the counts.}
by $n/3-1$ lines (all coming from a single bundle)  and the remaining
two cells are not intersected at all; see Fig.~\ref{fig:bundles-construction}(ii).
The main result of this section is that this is tight: even if one
is allowed to use tilted splitting planes, it is not possible to ensure
that all cells in the partitioning are intersected by strictly fewer than~$n/3-1$ lines.
This gives the following theorem.
\begin{theorem}\label{thm:3-bundles}
Let $L^\mathrm{3}(n)$ be the three-bundle configuration on $n$ lines, where $n$ is divisible by $3$,
as defined above. Then
\begin{itemize}[nosep]
\item $g_{\perp}(L^\mathrm{3}(n)) = g_{\|}(L^\mathrm{3}(n)) = g(L^\mathrm{3}(n)) = n/3-1$ for $n\geq 9$,
\item $g_{\perp}(L^\mathrm{3}(n)) = g_{\|}(L^\mathrm{3}(n)) =1 $ and $g(L^\mathrm{3}(n)) = 0$ for $n=6$,
\item $g_{\perp}(L^\mathrm{3}(n)) = g_{\|}(L^\mathrm{3}(n)) = g(L^\mathrm{3}(n)) = 0$ for $n=3$.
\end{itemize}
\end{theorem}
Theorem~\ref{thm:3-bundles} immediately gives the following corollary.
The cases where $n=3$ and $n=6$ are easy to verify.  In the remainder of this section we assume $n\geq 9$.
\begin{corollary}
  \label{cor:lb-general}
  For $n\geq 9$, $g(n) \geq \floor{n/3} -1$.
\end{corollary}
Theorem~\ref{thm:3-bundles} also implies that $g_{\perp}(n) \geq  \floor{n/3} -1$
and $g_{\|}(n) \geq \floor{n/3} -1$, of course, but in later sections we will
provide stronger lower bounds on $g_{\perp}(n)$ and $g_{\|}(n)$; see Theorem~\ref{th:unbalancedlb}.
\medskip

Since we already argued that $g_{\perp}(L^\mathrm{3}) \leq n/3-1$, and we have $g_{\perp}(L^\mathrm{3}) \geq g_{\|}(L^\mathrm{3}) \geq g(L^\mathrm{3})$,
it suffices to prove that $g(L^\mathrm{3})\geq n/3-1$. It will be convenient, however, to
first prove this for $g_{\perp}(L^\mathrm{3})$, then extend the proof to $g_{\|}(L^\mathrm{3})$,
and finally extend it to $g(L^\mathrm{3})$.
\begin{lemma}\label{lem:3b-lb-perp}
$g_{\perp}(L^\mathrm{3}(n)) \geq n/3-1$.
\end{lemma}
\begin{proof}
Suppose for a contradiction that there is a set $H = \{h_1,h_2,h_3\}$ of mutually
orthogonal axis-parallel planes such that each cell in the arrangement $\ensuremath{\mathcal{A}}(H)$ meets
fewer than $n/3-1$~lines from~$L^\mathrm{3}$. Let $h_1, h_2$, and $h_3$ be the planes orthogonal
to the $x$-, $y$-, and $z$-axis, respectively.
\begin{figure}
\begin{center}
\includegraphics{Figures/lemma3and4-fig.pdf}
\end{center}
\caption{Illustration for the proof of Lemmas~\ref{lem:3b-lb-perp} and~\ref{lem:3b-lb-par},
         showing the projection onto the $xy$-plane, where above/below crossings are drawn as seen from $z=+\infty$.}
\label{fig:lemma3and4}
\end{figure}

Consider the projection of $L^\mathrm{3}$ and the planes $h_1$ and $h_2$ onto the $xy$-plane; refer to Fig.~\ref{fig:lemma3and4}(i).
The lines from~$\Ltb_x$ and~$\Ltb_y$ appear as lines
in the projection. The planes $h_1$ and $h_2$ appear as lines as well, and they partition
the $xy$-plane into four quadrants, which we label as \mbox{\sc ne}\xspace, \mbox{\sc se}\xspace, \mbox{\sc sw}\xspace, and \mbox{\sc nw}\xspace in the natural way.
The lines from $\Ltb_z$ appear as points in the projection. Below we will, with a slight abuse
of terminology, sometimes speak of ``points from $\Ltb_z$.''

Note that the \mbox{\sc ne}\xspace-quadrant contains at most $n/3-2$ points from $\Ltb_z$;
otherwise there would be two octants in $\ensuremath{\mathcal{A}}(H)$ meeting at least $n/3-1$ lines.
Hence, at least one of the following two cases occurs
\begin{enumerate}[(a),nosep]
\item at least one point from $\Ltb_z$ lies to the left of $h_1$, or
\item at least one point from $\Ltb_z$ lies below $h_2$.
\end{enumerate}
Due to symmetry we can assume without loss of generality that case~(a) holds,
which implies that all lines from $\Ltb_y$ lie to the left of $h_1$.
Now observe that the \mbox{\sc sw}\xspace-quadrant meets at most $2n/3-3$ lines from $\Ltb_x \cup \Ltb_y$;
otherwise one of the two octants in $\ensuremath{\mathcal{A}}(H)$ that correspond to the \mbox{\sc sw}\xspace-quadrant---these octants
are generated when the $z$-vertical column corresponding to
the \mbox{\sc sw}\xspace-quadrant is split by the splitting plane~$h_3$---will
meet at least $n/3-1$ lines. (Note that the plane $h_3$ can contain at most one line from $\Ltb_x \cup \Ltb_y$.)
Since we already observed that all lines from $\Ltb_y$ lie to the left of $h_1$,
this implies that at least two lines from $\Ltb_x$ lie above~$h_2$.
Hence, we can assume that the projection looks like the one depicted in Fig.~\ref{fig:lemma3and4}(i).

Let $i$ be the number of lines from $\Ltb_z$ lying (strictly) to the left of $h_1$,
and let $j$ be the number of lines from $\Ltb_x$ lying (strictly) above $h_2$;
by the above arguments we have $i\geq 1$ and $j\geq 2$.
Consider the remaining cutting plane~$h_3$, which is parallel to the $xy$-plane, and let $k$ be the number of lines from $\Ltb_y$ lying (strictly) below~$h_3$.
We have $k\geq 1$ because otherwise the
\mbox{\sc nw-top}\xspace octant of $\ensuremath{\mathcal{A}}(H)$---this is the cell that is above $h_3$ and whose
projection onto the $xy$-plane is the \mbox{\sc nw}\xspace~quadrant---will meet $i$ lines of $\Ltb_z$ and at least
$n/3-1$ lines of $\Ltb_x$, which is a contradiction.
Since $k\geq 1$ we also know that all $j$~lines from $\Ltb_x$ must lie below $h_3$,
since these lines lie below the lines from $\Ltb_y$.
We can thus derive the following.
\begin{enumerate}[(i),nosep]
\item The \mbox{\sc ne-bottom}\xspace octant meets $n/3-i-1$ lines of $\Ltb_z$ and $j$ lines
    of $\Ltb_x$. Since we assumed all cells intersect fewer than $n/3-1$ lines,
    we thus have $n/3-i-1+j<n/3-1$, which implies $i>j$.
\item The \mbox{\sc nw-top}\xspace octant meets $n/3-k-1$ lines of $\Ltb_y$ and $i$ lines of $\Ltb_z$.
   For this octant to intersect fewer than $n/3-1$ lines, we must thus have  $k>i$.
\item The \mbox{\sc sw-bottom}\xspace octant meets $k$ lines of $\Ltb_y$ and $n/3-j-1$ lines of $\Ltb_x$.
   For this octant to intersect fewer than $n/3-1$ lines, we must thus have $k<j$.
\end{enumerate}
But (i) and (ii) together imply $k>j$, which contradicts~(iii), thus finishing the proof of the lemma.
\end{proof}
We now consider the case where the planes, though still axis-parallel, need not be
mutually orthogonal.
\begin{lemma}\label{lem:3b-lb-par}
$g_{\|}(L^\mathrm{3}(n)) \geq n/3-1$.
\end{lemma}
\begin{proof}
Suppose for a contradiction that there is a set $H = \{h_1,h_2,h_3\}$ of three axis-parallel
planes such that each cell of $\ensuremath{\mathcal{A}}(H)$ meets fewer than $n/3-1$~lines from~$L^\mathrm{3}$.

The case of three mutually orthogonal planes has been handled in Lemma~\ref{lem:3b-lb-perp}.
If $h_1$, $h_2$, and~$h_3$ are all parallel to each other, then clearly there is a cell that
is intersected by at least $n/3$ lines from $L^\mathrm{3}$,
since any line from the bundle orthogonal to the planes intersects all four cells.
Thus the remaining case is when exactly two of the planes are parallel.

Assume without loss of generality that $h_1$ and $h_2$ are parallel to the $yz$-plane,
with $h_2$ being to the right of $h_1$, and that $h_3$ is parallel to the $xz$-plane.
Now consider the situation in the projection onto the $xy$-plane, as shown in Fig.~\ref{fig:lemma3and4}(ii).
There are six cells in the projection, which we label as
\mbox{\sc ne}\xspace, \mbox{\sc n-mid}\xspace, \mbox{\sc nw}\xspace, \mbox{\sc se}\xspace, \mbox{\sc s-mid}\xspace, and \mbox{\sc sw}\xspace.
If each cell in the projection meets fewer than $n/3-1$ lines, then at least one line of
$\Ltb_y$ must (in the projection) lie above $h_3$,
otherwise the cells below~$h_3$ intersect more than $n/3-1$ lines.

Let $j\geq 1$ be the number of lines from $\Ltb_x$ above~$h_3$.
Then the number of lines from $\Ltb_z$---these are points in the figure---that are to the right of $h_2$ is
at most~$n/3-j-2$, otherwise the \mbox{\sc ne}\xspace cell meets at least $n/3-1$ lines.
Similarly, the number of lines from $\Ltb_y$ to the left of $h_1$ must be
at most~$j-1$, otherwise the \mbox{\sc sw}\xspace cell meets at least
$(n/3-j-1) +  j = n/3-1$ lines.
But then we have
\begin{itemize}[nosep]
\item $\mbox{(\# lines from $\Ltb_x$ in \mbox{\sc n-mid}\xspace)} = j$,
\item $\mbox{(\# lines from $\Ltb_y$ in \mbox{\sc n-mid}\xspace)} \geq n/3 - (j-1)-1 = n/3 - j$,
\item $\mbox{(\# lines from $\Ltb_z$ in \mbox{\sc n-mid}\xspace)} \geq n/3 - (n/3-j-2) -1 =  j+1$.
\end{itemize}
This brings the total number of lines in the \mbox{\sc n-mid}\xspace cell to at least $n/3 + j + 1$,
thus contradicting our assumption. \qedhere
\end{proof}
We now turn our attention to the general case, where we are also allowed to use
splitting planes that are tilted or semi-tilted.  (Recall that a semi-tilted plane is parallel to
exactly one coordinate axis, and a tilted plane is
not parallel to any coordinate axis.)
\begin{lemma}\label{lem:3b-lb-general}
  For $n\geq 9$, we have $g(L^\mathrm{3}(n)) \geq n/3-1$.
\end{lemma}
\begin{proof}
Consider three splitting planes $h_1$, $h_2$ and $h_3$, and suppose for a contradiction that
each cell in $\ensuremath{\mathcal{A}}(H)$ intersects fewer than~$n/3-1$ lines. Define
\begin{itemize}[nosep]
\item $a \coloneqq \text{number of axis-parallel planes in $H$}$,
\item $s \coloneqq \text{number of semi-tilted planes in $H$}$, and
\item $t \coloneqq \text{number of tilted planes in $H$}$.
\end{itemize}
Note that $a+s+t=3$. The case where all three planes are axis-parallel has
already been handled in the previous two lemmas, so we can assume that $a<3$.
Any axis-parallel plane is crossed by $n/3$ lines from $L^\mathrm{3}$, any semi-tilted
plane is crossed by $2n/3$ lines from $L^\mathrm{3}$, and any tilted plane is crossed by $n$ lines from $L^\mathrm{3}$.
(Recall that, when we say that a line \emph{crosses}
a plane, or a plane \emph{crosses} a line, we mean that there is a proper intersection;
that is, the line is not contained in the plane.)
Thus
\[
\text{(\# fragments generated by the planes in $H$)}
= \frac{n}{3} \cdot (3 +a+2s+3t).
\]
Some fragments may be contained in one of the splitting planes and, hence, not
appear inside any cell. Note that an axis-parallel splitting plane may contain
at most one line from $L^\mathrm{3}$, a semi-tilted splitting plane may contain at most two lines
from $L^\mathrm{3}$, and a tilted splitting plane cannot contain any line from $L^\mathrm{3}$.
Furthermore, a line contained in splitting plane consists of at most three fragments,
arising due to the line crossing the other two splitting planes. Thus we have
at least $(n/3) \cdot (3+a+2s+3t) - 3(a+2s)$ fragments
appearing inside the cells in~$\ensuremath{\mathcal{A}}(H)$. Rewriting this, we conclude that
\begin{equation}
\text{(\# cell-line intersections)} \ge  (n/3) \cdot (6+s+2t) - 3(a+2s).  \label{eq:intersections}
\end{equation}
Since $\ensuremath{\mathcal{A}}(H)$ has at most eight cells, there must be a cell with
$
\ceil*{\frac{(n/3) \cdot (6+s+2t) - 3(a+2s)}{8}}
$
intersections.
We now make a case distinction, depending on the values of $a$, $s$ and $t$.
Recall that $n$ is a multiple of~3 and that we are now dealing with the case~$n\geq 9$.
The first five cases we consider can be handled easily using Eq.~\eqref{eq:intersections},
as follows.
\begin{itemize}
    \item If $t\geq 2$, or $t=1$ and $s=2$, there is a cell with at least
      $\ceil*{\frac{(n/3)\cdot 10 - 6}{8}} \geq n/3-1$ fragments.
\item If $t=s=1$  (hence, $a=1$) there is a cell with at least
      $\ceil*{\frac{(n/3)\cdot 9 - 9}{8}}
       = \ceil*{\frac{9}{8}(n/3-1)}
       \geq n/3-1$ fragments.
\item If $t=1$ and $s=0$ (hence, $a=2$) there is a cell with at least
      $\ceil*{ \frac{(n/3)\cdot 8 - 6}{8}}
      = \frac{n}{3}-1$ fragments.
\item If $s=3$ (hence, $t=a=0$) there is a cell with at least
      $\ceil*{\frac{(n/3)\cdot 9 - 18}{8}}
      = \ceil*{\frac{n}{3}-1 + \frac{n-30}{24}}$ fragments.
      For $n\geq 9$ this is at least $n/3-1$.
\item If $t=0$ and $s=2$ (hence, $a=1$) there is a cell with at least
      $\ceil*{\frac{(n/3)\cdot 8 - 15}{8}}
       = \ceil*{n/3- 15/8}
       = n/3-1$ fragments.
\end{itemize}
Each of the cases above gives us the desired contradiction.
The only remaining, and most difficult, case is when $t=0$, $s=1$, and $a=2$.
In this case we need a more refined analysis, given next.
\medskip

In the rest of the proof we assume there are two axis-parallel splitting planes,
say $h_1$ and $h_2$, and one semi-tilted splitting plane $h_3$.
If $h_1$ and $h_2$ are parallel to each other, the number of cells in $\ensuremath{\mathcal{A}}(H)$ is six.
From Equation~\ref{eq:intersections} it then follows that there is a cell with
\[
\ceil*{\frac{(n/3) \cdot (6+s+2t) - 3(a+2s)}{6}}
=
\ceil*{\frac{(n/3) \cdot 7- 12}{6}}
\geq
(n/3) -1
\]
intersections, again giving the desired contradiction.
Recall that the construction is symmetric with respect to the
axes---see Fig.~\ref{fig:bundles-construction}(ii)---and so without loss of generality
we may now assume that $h_1$ is perpendicular to the $x$-axis,
$h_2$ is perpendicular to the $y$-axis, and $h_3$ is parallel to the $y$-axis.
We now proceed to derive a contradiction with our assumption that each cell
in $\ensuremath{\mathcal{A}}(H)$ meets less than $n/3-1$ lines.
To this end we first prove several properties that the splitting planes~$h_1,h_2,h_3$
must satisfy, under our assumption. In the following, we consider the projection onto
the $xy$-plane, and statements like ``to the left of'' or ``above'' refer to the
situation in this projection. See Figure~\ref{fig:semi-tilted-1}(i), and note that the lines
of $\Ltb_z$ show up as points in the figure.
\begin{figure}
\begin{center}
\includegraphics{Figures/semi-tilted-1.pdf}
\end{center}
\caption{Illustration for the proof of Lemma~\ref{lem:3b-lb-general}. Note that in
part~(ii) of the figure, the semi-tilted plane~$h_3$ can also show up as a line with negative
slope. However, due to the small perturbation of the lines in $\Ltb_y$, $h_3$ can contain
at most two lines from $\Ltb_y$ (here showing up as points).
}
\label{fig:semi-tilted-1}
\end{figure}
\begin{myquote}
\vspace*{-5mm}
\begin{claim} \label{claim:1}
At least one line of $\Ltb_x$ must lie above $h_2$.
Hence, all lines of $\Ltb_z$ lie above~$h_2$.
\end{claim}
\begin{proof}
  For a contradiction, assume that no line of $\Ltb_x$ lies strictly above $h_2$.
  There is at most one line contained in $h_2$, so at least $n/3-1$ lines of $\Ltb_x$
  lie below~$h_2$. Each such line crosses $h_1$ and $h_3$---recall that the latter splitting
  plane is semi-tilted and parallel to the $y$-axis---and therefore crosses three of the
  four octants below $h_2$. Moreover, each line of $\Ltb_y$, except at most
  one line contained in~$h_1$ and at most two lines contained in~$h_3$, intersects one of these octants.
  Hence, the total count for the four octants below $h_2$ is at least
  $3\cdot (n/3-1) + (n/3-3)$, and consequently, at least one of the four octants must intersect at least
  \[
  \ceil*{ \frac{3\cdot (n/3-1) + (n/3-3)}{4} }
  =
  \ceil*{ \frac{4n/3-6}{4} }
  =
  n/3-1
  \]
  lines, contradicting our assumption. (Here we use our assumption
  that $n$ is a multiple of~3 and that $n\geq 9$.)
\end{proof}
\end{myquote}
Claim~\ref{claim:1} can be used to restrict the possible positions of~$h_1$.
\begin{myquote}
\vspace*{-5mm}
\begin{claim} \label{claim:2}
$h_1$ must have at least one line of $\Ltb_z$ on either side of it.
Hence, all lines of $\Ltb_y$ lie to the left of~$h_1$.
\end{claim}
\begin{proof}
By Claim~\ref{claim:1}, all lines from $\Ltb_z$ lie above~$h_2$. If $h_1$ does not
have lines from $\Ltb_z$ on either side of it, then one side has at least $n/3-1$ of these lines.
Hence, one of the four quadrants defined by $h_1,h_2$ in the $xy$-projection---in
particular, one of the quadrants above $h_2$---contains at least $n/3-1$ lines
from $\Ltb_z$. Recall that the splitting plane~$h_3$
is a semi-tilted plane parallel to the $y$-axis. Hence, $h_3$ is crossed by all lines from~$\Ltb_z$,
and so there would be an octant in $\ensuremath{\mathcal{A}}(H)$ that intersects at least $n/3-1$ lines,
thus contradicting our assumptions.
\end{proof}
\end{myquote}
Next we restrict the possible positions for the semi-tilted splitting plane~$h_3$.
\begin{myquote}
\vspace*{-5mm}
\begin{claim} \label{claim:3}
 $h_3$ must have at least one line of $\Ltb_y$ on either side of it.
\end{claim}
\begin{proof}
Observe that $h_3$ can contain at most two lines from~$\Ltb_y$.
Suppose for a contradiction that there are at least $n/3-2$ lines to one side of~$h_3$,
and consider the four octants of $\ensuremath{\mathcal{A}}(H)$ lying to this side.
Every line from $\Ltb_x$ and $\Ltb_z$ intersects at least one of these octants,
except at most one line from $\Ltb_x$ contained in~$h_2$ and at most one line
from $\Ltb_z$ contained in~$h_1$. Moreover, each of the at least
$n/3-2$ lines from $\Ltb_y$ not contained in $h_3$, intersects~$h_2$
and, hence, two of the octants. It follows that there is an octant that
intersects
\[
\ceil*{\frac{(2n/3-2) + 2(n/3-2)}{4}}
=
\ceil*{\frac{4n/3 - 6}{4}}
=
n/3 -1
\]
lines, thus contradicting our assumptions.
\end{proof}
\end{myquote}
Let $i$ be the number of lines of $\Ltb_x$ below $h_2$.
\begin{myquote}
\vspace*{-5mm}
\begin{claim} \label{claim:29ths}
$i \geq \frac{2}{9}n-\frac{1}{3}$.
\end{claim}
\begin{proof}
Consider the two quadrants above $h_2$ and the four octants of $\ensuremath{\mathcal{A}}(H)$ corresponding to
those quadrants. Each line of $\Ltb_x$ above $h_2$ intersects $h_1$ and $h_3$, and thus
intersects three of these octants, for a total of $3(n/3-i-1)$ octant-line intersections.
Each line of $\Ltb_y$, except for at most two lines contained in $h_3$, intersects one
octant, thus contributing $n/3-2$ octant-line intersections.
Finally, each line of $\Ltb_z$, except for at most one line contained in~$h_1$,
intersects two octants (since they intersect $h_3$), contributing $2(n/3-1)$ octant-line intersections.
Hence, there is an octant intersecting
\[
\ceil*{\frac{3(n/3-i-1) + (n/3-2)+2(n/3-1)}{4}}
=
\ceil*{n/3 - 2 + \frac{2n/3-3i+1}{4}}
\]
lines. In order not to contradict the assumption that no octant intersects more
than $n/3-2$ lines, we must thus have $2n/3-3i+1\leq 0$. Hence, $i\geq 2n/9 -1/3$, as claimed.
\end{proof}
\end{myquote}
To finish the proof of Lemma~\ref{lem:3b-lb-general}, we switch views and consider
the projection onto the $xz$-plane. Here $h_3$ shows up as a slanted line, as shown
in Fig.~\ref{fig:semi-tilted-1}(ii). The are two cases, depending on the slope of $h_3$
in the $xz$-projection.
\medskip

\noindent\emph{Case 1: The projection of $h_3$ onto the $xz$-plane has positive slope.}
\\[2mm]
Consider the \mbox{\sc sw}\xspace-quadrant in Fig.~\ref{fig:semi-tilted-1}(i), that is, the quadrant
below~$h_2$ and to the left of $h_1$. This quadrant corresponds to a vertical
column in $\mathbb{R}^3$, which is cut into two octants by the semi-tilted plane~$h_3$.
Clearly, each line in $\Ltb_y$, except for at most two lines contained in $h_3$,
intersects one of these two octants. Furthermore, each of the $i$~lines of $\Ltb_x$
below $h_2$ intersects both octants, because $h_3$ has positive slope in the
$xz$-projection. Indeed, by Claim~\ref{claim:3} the plane~$h_3$ must have at least one
line from $\Ltb_y$ on either side of it---see Fig.~\ref{fig:semi-tilted-1} where these lines show
up as points---and together with the fact that $h_3$ has positive slope this implies
that all intersections of $\Ltb_x$ with $h_3$ lie to the left of~$h_1$.
Thus, all $i$~lines of $\Ltb_x$ below $h_2$ intersects both octants, contributing $2i$
octant-line intersections. Hence, the total number of octant-line intersections
in the two octants is at least $(n/3-2)+2i$.  Since $i \geq \frac{2}{9}n-\frac{1}{3}$
by Claim~\ref{claim:29ths} there is an octant that intersects at least
\[
\ceil*{\frac{(n/3 - 2) + 2i}{2}}
\geq
\ceil*{\frac{n/3 + (4n/9 -2/3) - 2}{2}}
=
\ceil*{n/3 - 2 + \frac{ (n/9  - 2/3)}{2}}
\]
lines. Since $n\geq 9$ there is an octant intersecting more than $n/3-2$
lines, thus giving the desired contradiction for Case~1.
\medskip

\noindent\emph{Case 2: The projection of $h_3$ onto the $xz$-plane has negative slope.}
\\[2mm]
\begin{figure}
\begin{center}
\includegraphics{Figures/semi-tilted-2.pdf}
\end{center}
\caption{Illustration for Case~2 of the proof of Lemma~\ref{lem:3b-lb-general}.
Recall that the lines in the construction were perturbed slightly. For the lines in
$\Ltb_y$, which show up as points in the figure, these perturbations are shown
larger than they actually are.
Due to the perturbations, $h_3$ can contain at most two lines from $\Ltb_y$.
}
\label{fig:semi-tilted-2}
\end{figure}
This case is illustrated in Fig.~\ref{fig:semi-tilted-2}.
Let $j$ be the number of lines of $\Ltb_z$ to the right of~$h_1$
and let $k$ be the number of lines of $\Ltb_y$ above~$h_3$;
see Fig.~\ref{fig:semi-tilted-2}.   We label the ``quadrants'' induced by $h_1,h_3$
the $xz$-projection as \mbox{\sc ne}\xspace, \mbox{\sc se}\xspace, \mbox{\sc sw}\xspace, \mbox{\sc nw}\xspace.
Each of the these quadrants defines a column
in~$\mathbb{R}^3$, which is partitioned into two octants by~$h_2$.
We label the octants in the \mbox{\sc ne}\xspace-column that are above and below $h_2$
by \mbox{\sc ne-top}\xspace and \mbox{\sc ne-bottom}\xspace, respectively. The octants in the other columns are labeled similarly.
\begin{itemize}
\item Consider the \mbox{\sc nw-top}\xspace octant. It meets at least $n/3-j-1$ lines of $\Ltb_z$, because
    all lines of $\Ltb_z$ lie above~$h_2$ by Claim~\ref{claim:1}. Moreover, it meets
    $k$ lines of~$\Ltb_y$. (It may also meet lines from $\Ltb_x$ but we need not take
    them into account.) Since any octant is assumed to intersect less
    than $n/3-1$ lines, we must have $(n/3-j+1)+k < n/3-1$. Hence, $j>k+2$.
\item Now consider the \mbox{\sc sw-bottom}\xspace octant. It meets $i$ lines from $\Ltb_x$ and at least
    $n/3-k-2$ lines of $\Ltb_y$, and so we must have $i + (n/3-k-2) < n/3-1$.
    Hence, $k>i-1$.
\item Finally, consider the \mbox{\sc ne-top}\xspace octant. It meets $j$ lines from $\Ltb_z$, because
    all lines of $\Ltb_z$ lie above~$h_2$ by Claim~\ref{claim:1}. Note that
    all lines from $\Ltb_x$ intersect the \mbox{\sc ne}\xspace quadrant, since $h_3$ has negative
    slope in the $xz$-projection. At least $n/3-i-1$ of these lines
    lie above $h_2$ and, hence, intersect the \mbox{\sc ne-top}\xspace octant.
    We can conclude that we must have $j + (n/3-i-1) < n/3-1$, and so~$i>j$.
\end{itemize}
Putting these three inequalities together we obtain
\[
j > k+2 > i+1 > j+1.
\]
This is the desired contradiction and finishes the proof.
\end{proof}

\section{Better lower bounds for axis-parallel splitting planes}
\label{sec:lower-bounds}
In this section we give improved lower bounds on $g_{\perp}(n)$ and $g_{\|}(n)$.
To this end we present a family of configurations $L^4(n)$ of $n$ lines, with $n$ divisible by 8,
and prove that any decomposition of the type under consideration must have a cell intersected
by at least $3n/8 - 1$~lines. Interestingly, for mutually orthogonal splitting planes the $-1$ term disappears.
\begin{theorem}
  \label{th:unbalancedlb}
  For every $n$ divisible by 8, there exists a configuration $L^4=L^4(n)$ such that
  $g_{\perp}(L^4(n)) = 3n/8$ and $g_{\|}(L^4(n)) = 3n/8 - 1$.
  Hence, for any $n\geq8$, we have $g_{\perp}(n) \geq \frac{3}{2}\floor{n/4}$ and $g_{\|}(n) \geq \frac{3}{2}\floor{n/4}-1$.
\end{theorem}
The rest of this section is devoted to the proof of Theorem~\ref{th:unbalancedlb},
where $L^4$ is defined as the union of the following sets:
\begin{align*}
  L^4_x & \coloneqq \{ (0,i,i + n/4) + \lambda (1,0,0): i \in [n/4, n/2) \},\\
  L^4_y & \coloneqq \{ (i+n/4,0,i) + \lambda (0,1,0):  i\in [0, n/4) \}, \text{ and} \\
  L^4_z & \coloneqq \left\{ (i,i,0) + \lambda (0,0,1): i \in [0, n/4) \cup [n/2, 3n/4) \right\}.
\end{align*}
Note that $|L^4_x| = |L^4_y| = n/4$ and $|L^4_z| = n/2$, and that, up to symmetries,
any projection to an axis-parallel plane looks like one of projections in Fig.~\ref{fi:unbalancedlb}.
\begin{figure}[h]
\begin{center}
\includegraphics{Figures/unbalancedlb}
\end{center}
\caption{Line set $L^4$ from the proof of Theorem~\ref{th:unbalancedlb}}
\label{fi:unbalancedlb}
\end{figure}
We will prove the theorem in two steps, by first considering the case of mutually
orthogonal splitting planes and then the case of arbitrary axis-parallel splitting planes.
In the remainder of this section, we assume that $n$ is divisible by~8 and that~$n\geq 8$.
\begin{lemma}\label{lem:4b-lb-perp}
For any $n$ divisible by $8$, we have $g_{\perp}(L^4(n)) = 3n/8$.
\end{lemma}
\begin{proof}
Consider three splitting planes $h_1$, $h_2$, and $h_3$, orthogonal to the $x$-, $y$-,
and $z$-axis, respectively. Let $\ell_1\colon x = i$ and $\ell_2\colon y = j$ be the
projections of $h_1$ and $h_2$ onto the $xy$-plane; see Fig.~\ref{fi:unbalancedlb-1}.
Suppose that $h_3$ has $k$ of the lines from $L^4_x \cup L^4_y$ lying strictly above it.
(Note that for the purposes of lower-bound analysis we can assume that $h_1$, $h_2$, and $h_3$
each contain a line of $L^4$, as shifting them until they do can only decrease the number of
lines of $L^4$ meeting each open octant.  We will make this assumption hereafter in this proof,
that is, we suppose that $i$, $j$, and $k$ are integers in the relevant range.)
We use $\mbox{\sc ne}\xspace$ to denote the open north-east quadrant defined by $\ell_1,\ell_2$ and define $\mbox{\sc se}\xspace$, $\mbox{\sc sw}\xspace$, and $\mbox{\sc nw}\xspace$ similarly.
For a quadrant $\mbox{\sc q} \in \{\mbox{\sc nw}\xspace, \mbox{\sc ne}\xspace, \mbox{\sc sw}\xspace, \mbox{\sc se}\xspace\}$, we define
\mbox{\sc q-top} and \mbox{\sc q-bottom} to be the open octants induced by $h_3$.
With a slight abuse of notation, we also use $\mbox{\sc ne}\xspace$ (and, similarly,
the other variables) to denote the total number of objects
(lines and points) incident to the region~$\mbox{\sc ne}\xspace$.

We first observe that by setting $i = j = 3n/8$ and $k = n/4$ we
obtain~$g_{\perp}(L^4) \leq 3n/8$. It remains to argue that $g_{\perp}(L^4) \geq 3n/8$.
Up to translation,  rotation, and reflection, it suffices to consider the following cases.
\medskip

\begin{figure}[b]
  \begin{center}
    \includegraphics[width=1.0\textwidth]{Figures/unbalancedlb-1}
  \end{center}
  \caption{Different cases of partitioning with three orthogonal planes, projected to the $xy$-plane showing view from $z=+\infty$.}
  \label{fi:unbalancedlb-1}
\end{figure}

\noindent\emph{Case 1: $0 \leq i < n/4$ and $0 \leq j < n/2$;
see Fig.~\ref{fi:unbalancedlb-1}(i)}
\\[2mm]
Observe that $\mbox{\sc ne}\xspace$ is incident to, at least, all $n/4$ lines in $L^4_y$,
and $n/4$ lines of $L^4_z$. It follows that the number of incidences in $\mbox{\sc ne-top}\xspace$
and $\mbox{\sc ne-bottom}\xspace$ together is at least $n/4 + 2(n/4) - 1 = 3n/4 - 1$,
implying that at least one of $\mbox{\sc ne-top}\xspace, \mbox{\sc ne-bottom}\xspace$ is incident to
$$\left\lceil\frac{3n}{8} - \frac{1}{2}\right\rceil\geq \frac{3n}{8}$$ lines, where the inequality uses the fact that since $n$ is divisible by 8.
\medskip

\noindent\emph{Case 2: $0 \leq i < n/4$ and $n/2 \leq j < 3n/4$;
see Fig.~\ref{fi:unbalancedlb-1}(ii).}
\\[2mm]
We first additionally assume that $0 \leq k < n/4$. Thus, $h_3$ meets some line of $L^4_x$.
$\mbox{\sc ne-bottom}\xspace$ meets $n/4$ lines of $L^4_y$ and $3n/4 - j - 1$ lines of $L^4_z$,
so $n - j - 1$ lines in total. If $j < 5n/8$ then we have $n - j - 1 > 3n/8 - 1$
and, hence, $n - j - 1 \geq 3n/8$.
So we may assume $j \geq 5n/8$. Observe that $\mbox{\sc se}\xspace$ is incident
to all $n/2$ lines in $L^4_x \cup L^4_y$, and at least $j - n/2 \geq n/8$ lines of $L^4_z$.
Since $h_3$ contains a line of $L^4_x$, the number of incidences in $\mbox{\sc se-top}\xspace$ and $\mbox{\sc se-bottom}\xspace$ is
at least $2(n/8) + n/2 - 1 = 3n/4 - 1$, implying that at least one of $\mbox{\sc se-top}\xspace$
and $\mbox{\sc se-bottom}\xspace$ is incident to at least $$ \left\lceil\frac{3n}{8} - \frac{1}{2}\right\rceil = \frac{3n}{8}$$ lines.

Now suppose $n/4 \leq k < n/2$, i.e., $h_3$ meets some line of $L^4_y$.
$\mbox{\sc sw-top}\xspace$ meets $i$ lines of $L^4_z$ and all $n/4$ lines of $L^4_x$,
i.e., $\mbox{\sc sw-top}\xspace = i + n/4$. When $i \ge n/8$ (recall that $n$ is a multiple of~$8$),
we get $\mbox{\sc sw-top}\xspace \ge 3n/8$, so we can assume $i < n/8$. Observe that $\mbox{\sc se}\xspace$ is incident
to all $n/2$ lines in $L^4_x \cup L^4_y$, and
$$\frac{n}{4} - i-1 > \frac{n}{4} - \frac{n}{8} - 1 = \frac{n}{8} - 1,$$ that is,
at least $n/8$ lines of $L^4_z$. Thus the number of incidences in $\mbox{\sc se-top}\xspace$ and
$\mbox{\sc se-bottom}\xspace$ together is at least $$2\left(\frac{n}{8}\right) + \frac{n}{2} - 1 = \frac{3n}{4} - 1,$$ implying
that at least one of $\mbox{\sc se-top}\xspace$ and $\mbox{\sc se-bottom}\xspace$ meets at least $3n/8$ lines.
\medskip

\noindent\emph{Case 3:  $n/4 \leq i < n/2$ and $n/4 \leq j < n/2$;
see Fig.~\ref{fi:unbalancedlb-1}(iii).}
\\[2mm]
Suppose also that $0 \leq k < n/4$ (i.e., $h_3$ contains a line of $L^4_x$).
Then, all but one of the lines of $L^4_y$ (so $n/4 - 1$) are incident to
either $\mbox{\sc ne-bottom}\xspace$ or $\mbox{\sc sw-bottom}\xspace$. Additionally, $\mbox{\sc ne-bottom}\xspace$ and $\mbox{\sc sw-bottom}\xspace$ are each incident to $n/2$
lines of $L^4_z$. That is, number of incidences in $\mbox{\sc ne-bottom}\xspace$ and
$\mbox{\sc sw-bottom}\xspace$ is at least $n/4 - 1 + n/2 = 3n/4 - 1$.
It follows that at least one of these cells is incident to $3n/8$ lines.

Now suppose $n/4 \leq k < n/2$. i.e., $h_3$ contains a line of $L^4_y$.
Then, all but one of the lines of~$L^4_x$ (so $n/4 - 1$) are incident to
either $\mbox{\sc ne-top}\xspace$ or $\mbox{\sc sw-top}\xspace$. Additionally, $\mbox{\sc ne-top}\xspace$ and $\mbox{\sc sw-top}\xspace$ are each incident to $n/2$ lines of $L^4_z$.
Then the number of incidences in $\mbox{\sc ne-top}\xspace$ and $\mbox{\sc sw-top}\xspace$ is at least $n/4 - 1 + n/2 = 3n/4 - 1$.
It follows that at least one of these cells is incident to $3n/8$ lines.
\medskip

 We conclude that all three cases give the desired number of incidences, which
 finishes the proof of the lemma.
\end{proof}
To finish the proof of Theorem~\ref{th:unbalancedlb} it remains to deal with
axis-parallel splitting planes that need not be mutually orthogonal.
\begin{lemma}\label{lem:4b-lb-par}
For any $n$ divisible by~8, we have $g_{\|}(L^4(n)) = 3n/8 -1$.
\end{lemma}
\begin{proof}
We first observe that the case of all three planes being orthogonal to the same axis
is not interesting: Such planes would cut each line of one of the sets $L^4_x,L^4_y,L^4_z$
into four pieces, producing a total of at least
$$4\cdot\frac{n}{4}+\frac{n}{4}-1+\frac{n}{2}-1=\frac{7n}{4}-2$$ line-cell incidences,
so at least one of the four cells would meet at least $$\frac{1}{4}\left(\frac{7n}{4}-2\right)=\frac{7n}{16}-\frac12>\frac{3n}{8}-1$$ lines.
Hence, we will focus on partitions where two of the planes are parallel. Up to a
permutation and reorientation of the coordinates, it is sufficient to consider the
three cases illustrated in Figure~\ref{fi:unbalancedlb-2}.
As before, it is safe to assume that
each of the three planes contains a line of~$L^4$.

We need prove that in each of the three cases, there is a cell that meets at least $3n/8 - 1$ lines,
and that this bound can also be achieved as an upper bound in at least one of the cases.
\begin{figure}
  \begin{center}
    \includegraphics[width=1.0\textwidth]{Figures/unbalancedlb-2}
  \end{center}
  \caption{Different cases in the proof of Lemma\protect\ref{lem:4b-lb-par}.
           For Case~(a) the projection onto the $xy$-plane is shown, viewed from $z=+\infty$.
           For Cases~(b)~and~(c) the projection onto the $xz$-plane is shown, viewed from $y=+\infty$.}
  \label{fi:unbalancedlb-2}
\end{figure}
\medskip

\noindent \emph{Case (a)\textnormal{:} $h_1$ and $h_2$ are parallel to the $yz$-plane and $h_3$ is parallel to the $xz$-plane.}
\\[2mm]
We label the cells as \mbox{\sc nw}\xspace, \mbox{\sc n}, \mbox{\sc ne}\xspace, \mbox{\sc sw}\xspace, \mbox{\sc s}, and \mbox{\sc se}\xspace. Suppose there are $i$~lines
from~$L^4_y \cup L^4_z$ strictly to the left of~$h_1$, and $j$ lines from $L^4_y \cup L^4_z$
strictly to the right of $h_2$, and $k$ lines from $L^4_x \cup L^4_z$ strictly above $h_3$.
Due to the symmetry in the configuration, we may assume that the number of lines from
$L^4_x$ below~$h_3$ is at least the number of lines from $L^4_x$ above~$h_3$.
We can assume that $h_3$ contains a line of $L^4_x$ (and not a line of $L^4_z$),
since otherwise $$\mbox{\sc sw}\xspace + \mbox{\sc s} + \mbox{\sc se}\xspace = 3\left(\frac{n}{4}\right) + \frac{n}{4} + \frac{n}{4} - 2 = \frac{5n}{4} - 2,$$
implying that at least one of these cells contains $$\left\lceil\frac{5n}{12} - \frac{2}{3}\right\rceil \geq \frac{3}{8}n - 1$$ lines.
Hence, from now on we assume~$0\leq k < 3n/8$.

Note that $\mbox{\sc sw}\xspace$ is incident to $n/2 - k -1 \geq n/8$ lines of $L^4_x$
and $i$ lines of $L^4_y\cup L^4_z$. If $i \geq n/4$, then this implies
$\mbox{\sc sw}\xspace \geq n/8 + i \ge 3n/8$ and so we are done.
Similarly, if $j < n/4$, then $\mbox{\sc s}$ is incident to at least $n/8$ lines of $L_x$
and $n/4$ lines of $L_y$, for a total of $3n.8$ incidences, and we are done as well.
Hence, from here on we assume that $i < n/4$ (so $h_1$ contains a line of $L^4_z$),
and that $j \geq n/4$ (so $h_2$ contains a line of $L^4_y$).
Observe that $\mbox{\sc sw}\xspace, \mbox{\sc ne}\xspace$ are incident to $i + j$ lines of $L^4_y\cup L^4_z$, and $n/4-1$ lines of $L^4_x$,
that is,  $$\mbox{\sc sw}\xspace + \mbox{\sc ne}\xspace = i + j + \frac{n}{4}-1. $$
Moreover, $\mbox{\sc s}$ is incident to at least $n/8$ lines of $L^4_x$,
to $n/2 - j-1$ lines of $L^4_y$, and to $n/4 - i-1$ lines of $L^4_z$
giving $$\mbox{\sc s} = \frac{n}{8} + \left(\frac{n}{2} - j - 1\right) + \left(\frac{n}{4}  - i -1\right)= \frac{7n}{8} - (i + j) - 2.$$
By combining these two inequalities we see that $$\mbox{\sc sw}\xspace + \mbox{\sc ne}\xspace + \mbox{\sc s} = \frac{9n}{8} - 3,$$
implying one of the three cells is incident to at least $3n/8 - 1$ lines.

This finishes the lower-bound proof for Case~(a). Note that we can also achieve an upper bound
of $3n/8 - 1$, by setting $k = 3n/8 - 1$, $i = n/4 -1$, and $j = n/4$.
\medskip

\noindent \emph{Case (b)\textnormal{:} $h_1$ and $h_2$ are parallel to the $yz$-plane and
      $h_3$ is parallel to the $xy$-plane.}
\\[2mm]
As before, we label the cells as \mbox{\sc nw}\xspace, \mbox{\sc n}, \mbox{\sc ne}\xspace, \mbox{\sc sw}\xspace, \mbox{\sc s}, and \mbox{\sc se}\xspace. Suppose there
are $i$ lines from~$L^4_y \cup L^4_z$ strictly to the left of $h_1$, and
$j$~lines from $L^4_y \cup L^4_z$ strictly to the right of $h_2$,
and $k$ lines from $L^4_x \cup L^4_y$ strictly above $h_3$.

Each of the lines in $L^4_y$ and $L^4_z$ are incident to exactly one of $\mbox{\sc sw}\xspace, \mbox{\sc s}, \mbox{\sc se}\xspace$,
except for the two lines contained in $h_1$ and in $h_2$. If $k < n/8$, then
at least $n/8$ of the lines in $L^4_x$ are incident to each of the
cells $\mbox{\sc sw}\xspace, \mbox{\sc s}, \mbox{\sc se}\xspace$, implying
$$\mbox{\sc sw}\xspace + \mbox{\sc s} + \mbox{\sc se}\xspace = 3\left(\frac{n}{8}\right) + \frac{3n}{4} - 2 = \frac{9n}{8} - 2.$$
Hence, one of $\mbox{\sc sw}\xspace, \mbox{\sc s}, \mbox{\sc se}\xspace$ is incident to at least $\ceil{3n/8 - 2/3} = 3n/8$ lines,
and we are done. From here on, we therefore assume $k \geq n/8$.

Each line in $L^4_x$ is incident to either of $\mbox{\sc sw}\xspace$ or $\mbox{\sc nw}\xspace$, except for the line
contained in $h_3$. If $i \geq n/4$ then $n/4$ lines in $L^4_z$
are incident to both $\mbox{\sc sw}\xspace$ and $\mbox{\sc nw}\xspace$, and so
$$\mbox{\sc sw}\xspace + \mbox{\sc nw}\xspace = 2\left(\frac{n}{4}\right) + \frac{n}{4} - 1 = \frac{3n}{4} - 1.$$
It follows that $\mbox{\sc sw}\xspace$ or $\mbox{\sc nw}\xspace$ must be incident to at least $3n/8$ lines,
and we are done again. So we can assume $i < n/4$. By symmetry, we also can
assume $j < n/4$.

Each of the $k$ lines of $L^4_x$ above $h_3$ are incident to both $\mbox{\sc nw}\xspace$ and $\mbox{\sc ne}\xspace$.
The cells $\mbox{\sc nw}\xspace$ and $\mbox{\sc ne}\xspace$ are also incident to $i$ and $j$ lines from $L^4_z$, respectively,
and so $\mbox{\sc nw}\xspace + \mbox{\sc ne}\xspace = 2k + i + j$. Combining this with $\mbox{\sc nw}\xspace + \mbox{\sc ne}\xspace \leq 3n/4 - 2$,
we get that $i + j \leq 3n/4 - 2k - 2$. On the other hand, $\mbox{\sc s}$ is incident
to $n/2 - k - 1$ lines of $L^4_x \cup L^4_y$ and $n/2 - (i+j) - 2$ lines of $L^4_z$.
Hence,
\begin{align*}
\mbox{\sc s} & =
    \left(\frac{n}{2} - k - 1\right) + \left(\frac{n}{2} - (i+ j)-2\right) \\
    & = n - k - (i + j) -3 \\
    & \geq n - k - \left(\frac{6n}{8} - 2k - 2\right) - 3 \\
    & =  \frac{n}{4} + k - 1 \\
    & \geq \frac{3n}{8} - 1.
\end{align*}
This finishes the proof of the lower bound for Case~(b). Note that also for this case
we can achieve an upper bound of $3n/8 - 1$ lines, by setting $k = n/8$ and $i = j = n/4 - 1$.
\medskip

\noindent \emph{Case (c)\textnormal{:} $h_1$ and $h_2$ are parallel to the $xy$-plane
      and $h_3$ is parallel to the $yz$-plane.}
\\[2mm]
Label the cells as $\mbox{\sc nw}\xspace, \mbox{\sc w}, \mbox{\sc sw}\xspace, \mbox{\sc ne}\xspace, \mbox{\sc e}$, and $\mbox{\sc se}\xspace$. Let $k$ be the number of lines
in $L^4_y \cup L^4_z$ that are strictly to the left of~$h_3$. By symmetry,
we may assume that $k \geq 3n/8$. Now each of the cells $\mbox{\sc nw}\xspace, \mbox{\sc w}, \mbox{\sc sw}\xspace$ are
incident to~$n/4$ of the lines from $L^4_z$. All $n/4$ lines in $L^4_x$
and at least $n/8$ lines in $L^4_y$ are incident to exactly one of these cells,
except for two that might be contained in $h_1$ and $h_2$. Hence,
$$\mbox{\sc nw}\xspace + \mbox{\sc w} + \mbox{\sc sw}\xspace \geq 3\left(\frac{1}{4}n\right) + \frac{n}{8} + \frac{n}{4} - 2 = \frac{9n}{8} - 2,$$
implying one of these cells is incident to at least $\ceil{3n/8 - 2/3} = 3n/8$ lines.

This finishes the lower-bound proof for Case~(c) and, hence, the proof of the lemma.
\end{proof}

\section{Upper bounds}
\label{sec:upper-bounds}
We now prove upper bounds on $g_{\perp}(n)$ and $g_{\|}(n)$.
More precisely, we present algorithms that produce, for any set $L$ of $n$ lines,
a decomposition of the type under consideration, with each cell intersected
by at most a certain number of the lines.

Let $L := L_x \cup L_y\cup L_z$ be a set of axis-parallel lines in $\mathbb{R}^3$,
where $L_x,L_y,L_z$ denote the subsets parallel to the $x$-, $y$-, and $z$-axis, respectively. We say $L_x$ is in \emph{general position} if no pair of distinct lines in $L_x$ share $y$- or $z$-coordinates; we define general position for $L_y$ and $L_z$ similarly. We say $L$ is in general position if $L_x$, $L_y$, and $L_z$ are in general position, and no two lines in~$L$ have a common point. We first argue that, for the purposes of upper bounds, it suffices to restrict our attention to sets in general position.

\begin{lemma}
\label{lem:generalposition}
Let $L = L_x \cup L_y\cup L_z$ be a set of axis-parallel lines not in general position. Then there exists a set $L' = L'_x \cup L'_y\cup L'_z$ of axis-parallel lines in general position such that
\[g_{\|}(L)\leq g_{\|}(L') \quad \mbox{ and } \quad g_{\perp}(L)\leq g_{\perp}(L'). \]
\end{lemma}
\begin{proof}
Suppose that $L = L_x \cup L_y\cup L_z$ is a set of lines not in general position. Assume, without loss of generality, that the intersection points of lines in $L_x$ (resp. $L_y$, and $L_z$) with the plane $x = 0$ (resp. $y = 0$, and $z = 0$) have integer coordinates. We obtain $L'$ by a generic perturbation of the lines of $L$. More specifically, for each line $\ell \in L$, we let $\ell'$ be a generic line parallel to $\ell$ inside a tube of radius $1/3$ centered at $\ell$.

Consider a triple $H' = (h'_1, h'_2, h'_3)$ of axis-parallel splitting planes (which need not be mutually orthogonal). Suppose, without loss of generality, that $h'_1$ is orthogonal to the $x$-axis and is given by $x=\alpha'$ for some $\alpha' \in \mathbb{R}$. Let $h_1$ be the plane given by $x = \alpha$ where $\alpha$ is $\alpha'$ rounded to the nearest integer with ties broken arbitrarily; and define $h_2, h_3$ similarly. Let $H = (h_1, h_2, h_3)$ be the resulting triple of axis-parallel splitting planes.

Let  $\mathcal{C}' \in \mathcal{A}(H')$, and let $\mathcal{C} \in \mathcal{A}(H)$ be the corresponding cell. (Since two or more planes in $H'$ may be ``rounded'' to the same plane in $H$, the cell $\mathcal{C}$ can be the empty set. In this case the following claim trivially holds.)
We claim that the number of incidences of $\mathcal{C}$ with lines of $L$ is at most the number of incidences of $\mathcal{C}'$ with lines of $L'$.
This claim follows from the observation that, for each plane $h_i \in H$, the number of lines of $L$ lying strictly on one side of $h_i$ is upper bounded by the number of lines of $L'$ lying on the same side of the corresponding $h'_i \in H$. To see this, note that if $\ell' \in L'$ lies on $h_i$, on $h'_i$, or between them, then the corresponding line $\ell \in L$ lies on~$h_i$.
\end{proof}

\subsection{Upper bounds on \texorpdfstring{$g_{\|}$}{gpar}}
We start with a simple observation.
\begin{observation}\label{obs:good-label}
If $\max\left(|L_x|,|L_y|,|L_z|\right) = m$ then
there is a set $H$ of three axis-parallel planes (two of which are parallel) such that any cell in $\ensuremath{\mathcal{A}}(H)$
meets at most $(5n-m)/12$~lines from $L$.
\end{observation}
\begin{proof}
  Assume without loss of generality that $L_z$ is the smallest of the three sets.  By assumption, $|L_z|\leq \floor*{(n-m)/2}$.
  Partition $L_x\cup L_y$ into three equal-size subsets using two planes $h_1,h_2$ parallel to the
  $xy$-plane, and partition $L_z$ into two equal-size subsets using a plane $h_3$ parallel to the $yz$- or $xz$-pane.  As in earlier arguments, we can always choose the planes so that they contain a line of~$L$.
  Set $H := \{ h_1,h_2,h_3\}$.
  Then the number of lines each of the six cells in $\ensuremath{\mathcal{A}}(H)$ meets is at most
  \begin{align*}
    \ceil*{\frac{|L_x|+|L_y|-2}{3}} + \ceil*{\frac{|L_z|-1}{2}} & \leq
    \frac{|L_x|+|L_y|}{3} + \frac{|L_z|}{2} \\
    & = \frac{n - |L_z|}{3} + \frac{|L_z|}{2}\\
    & \leq \frac{n}{3} + \frac{\floor*{(n-m)/2)}}{6}\\
    & \leq \frac{5n-m}{12}. \qedhere
  \end{align*}
\end{proof}
The following theorem gives an upper bound on~$g_{\|}$.
\begin{theorem}\label{th:7nover18}
For any set $L$ of $n$ axis-parallel lines in $\mathbb{R}^3$, there is
a set $H$ of three axis-parallel planes (two of which are parallel) such that any cell in $\ensuremath{\mathcal{A}}(H)$
meets at most $7n/18$ lines from $L$. Hence, $g_{\|}(n) \leq \floor{7n/18}$.
\end{theorem}
\begin{proof}
Define $L_x$, $L_y$, and $L_z$ as above.
The largest of the groups has size at least $\ceil{n/3}$.  The theorem now follows from Observation~\ref{obs:good-label} with $m=\ceil{n/3}$.
\end{proof}

\subsection{Upper bounds on \texorpdfstring{$g_{\perp}$}{gperp}}

\begin{theorem}
\label{thm:512upper-orig}
For any set $L$ of $n$ axis-parallel lines, there is
a set $H$ of three planes, one
orthogonal to each axis direction, such that any cell in $\ensuremath{\mathcal{A}}(H)$
meets at most $\ceil{5n/12}$ of the lines; in other words, $g_{\perp}(n)\leq \ceil{5n/12}$.
\end{theorem}
\begin{proof}
Assume without loss of generality that $|L_z|\geq \max(|L_x|, |L_y|)$, and
consider the projection of $L$ onto the $xy$-plane. In the projection the
lines from $L_z$ become points, the lines from the other sets are still lines.
We denote the splitting planes orthogonal to the
$x$-, $y$-, and $z$-axis by $h_1$, $h_2$, and $h_3$, respectively.
We will first explain how we pick $h_1$ and $h_2$---in the projection
these correspond to splitting lines, which we denote by $\ell_1$ and
$\ell_2$, respectively---and then finish the construction by placing~$h_3$.
We distinguish two cases.
\medskip

\noindent\emph{Case 1: $|L_z| \geq n/2$}.
\\[2mm]
  This is the easy case: we pick $\ell_1$ and $\ell_2$ such that each
  open quadrant contains at most $\floor{|L_z|/3}$ points, and we pick $h_3$ such that
  at most half the lines from $L_x\cup L_y$ are above $h_1$ and at most half are below.
  Thus each cell in the resulting decomposition intersects at most
  \[
  \floor*{\frac{|L_z|}{3}} + \floor*{\frac{|L_x|+|L_y|}{2}}
  \leq \frac{|L_x|+|L_y|+|L_z|}{3} + \frac{|L_x|+|L_y|}{6}
  \leq \frac{5n}{12},
  \]
  lines, since $|L_x|+|L_y|+|L_z|=n$ and $|L_x|+|L_y| \leq n/2$.
\medskip

\noindent\emph{Case 2: $|L_z| < n/2$}.
\\[2mm]
  For two given splitting lines $\ell_1$ and $\ell_2$ in the $xy$-plane, we use
  $\mbox{\sc ne}\xspace$ to denote the number of lines in $L$ whose projection
  (which can be a line or a point) intersects
  the open north-east quadrant defined by $\ell_1,\ell_2$,
  and we define $\mbox{\sc se}\xspace$, $\mbox{\sc sw}\xspace$, and $\mbox{\sc nw}\xspace$ similarly. Let
  $\mbox{\sc n} = \mbox{\sc nw}\xspace + \mbox{\sc ne}\xspace$, and define $\mbox{\sc e}, \mbox{\sc s}, \mbox{\sc w}$ similarly.
  Note that lines from $L_x$ that lie in the northern part are
  counted twice in $\mbox{\sc n}$, once for their intersection with the north-west quadrant
  and once for their intersection with the north-east quadrant.
  Finally, we use
  $\mbox{\sc ne}\xspace_x$ to denote the number of lines from $L_x$ intersecting the north-east quadrant,
  and we use $\mbox{\sc ne}\xspace_y$, $\mbox{\sc s}_z$, and so on, in a similar way.   Finally, let $\mbox{\sc t} = \mbox{\sc ne}\xspace + \mbox{\sc nw}\xspace + \mbox{\sc se}\xspace + \mbox{\sc sw}\xspace$ denote the total number of incidences.

Let $W(L) := 2(|L_x| + |L_y|) + |L_z| = n + |L_x| + |L_y|$, and note that
\[ \frac{3n+1}{2} \leq W(L) \leq \floor*{5n/3} \]
which follows from the facts that $\max(|L_x|, |L_y|) \leq |L_z|$ and $|L_z|<n/2$.
We will require $\ell_1$ and $\ell_2$ together each contain the projection of a line; note that such a line may subtract 1 from the total count~$\mbox{\sc t}$ (if its projection is a point), or 2 (if its
projection is a line). Hence,
  \[
  \frac{3n - 7}{2} \leq W(L) - 4 \leq \mbox{\sc t} \leq W(L) - 2 \leq \floor{5n/3} - 2.
  \]
  We now explain how to pick $\ell_2$ (and, hence, $h_2$), the splitting line orthogonal
  to the $y$-axis. Place $\ell_2$ at
  the highest $y$-coordinate where we still have $\mbox{\sc s} \leq \frac{\floor{5n/3}}{2}$. This is always possible since $\frac{\floor{5n/3}}{2} < \frac{3n - 7}{2}$ for all $n \geq 2$.
  Now, we have
  \[
  \frac{\floor{5n/3}}{2} - 1 \leq \mbox{\sc s} \leq \frac{\floor{5n/3}}{2}
  \]
  where the lower bound comes from the fact that moving $\ell_2$ could change the number of incidences by two (if $\ell_2$ contains a line of $L_y$). Furthermore, since $\mbox{\sc s} + \mbox{\sc n} = \mbox{\sc t} \leq \floor{5n/3}-2$, we have
   \[
   \mbox{\sc n} \leq \frac{\floor{5n/3}}{2}-1.
   \]
 We also assume, without loss of generality, that $\mbox{\sc s}_z \geq \mbox{\sc n}_z$. Indeed, if this is not the case, we can interchange
  the roles of $\mbox{\sc s}$ and $\mbox{\sc n}$; simply enlarge $\mbox{\sc n}$ (by shifting $\ell_2$ down)
  until the above inequalities hold in interchanged form.

  Now pick $\ell_1$ (and, hence, $h_1$) such that
  $\floor{\mbox{\sc s}/2}\leq \mbox{\sc sw}\xspace\leq \ceil{\mbox{\sc s}/2}$ and
  $\floor{\mbox{\sc s}/2}\leq \mbox{\sc se}\xspace\leq \ceil{\mbox{\sc s}/2}$.
  From now on we assume, without
  loss of generality, that $\mbox{\sc ne}\xspace \geq \mbox{\sc nw}\xspace$. Note that this implies that
  $\mbox{\sc nw}\xspace\leq \floor{\mbox{\sc n}/2}$.
  Furthermore, we have
  \[\mbox{\sc sw}\xspace,\mbox{\sc se}\xspace \leq \ceil{\mbox{\sc s}/2} \leq  \ceil{\floor{5n/3}/4} \leq \ceil{5n/12}
  \]
   and
   \[
   \mbox{\sc nw}\xspace\leq \floor{\mbox{\sc n}/2}\leq \ceil{(\floor{5n/3}-2)/4}<\floor{5n/12}.
   \]
   Thus the corresponding
   ``columns'' in $\mathbb{R}^3$ already have the desired number of incidences.

   We choose the remaining splitting plane~$h_3$
   such that, within the north-eastern column, at most half the lines from
   $L_x\cup L_y$ are above $h_3$ and at most half are below (and one line is contained in $h_3$).
   We conclude that the number of lines intersected by each of the two cells
   resulting from splitting this column by $h_3$ is at most
   \begin{equation}
   \label{eq:nebound}
   \floor*{\frac{\mbox{\sc ne}\xspace_x+\mbox{\sc ne}\xspace_y}{2}} +\mbox{\sc ne}\xspace_z  \leq \frac{\mbox{\sc ne}\xspace+\mbox{\sc ne}\xspace_z}{2}.
   \end{equation}
   To bound the expression in \eqref{eq:nebound}, we rely on the following.

  \begin{claiminproof} \label{claim:NE-orig}
  With $\ell_1, \ell_2$ as above, we have  $\mbox{\sc ne}\xspace \leq n - \mbox{\sc sw}\xspace$.
  \end{claiminproof}
  \begin{proofinproof}
  Since $\mbox{\sc n}_x = 2\,\mbox{\sc ne}\xspace_x$ we have
  \[
  \mbox{\sc n}_z = \mbox{\sc n} - \mbox{\sc n}_x - \mbox{\sc n}_y
    = \mbox{\sc n} - 2 \, \mbox{\sc ne}\xspace_x - \mbox{\sc n}_y.
  \]
  Trivially, we also have
  \[
  \mbox{\sc ne}\xspace = \mbox{\sc ne}\xspace_x + \mbox{\sc ne}\xspace_y + \mbox{\sc ne}\xspace_z \leq \mbox{\sc ne}\xspace_x + \mbox{\sc ne}\xspace_y + \mbox{\sc n}_z.
  \]
  Combining these we get
  \begin{equation}
      \mbox{\sc ne}\xspace \leq
        \mbox{\sc ne}\xspace_x+\mbox{\sc ne}\xspace_y + (\mbox{\sc n} - 2 \,\mbox{\sc ne}\xspace_x - \mbox{\sc n}_y) =
        \mbox{\sc n} - \mbox{\sc n}_y + \mbox{\sc ne}\xspace_y -\mbox{\sc ne}\xspace_x.    \label{eq:NE-orig}
  \end{equation}
  Moreover, since $\mbox{\sc se}\xspace_x = \mbox{\sc e}_x - \mbox{\sc ne}\xspace_x$ and $\mbox{\sc ne}\xspace_y=\mbox{\sc se}\xspace_y$ we have
  \[
  \mbox{\sc se}\xspace = \mbox{\sc se}\xspace_x + \mbox{\sc se}\xspace_y + \mbox{\sc se}\xspace_z = (\mbox{\sc e}_x - \mbox{\sc ne}\xspace_x) + \mbox{\sc ne}\xspace_y + \mbox{\sc se}\xspace_z,
  \]
  which can be rewritten as
  \begin{equation}
     \mbox{\sc ne}\xspace_y - \mbox{\sc ne}\xspace_x =  \mbox{\sc se}\xspace - \mbox{\sc e}_x - \mbox{\sc se}\xspace_z.   \label{eq:NExplusy-orig}
  \end{equation}
   Note also that
   \begin{equation}
     \mbox{\sc n} = \mbox{\sc t} - \mbox{\sc s} = 2 \,\mbox{\sc n}_y + 2 \,\mbox{\sc e}_x + \mbox{\sc t}_z - \mbox{\sc s}.   \label{eq:north-orig}
  \end{equation}
  Using that $\mbox{\sc e}_x\leq |L_x|$ and $\mbox{\sc n}_y\leq |L_y|$ and $\mbox{\sc t}_z\leq |L_z|$, we obtain
  \begin{align*}
  \mbox{\sc ne}\xspace & \leq \mbox{\sc n} - \mbox{\sc n}_y + (\mbox{\sc ne}\xspace_y -\mbox{\sc ne}\xspace_x)  &  \mbox{ by (\ref{eq:NE-orig})} \\
      & = \mbox{\sc n} - \mbox{\sc n}_y + (\mbox{\sc se}\xspace - \mbox{\sc e}_x - \mbox{\sc se}\xspace_z)  &  \mbox{ by (\ref{eq:NExplusy-orig})} \\
      & = (2\, \mbox{\sc n}_y + 2 \,\mbox{\sc e}_x + \mbox{\sc t}_z - \mbox{\sc s}) - \mbox{\sc n}_y + (\mbox{\sc se}\xspace - \mbox{\sc e}_x - \mbox{\sc se}\xspace_z)  &  \mbox{ by (\ref{eq:north-orig})} \\      & \leq |L_x| + |L_y| + |L_z|  - \mbox{\sc s} + \mbox{\sc se}\xspace - \mbox{\sc se}\xspace_z & \\
      & = n  - \mbox{\sc sw}\xspace  - \mbox{\sc se}\xspace_z \\
      & \leq n  - \mbox{\sc sw}\xspace,
 \end{align*}
 which finishes the proof of the claim.
  \end{proofinproof}

   Now recall that
   \begin{equation}
   \mbox{\sc sw}\xspace \ge \floor{\mbox{\sc s}/2} \ge \floor*{\frac{\floor{5n/3} - 2}{4}}. \label{eq:sw-ge}
   \end{equation}
   Moreover, since we assumed $\mbox{\sc n}_z \leq \mbox{\sc s}_z$ and we are in Case~2
   (so $|L_z|\leq (n-1)/2$) we have
   \begin{equation}
   \mbox{\sc ne}\xspace_z \leq \mbox{\sc n}_z \leq \floor{|L_z|/2} \leq \floor{(n-1)/4}. \label{eq:nez-le} \end{equation}

Finally, from \eqref{eq:nebound}, the number of incidences in each cell of the north-eastern column is at most
   \begin{align*}
    \frac{\mbox{\sc ne}\xspace+\mbox{\sc ne}\xspace_z}{2} & \leq \frac{n-\mbox{\sc sw}\xspace+\mbox{\sc ne}\xspace_z}{2} & \text{by the Claim above} \\
        & \leq \frac{n-\floor*{\strut(\floor{5n/3}-2)/4}+\mbox{\sc ne}\xspace_z}{2} & \text{by \eqref{eq:sw-ge}} \\
        & \leq \frac{n-\floor*{\strut(\floor{5n/3}-2)/4}+ \floor*{(n-1)/4}}{2} & \text{by \eqref{eq:nez-le}} \\
        & \leq \ceil{5n/12}.
   \end{align*}
   For the last inequality, define $f(n) \coloneqq \frac{n-\floor*{\strut(\floor{5n/3}-2)/4}+ \floor*{(n-1)/4}}{2} - \ceil{5n/12}$.  We need to show that $f(n) \leq 0$ for all $n\in \mathbb{N}$.  Observe that $f(n)=f(n+12)$ for any $n$. Hence, it suffices to show that $f(n) \leq 0$ for all integer $n$ from $0$ to $11$, which can be verified by a straightforward computation.
     \qedhere
\end{proof}

Partitioning axis-parallel lines in 3D


Abstract: Harmonic numbers arise from the truncation of the harmonic series. The $n^\text{th}$ harmonic number is the sum of the reciprocals of each positive integer up to $n$. In addition to briefly introducing the properties of harmonic numbers, we cover harmonic numbers as the summation of integrals that involve the product of exponential and hyperbolic secant functions. The proof is relatively simple since it only comprises the Principle of Mathematical Induction and integration by parts.

\section{Introduction}

The $n^\text{th}$ \emph{harmonic number} is the sum of the reciprocals of the first $n$ natural numbers, expressed in the following form~\cite{graham1994concrete}:
\begin{equation*}
H_n = \sum_{k = 1}^{n} \frac{1}{k} = 1 + \frac{1}{2} + \frac{1}{3} + \frac{1}{4} + \cdots + \frac{1}{n}.
\end{equation*}
The first few harmonic numbers are given as follows:
\begin{align*}
H_1 & = 1 \\
H_2 &= H_1 + \frac{1}{2} = \frac{3}{2} \\
H_3 &= H_2 + \frac{1}{3} = \frac{11}{6} \\
H_4 &= H_3 + \frac{1}{4} = \frac{25}{12} \\
H_5 &= H_4 + \frac{1}{5} = \frac{137}{60} \\
    &\vdots
\end{align*}
Indeed, the harmonic numbers satisfy the following recurrence relation by definition:
\begin{equation*}
H_{n + 1} = H_n + \frac{1}{n + 1}.
\end{equation*}

Since harmonic numbers arise from the truncation of the \emph{harmonic series}, they are the partial sums of it. The divergence of the harmonic series itself can be shown using the integral test by comparing it with the integral of the function $1/x$. Another way to prove its divergence is by comparison test, where each denominator in the series is replaced with the next-largest power of two. A harmonic number can be approximated using the first few terms of the Taylor series expansion~\cite{knuth1997citekey}:
\begin{equation*}
H_n \simeq \gamma + \ln n + \frac{1}{2n},
\end{equation*}
where $\gamma = 0.57721\dots$ is the Euler-Mascheroni constant~\cite{brent1977computation,dence2009survey,havil2017gamma,lagarias2013euler}. See~\cite{owinoh2005effects,caves1996quantum} for applications of this constant.

The harmonic numbers can be written as Euler's integral representation~\cite{sandifer2007how}:
\begin{equation*}
H_n = \int_{0}^{1} \frac{1 - x^n}{1 - x} \, dx.
\end{equation*}
Harmonic numbers appear in many expressions involving special functions in analytic number theory, including the Riemann zeta function. They are also related to the natural logarithm. For other expositions on harmonic numbers, see~\cite{benjamin2002stirling,choi2011some,spiess1990some,sun2012arithmetic} among others.

In this article, we cover harmonic numbers as the summation of integrals. It provides an extension to one of the proposed problems published in The Problem Corner of a mathematics magazine for students, \emph{The Pentagon}~\cite{karjanto2015problem}, where the solution was published one year later~\cite{karjanto2016solution}. The magazine is the official journal of the Kappa Mu Epsilon (KME), a specialized honor society in mathematics with headquarters at the University of Central Missouri in Warrensburg, Missouri, US~\cite{kappa2021}. KME was founded in 1931 by Emily Kathryn Wyant (1897--1942) at Northeastern Oklahoma State Teachers College. Its focus is to promote the interest in mathematics among undergraduate students. Ever since the first issue appeared in Fall~1941, \emph{The Pentagon} is published semiannually in December and May each year. The purpose of the magazine is not only to serve the needs of college students majoring in mathematics but also to act as a medium through which outstanding student papers on a variety of mathematical topics could be published. In particular, the problems section, known as \emph{The Problem Corner}, contains both proposed and solved problems. The Problem Corner is edited by Pat (Patrick) Costello Kentucky Alpha chapter, Eastern Kentucky University, Richmond, Kentucky, US.

After this introduction, the following section presents the proposition and its proof where harmonic numbers can be expressed as the summation of integrals involving exponential and hyperbolic secant functions. The final section concludes our discussion.

\section{Harmonic numbers as the summation of integrals}		\label{summ}
We have the following proposition.
\begin{proposition}
For $\alpha > 0$ and $n \in \mathbb{N}$, the harmonic number $H_n$ can be represented by the following integral:
\begin{equation*}
H_n = \sum_{k = 1}^n \frac{1}{k} = \frac{1}{2}\sum_{k = 1}^n \left(\int_{-\infty}^\infty e^{-\alpha |x|} \sech^{k + 1} x \, dx +
\frac{\alpha - (k - 1)}{n} \int_{-\infty}^\infty e^{-(\alpha + 1)|x|} \sech^{k} x \, dx \right) .
\end{equation*}
\end{proposition}

The proof utilizes the Principle of Mathematical Induction (PMI) and integration by parts.
\begin{proof}
Since both integrands of the integrals on the right-hand sides are even functions, then they are equivalent with twice of the integral from $0$ to $+\infty$ (or $-\infty$ to $0$). Without losing generality, we consider the proof by integrating through the former one. Thus, we need to show that
\begin{equation*}
H_n = \sum_{k = 1}^n \frac{1}{k} = \sum_{k = 1}^n \left(I_{k + 1} + \frac{\alpha - (k - 1)}{k} J_{k} \right)
\end{equation*}
where
\begin{align*}
	I_{k + 1} &= \int_{0}^\infty e^{- \alpha x}     \sech^{k + 1} x \, dx,& \alpha > 0, \qquad &k \in \mathbb{N} \\
	J_{k}     &= \int_{0}^\infty e^{-(\alpha + 1)x} \sech^{k} x     \, dx,& \alpha > 0, \qquad &k \in \mathbb{N}.
\end{align*}
We will show it using the PMI. For $k = 1$, we need to show that for $\alpha > 0$
\begin{equation*}
I_2 + \alpha J_1 = 1.
\end{equation*}
Consider $I_2$. By expressing $\sech x = 2 e^x/(1 + e^{2x})$ and letting $y = e^x$, we obtain
\begin{equation*}
I_2 = \int_{0}^\infty e^{-\alpha x} \sech^{2} x \, dx = \int_{1}^\infty \frac{2^2 \, y^{-\alpha + 2}}{(1 + y^2)^2} \frac{dy}{y}
= \int_{1}^\infty 2 y^{-\alpha} \frac{d(1 + y^2)}{(1 + y^2)^2}.
\end{equation*}
Implementing the integration by parts to the last expression and returning to the original variable $x$, it yields
\begin{align*}
I_2 &= \lim_{b \rightarrow \infty} \left.\left(-y^{-(\alpha + 1)} \frac{2y}{1 + y^2} \right)\right|_{1}^{b} - \alpha \int_{1}^\infty y^{-(\alpha + 1)} \frac{2y}{1 + y^2} \, \frac{dy}{y}  \\
	&= \lim_{b \rightarrow \infty} \left. \left(-e^{-(\alpha + 1)x} \sech x \right)\right|_{0}^{b} - \alpha \int_{0}^\infty e^{-(\alpha + 1)x} \sech x \, dx \\
I_2 + \alpha J_1 &= 1, \qquad \alpha > 0.
\end{align*}
Now assume that the inductive step is true for $k = n$, we want to show that it is also true for $k = n +1$.
It is sufficient to show that for $\alpha > 0$ (consequently $\alpha + 1 > 0$)
\begin{equation*}
I_{n + 2} + \frac{\alpha - n}{n + 1} J_{n + 1} = \frac{1}{n + 1}.
\end{equation*}
Employing the similar technique as in the previous case, we observe that
\begin{equation*}
I_{n + 2} = \int_{0}^\infty e^{-\alpha x} \sech^{n + 2} x \, dx
= \int_{1}^\infty \frac{2^{n + 2} \, y^{-[\alpha - (n + 2)]}}{(1 + y^2)^{n + 2}} \frac{dy}{y}
= \int_{1}^\infty 2^{n + 1} y^{-(\alpha - n)} \frac{d(1 + y^2)}{(1 + y^2)^{n + 2}}.
\end{equation*}
After integrating by parts and returning back to the original variable $x$, we obtain
\begin{align*}
I_{n + 2} &= \lim_{b \rightarrow \infty} \left[-\frac{1}{n + 1} y^{-(\alpha + 1)} \left(\frac{2y}{1 + y^2}\right)^{n + 1} \right]_{1}^{b} - \frac{\alpha - n}{n + 1} \int_{1}^\infty y^{-(\alpha + 1)} \left(\frac{2y}{1 + y^2} \right)^{n + 1} \, \frac{dy}{y}  \\
&= \lim_{b \rightarrow \infty} \left. \left(-\frac{e^{-(\alpha + 1)x}}{n + 1} \sech^{n + 1} x \right)\right|_{0}^{b} - \frac{\alpha - n}{n + 1} \int_{0}^\infty e^{-(\alpha + 1)x} \sech^{n + 1} x \, dx \\
I_{n + 2} + \frac{\alpha - n}{n + 1} J_{n + 1} &= \frac{1}{n + 1}, \qquad \alpha > 0.
\end{align*}
This completes the induction step
\begin{align*}
\textmd{RHS} &= \sum_{k = 1}^{n + 1} \left(I_{k + 1} + \frac{\alpha - (k - 1)}{k} J_{k} \right)  \\
	&= \sum_{k = 1}^n \left(I_{k + 1} + \frac{\alpha - (k - 1)}{k} J_{k} \right) + I_{n + 2} + \frac{\alpha - n}{n + 1} J_{n + 1}\\
	&= \sum_{k = 1}^n \frac{1}{k} + \frac{1}{n + 1} =  \sum_{k = 1}^{n + 1} \frac{1}{k} = \textmd{LHS}.
\end{align*}
Combining with the other part where we integrate from $-\infty$ to $0$, we obtain the desired result. This completes the proof.
\end{proof}

\section{Conclusion}	\label{conclude}

In this article, we have provided a brief coverage of the harmonic numbers. What is particularly interesting is that harmonic numbers can be expressed as the summation of integrals involving the product of exponential and hyperbolic secant functions. By combining the PMI and integration by parts, we have shown that the harmonic numbers can indeed be represented by the summation of the aforementioned integrals.

\section*{Acknowledgments}
The author gratefully acknowledges Dr. Ramadoni for the invitation to contribute this article.

\subsection*{Dedication}
The author would like to dedicate this article to his late father Zakaria Karjanto (Khouw Kim Soey, 許金瑞) who introduced and taught him the alphabet, numbers, and the calendar in his early childhood. Karjanto senior was born in Tasikmalaya, West Java, Japanese-occupied Dutch~East~Indies on 1~January~1944 (Saturday~Pahing) and died in Bandung, West Java, Indonesia on 18~April~2021 (Sunday~Wage).

{\small

History and Overview (math.HO); General Literature (cs.GL)