# MDDial: A Multi-turn Differential Diagnosis Dialogue Dataset with
Reliability Evaluation

Srija Macherla
Affiliation / Address line 1
Affiliation / Address line 2
Affiliation / Address line 3
email@domain
&Second Author
Affiliation / Address line 1
Affiliation / Address line 2
Affiliation / Address line 3
email@domain
Srija Macherla 1 Man Luo1,2 Mihir Parmar1 Chitta Baral1
1 Arizona State University 2 Mayo Clinic

###### Abstract

Dialogue systems for Automatic Differential Diagnosis (ADD) have a wide range
of real-life applications. These dialogue systems are promising for providing
easy access and reducing medical costs. Building end-to-end ADD dialogue
systems requires dialogue training datasets. However, to the best of our
knowledge, there is no publicly available ADD dialogue dataset in English
(although non-English datasets exist). Driven by this, we introduce MDDial,
the first differential diagnosis dialogue dataset in English which can aid to
build and evaluate end-to-end ADD dialogue systems. Additionally, earlier
studies present the accuracy of diagnosis and symptoms either individually or
as a combined weighted score. This method overlooks the connection between the
symptoms and the diagnosis. We introduce a unified score for the ADD system
that takes into account the interplay between symptoms and diagnosis. This
score also indicates the system’s reliability. To the end, we train two
moderate-size of language models on MDDial. Our experiments suggest that while
these language models can perform well on many natural language understanding
tasks, including dialogue tasks in the general domain, they struggle to relate
relevant symptoms and disease and thus have poor performance on MDDial. MDDial
will be released publicly to aid the study of ADD dialogue research.
111Dataset is available at
https://github.com/srijamacherla24/MDDial/tree/main/data

MDDial: A Multi-turn Differential Diagnosis Dialogue Dataset with Reliability
Evaluation

Srija Macherla 1 Man Luo1,2 Mihir Parmar1 Chitta Baral1 1 Arizona State
University 2 Mayo Clinic

##  1 Introduction

Automatic Differential Diagnosis (ADD) aims to develop a system that can
diagnose patients via interaction with them. ADD has many benefits, such as
simplifying the diagnostic procedure, reducing the cost of collecting
information from patients, and assisting health professionals to make
decisions more efficiently Zeng et al. (2020). To interact with a human, a
system needs to understand natural language, which is what recent language
models Devlin et al. (2019); Radford et al. (2019) are good at. ADD dialogue
datasets are required to either train or evaluate a model. However, existing
English differential diagnosis datasets Wei et al. (2018); Xu et al. (2019);
Zeng et al. (2020); Liu et al. (2020); Guan and Baral (2021) are in a
structured format as shown in the left part in Figure 1. To the best of our
knowledge, there is no publicly available differential diagnosis dialogue
dataset in English, such as the right part in Figure 1.

Figure 1: Pipeline of MDDial Generation: Six categories of templates where
each has multiple human-curated natural language templates (§3).

Collecting a real-world dialogue dataset is difficult due to the privacy
concerns of patients. To overcome this issue, we propose a template-based
method to create an ADD dialogue dataset based on structured data.
Specifically, we utilize the Medical Diagnosis Dialogue (MDD) dataset,
provided by a competition in ICLR 2020
conference222https://mlpcp21.github.io/pages/challenge.html, and define five
stages of a differential diagnosis dialogue (§3). We then create templates for
each stage and fill in the templates with explicit symptoms (BSP), implicit
symptoms (IIQD), values of each implicit symptom (IPSP and INSP), and the
diagnosis (LDSD) given by the MDD dataset. We concatenate each sentence to
form a complete multi-turn dialogue and name our dataset as MDDial. Figure 1
illustrates the example of a dialogue created from an MDD instance.

Additionally, earlier studies typically assessed individual symptom and
diagnosis accuracy, or merely (weighted) summed up two scores. This approach
overlooks the connection between symptoms and the resulting diagnosis.
Logically, a diagnosis should stem from the symptoms, meaning that inquiring
about pertinent symptoms should increase the likelihood of an accurate
diagnosis compared to unrelated symptoms. Evaluating based on this logic also
indicates a system’s reliability. A system that produces an accurate diagnosis
but inquires about unrelated symptoms is less dependable. Hence, we’ve
introduced a reliability score to gauge a system(§4.1). Essentially, a system
earns credits when it accurately diagnoses while also pinpointing relevant
symptoms.

To the end, we train and evaluate two moderate-size language models, i.e.,
GPT-2 Radford et al. (2019) and DialoGPT Zhang et al. (2020) on MDDial, such
models can understand natural language in general domains and conduct general
tasks, like booking hotel and flights. However, our experimental results show
that these models struggle with ADD tasks. Particularly, even models can make
the correct diagnoses in some cases, they have low-reliability scores on
MDDial, and the overall performance has large room to be improved. We
attribute the low performance to two reasons: (1) the variety of symptoms and
diseases make MDDial difficult for language models to relate these two. (2)
there is not enough training data for the model to learn such a challenging
task, which is a common issue in the medical and healthcare domain. This also
suggests that new training paradigms or model architectures are required to
transfer general language models to low-resource domains. We hope that our
dataset can be used to facilitate the development of differential diagnosis in
dialogue settings and encourage new models to achieve high reliability.

##  2 Related Work

#### Differential Diagnosis

Wei et al. (2018) proposed task oriented Dialogue System (Muzhi) dataset which
has only 4 types of diseases and is in a structured format but not a natural
language dialogue format. Given the special data structure, they focus only on
dialogue management and leave natural language understanding and generation
behind. Peng et al. (2018) proposed reinforcement learning for fast disease
diagnosis. Xu et al. (2019) reverse the Muzhi dataset into dialogue form and
the resulting dataset DX is smaller. However, all these datasets are designed
for predicting the pathology a patient is experiencing and do not contain
differential diagnosis data Tchango et al. (2022). To facilitate research in
diagnosis dialogue systems, large-scale medical dialogue datasets are proposed
which include MedDialog Zeng et al. (2020) and MedDG Liu et al. (2020).
However, these datasets are in the Chinese language. Zeng et al. (2020)
created a dataset in Chinese and English language, however, their English
version is not publicly available. Along with that, the MDD dataset is a
similar structure dataset as Muzhi but includes more types of diseases and
symptoms. Nevertheless, the previous dataset can not be served to train an
end-to-end differential diagnosis dialogue system. Hence, this work introduces
the first English language dataset for building an end-to-end ADD system.
Inspired by previous work Ham et al. (2020), we train GPT-2 and build an end-
to-end dialogue system.

#### Template-Based Data Generation

Templates have been extensively employed for data generation across various
fields Weston et al. (2016); Banerjee et al. (2020); Clark et al. (2021); Luo
et al. (2022a, b). Using a template-driven generation method can simplify the
data production process, particularly in specialized fields where collecting
data can be challenging due to its requirement for expert knowledge or
sensitivity. However, this approach might constrain the range and depth of the
resulting data, potentially causing the fine-tuned model to struggle with
generalization. To mitigate this concern in our study, we test fine-tuned
models on two distinct test datasets with varied distributions compared to the
training data, ensuring our model doesn’t merely adapt to the templates.

##  3 MDDial

MDDial is a template-based dialogue dataset constructed from MDD. We choose
MDD since it has more variety of diseases and symptoms compared to the
previous Muzhi dataset Wei et al. (2018). MDD includes 12 diseases and 118
symptoms. The dataset has balanced data points about each disease and the
frequency of symptoms is given in Figure 2. It shows that MDDial has a variety
of symptoms with different frequencies which presents a challenge for the
model to learn.

Figure 2: Word cloud indicating diverse symptoms and their frequencies.

#### Templates Construction

To simulate a real-life differential diagnosis dialogue, we design five stages
that can occur: (1) the Beginning Sentence of a Patient (BSP) which involves
explicit symptoms that the patient informs a doctor, (2) Intermediate Inquiry
Question of a Doctor (IIQD) which involve implicit symptoms that help the
doctor to diagnose the patient, (3) Intermediate Positive answer Sentence of a
Patient (IPSP) means that a patient confirms he/she has the inquired symptom,
(4) Intermediate Negative answer Sentence of a Patient (INSP) means a patient
negates having the inquired symptom, and (5) Last Diagnosis Sentence of a
Doctor (LDSD) that informs what kind of disease the patient might have based
on the conversation. For each stage, multiple templates are designed to
generate sentences. The full list of templates is given in Table 1.

Sentence Type | Templates for Training | Templates for Robustness Testing
---|---|---
BSP | Hi Doctor, I am having __ and __ | Hi Doctor, I feel bad these days, I am suffering from __
Recently, I am experiencing __ | Hello Doctor, I am sick and I feel __
I have __ and __ | Hey Doctor, thank you for seeing me. I am not well and I have __
I have been feeling __ and __ | Hi Doctor, my health is not good, and I feel __
IIQD | Is it? Then do you experience __? | ok, do you feel __ then?
In that case, do you have any __? | oh, that is bad, do you have __?
What about __? | how about __?
Oh, do you have any __? | Tell me, do you feel __?
IPSP | Yes, sometimes. | oh, yes, I forget to mention it.
I am experiencing that sometimes. | Yes, I do have.
Yes Doctor, I am feeling that as well. | Emm, yes.
Yes most of the times. | Yes, I think so.
INSP | No, I don’t have that. | It is not my symptom.
No, I never had anything like that. | No, I don’t think I experienced any.
Well not in my knowledge. | I don’t think so.
Not that I know of. | I don’t feel it.
LDSD | In that case, you have __. | Based on your symptoms, you have __.
This could probably be __. | From my experience, you can be __.
This could probably be __. | You have __.
I believe you are having __. | Now I see, you have __.

Table 1: Templates for five types of sentences involved in a differential
diagnosis conversation.

#### Quality of Templates

First of all, the generation of templates does not necessarily require medical
expertise since most people have experience conversing with doctors. Given
that annotators have commonsense knowledge, we also ask them to study the
MedDialogue dataset Zeng et al. (2020), this process equips the annotators
with domain knowledge if needed333To avoid confusion, it is worth noticing
that the MedDialogue is a 1 to 1 English Dialogue dataset without multi-turn
conversation between doctors and patients.. After the annotators generate the
templates, we ask different annotators to verify the fluency, grammar,
typographic errors, ambiguity, etc. to guarantee the quality.

#### Dialogue Generation

Once templates are generated, we use symptoms and the corresponding disease
combined with relevant templates to generate dialogue in our dataset. Same
templates and procedures have been used to generate training, validation, and
testing sets. Statistics of MDDial are given in Table 2. More examples of
dialogues are shown in Appendix A.

#### Unseen Templates for Generalization Evaluation

