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
hard ............ (2)
Noname23   2
N an hour ago by mathprodigy2011
problem
2 replies
Noname23
Yesterday at 5:10 PM
mathprodigy2011
an hour ago
Abelkonkurransen 2025 3a
Lil_flip38   5
N an hour ago by ariopro1387
Source: abelkonkurransen
Let \(ABC\) be a triangle. Let \(E,F\) be the feet of the altitudes from \(B,C\) respectively. Let \(P,Q\) be the projections of \(B,C\) onto line \(EF\). Show that \(PE=QF\).
5 replies
Lil_flip38
Yesterday at 11:14 AM
ariopro1387
an hour ago
Inequality by Po-Ru Loh
v_Enhance   54
N an hour ago by Marcus_Zhang
Source: ELMO 2003 Problem 4
Let $x,y,z \ge 1$ be real numbers such that \[ \frac{1}{x^2-1} + \frac{1}{y^2-1} + \frac{1}{z^2-1} = 1. \] Prove that \[ \frac{1}{x+1} + \frac{1}{y+1} + \frac{1}{z+1} \le 1. \]
54 replies
v_Enhance
Dec 29, 2012
Marcus_Zhang
an hour ago
Problem 5
Functional_equation   14
N an hour ago by ali123456
Source: Azerbaijan third round 2020(JBMO Shortlist 2019 N6)
$a,b,c$ are non-negative integers.
Solve: $a!+5^b=7^c$

Proposed by Serbia
14 replies
Functional_equation
Jun 6, 2020
ali123456
an hour ago
No more topics!
USAMO 2000 Problem 4
MithsApprentice   33
N Wednesday at 8:32 AM by MaxSze
Find the smallest positive integer $n$ such that if $n$ squares of a $1000 \times 1000$ chessboard are colored, then there will exist three colored squares whose centers form a right triangle with sides parallel to the edges of the board.
33 replies
MithsApprentice
Oct 1, 2005
MaxSze
Wednesday at 8:32 AM
USAMO 2000 Problem 4
G H J
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MithsApprentice
2390 posts
#1 • 2 Y
Y by Adventure10, Mango247
Find the smallest positive integer $n$ such that if $n$ squares of a $1000 \times 1000$ chessboard are colored, then there will exist three colored squares whose centers form a right triangle with sides parallel to the edges of the board.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Severius
194 posts
#2 • 6 Y
Y by Adventure10, Mango247, Jack_w, and 3 other users
We say that a black square is row-happy if it's the only black square in its row, and column-happy if it's the only black square in its column. Note that each black square must be at least one of the two.

We'll find the maximum $n$ for which we can color $n$ squares without leaving a right triangle. There can be at most $999$ row-happy black squares in the best case. If there are more than $1000$, two of them would be in the same row, contradiction. If there are exactly $1000$, there must be one of them in each row and each row could not contain any other squares, so there would be exactly $1000$ black squares in total. Analogously, in the best case there can be at most $999$ column-happy black squares. Since each square is at least one of the two, there can be at most $1998$ black squares in total. It's easy to find an example for $1998$: color the bottom row and the leftmost column, but leaving the bottom-left corner white.

So we can color $1998$ squares without leaving a right triangle, and this is the maximum. Thus the required $n$ is $1999$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Philip_Leszczynski
327 posts
#3 • 2 Y
Y by Adventure10, Mango247
Suppose that there are 1999 or more colored squares.
If a colored square shares both a row and a column with another colored square, then we have the required right triangle.
So in order for there to be no such right triangle, each colored square must be alone in either its row or column.
We say that a colored square A "forbids" a square B if A shares a row with another colored square and shares a column with B, or vice versa.
Thus if A forbids B, then B cannot be colored.
A square can only be forbidden by two colored squares, one in its row and one in its column. If it is forbidden by three, then two of them must share a row or column and thus one of them cannot be colored.
Each of the 1999 colored squares forbids 999 other squares, and so at least M = int(1999*999/2) squares are forbidden.
M = int((2000-1)(1000-1)/2) = int((2000000-3000+1)/2) = 1000000-1500
So at most 1500 squares are not forbidden. However, there are 1999 colored squares, so at least 499 of them must be forbidden. Contradiction.

Consider a board with 1999 colored squares such that each square in the leftmost column and the bottom row are all colored. Now uncolor the left-bottom corner, leaving 1998 colored squares. Clearly no colored square shares both a row and a column with another colored square, so we have a setup with 1998 colored squares such that no such right triangle can be formed.

