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
Dear Sqing: So Many Inequalities...
hashtagmath   32
N 3 minutes ago by aiops
I have noticed thousands upon thousands of inequalities that you have posted to HSO and was wondering where you get the inspiration, imagination, and even the validation that such inequalities are true? Also, what do you find particularly appealing and important about specifically inequalities rather than other branches of mathematics? Thank you :)
32 replies
hashtagmath
Oct 30, 2024
aiops
3 minutes ago
Squares on height in right triangle
Miquel-point   1
N 5 minutes ago by LiamChen
Source: Romanian NMO 2025 7.4
Consider the right-angled triangle $ABC$ with $\angle A$ right and $AD\perp BC$, $D\in BC$. On the ray $[AD$ we take two points $E$ and $H$ so that $AE=AC$ and $AH=AB$. Consider the squares $AEFG$ and $AHJI$ containing inside $C$ and $B$, respectively. If $K=EG\cap AC$ and $L=IH\cap AB$, $N=IL\cap GK$ and $M=IB\cap GC$, prove that $LK\parallel BC$ and that $A$, $N$ and $M$ are collinear.
1 reply
Miquel-point
Yesterday at 8:20 PM
LiamChen
5 minutes ago
true or false statement
pennypc123456789   3
N an hour ago by Dattier
if $a,b,c$ are positive real numbers, $k \ge 3$ then
$$
\frac{a + b}{a + kb + c} + \dfrac{b + c}{b + kc + a}+\dfrac{c + a}{c + ka + b} \geq \dfrac{6}{k+2}$$
3 replies
pennypc123456789
3 hours ago
Dattier
an hour ago
H is incenter of DEF
Melid   1
N an hour ago by Melid
Source: own?
In acute scalene triangle ABC, let H be its orthocenter and O be its circumcenter. Circumcircles of triangle AHO, BHO, CHO intersect with circumcircle of triangle ABC at D, E, F, respectively. Prove that incenter of triangle DEF is H.
1 reply
Melid
an hour ago
Melid
an hour ago
Inequality results about some function
CatalinBordea   2
N an hour ago by Rohit-2006
Source: Romania National Olympiad 2016, grade x, p.2
Let be a function $ f:\mathbb{R}\longrightarrow\mathbb{R} $ satisfying the conditions:
$$ \left\{\begin{matrix} f(x+y) &\le & f(x)+f(y) \\   f(tx+(1-t)y) &\le & t(f(x)) +(1-t)f(y) \end{matrix}\right. , $$for all real numbers $ x,y,t $ with $ t\in [0,1] . $

Prove that:
a) $ f(b)+f(c)\le f(a)+f(d) , $ for any real numbers $ a,b,c,d $ such that $ a\le b\le c\le d $ and $ d-c=b-a. $
b) for any natural number $ n\ge 3 $ and any $ n $ real numbers $ x_1,x_2,\ldots ,x_n, $ the following inequality holds.
$$ f\left( \sum_{1\le i\le n} x_i \right) +(n-2)\sum_{1\le i\le n} f\left( x_i \right)\ge \sum_{1\le i<j\le n} f\left( x_i+x_j \right) $$
2 replies
CatalinBordea
Aug 25, 2019
Rohit-2006
an hour ago
confusing inequality
giangtruong13   4
N an hour ago by giangtruong13
Let $a,b,c>0$ such that: $a^2b^2+ c^2b^2+ a^2c^2=3(abc)^2$. Prove that: $$\sum \frac{b+c}{a} \geq 2\sqrt{3(ab+bc+ca)}$$
4 replies
giangtruong13
Apr 18, 2025
giangtruong13
an hour ago
Find the value
sqing   9
N an hour ago by sqing
Source: 2025 Tsinghua University
Let $A= \lim_{n\to\infty}\tan^n\left(\frac{\pi}{4}+\frac{1}{n}\right)  . $ Find the value of $[100A] .$
9 replies
1 viewing
sqing
Today at 9:57 AM
sqing
an hour ago
Advanced topics in Inequalities
va2010   14
N an hour ago by sqing
So a while ago, I compiled some tricks on inequalities. You are welcome to post solutions below!
14 replies
va2010
Mar 7, 2015
sqing
an hour ago
The point F lies on the line OI in triangle ABC
WakeUp   13
N an hour ago by Nari_Tom
Source: All-Russian Olympiad 2012 Grade 10 Day 2
The point $E$ is the midpoint of the segment connecting the orthocentre of the scalene triangle $ABC$ and the point $A$. The incircle of triangle $ABC$ incircle is tangent to $AB$ and $AC$ at points $C'$ and $B'$ respectively. Prove that point $F$, the point symmetric to point $E$ with respect to line $B'C'$, lies on the line that passes through both the circumcentre and the incentre of triangle $ABC$.
13 replies
WakeUp
May 31, 2012
Nari_Tom
an hour ago
VOLUNTEERING OPPORTUNITY OPEN TO HIGH/MIDDLE SCHOOLERS
im_space_cadet   0
2 hours ago
Hi everyone!
Do you specialize in contest math? Do you have a passion for teaching? Do you want to help leverage those college apps? Well, I have something for all of you.

