Maximum likelihood demultiplexing