

Given digits are 0, 1, 3, 5, 7
Now we have to form 4 digit numbers greater than 5000.
So leftmost digit is either 5 or 7.
Case1. When digits are repeated
Number of ways for filling left most digit = 2
Now remaining 3 digits can be filled = 5*5*5
So total number of ways of 4 digits greater than 5000 = 2*5*5*5 = 250
Again a number is divisible by 5 if the unit digit is either 0 or 5. So there are 2 ways to fill the unit place.
So total number of ways of 4 digits greater than 5000 and divisible by 5 = 2*5*5*2 = 100
Now probability of 4 digit numbers greater than 5000 and divisible by 5 = 100/250 = 2/5
Case2. When digits are not repeated
Number of ways for filling left most digit = 2
Now remaining 3 digits can be filled = 4*3*2
So total number of ways of 4 digits greater than 5000 = 2*4*3*2 = 48
Now total number in which leftmost digit is 5 and unit place is 0 = 3*2 = 6 (Since leftmost digit and unit digit is fixed by 5 and 0 respectively)
Again total number in which leftmost digit is 7 and unit place is either 5 or 0 = 1*3*2*2 = 12 (Since leftmost digit and unit digit is fixed by 7)
So total number of ways of 4 digits greater than 5000 and divisible by 5 = 12 + 6 = 18
Now probability of 4 digit numbers greater than 5000 and divisible by 5 = 18/48 = 3/8