I am im_space_cadet, and during the fall of last year, I opened my non-profit DeltaMathPrep which teaches students preparing for contest math the problem-solving skills they need in order to succeed at these competitions. Currently, we are very much understaffed and would greatly appreciate the help of more tutors on our platform.

Each week on Saturday and Wednesday, we meet once for each competition: Wednesday for AMC 8 and Saturday for AMC 10 and we go over a past year paper for the entire class. On both of these days, we meet at 9PM EST in the night.

This is a great opportunity for anyone who is looking to have a solid activity to add to their college resumes that requires low effort from tutors and is very flexible with regards to time.

This is the link to our non-profit for anyone who would like to view our initiative:
https://www.deltamathprep.org/

If you are interested in this opportunity, please send me a DM on AoPS or respond to this post expressing your interest. I look forward to having you all on the team!

Thanks,
im_space_cadet
0 replies
1 viewing
im_space_cadet
2 hours ago
0 replies
(2^n -1)!! -1 is divided by 2^n
parmenides51   5
N 2 hours ago by parmenides51
Source: 2023 Grand Duchy of Lithuania, MC p4 (Baltic Way TST)
Note that $k\ge 1$ for an odd natural number $$k! ! = k \cdot (k - 2)  \cdot  ...  \cdot  1.$$Prove that $2^n$ divides $(2^n -1)!! -1$ for all $n \ge 3$.
5 replies
1 viewing
parmenides51
Mar 23, 2024
parmenides51
2 hours ago
Transforming a grid to another
Severus   3
N 2 hours ago by Project_Donkey_into_M4
Source: STEMS 2021 Cat B P5
Sheldon was really annoying Leonard. So to keep him quiet, Leonard decided to do something. He gave Sheldon the following grid

$\begin{tabular}{|c|c|c|c|c|c|}
\hline
1 & 1 & 1 & 1 & 1 & 0\\ 
\hline
1 & 1 & 1 & 1 & 0 & 0\\ 
\hline
1 & 1 & 1 & 0 & 0 & 0\\ 
\hline
1 & 1 & 0 & 0 & 0 & 1\\ 
\hline
1 & 0 & 0 & 0 & 1 & 0\\
\hline
0 & 0 & 0 & 1 & 0 & 0\\
\hline
\end{tabular}$

and asked him to transform it to the new grid below

$\begin{tabular}{|c|c|c|c|c|c|}
\hline
1 & 2 & 18 &24 &28 &30\\
\hline
21 & 3 & 4 &16 &22 &26\\
\hline
23 &19 & 5 & 6 &14 &20\\
\hline
32 &25 &17 & 7 & 8 &12\\
\hline
33 &34 &27 &15 & 9 &10\\
\hline
35 &31 &36 &29 &13 &11\\
\hline
\end{tabular}$

by only applying the following algorithm:

$\bullet$ At each step, Sheldon must choose either two rows or two columns.

$\bullet$ For two columns $c_1, c_2$, if $a,b$ are entries in $c_1, c_2$ respectively, then we say that $a$ and $b$ are corresponding if they belong to the same row. Similarly we define corresponding entries of two rows. So for Sheldon's choice, if two corresponding entries have the same parity, he should do nothing to them, but if they have different parities, he should add 1 to both of them.

