Seol mar théacs é seo: Discrete inverse and state estimation problems