So n=1999.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
calc rulz
1126 posts
#4 • 7 Y
Y by mathtastic, jam10307, jonlin1000, Adventure10, Mango247, and 2 other users
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
aznlord1337
130 posts
#5 • 3 Y
Y by Adventure10, Mango247, and 1 other user
Note that switching columns or rows will not change whether there is a right triangle or not, as squares which share the same row or column will still share the same row or column.

Now suppose it was possible to color a $ nxn$ board with $ 2n-1$ squares. Since we have $ n$ rows, at least one row contains two black squares. Similarly, at least one column contains two black squares.

Call the black squares that share a row $ R_1$ and $ R_2$, and call the black squares the share a column $ C_1$ and $ C_2$. Note that $ C_1$ or $ C_2$ cannot share a column with $ R_1$ or $ R_2$ or else there would be a triangle. Similarly, $ R_1$ and $ R_2$ cannot share a row with $ C_1$ or $ C_2$. Therefore we have four distinct squares. Shuffles the rows and columns in such a way that $ R_1$ and $ R_2$ lie in the first two squares on the first row, and $ C_1$ and $ C_2$ lie on the bottom two squares of the rightmost column.

Note that any black square in the column of $ R_1$ or $ R_2$ or the row of $ C_1$ or $ C_2$ would form a triangle. So essentially we use four squares to cut out the leftmost two columns and bottom two rows. We now have $ 2(n-2)-1$ squares to color a $ (n-2)X(n-2)$ board. Continue this operation until we must color a $ 2X2$ board with $ 2(2)-1 = 3$ squares. Contradiction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v235711
164 posts
#6 • 2 Y
Y by Adventure10, Mango247
MithsApprentice wrote:
Find the smallest positive integer $ n$ such that if $ n$ squares of a $ 1000 \times 1000$ chessboard are colored, then there will exist three colored squares whose centers form a right triangle with sides parallel to the edges of the board.

I think I seen a very similar problem in st. petesburg´s olympiad.But i don´t remenber the year...
But not only there, I think that i´ve seen it more then one time.Anyway, here is my solution:(it is really wweird, i don´t know if the correctors would accept this,but i had to post it fast)

1998 clearly can´t be.i´ll prove that it is 1999.Suppose for absurd that it is not 1999.
we´ll have a columm with 2 painted squares.if we have another painjted square in one of these lines ,absurd.so we can "remove" these 2 lines from the board. But , if we have another painted one in this columm,we´l have to eliminate another line.So , to maximize the number of possible painted ones,
we´ll have to have the other painted ones in a different columm. we also have to color in such a way that we remove the least possible number of new squares.so the next 2 painted ones will have to be in the same line,but not in the same collum as the first 2 .Continuing in such manner, we see that
we will have one last coloring to make .But then we´ll have a triangle.Absurd.
So n=1999
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
exmath89
2572 posts
#7 • 1 Y
Y by Adventure10
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
viperstrike
1198 posts
#8 • 2 Y
Y by Adventure10, Mango247
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
AnonymousBunny
339 posts
#9 • 2 Y
Y by Adventure10, Mango247
Very badly written solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
utkarshgupta
2280 posts
#10 • 1 Y
Y by Adventure10
A Worse Written Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
supercomputer
491 posts
#11 • 1 Y
Y by Adventure10
solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
va2010
1276 posts
#12 • 1 Y
Y by Adventure10
Click to reveal hidden text
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
anantmudgal09
1979 posts
#13 • 1 Y
Y by Adventure10
MithsApprentice wrote:
Find the smallest positive integer $n$ such that if $n$ squares of a $1000 \times 1000$ chessboard are colored, then there will exist three colored squares whose centers form a right triangle with sides parallel to the edges of the board.

Let $f(m, n)$ be the answer to this problem for an $m \times n$ grid. I claim $\boxed{f(m, n)=m+n-1}$.

Induct on $k=m+n$; here base cases are clear. To see $f(m, n) \ge m+n-1$ take a row and a column and color all cells on them except for their intersection. WLOG, $m \ge n$. If each row has two colored cells, we get $2m>m+n-1$ colors. Else, pick that row with just one colored cell and look at the column containing it. Let there be $s \ge 1$ colored cells on this column. Then, none of the rows containing them can have a colored cell. Delete this column and these rows; "glue" together the rectangular pieces of the board so formed in the natural way to get a new board. For this board, $k \mapsto k-s-1$ so we may conclude that the original can have no more than $k-1$ cells. Our induction is complete. $\blacksquare$
This post has been edited 2 times. Last edited by anantmudgal09, Jun 4, 2017, 8:55 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
vsathiam
201 posts
#14 • 2 Y
Y by Adventure10, Mango247
Solution
This post has been edited 3 times. Last edited by vsathiam, Sep 2, 2017, 4:39 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Delray
348 posts
#15 • 1 Y
Y by Adventure10
Construction by StanPZ28
We claim that $n=1999$ is the smallest such $n$ such that there is guaranteed to be a right triangle. For $n=1998$, take two lines, one vertical and one horizontal and color every square on those lines except for their intersection. Clearly there are no right triangles, and $1998$ colored squares. Hence, we see that $n\geq1998$.

