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
Random modulos
m4thbl3nd3r   3
N 9 minutes ago by XAN4
Find all pair of integers $(x,y)$ s.t $x^2+3=y^7$
3 replies
m4thbl3nd3r
Today at 6:26 AM
XAN4
9 minutes ago
inequalities
pennypc123456789   1
N 9 minutes ago by truongphatt2668
Let $a,b,c$ be positive real numbers . Prove that :
$$\dfrac{(a+b+c)^2}{ab+bc +ac } \ge \dfrac{2ab}{a^2+b^2} + \dfrac{2bc}{b^2+c^2} + \dfrac{2ac}{a^2+c^2} $$
1 reply
pennypc123456789
2 hours ago
truongphatt2668
9 minutes ago
A hard cyclic one
Sondtmath0x1   3
N 10 minutes ago by imnotgoodatmathsorry
Source: unknown
Help me please!
3 replies
Sondtmath0x1
Today at 5:36 AM
imnotgoodatmathsorry
10 minutes ago
isogonal geometry
Tuguldur   6
N 12 minutes ago by aidenkim119
Let $P$ and $Q$ be isogonal conjugates with respect to $\triangle ABC$. Let $\triangle P_1P_2P_3$ and $\triangle Q_1Q_2Q_3$ be their respective pedal triangles. Let\[ X_1=P_2Q_3\cap P_3Q_2,\quad X_2=P_1Q_3\cap P_3Q_1,\quad X_3=P_1Q_2\cap P_2Q_1 \]Prove that the points $X_1$, $X_2$ and $X_3$ lie on the line $PQ$.
6 replies
+1 w
Tuguldur
Today at 4:27 AM
aidenkim119
12 minutes ago
Inequality with Max
nsato   7
N 13 minutes ago by Nari_Tom
Source: 2012 Baltic Way, Problem 2
Let $a$, $b$, $c$ be real numbers. Prove that
\[ab + bc + ca + \max\{|a - b|, |b - c|, |c - a|\} \le 1 + \frac{1}{3} (a + b + c)^2.\]
7 replies
nsato
Nov 22, 2012
Nari_Tom
13 minutes ago
Quadratic division
giangtruong13   0
an hour ago
Let $x,y,z$ be integer numbers satisfy that: $x^2-3y^2-z^2=xy+3xz-8yz$.Prove that: $$44|5x+19y+15z$$
0 replies
giangtruong13
an hour ago
0 replies
Number Theory Chain!
JetFire008   5
N an hour ago by whwlqkd
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
5 replies
JetFire008
Today at 7:14 AM
whwlqkd
an hour ago
<KCL wanted, K,L on hypotenuse AB of right isosceles ,AK: KL: LB = 1: 2: \sqrt3
parmenides51   1
N an hour ago by Mathzeus1024
Source: 2015 SPbU finals, grades 10-11 p3 v8 - Saint Petersburg State University School Olympiad
On the hypotenuse $AB$ of an isosceles right-angled triangle $ABC$ such $K$ and $L$ are marked, such that $AK: KL: LB = 1: 2: \sqrt3$. Find $\angle KCL$.
1 reply
parmenides51
Jan 24, 2021
Mathzeus1024
an hour ago
Problem3
samithayohan   113
N an hour ago by VideoCake
Source: IMO 2015 problem 3
Let $ABC$ be an acute triangle with $AB > AC$. Let $\Gamma $ be its circumcircle, $H$ its orthocenter, and $F$ the foot of the altitude from $A$. Let $M$ be the midpoint of $BC$. Let $Q$ be the point on $\Gamma$ such that $\angle HQA = 90^{\circ}$ and let $K$ be the point on $\Gamma$ such that $\angle HKQ = 90^{\circ}$. Assume that the points $A$, $B$, $C$, $K$ and $Q$ are all different and lie on $\Gamma$ in this order.

Prove that the circumcircles of triangles $KQH$ and $FKM$ are tangent to each other.

