Join our free webinar April 22 to learn about competitive programming!

G
Topic
First Poster
Last Poster
k a April Highlights and 2025 AoPS Online Class Information
jlacosta   0
Apr 2, 2025
Spring is in full swing and summer is right around the corner, what are your plans? At AoPS Online our schedule has new classes starting now through July, so be sure to keep your skills sharp and be prepared for the Fall school year! Check out the schedule of upcoming classes below.

WOOT early bird pricing is in effect, don’t miss out! If you took MathWOOT Level 2 last year, no worries, it is all new problems this year! Our Worldwide Online Olympiad Training program is for high school level competitors. AoPS designed these courses to help our top students get the deep focus they need to succeed in their specific competition goals. Check out the details at this link for all our WOOT programs in math, computer science, chemistry, and physics.

Looking for summer camps in math and language arts? Be sure to check out the video-based summer camps offered at the Virtual Campus that are 2- to 4-weeks in duration. There are middle and high school competition math camps as well as Math Beasts camps that review key topics coupled with fun explorations covering areas such as graph theory (Math Beasts Camp 6), cryptography (Math Beasts Camp 7-8), and topology (Math Beasts Camp 8-9)!

Be sure to mark your calendars for the following events:
[list][*]April 3rd (Webinar), 4pm PT/7:00pm ET, Learning with AoPS: Perspectives from a Parent, Math Camp Instructor, and University Professor
[*]April 8th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MATHCOUNTS State Discussion
April 9th (Webinar), 4:00pm PT/7:00pm ET, Learn about Video-based Summer Camps at the Virtual Campus
[*]April 10th (Math Jam), 4:30pm PT/7:30pm ET, 2025 MathILy and MathILy-Er Math Jam: Multibackwards Numbers
[*]April 22nd (Webinar), 4:00pm PT/7:00pm ET, Competitive Programming at AoPS (USACO).[/list]
Our full course list for upcoming classes is below:
All classes run 7:30pm-8:45pm ET/4:30pm - 5:45pm PT unless otherwise noted.

Introductory: Grades 5-10

Prealgebra 1 Self-Paced

Prealgebra 1
Sunday, Apr 13 - Aug 10
Tuesday, May 13 - Aug 26
Thursday, May 29 - Sep 11
Sunday, Jun 15 - Oct 12
Monday, Jun 30 - Oct 20
Wednesday, Jul 16 - Oct 29

Prealgebra 2 Self-Paced

Prealgebra 2
Sunday, Apr 13 - Aug 10
Wednesday, May 7 - Aug 20
Monday, Jun 2 - Sep 22
Sunday, Jun 29 - Oct 26
Friday, Jul 25 - Nov 21

Introduction to Algebra A Self-Paced

Introduction to Algebra A
Monday, Apr 7 - Jul 28
Sunday, May 11 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Wednesday, May 14 - Aug 27
Friday, May 30 - Sep 26
Monday, Jun 2 - Sep 22
Sunday, Jun 15 - Oct 12
Thursday, Jun 26 - Oct 9
Tuesday, Jul 15 - Oct 28

Introduction to Counting & Probability Self-Paced

Introduction to Counting & Probability
Wednesday, Apr 16 - Jul 2
Thursday, May 15 - Jul 31
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Wednesday, Jul 9 - Sep 24
Sunday, Jul 27 - Oct 19

Introduction to Number Theory
Thursday, Apr 17 - Jul 3
Friday, May 9 - Aug 1
Wednesday, May 21 - Aug 6
Monday, Jun 9 - Aug 25
Sunday, Jun 15 - Sep 14
Tuesday, Jul 15 - Sep 30

Introduction to Algebra B Self-Paced

Introduction to Algebra B
Wednesday, Apr 16 - Jul 30
Tuesday, May 6 - Aug 19
Wednesday, Jun 4 - Sep 17
Sunday, Jun 22 - Oct 19
Friday, Jul 18 - Nov 14

Introduction to Geometry
Wednesday, Apr 23 - Oct 1
Sunday, May 11 - Nov 9
Tuesday, May 20 - Oct 28
Monday, Jun 16 - Dec 8
Friday, Jun 20 - Jan 9
Sunday, Jun 29 - Jan 11
Monday, Jul 14 - Jan 19

