  Exact ground states are calculated with an integer optimization algorithm for
two and three dimensional site-diluted Ising antiferromagnets in a field (DAFF)
and random field Ising ferromagnets (RFIM). We investigate the structure and
the size-distribution of the domains of the ground state and compare it to
earlier results from Monte Carlo simulations for finite temperature. Although
DAFF and RFIM are thought to be in the same universality class we found
essential differences between these systems as far as the domain properties are
concerned. For the DAFF the ground states consist of fractal domains with a
broad size distribution that can be described by a power law with exponential
cut-off. For the RFIM the limiting case of the size distribution and structure
of the domains for strong random fields is the size distribution and structure
of the clusters of the percolation problem with a field dependent lower
cut-off. The domains are fractal and in three dimensions nearly all spins
belong to two large infinite domains of up- and down spins - the system is in a
two-domain state.