One potential concern about template-based datasets is that models trained on
such texts might only be able to perform effectively on these template
sentences. To mitigate this issue, we design different templates that separate
from the training templates to test the generalizability of models. We use two
approaches to obtain the unseen templates. First, we use a T5
model444https://huggingface.co/ramsrigouthamg/t5_paraphraser, and generate
multiple paraphrased sentences for given templates555Paraphrased sentences are
checked and updated manually.. Second, we ask two more annotators to generate
new templates without looking at training templates, and only select those
different from the training ones for generalization evaluation.

Statistic | Train | Val | Test
---|---|---|---
Total Dialogues | 1725 | 154 | 237
Avg. turns per dialogue | 5.8 | 7.7 | 5.9
Max. turns in a dialogue | 16 | 15 | 13
Min. turns in a dialogue | 1 | 1 | 1
Avg. words per dialogue | 53.5 | 71.1 | 55.4
Avg. words per patient utterance | 5.6 | 5.6 | 5.6
Avg. words per doctor utterance | 6.7 | 6.7 | 6.6

Table 2: Statistics of MDDial dataset.

##  4 Evaluation

Firstly, we present metrics to assess an ADD dialogue system. In particular,
we design a disease-wise symptom score to address the limitation of the
existing symptom accuracy score. More crucially, we propose a reliability
score that not only unifies symptom and disease accuracy but also reflects the
degree of reliability of a system. Subsequently, we outline an automated
evaluation procedure for differential diagnosis. While the ideal evaluation
procedure will be to ask humans to interact with the model and provide human
assessment, this procedure can be expensive and challenging to replicate Mehri
et al. (2022). As a result, we design an automated procedure to ensure the
conversation’s validity and thus mimic the real-life dialogue.

###  4.1 Metrics

For simplicity, let us assume $\mathcal{D}$ is the set of $n$ number of
diseases and $\mathcal{S}$ is the set of $m$ number of symptoms from MDDial
dataset. Let denote $\mathcal{S}^{d}$ as subset of symptoms corresponding to
disease $d$, where $d\in\mathcal{D}$ and $\mathcal{S}^{d}\subset\mathcal{S}$.

#### Existing Symptom Metric and Issue

To measure symptom accuracy, Xu et al. (2019) calculates at dialogue-level,
denoted as $\mathcal{S}_{score}^{diag}$, which means that a model is credited
only if it asks a symptom that exists in the user implicit symptoms for the
given dialogue. The issue with such an evaluation process is that not all the
symptoms in $\mathcal{S}^{d}$ are present in the given dialogue. Consequently,
even if a model asks for relevant symptoms, it might be punished because of
the absence of such symptoms in the ground truth of the implicit symptoms. To
address this issue, we introduce a disease-wise symptoms score that credits a
system if it asks symptoms from $\mathcal{S}^{d}$.

#### Disease-wise Symptom Score

$\mathcal{S}_{score}^{dise}$ captures existence of a symptom $s$ for disease
$d$ is in $\mathcal{S}^{d}$ and assign score according to Eq. 1.

$f(s,\mathcal{S}^{d})=\begin{cases}1,&\text{if}\ s\in\mathcal{S}^{d}\\\
0,&\text{otherwise}\end{cases}$ (1)

In addition, not only the quality of the symptoms matter but also the
quantities. An optimal system should determine the diagnosis by inquiring
about the essential symptoms. That is, it shouldn’t ask for too few or too
many symptoms; otherwise, penalties should be applied. To this extent, we
define a cost function $C$ (Eq. 2) based on number of sentences in the
original dialogue ($N_{gold}$) and the number of sentences in generated
dialogue ($N_{pred}$) to penalize score generated from $f(s,\mathcal{S}^{d})$.
Together, we define $\mathcal{S}_{score}^{dise}$ as below:

$\displaystyle C$
$\displaystyle=\frac{min(N_{gold},N_{pred})}{max(N_{gold},N_{pred})}$ (2)
$\displaystyle\mathcal{S}_{score}^{dise}$
$\displaystyle=\frac{C}{N_{pred}}\sum_{\forall
s_{i}\in\mathcal{S}^{diag}}f(s_{i},\mathcal{S}^{d})$ (3)

#### Reliability Score

A reliable system should correctly diagnose a patient by asking questions
about the related symptoms. In other words, a system is not reliable if it
diagnoses correctly but asks for irrelevant symptoms. We introduce a
reliability score to measure this. $\mathcal{R}_{score}$ depicts the
relationship between $\mathcal{S}_{score}^{dise}$ and the diagnosis accuracy,
$Diag_{acc}$. Mathematically,

$\mathcal{R}_{score}(x)=\begin{cases}1,&\text{if}\
\mathcal{S}_{score}^{dise}\geq t\text{ and }Diag_{acc}=1\\\
0,&\text{otherwise}\end{cases}$ (4)

where $t$ is a threshold of the symptoms scores, a higher value of the
threshold means the reliability is more rigid.

###  4.2 Automatic Evaluation Process

The core difficulty in crafting an automatic evaluation method lies in
ensuring dialogue validity. Given a ground-truth dialogue consisting of a
sequence of utterances between a patient and a doctor
$\\{(p_{1},d_{1}),(p_{2},d_{2})\dots,(p_{n},d_{n})\\}$, where $p_{i}$ is a
patient utterance, $d_{i}$ is a doctor utterance. $p_{i+1}$ is inherently a
response to $d_{i}$. During testing time, a model initially takes $p_{1}$ as
input and subsequently generates $\hat{d_{i}}$. The corresponding response
$d_{i}$, which is $p_{i+1}$, then gets appended to the dialogue sequence
$\\{(p_{1},\hat{d_{1}})\dots,p_{i}\\}$. This sequence serves as input for the
model in the next cycle.

A straightforward approach might involve extracting $p_{i+1}$ directly from
the ground-truth dialogue to append to the dialogue. However, this presents a
complication: if $\hat{d_{i}}$ misaligns with the symptoms described in
$d_{i}$, then $p_{i+1}$ could be an inappropriate response to $\hat{d_{i}}$.
To address this disorder issue, we do not use the ground truth patient
utterances in the testing set. Instead, we assess the symptoms mentioned in
$\hat{d_{i}}$ using the ground truth of these symptoms, we then determine the
valid $\hat{p_{i+1}}$. If the query asks for unrelated symptoms, we opt for a
negative answer sentence as $\hat{p_{i+1}}$.

##  5 Experimental Setup

#### Models

We conduct all experiments using the GPT-2 and DialoGPT models. These models
have demonstrated their effectiveness in general dialogue tasks Budzianowski
and Vulic (2019). Notably, we opt for a moderately-sized model instead of
larger ones like GPT-3. This decision is driven by the sensitive nature of the
biomedical and clinical domains, where it is essential to deploy a fine-tuned
local model. In addition, established by previous work Gururangan et al.
(2020); Luo et al. (2022a) that adapting models to the relevant domain is
crucial, however, both GPT-2 and DialoGPT models are not pretrained in the
biomedical domain. Therefore, we pre-train both models on MedDialogue Zeng et
al. (2020) in which each dialogue has one utterance from the patient and
doctor, respectively. We process the input data following the setting as in
Zeng et al. (2020), and the input format is described in the following.

#### Input format

We process the training process similar to Zeng et al. (2020). In detail,
given a dialogue containing a sequence of alternating utterances between
patient and doctor, we convert it into a set of pairs {($s_{i}$; $t_{i}$)}
where the target $t_{i}$ is a response from the doctor and the source $s_{i}$
is the concatenation of all utterances (from both patient and doctor) before
$t_{i}$ in a particular dialogue. A dialogue generation model takes $s_{i}$ as
input and generates $t_{i}$. To distinguish the patient and doctor sentence,
we add special words “patient: ” in front of each patient utterance and
“Doctor: ” in front of each doctor utterance. We set the maximum input length
as 512 and add special tokens <pad> to the GPT-2 vocabulary.

#### Training and Generation Details

The models are trained with a learning rate of $5e^{-4}$ for 10 epochs with
AdamW Optimization of $1e^{-8}$ as epsilon. The block size used is 512 with a
batch size of 2 for both training and evaluation. During the evaluation, the
greedy search decoding method is used with a non-repeat ngrams of size 3, and
temperature 0.8 to generate dialogues by the doctor.

#### Two Evaluation Settings

We fine-tune both pre-trained models on MDDial. To evaluate models, we create
two evaluation sets: (1) contains a dialogue with seen templates which has a
similar distribution as training, and (2) contains a dialogue with unseen
templates which has different distribution as training. The second evaluation
set is created to analyze the generalizability of models. We evaluate models
using metrics discussed in Section 4.1. We compute $\mathcal{R}_{score}$ for
all possible thresholds ($t$).

##  6 Results and Analysis

Table 3 shows the performance of models on three evaluation scores on
evaluation set (1) and the average number of sentences per dialogue generated
by the models. From Table 3, we can observe that DialoGPT outperforms GPT-2 in
terms of $\mathcal{S}_{score}^{dise}$ and $Diag_{acc}$. In addition, DialoGPT
generates fewer sentences per dialogue on average compared to GPT-2 which
indicates that DialoGPT can diagnose the patient faster and more accurately
than GPT-2. This result implies that pretraining on the general dialogue
dataset allows the model to acquire more understanding of dialogue and indeed
help in improving model performance. Moreover, we observe that our
$\mathcal{S}_{score}^{dise}$ is more coherent with $Diag_{acc}$ of two models
compared to $\mathcal{S}_{score}^{diag}$ (i.e. a system has a higher diagnosis
score also has a higher symptom score). This shows that our disease-wise
symptoms score is a better metric to evaluate the model than the dialogue-wise
symptoms score.

Model | $\mathcal{S}_{score}^{diag}$ | $\mathcal{S}_{score}^{dise}$ | $Diag_{acc}$ | Avg. Sentence
---|---|---|---|---
GPT-2 | 0.289 | 0.262 | 0.287 | 7.64
DialoGPT | 0.258 | 0.309 | 0.475 | 6.13

Table 3: Performance of both models on MDDial.

#### Reliability

Figure 3 shows the trend of $\mathcal{R}_{score}$ for both models (detailed
numbers are given in Appendix C). Observing Figure 3, it’s evident that at
even a moderate threshold (for instance, 0.5), the reliability scores for both
models are below 0.2. This outcome underscores that, even when the models
diagnose accurately, they don’t necessarily draw from relevant symptoms. More
crucially, this suggests that the diagnosis score doesn’t truly capture the
extent of reliability. Additionally, as the threshold rises, DialoGPT’s
reliability sees a more significant impact compared to GPT-2. At higher
threshold values, both models exhibit comparable reliability, indicating that
DialoGPT doesn’t necessarily outshine GPT-2 in terms of reliability.

Figure 3: $\mathcal{R}_{score}$ for GPT-2 and DialoGPT on all possible
thresholds.

Figure 4:  Performance of two models on three datasets: in-domain, paraphrased
dataset (Unseen-P), and other author hand-written templates dataset
(Unseen-H).

#### Generalizability

