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
Set with a property
socrates   4
N 7 minutes ago by sadat465
Let $n\in \Bbb{N}, n \geq 4.$ Determine all sets $ A = \{a_1, a_2, . . . , a_n\} \subset \Bbb{N}$ containing $2015$ and having the property that $ |a_i - a_j|$ is prime, for all distinct $i, j\in \{1, 2, . . . , n\}.$
4 replies
socrates
May 29, 2015
sadat465
7 minutes ago
Number Theory Chain!
JetFire008   21
N 27 minutes ago by Primeniyazidayi
I will post a question and someone has to answer it. Then they have to post a question and someone else will answer it and so on. We can only post questions related to Number Theory and each problem should be more difficult than the previous. Let's start!

Question 1
21 replies
+1 w
JetFire008
Yesterday at 7:14 AM
Primeniyazidayi
27 minutes ago
thanks u!
Ruji2018252   0
37 minutes ago
Let $a,b,c>2$ and $\dfrac{1}{a}+\dfrac{1}{b}+\dfrac{1}{c}=a+b+c-8$. Prove:
\[ab+bc+ac\leqslant 27\]
0 replies
1 viewing
Ruji2018252
37 minutes ago
0 replies
inequality
pennypc123456789   3
N 38 minutes ago by ehuseyinyigit
Let $a_{1} , a_{2} , a_{3} , a_{4} \ge 0  $ . Prove that
$$\dfrac{a_{1} + a_{2} + a_{3} + a_{4} }{4} \ge \sqrt{\dfrac{a_{1}a_{2}+a_{1}a_{3} +a_{1}a_{4}+ a_{2}a_{3} +a_{2} a_{4}+a_{3} , a_{4} }{6}}$$
3 replies
pennypc123456789
5 hours ago
ehuseyinyigit
38 minutes ago
No more topics!
USAMO 1981 #2
Mrdavid445   9
N Mar 29, 2025 by Marcus_Zhang
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.
9 replies
Mrdavid445
Jul 26, 2011
Marcus_Zhang
Mar 29, 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
4177 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
793 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
2513 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
1252 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
975 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
N Quick Reply
G
H
=
a