Dear all,

I'm having a problem with making a variable that identifies a group. I have a data set with 1,000,000 observations with travel times between 1,000 zones. There is travel times between every origin-destination pair, but I want to check whether the travel time from a to b equals the travel time from b to a.

I think the problem can be represented with the following code:
Code:
clear
input i j
a b
b a
a b
b b  
end
What I need is a code that can generate a variable that identifies the origin-destination pairs, but disregards the order.

Any suggestions are appreciated. Thanks.