We evaluate both models on dialogues generated with unseen templates to
address that model will not heavily rely on the templates and show
generalization. From the Figure 4 (detailed numbers are given in Appendix D),
we have three observations. First, the performance of the paraphrasing
templates is similar to the in-domain testing set 3. Second, the human-
authored templates with different distributions have almost similar
$Diag_{acc}$ for both models compared to in-domain templates, and this results
in lower trustiness score. Third, both models achieve better diagnosis
performance on unseen templates but lower performance on the symptom scores.
In summary, the overall performances of two models on unseen templates are
comparable with evaluation on in-domain templates but with lower trustiness
scores.

##  7 Error Analysis

While the focus of this paper is not to propose a better ADD system, we
conduct an error analysis of the prediction of the DialoGPT to understand the
current model, which can provide guidance to build future ADD systems. We
conduct the following analysis based on our best model’s (DialoGPT)
prediction, we answer two questions below.

###  7.1 What diseases are more difficult to predict?

There are 12 diseases and for each disease $D$, we compute the individual
disease accuracy, i.e. the ratio of dialogues predicted correctly by the
model. The accuracy of each disease is listed in Table 4, the least accuracy
means the more difficult for the model to predict and the three most difficult
diseases for the model are Coronary heart disease, Traumatic brain injury, and
External otitis.

Disease | Accuracy
---|---
Coronary heart disease | 0.0
External otitis | 0.0
Traumatic brain injury | 0.0
Mastitis | 0.27
Pneumonia | 0.40
Asthma | 0.53
Esophagitis | 0.56
Rhinitis | 0.60
Thyroiditis | 0.62
Enteritis | 0.71
Conjunctivitis | 0.76
Dermatitis | 1.0

Table 4: The individual disease accuracy.

###  7.2 Are there any symptoms ignored by the dialogue systems?

To answer this question, for each symptom $S$, we compute the frequency of $S$
in the testing set ($f_{1}$), and the frequency of $S$ in the prediction of
model ($f_{2}$). The lower value of $\frac{f_{2}}{f_{1}}$, the more easily the
symptom is ignored by the model. For simplicity, Table 5 lists 10 symptoms
which have the lowest value of $\frac{f_{2}}{f_{1}}$ among all symptoms.

Symtom | $\frac{f_{2}}{f_{1}}$
---|---
tinnitus | 0.22
rash | 0.27
pain in front of neck | 0.35
itchy eyes | 0.39
chest tightness and shortness of breath | 0.45
itching | 0.48
suppuration | 0.50
difficulty breathing | 0.52
twitch | 0.52
sneeze | 0.54
mild thyroid enlargement | 0.58

Table 5: The 10 most difficult symptoms for the model.

##  8 Conclusions

This paper introduced MDDial, the first publicly available dataset for
training ADD systems in the English language. With this, we proposed a new
evaluation technique, i.e., trustiness to evaluate existing ADD systems in
terms of symptom score and diagnosis accuracy. We evaluate existing state-of-
the-art models in the dialogue domain, GPT-2 and DialoGPT on MDDial.
Experimental results show that these models are not able to relate symptoms
with their corresponding disease in MDDial. Our analysis shows that ADD task
becomes difficult for the model when dialogues are in natural language and
contain diverse symptoms. This suggests that MDDial is a challenging dataset
and indicates future research scope in improving ADD systems.

## Limitations

There are a couple of improvements we intend to do in the future. First,
MDDial is generated based on templates, the diversity of the language is
limited, and also the complexity of the language might be too simple to
compare to the real-world dialogue between doctors and patients Maynard
(1991); Asp and De Villiers (2010). A potential solution will be to utilize an
LLM to increase both the diversity and the complexity. Second, we use
moderate-size language models and test them on MDDial. To see the full ability
of the language models, we can adapt the prompting or multi-modular methods as
proposed in Hosseini-Asl et al. (2020); Lee et al. (2021). Large language
models like ChatGPT, known for their proficiency in understanding dialogue,
raise the intriguing question of whether they can effectively handle ADD
tasks. While these models might face hurdles due to limited biomedical domain
expertise, in-context learning Hu et al. (2022); Parmar et al. (2022); Luo et
al. (2023) offers a promising avenue to address this issue. Third, while human
evaluation itself has drawbacks, it can reveal how well a differential
diagnosis system interacts with humans. Thus, we plan to include human
evaluation in the future to deeply analyze the model performance.

## References

  * Asp and De Villiers (2010) Elissa D Asp and Jessica De Villiers. 2010.  _When language breaks down: Analysing discourse in clinical contexts_.  Cambridge University Press.
  * Banerjee et al. (2020) Pratyay Banerjee, Chitta Baral, Man Luo, Arindam Mitra, Kuntal Pal, Tran C Son, and Neeraj Varshney. 2020.  Can transformers reason about effects of actions?  _arXiv preprint arXiv:2012.09938_.
  * Budzianowski and Vulic (2019) Paweł Budzianowski and Ivan Vulic. 2019.  Hello, it’s gpt-2-how can i help you? towards the use of pretrained language models for task-oriented dialogue systems.  _EMNLP-IJCNLP 2019_ , page 15.
  * Clark et al. (2021) Peter Clark, Oyvind Tafjord, and Kyle Richardson. 2021.  Transformers as soft reasoners over language.  In _Proceedings of the Twenty-Ninth International Conference on International Joint Conferences on Artificial Intelligence_ , pages 3882–3890.
  * Devlin et al. (2019) Jacob Devlin, Ming-Wei Chang, Kenton Lee, and Kristina Toutanova. 2019.  Bert: Pre-training of deep bidirectional transformers for language understanding.  In _NAACL-HLT (1)_.
  * Guan and Baral (2021) Hong Guan and Chitta Baral. 2021.  A bayesian approach for medical inquiry and disease inference in automated differential diagnosis.  _arXiv preprint arXiv:2110.08393_.
  * Gururangan et al. (2020) Suchin Gururangan, Ana Marasović, Swabha Swayamdipta, Kyle Lo, Iz Beltagy, Doug Downey, and Noah A Smith. 2020.  Don’t stop pretraining: Adapt language models to domains and tasks.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 8342–8360.
  * Ham et al. (2020) Donghoon Ham, Jeong-Gwan Lee, Youngsoo Jang, and Kee-Eung Kim. 2020.  End-to-end neural pipeline for goal-oriented dialogue systems using GPT-2.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics_ , pages 583–592, Online. Association for Computational Linguistics.
  * Hosseini-Asl et al. (2020) Ehsan Hosseini-Asl, Bryan McCann, Chien-Sheng Wu, Semih Yavuz, and Richard Socher. 2020.  A simple language model for task-oriented dialogue.  _Advances in Neural Information Processing Systems_ , 33:20179–20191.
  * Hu et al. (2022) Yushi Hu, Chia-Hsuan Lee, Tianbao Xie, Tao Yu, Noah A Smith, and Mari Ostendorf. 2022.  In-context learning for few-shot dialogue state tracking.  In _Findings of the Association for Computational Linguistics: EMNLP 2022_ , pages 2627–2643.
  * Lee et al. (2021) Chia-Hsuan Lee, Hao Cheng, and Mari Ostendorf. 2021.  Dialogue state tracking with a language model using schema-driven prompting.  In _Proceedings of the 2021 Conference on Empirical Methods in Natural Language Processing_ , pages 4937–4949.
  * Liu et al. (2020) Wenge Liu, Jianheng Tang, Jinghui Qin, Lin Xu, Zhen Li, and Xiaodan Liang. 2020\.  Meddg: A large-scale medical consultation dataset for building medical dialogue system.  _arXiv preprint arXiv:2010.07497_.
  * Luo et al. (2022a) Man Luo, Arindam Mitra, Tejas Gokhale, and Chitta Baral. 2022a.  Improving biomedical information retrieval with neural retrievers.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 36, pages 11038–11046.
  * Luo et al. (2022b) Man Luo, Sharad Saxena, Swaroop Mishra, Mihir Parmar, and Chitta Baral. 2022b.  Biotabqa: Instruction learning for biomedical table question answering.  In _CEUR Workshop Proceedings_ , volume 3180, pages 291–304. CEUR-WS.
  * Luo et al. (2023) Man Luo, Xin Xu, Zhuyun Dai, Panupong Pasupat, Mehran Kazemi, Chitta Baral, Vaiva Imbrasaite, and Vincent Y Zhao. 2023.  Dr. icl: Demonstration-retrieved in-context learning.  _arXiv preprint arXiv:2305.14128_.
  * Maynard (1991) Douglas W Maynard. 1991.  Interaction and asymmetry in clinical discourse.  _American journal of sociology_ , 97(2):448–495.
  * Mehri et al. (2022) Shikib Mehri, Jinho Choi, Luis Fernando D’Haro, Jan Deriu, Maxine Eskenazi, Milica Gasic, Kallirroi Georgila, Dilek Hakkani-Tur, Zekang Li, Verena Rieser, et al. 2022.  Report from the nsf future directions workshop on automatic evaluation of dialog: Research directions and challenges.  _arXiv preprint arXiv:2203.10012_.
  * Parmar et al. (2022) Mihir Parmar, Swaroop Mishra, Mirali Purohit, Man Luo, Murad Mohammad, and Chitta Baral. 2022.  In-boxbart: Get instructions into biomedical multi-task learning.  In _Findings of the Association for Computational Linguistics: NAACL 2022_ , pages 112–128.
  * Peng et al. (2018) Yu-Shao Peng, Kai-Fu Tang, Hsuan-Tien Lin, and Edward Chang. 2018.  Refuel: Exploring sparse features in deep reinforcement learning for fast disease diagnosis.  _Advances in neural information processing systems_ , 31.
  * Radford et al. (2019) Alec Radford, Jeffrey Wu, Rewon Child, David Luan, Dario Amodei, Ilya Sutskever, et al. 2019.  Language models are unsupervised multitask learners.
  * Tchango et al. (2022) Arsene Fansi Tchango, Zhi Wen, Rishab Goel, and Joumana Ghosn. 2022.  Ddxplus: A new dataset for medical automatic diagnosis.  _arXiv preprint arXiv:2205.09148_.
  * Wei et al. (2018) Zhongyu Wei, Qianlong Liu, Baolin Peng, Huaixiao Tou, Ting Chen, Xuanjing Huang, Kam-fai Wong, and Xiangying Dai. 2018.  Task-oriented dialogue system for automatic diagnosis.  In _Proceedings of the 56th Annual Meeting of the Association for Computational Linguistics (Volume 2: Short Papers)_ , pages 201–207, Melbourne, Australia. Association for Computational Linguistics.
  * Weston et al. (2016) Jason Weston, Antoine Bordes, Sumit Chopra, Alexander M Rush, Bart Van Merriënboer, Armand Joulin, and Tomas Mikolov. 2016.  Towards ai-complete question answering: A set of prerequisite toy tasks.  In _4th International Conference on Learning Representations, ICLR 2016_.
  * Xu et al. (2019) Lin Xu, Qixian Zhou, Ke Gong, Xiaodan Liang, Jianheng Tang, and Liang Lin. 2019\.  End-to-end knowledge-routed relational dialogue system for automatic diagnosis.  In _Proceedings of the AAAI Conference on Artificial Intelligence_ , volume 33, pages 7346–7353.
  * Zeng et al. (2020) Guangtao Zeng, Wenmian Yang, Zeqian Ju, Yue Yang, Sicheng Wang, Ruisi Zhang, Meng Zhou, Jiaqi Zeng, Xiangyu Dong, Ruoyu Zhang, Hongchao Fang, Penghui Zhu, Shu Chen, and Pengtao Xie. 2020.  MedDialog: Large-scale medical dialogue datasets.  In _Proceedings of the 2020 Conference on Empirical Methods in Natural Language Processing (EMNLP)_ , pages 9241–9250, Online. Association for Computational Linguistics.
  * Zhang et al. (2020) Yizhe Zhang, Siqi Sun, Michel Galley, Yen-Chun Chen, Chris Brockett, Xiang Gao, Jianfeng Gao, Jingjing Liu, and William B Dolan. 2020.  Dialogpt: Large-scale generative pre-training for conversational response generation.  In _Proceedings of the 58th Annual Meeting of the Association for Computational Linguistics: System Demonstrations_ , pages 270–278.

