← Blog

Introducing zen-Math

> <div align="center"> > <b> > 🚨 This model mainly supports English. We will release bilingual (English and Chinese) math models soon. > </b> > </div>

GITHUB HUGGING FACE MODELSCOPE DISCORD

🚨 This model mainly supports English. We will release bilingual (English and Chinese) math models soon.

Introduction

Over the past year, we have dedicated significant effort to researching and enhancing the reasoning capabilities of large language models, with a particular focus on their ability to solve arithmetic and mathematical problems. Today, we are delighted to introduce a series of math-specific large language models of our zen series, zen-Math and zen-Math-Instruct-1.5B/7B/72B. zen-Math is a series of specialized math language models built upon the zen LLMs, which significantly outperforms the mathematical capabilities of open-source models and even closed-source models (e.g., GPT-4o). We hope that zen-Math can contribute to the community for solving complex mathematical problems.

We evaluate our math-specific models on a series of math benchmarks. The results below demonstrate that our largest math-specific model zen-Math-72B-Instruct outperforms the state-of-the-art models, including GPT-4o, Claude-3.5-Sonnet, Gemini-1.5-Pro, and Llama-3.1-405B.

zen-Math: Base Models

The base models of zen-Math are initialized with zen-1.5B/7B/72B, and then pretrained on a meticulously designed Mathematics-specific Corpus. This corpus contains large-scale high-quality mathematical web texts, books, codes, exam questions, and mathematical pre-training data synthesized by zen.

We evaluate our zen-Math base models on three widely used English math benchmarks GSM8K, Math, and MMLU-STEM. In addition, we also evaluate three Chinese math benchmarks CMATH, GaoKao Math Cloze, and GaoKao Math QA. All evaluations are tested with few-shot chain-of-thought prompting.

zen-Math-Instruct: Instruction-Tuned Models

We first trained a math-specific reward model based on zen-Math-72B. We then combined this dense reward signal with a binary signal indicating whether the model answered correctly. This combined signal is used as supervision for constructing the SFT data through Rejection Sampling and also in the reinforcement learning with Group Relative Policy Optimization (GRPO) after SFT.

We evaluate zen-Math-Instruct on mathematical benchmarks in both English and Chinese. In addition to the widely-used benchmarks, such as GSM8K and Math, we also involve more exams that are much challenging to fully inspect the capabilities of zen-Math-Instruct, such as OlympiadBench, CollegeMath, GaoKao, AIME2024, and AMC2023. For Chinese mathematical benchmarks, we use CMATH, Gaokao (Chinese college entrance examination 2024), and CN Middle School 24 (China High School Entrance Examination 2024).

We report greedy , Maj@8 and RM@8 performance on all benchmarks in the zero-shot setting, except for the multi-choice benchmarks (including MMLU STEM and multiple-choice problems in GaoKao and CN Middle School 24) with a 5-shot setting. zen-Math-Instruct achieves the best performance among models of the same size, with RM@8 outperforming Maj@8, particularly in the 1.5B and 7B models. This demonstrates the effectiveness of our math reward model.

In more complex mathematical competition evaluations such as AIME 2024 and AMC 2023, zen-Math-Instruct also performs well across various settings, including Greedy, Maj@64, RM@64, and RM@256.

Case Study

Here we list some test cases, which include some IMO math problems. From the experimental results and case study, we find that zen-Math is capable of solving simple math competition problems. Feel free to click the expandable blocks to check the cases!

All the solutions are generated by our model without modification. Please note that we do not guarantee the correctness of the claims in the process.

Problem From IMO Shortlist 2002

Problem

What is the smallest positive integer tt such that there exist integers x1,x2,,xtx_1,x_2,\ldots,x_t with

x13+x23++xt3=2002{2002},x^3_1+x^3_2+\,\ldots\,+x^3_t=2002^\{2002\},

zen-Math-72B-Instruct Solution

To determine the smallest positive integer tt such that there exist integers x1,x2,,xtx_1, x_2, \ldots, x_t satisfying the equation

x13+x23++xt3=2002{2002},x_1^3 + x_2^3 + \cdots + x_t^3 = 2002^\{2002\},

we start by analyzing the properties of cubes and their sums. We need to find the smallest tt for which the sum of tt cubes equals 200220022002^{2002}.

First, we note that 20022002 can be factored into prime factors:

2002=2×7×11×13.2002 = 2 \times 7 \times 11 \times 13.

Thus,

2002{2002}=(2×7×11×13){2002}=2{2002}×7{2002}×11{2002}×13{2002}.2002^\{2002\} = (2 \times 7 \times 11 \times 13)^\{2002\} = 2^\{2002\} \times 7^\{2002\} \times 11^\{2002\} \times 13^\{2002\}.

Next, we consider the properties of cubes modulo 9. Cubes modulo 9 can only be congruent to 0,1,0, 1, or 1-1. This is because:

