G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
4 hours ago
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[/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
4 hours ago
0 replies
k a My Retirement & New Leadership at AoPS
rrusczyk   1571
N Mar 26, 2025 by SmartGroot
I write today to announce my retirement as CEO from Art of Problem Solving. When I founded AoPS 22 years ago, I never imagined that we would reach so many students and families, or that we would find so many channels through which we discover, inspire, and train the great problem solvers of the next generation. I am very proud of all we have accomplished and I’m thankful for the many supporters who provided inspiration and encouragement along the way. I'm particularly grateful to all of the wonderful members of the AoPS Community!

I’m delighted to introduce our new leaders - Ben Kornell and Andrew Sutherland. Ben has extensive experience in education and edtech prior to joining AoPS as my successor as CEO, including starting like I did as a classroom teacher. He has a deep understanding of the value of our work because he’s an AoPS parent! Meanwhile, Andrew and I have common roots as founders of education companies; he launched Quizlet at age 15! His journey from founder to MIT to technology and product leader as our Chief Product Officer traces a pathway many of our students will follow in the years to come.

Thank you again for your support for Art of Problem Solving and we look forward to working with millions more wonderful problem solvers in the years to come.

And special thanks to all of the amazing AoPS team members who have helped build AoPS. We’ve come a long way from here:IMAGE
1571 replies
rrusczyk
Mar 24, 2025
SmartGroot
Mar 26, 2025
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
Problem 4 from IMO 1997
iandrei   28
N 3 minutes ago by akliu
Source: IMO Shortlist 1997, Q4
An $ n \times n$ matrix whose entries come from the set $ S = \{1, 2, \ldots , 2n - 1\}$ is called a silver matrix if, for each $ i = 1, 2, \ldots , n$, the $ i$-th row and the $ i$-th column together contain all elements of $ S$. Show that:

(a) there is no silver matrix for $ n = 1997$;

(b) silver matrices exist for infinitely many values of $ n$.
28 replies
iandrei
Jul 28, 2003
akliu
3 minutes ago
2025 Caucasus MO Seniors P8
BR1F1SZ   1
N 6 minutes ago by sami1618
Source: Caucasus MO
Determine for which integers $n \geqslant 4$ the cells of a $1 \times (2n+1)$ table can be filled with the numbers $1, 2, 3, \dots, 2n + 1$ such that the following conditions are satisfied:
[list=i]
[*]Each of the numbers $1, 2, 3, \dots, 2n + 1$ appears exactly once.
[*]In any $1 \times 3$ rectangle, one of the numbers is the arithmetic mean of the other two.
[*]The number $1$ is located in the middle cell of the table.
[/list]
1 reply
BR1F1SZ
Mar 26, 2025
sami1618
6 minutes ago
Unlimited candy in PAGMO
JuanDelPan   21
N 21 minutes ago by akliu
Source: Pan-American Girls' Mathematical Olympiad 2021, P5
Celeste has an unlimited amount of each type of $n$ types of candy, numerated type 1, type 2, ... type n. Initially she takes $m>0$ candy pieces and places them in a row on a table. Then, she chooses one of the following operations (if available) and executes it:

$1.$ She eats a candy of type $k$, and in its position in the row she places one candy type $k-1$ followed by one candy type $k+1$ (we consider type $n+1$ to be type 1, and type 0 to be type $n$).

$2.$ She chooses two consecutive candies which are the same type, and eats them.

Find all positive integers $n$ for which Celeste can leave the table empty for any value of $m$ and any configuration of candies on the table.

$\textit{Proposed by Federico Bach and Santiago Rodriguez, Colombia}$
21 replies
JuanDelPan
Oct 6, 2021
akliu
21 minutes ago
set with c+2a>3b
VicKmath7   48
N 38 minutes ago by akliu
Source: ISL 2021 A1
Let $n$ be a positive integer. Given is a subset $A$ of $\{0,1,...,5^n\}$ with $4n+2$ elements. Prove that there exist three elements $a<b<c$ from $A$ such that $c+2a>3b$.

Proposed by Dominik Burek and Tomasz Ciesla, Poland
48 replies
VicKmath7
Jul 12, 2022
akliu
38 minutes ago
A property of divisors
rightways   10
N an hour ago by akliu
Source: Kazakhstan NMO 2016, P1
Prove that one can arrange all positive divisors of any given positive integer around a circle so that for any two neighboring numbers one is divisible by another.
10 replies
rightways
Mar 17, 2016
akliu
an hour ago
Famous geo configuration appears on the district MO
AndreiVila   3
N an hour ago by chirita.andrei
Source: Romanian District Olympiad 2025 10.4
Let $ABCDEF$ be a convex hexagon with $\angle A = \angle C=\angle E$ and $\angle B = \angle D=\angle F$.
[list=a]
[*] Prove that there is a unique point $P$ which is equidistant from sides $AB,CD$ and $EF$.
[*] If $G_1$ and $G_2$ are the centers of mass of $\triangle ACE$ and $\triangle BDF$, show that $\angle G_1PG_2=60^{\circ}$.
3 replies
AndreiVila
Mar 8, 2025
chirita.andrei
an hour ago
kind of well known?
dotscom26   2
N an hour ago by alexheinis
Source: MBL
Let $ y_1, y_2, ..., y_{2025}$ be real numbers satisfying
$
y_1^2 + y_2^2 + \cdots + y_{2025}^2 = 1.
$
Find the maximum value of
$
|y_1 - y_2| + |y_2 - y_3| + \cdots + |y_{2025} - y_1|.
$

I have seen many problems with the same structure, Id really appreciate if someone could explain which approach is suitable here
2 replies
dotscom26
Yesterday at 4:11 AM
alexheinis
an hour ago
hard problem
Cobedangiu   0
an hour ago
Let $x,y,z>0$ and $xy+yz+zx=3$ : Prove that :
$\sum  \ \frac{x}{y+z}\ge\sum  \frac{1}{\sqrt{x+3}}$
0 replies
Cobedangiu
an hour ago
0 replies
Ornaments and Christmas trees
Morskow   30
N an hour ago by akliu
Source: Slovenia IMO TST 2018, Day 1, Problem 1
Let $n$ be a positive integer. On the table, we have $n^2$ ornaments in $n$ different colours, not necessarily $n$ of each colour. Prove that we can hang the ornaments on $n$ Christmas trees in such a way that there are exactly $n$ ornaments on each tree and the ornaments on every tree are of at most $2$ different colours.
30 replies
Morskow
Dec 17, 2017
akliu
an hour ago
Informatics Competition (OTIS MOCK AIME 2025 II #11)
YaoAOPS   2
N an hour ago by akliu
Source: OTIS MOCK AIME 2025 II
At an informatics competition each student earns a score in $\{0, 1, \dots, 100\}$ on each of six problems, and their total score is the sum of the six scores (out of $600$). Given two students $A$ and $B$, we write $A \succ B$ if there are at least five problems on which $A$ scored strictly higher than $B$.

Compute the smallest integer $c$ such that the following statement is true: for every integer $n \ge 2$, given students $A_1$, \dots, $A_n$ satisfying $A_1 \succ A_2 \succ \dots \succ A_n$, the total score of $A_n$ is always at most $c$ points more than the total score of $A_1$.

Jiahe Liu
2 replies
YaoAOPS
Jan 22, 2025
akliu
an hour ago
Thanks u!
Ruji2018252   1
N 2 hours ago by alexheinis
Let $a_1,...,a_{2024}\in\mathbb{Z}$ and $1\leqslant a_1\leqslant a_2\leqslant ...\leqslant a_{2024}\leqslant 99$ and
\[P=a_1^2+a_2^2+...+a_{2024}^2-(a_1a_3+a_2a_4+...+a_{2022}a_{2024})\]Find maximum $P$
1 reply
Ruji2018252
Yesterday at 11:51 AM
alexheinis
2 hours ago
Number-erasing game with multiples of 3
p108771953   4
N 2 hours ago by conejita
Source: 2024 Mexican Mathematical Olympiad, Problem 6
Ana and Beto play on a blackboard where all integers from 1 to 2024 (inclusive) are written. On each turn, Ana chooses three numbers $a,b,c$ written on the board and then Beto erases them and writes one of the following numbers:
$$a+b-c, a-b+c, ~\text{or}~ -a+b+c.$$The game ends when only two numbers are left on the board and Ana cannot play. If the sum of the final numbers is a multiple of 3, Beto wins. Otherwise, Ana wins. ¿Who has a winning strategy?
4 replies
p108771953
Nov 6, 2024
conejita
2 hours ago
Another square grid :D
MathLuis   43
N 2 hours ago by akliu
Source: USEMO 2021 P1
Let $n$ be a fixed positive integer and consider an $n\times n$ grid of real numbers. Determine the greatest possible number of cells $c$ in the grid such that the entry in $c$ is both strictly greater than the average of $c$'s column and strictly less than the average of $c$'s row.

Proposed by Holden Mui
43 replies
MathLuis
Oct 30, 2021
akliu
2 hours ago
Number theory
Maaaaaaath   0
2 hours ago
Let $m$ be a positive integer . Prove that there exists infinitely many pairs of positive integers $(x,y)$ such that $\gcd(x,y)=1$ and :

$$xy  |  x^2+y^2+m$$
0 replies
Maaaaaaath
2 hours ago
0 replies
Guess the leader's binary string!
cjquines0   78
N Mar 30, 2025 by de-Kirschbaum
Source: 2016 IMO Shortlist C1
The leader of an IMO team chooses positive integers $n$ and $k$ with $n > k$, and announces them to the deputy leader and a contestant. The leader then secretly tells the deputy leader an $n$-digit binary string, and the deputy leader writes down all $n$-digit binary strings which differ from the leader’s in exactly $k$ positions. (For example, if $n = 3$ and $k = 1$, and if the leader chooses $101$, the deputy leader would write down $001, 111$ and $100$.) The contestant is allowed to look at the strings written by the deputy leader and guess the leader’s string. What is the minimum number of guesses (in terms of $n$ and $k$) needed to guarantee the correct answer?
78 replies
cjquines0
Jul 19, 2017
de-Kirschbaum
Mar 30, 2025
Guess the leader's binary string!
G H J
G H BBookmark kLocked kLocked NReply
Source: 2016 IMO Shortlist C1
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
cjquines0
510 posts
#1 • 13 Y
Y by Davi-8191, tenplusten, MathbugAOPS, Welp..., OlympusHero, mathleticguyyy, centslordm, jhu08, iker_tz, Adventure10, lian_the_noob12, RandomPerson11, NicoN9
The leader of an IMO team chooses positive integers $n$ and $k$ with $n > k$, and announces them to the deputy leader and a contestant. The leader then secretly tells the deputy leader an $n$-digit binary string, and the deputy leader writes down all $n$-digit binary strings which differ from the leader’s in exactly $k$ positions. (For example, if $n = 3$ and $k = 1$, and if the leader chooses $101$, the deputy leader would write down $001, 111$ and $100$.) The contestant is allowed to look at the strings written by the deputy leader and guess the leader’s string. What is the minimum number of guesses (in terms of $n$ and $k$) needed to guarantee the correct answer?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
math163
58 posts
#2 • 6 Y
Y by reveryu, Lemon293, jhu08, Adventure10, Mango247, jkim0656
(redacted)
This post has been edited 5 times. Last edited by math163, Nov 10, 2018, 8:24 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rafayaashary1
2541 posts
#3 • 14 Y
Y by Wave-Particle, Problem_Penetrator, Ankoganit, opptoinfinity, aops29, Lioghte24, jhu08, Pranav1056, 407420, caicasso, Adventure10, Mango247, thesnakeinthebox, MS_asdfgzxcvb
Geometric Solution
This post has been edited 4 times. Last edited by rafayaashary1, Jul 25, 2017, 6:48 PM
Reason: reformatted for legibility :)
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
uraharakisuke_hsgs
365 posts
#4 • 3 Y
Y by jhu08, Adventure10, Mango247
Let $A$ be the number that the team leader choose , and let $S(A)$ be the set of the numbers writen by the deputy leader
For each number $T$ in $S$ , there is a set of $\binom{n}{k}$ elements that contains the numbers that have exacly $k$ digits different from $T$. Let this set be $F(T)$
And , because $A \in F(T)$ $\forall T \in $ $S$ so the intersection of these set is at least 1 . Now we consider 2 cases
Case 1 : $n = 2k$ . Then , let $A'$ be the number that has every digits different from $A$ Let $A = \overline{a_1a_2..a_n}_{(2)}$ and $A' = \overline{b_1b_2...b_n}_{(2)}$
Now for an abitrary numbers $R$ on the paper of the deputy leader , if the digits $a_{i_1} , a_{i_2},..,a_{i_k}$ of $A$ are changed , we change the $k$ digits $b_j (j \neq i_t , t = \overline{1,k})$ of $A'$ then receive the number $T$, which is equal to $R$
Then we have $S(A) = S(A')$ , which implies that the intersection of every $F(T)$ is bigger than $2$, which implies that the contestant must guess at least 2 times
Case 2 : $n \neq 2k$ . Suppose that the contestant must guess more than one time, that means , the intersection of every $F(T)$ is bigger than $1$
This is equivalent to exist a number $B = \overline{b_1b_2..b_n}_{(2)}$ such that for every way to change $k$ digits in $B$ , we can find a way to change $k$ digits in $A$ to receive the same number
If $A,B$ has very digits different. So , we change the $k$ first digits of $B$ and receive number $R$ has $k$ first digits equal to $A$'s, and the last $n-k$ digits are different. Then We must change the last $n-k$ last digits of $A$ to receive the number equal to $R$. Then $k = n-k$ which is a contradiction
If $A,B$ have $t$ equal numbers. For convinient, we move these $t$ digits to the beginning of $A,B$
$A = \overline{a_1a_2...a_tc_1c_2...c_{n-t}}_{(2)}$ and $B = \overline{a_1a_2...a_t(1-c_1)(1-c_2)...(1-c_{n-t})}_{(2)}$
It's clear that $ t \leq k$ , because , if $t > k$ , we change $a_1,...,a_k$ in $B$ so we must also change $a_1,..,a_k$ in $A$
Now , we change $q$ digits $a_1...a_q$ in $A$ for some $q \leq t$, will choose later , and change $k-q$ digits $c_1,...,c_{k-q}$
So $B$ must be changed exacly the digits $a_1,..,a_q$ and $(1-c_{k-q+1}) ,...,(1-c_{n-t})$, which is $n-t-k+2q$. Then $n-t-k+2q = k \implies 2q = 2k+t-n$
So , if $t \leq 1$, we choose $q = 0,1$ then $0 = 2 = 2k+t -n$ which is a contradiction
Then , for $n = 2k$, the contestant need to guess $2$ times ; and for $n \neq 2k$, the contestant only need to guess $1$ time
This post has been edited 2 times. Last edited by uraharakisuke_hsgs, Jul 20, 2017, 6:23 PM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rmtf1111
698 posts
#5 • 5 Y
Y by vsathiam, MathbugAOPS, jhu08, Adventure10, Mango247
Note that you can find the first number of the binary sequence unless $n=2k$. Now we purceed by recursion, if $n=2k$ we will have 2 cases but each of one of this case will reduce to an trivial one because we wont have $n=2k$ anymore. If $n\neq 2k$ then we can avoid the case $'n=2k$, so we are done.
The answers are 2 if n=2k and 1 otherwise
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Kezer
986 posts
#6 • 2 Y
Y by Adventure10, Mango247
That one was also German TSTST #1.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
anything--
11 posts
#8 • 1 Y
Y by Adventure10
Something interesting to think about: Let $k,m$ be positive integers. $A$ has a binary string $S$ of length $2k+1$ and writes down $m$ distinct binary strings that differ from $S$ by at most $k$ positions (this binary string may be identical to $S$). How large must $m$ be (in terms of $k$) such that $B$ is guaranteed to guess the binary string correctly in only 1 attempt? ($A$ may write the strings that makes it difficult for $B$ to guess.)

In a sense, instead of using the full information of all the ${2k+1\choose k}$ strings, how much of these strings are actually necessary?
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
#9 • 2 Y
Y by Adventure10, Mango247
Call a pair of different binary strings of length $n$ $k$-friendly if the set of strings that differ in $k$ positions from one of them is the same as the set of strings that differ in $k$ positions from the other one. Notice that two strings are indistinguishable if and only if they are $k$-friendly.

Claim. Pairs of $k$-friendly strings exist only if $n = 2k$. Moreover, for $n = 2k$, any two $k$-friendly strings differ in every position.

To prove this, consider two $k$-friendly strings $X$ and $Y$. Let them be equal in $a$ positions and differ in $b$ positions. For each non-negative integer $r$ in the interval $[k - b, \min(a, k)]$ consider a string $S_r$ that differs from $X$ in $r$ of the positions where $X$ and $Y$ are equal and in $k - r$ of the positions where $X$ and $Y$ differ, and is equal to $X$ everywhere else. This is possible due to the interval where $r$ belongs. Then $S_r$ differs from $X$ in $k$ positions and thus also from $Y$. We then obtain

$$r + b - (k - r) = k \implies 2k = 2r + b$$
This clearly cannot hold for more than one choice of $r$, as $k$ and $b$ are fixed. Assume that $b \leq k$, then we must have $k - b \geq \min(a, k)$. If $k \leq a$ this gives $b = 0$ and thus $X, Y$ are equal, which is impossible. Thus $a \leq k$ and $n = a + b \leq k$, which contradicts the conditions of the problem. Then $k \leq b$ which implies $k - b \leq 0$, and thus $r = 0$ is a valid choice. As this must be the only choice we obtain $\min(a, k) = 0$ and hence $a = 0$ as $k > 0$. Moreover applying the above equation with $r = 0$ we obtain $b = 2k$ which implies $n = 2k$ as $a = 0$. This completes the proof of the claim.

This instantly implies that the contestant can guess in at most two attempts if $n = 2k$ and in at most one otherwise. As the strings composed of $2k$ zeroes and $2k$ ones are clearly $k$-friendly, two attemps are indeed necessary in the latter case.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
rafayaashary1
2541 posts
#11 • 2 Y
Y by Adventure10, Mango247
What is the fastest algorithm for finding the optimal guess(es)? So far I have the following $\mathcal{O}(n\tbinom{n}{k})$ method in the case that $k\neq 0.5n$:
Quote:
Convert the strings on the board to a set of vectors $H\subset\mathbb R^n$ as in post# 3. Compute $c_H=\frac{1}{|H|}\sum_{s\in H}$. Explicitly write $c_H=(c_1,c_2,\dots,c_n)$. Define $u(x)$ to be $0$ if $x<0.5$ and $1$ if $x>0.5$, and likewise let $u(x)$ be $1$ if $x<0.5$ and $0$ if $x>0.5$. If $k<0.5n$, the leader's string will have its $i^\text{th}$ entry equal to $u(c_i)$. If $k>0.5n$, the leader's string will have its $i^\text{th}$ entry equal to $u'(c_i)$.

There is also an $\mathcal{O}(n^3\tbinom{n}{k})$ algorithm for the case with $k=0.5n$:
Quote:
Choose some string and convert it to a vector $v_0\in\mathbb R^n$. One by one accumulate strings as vectors in $\mathbb R^n$ so that the set $v_1-v_0,v_2-v_0,\dots$ remains linearly independent (this may be checked with gaussian elimination in $\mathcal{O}(d^3)$ time where $d-1$ is the number of accumulated vectors.) Stop when we have $n$ vectors $v_0,v_1,\dots,v_{n-1}$. Overall, this is by far the rate-limiting step.

Now replace $v_i$ with $v_i-v_0$ and save $v_0$ for later. Define $e_j(v_i)$ to be the $j^\text{th}$ entry of $v_i$. Fill the $(n-1)\times (n-1)$ matrix $A$ with entries $a_{ij}=e_{j}(v_i)$. Fill the vector $b\in\mathbb R^{n-1}$ so that $e_i(b)=-e_n(v_i)$. Solve $Ax=b$ with gaussian elimination. Construct $s\in\mathbb R^n$ satisfying $e_i(s)=e_i(x)$ for $1\leq i<n$ and $e_n(s)=1$. Use $s$ to create $s_1,s_2\in\mathbb R^n$ so that $e_i(s_1)=0.5+0.5e_i(x)$ and $e_i(s_2)=0.5-0.5e_i(x)$. We will need to guess both $s_1$ and $s_2$. One will be correct.

The main obstacle to getting polynomial time in $n$ as $k$ varies is not having a faster way to find linearly independent sets. If this could be fixed, the algorithm would be much faster with only a slight modification...
This post has been edited 2 times. Last edited by rafayaashary1, Jul 26, 2017, 2:23 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
suli
1498 posts
#12 • 2 Y
Y by Adventure10, Mango247
We can WLOG the leader's original string is the 0 string (i.e. the string with all 0s), since we can compute everything else relative to it. Then the strings the deputy leader reveals are the permutations $P$ of $111\dots 100\dots 0$, where there are $k$ ones and $n-k$ zeroes.
Suppose $S \neq 0, 1$ (= 111...1) differs from each of these $\binom{n}{k}$ strings in exactly $k$ positions. Since permuting the digits of $S$ doesn't change whether $S$ satisfies this condition (as permutations of strings in $P$ are also in $P$), we can assume $S$ starts with $1$ and ends with $0$. Then $S$ differs in exactly $k$ positions from $111\dots100\dots 0$ and $011\dots100\dots01$ (the first string starts with $k$ ones, and the second string is the first string, except transpose the first and last bits). This is clearly a contradiction, since $S$ differs in more positions in the second string. Thus $S = 0$ or $S = 1$. $S = 0$ is the original string. If $S = 1$ differs in $k$ positions from the strings in $P$, then clearly $n - k = k$, so $n = 2k$. Thus 2 guesses if $n = 2k$, 1 guess otherwise.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
ComboMan
4 posts
#14 • 2 Y
Y by Adventure10, Mango247
I'm still a bit unsure of the following:

If $n=3\ne 2k$ and the string is $101$, and the deputy leader writes $001, 111, 100$, then are there two possibilities:

1) $k=1$, start string = $101$
2) $k=2$, start string = $010$

