The structural properties of the (Zn, Mg) (S, Se) solid solutions are determined by a combination of the computational alchemy and the cluster expansion methods with Monte Carlo simulations. We determine the phase diagram of the alloy and show that the homogeneous phase is characterized by a large amount of short-range order occurring among first-nearest neighbors. Electronic-structure calculations performed using the special quasirandom structure approach indicate that the energy gap of the alloy is rather sensitive to this short-range order. [S0031-9007(98)06238-3] PACS numbers: 71.15.Pd, 61.66.DkWide-gap semiconductors are attracting an enormous technological interest [1] both because of their potential use in devices capable of operating at high power level and high temperature and because of the need for optical materials active in the blue-green spectral range. ZnSebased technology will be used for operation in this spectral range provided that current device lifetime problems are overcome. One major goal of materials engineering for optoelectronic applications is the ability to tune independently the band gap, E g -in order to obtain the desired optical properties-and the lattice parameter, a 0 , of the material-in order to be able to grow it on a given substrate. Unfortunately, in most III-V and II-VI alloys, the additional degree of freedom provided by alloying both the cationic and the anionic sublattices cannot be effectively exploited because E g and a 0 are roughly inversely proportional to one another for any values of the cationic and anionic compositions, ͑x, y͒. From this point of view, (Zn, Mg) (S, Se) alloys play a special role in that the lattice parameter and optical gap can be varied fairly independently as functions of ͑x, y͒ [2].In spite of this, many technical difficulties still hinder a precise experimental characterization of these materi-als, so that their equilibrium structural and optical properties are basically unknown. In this Letter we report on the first application of state-of-the-art electronic-structure techniques to the determination of the structural and optical properties of a quaternary (double binary) semiconductor alloy at thermodynamic equilibrium, and present results in the specific case of (Zn, Mg) (S, Se).The first goal of this Letter is to determine the thermodynamic stability of the (Zn, Mg) (S, Se) solid solution with respect to segregation into its constituents and/or to the formation of ordered structures. Second, we will analyze how the fundamental gap depends on compositions and the role that short-range order plays in the electronic properties of this material.The thermodynamic properties of Zn x Mg 12x S y Se 12y are studied by mapping the alloy onto a (double) lattice-gas model [3,4] that is solved by standard Monte Carlo (MC) techniques. To this end, an Ising-like variable, ͕s Rs ͖, is first attached to the sth atom in the elementary cell located at R, and it is assumed to take the values 61 according to the type of atom occupying that lattice site. The e...