Let f ( x ) = x 2 − 2 x . A set of real numbers S is valid if it satisfies the following:
1) If
x
∈
S
, then
f
(
x
)
∈
S
.
2) If
x
∈
S
and
k
f
’s
f
(
f
(
…
f
(
x
)
…
)
)
=
x
for some integer
k
, then
f
(
x
)
=
x
.
Find the number of 8-element valid sets.
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.
The imaginary-vertex hack is one way to get the multi-term Catalan recurrence (it also links this to other related problems such as triangulations of a polygon)
The statement should say k > 0 . I assume the reader can solve equations of the form x 2 − 2 x = c .
1) says that S should be stable by f and 2) says that there is no trivial cycle. We can conclude that S should contain at least one of the fixed points of f , which are 0 and 3 . This also says that all the other x ∈ S should be such that for some k , f k ( x ) ∈ { 0 , 3 } .
This says that each S is composed of the nodes of any subtrees of the two trees T 0 and T 3 , defined as follows:
Looking at T 0 we have one x = 0 such that f ( x ) = 0 , namely 2 , then { 1 + 3 1 − 3 } , and we stop here. Looking at T 3 we have one x = 3 s.t. f ( x ) = 3 , i.e. − 1 , then we have a double root 1 , and then two roots { 1 − 2 , 1 + 2 }
0 3
| |
2 -1
/ \ |
1+√3 1-√3 1
/ \ / \ / \
... ... 1+√2 1-√2
/ \ / \
... ...
We want to know the shape of the trees, in fact they are binary and infinite below the nodes 2 and -1. Indeed we can show that if − 1 < c < 3 then the equation f ( x ) = c will have two roots x 1 , x 2 such that − 1 < x 1 < x 2 < 3 . Doing the math, the condition x 2 < 3 is equivalent to − 1 < c and the condition − 1 < x 1 is equivalent to c < 3 .
Then all we have to do is compute the number of subtrees of a given size in a binary tree, then we will be able to enumerate those of the trees T 0 and T 3 .
The number of subtrees of size n of a infinite binary tree is given by C ( 0 ) = 1 and C ( n + 1 ) = ∑ k = 0 n C ( k ) C ( n − k ) , which are catalan numbers, but we don't need to know that, I've just computed them manually up to C ( 7 ) .
Then the number of subtrees of size n in T 0 is t 0 ( n ) = C ( n − 1 ) and in T 3 it is t 3 ( n ) = C ( n − 2 ) , assuming C ( n < 2 ) = 1 . The answer is then the number of ways we can get 8 nodes out of two subtrees of T 0 and T 3 :
k = 0 ∑ 8 t 0 ( k ) t 3 ( 8 − k ) = C ( 7 ) + 2 C ( 6 ) + 2 C ( 5 ) + 2 C ( 4 ) + 2 C ( 2 ) C ( 3 ) = 8 2 5 .
Problem Loading...
Note Loading...
Set Loading...
Consider an infinite directed graph where each real number r is associated with a vertex and there is an edge from every r to f ( r ) . Then the problem wants us to find an induced subgraph with 8 vertices such that
By condition 1 and the graph's construction, any connected component of the subgraph must have equally many edges and vertices, so it must have exactly one directed cycle, which by condition 2 must be a loop. Ignoring the loop, the connected component would be a tree rooted at the looped vertex. Now it's much easier to see what our selection must look like --- if we select a vertex, we must select all its ancestors, so we're just counting ways to select subtrees containing the roots.
By solving x = f ( x ) , we find two vertices that have a loop: 0 and 3.
In general, by solving r = f ( x ) by the quadratic formula we get x = 1 ± 1 + r , so the vertices with edges to r are the vertices 1 ± 1 + r (if they exist, which is true if r ≥ − 1 .)
Investigating 3, we find that -1 has an edge to 3 (as does 3 itself), and only 1 has an edge to -1.
Investigating 0, we find that 2 has an edge to 0 (as does 0 itself).
Now, note that for any vertex r satisfying − 1 < r < 3 , the roots 1 ± 1 + r exist and are distinct, and furthermore − 1 = 1 − 1 + 3 < 1 ± 1 + r < 1 + 1 + 3 = 3 , so there exist two vertices with edges to r and they satisfy exactly the same conditions as r .
Recursively applying this, we discover that 1 and 2 are both roots of (nonintersecting) infinite complete binary trees. We can now completely describe the rooted forest we're selecting subtrees from: 3 has one child (-1), which has one child (1), which has an infinite complete binary tree beneath it; 0 has one child (2), which has an infinite complete binary tree beneath it.
This is a good time to recall that the number of binary trees with n vertices is the n th Catalan number, C n = n + 1 1 ( n 2 n ) . Unfortunately we still have to count subtrees from two separate binary trees simultaneously, which still requires a complicated summation of Catalan numbers if done naïvely. Therefore, we apply an imaginary-vertex hack to take advantage of the symmetry, leaving lots of easy cases:
Our answer is 1 3 2 + 1 3 2 + 4 2 9 + 1 3 2 = 8 2 5 .