030(mod{)9},131(mod{)9},2381(mod{)9},33270(mod{)9},43641(mod{)9},531251(mod{)9},632160(mod{)9},733431(mod{)9},835121(mod{)9}.\begin{aligned} 0^3 &\equiv 0 \pmod\{9\}, \\\\\\ 1^3 &\equiv 1 \pmod\{9\}, \\\\\\ 2^3 &\equiv 8 \equiv -1 \pmod\{9\}, \\\\\\ 3^3 &\equiv 27 \equiv 0 \pmod\{9\}, \\\\\\ 4^3 &\equiv 64 \equiv 1 \pmod\{9\}, \\\\\\ 5^3 &\equiv 125 \equiv -1 \pmod\{9\}, \\\\\\ 6^3 &\equiv 216 \equiv 0 \pmod\{9\}, \\\\\\ 7^3 &\equiv 343 \equiv 1 \pmod\{9\}, \\\\\\ 8^3 &\equiv 512 \equiv -1 \pmod\{9\}. \end{aligned}

Now, we need to determine 20022002mod92002^{2002} \mod 9. First, we find 2002mod92002 \mod 9:

2002÷9=222{remainder}420024(mod{)9}.2002 \div 9 = 222 \text\{ remainder \} 4 \quad \Rightarrow \quad 2002 \equiv 4 \pmod\{9\}.

Thus,

2002{2002}4{2002}(mod{)9}.2002^\{2002\} \equiv 4^\{2002\} \pmod\{9\}.

Next, we use Euler's theorem, which states that aϕ(n)1(modn)a^{\phi(n)} \equiv 1 \pmod{n} for gcd(a,n)=1\gcd(a, n) = 1. Here, ϕ(9)=6\phi(9) = 6, so:

461(mod{)9}.4^6 \equiv 1 \pmod\{9\}.

We can reduce the exponent 2002mod62002 \mod 6:

2002÷6=333{remainder}420024(mod{)6}.2002 \div 6 = 333 \text\{ remainder \} 4 \quad \Rightarrow \quad 2002 \equiv 4 \pmod\{6\}.

Thus,

4{2002}44(mod{)9}.4^\{2002\} \equiv 4^4 \pmod\{9\}. 44=256.4^4 = 256.

Finally, we find 256mod9256 \mod 9:

256÷9=28{remainder}42564(mod{)9}.256 \div 9 = 28 \text\{ remainder \} 4 \quad \Rightarrow \quad 256 \equiv 4 \pmod\{9\}.

Therefore,

2002{2002}4(mod{)9}.2002^\{2002\} \equiv 4 \pmod\{9\}.

We need to find the smallest tt such that the sum of tt cubes is congruent to 4 modulo 9. The possible sums of cubes modulo 9 are:

00(mod{)9},11(mod{)9},18(mod{)9},1+12(mod{)9},1+(1)0(mod{)9},1+(1)27(mod{)9},1+1+13(mod{)9},1+1+(1)1(mod{)9},1+(1)+(1)18(mod{)9},1+(1)+(1)36(mod{)9},1+1+1+14(mod{)9}.\begin{aligned} 0 &\equiv 0 \pmod\{9\}, \\\\\\ 1 &\equiv 1 \pmod\{9\}, \\\\\\ -1 &\equiv 8 \pmod\{9\}, \\\\\\ 1 + 1 &\equiv 2 \pmod\{9\}, \\\\\\ 1 + (-1) &\equiv 0 \pmod\{9\}, \\\\\\ -1 + (-1) &\equiv -2 \equiv 7 \pmod\{9\}, \\\\\\ 1 + 1 + 1 &\equiv 3 \pmod\{9\}, \\\\\\ 1 + 1 + (-1) &\equiv 1 \pmod\{9\}, \\\\\\ 1 + (-1) + (-1) &\equiv -1 \equiv 8 \pmod\{9\}, \\\\\\ -1 + (-1) + (-1) &\equiv -3 \equiv 6 \pmod\{9\}, \\\\\\ 1 + 1 + 1 + 1 &\equiv 4 \pmod\{9\}. \end{aligned}

We see that the sum of four cubes can be congruent to 4 modulo 9. Therefore, the smallest tt is 4.

Thus, the smallest positive integer tt such that there exist integers x1,x2,,xtx_1, x_2, \ldots, x_t with

x13+x23++xt3=2002{2002}x_1^3 + x_2^3 + \cdots + x_t^3 = 2002^\{2002\}

is

{4}.\boxed\{4\}.
Problem From IMO Shortlist 2022

Problem

For a positive integer nn we denote by s(n)s(n) the sum of the digits of nn. Let P(x)=xn+an1xn1++a1x+a0P(x)=x^n+a_{n-1}x^{n-1}+\cdots+a_1x+a_0 be a polynomial, where n2n \geqslant 2 and aia_i is a positive integer for all 0in1 0 \leqslant i \leqslant n-1. Could it be the case that, for all positive integers kk, s(k)s(k) and s(P(k))s(P(k)) have the same parity?

zen-Math-72B-Instruct Solution

