Inverse problems on Fermi systems and ionic crystals