##  Appendix A Dialogue Generation

Table 1 presents different templates used for generating the dialog Dataset
from the MDD dataset for training and testing the DialoGPT and GPT-2 models.
Each sentence type has 4 templates from which a template is chosen randomly
based on the dialogue’s sequence, i.e., if a dialogue is in its initial phase,
then the patient’s initial sentence is chosen from the Beginning Sentence of a
Patient (BSP) template set. Similarly, the next expected dialogue would be the
doctor asking if the patient is experiencing any other symptoms. For this
scenario, a template is fetched from the Intermediate Inquiry Question of a
Doctor (IIQD) template set. If the patient is experiencing the same, a
positive reply from the patient is expected, which is chosen from Intermediate
Positive answer Sentence of a Patient (IPSP) template set, or for a negative
response, a template is selected randomly from the Intermediate Negative
answer Sentence of a Patient (INSP) template set. Finally, the Last Diagnosis
Sentence of a Doctor (LDSD) template set is used for the final sentence which
is the diagnosis provided by the doctor.

Figure A depicts the flow diagram of dialogue generation. An instance from the
MDD dataset as shown in figure 4 consists of explicit symptoms which the
patient informs the doctor, implicit symptoms that the doctor draws the
information from the patient based on the patient’s input, and the disease
that the doctor diagnose. The template selection model converts this
information to patient’s and doctor’s utterances as described above using the
templates from Table 6. The third step depicts the randomly chosen templates
from their respective template sets as per the sequence of the dialogue. The
placeholders for symptoms and diseases are replaced once the template is
selected, finally, a dialogue is generated with multiple patient’s and
doctor’s utterances as shown in the last step of the diagram.

Model | 0 | 0.1 | 0.2 | 0.3 | 0.4 | 0.5 | 0.6 | 0.7 | 0.8 | 0.9
---|---|---|---|---|---|---|---|---|---|---
GPT-2 | 0.227 | 0.223 | 0.207 | 0.173 | 0.127 | 0.082 | 0.047 | 0.024 | 0.007 | 0.007
DialoGPT | 0.43 | 0.421 | 0.383 | 0.309 | 0.209 | 0.081 | 0.048 | 0.02 | 0.011 | 0.011

Table 6: Trustiness scores of both models on MDDial with different thresholds.

##  Appendix B Dialog Examples

Example 1

Patient: I have been feeling Chills and fever.

Doctor: Oh, do you have any Breast tenderness?

Patient: Yes most of the times.

Doctor: What about Body aches?

Patient: Yes Doctor, I am feeling that as well.

Doctor: What about Fatigue?

Patient: Yes, sometimes.

Doctor: This could probably be Mastitis.

Example 2

Patient: Hi Doctor, I am having Pharynx discomfort and Stuffy nose.

Doctor: What about Cough?

Patient: No, I don’t have that.

Doctor: In that case, do you have any Fever?

Patient: Well not in my knowledge.

Doctor: Oh, do you have any Ulcer?

Patient: No, I don’t have that. Doctor: Is it? Then do you experience First
degree swelling of bilateral tonsils?

Patient: Yes Doctor, I am feeling that as well.

Doctor: I believe you are having Rhinitis.

##  Appendix C Reliability Evaluation

Table 6 shows the details number of $\mathcal{T}_{score}$ presented in Figure
3. This $\mathcal{T}_{score}$ is across all possible thresholds ranging
between [0,1] with 0.1 step.

##  Appendix D Generalizability

Table 7 and Table 8 show the scores corresponding to Figure 4.

Model | $\mathcal{S}_{score}^{dise}$ | $\mathcal{S}_{score}^{diag}$ | $Diag_{acc}$
---|---|---|---
GPT-2 | 0.263 | 0.273 | 0.302
DialogGPT | 0.316 | 0.239 | 0.481

Table 7: Performance of both models on the paraphrased evaluation set.

Model | $\mathcal{S}_{score}^{dise}$ | $\mathcal{S}_{score}^{diag}$ | $Diag_{acc}$
---|---|---|---
GPT-2 | 0.221 | 0.231 | 0.323
DialogGPT | 0.241 | 0.193 | 0.488

Table 8: Performance of both models on the human-authored unseen templates
evaluation set.


# On power maps over weakly periodic rings

Charles Burnette
Department of Mathematics
Xavier University of Louisiana
New Orleans, LA 70125
<EMAIL_ADDRESS>
###### Abstract

A ring $R$ is called weakly periodic if every $x\in R$ can be written in the
form $x=a+b,$ where $a$ is nilpotent and $b^{m}=b$ for some integer $m>1.$ The
aim of this note is to consider when a nonzero nilpotent element $r$ is the
period of some power map $f(x)=x^{n},$ in the sense that $f(x+r)=f(x)$ for all
$x\in R,$ and how this relates to the structure of weakly periodic rings.

In particular, we provide a new proof of the fact that weakly periodic rings
with central and torsion nilpotent elements are periodic commutative torsion
rings. We also prove that $x^{n}$ is periodic over such rings whenever $n$ is
not coprime with each of the additive orders of the nilpotent elements. These
are in fact the only periodic power maps over finite commutative rings with
unity. Finally, we describe and enumerate the distinct power maps over Corbas
$(p,k,\phi)$-rings, Galois rings, $\mathbb{Z}/n\mathbb{Z},$ and matrix rings
over finite fields.

Keywords: nilpotent, potent, power maps, torsion, weakly periodic rings
2020 Mathematics Subject Classification: 11T30, 16N40

##  1 Introduction

Throughout, $R$ is a ring (not necessarily commutative or unital) and $R^{+}$
is the additive group of $R.$ By order of a ring element we will always mean
its group-theoretic order as a member of $R^{+}.$ The set of nilpotent
elements of $R$ will be denoted by $\textup{Nil}(R).$ The index of a nilpotent
$x$ is the smallest positive integer $n$ such that $x^{n}=0,$ and the index of
$\textup{Nil}(R)$ is the largest index, if extant, among all elements of
$\textup{Nil}(R).$ Any additional terminology and notation not explicitly
defined herein are standard in the literature.

A ring $R$ is called periodic if for each $x\in R$ the set
$\\{x^{n}:n\in\mathbb{N}\\}$ is finite. Equivalently, for each $x\in R,$ there
are positive integers $m(x)$ and $n(x)$ such that $x^{m(x)+n(x)}=x^{m(x)}.$ If
the aforementioned $n(x)$ can be taken to be constant across all $x,$ then the
smallest such constant permissible is called the exponential period of $R,$
which we will denote by $\mu_{1}:=\mu_{1}(R),$ and the onset of exponential
periodicity of $R,$ which we will denote by $\mu_{0}:=\mu_{0}(R)$, is given by

$\mu_{0}=\max_{x\in R}\min\\{m\in\mathbb{N}:x^{m+\mu_{1}}=x^{m}\\},$

provided this maximum exists. Otherwise, we say that $\mu_{1}$ and $\mu_{0}$
are infinite. Notice that $\mu_{0}$ is no smaller than the index of
$\textup{Nil}(R)$ and that, for rings with unity, $\mu_{1}$ is no smaller than
the exponent of the group of units $R^{\times}.$

An element $x\in R$ is called potent if $x^{m}=x$ for some integer $m>1.$ Let
$\textup{Pot}(R)$ denote the set of potent elements of $R.$ A ring $R$ is
called weakly periodic if $R=\textup{Nil}(R)+\textup{Pot}(R).$ We remark that
if $R=\textup{Nil}(R)\cup\textup{Pot}(R),$ then $\mu_{0}$ is clearly the index
of $\text{Nil}(R).$ If $R=\textup{Pot}(R),$ then $R$ is called a $J$-ring. It
is well known that every $J$-ring is commutative [19].

Some obvious examples of periodic rings are finite rings, Boolean rings, and
nil rings. In fact, finite fields and Boolean rings are $J$-rings. Bell [4]
proved that periodic rings are weakly periodic, but the status of the converse
is still unresolved. Periodicity has been established for several special
classes of weakly periodic rings though (e.g. [1], [5], [6], [13], [24]).

The power maps over a ring are the functions of the form $f(x)=x^{n}$ for some
fixed $n\in\mathbb{N}.$ In this note, we assess what power map “oscillations”
may inform us about the arithmetical structure of weakly periodic rings. In
particular, we will show that if the nilpotent elements of $R$ are additively
torsion and multiplicatively central, then each one is a period of some power
map. This leads us to an alternative proof of the fact that weakly periodic
rings with this property are periodic commutative torsion rings. A mild
generalization of this was proved by Bell and Tominaga in [6], who relied on
Pierce decompositions and Chacron’s periodicity criterion [9]. We will also
prove that $x^{n}$ is periodic over such rings whenever $n$ is not coprime
with each of the orders of the nilpotent elements. This will allow us to
derive tight lower and upper bounds for the number of periodic power maps over
commutative rings when $\mu_{1}$ and $\mu_{0}$ are both finite. Assorted
examples are peppered throughout to help illustrate the results. For ease of
navigation, Table 1 catalogs the most instructive and concrete examples
featured in this paper.

Table 1: Periodic power map enumerations for some rings

