Summer is a great time to explore cool problems to keep your skills sharp!  Schedule a class today!

G
Topic
First Poster
Last Poster
k a June Highlights and 2025 AoPS Online Class Information
jlacosta   0
Monday at 3:57 PM
Congratulations to all the mathletes who competed at National MATHCOUNTS! If you missed the exciting Countdown Round, you can watch the video at this link. Are you interested in training for MATHCOUNTS or AMC 10 contests? How would you like to train for these math competitions in half the time? We have accelerated sections which meet twice per week instead of once starting on July 8th (7:30pm ET). These sections fill quickly so enroll today!

[list][*]MATHCOUNTS/AMC 8 Basics
[*]MATHCOUNTS/AMC 8 Advanced
[*]AMC 10 Problem Series[/list]
For those interested in Olympiad level training in math, computer science, physics, and chemistry, be sure to enroll in our WOOT courses before August 19th to take advantage of early bird pricing!

Summer camps are starting this month at the Virtual Campus in math and language arts that are 2 - to 4 - weeks in duration. Spaces are still available - don’t miss your chance to have a transformative summer experience. 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 upcoming events:
[list][*]June 5th, Thursday, 7:30pm ET: Open Discussion with Ben Kornell and Andrew Sutherland, Art of Problem Solving's incoming CEO Ben Kornell and CPO Andrew Sutherland host an Ask Me Anything-style chat. Come ask your questions and get to know our incoming CEO & CPO!
[*]June 9th, Monday, 7:30pm ET, Game Jam: Operation Shuffle!, Come join us to play our second round of Operation Shuffle! If you enjoy number sense, logic, and a healthy dose of luck, this is the game for you. No specific math background is required; all are welcome.[/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, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29
Sunday, Aug 17 - Dec 14
Tuesday, Aug 26 - Dec 16
Friday, Sep 5 - Jan 16
Monday, Sep 8 - Jan 12
Tuesday, Sep 16 - Jan 20 (4:30 - 5:45 pm ET/1:30 - 2:45 pm PT)
Sunday, Sep 21 - Jan 25
Thursday, Sep 25 - Jan 29
Wednesday, Oct 22 - Feb 25
Tuesday, Nov 4 - Mar 10
Friday, Dec 12 - Apr 10

Prealgebra 2 Self-Paced

Prealgebra 2
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21
Sunday, Aug 17 - Dec 14
Tuesday, Sep 9 - Jan 13
Thursday, Sep 25 - Jan 29
Sunday, Oct 19 - Feb 22
Monday, Oct 27 - Mar 2
Wednesday, Nov 12 - Mar 18

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28
Sunday, Aug 17 - Dec 14
Wednesday, Aug 27 - Dec 17
Friday, Sep 5 - Jan 16
Thursday, Sep 11 - Jan 15
Sunday, Sep 28 - Feb 1
Monday, Oct 6 - Feb 9
Tuesday, Oct 21 - Feb 24
Sunday, Nov 9 - Mar 15
Friday, Dec 5 - Apr 3

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 2 - Sep 17
Sunday, Jul 27 - Oct 19
Monday, Aug 11 - Nov 3
Wednesday, Sep 3 - Nov 19
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Friday, Oct 3 - Jan 16
Tuesday, Nov 4 - Feb 10
Sunday, Dec 7 - Mar 8

Introduction to Number Theory
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30
Wednesday, Aug 13 - Oct 29
Friday, Sep 12 - Dec 12
Sunday, Oct 26 - Feb 1
Monday, Dec 1 - Mar 2

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14
Thursday, Aug 7 - Nov 20
Monday, Aug 18 - Dec 15
Sunday, Sep 7 - Jan 11
Thursday, Sep 11 - Jan 15
Wednesday, Sep 24 - Jan 28
Sunday, Oct 26 - Mar 1
Tuesday, Nov 4 - Mar 10
Monday, Dec 1 - Mar 30

Introduction to Geometry
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19
Wednesday, Aug 13 - Feb 11
Tuesday, Aug 26 - Feb 24
Sunday, Sep 7 - Mar 8
Thursday, Sep 11 - Mar 12
Wednesday, Sep 24 - Mar 25
Sunday, Oct 26 - Apr 26
Monday, Nov 3 - May 4
Friday, Dec 5 - May 29

Paradoxes and Infinity
Mon, Tue, Wed, & Thurs, Jul 14 - Jul 16 (meets every day of the week!)

Intermediate: Grades 8-12

Intermediate Algebra
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
Friday, Aug 8 - Feb 20
Tuesday, Aug 26 - Feb 24
Sunday, Sep 28 - Mar 29
Wednesday, Oct 8 - Mar 8
Sunday, Nov 16 - May 17
Thursday, Dec 11 - Jun 4

Intermediate Counting & Probability
Sunday, Jun 22 - Nov 2
Sunday, Sep 28 - Feb 15
Tuesday, Nov 4 - Mar 24

Intermediate Number Theory
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3
Wednesday, Sep 24 - Dec 17

Precalculus
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8
Wednesday, Aug 6 - Jan 21
Tuesday, Sep 9 - Feb 24
Sunday, Sep 21 - Mar 8
Monday, Oct 20 - Apr 6
Sunday, Dec 14 - May 31

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Wednesday, Jun 25 - Dec 17
Sunday, Sep 7 - Mar 15
Wednesday, Sep 24 - Apr 1
Friday, Nov 14 - May 22

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
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!)
Sunday, Aug 17 - Nov 9
Wednesday, Sep 3 - Nov 19
Tuesday, Sep 16 - Dec 9
Sunday, Sep 21 - Dec 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Oct 6 - Jan 12
Thursday, Oct 16 - Jan 22
Tues, Thurs & Sun, Dec 9 - Jan 18 (meets three times a week!)

