Suppose that $f(x)$ is a function defined for every real number $x$ with $0 \leq x \leq 1$ with the properties that

- $f(1-x)=1-f(x)$ for all real numbers $x$ with $0 \leq x \leq 1$,
- $f\left(\frac{1}{3} x\right)=\frac{1}{2} f(x)$ for all real numbers $x$ with $0 \leq x \leq 1$, and
- $f(a) \leq f(b)$ for all real numbers $0 \leq a \leq b \leq 1$.

What is the value of $f\left(\frac{6}{7}\right)$ ?

PART B

For each question in Part B, your solution must be well-organized and contain words of explanation or justification. Marks are awarded for completeness, clarity, and style of presentation. A correct solution, poorly presented, will not earn full marks.

Useful Facts for Part B:

$\operatorname{gcd}(a, b c)=\operatorname{gcd}(a, b)$ for all integers $a, b$ and $c$ with $\operatorname{gcd}(a, c)=1$.

$\operatorname{gcd}(a, b)=\operatorname{gcd}(a, b-q a)$ for all integers $a, b$ and $q$.
Using the second property with $x=0$, we obtain $f(0)=\frac{1}{2} f(0)$ from which we get $2 f(0)=f(0)$ and so $f(0)=0$.

Using the first property with $x=0$, we obtain $f(1)=1-f(0)=1-0=1$.

Using the first property with $x=\frac{1}{2}$, we obtain $f\left(\frac{1}{2}\right)=1-f\left(\frac{1}{2}\right)$ and so $2 f\left(\frac{1}{2}\right)=1$ which gives $f\left(\frac{1}{2}\right)=\frac{1}{2}$.

Using the second property with $x=1$, we obtain $f\left(\frac{1}{3}\right)=\frac{1}{2} f(1)=\frac{1}{2}$.

Next, we note that $\frac{3}{7} \approx 0.43$.

Since $\frac{3}{7} \leq \frac{1}{2}$, then, using the third property, $f\left(\frac{3}{7}\right) \leq f\left(\frac{1}{2}\right)=\frac{1}{2}$.

Since $\frac{3}{7} \geq \frac{1}{3}$, then, using the third property, $f\left(\frac{3}{7}\right) \geq f\left(\frac{1}{3}\right)=\frac{1}{2}$.

Since $\frac{1}{2} \leq f\left(\frac{3}{7}\right) \leq \frac{1}{2}$, then $f\left(\frac{3}{7}\right)=\frac{1}{2}$.

Using the second property with $x=\frac{3}{7}$, we obtain $f\left(\frac{1}{7}\right)=\frac{1}{2} f\left(\frac{3}{7}\right)=\frac{1}{2} \cdot \frac{1}{2}=\frac{1}{4}$.

Using the first property with $x=\frac{1}{7}$, we obtain $f\left(\frac{6}{7}\right)=1-f\left(\frac{1}{7}\right)=1-\frac{1}{4}=\frac{3}{4}$.

Here are two additional comments about this problem and its solution:

(i) While the solution does not contain many steps, it is not easy to come up with the best steps in the best order to actually solve this problem.

(ii) There is indeed at least one function, called the Cantor function, that satisfies these properties. This function is not easy to write down, and finding the function is not necessary to answer the given question. For those interested in learning more, consider investigating ternary expansions and binary expansions of real numbers between 0 and 1 , as well as something called the Cantor set.

ANSWER: $f\left(\frac{6}{7}\right)=\frac{3}{4}$

## Part B