Leonard hoped this would keep Sheldon occupied for some time, but Sheldon immediately said, "But this is impossible!". Was Sheldon right? Justify.
3 replies
Severus
Jan 24, 2021
Project_Donkey_into_M4
2 hours ago
Inspired by Bet667
sqing   1
N 2 hours ago by sqing
Source: Own
Let $ x,y\ge 0 $ such that $k(x+y)=1+xy. $ Prove that$$x+k^2y+\frac{1}{x}+\frac{k^2}{y} \geq \frac{k^2(k+1)^2+(k-1)^2}{k}$$Where $ k\in N^+.$
Let $ x,y\ge 0 $ such that $2(x+y)=1+xy. $ Prove that$$x+4y+\frac{1}{x}+\frac{4}{y} \geq \frac{37}{2}$$
1 reply
sqing
Today at 3:10 AM
sqing
2 hours ago
FE inequality from Iran
mojyla222   2
N 2 hours ago by sami1618
Source: Iran 2025 second round P5
Find all functions $f:\mathbb{R}^+ \to \mathbb{R}$ such that for all $x,y,z>0$
$$
3(x^3+y^3+z^3)\geq f(x+y+z)\cdot f(xy+yz+xz) \geq (x+y+z)(xy+yz+xz).
$$
2 replies
mojyla222
Yesterday at 9:20 AM
sami1618
2 hours ago
USAMO 2000 Problem 3
MithsApprentice   9
N Apr 4, 2025 by Anto0110
A game of solitaire is played with $R$ red cards, $W$ white cards, and $B$ blue cards. A player plays all the cards one at a time. With each play he accumulates a penalty. If he plays a blue card, then he is charged a penalty which is the number of white cards still in his hand. If he plays a white card, then he is charged a penalty which is twice the number of red cards still in his hand. If he plays a red card, then he is charged a penalty which is three times the number of blue cards still in his hand. Find, as a function of $R, W,$ and $B,$ the minimal total penalty a player can amass and all the ways in which this minimum can be achieved.
9 replies
MithsApprentice
Oct 1, 2005
Anto0110
Apr 4, 2025
USAMO 2000 Problem 3
G H J
G H BBookmark kLocked kLocked NReply
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MithsApprentice
2390 posts
#1 • 3 Y
Y by samrocksnature, Adventure10, Mango247
A game of solitaire is played with $R$ red cards, $W$ white cards, and $B$ blue cards. A player plays all the cards one at a time. With each play he accumulates a penalty. If he plays a blue card, then he is charged a penalty which is the number of white cards still in his hand. If he plays a white card, then he is charged a penalty which is twice the number of red cards still in his hand. If he plays a red card, then he is charged a penalty which is three times the number of blue cards still in his hand. Find, as a function of $R, W,$ and $B,$ the minimal total penalty a player can amass and all the ways in which this minimum can be achieved.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MithsApprentice
2390 posts
#2 • 3 Y
Y by samrocksnature, Adventure10, Mango247
When replying to the problem, I ask that you make posts for solutions and submit comments, jokes, smilies, etc. separately. Furthermore, please do not "hide" any portion of the solution. Please use LaTeX for posting solutions. Thanks.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
JSteinhardt
947 posts
#3 • 16 Y
Y by henrypickle, explogabloger, pickten, ilovemath121, Dynamite127, Akababa, utkarshgupta, jam10307, vsathiam, Delray, v_Enhance, e_plus_pi, MathbugAOPS, lneis1, samrocksnature, Adventure10
We claim (inductively) that the minimum is just going to be $min(BW,2WR,3RB)$. We'll start our induction with the case where one of the three quantities is zero, in which case we verify that we can indeed get away without any penalty by, for example, discarding blue if we are out of white.

Now, for the inductive step, let $f(R,W,B)$ be the minimum we seek. Note that
\[f(B,W,R) = min(W+f(B-1,W,R),2R+f(B,W-1,R),3B+f(B,W,B-1)) \]
By our inductive hypothesis, $f(B-1,W,R) = min((B-1)W,2WR,3R(B-1))$. In order for this to cause our inductive step not to hold, we would require that $W+min((B-1)W,2WR,3R(B-1)) < min(BW,2WR,3RB)$. It is evident that the first two entries in the $min$ expression cannot cause this to happen, so that we need only consider $W+3R(B-1) < min(BW,2WR,3RB)$. So $W+3R(B-1) < BW$, whence $3R < W$. But $W+3R(B-1) < 3RB$, so that $W < 3R$, a contradiction.