Proposed by Ukraine
113 replies
samithayohan
Jul 10, 2015
VideoCake
an hour ago
Hard problem
Tendo_Jakarta   0
2 hours ago
Let \(x,y,z,t\) be positive real numbers. Find the minimum value of
\[ T = (x+y+z+t)^2.\left[\dfrac{1}{x(y+z+t)}+\dfrac{1}{y(z+t+x)}+\dfrac{1}{z(t+x+y)}+\dfrac{1}{t(x+y+z)}\right] \]
0 replies
Tendo_Jakarta
2 hours ago
0 replies
Incenter and concurrency
jenishmalla   4
N 2 hours ago by Double07
Source: 2025 Nepal ptst p3 of 4
Let the incircle of $\triangle ABC$ touch sides $BC$, $CA$, and $AB$ at points $D$, $E$, and $F$, respectively. Let $D'$ be the diametrically opposite point of $D$ with respect to the incircle. Let lines $AD'$ and $AD$ intersect the incircle again at $X$ and $Y$, respectively. Prove that the lines $DX$, $D'Y$, and $EF$ are concurrent, i.e., the lines intersect at the same point.

(Kritesh Dhakal, Nepal)
4 replies
jenishmalla
Mar 15, 2025
Double07
2 hours ago
Ratio of lengths in right-angled triangle
DylanN   1
N 2 hours ago by Mathzeus1024
Source: South African Mathematics Olympiad 2021, Problem 2
Let $PAB$ and $PBC$ be two similar right-angled triangles (in the same plane) with $\angle PAB = \angle PBC = 90^\circ$ such that $A$ and $C$ lie on opposite sides of the line $PB$. If $PC = AC$, calculate the ratio $\frac{PA}{AB}$.
1 reply
+1 w
DylanN
Aug 11, 2021
Mathzeus1024
2 hours ago
Pythagorean new journey
XAN4   4
N 2 hours ago by XAN4
Source: Inspired by sarjinius
The number $4$ is written on the blackboard. Every time, Carmela can erase the number $n$ on the black board and replace it with a new number $m$, if and only if $|n^2-m^2|$ is a perfect square. Prove or disprove that all positive integers $n\geq4$ can be written exactly once on the blackboard.
4 replies
XAN4
Yesterday at 3:41 AM
XAN4
2 hours ago
wu2481632 Mock Geometry Olympiad problems
wu2481632   14
N 2 hours ago by bin_sherlo
To avoid clogging the fora with a horde of geometry problems, I'll post them all here.

Day I

Day II

Enjoy the problems!
14 replies
wu2481632
Mar 13, 2017
bin_sherlo
2 hours ago
Japanese Triangles
pikapika007   67
N Apr 2, 2025 by quantam13
Source: IMO 2023/5
Let $n$ be a positive integer. A Japanese triangle consists of $1 + 2 + \dots + n$ circles arranged in an equilateral triangular shape such that for each $i = 1$, $2$, $\dots$, $n$, the $i^{th}$ row contains exactly $i$ circles, exactly one of which is coloured red. A ninja path in a Japanese triangle is a sequence of $n$ circles obtained by starting in the top row, then repeatedly going from a circle to one of the two circles immediately below it and finishing in the bottom row. Here is an example of a Japanese triangle with $n = 6$, along with a ninja path in that triangle containing two red circles.
IMAGE
In terms of $n$, find the greatest $k$ such that in each Japanese triangle there is a ninja path containing at least $k$ red circles.
67 replies
pikapika007
Jul 9, 2023
quantam13
Apr 2, 2025
Japanese Triangles
G H J
G H BBookmark kLocked kLocked NReply
Source: IMO 2023/5
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pikapika007
297 posts
#1 • 17 Y
Y by Loppukilpailija, OronSH, GeoKing, Aopamy, Aops_2000, FourthRootOfX, kingu, ihatemath123, mathmax12, stayhomedomath, Supercali, DiaaSaid, Tastymooncake2, Sedro, vinyx, idkk, Rounak_iitr
Let $n$ be a positive integer. A Japanese triangle consists of $1 + 2 + \dots + n$ circles arranged in an equilateral triangular shape such that for each $i = 1$, $2$, $\dots$, $n$, the $i^{th}$ row contains exactly $i$ circles, exactly one of which is coloured red. A ninja path in a Japanese triangle is a sequence of $n$ circles obtained by starting in the top row, then repeatedly going from a circle to one of the two circles immediately below it and finishing in the bottom row. Here is an example of a Japanese triangle with $n = 6$, along with a ninja path in that triangle containing two red circles.
[asy]
// credit to vEnhance for the diagram (which was better than my original asy):
size(4cm);
  pair X = dir(240); pair Y = dir(0);
  path c = scale(0.5)*unitcircle;
  int[] t = {0,0,2,2,3,0};
  for (int i=0; i<=5; ++i) {
    for (int j=0; j<=i; ++j) {
      filldraw(shift(i*X+j*Y)*c, (t[i]==j) ? lightred : white);
      draw(shift(i*X+j*Y)*c);
    }
  }
  draw((0,0)--(X+Y)--(2*X+Y)--(3*X+2*Y)--(4*X+2*Y)--(5*X+2*Y),linewidth(1.5));
  path q = (3,-3sqrt(3))--(-3,-3sqrt(3));
  draw(q,Arrows(TeXHead, 1));
  label("$n = 6$", q, S);
