Define a subset S of the first 3 0 positive integers to be uneven if, for all i ∈ S , i + 2 ∈ / S . For example, { 1 , 2 } is an uneven subset, while { 1 , 2 , 3 } is not. If N represents the number of uneven subsets, find the remainder when N is divided by 1 0 0 0 .
Notes:
The empty set is considered to be an uneven subset.
You may want use a calculator at the end.
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.
Let U n represent the number of uneven subsets for the first n positive integers. Also, let I n represent the first n positive integers. We will create a recursion for U n based on the inclusion of n and n − 1 in the subset:
Case 1: n is not included.
Our problem whittles down to finding the number of uneven subsets of I n − 1 , which is U n − 1 from our original definition of the symbol.
Case 2: n and n − 1 are included.
We cannot have n − 2 or n − 3 in our subset, due to our definition of an uneven subset. Note that for every uneven subset of I n − 4 , we can include n and n − 1 into it to get a subset of I n . Thus, the number of subsets for this case is U n − 4 .
Case 3: n is included, but n − 1 is not.
Here, the second largest integer we can include in the subset is n − 3 . By the same argument as for Case 2, the total number of subsets for this case is U n − 3 .
These three cases cover all the ways n and n − 1 can be included in our subset, so we have U n = U n − 1 + U n − 3 + U n − 4 . By counting out the subsets directly, we have U 0 = 1 , U 1 = 2 , U 2 = 4 , and U 3 = 6 as our initial conditions. Thus, after some brute force calculations using our recursion, we have U 3 0 = 2 5 5 0 4 0 9 , which leaves a remainder of 4 0 9 when divided by 1 0 0 0 .
Problem Loading...
Note Loading...
Set Loading...
The problem can be solved by hand.
Note that we can let S = A ∪ B where A ∈ { 1 , 3 , 5 , . . . , 2 9 } and B ∈ { 2 , 4 , 6 , . . . , 3 0 } .
Now let K n be the number of subsets T of { 1 , 2 , 3 , . . . , n } such that for all i ∈ T , i + 1 ∈ T . Note that there are K 1 5 possibilities for A and B each such that S is uneven (something like number of ways to pick from a row of n people, picking no two adjacent people).
We can establish the recurrence relation K n = K n − 1 + K n − 2 by considering if n is included or not included. K 1 = 2 , K 2 = 3 thus K 1 5 is the 16th Fibonacci number, 1597 (this can be worked out by hand fairly fast).
Now there are 1 5 9 7 2 = 2 2 5 0 4 0 9 uneven subsets (also doable by hand, especially if you just focus on finding the last 3 digits).