Stay ahead of learning milestones! Enroll in a class over the summer!

Contests & Programs AMC and other contests, summer programs, etc.
AMC and other contests, summer programs, etc.
3 M G
BBookmark  VNew Topic kLocked
Contests & Programs AMC and other contests, summer programs, etc.
AMC and other contests, summer programs, etc.
3 M G
BBookmark  VNew Topic kLocked
G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Apr 2, 2025
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers
[*]April 22nd (Webinar), 4:00pm PT/7:00pm ET, Competitive Programming at AoPS (USACO).[/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Sunday, Apr 13 - Aug 10
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Sunday, Apr 13 - Aug 10
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Monday, Apr 7 - Jul 28
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Wednesday, Apr 16 - Jul 2
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Thursday, Apr 17 - Jul 3
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Wednesday, Apr 23 - Oct 1
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Intermediate: Grades 8-12

Intermediate Algebra
Monday, Apr 21 - Oct 13
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Wednesday, Apr 16 - Jul 2
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Friday, Apr 11 - Jun 27
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Apr 2, 2025
0 replies
2025 ELMOCOUNTS - Mock MATHCOUNTS Nationals
vincentwant   130
N 3 minutes ago by c_double_sharp
text totally not copied over from wmc (thanks jason <3)
Quick Links:
[list=disc]
[*] National: (Sprint) (Target) (Team) (Sprint + Target Submission) (Team Submission) [/*]
[*] Miscellaneous: (Leaderboard) (Sprint + Target Private Discussion Forum) (Team Discussion Forum)[/*]
[/list]
-----
Eddison Chen (KS '22 '24), Aarush Goradia (CO '24), Ethan Imanuel (NJ '24), Benjamin Jiang (FL '23 '24), Rayoon Kim (PA '23 '24), Jason Lee (NC '23 '24), Puranjay Madupu (AZ '23 '24), Andy Mo (OH '23 '24), George Paret (FL '24), Arjun Raman (IN '24), Vincent Wang (TX '24), Channing Yang (TX '23 '24), and Jefferson Zhou (MN '23 '24) present:



[center]IMAGE[/center]

[center]Image credits to Simon Joeng.[/center]

2024 MATHCOUNTS Nationals alumni from all across the nation have come together to administer the first-ever ELMOCOUNTS Competition, a mock written by the 2024 Nationals alumni given to the 2025 Nationals participants. By providing the next generation of mathletes with free, high quality practice, we're here to boast how strong of an alumni community MATHCOUNTS has, as well as foster interest in the beautiful art that is problem writing!

The tests and their corresponding submissions forms will be released here, on this thread, on Monday, April 21, 2025. The deadline is May 10, 2025. Tests can be administered asynchronously at your home or school, and your answers should be submitted to the corresponding submission form. If you include your AoPS username in your submission, you will be granted access to the private discussion forum on AoPS, where you can discuss the tests even before the deadline.
[list=disc]
[*] "How do I know these tests are worth my time?" [/*]
[*] "Who can participate?" [/*]
[*] "How do I sign up?" [/*]
[*] "What if I have multiple students?" [/*]
[*] "What if a problem is ambiguous, incorrect, etc.?" [/*]
[*] "Will there be solutions?" [/*]
[*] "Will there be a Countdown Round administered?" [/*]
[/list]
If you have any other questions, feel free to email us at elmocounts2025@gmail.com (or PM me)!
130 replies
vincentwant
Apr 20, 2025
c_double_sharp
3 minutes ago
What's the easiest proof-based math competition?
Muu9   3
N 43 minutes ago by Mummypig
In terms of the difficulty of the questions, not the level of competition. There's USAJMO, but surely there must be countries with less developed competitive math scenes whose Olympiads are easier.
3 replies
Muu9
Apr 21, 2025
Mummypig
43 minutes ago
2025 RAMC 10
Andyluo   32
N an hour ago by bjump
We, andyluo, MC_ADe, Arush Krisp, pengu14, mathkiddus, vivdax present...

IMAGE

About Errata(0) Test Taking Discussion Test Integrity Notes/Credits

Test: RAMC 10
Leaderboard Yet to be released


mods can you keep this in c & p until it finishes please
32 replies
Andyluo
Yesterday at 9:59 PM
bjump
an hour ago
Sort of additive function
tenniskidperson3   112
N an hour ago by anudeep
Source: 2015 USAJMO problem 4
Find all functions $f:\mathbb{Q}\rightarrow\mathbb{Q}$ such that\[f(x)+f(t)=f(y)+f(z)\]for all rational numbers $x<y<z<t$ that form an arithmetic progression. ($\mathbb{Q}$ is the set of all rational numbers.)
112 replies
tenniskidperson3
Apr 29, 2015
anudeep
an hour ago
No more topics!
Subset coloring
v_Enhance   74
N Apr 24, 2025 by de-Kirschbaum
Source: USAMO 2015 Problem 3
Let $S = \left\{ 1,2,\dots,n \right\}$, where $n \ge 1$. Each of the $2^n$ subsets of $S$ is to be colored red or blue. (The subset itself is assigned a color and not its individual elements.) For any set $T \subseteq S$, we then write $f(T)$ for the number of subsets of $T$ that are blue.

Determine the number of colorings that satisfy the following condition: for any subsets $T_1$ and $T_2$ of $S$, \[ f(T_1)f(T_2) = f(T_1 \cup T_2)f(T_1 \cap T_2). \]
74 replies
v_Enhance
Apr 28, 2015
de-Kirschbaum
Apr 24, 2025
Subset coloring
G H J
G H BBookmark kLocked kLocked NReply
Source: USAMO 2015 Problem 3
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mogmog8
1080 posts
#66 • 2 Y
Y by centslordm, Jack_w
For any two subsets $A\subseteq B$ we color subsets $T$ blue iff $A\subseteq T\subseteq B$.

Proof of Sufficiency: Call an element ``good'' if it is in $B$ but not in $A$. Let $T_1,T_2\in S$ and suppose that there are $a$ good elements in $T_1$ but not $T_2$. Define $b$ similarly. Then, suppose there are $x$ good elements in both $T_1$ and $T_2$. If either of $T_1$ or $T_2$ does not contain $A$, both sides of the assertion are zero so assume otherwise. Then,
\[f(T_1)f(T_2)=2^{a+x}\cdot 2^{b+x}=2^{a+b+x}\cdot 2^{x}=f(T_1\cup T_2)f(T_1\cap T_2),\]as desired.

Proof of Necessity: Let $S'$ be the set of blue subsets. Let $A$ be the subset in $S'$ with minimal size. Then, for $T\in S'$ we have \[1\le f(A)f(T)=f(A\cap T)f(A\cup T).\]If $A\nsubseteq T$ then $|A\cap T|<|A|$ and there exists a subset of $A\cap T$ that is blue as $f(A\cap T)>0$, which is a contradiction. Hence, $A\subseteq T$.

Let $B$ be the subset in $S'$ with maximal size. Consider $T\in S'$. Suppose $f(B\setminus T)=b$, $f(T\setminus B)=t,$ $f(T\cap B)=x$. Then, \[(b+x)(t+x)=f(B)f(T)=f(B\cup T)f(B\cap T)=(b+t+x)x\]which gives $bt=0$ which means all blue subsets of $B$ are contained in $T$ or vice versa. Note $|T|\le |B|$ so if $B\subseteq T$ then $B=T$ ie $T\subseteq B$. Otherwise, $T\subseteq B$. Hence, all blue subsets $T$ satisfy $A\subseteq T\subseteq B$ for some $A\subseteq B$.

If we have all red subsets, there is one coloring. If there is at least one blue subset, there are $3^n$ ways to choose $A$ and $B$ so our answer is $\boxed{3^n+1}$.
This post has been edited 1 time. Last edited by Mogmog8, Feb 24, 2024, 12:39 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
thdnder
194 posts
#67
Y by
Answer: $3^n + 1$.

We begin with the following claim:

Claim: If $\emptyset$ is blue, then there are exactly $2^n$ possible colorings.

Proof. Note that $f(\{x\})f(\{y\}) = f(\{\emptyset\})f(\{x, y\}) = f(\{x, y\})$, so $f(\{x, y\})$ is uniquely determined by $f(\{x\}),f(\{y\})$. Inducting it, we see that $f(\{a_1, a_2, \dots, a_k\})$ is uniquely determined by $f(\{a_1\}), f(\{a_2\}), \dots, f(\{a_n\})$. Therefore, $f(T_1)f(T_2) = f(T_1 \cap T_2)f(T_1 \cup T_2)$ holds. Conversely, if we put colors of $f(\{1\}), f(\{2\}), \dots, f(\{n\})$ arbitrarily, we get a coloring that satisfies the problem condition. Thus, the number of coloring is $2^n$. $\blacksquare$


If there isn't any blue subset, then there are exactly 1 such coloring, so we may assume there exists a blue set. Let $S$ be the minimal blue set, i.e $|S|$ is minimal and let $T$ be an arbitrary set such that $f(T) > 0$. If $S \not\subseteq T$, then $0 \neq f(S)f(T) = f(S \cap T)f(S \cup T)$, so $0 \neq f(S \cap T)$. Therefore, there exists a blue subset $H$ of $S \cap T$, so $|H| \le |S \cap T| < |S|$, contradicting the fact that $|S|$ is minimal. Hence, whenever $f(T) > 0$, $S \subseteq T$.

Let $T_1, T_2$ be subsets of $\{1, 2, \dots,n\}$ that don't include $S$. Then note that $f(T_1)f(T_2) = 0 = f(T_1 \cap T_2) = f(T_1 \cap T_2)f(T_1 \cup T_2)$ and $f(T_1)f(T_2 \cup S) = 0 = f(T_1 \cap (T_2 \cup S))f(T_1 \cup (T_2 \cup S))$, so we only need to work on the subsets that are including $S$. Let $T_1, T_2 \subseteq \{1, 2, \dots, n\}\backslash S$. Then note that we only have to count the number of coloring that satisfies $f(T_1 \cup S)f(T_2 \cup S) = f(S \cup T_1 \cup T_2)f(S \cup (T_1 \cap T_2))$. If we erase $S$ from these subsets, then the problem reduces down to the case that original set is $\{1, 2, \dots, n\}\backslash S$ and $\emptyset$ is blue. Thus by claim, the number of such coloring is $2^{n - |S|}$.

Hence the final answer is $1 + \sum_{k=0}^{n} 2^{n-k}\binom{n}{k} = 3^n + 1$, as needed. $\blacksquare$

Remark: At first, I worked on the cases $n = 1, 2, 3$ and realised the claim, but it took embarrasingly long time to prove, because I chose wrong approach to prove. I tried to prove the claim by using induction on $n$, which seems pretty tempting for me, but I couldn't prove it by induction. Then I somehow considered singleton sets and that was the time I proved the claim. Then somehow, I magically did the rest of the problems in 10 minutes, just considering the minimal set.
This post has been edited 1 time. Last edited by thdnder, Mar 31, 2024, 9:32 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mr.Sharkman
498 posts
#68
Y by
I lost the game
This post has been edited 2 times. Last edited by Mr.Sharkman, Jun 11, 2024, 2:58 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Martin2001
144 posts
#69
Y by
First we do the case where $\emptyset$ is blue. Note that all subsets are determined by what color the sets with only one element are. For example, if $1$ is blue and $2$ is red, then ${1,2}$ is red. Note that a subset is blue if and only if all the elements are blue. Thus, there are $2^n$ colorings for when the $\emptyset$ is blue, corresponding to what color each of the $n$ single element sets are.
\newline Now, the case where the empty set is red. Obviously the all red case works. Now consider the blue set with the least elements. Let the smallest blue set have $t$ elements.There can obviously be no more blue sets with $t$ elements as $1 \cdot 1 \neq 0,$ or any sets that don't contain the smallest blue subset. Now, consider all subsets that have the smallest blue set as a subset. Then note that we can consider this as simply an $\emptyset$ is blue case where there are $n-t$ elements. Thus, our final answer is
$$\sum_{t=0}{n}\binom{n}{t} 2^{n-t}+1=\boxed{3^n+1}$$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blueprimes
343 posts
#71
Y by
We count $1$ for when all subsets are red. Now let $k$ be the minimal cardinality of a blue subset.

Case 1: $k = 0$.
Then the empty set is blue. For brevity call an element $x \in T$ blue if $\{ x \}$ is blue. Note that for any disjoint $A$ and $B$, we have $f(A \cup B) = f(A) f(B) \implies f(T) = \prod_{x \in T} f(\{x \})$ which is simply $2$ to the power of the number of blue elements in $T$. Call this result $(1)$.

Claim 1: Any nonempty set $T \subseteq S$ is blue if and only if all of its elements are blue.
Proof. We induct, the $|T| = 1$ case is self-evident. Assuming it is true up to $|T|$, consider an arbitrary $|U| = |T| + 1$. Suppose $U$ has $b$ blue elements. If $b = |U|$, by the inductive hypothesis all $2^b - 1$ proper subsets are blue. But $(1)$ implies there are $2^b$ in total, so $U$ is blue itself. On the other hand, if $U$ has at least one red element, it has $2^b$ proper subsets that are blue. So $(1)$ shows that $U$ is red.

The above claim implies that the whole coloring is uniquely determined by one of $2^n$ colorings of the sets $\{1 \}, \{2 \}, \dots \{ n \}$, all can be verified to work for sufficiency.

Case 2: $1 \le k \le n$.
WLOG $\{1, 2, \dots, k \}$ is the smallest blue set. Then all of its proper subsets are red. Now since for disjoint $A$ and $B$, the product $f(A) f(B) = 0$, all subsets of $\{k + 1, k + 2, \dots, n \}$ are all red. Now consider all sets $(P \cup Q) \subseteq S$ where $P \subset \{1, 2, \dots, k \}$ and $Q \subseteq \{k + 1, k + 2, \dots, n \}$. Then
\[ 0 = f(P) (\{1, 2, \dots, k \} \cup Q)= f(P \cup Q) f(\{1, 2, \dots, k \}) = f(P \cup Q) \implies P \cup Q \text{ is red.} \]The only sets left to assign a color are those of the form $\{1, 2, \dots, k \} \cup Q$. Let $\{1, 2, \dots, k \} = V$. This situation is virtually the same as Case 1, where instead of $\varnothing$, it is $V$, and instead of assigning colors to $\{1 \}, \{2 \}, \dots, \{n \}$ we are doing this on $V \cup \{k + 1 \}, V \cup \{k + 2 \}, \dots, V \cup \{ n \}$. There are $2^{n - k}$ ways to choose these colors. Now showing the constructions work is easily verifiable.

Collectively the second case yields $\sum_{k = 1}^n \binom{n}{k} 2^{n - k}$.

We have exhausted all cases, our final answer is therefore
\[1 + 2^n + \sum_{k = 1}^n \binom{n}{k} 2^{n - k} = \boxed{3^n + 1}. \]
This post has been edited 1 time. Last edited by blueprimes, Oct 8, 2024, 11:24 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
InterLoop
277 posts
#72
Y by
what the
solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
eg4334
635 posts
#73 • 2 Y
Y by blueprimes, Marcus_Zhang
New highest MOHS solve! We split this into cases. Call an element blue if the one element set consisting of that set is blue.

If $\O$ is blue, then $f(\O) = 1$ and then for disjoint sets $T_1, T_2$ we have $f(T_1 \cup T_2) = f(T_1) f(T_2)$. Then I claim that coloring the one element sets $\{1 \}, \{ 2, \}, \dots \{ n \}$ uniquely determines the rest of the colorings, giving $2^n$ cases. If $T = \{ x_1, x_2, \dots x_n \}$ then $f(T) = \prod_i f(x_i)$. But $f(x_i)$ is $2$ iff $\{ x_i \}$ is blue. Therefore $$f(T) = 2^{\text{number of blue elements}}$$which is obviously determined by the one element subsets.

Claim: $T$ is blue iff all of its elements are blue.
Proof: We proceed using strong induction on the size of $T$. The single element case is obvious. Now if we have that $f(T) = 2^x$ for some integer $x$, we know we have exactly $x$ blue elements. If $x$ is the size of $T$, then $T$ is obviously blue. But if $x < |T|$, then we know by our inductive hypothesis that any subset of those $x$ elements is blue as well, giving us $2^x$ blue subsets. Therefore, $T$ cannot be blue because if it was then $f(T) \geq 2^x + 1$, contradiction.$ \blacksquare$

Therefore, if $\O$ is blue then we have $2^n$ cases.

If $\O$ is red, then $f(\O) = 0$. Therefore, out of any two disjoint subsets one of them must have no blue subsets. Therefore, there must be exactly one blue element or no blue element. If there is exactly one blue element, WLOG $\{ 1 \}$. Then clearly $f(\text{all subsets with no 1}) = 0$. The key step here is that instead of the previous case with the single element subsets forming a basis, we have the double element subsets with $1$. Particularly, $\{1, 2 \}, \{ 1, 3 \}, \dots \{ 1, n \}$ determine all of the subsets that contain a $1$. To see why, notice that $f(\{ 1, x_1, x_2, \dots x_n\}) = \prod_i f(\{ 1, x_i\}) = 2^{\text{number of blue two element sets with one}}$. Then using the exact same induction as the previous case we note that $T$ is blue iff $f(T) = 2^{|T|-1}$, thus determining all subsets. This gives $n \cdot 2^{n-1}$, where the $n$ is from the WLOG earlier.

The idea that follows is clear. If the smallest blue subset is of size $k$, then there can only be one subset of size $k$. We then arbitrarily color the subsets of size $k+1$ with a subset of that smallest blue subset, which determines the rest of the colors. We also need to include the case where there is NO smallest blue subset, giving one trivial solution. Our answer is then $$1 + 2^n + \sum_{k=1}^n \binom{n}{k} \cdot 2^{n-k} = \boxed{3^n+1}$$by the binomial theorem.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
794 posts
#74
Y by
Suppose that $\emptyset$ is blue. The key observation is that the number of colorings is fixed based on any coloring the sets $\{1\}, \ldots, \{n\}$, as we have $f(T) = 2^{\#(T)}$ for all $T \subseteq S$, where $\#(T)$ represents the number of elements in $S$ whose set is colored blue. Thus we have $2^n$ colorings in this case.

We have one coloring if all elements are red. Otherwise, suppose $M$ is the blue set of minimal cardinality $|M| = k$. First notice that $M$ is be unique and only supersets of $M$ can also be colored blue by letting $T_1$ be $M$ and $T_2$ be any a set which violates these conditions. We have $\textstyle \binom nk$ ways to select $M$ with given cardinality, and now we're essentially left with coloring the subsets of $\{1,2,\ldots,n-k\}$ with $\emptyset$ blue, which we determined to have $2^{n-k}$ choices.

Summing over $0 \leq k \leq n$ gives
\[1 + \binom n0 \cdot 2^n + \ldots + \binom nn \cdot 2^0 = \boxed{3^n+1}. \quad \blacksquare\]
This post has been edited 2 times. Last edited by shendrew7, Jan 4, 2025, 5:48 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Jack_w
109 posts
#75
Y by
Let $S = \left\{ 1,2,\dots,n \right\}$, where $n \ge 1$. Each of the $2^n$ subsets of $S$ is to be colored red or blue. (The subset itself is assigned a color and not its individual elements.) For any set $T \subseteq S$, we then write $f(T)$ for the number of subsets of $T$ that are blue.

Determine the number of colorings that satisfy the following condition: for any subsets $T_1$ and $T_2$ of $S$,\[ f(T_1)f(T_2) = f(T_1 \cup T_2)f(T_1 \cap T_2). \]
The answer is $3^n + 1$.

We split into cases on the empty set $\varnothing$.

Case 1: $\varnothing$ is blue.
Then, for disjoint $T_1$, $T_2 \subseteq S$, $f(T_1)f(T_2) = f(T_1 \cup T_2)$.
We claim that each coloring is fixed by the $1$-element sets, and a set is blue iff all of its elements are. Hence, there are $2^n$ colorings in this case.

The proof is by strong induction. Suppose that each $j$-element set is blue iff all of its elements are for each $1 \leq j \leq k$. We will show that the $k+1$-element sets satisfy this property too. Begin by freely choosing the $1$-element subsets, which establishes the trivial base case $k = 1$. Then, for each set of size $k+1$, partition it into two disjoint sets of size $k$ and $1$. WLOG, let's take $\{1, 2, \dots, k+1\} = \{1, 2, \dots, k\} \cup \{k+1\}$.

We have \[ f(\{1, 2, \dots, k\})f(\{k+1\}) = f(\{1, 2, \dots, k+1\}). \]
If $\{k+1\}$ is red, $f(\{1, 2, \dots, k\}) = f(\{1, 2, \dots, k+1\})$. But $\{1, 2, \dots, k\} \subset \{1, 2, \dots, k+1\}$, so this forces $\{1, 2, \dots, k+1\}$ to be red.
If $\{k+1\}$ is blue, $2f(\{1, 2, \dots, k\}) = f(\{1, 2, \dots, k+1\})$. By the inductive hypothesis, each proper subset $T \subset \{1, 2, \dots, k\}$ is blue iff $T \cup \{k+1\}$ is. Along with $f(\{1, 2, \dots, k+1\}) = 2f(\{1, 2, \dots, k\})$, this implies $\{1, 2, \dots, k\}$ is blue iff $\{1, 2, \dots, k+1\}$ is. In turn, $\{1, 2, \dots, k+1\}$ is blue iff. all of its elements are by the hypothesis.

This completes the inductive step. Now we verify all $2^n$ colorings work. Take a set $T = \{e_1, e_2, \dots, e_m\}$. By repeatedly applying $f(T_1)f(T_2) = f(T_1 \cup T_2)$, $f(T) = f(e_1)f(e_2)\dots f(e_m)$. Suppose it has $b$ blue elements; then $b$ of those terms are $2$ and the other $m-b$ are $1$. So $f(T) = 2^b$.

Consequently, if $A$ has $x$ blue elements and $B$ has $y$ blue elements with $z$ elements of overlap (i.e. $A \cap B$ has $z$ blue elements, $A \cup B$ has $x + y - z$ blue elements), we get $2^x2^y = 2^z2^{x+y-z}$, which holds.

Case 2: $\varnothing$ is red.
Let $B$ be the blue set of minimal size. We claim it is unique. Indeed, if $B_1$ and $B_2$ are blue sets of minimal size $k$, then $f(B_1)f(B_2) \neq 0$. But $B_1 \cap B_2$ has size less than $k$, so all of its subsets (including itself) are red. Thus $f(B_1 \cap B_2) = 0$, contradiction. So there is a unique minimal blue set $B$ of size $k$.

Additionally, we claim all sets $C$ with $B \subsetneq C$ are red.
$f(B)f(C) = f(B \cap C)f(B \cup C) = 0$, since $|B \cap C| < |B|$. But $f(B) \neq 0$, so $f(C) = 0$.
Thus, everything is fixed except the supersets of $B$. Observe the bijection between coloring the supersets of $B$ which are subsets of $S$ and coloring the subsets of $S \setminus B$.

Formally, let $g(P) = f(B \cup P)$ for each subset $P$ of $S \setminus B$. Then, since $(B \cup P_1) \cup (B \cup P_2) = B \cup (P_1 \cup P_2)$ and $(B \cup P_1) \cap (B \cup P_2) = B \cup (P_1 \cap P_2)$,
$g(P_1)g(P_2) = g(P_1 \cup P_2)g(P_1 \cap P_2).$
Also, $g(\varnothing) = f(B) = 1$. So this is equivalent to coloring the subsets of $S \setminus B$ according to the same restriction, with the empty set being blue: exactly the same as Case 1! Thus, since $|S \setminus B| = n-k$, there are $2^{n-k}$ such colorings.

We quickly verify they all work: take sets $A_1$, $A_2 \subseteq S$. If one of $A_1$, $A_2$ is not a superset of $B$, $f(A_1)f(A_2) = 0$. Then $A_1 \cap A_2$ is also not a superset of $B$, so $f(A_1 \cap A_2) = 0$. If both $A_1$, $A_2$ are supersets of $B$, the condition holds by the bijection.

Now each coloring in Case 2 can be determined by fixing $0 < k \leq n$, choosing $B$ to be one of the $\binom{n}{k} k$-element sets, and adding $2^{n-k}$ to the count. Note also that the all-red set trivially works, so this adds $1$.
The count is \[\sum_{i = 1}^n 2^{n-i}\binom{n}{i} + 1 \]\[= \sum_{i = 1}^n 2^{n-i}\binom{n}{n-i} + 1 \]\[= \sum_{i = 0}^{n-1} 2^{i}\binom{n}{i} + 1 \]\[= 3^n - 2^n + 1. \]
Combined with Case 1, this yields $3^n + 1$ total colorings.

Remarks
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
zuat.e
44 posts
#76
Y by
We claim there are $3^n+1$ ways.
For convenience, we will denote sets with uppercase letters and elements of $\{1,2,\dots ,n\}$ with lowercase ones.

CASE 1: Assume $f(\emptyset)=0$, then $f(A)f(B)=f(A\cap B)$ for disjoint sets $A,B$.
We claim $f(\{a_1,a_2,\dots a_k\})=2^l$, where $l$ is the number of elements $a_i$ such that $f(\{a_i\})=2$. It is clearly true for $k=1$, so suppose it is true for $a_1, a_2, \dots a_k$ and now $2^lf(\{a_{k+1}\})=f(\{a_1, a_2, \dots a_k\})f(\{a_{k+1}\})=f(\{a_1, a_2, \dots a_k, a_{k+1}\})$, so we're done by induction.

Furthermore, for non-disjoint sequences $a_i, b_i$, suppose $l_1$ are the amount of elements that satisfy $f(x)=2$ and are shared between both sequences and $l_2, l_3$ are the ones which only appear in one of the sequences. Check that: $2^{2l_1+l_2+l_3}=f(\{a_1,a_2, \dots a_k\})f(\{b_1,b_2, \dots b_t\})=f(\{a_1,a_2, \dots a_k\} \cup \{b_1,b_2, \dots b_t\})f(\{a_1,a_2, \dots a_k\} \cap \{b_1,b_2, \dots b_t\}) = 2^{l_1+l_2}2^{l_1+l_3}=2^{2l_1+l_2+l_3}$.
Consequently, after choosing $f(\{x\})$ for all $x$, the remaining of the sequence is forced, hence there're $2^n$ ways to do it.


CASE 2: Let $f(\emptyset)=0$. First, we claim that there exists at most one element that satisfies $f(\{x\})=1$, since, if there were two, $1=f(\{x\})f(\{y\})=f(\{x,y\})f(\emptyset)=0$.
Suppose that element $x$ does exist, then we prove by induction that $f(\{x,a_1,a_2, \dots a_k\})=\prod_{i=1}^kf(\{x,a_i\})$ with base case $f(\{x,a\})f(\{x,b\})=f(\{x,a,b\})$ clear.
Suppose it is true for $f(\{x,a_1,a_2, \dots a_k\})=\prod_{i=1}^kf(\{x,a_i\})$ and now $f(\{x,a_1,a_2, \dots ,a_k,a_{k+1}\})=f(\{x,a_1,a_2, \dots ,a_k\})f(\{x,a_{k+1}\})=\prod_{i=1}^{k+1}f(\{x,a_i\})$.
Also, if $x\not \in A$, then $f(A)=0$, for $f(A)f(\{x\})=f(A\cup \{x\})f(A\cap \{x\})=0$.
Just check that this works for all sets by considering $B,C$ and $x\in A$ disjoint and so $\prod_{a\in A}f(x,a)^2\prod_{b\in B}f(x,b)\prod_{c\in C}f(x,c)=\prod_{i\in A or B}f(1,a)\prod_{j\in AorC}f(x,a)=f(A\cup B)f(A\cup C)=f(A\cup B\cup C)f(A)=\prod_{k\in AorBorC}f(x,k)\prod_{h\in A}f(x,h)=\prod_{a\in A}f(x,a)^2\prod_{b\in B}f(x,b)\prod_{c\in C}f(x,c)$ (if $x\not \in A$, then both terms will be 0).
To sum up, we can choose an element $x$ to be the one that $f(\{x\})=1$, and we choose whether $\{x,y\}$ was blue or red for all $y$, remaining, so there're $n2^{n-1}$ ways to colour.


CASE 3: Consider if there is no element such that $f(\{x\})=1$ and $f(\emptyset)=0$.
Then we choose $A$ to be the set that satisfies $f(A)>0$ with minimal cardinality, then clearly $f(A)=1$. We'll call an element $y$ \textit{good} if $f(A\cup\{y\})2$ and \textit{bad} otherwise.
We now prove by induction that $f(A\cup B)=2^k$ ($A,B$ disjoint), where $k$ is the amount of good elements with base case clear. Suppose $B$ only contains \textit{good} elements and $y$ be one, then $f(A\cup B)=2^{\mid B\mid}$ and so $f(A\cup B\cup \{y\})=f(A\cup B)f(A\cup \{y\})=2^{\mid B\mid +1}$, so all subsets containing only \textit{good} elements and $A$ will be blue.
However, whenever there're no more \textit{good} elements, include \textit{bad} $x$ and so $f(A\cup C\cup \{x\})=f(A\cup C)f(A\cup \{x\})=f(A\cup C)$, so all sets containing $A, x$ are red.
Finally, just check that if a certain subset $S$ doesn't include $A$, then all $f(S)=0$, which can be easily proved when supposing there exists one with minimal cardinality and so $f(S)F(A)=f(A\cup S)f(A\cap S)=0$, for $A\cap S$ has less cardinality than $S$.
We can check this configuration always works by considering sets $S_1, S_2$ that contain $A$ (if not clearly 0=0), where $S_1=A\cup B\cup C_1\cup D_1$, $S_2=A\cup B\cup C_2\cup D_2$, where $B,C_i$ are the sets of shared and individual \textit{good} elements and $D_i$ are the remaining ones, hence $2^{\mid B\mid +\mid C_1\mid+\mid C_2\mid}2^{\mid B \mid}=f(S_1\cup S_2)f(S_1\cap S_2)=f(S_1)f(S_2)=2^{\mid B\mid+\mid C_1\mid}2^{\mid B\mid+\mid C_2\mid}$, so it always works.
Therefore, we just have to choose the minimal blue set (if it exists, so we must add one in case every set is red) and decide whether $f(A\cup \{x\}=\{1,2\}$, therefore, there're $\sum_{i=2}^n\binom{n}{i}2^{n-i}+1=\sum_{i=0}^n\binom{n}{i}2^{n-i}+1-n2^{n-1}-2^n=3^n-2^n-n2^{n-1}+1$.

Consequently, there're $2^n+n2^{n-1}+3^n-2^n-n2^{n-1}+1=3^n+1$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Scilyse
385 posts
#77
Y by
Seems a bit too easy for 25M (unless I fakesolved)

If no subset of $S$ is blue then we have a valid colouring. Otherwise, let $X$ be a blue subset of $S$ with least cardinality.

Claim: If a subset $Y$ is blue, then $X \subseteq Y$.
Proof. Since otherwise $1 = f(X) f(Y) = f(X \cup Y) f(X \cap Y) = 0$ as $|X \cap Y| < |X|$. $\square$

Claim: For some subset $A \subseteq S \setminus X$, a set $T$ is blue if and only if $T \supseteq X$ and $T \setminus X$ is a subset of $A$.
Proof. Abbreviate $S' = S \setminus X$. Note that $f(X \cup \{x\}) \in \{1, 2\}$ for each $x \in S'$, corresponding to whether $X \cup \{x\}$ is red or blue, respectively. We claim we can let $A = \{a_1, \dots, a_m\}$ (resp. $B = \{b_1, \dots, b_n\}$) be the set of elements $x \in S'$ for which $X \cup \{x\}$ is blue (resp. red). Indeed, note that $f(T_1) f(T_2) = f(T_1 \cup T_2)$ for $T_1 \cap T_2 = X$. Hence, $f(X \cup A) = f(X \cup \{a_1\}) f(X \cup \{a_2\}) \dotsm f(X \cup \{a_m\}) = 2^m$; but the number of subsets of $X \cup A$ that are supersets of $X$ is $2^m$, so every such subset of $X \cup A$ is blue. Similarly, $f(X \cup B) = f(X \cup \{b_1\}) f(X \cup \{b_2\}) \dotsm f(X \cup \{b_n\}) = 1$. Now observe that \[f(S) = f(X \cup A) f(X \cup B) = 2^{m},\]so the $2^{m}$ blue subsets of $X \cup A$ are the only blue subsets of $S$. $\square$

It's easy to see that every choice of $A$ induces a valid colouring. Hence, for a specific subset $X$, there are $2^{|S \setminus X|} = 2^{n - |X|}$ possible colourings. Summing over all subsets $X$ (and including the case where no subset of $S$ is blue) yields a total of \[1 + \sum_{i = 0}^n \binom ni 2^{n - i} = \boxed{1 + 3^n}\]colourings by the Binomial Theorem.
This post has been edited 1 time. Last edited by Scilyse, Jan 30, 2025, 5:36 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EpicBird08
1750 posts
#78 • 1 Y
Y by dolphinday
Let $a_n$ be the number of colorings total, and let $b_n$ be the number of colorings which satisfy $f(\emptyset) = 1.$

First, we will show that $b_n = 2^n.$ By considering disjoint subsets $T_1$ and $T_2$ of $S$ we get $f(T_1) f(T_2) = f(T_1 \cup T_2).$ Inductively, we get $f(T_1) \cdots f(T_k) = f(T_1 \cup \dots \cup T_k)$ where $T_1, \dots, T_k$ are pairwise disjoint subsets of $S$. In particular, for any subset $T \subseteq S,$ the number of blue subsets it has is uniquely determined by the number of blue subsets which $\{x\}$ has for each $x \in T.$ Clearly $f(\{x\}) = 1$ if $\{x\}$ is red and otherwise $f(\{x\}) = 2.$ Therefore, if $X$ is the set of all elements of $S$ for which $\{x\}$ is blue, then for all subsets $T \subseteq S,$ we get $$f(T) = 2^{|X \cap T|}.$$This function $f$ satisfies the given equation by the principle of inclusion and exclusion.

Claim: Given the function $f$ above, there is exactly one coloring which corresponds to it.
Proof: Let $T$ be any subset of $S.$ If $T$ has at least one element not in $X,$ say $y,$ then we see that $f(T) - f(T \setminus \{y\}) = 0$, immediately giving that $T$ is red. (If it were blue, then the count would be greater than $0.$) Otherwise, if $T$ is a subset of $X,$ then $f(T) = 2^{|T|}$ is the number of subsets of $T.$ This give that every subset of $T$ is blue, including itself. Hence the function uniquely determines the coloring. This coloring can be checked to work, proving our claim.

Since there are $2^n$ possible choices of $X,$ we conclude that $b_n = 2^n.$

Now we return back to the problem. If $f(T) = 0$ for all subsets $T$ of $S,$ then clearly every subset is colored red, giving one coloring. Thus let $V$ be the smallest-size subset such that $f(V) > 0.$ Then every proper subset of $V$ must be colored red, so $V$ is colored blue, making $f(V) = 1.$ Now let $T$ be any subset of $S.$ If $|V \cap T| < |V|,$ then $f(V) f(T) = f(V \cap T) f(V \cup T) = 0,$ so $f(T) = 0.$ Therefore, the only $T$ such that $f(T) > 0$ are those such that $V \subseteq T.$ In this remainder, we can ignore the elements which are in $V$ and look at the problem with $|S| = n - |V|$ and $f(\emptyset) = 1.$ This gives the count $b_{n-|V|}.$

There are $\binom{n}{k} = \binom{n}{n-k}$ ways to choose $|V|$ to have size $k,$ so we get $$a_n = 1 + \binom{n}{0} b_0 + \binom{n}{1} b_1 + \dots + \binom{n}{n} b_n.$$Plugging in our values of $b_i$ and using the Binomial Theorem gives us our answer $$a_n = 1 + \sum_{k=0}^n \binom{n}{k} 2^k = \boxed{1 + 3^n}.$$
This post has been edited 1 time. Last edited by EpicBird08, Mar 1, 2025, 6:54 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathgloggers
71 posts
#79
Y by
Ok this problem was very difficult but not tricky because once you get the idea of separating the subsets on the basis of their cardinality and fixing them ,then it becomes easy.

CASE:1When $\phi$ is coloured RED..
So first thing is to understand symmetry of permuting $B$,WLOG, take the case {$1$} is coloured blue.
now the subsets $T_i$, for which
$1)$.$|T_i|=2$ ,and $T_i \cap {1} =\phi$ ,so they would automatically be coloured Red, because
$f(\phi)=0$ and $f(T_i)=0$ so both sides become $0$.

$2)$ $|T_i|=2$ ,and $T_i \cap {1} \neq \phi$ ,so we can provide them any colour we want.{$B,R$}

Now once we have did this colouring for the set of subsets with CARDINALITY=$2$,we can claim to have fix all the other subsets with CARDINALITY>$2$.
PROOF:
Take any two sets:{$P_1$}, {$P_2$} whose $\cap$ with {$1$} ={$1$}, from the set of subsets with CARDINALITY=$2$ so its possible to have :
{$B,B$} ,{$B,R$},{$R,B$} and {$R,R$} colouring of those sets,

Now for the colouring : {$B,R$}, {$R,B$}, {$R,R$} we would have $P_1 \cup P_2$ to be coloured RED.
and for the colouring:{$B,B$} we would have $P_1 \cup P_2$ to be coloured BLUE.

As we apply these rules we get that we can get all the subsets by just taking the union of previous subsets hence their colour must be fixed:.ie.
Take any set $Q$ such that $Q \subset S$ so$ f(Q)=f(a_1 \cup a_2 \cup ...\cup a_n)=f(a_1).f(a_2).f(a_3)...f(a_n)=fixed$ where all these $a_1,..a_n$ are "Disjoint subsets" with CARDINALITY =$2$

No. of ways of doing this is $\boxed{\binom{n}1.2^{n-1}}$
Because, of each $n$ permutation of $B$ we have $n-1$ sets whose $\cap$ with {$1$} ={$1$} which can be filled with any colour .

Now applying this pattern again and again by making the previous the set of subsets with same cardinality to be all red ..ie. when you were permuting the $B$ in the set of subsets with CARDINALITY=$1$ you can then make them all RED. sort of closing it, then moving to a "$+1$" cardinality then applying the same pattern .
Each time when you go to bigger cardinality set, the number of sets where you can put any colour: Decrease by $1$.
So, the total ways are:

$\sum_{k=0}^{n-1} \binom{n}k  2^{n-k}=3^n-2^n$
This post has been edited 1 time. Last edited by Mathgloggers, Mar 29, 2025, 8:20 AM
Reason: m
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Maximilian113
563 posts
#80
Y by
We claim that the answer is $\boxed{3^n+1}.$ First, if the empty set is blue, for any two disjoint subsets $A, B \subseteq S$ we have $$f(A)f(B)=f(A \cup B).$$Therefore if $K$ is the set of blue singletons, $$f(X)=\prod_{k \in X} f(\{k\}) = 2^{|X \cap K|}.$$So the coloring of the singletons uniquely determines the other colorings. And this works by the inclusion-exclusion principle as $$f(X)f(Y) = f(X \cap Y) f(X \cup Y) \iff |X \cap K| + |Y \cap K| = |X \cap Y \cap K| + |(X \cup Y) \cap K|.$$Hence there are $2^n$ colorings in this case.

Now, if the empty set is red, for any two distinct singletons $X, Y$ $$f(X)f(Y)=0$$so at least one of them is blue. Hence at most one singleton is red by considering all pairs. If there is a red singleton, WLOG $\{1\},$ for any $K$ that does not contain $1$ $$f(\{1\})f(K)=f(\{\emptyset\})f(K \cup \{1\}) \implies f(K)=0.$$So inductively we can see that all sets not containing $1$ are blue. Now it suffices to color all the sets containing $1$s, but we can ignore the $1$ as it acts like the empty set, so by above reasoning there are $2^{n-1}$ colorings. This clearly works as for a set $X$ containing $1$ and a set $Y$ not containing it $$f(X)f(Y) = f(X \cap Y)f(X \cup Y) \iff 0 = 0$$as $X \cup Y$ does not contain $1.$ So there are $n2^{n-1}$ ways in this case.

But, if all the singletons are blue we can apply the above reasoning to the doubletons to get $2^{n-2} \binom{n}{2}$ if there is a red doubleton. Continuing, we see that the answer is $$2^n+\sum_{k=1}^n \binom{n}{k} 2^{n-k}+1 = \sum_{k=0}^n \binom{n}{k} 2^{n-k}+1 = (2+1)^n+1=3^n+1.$$QED
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
de-Kirschbaum
198 posts
#81
Y by
We claim that the answer is $3^n+1$.

The proof is probably easier to follow if you draw a tree for the coloring of subsets of each size.

Let $S=\{1,2,\ldots,n\}$. We will first consider the case where $\varnothing$ is red. Then at most one singleton could be colored red, since if there exists at least two blue singletons then we have that $0=f(\{i\})f(\{j\})=1$. So there are two cases, either the singletons are colored $(r,r,\ldots,r)$ or WLOG $(b,r,r,\ldots,r)$. Note that if they are all colored red, then if two subsets of size two are blue we have that $0=f(\{i,j\})f(\{l,k\})=1$, so at most one subset of size two can be colored blue. Note that this is actually always going to be the case when we have $(r,r,\ldots,r)$. So now we will deal with the case where the singletons are colored $(b,r,\ldots,r)$.

We will prove a more general claim. Let subsets of size $k-1$ be the first group of subsets where a blue (and only one blue as we established) occurs. WLOG let the set $B=\{1,2,\ldots, k-1\}$ be the set colored blue. Then note that there are two types of sets of size $k$. There are $n-k+1$ sets containing this blue set $\{1,2,\ldots, k-1, k\},\ldots, \{1,2,\ldots,k-1,n\}$ and there are $\binom{n}{k}-n+k-1$ sets not containing this blue set $\{2, 3,\ldots,k-1,k\},\ldots,\{n-k+1,n-k+2,\ldots,n\}$. We claim that each coloring of $\{1,2,\ldots,k-1\},\ldots, \{1,2,\ldots, k-1,n\}$ gives us a unique coloring of all subsets of $S$. If we assume that it does give us a valid coloring then uniqueness is not difficult to see, clearly every such coloring would differ in their coloring of $\{1,2,\ldots, k-1\}, \ldots, \{1,2,\ldots, k-1,n\}$. It is not difficult to conclude that if a set $T$ of size $\geq k$ does not contain $B$ then they must be red as their intersection with $B$ will result in a set of size $<k-1$ that isn't $B$, and since $B$ is the only blue set up to that cardinality the intersection must contain no blue sets. So $f(T)f(B)=f(T)=0$. Now, if $B \subset T$, then let $|T|=k-1+m$ and write $T$ as $\{1,2,\ldots, k-1,a_1,\ldots, a_m\}$. Note that by the condition we have
\begin{align*}
    f(\{1,2,\ldots, k-1,a_1,\ldots, a_m\})&=f(\{1,2,\ldots, k-1,a_1,\ldots, a_{m-1}\})f(\{1,2,\ldots, k-1, a_m\})&\\&=\cdots = f(\{1,2,\ldots, k-1,a_1\})\cdots f(\{1,2,\ldots, k-1, a_m\})
\end{align*}Note that for any $i$, if $\{1,2,\ldots,k-1,a_i\}$ is blue then $f(\{1,2,\ldots,k-1,a_i\})=2$ else $f(\{1,2,\ldots,k-1,a_i\})=1$. So the above expression is $2^t$ where $t$ is the number of $\{1,2,\ldots,k-1,a_i\}$ that is blue. Note that any two blue sets $\{1,2,\ldots,k-1,a_i\}, \{1,2,\ldots,k-1, a_j\}$ forces $\{1,2,\ldots, k-1,a_i,a_j\}$ to be blue because $$f(\{1,2,\ldots,k-1,a_i\})f(\{1,2,\ldots,k-1,a_j\})=4=f(\{1,2,\ldots,k-1,a_i,a_j\})$$
So we can see that among the $t$ blue sets of size $k$ and $1$ blue set of size $k-1$, they generate a total of $1+t+\binom{t}{2}+\binom{t}{3}+\cdots+\binom{t}{t}=2^t$ blue subsets in $T$. Thus if $t<m$, $T$ is red else if $t=m$ then $T$ is blue. There is clearly only one way of coloring generated by this method for each coloring of the underlying sets, but we need also check that it will always be valid.


Say we color all subsets this way, does there exist $T_1, T_2$ such that $f(T_1)f(T_2) \neq f(T_1 \cup T_2)f(T_1 \cap T_2)$? Note that if $B \not \subset T_1$ or $T_2$ then we just have $0=0$ and this expression must be true, so suppose $B \subset T_1,T_2$. We can see that expanding both sides out since $|T_1 \cup T_2|=|T_1|+|T_2|-|T_1 \cap T_2|$ the expression holds.

So for the case of red at the $k$th layer we end up with $\binom{n}{k}2^{n-k}$ many colorings if we end up with exactly one blue subset of size $k$, and we keep breaking into cases if we end up with non blue subsets of size $k$. Thus we sum everything up and we get $1+\sum_{i=1}^n \binom{n}{i}2^{n-i}$ colorings total.

If $\varnothing$ is blue then we actually already dealt with this case, now just with $k=1$ and we only get one choice for empty set so we get a total of $2^n$ colorings. Thus the total number of valid colorings is $1+\sum_{i=1}^n \binom{n}{i}2^{n-i}+2^n=1+3^n$.
Z K Y
N Quick Reply
G
H
=
a