Combinatorial Algorithms with Applications in Learning Graphical Models