label("$n = 6$", q, S);
[/asy]
In terms of $n$, find the greatest $k$ such that in each Japanese triangle there is a ninja path containing at least $k$ red circles.
This post has been edited 15 times. Last edited by pikapika007, Jun 7, 2024, 2:59 PM
Reason: credit to vEnhance for the diagram
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MS_Kekas
275 posts
#2 • 11 Y
Y by BlazingMuddy, Sumgato, TheStrayCat, GeoKing, Infinityfun, khina, ihatemath123, Snark_Graphique, Sedro, Tastymooncake2, kzguyfromd
Just wanted to say that this problem is great, one of the best combos in recent years.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DottedCaculator
7329 posts
#6
Y by
The answer is log2(n)+1.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Hyperabola
6 posts
#7 • 2 Y
Y by eternity_maganize, GeoKing
Solved.
The answer is $  k = \lfloor $log$_{2} n  \rfloor +1$

Quite interesing. :)
This post has been edited 1 time. Last edited by Hyperabola, Jul 9, 2023, 5:44 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
numbersandnumbers
258 posts
#8 • 7 Y
Y by eternity_maganize, GeoKing, xyz_g, jestrada, sabkx, c7h5n3o6_tnt, poirasss
The answer is $k = \lfloor \log_2 n \rfloor + 1$. To prove that one can't do better, note that it suffices to find a construction for $n = 2^m-1$ that has no path with more than $m$ circles. This is doable by placing the red cells "diagonally" such that no path intersects more than one red cell in rows $1$, $2$, $3$ through $4$, ..., $2^{m-1}$ to $2^m - 1$. An example with $m = 4$ is shown below:
[asy]
unitsize(5mm);
for (int i = 1; i < 2; ++i) {
int j = 2*(i-1);
fill(shift(i*dir(240)+j*dir(0))*scale(0.5)*unitcircle,lightred);
}
for (int i = 2; i < 4; ++i) {
int j = 2*(i-2);
fill(shift(i*dir(240)+j*dir(0))*scale(0.5)*unitcircle,lightred);
}
for (int i = 4; i < 8; ++i) {
int j = 2*(i-4);
fill(shift(i*dir(240)+j*dir(0))*scale(0.5)*unitcircle,lightred);
}
for (int i = 8; i < 16; ++i) {
int j = 2*(i-8);
fill(shift(i*dir(240)+j*dir(0))*scale(0.5)*unitcircle,lightred);
}
for (int i = 1; i < 16; ++i) {
for (int j = 0; j < i; ++j) {
draw(shift(i*dir(240)+j*dir(0))*scale(0.5)*unitcircle);
}
}
[/asy]

