We have your learning goals covered with Spring and Summer courses available. Enroll today!

G
Topic
First Poster
Last Poster
k a March Highlights and 2025 AoPS Online Class Information
jlacosta   0
Mar 2, 2025
March is the month for State MATHCOUNTS competitions! Kudos to everyone who participated in their local chapter competitions and best of luck to all going to State! Join us on March 11th for a Math Jam devoted to our favorite Chapter competition problems! Are you interested in training for MATHCOUNTS? Be sure to check out our AMC 8/MATHCOUNTS Basics and Advanced courses.

Are you ready to level up with Olympiad training? Registration is open with early bird pricing available for our WOOT programs: MathWOOT (Levels 1 and 2), CodeWOOT, PhysicsWOOT, and ChemWOOT. What is WOOT? WOOT stands for Worldwide Online Olympiad Training and is a 7-month high school math Olympiad preparation and testing program that brings together many of the best students from around the world to learn Olympiad problem solving skills. Classes begin in September!

Do you have plans this summer? There are so many options to fit your schedule and goals whether attending a summer camp or taking online classes, it can be a great break from the routine of the school year. Check out our summer courses at AoPS Online, or if you want a math or language arts class that doesn’t have homework, but is an enriching summer experience, our AoPS Virtual Campus summer camps may be just the ticket! We are expanding our locations for our AoPS Academies across the country with 15 locations so far and new campuses opening in Saratoga CA, Johns Creek GA, and the Upper West Side NY. Check out this page for summer camp information.

