Discrete Inverse and State Estimation Problems