Intermediate: Grades 8-12

Intermediate Algebra
Monday, Apr 21 - Oct 13
Sunday, Jun 1 - Nov 23
Tuesday, Jun 10 - Nov 18
Wednesday, Jun 25 - Dec 10
Sunday, Jul 13 - Jan 18
Thursday, Jul 24 - Jan 22

Intermediate Counting & Probability
Wednesday, May 21 - Sep 17
Sunday, Jun 22 - Nov 2

Intermediate Number Theory
Friday, Apr 11 - Jun 27
Sunday, Jun 1 - Aug 24
Wednesday, Jun 18 - Sep 3

Precalculus
Wednesday, Apr 9 - Sep 3
Friday, May 16 - Oct 24
Sunday, Jun 1 - Nov 9
Monday, Jun 30 - Dec 8

Advanced: Grades 9-12

Olympiad Geometry
Tuesday, Jun 10 - Aug 26

Calculus
Tuesday, May 27 - Nov 11
Wednesday, Jun 25 - Dec 17

Group Theory
Thursday, Jun 12 - Sep 11

Contest Preparation: Grades 6-12

MATHCOUNTS/AMC 8 Basics
Wednesday, Apr 16 - Jul 2
Friday, May 23 - Aug 15
Monday, Jun 2 - Aug 18
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

MATHCOUNTS/AMC 8 Advanced
Friday, Apr 11 - Jun 27
Sunday, May 11 - Aug 10
Tuesday, May 27 - Aug 12
Wednesday, Jun 11 - Aug 27
Sunday, Jun 22 - Sep 21
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Problem Series
Friday, May 9 - Aug 1
Sunday, Jun 1 - Aug 24
Thursday, Jun 12 - Aug 28
Tuesday, Jun 17 - Sep 2
Sunday, Jun 22 - Sep 21 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Monday, Jun 23 - Sep 15
Tues & Thurs, Jul 8 - Aug 14 (meets twice a week!)

AMC 10 Final Fives
Sunday, May 11 - Jun 8
Tuesday, May 27 - Jun 17
Monday, Jun 30 - Jul 21

AMC 12 Problem Series
Tuesday, May 27 - Aug 12
Thursday, Jun 12 - Aug 28
Sunday, Jun 22 - Sep 21
Wednesday, Aug 6 - Oct 22

AMC 12 Final Fives
Sunday, May 18 - Jun 15

F=ma Problem Series
Wednesday, Jun 11 - Aug 27

WOOT Programs
Visit the pages linked for full schedule details for each of these programs!


MathWOOT Level 1
MathWOOT Level 2
ChemWOOT
CodeWOOT
PhysicsWOOT

Programming

Introduction to Programming with Python
Thursday, May 22 - Aug 7
Sunday, Jun 15 - Sep 14 (1:00 - 2:30 pm ET/10:00 - 11:30 am PT)
Tuesday, Jun 17 - Sep 2
Monday, Jun 30 - Sep 22

Intermediate Programming with Python
Sunday, Jun 1 - Aug 24
Monday, Jun 30 - Sep 22

USACO Bronze Problem Series
Tuesday, May 13 - Jul 29
Sunday, Jun 22 - Sep 1

Physics

Introduction to Physics
Wednesday, May 21 - Aug 6
Sunday, Jun 15 - Sep 14
Monday, Jun 23 - Sep 15

Physics 1: Mechanics
Thursday, May 22 - Oct 30
Monday, Jun 23 - Dec 15

Relativity
Sat & Sun, Apr 26 - Apr 27 (4:00 - 7:00 pm ET/1:00 - 4:00pm PT)
Mon, Tue, Wed & Thurs, Jun 23 - Jun 26 (meets every day of the week!)
0 replies
jlacosta
Apr 2, 2025
0 replies
k i Adding contests to the Contest Collections
dcouchman   1
N Apr 5, 2023 by v_Enhance
Want to help AoPS remain a valuable Olympiad resource? Help us add contests to AoPS's Contest Collections.

