1,210 views
0 votes
0 votes

a full 3-ary tre with 100 vertices have 

a)57 leaves b) 67 leaves c)77 leaves  d) 87  leaves

2 Answers

Best answer
2 votes
2 votes

Let $n$ is the height of tree.

No of vertices $=100$
$3^0+3^1+3^2+...+3^{n-1}+3^n=100$

$\frac{1-3^{n+1}}{1-3} =100$

$3^{n+1} =201$

leaves, (at height $n$)$= 3^n =67$

selected by
0 votes
0 votes

answer will be 67

to find that their is no hard rule .i derive this by using my intuition  by taking condition

like as n/2= x

then find   ceiling function of x/3 and said to be y

then do x+y and got your answer

where n is no of vertices  lets take our question for n=100 then u find x=n/2 so which is 50

then find y which is ceiling of  x/3 so 50/3 =17=y so 

then x+y= 50+17=67 answer 

Related questions

5 votes
5 votes
1 answer
1
hacker16 asked Jan 20, 2018
2,326 views
Someone Please Explain thishttps://gateoverflow.in/2046/gate2014-3-12
0 votes
0 votes
2 answers
2
Sk Jamil Ahemad asked Feb 1, 2022
345 views
Please explain with some example that How Right to Left associativity takes place in case of Ternary operators?
0 votes
0 votes
1 answer
4
nish kim asked Sep 2, 2017
2,331 views
{a=1,b=2,c=3;*((a)?&b:&a) = a?b:c;printf("%d %d %d\n",a,b,c);}can someone explain with clarity ?a.1 2 3b.2 1 3c. 1 3 2