1.1 Let $f(A)$ denote the difference between the maximum value and the minimum value of a set $A$. Find the sum of $f(A)$ as $A$ ranges over the subsets of $\{1, 2, \dots, n\}$. 1.2 All cells of an $8 × 8$ board are initially white. A move consists of flipping the color (white to black or vice versa) of cells in a $1\times 3$ or $3\times 1$ rectangle. Determine whether there is a finite sequence of moves resulting in the state where all $64$ cells are black. 1.3 Prove that for all positive integers $m$, there exists a positive integer $n$ such that the set $\{n, n + 1, n + 2, \dots , 3n\}$ contains exactly $m$ perfect squares.
Problem
Source: 2016 Thailand October Camp 2.1
Tags: combinatorics, table, Coloring, Sets, number theory, algebra
Shroud666
26.02.2022 15:04
Answer For First :
Its this : (Need to solve the Arithmetico-Geometric Progression and its worser counterpart )
$$\frac{n}{2}\sum_{k=0}^n k\cdot2^{k} - \frac{1}{2}\sum_{k=0}^n k^{2}\cdot2^{k}$$Which boils down to :
$$\frac{n}{2}[(n-1)\cdot2^{n+1} + 2] - \frac{1}{2}[2^{n+2} + (n-1)^2\cdot2^{n+1}-6]$$Which condenses to (if I have'nt got the arithmetic wrong)
$$(n-3)\cdot2^{n}+n+3$$
Solution :
Lets take a simplified case of $n = 10$ and generalise while solving it :
( We are neglecting the singleton sets and $\phi$ because they dont yield anything to the answer )
Say $(x , y) = (2 , 8)$ we want a $f(x,y)$ which gives the number such subsets (where x and y are the minimum and the maximum elements) of the orginal set ($U$)
The number of such subsets is just the number of subsets of : $(3,4,5,6,7)$
( This contains $(y-x-1)$ elements ) (Since all other elements can not exceed 8 or preceed 2)
Hence We can create a set $X$ with $(2 , 8)$ and all the other the other elements of the subset of $(3,4,5,6,7)$
The number of such subsets are thus : $f(x,y) = 2^{y-x-1}$ and contributes $(y-x)\cdot2^{y-x-1}$ to the sum
It can be trivially solved that $ y-x = k$ has $(n-k)$ solutions when $x\hspace{1mm}, y$ vary from $(1,2,3,...,n)$
Hence our final solution is : ( Since k = 0 and k = n this diminishes I wrote it orginally as such)
$$\sum_{k\hspace{1mm}=\hspace{1mm}1}^{n-1} (n-k)\cdot k\cdot2^{k-1}$$
PS : I edited it 23 times because I didn't knew there was a preview before an error in latex popped up