Be sure to mark your calendars for the following events:
[list][*]March 5th (Wednesday), 4:30pm PT/7:30pm ET, HCSSiM Math Jam 2025. Amber Verser, Assistant Director of the Hampshire College Summer Studies in Mathematics, will host an information session about HCSSiM, a summer program for high school students.
[*]March 6th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar on Math Competitions from elementary through high school. Join us for an enlightening session that demystifies the world of math competitions and helps you make informed decisions about your contest journey.
[*]March 11th (Tuesday), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS Chapter Discussion MATH JAM. AoPS instructors will discuss some of their favorite problems from the MATHCOUNTS Chapter Competition. All are welcome!
[*]March 13th (Thursday), 4:00pm PT/7:00pm ET, Free Webinar about Summer Camps at the Virtual Campus. Transform your summer into an unforgettable learning adventure! From elementary through high school, we offer dynamic summer camps featuring topics in mathematics, language arts, and competition preparation - all designed to fit your schedule and ignite your passion for learning.[/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, Mar 2 - Jun 22
Friday, Mar 28 - Jul 18
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
Tuesday, Mar 25 - Jul 8
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
Sunday, Mar 23 - Jul 20
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
Sunday, Mar 16 - Jun 8
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
Monday, Mar 17 - Jun 9
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
Sunday, Mar 2 - Jun 22
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
Tuesday, Mar 4 - Aug 12
Sunday, Mar 23 - Sep 21
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
Sunday, Mar 16 - Sep 14
Tuesday, Mar 25 - Sep 2
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
Sunday, Mar 23 - Aug 3
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
Sunday, Mar 16 - Aug 24
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
Wednesday, Mar 5 - May 21
Tuesday, Jun 10 - Aug 26

Calculus
Sunday, Mar 30 - Oct 5
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
Sunday, Mar 23 - Jun 15
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
Tuesday, Mar 4 - May 20
Monday, Mar 31 - Jun 23
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
Monday, Mar 24 - Jun 16
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
Sunday, Mar 30 - Jun 22
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Tuesday, Mar 25 - Sep 2
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
Mar 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
Cool Number Theory
Fermat_Fanatic108   1
N 19 minutes ago by Fermat_Fanatic108
For an integer with 5 digits $n=abcde$ (where $a, b, c, d, e$ are the digits and $a\neq 0$) we define the \textit{permutation sum} as the value $$bcdea+cdeab+deabc+eabcd$$For example the permutation sum of 20253 is $$02532+25320+53202+32025=113079$$Let $m$ and $n$ be two fivedigit integers with the same permutation sum.
Prove that $m=n$.
1 reply
Fermat_Fanatic108
20 minutes ago
Fermat_Fanatic108
19 minutes ago
ratio chasing inside a triangle, segment trisecting
parmenides51   10
N 22 minutes ago by sangsidhya
Source: CRMO 2012 Region 2 p5
Let $ABC$ be a triangle. Let $D, E$ be a points on the segment $BC$ such that $BD =DE = EC$. Let $F$ be the mid-point of $AC$. Let $BF$ intersect $AD$ in $P$ and $AE$ in $Q$ respectively. Determine $BP:PQ$.
10 replies
parmenides51
Sep 30, 2018
sangsidhya
22 minutes ago
Geo: incircle, escircle, isotomic conjugate
XAN4   0
22 minutes ago
Source: Own
For $\triangle{ABC}$, Its incircle $\odot I$ and $A-$escircle $\odot I_A$ are tangent to $BC$ at $D$ and $E$ respectively. $AI$ intersects line $BC$ at $J$. Line $AD$ intersects $\odot I$ at $F$, and line $AE$ intersects $\odot I_A$ at $G$. Line $FG$ intersects $BC$ at $H$. Prove that $BJ=CH$.
0 replies
XAN4
22 minutes ago
0 replies
f(x)+f(x+y) \leq f(xy)+f(y)
augustin_p   7
N 25 minutes ago by MuradSafarli
Source: Estonia TST 2022
Find all functions $f:\mathbb{R}\rightarrow\mathbb{R}$ that satisfy the following condition for any real numbers $x{}$ and $y$ $$f(x)+f(x+y) \leq f(xy)+f(y).$$
7 replies
augustin_p
Jul 12, 2023
MuradSafarli
25 minutes ago
Integer equation in 3 variables
Kimchiks926   2
N 33 minutes ago by MuradSafarli
Source: Latvian TST for Baltic Way 2019 Problem 15
Determine all tuples of integers $(a,b,c)$ such that:
$$(a-b)^3(a+b)^2 = c^2 + 2(a-b) + 1$$
2 replies
Kimchiks926
May 29, 2020
MuradSafarli
33 minutes ago
Interesting inequality
sqing   2
N 36 minutes ago by SunnyEvan
Source: Own
Let $ a,b,c\geq 2  . $ Prove that
$$(a^2-1)(b-1)(c^2-1) -\frac{9}{4}abc\geq -9$$$$(a^2-1)(b-1)(c^2-1) -\frac{11}{5}abc\geq -\frac{43}{5}$$$$(a^2-1)(b-1)(c^2-1) -2abc\geq -7$$$$(a-1)(b^2-1)(c-1) -\frac{3}{4}abc\geq -3$$$$(a-1)(b^2-1)(c-1) -\frac{3}{5}abc\geq -\frac{9}{5}$$$$(a-1)(b^2-1)(c-1) -\frac{1}{2}abc\geq -1$$
2 replies
sqing
an hour ago
SunnyEvan
36 minutes ago
Interesting inequality
sqing   1
N 39 minutes ago by sqing
Source: Own
Let $ a,b,c\geq 2  . $ Prove that
$$(a^2-1)(b-\frac{3}{2})(c^2-1) - \frac{9}{4}abc\geq -15$$$$(a^2-1)(b-\frac{3}{2})(c^2-1) - 2abc\geq -\frac{73}{6}$$$$(a^2-1)(b-\frac{3}{2})(c^2-1) - abc\geq -\frac{7}{2}$$$$(a^2-2)(b-\frac{3}{2})(c^2-2) - abc\geq -6$$
1 reply
sqing
an hour ago
sqing
39 minutes ago
Hard problem involving circumcenter and concurrent lines
GeoMetrix   6
N 40 minutes ago by bin_sherlo
Source: AQGO 2020 Problem 3
Let $\triangle{ABC}$ be a triangle with circumcenter $O$. Let $M,N$ be the midpoints of $\overline{AB}$ and $\overline{AC}$ respectively and let $T$ be the projection of $O$ on $\overline{MN}$. Let $D$ be the projection of $A$ on $\overline{BC}$. Let $\overline{TD}$ intersect $\odot(BOC)$ at points $U$ and $V$. Let $\odot(AUV)$ intersct $\overline{MN}$ at points $X,Y$. Let $\overline{AY}$ intersect $\odot(AMN)$ at $R$ and $\overline{AX}$ intersect $\odot(AMN)$ at $S$. Then show that $\overline{AO},\overline{RS},\overline{MN}$ are concurrent.

Proposed by GeoMetrix
6 replies
GeoMetrix
Jun 20, 2020
bin_sherlo
40 minutes ago
Oi! These lines concur
Rg230403   17
N an hour ago by L13832
Source: LMAO 2021 P5, LMAOSL G3(simplified)
Let $I, O$ and $\Gamma$ respectively be the incentre, circumcentre and circumcircle of triangle $ABC$. Points $A_1, A_2$ are chosen on $\Gamma$, such that $AA_1 = AI = AA_2$, and point $A'$ is the foot of the altitude from $I$ to $A_1A_2$. If $B', C'$ are similarly defined, prove that lines $AA', BB'$ and $CC'$ concurr on $OI$.
Original Version from SL
Proposed by Mahavir Gandhi
17 replies
Rg230403
May 10, 2021
L13832
an hour ago
Find the period
Anto0110   1
N an hour ago by Anto0110
Let $a_1, a_2, ..., a_k, ...$ be a sequence that consists of an initial block of $p$ positive distinct integers that then repeat periodically. This means that $\{a_1, a_2, \dots, a_p\}$ are $p$ distinct positive integers and $a_{n+p}=a_n$ for every positive integer $n$. The terms of the sequence are not known and the goal is to find the period $p$. To do this, at each move it possible to reveal the value of a term of the sequence at your choice.
If $p$ is one of the first $k$ prime numbers, find for which values of $k$ there exist a strategy that allows to find $p$ revealing at most $8$ terms of the sequence.
1 reply
Anto0110
Yesterday at 7:37 PM
Anto0110
an hour ago
inequality
senku23   2
N an hour ago by User21837561
Let x,y,z in R+ prove that 8(x^3+y^3+z^3)2≥9(x^2+yz)(y^2+zx)(z^2+xy).
2 replies
senku23
3 hours ago
User21837561
an hour ago
Differentiable functional
bakerbakura   2
N an hour ago by Gryphos
Find all differentiable functions $ f;\mathbb{R}\to\mathbb{R}$ such that, for all real numbers $ a,b,t$ with $ 0<t<1$, $ t^2f(a)+(1-t^2)f(b)\geq f(ta+(1-t)b)$
2 replies
bakerbakura
Jan 11, 2010
Gryphos
an hour ago
function equation
cipher703516247   2
N an hour ago by luutrongphuc

Find all the functions $f: \mathbb R^{+} \to \mathbb R^{+}$such that:
$$f(xy^n +f(y)^{2n}) )=f(x)f(y)^n +(yf(y))^n $$
2 replies
cipher703516247
Feb 14, 2025
luutrongphuc
an hour ago
gcd (a^n+b,b^n+a) is constant
EthanWYX2009   78
N 2 hours ago by SimplisticFormulas
Source: 2024 IMO P2
Determine all pairs $(a,b)$ of positive integers for which there exist positive integers $g$ and $N$ such that
$$\gcd (a^n+b,b^n+a)=g$$holds for all integers $n\geqslant N.$ (Note that $\gcd(x, y)$ denotes the greatest common divisor of integers $x$ and $y.$)

