  We prove some basic results for a dynamical system given by a piecewise
linear and contractive map on the unit interval that takes two possible values
at a point of discontinuity. We prove that there exists a universal limit cycle
in the non-exceptional cases, and that the exceptional parameter set is very
tiny in terms of gauge functions. The exceptional two-dimensional parameter is
shown to have Hausdorff-dimension one. We also study the invariant sets and the
limit sets; these are sometimes different and there are several cases to
consider. In addition, we give a thorough investigation of the dynamics;
studying the cases of rational and irrational rotation numbers separately, and
we show the existence of a unique invariant measure. We apply some of our
results to a combinatorial problem involving an election method suggested by
Phragm\'en and show that the proportion of elected seats for each party
converges to a limit, which is a rational number except for a very small
exceptional set of parameters. This is in contrast to a related election method
suggested by Thiele, which we study at the end of this paper, for which the
limit can be irrational also in typical cases and hence there is no typical
ultimate periodicity as in the case of Phragm\'en's method.
