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

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
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Arbitrary point on BC and its relation with orthocenter
falantrng   16
N 31 minutes ago by MathLuis
Source: Balkan MO 2025 P2
In an acute-angled triangle \(ABC\), \(H\) be the orthocenter of it and \(D\) be any point on the side \(BC\). The points \(E, F\) are on the segments \(AB, AC\), respectively, such that the points \(A, B, D, F\) and \(A, C, D, E\) are cyclic. The segments \(BF\) and \(CE\) intersect at \(P.\) \(L\) is a point on \(HA\) such that \(LC\) is tangent to the circumcircle of triangle \(PBC\) at \(C.\) \(BH\) and \(CP\) intersect at \(X\). Prove that the points \(D, X, \) and \(L\) lie on the same line.

Proposed by Theoklitos Parayiou, Cyprus
16 replies
falantrng
Yesterday at 11:47 AM
MathLuis
31 minutes ago
all functions satisfying f(x+yf(x))+y = xy + f(x+y)
falantrng   27
N 38 minutes ago by MathLuis
Source: Balkan MO 2025 P3
Find all functions $f\colon \mathbb{R} \rightarrow \mathbb{R}$ such that for all $x,y \in \mathbb{R}$,
\[f(x+yf(x))+y = xy + f(x+y).\]
Proposed by Giannis Galamatis, Greece
27 replies
falantrng
Yesterday at 11:52 AM
MathLuis
38 minutes ago
Projections on collections of lines
Assassino9931   1
N an hour ago by awesomeming327.
Source: Balkan MO Shortlist 2024 C6
Let $\mathcal{D}$ be the set of all lines in the plane and $A$ be a set of $17$ points in the plane. For a line $d\in \mathcal{D}$ let $n_d(A)$ be the number of distinct points among the orthogonal projections of the points from $A$ on $d$. Find the maximum possible number of distinct values of $n_d(A)$ (this quantity is computed for any line $d$) as $A$ varies.
1 reply
Assassino9931
3 hours ago
awesomeming327.
an hour ago
weird Condition
B1t   4
N an hour ago by MathLuis
Source: Mongolian TST 2025 P4
In triangle \(ABC\), where \(AC < AB\), the internal angle bisectors of angles \(\angle A\), \(\angle B\), and \(\angle C\) meet the sides \(BC\), \(AC\), and \(AB\) at points \(D\), \(E\), and \(F\), respectively. Let \( I \) be the incenter of triangle \( AEF \), and let \( G \) be the foot of the perpendicular from \( I \) to line \( BC \). Prove that if the quadrilateral \( DGEF \) is cyclic, then the center of its circumcircle lies on segment \( AD \).
4 replies
B1t
Yesterday at 1:37 PM
MathLuis
an hour ago
Geometric inequality with Fermat point
Assassino9931   1
N 2 hours ago by Circumcircle
Source: Balkan MO Shortlist 2024 G2
Let $ABC$ be an acute triangle and let $P$ be an interior point for it such that $\angle APB = \angle BPC = \angle CPA$. Prove that
$$ \frac{PA^2 + PB^2 + PC^2}{2S} + \frac{4}{\sqrt{3}} \leq \frac{1}{\sin \alpha} + \frac{1}{\sin \beta} + \frac{1}{\sin \gamma}. $$When does equality hold?
1 reply
Assassino9931
3 hours ago
Circumcircle
2 hours ago
Involved conditional geo
Assassino9931   1
N 2 hours ago by hukilau17
Source: Balkan MO 2024 Shortlist G4
Let $ABC$ be an acute-angled triangle with $AB < AC$, orthocenter $H$, circumcircle $\Gamma$ and circumcentre $O$. Let $M$ be the midpoint of $BC$ and let $D$ be a point such that $ADOH$ is a parallellogram. Suppose that there exists a point $X$ on $\Gamma$ and on the opposite side of $DH$ to $A$ such that $\angle DXH + \angle DHA = 90^{\circ}$. Let $Y$ be the midpoint of $OX$. Prove that if $MY = OA$, then $OA = 2OH$.
1 reply
Assassino9931
2 hours ago
hukilau17
2 hours ago
Inversion exercise
Assassino9931   2
N 2 hours ago by awesomeming327.
Source: Balkan MO Shortlist 2024 G5
Let $ABC$ be an acute scalene triangle $ABC$, $D$ be the orthogonal projection of $A$ on $BC$, $M$ and $N$ are the midpoints of $AB$ and $AC$ respectively. Let $P$ and $Q$ are points on the minor arcs $\widehat{AB}$ and $\widehat{AC}$ of the circumcircle of triangle $ABC$ respectively such that $PQ \parallel BC$. Show that the circumcircles of triangles $DPQ$ and $DMN$ are tangent if and only if $M$ lies on $PQ$.
2 replies
Assassino9931
2 hours ago
awesomeming327.
2 hours ago
One more problem defined only with lines
Assassino9931   0
2 hours ago
Source: Balkan MO 2024 Shortlist G6
Let $ABC$ be a triangle and the points $K$ and $L$ on $AB$, $M$ and $N$ on $BC$, and $P$ and $Q$ on $AC$ be such that $AK = LB < \frac{1}{2}AB, BM = NC < \frac{1}{2}BC$ and $CP = QA < \frac{1}{2}AC$. The intersections of $KN$ with $MQ$ and $LP$ are $R$ and $T$ respectively, and the intersections of $NP$ with $LM$ and $KQ$ are $D$ and $E$, respectively. Prove that the lines $DR, BE$ and $CT$ are concurrent.
0 replies
Assassino9931
2 hours ago
0 replies
Fixed point in a small configuration
Assassino9931   0
2 hours ago
Source: Balkan MO Shortlist 2024 G3
Let $A, B, C, D$ be fixed points on this order on a line. Let $\omega$ be a variable circle through $C$ and $D$ and suppose it meets the perpendicular bisector of $CD$ at the points $X$ and $Y$. Let $Z$ and $T$ be the other points of intersection of $AX$ and $BY$ with $\omega$. Prove that $ZT$ passes through a fixed point independent of $\omega$.
0 replies
Assassino9931
2 hours ago
0 replies
Sum of divisors
DinDean   1
N 3 hours ago by Tintarn
Does there exist $M>0$, such that $\forall m>M$, there exists an integer $n$ satisfying $\sigma(n)=m$?
$\sigma(n)=$ the sum of all positive divisors of $n$.
1 reply
DinDean
Apr 18, 2025
Tintarn
3 hours ago
Interesting polygon game
Assassino9931   0
3 hours ago
Source: Balkan MO Shortlist 2024 C5
Let $n\geq 3$ be an integer. Alice and Bob play the following game on the vertices of a regular $n$-gon. Alice places her token on a vertex of the n-gon. Afterwards Bob places his token on another vertex of the n-gon. Then, with Alice playing first, they move their tokens alternately as follows for $2n$ rounds: In Alice’s turn on the $k$-th round, she moves her token $k$ positions clockwise or anticlockwise. In Bob’s turn on the $k$-th round, he moves his token $1$ position clockwise or anticlockwise. If at the end of any person’s turn the two tokens are on the same vertex, then Alice wins the game, otherwise Bob wins. Decide for each value of $n$ which player has a winning strategy.
0 replies
Assassino9931
3 hours ago
0 replies
An equation from the past with different coefficients
Assassino9931   13
N 3 hours ago by grupyorum
Source: Balkan MO Shortlist 2024 N2
Let $n$ be an integer. Prove that $n^4 - 12n^2 + 144$ is not a perfect cube of an integer.
13 replies
Assassino9931
Yesterday at 1:00 PM
grupyorum
3 hours ago
Euler Totient optimality - why combinatorics?
Assassino9931   0
3 hours ago
Source: Balkan MO Shortlist 2024 C4
Let $k$ be a positive integer. Prove that there exists a positive integer $n$ and distinct primes $p_1,p_2,\ldots,p_k$ such that if $A(n)$ denotes the number of positive integers less than or equal to $n$ and not divisible by any of $p_1,p_2,\ldots,p_k$, then
$$ \left|n\left(1 - \frac{1}{p_1}\right)\left(1 - \frac{1}{p_2}\right)\cdots \left(1-\frac{1}{p_k}\right) - A(n)\right| > 2^{k-3} $$
0 replies
Assassino9931
3 hours ago
0 replies
Abstraction function in combinatorics
Assassino9931   0
3 hours ago
Source: Balkan MO Shortlist 2024 C2
Let $n\geq 2$ be an integer and denote $S = \{1,2,\ldots,n^2\}$. For a function $f: S \to S$ we denote Im $f = \{b\in S: \exists a\in S, f(a) = b\}$, Fix $f = \{x \in S: f(x) = x\}$ and $f^{-1}(k) = \{a\in S: f(a) = k\}$. Find all possible values of $|$Im $f|$ + $|$Fix $f|$ + $\max_{k\in S} |f^{-1}(k)|$.
0 replies
Assassino9931
3 hours ago
0 replies
USAMO 1981 #2
Mrdavid445   10
N Apr 25, 2025 by Ilikeminecraft
Every pair of communities in a county are linked directly by one mode of transportation; bus, train, or airplane. All three methods of transportation are used in the county with no community being serviced by all three modes and no three communities being linked pairwise by the same mode. Determine the largest number of communities in this county.
10 replies
Mrdavid445
Jul 26, 2011
Ilikeminecraft
Apr 25, 2025
USAMO 1981 #2
G H J
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mrdavid445
5123 posts
#1 • 4 Y
Y by Adventure10, Mango247, GeoKing, and 1 other user
Every pair of communities in a county are linked directly by one mode of transportation; bus, train, or airplane. All three methods of transportation are used in the county with no community being serviced by all three modes and no three communities being linked pairwise by the same mode. Determine the largest number of communities in this county.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Icosahedroid
57 posts
#2 • 4 Y
Y by Adventure10, Mango247, GeoKing, and 1 other user
Click to reveal hidden text
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4183 posts
#3
Y by
This is just saying the maximum number of vertices in a 3-colored graph that uses all colors, has no monochromatic triangle, and no vertex uses all three colors. Call the colors red, green, and blue.