MATHCOUNTS/AMC 8 Advanced
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)
Sunday, Aug 17 - Nov 9
Tuesday, Aug 26 - Nov 11
Thursday, Sep 4 - Nov 20
Friday, Sep 12 - Dec 12
Monday, Sep 15 - Dec 8
Sunday, Oct 5 - Jan 11
Tues, Thurs & Sun, Dec 2 - Jan 11 (meets three times a week!)
Mon, Wed & Fri, Dec 8 - Jan 16 (meets three times a week!)

AMC 10 Problem Series
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!)
Sunday, Aug 10 - Nov 2
Thursday, Aug 14 - Oct 30
Tuesday, Aug 19 - Nov 4
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Mon, Wed & Fri, Oct 6 - Nov 3 (meets three times a week!)
Tue, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 10 Final Fives
Monday, Jun 30 - Jul 21
Friday, Aug 15 - Sep 12
Sunday, Sep 7 - Sep 28
Tuesday, Sep 9 - Sep 30
Monday, Sep 22 - Oct 13
Sunday, Sep 28 - Oct 19 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, Oct 8 - Oct 29
Thursday, Oct 9 - Oct 30

AMC 12 Problem Series
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22
Sunday, Aug 10 - Nov 2
Monday, Aug 18 - Nov 10
Mon & Wed, Sep 15 - Oct 22 (meets twice a week!)
Tues, Thurs & Sun, Oct 7 - Nov 2 (meets three times a week!)

AMC 12 Final Fives
Thursday, Sep 4 - Sep 25
Sunday, Sep 28 - Oct 19
Tuesday, Oct 7 - Oct 28

AIME Problem Series A
Thursday, Oct 23 - Jan 29

AIME Problem Series B
Sunday, Jun 22 - Sep 21
Tuesday, Sep 2 - Nov 18

F=ma Problem Series
Wednesday, Jun 11 - Aug 27
Tuesday, Sep 16 - Dec 9
Friday, Oct 17 - Jan 30

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
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
Thursday, Aug 14 - Oct 30
Sunday, Sep 7 - Nov 23
Tuesday, Dec 2 - Mar 3

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22
Friday, Oct 3 - Jan 16

USACO Bronze Problem Series
Sunday, Jun 22 - Sep 1
Wednesday, Sep 3 - Dec 3
Thursday, Oct 30 - Feb 5
Tuesday, Dec 2 - Mar 3

Physics

Introduction to Physics
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15
Tuesday, Sep 2 - Nov 18
Sunday, Oct 5 - Jan 11
Wednesday, Dec 10 - Mar 11

Physics 1: Mechanics
Monday, Jun 23 - Dec 15
Sunday, Sep 21 - Mar 22
Sunday, Oct 26 - Apr 26

Relativity
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Monday at 3:57 PM
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
f this \8char
v4913   30
N 17 minutes ago by eg4334
Source: EGMO 2022/2
Let $\mathbb{N}=\{1, 2, 3, \dots\}$ be the set of all positive integers. Find all functions $f : \mathbb{N} \rightarrow \mathbb{N}$ such that for any positive integers $a$ and $b$, the following two conditions hold:
(1) $f(ab) = f(a)f(b)$, and
(2) at least two of the numbers $f(a)$, $f(b)$, and $f(a+b)$ are equal.
30 replies
v4913
Apr 9, 2022
eg4334
17 minutes ago
Weird length condition
Taco12   16
N an hour ago by lpieleanu
Source: USA January Team Selection Test for EGMO 2023, Problem 4
Let $ABC$ be a triangle with $AB+AC=3BC$. The $B$-excircle touches side $AC$ and line $BC$ at $E$ and $D$, respectively. The $C$-excircle touches side $AB$ at $F$. Let lines $CF$ and $DE$ meet at $P$. Prove that $\angle PBC = 90^{\circ}$.