Proposed by Valentio Iverson, Indonesia
78 replies
EthanWYX2009
Jul 16, 2024
SimplisticFormulas
2 hours ago
what is the smallest number of commands
sqing   3
N Aug 24, 2021 by AwesomeYRY
Source: 7th European Mathematical Cup , Junior Category, Q4
Let $n$ be a positive integer. Ana and Banana are playing the following game:
First, Ana arranges $2n$ cups in a row on a table, each facing upside-down. She then places a ball under a cup
and makes a hole in the table under some other cup. Banana then gives a finite sequence of commands to Ana,
where each command consists of swapping two adjacent cups in the row.
Her goal is to achieve that the ball has fallen into the hole during the game. Assuming Banana has no information
about the position of the hole and the position of the ball at any point, what is the smallest number of commands
she has to give in order to achieve her goal?
3 replies
sqing
Dec 25, 2018
AwesomeYRY
Aug 24, 2021
what is the smallest number of commands
G H J
G H BBookmark kLocked kLocked NReply
Source: 7th European Mathematical Cup , Junior Category, Q4
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
sqing
41100 posts
#1 • 2 Y
Y by AwesomeYRY, Adventure10
Let $n$ be a positive integer. Ana and Banana are playing the following game:
First, Ana arranges $2n$ cups in a row on a table, each facing upside-down. She then places a ball under a cup
and makes a hole in the table under some other cup. Banana then gives a finite sequence of commands to Ana,
where each command consists of swapping two adjacent cups in the row.
Her goal is to achieve that the ball has fallen into the hole during the game. Assuming Banana has no information
about the position of the hole and the position of the ball at any point, what is the smallest number of commands
she has to give in order to achieve her goal?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cooljoseph
1446 posts
#2 • 1 Y
Y by Adventure10
Each swap decreases one such configuration as a possibility. As we start with one known configuration, it will take at most $\binom{2n}{2} - 1 = 2n^2 - n - 1$ swaps to "determine" where the hole is. We then take one additional move to put the ball in the hole, making a total of $\boxed{2n^2 - n}$. I'm not quite sure how to prove that sometimes it will require this many moves.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MellowMelon
5850 posts
#3 • 5 Y
Y by danepale, WindTheorist, AwesomeYRY, adityaguharoy, Adventure10
The answer is $3n^2 - 2n$. Have Banana (pretend to) procure $2n$ different balls, arranged in a row and numbered from 1 to $2n$ in left to right order. Whenever Banana calls out a move to Ana, she swaps the balls in the corresponding positions in her own row. Forgetting about Ana, Banana's goal is to make it so that each of her $2n$ balls occupies every position at some point in time.