Find instructions and a list of contests to add here: https://artofproblemsolving.com/community/c40244h1064480_contests_to_add
1 reply
dcouchman
Sep 9, 2019
v_Enhance
Apr 5, 2023
k i Zero tolerance
ZetaX   49
N May 4, 2019 by NoDealsHere
Source: Use your common sense! (enough is enough)
Some users don't want to learn, some other simply ignore advises.
But please follow the following guideline:


To make it short: ALWAYS USE YOUR COMMON SENSE IF POSTING!
If you don't have common sense, don't post.


More specifically:

For new threads:


a) Good, meaningful title:
The title has to say what the problem is about in best way possible.
If that title occured already, it's definitely bad. And contest names aren't good either.
That's in fact a requirement for being able to search old problems.

Examples:
Bad titles:
- "Hard"/"Medium"/"Easy" (if you find it so cool how hard/easy it is, tell it in the post and use a title that tells us the problem)
- "Number Theory" (hey guy, guess why this forum's named that way¿ and is it the only such problem on earth¿)
- "Fibonacci" (there are millions of Fibonacci problems out there, all posted and named the same...)
- "Chinese TST 2003" (does this say anything about the problem¿)
Good titles:
- "On divisors of a³+2b³+4c³-6abc"
- "Number of solutions to x²+y²=6z²"
- "Fibonacci numbers are never squares"


b) Use search function:
Before posting a "new" problem spend at least two, better five, minutes to look if this problem was posted before. If it was, don't repost it. If you have anything important to say on topic, post it in one of the older threads.
If the thread is locked cause of this, use search function.

Update (by Amir Hossein). The best way to search for two keywords in AoPS is to input
[code]+"first keyword" +"second keyword"[/code]
so that any post containing both strings "first word" and "second form".


c) Good problem statement:
Some recent really bad post was:
[quote]$lim_{n\to 1}^{+\infty}\frac{1}{n}-lnn$[/quote]
It contains no question and no answer.
If you do this, too, you are on the best way to get your thread deleted. Write everything clearly, define where your variables come from (and define the "natural" numbers if used). Additionally read your post at least twice before submitting. After you sent it, read it again and use the Edit-Button if necessary to correct errors.


For answers to already existing threads:


d) Of any interest and with content:
Don't post things that are more trivial than completely obvious. For example, if the question is to solve $x^{3}+y^{3}=z^{3}$, do not answer with "$x=y=z=0$ is a solution" only. Either you post any kind of proof or at least something unexpected (like "$x=1337, y=481, z=42$ is the smallest solution). Someone that does not see that $x=y=z=0$ is a solution of the above without your post is completely wrong here, this is an IMO-level forum.
Similar, posting "I have solved this problem" but not posting anything else is not welcome; it even looks that you just want to show off what a genius you are.

e) Well written and checked answers:
Like c) for new threads, check your solutions at least twice for mistakes. And after sending, read it again and use the Edit-Button if necessary to correct errors.



To repeat it: ALWAYS USE YOUR COMMON SENSE IF POSTING!


Everything definitely out of range of common sense will be locked or deleted (exept for new users having less than about 42 posts, they are newbies and need/get some time to learn).

The above rules will be applied from next monday (5. march of 2007).
Feel free to discuss on this here.
49 replies
ZetaX
Feb 27, 2007
NoDealsHere
May 4, 2019
Combo problem
soryn   1
N a minute ago by soryn
The school A has m1 boys and m2 girls, and ,the school B has n1 boys and n2 girls. Each school is represented by one team formed by p students,boys and girls. If f(k) is the number of cases for which,the twice schools has,togheter k girls, fund f(k) and the valute of k, for which f(k) is maximum.
1 reply
soryn
3 hours ago
soryn
a minute ago
AGI-Origin Solves Full IMO 2020–2024 Benchmark Without Solver (30/30) beat Alpha
AGI-Origin   4
N 12 minutes ago by GeoMorocco
Hello IMO community,

I’m sharing here a full 30-problem solution set to all IMO problems from 2020 to 2024.

Standard AI: Prompt --> Symbolic Solver (SymPy, Geometry API, etc.)

Unlike AlphaGeometry or symbolic math tools that solve through direct symbolic computation, AGI-Origin operates via recursive symbolic cognition.

AGI-Origin:
Prompt --> Internal symbolic mapping --> Recursive contradiction/repair --> Structural reasoning --> Human-style proof