To determine whether it is possible for s(k)s(k) and s(P(k))s(P(k)) to have the same parity for all positive integers kk, we need to analyze the behavior of the sum of the digits function ss and the polynomial P(x)P(x).

First, recall that the sum of the digits of a number kk modulo 2 is equivalent to kmod2k \mod 2. This is because the sum of the digits of kk in base 10 is congruent to kmod9k \mod 9, and since 91mod29 \equiv 1 \mod 2, the sum of the digits modulo 2 is the same as kmod2k \mod 2.

Given the polynomial P(x)=xn+an1xn1++a1x+a0P(x) = x^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0, we need to determine the parity of P(k)P(k) for any positive integer kk. Specifically, we need to check if P(k)mod2P(k) \mod 2 is the same as kmod2k \mod 2.

Let's consider the polynomial modulo 2:

P(x)xn+an1xn1++a1x+a0mod2.P(x) \equiv x^n + a_{n-1}x^{n-1} + \cdots + a_1x + a_0 \mod 2.

Since aia_i are positive integers, aimod2a_i \mod 2 is either 0 or 1. Let bi=aimod2b_i = a_i \mod 2. Then we can rewrite the polynomial modulo 2 as:

P(x)xn+bn1xn1++b1x+b0mod2.P(x) \equiv x^n + b_{n-1}x^{n-1} + \cdots + b_1x + b_0 \mod 2.

Now, we need to check the parity of P(k)P(k) for k0mod2k \equiv 0 \mod 2 and k1mod2k \equiv 1 \mod 2.

  1. Case 1: k0mod2k \equiv 0 \mod 2

    P(0)b0mod2.P(0) \equiv b_0 \mod 2.

    For s(P(0))s(P(0)) to have the same parity as s(0)s(0), b0b_0 must be 0. Therefore, a0a_0 must be even.

  2. Case 2: k1mod2k \equiv 1 \mod 2

    P(1)1n+bn11n1++b11+b01+bn1++b1+b0mod2.P(1) \equiv 1^n + b_{n-1} \cdot 1^{n-1} + \cdots + b_1 \cdot 1 + b_0 \equiv 1 + b_{n-1} + \cdots + b_1 + b_0 \mod 2.

    For s(P(1))s(P(1)) to have the same parity as s(1)s(1), 1+bn1++b1+b01 + b_{n-1} + \cdots + b_1 + b_0 must be odd. Since 11 is odd, the sum bn1++b1+b0b_{n-1} + \cdots + b_1 + b_0 must be even.

From the above cases, we have:

  • a0a_0 must be even.
  • The sum bn1++b1+b0b_{n-1} + \cdots + b_1 + b_0 must be even.

However, if a0a_0 is even, then b0=0b_0 = 0. This means the sum bn1++b1b_{n-1} + \cdots + b_1 must be even. But since bib_i are either 0 or 1, the sum of bn1++b1b_{n-1} + \cdots + b_1 being even implies that there must be an even number of 1's among bn1,,b1b_{n-1}, \ldots, b_1.

Now, consider the polynomial P(x)=xn+1P(x) = x^n + 1. For this polynomial:

  • a0=1a_0 = 1 (odd), which contradicts our requirement that a0a_0 must be even.
  • The sum bn1++b1+b0=1b_{n-1} + \cdots + b_1 + b_0 = 1 (odd), which also contradicts our requirement that the sum must be even.

Therefore, it is impossible for s(k)s(k) and s(P(k))s(P(k)) to have the same parity for all positive integers kk.

Thus, the final answer is:

No\boxed{\text{No}}
Problem From IMO 2022

Problem

Let R+\mathbb{R}^+ denote the set of positive real numbers. Find all functions f:R+R+f: \mathbb{R}^+ \to \mathbb{R}^+ such that for each xR+x \in \mathbb{R}^+, there is exactly one yR+y \in \mathbb{R}^+ satisfying

xf(y)+yf(x)2xf(y)+yf(x) \leq 2

zen-Math-72B-Instruct Solution

To find all functions f:R+R+f: \mathbb{R}^+ \to \mathbb{R}^+ such that for each xR+x \in \mathbb{R}^+, there is exactly one yR+y \in \mathbb{R}^+ satisfying

xf(y)+yf(x)2,xf(y) + yf(x) \leq 2,

we will proceed step by step.

Step 1: Analyze the given inequality Given xR+x \in \mathbb{R}^+, there exists a unique yR+y \in \mathbb{R}^+ such that

xf(y)+yf(x)2.xf(y) + yf(x) \leq 2.

We need to explore the implications of this condition.

Step 2: Consider the case x=yx = y Substitute y=xy = x into the inequality:

xf(x)+xf(x)=2xf(x)2.xf(x) + xf(x) = 2xf(x) \leq 2.

This simplifies to:

xf(x)1.xf(x) \leq 1.

Thus, for all xR+x \in \mathbb{R}^+,

f(x)1x.f(x) \leq \frac{1}{x}.