Ray Li
16 replies
Taco12
Jan 16, 2023
lpieleanu
an hour ago
ABC is similar to XYZ
Amir Hossein   56
N an hour ago by lksb
Source: China TST 2011 - Quiz 2 - D2 - P1
Let $AA',BB',CC'$ be three diameters of the circumcircle of an acute triangle $ABC$. Let $P$ be an arbitrary point in the interior of $\triangle ABC$, and let $D,E,F$ be the orthogonal projection of $P$ on $BC,CA,AB$, respectively. Let $X$ be the point such that $D$ is the midpoint of $A'X$, let $Y$ be the point such that $E$ is the midpoint of $B'Y$, and similarly let $Z$ be the point such that $F$ is the midpoint of $C'Z$. Prove that triangle $XYZ$ is similar to triangle $ABC$.
56 replies
Amir Hossein
May 20, 2011
lksb
an hour ago
Cubes and squares
y-is-the-best-_   61
N 2 hours ago by ezpotd
Source: IMO 2019 SL N2
Find all triples $(a, b, c)$ of positive integers such that $a^3 + b^3 + c^3 = (abc)^2$.
61 replies
y-is-the-best-_
Sep 22, 2020
ezpotd
2 hours ago
Chess game challenge
adihaya   21
N 2 hours ago by Mr.Sharkman
Source: 2014 BAMO-12 #5
A chess tournament took place between $2n+1$ players. Every player played every other player once, with no draws. In addition, each player had a numerical rating before the tournament began, with no two players having equal ratings. It turns out there were exactly $k$ games in which the lower-rated player beat the higher-rated player. Prove that there is some player who won no less than $n-\sqrt{2k}$ and no more than $n+\sqrt{2k}$ games.
21 replies
adihaya
Feb 22, 2016
Mr.Sharkman
2 hours ago
[ELMO2] The Multiplication Table
v_Enhance   27
N 2 hours ago by Mr.Sharkman
Source: ELMO 2015, Problem 2 (Shortlist N1)
Let $m$, $n$, and $x$ be positive integers. Prove that \[ \sum_{i = 1}^n \min\left(\left\lfloor \frac{x}{i} \right\rfloor, m \right) = \sum_{i = 1}^m \min\left(\left\lfloor \frac{x}{i} \right\rfloor, n \right). \]
Proposed by Yang Liu
27 replies
v_Enhance
Jun 27, 2015
Mr.Sharkman
2 hours ago
Problem 1
randomusername   74
N 3 hours ago by Mr.Sharkman
Source: IMO 2015, Problem 1
We say that a finite set $\mathcal{S}$ of points in the plane is balanced if, for any two different points $A$ and $B$ in $\mathcal{S}$, there is a point $C$ in $\mathcal{S}$ such that $AC=BC$. We say that $\mathcal{S}$ is centre-free if for any three different points $A$, $B$ and $C$ in $\mathcal{S}$, there is no points $P$ in $\mathcal{S}$ such that $PA=PB=PC$.

(a) Show that for all integers $n\ge 3$, there exists a balanced set consisting of $n$ points.

(b) Determine all integers $n\ge 3$ for which there exists a balanced centre-free set consisting of $n$ points.

Proposed by Netherlands
74 replies
randomusername
Jul 10, 2015
Mr.Sharkman
3 hours ago
Find Triples of Integers
termas   41
N 3 hours ago by ilikemath247365
Source: IMO 2015 problem 2
Find all positive integers $(a,b,c)$ such that
$$ab-c,\quad bc-a,\quad ca-b$$are all powers of $2$.

Proposed by Serbia
41 replies
termas
Jul 10, 2015
ilikemath247365
3 hours ago
DO NOT OVERSLEEP JOHN MACKEY’S CLASS
ike.chen   31
N 3 hours ago by Mr.Sharkman
Source: USA TSTST 2023/4
Let $n\ge 3$ be an integer and let $K_n$ be the complete graph on $n$ vertices. Each edge of $K_n$ is colored either red, green, or blue. Let $A$ denote the number of triangles in $K_n$ with all edges of the same color, and let $B$ denote the number of triangles in $K_n$ with all edges of different colors. Prove
\[ B\le 2A+\frac{n(n-1)}{3}.\](The complete graph on $n$ vertices is the graph on $n$ vertices with $\tbinom n2$ edges, with exactly one edge joining every pair of vertices. A triangle consists of the set of $\tbinom 32=3$ edges between $3$ of these $n$ vertices.)

Proposed by Ankan Bhattacharya
31 replies
ike.chen
Jun 26, 2023
Mr.Sharkman
3 hours ago
Grade IX - Problem I
icx   23
N 3 hours ago by shendrew7
Source: Romanian National Mathematical Olympiad 2007
Let $a, b, c, d \in \mathbb{N^{*}}$ such that the equation \[x^{2}-(a^{2}+b^{2}+c^{2}+d^{2}+1)x+ab+bc+cd+da=0 \] has an integer solution. Prove that the other solution is integer too and both solutions are perfect squares.
23 replies
icx
Apr 13, 2007
shendrew7
3 hours ago
USAMO 2002 Problem 2
MithsApprentice   35
N 3 hours ago by sami1618
Let $ABC$ be a triangle such that
\[ \left( \cot \dfrac{A}{2} \right)^2 + \left( 2\cot \dfrac{B}{2} \right)^2 + \left( 3\cot \dfrac{C}{2} \right)^2 = \left( \dfrac{6s}{7r} \right)^2,  \]
where $s$ and $r$ denote its semiperimeter and its inradius, respectively. Prove that triangle $ABC$ is similar to a triangle $T$ whose side lengths are all positive integers with no common divisors and determine these integers.
35 replies
1 viewing
MithsApprentice
Sep 30, 2005
sami1618
3 hours ago
Center lies on altitude
plagueis   17
N 4 hours ago by bin_sherlo
Source: Mexico National Olympiad 2018 Problem 6
Let $ABC$ be an acute-angled triangle with circumference $\Omega$. Let the angle bisectors of $\angle B$ and $\angle C$ intersect $\Omega$ again at $M$ and $N$. Let $I$ be the intersection point of these angle bisectors. Let $M'$ and $N'$ be the respective reflections of $M$ and $N$ in $AC$ and $AB$. Prove that the center of the circle passing through $I$, $M'$, $N'$ lies on the altitude of triangle $ABC$ from $A$.