Ring $R$ | $\mu_{1}(R)$ | $\mu_{0}(R)$ | # of periodic power maps
---|---|---|---
| Corbas
---
$(p,k,\phi)$-ring
(pp. 3–4, 9)
$p(p^{k}-1)$ | 2 |  |  $p^{k}-1$ if $\phi$ is the identity,
---
0 otherwise
|  $R_{1}\times R_{2}$,
---
$R_{1}$ reduced,
$R_{2}\neq 0$ nil
(p. 5)
$\mu_{1}(R_{1})$ | $\mu_{0}(R_{2})=\text{index of}\ R_{2}$ |  | at least $\mu_{1}(R_{1}),$
---
at most $\mu_{1}(R_{1})+\mu_{0}(R_{2})-2$
|  $\text{GR}(p^{k},d),$ $d\geq 2$
---
(p. 10)
$p^{k-1}(p^{d}-1)$ | $k$ |  |  $p^{k-2}(p^{d}-1)+\left\lfloor\frac{k-1}{p}\right\rfloor$ if $k\geq 2,$
---
0 if $k=1$
| $\mathbb{Z}/n\mathbb{Z}$
---
(pp. 10–11)
| Carmichael
---
function $\lambda(n)$
|  $E(n):=$ maximal exponent
---
in prime factorization of $n$
$\sum\limits_{\begin{subarray}{c}d\,|\,\textup{rad}(n/\text{rad}(n))\\\ d\neq
1\end{subarray}}(-1)^{\omega(d)+1}\\!\left\lfloor\frac{\lambda(n)+E(n)-1}{d}\right\rfloor$
| $\mathcal{M}_{n}(\mathbb{F}_{q})$
---
(pp. 11–12)
| the exponent
---
of $\text{GL}(n,\mathbb{F}_{q})$
$n$ | 0

##  2 Periodic Power Maps

If $G$ is an additive group and $X$ is a set, then a function
$\alpha:G\rightarrow X$ is periodic if there exists an $h\in
G\backslash\\{0\\}$ such that $\alpha(g+h)=\alpha(g)$ for all $g\in G.$ Such
an element $h$ is called a period of $\alpha.$ It is easy to see that the
periods of a function together with $0$ form a subgroup of $G.$ We will call
this subgroup $\text{Per}(f).$ Clearly, a power map over a ring $R$ is
periodic as a function on $R^{+}$ only if
$\text{Per}(f)\subseteq\text{Nil}(R).$ On the other hand, nilpotence alone
does not guarantee that an element is the period of some power map. Here are a
couple counterexamples.

######  Example 2.1.

Let $R=\prod_{i\in\mathbb{N}}\mathbb{Z}/p_{i}^{2}\mathbb{Z},$ where $p_{i}$ is
the $i^{\text{th}}$ prime number. The sequence $(p_{i})_{i\in\mathbb{N}}$ is
nilpotent of index 2. Therefore, if $(x_{i})_{i\in\mathbb{N}}\in R,$ then

$\left((x_{i}+p_{i})^{n}\right)_{i\in\mathbb{N}}=\left(x_{i}^{n}+np_{i}x_{i}^{n-1}\right)_{i\in\mathbb{N}}$
(2.1)

for all $n\in\mathbb{N}.$ Since $(p_{i})_{i\in\mathbb{N}}$ has infinite order,
there is no integer $n$ such that $x_{i}^{n}+np_{i}x_{i}^{n-1}=x_{i}^{n}$ for
every $i\in\mathbb{N}.$

######  Example 2.2.

If $p$ is a prime number, $k$ is a positive integer, and $\phi$ is an
automorphism of the Galois field $\mathbb{F}_{p^{k}},$ then the Corbas
$(p,k,\phi)$-ring [10] is the ring $R$ in which
$R^{+}=\mathbb{F}_{p^{k}}\oplus\mathbb{F}_{p^{k}}$ and the ring multiplication
$\cdot$ is defined by

$(a,b)\cdot(c,d)=(ac,ad+b\phi(c)).$

It is straightforward to confirm that $R$ satisfies the following properties:

  * •

For all $n\in\mathbb{N},$

$(a,b)^{n}=\left(a^{n},b\phi(a^{n-1})\sum_{j=0}^{n-1}a^{j}\phi(a^{-j})\right).$
(2.2)

If $\phi$ is not the identity automorphism and $a\neq 0,$ then this can be
simplified to

$(a,b)^{n}=\left(a^{n},b\phi(a^{n-1})\frac{a^{n}\phi(a^{-n})-1}{a\phi(a^{-1})-1}\right),$
(2.3)

  * •

$\textup{Nil}(R)=0\times\mathbb{F}_{p^{k}}$ has index 2,

  * •

$R$ is commutative if and only if $\phi$ is the identity.

Hence, for each $a,b,y\in\mathbb{F}_{p^{k}}$ and $n\in\mathbb{N},$

$\left((a,b)+(0,y)\right)^{n}=\left(a^{n},(b+y)\sum_{j=0}^{n-1}a^{j}\phi(a^{n-j-1})\right).$
(2.4)

If $\phi$ is not the identity, then $0$ is the only value of $y$ for which
$\left((a,b)+(0,y)\right)^{n}$ is identically $(a,b)^{n}.$ In this case, $R$
has no periodic power maps whatsoever.

Unboundedness of order and noncommutativity are responsible for the
pathologies of Examples 2.1 and 2.2, respectively. However, as long as
$\textup{Nil}(R)$ circumvents these traits, we can promise that each nonzero
nilpotent element is a period of some power map. We will refer to such rings
as nilperiod.

######  Theorem 2.3.

If $R$ is a ring in which every nilpotent element is central and torsion, then
$R$ is nilperiod.

###### Proof.

Let $r\in\textup{Nil}(R),$ and let $i$ and $j$ be the index and order,
respectively, of $r.$ If we set $n=(i-1)!j,$ then for all $x\in R,$

$(x+r)^{n}=x^{n}+\sum_{k=1}^{i-1}\binom{n}{k}r^{k}x^{n-k}.$ (2.5)

Since the binomial coefficient $\binom{n}{k}$ is a multiple of
$n/\textup{gcd}(n,k)$ for each integer $k$ (cf Problem B2 of the 2000 Putnam
competition [21]) and $n/\textup{gcd}(n,k)$ is a multiple of $j$ for each
$k\in[i-1],$ the sum in (2.5) vanishes. Therefore $(x+r)^{n}=x^{n}.$ ∎

######  Corollary 2.4.

If $R$ is a weakly periodic ring in which every nilpotent element is central
and torsion, then $R$ is a periodic commutative torsion ring.

###### Proof.

Let $x\in\textup{Pot}(R)$ and $y\in\textup{Nil}(R)$ be given. By Theorem 2.3,
there is an integer $n$ such that $(x+y)^{n}=x^{n}.$ Since there is also an
integer $m>1$ such that $x^{m}=x,$ we can see that

$(x+y)^{nm}=x^{nm}=x^{n}=(x+y)^{n}.$ (2.6)

Hence $R$ is periodic, and because all nilpotent elements are central, we can
further conclude that $R$ is commutative (see [14]). Consequently,
$\textup{Nil}(R)$ is an ideal.

To see that $R$ is torsion, first notice that $R/\textup{Nil}(R)$ is a
$J$-ring. As Jacobson explained in the proof of his classic “$a^{n}=a$”
theorem [19], the additive group of a $J$-ring is torsion. This implies that
for each $x\in\textup{Pot}(R),$ there is a positive integer $j$ such that
$jx\in\textup{Nil}(R).$ Since every nilpotent element of $R$ is torsion, it
follows that $R$ itself is torsion as a whole. ∎

It may be interesting to figure out the extent to which the conditions of
Theorem 2.3 can be loosened. Here is an example demonstrating that either of
the hypotheses in Theorem 2.3 can be resoundingly defied.

######  Example 2.5.

Consider the direct product $R=R_{1}\times R_{2},$ where $R_{1}$ is a reduced
ring and $R_{2}$ is a nil ring of finite index, say $n.$ Then
$\textup{Nil}(R)=0\times R_{2}$ has index $n$ as well. Furthermore,

$\left((a,b)+(0,y)\right)^{m}=(a^{m},0)=(a,b)^{m}$ (2.7)

for all $a\in R_{1},$ $b,y\in R_{2},$ and integers $m\geq n.$

Take $R_{2}$ to be a torsion-free abelian group equipped with the zero
multiplication to see that nilperiod rings can be entirely devoid of torsion
nilpotent elements. Further still, the existence of noncommutative nil rings
rules out the necessity of central nilpotent elements. However, nilperiod
rings seem constrained enough to compel $\textup{Nil}(R)$ to be an ideal. We
call $R$ an NI-ring if $\textup{Nil}(R)$ is an ideal. Equivalently,
$\text{Nil}(R)$ coincides with the upper nilradical $\text{Nil}^{*}(R)$ (i.e.
the sum of all nil ideals of $R$).

######  Conjecture 2.6.

Every nilperiod ring is an NI-ring.

If Conjecture 2.6 is correct, then noncommutative weakly periodic nilperiod
rings are “almost” commutative in the sense that their commutator ideals are
nil. Indeed, for if $R$ is is a weakly periodic NI-ring, then
$R/\textup{Nil}(R)$ is commutative due to being a $J$-ring. Moreover, because
the Jacobson radical $\text{J}(R)$ of a weakly periodic ring is nil, we could
report that $\textup{J}(R)=\text{Nil}(R)=\text{Nil}^{*}(R)$ and that $R$ is
ultimately periodic [13, Lemma 1].

Of course in noncommutative rings, $\text{Nil}^{*}(R)$ typically differs from
the lower nilradical $\text{Nil}_{*}(R),$ that is, the intersection of all the
prime ideals of $R.$ A ring $R$ is called 2-primal if
$\text{Nil}_{*}(R)=\text{Nil}(R).$ Marks [22] provided a thorough list of
conditions on noncommutative rings that enforce 2-primality together with
their interdependencies, but none involve weak periodicity. Furthermore, being
2-primal is a necessary and sufficient condition for a ring with bounded
nilpotency index to be an NI-ring [17, Proposition 1.4]. We should therefore
suspect that a weakly periodic NI-ring may fail to be 2-primal provided its
nilpotency index is unbounded.

######  Example 2.7.

Let $S$ be a finite 2-primal ring, $n\in\mathbb{N},$ and $R_{n}$ be the
$2^{n}\times 2^{n}$ upper triangular matrix ring over $S.$ Each $R_{n}$ is
finite and thus periodic. Proposition 2.5 of [7] further implies that each
$R_{n}$ is 2-primal, and so they are NI-rings. Now embed each $R_{n}$ into
$R_{n+1}$ via the monomorphism $\sigma$ defined by

$\sigma(A)=\begin{pmatrix}A&0\\\ 0&A\end{pmatrix}.$

Then $\mathcal{D}=\langle R_{n},\sigma_{nm}\rangle,$ with
$\sigma_{nm}=\sigma^{m-n}$ whenever $n\leq m,$ is a direct system over
$\mathbb{N}.$ Set $R=\varinjlim R_{n},$ the direct limit of $\mathcal{D}.$
Since $R=\bigcup_{n=1}^{\infty}R_{n}$ is the union of periodic rings, $R$ is
itself periodic. However, [17, Proposition 1.1 and Example 1.2] explains why
$R$ fails to be 2-primal, even though the direct limit of a direct system of
NI-rings is itself an NI-ring.

