Answer:
She can visit the cities in 192 ways
Step-by-step explanation:
If Sally starts from city A and after going to 4 cities she returns to home,
then that can be in 4! = 24 ways. (permutation of 4 distinct objects)
If between the time she visits cities, she comes home once,
then cities can be visited in,
= 72 ways. (permutation of 4 distinct objects and choosing 1 gap among the 3 )
If between the time she visits cities, she comes home twice,
then cities can be visited in,
=72 ways. (permutation of 4 distinct objects and finding 2 gaps among the 3)
If between the time she visits cities, she comes home thrice,
then cities can be visited in,
= 24 ways. (permutation of 4 distinct objects and choosing 3 gaps among the 3)
Now, she can't come home more than thrice in between the time she visits cities (since there are 4 cities to visit only)
So, the number of ways she can visit cities = (24+ 72 + 72 + 24)
= 192