Now we show that $1999$ squares is enough. Denote a square a column square if the square has another colored square in the same column, and define a row square analogously. Furthermore, denote a square to be neither if it is neither a row nor a column square. If a square is simultaneously a row and a column square, then we are done, so assume that this is not the case.

Suppose that all the squares are either row or column squares. Let there be $r$ column and $c$ row squares respectively. Since $r+c=1999$, we have that one of $r$ or $c$ must be greater than or equal to $1000$, so we are done, since there must be some "overlap". Now suppose that there are $n$ neither squares. We now have that there are $n$ neither squares, taking up $k$ rows and $k$ columns. Hence we have that there are $1999-k$ rows/columns squares taking up $1000-k$ rows and $1000-k$ columns. Hence, there must be overlap, and we are done. $\square$
This post has been edited 5 times. Last edited by Delray, Sep 5, 2017, 1:37 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
TheImaginaryOne
109 posts
#16 • 2 Y
Y by Adventure10, Mango247
(There is a generalized form in the Pranav combinatorics book.)
Let a column with more than $1$ shaded square be bad.

Firstly find the max shaded squares where we can ever possibly make no right triangle form.
Take an $n\times n$ ($n\ge2$) grid and let the number of bad columns be $a$, then the good columns ($0/1$ shaded squares) is $n-a$.
If there are no bad columns ($a=0$) then the total number of shaded squares is at most $n-0=n$.

If there is at least $1$ bad column:
The shaded squares in a bad column can't share a row with another other square otherwise a right triangle forms. In particular the total number of shaded squares in the bad columns is at most $n$, otherwise $2$ (out of $n+1$) of these squares share a row.

If there were exactly $n$ of these squares none of the good columns would have any shaded squares since those $n$ squares definitely would take up all $n$ rows. Total shaded squares is $n$.

Otherwise there are at most $n-1$ of these squares. The other $n-a$ columns have at most $n-a\le n-1$ squares, giving a maximum of $2(n-1)$.
Clearly $2(n-1)\ge n$, thus, we have $2(n-1)$ shaded squares at most if no right triangle ever forms.
On the converse, if $m \ge 2n-1$ then we will always find a right angle triangle.

For $m = 2(n-1)$ we can construct an example where no right triangle appears, just shade the top row and left column except the top-left corner square.

We proved the minimum is $2n-1$, then setting $n=1000$, $2*1000-1=1999$.
This post has been edited 1 time. Last edited by TheImaginaryOne, Nov 13, 2018, 7:21 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6862 posts
#17 • 10 Y
Y by darkeagle, RAMUGAUSS, Anajar, v4913, HamstPan38825, ike.chen, hakN, Adventure10, Sagnik123Biswas, Mango247
The answer is $n = 1999$.

For a construction with $n = 1998$, take a punctured L as illustrated below (with $1000$ replaced by $4$): \[ \begin{bmatrix} 1 \\ 1 \\ 1 \\ & 1 & 1 & 1 \end{bmatrix}. \]
We now show that if there is no right triangle, there are at most $1998$ tokens (colored squares). In every column with more than two tokens, we have token emit a bidirectional horizontal death ray (laser) covering its entire row: the hypothesis is that the death ray won't hit any other tokens.

[asy] size(6cm); for (int i=1; i<=8; ++i) { 	if ((i-1)*(i-3)*(i-5) != 0) draw( (0.5,i)--(8.5,i), red+1, Arrows(TeXHead) ); 	for (int j=1; j<=8; ++j) { 		if ( (i-j)%2 == 0 ) 			filldraw(shift(i-0.5,j-0.5)*unitsquare, invisible, grey); 		else 			draw(shift(i-0.5,j-0.5)*unitsquare, grey); 	} }

draw( (3,2)--(3,7), blue); draw( (5,4)--(5,8), blue); void token(pair P) { fill(circle(P, 0.2), black); } token( (1,1) ); token( (2,1) ); token( (3,2) ); token( (3,6) ); token( (3,7) ); token( (4,1) ); token( (5,4) ); token( (5,8) ); token( (6,5) ); token( (7,3) ); token( (8,1) ); [/asy]