Proposed by Victor Domínguez and Ariel García
17 replies
plagueis
Nov 6, 2018
bin_sherlo
4 hours ago
IMO Shortlist 2014 C6
hajimbrak   22
N 4 hours ago by awesomeming327.
We are given an infinite deck of cards, each with a real number on it. For every real number $x$, there is exactly one card in the deck that has $x$ written on it. Now two players draw disjoint sets $A$ and $B$ of $100$ cards each from this deck. We would like to define a rule that declares one of them a winner. This rule should satisfy the following conditions:
1. The winner only depends on the relative order of the $200$ cards: if the cards are laid down in increasing order face down and we are told which card belongs to which player, but not what numbers are written on them, we can still decide the winner.
2. If we write the elements of both sets in increasing order as $A =\{ a_1 , a_2 , \ldots, a_{100} \}$ and $B= \{ b_1 , b_2 , \ldots , b_{100} \}$, and $a_i > b_i$ for all $i$, then $A$ beats $B$.
3. If three players draw three disjoint sets $A, B, C$ from the deck, $A$ beats $B$ and $B$ beats $C$ then $A$ also beats $C$.
How many ways are there to define such a rule? Here, we consider two rules as different if there exist two sets $A$ and $B$ such that $A$ beats $B$ according to one rule, but $B$ beats $A$ according to the other.

Proposed by Ilya Bogdanov, Russia
22 replies
hajimbrak
Jul 11, 2015
awesomeming327.
4 hours ago
annoying algebra with sequence :/
tabel   1
N 4 hours ago by L_.
Source: random 9th grade text book (section meant for contests)
Let \( a_1 = 1 \) and \( a_{n+1} = 1 + \frac{n}{a_n} \) for \( n \geq 1 \). Prove that the sequence \( (a_n)_{n \geq 1} \) is increasing.
1 reply
tabel
Yesterday at 4:55 PM
L_.
4 hours ago
flipping rows on a matrix in F2
danepale   17
N Apr 26, 2025 by eg4334
Source: Croatia TST 2016
Let $N$ be a positive integer. Consider a $N \times N$ array of square unit cells. Two corner cells that lie on the same longest diagonal are colored black, and the rest of the array is white. A move consists of choosing a row or a column and changing the color of every cell in the chosen row or column.
What is the minimal number of additional cells that one has to color black such that, after a finite number of moves, a completely black board can be reached?
17 replies
danepale
Apr 27, 2016
eg4334
Apr 26, 2025
flipping rows on a matrix in F2
G H J
Source: Croatia TST 2016
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
danepale
99 posts
#1 • 3 Y
Y by nguyendangkhoa17112003, Adventure10, Mango247
Let $N$ be a positive integer. Consider a $N \times N$ array of square unit cells. Two corner cells that lie on the same longest diagonal are colored black, and the rest of the array is white. A move consists of choosing a row or a column and changing the color of every cell in the chosen row or column.
What is the minimal number of additional cells that one has to color black such that, after a finite number of moves, a completely black board can be reached?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shinichiman
3212 posts
#2 • 9 Y
Y by baopbc, ineX, NTA1907, jev2001, tpdtthltvp, cookie112, bluedragon17, Adventure10, KK_1729
Answer

Solution
This post has been edited 4 times. Last edited by shinichiman, Apr 28, 2016, 1:08 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
SFScoreLow
91 posts
#3 • 2 Y
Y by vjdjmathaddict, Adventure10
Inductive solution. We prove that at least $2N-4$ additional squares must be colored black. Number the rows $1$ to $N$ from bottom to top and columns $1$ to $N$ from left to right. Initially cells $(1,1)$ and $(N, N)$ are black.

Lemma. Every $2 \times 2$ square must contain an even number of black squares to begin with.
Proof. A move does not change the parity of the number of black squares within a $2 \times 2$ square since we either change $1, -1 \longleftrightarrow -1, 1$ or $1, 1 \longleftrightarrow -1, -1$. $\blacksquare$

Let $(i, j)_S$ denote the square containing cells $(i, j), (i+1, j), (i, j+1), (i+1, j+1)$.

