Navvye/Olympiad-Problems-CSV huggingface dataset:
2016 Iran MO (3rd Round)
We call a function $g$ special  if  $g(x)=a^{f(x)}$ (for all $x$) where $a$ is a positive integer and $f$ is polynomial with integer coefficients such that $f(n)>0$ for all positive integers $n$.



A function is called an exponential polynomial if it is obtained from the product or sum of special functions. For instance, $2^{x}3^{x^{2}+x-1}+5^{2x}$ is an exponential polynomial.



Prove that there does not exist a non-zero exponential polynomial $f(x)$ and a non-constant polynomial $P(x)$ with integer coefficients such that

$$P(n)|f(n)$$for all positive integers $n$.
2016 Iran MO (3rd Round)
A sequence $P=\left \{ a_{n} \right \}$ is called a $ \text{Permutation}$ of natural numbers (positive integers) if for any natural number $m,$ there exists a unique natural number $n$ such that $a_n=m.$



We also define $S_k(P)$ as:

$S_k(P)=a_{1}+a_{2}+\cdots +a_{k}$ (the sum of the first $k$ elements of the sequence).



Prove that there exists infinitely many distinct $ \text{Permutations}$ of natural numbers like $P_1,P_2, \cdots$ such that$:$

$$\forall k, \forall i<j: S_k(P_i)|S_k(P_j)$$
2016 Iran MO (3rd Round)
In an election, there are $1395$ candidates and some voters. Each voter, arranges all the candidates by the priority order.



We form a directed graph with $1395$ vertices, an arrow is directed from $U$ to $V$ when the candidate $U$ is at a higher level of priority than $V$ in more than half of the votes. (otherwise, there's no edge between $U,V$)



Is it possible to generate all complete directed graphs with $1395$ vertices?
2016 Iran MO (3rd Round)
A $100 \times 100$ table is given. At the beginning, every unit square has number $"0"$ written in them. Two players playing a game and the game stops after $200$ steps (each player plays $100$ steps).



In every step, one can choose a row or a column and add $1$  to the written number in all of it's squares $\pmod 3.$

First player is the winner if more than half of the squares ($5000$ squares) have the number $"1"$ written in them,

Second player is the winner if more than half of the squares ($5000$ squares) have the number $"0"$ written in them. Otherwise, the game is draw.



Assume that both players play at their best. What will be the result of the game ?



Proposed by Mahyar Sefidgaran
2016 Iran MO (3rd Round)
A $30\times30$ table is given. We want to color some of it's unit squares such that any colored square has at most $k$ neighbors. ( Two squares $(i,j)$ and $(x,y)$ are called neighbors if $i-x,j-y\equiv0,-1,1 \pmod {30}$ and $(i,j)\neq(x,y)$. Therefore, each square has exactly $8$ neighbors)

What is the maximum possible number of colored squares if$:$



$a) k=6$



$b)k=1$
2015 Iran MO (3rd round)
$x,y,z$ are three real numbers inequal to zero satisfying $x+y+z=xyz$.

Prove that

$$ \sum (\frac{x^2-1}{x})^2 \geq 4$$



Proposed by Amin Fathpour
2015 Iran MO (3rd round)
Prove that there are no functions $f,g:\mathbb{R}\rightarrow \mathbb{R}$ such that $\forall x,y\in \mathbb{R}:$

$ f(x^2+g(y)) -f(x^2)+g(y)-g(x) \leq 2y$

and $f(x)\geq x^2$.

Proposed by Mohammad Ahmadi
2015 Iran MO (3rd round)
Does there exist an irreducible two variable polynomial $f(x,y)\in \mathbb{Q}[x,y]$ such that it has only four roots $(0,1),(1,0),(0,-1),(-1,0)$ on the unit circle.
2015 Iran MO (3rd round)
$p(x)\in \mathbb{C}[x]$ is a polynomial such that:

$\forall z\in \mathbb{C}, |z|=1\Longrightarrow p(z)\in \mathbb{R}$

Prove that $p(x)$ is constant.
2015 Iran MO (3rd round)
Find all polynomials $p(x)\in\mathbb{R}[x]$ such that for all $x\in \mathbb{R}$:

