Criteria for Algebraicity of Analytic Functions