A theoretical design is presented for a 1×M wavelength-selective switch (WSS) that routes any one of N incoming wavelength signals to any one of M output ports. This planar on-chip device comprises of a 1×N demultiplexer, a group of N switching “trees” actuated by electro-optical or thermo-optical m