in how many v ways can a 4 - letter password be chosen , using the letters a , b , c , d , e , and / or f , such that at least one letter is repeated within the password ?
total number of four letter passwords = 6 * 6 * 6 * 6 = 1296 - - - - - - ( 1 ) total number of passwords in which no letter repeats = 6 c 4 * 4 ! = 15 * 24 = 360 - - - - - - ( 2 ) therefore required value v = ( 1 ) - ( 2 ) = 1296 - 360 = 936 . d
subtract(power(add(4, const_2), 4), multiply(divide(factorial(add(4, const_2)), multiply(factorial(const_2), factorial(4))), factorial(4)))