Graph-Based And Algebraic Codes For Error-Correction And Erasure Recovery