Counting principles
Warm-upHumanKofi has shirts, pairs of trousers and pairs of shoes. An outfit is one shirt, one pair of trousers and one pair of shoes. How many different outfits can he make?
Kofi has shirts, pairs of trousers and pairs of shoes. An outfit is one shirt, one pair of trousers and one pair of shoes. How many different outfits can he make?
A school library in Quito has novels and comics on a display shelf. Ana may borrow one book from the shelf. In how many ways can she choose?
In how many different orders can different books be arranged on a shelf?
Ten swimmers race in a final. In how many ways can the gold, silver and bronze medals be awarded? (No ties.)
How many 4-digit PINs (from to ) contain at least one repeated digit?
How many of the whole numbers from to are divisible by or by (or both)?
Which of these are good reasons for defining ? (Choose all that apply.)
A code has symbols, each a capital letter ( choices) or a digit ( choices). How many codes contain at least one letter and at least one digit?
In the Lean file, perm n k is and fact n is . Which statement correctly formalises ?
Write a recursive function arrangements(items) that returns a list of all orderings of the list items (each ordering a list), without using itertools. Idea: for each item, put it first and follow it by every arrangement of the remaining items. Then check that items give different arrangements.