It will be shown from electronic structures of ternary compounds Ni-M-Z that some of them are able to be a conductor or two types of semiconductors in the different atomic configurations and that the energy gaps determined by experiments come from the configuration where Ni and M atoms are separated.