$p(5x)^2-3=p(5x^2+1)$ such that:

$a) p(0)\neq 0$

$b) p(0)=0$
2015 Iran MO (3rd round)
$a_1,a_2,\dots ,a_n>0$ are positive real numbers such that $\sum_{i=1}^{n} \frac{1}{a_i}=n$ prove that:

$\sum_{i<j} \left(\frac{a_i-a_j}{a_i+a_j}\right)^2\le\frac{n^2}{2}\left(1-\frac{n}{\sum_{i=1}^{n}a_i}\right)$
2015 Iran MO (3rd round)
Prove that there are infinitely natural numbers $n$ such that $n$ can't be written as a sum of two positive integers with prime factors less than $1394$.
2015 Iran MO (3rd round)
$M_0 \subset  \mathbb{N}$ is a non-empty set with a finite number of elements.

Ali produces sets $ M_1,M_2,...,M_n $ in the following order:

In step $n$, Ali chooses an element of $M_{n-1} $ like $b_n$ and defines $M_n$ as

$$M_n = \left \{ b_nm+1 \vert m\in  M_{n-1} \right \}$$

Prove that at some step Ali reaches a set which no element of it divides another element of it.
2015 Iran MO (3rd round)
Let $p>5$ be a prime number and $A=\{b_1,b_2,\dots,b_{\frac{p-1}{2}}\}$ be the set of all quadratic residues modulo $p$, excluding zero. Prove that there doesn't exist any natural $a,c$ satisfying $(ac,p)=1$ such that set $B=\{ab_1+c,ab_2+c,\dots,ab_{\frac{p-1}{2}}+c\}$ and set $A$ are disjoint modulo $p$.



This problem was proposed by Amir Hossein Pooya.
2015 Iran MO (3rd round)
$a,b,c,d,k,l$ are positive integers such that for every natural number $n$ the set of prime factors of $n^k+a^n+c,n^l+b^n+d$ are same. prove that $k=l,a=b,c=d$.
2015 Iran MO (3rd round)
$p>30$ is a prime number. Prove that one of the following numbers is in form of $x^2+y^2$.

$$ p+1 , 2p+1 , 3p+1 , .... , (p-3)p+1$$
2015 Iran MO (3rd round)
Let $ABCD$ be the trapezoid such that $AB\parallel CD$. Let $E$ be an arbitrary point on $AC$. point $F$ lies on $BD$ such that $BE\parallel CF$. Prove that circumcircles of $\triangle ABF,\triangle BED$ and the line $AC$ are concurrent.
2015 Iran MO (3rd round)
Let $ABC$ be a triangle with orthocenter $H$ and circumcenter $O$. Let $K$ be the midpoint of $AH$. point $P$ lies on $AC$ such that $\angle BKP=90^{\circ}$. Prove that $OP\parallel BC$.
2015 Iran MO (3rd round)
Let $ABC$ be a triangle. consider an arbitrary point $P$ on the plain of $\triangle ABC$. Let $R,Q$ be the reflections of $P$ wrt $AB,AC$ respectively. Let $RQ\cap BC=T$. Prove that $\angle APB=\angle APC$ if and if only $\angle APT=90^{\circ}$.
2015 Iran MO (3rd round)
Let $ABC$ be a triangle with incenter $I$. Let $K$ be the midpoint of $AI$ and $BI\cap \odot(\triangle ABC)=M,CI\cap \odot(\triangle ABC)=N$. points $P,Q$ lie on $AM,AN$ respectively such that $\angle ABK=\angle PBC,\angle ACK=\angle QCB$. Prove that $P,Q,I$ are collinear.
2015 Iran MO (3rd round)
Let $ABC$ be a triangle with orthocenter $H$ and circumcenter $O$. Let $R$ be the radius of circumcircle of $\triangle ABC$. Let $A',B',C'$ be the points on $\overrightarrow{AH},\overrightarrow{BH},\overrightarrow{CH}$ respectively such that $AH.AA'=R^2,BH.BB'=R^2,CH.CC'=R^2$. Prove that $O$ is incenter of $\triangle A'B'C'$.
2014 Iran MO (3rd Round)
We have an equilateral triangle with circumradius $1$. We extend its sides. Determine the point $P$ inside the triangle such that the total lengths of the sides (extended), which lies inside the circle with center $P$ and radius $1$, is maximum.