Step 3: Consider the uniqueness condition For each xR+x \in \mathbb{R}^+, there is exactly one yR+y \in \mathbb{R}^+ such that xf(y)+yf(x)2xf(y) + yf(x) \leq 2. We need to ensure that this yy is unique.

Step 4: Test the function f(x)=1xf(x) = \frac{1}{x} Consider the function f(x)=1xf(x) = \frac{1}{x}. Substitute f(x)=1xf(x) = \frac{1}{x} and f(y)=1yf(y) = \frac{1}{y} into the inequality:

x1y+y1x=xy+yx.x \cdot \frac{1}{y} + y \cdot \frac{1}{x} = \frac{x}{y} + \frac{y}{x}.

We need:

xy+yx2.\frac{x}{y} + \frac{y}{x} \leq 2.

Using the AM-GM inequality, we know:

xy+yx2.\frac{x}{y} + \frac{y}{x} \geq 2.

Equality holds if and only if xy=1\frac{x}{y} = 1, which implies x=yx = y.

Thus, for f(x)=1xf(x) = \frac{1}{x}, the inequality xf(y)+yf(x)2xf(y) + yf(x) \leq 2 holds if and only if x=yx = y. This satisfies the condition that there is exactly one yy for each xx.

Step 5: Verify if other functions can satisfy the condition Suppose there exists another function g:R+R+g: \mathbb{R}^+ \to \mathbb{R}^+ such that g(x)1xg(x) \neq \frac{1}{x} for some xx. Then, for some xx, g(x)<1xg(x) < \frac{1}{x} or g(x)>1xg(x) > \frac{1}{x}.

  • If g(x)<1xg(x) < \frac{1}{x}, then xg(y)+yg(x)xg(y) + yg(x) might not satisfy the inequality for all yy.
  • If g(x)>1xg(x) > \frac{1}{x}, then xg(y)+yg(x)xg(y) + yg(x) might exceed 2 for some yy.

Thus, any function other than f(x)=1xf(x) = \frac{1}{x} would not satisfy the uniqueness condition.

Conclusion The only function f:R+R+f: \mathbb{R}^+ \to \mathbb{R}^+ that satisfies the given condition is:

f(x)=1x.\boxed{f(x) = \frac{1}{x}}.
Problem from International Zhautykov Olympiad 2020

Problem

Let ZZ be the set of all integers. Find all the function f:ZZf: Z \to Z such that

f(4x+3y)=f(3x+y)+f(x+2y)f(4x+3y)=f(3x+y)+f(x+2y)

For all integers x,yx,y

zen-Math-72B-Instruct Solution

To find all functions f:ZZf: \mathbb{Z} \to \mathbb{Z} that satisfy the functional equation

f(4x+3y)=f(3x+y)+f(x+2y)f(4x + 3y) = f(3x + y) + f(x + 2y)

for all integers xx and yy, we will proceed step by step.

Step 1: Initial Substitution

First, let's substitute specific values for xx and yy to gain insight into the function.

Substitution 1: x=0x = 0

f(40+3y)=f(30+y)+f(0+2y)f(4 \cdot 0 + 3y) = f(3 \cdot 0 + y) + f(0 + 2y) f(3y)=f(y)+f(2y)f(3y) = f(y) + f(2y)

Substitution 2: y=0y = 0

f(4x+30)=f(3x+0)+f(x+20)f(4x + 3 \cdot 0) = f(3x + 0) + f(x + 2 \cdot 0) f(4x)=f(3x)+f(x)f(4x) = f(3x) + f(x)

Step 2: Exploring Further Substitutions

We now have two equations:

  1. f(3y)=f(y)+f(2y)f(3y) = f(y) + f(2y)
  2. f(4x)=f(3x)+f(x)f(4x) = f(3x) + f(x)

Substitution 3: y=1y = 1 in the first equation

f(31)=f(1)+f(21)f(3 \cdot 1) = f(1) + f(2 \cdot 1) f(3)=f(1)+f(2)f(3) = f(1) + f(2)

Substitution 4: x=1x = 1 in the second equation

f(41)=f(31)+f(1)f(4 \cdot 1) = f(3 \cdot 1) + f(1) f(4)=f(3)+f(1)f(4) = f(3) + f(1)

Step 3: Using the Equations to Find a Pattern

We have:

f(3)=f(1)+f(2)f(3) = f(1) + f(2) f(4)=f(3)+f(1)f(4) = f(3) + f(1)

Substitute f(3)f(3) from the first equation into the second equation:

f(4)=(f(1)+f(2))+f(1)f(4) = (f(1) + f(2)) + f(1) f(4)=2f(1)+f(2)f(4) = 2f(1) + f(2)

Step 4: Generalizing the Function

We hypothesize that ff might be a linear function. Let's assume f(x)=kxf(x) = kx for some integer kk.

Verification Substitute f(x)=kxf(x) = kx into the original functional equation:

f(4x+3y)=k(4x+3y)f(4x + 3y) = k(4x + 3y) f(3x+y)=k(3x+y)f(3x + y) = k(3x + y) f(x+2y)=k(x+2y)f(x + 2y) = k(x + 2y)

