in how many q 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 q = ( 1 ) - ( 2 ) = 1296 - 360 = 936 . d
multiply(multiply(divide(divide(factorial(4), factorial(const_2)), factorial(const_2)), divide(divide(factorial(4), factorial(const_2)), factorial(const_2))), multiply(subtract(multiply(const_2, const_3), const_1), subtract(multiply(const_2, const_3), const_1)))