(The total distance of the point P from the sides of an equilateral triangle is fixed )



Proposed by Erfan Salavati
2014 Iran MO (3rd Round)
Find all continuous function $f:\mathbb{R}^{\geq 0}\rightarrow \mathbb{R}^{\geq 0}$  such that :

$$f(xf(y))+f(f(y)) = f(x)f(y)+2 \: \: \forall x,y\in \mathbb{R}^{\geq 0}$$



Proposed by Mohammad Ahmadi
2014 Iran MO (3rd Round)
Let $p,q\in \mathbb{R}[x]$ such that $p(z)q(\overline{z})$ is always a real number for every complex number $z$. Prove that $p(x)=kq(x)$ for some constant $k \in \mathbb{R}$ or $q(x)=0$.



Proposed by Mohammad Ahmadi
2014 Iran MO (3rd Round)
For any $a,b,c>0$ satisfying $a+b+c+ab+ac+bc= 3$, prove that

$$2\leq a+b+c+abc\leq 3$$



Proposed by Mohammad Ahmadi
2014 Iran MO (3rd Round)
We say $p(x,y)\in \mathbb{R}\left[x,y\right]$ is good if for any $y \neq 0$ we have $p(x,y) = p\left(xy,\frac{1}{y}\right)$ . Prove that there are good polynomials $r(x,y) ,s(x,y)\in \mathbb{R}\left[x,y\right]$ such that for any good polynomial $p$ there is a $f(x,y)\in \mathbb{R}\left[x,y\right]$ such that $$f(r(x,y),s(x,y))= p(x,y)$$



Proposed by Mohammad Ahmadi
2014 Iran MO (3rd Round)
Show that for every natural number $n$ there are $n$ natural numbers $ x_1 < x_2 < ... < x_n $ such that



$$\frac{1}{x_1}+\frac{1}{x_2}+...+\frac{1}{x_n}-\frac{1}{x_1x_2...x_n}\in \mathbb{N}\cup {0}$$



(15 points )
2014 Iran MO (3rd Round)
We say two sequence of natural numbers A=($a_1,...,a_n$) , B=($b_1,...,b_n$)are the exchange and we write $A\sim B$.

if   $503\vert a_i - b_i$ for all $1\leq i\leq n$.

also for natural number $r$ : $A^r$ = ($a_1^r,a_2^r,...,a_n^r$).

Prove that there are natural number $k,m$ such that :

$i$)$250 \leq k $



$ii$)There are different permutations $\pi _1,...,\pi_k$ from {$1,2,3,...,502$} such that for $1\leq i \leq k-1$ we have $\pi _i^m\sim \pi _{i+1}$



(15 points)
2014 Iran MO (3rd Round)
Let $n$ be a positive integer. Prove that there exists a natural number $m$ with exactly $n$ prime factors, such that for every positive integer $d$ the numbers in $\{1,2,3,\ldots,m\}$ of order $d$ modulo $m$ are multiples of $\phi (d)$.



(15 points)
2014 Iran MO (3rd Round)
$2 \leq d$ is a natural number.

$B_{a,b}$={$a,a+b,a+2b,...,a+db$}

$A_{c,q}$={$cq^n \vert n \in\mathbb{N}$}

Prove that there are finite prime numbers like $p$ such exists $a,b,c,q$ from natural numbers :



$i$ ) $ p \nmid abcq $



$ ii$ ) $A_{c,q} \equiv  B_{a,b} (mod p ) $



(15 points )
2014 Iran MO (3rd Round)
Can an infinite set of natural numbers be found, such that for all triplets $(a,b,c)$ of it we have $abc + 1 $  perfect square?



(20 points )
2014 Iran MO (3rd Round)
Prove that there are 100 natural number $a_1 < a_2 < ... < a_{99} < a_{100}$ ( $ a_i < 10^6$) such that A , A+A , 2A , A+2A , 2A + 2A are five sets apart ?



