Motion planning for robotic arms is important for real, physical world applications. The planning for arms with high-degree-of-freedom (DOFJ is hard because its search space is large (exponential in the number of joints), and the links may collide with static obstacles or other joints (self-collision). In this paper we present a motion planning algorithm that finds plans of motion from one arm configuration to a goal arm configuration in 2D space assuming no self-collision. Our algorithm is unique in two ways: (a) it utilizes the topology of the arm and obstacles to factor the search space and reduce the complexity of the planning problem using dynamic programming; and (b) it takes only polynomial time in the number of joints under some conditions. We provide a sufficient condition for polytime motion planning for 2D-space arms: if there is a path between two homotopic configurations, an embedded local planner finds a path within a polynomial time. The experimental results show that the proposed algorithm improves the performance of path planning for 2D arms.