hmmath3112's blog

By hmmath3112, history, 2 hours ago, In English

Problem: There are $$$n$$$ sticks of length $$$1,2,3,...,n$$$. How many incongruent triangles can be formed by using three of the given sticks?

My solution: After solving the problem, I found the number of triangles, $$$x$$$, to be:

$$$\begin{align}x = \sum_{i=1}^{n} i \cdot \left\lceil \frac{i+1}{2} \right\rceil + 2 \cdot \sum_{i=1}^{n} \left\lceil \frac{i+1}{2} \right\rceil - \sum_{i=1}^{n} \left\lceil \frac{i+1}{2} \right\rceil^2 - n(n+1)\newline \end{align}$$$

However, I am not satisfied with this expression. Can it be simplified? (Can we express this equation without using the summation sign?)

  • Vote: I like it
  • -1
  • Vote: I do not like it

»
105 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it
$$$ \text{Number of triangles},\ x = \begin{cases} \displaystyle \frac{k(k-1)(4k+1)}{6}, & \text{if } n \text{ is odd and } n = 2k+1 \\ \\ \displaystyle \frac{k(k-1)(4k-5)}{6}, & \text{if } n \text{ is even and } n = 2k \end{cases} $$$
»
100 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it

Notice that there are 2 cases for $$$\lceil\frac{i+1}2\rceil$$$. It is either $$$\frac{i+1}2$$$, either $$$\frac{i+2}2$$$, depending on $$$i$$$'s parity. You should try to break down the sums into odd sums and even sums and get an answer that way.

»
43 minutes ago, # |
  Vote: I like it 0 Vote: I do not like it
$$$ \Large{x = \sum_{i=1}^{n}i\cdot\lceil{\frac{i+1}{2}}\rceil + 2\cdot\sum_{i=1}^{n}\lceil{\frac{i+1}{2}}\rceil - \sum_{i=1}^{n}\lceil{\frac{i+1}{2}}\rceil^{2} - n(n+1)} $$$

Let $$$n = 2k+1$$$ for some integer $$$k$$$

For odd $$$i\ (i = 2m-1)$$$

$$$ \Large{\lceil{\frac{i+1}{2}}\rceil = \frac{i+1}{2} = m} $$$

For even $$$i\ (i = 2m)$$$

$$$ \Large{\lceil{\frac{i+1}{2}}\rceil = \frac{i}{2} + 1 = m+1} $$$

Therefore, if $$$n$$$ is odd

$$$ \Large{A_{odd} = \sum_{i=1}^{n}i\cdot\lceil{\frac{i+1}{2}}\rceil = \sum_{i=1}^{\frac{n+1}{2}}(2i-1)\cdot{i} + \sum_{i=1}^{\frac{n-1}{2}}2i\cdot{(i+1)}} $$$

And if n is even

$$$ \Large{A_{even} = \sum_{i=1}^{n}i\cdot\lceil{\frac{i+1}{2}}\rceil = \sum_{i=1}^{\frac{n}{2}}(2i-1)\cdot{i} + \sum_{i=1}^{\frac{n}{2}}2i\cdot{(i+1)}} $$$

Notice that:

$$$ \Large{F_a = \sum_{i=1}^{a}(2i-1)\cdot{i}=\sum_{i=1}^{a}2i^2 - i=2\cdot\sum_{i=1}^{a}i^2 - \sum_{i=1}^{a}i} $$$

$$$\newline$$$

$$$ \Large{F_a = 2\cdot\frac{a(a+1)(2a+1)}{6} - \frac{a(a+1)}{2}}=\frac{a(a+1)(4a-1)}{6} $$$

$$$\newline$$$

$$$ \Large{G_a = \sum_{i=1}^{a}2i\cdot{(i+1)}=2\cdot\frac{a(a+1)(2a+1)}{6} + 2\cdot\frac{a(a+1)}{2}=\frac{a(a+1)(2a+4)}{3}} $$$

Finally,

$$$ \Large{A_{odd} = F_{\frac{n+1}{2}} + G_{\frac{n-1}{2}}} $$$

$$$\newline$$$

$$$ \Large{A_{even} = F_{\frac{n}{2}} + G_{\frac{n}{2}}} $$$

Similarly for

$$$ \Large{B = \sum_{i=1}^{n}\lceil{\frac{i+1}{2}}\rceil} $$$

$$$\newline$$$

$$$ \Large{B_{odd} = \sum_{i=1}^{\frac{n+1}{2}}{i} + \sum_{i=1}^{\frac{n-1}{2}}{(i+1)}} $$$

$$$\newline$$$

$$$ \Large{B_{even} = \sum_{i=1}^{\frac{n}{2}}{i} + \sum_{i=1}^{\frac{n}{2}}{(i+1)}} $$$

Let

$$$ \Large{H_a = \sum_{i=1}^a{i} = \frac{a(a+1)}{2}} $$$

Then

$$$ \Large{B_{odd} = H_{\frac{n+1}{2}} + H_{\frac{n-1}{2}+1} - 1} $$$

$$$\newline$$$

$$$ \Large{B_{even}} = H_{\frac{n}{2}} + H_{\frac{n}{2}+1} - 1 $$$

Final one:

$$$ \Large C = \sum_{i=1}^{n}\lceil{\frac{i+1}{2}}\rceil^{2} $$$

$$$\newline$$$

$$$ \Large {C_{odd} = \sum_{i=1}^{\frac{n+1}{2}}{i^2} + \sum_{i=1}^{\frac{n-1}{2}}{(i+1)^2}} $$$

$$$\newline$$$

$$$ \Large {C_{even} = \sum_{i=1}^{\frac{n}{2}}{i^2} + \sum_{i=1}^{\frac{n}{2}}{(i+1)^2}} $$$

Let

$$$ \Large {D_a = \sum_{i=1}^a{i^2} = \frac{a(a+1)(2a+1)}{6}} $$$

Then

$$$ \Large {C_{odd} = D_{\frac{n+1}{2}} + D_{\frac{n-1}{2} + 1} - 1^2} $$$

$$$\newline$$$

$$$ \Large {C_{even} = D_{\frac{n}{2}} + D_{\frac{n}{2} + 1} - 1^2} $$$

Finally, if $$$n$$$ is odd:

$$$ \Large x_{odd} = A_{odd} + 2\cdot B_{odd} - C_{odd} - n(n+1) $$$

if $$$n$$$ is even:

$$$ \Large x_{even} = A_{even} + 2\cdot B_{even} - C_{even} - n(n+1) $$$