$A = \{a_1 , a_2 ,... , a_{99} ,a_{100}\}$



$2A = \{2a_i \vert 1\leq i\leq 100\}$



$A+A = \{a_i + a_j \vert 1\leq i<j\leq 100\}$



$A + 2A = \{a_i + 2a_j \vert 1\leq i,j\leq 100\}$



$2A + 2A = \{2a_i + 2a_j \vert 1\leq i<j\leq 100\}$





(20 ponits )
2014 Iran MO (3rd Round)
Denote by $g_n$ the number of connected graphs of degree $n$ whose vertices are labeled with numbers $1,2,...,n$. Prove that $g_n \ge (\frac{1}{2}).2^{\frac{n(n-1)}{2}}$.

Note:If you prove that for $c < \frac{1}{2}$, $g_n \ge c.2^{\frac{n(n-1)}{2}}$, you will earn some point!



proposed by Seyed Reza Hosseini and Mohammad Amin Ghiasi
2014 Iran MO (3rd Round)
In a tennis tournament there are participants from $n$ different countries. Each team consists of a coach and a player whom should settle in a hotel. The rooms considered for the settlement of coaches are different from players' ones. Each player wants to be in a room whose roommates are all from countries which have a defense agreement with the player's country. Conversely, each coach wants to be in a room whose roommates are all from countries which don't have a defense agreement with the coach's country. Find the minimum number of the rooms such that we can always grant everyone's desire.



proposed by Seyed Reza Hosseini and Mohammad Amin Ghiasi
2014 Iran MO (3rd Round)
We have a $10 \times 10$ table. $T$ is a set of rectangles with vertices from the table and sides parallel to the sides of the table such that no rectangle from the set is a subrectangle of another rectangle from the set. $t$ is the maximum number of elements of $T$.

(a) Prove that $t>300$.

(b) Prove that $t<600$.



Proposed by Mir Omid Haji Mirsadeghi and Kasra Alishahi
2014 Iran MO (3rd Round)
A word is formed by a number of letters of the alphabet. We show words with capital letters. A sentence is formed by a number of words. For example if $A=aa$ and $B=ab$ then the sentence $AB$ is equivalent to $aaab$. In this language, $A^n$ indicates $\underbrace{AA \cdots A}_{n}$. We have an equation when two sentences are equal. For example $XYX=YZ^2$ and it means that if we write the alphabetic letters forming the words of each sentence, we get two equivalent sequences of alphabetic letters. An equation is simplified, if the words of the left and the right side of the sentences of the both sides of the equation are different. Note that every word contains one alphabetic letter at least.



$\text{a})$We have a simplified equation in terms of $X$ and $Y$. Prove that both $X$ and $Y$ can be written in form of a power of a word like $Z$.($Z$ can contain only one alphabetic letter).



$\text{b})$ Words $W_1,W_2,\cdots , W_n$ are the answers of a simplified equation. Prove that we can produce these $n$ words with fewer words.



$\text{c})$ $n$ words $W_1,W_2,\cdots , W_n$ are the answers of a simplified system of equations. Define graph $G$ with vertices ${1,2 \cdots ,n}$ such that $i$ and $j$ are connected if in one of the equations, $W_i$ and $W_j$ be the two words appearing in the right side of each side of the equation.($\cdots W_i = \cdots W_j$). If we denote by $c$ the number of  connected components of $G$, prove that these $n$ words can be produced with at most $c$ words.



Proposed by Mostafa Einollah Zadeh Samadi
2014 Iran MO (3rd Round)
An $n$-mino is a connected figure made by connecting $n$ $1 \times 1 $ squares. Two polyminos are the same if moving the first we can reach the second. For a polymino $P$ ,let $|P|$ be the number of $1 \times 1$ squares in it and $\partial P$ be number of squares out of $P$ such that each of the squares have at least on edge in common with a square from $P$.

(a) Prove that for every $x \in (0,1)$:$$\sum_P x^{|P|}(1-x)^{\partial P}=1$$

The sum is on all different polyminos.

(b) Prove that for every polymino $P$, $\partial P \leq 2|P|+2$

(c) Prove that the number of $n$-minos is less than $6.75^n$.



