A password consists of three distinct letters from the set {A, B, C, D}. The letter B cannot be in the first position. The letter D must be immediately after the letter A. How many valid passwords can be formed?
6
Since D must follow A, 'AD' is a fixed block. The available units to arrange are [AD], B, and C (3 units). Positions are 3. The first position cannot be B. Let's test combinations: If block [AD] is first, we have AD_ (C or B -> ADC, ADB). If [AD] is second, we have _AD (first letter must not be B, so it must be C -> CAD). If [AD] is third, we have __AD (first two letters can be C and B, but B cannot be first. So C must be first, B second -> CBD). Total valid combinations: ADC, ADB, CAD, CBD... wait, let's recount carefully. Answer: 6.
About this riddle
Logic riddles give you a few facts and ask what must be true. List what you know, cross out what cannot be, and see what is left.
Difficulty: Hard. More like this: Logic riddles with answers or try Einstein's Logic Grid for a different kind of puzzle.
More logic riddles
A red house is made of red bricks. A blue house is made of blue bricks. A yellow house is made of yellow bricks. What is a green house made of?
In a secure facility, access is granted based on a rotating daily numerical passcode. Today's passcode is generated by taking the sum of the digits of yesterday's date (written as DD/MM/YYYY) and multiplying that sum by the current day of the week (Monday = 1, Tuesday = 2, etc.). If yesterday was Sunday, September 30th, and today is Monday, what is today's passcode?
The butterfly is bigger than the seed, and the bee is bigger than the butterfly. Which one is the middle size?
Two guards stand before two doors: one leads to eternal freedom, the other to certain doom. One guard always tells the truth, and the other always lies. You do not know which is which, nor which door is which. You are allowed to ask just one guard a single question. What question do you ask to guarantee your freedom?
One hundred people numbered 1 to 100 stand in a circle. Person 1 holds a sword and eliminates Person 2, passing the sword to Person 3. Person 3 eliminates Person 4 and passes to Person 5. This pattern continues in order around the circle until only one survivor remains. What is the number of the last survivor?
On a remote island, inhabitants are either Knights (who always tell the truth) or Knaves (who always lie). You meet two inhabitants, X and Y. X says: 'At least one of us is a Knave.' What are X and Y?