Now we show that $k = \lfloor \log_2 n \rfloor + 1$ is always achievable. To do this, for $1 \leq j \leq i \leq n$, let $a_{i,j}$ be the maximum number of red circles in any path starting from the $j$th circle in the $i$th row and going to the bottom of the triangle. We have the recurrence
\[a_{i,j} = \max\{a_{i+1,j}, a_{i+1,j+1}\} + \begin{cases*} 1 & the $j$th circle in the $i$th row is colored \\ 0 & else \end{cases*}\]and we wish to show that $a_{1,1} \geq \lfloor \log_2 n\rfloor + 1$.

To do this, our main claim is that
\[\sum_{j=1}^{i} 2^{a_{i,j}} \geq \sum_{j=1}^{i+1} 2^{a_{i+1,j}}\]for all $i$. This will finish, since we can compute that $\sum_{j=1}^{n} 2^{a_{n,j}} = n+1$, and chaining together these inequalities shows that $2^{a_{1,1}} \geq n+ 1$.

To prove the inequality, pick a specific $i$. For a given $b$, the number of $j$ with $a_{i+1,j} < b$ is strictly greater than the number of $j$ with $\max\{a_{i+1,j}, a_{i+1,j+1}\} < b$, unless the former quantity is zero. Therefore
\begin{align*}
\MoveEqLeft \sum_{j=1}^{i+1} 2^{a_{i+1,j}} -\sum_{j=1}^{i} 2^{\max\{a_{i+1,j}, a_{i+1,j+1}\}} \\
&= \begin{multlined}[t] \left(i+1+\sum_{b=1}^\infty 2^{b-1} \lvert \{ j : a_{i+1,j} \geq b\}\rvert\right) \\ - \left(i+\sum_{b=1}^\infty 2^{b-1} \lvert \{ j : \max\{a_{i+1,j}, a_{i+1,j+1}\} \geq b\}\rvert\right)\end{multlined} \\
& = 1 + \sum_{b=1}^\infty 2^{b-1} (1+\lvert \{ j :\max\{a_{i+1,j}, a_{i+1,j+1}\} < b\}\rvert- \lvert \{ j : a_{i+1,j} < b\}\rvert) \\
&\leq 1 + \sum_{b = 1}^{\min_j \{a_{i+1,j}\}} 2^{b-1} \\
&= 2^{\min_j \{a_{i+1,j}\}}.
\end{align*}On the other hand, if $j^*$ is the location of the colored circle in row $i$,
\[ \sum_{j=1}^{i} 2^{a_{i,j}} -\sum_{j=1}^{i} 2^{\max\{a_{i+1,j}, a_{i+1,j+1}\}} = 2^{\max\{a_{i+1,j^*}, a_{i+1,j^*+1}\}} \geq 2^{\min_j \{a_{i+1,j}\}}.\]Subtracting these two inequalities yields the claim.
This post has been edited 3 times. Last edited by numbersandnumbers, Jul 9, 2023, 7:05 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
khina
993 posts
#9 • 2 Y
Y by everythingpi3141592, Simona_AlphaMusic
Is this correct?

Let the $i$th row from the top be denoted the $i$th "level".

Label red circles with positive integers as follows. Label the top red circle with $1$. Then label the red circles inductively downwards with the smallest label $k$ for which no other red circle with the label $k$ lies "above" it. Here are the key claims:

Claim 1: For any red circle with label $k$, there exists a Japanese path which intersects at least $k$ red circles and ends at $k$.

Proof: By induction.

Claim 2: If the "highest" circle of label $k$ is on level $m$, then there are at most $m$ circles of label $k$.

Proof: Consider the diagonals oriented "/" which are left of the diagonal oriented "/" which intersects said highest circle, and also consider the diagonals orienter "\" which are right of the diagonal oriented "\" which intersects said highest circle. Then each such diagonal has at most $1$ circle of label $k$ and there are $m - 1$ such diagonals (the bound now follows by adding in your original circle.)

Anyways these two claims combined readily solves the problem; the construction has already been given in the previous posts.