Proposed by Kasra Alishahi
2014 Iran MO (3rd Round)
In the circumcircle of triange $\triangle ABC,$ $AA'$ is a diameter.

We draw  lines $l'$ and $l$ from $A'$ parallel with Internal and external bisector of the vertex $A$.

$l'$ Cut out $AB , BC$ at $B_1$ and $B_2$.

$l$ Cut out $AC , BC$ at $C_1$ and $C_2$.

Prove that the circumcircles of $\triangle ABC$ $\triangle CC_1C_2$ and $\triangle BB_1B_2$ have a common point.



(20 points)
2014 Iran MO (3rd Round)
$\triangle{ABC}$ is isosceles$(AB=AC)$. Points $P$ and $Q$ exist inside the triangle such that $Q$ lies inside $\widehat{PAC}$ and $\widehat{PAQ} = \frac{\widehat{BAC}}{2}$. We also have $BP=PQ=CQ$.Let $X$ and $Y$ be the intersection points of $(AP,BQ)$ and $(AQ,CP)$ respectively. Prove that quadrilateral $PQYX$ is cyclic. (20 Points)
2014 Iran MO (3rd Round)
Distinct points $B,B',C,C'$ lie on an arbitrary line $\ell$. $A$ is a point not lying on $\ell$. A line passing through $B$ and parallel to $AB'$ intersects with $AC$ in $E$ and a line passing through $C$ and parallel to $AC'$ intersects with $AB$ in $F$. Let $X$ be the intersection point of the circumcircles of $\triangle{ABC}$ and $\triangle{AB'C'}$($A \neq X$). Prove that $EF \parallel AX$.
2014 Iran MO (3rd Round)
$D$ is an arbitrary point lying on side $BC$ of $\triangle{ABC}$. Circle $\omega_1$ is tangent to segments $AD$ , $BD$ and the circumcircle of $\triangle{ABC}$ and circle $\omega_2$ is tangent to segments $AD$ , $CD$ and the circumcircle of $\triangle{ABC}$. Let $X$ and $Y$ be the intersection points of $\omega_1$ and $\omega_2$ with $BC$ respectively and take $M$ as the midpoint of $XY$. Let $T$ be the midpoint of arc $BC$ which does not contain $A$. If $I$ is the incenter of $\triangle{ABC}$, prove that $TM$ goes through the midpoint of $ID$.
2014 Iran MO (3rd Round)
$X$ and $Y$ are two points lying on or on the extensions of side $BC$ of $\triangle{ABC}$ such that $\widehat{XAY} = 90$. Let $H$ be the orthocenter of $\triangle{ABC}$. Take $X'$ and $Y'$ as the intersection points of $(BH,AX)$ and $(CH,AY)$ respectively. Prove that circumcircle of $\triangle{CYY'}$,circumcircle of $\triangle{BXX'}$ and $X'Y'$ are concurrent.
2014 Iran MO (3rd Round)
In each of (a) to (d) you have to find a strictly increasing surjective function from A to B or prove that there doesn't exist any.

(a) $A=\{x|x\in \mathbb{Q},x\leq \sqrt{2}\}$ and $B=\{x|x\in \mathbb{Q},x\leq \sqrt{3}\}$

(b) $A=\mathbb{Q}$ and $B=\mathbb{Q}\cup \{\pi \}  $

In (c) and (d) we say $(x,y)>(z,t)$ where $x,y,z,t \in \mathbb{R}$ , whenever $x>z$ or $x=z$ and $y>t$.

(c) $A=\mathbb{R}$ and $B=\mathbb{R}^2$

(d) $X=\{2^{-x}| x\in \mathbb{N}\}$ , then $A=X \times (X\cup \{0\})$ and $B=(X \cup \{ 0 \}) \times X$



(e) If $A,B \subset \mathbb{R}$ , such that there exists a surjective non-decreasing function from $A$ to $B$ and a surjective non-decreasing function from $B$ to $A$ , does there exist a surjective strictly increasing function from $B$ to $A$?



