Minimal representation of a semiorder