But the answer states that if $n \ne 2k$, there is only $1$ guess needed?
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Plops
946 posts
#15 • 1 Y
Y by Adventure10
In uraharakisuke_hsgs's solution, can someone explain what he meant by the k digits $b_j (j \neq i_t , t = \overline{1,k})$
This post has been edited 3 times. Last edited by Plops, Nov 15, 2018, 4:46 AM
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
XbenX
590 posts
#16 • 3 Y
Y by VicKmath7, Adventure10, Mango247
Deputy leader has written $\dbinom{n}{k}$ strings and from these $\dbinom{n-1}{k} $ have the $i$'th number correct and $\dbinom{n-1}{k-1}$ wrong.
Now , if $\dbinom{n-1}{k} $ , $\dbinom{n-1}{k-1}$ are different then the contestant can find the string in just $1$ try .

If $\dbinom{n-1}{k-1}=\dbinom{n-1}{k} \Longleftrightarrow n=2k$ .

In this case the contestant should look at first $k$ digits of all written numbers, and he can find exactly $2$ such that they are different in each digit. Let these two be $S_1$ and $S_2$ .
One of $S_1,S_2$ has the first $k$ digits correct , wich means that the other has the last $k$ digits correct. In this case the contestant can find the string in $2$ tries because is impossible to tell wich of $S_1,S_2$ has the first digit correct.

