For above we need to keep in mind 3 things.If n is the number of flip flops used , then :
a)Mod value of ring counter = n
So if mod value is 10 , then no of flips used in ring counter = y = 10
b) Mod value of Johnson's Counter = 2n
So if mod value is 10 , then no of flip flops is Johnson's Counter = 10 / 2 = x = 5
c) Mod value of Ripple Counter ranges from 2n-1 + 1 to 2n.This functionality is achieved through connecting appropriate flip flops to NAND gate.
So if mod value is 10 , so no of flip flops required = z = 4 [ By connecting Q3 and Q1 to NAND gate , we achieve mod value = 10 which is less than 16]
Therefore,
x + y + z = 5 + 10 + 4
= 19
Hence 19 is the final answer.