The problem of automatically finding the optimal robot assembly sequence for a set of n parts that construct a mechanical object is presented. Generally, to assemble a mechanical object, the assembly operation involves precedence relation of jointing the parts; that is, the order of attaching pats together crucially determines whether the desired object is able to be constructed from the parts. The precedence relationship of assembling the object results from the geometric constraint of parts structure. A feasible assembly sequence is the sequence satisfying these geometric constraints to be able to construct the desired object. Thus, geometric constraints dominate generation of all the feasible assembly sequences and play an important role in planning the optimal one. The problem of obtaining all the feasible assembly sequences can be formulated as a constrained traveling salesman problem (CTSP). The proposed approach will show that all the feasible assembly sequences can be generated by transforming the geometric constraints of parts to the pattern-matching operation based on the concept of CTSP. The optimal assembly sequence can then be obtained from the set of generated feasible assembly sequences. A novel method proposed here is to obtain the optimal assembly sequence while in generating all the feasible assembly sequences. Two approaches, which are a traditional search method and an artificial neural network computational scheme, in obtaining the optimal sequence will be discussed. For the traditional search method, the set of constraints describing the geometric relationship among parts are properly transformed into the matching problem. While for the neural computation, these geometric constraints are transformed into the elements of the connection matrix specifying the connection strength among neurons. The designed algorithm can accommodate various constraints and applications. Detailed algorithms and analysis, examples and experiments will be presented.