First, we'll show the lower bound. Mark a ball with L if it visited position 1 before position $2n$, and mark it with R otherwise. Each pair of balls with the same letter (both L or both R) must swap with each other at least twice. Each pair of balls with different letters (one L and one R) must swap with each other at least once. Let $m_L$ be the total number of L balls and $m_R$ be the total number of R balls. Then we have shown that at least
\[ \binom{m_L}{2} + \binom{m_R}{2} + \binom{2n}{2} \]moves are required. By convexity and $m_L + m_R = 2n$, this is minimized for $m_L = m_R = n$. The above simplifies to $3n^2 - 2n$, our claimed answer.

Now we just need to show this is obtainable.
Step 1: For $1 \leq i \leq n-1$ in order, take ball $2n-i$, still in its initial position, and move it right $i$ times. After this, the configuration is $1, 2, \ldots, n, 2n, 2n-1, \ldots, n+1$. All of balls $n+1$ to $2n$ inclusive have visited position $2n$.
Step 2: For $1 \leq i \leq n$ in order, take ball $i$, currently in the leftmost position, and move it right $2n-1$ times. After all of this, the configuration is $2n, 2n-1, \ldots, n+1, 1, 2, \ldots, n$. The only thing left to do is have balls $n+1$ to $2n$ inclusive visit position 1.
Step 3: For $1 \leq i \leq n-1$ in order, take ball $2n-i$, currently in position $i+1$, and move it left $i$ times. All balls have now visited both 1 and $2n$, which implies they have visited every position.

Both steps 1 and 3 needed $\frac{n(n-1)}{2}$ moves, and step 2 needed $2n^2 - n$ moves. Adding these up gives $3n^2 - 2n$, as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AwesomeYRY
579 posts
#4 • 2 Y
Y by Jalil_Huseynov, DrYouKnowWho
We claim the answer is $3n^2-2n$. Note that this problem is equivalent to finding the number of swaps needed to make all cups visit all positions.

We first show this value is necessary. Label the positions from $1,2,\ldots 2n$. Firstly, clearly all $\binom{2n}{2}$ pairs of cups must be swapped at some point (can't jump over). Next, we claim that each cup $I$ starting at position $i$ will swap twice with either the cups in the set $\{1,2,\ldots i-1\}$ or $\{i+1,\ldots, 2n\}$. This is clearly true because the cups along the way from $I$ to the first endpoint it reaches will be swapped twice. Thus, by double counting, the minimum number of pairs of cups that are swapped twice is at least
\[\text{(A,B) where A is closer to endpoint} \geq \sum_{i=1}^{2n} \min(i-1,2n-i) = 1+\cdots + (n-1)+(n-1) + \cdots+1 = n^2-n\]Thus, in total at least $\binom{2n}{2}+n^2-n = n(2n-1)+n^2-n = 3n^2-2n$ cups are needed. $\blacksquare$.

We now provide a construction. It consists of two phases.

Phase 1: In $n^2-n$ moves we flip $(1,2,\ldots n),(n+1,\ldots 2n)$ into $(n,n-1,\ldots,1)(2n,2n-1,\ldots n+1)$. We do the $[1,n]$ case, the other one is symmetric. For $i\geq 2, i\leq n$, use swaps to directly send cup $i$ to position 1. This will take $1+\cdots n-1 = \frac{n(n-1)}{2}$ moves, and means that each cup $\leq n$ will only need to go rightwards. $\square$.

Phase 2: In each of $n$ iterations, we send the central pair $(i,2n-i+1)$ to the endpoints $(i \to 2n, 2n-i+1\to 1)$. this will always take $1+2\cdot (n-1)=2n-1$ moves for each iteration, for a total of $n\cdot (2n-1)$, and this clearly takes each cup through each position. $\square$.

Thus, we have provided a bound and a construction, so we have shown that the answer is $3n^2-2n$ and we're done. $\blacksquare$.
Z K Y
N Quick Reply
G
H
=
a