Finally, proceed by induction. Base case $N = 2$ is trivial. Consider an $N \times N$ board. The squares $(1,1)_S$ and $(N-1, N-1)_S$ must contain at least one other black cell. Suppose cell $(2,2)$ (or $(N-1, N-1)$ symmetrically) is colored. If there are two black cells in the first row or first column, we can invoke the induction hypothesis to get that there are at least $2(N-1) - 2 + 2 = 2N-2$ black cells on the board to begin with. If, collectively, row $1$ and column $1$ contain only one black cell (on $(1,1)$) we can consider the two sequence of squares $(1, 2)_S \rightarrow (1,3)_S \rightarrow \cdots \rightarrow (1, N-1)_S$ and $(2,1)_S \rightarrow (3, 1)_S \rightarrow \cdots \rightarrow (N-1, 1)_S$ to get that there are at least $2(N-1)+1 = 2N-1$ black squares on the board. So we can assume that neither $(2,2)$ nor $(N-1, N-1)$ are colored.

WLOG $(1,2)$ is colored black. If $(N, N-1)$ is also coloured, we consider $(1, 2)_S \rightarrow (1,3)_S \rightarrow \cdots \rightarrow (1, N-1)_S$ and $(N-1,N-2)_S \rightarrow (N-1, N-3)_S \rightarrow \cdots \rightarrow (N-1, 1)_S$ to get that there are at least $2N$ black squares (each square in the sequences above 'adds' a black cell, creating a snake-like pattern extending across the board. Note that by adding a black cell to $(1, k)_S$ we also add one to $(1, k+1)_S$ because otherwise $(2,2)$ must be colored black). Hence (since $(N, N-1)$ and $(N-1, N-1)$ are both white) $(N-1, N)$ is colored black. This allows us to consider $(1, 2)_S \rightarrow (1,3)_S \rightarrow \cdots \rightarrow (1, N-2)_S$ and $(N-1, N-1)_S \rightarrow (N-2, N-1) \rightarrow \cdots \rightarrow (2, N-1)$ to conclude that at least $2(N-1) = 2N-2$ squares are colored unless the cell $(2, N-1)$, the overlap of $(1, N-2)_S$ and $(2, N-1)_S$, is black. But then cell $(1, N)$ must be colored black so that $(1, N-1)_S$ contains two black cells. In all cases we must have at least $2N-2$ squares colored black in order for the procedure to work. The construction is noted in the post above.
This post has been edited 3 times. Last edited by SFScoreLow, Apr 30, 2016, 1:48 AM
Reason: typos
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
v_Enhance
6882 posts
#4 • 9 Y
Y by Mathematicsislovely, CALCMAN, v4913, hakN, Executioner230607, HamstPan38825, Mango247, Mango247, MS_asdfgzxcvb
Solution from Twitch Solves ISL:

The answer is $2n-4$ additional cells.

We'll do the usual reduction: all the moves commute with each other and doing the same move twice does nothing. Also, it'll be more natural to get from all-white to the ``starting'' state; we'll do so as they are equivalent anyways.

Thus, we may as well assume (by permuting rows/columns)
  • we operated on the first $a$ rows;
  • we operated on the first $b$ columns.
The given hypothesis is equivalent to saying that if we do this operation on an initially empty board, then we got $k$ black cells, and at least two of them are not in the same row or column. The problem asks for the smallest possible value of $k-2$.
However, the point is that we have the explicit value \[ k = a(n-b) + b(n-a). \]It will be more economical actually to write \[ n^2 - k = ab + (n-a)(n-b) 	\le \sqrt{ \left( a^2+(n-a)^2 \right) 	\left( b^2+(n-b)^2 \right)}. \]We now analyze two cases:
  • If any of $a$ or $b$ are $0$ or $n$, we may directly check we need $k \ge 2n$ in order to have two black cells not in the same row or column.
  • Otherwise, $x^2 + (n-x)^2 \le 1 + (n-1)^2$ for $1 \le x \le n-1$, so \[ n^2 - k \le 1^2 + (n-1)^2 \]which means $k \ge 2n-2$.