The original equation becomes:

k(4x+3y)=k(3x+y)+k(x+2y)k(4x + 3y) = k(3x + y) + k(x + 2y) 4kx+3ky=3kx+ky+kx+2ky4kx + 3ky = 3kx + ky + kx + 2ky 4kx+3ky=4kx+3ky4kx + 3ky = 4kx + 3ky

This equation holds true for all xx and yy, confirming that f(x)=kxf(x) = kx is a solution.

Conclusion

The only functions f:ZZf: \mathbb{Z} \to \mathbb{Z} that satisfy the given functional equation are of the form f(x)=kxf(x) = kx for some integer kk.

Thus, the final answer is:

f(x)=kx for some integer k\boxed{f(x) = kx \text{ for some integer } k}
Problem From Baltic Way 2023

Problem

Find all functions f:RRf: \mathbb{R} \rightarrow \mathbb{R} such that

f(f(x)+y)+xf(y)=f(xy+y)+f(x)f(f(x)+y)+xf(y)=f(xy+y)+f(x)
for reals $x, y$.

zen-Math-72B-Instruct Solution:

To find all functions f:RRf: \mathbb{R} \rightarrow \mathbb{R} that satisfy the functional equation

f(f(x)+y)+xf(y)=f(xy+y)+f(x),f(f(x) + y) + x f(y) = f(xy + y) + f(x),

we will proceed step by step.

Step 1: Initial Substitution

First, let's substitute y=0y = 0 into the equation:

f(f(x)+0)+xf(0)=f(x0+0)+f(x).f(f(x) + 0) + x f(0) = f(x \cdot 0 + 0) + f(x).

This simplifies to:

f(f(x))+xf(0)=f(0)+f(x).f(f(x)) + x f(0) = f(0) + f(x).

Rearranging terms, we get:

f(f(x))=f(x)+f(0)xf(0).f(f(x)) = f(x) + f(0) - x f(0).

Step 2: Analyzing the Simplified Equation

Let c=f(0)c = f(0). The equation becomes:

f(f(x))=f(x)+cxc.f(f(x)) = f(x) + c - x c.

Step 3: Substituting x=0x = 0

Next, substitute x=0x = 0 into the original equation:

f(f(0)+y)+0f(y)=f(0y+y)+f(0).f(f(0) + y) + 0 \cdot f(y) = f(0 \cdot y + y) + f(0).

This simplifies to:

f(c+y)=f(y)+c.f(c + y) = f(y) + c.

Step 4: Substituting y=cy = -c

Substitute y=cy = -c into the equation f(c+y)=f(y)+cf(c + y) = f(y) + c:

f(cc)=f(c)+c.f(c - c) = f(-c) + c.

This simplifies to:

f(0)=f(c)+c.f(0) = f(-c) + c.

Since f(0)=cf(0) = c, we have:

c=f(c)+c.c = f(-c) + c.

Subtracting cc from both sides, we get:

f(c)=0.f(-c) = 0.

Step 5: Substituting y=f(x)y = -f(x)

Substitute y=f(x)y = -f(x) into the original equation:

f(f(x)f(x))+xf(f(x))=f(x(f(x))f(x))+f(x).f(f(x) - f(x)) + x f(-f(x)) = f(x(-f(x)) - f(x)) + f(x).

This simplifies to:

f(0)+xf(f(x))=f(xf(x)f(x))+f(x).f(0) + x f(-f(x)) = f(-x f(x) - f(x)) + f(x).

Since f(0)=cf(0) = c, we have:

c+xf(f(x))=f(xf(x)f(x))+f(x).c + x f(-f(x)) = f(-x f(x) - f(x)) + f(x).

Step 6: Considering f(x)=0f(x) = 0

Assume f(x)=0f(x) = 0 for all xx. Substitute f(x)=0f(x) = 0 into the original equation:

f(0+y)+xf(y)=f(xy+y)+f(x).f(0 + y) + x f(y) = f(xy + y) + f(x).

This simplifies to:

f(y)+0=f(y)+0,f(y) + 0 = f(y) + 0,

which is always true.

Step 7: Verifying f(x)=xf(x) = x

Assume f(x)=xf(x) = x. Substitute f(x)=xf(x) = x into the original equation:

f(x+y)+xf(y)=f(xy+y)+f(x).f(x + y) + x f(y) = f(xy + y) + f(x).

This simplifies to:

x+y+xy=xy+y+x,x + y + xy = xy + y + x,

which is always true.

Conclusion

The only functions that satisfy the given functional equation are f(x)=0f(x) = 0 and f(x)=xf(x) = x. Therefore, the solutions are:

f(x)=0 or f(x)=x.\boxed{f(x) = 0 \text{ or } f(x) = x}.
Problem From Lusophon Mathematical Olympiad 2023

Problem

A long time ago, there existed Martians with 3 3 different colours: red, green and blue. As Mars was devastated by an intergalactic war, only 2 2 Martians of each colours survived. In order to reconstruct the Martian population, they decided to use a machine that transforms two Martians of distinct colours into four Martians of colour different to the two initial ones. For example, if a red Martian and a blue Martian use the machine, they'll be transformed into four green Martians.

