determine_uds function

Determine the pattern between two intervals