I am a high school student computationally studying the 3-dimensional structure of chromosomes by 40 kilobase loci. In a nutshell, loci that are close in space tend to express their genes at the same time ― loci are different stops on a 3D-winding DNA chain.
The best way to understand the 3D structure is by gathering what are basically distances between loci.
Now I have an $n\times n$ ($n$ = number of loci studied) matrix where the $(i,j)$ entry is the distance between locus $i$ and locus $j$. I also have a (somewhat miraculous) 3-dimensional of the same chromosome that maps each locus to a certain point in a 3D $(x,y,z)$ coordinate system.
My task is to find all of the loci within a certain radius of locus $L$. With the matrix, I would have to go to $L$ and traverse many nearby locus-distance chains, possibly for a long time, before being any bit certain that I had everything I wanted (i.e. brute force). With the spatial model, I would only have to conduct a simple search within that radius.
Here is my question. What is the complexity of finding nearby loci in the 3D model and the 2D matrix with respect to loci count and radius size (whichever you think is more complex)? (Compare the two complexities and give both.)
I am not very studied in CS, but here is what I guess:
$$C_\text{2D search best-case} = O(n^2)$$ $$C_\text{2D search worst-case} = O(2^n)$$
Best-case is what you'd expect, and worst-case would be going through every permutation of the distance.
$$ C_\text{3D search any case} = O(n) $$
This is just my rather fallible intuition.