For the other two cases, we can get similar contradictions, so that our inductive step must hold, and so $f(B,W,R)$ is indeed $min(BW,2WR,3RB)$.

We now need only establish how many ways to do this. If one of these quantities is smaller, our induction and the fact that it is eventually zero guarantees that it will continue to be the smallest quantity as cards are discarded. (For example, if it is currently optimal to discard a blue card, it will continue to be so until we run out of blue cards.) Therefore, assuming that there is currently only one best choice of card to discard, this will continue to be so in the future, whence if $BW \neq 2WR \neq 3RB$, there is only $1$ optimal strategy.

Suppose, now, that $BW = 2WR$. It is thus optimal to discard either a $B$ or $W$ card. If we ever discard a blue card, then we will cause $BW < 2WR$, whence there is only one possible strategy from then on. However, if we discard a white card, then we will still have $BW = 2WR$, meaning that we continue to have the choice of discarding a white or blue card. Since we can discard a white card at most $W$ times, there are $W+1$ choices for how many $W$ cards to discard ($0$ to $W$), meaning that there are $W+1$ optimal strategies.

By similar logic, we get $R+1$ optimal strategies if $2WR = 3RB$, and $B+1$ optimal strategies if $3RB = BW$.

The final case, then, is if $BW = 2WR = 3RB$. In this case, if we first discard a white card, we are left with the $BW = 2WR$ case, and similarly for a blue and white card. The total number of optimal strategies in this case is then the sum of the optimal strategies in those cases, or, in other words, $B+W+R$.

To summarize:
The minimum penalty is $min(BW,2WR,3RB)$.
If $BW \neq 2WR \neq 3RB$, there is $1$ optimal strategy.
If $BW = 2WR < 3RB$, there are $W+1$ strategies.
If $2WR = 3RB < BW$, there are $R+1$ strategies.
If $3RB = BW < 2WR$, there are $B+1$ strategies.
If $BW = 2WR = 3RB$, there are $R+B+W$ strategies.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5001 posts
#4 • 2 Y
Y by samrocksnature, centslordm
Unexpectedly nice. Here is a nice "local"-type solution.
The answer is $\min(BW,2WR,3RB)$. We can achieve $BW$ by removing $B$ blue cards (with $W$ penalty each), then removing the red cards with $0$ penalty each and then the white cards with $0$ penalty each. We can also achieve $2WR$ and $3RB$ with a similar procedure.
Consider the order in which cards are played. If a player first plays three red cards, then one white, then one red, then two blue, we can represent the order as $RRRWRB$. Define a "C-block" of plays as some consecutive (possibly zero-length) plays in which the same card C is played, so an R-block is red cards for example. Clearly, we can represent every card order as a list of blocks such that every red block is followed by a blue block, every blue block is followed by a white block, and every white block is followed by a red block (except for the last block) and no two consecutive blocks are zero-length. For instance, we can represent $RRRRRBBW$ as a 5-long R-block, a 2-long B-block, and then a 1-long W-block. We can represent $WBBR$ as a 1-long W-block, a 0-long R-block, a 2-long B-block, a 0-long W-block, and finally a 1-long R-block.
Consider some arbitrary play order $P$. I claim that we can find some play order $P'$ which results in at most as much penalty as $P$ and has fewer nonempty blocks than $P$, unless $P$ has at most 3 nonempty blocks. If $P$ has more than 4 nonempty blocks, it is clear that at least one of the block orders R-B-W-R, B-W-R-B, W-R-B-W occurs, where the first and fourth blocks are nonempty, while the second and third are not necessarily nonempty.
Focus on the R-B-W-R case. Suppose there are $b$ blue cards in the blue block, $w$ in the white block, $r_1$ in the first red block, and $r_2$ in the second red block. Now consider the following subcases:
Subcase 1: $3b \leq 2w$. Consider the play order $P'$ formed by deleting the second red block and adding $r_2$ red cards to the first block. For example, if the blocks are $\boxed{RRRR}\boxed{B}\boxed{WW}\boxed{RR}$ before, then they will be $\boxed{RRRRRR}\boxed{B}\boxed{WW}$. Clearly this decreases the number of nonempty blocks. It is clear that this process increases the penalty by $3r_2b$, but also decreases it by $2r_2w$. Since $3b \leq 2w$, it follows that $2r_2w \geq 3r_2b$ and the penalty does not increase.
Subcase 2: $3b > 2w$. Consider the play order $P'$ formed by deleting the first red block and adding $r_1$ red cards to the second block. Clearly this decreases the number of nonempty blocks. It is clear that this process increases the penalty by $2r_1w$, and decreases it by $3r_1b$. Since $3b>2w$, it follows that $3r_1b>2r_1w$ and the penalty decreases.
Combining these cases implies that there always exists such a $P'$ for the R-B-W-R case. The other two cases can be dealt with similarly, which implies the claim.

