Added direct encoding for weighted tree problem in examples