We can at least verify Conjecture 2.6 for polynomial identity algebras over
fields of characteristic zero. The proof adapts techniques employed by
Herstein in [15] and [16].

######  Theorem 2.8.

If $R$ is a nilperiod PI-algebra over a field $K$ of characteristic zero, then
$R$ is an NI-ring.

###### Proof.

Let $a,b\in\textup{Nil}(R).$ Then there are positive integers $\ell$ and $m$
such that $(x+a)^{m}=x^{m}$ and $(x+b)^{\ell}=x^{\ell}$ for all $x\in R.$
Consequently, $(a+b)^{\ell m}=0,$ and so $a+b$ is nilpotent.

Next, suppose $c\in\textup{Nil}(R),$ and let $r\in R$ be arbitrary. Let $S$ be
the subalgebra of $R$ generated by $c$ and $r.$ Since $S$ is a finitely-
generated PI-algebra, $\textup{J}(S)$ is nil due to Amitsur’s Nullstellensatz
[3], [8].

Now assume, to the contrary, that $c\not\in\textup{J}(S).$ Then the coset
$\overline{c}=(c+\textup{J}(S))\in S/\textup{J}(S)$ is a nonzero nilpotent
element of index, say, $j.$ Because $S/\textup{J}(S),$ as a semiprimitve ring,
is a subdirect product of primitive rings $S_{i},$ each of which is a
homomorphic image of $S/\textup{J}(S),$ the coset $\overline{c}$ projects to a
nilpotent element $\nu_{i}$ within each factor $S_{i}.$ Note that not all of
these $\nu_{i}$ can be 0, otherwise $\overline{c}=0,$ which would indicate
that $c\in\textup{J}(S).$

Let $S_{i}$ be a factor in which $\nu_{i}\neq 0,$ and suppose that $\nu_{i}$
is nilpotent of index $j_{i}.$ Then $2\leq j_{i}\leq j,$ the power
$\nu_{i}^{j_{i}-1}$ is nilpotent of index 2, and $\overline{c^{j_{i}-1}}\neq
0,$ which implies that $c^{j_{i}-1}\not\in\textup{J}(S).$ But since
$c^{j_{i}-1}$ is then a nonzero nilpotent element of $R,$ by hypothesis
$c^{j_{i}-1}$ is the period of some power map $f(x)=x^{n_{i}}.$ As a result,
the factor $S_{i}$ inherits the identity
$(x+\nu_{i}^{j_{i}-1})^{n_{i}}=x^{n_{i}}.$ Furthermore, $S_{i}$ cannot be a
division ring as it contains the nonzero nilpotent $\nu_{i}.$ Due to
Jacobson’s density theorem, $S_{i}$ is thus isomorphic to a dense subring of
$\textup{End}(V_{i})$ for some vector space $V_{i}$ over a division ring
$D_{i}.$ Since $S_{i}$ is itself a PI-algebra, we may assume that it is
finite-dimensional (cf [20, Lemma 5 and Theorem 1]), and so
$S_{i}\cong\mathcal{M}_{s_{i}}(D_{i}),$ the ring of $s_{i}\times s_{i}$
matrices with entries in $D_{i},$ for some integer $s_{i}\geq 2.$ So if
$I_{s_{i}}\in S_{i}$ corresponds to the $s_{i}\times s_{i}$ identity matrix,
then

$\left(I_{s_{i}}+\nu_{i}^{j_{i}-1}\right)^{n_{i}}=I_{s_{i}}=I_{s_{i}}+n_{i}\nu_{i}^{j_{i}-1},$
(2.8)

which implies that $\nu_{i}^{j_{i}-1}$ is torsion.

Because every $j_{i}$ must lie between 2 and $j,$ we need only finitely many
different values for the $n_{i}.$ Hence, $\overline{c}$ is torsion. Therefore
$kc\in\textup{J}(S)$ for some integer $k\geq 2.$ Yet since $K$ is a field of
characteristic zero and $\textup{J}(S)$ is closed under scalar multiplication,
we find that

$c=(k1_{K})^{-1}kc\in\textup{J}(S),$ (2.9)

which is at odds with our original assumption. It thus follows that
$c\in\textup{J}(S)$ and so $cr$ and $rc$ are in $\textup{J}(S)$ as well. Since
$\textup{J}(S)$ is nil, both $cr$ and $rc$ are nilpotent, as required. ∎

######  Corollary 2.9.

If $R$ is a periodic nilperiod algebra over a field of characteristic zero
with finite $\mu_{1}$ and $\mu_{0},$ then $R$ is an NI-algebra.

###### Proof.

Since $x^{\mu_{0}+\mu_{1}}=x^{\mu_{0}}$ for all $x\in R,$ it follows that $R$
is a PI-algebra, and so Theorem 2.8 applies. ∎

##  3 The Number of Distinct Periodic Power Maps

We now restrict our attention to periodic rings with finite $\mu_{1}$ and
$\mu_{0},$ for which there are $\mu_{0}+\mu_{1}-1$ distinct power maps over
$R$111The only exception to this is the zero ring. This is because
$\mu_{0},\mu_{1}\geq 1,$ but the zero ring only has one mapping on it.. Let
$\mu_{P}:=\mu_{P}(R)$ denote the number of distinct periodic power maps over
$R.$ Pinpointing the precise ring properties that determine the value of
$\mu_{P}$ is currently beyond our grasp. However, a lower bound for $\mu_{P}$
is quite tenable, provided that $R$ is commutative and $\text{Nil}(R)^{+}$ is
a torsion group with finite exponent. In essence, nilpotent elements of
simultaneously prime order and index 2 are the “fundamental” periods of the
easiest-to-distinguish periodic power maps. First, we borrow some notation
from number theory. The squarefree radical of a positive integer $n,$ denoted
$\textup{rad}(n),$ is the product of the distinct prime factors of $n,$ and
$\omega(n)$ is the number of distinct prime factors of $n.$ Despite the threat
of notational confusion, we will let $\mu(n)$ be the Möbius function (because
one can never get enough of the Greek letter mu).

######  Theorem 3.1.

Let $R$ be a commutative ring in which the exponent of $\textup{Nil}(R)^{+}$
is finite. If $N$ is the least common multiple of the orders of the nilpotent
elements, then $f(x)=x^{n}$ is periodic for every integer $n\in\mathbb{N}$
that is not coprime with $N.$ Accordingly,

$\mu_{P}\geq-\sum_{\begin{subarray}{c}d\,|\,N\\\ d\neq
1\end{subarray}}\mu(d)\left\lfloor\frac{\mu_{0}+\mu_{1}-1}{d}\right\rfloor=\sum_{\begin{subarray}{c}d\,|\,\textup{rad}(N)\\\
d\neq
1\end{subarray}}(-1)^{\omega(d)+1}\left\lfloor\frac{\mu_{0}+\mu_{1}-1}{d}\right\rfloor$

if $\mu_{1}$ and $\mu_{0}$ are finite. This lower bound is attained if $R$ is
also finite and unital.

###### Proof.

By Cauchy’s theorem for abelian groups, if $p$ is a prime number that divides
$N,$ then $\textup{Nil}(R)$ contains a necessarily nonzero element $r$ of
order $p.$ If the index of $r$ is $k,$ then the index of $r^{k-1}$ is 2, and
since $r\,|\,r^{k-1},$ the order of $r^{k-1}$ is also $p.$ We can thus invoke
the freshman’s dream to see that

$(x+r^{k-1})^{pm}=(x^{p}+r^{(k-1)p})^{m}=x^{pm}$ (3.1)

for every $x\in R$ and $m\in\mathbb{N}.$

So if $pm\leq\mu_{0}+\mu_{1}-1,$ then $f(x)=x^{pm}$ is a nonrepetitive
periodic power map over $R.$ We can enumerate all these maps in two different
ways. One is a routine application of the principle of inclusion-exclusion.
The other way is to note that the number of integers no larger than
$\mu_{0}+\mu_{1}-1$ which are coprime to $N$ is given by

$\displaystyle\sum_{\begin{subarray}{c}1\leq n\leq\mu_{0}+\mu_{1}-1\\\
\gcd(n,N)=1\end{subarray}}1$
$\displaystyle=\sum_{n=1}^{\mu_{0}+\mu_{1}-1}\sum_{d\,|\gcd(n,N)}\mu(d)$ (3.2)
$\displaystyle=\sum_{d\,|\,N}\mu(d)\sum_{\begin{subarray}{c}1\leq
n\leq\mu_{0}+\mu_{1}-1\\\ d\,|\,n\end{subarray}}1$ (3.3)
$\displaystyle=\sum_{d\,|\,N}\mu(d)\left\lfloor\frac{\mu_{0}+\mu_{1}-1}{d}\right\rfloor=\mu_{0}+\mu_{1}-1+\sum_{\begin{subarray}{c}d\,|\,N\\\
d\neq
1\end{subarray}}\mu(d)\left\lfloor\frac{\mu_{0}+\mu_{1}-1}{d}\right\rfloor$
(3.4)
$\displaystyle=\mu_{0}+\mu_{1}-1+\sum_{\begin{subarray}{c}d\,|\,\text{rad}(N)\\\
d\neq
1\end{subarray}}(-1)^{\omega(d)}\left\lfloor\frac{\mu_{0}+\mu_{1}-1}{d}\right\rfloor.$
(3.5)

Lastly, let us see that these are the only periodic power maps if $R$ is a
finite commutative ring with unity. Since finite rings are trivially Artinian,
$R\cong\prod_{i}R_{i},$ where the $R_{i}$ are finite commutative local rings,
and for each $i$ we have a natural surjective homomorphism
$\pi_{i}:R\rightarrow R_{i}.$ Now suppose that $g(x)=x^{n}$ is periodic and
$s\in\text{Per}(g)\backslash\\{0\\}.$ Then $\pi_{i}s\neq 0_{R_{i}}$ for some
$i.$ Furthermore,

$(1_{R_{i}}+\pi_{i}s)^{n}=1_{R_{i}}=1_{R_{i}}+\sum_{k=1}^{n}\binom{n}{k}\pi_{i}s^{k},$
(3.6)

and so

$\sum_{k=1}^{n}\binom{n}{k}\pi_{i}s^{k}=\pi_{i}s\left(n1_{R_{i}}+\sum_{k=2}^{n}\binom{n}{k}\pi_{i}s^{k-1}\right)=0_{R_{i}}.$
(3.7)

