\documentclass{rae}%\usepackage{amstex}
\usepackage{amsmath}\usepackage{amssymb}
\author{Krzysztof Ciesielski%
\thanks{
The work of the first and the third author
was partially supported by NSF Cooperative
Research Grant INT-9600548 with its Polish part
financed by Polish Academy of Science PAN. The results were obtained
during a visit of the third author at
Columbus State University and
West Virginia University.
\endgraf % \hspace*{1pc}
The first author
was also supported by 1996/97 West Virginia
University Senate Research Grant.\endgraf
Papers authored or co-authored by a Contributing Editor are managed
by a Managing Editor or one of the other Contributing Editors.},
Department of Mathematics, West Virginia University,
Morgantown, WV 26506-6310, USA
(KCies@wvnvms.wvnet.edu)\\
Richard G. Gibson, Department of Mathematics, Columbus
State University,
Columbus, GA 31907, USA
(Gibson\_Richard\at colstate.edu)\\
Tomasz Natkaniec, Department of Mathematics, Gda{\'n}sk
University, Wita Stwosza 57, 80-952 Gda{\'n}sk, Poland
(mattn\at ksinet.univ.gda.pl)
}
\title{$\kappa$-to-1 Darboux-like functions}
\date{}
\MathReviews{Primary 26A15.}
\keywords{$k$-to-1 functions, Darboux functions,
perfect road, intermediate value property.}
\newcommand{\at}{@}
\newcommand{\dist}{{\rm dist}}
\newcommand{\bd}{{\rm bd}}
\newcommand{\eee}{\varepsilon}
\newcommand{\res}{\upharpoonright}
\newcommand{\propsub}{\subsetneqq}
\def\dom{{\rm dom}}
\def\proof{\noindent{\sc Proof. }}
\def\qed{\hfill$\Box$}
\def\qed{\hfill\vrule height6pt width6pt depth1pt%\medskip
}
\def\la{\langle}
\def\ra{\rangle}
\def\implies{\longrightarrow}
\newcommand{\J}{{\cal J}}
\newtheorem{theorem}{Theorem}[section]
\newtheorem{corollary}[theorem]{Corollary}
\newtheorem{proposition}[theorem]{Proposition}
\newtheorem{lemma}[theorem]{Lemma}
\newtheorem{question}{Question}[section]
\newtheorem{problem}{Problem}[section]
\newtheorem{example}{Example}[section]
\newtheorem{definition}{Definition}
\newtheorem{conjecture}{Conjecture}
\newtheorem{remark}{Remark}[section]
\newcommand{\real}{{\mathbb R}}
\newcommand{\mathR}{\real}
\newcommand{\rational}{{\mathbb Q}}
\newcommand{\integer}{{\mathbb Z}}
\newcommand{\const}{{\rm Const}}
\newcommand{\sz}{{\rm SZ}}
\def\continuum{{\frak c}}
\def\co{\continuum}
\def\cuum{\continuum}
\newcommand{\INT}{{\rm int}}
\begin{document}
\maketitle
\begin{abstract}
We examine the existence of
$\kappa$-to-1 functions $f\colon\real\to\real$ in the class
of continuous functions, Darboux functions, functions
with perfect road, and functions with Cantor intermediate
value properties. In this setting $\kappa$ stands for a cardinal
number
(finite or infinite).
We also consider different variations on this theme.
\end{abstract}
\section{Continuous and Darboux functions}
We will use the standard terminology and notation as
in~\cite{Ci:book}.
In particular, ordinal numbers will be identified with the set of
their
predecessors and cardinal numbers with the initial ordinals.
Thus the first infinite cardinal $\omega$ is identified
with the set of natural numbers. We will reserve the
letters $k$ and $n$ for the natural numbers.
The cardinality of the set $\real$ of real numbers is denoted by
$\co$. Symbol $|X|$ will stand for the cardinality of a set $X$.
For a cardinal $\kappa>0$ we say that a function $f\colon X\to Y$
is {\em $\kappa$-to-1\/} if $\left|f^{-1}(y)\right|=\kappa$
for every $y\in Y$.
Similarly we define {\em $\leq$$\kappa$-to-1\/} and
{\em $<$$\kappa$-to-1\/}
functions. We will use terms
{\em countable-to-1\/} and {\em finite-to-1\/} for functions that are
$\leq$$\omega$-to-1 and $<$$\omega$-to-1, respectively.
A function $f\colon\real\to\real$
is {\em Darboux\/} if it has the intermediate value property,
that is, if the image $f[J]$ of every connected subset $J$ of
the domain (i.e., an interval) is connected in the range.
The last property serves also as a general definition
of a Darboux function from a topological space $X$
into a topological space~$Y$.
The notion of an n-to-1 function was introduced by O. G. Harrold, Jr.
in 1939 in the paper \cite{OGH} where he showed that there does not
exist
a continuous 2-to-1 function carrying an arc into an arc or a
circle.
Following this paper a sequence of
papers appeared in the early 1940's which studied the existence of
n-to-1 continuous functions defined on various classes of continua,
\cite{PC}, \cite{PG}, and \cite{JHR}. More recent relevant papers were
published in the 1980's and among those are
\cite{JH}, \cite{KKK}, and~\cite{NW}.
In 1922 D. C. Gillespie stated in the Bulletin of the American Math.
Soc. \cite{DG} that a function having the intermediate value property
will
be continuous unless the set of values it assumes an infinite number
of
times fills at least one interval.
This fact is well-known and follows from the following proposition.
\begin{proposition}\label{prop1.1}
{\rm \cite[thm~5.2]{BC}}
If $f\colon\real\to\real$ is Darboux and all level sets
$f^{-1}(y)$ of $f$ are closed then $f$ is continuous.
\end{proposition}
As a consequence of those results we see that the question
\begin{equation}\label{eq1}
\text{{\it For which $k<\omega$ does there exist a $k$-to-1 Darboux
function?}}
\end{equation}
is equivalent to the following
\begin{equation}\label{eq2}
\text{\it For which $k<\omega$ does there exist a $k$-to-1 continuous
function?
}
\end{equation}
Our first result is the following proposition, that
is probably known.
\begin{proposition}\label{prop1}
The following conditions are equivalent for $n<\omega$:
\begin{enumerate}
\item[{\rm (i)}] there exists a continuous function
$f\colon\real\to\real$ that is $n$-to-1;
\item[{\rm (ii)}] there exist a set $Y\subset\real$ and a continuous
function $f\colon\real\to Y$ that is $n$-to-1;
\item[{\rm (iii)}] $n$ is odd.
\end{enumerate}
\end{proposition}
\proof
The implication (i)$\Rightarrow$(ii) is obvious.
(ii)$\Rightarrow$(iii) Suppose that
$f\colon\real\to Y$
is a continuous $n$-to-1 function and, by way of
contradiction, assume that
$n$ is even, say $n=2k$. Clearly $n>0$.
Fix a
$y_{0}\in Y$ and the points
$x_{1}y_0$ and for each $y\in(y_0,h)$ and $m\in M$ the set
$f^{-1}(y)\cap I_m$ has at least $2$ points. So
\begin{equation}\label{eq3}
\!\!\!\!\!\! \!\!\!\!\!\!
\text{$(x_1,x_n)\cap f^{-1}(y)$ has at least $2|M|\geq 2k$
points for every $y\in(y_0,h)$.}
\end{equation}
Since $|f^{-1}(y)|=n=2k$ for every $y$ we conclude that $M$
has exactly $k$ elements. Moreover, (\ref{eq3}) implies that
\[
\{x\colon f(x)>y_0\}\subset\bigcup_{m\in M}I_m\subset[x_1,x_n].
\]
Thus, if $y_m=\max f|[x_1,x_n]$ then
all $n$ elements of $f^{-1}(y_m)$ belong to $(x_1,x_n)$
and are local maxima. Therefore, for every $y1$ let $f$ be the
function defined by
the formula
\[
f(x)=x+n\ \dist(x,\integer)
\]
where $\dist(x,\integer)$ denotes the distance between $x$ and
the set $\integer$ of integers.
It is easy to observe that
$f^{-1}(y)$ has $n$ elements for each $y\in\real$.
\qed
\begin{corollary}\label{cor1}
The following conditions are equivalent:
\begin{enumerate}
\item[{\rm (i)}] there exists a continuous $\kappa$-to-1 function
$f\colon\real\to\real$;
\item[{\rm (ii)}] there exist a set $Y\subset\real$ and a continuous
function $f\colon\real\to Y$ that is $\kappa$-to-1;
\item[{\rm (iii)}] $\kappa\in\{\co,\omega\}\cup\{2k+1\colon
k<\omega\}$.
\end{enumerate}
\end{corollary}
\proof
(i)$\Rightarrow$(ii) is obvious.
(ii)$\Rightarrow$(iii)
Since $f^{-1}(y)$
is a closed subset of $\real$ for any continuous function $f$ we see
that
$\kappa\in\{\co,\omega\}\cup\omega$. But if $\kappa\in\omega$
then $\kappa$ cannot be an even number by Proposition~\ref{prop1}.
(iii)$\Rightarrow$(i) For an odd number $\kappa\in\omega$
the existence of $f$ follows from Proposition~\ref{prop1}.
For $\kappa=\omega$ it is enough to take $f(x)=x \sin x$.
So assume that $\kappa=\co$ and
let $f_0\colon[0,1]\to[0,1]$ be such that $f_0(0)=0$, $f_0(1)=1$, and
$|f_0^{- 1}(y)|=\co$ for each $y\in [0,1]$.
An example of such a function is given
in Bruckner's book~\cite[pp. 148--150]{AB}.
Then $f\colon\real\to\real$ defined by
$f(x)=E(x)+f_0(x-E(x))$ is continuous and $\co$-to-1,
where $E(x)$ denotes the integer part of $x$.
\qed
\medskip
Corollary~\ref{cor1} gives the full answer for the questions
(\ref{eq1})
and (\ref{eq2}). However, the following more general problem
might be also of interest.
\begin{problem}\label{prob1}
For which maps
$j\colon\real\to\{\co,\omega\}\cup\omega$ does there
exist a continuous function $f_j\colon\real\to\real$
such that
\[
\left|f_{j}^{-1}(y)\right|=j(y)\ \text{ for every $y\in\real$?}
\]
\end{problem}
To investigate this problem we will use the following terminology.
For a map $j\colon\real\to\co\cup\{\co\}$ we say that a function
$f\colon X\to\real$ is {\em $j$-to-1\/} provided $|f^{-1}(y)|=|j(y)|$
for every $y\in\real$.
Corollary~\ref{cor1} answers the above question
for constant maps $j$. Some light on the general
version of Problem~\ref{prob1} is shed by the following fact.
\begin{proposition}\label{prop2}
Let $f\colon\real\to\real$ be
a Darboux function, $y\in\real$, and
$\kappa=\left|f^{-1}(y)\right|$. If $\kappa<\omega$ and
$B_\kappa=\{z\in\real\colon \left|f^{-1}(z)\right|\geq\kappa\}$
then there exists an $\eee>0$ such that either
$(y-\eee,y]\subset B_\kappa$ or $[y,y+\eee)\subset B_\kappa$.
In particular, $B_\kappa$ is an $F_\sigma$-set for each
$\kappa<\omega$.
\end{proposition}
\proof
Let $X=f^{-1}(y)$ and choose
a positive $\delta$ such that
the intervals $\{[x-\delta,x+\delta]\}_{x\in X}$ are pairwise
disjoint.
Let $X^*=\bigcup_{x\in X}\{x-\delta,x+\delta\}$
and put $X^+=\{x\in X^*\colon f(x)>y\}$ and
$X^-=\{x\in X^*\colon f(x)y$ and $[y,y_1]\subset B_\kappa$.
The case for $|X^-|\geq\kappa$ is similar.
Now, the set $B_\kappa$ is $F_\sigma$ since it is a countable union
of nontrivial intervals: the components of $B_\kappa$. \qed
For continuous finite-to-1 functions we have a full answer to
Problem~\ref{prob1}. It is a consequence of the following
improvement of Proposition~\ref{prop2}.
\begin{proposition}\label{prop2a}
Let $f$ be a finite-to-1 continuous function from $\real$
onto $\real$ and for $k<\omega$ let
$B_k=\{z\in\real\colon\left|f^{-1}(z)\right|\geq k\}$.
Then for all $k,l\in\omega$ with $l\le 2k+1$ and
$y\in\real\setminus \INT B_l$ with $k=\left|f^{-1}(y)\right|$
there exists an $\eee>0$ such that either $(y-\eee,y)\subset
B_{t}$ or $(y,y+\eee)\subset B_{t}$, where $t=2k-l+1$ if $l$ is
even and $t=2k-l+2$ if $l$ is odd.
\end{proposition}
\proof
Suppose that $j(y)=\left|f^{-1}(y)\right|=k$ and
\begin{equation}\label{ee}
\text{there exists a sequence $y_n\searrow y$ with $j(y_n)\le l-1$. }
\end{equation}
Note that since $f$ is finite-to-1 and onto $\real$ we have either
\[
\lim_{x\to -\infty}f(x)= -\infty\ \text{ and } \
\lim_{x\to \infty}f(x)= \infty
\]
or
\[
\lim_{x\to -\infty}f(x)= \infty\ \text{ and } \
\lim_{x\to \infty}f(x)= -\infty.
\]
Now $f^{-1}(y)$ partitions $\real$ into $k+1$
open intervals $J_0,\ldots,J_{k}$
of which $k-1$,
say $J_1,\ldots,J_{k-1}$,
are bounded. Also, for every $j\in\{0,\ldots, k\}$ we have either
$f|J_j>y$ or $f|J_jy$ or
$f|J_k>y$. Consequently, by the condition~(\ref{ee}), the set
$M\subset\{ 1,\ldots, k-1\}$ of all $i$ for which $f|J_i>y$ has
at most ${\rm E}((l-2)/2)$ elements. Thus $N=\{ 1, \ldots,
k-1\}\setminus M$ has at least $k-1-{\rm E}((l-2)/2)$ elements.
Let $\eee>0$ be such that $\min f|J_i0$ such that either
$(y-\eee,y)\subset B_{k+1}$ or $(y,y+\eee)\subset B_{k+1}$.
In particular, for every $n\in\omega$ the set $B_{2n}\setminus
B_{2n+1}$ has an empty interior.
\end{corollary}
\proof
This is a consequence of Proposition~\ref{prop2a} with $l=k+1$.
Indeed, suppose that $k$ is even. For every $y\in B_k\setminus
B_{k+1}$, either $y\in \INT(B_{k+1})$ or $y$ is an end-point of
some interval contained in $B_{k+1}$.
\qed
\begin{corollary}\label{c2}
Let $f$ be a finite-to-1 continuous function from $\real$
onto $\real$.
If $|f^{-1}(y)|=2k+1$ and $y\notin\INT B_{2k+1}$, then
there exists an $\eee>0$ such that either
$(y-\eee,y)\subset B_{2k+3}$ or $(y,y+\eee)\subset B_{2k+3}$.
\end{corollary}
\proof
Consider Proposition~\ref{prop2a} with $l=2k+1$.\qed
\begin{theorem}\label{Th:Caract}
Let $j\colon\real\to\{1,2,3,\ldots\}$. The following conditions
are equivalent.
\begin{enumerate}
\item[{\rm (a)}] There exists a continuous $j$-to-1 function
$f\colon\real\to\real$.
\item[{\rm (b)}] For every $k\in\omega$
\begin{enumerate}
\item[{\rm (i)}]
$C_k=j^{-1}(\{k,k+1,k+2,\ldots\})$ is a (possibly empty) union of pairwise
disjoint non-trivial intervals,
\item[{\rm (ii)}] $j^{-1}(2k)$
has an empty interior, and
\item[{\rm (iii)}] if $y\in
j^{-1}(2k+1)\setminus \INT C_{2k+1}$ then $y$ is an end-point of
a component of $\INT C_{2k+3}$.
\end{enumerate}
\end{enumerate}
\end{theorem}
\proof
(a)$\Rightarrow$(b) Clearly
$j^{-1}(\{k,k+1,\ldots\})=\{z\in\real\colon\left|f^{-1}(z)\right|
\geq k\}=B_k$ and, by Proposition~\ref{prop2}, the component
intervals of $B_k$ are the non-trivial intervals, proving (i).
Conditions (ii) and (iii) follow immediately from
Corollaries~\ref{c1} and \ref{c2}, respectively.
(b)$\Rightarrow$(a) Let
\begin{itemize}
\item
$\J_k$ be the family of all components of $C_{2k+1}$,
$\J_k=\{ J_{k,1}, J_{k,2},\ldots\}$;
\item
$D_k=\INT C_{2k+1}=\bigcup\{\INT J\colon J\in\J_k\}$;
\item
$E$ be the set of all endpoints
of intervals belonging to some $\J_k$;
\item
$E_k=\bigcup\{ \bd(J)\colon J\in\J_k\}$.
\end{itemize}
Note that $E$ is countable, $E=\bigcup_k E_k$, and
$C_{2k}\subset D_k\cup E_k$ for each positive integer $k$.
The desired function $f$ will be
defined as a limit of functions $f_k$ from
$\real$ onto $\real$.
We start with $f_0$ being the identity function. Assume that
$f_k$ is defined. To construct $f_{k+1}$ we take an arbitrary
interval $J_{k+1,i}$ from $\J_{k+1}$ and represent
$\hat{J}=J_{k+1,i}\cup (\bd J_{k+1,i}\cap C_{2k-1})$
as a union
of closed intervals $J^1_{k+1,i},J^2_{k+1,i},J^3_{k+1,i},\ldots$
with disjoint interiors. We will assume also that
\begin{enumerate}
\item[($\alpha$)]
the length of $J^m_{k+1,i}$ is less than $2^{-k-1}$;
\item[($\beta$)]
the endpoints of the intervals $J^m_{k+1,i}$ are disjoint from
$E$, with the exception of the endpoints of $\hat{J}$, if they
belong to $J^m_{k+1,i}$;
\item[($\gamma$)]
if $J_{k+1,i}^n\cap J_{k,j}^m\neq\emptyset$ then
$J^n_{k+1,i}\subset J_{k,j}^m$;
\item[($\delta$)]
for every $m$ there is an interval $I^m_{k+1,i}\subset
f_{k}^{-1}(J^m_{k+1,i})$ such that $f_k|I^m_{k+1,i}$ is linear,
$f_k[I^m_{k+1,i}]=J^m_{k+1,i}$, and $I^m_{k+1,i}\subset
I^n_{k,j}$ whenever $I^m_{k+1,i}\cap I^n_{k,j}\neq\emptyset$.
\end{enumerate}
Also, we can order the family of all $J^m_{k+1,i}$ in the type of
$\integer$, if $\hat{J}$ is open, in the type of $\omega$ (or
$\omega^*$) if $\hat{J}$ contains only left (right) endpoint,
and in a finite type, when $\hat{J}$ contains both endpoints.
The function $f_{k+1}$ is obtained by modifying $f_k$ on every
interval $I^m_{k+1,i}$ The modification is obtained by replacing
a $f_k|I^m_{k+1,i}$ by a function with graph of shape of letter
N. (Or its mirror image.)
By ($\alpha$), the sequence $(f_k)_k$ is uniformly convergent to
a continuous function $f\colon\real\to\real$.
Observe that for each $k\in\omega$ and $y\in\real$ we have
\begin{equation}\label{e1}
|f^{-1}_k(y)|=\left\{ \begin{array}{ll}
|f^{-1}_{k-1}(y)|+2 & \mbox{if $y\in D_k$;}\\
|f^{-1}_{k-1}(y)|+1 & \mbox{if $y\in E_k\cap C_{2k-1}$;}\\
|f^{-1}_{k-1}(y)| & \mbox{otherwise.}
\end{array}\right.
\end{equation}
Thus, we easily obtain (by induction) the equations
\begin{equation}\label{e2}
|f^{-1}_k(y)|=\left\{ \begin{array}{ll}
2k+1 & \mbox{if $y\in D_k$;}\\
2k & \mbox{if $y\in E_k\cap C_{2k}$;}\\
2k-1 & \mbox{if $y\in E_k\cap (C_{2k-1}\setminus C_{2k}$);}\\
|f^{-1}_{k-1}(y)| & \mbox{otherwise.}
\end{array}\right.
\end{equation}
Note also the following properties of the sequence $(f_k)_k$.
\begin{equation}\label{e3}
\text{ If $kk_0}\bigcup_m\bigcup_i I^m_{k,i}$.
Thus, by
(\ref{e5}),
\begin{equation}\label{e6}
\text{ for each $x\in\real$ there is $k_0\in\omega$ such that
$f_k(x)=f_{k_0}(x)$ for $k>k_0$.}
\end{equation}
Moreover,
\begin{equation}\label{e7}
\text{ if $y\in \bigcup_m\bigcup_i J^m_{k_0,i} \setminus
\bigcup_{k>k_0}\bigcup_m\bigcup_i J^m_{k,i}$ then
$f^{-1}(y)=f^{-1}_{k_0}(y)$,}
\end{equation}
so $f$ is finite-to-1. We will verify that $f$ is $j$-to-1.
Assume that $y\in C_k$ and consider two cases. If $k$ is
odd, say $k=2k_0+1$ then, by (\ref{e2}),
$|f^{-1}_{k_0+1}(y)|\geq 2k_0+1$, and, by (\ref{e3}),
$|f^{-1}_k(y)|\geq 2k_0+1$ for all
$k>k_0$ so, by (\ref{e7}), $|f^{-1}(y)|\geq 2k_0+1$.
Similarly, if $k$ is
even, say
$k=2k_0$, then $|f^{-1}_{k_0}(y)|\geq 2k_0$, so $|f^{-1}(y)|\geq
2k_0$.
Therefore,
\begin{equation}\label{e8}
(\forall k\in\omega)\;\;\; C_k\subset\{ y\in\real\colon
|f^{-1}(y)|\geq k\}.
\end{equation}
Now suppose that $y\not\in C_k$. Then for $k_0={\rm
E}(\frac{k}{2})$ we have $|f^{-1}_{k_0}(y)|<2k_0\leq k$ and
$y\not\in\bigcup_m\bigcup_i J^m_{k_0,i}$. Thus (\ref{e7})
implies $|f^{-1}(y)|=|f^{-1}_{k_0}(y)|\omega\})
\]
is analytic non-Borel,
where $\varphi$ is a homeomorphism between
$2^\omega$ and the space $K(2^\omega)$ of all
non-empty compact subsets of $2^\omega$ (with the Hausdorff
metric) and
${\rm pr}_1$ is the projection of the graph of $\varphi$
onto the first coordinate.
This is a consequence of a theorem of Hurewicz that the set
$\{C\in K(2^\omega)\colon |C|>\omega\}$ is analytic non-Borel.
(See \cite[thm~27.5, p.~210]{AK}. This fact was pointed out to
the authors by S.~Solecki.) On the other hand for continuous $f$
the sets
$A_\kappa=\{z\in\real\colon\left|f^{-1}(z)\right|=\kappa\}$ are
not too bad: they all are Borel for $\kappa\in\omega$ (this
follows from Proposition~\ref{prop2}) and analytic for
$\kappa=\co$. Indeed,
from the Mazurkiewicz-Sierpi\'{n}ski theorem it follows
that $A_\co$ is analytic. (See e.g. \cite[thm~3, p.
496]{KK}, or
\cite[thm~29.19, p.~231]{AK}.) Consequently, the set $A_{\omega}$
must be co-analytic. Moreover, if $A_\co$ is non-Borel, then
$A_{\omega}$ is non-Borel (so non-analytic), too.
Note that the results above follow also for Borel functions with
the Darboux property. Nothing good, though, can be said on the
set $B_\co$ for a general Darboux function
$f\colon\real\to\real$, as follows for the next proposition.
\begin{proposition}
For every set $Z\subset\real$ there exists a Darboux function
$f\colon\real\to\real$ with $Z=\{y\colon|f^{-1}(y)|=\co\}$.
\end{proposition}
\proof
Let $\{A_\xi\colon\xi<\co\}$ be a partition of $\real$ into
countable dense sets. Take an $h\colon\co\to\real$ such that
$|h^{-1}(z)|=\co$ for $z\in Z$ and $|h^{-1}(z)|=1$ for $z\notin
Z$. Define $f$ by putting $f(x)=h(\xi)$ for every $x\in A_\xi$
and $\xi<\co$. Then $f$ satisfies the conclusion.\qed
\medskip
Note also that the main part of Proposition~\ref{prop2}
is false for an infinite $\kappa$.
\begin{remark}
For $\kappa\in\{\omega,\co\}$ there exists
a continuous $\leq$$\kappa$-to-1 function
$f$ from $\real$ onto $\real$ for which
$B_\kappa=\{0\}$. Moreover, for every
countable set $B\subset\real$ there exists
a continuous function
$f$ from $\real$ onto $\real$ with the property that
$B=\{z\in\real\colon \left|f^{-1}(z)\right|=\co\}$.
\end{remark}
\proof
First assume that $\kappa=\omega$
and define $f$ by putting $f(0)=0$ and $f(x)=
x^2 \sin(x^{-1})$ for $x\neq 0$.
Then $f$ has the desired properties.
For $\kappa=\co$ first fix a perfect set $P$ and $a**1$ and $X=\real^n$ or $X=[0,1]^n$. If $f\colon
X\to\real$ is Darboux then $f[X]$ is an interval and for every
interior point $y$ of $f[X]$ the set $f^{-1}(y)$ has cardinality
$\co$.
\end{proposition}
\proof
$f[X]$ is an interval since $X$ it is connected.
To see the other part take an interior point $y$ of $f[X]$.
Then the set $X\setminus f^{-1}(y)$ disconnects $X$
since $f[X\setminus f^{-1}(y)]\subset f[X]\setminus\{y\}$.
Thus $f^{-1}(y)$ has cardinality $\co$. \qed
\begin{remark}
Proposition~\ref{P3} remains true for an
arbitrary Darboux
function $f\colon X\to\real$
provided $X$ cannot be disconnected
by any set of cardinality less than $\co$.
\end{remark}
\begin{corollary}\label{cor22}
Let $n>1$ and $j\colon\real\to\co\cup\{\co\}$.
The following conditions are equivalent.
\begin{enumerate}
\item[{\rm (i)}] There exists a continuous nonconstant $j$-to-1
function
$f\colon[0,1]^n\to\real$.
\item[{\rm (ii)}] There are $-\infty1$ and such that $|j(a)|=|A|$ and $|j(b)|=|B|$. For
$C\in\{A,B\}$ define $F_C=\{x\in[0,1]^n\colon\dist(x,C)\leq
.5\}$, where
$\dist(x,C)$ is the distance of $x$ to $C$. Then
$\dist(F_A,F_B)=d-1>0$.
For $x\in F_A$ define $g(x)=\dist(x,A)\in[0,.5]$
and for $x\in F_B$ put $g(x)=d-\dist(x,B)\in[d-.5,d]$.
Then, by the Tietze Extension Theorem, we can
extend $g$ continuously onto $[0,1]^n$ such that it assumes on
$[0,1]^n\setminus(F_B\cup F_B)$ only the values from $[.5,d-.5]$.
Now if $h$ is a homeomorphism between $[0,d]$ and $[a,b]$
then $f=h\circ g$ has the desired properties. \qed
\medskip
A slight modification of the above argument gives also
the following characterization.
\begin{corollary}\label{cor23}
Let $n>1$ and $j\colon\real\to\co\cup\{\co\}$.
The following conditions are equivalent.
\begin{enumerate}
\item[{\rm (i)}] There exists a continuous nonconstant $j$-to-1
function
$f\colon\real^n\to\real$.
\item[{\rm (ii)}] There are $-\infty\leq a****1$ and $j\colon\real\to\co\cup\{\co\}$.
The following conditions are equivalent.
\begin{enumerate}
\item[{\rm (i)}]
There exists a Darboux nonconstant $j$-to-1 function
$f\colon\real^n\to\real$.
\item[{\rm (ii)}] There are $-\infty\leq a****1$, is Darboux. (See \cite{GN}.) In \cite{CR} there has been
constructed a connectivity function $g\colon\real^n\to\real$
such that for some dense $G_\delta$ set $G\subset\real^n$ any
modification of $g$ on $G$ results still a connectivity
function. Now, if $h$ is a homeomorphism from $\real$ onto
$(a,b)$ then $f_0=h\circ g$ has a property that a function
$f\colon\real^n\to[a,b]$ is connectivity provided $f$ which
agrees with $f_0$ outside of $G$. (Compare also
\cite[thm.~1]{Ro}.)
Now, take disjoint sets $A,B\subset G$ such that
$|j(a)|=|A|$ and $|j(b)|=|B|$. Define $f(x)=a$ for $x\in A$,
$f(x)=b$ for $x\in B$, and $f(x)=f_0(x)$ for
$x\in\real^n\setminus(A\cup B)$.
Then $f$ is connectivity, so Darboux,
and it has all other required properties. \qed
\medskip
In the remainder of this section we will consider functions
$f\colon[0,1]\to\real$.
\begin{proposition}
Assume that $n>1$. There is no continuous function
$f\colon[0,1]\to\real$ which is $n$-to-1.
\end{proposition}
\proof
For $n=2$ it is easy and well-known. (See \cite{OGH} and \cite{NW}.)
Suppose that $n>2$. Let
$y_1=\max_{x\in [0,1]}f(x)$ and let
$f^{-1}(y_1)=\{x_1,\ldots,x_n\}$ where
$x_1<\cdotsn$ points, a contradiction. \qed
\medskip
Following Theorem 5.2 in \cite{BC}, Bruckner and Ceder stated
that there exists a continuous function defined on $[0,1]$ such
that each value between 0 and 1 is taken on infinitely often.
Such a function can be constructed by suitably modifying the
well-known Cantor function on its interval of constancy. For
completeness we will include such a construction in the
following proposition.
\begin{proposition}
If $\kappa\in\{\omega,\co\}$ then there is a continuous
function $f\colon[0,1]\rightarrow[0,1]$ such that
$|f^{-1}(y)|=\kappa $ for each $y\in[0,1]$.
\end{proposition}
\proof
An example of a continuous function $f\colon [0,1]\to [0,1]$
such that $|f^{- 1}(y)|=\co$ for each $y\in [0,1]$ can be found in
Bruckner's book~\cite[pp. 148--150]{AB}.
Thus assume that $\kappa=\omega$
and define function $g\colon\real\to\real$ by a formula $g(x)=(x^2 + 1)^{-1}\sin x$
Notice that $\lim_{x\to-\infty} g(x)=\lim_{x\to\infty} g(x)=0$.
In particular, $g$ takes value $0$ infinitely many times and
all other values only finitely many times.
Let $C \subset I$ be the ternary Cantor set, i.e.,
\[
C=\left\{\sum_{i=1}^\infty\frac{k_i}{3^i}\colon k_i\in\{0,2\}\ \text{
for
every }
i=1,2,\ldots\right\}
\]
and let $f_0$ be the Cantor function from $C$ {\em onto\/} $[0,1]$,
that is, given by a formula
$f_0(\sum_{i=1}^\infty\frac{k_i}{3^i})
=\sum_{i=1}^\infty\frac{k_i}{2^{i+1}}$.
Thus $f_0$ is
continuous, increasing, and if $I=(a,b)$ is a component of
$[0,1]\setminus C$
then $f_0(a)=f_0(b)$.
Extend $f_0$ to $f$ by putting on any such interval
$f(x)=f_0(a)+(b-a) g(h_I(x))$, where $h_I$ is an increasing
homeomorphism
from $I=(a,b)$ onto $\real$.
It is easy to see that $f$ is continuous and $\omega$-to-1.
\qed
\begin{corollary}\label{cor2222}
Let $\kappa\leq\co$ be a cardinal number.
The following conditions are equivalent.
\begin{enumerate}
\item[{\rm (i)}]
There exists a continuous nonconstant $\kappa$-to-1
function $f\colon[0,1]\to[0,1]$.
\item[{\rm (ii)}] $\kappa\in\{\omega,\co\}$.
\end{enumerate}
\end{corollary}
\section{Perfect road functions}
Recall that a function $f\colon\real\to\real$ has a {\it perfect
road\/} at $x\in\real$ if there exists a perfect set
$P\subset\real$ having $x$ as a bilateral limit point for which
the restriction $f|P$ of $f$ to $P$ is continuous at $x$.
The function $f\colon\real\to\real$ has the perfect road property if
it has a perfect road at each point $x\in\real$. (See, e.g.,
\cite{GN}.)
\begin{theorem}\label{T-PR}
For every function $j\colon\real\to\co\cup\{\co\}\setminus\{0\}$ there
exists a $j$-to-1 function $f_{j}\colon\real\to\real$ with the
perfect road property.
\end{theorem}
\proof Let $\{ \langle I_n,J_n\rangle \colon n<\omega\}$ be a
one-to-one enumeration of all sets of the form $(p,q)\times
(r,s)$, where $p,q,r,s$ are rationals, $p**f(x)$.
Choose $M\in(f(x),L)$, $m\in(f(x),M)$, and $x_0\in(x,x+1)$ such
that $f(x_0)>M$. Let $Q_0\subset(m,M)\subset(f(x),f(x_0))$ be
perfect. By SCIVP there exists a perfect set
$P_0\subset(x,x_0)$ such that $f|P_0$ is continuous and
$f[P_0]\subset Q_0$. Observe that $|f[P_0]|=\co$, so we can
choose a perfect subset $Q_1$ of $f[P_0]\subset Q_0$. Next find
$x_1\in (x,x+1/2)$ such that $(x,x_1)\cap P_0=\emptyset$ and
$f(x_1)>M$. Then $Q_1\subset
Q_0\subset(m,M)\subset(f(x),f(x_1))$. Thus, by SCIVP we can
find perfect sets $P_1\subset (x,x_1)$ and $Q_2\subset
f[P_1]\subset Q_1$. In this way we define by induction for
every $n<\omega$, $n>0$:
\begin{itemize}
\item
$x_n\in (x,x+1/(n+1))$ such that $(x,x_n)\cap P_{n-1}=\emptyset$
and $f(x_n)>M$,
\item perfect sets $P_n\subset (x,x_n)$ and
$Q_n\subset f[P_n]\subset Q_{n-1}\subset(m,M)$.
\end{itemize}
Let $y\in \bigcap_{n<\omega} Q_n$. Then $f^{-1}(y)\cap
P_n\neq\emptyset$ for every $n$, so $x$ belongs to the closure
of $f^{-1}(y)$. But $x\notin f^{-1}(y)$, since $f(x)