Repeating this process shows that any play order $P$ accumulates at least as much penalty as some play order with three or fewer nonempty blocks. Hence to find the minimum it suffices to only consider play orders with three or fewer nonempty blocks. Clearly if there are at most two nonzero numbers in the multiset $\{R,B,W\}$, the minimum is zero, which fits the expression. Otherwise, if all of $\{R,B,W\}$ are nonzero, we can easily derive the above expression by considering cases on the order in which blocks are removed, which completes the proof. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MatBoy-123
396 posts
#5
Y by
JSteinhardt wrote:
We claim (inductively) that the minimum is just going to be $min(BW,2WR,3RB)$. We'll start our induction with the case where one of the three quantities is zero, in which case we verify that we can indeed get away without any penalty by, for example, discarding blue if we are out of white.

Now, for the inductive step, let $f(R,W,B)$ be the minimum we seek. Note that
\[f(B,W,R) = min(W+f(B-1,W,R),2R+f(B,W-1,R),3B+f(B,W,B-1)) \]By our inductive hypothesis, $f(B-1,W,R) = min((B-1)W,2WR,3R(B-1))$. In order for this to cause our inductive step not to hold, we would require that $W+min((B-1)W,2WR,3R(B-1)) < min(BW,2WR,3RB)$. It is evident that the first two entries in the $min$ expression cannot cause this to happen, so that we need only consider $W+3R(B-1) < min(BW,2WR,3RB)$. So $W+3R(B-1) < BW$, whence $3R < W$. But $W+3R(B-1) < 3RB$, so that $W < 3R$, a contradiction.

For the other two cases, we can get similar contradictions, so that our inductive step must hold, and so $f(B,W,R)$ is indeed $min(BW,2WR,3RB)$.

We now need only establish how many ways to do this. If one of these quantities is smaller, our induction and the fact that it is eventually zero guarantees that it will continue to be the smallest quantity as cards are discarded. (For example, if it is currently optimal to discard a blue card, it will continue to be so until we run out of blue cards.) Therefore, assuming that there is currently only one best choice of card to discard, this will continue to be so in the future, whence if $BW \neq 2WR \neq 3RB$, there is only $1$ optimal strategy.

Suppose, now, that $BW = 2WR$. It is thus optimal to discard either a $B$ or $W$ card. If we ever discard a blue card, then we will cause $BW < 2WR$, whence there is only one possible strategy from then on. However, if we discard a white card, then we will still have $BW = 2WR$, meaning that we continue to have the choice of discarding a white or blue card. Since we can discard a white card at most $W$ times, there are $W+1$ choices for how many $W$ cards to discard ($0$ to $W$), meaning that there are $W+1$ optimal strategies.

By similar logic, we get $R+1$ optimal strategies if $2WR = 3RB$, and $B+1$ optimal strategies if $3RB = BW$.

The final case, then, is if $BW = 2WR = 3RB$. In this case, if we first discard a white card, we are left with the $BW = 2WR$ case, and similarly for a blue and white card. The total number of optimal strategies in this case is then the sum of the optimal strategies in those cases, or, in other words, $B+W+R$.

