Ternary or quaternary semiconductor comprised of elements from three different groups