Assume there are $n$ tokens and that $n > 1000$. Then obviously some column has more than two tokens, so at most $999$ tokens don't emit a death ray (namely, any token in its own column). Thus there are at least $n-999$ death rays. On the other hand, we can have at most $999$ death rays total (since it would not be okay for the whole board to have death rays, as some row should have more than two tokens). Therefore, $n \le 999 + 999 = 1998$ as desired.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
IAmTheHazard
5000 posts
#18 • 1 Y
Y by centslordm
The answer is $n=1999$. To show that $n=1998$ fails, pick an arbitrary row, an arbitrary column, and color in both. Then uncolor their intersection, which clearly works.

Now I will show that $n=1999$ works. Now identify each cell in the chessboard as an ordered pair $(i,j)$ where $i$ represents the column number and $j$ the row number, so the bottom left is $(1,1)$ and the top right is $(1000,1000)$. We can see that such a right triangle exists if and only if there exists some $(i,j)$ such that column $i$ contains at least two colored squares and row $j$ contains at least two colored squares.
Suppose FTSOC that there exists some coloring of $1999$ squares and no right triangles are formed. View the coloring column-by-column, so we first color some squares in the first column, then the next, and so on. At some point in time, call a row solitary if there can be at most one colored square in it, otherwise a right triangle is formed. Hence every time we color a column, we create some (possibly zero) solitary rows. Since we cannot color cells lying in already solitary rows, it is clear that no new solitary columns are created by coloring a column with a single square or no squares, and if $k \geq 2$ columns are colored then $k$ new solitary columns are created: one for each square colored in that column. Thus after some number of columns are colored, with $k$ cells being filled in, the total number of solitary rows is equal to:
$$k-\text{the number of columns with 1 square colored},$$hence after all the columns are colored there are:
$$1999-\text{the number of columns with 1 square colored}.$$Now note that any coloring without right triangles must have at most $998$ columns with one colored cell: $1000$ is impossible since then we only color $1000$ squares, and $999$ is impossible since it implies the row that doesn't have one colored cell has $1000$ cells, and a right triangle can be clearly formed. Hence after the columns are all colored we have at least $1001$ solitary rows, which is absurd since there are only $1000$ rows in the chessboard. Hence such a coloring does not exist, so every coloring of $1999$ squares contains a right triangle. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
PCChess
548 posts
#19
Y by
The answer is $n=1999$. To see that $n=1998$ doesn't work, color the 999 squares that are in the topmost row and rightmost column, but not the square in both. It is easy to see that then $n<1998$ doesn't work.

Now to prove that $n=1999$ works. For a coloring of 1999 squares, consider the columns where at least 1 square is colored and pick 1 square is each of those columns to be called interesting. Note that there are between at most 1000 interesting squares, each column has at most 1 interesting square, and columns without an interesting square have no colored squares. If all the interesting squares are in the same row, then we can chose any colored squared and it would form a right triangle with 2 interesting squares. So, assume not all the interesting squares are in the same row. For the other 999 (possibly more) colored squares that are not interesting, if any two are in the same row, we are done since each of these colored non interesting square is in the same column as an interesting square. The right triangle is then formed by the two colored non interesting squares in the same row and the interesting square in the same column as one of these 2 squares.
The other case is if the 999 colored non interesting squares are all in different rows. Since the interesting squares are in at least 2 rows, one of these 999 colored non interesting squares is in the same row as an interesting square, and by definition of interesting that specific colored non interesting square has to be in the same column as an interesting square as well, so we have the right triangle.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ike.chen
1162 posts
#20
Y by
Oops why did this take me like $15$ minutes to solve, but $1$ hour to write up... I'm obviously inexperienced at Olympiad Combo. Also why are all the other solutions so short and appealing, especially Evan's, unlike mine.



We claim $n = 1999$ is the answer.

Call a chessboard good if it contains a right triangle and bad otherwise. Observe that a chessboard is good if and only if it contains a colored square that has another colored square within its own row and column. Now, we will try to construct bad chessboards.

Let a row be singular if it contains exactly $1$ colored square and non-singular if it contains $2$ or more. Notice that in order for a chessboard to be bad, every single colored square within a non-singular row must have $0$ additional colored squares in its own column.

Claim: Suppose we are constructing a bad chessboard. If our chessboard has at least $1$ singular row, then the largest possible amount of colored squares within our non-singular rows is $999$.

