A sequence of instructions which can help to solve a problem is called an algorithm. The reason for composing an algorithm is to reduce the timespan and understanding the solution of problems in simple way. In this paper, vertex prime valuation of the Jahangir graph J n,m for n ≥ 2, m ≥ 3 and generalized Theta graph θ (l 1 , l 2 , l 3 , ..., l n )
has been investigated by using algorithms .We discuss vertex prime valuation of some graph operations on both graphs viz. Fusion, Switching and Duplication, Disjoint union and Path union.