We claim the answer is 4. Make a red 4-cycle and the diagonals one blue and one green for the construction.

The main idea of the problem is the following claim:

Claim: A vertex cannot have 3 or more edges of the same color going out of it.

Suppose otherwise. Then, there exist four vertices $A,B,C,D$ such that the edges $AB,AC,AD$ are all the same color, say red. Now, the triangle $\triangle BCD$ must only have green and blue, since any red edge would cause a monochromatic triangle with vertex A. However, since $\triangle BCD$ also cannot be a monochromatic triangle, there must be at least one green edge and one blue edge. However, the common vertex of these two edges will have a green edge and a blue edge, but it will also have a red edge to $A$, contradiction, hence shown.

This claim immediately rules out $n\geq6$ by pidgeonhole. For $n=5$, this claim also tells us that each vertex must have 2 edges of some color, 2 of another, and none of the last color. For now, consider the subgraph formed on the same vertex set but with only the red edges. Each vertex must have degree 2 or 0, so it must be some union of cycles. Since monochromatic triangles are not allowed, the smallest possible is a 4-cycle, which has 4 edges. Hence, there are at least 4 red edges. Similarly, since all colors are used at least once, there are also at least 4 blue edges and at least 4 green edges, contradiction since there are only 10 edges total, hence done.
This post has been edited 1 time. Last edited by john0512, Aug 29, 2023, 4:38 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ritwin
155 posts
#4 • 2 Y
Y by LLL2019, GeoKing
Solution
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
#5 • 1 Y
Y by GeoKing
Consider a graph $K_n$ with edges colored $A$, $B$, or $C$. Define $A_i$, $B_i$, $C_i$ as the number of color $A$, $B$, $C$ edges incident on vertex $i$. Note that $A_i+B_i+C_i=n-1$ and $\min(A_i,B_i,C_i) = 0$. With the conditions in the problem, we can undercount the number of triangles in the graph as
\begin{align*}
\binom n3 &\ge \sum \binom{A_i}{2} + \binom{B_i}{2} + \binom{C_i}{2} \\
&\ge \sum 2 \cdot \binom{(n-1)/2}{2} \\ 
&= 2n \cdot \binom{(n-1)/2}{2} \\ 
&\implies n \leq 5.
\end{align*}
However the equality case $n=5$ holds if and only if each vertex has two edges each of two colors. This forces us to have at least 4 edges of each color, or 12 total, contradiction. We conclude our answer is $\boxed{4}$, which is easy to construct. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2532 posts
#6
Y by
The answer is $\boxed{n=4}$, which is easily constructible. The corresponding graph is $K_n$ with each edge colored one of three colors, say red, blue, and green. The conditions then become that no vertex can have three distinct colors emanating from it, and there are no monochromatic triangles in the graph.