Proof. Since colored squares within non-singular rows must have their own column (distinct from all other colored squares), the result easily follows, as the colored squares located within singular rows could all share a single column. $\square$

Similarly, we conclude that for boards containing $0$ singular rows, the maximum possible amount of colored squares contained within the non-singular rows is $1000$.

It's easy to see there exists a bad chessboard for $1 \le n \le 1000$, as we cannot guarantee there will exist a non-singular row (by the Pigeonhole Principle) for these values of $n$. If $1001 \le n \le 1998$, then we can construct bad chessboards as follows:
$\bullet$ Color the first $n - 999$ squares of row $1$ from column $1$ to column $n - 999$;
$\bullet$ Color the last $999$ squares of column $1000$ (from row $2$ to row $1000$).

Obviously, the total number of colored squares (here) is $n$, and we've satisfied all conditions necessary to form a bad chessboard, so we're done.

Now, we will utilize contradiction to prove there exist no bad chessboards for $n = 1999$.

Claim: If a bad chessboard has $1999$ colored squares, then it must contain exactly $1000$ singular rows.

Proof. Suppose we have $0$ singular rows within our chessboard. Now, we have $1999 > 1000$ colored squares left for the non-singular rows of our board, implying a bad chessboard cannot be constructed for this case (due to the corollary of our first claim).

Now, assume we have at least $1$ singular row on our chessboard. Then, the largest possible amount of colored squares contained within our non-singular rows is $999$, implying the number of colored squares within our singular rows (for this case) is at least $1999 - 999 = 1000$. Because our chessboard only has $1000$ rows, however, we conclude that exactly $1000$ singular rows are needed for this case. $\square$

The last claim implies there must exist $1000$ singular rows on our board to (possibly) construct a bad chessboard when $n = 1999$. This means the number of colored squares here is just $1 \cdot 1000 = 1000$. Obviously, we have a contradiction as $1000 \ne 1999$, so all chessboards with $n = 1999$ are good and we're done. $\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bever209
1522 posts
#21
Y by
Click to reveal hidden text
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
554183
484 posts
#22
Y by
does this work ???
This post has been edited 1 time. Last edited by 554183, Jul 25, 2021, 7:05 AM
Reason: \
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
#23 • 1 Y
Y by centslordm
We offer a stronger claim.

Claim: For $a,b\geq 2$, the rectangle $a\times b$ can have at most $a+b-2$ colored cells while not having any right triangles.
Proof: . First note that we can always achieve this by covering a full row and full column, minus the intersection.

Induction. The base case $2\times 2$ clearly yields at most 2 colored cells. Otherwise, consider the row with the maximum number of colored cells, let this be $M$. If $M=b$, then the maximum number of cells is $b\leq a+b-2$. If $M=b-1$, then we are forced to have at most $b-1+a-1 = a+b-2$ by filling out the final unfilled the row (This is the equality case).Otherwise, the other $b-M$ cells in the row, and the $a-1$ other cells in the column, all cannot be colored. Additionally, by the inductive hypothesis, the maximum number of cells in the remaining $(b-M)\cdot (a-1)$ rectangle is $(b-M)+(a-1)-2$ if $a-1\geq 2$, and $(b-M)\leq (b-M)+(a-1)-1$ if $a-1=1$. Thus, the total is at most
\[M + (b-M) +(a-1)-1 = b+a-2\]and we're done. $\square$.

This gives us an answer of $1000+1000-2+1 = \fbox{1999}$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
DottedCaculator
7305 posts
#24 • 1 Y
Y by centslordm
Solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rcorreaa
238 posts
#25 • 1 Y
Y by centslordm
We claim that $n=1999$. To see that $n=1998$ fails, pick a cell and color all the cells lying on the same row and column of it, and do not color the picked cell. Thus, there are no right triangles.

Now, let $G= A \cup B$ be the bipartite graph of the chessboard, where $A$ is the set of rows and $B$ is the set of the columns. We connect $a \in A$ to $b \in B$ iff their intersection on the chessboard is colored. We will prove that if $|E(G)| \geq 1999$, then $G$ has a path of size $3$ $a-b-c-d$, which clearly implies that there is a right triangle.

Thus, suppose for the sake of the contradiction that $|E(G)| \geq 1999$ but $G$ has not a path of size $3$. Then, for every $a \in A$ with $deg (a) \geq 2$, its neighbors have degree exactly $1$. The same is true for $b \in B$ with $deg (b) \geq 2$. Therefore, $G$ is a disjoint union of trees, and $G$ has exactly $2000$ vertices, so if $G$ has more than a tree, there will be less than $2000-1=1999$ vertices. Hence, $G$ is a tree. However, this clearly implies that there will be a size of path $3$ in $G$, implying the desired result.