Time allowed for this problem was 2 hours.
2014 Iran MO (3rd Round)
Consider a flat field on which there exist a valley in the form of an infinite strip with arbitrary width $\omega$. There exist a polyhedron of diameter $d$(Diameter in a polyhedron is the maximum distance from the points on the polyhedron) is in one side and a pit of diameter $d$ on the other side of the valley. We want to roll the polyhedron and put it into the pit such that the polyhedron and the field always meet each other in one point at least while rolling (If the polyhedron and the field meet each other in one point at least then the polyhedron would not fall into the valley). For crossing over the bridge, we have built a rectangular bridge with a width of $\frac{d}{10}$ over the bridge. Prove that we can always put the polyhedron into the pit considering the mentioned conditions.



(You will earn a good score if you prove the decision for $\omega = 0$).
2014 Iran MO (3rd Round)
(a) $n$ is a natural number. $d_1,\dots,d_n,r_1,\dots ,r_n$ are natural numbers such that for each $i,j$ that $1\leq i < j \leq n$ we have $(d_i,d_j)=1$ and $d_i\geq 2$.

Prove that there exist an $x$ such that

(i) $1 \leq x \leq 3^n$

(ii)For each $1 \leq i \leq n$ $$x \overset{d_i}{\not{\equiv}} r_i$$

(b) For each $\epsilon >0$ prove that there exists natural $N$ such that for each $n>N$ and each $d_1,\dots,d_n,r_1,\dots ,r_n$ satisfying the conditions above there exists an $x$ satisfying (ii) such that $1\leq x \leq (2+\epsilon )^n$.



Time allowed for this exam was 75 minutes.
2014 Iran MO (3rd Round)
Let $P$ be a regular $2n$-sided polygon. A rhombus-ulation of $P$ is dividing $P$ into rhombuses such that no two intersect and no vertex of any rhombus is on the edge of other rhombuses or $P$.

(a) Prove that number of rhombuses is a function of $n$. Find the value of this function. Also find the number of vertices and edges of the rhombuses as a function of $n$.

(b) Prove or disprove that there always exists an edge $e$ of $P$ such that by erasing all the segments parallel to $e$ the remaining rhombuses are connected.

(c) Is it true that each two rhombus-ulations can turn into each other using the following algorithm multiple times?

Algorithm: Take a hexagon -not necessarily regular- consisting of 3 rhombuses and re-rhombus-ulate the hexagon.

(d) Let $f(n)$ be the number of ways to rhombus-ulate $P$. Prove that:$$\Pi_{k=1}^{n-1} ( \binom{k}{2} +1) \leq f(n) \leq \Pi_{k=1}^{n-1} k^{n-k} $$
2014 Iran MO (3rd Round)
A not necessary nonplanar polygon in $\mathbb{R}^3$ is called Grid Polygon if each of it's edges are parallel to one of the axes.

(a) There's a right angle between each two neighbour sides of the grid polygon, the plane containing this angle could be parallel to either $xy$ plane, $yz$ plane, or $xz$ plane. Prove that parity of the number of the angles that the plane containing each of them is parallel to $xy$ plane is equal to parity of the number of the angles that the plane containing each of them is parallel to $yz$ plane and parity of the number of the angles that the plane containing each of them is parallel to $zx$ plane.

(b) A grid polygon is called Inscribed if there's a point in the space that has an equal distance from all of the vertices of the polygon. Prove that any nonplanar grid hexagon is inscribed.

(c) Does there exist a grid 2014-gon without repeated vertices such that there exists a plane that intersects all of it's edges?

(d) If $a,b,c \in \mathbb{N}-\{1\}$, prove that $a,b,c$ are sidelengths of a triangle iff there exists a grid polygon in which the number of it's edges that are parallel to $x$ axis is $a$, the number of it's edges that are parallel to $y$ axis is $b$ and the number of it's edges that are parallel to $z$ axis is $c$.



Time allowed for this exam was 1 hour.
2014 Iran MO (3rd Round)
$P$ is a monic polynomial of odd degree greater than one such that there exists a function $f : \mathbb{R} \rightarrow \mathbb{N}$ such that for each $x \in \mathbb{R}$ ,$$f(P(x))=P(f(x))$$(a) Prove that there are a finite number of natural numbers in range of $f$.