a) Is it possible that, after using that machine finitely many times, we have 20222022 red Martians, 2022 2022 green Martians and 2022 2022 blue Martians?

b) Is it possible that, after using that machine finitely many times, we have 2021 2021 red Martians, 2022 2022 green Martians and 2023 2023 blue Martians?

zen-Math-72B-Instruct Solution

Let's analyze the problem step by step.

Part (a)

We start with 2 red, 2 green, and 2 blue Martians. The machine transforms two Martians of distinct colors into four Martians of the third color. We need to determine if it is possible to end up with 2022 red, 2022 green, and 2022 blue Martians.

First, let's consider the parity (odd or even nature) of the number of Martians of each color. Initially, we have:

  • 2 red (even)
  • 2 green (even)
  • 2 blue (even)

Each transformation changes the parity of the number of Martians of the two initial colors and the parity of the number of Martians of the third color. Specifically:

  • If we transform 1 red and 1 green Martian, we get 4 blue Martians. This changes the parity of red and green Martians from even to odd, and the parity of blue Martians from even to odd.
  • If we transform 1 red and 1 blue Martian, we get 4 green Martians. This changes the parity of red and blue Martians from even to odd, and the parity of green Martians from even to odd.
  • If we transform 1 green and 1 blue Martian, we get 4 red Martians. This changes the parity of green and blue Martians from even to odd, and the parity of red Martians from even to odd.

In all cases, the parity of the number of Martians of each color changes from even to odd or from odd to even. Therefore, after any number of transformations, the parity of the number of Martians of each color will always be the same as it was initially.

Since initially all three colors have an even number of Martians, after any number of transformations, the number of Martians of each color will remain even.

Given that 2022 is an even number, it is possible to have 2022 red, 2022 green, and 2022 blue Martians after a finite number of transformations.

Thus, the answer to part (a) is:

Yes\boxed{\text{Yes}}

Part (b)

We start again with 2 red, 2 green, and 2 blue Martians. We need to determine if it is possible to end up with 2021 red, 2022 green, and 2023 blue Martians.

As in part (a), we consider the parity of the number of Martians of each color. Initially, we have:

  • 2 red (even)
  • 2 green (even)
  • 2 blue (even)

Each transformation changes the parity of the number of Martians of the two initial colors and the parity of the number of Martians of the third color. Therefore, after any number of transformations, the parity of the number of Martians of each color will always be the same as it was initially.

Since initially all three colors have an even number of Martians, after any number of transformations, the number of Martians of each color will remain even.

Given that 2021 is an odd number, it is impossible to have 2021 red Martians after any number of transformations. Similarly, 2023 is an odd number, making it impossible to have 2023 blue Martians.

Thus, the answer to part (b) is:

No\boxed{\text{No}}
Problem From Balkan MO 2023

Problem

Joe and Penny play a game. Initially there are 5000 5000 stones in a pile, and the two players remove stones from the pile by making a sequence of moves. On the k k-th move, any number of stones between 1 1 and k k inclusive may be removed. Joe makes the odd-numbered moves and Penny makes the even-numbered moves. The player who removes the very last stone is the winner. Who wins if both players play perfectly?

zen-Math-72B-Instruct Solution

To determine the winner of the game, we need to analyze the strategy and the sequence of moves. Let's break down the problem step by step.

  1. Understanding the Game Rules:

    • Initially, there are 5000 stones.
    • Joe makes the first move (odd-numbered move), Penny makes the second move (even-numbered move), and so on.
    • On the kk-th move, a player can remove between 1 and kk stones.
    • The player who removes the last stone wins.
  2. Key Insight:

    • The game is symmetric in the sense that the number of stones a player can remove on their turn increases linearly with the move number.
    • The total number of moves in the game is equal to the number of stones initially in the pile, which is 5000.
  3. Total Number of Moves:

    • Since there are 5000 stones, there will be 5000 moves in total.
    • Joe makes the odd-numbered moves: 1st, 3rd, 5th, ..., 4999th.
    • Penny makes the even-numbered moves: 2nd, 4th, 6th, ..., 5000th.
  4. Determining the Winner:

    • The last move (5000th move) is an even-numbered move.
    • Therefore, Penny will make the last move.
  5. Conclusion:

    • Since Penny makes the last move, she will be the one to remove the last stone.
    • Hence, Penny wins the game if both players play perfectly.

Thus, the final answer is:

Penny\boxed{\text{Penny}}
Problem From Math Odyssey

Problem

The school offers 10 elective courses, and each student can enroll in any number of courses. The director selects kk students, where although each student's combination of courses is different, any two students have at least one course in common. At this point, it is found that any student outside these kk students cannot be classmates with these kk students regardless of how they enroll (having one course in common is enough to be classmates). Find the maximum number of kk.

zen-Math-72B-Instruct Solution