$\blacksquare$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
awesomeming327.
1665 posts
#26 • 2 Y
Y by centslordm, Mango247
The answer is $1999.$ To show that $1998$ does not work, simply consider the case where the first row and the first column is colored, but not their intersection. Define vertices $R=\{r_1,r_2,\dots, r_{1000}\}$ and $\{g_1,g_2,\dots, g_{1000}\}$ in a bipartite graph where $(r_i,g_j)$ is connected if and only if row $r_i$ and column $g_j$ is colored. Note that if there exists a path with two vertices in $R$ and two in $G$, then there is a $3$-path, implying that there is a right triangle.

Assume that we can draw $1999$ edges without creating a $3$-path. Clearly there must be no cycles, so our bipartite graph is a forest. Consider any tree. It may not have two vertices in $R$ and two in $G$, so WLOG assume it has only one vertex in $R$. That means that one the forest has at least two trees. Therefore, the number of vertices is at least two more than the number of edges, $2000\ge 1999+2$ contradiction.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
john0512
4170 posts
#27 • 1 Y
Y by centslordm
e claim that the answer is 1999. A counterexample for 1998 is when a cell is shaded if and only if it is in the first row or first column but not both.

We will then show that any coloring of 1999 cells works. We will try to construct a case with no triangles and show that it is impossible.

Note that in order for there to be no triangles, if any two rows share a colored cell in the same position, then that shared position must be the only colored cell in both of those rows.

Call a row orz if it contains exactly one colored cell, and unorz otherwise. Note that there can be at most 999 orz rows, so there must be at least 1000 colored cells that are in an unorz row.

Case 1: There is at least one orz row. Then, we cannot have any unorz row that shares a colored cell in the same position as in a orz row (since otherwise there will be a triangle), so we have at most 999 columns available for unorz rows. However, since there are at least 1000 cells in unorz rows, we must have two colored cells in unorz rows that are in the same column, which causes a triangle.

Case 2: There are no orz rows. Then, all 1999 colored cells are in unorz rows. Therefore, clearly, there exist some two colored cells that are in the same column in two unorz rows, which causes a triangle, so we are done.
This post has been edited 1 time. Last edited by john0512, Feb 1, 2023, 1:33 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
megarnie
5537 posts
#28 • 2 Y
Y by centslordm, ehuseyinyigit
The answer is $\boxed{1999}$. A counterexample for $1998$ is just shading the first row and first column, but not the bottom left corner.

Suppose that a right triangle did not exist for $n = 1999$. Call a square good if it is in a column with two or more colored squares. Clearly, each good square is the only colored square in its row. Assume that there were $k$ good squares. Since there are only $1000$ rows, $0\le k\le 1000$. If $k = 0$, then each column has at most $1$ colored square, and if $k = 1000$, each row has at most $1$ colored square, both result in at most $1000$ colored squares, contradiction. If $0<k<1000$, then there are at most $999$ columns without good squares, which means at most $k + 999$ total squares. However, $k + 999<1999$, contradiction. Therefore a right triangle must exist.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
CyclicISLscelesTrapezoid
372 posts
#29 • 1 Y
Y by centslordm
Similar to (but much easier than) USA TST 2011/8.

Interpret the chessboard as the lattice points with $x$ and $y$ coordinates between $1$ and $1000$, inclusive. We claim that the answer is $1999$. The points $(2,1),(3,1),\ldots,(1000,1),(1,2),(1,3),\ldots,(1,1000)$ show that this is a lower bound.

We claim that $n=1999$ satisfies the problem statement. Assume FTSOC that no colored point has another colored point with the same $x$-coordinate and another colored point with the same $y$-coordinate. If a colored point $P$ has a colored point with the same $x$-coordinate, then consider the projection of $P$ to the $y$-axis. Otherwise, consider the projection of $P$ to the $x$-axis. These $1999$ projections must be distinct: no two colored points with the same $x$-coordinate can be projected to the $x$-axis, and no two colored points with the same $y$-coordinate can be projected to the $y$-axis. Since there are $1999$ colored points, the set of projected points must contain all of $(1,0),(2,0),\ldots,(1000,0)$ or $(0,1),(0,2),\ldots,(0,1000)$. However, this means the $1000$ colored points that created these projections must be in pairwise distinct rows and columns, which means no other colored point can be added, a contradiction. $\square$
This post has been edited 1 time. Last edited by CyclicISLscelesTrapezoid, Sep 5, 2023, 9:23 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
YaoAOPS
1492 posts
#30
Y by
Rather dirty induction done twice. :what?:

