Exact ground states are calculated with an integer optimization algori
thm for two- and three-dimensional site-diluted Ising antiferromagnets
in a field (DAFF) and random field Ising ferromagnets (RFIM), the lat
ter with Gaussian- and bimodal-distributed random fields. We investiga
te the structure and the size distribution of the domains of the groun
d state and compare it to earlier results from Monte Carlo (MC) simula
tions for finite temperature. Although DAFF and RFIM are thought to be
in the same universality class we found differences between these sys
tems as far as the distribution of domain sizes is concerned. In the l
imit of strong disorder for the DAFF in two and three dimensions the g
round states consist of domains with a broad size distribution that ca
n be described by a power law with exponential cutoff. For the RFIM th
is is only true in two dimensions while in three dimensions above the
critical field where long-range order breaks down the system consists
of two infinite interpenetrating domains of up and down spins-the syst
em is in a two-domain state. For DAFF and RFIM the structure of the do
mains of finite size is fractal and the fractal dimensions for the DAF
F and the RFIM agree within our numerical accuracy supporting that DAF
F and RFIM are in the same universality class. Also, the DAFF ground-s
tate properties agree with earlier results from MC simulations in the
whole whereas there are essential differences between our exact ground
-state calculations and earlier MC simulations for the RFIM which sugg
ested that there are differences between the fractality of domains in
RFIM and DAFF. Additionally, we show that for the case of higher disor
der there are strong deviations from Imry-Ma-type arguments for RFIM a
nd DAFF in two and three dimensions.