To summarize:
The minimum penalty is $min(BW,2WR,3RB)$.
If $BW \neq 2WR \neq 3RB$, there is $1$ optimal strategy.
If $BW = 2WR < 3RB$, there are $W+1$ strategies.
If $2WR = 3RB < BW$, there are $R+1$ strategies.
If $3RB = BW < 2WR$, there are $B+1$ strategies.
If $BW = 2WR = 3RB$, there are $R+B+W$ strategies.

You are using Induction of which quantity?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomeming327.
1696 posts
#6
Y by
1. Setup
For each order of playing, we write it out by repeatedly appending either $r$, $w$, or $b$ based on the color played in that move to the end of a sequence which starts off as empty. For example, if the player plays five reds and then three blues, then we say this player played sequence $\alpha=rrrrrbbb.$ We call a sequence $u$ a subsequence of another one $v$ if and only if we can remove some elements of $v$ and get $u$. Denote by $\#$ to be a function taking in a sequence and outputting a nonnegative integer that finds the number of times the sequence is a subsequence of $\alpha.$ Note that the penalty is equal to $\#(bw)+2\#(wr)+3\#(rb).$ Call a subsequence of consecutive elements of the same color a block. Furthermore, let a block of $k$ $r$'s be denoted by $r^k$.

2. In the minimum-penalty played sequence $\alpha$, $b$ must be followed by $r$, $r$ by $w$, and $w$ by $b$.
Assume otherwise that we have a played sequence $\alpha$ for which two consecutive elements are $rb$, $bw$, or $wr$. Clearly, transposing these two will not cause change in the penalty induced by any other element. The penalty induced by the second transposed element ($b$, $w$, $r$, respectively) will also not change. However, the first transposed element's penalty will decrease because we are losing either an $(rb)$ subsequence, a $(bw)$ subsequence, or a $(wr)$ subsequence.

3. If $\alpha$ contains exactly four consecutive blocks, we can decrease that number to three blocks while not increasing the penalty.
Suppose we have $\alpha=w^{a_1}b^{a_2}r^{a_3}w^{a_4}$. The penalty is $a_2a_4+2a_1a_3.$ Then, $w^{a_1+a_4}b^{a_2}r^{a_3}$ has penalty $2a_1a_3+2a_3a_4$ and $b^{a_2}r^{a_3}w^{a_1+a_4}$ has penalty $a_2a_1+a_2a_4.$ Depending on the relative sizes of $a_2$ and $2a_3$, one of these must not increase the penalty. The process for the other three cases are similar and I will not go into detail.

4. One minimal-penalty $\alpha$ is in the form $w^{W}b^{B}r^{R}$ or any cyclic shifts.
Note that in $\alpha$ we can apply the previous step to any four consecutive blocks, and we will only affect the penalties of elements inside of that block, and the other blocks will not be affected. Therefore, if we continually apply the algorithm in the previous step, the number of blocks decreases while the penalty doesn't increase. Therefore, one of the minima must be the case where there are three consecutive blocks, in the form $w^{W}b^{B}r^{R}$ or any cyclic shifts. The penalty here is either $BW,2WR,3RB$ so the minimum is $\min(BW,2WR,3RB).$

5. The equality case.
In the final application of the algorithm, as described in step $4$, the equality case of step $3$ is either $W=3R$, $B=2R$, or $2W=3B$. Therefore, if none of these equalities are true, then the inequality in the final application in step $4$ is strict and so the only minimum case is the one with exactly three blocks. Note that in this case, $BW,2WR,3RB$ are pairwise distinct. If the minimum is $BW$, then the only minimum case is $b^Br^Rw^W.$ Similar goes for the other cases. The other cases can all be deduced by reverse application of the algorithm in step $4$ mindful of the equality case.

Equal case
@above
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
fuzimiao2013
3301 posts
#7 • 2 Y
Y by Jndd, winniep008hfi
The answer is $\boxed{\min(BW, 2RW, 3BR)}$. Each of these is achievable with $\textbf{BRW}$, $\textbf{WBR}$, and $\textbf{RWB}$, respectively, where $\textbf{B}, \textbf{R}, \textbf{W}$ are some number of (in this case, all) blue cards, red cards, and white cards. We will prove this is minimal.