Claim: For a general $m \times n$ grid with $m, n \ge 1$, the maximum number of colored squares that can be placed while this doesn't hold is at most $m + n - 1$.
Proof. The base case of a $0 \times n$ or $n \times 0$ grid is immediate. Else, take the row/column with the maximum number of squares, say $C$.
If $C = 1$, then the bound follows immediately. Else, this rules out at least $C$ rows/columns. Induct down on the smaller grid. $\blacksquare$

Claim: For a general $m \times n$ grid with $m, n \ge 2$, the maximum number of colored squares that can be placed while this doesn't hold is at most $m + n - 2$.
Proof. The base case of a $2 \times n$ or $n \times 2$ grid is immediate. Else, take the row/column with the maximum number of squares, say $C$.
If $C = 1$, then the bound follows immediately. Else, this rules out $C + 1$ rows/columns (including the row they are in). Using the weaker claim finishes. $\blacksquare$
A construction of $n = 1998$ comes by coloring all of a row and a column besides their intersection. Thus, $n = 1999$ is the answer.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EpicBird08
1734 posts
#31
Y by
No one posted here in 2024???

Generalize to an $a \times b$ board where $a,b \ge 2.$ We claim that the answer is $\boxed{n=a+b-1},$ with the construction for $a+b-2$ being the union of the first row and first column, excluding the topleft corner.

Now we will show that $n = a+b-1$ will do the trick, by strong induction. The base case for a $m \times 2$ grid holds because if there were $m+1$ colored squares, by Pigeonhole one of the rows must be completely colored, say WLOG the top row, and then at least one other square is shaded, yielding a right triangle.

For the inductive step, assume that the problem holds for all $x \times y$ rectangles, with $2 \le x \le a$ and $2 \le y \le b$ but $(x,y) \ne (a,b).$ Consider the top row of our $a \times b$ board. If it has at most $1$ colored square, then there are $a+b-2$ colored squares in the remaining $(a-1) \times b$ grid, yielding a right triangle by the inductive hypothesis. Thus assume that there are $k$ colored squares in the top row, residing in columns $a_1, \dots, a_k.$ If there is another colored square in column $a_i$ for some $i,$ then we are clearly done, so assume that there are no other colored squares in column $a_i$ for all $i.$ Then we can effectively "delete" the columns $a_1, \dots, a_k$ since we cannot do anything with them anymore, and we can also delete the top row. What remains is a $(a-1) \times (b-k)$ grid in which we must color $a+b-k-1 > a+b-k-2$ squares. If $k < b-1,$ then by the inductive hypothesis we are done. If $k = b-1,$ what remains is a $(a-1) \times 1$ grid, in which we can color at most $a-1$ squares, yielding $(a-1) + (b-1) = a+b-2$ squares, which is bad. Finally, if $k = b,$ then at least one other square is shaded, giving a right triangle.

Therefore, with all cases having been exhausted, the induction is complete, and so the answer for an $a \times b$ board is $a+b-1.$ When $a=b=1000,$ this yields the answer of $\boxed{1999}.$
This post has been edited 1 time. Last edited by EpicBird08, Jan 17, 2025, 6:36 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Benbenwang
548 posts
#32
Y by
We claim the answer is $\boxed{1999.}$

Call a tile good if coloring it makes such a triangle and any row or column unmarked if there are no colored tiles in it. Note that if we color a tile that is in both a marked row and column, it is good. We will show that the maximum number of bad tiles you can color is $1998$, therefore guaranteeing the $1999$th tile to be good.

We want to maximize our number of bad tiles by minimizing the number of marked rows and columns each colored tile creates (since if all rows and columns are marked, then we are guaranteed to color a good tile). Notice that the coloring of a bad tile will mark at least one row and/or column. Also keep in mind that if we color a tile and the number of unmarked rows and columns does not change, that tile is good. We begin with $1999$ unmarked rows and columns. The first tile that we color will mark one row and one column, reducing our count to $1997$. Since each bad tile marks at least one row and/or column, we theoretically can color $1997$ more bad tiles. Thus we can color $1+1997=1998$ bad tiles, with our $\boxed{1999\text{th}}$ tile forming the triangle. Finally, we show such a configuration exists. Imagine coloring the entire bottom row and entire left-most column, leaving the bottom left corner uncolored. Clearly every row and column is marked, and thus we are done. $\square$
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Scilyse
386 posts
#33 • 1 Y
Y by ehuseyinyigit
Did I overcomplicate the problem?

