UGC-NET Dec 2012 · Trees

MCQ · 2 marks · Problem PROG-DSTR-0045

Suppose that someone starts with a chain letter. Each person who receives the letter is asked to send it on to $4$ other people. Some people do this, while some do not send any letter. How many people have seen the letter, including the first person, if none receives more than one letter and if the chain letter ends after there have been 100 people who read it but did not send it out? Also find out how many people sent out the letter?
  1. A
    $122$ & $22$
  2. B
    $111$ & $11$
  3. C
    $133$ & $33$
  4. D
    $144$ & $44$

Solve it on GATE DA practice →More Basic Data Structures problems

Show the worked solutionModel the chain as a rooted tree: people who send letters are internal nodes with exactly 4 children, people who do not are leaves. It is a full 4-ary tree with \(l=100\) leaves.\[\boxed{l=(m-1)i+1}\]\[100=3i+1\ \Rightarrow\ i=33\ \text{people sent the letter},\]\[n=mi+1=4(33)+1=133\ \text{people saw it}.\]Check: \(n=i+l=33+100=133\).Answer: C

GATE DA practice: past exam problems by chapter, with worked solutions · gatedaprep.com