Ok maybe actually the construction hasn't been given LOL. Anyways on row $2^k + i$ where $0 \leq i < 2^k$, just make the $2i + 1$th circle (from the right) red.
This post has been edited 2 times. Last edited by khina, Jul 9, 2023, 6:06 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rtyu852
6 posts
#10 • 12 Y
Y by khina, Cty-circle, Supercali, Nguyenhuyhoang, everythingpi3141592, Aopamy, GeoKing, Gato_combinatorio, sabkx, CBMaster, DiaaSaid, cheesegrater12121
The answer is $\left \lfloor \log_2 n \right \rfloor + 1$. For convenience, we label the rows of the triangle from the top, starting the count from $1$. For each red circle $A$, we assign it a number corresponding to the maximal amount of red circles that can appear in a ninja path from the top of the triangle to $A$. We can see that in a Japanese triangle, there is a ninja path with $t$ red circles iff there is a red circle assigned with the number $t$. We are left to find the maximum number $k$ that can appear in any Japanese triangle.

Claim 1: If $A,B$ get assigned by the same number $t$, then the sub-triangle with $A$ as the top can not contain $B$ and vice versa.

Proof: Kinda straightforward. If the sub-triangle with $A$ as the top contains $B$, then there is a ninja path that goes to $A$, and then $B$, with at least $t+1$ red triangles, and $B$ can not be assigned the number $t$.

Claim 2: there are at most $2^i$ red circles assigned with the number $i$.

Proof: We proceed by induction. $i=1$ is trivial. Assume that for any $i \le t$, there are at most $2^i$ red circles assigned with the number $i$. Then, there are at most $2^{t+1}-1$ red circles assigned with a number less than or equal to $t$. Hence, there exists a red circle $A$ assigned with the number $t+1$ that lies in a row $h \le 2^{t+1}$. By Claim 1, the sub-triangle with $A$ as the top can not contain any other red circles with the number $t+1$. It also means that there are at most $2^{t+1}-1$ rows either oriented "/" or "\" that can contain a red circle of number $t+1$. By Claim 1 again, each of these rows can have at most one red circle with the number $t+1$. So there can be at most $2^{t+1}$ red circles assigned with the number $t+1$, proving the induction.

The rest of the problem should be straightforward. Due to Claim 2, there is always a red circle assigned with the number $\left \lfloor \log_2 n \right \rfloor + 1$ in any Japanese triangle with $n$ rows. Using the similar idea, we can also construct a Japanese triangle where the maximal number assigned to a red circle is $\left \lfloor \log_2 n \right \rfloor + 1$. Hence, $\left \lfloor \log_2 n \right \rfloor + 1$ is the maximal number.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
juckter
322 posts
#11 • 1 Y
Y by Liuzhiyuan
The answer is $\lfloor \log_2(n) \rfloor + 1$.

Proof that $\lfloor \log_2(n) \rfloor + 1$ is achievable.

Consider the following process. Start with an array composed of $n + 1$ zeroes. At any point, if the current array is $[a_1, a_2, \dots, a_k]$, replace it with the $k - 1$ element array

\[[b_1, b_2, \dots, b_{k - 1}] = [\max(a_1, a_2), \max(a_2, a_3), \dots, \max(a_{k - 1}, a_k)]\]
Finally, if the row with $k - 1$ circles has a red circle at position $i$, increase $b_i$ by one. It is straightforward to verify that at any point our $k$-element array gives, for each circle in the row with $k$ circles, the maximum number of red circles that can be visited starting from said circle. For any array consider the quantity $f(a_1, a_2, \dots, a_n) = 2^{a_1} + 2^{a_2} + \dots + 2^{a_n}$.

Main claim. $f(b_1, b_2, \dots, b_{k - 1}) \ge f(a_1, a_2, \dots, a_k)$.

Proof. Let $i$ be such that $a_i = \min(a_1, a_2, \dots, a_k)$. Then we have