The answer is $n = 1999$. For the construction, simply extend the following colouring to a $1000 \times 1000$ grid.
[asy]
    size(6cm);
    for (int i = 0; i <= 10; ++i) {
        D((0, i)--(10, i),black);
        D((i, 0)--(i, 10),black);
    }
    real draw(real p, real q) {
        filldraw((p, q)--(p+1, q)--(p+1, q+1)--(p, q+1)--cycle,palered+opacity(0.5),black);
        return p;
    }
    for (int i = 1; i < 10; ++i) {
        draw(0, i);
        draw(i, 0);
    }
[/asy]
Now we'll show that $n = 1999$ is sufficient. Construct a bipartite graph $G$ on the sets of $1000$ vertices $A$ and $B$, label the vertices on each side $1$, $2$, $\dots$, $1000$, and connect $i - j$ if $(i, j)$ is coloured, where we impose the coordinates on the chessboard in the obvious fashion. Suppose that at least $1999$ squares are coloured, i.e. that $G$ has at least $1999$ edges, and that there are no such right-angled triangles, i.e. that there are no paths of length $3$ in $G$. Split $G$ into disjoint components $G_1$, $G_2$, $\dots$, $G_k$.

Claim: Any component $G_i$ is either the union of edges $U - V_j$ for vertices $U \in A$, $V_j \in B$ or $U \in B$, $V_j \in A$ where $j$ ranges over $\{1, 2, \dots, r\}$ for some positive integer $r$, or a single vertex.
Proof. Suppose that $G_i$ is not a single vertex, so that $G_i$ has vertices in both $A$ and $B$. Select a $u \in A$. By our assumption, the neighbourhood $N \subseteq B$ of $u$ is nonempty.

Case 1. If $|N| = 1$, then consider instead the neighbourhood $M \subseteq A$ of $v$, where $N = \{v\}$.

Case 1.1. If $|M| = 1$, then we're done as $G_i$ indeed satisfies our characterisation.

Case 1.2. If $|M| \neq 1$, then fix a $w_i \in M$ and take another $w_j \in M$ different from $w_i$. Now $w_i$ can only be connected to $v$ as otherwise $x - w_i - v - w_j$ would be a valid path, where $x$ is another neighbour of $w_i$, contradiction. Hence we can take $U = v$, $\{V_1, \dots, V_r\} = M$, as desired.

Case 2. If $|N| \neq 1$, then similarly fix a $w_i \in N$ and take another $w_j \in N$ different from $w_i$. Now $w_i$ can only be connected to $u$ as otherwise $x - w_i - u - w_j$ would be a valid path, where $x$ is another neighbour of $w_i$, another contradiction. Hence we can take $U = u$, $\{V_1, \dots, V_r\} = N$, as desired. $\square$

Now discard the single vertices; now $A$ has, say, $a$ elements and $B$ has, say, $b$ elements, where $a, b \leq 1000$. Let $H_1$, $H_2$, $\dots$, $H_\ell$ be the remaining components. Observe that each component $H_i$ has $r$ edges and $r + 1$ vertices, where $r$ is defined in the above claim. Let $r_i$ be the value of $r$ for $H_i$.

Case 1. If $\ell = 1$, then the maximum number of edges in $G$ is $r_i \leq 1000$, contradiction.

Case 2. If $\ell \geq 2$, note that the total number of edges is $\sum_i r_i = \sum_i (|H_i| - 1) \leq a + b - \ell \leq 1000 + 1000 - 2 = 1998$, contradiction.

Since every case yields a contradiction, we're done.
This post has been edited 1 time. Last edited by Scilyse, Jan 23, 2025, 3:03 PM
Reason: fix spacing
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
MaxSze
6 posts
#34
Y by
The answer is $1999$. For $1998$ squares, consider a grid with the left and bottom rows filled except the overlapping corner.

We show that if the statement is false then $n\leq 1998$. We say a row is good if and only if it has at most one black square. Now it is easy to see that if a row is not good, then the columns the black squares occupy cannot have another black square. Thus, if there are $x$ good rows and $1000-x$ not good rows, then in each not good row we have at most $1000-x$ squares in these rows. If good rows have no black squares, the bound is immediate. Otherwise, it occupies at least one column, so there are at most $999$ squares in a not good row. Moreover, there are at most $999$ good rows, so there are at most $999$ black squares in good rows. Concluding we must have $n\leq 1998$.
Z K Y
N Quick Reply
G
H
=
a