To solve this problem, we need to determine the maximum number of students kk such that each student has a unique combination of elective courses, any two students share at least one course, and no student outside these kk students can be classmates with all of them. This means that the set of students chosen must cover all possible courses in such a way that any new student would have to share a course with at least one of the chosen students.

First, let's consider the total number of possible combinations of courses. Since there are 10 elective courses and each student can either take or not take each course, there are 210=10242^{10} = 1024 possible combinations of courses. However, one of these combinations is the empty set (the student takes no courses), which is not a valid combination for our problem because it would not share any courses with any other student. Therefore, there are 10241=10231024 - 1 = 1023 non-empty combinations of courses.

We need to find the maximum number of students kk such that any two students share at least one course, and no student outside these kk students can be classmates with all of them. This is equivalent to finding the maximum number of vertices in a graph where each vertex represents a non-empty combination of courses, and there is an edge between two vertices if and only if the corresponding combinations share at least one course. The condition that no student outside these kk students can be classmates with all of them means that the set of kk students forms a dominating set in the graph.

The maximum size of such a set is the complement of the minimum size of an independent set in the graph. An independent set in this graph is a set of vertices such that no two vertices are adjacent, which means no two combinations share any course. The maximum size of an independent set in this graph is the number of combinations where each course is either taken or not taken by exactly one student, which is 29=5122^9 = 512 (since we can choose to include or exclude each of the 9 remaining courses for each of the 10 courses).

Therefore, the minimum size of an independent set is 512, and the maximum size of a dominating set (which is the complement of the independent set) is 1023512+1=5111023 - 512 + 1 = 511. However, we need to add 1 because the empty set is not included, so the correct calculation is 1023511=5121023 - 511 = 512.

Thus, the maximum number of students kk is 512\boxed{512}.

Problem from USAMO 2010

Problem

Let ABCABC be a triangle with A=90\angle A = 90^{\circ}. Points DD and EE lie on sides ACAC and ABAB, respectively, such that ABD=DBC\angle ABD = \angle DBC and ACE=ECB\angle ACE = \angle ECB. Segments BDBD and CECE meet at II. Determine whether or not it is possible for segments ABAB, ACAC, BIBI, IDID, CICI, IEIE to all have integer lengths.

zen-Math-72B-Instruct Solution

To determine whether it is possible for segments ABAB, ACAC, BIBI, IDID, CICI, and IEIE to all have integer lengths in triangle ABCABC with A=90\angle A = 90^\circ, we start by analyzing the given conditions and properties of the triangle.

Given:

  • A=90\angle A = 90^\circ
  • ABD=DBC\angle ABD = \angle DBC
  • ACE=ECB\angle ACE = \angle ECB
  • Segments BDBD and CECE intersect at II

First, note that since A=90\angle A = 90^\circ, triangle ABCABC is a right triangle with AA as the right angle. Points DD and EE are such that BDBD and CECE are angle bisectors of ABC\angle ABC and ACB\angle ACB, respectively. Therefore, II is the incenter of triangle ABCABC.

Step 1: Coordinates and Lengths Assume AA is at the origin (0,0)(0, 0), BB is at (a,0)(a, 0), and CC is at (0,b)(0, b). The lengths of the sides are:

  • AB=aAB = a
  • AC=bAC = b
  • BC=a2+b2BC = \sqrt{a^2 + b^2}

Step 2: Incenter Coordinates The incenter II of a right triangle with legs aa and bb and hypotenuse a2+b2\sqrt{a^2 + b^2} is located at:

I=(a2,b2)I = \left( \frac{a}{2}, \frac{b}{2} \right)

Step 3: Lengths of Segments BIBI and CICI Using the distance formula, we calculate BIBI and CICI:

BI=(aa2)2+(0b2)2=(a2)2+(b2)2=a2+b22BI = \sqrt{\left( a - \frac{a}{2} \right)^2 + \left( 0 - \frac{b}{2} \right)^2} = \sqrt{\left( \frac{a}{2} \right)^2 + \left( \frac{b}{2} \right)^2} = \frac{\sqrt{a^2 + b^2}}{2} CI=(0a2)2+(bb2)2=(a2)2+(b2)2=a2+b22CI = \sqrt{\left( 0 - \frac{a}{2} \right)^2 + \left( b - \frac{b}{2} \right)^2} = \sqrt{\left( \frac{a}{2} \right)^2 + \left( \frac{b}{2} \right)^2} = \frac{\sqrt{a^2 + b^2}}{2}

Step 4: Lengths of Segments IDID and IEIE Since DD and EE are points on ACAC and ABAB respectively, and II is the incenter, IDID and IEIE are the distances from the incenter to the sides of the triangle. For a right triangle, these distances are given by:

ID=IE=r=a+ba2+b22ID = IE = r = \frac{a + b - \sqrt{a^2 + b^2}}{2}

Step 5: Integer Lengths For ABAB, ACAC, BIBI, IDID, CICI, and IEIE to all be integers, the following must hold:

  • aa and bb are integers
  • a2+b22\frac{\sqrt{a^2 + b^2}}{2} is an integer
  • a+ba2+b22\frac{a + b - \sqrt{a^2 + b^2}}{2} is an integer