If $n \ge 6$, there are $5$ edges for each vertex. This requires at least three of them to be the same color. WLOG let that color be red. Assume that vertex is $A$, and the edges are $AB$, $AC$, and $AD$. In triangle $BCD$, none of them can be red, so they must be only blue or green. By Pigeonhole, there is a point that has a blue and a green edge emanating from it, hence this is a contradiction, since it is also connected to red.

For $n=5$, each vertex has $2$ edges of a certain color. Hence, we can consider the subgraph formed by the red edges. It is clear that the minimum degree of a cycle is $4$, which means there are at least $4$ edges of each color, a contradiction as there are only $10$ edges in the graph.

Thus, $n \le 4$, which proves the bound.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
BestAOPS
707 posts
#7
Y by
The answer to $n=4$.
A construction for $n=4$ is to make a square with its sides all one mode of transportation, and the diagonals each a different mode of transportation from the sides and other diagonal.

It remains to show $n \geq 5$ is impossible, and it suffices to show $n=5$ is impossible (since we are working with complete graphs).
This problem admits certain not-so-elegant brute force solutions.
The key to a more elegant solution is to partition the communities into three groups.

Let group $X$ contain communities that allow only bus and train.
Let group $Y$ contain communities that allow only train and airplane.
Let group $Z$ contain communities that allow only bus and airplane.