In conclusion, $k-2 \ge 2n-4$; and moreover equality occurs at $a=b=1$, which is checked to indeed work.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
bluedragon17
87 posts
#5
Y by
This is a very badly written solution, I am sorry for that :( . Also, my solution is almost the same solution as shinichiman's but I did not use the notation he used.
The answer is $2N-4$.

$N=2$ is trivial, so we let $N\ge3$.
Let $a_{k}$ be the number of times we change the colors in the $k$th column(and similarly $b_k$ for the rows.) For any cell $(i,j)$ we have,
$\Rightarrow a_{i} + b_{j} = 2k$ (if $(i,j)$ is black)
or
$\Rightarrow a_{i} + b_{j}= 2k+1$ (if $(i,j)$ is white )

$\textbf{Case:1}$ There is exactly one black cell in the first column.

So except for this cell, $a_1 + b_j$ is odd for all $j>1$. But since $(n,n)$ is initially black, we need all of the cells in the $n$th column to be black which gives us $N-2$ more cells( $b_j$ have the same parity). Also, notice that for any $k$th row, $a_k+b_j$ has the same parity, so initially, they are either all black or all white. (leaving the first cell in all the columns). To minimize we keep $1$ black cell in all these columns, so we get another $N-2$ from here giving us a total of $2N-4$ $\blacksquare$

$\textbf{Case:2}$ There is more than one black cell in the first column.

$a_1+b_j$ is again odd, so $b_j$ has the same parity but only for the black cells and of course, $j>1$.. So all the cells in the rows of these black cells are either all black or all white, we set all of them to be white to minimize. Thus, if we have $k\geq2$ additional black cells in the first column, we basically have $N-k$ additional black cells in the rest of the columns except for the last one. Using the same parity argument for the last column, we see that we atleast need $k-2$ additional black cells taking account of the fact that $(N,N)$ is already black.
$\Rightarrow$$k+(N-2)(N-k) + k-1 \geq k + 2(N-2) + k-2 > 2N-4$ $\blacksquare$
This post has been edited 4 times. Last edited by bluedragon17, Apr 13, 2022, 12:46 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Mogmog8
1080 posts
#6 • 1 Y
Y by centslordm
Denote the square in the $i$th row and $j$th column as $(i,j)$. WLOG let $(1,1)$ and $(n,n)$ be the diagonally painted squares. We claim the answer is $2n-4$, which works when we paint the symmetric difference of the first column and last row. Swapping the last row and all the columns after the first gives a fully painted grid.

If we end up swapping $a$ rows and $b$ columns, we begin with $ab+(n-a)(n-b)$ painted squares. This is because $(i,j)$ must begin painted if and only if both row $i$ and column $j$ are swapped or they are both not swapped.

Consider when $a=0$. Then, we cannot swap the first or last column since $(1,1)$ and $(n,n)$ need to be swapped an even number of times. Hence, all of the first and last column need to be painted, resulting in at least $2n$ painted squares. If $a=n$, we must paint the first and last column so we again have at least $2n$ painted squares. Similarly, $b=0$ and $b=n$ yield at least $2n$ painted squares.

We claim that $ab+(n-a)(n-b)\ge 2n-2$ when $0<a,b<n$. Indeed, \[0\le (n-a-b)^2=[n^2+2ab-n(a+b)]-[n(a+b)-a^2-b^2]\]so \begin{align*}[ab+(n-a)(n-b)]-[2n-2]&=2ab+n^2-n(a+b)-2n+2\\&\ge n(a+b)-a^2-b^2-2n+2\\&=[n(a-1)-a^2+1]+[n(b-1)-b^2+1]\\&=(n-a-1)(a-1)+(n-b-1)(b-1)\\&\ge 0\end{align*}as desired. $\square$
This post has been edited 1 time. Last edited by Mogmog8, Feb 24, 2023, 8:54 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
HamstPan38825
8877 posts
#7
Y by
The answer is $2n-4$. For a construction, color one row that contains one of the corner squares black, a column that contains the other corner square black, and their intersection white. We will look at the problem backwards, where we start from a completely black grid and attempt to leave as minimal black squares left as possible via valid operations.

Claim. Suppose that $k \geq n-1$ rows and columns that are not along the periphery of the grid are chosen. Then the number of intersection points between these rows and columns is at least $(n-2)(k-n+2)$.

Proof. Tautological. $\blacksquare$

Thus, if $k \geq n-1$ rows and columns are chosen, the number of white squares (squares toggled exactly once) within the interior $(n-2) \times (n-2)$ square is at most $(n-2)^2-(n-2)(k-n+2) = (n-2)(2n-4-k)$.

On the other hand, the number of squares that are now white that share a row or column with each one of the corner squares is precisely $k$ respectively. Thus, we can guarantee at most $\text{max}(k, 2n-2-k) = k$ more white squares among the non-corner periphery squares, as both of the edge rows and columns can be toggled or neither can be toggled to keep the corner square black. (Note that the two other corners can be made white.) As a result, the total number of white squares is at most $$N = (n-2)(2n-k) + 2k + 2 = n(n-2) + 2 - (n-4)(k-n+2) \leq n^2-2n+2.$$This proves the bound for $k \geq n-1$; if $k \leq n-2$, the total number of toggled squares is obviously at most $n^2-2n$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
pinkpig
3761 posts
#8
Y by
solution
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
joshualiu315
2534 posts
#9
Y by
For this solution, denote $(i,j)$ as the square in the $i$th row and $j$th column; we will consider getting from the all-white state to our starting position as it is easier to work with.

The answer is $\boxed{2n-4}$. Letting the original shaded squares be $(1,1)$ and $(n,n)$, the optimal coloring being the symmetric difference of row $1$ and column $n$.

For simplicity, denote each row/column as \textit{toggled} if it differs from its original state and \textit{original} otherwise. Suppose we toggle $a$ rows and $b$ columns. For $(i,j)$, ending up as a white square in the starting position requires both row $i$ and column $j$ to either be both toggled or both original, hence the number of black squares in the starting position is

\[n^2-ab+(n-a)(n-b) \ge n^2-\sqrt{(a^2+(n-a)^2)(b^2+(n-b)^2)}\]
where the inequality follows by Cauchy. Then, it follows that the RHS is optimized at $a=b=1$, which corresponds to $2n-2$ squares starting out black. Taking away the corners gives our desired minimum.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
dolphinday
1329 posts
#10
Y by
All moves are commutative, so we only need to invert rows and columns at most once, and order doesn't matter.
$\newline$
Consider starting from an all-white position, and inverting to our starting position.
$\newline$
If we invert $a$ rows and $b$ columns, then the total number of black squares in our starting position is $n^2- (ab + (n - a)(n - b))$, because a square is left white(and needs to be colored black) if it is inverted $0$ times or $2$ times.
Our goal is to minimize $ab + (n - a)(n - b)$.
$\newline$
Note that \[(ab + (n - a)(n - b)) \leq \sqrt{(a^2 + (n - a)^2)(b^2 + (n - a)^2}\]\[\sqrt{(a^2 + (n - a)^2)(b^2 + (n - a)^2} \geq \sqrt{(1^2 + (n - 1)^2)(1^2 + (n - 1)^2} = n^2 - 2n + 2\].
\[n^2 - (n^2 - 2n + 2) = 2n - 2\].
Subtracting two(because the corner cells are already filled in) gives us $2n - 4$ which is achievable by coloring $n - 2$ cells on the bottom row(without coloring in the corner cell) and then coloring $n - 2$ cells on the left column without coloring in the corner cell.
$\newline$
Swapping the bottom row and then the leftmost column makes everything white, and from there it is easy to swap to make everything black.
This post has been edited 1 time. Last edited by dolphinday, Jan 6, 2024, 3:27 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
shendrew7
802 posts
#11
Y by
Noting that operations are commutable and that it is useless to operate on a single row/column multiple times, suppose we operate on $x$ rows and $y$ columns, where $0 \leq x, y \leq n$. Then the number of squares toggled an even number of times is
\[ab + (n-a)(n-b) = n^2-(a+b)n+2ab,\]
or the number of originally black squares. To minimize this expression, note $(x,y) = (0,n)$ fails, so the next best we can do is $(x,y)=(1,n-1)$, which is easy to construct. Thus our answer is
\[\left(n^2-n \cdot n + 2(n-1)\right) - 2 = \boxed{2n-4}.\]
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
two_steps
102 posts
#12
Y by
is this correct?

Let $a_{i,j} \in \{0,1\}$ refer to the color of the cell at the $i$th row $j$th column, where $1$ is black and $0$ is white. A move is equivalent to adding one to each cell of a row/column modulo $2$. Note that applying the move to the same row/column twice is pointless, and the order of the moves doesn't matter. Next, observe that once we've determined whether the first row is flipped, we also determine whether each of the columns are flipped. (If $a_{1,j}$ is currently white, we must flip column $j$, and otherwise, we don't.) Once we apply these determined moves, each row must be monochromatic (since we've determined everything else).

Let row $1$ have $k$ black cells after we've determined if it's flipped. Then, we'd have to flip $n-k$ columns. For each row, the flipped cells and not flipped cells must initially have different colors in order for the rows to be monochromatic after applying the column moves. Thus, there are either $k$ or $n-k$ black cells in each row (including the first). For a fixed $2\le k\le n-2$, the least number of additional black cells is
\[n\min\{k,n-k\}-2\ge 2n-2\]For $k=1$ or $n-1$, we actually can't achieve $n$ since it would imply that the original configuration solely consists of the first column black. The next smallest value is
\[(n-1) + \underbrace{1 + \cdots + 1}_{n-1} - 2 = 2n-4\]For $k=0$ or $n$, the original configuration would consist of monochromatic rows, yielding a minimum of $2n$. Overall, the minimum is $2n-4$. This may be achieved by coloring $a_{1,k}$ and $a_{k, n}$ black for $2\le k \le n-1$.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
peace09
5425 posts
#13
Y by
Posting solely to commemorate the remarkable idiocy of my solution... I guess that's what happens when you spend less than 25% of the last week asleep :coolspeak:

One can reduce any sequence of moves to the states of $2n$ toggles, one for each row and column. The corners being black implies that exactly one of $r_1,c_1$ and exactly one of $r_n,c_n$ are toggled. Whence the answer is $\boxed{2n-4}$ by toggling $r_1,c_n$ (Case 1), in which case optimality follows since pairs of non-vertex points on opposite sides are of opposite states. If $r_1,r_n$ are toggled (or $c_1,c_n$ but WLOG let it be the former; Case 2), ... let's do something silly: label a row by $1$ if it is untoggled and $i$ if it toggled, and let each cell be the product of its row and column. If $r_u$ is the number of untoggled rows and so on, we want to min
\[\text{Im}((r_u+r_ti)(c_u+c_ti))=r_uc_t+r_tc_u.\]Here in Case 2, we have $r_t,c_u\ge2$, at which point the minimum is clearly $2n\ge2n-4$ at, say, $(0,n,n-2,2)$.
This post has been edited 2 times. Last edited by peace09, Apr 27, 2024, 8:16 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
blueprimes
363 posts
#14
Y by
For $N = 1$ the answer is trivially $0$. For $N \ge 2$ we claim the answer is $2N - 4$.

For construction, define column $i$ as the column with $i - 1$ columns to the left of it. Define similarly for rows from the bottom. Then assign each cell a coordinate $(i, j)$ on column $i$ and row $j$. WLOG $(1, 1)$ and $(N, N)$ are black. Then color $(i, j)$ black if $1 \le i \le N - 1, j = 0$ or $i = N, 1 \le j \le N - 1$. Note that this configuration is valid as we can toggle the columns $1, 2, \dots, N - 1$ and row $1$ which turns it all black.

To show it is the actual minimum, consider the all-black array. It suffices to show that if we toggle rows/columns that leaves two opposite corners black, then there must be at least $2N - 2$ black cells on the array. Suppose we toggle $1 \le r \le N$ rows and $1 \le c \le N$ columns, there will be
$$rc + (N - r)(N - c) = 2rc - N(r + c) + N^2 = \frac{(2r - N)(2c - N) + N^2}{2}$$black cells. WLOG $r \ge c$. Then $(2r - N, 2c - N) = (N, -N), (N - 2, -N), (N - 2, -N + 2) \implies (r, c) = (N, 0), (N - 1, 0), (N - 1, 1)$ generate the three smallest possible values of the above quantity in order. Clearly toggling $N$ or $N - 1$ rows cannot form two opposite black corners, but $(N - 1, 1)$ has a valid construction (we described it earlier.) Hence plugging in we have
$$(\text{number of black cells}) \ge \frac{(N - 2)(-N + 2) + N^2}{2} = \frac{4N - 4}{2} = 2N - 2$$and we are done.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
EpicBird08
1757 posts
#15
Y by
My solution is different from the rest of the solutions on this thread, would appreciate if someone could check it. :)

Assume that the two diagonally black corners are in the top left and bottom right. The problem is equivalent to coloring the entire grid white as we can then flip the color of every row to get an entirely black grid.

The answer is $\boxed{2n-4}.$ For the construction, we color all the edge pieces on the top and right edges of our grid black, giving $2n - 4$ additional black squares colored. This can be turned into the grid with all black squares as we flip the color of the first row and the last column to get an entirely white grid.

Now we will show that we cannot do better. Assume for the sake of contradiction that at most $2n-5$ additional black squares can be colored so that the grid can be made entirely white. Notice that flipping the color of any row or column twice will do nothing, so we can assume that we flip the color of any row or column at most once.

To turn the bottom right black square into a white square, we must flip the color of exactly one of the last row or the last column. Without loss of generality, suppose that we flip the color of the last row. Then the bottom left corner is now colored black, so we must flip the color of the first column to make it white. Since we use at most $2n-5$ additional black squares and there are $2n-4$ edge squares which we flipped the color of, there is at least one edge square at this point which is now black. Suppose that this edge square is on the bottom row. Since we already flipped the bottom row, we must flip the color of the column of this black square. The result is a shaded square on the top edge. Since we already flipped the column of this new square, we must flip the top row of the grid, which shades the top left corner black. Since we flipped both the top row and leftmost column of the grid, this is a contradiction, and we are done.
This post has been edited 2 times. Last edited by EpicBird08, Dec 26, 2024, 2:28 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Maximilian113
576 posts
#16
Y by
We claim that the minimum is $2n-4.$ For the construction, pick a corner point not shaded yet and shade everything between this point and a shaded corner, as well as with the other shaded corner. (excluding the endpoints) Then, we can shade the two rows/columns passing through our unshaded corner point to make the entire board white, then we invert the board by inverting every row.

It now suffices to prove the bound. Since every operation is inversible and commutative, it suffices to start from a white board, and find a set of operations that makes at least $2$ squares in two corners black at the end, while minimizing the number of black squares at the end too. Suppose that we toggle $a$ rows and $b$ columns. Then clearly $a+b \geq 2$ in order for it to be possible to choose rows and columns so that the two corner squares are turned black. Similarly we have $a+b \leq n-2.$ Then, observe that after the operations, there are always $na+nb-2ab$ black squares. This also equals $\frac12 \left( n^2-(n-2a)(n-2b) \right).$ It thus suffices to maximize $(n-2a)(n-2b).$ Clearly both of these factors are either positive or negative. If they are both positive, we wish to minimize both $a, b.$ Thus either $(a, b) = (1, 1), (2, 0), (0, 2).$ In the former case we get $2n-2,$ while the other cases yield $n.$ Clearly the maximum is $2n-2$ so in total we would need to add $2n-4$ black squares in the original grid. This result can be similarly found if $(n-2a), (n-2b)$ are both negative. Therefore, the minimum is indeed $2n-4$ black squares.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Marcus_Zhang
980 posts
#17
Y by
Bad write up
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
eg4334
637 posts
#18
Y by
sketch
This post has been edited 1 time. Last edited by eg4334, Apr 26, 2025, 1:27 AM
Z K Y
N Quick Reply
G
H
=
a