Therefore $n1_{R_{i}}+\sum_{k=2}^{n}\binom{n}{k}\pi_{i}s^{k-1}=0_{R_{i}}$ or
is a zero divisor. Either way, $n1_{R_{i}}$ must be a non-unit due to the
locality of $R_{i}.$ It follows that $n$ is not coprime to
$\text{char}(R_{i}),$ otherwise Bézout’s identity could be used to express the
unit $1_{R_{i}}$ as a $\mathbb{Z}$-linear combination of the non-units
$n1_{R_{i}}$ and $\text{char}(R_{i})1_{R_{i}}.$ However, $\text{char}(R_{i})$
must be a prime power $p^{t},$ and so $p$ is a common divisor of $n$ and
$\text{char}(R_{i}).$ Since the order of $s$ is a multiple of
$\text{char}(R_{i}),$ we conclude that $n$ and the order of $s$ are not
coprime. ∎

Observe that $\mu_{0}=1$ for $J$-rings and $\mu_{1}=1$ for nil rings. This
quickly leads to the two following corollaries.

######  Corollary 3.2.

Let $R$ be a $J$-ring with finite $\mu_{1}.$ Then $R$ has $\mu_{1}$ distinct
power maps, none of which are periodic.

######  Corollary 3.3.

If $R$ is a nil ring of finite index $\mu_{0},$ then $R$ has $\mu_{0}$
distinct power maps. If, in addition, $R$ is also commutative and of bounded
torsion, then

$\mu_{P}\geq-\sum_{\begin{subarray}{c}d\,|\,N\\\ d\neq
1\end{subarray}}\mu(d)\left\lfloor\frac{\mu_{0}}{d}\right\rfloor=\sum_{\begin{subarray}{c}d\,|\,\textup{rad}(N)\\\
d\neq
1\end{subarray}}(-1)^{\omega(d)+1}\left\lfloor\frac{\mu_{0}}{d}\right\rfloor,$

where the notation of Theorem 3.1 has been reprised.

##  4 Miscellaneous Examples

###  4.1 Weakly periodic rings that annihilate $\textup{Nil}(R)$

Theorem 2.3 remains true if we swap out the torsionality of $\textup{Nil}(R)$
for the condition that $xr=0=rx$ for all $x\in R$ and $r\in\textup{Nil}(R).$
(The nilpotent elements are still central here.) In this case,
$(x+r)^{n}=x^{n}+r^{n}.$ So $\alpha_{n}(x)=x^{n}$ is periodic for every
integer $n\geq 2,$ and the periods of $\alpha_{n}$ are the nilpotent elements
with index at most $n.$ It follows that a weakly periodic ring in which
$R\cdot\textup{Nil}(R)=0=\textup{Nil}(R)\cdot R$ is a commutative periodic
ring, albeit not necessarily torsion.

We should emphasize that $R$ being a two-sided annihilator of
$\textup{Nil}(R)$ is pivotal to the argument that $R$ is nilperiod. For
instance, consider the Klein four-group $\mathbb{V}=\\{0,a,b,c\\}$ presented
additively so that $R^{+}=\mathbb{Z}_{2}\oplus\mathbb{Z}_{2}$ and endowed with
the multiplication given by $0x=cx=0$ and $ax=bx=x$ for all $x\in\mathbb{V}.$
Observe that $\text{Pot}(R)=\\{a,b\\}$ and $\text{Nil}(R)=\\{0,c\\},$ and yet
the power maps over $R$ are merely “quasiperiodic” over $\text{Pot}(R)$ in the
sense that $(x+c)^{n}=x^{n}+c$ for all $x\in R\backslash\\{0,c\\}$ and
$n\in\mathbb{N}.$ This example due to Bell [4] is notable for the one-sided
orthogonality of $\textup{Nil}(R)$ and $\textup{Pot}(R).$ Various aspects of
such rings are discussed in [12] and [18].

###  4.2 Corbas ($p,k,\phi$)-rings

Let us return to Example 2.2, where