If a town only allows one mode of transportation, it can be put in any of the two groups that allow that mode.
In this partition, at least two of the groups must be non-empty, based on the condition that all three modes of transportation are used at least once.

Suppose exactly two of the groups are non-empty, and WLOG let them be groups $X$ and $Y$.
We claim that neither group can have more than two communities.
For contradiction, assume WLOG that group $X$ has any three communities $x_1, x_2, x_3$, and that $y$ is any community in group $Y$.
Then, the link between $x_i$ and $y$ for each $i$ must be by train.
This means that in order to not form triangles of the same mode, the link between $x_i$ and $x_j$ for $i \neq j$ must be by bus.
However, this means that we have created a triangle anyway.
Thus, when exactly two of the groups are non-empty, the maximum number of communities is $2 \cdot 2 = 4$.

Next, suppose that all three groups are non-empty.
We claim that each group can only have one community.
Suppose for contradiction that a group, WLOG $X$, has any two communities $x_1$ and $x_2$, and let $y$ and $z$ be communities from their respective groups.
Then, $x_1y$ and $x_2y$ are connected by train, $yz$ is connected by airplane, and $x_1z$ and $x_2z$ are connected by bus.
Now, no matter what, the connection of $x_1x_2$ will produce a contradiction.
Thus, in this case, we cannot have more than $3$ communities, concluding the proof.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ezpotd
1261 posts
#8
Y by
rephrase to non stupid language. answer is 4, construct a square, top side connected by blue, bottom by green, rest by red.

now label each vertex with the colors it's connected too. we pretend all vertices have 2 colors, if they don't then the graph disconnects or the arguments in the next section still hold true. take two RB vertices. if these exists a BG vertex, then it forms a blue bi angle , if there is an RG vertex there is one for red, so edge between the two RB vertices cannot be either, impossible

now this implies for n>3 we cannot have all three pairs of labels (RB, RG, BG), and we also must at least have two since all modes of transport appear, so consider us having x RB and y RG, clearly everything from the RB to RG is red, so nothing between RBs and RGs can be red, forcing x,y <=2 as desired
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Markas
105 posts
#9
Y by
Let n be the number of communities. Let a, b and c be the colors of the edges. If $n \geq 6$, we have 3 edges from the same color coming from a vertex. Now WLOG, let them be colored in color b. Now one of the edges connecting one of the b-b pairs should be in color a for example. Now from that vertex we can only have edges with a and b. Since this vertex is in an edge connecting b-b again, this edge should be colored in a, but now there is an edge coming from a vertex already having edges from color a and b, that should be in color a or b and it is in both triangle with a-a edges and b-b edges $\Rightarrow$ we get a monochromatic triangle here - contradiction. Now for n = 5, each vertex has 2 edges of a certain color $\Rightarrow$ there are at least 4 edges of each color - contradiction since there are only 10 edges in the graph $\Rightarrow$ $n \leq 4$. It is only left to show that n = 4 works. The example is the $K_4$ where the graph looks like a square and the two bases and two diagonals are in color a, one of the other edges is in b and the last on in c. This works $\Rightarrow$ n = 4 and we are ready.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Marcus_Zhang
980 posts
#10
Y by
Solution
This post has been edited 1 time. Last edited by Marcus_Zhang, Mar 29, 2025, 9:22 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Ilikeminecraft
605 posts
#11
Y by
Color the edges green, red, or blue depending on which mode of transportation is used. Thus, we are given the graph is triangle free, and there are at most two colors coming out of one vertex. Then, we split our vertices into which pair of colors is used, there are now 3 cases.
\begin{enumerate}
\item If there is only 1 group, this is impossible since we assume that each color is used.
\item If there are two groups, then by PHP, we see that each group contains at most 2.
\item If all 3 groups exist, each group has at most 1.
\end{enumerate}
Thus, the max is 4, where there are two groups. The graph is easily constructed.
Z K Y
N Quick Reply
G
H
=
a