in how many ways can a 5 - letter password be chosen , using the letters a , b , c , d , e , f , g , and / or h such that at least one letter is repeated within the password ?
total number of four letter passwords = 8 * 8 * 8 * 8 * 8 = 32768 - - - - - - ( 1 ) total number of passwords in which no letter repeats = 8 c 5 * 5 ! = 56 * 120 = 6720 - - - - - - ( 2 ) therefore required value = ( 1 ) - ( 2 ) = 32768 - 6720 = 26048 e
subtract(power(add(5, const_3), 5), divide(factorial(add(5, const_3)), factorial(const_3)))