Step 1: Arrange the letters alphabetically.
The letters of the word UDAYPUR are U, D, A, Y, P, U, R.
Arranging them in alphabetical order gives: A, D, P, R, U, U, Y.
Step 2: Count permutations starting with letters before U.
Letters before U are A, D, P, and R.
For each such letter, the remaining letters can be arranged in:
\[
\frac{6!}{2!} = 360
\]
Total permutations before U:
\[
4 \times 360 = 1440
\]
Step 3: Fix U as the first letter and proceed sequentially.
For second letter A:
\[
\frac{5!}{2!} = 120
\]
For third letter D:
\[
3! = 6
\]
For fourth letter A:
\[
3! = 6
\]
For fifth letter Y:
\[
3! = 6
\]
For sixth letter P:
\[
1
\]
For seventh letter R:
\[
1
\]
Step 4: Add all permutations.
\[
1440 + 120 + 6 + 6 + 6 + 1 + 1 = 1580
\]
Step 5: Final conclusion.
Hence, the rank of the word UDAYPUR is 1580.