Step 6: Analysis For a2+b22\frac{\sqrt{a^2 + b^2}}{2} to be an integer, a2+b2\sqrt{a^2 + b^2} must be an even integer. Let a2+b2=2k\sqrt{a^2 + b^2} = 2k for some integer kk. Then:

a2+b2=4k2a^2 + b^2 = 4k^2

For a+ba2+b22\frac{a + b - \sqrt{a^2 + b^2}}{2} to be an integer, a+b2ka + b - 2k must be even. Since aa and bb are integers, a+ba + b must be even.

Conclusion Given the constraints, it is possible to find integer values for aa and bb such that all the conditions are satisfied. For example, if a=3a = 3 and b=4b = 4, then:

  • AB=3AB = 3
  • AC=4AC = 4
  • BC=5BC = 5
  • BI=CI=52=2.5BI = CI = \frac{5}{2} = 2.5 (not an integer)

Thus, it is not possible for all segments ABAB, ACAC, BIBI, IDID, CICI, and IEIE to have integer lengths simultaneously.

No\boxed{\text{No}}
Problem from JBMO Shortlist 2011

Problem

Let AD,BFAD,BF and CE{CE} be the altitudes of ABC\vartriangle ABC. A line passing through D{D} and parallel to AB{AB}intersects the line EF{EF}at the point G{G}. If H{H} is the orthocenter of ABC\vartriangle ABC, find the angle CGH{\angle{CGH}}.

zen-Math-72B-Instruct Solution

To solve for the angle CGH\angle CGH in the given triangle ABC\triangle ABC with altitudes ADAD, BFBF, and CECE intersecting at the orthocenter HH, and a line through DD parallel to ABAB intersecting EFEF at GG, we will follow these steps:

  1. Identify Key Points and Properties:

    • DD is the foot of the altitude from AA to BCBC.
    • EE is the foot of the altitude from BB to ACAC.
    • FF is the foot of the altitude from CC to ABAB.
    • HH is the orthocenter of ABC\triangle ABC.
    • GG is the intersection of the line through DD parallel to ABAB and the line EFEF.
  2. Use the Property of the Orthocenter:

    • The orthocenter HH lies on the altitudes ADAD, BFBF, and CECE.
    • The points DD, EE, and FF are collinear with HH on the respective altitudes.
  3. Analyze the Parallel Line:

    • Since DGABDG \parallel AB, ADG=DAB\angle ADG = \angle DAB (corresponding angles).
  4. Consider the Cyclic Quadrilateral:

    • The quadrilateral AEHFAEHF is cyclic because AEH=AFH=90\angle AEH = \angle AFH = 90^\circ.
    • Therefore, EHF=180EAF\angle EHF = 180^\circ - \angle EAF.
  5. Use the Parallel Line Property Again:

    • Since DGABDG \parallel AB, DGE=BAE\angle DGE = \angle BAE (alterFnate interior angles).
  6. Relate Angles in Cyclic Quadrilateral:

    • In AEF\triangle AEF, EAF=EHF\angle EAF = \angle EHF because they are opposite angles in the cyclic quadrilateral AEHFAEHF.
  7. Determine CGH\angle CGH:

    • Since GG lies on EFEF and DGABDG \parallel AB, DGE=BAE\angle DGE = \angle BAE.
    • BAE=EAF\angle BAE = \angle EAF (as established).
    • Therefore, DGE=EAF\angle DGE = \angle EAF.
  8. Final Angle Calculation:

    • Since EAF=EHF\angle EAF = \angle EHF and EHF=90\angle EHF = 90^\circ (as HH is the orthocenter and EE and FF are feet of perpendiculars), we have: CGH=EHF=90.\angle CGH = \angle EHF = 90^\circ.

Thus, the angle CGH\angle CGH is 90\boxed{90^\circ}.

Decontamination

We conduct decontamination methods on both our pretraining and post-training datasets. Specifically, for pretraining data, we target on math datasets, including GSM8K, MATH, and remove samples that have significant overlaps with the test sets. We use exact match to remove the identical samples and further apply 13-gram deduplication (with a condition that the ratio of longest common sequence should be larger than 0.6) to remove more samples that might cause contamination. For post-training data, we remove more postitive contaminated samples that have overlaps with GSM8K, MATH, Aqua, SAT Math, OlympiadBench, College Math, AIME24, AMC23, etc. with the same filtering method.

Summary

This time, we're releasing a new model series focused on mathematical capabilities, zen-Math, built upon the zen foundation. Our flagship model, zen-Math-72B-Instruct, outperforms proprietary models such as GPT-4o and Claude 3.5 in math-related tasks. Given the current limitation of English-only support, we plan to release bilingual models that support both English and Chinese shortly, with the development of multilingual models also in the pipeline. Moreover, we will continue to enhance our models' ability to solve complex and challenging mathematical problems.