It builds human-readable logic paths by recursively tracing contradictions, repairing structure, and collapsing ambiguity — not by invoking any external symbolic solver.

These results were produced by a recursive symbolic cognition framework called AGI-Origin, designed to simulate semi-AGI through contradiction collapse, symbolic feedback, and recursion-based error repair.

These were solved without using any symbolic computation engine or solver.
Instead, the solutions were derived using a recursive symbolic framework called AGI-Origin, based on:
- Contradiction collapse
- Self-correcting recursion
- Symbolic anchoring and logical repair

Full PDF: [Upload to Dropbox/Google Drive/Notion or arXiv link when ready]

This effort surpasses AlphaGeometry’s previous 25/30 mark by covering:
- Algebra
- Combinatorics
- Geometry
- Functional Equations

Each solution follows a rigorous logical path and is written in fully human-readable format — no machine code or symbolic solvers were used.

I would greatly appreciate any feedback on the solution structure, logic clarity, or symbolic methodology.

Thank you!

— AGI-Origin Team
AGI-Origin.com
4 replies
+1 w
AGI-Origin
3 hours ago
GeoMorocco
12 minutes ago
Combo with cyclic sums
oVlad   1
N 40 minutes ago by ja.
Source: Romania EGMO TST 2017 Day 1 P4
In $p{}$ of the vertices of the regular polygon $A_0A_1\ldots A_{2016}$ we write the number $1{}$ and in the remaining ones we write the number $-1.{}$ Let $x_i{}$ be the number written on the vertex $A_i{}.$ A vertex is good if \[x_i+x_{i+1}+\cdots+x_j>0\quad\text{and}\quad x_i+x_{i-1}+\cdots+x_k>0,\]for any integers $j{}$ and $k{}$ such that $k\leqslant i\leqslant j.$ Note that the indices are taken modulo $2017.$ Determine the greatest possible value of $p{}$ such that, regardless of numbering, there always exists a good vertex.
1 reply
+1 w
oVlad
Yesterday at 1:41 PM
ja.
40 minutes ago
Stronger inequality than an old result
KhuongTrang   20
N an hour ago by KhuongTrang
Source: own, inspired
Problem. Find the best constant $k$ satisfying $$(ab+bc+ca)\left[\frac{1}{(a+b)^{2}}+\frac{1}{(b+c)^{2}}+\frac{1}{(c+a)^{2}}\right]\ge \frac{9}{4}+k\cdot\frac{a(a-b)(a-c)+b(b-a)(b-c)+c(c-a)(c-b)}{(a+b+c)^{3}}$$holds for all $a,b,c\ge 0: ab+bc+ca>0.$
20 replies
KhuongTrang
Aug 1, 2024
KhuongTrang
an hour ago
Incircle of a triangle is tangent to (ABC)
amar_04   11
N an hour ago by Nari_Tom
Source: XVII Sharygin Correspondence Round P18
Let $ABC$ be a scalene triangle, $AM$ be the median through $A$, and $\omega$ be the incircle. Let $\omega$ touch $BC$ at point $T$ and segment $AT$ meet $\omega$ for the second time at point $S$. Let $\delta$ be the triangle formed by lines $AM$ and $BC$ and the tangent to $\omega$ at $S$. Prove that the incircle of triangle $\delta$ is tangent to the circumcircle of triangle $ABC$.
11 replies
+1 w
amar_04
Mar 2, 2021
Nari_Tom
an hour ago
Inspired by hlminh
sqing   1
N an hour ago by sqing
Source: Own
Let $ a,b,c $ be real numbers such that $ a^2+b^2+c^2=1. $ Prove that$$ |a-kb|+|kb-c|+|c-a|\leq 2\sqrt {k^2+1}$$Where $ k\geq 1.$
$$ |a-kb|+|kb-c|+|c-a|\leq 2\sqrt {2}$$Where $0< k\leq 1.$
1 reply
sqing
2 hours ago
sqing
an hour ago
Two very hard parallel
jayme   3
N an hour ago by jayme
Source: own inspired by EGMO
Dear Mathlinkers,