\begin{align*}
\max(a_1, a_2) &\ge a_1 \quad &\max(a_i, a_{i + 1}) &\ge a_{i + 1} \\
\max(a_2, a_3) &\ge a_2 \quad &\max(a_{i + 1}, a_{i + 2}) &\ge a_{i + 2} \\
&\vdots \quad &&\vdots \\
\max(a_{i - 1}, a_i) &\ge a_{i - 1} \quad &\max(a_{k - 1}, a_k) &\ge a_k
\end{align*}
So before adding $1$ to any element, the value of $f$ is at least $2^{a_1} + 2^{a_2} + \dots + 2^{a_{i - 1}} + 2^{a_{i + 1}} + 2^{a_{i + 2}} + \dots + 2^{a_n} = f(a_1, \dots, a_k) - 2^{a_i}$. After adding $1$ to say, $a_j$, the value of $f$ increases by $2^{a_j}$and therefore

\[f(b_1, \dots, b_{k - 1}) \ge f(a_1, \dots, a_k) - 2^{a_i} + 2^{a_j} \ge f(a_1, \dots, a_k)\]
Since $a_i$ was chosen to be minimal. This proves the claim.

Initially we have $f(0, 0, \dots, 0) = n + 1$ and at the end we have a single number $m$. Therefore $2^m \ge n + 1$ and $m \ge \lfloor \log_2 n \rfloor + 1$ as desired.

Proof that $\lfloor \log_2(n) \rfloor + 1$ is the best possible.

It suffices to exhibit a construction with $n = 2^k - 1$ rows in which at most $k$ red circles can be achieved, then prefixes of the triangle provide constructions for other $n$. For each red circle consider drawing the two diagonals parallel to the non-base sides of the triangles and recording which circles on the bottom row they touch. These form an interval of length $\ell$ where $\ell$ is the number of the row counting from the bottom. For the example in the statement we get the intervals $\{[1, 6], [1, 5], [3, 6], [3, 5], [4, 5], [1, 1]\}$. Notice that the intervals uniquely determine the circles, and that we can visit circle $A$ after circle $B$ if and only if the interval corresponding to $A$ contains the interval corresponding to $B$, therefore it suffices to give a collection of intervals of sizes $1, 2, \dots, 2^k - 1$ such that no $k + 1$ of them are nested. Consider now the collection

\[
\begin{matrix}
[1, 1] & [2, 3] & [3, 5] & \dots & [2^{k - 1}, 2^k - 1] \\
[1, 2^{k - 1} + 1] & [2, 2^{k - 1} + 3] & [3, 2^{k - 1} + 5] & \dots & [2^{k - 2}, 2^k - 1] \\
[1, 2^{k - 1} + 2^{k - 2} + 1] & [2, 2^{k - 1} + 2^{k - 2} + 3] & [3, 2^{k - 1} + 2^{k - 2} + 5] & \dots & [2^{k - 3}, 2^k - 1] \\
\vdots & \vdots & \vdots & & \vdots \\
[1, 2^{k - 1} + 2^{k - 2} + \dots + 2 + 1]
\end{matrix}
\]
We can verify that this arrangement contains all lengths of intervals from $1$ to $2^k - 1$ going from left to right, top to bottom. Moreover, no two intervals in the same row contain each other, and therefore any sequence of nested intervals contains at most $k$ of them (one from each row), as desired.
This post has been edited 3 times. Last edited by juckter, Jul 9, 2023, 6:40 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Swistak
180 posts
#12 • 5 Y
Y by carefully, gvole, GeoKing, Skywalker_v, mathleticguyyy
I am quite surprised how a problem based so heavily on the Dilworth's theorem appeared on IMO. I would expect only a small fraction of contestants to know it while it quite blatantly is of a great help here.

If we create the relation between red circles if we can get from the higher to the lower one then it is clearly a poset and we are interested in the longest chain, which by Dilworth is equal to the minimum number of antichains needed to cover red circles. If an antichain has a red circle in k-th row then it contains at most k circles. From that we easily get inductively that first $c$ antichains cover at most $2^c-1$ circles and we are done (antichains are sorted by their first element).
This post has been edited 1 time. Last edited by Swistak, Jul 9, 2023, 12:43 PM
Reason: typo
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
psi241
49 posts
#13 • 2 Y
Y by MarkBcc168, GeoKing
The answer is $\boxed{k = \lfloor\log_2 n\rfloor+1}$.
For convenience, define coordinate of a circle by $(r,i)$ where $r$ is the row ($1$ at the top, and $n$ at the bottom,) and $i$ is the order of the circle with in a row (from $1$ to $r$.)
The construction is color the red circles with coordinates $(1,1), (2,1), (3,3), \hdots, (2^i,1), (2^i+1,3), \hdots (2^i+j, 2j+1), \hdots (2^{i+1}-1,2^{i+1}-1), \hdots$. Notice that for any $i$ such that $2^i > n$, any ninja paths can pass at most one circle in the row between $2^i$ and $2^{i+1}-1,$ inclusively. Hence, the number of red cells in the ninja paths are at most $m$ where $2^{m-1} \leq n <2^{m}$.