Consider a moveset that gives minimal penalty (we can assume this since there are finitely many possible movesets), which we will call a $\textit{Mondrian}$. For convenience, we will let $B$, $W$, and $R$ denote a blue, white, and red card when describing a moveset. Then notice that if there exists $BW$ in the moveset, we can switch both to strictly decrease the penalty, which would be a contradiction, so there do not exist $BW$ in any $\textit{Mondrian}$. Similarly, neither does $WR$ nor $RB$. Therefore, every $\textit{Mondrian}$ is of the form $X_1X_2X_3\dots X_n$, where each $X_i$ consists of $R\cdots RW\cdots WB\cdots B$ (where there are a positive number of each $R$, $W$, and $B$), and $X_1$ may start with $R$, $W$, or $B$ and $X_n$ may end with $R$, $W$, or $B$.

When $BW \neq 2RW \neq 3BR \neq BW$, notice that we can now move the first "block" of cards of the same color in the first $X_i$ to the "block" in the last $X_n$ (with the same color, so red goes into a red block) to strictly decrease the penalty of a $\textit{Mondrian}$, a contradiction. (If this does not decrease it, do the opposite and move the last block to the first one, since either one is guaranteed to work). Therefore, the $\textit{Mondrian}$ must be of the form we mentioned at the start. There is obviously only $\boxed{1}$ way to achieve this.

By extremely similar logic, we can conclude that
$BW = 2RW \neq 3BR \implies \boxed{W+1}$,
$BW = 3BR \neq 2RW \implies \boxed{B+1}$,
$2RW = 3BR \neq BW \implies \boxed{R+1}$, and
$BW = 2RW = 3BR \implies \boxed{R+W+B}$, done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
huashiliao2020
1292 posts
#8
Y by
Alright here we go... this sols different from above sols i think and it is legitimately solved
We use a local technique (even though this is in DCY-process :rotfl: )

The answer is min(BW,2RW,3RB), obtained by taking all of B then R then W (cyclically shifting for other minimums). Note that WB,RW,BR are more efficient versions of BW,WR,RB, hence we know the dealing of cards occurs in blocks $B_1B_2...B_n$, where each $B_k$ is a sequence of $R...RW...WB...B$, and henceforth suppose that we have obtained the minimal penalty config s.t. $n\ge 2$, with $BW\ne 2RW\ne 3RB$. Between any $B_k,B_{k+1}$, having $p,q,r$ and $u,v,w$ number of R,W,B in the respective blocks, we assume the penalty is already optimal, and perturb the penalty by combining only the Rs with each other into the same block $B_k$, and see if it's more efficient; it increases by 3(ur-qu). If this is not equal to 0, then either putting R in both blocks into $B_k$ or $B_{k+1}$ suffices, since they are negation of each other, so we would combine the blocks s.t. it increases by negative amount, contradiction; if they are 0, q=r; by similar reasoning on other ones, we deduce they are all =0, meaning combining blocks with their respective color doesn't change the optimality.

We're now home free: ,We can WLOG combine them, and now apply this algorithm GLOBALLY to show that (at least one of the) minimum(s) is when it's one block of R...RW...WB...B.
It remains to find the number of ways: There's one way if $BW\ne 2RW\ne 3RB\ne BW$, which is playing all of one type at once; if $BW=2RW\ne 3RB$ there's W+1 ways (erasing 0 to W of white cards, then playing out all blue cards, then all red cards, and finish with the rest of white cards. (Each white card discarded still preserves $BW = 2WR$.)

For the second part, the motivation was that the R and B must now be in one block due to our above reasoning, but we can have white separated, because it holds the same equality as if it were R...RW...WB...B, but it wouldn't hold the equality as the same if we had done R...RW...WB...B with a blue not in the block of blues (easily checked, remember that we can WLOG combine the other blocks). We can apply similar reasoning in other cases to get 1,W+1,B+1,R+1,R+W+B ways in their respective equals.
This post has been edited 2 times. Last edited by huashiliao2020, Sep 7, 2023, 10:38 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mathandski
738 posts
#9
Y by
Guess who else localed a DCY-process :D
Attachments:
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Anto0110
100 posts
#10
Y by
What does DCY means?
Z K Y
N Quick Reply
G
H
=
a