Ram K. answered 01/13/17
Tutor
4.8
(80)
Physics, chemistry math and engineering IVY league PhD tutor
Note that all the alphabets in the word are distinct and that there are 10 in total. Without any constraint there are 10! ways for arranging the letters. If you want G and H separated - work it out as follows - let us place G first, H second and the other letters subsequent to them - such a choice has no impact on the total number of arrangements. If G is to the placed on the leftmost or rightmost site H can only occupy any of 8 other sites (i.e excluding the sites next to where G is placed). If G is placed on a site inbetween that has two neighboring sites, then H can occupy any of 7 sites (excluding the site where G is placed and its two neighboring sites). There is no restriction on the arrangement of the remaining 8 letters. Hence the number of arrangements is: (2*8 + 8*7)*8! = 9!*8 = 2903040