So ,the answer is $2$ if $n=2k$ and $1$ otherwise.
Z K Y
The post below has been deleted. Click to close.
This post has been deleted. Click here to see post.
Vrangr
1600 posts
#17 • 4 Y
Y by AlastorMoody, Supermathlet_04, 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.
math_pi_rate
1218 posts
#18 • 3 Y
Y by Adventure10, Mango247, EvansGressfield
This problem is quite well suited for a C1, neither too difficult, nor too easy.
2016 IMOSL C1 wrote:
The leader of an IMO team chooses positive integers $n$ and $k$ with $n > k$, and announces them to the deputy leader and a contestant. The leader then secretly tells the deputy leader an $n$-digit binary string, and the deputy leader writes down all $n$-digit binary strings which differ from the leader’s in exactly $k$ positions. (For example, if $n = 3$ and $k = 1$, and if the leader chooses $101$, the deputy leader would write down $001, 111$ and $100$.) The contestant is allowed to look at the strings written by the deputy leader and guess the leader’s string. What is the minimum number of guesses (in terms of $n$ and $k$) needed to guarantee the correct answer?

ANSWER: $1$ if $n \neq 2k$ and $2$ if $n=2k$.

SOLUTION: First consider the case when $n \neq 2k$. Choose a positive integer $i$ such that $i \leq n$. Take any of the $\binom{n}{k}$ binary strings. Then there are exactly $\binom{n-1}{k-1}$ strings which have the wrong digit at the $i^{\text{th}}$ position, and $\binom{n-1}{k}$ strings which have the correct digit at the $i^{\text{th}}$ position. As $n \neq 2k$, so $\binom{n-1}{k-1} \neq \binom{n-1}{k}$. Thus, we can easily find the leader's string by comparing the number of occurences of each bit at the $i^{\text{th}}$ position for all $i \in \{1,2, \dots ,n\}$.