1. ABC a triangle
2. D, E two point on the segment BC so that BD = DE= EC
3. M, N the midpoint of ED, AE
4. H the orthocenter of the acutangle triangle ADE
5. 1, 2 the circumcircle of the triangle DHM, EHN
6. P, Q the second point of intersection of 1 and BM, 2 and CN
7. U, V the second points of intersection of 2 and MN, PQ.

Prove : UV is parallel to PM.

Sincerely
Jean-Louis
3 replies
jayme
Yesterday at 12:46 PM
jayme
an hour ago
Inequality with n-gon sides
mihaig   3
N an hour ago by mihaig
Source: VL
If $a_1,a_2,\ldots, a_n~(n\geq3)$ are are the lengths of the sides of a $n-$gon such that
$$\sum_{i=1}^{n}{a_i}=1,$$then
$$(n-2)\left[\sum_{i=1}^{n}{\frac{a_i^2}{(1-a_i)^2}}-\frac n{(n-1)^2}\right]\geq(2n-1)\left(\sum_{i=1}^{n}{\frac{a_i}{1-a_i}}-\frac n{n-1}\right)^2.$$
When do we have equality?

(V. Cîrtoaje and L. Giugiuc, 2021)
3 replies
mihaig
Feb 25, 2022
mihaig
an hour ago
Advanced topics in Inequalities
va2010   23
N an hour ago by Novmath
So a while ago, I compiled some tricks on inequalities. You are welcome to post solutions below!
23 replies
va2010
Mar 7, 2015
Novmath
an hour ago
JBMO TST Bosnia and Herzegovina 2022 P3
Motion   7
N an hour ago by cafer2861
Source: JBMO TST Bosnia and Herzegovina 2022
Let $ABC$ be an acute triangle. Tangents on the circumscribed circle of triangle $ABC$ at points $B$ and $C$ intersect at point $T$. Let $D$ and $E$ be a foot of the altitudes from $T$ onto $AB$ and $AC$ and let $M$ be the midpoint of $BC$. Prove:
A) Prove that $M$ is the orthocenter of the triangle $ADE$.
B) Prove that $TM$ cuts $DE$ in half.
7 replies
Motion
May 21, 2022
cafer2861
an hour ago
hard problem
Cobedangiu   5
N 2 hours ago by arqady
Let $a,b,c>0$ and $a+b+c=3$. Prove that:
$\dfrac{4}{a+b}+\dfrac{4}{b+c}+\dfrac{4}{c+a} \le \dfrac{1}{a}+\dfrac{1}{b}+\dfrac{1}{c}+3$
5 replies
Cobedangiu
Yesterday at 1:51 PM
arqady
2 hours ago
density over modulo M
SomeGuy3335   3
N 2 hours ago by ja.
Let $M$ be a positive integer and let $\alpha$ be an irrational number. Show that for every integer $0\leq a < M$, there exists a positive integer $n$ such that $M \mid \lfloor{n \alpha}\rfloor-a$.
3 replies
SomeGuy3335
Apr 20, 2025
ja.
2 hours ago
Diophantine equation !
ComplexPhi   5
N 3 hours ago by aops.c.c.
Source: Romania JBMO TST 2015 Day 1 Problem 4
Solve in nonnegative integers the following equation :
$$21^x+4^y=z^2$$
5 replies
ComplexPhi
May 14, 2015
aops.c.c.
3 hours ago
Parity and sets
betongblander   7
N 3 hours ago by ihategeo_1969
Source: Brazil National Olympiad 2020 5 Level 3
Let $n$ and $k$ be positive integers with $k$ $\le$ $n$. In a group of $n$ people, each one or always
speak the truth or always lie. Arnaldo can ask questions for any of these people
provided these questions are of the type: “In set $A$, what is the parity of people who speak to
true? ”, where $A$ is a subset of size $ k$ of the set of $n$ people. The answer can only
be $even$ or $odd$.
a) For which values of $n$ and $k$ is it possible to determine which people speak the truth and
which people always lie?
b) What is the minimum number of questions required to determine which people
speak the truth and which people always lie, when that number is finite?
7 replies
betongblander
Mar 18, 2021
ihategeo_1969
3 hours ago
Guess the leader's binary string!
cjquines0   79
N Apr 14, 2025 by gladIasked
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?
79 replies
cjquines0
Jul 19, 2017
gladIasked
Apr 14, 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
323 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