GATE Computer ScienceVery hardGATE CS (PYQ pattern)
How many functions f : {1, 2, 3, 4} → {1, 2, 3, 4} satisfy f(f(x)) ≠ x for every x?
- A. 81
- B. 108
- C. 160
- D. 30
Correct answer: D. 30
f(f(x)) ≠ x forbids fixed points (f(x) = x gives f(f(x)) = x) and 2-cycles; every other functional graph is allowed. Direct enumeration of the 256 functions gives 30.
More Discrete Mathematics questions
- In how many ways can 8 distinct objects be placed into 4 identical boxes, no box empty, so that objects 1 and 2 are in different boxes?
- How many equivalence relations on {1, 2, …, 7} have exactly 3 equivalence classes, each with at least 2 elements?
- How many partial orders on the labelled set {1, 2, 3, 4} have exactly one maximal element? (There are 19 partial orders on a labelled…
- How many injective functions f : {1, 2, 3, 4} → {1, 2, …, 7} satisfy f(i) ≠ i for every i?
- How many relations R on {1, 2, 3} have the property that the transitive closure of R is the full relation {1, 2, 3} × {1, 2, 3} (all 9…
- How many functions f : {1, …, 6} → {1, …, 6} have an image with exactly 3 elements and no fixed point (f(x) ≠ x for all x)?