Now, suppose $n=2k$. WLOG assume that the leader's string consists of only $2k$ ones. Then the deputy leader's list consists of all binary numbers consisting of $k$ ones and $k$ zeros. However, in that case, had the leader chosen the zero string (consisting of $2k$ zeros), even then the deputy leader's list would have been the same. This means that the contestant will require at least two guesses to decipher the leader's string. We now show that two guesses actually suffice. Note that each string present in the deputy leader's list has its one's complement also present in that list. So make $\frac{1}{2} \binom{2k}{k}$ groups each consisting of two complementary binary strings. Select one group at random, and label its elements $\mathcal{B}$ and $\mathcal{B'}$. Then $\mathcal{B}$ will have ones at some $k$ positions, while $\mathcal{B'}$ will have zeros in exactly those positions. Color the digits at these positions red. Similarly, $\mathcal{B}$ will have zeros and $\mathcal{B'}$ will have ones in the remaining $k$ positions. Color the bits present here blue. Then the leader's string is either a mixture of the blue digits of $\mathcal{B}$ and the red digits of $\mathcal{B'}$, or vice versa. Thus, the contestant can find the leader's string in minimum two guesses.


REMARK 1: In the case $n=2k$, showing the contestant just $\frac{1}{2} \binom{2k}{k}+1$ strings out of the deputy leader's list would also suffice (which is obvious by using PHP and our argument). Thus, the question could also have asked for the minimum number of strings which the contestant needs to be shown in order for him to guess the leader's string in minimum number of guesses.

REMARK 2: Initially I started thinking that the contestant didn't know $n$ and $k$ (basically misread the problem :(), which fortunately doesn't really affect the problem much. The contestant can easily figure out $n$ by finding the length of the strings in the deputy leader's list. While finding $k$, I used the fact that the number of strings in the deputy leader's list are equal to $\binom{n}{k}$. However, in this case, we encounter a small speed-breaker in that this gives the value $k$ as well as $n-k$ (unless $n=2k$). Thus, if $n$ and $k$ were not known to the contestant, then the answer would have been $2$ guesses for all possible values of $n$ and $k$.
This post has been edited 5 times. Last edited by math_pi_rate, Jan 19, 2019, 3:48 PM
Z K Y
G
H
=
a