Totem Poles!

In the land of Mathematica, a remote tribe made totem poles out of square-heads and big-heads (which were twice as tall as square heads). The square-heads were made of pine, whereas the big-heads were made of ash or birch. The heads were stacked upright to form these totem poles.

Find the number of different totem poles of height 11 (that is, equivalent to 11 square-heads) that were possible.


The answer is 1365.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Sharky Kesa
May 27, 2016

Relevant wiki: Recognizing Recursion

We will create a recursion for the number of totem poles there are of height n n . Let f n f_n denote the number of totem poles possible of height n n . Firstly, f 1 = 1 f_1 = 1 and f 2 = 3 f_2 = 3 . We also note that f n = f n 1 + 2 f n 2 f_n = f_{n-1} + 2f_{n-2} for n 3 n \geq 3 since totem poles of height n n are either a totem pole of height n 1 n-1 topped with a square-head or a totem pole of height n 2 n-2 topped with an ash or birch big-head. Thus, it follows:

f 3 = 3 + 2 × 1 = 5 f 4 = 5 + 2 × 3 = 11 f 5 = 11 + 2 × 5 = 21 f 6 = 21 + 2 × 11 = 43 f 7 = 43 + 2 × 21 = 85 f 8 = 85 + 2 × 43 = 171 f 9 = 171 + 2 × 85 = 341 f 10 = 341 + 2 × 171 = 683 f 11 = 683 + 2 × 341 = 1365 \begin{aligned} f_3 &= 3 + 2 \times 1 = 5\\ f_4 &= 5 + 2 \times 3 = 11\\ f_5 &= 11 + 2 \times 5 = 21\\ f_6 &= 21 + 2 \times 11 = 43\\ f_7 &= 43 + 2 \times 21 = 85\\ f_8 &= 85 + 2 \times 43 = 171\\ f_9 &= 171 + 2 \times 85 = 341\\ f_{10} &= 341 + 2 \times 171 = 683\\ f_{11} &= 683 + 2 \times 341 = 1365 \end{aligned}

Thus, there are 1365 \boxed{1365} totem poles of height 11.


Bonus: Prove that the general formula for the totem poles of height n n is

k = 0 n ( 1 ) k 2 n k = 2 n + 1 + ( 1 ) n 3 \displaystyle \sum_{k=0}^n (-1)^k 2^{n-k}=\dfrac {2^{n+1}+(-1)^n}{3}

Kyle T
Sep 28, 2018

I think the important thing here is distinguishing that an ash big-head is different than a birch big-head. Originally when I went through this I totally skipped over that piece of information and I was only counting sqaure-heads vs big-heads and got 144 different poles which wasnt correct. But after adjusting to include square-heads, ash big-heads and birch big-heads I got the same answer as Sharky below.

Below is the php I wrote for this

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
<?php  
$t = 0; //total combinations  
$arr = array('p','a','b'); //p = pine square-head (1), a = ash big-head (2), b = birch big-head (2)  
//starting with the 3 above as the base of the totem pole, lets keep adding onto them until we get a height of 11  
do{  
    $newarr = array();  
    foreach($arr as $a){  
        $sum = get_sum($a);  
//if sum is 11, count it then discard it  
        if($sum==11){  
            $t++;  
//if count is less than 11, keep it and add one of each new piece type on top of it  
        } elseif($sum<11){  
            $newarr[] = $a.'p';  
            $newarr[] = $a.'a';  
            $newarr[] = $a.'b';  
        }  
//if count is greater than 11, discard it  
    }  
    $arr = $newarr;  
} while(count($arr));  
//once we've ran through all combinations, print the result  
echo 'total: '.$t; //1365  

//convert letter values to height values and sum them then return the total height  
function get_sum($string){  
    $string = str_replace('p','1',$string);  
    $string = str_replace('a','2',$string);  
    $string = str_replace('b','2',$string);  
    return array_sum(str_split($string));  
}  
?>   

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...