$(a,b)^{n}=\left\\{\begin{array}[]{ll}(a^{n},na^{n-1}b)&\text{if}\ \phi\
\text{is the identity automorphism,}\\\
\left(a^{n},b\phi(a^{n-1})\dfrac{a^{n}\phi(a^{-n})-1}{a\varphi(a^{-1})-1}\right)&\text{otherwise},\end{array}\right.$
(4.1)

for all $a\in\mathbb{F}_{p^{k}}^{\times},$ $b\in\mathbb{F}_{p^{k}},$ and
$n\in\mathbb{N}.$ Since every non-nilpotent element of $R$ is potent,
$\mu_{0}=2.$ To ascertain $\mu_{1},$ we need to calculate the smallest
positive integer $\mu_{1}$ such that $a^{1+\mu_{1}}=a$ and
$(1+\mu_{1})a^{\mu_{1}}=1$ for every $a\in\mathbb{F}_{p^{k}}^{\times}.$ Recall
that $\mathbb{F}_{p^{k}}$ has characteristic $p,$ and the multiplicative group
$\mathbb{F}_{p^{k}}^{\times}$ is a cyclic group of order $p^{k}-1.$ Hence
$\mu_{1}=\text{lcm}(p,p^{k}-1)=p(p^{k}-1).$ There are thus $p^{k+1}-p+1$
distinct power maps over $R.$

Out of these, $p^{k}-1$ are periodic when $\phi$ is the identity. To directly
see why, note that the only way for the equation

$\left((a,b)+(0,y)\right)^{n}=(a^{n},na^{n-1}(b+y))=(a,b)^{n}=(a^{n},na^{n-1}b)$

to hold over all of $R$ is for $n$ to be a multiple of $p,$ in which case
$(a,b)^{n}=(a^{n},0).$ This amount matches the summation derived in Theorem
3.1 since every nonzero nilpotent element of $R$ has order $p$ and so

$\sum_{\begin{subarray}{c}d\,|\,p\\\ d\neq
1\end{subarray}}(-1)^{\omega(d)-1}\left\lfloor\frac{\mu_{0}+\mu_{1}-1}{d}\right\rfloor=(-1)^{\omega(p)-1}\left\lfloor\frac{p^{k+1}-p+1}{p}\right\rfloor=p^{k}-1.$
(4.2)

###  4.3 Galois Rings

Let $R=\text{GR}(p^{k},d),$ the unique Galois extension of
$\mathbb{Z}/p^{k}\mathbb{Z}$ of degree $d,$ which is a local ring of
characteristic $p^{k}.$ It is well-known that the unique maximal ideal of $R$
is the principal ideal $(p),$ which is entirely comprised of all multiples of
$p,$ and that every non-nilpotent element is a unit. Furthermore,
$R^{\times}\cong G_{1}\times G_{2},$ where $G_{1}$ is a cyclic group of order
$p^{d}-1$ and

$G_{2}\cong\left\\{\begin{array}[]{ll}C_{2}\times
C_{2^{k-2}}\times(C_{2^{k-1}})^{d-1}&\text{if}\ p=2\ \text{and}\ k\geq 3,\\\
(C_{p^{k-1}})^{d}&\text{otherwise}.\end{array}\right.$ (4.3)

If $d=1,$ then $R\cong\mathbb{Z}/p^{k}\mathbb{Z}.$ This case is discussed in
the next subsection. If $k=1,$ then $R\cong\mathbb{F}_{p^{d}},$ which by
Corollary 3.2 has $p^{d}-1$ distinct power maps, none of which are periodic.
Finally, if $d,k>1,$ then $\mu_{0}=k$ and
$\mu_{1}=\text{lcm}(p^{d}-1,p^{k-1})=p^{k-1}(p^{d}-1).$ There are thus
$p^{k-1}(p^{d}-1)+k-1$ distinct power maps over $R$ in this case, and since
$R$ is a finite commutative ring with unity, we can apply Theorem 3.1 to see
that

$\mu_{P}(\text{GR}(p^{k},d))=(-1)^{\omega(p)-1}\left\lfloor\frac{p^{k-1}(p^{d}-1)+k-1}{p}\right\rfloor=p^{k-2}(p^{d}-1)+\left\lfloor\frac{k-1}{p}\right\rfloor$
(4.4)

###  4.4 The integers modulo $n$

The enumeration of the distinct power maps over $\mathbb{Z}/n\mathbb{Z}$ is a
folklore result, but we include it below for completeness. On the other hand,
a description of the periodic power maps, while elementary, is perhaps new or
at least little-known.

Let $n$ be a positive integer and let
$p_{1}^{\beta_{1}}p_{2}^{\beta_{2}}\cdots p_{v}^{\beta_{v}}$ be its prime
factorization. By the Chinese Remainder Theorem,

$\mathbb{Z}/n\mathbb{Z}\cong\mathbb{Z}/p_{1}^{\beta_{1}}\mathbb{Z}\times\mathbb{Z}/p_{2}^{\beta_{2}}\mathbb{Z}\times\cdots\times\mathbb{Z}/p_{v}^{\beta_{v}}\mathbb{Z}.$
(4.5)

Based on (4.3) and the discussion surrounding it,
$\mu_{1}(\mathbb{Z}/p_{i}^{\beta_{i}}\mathbb{Z})=\lambda(p_{i}^{\beta_{i}}),$
where $\lambda$ is the Carmichael function defined on prime powers $p^{\beta}$
by

$\lambda(p^{\beta})=\left\\{\begin{array}[]{ll}2^{\beta-2}&\text{if}\ p=2\
\text{and}\ \beta\geq 3,\\\
p^{\beta-1}(p-1)&\text{otherwise}.\end{array}\right.$

It follows that the exponential period of $\mathbb{Z}/n\mathbb{Z}$ is

$\mu_{1}(\mathbb{Z}/n\mathbb{Z})=\text{lcm}\\!\left(\lambda(p_{1}^{\beta_{1}}),\lambda(p_{2}^{\beta_{2}}),\ldots,\lambda(p_{v}^{\beta_{v}})\right)=\lambda(n),$
(4.6)

whereas the onset of exponential periodicity is $E(n):=\max\beta_{i},$ that
is, the index of

$\text{Nil}(\mathbb{Z}/n\mathbb{Z})\cong\text{Nil}\\!\left(\mathbb{Z}/p_{1}^{\beta_{1}}\mathbb{Z}\right)\times\text{Nil}\\!\left(\mathbb{Z}/p_{2}^{\beta_{2}}\mathbb{Z}\right)\times\cdots\times\text{Nil}\\!\left(\mathbb{Z}/p_{v}^{\beta_{v}}\mathbb{Z}\right).$
(4.7)

There are thus $\lambda(n)+E(n)-1$ distinct power maps over
$\mathbb{Z}/n\mathbb{Z}.$ Table 2 collects these statistics for some simple
values of $n.$ This settles Blomberg and Whitmore’s conjectures for sequence
A109746 on the OEIS [23].

Table 2: Some power map enumerations in $\mathbb{Z}/n\mathbb{Z}$

Value of $n$ | $\lambda(n)$ | $E(n)$ | # of power maps | # that are periodic
---|---|---|---|---
prime $p$ | $p-1$ | 1 | $p-1$ | 0
$2p$ (for odd prime $p$) | $p-1$ | 1 | $p-1$ | 0
$\prod\limits_{\text{prime factors}\ p_{i}}p_{i}$ | lcm$\\{p_{i}-1\\}$ | 1 | lcm$\\{p_{i}-1\\}$ | 0
$p^{2}$ (for any prime $p$) | $p^{2}-p$ | 2 | $p^{2}-p+1$ | $p-1$
$2^{k},k>2$ | $2^{k-2}$ | $k$ | $2^{k-2}+k-1$ | $2^{k-3}+\left\lfloor\frac{k-1}{2}\right\rfloor$
$p^{k},k>2$ (for odd prime $p$) | $p^{k-1}(p-1)$ | $k$ | $p^{k-1}(p-1)+k-1$ | $p^{k-2}(p-1)+\left\lfloor\frac{k-1}{p}\right\rfloor$

To help us see which power maps over $\mathbb{Z}/n\mathbb{Z}$ are periodic, we
recall that $\mathbb{Z}/p_{i}^{\beta_{i}}\mathbb{Z}$ is a field precisely when
$\beta_{i}=1.$ For this reason, $p_{i}$ divides the order of some nonzero
nilpotent element of $\mathbb{Z}/n\mathbb{Z}$ if and only if $\beta_{i}>1$
(which is equivalent to the condition that $p_{i}\,|\,(n/\text{rad}(n))$).
Hence, by Theorem 3.1,

$\mu_{P}(\mathbb{Z}/n\mathbb{Z})=\sum_{\begin{subarray}{c}d\,|\,\textup{rad}(n/\text{rad}(n))\\\
d\neq
1\end{subarray}}(-1)^{\omega(d)-1}\left\lfloor\frac{\lambda(n)+E(n)-1}{d}\right\rfloor.$
(4.8)

###  4.5 Matrix rings over fields

Consider $R=\mathcal{M}_{n}(\mathbb{F}_{q}),$ where $q$ is a prime power
$p^{k}.$ Almkvist [2] proved that $\mu_{1}(\mathcal{M}_{n}(\mathbb{F}_{2}))$
is the exponent of $\text{GL}(n,\mathbb{F}_{2}).$ Here we modify Almkvist’s
methods to show that $\mu_{1}(\mathcal{M}_{n}(\mathbb{F}_{q}))$ is the
exponent of $\text{GL}(n,\mathbb{F}_{q})$ and
$\mu_{0}(\mathcal{M}_{n}(\mathbb{F}_{q}))=n$ in general.

Let $\tau\in R,$ let $\psi(t)\in\mathbb{F}_{q}[t]$ be the minimal polynomial
of $\tau,$ and let $\psi_{1}(t)^{\beta_{1}}\cdots\psi_{v}(t)^{\beta_{v}}$ be
the prime factorization of $\psi(t).$ Treat $\tau$ as a linear operator of the
vector space $V:=\mathbb{F}_{q}^{n}$ and set
$V_{i}=\ker\psi_{i}(\tau)^{\beta_{i}}$ for each $i.$ Then
$V=\bigoplus_{i=1}^{v}V_{i}$ and each $V_{i}$ is invariant under $\tau.$ For
each $i,$ let $\tau_{i}:V_{i}\rightarrow V_{i}$ be the restriction of $\tau$
to $V_{i}$ so that $\psi_{i}(\tau_{i})^{\beta_{i}}$ vanishes. It suffices to
flesh out the dynamics of the sequence $\\{\tau_{i}^{j}\\}_{j=1}^{\infty}.$

If $\psi_{i}(t)=t,$ then $\tau_{i}$ is nilpotent and there is nothing more to
prove, so assume instead that $\psi_{i}(t)\neq t.$ Suppose that
$\deg\psi_{i}(t)=m.$ Then $\psi_{i}(t)\,|\,(t^{q^{m}}-t)$ since the product of
all monic irreducible polynomials in $\mathbb{F}_{q}[t]$ with degree dividing
$m$ is $t^{q^{m}}-t.$ Hence $(\tau_{i}^{q^{m}}-\tau_{i})^{\beta_{i}}=0,$ from
which it follows that $\tau_{i}$ is potent. Moreover, because $\beta_{i}\leq
n\leq p^{\lceil\log_{p}n\rceil},$ we have that

$(t^{q^{m}}-t)^{\beta_{i}}\,|\,(t^{q^{m}}-t)^{p^{\lceil\log_{p}n\rceil}}=t^{p^{\lceil\log_{p}n\rceil}q^{m}}-t^{p^{\lceil\log_{p}n\rceil}}.$
(4.9)

It follows that

$\tau_{i}^{p^{\lceil\log_{p}n\rceil}q^{m}}=\tau_{i}^{p^{\lceil\log_{p}n\rceil}},$
(4.10)

and so the exponential periodicity of $R$ is a divisor of

$\text{lcm}\\{p^{\lceil\log_{p}n\rceil}(q-1),p^{\lceil\log_{p}n\rceil}(q^{2}-1),\ldots,p^{\lceil\log_{p}n\rceil}(q^{n}-1)\\}=p^{\lceil\log_{p}n\rceil}\text{lcm}\\{q-1,q^{2}-1,\ldots,q^{n}-1\\}.$
(4.11)

Yet (4.11) is precisely the exponent of $\text{GL}(n,\mathbb{F}_{q})$ (cf [11,
Corollary 1]), and so this yields $\mu_{1}(R).$ Finally, $\mu_{0}(R)$ is the
largest possible index of a nilpotent operator on a subspace of $V,$ which is
$n.$

We finish with a sketch of a constructive proof for the nonexistence of
periodic power maps over $\mathcal{M}_{n}(K)$ that applies to all fields. Let
$A\neq 0$ be nilpotent. The Jordan canonical form $J$ of $A$ is a strictly
lower triangular matrix with its unital entries lying on the subdiagonal. Now
let $C$ be the companion matrix of the polynomial $p(t)=t^{n}-1.$ The only
nonzero entries of $C$ are at entry $(1,n),$ which is 1, and the subdiagonal
completely populated by 1, and so $C-J$ is singular due to having zero-rows.
Let $S$ be the change of basis matrix for which $A=SJS^{-1}.$ Then for every
$m\in\mathbb{N},$

$(SCS^{-1}-A)^{m}=S(C-J)^{m}S^{-1}$ (4.12)

is singular whereas $(SCS^{-1})^{m}=SC^{m}S^{-1}$ is not.

##  5 Concluding Remarks

While we have explicitly specified the periodic power maps over finite
commutative rings with unity, things quickly turn more exotic in broader
classes of rings. For instance, Example 2.5 shows that $\mu_{P}$ can
potentially reach the upper bound of $\mu_{1}+\mu_{0}-2$ where every non-
identity power map is periodic. In any event, we pose the following question.

######  Question 5.1.

What is the distribution of $\mu_{P}$ over random finite commutative rings?

Investigations into the oscillatory behavior of generic power maps over rings
can proceed in at least two directions. One is taxonomic: can we achieve at
least a partial characterization of the nilperiod rings? Another is
combinatorial: is it possible to detect and enumerate the periodic power maps
over any periodic ring? To the author’s surprise, these questions appear
mostly unexplored. We hope that this article generates some interest in what
may potentially be a rich and attractive topic.

## References

  * [1] Abu-Khuzam, H. and Hasanali, M. and Yaqub, A., Weakly periodic rings with conditions on commutators, Acta Math. Hungar., 71, (1996), nos. 1-2, 145–153.
  * [2] Almkvist, Gert, Powers of a matrix with coefficients in a Boolean ring, Proc. Amer. Math. Soc., 53, (1975), no. 1, 27–31.
  * [3] Amitsur, S. A., A generalization of Hilbert’s Nullstellensatz, Proc. Amer. Math. Soc., 8, (1957), 649–656.
  * [4] Bell, Howard E., A commutativity study for periodic rings, Pacific J. Math., 70, (1977), no. 1, 29–36.
  * [5] Bell, Howard E. and Klein, Abraham A., On finiteness, commutativity, and periodicity in rings, Math. J. Okayama Univ., 35, (1993), 181–188.
  * [6] Bell, Howard E. and Tominaga, Hisao, On periodic rings and related rings, Math. J. Okayama Univ., 28, (1986), 101–103.
  * [7] Birkenmeier, Gary F. and Heatherly, Henry E. and Lee, Enoch K., Completely prime ideals and associated radicals, Ring theory (Granville, OH, 1992), 102–129, World Sci. Publ., River Edge, NJ, (1993).
  * [8] Braun, Amiram, The nilpotency of the radical in a finitely generated PI ring, J. Algebra, 89, (1984), no. 2, 375–396.
  * [9] Chacron, M., On a theorem of Herstein, Canadian J. Math., 21, (1969), 1348–1353.
  * [10] Corbas, Basil, Rings with few zero divisors, Math. Ann., 181, (1969), 1–7.
  * [11] Darafsheh, M. R., Order of elements in the groups related to the general linear group, Finite Fields Appl., 11, (2005), no. 4, 738–747.
  * [12] Du, Xiankun and Yi, Qi, On periodic rings, Int. J. Math. Math. Sci., 25, (2001), no. 6, 417–420.
  * [13] Grosen, Julie and Tominaga, Hisao and Yaqub, Adil, On weakly periodic rings, periodic rings and commutativity theorems, Math. J. Okayama Univ., 32, (1990), 77–81.
  * [14] Herstein, I. N., A note on rings with central nilpotent elements, Proc. Amer. Math. Soc., 5, (1954), 620.
  * [15] Herstein, I. N., Power maps in rings, Michigan Math. J., 8, (1961), 29–32.
  * [16] Herstein, I. N., A remark on rings and algebras, Michigan Math. J., 10, (1963), 269–272.
  * [17] Hwang, Seo Un and Jeon, Young Cheol and Lee, Yang, Structure and topological conditions of NI rings, J. Algebra, 302, (2006), no. 1, 186–199.
  * [18] Hirano, Yasuyuki and Tominaga, Hisao and Yaqub, Adil, On rings in which every element is uniquely expressible as a sum of a nilpotent element and a certain potent element, Math. J. Okayama Univ., 30, (1988), 33–40.
  * [19] Jacobson, N., Structure theory for algebraic algebras of bounded degree, Ann. of Math. (2), 46, (1945), 695–707.
  * [20] Kaplansky, Irving, Rings with a polynomial identity, Bull. Amer. Math. Soc., 54, (1948), 575–580.
  * [21] Kedlaya, Kiran S. and Poonen, Bjorn and Vakil, Ravi, The William Lowell Putnam Mathematical Competition, 1985–2000, Mathematical Association of America, Washington D.C. (2002), ISBN 0-88385-807-X.
  * [22] Marks, Greg, A taxonomy of 2-primal rings, J. Algebra, 266, (2003), no.2, 494–520.
  * [23] The On-Line Encyclopedia of Integer Sequences, available electronically at oeis.org.
  * [24] Yaqub, Adil, Structure of weakly periodic rings with potent extended commutators, Int. J. Math. Math. Sci., 25, (2001), no. 5, 299–304.