i'm given a set of 3D points (x,y,z) , The first coordinate is unique. I've to choose a longest subset so that the points are increasing.
(a,b,c) < (p,q,r) if (a<p AND b<q AND c<r)..
Say the points were (3,6,3) , (2,5,1), (-1,4,2) (-5,0,0). then longest subset is (-5,0,0) (-1,4,2) (3,6,3).
Say the points were (3,6,3) , (2,5,2), (-1,4,3) (-5,0,0). then longest subset is (-5,0,0) (2,5,2) (3,6,3).
I could think some reduction. If we sort by the x co-ordinate, then we need to find the longest increasing subsequence of (y,z). So the problem boils down to
(0,0) (5,1) (4,2) (6,3) -> 3
(0,0) (4,3) (5,2) (6,3) -> 3
We cannot extend the 1D LIS algorithm to 2D because the choosing of the point (5,1) or (4,2) makes the difference. When we know that (x,y) != (a,b) then we cannot make a decision of the points to choose. In 1D , if x!=y, either x<y or x>y but it doesn't generalize in 2D.
How do we solve this problem in less than O(n^2) ? How to extend this to n dimensional points.