Now we will prove that there is a ninja paths that passes through $k$ red circles. For each circle, label it with a positive integer $x$, the maximum number of red circles of the ninja paths from top of the japanese triangle to that circle.

Claim. Suppoes that the circles in the $i$-th row are labeled with the number $x_1,x_2,\hdots, x_i$, then \[\sum_{j=1}^i 2^{-x_j} \leq 1- 2^{-\max\{x_1,x_2,\hdots,x_i\}}.\]The base case is obviously true because the only circle has a label $1$, the sum of the weight is $1-\frac{1}{2}\leq \frac{1}{2}$.

Let the number labeled on circles on the $i-\text{th}$ row are $x_1,x_2,\hdots,x_i$, and those on the $i+1$-th row are $y_1,y_2,\hdots, y_{i+1}$.
Define $M = \max\{x_1,x_2,\hdots,x_i\},\ N = \max\{y_1,y_2,\hdots,y_{i+1}\}$.

At first, we will assume that there is NO red circles in the $(i+1)-\text{th}$ row, yet. Here, we will use the label $y'_j$ instead of $y_j$ for the circles on the $(i+1)-\text{th}$. In fact, we know that $y'_j = y_j$ for every circle but one that will be the red circle which will satisfy the relation $y'_j = y_j - 1$ because it add itself as the red circles in the path. Observe that $y'_1 = x_1,\ y'_i = x_i$, and $y'_j = \max\{x_{j-1},x_j\}$. Let $a$ be the index for which $x_a = M$.
The idea is that the label on the $(i+1)-\text{th}$ row must be "at least" the label on the $i-\text{th}$ row. Hence, the desired sum should increase.
[asy]
unitsize(20);
defaultpen(fontsize(10pt));
string[] x={"$x_1$","$x_2$","$\cdots$","$x_{a-1}$","$M$","$x_{a+1}$","$\cdots$","$x_i$"};
string[] y={"$\geq x_1$","$\geq x_2$","$\cdots$","$\geq x_{a-1}$","$M$","$M$","$\geq x_{a+1}$","$\cdots$","$\geq x_i$"};
for (int i = 0; i < 8; ++i){
if ((i != 2) && (i != 6)) dot((2*i+1,1));
label((2*i+1,1),x[i],N);
}
for (int i = 0; i < 9; ++i){
label((2*i,0),y[i],S);
if ((i == 2) || (i == 7)) continue;
if (i < 5) draw((2*i+1,1)--(2*i,0),EndArrow(5));
else draw((2*i-1,1)--(2*i,0),EndArrow(5));
dot((2*i,0));
}
[/asy]
By induction hypothesis,
\[\sum_{j=1}^{i+1} 2^{-y'_j} \leq \sum_{j=1}^{a} 2^{-x_j} + 2^{-M}+ \sum_{j=a+2}^{i} 2^{-x_{j-1}}\leq 1.\]
However the sum we would like to compute has the red circle, which means that its actual label should be $y_i = y'_i+1$ since it counts that circle in the path as well. Hence, the actual sum must be $1 - 2^{-y_i} \leq 1 - 2^{-N}$ as desired.

Now, on the last row, we can choose the cell labeled with $x_j$ such that $\frac{1}{2^{x_j}} < \frac{1}{n}\implies 2^{x_j} > n \geq 2^{k-1}$, implying the result. Otherwise, if we cannot choose such index $j$, then $\sum_{j=1}^n 2^{-x_j} \geq \frac{n}{n} = 1,$ contradiction.
This post has been edited 3 times. Last edited by psi241, Dec 16, 2023, 5:21 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kapilpavase
595 posts
#14
Y by
Edit: This falls apart. Will fix soon
Ok here is a solution which might have been found by many doing competitive programming.
Let $f(i, j)$ be the max number of zeros collected starting from $j$th circle in $i$th row and continuing. Let $c_{ij} = 1$ is there is red circle at the corresponding position The recursion is
$$f(i,j) = \max(f(i+1,j), f(i+1, j+1) + c_{ij}$$So its same as following game. We start with $n$ numbers $(a_1, a_2, \cdots a_n)$ initially all $0$. At a step we add $1$ to exactly one of the $a_i$ and the next sequence will be $(\max(a_1, a_2), \max(a_2, a_3) \cdots \max(a_{n-1}, a_n))$. Goal is to minimize the number obtained in the end.

But now all we need to observe is that $\max(a_i)$ can't remain the same for more than $\lfloor n/2 \rfloor$ steps. This is because the max element keeps consuming the elements to left and right and hence when max is at extreme, at the next step, there will be two less elements who are strictly less than it.

Hence there will be a $2$ after $\lfloor n/2 \rfloor$ steps, a $3$ after $\lfloor \lfloor n/2 \rfloor /2 \rfloor $ more steps and so on. This yields the required logarithmic bound. A greedy strategy of increasing the leftmost smallest element achieves the bound ($00000 \mapsto 1000 \mapsto 110 \mapsto 11 \mapsto 2$ etc)
This post has been edited 3 times. Last edited by kapilpavase, Jul 9, 2023, 2:38 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Kunihiko_Chikaya
14512 posts
#15
Y by
I wonder, the problem is proposed from Japan. Because Ninjya is Japanese culture like Samurai, Bushi etc.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Swistak
180 posts
#16 • 4 Y
Y by Kunihiko_Chikaya, ostriches88, carefully, Dhruv777
Kunihiko_Chikaya wrote:
I wonder, the problem is proposed from Japan. Because Ninjya is Japanese culture like Samurai, Bushi etc.

Perhaps the fact that this IMO was held in Japan had some connection with it :)?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
kapilpavase
595 posts
#17
Y by
Need not be. Its in fact IMO's culture to have a problem with special word dedicated to the hosting country. For example, in some IMO hosted in Argentina, there was a problem mentioning "silver" squares, reference to the word "Argentum".
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Swistak
180 posts
#18
Y by
kapilpavase wrote:
Ok here is a solution which might have been found by many doing competitive programming.
Let $f(i, j)$ be the max number of zeros collected starting from $j$th circle in $i$th row and continuing. Let $c_{ij} = 1$ is there is red circle at the corresponding position The recursion is
$$f(i,j) = \max(f(i+1,j), f(i+1, j+1) + c_{ij}$$So its same as following game. We start with $n$ numbers $(a_1, a_2, \cdots a_n)$ initially all $0$. At a step we add $1$ to exactly one of the $a_i$ and the next sequence will be $(\max(a_1, a_2), \max(a_2, a_3) \cdots \max(a_{n-1}, a_n))$. Goal is to minimize the number obtained in the end.

But now all we need to observe is that $\max(a_i)$ can't remain the same for more than $\lfloor n/2 \rfloor$ steps. This is because the max element keeps consuming the elements to left and right and hence when max is at extreme, at the next step, there will be two less elements who are strictly less than it.

Hence there will be a $2$ after $\lfloor n/2 \rfloor$ steps, a $3$ after $\lfloor \lfloor n/2 \rfloor /2 \rfloor $ more steps and so on. This yields the required logarithmic bound. A greedy strategy of increasing the leftmost smallest element achieves the bound ($00000 \mapsto 1000 \mapsto 110 \mapsto 11 \mapsto 2$ etc)
As much as I would like this elegant solution to be correct, it does not seem to be :(. If the maximum value reaches one of the two ends then the number of non-maximums drops by only one instead of two per an iteration and the argument falls apart
Z K Y
G
H
=
a