(b) Prove that if $f$ is not constant then the equation $P(x)-x=0$ has at least two real solutions.

(c) For each natural $n>1$ prove that there exists a function $f : \mathbb{R} \rightarrow \mathbb{N}$  and a monic polynomial of odd degree greater than one $P$ such that for each $x \in \mathbb{R}$ ,$$f(P(x))=P(f(x))$$and range of $f$ contains exactly $n$ different numbers.



Time allowed for this problem was 105 minutes.
2014 Iran MO (3rd Round)
We have a machine that has an input and an output. The input is a letter from the finite set $I$ and the output is a lamp that at each moment has one of the colors of the set $C=\{c_1,\dots,c_p\}$.

At each moment the machine has an inner state that is one of the $n$ members of finite set $S$. The function $o: S \rightarrow C$ is a surjective function defining that at each state, what color must the lamp be, and the function $t:S \times I \rightarrow S$ is a function defining how does giving each input at each state changes the state. We only shall see the lamp and we have no direct information from the state of the car at current moment.

In other words a machine is $M=(S,I,C,o,t)$ such that $S,I,C$ are finite, $t:S \times I \rightarrow S$ , and $o:S \rightarrow C$ is surjective. It is guaranteed that for each two different inner states, there's a sequence of inputs such that the color of the lamp after giving the sequence to the machine at the first state is different from the color of the lamp after giving the sequence to the machine at the second state.

(a) The machine $M$ has $n$ different inner states. Prove that for each two different inner states, there's a sequence of inputs of length no more than $n-p$ such that the color of the lamp after giving the sequence to the machine at the first state is different from the color of the lamp after giving the sequence to the machine at the second state.

(b) Prove that for a machine $M$ with $n$ different inner states, there exists an algorithm with no more than $n^2$ inputs that starting at any unknown inner state, at the end of the algorithm the state of the machine at that moment is known.

Can you prove the above claim for $\frac{n^2}{2}$?
2014 Iran MO (3rd Round)
The polynomials $k_n(x_1, \ldots, x_n)$, where $n$ is a non-negative integer, satisfy the following conditions

$$k_0=1$$

$$k_1(x_1)=x_1$$

$$k_n(x_1, \ldots, x_n) = x_nk_{n-1}(x_1, \ldots , x_{n-1}) + (x_n^2+x_{n-1}^2)k_{n-2}(x_1,\ldots,x_{n-2})$$

Prove that for each non-negative $n$ we have $k_n(x_1,\ldots,x_n)=k_n(x_n,\ldots,x_1)$.
2013 Iran MO (3rd Round)
Let $a_0,a_1,\dots,a_n \in \mathbb N$. Prove that there exist positive integers $b_0,b_1,\dots,b_n$ such that for $0 \leq i \leq n : a_i \leq b_i \leq 2a_i$ and polynomial $$P(x) = b_0 + b_1 x + \dots + b_n x^n$$ is irreducible over $\mathbb Q[x]$.

(10 points)
2013 Iran MO (3rd Round)
Real numbers $a_1 , a_2 , \dots, a_n$ add up to zero. Find the maximum of $a_1 x_1 + a_2 x_2 + \dots + a_n x_n$ in term of $a_i$'s, when $x_i$'s vary in real numbers such that $(x_1 - x_2)^2 + (x_2 - x_3)^2 + \dots + (x_{n-1} - x_n)^2 \leq 1$.

(15 points)
2013 Iran MO (3rd Round)
For every positive integer $n \geq 2$, Prove that there is no $n-$tuple of distinct complex numbers $(x_1,x_2,\dots,x_n)$ such that for each $1 \leq k \leq n$ following equality holds.

$\prod_{\underset{i \neq k}{1 \leq i \leq n}}^{ } (x_k - x_i) = \prod_{\underset{i \neq k}{1 \leq i \leq n}}^{ } (x_k + x_i) $

(20 points)
2013 Iran MO (3rd Round)
Find all functions $f:\mathbb{R}\rightarrow \mathbb{R}$ such that $f(0) \in \mathbb Q$ and

$$f(x+f(y)^2 ) = {f(x+y)}^2.$$

(25 points)