In this paper the “Generalized Time-dependent Travelling Salesman Problem” is a three dimensional travelling salesman problem where the cost matrix C (i, j, k) is the cost of the salesman visiting from city i to city j at time (facility) k. The cost matrix C(i,j,k) [i,j = 1,2,3,…..,n;k = 1,2,3,…..,m] is given. There are n cities and N = {1, 2, 3,…, n}. We are given a partition of cities into groups and we require to find a minimum length tour that includes at least one city from each group. The problem is to find a feasible tour for m(<n) cities for the salesman with minimum total cost with given number of cities from each group with the restriction that he visits only one pair of cities at each point of time(facility) i.e., at a particular time he has to travel from one city to another city. We propose a Lexi Search algorithm based on Pattern Recognition Technique for solving “Generalized Time-dependent Traveling Salesman Problem” with an illustrative example. For this problem a computer program is developed for the algorithm and is tested. It is observed that it takes less time for solving fairly higher dimension problem also.