text stringlengths 14 5.77M | meta dict | __index_level_0__ int64 0 9.97k ⌀ |
|---|---|---|
var arrayInput;
var submit;
var output;
window.addEventListener("load", function(){onLoad();});
function onLoad() {
arrayInput = document.getElementById("arrayInput");
submit = document.getElementById("submit");
output = document.getElementById("output");
submit.addEventListener("click",function(){deleteDuplicates();});
}
function deleteDuplicates() {
var array = eval(arrayInput.value);
var newArray = [];
for(i = 0; i < array.length; i++) {
var unique = true;
for(j = 0; j < i; j++) {
if(array[i].toString().toLowerCase() == array[j].toString().toLowerCase()) {
unique = false;
break;
}
}
if(unique) {
newArray.push(array[i]);
}
console.log(i);
}
output.innerHTML = "[\"" + newArray.join("\",\"") + "\"]";
} | {
"redpajama_set_name": "RedPajamaGithub"
} | 6,485 |
Chapter 07: Socioeconomic and Environmental Influences My Nursing Test Banks - Test Bank Go!-all FREE!!
be familiar with the physical and mental effects of aging.
gain insight into the patients world by talking with and listening to him or her.
learn the details of the patients medical and social histories.
be a member of the patients formal support system.
By listening to and consulting with older adults, the nurse develops an understanding of the values and perceptions that guide older adults thoughts and feelings about life. The nurse forms partnerships with older adults to defend and promote their rights. The other options are nice to know but not required to be an advocate.
provides examples of various options that include assistive services.
locates housing near a senior citizen community center to minimize social isolation.
identifies housing close to the services he will need.
asks the patient to provide examples of where he would like to live.
Whatever the housing status of the older person, it must be remembered that each person has a right to determine where to live unless he or she is proven incompetent. The other options do not help the patient maintain autonomy.
female with a psychiatric diagnosis.
male with a chronic illness.
female with a history of social isolation.
male with an alcohol abuse issue.
Women are increasing in numbers among the homeless older adult communities. Approximately 30% of homeless older adults have mental illness or dementia.
frequently reinforces that everyone is welcome to have lunch with the group.
makes every effort to engage them in conversation during the meal.
encourages them to make friends with the other patients.
asks if they would assist those who need help with getting their food.
Older adults tend to feel an obligation to return favors. If someone does something for them, such as helping them to get their food, they want to be able to reciprocate. If they are financially unable to do this, they might withdraw so as not to be put in an embarrassing position.
a rapid decline in their mental health as well.
a loss of self-esteem and satisfaction with life.
increased martial stress and discord.
When the older adult loses his or her traditional role, self-esteem and satisfaction with life may be affected. The other events may happen, but a frequent outcome is loss of self-esteem and life satisfaction.
A vision examination is a service covered by Medicare Part B.
place a high value on health and wellness.
frequently take advantage of health screening options.
have occupations that are less physically demanding.
manage emotional stress in a more productive manner.
More-educated people often have greater access to wellness programs and preventive health options because they tend to have more financial resources and health insurance coverage. Education may lead to an increased value on health and wellness. Occupations may or may not be physically demanding. Educated older adults may not manage stress more productively.
8. Which patient is most likely to be seen at a clinic that services older adults who are at or below the poverty level?
The highest rates of poverty are among Hispanic women over the age of 65 who live alone.
widows who have never worked outside of their homes.
widowers with at least one chronic illness.
females who have part-time jobs.
males with pensions plus Social Security income.
After age 75, women outnumber men in American society. Most women in this age group did not work outside the home, so their incomes depend on their spouses pensions or Social Security benefits.
provides a detailed explanation about the importance of taking the medications appropriately.
educates the patient about the cost-effectiveness of generic brands of the prescribed medications.
includes family members with the patient in the medication education plan.
offers suggestions on ways to minimize the risk of forgetting to take medication correctly.
Persons of this cohort (raised during the American depression of the 1930s) are generally frugal and often do not spend money, even if they have it. Suggesting a cost-effective way to purchase the medications will particularly appeal to this patient.
Women and men who served in the armed forces during this time became accustomed to preventive medical and dental care. Those influenced by the Great Depression are more likely to hoard money. Families started becoming more mobile. This cohort is not as likely to be noncompliant because of cohort influences.
12. An older patient appears to have few friends and little family. What action by the nurse is best?
Encourage the patient to stay in contact with remaining family members.
Help the patient find new social outlets and support systems.
Assess the patient for depression or substance abuse.
Ask the patient why there are so few friends and family.
Social networks are invaluable to help mitigate the effects of major life events on health. The nurse can encourage the patient to join groups or organizations in order to make new friends. Staying in touch with family may or may not be desired. The patient may need assessment for substance abuse, but this is not the best action. Asking why questions often puts people on the defensive, and this technique is not considered a therapeutic communication tool.
13. An adult child of an older adult confides in the nurse that the patient has lost most of her friends because of her negative behavior. What action by the nurse is best?
Ask when the patient had her last physical exam.
Encourage the patient to be more positive.
Ask if the patient is aware of the problem.
Suggest the patient take antidepressants.
Depressed or negative older adults have trouble maintaining relationships. If this is a change in status, the nurse should determine if the patient needs a checkup to look for underlying illness. The other answers do not provide action that could possibly alleviate the situation. Giving the patient medications without a full workup is dangerous.
14. A patient is not competent to manage financial affairs. What legal recourse does the older person have?
A conservator is appointed by the courts to handle a patients monetary affairs. A guardian helps with nonmonetary issues. Health care proxy and social workers do not manage financial affairs.
15. An older couple is considering moving into a retirement community. What reaction by the nurse is best?
Thats a good idea to consider at your age.
Check on what levels of care they provide.
Do you have enough money to afford this?
What does your family think of this idea?
Retirement communities have differing levels of care; some are only for independent seniors, whereas others offer an array of arrangements. This is the most important factor for the couple to consider, because they may face having to move to a chosen community as their needs change.
16. An older adult is planning to move to an assisted living facility. What advice does the nurse provide to the adult children?
Let your father choose what items to take with him.
Warn your dad there will be little room for personal things.
It is best to pick your dad up one day and move him in.
Be aware your dad may suffer from depression or confusion.
Individuals who move can suffer from relocation stress, which is a negative consequence of moving. If the patient has input into the facility chosen, can take tours, and can bring cherished personal items with him or her, the chances of relocation stress lessen. Although there might be limited room, it is more important for the family to let the patient take wanted items. Moving precipitously can increase the chance of relocation stress. The family should be warned about the negative reactions to moving that are possible, but this does not give them the ability to lessen the impact.
17. An adult daughter brings a patient to the gerontology clinic and reports that the patient has become increasingly withdrawn and no longer goes out during the day. What response by the nurse is best?
Administer a mini mental state exam.
Ask the patient why this is happening.
Assess if the patient feels safe at home.
Determine if abuse is occurring.
Patients often withdraw and become isolated when they do not feel safe in their surroundings. The nurse should first assess the patients perception of safety. The other options may or may not be necessary, but why questions should be avoided, as they generally place people on the defensive.
18. An older woman lives alone. What action by the nurse is best to keep the patient from becoming a victim of crime?
Encourage the patient to take self-defense classes.
Tell the patient that it is okay to hang up or not answer the door.
Have the patient install a monitored security system.
Ask if there is a neighbor who can check up on her.
Older people who are lonely may welcome visits from unscrupulous visitors. They are also less likely to hang up the phone or close the door to avoid appearing impolite. The nurse can best help this patient by telling her such behavior is not only all right, it is important for her safety. The other actions are also possible but can be costly, and the patient may not have a reliable neighbor.
19. The nurse is presenting an educational workshop at a senior center where most of the patients will be 75 years or older. What does the nurse consider about this population when designing the presentation?
Most of these patients only have a high school diploma.
Many patients will be illiterate so handouts should be simple.
A great number of patients never attained a high school.
A lot of these patients went to college on the GI bill.
Educational attainment differs with age cohorts. In this age group, the highest number of persons attained a high school diploma.
The most common chronic problems in 2002 were heart disease, cancer, stroke, chronic obstructive pulmonary disease (COPD), Alzheimer disease, and diabetes. These exercise programs can have a positive influence on these common conditions. Cataracts and hearing loss are not included.
Strategies such as repetition, patient restating, and varied delivery methods such as pictures, written, audio, and oral discussion are all appropriate and recommended for the older adult learner.
Individuals who are eligible for SSI include those who are very old, disabled, visually impaired, and have minimal income or assets. Being deaf or cognitively impaired are not criteria.
Assault is the threat of harm. Robbery is taking property by force or threat of force. Battery is actually physically harming the victim. Larceny is a noncontact crime resulting in loss of property. Burglary is the taking of property while being in the victims residence, place of business, or automobile without authorization. | {
"redpajama_set_name": "RedPajamaC4"
} | 3,647 |
{"url":"http:\/\/mathhelpforum.com\/pre-calculus\/48841-mathematical-dimensions.html","text":"Math Help - Mathematical Dimensions\n\n1. Mathematical Dimensions\n\nI know that plane geometry as taught is high school is 2D or two dimensional.\n\nI know that there is something called 3D math. For example, points in space (x,y,z) are different than points in the form (x,y).\n\nHow many dimensions are there in the world of mathematics?\n\nIs there such a thing as 4D math?\n\nIn other words, is there such a thing as a point having 4 letters like (w,x,y,z)?\n\n2. In math, anything above three dimensions is called hyperspace. It's pretty difficult if not downright impossible to picture any more than 4 dimensions (space and time) in your mind, but scientists are discovering new dimensions trapped within particles. So yes, there are more than three dimensions in mathematics. You can actually find distances between points (w,x,y,z) and (w',x',y',z') by taking the square root of (w-w')^2 + (x-x')^2 + (y-y')^2 + (z-z')^2. This works for any number of dimensions.\nHopefully that answered the question alright\n\n3. Hello,\nOriginally Posted by magentarita\nI know that plane geometry as taught is high school is 2D or two dimensional.\n\nI know that there is something called 3D math. For example, points in space (x,y,z) are different than points in the form (x,y).\nIn my country, we learn 3D spaces in the final year of high school\n\nHow many dimensions are there in the world of mathematics?\n\nIs there such a thing as 4D math?\n\nIn other words, is there such a thing as a point having 4 letters like (w,x,y,z)?\nThe four dimension space is mostly use by physicists, I guess it is in relativity\n\nAs for mathematics, there is an infinity of possible dimensions. For example, matrices illustrate this, since their dimension can be any nonnegative integer n.\nThere are applications in analysis, algebra or calculus... where you use $\\mathbb{R}^n$. An element of it is in the form $x=(x_1,x_2,\\dots,x_n)$ where n is arbitrary.\nAnd there are quite a lot of uses, but we don't quite use it for graphic representations.\n\nExample :\nThe distance from a point $x=(x_1, x_2, \\dots, x_n)$ to another point $y=(y_1, y_2, \\dots, y_n)$ in $\\mathbb{R}^n$ is defined as being :\n\n$\\left(|x_1-y_1|^n+|x_2-y_2|^n+\\dots+|x_n-y_n|^n \\right)^{\\frac 1n}=\\left(\\sum_{i=1}^n |x_i-y_i|^n\\right)^{\\frac 1n}$\n(you can check that this works for p=2 and gives the formula you know).\n\n4. wow!!\n\nOriginally Posted by bnay\nIn math, anything above three dimensions is called hyperspace. It's pretty difficult if not downright impossible to picture any more than 4 dimensions (space and time) in your mind, but scientists are discovering new dimensions trapped within particles. So yes, there are more than three dimensions in mathematics. You can actually find distances between points (w,x,y,z) and (w',x',y',z') by taking the square root of (w-w')^2 + (x-x')^2 + (y-y')^2 + (z-z')^2. This works for any number of dimensions.\nHopefully that answered the question alright\nGreat information. I had no idea that I can take the square root of such points beyond 3D and find the distances between them by applying basic algebra.\n\n5. Moo\n\nOriginally Posted by Moo\nHello,\n\nIn my country, we learn 3D spaces in the final year of high school\n\nThe four dimension space is mostly use by physicists, I guess it is in relativity\n\nAs for mathematics, there is an infinity of dimensions. For example, matrices illustrate this, since their dimension can be any nonnegative integer n.\nThere are a lot of applications (in analysis, algebra or calculus...) where you use $\\mathbb{R}^n$. An element of it is in the form $x=(x_1,x_2,\\dots,x_n)$ where n is arbitrary.\nAnd there are quite a lot of applications, but we don't quite use it for graphic representations.\n\nExample :\nThe distance from a point $x=(x_1, x_2, \\dots, x_n)$ to another point $y=(y_1, y_2, \\dots, y_n)$ in $\\mathbb{R}^n$ is defined as being :\n\n$\\left(|x_1-y_1|^n+|x_2-y_2|^n+\\dots+|x_n-y_n|^n \\right)^{\\frac 1n}=\\left(\\sum_{i=1}^n |x_i-y_i|^n\\right)^{\\frac 1n}$\n(you can check that this works for p=2 and gives the formula you know).\nI thank you for the information provided. Of course, I am not going to step into deeper water right now. I am still a precalculus student and so, it wouldn't make sense to undertake such advanced math material. It is very fascinating, nonetheless.","date":"2014-10-21 21:38:36","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 12, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8437344431877136, \"perplexity\": 498.0654202638907}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2014-42\/segments\/1413507444829.13\/warc\/CC-MAIN-20141017005724-00282-ip-10-16-133-185.ec2.internal.warc.gz\"}"} | null | null |
import sys, time
import signal
from ignition.program import ProgramGroup
class shutdown_handler:
def __init__(self):
self.triggered = False
def __call__(self, signum, frame):
self.triggered = True
def main():
if len(sys.argv) > 1:
try:
group = ProgramGroup.read(sys.argv[1])
except ValueError as e:
print("Error opening launch file %s: %s" % (sys.argv[1], e))
sys.exit(1)
stop = shutdown_handler()
signal.signal(signal.SIGTERM, stop)
try:
group.announce("Starting up ...")
group.start()
time.sleep(1)
while group.valid() and not stop.triggered:
time.sleep(0.5)
except KeyboardInterrupt:
pass
group.announce("Shutting down ...")
try:
group.stop()
except KeyboardInterrupt:
group.stop(True)
sys.exit(0)
else:
print("Missing launch file")
sys.exit(1)
if __name__ == '__main__':
main()
| {
"redpajama_set_name": "RedPajamaGithub"
} | 1,683 |
Q: How do I list all guilds my bot is in with their respective ids been trying to figure this out for 15 minutes now and to no prevail
code:
client.on('ready', () => {
client.user.setActivity('you type commands uwu', { type: 'WATCHING' });
console.log(`${client.user.username} is fully active.`);
console.log(`${client.guilds}`)
})
Right now I'm just trying to get the id's but I need both and this is really annoying to figure out
A: You can mup guild collection.
client.on('ready', () => {
client.user.setActivity('you type commands uwu', { type: 'WATCHING' });
console.log(`${client.user.username} is fully active.`);
let guilds = client.guilds.cache.map(guild => guild.id) // for discord v11 //let guilds = client.guilds.map(guild => guild.id)
console.log(guilds)
})
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 8,619 |
\subsection{Marker Correspondence Neural Network}
Intuitively, marker correspondence should be inferred from the appearance similarity between the query marker and the reference image, which is similar to the optical flow estimation principle.
We thus build our neural network architecture following RAFT, which can be viewed as two stages.
First, encoding feature maps from both marker and the reference image through a siamese image feature encoder and computing their correlations, which measures their appearance similarities.
To fully utilize the marker's information,
we use the pre-trained Twins-SVT~\cite{chu2021twins}, a transformer architecture encoding global features, as the image feature encoder, which has also been validated in the recent FlowFormer~\cite{huang2022flowformer}.
Second, iteratively regressing correspondence residuals with a motion regressor, which is a ConvGRU module~\cite{cho2014properties}, from the correlations and context features.
Optical flow only concerns temporally consecutive images, which generally share similar lighting and has small motion.
In contrast to optical flow, the marker usually undergoes large motion in the reference image, and the reference image may be captured in harsh lighting environments, which might cause its appearance to be significantly different from the marker.
We tackle these two challenges in the two stages of our neural network.
In the first stage, once the image feature encoder learned to encode lighting-invariant features, the correlations computed from such image features would remain constant regardless of the lighting variation of the reference image, and thus the motion regressor would not be affected.
We propose the SED loss to encourage our image feature encoder to be invariant to lighting variations.
In the second stage, the existence of large motion requires the motion regressor to be able to regress large displacement.
We thus propose FlyingMarkers, which provides synthesized reference images with various marker deformations to train a capable motion regressor.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth, trim={10mm 100mm 100mm 0mm}]{figures/flyingmarkers.pdf}
\caption{\label{Fig: flyingmarkers} FlyingMarkers. (a) A randomly selected marker. (b) Synthetic reference images of the marker (a).}
\end{figure}
\subsection{Supervised Training with FlyingMarkers\label{sec: flyingmarkers}}
It is challenging to collect the ground truth dense correspondences for marker-image pairs in real scenes and annotating such data by a human is infeasible.
Inspired by the success of FlyingChairs~\cite{dosovitskiy2015flownet} and FlyingThings~\cite{mayer2016large}, which are synthetic datasets for optical flow training, we propose FlyingMarkers, a synthetic dataset for marker correspondence training.
FlyingMarkers generates training data, including marker-image pairs with their ground truth dense correspondences, by synthesizing a marker deformed in an image.
Specifically, we select pairs of images from the MegaDepth dataset~\cite{li2018megadepth}. In each pair, one image is regarded as the marker and the other image as the background image.
We can synthesize a reference image that contains the marker via warping the marker and placing the marker in the background image.
Affine and homography transformations can fully represent geometric transformations of plane-like markers but cannot handle more complicated deformations.
Inspired by previous data augmentation techniques~\cite{melekhov2019dgc,truong2020glu}, we include a thin-plate spline~(TPS) model to synthesize the marker deformation.
We thus use the three following kinds of geometric transformations to warp markers:
\begin{itemize}
\item \textit{Affine} transformation contains rotation, shear, and translation. We uniformly sample the rotation angle from -$\frac{\pi}{3}$ to $\frac{\pi}{3}$, the shear angle from -$\frac{\pi}{2}$ to $\frac{\pi}{2}$, and the translation from $0.75$ to $1.25$
\item \textit{Homography} has 8 degrees of freedom~(DoF), which can be defined as the translation of four points from one image to another image. Therefore, we select the four corner points of the markers, randomly generate the four corners on the reference background image, and compute the homography matrix from the four-point translations as the randomly generated homography transformation.
\item \textit{TPS}. We use a thin plate spline with 18 parameters, including 6 global affine motion parameters and 12 coefficients for controllable points. We also start from an identity mapping and randomly add a float number to each parameter from -0.5 to 0.5, where the pixel coordinates have been normalized to -1 to 1.
\end{itemize}
By computing the corresponding locations of the warped marker pixels, we obtain the dense correspondences from the marker to the reference image as ground truth.
We randomly sample a geometric transformation $\mathbf{T}$ from such three candidates, and directly supervise the neural network with the ground truth correspondences:
\begin{equation}
\begin{split}
L_{Syn}(I_M, I_R) = & \sum_{\mathbf{x}_i\in S}||f_{R\leftarrow M}(\mathbf{x}_i) - \mathbf{T}(\mathbf{x}_i)||_1.
\end{split}
\end{equation}
$L_{Syn}$ is the loss used with the synthesized FlyingMarker dataset. Given the marker $I_M$ and the reference image $I_R$, our neural network predicts the correspondence $f_{R\leftarrow M}$ from $I_M$ to $I_R$ for all pixels $\mathbf{x}_i$ in the marker, where $S$ contains all pixels in $I_M$.
With the generated geometric transformation $\mathbf{T}$, we can compute their corresponding locations in the reference image $\mathbf{T}(\mathbf{x}_i)$, and supervise the predicted correspondences with L1 loss.
As the example shown in Fig.~\ref{Fig: flyingmarkers},
we can easily generate abundant marker-image pairs with proper supervision signals in this way.
FlyingMarkers contains 176,167 training samples, which cover various marker motions and deformations in total.
The motion regressor in our neural network is trained on FlyingMarkers sufficiently.
\subsection{Weakly Supervised Training with SfM Data}
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth, trim={10mm 60mm 200mm 0mm}]{figures/sed-sfm.pdf}
\caption{\label{Fig: sed-sfm} SED loss for SfM data. We compute camera poses with SfM for a collection of images that cover various lighting conditions. Given a pair of images with their relative camera poses, the SED loss constrains the location of a pixel location $x\in I_A$ to be on the corresponding epipolar line $l'$ (derived from the camera pose) in $I_B$, and vice versa.}
\end{figure}
Although FlyingMarkers provides abundant training data, it is synthetic and does not contain varying lighting marker-image pairs.
We propose a symmetric epipolar distance (SED) loss to address this limitation.
As shown in Fig.~\ref{Fig: sed-sfm},
we can collect real images that cover various lighting conditions and compute their camera poses with SfM.
The proposed SED loss can train our neural network with such real and natural lighting-varying images.
Specifically,
we compute the fundamental matrix $\mathbf{F}$ from an image $I_A$ to another image $I_B$ according to their camera intrinsic parameters and relative camera pose from SfM.
$\mathbf{F}$ restricts that a pixel location $\mathbf{x}\in \mathbb{R}^2$ in image $I_A$ can only be mapped to one of the points on a line $l'=\mathbf{Fx}$, referred to as the {\it epipolar line} in image $I_B$.
For each point $\mathbf{x}$ in image $I_A$, our network estimates its corresponding point in image $I_B$ as $\mathbf{x}'=f_{B\leftarrow A}(\mathbf{x})$.
If the $I_A$-to-$I_B$ correspondences are ideal, the distance of the corresponding pixel location $x'$ to the epipolar line $l'$, named epipolar distance~(ED), shall be zero.
Reversely, $x$ is also supposed to lie on the epipolar line $l$ derived from $x'$ in image $I_B$ if the reverse flows are ideal, and the distance from $x$ to the epipolar line $l$ should also be zero.
The sum of the two epipolar distances is defined as the SED.
According to the epipolar geometry, the inverted fundamental matrix equals the transpose of the fundamental matrix, we can therefore compute the SED loss as
\begin{equation}
SED(\mathbf{x}, \mathbf{x}', \mathbf{F})
= ED(\mathbf{x}, \mathbf{x}', \mathbf{F}) + ED(\mathbf{x}', \mathbf{x}, \mathbf{F}^T).
\end{equation}
Given the $I_A$-to-$I_B$ dense correspondences $f_{B\leftarrow A}$ estimated by our neural network, we define the following SED loss to evaluate their accuracies by computing SED for all correspondences in $f_{B\leftarrow A}$,
\begin{equation}
L_{SED}(I_A, I_B)
= \sum_{\mathbf{x}_i \in S}SED(\mathbf{x}_i, f_{B\leftarrow A}(\mathbf{x}_i),\mathbf{F}),
\end{equation}
where $S$ is the set containing all pixel locations in $I_A$.
The proposed SED loss is only derived from the fundamental matrix (or relative camera pose). Therefore, the SED loss works even when there exist significant lighting variations between the pair of images.
The SED loss coupled with the SfM data serving as weak supervision effectively mitigates bias of the synthesis image and constant lighting.
\subsection{Training Neural Network}
As the markers used in FlyingMarkers come from MegaDepth dataset~\cite{li2018megadepth},
we can identify other images in MegaDepth surrounding the images that are used as markers.
For each training sample, including a marker $I_M$ and a synthesized reference image $I_{R1}$, in FlyingMarkers, we sample another image $I_{R2}$ that has common visible observations with $I_M$ in the MegaDepth dataset.
With such a triplet, we can train our neural network with both the supervised loss and the SED loss,
\begin{equation}
L_{all}(I_M, I_{R1}, I_{R2}) = L_{Syn}(I_M, I_{R1}) + L_{SED}(I_M, I_{R2}).
\end{equation}
We use a learning rate of $10^{-4}$, a weight decay of $5\times 10^{-5}$, the one-cycle learning rate scheduler, 12 recurrent iterations, a batch size of 12, 640$\times$480 image size, and 100k training iterations.
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth, trim={5mm 60mm 110mm 0mm}, clip]{figures/DVL-Markers.pdf}
\caption{\label{Fig: dvl evaluation example}DVL-Markers Benchmark.
Given the predicted correspondence $f_{R\leftarrow M}$ from the marker $I_M$ to the reference image $I_R$, evaluate it through the SSIM and PSNR metrics between the ground-truth image $I_{R'}$ and the synthesis image $I_w$ that is warped from $I_M$.
}
\end{figure}
\section{Marker Correspondence Benchmark}
In this section, we introduce two benchmarks, including FlyingMarkers and DVL-Markers, and corresponding metrics to evaluate marker correspondence quality.
\subsection{FlyingMarkers}
Following the image synthesis and ground-truth marker correspondence generation introduced in Sec.~\ref{sec: flyingmarkers},
we create a test set to evaluate marker correspondence.
Given the estimated marker correspondence $f_{R\leftarrow M}$ and the ground-truth transformation $\mathbf T$, we can compute the End-Point Error~(EPE) for each marker pixel as
$EPE(\mathbf{x}_i) = ||f_{R\leftarrow M}(\mathbf{x}_i) - \mathbf{T}(\mathbf{x}_i)||_2$.
In line with other dense correspondence evaluation~\cite{truong2021learning}, we employ the Percentage of Correct Keypoints~(PCK) metrics.
PCK-$\delta$ is the percentage of marker pixels $\hat{\mathbf{x}}_i$ whose correspondence EPE is smaller than a given threshold $\delta$.
\subsection{DVL-Markers Benchmark}
\begin{figure*}[t]
\centering
\includegraphics[width=1.0\linewidth, trim={10mm 50mm 0mm 0mm}, clip]{figures/difficulty2.pdf}
\caption{\label{Fig: test images} Test images in DVL-Markers. Each image is assigned a difficulty level. The 3/4 label means the image will be labeled as 3 or 4 according to the deformation degree.
}
\end{figure*}
Existing benchmarks for optical flow~\cite{geiger2013vision,butler2012naturalistic} only evaluate correspondences between consecutive images in a video clip, which have small motions and similar lighting conditions.
Although FlyingMarkers provides quantitative marker correspondence evaluation, it still has two significant limitations: 1) the reference image is synthesized, and 2) the warped marker has the same lighting conditions as the original marker.
What if we would like to evaluate marker correspondence estimation with real images and varying lighting conditions?
The challenge of creating such a benchmark is similar to the problem in the training data generation: it is difficult to annotate pixel-wise correspondences for marker-image pairs, especially when there are marker deformations and challenging lighting.
We observe that if the estimated marker correspondences are of high quality, the marker warped according to the marker correspondences should be well aligned to the marker captured in the image.
We, therefore, tackle the challenge by evaluating the correspondences according to marker alignment consistency.
We propose a new benchmark, DVL-Markers, containing marker-image pairs for marker correspondence evaluation and the images are pictures taken in real scenes.
DVL-Markers contain three sets: deformation, viewpoint, and lighting, respectively, standing for challenging cases of marker deformation, viewpoint variation, and harsh lighting.
Specifically,
we warp the marker $I_M$ with the estimated correspondences $f_{R\leftarrow M}$, denoted as $I_w$~(Fig.~\ref{Fig: dvl evaluation example}).
\begin{equation}
\begin{split}
I_w & = warp(I_M, f_{R\leftarrow M}), \\
S' & = \{\mathbf{x}_i| \mathbf{x}_i \in S, I_w(\mathbf{x}_i) \neq (0,0,0) \}.
\end{split}
\end{equation}
The warped marker is assumed to be consistent with the image content inside the covered area $S'$.
Structural Similarity~(SSIM) and Peak Signal-to-Noise Ratio~(PSNR) are classical metrics evaluating image reconstruction quality.
We thus compute the marker alignment quality of such marker-image pair, $SSIM_I$ and $PSNR_I$, which are the average of SSIM and PSNR for all valid pixels $\mathbf{x}_i\in S'$ between the warped marker $I_w$ and the reference image $I_R$:
\begin{equation}
\begin{split}
SSIM_I & = \frac{1}{||S'||}\sum_{\mathbf{x}_i\in S'}SSIM(I_w(\mathbf{x}_i),I_R(\mathbf{x}_i)), \\
PSNR_I & = \frac{1}{||S'||}\sum_{\mathbf{x}_i\in S'}PSNR(I_w(\mathbf{x}_i), I_R(\mathbf{x}_i)).
\end{split}
\end{equation}
This strategy is effective for evaluating marker-image pairs of viewpoint variation and deformation but is unable to work on pairs of images with lighting variation because of the nature of SSIM and PSNR metrics.
Therefore, for each picture $I_R$ took under low-lighting in the lighting set, we take another picture $I_{R'}$ using the same camera pose and with abundant lighting.
We still feed the low-light image $I_R$ to correspondence estimation methods but compute the SSIM and PSNR metric with the well-lit image $I_{R'}$.
\subsection{Difficulty Levels in DVL-Markers}
In DVL-Markers, we prepare 10 markers and take 10 pictures for each marker under each condition, which consists of 300 test images.
We show the test images of one test marker in Fig.~\ref{Fig: test images}.
Each row contains test images of a subset and we further divide the deformation, viewpoint, and lighting subsets into 5, 4, and 10 difficulty levels. Each test image is assigned a difficulty level.
In the deformation subset, we take 2 horizontally concave, 2 horizontally convex, 2 vertically concave, 1 vertically convex, 1 diagonally concave, 1 diagonally convex, and 1 wave-like deformation, which corresponds to test images in columns 1-10 of row 1.
We observe that convex deformation is more difficult than concave deformation, so small and large concave deformations are labeled as 1 and 2, and small and large convex deformations are labeled as 3 and 4. The wave-like deformation is the most challenging case, which is labeled as 5. Test images in columns 7, 8, and 9 are labeled as two different levels according to the deformation degree.
In the viewpoint subset, we take test images according to the angle between the camera viewpoint and the marker's negative normal. We take test images at around 10°, 25°, 50°, and 75°, which are labeled from 1 to 4.
In the lighting subset, we control the lighting condition by turning on/off the light and adjusting the camera shutter. We set 10 illumination levels ranging from underexposure to overexposure.
The image in column 2 is regarded as a well-lit image, which is labeled as level 1. The overexposed image in column 1 is labeled as level 2. Then the images from column 3 to column 10 are captured under decreasing lighting, so the difficulty level gradually increases.
\begin{figure*}
\centering
\includegraphics[width=1.0\linewidth, trim={10mm 60mm 50mm 0mm}, clip]{figures/DVL-Markers-Comparison.pdf}
\caption{Marker Correspondence Visualization on the DVL-Markers Benchmark. We show an extreme reference image of the same marker for each condition and visualize the estimated marker correspondences.
}
\label{fig: dvl-markers comparison}
\end{figure*}
\section{Applications}
\begin{figure}[t]
\centering
\includegraphics[width=1.0\linewidth, trim={5mm 115mm 150mm 0mm}, clip]{figures/harshlighting.pdf}
\caption{\label{Fig: harsh lighting} AR in harsh lighting environments.
}
\end{figure}
Compared with fiducial markers, a general marker does not need to pre-arrange the environment, which makes NeuralMarker capable of processing general videos, such as live streaming, movies, and TV series.
For example, advertising in TV series with the guidance of marker correspondences in Fig.~\ref{fig:teaser} (b).
Besides, even in homemade videos, we can use an elegant marker that can be recognized by humans rather than unmeaning binary patterns.
Compared with previous sparse feature-based general marker correspondence estimation, NeuralMarker demonstrates superiority in robustness and accuracy and supports deformed markers.
Marker-based AR is one of the mainstream AR applications in many commercial AR systems~\cite{simonetti2013vuforia}.
These functionalities that are extended by our NeuralMarker can enable more interesting AR effects.
In Fig.~\ref{Fig: harsh lighting}, we present that we can realize AR effects in harsh lighting environments according to marker correspondence predicted by NeuralMarker.
We replace the reflectance of the poster in the real image (a) guided by marker correspondence and preserve the shading through NIID-Net~\cite{luo2020niid}.
We also identify the marker in such a low-light environment and insert a virtual object on the marker plane.
Besides, NeuralMarker also supports editing contents on a deformed marker.
A common requirement in video editing is to add some effects to an object and expect the editing results to propagate over the video clip while maintaining consistency in the content.
GANGealing~\cite{peebles2021gan} reveals that we can edit a template image and propagate the results to the related images through predicted correspondences.
However, the template image and the correspondence learning in GANGealing require a pre-trained generative model for each target object.
In contrast, our NeuralMarker is able to predict correspondences for an offhand given marker.
We therefore can extract one frame from the video clip as the marker, edit the marker, and then propagate the editing effects to the whole video clip guided by marker correspondences. Please refer to the supplemented video for more results.
\section{Acknowledgements}
We thank Rensen Xu, Yijin Li and Jundan Luo for their help.
Hongsheng Li is also a Principal Investigator of Centre for
Perceptual and Interactive Intelligence Limited (CPII).
This work is supported in part by CPII, in part by the General Research Fund through the Research Grants Council of Hong Kong under Grants (Nos. 14204021, 14207319) and in part by ZJU-SenseTime Joint Lab of 3D Vision.
\section{DVL-Markers Details}
In DVL-Markers, we prepare 10 markers and take 10 pictures for each marker under each condition, which consists of 300 test images.
We show the test images of one test marker in Fig.~\ref{Fig: test images}.
Each row contains test images of a subset and we further divide the deformation, viewpoint, and lighting subsets into 5, 4, and 10 difficulty levels. Each test image is assigned a difficulty level.
\begin{figure*}[t]
\centering
\includegraphics[width=1.0\linewidth, trim={10mm 50mm 0mm 0mm}, clip]{figures/difficulty2.pdf}
\caption{\label{Fig: test images} Test images in DVL-Markers. Each image is assigned a difficulty level. The 3/4 label means the image will be labeled as 3 or 4 according to the deformation degree.
}
\end{figure*}
In the deformation subset, we take 2 horizontally concave, 2 horizontally convex, 2 vertically concave, 1 vertically convex, 1 diagonally concave, 1 diagonally convex, and 1 wave-like deformation, which corresponds to test images in columns 1-10 of row 1.
We observe that convex deformation is more difficult than concave deformation, so small and large concave deformations are labeled as 1 and 2, and small and large convex deformations are labeled as 3 and 4. The wave-like deformation is the most challenging case, which is labeled as 5. Test images in columns 7, 8, and 9 are labeled as two different levels according to the deformation degree.
In the viewpoint subset, we take test images according to the angle between the camera viewpoint and the marker's negative normal. We take test images for each viewpoint at around 10°, 25°, 50°, and 75°, which are labeled from 1 to 4.
In the lighting subset, we control the lighting condition by turning on/off the light and adjusting the camera shutter. We set 10 illumination levels ranging from underexposure to overexposure.
The image in column 2 is regarded as a well-lit image, which is labeled as level 1. The overexposed image in column 1 is labeled as level 2. Then the images from column 3 to column 10 are captured under decreasing lighting, so the difficulty level gradually increases.
\section{Introduction}
\input{02-introduction}
\section{Related Work}
\input{03-relatedworks}
\section{NeuralMarker}
\input{04-system}
\section{Experiments}
\input{05-experiments}
\section{Limitations}
\input{06-limitations}
\section{Conclusion}
\input{07-conclusion}
\bibliographystyle{ACM-Reference-Format}
\section{Introduction}
ACM's consolidated article template, introduced in 2017, provides a
consistent \LaTeX\ style for use across ACM publications, and
incorporates accessibility and metadata-extraction functionality
necessary for future Digital Library endeavors. Numerous ACM and
SIG-specific \LaTeX\ templates have been examined, and their unique
features incorporated into this single new template.
If you are new to publishing with ACM, this document is a valuable
guide to the process of preparing your work for publication. If you
have published with ACM before, this document provides insight and
instruction into more recent changes to the article template.
The ``\verb|acmart|'' document class can be used to prepare articles
for any ACM publication --- conference or journal, and for any stage
of publication, from review to final ``camera-ready'' copy, to the
author's own version, with {\itshape very} few changes to the source.
\section{Template Overview}
As noted in the introduction, the ``\verb|acmart|'' document class can
be used to prepare many different kinds of documentation --- a
double-blind initial submission of a full-length technical paper, a
two-page SIGGRAPH Emerging Technologies abstract, a ``camera-ready''
journal article, a SIGCHI Extended Abstract, and more --- all by
selecting the appropriate {\itshape template style} and {\itshape
template parameters}.
This document will explain the major features of the document
class. For further information, the {\itshape \LaTeX\ User's Guide} is
available from
\url{https://www.acm.org/publications/proceedings-template}.
\subsection{Template Styles}
The primary parameter given to the ``\verb|acmart|'' document class is
the {\itshape template style} which corresponds to the kind of publication
or SIG publishing the work. This parameter is enclosed in square
brackets and is a part of the {\verb|documentclass|} command:
\begin{verbatim}
\documentclass[STYLE]{acmart}
\end{verbatim}
Journals use one of three template styles. All but three ACM journals
use the {\verb|acmsmall|} template style:
\begin{itemize}
\item {\verb|acmsmall|}: The default journal template style.
\item {\verb|acmlarge|}: Used by JOCCH and TAP.
\item {\verb|acmtog|}: Used by TOG.
\end{itemize}
The majority of conference proceedings documentation will use the {\verb|acmconf|} template style.
\begin{itemize}
\item {\verb|acmconf|}: The default proceedings template style.
\item{\verb|sigchi|}: Used for SIGCHI conference articles.
\item{\verb|sigchi-a|}: Used for SIGCHI ``Extended Abstract'' articles.
\item{\verb|sigplan|}: Used for SIGPLAN conference articles.
\end{itemize}
\subsection{Template Parameters}
In addition to specifying the {\itshape template style} to be used in
formatting your work, there are a number of {\itshape template parameters}
which modify some part of the applied template style. A complete list
of these parameters can be found in the {\itshape \LaTeX\ User's Guide.}
Frequently-used parameters, or combinations of parameters, include:
\begin{itemize}
\item {\verb|anonymous,review|}: Suitable for a ``double-blind''
conference submission. Anonymizes the work and includes line
numbers. Use with the \verb|\acmSubmissionID| command to print the
submission's unique ID on each page of the work.
\item{\verb|authorversion|}: Produces a version of the work suitable
for posting by the author.
\item{\verb|screen|}: Produces colored hyperlinks.
\end{itemize}
This document uses the following string as the first command in the
source file:
\begin{verbatim}
\documentclass[sigconf]{acmart}
\end{verbatim}
\section{Modifications}
Modifying the template --- including but not limited to: adjusting
margins, typeface sizes, line spacing, paragraph and list definitions,
and the use of the \verb|\vspace| command to manually adjust the
vertical spacing between elements of your work --- is not allowed.
{\bfseries Your document will be returned to you for revision if
modifications are discovered.}
\section{Typefaces}
The ``\verb|acmart|'' document class requires the use of the
``Libertine'' typeface family. Your \TeX\ installation should include
this set of packages. Please do not substitute other typefaces. The
``\verb|lmodern|'' and ``\verb|ltimes|'' packages should not be used,
as they will override the built-in typeface families.
\section{Title Information}
The title of your work should use capital letters appropriately -
\url{https://capitalizemytitle.com/} has useful rules for
capitalization. Use the {\verb|title|} command to define the title of
your work. If your work has a subtitle, define it with the
{\verb|subtitle|} command. Do not insert line breaks in your title.
If your title is lengthy, you must define a short version to be used
in the page headers, to prevent overlapping text. The \verb|title|
command has a ``short title'' parameter:
\begin{verbatim}
\title[short title]{full title}
\end{verbatim}
\section{Authors and Affiliations}
Each author must be defined separately for accurate metadata
identification. Multiple authors may share one affiliation. Authors'
names should not be abbreviated; use full first names wherever
possible. Include authors' e-mail addresses whenever possible.
Grouping authors' names or e-mail addresses, or providing an ``e-mail
alias,'' as shown below, is not acceptable:
\begin{verbatim}
\author{Brooke Aster, David Mehldau}
\email{dave,judy,steve@university.edu}
\email{firstname.lastname@phillips.org}
\end{verbatim}
The \verb|authornote| and \verb|authornotemark| commands allow a note
to apply to multiple authors --- for example, if the first two authors
of an article contributed equally to the work.
If your author list is lengthy, you must define a shortened version of
the list of authors to be used in the page headers, to prevent
overlapping text. The following command should be placed just after
the last \verb|\author{}| definition:
\begin{verbatim}
\renewcommand{\shortauthors}{McCartney, et al.}
\end{verbatim}
Omitting this command will force the use of a concatenated list of all
of the authors' names, which may result in overlapping text in the
page headers.
The article template's documentation, available at
\url{https://www.acm.org/publications/proceedings-template}, has a
complete explanation of these commands and tips for their effective
use.
Note that authors' addresses are mandatory for journal articles.
\section{Rights Information}
Authors of any work published by ACM will need to complete a rights
form. Depending on the kind of work, and the rights management choice
made by the author, this may be copyright transfer, permission,
license, or an OA (open access) agreement.
Regardless of the rights management choice, the author will receive a
copy of the completed rights form once it has been submitted. This
form contains \LaTeX\ commands that must be copied into the source
document. When the document source is compiled, these commands and
their parameters add formatted text to several areas of the final
document:
\begin{itemize}
\item the ``ACM Reference Format'' text on the first page.
\item the ``rights management'' text on the first page.
\item the conference information in the page header(s).
\end{itemize}
Rights information is unique to the work; if you are preparing several
works for an event, make sure to use the correct set of commands with
each of the works.
The ACM Reference Format text is required for all articles over one
page in length, and is optional for one-page articles (abstracts).
\section{CCS Concepts and User-Defined Keywords}
Two elements of the ``acmart'' document class provide powerful
taxonomic tools for you to help readers find your work in an online
search.
The ACM Computing Classification System ---
\url{https://www.acm.org/publications/class-2012} --- is a set of
classifiers and concepts that describe the computing
discipline. Authors can select entries from this classification
system, via \url{https://dl.acm.org/ccs/ccs.cfm}, and generate the
commands to be included in the \LaTeX\ source.
User-defined keywords are a comma-separated list of words and phrases
of the authors' choosing, providing a more flexible way of describing
the research being presented.
CCS concepts and user-defined keywords are required for for all
articles over two pages in length, and are optional for one- and
two-page articles (or abstracts).
\section{Sectioning Commands}
Your work should use standard \LaTeX\ sectioning commands:
\verb|section|, \verb|subsection|, \verb|subsubsection|, and
\verb|paragraph|. They should be numbered; do not remove the numbering
from the commands.
Simulating a sectioning command by setting the first word or words of
a paragraph in boldface or italicized text is {\bfseries not allowed.}
\section{Tables}
The ``\verb|acmart|'' document class includes the ``\verb|booktabs|''
package --- \url{https://ctan.org/pkg/booktabs} --- for preparing
high-quality tables.
Table captions are placed {\itshape above} the table.
Because tables cannot be split across pages, the best placement for
them is typically the top of the page nearest their initial cite. To
ensure this proper ``floating'' placement of tables, use the
environment \textbf{table} to enclose the table's contents and the
table caption. The contents of the table itself must go in the
\textbf{tabular} environment, to be aligned properly in rows and
columns, with the desired horizontal and vertical rules. Again,
detailed instructions on \textbf{tabular} material are found in the
\textit{\LaTeX\ User's Guide}.
Immediately following this sentence is the point at which
Table~\ref{tab:freq} is included in the input file; compare the
placement of the table here with the table in the printed output of
this document.
\begin{table}
\caption{Frequency of Special Characters}
\label{tab:freq}
\begin{tabular}{ccl}
\toprule
Non-English or Math&Frequency&Comments\\
\midrule
\O & 1 in 1,000& For Swedish names\\
$\pi$ & 1 in 5& Common in math\\
\$ & 4 in 5 & Used in business\\
$\Psi^2_1$ & 1 in 40,000& Unexplained usage\\
\bottomrule
\end{tabular}
\end{table}
To set a wider table, which takes up the whole width of the page's
live area, use the environment \textbf{table*} to enclose the table's
contents and the table caption. As with a single-column table, this
wide table will ``float'' to a location deemed more
desirable. Immediately following this sentence is the point at which
Table~\ref{tab:commands} is included in the input file; again, it is
instructive to compare the placement of the table here with the table
in the printed output of this document.
\begin{table*}
\caption{Some Typical Commands}
\label{tab:commands}
\begin{tabular}{ccl}
\toprule
Command &A Number & Comments\\
\midrule
\texttt{{\char'134}author} & 100& Author \\
\texttt{{\char'134}table}& 300 & For tables\\
\texttt{{\char'134}table*}& 400& For wider tables\\
\bottomrule
\end{tabular}
\end{table*}
Always use midrule to separate table header rows from data rows, and
use it only for this purpose. This enables assistive technologies to
recognise table headers and support their users in navigating tables
more easily.
\section{Math Equations}
You may want to display math equations in three distinct styles:
inline, numbered or non-numbered display. Each of the three are
discussed in the next sections.
\subsection{Inline (In-text) Equations}
A formula that appears in the running text is called an inline or
in-text formula. It is produced by the \textbf{math} environment,
which can be invoked with the usual
\texttt{{\char'134}begin\,\ldots{\char'134}end} construction or with
the short form \texttt{\$\,\ldots\$}. You can use any of the symbols
and structures, from $\alpha$ to $\omega$, available in
\LaTeX~\cite{Lamport:LaTeX}; this section will simply show a few
examples of in-text equations in context. Notice how this equation:
\begin{math}
\lim_{n\rightarrow \infty}x=0
\end{math},
set here in in-line math style, looks slightly different when
set in display style. (See next section).
\subsection{Display Equations}
A numbered display equation---one set off by vertical space from the
text and centered horizontally---is produced by the \textbf{equation}
environment. An unnumbered display equation is produced by the
\textbf{displaymath} environment.
Again, in either environment, you can use any of the symbols and
structures available in \LaTeX\@; this section will just give a couple
of examples of display equations in context. First, consider the
equation, shown as an inline equation above:
\begin{equation}
\lim_{n\rightarrow \infty}x=0
\end{equation}
Notice how it is formatted somewhat differently in
the \textbf{displaymath}
environment. Now, we'll enter an unnumbered equation:
\begin{displaymath}
\sum_{i=0}^{\infty} x + 1
\end{displaymath}
and follow it with another numbered equation:
\begin{equation}
\sum_{i=0}^{\infty}x_i=\int_{0}^{\pi+2} f
\end{equation}
just to demonstrate \LaTeX's able handling of numbering.
\section{Figures}
The ``\verb|figure|'' environment should be used for figures. One or
more images can be placed within a figure. If your figure contains
third-party material, you must clearly identify it as such, as shown
in the example below.
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{sample-franklin}
\caption{1907 Franklin Model D roadster. Photograph by Harris \&
Ewing, Inc. [Public domain], via Wikimedia
Commons. (\url{https://goo.gl/VLCRBB}).}
\Description{A woman and a girl in white dresses sit in an open car.}
\end{figure}
Your figures should contain a caption which describes the figure to
the reader.
Figure captions are placed {\itshape below} the figure.
Every figure should also have a figure description unless it is purely
decorative. These descriptions convey what's in the image to someone
who cannot see it. They are also used by search engine crawlers for
indexing images, and when images cannot be loaded.
A figure description must be unformatted plain text less than 2000
characters long (including spaces). {\bfseries Figure descriptions
should not repeat the figure caption – their purpose is to capture
important information that is not already provided in the caption or
the main text of the paper.} For figures that convey important and
complex new information, a short text description may not be
adequate. More complex alternative descriptions can be placed in an
appendix and referenced in a short figure description. For example,
provide a data table capturing the information in a bar chart, or a
structured list representing a graph. For additional information
regarding how best to write figure descriptions and why doing this is
so important, please see
\url{https://www.acm.org/publications/taps/describing-figures/}.
\subsection{The ``Teaser Figure''}
A ``teaser figure'' is an image, or set of images in one figure, that
are placed after all author and affiliation information, and before
the body of the article, spanning the page. If you wish to have such a
figure in your article, place the command immediately before the
\verb|\maketitle| command:
\begin{verbatim}
\begin{teaserfigure}
\includegraphics[width=\textwidth]{sampleteaser}
\caption{figure caption}
\Description{figure description}
\end{teaserfigure}
\end{verbatim}
\section{Citations and Bibliographies}
The use of \BibTeX\ for the preparation and formatting of one's
references is strongly recommended. Authors' names should be complete
--- use full first names (``Donald E. Knuth'') not initials
(``D. E. Knuth'') --- and the salient identifying features of a
reference should be included: title, year, volume, number, pages,
article DOI, etc.
The bibliography is included in your source document with these two
commands, placed just before the \verb|\end{document}| command:
\begin{verbatim}
\bibliographystyle{ACM-Reference-Format}
\section{Introduction}
ACM's consolidated article template, introduced in 2017, provides a
consistent \LaTeX\ style for use across ACM publications, and
incorporates accessibility and metadata-extraction functionality
necessary for future Digital Library endeavors. Numerous ACM and
SIG-specific \LaTeX\ templates have been examined, and their unique
features incorporated into this single new template.
If you are new to publishing with ACM, this document is a valuable
guide to the process of preparing your work for publication. If you
have published with ACM before, this document provides insight and
instruction into more recent changes to the article template.
The ``\verb|acmart|'' document class can be used to prepare articles
for any ACM publication --- conference or journal, and for any stage
of publication, from review to final ``camera-ready'' copy, to the
author's own version, with {\itshape very} few changes to the source.
\section{Template Overview}
As noted in the introduction, the ``\verb|acmart|'' document class can
be used to prepare many different kinds of documentation --- a
double-blind initial submission of a full-length technical paper, a
two-page SIGGRAPH Emerging Technologies abstract, a ``camera-ready''
journal article, a SIGCHI Extended Abstract, and more --- all by
selecting the appropriate {\itshape template style} and {\itshape
template parameters}.
This document will explain the major features of the document
class. For further information, the {\itshape \LaTeX\ User's Guide} is
available from
\url{https://www.acm.org/publications/proceedings-template}.
\subsection{Template Styles}
The primary parameter given to the ``\verb|acmart|'' document class is
the {\itshape template style} which corresponds to the kind of publication
or SIG publishing the work. This parameter is enclosed in square
brackets and is a part of the {\verb|documentclass|} command:
\begin{verbatim}
\documentclass[STYLE]{acmart}
\end{verbatim}
Journals use one of three template styles. All but three ACM journals
use the {\verb|acmsmall|} template style:
\begin{itemize}
\item {\texttt{acmsmall}}: The default journal template style.
\item {\texttt{acmlarge}}: Used by JOCCH and TAP.
\item {\texttt{acmtog}}: Used by TOG.
\end{itemize}
The majority of conference proceedings documentation will use the {\verb|acmconf|} template style.
\begin{itemize}
\item {\texttt{acmconf}}: The default proceedings template style.
\item{\texttt{sigchi}}: Used for SIGCHI conference articles.
\item{\texttt{sigchi-a}}: Used for SIGCHI ``Extended Abstract'' articles.
\item{\texttt{sigplan}}: Used for SIGPLAN conference articles.
\end{itemize}
\subsection{Template Parameters}
In addition to specifying the {\itshape template style} to be used in
formatting your work, there are a number of {\itshape template parameters}
which modify some part of the applied template style. A complete list
of these parameters can be found in the {\itshape \LaTeX\ User's Guide.}
Frequently-used parameters, or combinations of parameters, include:
\begin{itemize}
\item {\texttt{anonymous,review}}: Suitable for a ``double-blind''
conference submission. Anonymizes the work and includes line
numbers. Use with the \texttt{\acmSubmissionID} command to print the
submission's unique ID on each page of the work.
\item{\texttt{authorversion}}: Produces a version of the work suitable
for posting by the author.
\item{\texttt{screen}}: Produces colored hyperlinks.
\end{itemize}
This document uses the following string as the first command in the
source file:
\begin{verbatim}
\end{verbatim}
\section{Modifications}
Modifying the template --- including but not limited to: adjusting
margins, typeface sizes, line spacing, paragraph and list definitions,
and the use of the \verb|\vspace| command to manually adjust the
vertical spacing between elements of your work --- is not allowed.
{\bfseries Your document will be returned to you for revision if
modifications are discovered.}
\section{Typefaces}
The ``\verb|acmart|'' document class requires the use of the
``Libertine'' typeface family. Your \TeX\ installation should include
this set of packages. Please do not substitute other typefaces. The
``\verb|lmodern|'' and ``\verb|ltimes|'' packages should not be used,
as they will override the built-in typeface families.
\section{Title Information}
The title of your work should use capital letters appropriately -
\url{https://capitalizemytitle.com/} has useful rules for
capitalization. Use the {\verb|title|} command to define the title of
your work. If your work has a subtitle, define it with the
{\verb|subtitle|} command. Do not insert line breaks in your title.
If your title is lengthy, you must define a short version to be used
in the page headers, to prevent overlapping text. The \verb|title|
command has a ``short title'' parameter:
\begin{verbatim}
\title[short title]{full title}
\end{verbatim}
\section{Authors and Affiliations}
Each author must be defined separately for accurate metadata
identification. As an exception, multiple authors may share one
affiliation. Authors' names should not be abbreviated; use full first
names wherever possible. Include authors' e-mail addresses whenever
possible.
Grouping authors' names or e-mail addresses, or providing an ``e-mail
alias,'' as shown below, is not acceptable:
\begin{verbatim}
\author{Brooke Aster, David Mehldau}
\email{dave,judy,steve@university.edu}
\email{firstname.lastname@phillips.org}
\end{verbatim}
The \verb|authornote| and \verb|authornotemark| commands allow a note
to apply to multiple authors --- for example, if the first two authors
of an article contributed equally to the work.
If your author list is lengthy, you must define a shortened version of
the list of authors to be used in the page headers, to prevent
overlapping text. The following command should be placed just after
the last \verb|\author{}| definition:
\begin{verbatim}
\renewcommand{\shortauthors}{McCartney, et al.}
\end{verbatim}
Omitting this command will force the use of a concatenated list of all
of the authors' names, which may result in overlapping text in the
page headers.
The article template's documentation, available at
\url{https://www.acm.org/publications/proceedings-template}, has a
complete explanation of these commands and tips for their effective
use.
Note that authors' addresses are mandatory for journal articles.
\section{Rights Information}
Authors of any work published by ACM will need to complete a rights
form. Depending on the kind of work, and the rights management choice
made by the author, this may be copyright transfer, permission,
license, or an OA (open access) agreement.
Regardless of the rights management choice, the author will receive a
copy of the completed rights form once it has been submitted. This
form contains \LaTeX\ commands that must be copied into the source
document. When the document source is compiled, these commands and
their parameters add formatted text to several areas of the final
document:
\begin{itemize}
\item the ``ACM Reference Format'' text on the first page.
\item the ``rights management'' text on the first page.
\item the conference information in the page header(s).
\end{itemize}
Rights information is unique to the work; if you are preparing several
works for an event, make sure to use the correct set of commands with
each of the works.
The ACM Reference Format text is required for all articles over one
page in length, and is optional for one-page articles (abstracts).
\section{CCS Concepts and User-Defined Keywords}
Two elements of the ``acmart'' document class provide powerful
taxonomic tools for you to help readers find your work in an online
search.
The ACM Computing Classification System ---
\url{https://www.acm.org/publications/class-2012} --- is a set of
classifiers and concepts that describe the computing
discipline. Authors can select entries from this classification
system, via \url{https://dl.acm.org/ccs/ccs.cfm}, and generate the
commands to be included in the \LaTeX\ source.
User-defined keywords are a comma-separated list of words and phrases
of the authors' choosing, providing a more flexible way of describing
the research being presented.
CCS concepts and user-defined keywords are required for for all
articles over two pages in length, and are optional for one- and
two-page articles (or abstracts).
\section{Sectioning Commands}
Your work should use standard \LaTeX\ sectioning commands:
\verb|section|, \verb|subsection|, \verb|subsubsection|, and
\verb|paragraph|. They should be numbered; do not remove the numbering
from the commands.
Simulating a sectioning command by setting the first word or words of
a paragraph in boldface or italicized text is {\bfseries not allowed.}
\section{Tables}
The ``\verb|acmart|'' document class includes the ``\verb|booktabs|''
package --- \url{https://ctan.org/pkg/booktabs} --- for preparing
high-quality tables.
Table captions are placed {\itshape above} the table.
Because tables cannot be split across pages, the best placement for
them is typically the top of the page nearest their initial cite. To
ensure this proper ``floating'' placement of tables, use the
environment \textbf{table} to enclose the table's contents and the
table caption. The contents of the table itself must go in the
\textbf{tabular} environment, to be aligned properly in rows and
columns, with the desired horizontal and vertical rules. Again,
detailed instructions on \textbf{tabular} material are found in the
\textit{\LaTeX\ User's Guide}.
Immediately following this sentence is the point at which
Table~\ref{tab:freq} is included in the input file; compare the
placement of the table here with the table in the printed output of
this document.
\begin{table}
\caption{Frequency of Special Characters}
\label{tab:freq}
\begin{tabular}{ccl}
\toprule
Non-English or Math&Frequency&Comments\\
\midrule
\O & 1 in 1,000& For Swedish names\\
$\pi$ & 1 in 5& Common in math\\
\$ & 4 in 5 & Used in business\\
$\Psi^2_1$ & 1 in 40,000& Unexplained usage\\
\bottomrule
\end{tabular}
\end{table}
To set a wider table, which takes up the whole width of the page's
live area, use the environment \textbf{table*} to enclose the table's
contents and the table caption. As with a single-column table, this
wide table will ``float'' to a location deemed more
desirable. Immediately following this sentence is the point at which
Table~\ref{tab:commands} is included in the input file; again, it is
instructive to compare the placement of the table here with the table
in the printed output of this document.
\begin{table*}
\caption{Some Typical Commands}
\label{tab:commands}
\begin{tabular}{ccl}
\toprule
Command &A Number & Comments\\
\midrule
\texttt{{\char'134}author} & 100& Author \\
\texttt{{\char'134}table}& 300 & For tables\\
\texttt{{\char'134}table*}& 400& For wider tables\\
\bottomrule
\end{tabular}
\end{table*}
Always use midrule to separate table header rows from data rows, and
use it only for this purpose. This enables assistive technologies to
recognise table headers and support their users in navigating tables
more easily.
\section{Math Equations}
You may want to display math equations in three distinct styles:
inline, numbered or non-numbered display. Each of the three are
discussed in the next sections.
\subsection{Inline (In-text) Equations}
A formula that appears in the running text is called an inline or
in-text formula. It is produced by the \textbf{math} environment,
which can be invoked with the usual
\texttt{{\char'134}begin\,\ldots{\char'134}end} construction or with
the short form \texttt{\$\,\ldots\$}. You can use any of the symbols
and structures, from $\alpha$ to $\omega$, available in
\LaTeX~\cite{Lamport:LaTeX}; this section will simply show a few
examples of in-text equations in context. Notice how this equation:
\begin{math}
\lim_{n\rightarrow \infty}x=0
\end{math},
set here in in-line math style, looks slightly different when
set in display style. (See next section).
\subsection{Display Equations}
A numbered display equation---one set off by vertical space from the
text and centered horizontally---is produced by the \textbf{equation}
environment. An unnumbered display equation is produced by the
\textbf{displaymath} environment.
Again, in either environment, you can use any of the symbols and
structures available in \LaTeX\@; this section will just give a couple
of examples of display equations in context. First, consider the
equation, shown as an inline equation above:
\begin{equation}
\lim_{n\rightarrow \infty}x=0
\end{equation}
Notice how it is formatted somewhat differently in
the \textbf{displaymath}
environment. Now, we'll enter an unnumbered equation:
\begin{displaymath}
\sum_{i=0}^{\infty} x + 1
\end{displaymath}
and follow it with another numbered equation:
\begin{equation}
\sum_{i=0}^{\infty}x_i=\int_{0}^{\pi+2} f
\end{equation}
just to demonstrate \LaTeX's able handling of numbering.
\section{Figures}
The ``\verb|figure|'' environment should be used for figures. One or
more images can be placed within a figure. If your figure contains
third-party material, you must clearly identify it as such, as shown
in the example below.
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{sample-franklin}
\caption{1907 Franklin Model D roadster. Photograph by Harris \&
Ewing, Inc. [Public domain], via Wikimedia
Commons. (\url{https://goo.gl/VLCRBB}).}
\Description{A woman and a girl in white dresses sit in an open car.}
\end{figure}
Your figures should contain a caption which describes the figure to
the reader.
Figure captions are placed {\itshape below} the figure.
Every figure should also have a figure description unless it is purely
decorative. These descriptions convey what's in the image to someone
who cannot see it. They are also used by search engine crawlers for
indexing images, and when images cannot be loaded.
A figure description must be unformatted plain text less than 2000
characters long (including spaces). {\bfseries Figure descriptions
should not repeat the figure caption – their purpose is to capture
important information that is not already provided in the caption or
the main text of the paper.} For figures that convey important and
complex new information, a short text description may not be
adequate. More complex alternative descriptions can be placed in an
appendix and referenced in a short figure description. For example,
provide a data table capturing the information in a bar chart, or a
structured list representing a graph. For additional information
regarding how best to write figure descriptions and why doing this is
so important, please see
\url{https://www.acm.org/publications/taps/describing-figures/}.
\subsection{The ``Teaser Figure''}
A ``teaser figure'' is an image, or set of images in one figure, that
are placed after all author and affiliation information, and before
the body of the article, spanning the page. If you wish to have such a
figure in your article, place the command immediately before the
\verb|\maketitle| command:
\begin{verbatim}
\begin{teaserfigure}
\includegraphics[width=\textwidth]{sampleteaser}
\caption{figure caption}
\Description{figure description}
\end{teaserfigure}
\end{verbatim}
\section{Citations and Bibliographies}
The use of \BibTeX\ for the preparation and formatting of one's
references is strongly recommended. Authors' names should be complete
--- use full first names (``Donald E. Knuth'') not initials
(``D. E. Knuth'') --- and the salient identifying features of a
reference should be included: title, year, volume, number, pages,
article DOI, etc.
Using the BibLaTeX system, the bibliography is included in your source
document with the following command, placed just before the \verb|\end{document}| command:
\begin{verbatim}
\printbibliography
\end{verbatim}
The command \verb|\addbibresource{bibfile}| declares the \BibTeX\ file to use
in the {\bfseries preamble} (before the command
``\verb|\begin{document}|'') of your \LaTeX\ source
where ``\verb|bibfile|'' is the name, \emph{with} the ``\verb|.bib|'' suffix.
Notice that \verb|\addbibresource| takes only one argument: to declare multiple files,
use multiple instances of the command.
Citations and references are numbered by default. A small number of
ACM publications have citations and references formatted in the
``author year'' style; for these exceptions, please pass the option \verb|style=acmauthoryear|
to the \verb|biblatex| package loaded in the {\bfseries preamble} (before the command
``\verb|\begin{document}|'') of your \LaTeX\ source.
Some examples. A paginated journal article \cite{Abril07}, an
enumerated journal article \cite{Cohen07}, a reference to an entire
issue \cite{JCohen96}, a monograph (whole book) \cite{Kosiur01}, a
monograph/whole book in a series (see 2a in spec. document)
\cite{Harel79}, a divisible-book such as an anthology or compilation
\cite{Editor00} followed by the same example, however we only output
the series if the volume number is given \cite{Editor00a} (so
Editor00a's series should NOT be present since it has no vol. no.),
a chapter in a divisible book \cite{Spector90}, a chapter in a
divisible book in a series \cite{Douglass98}, a multi-volume work as
book \cite{Knuth97}, a couple of articles in a proceedings (of a
conference, symposium, workshop for example) (paginated proceedings
article) \cite{Andler79, Hagerup1993}, a proceedings article with
all possible elements \cite{Smith10}, an example of an enumerated
proceedings article \cite{VanGundy07}, an informally published work
\cite{Harel78}, a couple of preprints \cite{Bornmann2019,
AnzarootPBM14}, a doctoral dissertation \cite{Clarkson85}, a
master's thesis: \cite{anisi03}, an online document / world wide web
resource \cite{Thornburg01, Ablamowicz07, Poker06}, a video game
(Case 1) \cite{Obama08} and (Case 2) \cite{Novak03} and \cite{Lee05}
and (Case 3) a patent \cite{JoeScientist001}, work accepted for
publication \cite{rous08}, 'YYYYb'-test for prolific author
\cite{SaeediMEJ10} and \cite{SaeediJETC10}. Other cites might
contain 'duplicate' DOI and URLs (some SIAM articles)
\cite{Kirschmer:2010:AEI:1958016.1958018}. Boris / Barbara Beeton:
multi-volume works as books \cite{MR781536} and \cite{MR781537}. A
couple of citations with DOIs:
\cite{2004:ITE:1009386.1010128,Kirschmer:2010:AEI:1958016.1958018}. Online
citations: \cite{TUGInstmem, Thornburg01, CTANacmart}.
Data Artifacts: \cite{UMassCitations}.
Software project: ~\cite{cgal,delebecque:hal-02090402}. Software Version: ~\cite{gf-tag-sound-repo,}. Software Module: ~\cite{cgal:lp-gi-20a}. Code fragment: ~\cite{simplemapper}.
\section{Acknowledgments}
Identification of funding sources and other support, and thanks to
individuals and groups that assisted in the research and the
preparation of the work should be included in an acknowledgment
section, which is placed just before the reference section in your
document.
This section has a special environment:
\begin{verbatim}
\begin{acks}
...
\end{acks}
\end{verbatim}
so that the information contained therein can be more easily collected
during the article metadata extraction phase, and to ensure
consistency in the spelling of the section heading.
Authors should not prepare this section as a numbered or unnumbered {\verb|\section|}; please use the ``{\verb|acks|}'' environment.
\section{Appendices}
If your work needs an appendix, add it before the
``\verb|\end{document}|'' command at the conclusion of your source
document.
Start the appendix with the ``\verb|appendix|'' command:
\begin{verbatim}
\section{Introduction}
ACM's consolidated article template, introduced in 2017, provides a
consistent \LaTeX\ style for use across ACM publications, and
incorporates accessibility and metadata-extraction functionality
necessary for future Digital Library endeavors. Numerous ACM and
SIG-specific \LaTeX\ templates have been examined, and their unique
features incorporated into this single new template.
If you are new to publishing with ACM, this document is a valuable
guide to the process of preparing your work for publication. If you
have published with ACM before, this document provides insight and
instruction into more recent changes to the article template.
The ``\verb|acmart|'' document class can be used to prepare articles
for any ACM publication --- conference or journal, and for any stage
of publication, from review to final ``camera-ready'' copy, to the
author's own version, with {\itshape very} few changes to the source.
\section{Template Overview}
As noted in the introduction, the ``\verb|acmart|'' document class can
be used to prepare many different kinds of documentation --- a
double-blind initial submission of a full-length technical paper, a
two-page SIGGRAPH Emerging Technologies abstract, a ``camera-ready''
journal article, a SIGCHI Extended Abstract, and more --- all by
selecting the appropriate {\itshape template style} and {\itshape
template parameters}.
This document will explain the major features of the document
class. For further information, the {\itshape \LaTeX\ User's Guide} is
available from
\url{https://www.acm.org/publications/proceedings-template}.
\subsection{Template Styles}
The primary parameter given to the ``\verb|acmart|'' document class is
the {\itshape template style} which corresponds to the kind of publication
or SIG publishing the work. This parameter is enclosed in square
brackets and is a part of the {\verb|documentclass|} command:
\begin{verbatim}
\documentclass[STYLE]{acmart}
\end{verbatim}
Journals use one of three template styles. All but three ACM journals
use the {\verb|acmsmall|} template style:
\begin{itemize}
\item {\texttt{acmsmall}}: The default journal template style.
\item {\texttt{acmlarge}}: Used by JOCCH and TAP.
\item {\texttt{acmtog}}: Used by TOG.
\end{itemize}
The majority of conference proceedings documentation will use the {\verb|acmconf|} template style.
\begin{itemize}
\item {\texttt{acmconf}}: The default proceedings template style.
\item{\texttt{sigchi}}: Used for SIGCHI conference articles.
\item{\texttt{sigchi-a}}: Used for SIGCHI ``Extended Abstract'' articles.
\item{\texttt{sigplan}}: Used for SIGPLAN conference articles.
\end{itemize}
\subsection{Template Parameters}
In addition to specifying the {\itshape template style} to be used in
formatting your work, there are a number of {\itshape template parameters}
which modify some part of the applied template style. A complete list
of these parameters can be found in the {\itshape \LaTeX\ User's Guide.}
Frequently-used parameters, or combinations of parameters, include:
\begin{itemize}
\item {\texttt{anonymous,review}}: Suitable for a ``double-blind''
conference submission. Anonymizes the work and includes line
numbers. Use with the \texttt{\acmSubmissionID} command to print the
submission's unique ID on each page of the work.
\item{\texttt{authorversion}}: Produces a version of the work suitable
for posting by the author.
\item{\texttt{screen}}: Produces colored hyperlinks.
\end{itemize}
This document uses the following string as the first command in the
source file:
\begin{verbatim}
\documentclass[sigconf, language=french,
language=german, language=spanish, language=english]{acmart}
\end{verbatim}
\section{Modifications}
Modifying the template --- including but not limited to: adjusting
margins, typeface sizes, line spacing, paragraph and list definitions,
and the use of the \verb|\vspace| command to manually adjust the
vertical spacing between elements of your work --- is not allowed.
{\bfseries Your document will be returned to you for revision if
modifications are discovered.}
\section{Typefaces}
The ``\verb|acmart|'' document class requires the use of the
``Libertine'' typeface family. Your \TeX\ installation should include
this set of packages. Please do not substitute other typefaces. The
``\verb|lmodern|'' and ``\verb|ltimes|'' packages should not be used,
as they will override the built-in typeface families.
\section{Title Information}
The title of your work should use capital letters appropriately -
\url{https://capitalizemytitle.com/} has useful rules for
capitalization. Use the {\verb|title|} command to define the title of
your work. If your work has a subtitle, define it with the
{\verb|subtitle|} command. Do not insert line breaks in your title.
If your title is lengthy, you must define a short version to be used
in the page headers, to prevent overlapping text. The \verb|title|
command has a ``short title'' parameter:
\begin{verbatim}
\title[short title]{full title}
\end{verbatim}
\section{Authors and Affiliations}
Each author must be defined separately for accurate metadata
identification. As an exception, multiple authors may share one
affiliation. Authors' names should not be abbreviated; use full first
names wherever possible. Include authors' e-mail addresses whenever
possible.
Grouping authors' names or e-mail addresses, or providing an ``e-mail
alias,'' as shown below, is not acceptable:
\begin{verbatim}
\author{Brooke Aster, David Mehldau}
\email{dave,judy,steve@university.edu}
\email{firstname.lastname@phillips.org}
\end{verbatim}
The \verb|authornote| and \verb|authornotemark| commands allow a note
to apply to multiple authors --- for example, if the first two authors
of an article contributed equally to the work.
If your author list is lengthy, you must define a shortened version of
the list of authors to be used in the page headers, to prevent
overlapping text. The following command should be placed just after
the last \verb|\author{}| definition:
\begin{verbatim}
\renewcommand{\shortauthors}{McCartney, et al.}
\end{verbatim}
Omitting this command will force the use of a concatenated list of all
of the authors' names, which may result in overlapping text in the
page headers.
The article template's documentation, available at
\url{https://www.acm.org/publications/proceedings-template}, has a
complete explanation of these commands and tips for their effective
use.
Note that authors' addresses are mandatory for journal articles.
\section{Rights Information}
Authors of any work published by ACM will need to complete a rights
form. Depending on the kind of work, and the rights management choice
made by the author, this may be copyright transfer, permission,
license, or an OA (open access) agreement.
Regardless of the rights management choice, the author will receive a
copy of the completed rights form once it has been submitted. This
form contains \LaTeX\ commands that must be copied into the source
document. When the document source is compiled, these commands and
their parameters add formatted text to several areas of the final
document:
\begin{itemize}
\item the ``ACM Reference Format'' text on the first page.
\item the ``rights management'' text on the first page.
\item the conference information in the page header(s).
\end{itemize}
Rights information is unique to the work; if you are preparing several
works for an event, make sure to use the correct set of commands with
each of the works.
The ACM Reference Format text is required for all articles over one
page in length, and is optional for one-page articles (abstracts).
\section{CCS Concepts and User-Defined Keywords}
Two elements of the ``acmart'' document class provide powerful
taxonomic tools for you to help readers find your work in an online
search.
The ACM Computing Classification System ---
\url{https://www.acm.org/publications/class-2012} --- is a set of
classifiers and concepts that describe the computing
discipline. Authors can select entries from this classification
system, via \url{https://dl.acm.org/ccs/ccs.cfm}, and generate the
commands to be included in the \LaTeX\ source.
User-defined keywords are a comma-separated list of words and phrases
of the authors' choosing, providing a more flexible way of describing
the research being presented.
CCS concepts and user-defined keywords are required for for all
articles over two pages in length, and are optional for one- and
two-page articles (or abstracts).
\section{Sectioning Commands}
Your work should use standard \LaTeX\ sectioning commands:
\verb|section|, \verb|subsection|, \verb|subsubsection|, and
\verb|paragraph|. They should be numbered; do not remove the numbering
from the commands.
Simulating a sectioning command by setting the first word or words of
a paragraph in boldface or italicized text is {\bfseries not allowed.}
\section{Tables}
The ``\verb|acmart|'' document class includes the ``\verb|booktabs|''
package --- \url{https://ctan.org/pkg/booktabs} --- for preparing
high-quality tables.
Table captions are placed {\itshape above} the table.
Because tables cannot be split across pages, the best placement for
them is typically the top of the page nearest their initial cite. To
ensure this proper ``floating'' placement of tables, use the
environment \textbf{table} to enclose the table's contents and the
table caption. The contents of the table itself must go in the
\textbf{tabular} environment, to be aligned properly in rows and
columns, with the desired horizontal and vertical rules. Again,
detailed instructions on \textbf{tabular} material are found in the
\textit{\LaTeX\ User's Guide}.
Immediately following this sentence is the point at which
Table~\ref{tab:freq} is included in the input file; compare the
placement of the table here with the table in the printed output of
this document.
\begin{table}
\caption{Frequency of Special Characters}
\label{tab:freq}
\begin{tabular}{ccl}
\toprule
Non-English or Math&Frequency&Comments\\
\midrule
\O & 1 in 1,000& For Swedish names\\
$\pi$ & 1 in 5& Common in math\\
\$ & 4 in 5 & Used in business\\
$\Psi^2_1$ & 1 in 40,000& Unexplained usage\\
\bottomrule
\end{tabular}
\end{table}
To set a wider table, which takes up the whole width of the page's
live area, use the environment \textbf{table*} to enclose the table's
contents and the table caption. As with a single-column table, this
wide table will ``float'' to a location deemed more
desirable. Immediately following this sentence is the point at which
Table~\ref{tab:commands} is included in the input file; again, it is
instructive to compare the placement of the table here with the table
in the printed output of this document.
\begin{table*}
\caption{Some Typical Commands}
\label{tab:commands}
\begin{tabular}{ccl}
\toprule
Command &A Number & Comments\\
\midrule
\texttt{{\char'134}author} & 100& Author \\
\texttt{{\char'134}table}& 300 & For tables\\
\texttt{{\char'134}table*}& 400& For wider tables\\
\bottomrule
\end{tabular}
\end{table*}
Always use midrule to separate table header rows from data rows, and
use it only for this purpose. This enables assistive technologies to
recognise table headers and support their users in navigating tables
more easily.
\section{Math Equations}
You may want to display math equations in three distinct styles:
inline, numbered or non-numbered display. Each of the three are
discussed in the next sections.
\subsection{Inline (In-text) Equations}
A formula that appears in the running text is called an inline or
in-text formula. It is produced by the \textbf{math} environment,
which can be invoked with the usual
\texttt{{\char'134}begin\,\ldots{\char'134}end} construction or with
the short form \texttt{\$\,\ldots\$}. You can use any of the symbols
and structures, from $\alpha$ to $\omega$, available in
\LaTeX~\cite{Lamport:LaTeX}; this section will simply show a few
examples of in-text equations in context. Notice how this equation:
\begin{math}
\lim_{n\rightarrow \infty}x=0
\end{math},
set here in in-line math style, looks slightly different when
set in display style. (See next section).
\subsection{Display Equations}
A numbered display equation---one set off by vertical space from the
text and centered horizontally---is produced by the \textbf{equation}
environment. An unnumbered display equation is produced by the
\textbf{displaymath} environment.
Again, in either environment, you can use any of the symbols and
structures available in \LaTeX\@; this section will just give a couple
of examples of display equations in context. First, consider the
equation, shown as an inline equation above:
\begin{equation}
\lim_{n\rightarrow \infty}x=0
\end{equation}
Notice how it is formatted somewhat differently in
the \textbf{displaymath}
environment. Now, we'll enter an unnumbered equation:
\begin{displaymath}
\sum_{i=0}^{\infty} x + 1
\end{displaymath}
and follow it with another numbered equation:
\begin{equation}
\sum_{i=0}^{\infty}x_i=\int_{0}^{\pi+2} f
\end{equation}
just to demonstrate \LaTeX's able handling of numbering.
\section{Figures}
The ``\verb|figure|'' environment should be used for figures. One or
more images can be placed within a figure. If your figure contains
third-party material, you must clearly identify it as such, as shown
in the example below.
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{sample-franklin}
\caption{1907 Franklin Model D roadster. Photograph by Harris \&
Ewing, Inc. [Public domain], via Wikimedia
Commons. (\url{https://goo.gl/VLCRBB}).}
\Description{A woman and a girl in white dresses sit in an open car.}
\end{figure}
Your figures should contain a caption which describes the figure to
the reader.
Figure captions are placed {\itshape below} the figure.
Every figure should also have a figure description unless it is purely
decorative. These descriptions convey what's in the image to someone
who cannot see it. They are also used by search engine crawlers for
indexing images, and when images cannot be loaded.
A figure description must be unformatted plain text less than 2000
characters long (including spaces). {\bfseries Figure descriptions
should not repeat the figure caption – their purpose is to capture
important information that is not already provided in the caption or
the main text of the paper.} For figures that convey important and
complex new information, a short text description may not be
adequate. More complex alternative descriptions can be placed in an
appendix and referenced in a short figure description. For example,
provide a data table capturing the information in a bar chart, or a
structured list representing a graph. For additional information
regarding how best to write figure descriptions and why doing this is
so important, please see
\url{https://www.acm.org/publications/taps/describing-figures/}.
\subsection{The ``Teaser Figure''}
A ``teaser figure'' is an image, or set of images in one figure, that
are placed after all author and affiliation information, and before
the body of the article, spanning the page. If you wish to have such a
figure in your article, place the command immediately before the
\verb|\maketitle| command:
\begin{verbatim}
\begin{teaserfigure}
\includegraphics[width=\textwidth]{sampleteaser}
\caption{figure caption}
\Description{figure description}
\end{teaserfigure}
\end{verbatim}
\section{Citations and Bibliographies}
The use of \BibTeX\ for the preparation and formatting of one's
references is strongly recommended. Authors' names should be complete
--- use full first names (``Donald E. Knuth'') not initials
(``D. E. Knuth'') --- and the salient identifying features of a
reference should be included: title, year, volume, number, pages,
article DOI, etc.
The bibliography is included in your source document with these two
commands, placed just before the \verb|\end{document}| command:
\begin{verbatim}
\bibliographystyle{ACM-Reference-Format}
\section{Introduction}
ACM's consolidated article template, introduced in 2017, provides a
consistent \LaTeX\ style for use across ACM publications, and
incorporates accessibility and metadata-extraction functionality
necessary for future Digital Library endeavors. Numerous ACM and
SIG-specific \LaTeX\ templates have been examined, and their unique
features incorporated into this single new template.
If you are new to publishing with ACM, this document is a valuable
guide to the process of preparing your work for publication. If you
have published with ACM before, this document provides insight and
instruction into more recent changes to the article template.
The ``\verb|acmart|'' document class can be used to prepare articles
for any ACM publication --- conference or journal, and for any stage
of publication, from review to final ``camera-ready'' copy, to the
author's own version, with {\itshape very} few changes to the source.
\section{Template Overview}
As noted in the introduction, the ``\verb|acmart|'' document class can
be used to prepare many different kinds of documentation --- a
double-blind initial submission of a full-length technical paper, a
two-page SIGGRAPH Emerging Technologies abstract, a ``camera-ready''
journal article, a SIGCHI Extended Abstract, and more --- all by
selecting the appropriate {\itshape template style} and {\itshape
template parameters}.
This document will explain the major features of the document
class. For further information, the {\itshape \LaTeX\ User's Guide} is
available from
\url{https://www.acm.org/publications/proceedings-template}.
\subsection{Template Styles}
The primary parameter given to the ``\verb|acmart|'' document class is
the {\itshape template style} which corresponds to the kind of publication
or SIG publishing the work. This parameter is enclosed in square
brackets and is a part of the {\verb|documentclass|} command:
\begin{verbatim}
\documentclass[STYLE]{acmart}
\end{verbatim}
Journals use one of three template styles. All but three ACM journals
use the {\verb|acmsmall|} template style:
\begin{itemize}
\item {\verb|acmsmall|}: The default journal template style.
\item {\verb|acmlarge|}: Used by JOCCH and TAP.
\item {\verb|acmtog|}: Used by TOG.
\end{itemize}
The majority of conference proceedings documentation will use the {\verb|acmconf|} template style.
\begin{itemize}
\item {\verb|acmconf|}: The default proceedings template style.
\item{\verb|sigchi|}: Used for SIGCHI conference articles.
\item{\verb|sigchi-a|}: Used for SIGCHI ``Extended Abstract'' articles.
\item{\verb|sigplan|}: Used for SIGPLAN conference articles.
\end{itemize}
\subsection{Template Parameters}
In addition to specifying the {\itshape template style} to be used in
formatting your work, there are a number of {\itshape template parameters}
which modify some part of the applied template style. A complete list
of these parameters can be found in the {\itshape \LaTeX\ User's Guide.}
Frequently-used parameters, or combinations of parameters, include:
\begin{itemize}
\item {\verb|anonymous,review|}: Suitable for a ``double-blind''
conference submission. Anonymizes the work and includes line
numbers. Use with the \verb|\acmSubmissionID| command to print the
submission's unique ID on each page of the work.
\item{\verb|authorversion|}: Produces a version of the work suitable
for posting by the author.
\item{\verb|screen|}: Produces colored hyperlinks.
\end{itemize}
This document uses the following string as the first command in the
source file:
\begin{verbatim}
\documentclass[sigconf]{acmart}
\end{verbatim}
\section{Modifications}
Modifying the template --- including but not limited to: adjusting
margins, typeface sizes, line spacing, paragraph and list definitions,
and the use of the \verb|\vspace| command to manually adjust the
vertical spacing between elements of your work --- is not allowed.
{\bfseries Your document will be returned to you for revision if
modifications are discovered.}
\section{Typefaces}
The ``\verb|acmart|'' document class requires the use of the
``Libertine'' typeface family. Your \TeX\ installation should include
this set of packages. Please do not substitute other typefaces. The
``\verb|lmodern|'' and ``\verb|ltimes|'' packages should not be used,
as they will override the built-in typeface families.
\section{Title Information}
The title of your work should use capital letters appropriately -
\url{https://capitalizemytitle.com/} has useful rules for
capitalization. Use the {\verb|title|} command to define the title of
your work. If your work has a subtitle, define it with the
{\verb|subtitle|} command. Do not insert line breaks in your title.
If your title is lengthy, you must define a short version to be used
in the page headers, to prevent overlapping text. The \verb|title|
command has a ``short title'' parameter:
\begin{verbatim}
\title[short title]{full title}
\end{verbatim}
\section{Authors and Affiliations}
Each author must be defined separately for accurate metadata
identification. Multiple authors may share one affiliation. Authors'
names should not be abbreviated; use full first names wherever
possible. Include authors' e-mail addresses whenever possible.
Grouping authors' names or e-mail addresses, or providing an ``e-mail
alias,'' as shown below, is not acceptable:
\begin{verbatim}
\author{Brooke Aster, David Mehldau}
\email{dave,judy,steve@university.edu}
\email{firstname.lastname@phillips.org}
\end{verbatim}
The \verb|authornote| and \verb|authornotemark| commands allow a note
to apply to multiple authors --- for example, if the first two authors
of an article contributed equally to the work.
If your author list is lengthy, you must define a shortened version of
the list of authors to be used in the page headers, to prevent
overlapping text. The following command should be placed just after
the last \verb|\author{}| definition:
\begin{verbatim}
\renewcommand{\shortauthors}{McCartney, et al.}
\end{verbatim}
Omitting this command will force the use of a concatenated list of all
of the authors' names, which may result in overlapping text in the
page headers.
The article template's documentation, available at
\url{https://www.acm.org/publications/proceedings-template}, has a
complete explanation of these commands and tips for their effective
use.
Note that authors' addresses are mandatory for journal articles.
\section{Rights Information}
Authors of any work published by ACM will need to complete a rights
form. Depending on the kind of work, and the rights management choice
made by the author, this may be copyright transfer, permission,
license, or an OA (open access) agreement.
Regardless of the rights management choice, the author will receive a
copy of the completed rights form once it has been submitted. This
form contains \LaTeX\ commands that must be copied into the source
document. When the document source is compiled, these commands and
their parameters add formatted text to several areas of the final
document:
\begin{itemize}
\item the ``ACM Reference Format'' text on the first page.
\item the ``rights management'' text on the first page.
\item the conference information in the page header(s).
\end{itemize}
Rights information is unique to the work; if you are preparing several
works for an event, make sure to use the correct set of commands with
each of the works.
The ACM Reference Format text is required for all articles over one
page in length, and is optional for one-page articles (abstracts).
\section{CCS Concepts and User-Defined Keywords}
Two elements of the ``acmart'' document class provide powerful
taxonomic tools for you to help readers find your work in an online
search.
The ACM Computing Classification System ---
\url{https://www.acm.org/publications/class-2012} --- is a set of
classifiers and concepts that describe the computing
discipline. Authors can select entries from this classification
system, via \url{https://dl.acm.org/ccs/ccs.cfm}, and generate the
commands to be included in the \LaTeX\ source.
User-defined keywords are a comma-separated list of words and phrases
of the authors' choosing, providing a more flexible way of describing
the research being presented.
CCS concepts and user-defined keywords are required for for all
articles over two pages in length, and are optional for one- and
two-page articles (or abstracts).
\section{Sectioning Commands}
Your work should use standard \LaTeX\ sectioning commands:
\verb|section|, \verb|subsection|, \verb|subsubsection|, and
\verb|paragraph|. They should be numbered; do not remove the numbering
from the commands.
Simulating a sectioning command by setting the first word or words of
a paragraph in boldface or italicized text is {\bfseries not allowed.}
\section{Tables}
The ``\verb|acmart|'' document class includes the ``\verb|booktabs|''
package --- \url{https://ctan.org/pkg/booktabs} --- for preparing
high-quality tables.
Table captions are placed {\itshape above} the table.
Because tables cannot be split across pages, the best placement for
them is typically the top of the page nearest their initial cite. To
ensure this proper ``floating'' placement of tables, use the
environment \textbf{table} to enclose the table's contents and the
table caption. The contents of the table itself must go in the
\textbf{tabular} environment, to be aligned properly in rows and
columns, with the desired horizontal and vertical rules. Again,
detailed instructions on \textbf{tabular} material are found in the
\textit{\LaTeX\ User's Guide}.
Immediately following this sentence is the point at which
Table~\ref{tab:freq} is included in the input file; compare the
placement of the table here with the table in the printed output of
this document.
\begin{table}
\caption{Frequency of Special Characters}
\label{tab:freq}
\begin{tabular}{ccl}
\toprule
Non-English or Math&Frequency&Comments\\
\midrule
\O & 1 in 1,000& For Swedish names\\
$\pi$ & 1 in 5& Common in math\\
\$ & 4 in 5 & Used in business\\
$\Psi^2_1$ & 1 in 40,000& Unexplained usage\\
\bottomrule
\end{tabular}
\end{table}
To set a wider table, which takes up the whole width of the page's
live area, use the environment \textbf{table*} to enclose the table's
contents and the table caption. As with a single-column table, this
wide table will ``float'' to a location deemed more
desirable. Immediately following this sentence is the point at which
Table~\ref{tab:commands} is included in the input file; again, it is
instructive to compare the placement of the table here with the table
in the printed output of this document.
\begin{table*}
\caption{Some Typical Commands}
\label{tab:commands}
\begin{tabular}{ccl}
\toprule
Command &A Number & Comments\\
\midrule
\texttt{{\char'134}author} & 100& Author \\
\texttt{{\char'134}table}& 300 & For tables\\
\texttt{{\char'134}table*}& 400& For wider tables\\
\bottomrule
\end{tabular}
\end{table*}
Always use midrule to separate table header rows from data rows, and
use it only for this purpose. This enables assistive technologies to
recognise table headers and support their users in navigating tables
more easily.
\section{Math Equations}
You may want to display math equations in three distinct styles:
inline, numbered or non-numbered display. Each of the three are
discussed in the next sections.
\subsection{Inline (In-text) Equations}
A formula that appears in the running text is called an inline or
in-text formula. It is produced by the \textbf{math} environment,
which can be invoked with the usual
\texttt{{\char'134}begin\,\ldots{\char'134}end} construction or with
the short form \texttt{\$\,\ldots\$}. You can use any of the symbols
and structures, from $\alpha$ to $\omega$, available in
\LaTeX~\cite{Lamport:LaTeX}; this section will simply show a few
examples of in-text equations in context. Notice how this equation:
\begin{math}
\lim_{n\rightarrow \infty}x=0
\end{math},
set here in in-line math style, looks slightly different when
set in display style. (See next section).
\subsection{Display Equations}
A numbered display equation---one set off by vertical space from the
text and centered horizontally---is produced by the \textbf{equation}
environment. An unnumbered display equation is produced by the
\textbf{displaymath} environment.
Again, in either environment, you can use any of the symbols and
structures available in \LaTeX\@; this section will just give a couple
of examples of display equations in context. First, consider the
equation, shown as an inline equation above:
\begin{equation}
\lim_{n\rightarrow \infty}x=0
\end{equation}
Notice how it is formatted somewhat differently in
the \textbf{displaymath}
environment. Now, we'll enter an unnumbered equation:
\begin{displaymath}
\sum_{i=0}^{\infty} x + 1
\end{displaymath}
and follow it with another numbered equation:
\begin{equation}
\sum_{i=0}^{\infty}x_i=\int_{0}^{\pi+2} f
\end{equation}
just to demonstrate \LaTeX's able handling of numbering.
\section{Figures}
The ``\verb|figure|'' environment should be used for figures. One or
more images can be placed within a figure. If your figure contains
third-party material, you must clearly identify it as such, as shown
in the example below.
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{sample-franklin}
\caption{1907 Franklin Model D roadster. Photograph by Harris \&
Ewing, Inc. [Public domain], via Wikimedia
Commons. (\url{https://goo.gl/VLCRBB}).}
\Description{A woman and a girl in white dresses sit in an open car.}
\end{figure}
Your figures should contain a caption which describes the figure to
the reader.
Figure captions are placed {\itshape below} the figure.
Every figure should also have a figure description unless it is purely
decorative. These descriptions convey what's in the image to someone
who cannot see it. They are also used by search engine crawlers for
indexing images, and when images cannot be loaded.
A figure description must be unformatted plain text less than 2000
characters long (including spaces). {\bfseries Figure descriptions
should not repeat the figure caption – their purpose is to capture
important information that is not already provided in the caption or
the main text of the paper.} For figures that convey important and
complex new information, a short text description may not be
adequate. More complex alternative descriptions can be placed in an
appendix and referenced in a short figure description. For example,
provide a data table capturing the information in a bar chart, or a
structured list representing a graph. For additional information
regarding how best to write figure descriptions and why doing this is
so important, please see
\url{https://www.acm.org/publications/taps/describing-figures/}.
\subsection{The ``Teaser Figure''}
A ``teaser figure'' is an image, or set of images in one figure, that
are placed after all author and affiliation information, and before
the body of the article, spanning the page. If you wish to have such a
figure in your article, place the command immediately before the
\verb|\maketitle| command:
\begin{verbatim}
\begin{teaserfigure}
\includegraphics[width=\textwidth]{sampleteaser}
\caption{figure caption}
\Description{figure description}
\end{teaserfigure}
\end{verbatim}
\section{Citations and Bibliographies}
The use of \BibTeX\ for the preparation and formatting of one's
references is strongly recommended. Authors' names should be complete
--- use full first names (``Donald E. Knuth'') not initials
(``D. E. Knuth'') --- and the salient identifying features of a
reference should be included: title, year, volume, number, pages,
article DOI, etc.
The bibliography is included in your source document with these two
commands, placed just before the \verb|\end{document}| command:
\begin{verbatim}
\bibliographystyle{ACM-Reference-Format}
\section{Introduction}
ACM's consolidated article template, introduced in 2017, provides a
consistent \LaTeX\ style for use across ACM publications, and
incorporates accessibility and metadata-extraction functionality
necessary for future Digital Library endeavors. Numerous ACM and
SIG-specific \LaTeX\ templates have been examined, and their unique
features incorporated into this single new template.
If you are new to publishing with ACM, this document is a valuable
guide to the process of preparing your work for publication. If you
have published with ACM before, this document provides insight and
instruction into more recent changes to the article template.
The ``\verb|acmart|'' document class can be used to prepare articles
for any ACM publication --- conference or journal, and for any stage
of publication, from review to final ``camera-ready'' copy, to the
author's own version, with {\itshape very} few changes to the source.
\section{Template Overview}
As noted in the introduction, the ``\verb|acmart|'' document class can
be used to prepare many different kinds of documentation --- a
double-blind initial submission of a full-length technical paper, a
two-page SIGGRAPH Emerging Technologies abstract, a ``camera-ready''
journal article, a SIGCHI Extended Abstract, and more --- all by
selecting the appropriate {\itshape template style} and {\itshape
template parameters}.
This document will explain the major features of the document
class. For further information, the {\itshape \LaTeX\ User's Guide} is
available from
\url{https://www.acm.org/publications/proceedings-template}.
\subsection{Template Styles}
The primary parameter given to the ``\verb|acmart|'' document class is
the {\itshape template style} which corresponds to the kind of publication
or SIG publishing the work. This parameter is enclosed in square
brackets and is a part of the {\verb|documentclass|} command:
\begin{verbatim}
\documentclass[STYLE]{acmart}
\end{verbatim}
Journals use one of three template styles. All but three ACM journals
use the {\verb|acmsmall|} template style:
\begin{itemize}
\item {\verb|acmsmall|}: The default journal template style.
\item {\verb|acmlarge|}: Used by JOCCH and TAP.
\item {\verb|acmtog|}: Used by TOG.
\end{itemize}
The majority of conference proceedings documentation will use the {\verb|acmconf|} template style.
\begin{itemize}
\item {\verb|acmconf|}: The default proceedings template style.
\item{\verb|sigchi|}: Used for SIGCHI conference articles.
\item{\verb|sigchi-a|}: Used for SIGCHI ``Extended Abstract'' articles.
\item{\verb|sigplan|}: Used for SIGPLAN conference articles.
\end{itemize}
\subsection{Template Parameters}
In addition to specifying the {\itshape template style} to be used in
formatting your work, there are a number of {\itshape template parameters}
which modify some part of the applied template style. A complete list
of these parameters can be found in the {\itshape \LaTeX\ User's Guide.}
Frequently-used parameters, or combinations of parameters, include:
\begin{itemize}
\item {\verb|anonymous,review|}: Suitable for a ``double-blind''
conference submission. Anonymizes the work and includes line
numbers. Use with the \verb|\acmSubmissionID| command to print the
submission's unique ID on each page of the work.
\item{\verb|authorversion|}: Produces a version of the work suitable
for posting by the author.
\item{\verb|screen|}: Produces colored hyperlinks.
\end{itemize}
This document uses the following string as the first command in the
source file:
\begin{verbatim}
\documentclass[sigconf]{acmart}
\end{verbatim}
\section{Modifications}
Modifying the template --- including but not limited to: adjusting
margins, typeface sizes, line spacing, paragraph and list definitions,
and the use of the \verb|\vspace| command to manually adjust the
vertical spacing between elements of your work --- is not allowed.
{\bfseries Your document will be returned to you for revision if
modifications are discovered.}
\section{Typefaces}
The ``\verb|acmart|'' document class requires the use of the
``Libertine'' typeface family. Your \TeX\ installation should include
this set of packages. Please do not substitute other typefaces. The
``\verb|lmodern|'' and ``\verb|ltimes|'' packages should not be used,
as they will override the built-in typeface families.
\section{Title Information}
The title of your work should use capital letters appropriately -
\url{https://capitalizemytitle.com/} has useful rules for
capitalization. Use the {\verb|title|} command to define the title of
your work. If your work has a subtitle, define it with the
{\verb|subtitle|} command. Do not insert line breaks in your title.
If your title is lengthy, you must define a short version to be used
in the page headers, to prevent overlapping text. The \verb|title|
command has a ``short title'' parameter:
\begin{verbatim}
\title[short title]{full title}
\end{verbatim}
\section{Authors and Affiliations}
Each author must be defined separately for accurate metadata
identification. Multiple authors may share one affiliation. Authors'
names should not be abbreviated; use full first names wherever
possible. Include authors' e-mail addresses whenever possible.
Grouping authors' names or e-mail addresses, or providing an ``e-mail
alias,'' as shown below, is not acceptable:
\begin{verbatim}
\author{Brooke Aster, David Mehldau}
\email{dave,judy,steve@university.edu}
\email{firstname.lastname@phillips.org}
\end{verbatim}
The \verb|authornote| and \verb|authornotemark| commands allow a note
to apply to multiple authors --- for example, if the first two authors
of an article contributed equally to the work.
If your author list is lengthy, you must define a shortened version of
the list of authors to be used in the page headers, to prevent
overlapping text. The following command should be placed just after
the last \verb|\author{}| definition:
\begin{verbatim}
\renewcommand{\shortauthors}{McCartney, et al.}
\end{verbatim}
Omitting this command will force the use of a concatenated list of all
of the authors' names, which may result in overlapping text in the
page headers.
The article template's documentation, available at
\url{https://www.acm.org/publications/proceedings-template}, has a
complete explanation of these commands and tips for their effective
use.
Note that authors' addresses are mandatory for journal articles.
\section{Rights Information}
Authors of any work published by ACM will need to complete a rights
form. Depending on the kind of work, and the rights management choice
made by the author, this may be copyright transfer, permission,
license, or an OA (open access) agreement.
Regardless of the rights management choice, the author will receive a
copy of the completed rights form once it has been submitted. This
form contains \LaTeX\ commands that must be copied into the source
document. When the document source is compiled, these commands and
their parameters add formatted text to several areas of the final
document:
\begin{itemize}
\item the ``ACM Reference Format'' text on the first page.
\item the ``rights management'' text on the first page.
\item the conference information in the page header(s).
\end{itemize}
Rights information is unique to the work; if you are preparing several
works for an event, make sure to use the correct set of commands with
each of the works.
The ACM Reference Format text is required for all articles over one
page in length, and is optional for one-page articles (abstracts).
\section{CCS Concepts and User-Defined Keywords}
Two elements of the ``acmart'' document class provide powerful
taxonomic tools for you to help readers find your work in an online
search.
The ACM Computing Classification System ---
\url{https://www.acm.org/publications/class-2012} --- is a set of
classifiers and concepts that describe the computing
discipline. Authors can select entries from this classification
system, via \url{https://dl.acm.org/ccs/ccs.cfm}, and generate the
commands to be included in the \LaTeX\ source.
User-defined keywords are a comma-separated list of words and phrases
of the authors' choosing, providing a more flexible way of describing
the research being presented.
CCS concepts and user-defined keywords are required for for all
articles over two pages in length, and are optional for one- and
two-page articles (or abstracts).
\section{Sectioning Commands}
Your work should use standard \LaTeX\ sectioning commands:
\verb|section|, \verb|subsection|, \verb|subsubsection|, and
\verb|paragraph|. They should be numbered; do not remove the numbering
from the commands.
Simulating a sectioning command by setting the first word or words of
a paragraph in boldface or italicized text is {\bfseries not allowed.}
\section{Tables}
The ``\verb|acmart|'' document class includes the ``\verb|booktabs|''
package --- \url{https://ctan.org/pkg/booktabs} --- for preparing
high-quality tables.
Table captions are placed {\itshape above} the table.
Because tables cannot be split across pages, the best placement for
them is typically the top of the page nearest their initial cite. To
ensure this proper ``floating'' placement of tables, use the
environment \textbf{table} to enclose the table's contents and the
table caption. The contents of the table itself must go in the
\textbf{tabular} environment, to be aligned properly in rows and
columns, with the desired horizontal and vertical rules. Again,
detailed instructions on \textbf{tabular} material are found in the
\textit{\LaTeX\ User's Guide}.
Immediately following this sentence is the point at which
Table~\ref{tab:freq} is included in the input file; compare the
placement of the table here with the table in the printed output of
this document.
\begin{table}
\caption{Frequency of Special Characters}
\label{tab:freq}
\begin{tabular}{ccl}
\toprule
Non-English or Math&Frequency&Comments\\
\midrule
\O & 1 in 1,000& For Swedish names\\
$\pi$ & 1 in 5& Common in math\\
\$ & 4 in 5 & Used in business\\
$\Psi^2_1$ & 1 in 40,000& Unexplained usage\\
\bottomrule
\end{tabular}
\end{table}
To set a wider table, which takes up the whole width of the page's
live area, use the environment \textbf{table*} to enclose the table's
contents and the table caption. As with a single-column table, this
wide table will ``float'' to a location deemed more
desirable. Immediately following this sentence is the point at which
Table~\ref{tab:commands} is included in the input file; again, it is
instructive to compare the placement of the table here with the table
in the printed output of this document.
\begin{table*}
\caption{Some Typical Commands}
\label{tab:commands}
\begin{tabular}{ccl}
\toprule
Command &A Number & Comments\\
\midrule
\texttt{{\char'134}author} & 100& Author \\
\texttt{{\char'134}table}& 300 & For tables\\
\texttt{{\char'134}table*}& 400& For wider tables\\
\bottomrule
\end{tabular}
\end{table*}
Always use midrule to separate table header rows from data rows, and
use it only for this purpose. This enables assistive technologies to
recognise table headers and support their users in navigating tables
more easily.
\section{Math Equations}
You may want to display math equations in three distinct styles:
inline, numbered or non-numbered display. Each of the three are
discussed in the next sections.
\subsection{Inline (In-text) Equations}
A formula that appears in the running text is called an inline or
in-text formula. It is produced by the \textbf{math} environment,
which can be invoked with the usual
\texttt{{\char'134}begin\,\ldots{\char'134}end} construction or with
the short form \texttt{\$\,\ldots\$}. You can use any of the symbols
and structures, from $\alpha$ to $\omega$, available in
\LaTeX~\cite{Lamport:LaTeX}; this section will simply show a few
examples of in-text equations in context. Notice how this equation:
\begin{math}
\lim_{n\rightarrow \infty}x=0
\end{math},
set here in in-line math style, looks slightly different when
set in display style. (See next section).
\subsection{Display Equations}
A numbered display equation---one set off by vertical space from the
text and centered horizontally---is produced by the \textbf{equation}
environment. An unnumbered display equation is produced by the
\textbf{displaymath} environment.
Again, in either environment, you can use any of the symbols and
structures available in \LaTeX\@; this section will just give a couple
of examples of display equations in context. First, consider the
equation, shown as an inline equation above:
\begin{equation}
\lim_{n\rightarrow \infty}x=0
\end{equation}
Notice how it is formatted somewhat differently in
the \textbf{displaymath}
environment. Now, we'll enter an unnumbered equation:
\begin{displaymath}
\sum_{i=0}^{\infty} x + 1
\end{displaymath}
and follow it with another numbered equation:
\begin{equation}
\sum_{i=0}^{\infty}x_i=\int_{0}^{\pi+2} f
\end{equation}
just to demonstrate \LaTeX's able handling of numbering.
\section{Figures}
The ``\verb|figure|'' environment should be used for figures. One or
more images can be placed within a figure. If your figure contains
third-party material, you must clearly identify it as such, as shown
in the example below.
\begin{figure}[h]
\centering
\includegraphics[width=\linewidth]{sample-franklin}
\caption{1907 Franklin Model D roadster. Photograph by Harris \&
Ewing, Inc. [Public domain], via Wikimedia
Commons. (\url{https://goo.gl/VLCRBB}).}
\Description{A woman and a girl in white dresses sit in an open car.}
\end{figure}
Your figures should contain a caption which describes the figure to
the reader.
Figure captions are placed {\itshape below} the figure.
Every figure should also have a figure description unless it is purely
decorative. These descriptions convey what's in the image to someone
who cannot see it. They are also used by search engine crawlers for
indexing images, and when images cannot be loaded.
A figure description must be unformatted plain text less than 2000
characters long (including spaces). {\bfseries Figure descriptions
should not repeat the figure caption – their purpose is to capture
important information that is not already provided in the caption or
the main text of the paper.} For figures that convey important and
complex new information, a short text description may not be
adequate. More complex alternative descriptions can be placed in an
appendix and referenced in a short figure description. For example,
provide a data table capturing the information in a bar chart, or a
structured list representing a graph. For additional information
regarding how best to write figure descriptions and why doing this is
so important, please see
\url{https://www.acm.org/publications/taps/describing-figures/}.
\subsection{The ``Teaser Figure''}
A ``teaser figure'' is an image, or set of images in one figure, that
are placed after all author and affiliation information, and before
the body of the article, spanning the page. If you wish to have such a
figure in your article, place the command immediately before the
\verb|\maketitle| command:
\begin{verbatim}
\begin{teaserfigure}
\includegraphics[width=\textwidth]{sampleteaser}
\caption{figure caption}
\Description{figure description}
\end{teaserfigure}
\end{verbatim}
\section{Citations and Bibliographies}
The use of \BibTeX\ for the preparation and formatting of one's
references is strongly recommended. Authors' names should be complete
--- use full first names (``Donald E. Knuth'') not initials
(``D. E. Knuth'') --- and the salient identifying features of a
reference should be included: title, year, volume, number, pages,
article DOI, etc.
The bibliography is included in your source document with these two
commands, placed just before the \verb|\end{document}| command:
\begin{verbatim}
\bibliographystyle{ACM-Reference-Format}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 9,822 |
Q: Why am I getting 404s when trying to load Angular2 files with Express So I am used to using express and so I am trying to port the instructions found here to the express template.
I am using the newest express generator, then I added the following to my package.json.
"dependencies": {
"angular2": "2.0.0-beta.0",
"systemjs": "0.19.6",
"es6-promise": "^3.0.2",
"es6-shim": "^0.33.3",
"reflect-metadata": "0.1.2",
"rxjs": "5.0.0-beta.0",
"zone.js": "0.5.10",
"body-parser": "~1.13.2",
"cookie-parser": "~1.3.5",
"debug": "~2.2.0",
"express": "~4.13.1",
"jade": "~1.11.0",
"morgan": "~1.6.1",
"serve-favicon": "~2.3.0",
"stylus": "0.42.3"
}
Then in my layout.jade file I add the following
....
script(src="/ng2/angular2-polyfills.js")
script(src="/systemjs/system.src.js")
script(src="/rxjs/Rx.js")
script(src="/ng2/angular2.dev.js")
And in my app.js I add the following....
app.use('/rxjs', express.static(path.join(__dirname + 'node_modules/rxjs/bundles')));
app.use('/systemjs', express.static(__dirname + 'node_modules/systemjs/dist'));
app.use('/ng2', express.static(__dirname + '/node_modules/angular2/bundles/'));
But I still get 404s on the js files can someone see what I am missing?
Another acceptable answer is how do I copy files from the node_modules directory to the public directory.
A: Not sure exactly what fixed it, I think it was caching something weird. Here is my final code....
app.use('/angular2', express.static(path.join(__dirname, 'node_modules/angular2/bundles/')));
app.use('/rxjs', express.static(path.join(__dirname, 'node_modules/rxjs/bundles/')));
app.use('/systemjs', express.static(path.join(__dirname, 'node_modules/systemjs/dist/')));
...
script(src="/angular2/angular2-polyfills.js")
script(src="/systemjs/system.src.js")
script(src="/rxjs/Rx.js")
script(src="/angular2/angular2.dev.js")
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 5,173 |
package com.dmsg.data;
import com.dmsg.message.vo.MessageBase;
/**
* Created by cjl on 2016/7/28.
*/
public class OfflineMessage {
private long msgId;
private boolean flag;
private int retrySize = 0;
private MessageBase message;
private String username;
public MessageBase getMessage() {
return message;
}
public void setMessage(MessageBase message) {
this.message = message;
}
public long getMsgId() {
return msgId;
}
public void setMsgId(long msgId) {
this.msgId = msgId;
}
public boolean isFlag() {
return flag;
}
public void setFlag(boolean flag) {
this.flag = flag;
}
public int getRetrySize() {
return retrySize;
}
public void retry() {
retrySize++;
}
public String getUsername() {
return username;
}
public void setUsername(String username) {
this.username = username;
}
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 4,194 |
Improvements in public health, education and medicine mean that our lives are much longer than at any point in human history. Thanks to studies of volunteers from the eastern region, we may be able to spend these extra years living independently and in good health.
It's 9:50am and a group of women are gathering upstairs at Burwell Sports Centre in Cambridgeshire. It's a cold winter's day and the chairs are scattered with thick coats and bags; the women are drinking tea, chatting, occasionally exploding into laughter. They're here for the over-55s tai chi class.
Pat and Jane are among an estimated 12 million people aged over 65 living in the UK, a figure that's expected to exceed 17 million by 2035, accounting for almost one in four people.
As we age, our bodies become weaker and more prone to disease: rates of diabetes, heart disease, cancer and dementia increase dramatically. Often an individual will be living with several conditions. This places an increasing burden on our health services, which have already been described as at "breaking point".
What if we were able to live longer while still maintaining good health and our independence? This is the ambition of the 'Ageing Society' Grand Challenge, part of the UK government's Industrial Strategy, which aims to "ensure that people can enjoy at least five extra healthy, independent years of life by 2035".
One approach to achieving the goal of the Grand Challenge is to encourage people to adopt healthier lifestyles – better diet, more exercise, keeping active in old age, as Pat and Jane do, for example – and thereby reduce their risk of disease. A second complementary approach is to identify those who are at highest risk of disease or have undiagnosed conditions and to intervene, through innovative diagnostic tools and treatments.
But how do we identify people who have undiagnosed conditions, particularly if they are yet to show symptoms. Could the answer lie in screening programmes?
To understand whether screening is worthwhile, he says, you need to demonstrate that early treatment is better than late treatment, and you need to quantify the associated harms. It turns out that few tests meet the criteria set down by the National Screening Committee when it is considering recommending the establishment of a programme.
One way to reduce potential harms is to stratify people in terms of their risk profile and target screening at those with highest risk. Working with cohorts in Ely, in Cambridgeshire, and Norfolk, Griffin showed that it is possible to calculate an individual's 'risk scores' for type 2 diabetes and cardiovascular disease based on factors such as age, weight and family history. Screening targeted at those with the highest scores is effective at identifying – and potentially preventing – new cases of diabetes and cardiovascular disease, with potential cost savings. These findings contributed to this approach being rolled out across the UK in the NHS Health Check programme.
Griffin is working with Professor Jonathan Mant to trial whether systematically screening people for atrial fibrillation – an irregular heartbeat – can cost-effectively identify those individuals who are affected. One in 10 people over the age of 65 will have this condition, which can be difficult to detect but is responsible for a third of all strokes and has been linked with an increased risk of heart attack and dementia.
The feasibility study is under way in the eastern region, with screening taking place at home: participants use a small, portable heart monitor twice a day to take recordings that are sent automatically for analysis.
There is already a huge market for 'wearable' technology to monitor health, facilitated by the ubiquity of smartphones, the speed at which data is processed and, increasingly, advances in AI. Over 300,000 health-related mobile apps are now available, covering almost every conceivable condition.
If we can overcome the barriers, the potential is huge, he says: gadgets to monitor heart rate, glucose levels and the amount of oxygen in our blood; gadgets to monitor an elderly parent remotely to ensure they don't forget to take their medication and to watch out for – and even predict – falls. Augmented and virtual reality might help alleviate symptoms of dementia, depression or phobias.
Lowe and colleague Dr Gita Khalili Moghaddam, for instance, are working on a wearable technology for monitoring diabetes: contact lenses that monitor tear fluid as a surrogate for blood sugar. The lenses contain holographic sensors that change in response to glucose levels, the idea being that patients take a picture of the lens in situ to tell them how high their glucose levels are using a smartphone app.
Mascolo is working with Dr Dennis Chan, a neuroscientist and consultant at Cambridge's Addenbrooke's Hospital, on apps that could help monitor the progression of dementia. One of these will look for changes in how we navigate around our environment, as problems with spatial navigation are among the first signs of dementia. Other apps will look for changes in sleeping patterns, or in memory and cognition.
There is a danger, however, that new technologies may further exacerbate inequalities between those who have access to them and those who do not. The government's Grand Challenge acknowledges this problem, stressing the need to narrow "the gap between the experience of the richest and poorest".
Professor Carol Brayne, Director of the Cambridge Institute of Public Health, welcomes the Grand Challenge as potentially offering a "win–win" situation to improve health in later life while helping stimulate the economy but, like her colleague Griffin, she warns against relying entirely on simple solutions to complex problems.
The Grand Challenge aims to help "drive improvements in public health and innovate across the social care sector". This is welcome, says Brayne, though she argues that the investment in research and innovation should include investment into developing and evaluating public health measures, not just into technological solutions.
There are some grounds to be optimistic. Brayne leads the Cognitive Function and Ageing Studies (CFAS) project, a multi-centre study of dementia and cognitive decline in ageing. Volunteers from Ely have contributed to the study. More than 5,000 people aged 65 and over from the city and its surrounding area have taken part in cross-generational studies during the past three decades.
In fact, CFAS is one of a number of cohort studies at Cambridge University that look at populations in the East of England and ask what we can learn about the relationships between genetics, our behaviour, the environment and health. For instance, 30,000 men and women aged 40–79 have been involved in the EPIC Norfolk Study, while more than 12,000 people from Cambridgeshire have been involved in the Fenland Study.
A key – and perhaps surprising – finding from CFAS was that the UK has seen a 20% fall in both the prevalence and incidence of dementia over the past two decades. When this finding was published, Brayne was quoted as saying: "The so-called dementia 'tsunami' is not an inevitability: we can help turn the tide if we take action now".
The fall can almost certainly be viewed as a success for public health measures that improve education, early- and mid-life health promotion including smoking reduction and attention to diet, and physical activity. As well as reducing dementia risk, all of these factors contribute to healthy ageing.
At Burwell, Fara Afifi, the tai chi instructor, begins gathering her class in the studio. The class is popular: there must be 20 people, mainly women. As they begin their warm-up, Pat puts down her tea and stands to join them. | {
"redpajama_set_name": "RedPajamaC4"
} | 7,658 |
\section{Introduction}
Future mobile cellular communication networks are envisaged to be rolled out with a dramatically increasing number of cells and continuously reducing cell size, due to explosive mobile traffic~\cite{xiaojing2017}.
The traffic volume in the emerging fifth-generation (5G) systems and future systems beyond 5G (B5G) is estimated to be tens of Exabytes per month, expecting the capacity of 5G/B5G networks to be $1000$ times higher than that of current cellular networks \cite{1000x, buzzi}.
The thousand-fold increase of system capacity must be achieved with a similar or even lower power level than today's \cite{white, andrews}.
Increasing the network energy efficiency (EE) has been pursued by the GreenTouch consortium \cite{greentouch, foundation}.
Huawei has also deployed solar-powered base stations (BSs) in Bangladesh \cite{huawei}.
Ericson and Nokia Siemens Networks have designed green BSs with renewable power supplies,
such as wind turbines and solar panels, to reduce the consumption of fuel generated electricity \cite{eric, nokia}.
Energy-efficient techniques, such as BS switching~\cite{bi2019joint}, offline power allocation~\cite{inan2016online}, and online data scheduling~\cite{Chen2016Optimal,chen2015provisioning}
have been developed to reduce power consumption or increase network capacity.
Along with the development of cellular networks, power grid is also undergoing a radical revolution. Rapidly emerging smart grids, enabled with smart meters, are expected to provide new intelligent functionalities, e.g., decentralized power production/generation, bidirectional (also known as ``two-way'') energy trading, energy redistribution, and request management/coordination~\cite{fang2012smart}.
Cellular networks, as integrating components (or elements) of smart grids, can support effective energy utilization and redistribution, and price negotiation by interoperating with smart grids~\cite{Xu15, xiaolu}.
Smart grid and ``green communications'' have spawned extensive studies recently.
Several magazine articles \cite{chen2015provisioning, Xu15, mao215, xiaojing2017, Gunduz14design, Ozel15funda}
and survey papers \cite{buzzi, qq17, alsa18, ehcomm, ehrf, ehsensor, pras, perera18, erol15, rehmani19 }
review energy-efficient and energy harvesting (EH) powered communication networks from a range of different angles.
However, none of the existing reviews captures comprehensively the constrained wireless operations powered by renewable energy sources (RES) and their underlaying optimization methodologies, and the interoperability between wireless networks and smart grids (as done in this article).
Energy-efficient techniques for 5G networks
are summarized in \cite{buzzi} and \cite{qq17}, from the aspects of network deployment, energy/spectrum efficiency,
and delay/bandwidth versus power.
Featuring energy-harvesting wireless networks, beamforming techniques are reviewed in~\cite{alsa18}.
Energy scheduling, optimization, and application are presented in \cite{ehcomm}.
Circuit design, hardware implementation, EH techniques, and communication protocols
are reviewed in~\cite{ehrf, ehsensor, pras, perera18} with specific emphases on radio frequency networks~\cite{ehrf},
sensor networks \cite{ehsensor, pras}, and joint information and power transfer systems \cite{perera18}.
Smart grid and its merits in improving the operations of wireless networks
and software-defined networks are reported in \cite{erol15} and \cite{rehmani19}, respectively.
\begin{figure}
\centering
\includegraphics[width=0.47\textwidth]{diagram.pdf}
\caption{The main structure of this article.}
\label{diagram}
\end{figure}
{\em This article takes a new and unique angle of the interoperability of wireless communication networks and smart grids.
Recent breakthroughs on the utilization, redistribution, trading and planning of energy harvested
in future wireless communication networks interoperating with smart grids are reviewed}.
We start with state-of-the-art models of renewable EH technologies.
Then, we embark on constrained wireless operations
subject to non-persistent (renewable) energy harvested from ambient environments.
A range of energy-harvesting wireless communication systems, such as single point-to-point, multipoint-to-point,
multipoint-to-multipoint, multi-hop, and multi-cell systems.
We also go through a special yet widely studied class of EH techniques, where radio signals also play the role to deliver energy and joint
optimizations of wireless power and information delivery are carried out.
Performance metrics of energy-aware/constrained wireless operations include energy and operational cost minimization,
and utility maximization, by considering power allocation, transmit beamforming, traffic load, and users' quality-of-service (QoS).
Many classical techniques and methodologies are applied, such as convex optimization, Lagrangian dual-based method, game theory,
dynamic programming (DP), (stochastic) subgradient method (SGM), Lyapunov-based online optimization, and so forth.
Different system models and optimization criteria allow us to characterize, quantify, design and compare
different operating strategies of wireless networks from different perspectives, when practical design parameters arise.
A substantial part of this article is devoted to the latest techniques on the redistribution
of redundant energy within cellular networks, energy planning under dynamic pricing,
and bidirectional energy trading of cellular networks, as well as smart grids.
Empowered by renewable energy sources (RES), wireless power transfer (WPT), and/or smart grid,
actions of energy management such as the harvesting of RES, and the redistribution and (predictive) trading of redundant energy
can be performed in the wireless networks to achieve green and energy-efficient operations.
As will be revealed, the use of RES can significantly reduce the electricity bills of wireless service providers
and decrease the consumption of brown energy, i.e. coal and oil.
The article also discusses the potential applications of EH in future 5G/B5G networks,
and emerging technologies such as mobile edge computing (MEC), deep learning, ultra reliable and low latency communication (URLLC), non-orthogonal multiple access (NOMA), and so on.
As will be discussed, the energy management from the demand side can have a profound impact on future wireless networks.
By taking the new angle of the interoperability of wireless communication networks and smart grids
(as compared to the existing surveys~\cite{buzzi, qq17, alsa18, ehcomm, ehrf, ehsensor, pras, perera18, erol15, rehmani19}),
we organize the rest of this article in the following way.
Different types of RES and their popular mathematical models are colated in Section \ref{sec.res},
which are salient for design optimization of different types of RES-powered wireless links and networks in
Sections \ref{sec.single} to \ref{sec.multihop}.
In Section \ref{sec.wpt}, the joint wireless power and information transfer system is reviewed to provide a different perspective
of how energy and information signals interact in wireless communication networks.
From Sections \ref{sec.sharing} to \ref{sec.trading}, we discuss the roles of wireless networks as energy consumer,
harvester, and generator in the context of smart grid,
and thus the interoperability between wireless networks and smart power grids.
Specifically, we investigate the redistribution of redundant energy in wireless networks,
energy planning under dynamic pricing policy of the smart grid,
and bidirectional energy trading of EH wireless networks and smart grids.
In Section \ref{sec.app}, exciting 5G applications of EH, RES,
and smart grid-powered wireless devices are discussed.
In Section \ref{sec.future}, potential research opportunities are summarized, followed by concluding remarks in Section XIII.
Fig. \ref{diagram} provides the diagram to show the organization of this survey.
\section{Renewable Energy Sources (RES)}\label{sec.res}
\subsection{Types of Renewable Energy}
EH (or scavenging) is a
series of actions to collect and transform environmental renewable energy into electrical energy.
Unlike coal and oil, renewable energy can be regenerated with a wide range of different methods.
There are various types of RES, such as solar energy \cite{ehsolar, ehsolar2},
wind energy \cite{ehwind, ehwind2, ehtransmission}, electromagnetic (EM) radiation energy \cite{ehcomm, ehnear, ehrf, ehfar},
thermoelectric energy \cite{ehthermal, ehthermo, ehhuman}, and biomass energy \cite{ehbiomass}.
\subsubsection{Solar Energy}
One of the most
favored environmental RES is solar energy which has been extensively applied to different scenarios and applications
\cite{ehsolar, ehsolar2, ehsolarapp1, ehsolarapp2}.
Sunlight radiation is transformed into electric power via photovoltaic cells,
and then serves as the energy supply for self-supportable devices.
Although a potentially inexhaustible amount of energy can be obtained in this way, the energy usable to a device
could vary drastically even within a short duration in reality.
Furthermore, the EH level can be swayed by multiple factors, for instance, time of the day, solar elevation angle, weather conditions,
environmental prerequisites, and characteristics of photovoltaic cells.
These factors render the solar energy to be uncontrollable, unpredictable and nondispatchable.
Typically, the amount of solar energy is in the order of $100$ mW/cm$^2$~\cite{ehcomm}.
\subsubsection{Wind Energy}
Wind energy can be extracted by capturing the motion of the wind by a wind turbine.
The rotor speed output is used to perform maximal power point tracking.
The rotor frequency data is sent to a frequency-to-voltage (FV) converter which produces an appropriate voltage signal.
Wind energy can be also obtained by utilizing the movement of an anemometer lever to activate an alternator
and then using a pulsed buck-boost converter to transform the movement to electric power~\cite{ehsensor}.
Typically, when the rotor diameter is $1$ m and the wind speed is $8$ m/s,
the amount of energy that can be harvested is around $85$ W \cite{mao215}.
\subsubsection{Electromagnetic (EM) Radiation Energy}
Harvesting energy from EM radiation has
provided convenient power supplies for networks.
Featuring short-distance or long-distance scenarios,
the types of EM power supplies can be categorized into two groups: near-field and far-field EM radiation energy.
In the near-field scenarios, EM induction and magnetic resonance approaches~\cite{ehnear2, ehnear3}
often produce electric power within the range of a wavelength, and hence,
the power transfer efficiency can exceed 80$\%$ in the near-field scenarios \cite{ehnear}.
In the far-field scenarios up to several kilometers, the EM radiation, propagating in the fashion of radio frequency (RF) or microwave signals,
is received by antennas and transformed to electricity by rectifier circuits~\cite{ehrf, ehfar}.
The RF/microwave signals could come from beamforming signals sent by a given transmitter
or environmental EM radiations from the vicinity~\cite{fang15}.
Although the power density at the receiving end is related to the energy level of practical suppliers and the EM wave transmission distance,
this type of RES can be readily utilized, managed, and forecasted,
irrespective of time, location, and weather condition.
\subsubsection{Thermoelectric Energy}
The thermoelectric effect can be
utilized for EH.
In particular, a voltage signal can be generated between two conductors made of different materials
when their intersections are placed under different temperatures.
In practice, such a temperature gradient can take place in human bodies or machine operations.
The power densities of thermoelectric generations depend typically on the properties and temperature
difference of materials.
Their values are comparatively low and lie in the extent from $10$ $\mu$W/cm$^2$ to $1$~mW/cm$^2$~\cite{ehcomm}.
\subsubsection{Biomass Energy}
Since the aforementioned methods are not applicable for underwater EH,
bacterial metabolic activities have been exploited by microbial fuel cells (MFCs) to generate electricity
directly from broken down substratum.
Natural water contains abundant varieties of microorganisms and nutrients which are ideal for underwater EH by MFCs.
The amount of the energy is generally $153$ mW/cm$^2$ \cite{mao215}.
\subsection{Mathematical Models for Renewable Energy}
\subsubsection{Uncertainty Sets}
The a-priori knowledge of the stochastic RES amount $E_i^t$ is hardly available.
Yet, they can be potentially inferred and estimated from historical data.
Such estimations are generally bounded by uncertainty sets which characterize the ranges of the forecasted RES amounts.
To account for the temporally correlated RES amounts, two uncertainty sets ${\cal E}_i (i=1, 2, ...)$ are proposed
from the prospect of computational malleability.
The first model is given by a polyhedral set \cite{Zha13}:
\begin{align}
{\cal E}_i^{\textrm{p}} := \Bigg\{\mathbf{e}_i\;|\; &\underline{E}_i^t \leq E_i^t \leq \overline{E}_i^t, \notag \\
&\hspace{-1cm} E_{i,s}^{\min} \leq \sum_{t \in {\cal T}_{i,s}} E_i^t \leq E_{i,s}^{\max}, \; {\cal T}=\bigcup_{s=1}^S {\cal T}_{i,s}\Bigg\} \label{eq.Ei}
\end{align}
where $\overline{E}_i^t$ (or $\underline{E}_i^t$ ) is the maximum (or minimum) value of $E_i^t$;
and the operating period ${\cal T}$ is divided into non-overlapping, adjacent, and much smaller regions ${\cal T}_{i,s}$, $s = 1, \ldots, S$.
Each of the smaller regions can include several time slots. The overall amount of energy harvested at BS $i$ over the $s$-th smaller region
is constrained
by $E_{i,s}^{\min}$ and $E_{i,s}^{\max}$.
The second model amounts to
an uncertainty solution region with an ellipsoidal shape~\cite{ChenDG13}
\begin{align}
{\cal E}_i^{\textrm{e}} := \left\{\mathbf{e}_i = \hat{\mathbf{e}}_i + \bm{\varsigma}_i \;
|\; \bm{\varsigma}_i'\bm{\Sigma}^{-1}\bm{\varsigma}_i \leq 1\right\} \label{eq.Ei2}
\end{align}
where $\hat{\mathbf{e}}_i := [\hat{E}_i^1 ,\ldots, \hat{E}_i^T]'$ denotes the nominal EH amount at the $i$-th BS, and provides the predictable energy level; in other words, the expected (or mean) energy level.
$\bm{\varsigma}_i$ is a vector collecting the forecast errors.
The given matrix $\bm{\Sigma}\succ \mathbf{0}$ depicts the outline of the ellipsoid ${\cal E}_i^{\textrm{e}}$,
and thus decides the accuracy of the prediction.
In an attempt to account for random realizations of RES productions,
an uncertainty set can be in any form.
Based on the first- and second-order statistics of the stochastic amounts,
polyhedral or ellipsoidal sets are the most popular resorts \cite{dimi11}.
These two kinds of sets can be empirically obtained from historical statistics, and often used to help solve the relevant optimization problems.
Therefore, they can be implemented to EH systems as well.
\subsubsection{Stationary Process}
In some cases, the stochastic RES amounts are considered as
an independently and identically distributed (i.i.d.) process.
Weibull and Beta distributions are fairly accurate in portraying the traits of wind speed oscillation and solar power alteration, respectively~\cite{yeh08, wen15, abdu}.
The random RES amount can also be approximated by a Gaussian generation process \cite{ghaz17}.
\subsubsection{Markov Chain}
Different from the i.i.d. process, the Markov process implies that
the probability distribution of the $n$-th random variable is a function of that of the previous random variable in the process.
For RES-powered wireless sensor networks, the Markov chains are proposed to model the EH
process under the assumption that the time is slotted, a $2N$-state model can be designed
to represent the EH state (``active'' or ``inactive'') with a probability and the residual energy in the battery \cite{mkv2n}.
A state transition takes place when energy is harvested.
Under the same assumption of slotted time, a discrete-time Markov chain is leveraged to quantify the energy charged into a battery \cite{mkvdis}.
Assuming that energy can be replenished through EH and/or replacement of the battery,
a continuous-time Markov chain is designed to model the state of the battery in \cite{mkvcontinue}.
The state transitions are described as the different rates of EH and battery replacement,
each of which follows an independent Poisson process.
A stationary Markov process is used to model solar EH behavior, while a non-stationary one is
more effective in capturing vibrations introduced by other types of RES \cite{mkveh, mkvsolar}.
\section{Energy Harvesting-Based Communication over Point-to-Point Wireless Link}\label{sec.single}
There are many recent research works on powering data transmission over point-to-point radio link,
where the transmitters are typically sensors deployed remotely with no access to power grid
and harvesting RES from ambient environments all year around.
The sensors can be used to monitor temperature~\cite{Hou2018Thermal}, rainfall~\cite{Kar2016On},
bush fire~\cite{Somov2014Circuit}, and wildlife~\cite{Karim2012Reliable}.
The key techniques and methodologies applied are convex programming,
Lagrange multiplier method, and dynamic programming (DP), as summarized in Fig.~\ref{roadmap}.
Convex problems can be solved by off-the-shelf general-purpose convex solvers. However, general-purpose
convex programming solvers require high-order multiplications and many iterations, leading to a high-order polynomial complexity and slow convergence \cite{boyd}. Also, the general-purpose solvers cannot unveil the underlying structure of the optimal data transmission policy. To this end, the Lagrange multiplier method (typically in coupling with the celebrated Karush-Kuhn-Tucker (KKT) optimality conditions \cite{boyd}) has been widely applied in the literature for simpler and more insightful solutions \cite{boyd}.
By leveraging the Lagrange multiplier method along with the KKT optimality conditions to convex problems, one can find
the global optimum of the problems subject to the inequality constraints.
DP generally simplifies a sophisticated optimization problem by decoupling it to be several subproblems and solving the subproblems recursively \cite{Bertsekas}. However, DP is subjected to the curse of dimensionality.
The arrival processes of data traffic modeled by existing works can be categorized to two types: heavy data arrival scenario \cite{Ozel2011Transmission} and moderate data arrival scenario \cite{Chen2016Optimal}. The former type assumes that the data to be transmitted arrive before the start of the transmissions \cite{Ozel2011Transmission}; in other words, there are always data available in the transmit buffer. The latter type, under a more general assumption, considers that the data arrive during the course of transmission \cite{Chen2016Optimal}.
\subsection{Heavy Data Arrival}
\begin{figure*}
\centering
\includegraphics[width=1.03\textwidth]{roadmap1-3.pdf}
\caption{A summary of optimization methods for resource allocation in EH-based point-to-point,
multipoint-to-point, and multi-hop wireless links.}
\label{roadmap}
\end{figure*}
\begin{table*}[t]
\renewcommand{\arraystretch}{1.5}
\centering
\caption{A summary of optimization problems for EH point-to-point links}\label{tab:algo}
\begin{tabular}{ | c | c | c | c |}
\hline
\diagbox{\makecell{Settings}}{\makecell{Objectives}}
&\makecell{Throughput maximization } &\makecell{EE maximization} &\makecell{Transmission completion time minimization} \\ \hline
Time-invariant channel&\cite{Tutuncuoglu2012Optimum,Bai2011Throughput,Xu2012Throughput,yuan15}&\cite{Xu2012Throughput,Chen2016Optimal,chen2014Globecom,chen2015provisioning}& \cite{Tutuncuoglu2012Optimum,Jing2012Optimal} \\ \hline
Time-varying channel&\cite{Ozel2011Transmission,Orhan2012Throughput,yuan15,blas}&\cite{Chen2014ICC,gong13,kang14,ahmed13,cui15}& \cite{Ozel2011Transmission} \\ \hline
Discrete energy arrivals &\cite{Tutuncuoglu2012Optimum,Ozel2011Transmission,Orhan2012Throughput,yuan15,blas}&\cite{Chen2016Optimal,Chen2014ICC,chen2014Globecom,chen2015provisioning,gong13,kang14,ahmed13,cui15}& \cite{Tutuncuoglu2012Optimum,Ozel2011Transmission,Jing2012Optimal} \\ \hline
Continuous energy arrivals &\cite{Bai2011Throughput,Xu2012Throughput}&\cite{Xu2012Throughput}& -- \\ \hline
Finite battery size&\cite{Tutuncuoglu2012Optimum,Ozel2011Transmission,Bai2011Throughput,Orhan2012Throughput,yuan15,blas}&\cite{chen2014Globecom,chen2015provisioning,gong13,ahmed13}& \cite{Tutuncuoglu2012Optimum,Ozel2011Transmission} \\ \hline
Strict Deadline &\cite{Tutuncuoglu2012Optimum,blas}&\cite{Chen2014ICC,Chen2016Optimal,chen2014Globecom,chen2015provisioning}& \cite{Tutuncuoglu2012Optimum} \\ \hline
Circuit power consumption &\cite{Bai2011Throughput,Orhan2012Throughput,Xu2012Throughput}&\cite{Xu2012Throughput,Chen2016Optimal,chen2015provisioning}& -- \\ \hline
Offline Algorithm & \cite{Tutuncuoglu2012Optimum,Ozel2011Transmission,Bai2011Throughput,Orhan2012Throughput,Xu2012Throughput,yuan15,blas} & \cite{Xu2012Throughput,Chen2016Optimal,Chen2014ICC,chen2014Globecom,chen2015provisioning,gong13,kang14,ahmed13} & \cite{Tutuncuoglu2012Optimum,Ozel2011Transmission,Jing2012Optimal} \\ \hline
Online Algorithm & \cite{Ozel2011Transmission,Xu2012Throughput,yuan15,blas} &\cite{Xu2012Throughput,Chen2016Optimal,gong13,kang14,ahmed13,cui15}& \cite{Ozel2011Transmission} \\ \hline
\end{tabular}
\end{table*}
By assuming a saturated traffic condition, the works in \cite{Tutuncuoglu2012Optimum,Ozel2011Transmission,Bai2011Throughput,Orhan2012Throughput,Xu2012Throughput,yuan15} focus on the impact of EH on the optimal transmit power. The works aim to design a transmission policy specifying the transmit power over the interval $[0, T]$ to maximize the overall throughput. Given a total amount of data to send, the minimization of the completion time is also investigated \cite{Tutuncuoglu2012Optimum,Ozel2011Transmission}.
\subsubsection{Idle Circuit Power}
A visualization method is used in \cite{Tutuncuoglu2012Optimum} to unveil the optimal transmission policy. Let $E_t$ denote the amount of energy scavenged at time $t$. Let $\tilde{E}_t$ denote the cumulative curve of harvested energy, i.e., the total amount of energy harvested by time $t$ (or $\tilde{E}_t=\sum_t E_t$). Similarly, let $\tilde{P}_t$ denote the cumulative curve of transmitted energy, i.e., $\tilde{P}_t =\sum_t P_t$. To determine a transmission schedule policy is to specify the non-decreasing and continuous function $\tilde{P}_t$.
An inherent constraint is \textit{energy causality}, i.e., no energy can be utilized before it is harvested \cite{Gunduz14design,Ozel15funda}. This indicates that the curve of transmitted energy $\tilde{P}_t$ should lie under the curve of harvested energy $\tilde{E}_t$ all the time. With finite battery capacity $E_{\max}$, the optimal transmission policy should prevent the battery from being overcharged, i.e., the gap between the curves of transmitted energy and harvested energy (i.e. $\tilde{E}_t-\tilde{P}_t$) should not exceed the battery capacity. This constraint is referred to as \textit{no-energy-overflow} \cite{Ozel15funda}. Last but not the least, to deliver the maximum overall throughput or the minimum response time during the scheduling procedure, all the available energy is expected to be consumed by the deadline. In other words, the curve of transmitted energy $\tilde{P}_t$ needs to meet the curve of harvested energy $\tilde{E}_t$ at time instant $T$.
Collectively, these three constraints reveal that the optimal curve of transmitted energy $\tilde{P}_t$ starts from the origin, ends at point $(T, \tilde{E}_t)$, and lies between $\tilde{E}_t$ and $\tilde{E}_t-E_{\max}$; see Fig.~\ref{curve}. Here, the intersection of $\tilde{P}_t$ and $\tilde{E}_t$ means that the transmitter runs out of energy (or the battery is empty), and the intersection of $\tilde{P}_t$ and $\tilde{E}_t-E_{\max}$ denotes that the battery is full at the instant.
With the convexity of the transmit power $P(r)$ in regards to the transmit rate $r$, a use of Jensen's inequality \cite{boyd} can prove that employing a constant power can maximize the total volume of data delivered before its due time. In other words, the optimal strategy can be obtained by keeping a consistent power subject to the energy feasibility constraints. It is subsequently unveiled in \cite{Tutuncuoglu2012Optimum} by analyzing the original problem of interest and its constraints that the optimal transmission schedule which maximizes the throughput obeys the following two rules:
\\
\textit{{\bf Rule 1:} The transmit power only changes at the instants when the battery is completely drained or fully charged.\cite{Tutuncuoglu2012Optimum}.}
\textit{{\bf Rule 2:} The transmit power increases only at the instants when the battery is completely drained, and decreases only at the instants when the battery is fully charged \cite{Tutuncuoglu2012Optimum}.}
\\
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{energy_curve}
\caption{Optimal transmission policy is the shortest path in the energy feasibility region \cite{Ozel15funda}.}
\label{curve}
\end{figure}
Following Rules 1 and 2, the optimal transmission policy in~\cite{Tutuncuoglu2012Optimum} is shown to be the shortest path between the origin and end points in Fig.~\ref{curve}. It can be obtained by tautening a string between the harvested energy curve $\tilde{E}_t$ and the battery overflow constraint curve $\tilde{E}_t-E_{\max}$. Such a way of producing the optimal transmission policy is therefore called the ``String Tautening'' method \cite{Chen2016Optimal,chen2015provisioning}.
The optimal transmission policy in \cite{Tutuncuoglu2012Optimum} is developed over time-invariant channels.
For practical time-varying channels, Ozel et al. \cite{Ozel2011Transmission} propose a directional water-filling algorithm under energy causality and battery overflow constraints.
By formulating a convex problem maximizing the total throughput, the Lagrange multiplier method and the KKT optimality conditions are exploited to achieve the optimal solution. It can be concluded from Fig.~\ref{roadmap} that the majority of the water-filling methods in existing works are derived through convex formulation and Lagrange multipier method. By applying the Lagrange multiplier method to convex problems, one can find the globally optimal solution of the problems subject to the equality constraints, without explicit parameterization in terms of the constraints. The KKT conditions generalize the Lagrange multiplier method for solving inequality constrained optimization problems. In~\cite{Tutuncuoglu2012Optimum}, the KKT optimality conditions are used to deal with the inequality constraints accounting for the causality of EH and battery overcharging.
Rules 1 and 2 still hold after replacing ``transmit power'' with ``water-level'' \cite{Tutuncuoglu2012Optimum}. Here the water-levels are defined as $w_t:=P_t+1/\phi_t, t=1,2,\cdots$, where $\phi_t$ are the channel power gains of slotted time-varying channels.
Consider first a simple case consisting of two slots with duration $T$, where $\phi_1 > \phi_2$. The transmit powers can be optimally arranged using a well-known water-filling algorithm, as shown in Fig. \ref{direct_water_filling}(a). The blue regions denote the energy allocated to the transmitters during each slot, and the height of a region, $P_t$, is the transmit power for that slot. The celebrated water-filling algorithm always assigns higher transmit powers to the channels with stronger channel gains.
For a general EH process, applying the water-filling algorithm is not straightforward.
Assume that energy of amounts $H$ is harvested at time instants 0 and $T/2$, respectively. Different from the case in Fig. \ref{direct_water_filling}(a), no more than $H$ units of energy can be allocated to the first slot due to the energy causality. The optimal allocation under energy causality is called directional water-filling \cite{Tutuncuoglu2012Optimum}; see Fig. \ref{direct_water_filling}(b).
The approach is generalized to the broadcast channels in \cite{Ozel2013Optimal}.
\begin{figure}
\centering
\includegraphics[width=0.44\textwidth]{direct_water_filling.pdf}
\caption{Power allocation scheme over time-varying channel with $\phi_1 > \phi_2$. (a) $2H$
units of energy are harvested at instant 0; (b) $H$ units of energy are harvested at instants 0 and $T/2$ \cite{Gunduz14design}.}
\label{direct_water_filling}
\end{figure}
\subsubsection{Non-Idle Circuit Power}
In \cite{Ozel2011Transmission} and \cite{Tutuncuoglu2012Optimum}, the circuit power of e.g., converters, filters and mixers, is assumed to be negligible. However, in short-range communications, the circuit power is non-negligible and must be captured in the analysis \cite{Bai2011Throughput,Orhan2012Throughput,Xu2012Throughput}.
When the circuit power consumption is negligible, the transmitter keeps active. Nevertheless, when the consumed circuit power is comparable to the transmit power, the optimal transmission policy must include the ``sleep'' periods, during which the transmitter is off. When a non-negligible circuit power is considered,
the total power consumed at the transmitter, denoted by $P_{\text{total}}$, can be written as
\begin{equation}\label{eq1}
P_{\text {total}}=\left\{
\begin{array}{ll}
\frac{P(r)}{\vartheta_c}+\rho, &\text{if}~~P(r)>0,\\
\beta, &\text{if}~~P(r)=0.\\
\end{array}
\right.
\end{equation}
Here, $P(r)$ is the transmit power which is in general a convex function of transmit rate $r$;
$\rho$ and $\beta$ denote the circuit power consumption when the transmitter is on and off, respectively; and $\vartheta_c$ is the transmit efficiency of the transmitter. In most existing works, it is generally assumed that $\rho>0$ and $\beta=0$, since typically $\rho \gg \beta$; and $\vartheta_c=1$, as $\vartheta_c$ is a scaling factor \cite{Bai2011Throughput,Orhan2012Throughput,Xu2012Throughput}.
Considering the above non-ideal circuit power model, a so-called optimal ``on-off'' transmission policy is achieved in \cite{Bai2011Throughput} by adjusting the ideal-case optimal transmission scheme in \cite{Tutuncuoglu2012Optimum}. A minimum power level $p^*$ can be derived under the non-negligible circuit power $\rho$. If the optimal transmit power in \cite{Tutuncuoglu2012Optimum} is lower than $p^*$, then the transmitter sends data with the power $p^*$, and turns off once the harvested energy is used up \cite{Bai2011Throughput}.
In \cite{Orhan2012Throughput}, the optimal power allocation over time-varying channels is shown to be the solution to a convex optimization problem, and is portrayed as a directional glue-pouring algorithm integrating the glue-pouring recently developed in \cite{Youssef2008Bursty} and the aforementioned directional water-filling algorithm \cite{Ozel2011Transmission}. The minimum amount of power is allocated to each epoch, depending on the channel state and the non-negligible power consumption of the transmitter circuitry. The amount of harvested energy decides whether energy is ``poured'' into part of an epoch at the minimum power level, or allocated to the entire epoch with a higher power level.
In \cite{Xu2012Throughput}, the tradeoff between EE and spectrum efficiency (SE) is considered under non-ideal circuit power. An EE-maximizing power level $P_{ee}$ is obtained by maximizing the amount of data that can be transmitted with a unit of energy.
Specifically, $P_{ee}$ is defined as
\begin{equation}\label{eqee}
\displaystyle P_{ee}:=\arg \max_{P \geq 0}{\frac{R(P)}{P+\rho}},
\end{equation}
where $P_{ee}$ can be efficiently solved through bisectional search, as $\frac{R(P)}{P+\rho}$ is quasi-concave.
Xu and Zhang \cite{Xu2012Throughput} show an optimal solution with a two-phase scheme. The first stage of the approach is an ``on-off'' transmission with the EE-maximizing power allocated to all on-periods, and the second stage is to continuously transmit with a non-decreasing SE-maximizing power. The optimal offline algorithm is later extended to the scenario of multiple additive white Gaussian noise (AWGN) channels, where the above original power allocation problem with multi-dimensional vectors is solved by equivalently solving a problem with only a single one-dimensional scalar optimization variable through nested optimization techniques~\cite{Xu2012Throughput}.
By taking the battery storage loss into consideration, a special pattern of the optimal power is uncovered by combining the Lagrange multiplier method and DP \cite{yuan15}. In specific, as the history of the battery status has a non-negligible influence on the current status, a DP based technique (or method) is proposed to locate the slot for zero battery level in a backward induction manner with an affordable complexity.
\subsection{Moderate Data Arrival}
\subsubsection{Non-Stationary data and energy arrival processes}
Section II-A assumes there are always data available in the buffer for transmission; in a more general scenario, data and energy arrivals can be bursty over time.
The design goal of the optimal schedule can be to minimize the total transmission time \cite{Jing2012Optimal} or the total consumed energy \cite{Chen2016Optimal,Chen2014ICC,chen2014Globecom,chen2015provisioning}.
Let curves $\tilde{A}_t$ and $\tilde{D}_t$ be the total amount of data arrived and delivered by time $t$, respectively. Based on data causality, curve $\tilde{D}_t$ is always below $\tilde{A}_t$.
The optimal transmission scheme obtained for a heavy data arrival scenario is no longer feasible
as there might not be enough data in the buffer. Moreover, packets can have different deadlines \cite{Chen2016Optimal,Chen2014ICC,chen2014Globecom,chen2015provisioning}.
Let curve $\tilde{D}^{\min}_t$ be the total amount of data that must be transmitted by time $t$.
Then $\tilde{D}_t$ should always lie above $\tilde{D}^{\min}_t$ to guarantee the deadline requirement (or QoS).
The optimal transmission policy must jointly take into account the constraints in the data domain and those in the energy domain.
To better illustrate the impact of intermittent data arrivals on EH-based data scheduling, we consider first the scenario where energy is available at the beginning of the transmission~\cite{Zafer2005A,Wang2013Energy,Nan2014Energy}.
Then, a transmission strategy can be found by equivalently specifying a non-decreasing and continuous function $\tilde{D}_t$ over time.
In \cite{Zafer2005A}, a calculus method is developed to determine the optimal $\tilde{D}_t$ to minimize the transmission energy consumption for delay-sensitive packets over time-invariant channels. It is shown that the value of $\tilde{D}_t$ can be readily optimized by simply tautening a string between the data arrival curve $\tilde{A}_t$ and deadline curve $\tilde{D}^{\min}_t$.
It is concluded in \cite{Zafer2005A} that the optimal transmission strategy in a moderate data arrival scenario (with unlimited energy) obeys the following two rules:
\\
\textit{{\bf Rule 3:} The transmit rate shall only vary when the data buffer is empty (i.e., there are no undelivered data), or when all the deadline-approaching data is transmitted \cite{Zafer2005A}.}
\textit{{\bf Rule 4:} The transmit rate increases only at the instants when the data buffer is empty, and decreases only at the instants when all the deadline-approaching data is transmitted~\cite{Zafer2005A}.}
\\
Rules 3 and 4 imply that the visualization method used to construct the optimal transmission policy in \cite{Zafer2005A} has similar procedures as in \cite{Bai2011Throughput,Tutuncuoglu2012Optimum}, which follow Rules 1 and 2. The generalization of Rules 1 and 2 to\cite{Zafer2005A} can be achieved by simply substituting the energy related curves $\tilde{E}_t$, $\tilde{P}_t$ and $\tilde{E}_t-E_{\max}$ in \cite{Bai2011Throughput,Tutuncuoglu2012Optimum} with the corresponding data related curves $\tilde{A}_t$, $\tilde{D}_t$ and $\tilde{D}^{\min}_t$.
By incorporating the calculus method~\cite{Zafer2005A} into the classic water-filling technique, reference \cite{Wang2013Energy} generalizes the optimal rate schedule to time-varying wireless channels. By formulating a convex problem and applying the KKT optimality conditions, an interesting multi-level water-filling pattern is revealed in the optimal schedule with the minimum power consumption in~\cite{Wang2013Energy}, which can be visualized to be the shortest path between the ``water'' arrival and the corresponding minimum ``water'' departure curves, corresponding to the data arrival and deadline curves, respectively, as shown in Fig.~\ref{water_filling}.
\begin{figure}
\centering
\includegraphics[width=0.44\textwidth]{water_filling.pdf}
\caption{(Top) Water arrival curve, deadline curve and optimal water departure
strategy; (Bottom) Water-filling algorithm admitting multiple water levels \cite{Wang2013Energy}.}
\label{water_filling}
\end{figure}
Taking non-ideal circuit power into account, the study in~\cite{Nan2014Energy} generalizes the approach developed in \cite{Wang2013Energy}, and proposes an energy-efficient ``clipped string-tautening'' algorithm. It is revealed in~\cite{Nan2014Energy} that the transmitter can take the following three schemes under the optimal data schedule: i) remaining off over the entire slot; ii) transmitting at the energy-efficiency (EE)-maximizing rate for part of the slot; or iii) transmitting at a rate larger than the EE-maximizing rate over the entire slot.
We proceed to consider that both energy and data arrivals are bursty over time.
A so-called ``dynamic string tautening'' technique is put forth to create most energy-savior offline transmit policies even in the presence of a non-ideal transmitter circuit with a considerable power consumption and a limitation of a finite battery capacity \cite{chen2014Globecom}, or without the limitation \cite{Chen2016Optimal}.
The transmit rate $r_t$ and the ``on'' duration $l_t$ per epoch $t$ are the variables to be optimized. Neither of $r_t l_t$ and $P(r_t) l_t$ is convex or concave over $(r_t, l_t)$ in the problem of interest in \cite{Chen2016Optimal}. Yet, the problem can be transformed into a convex one by applying variable substitution with $\Phi_t:=r_t l_t$. For any convex $P(r_t)$, $P(\frac{\Phi_t}{l_t})l_t$ is known to be its perspective, and is convex in $(\Phi_t, l_t)$.
By leveraging convex formulation and its optimality conditions, Rules 1--4 can be met simultaneously, and guide the generation of the optimal strategy by recursively tautening a data departure string in a feasible solution region. The complexity of tautening a string in such a way is low. It is revealed in \cite{Chen2016Optimal} that the current string tautening behavior depends on the past one, as the past data schedule affects the available energy left in the battery.
Instead of tautening two strings (which are the transmitted energy curve following Rules 1 and 2, and the corresponding transmitted data curve following Rules 3 and 4), only the transmitted data curve needs to be optimized since the energy related constraints curves can be translated to the data domain \cite{Chen2016Optimal}.
The algorithm developed in \cite{Chen2016Optimal} is generalized to the online scenario, where the transmission policy is generated in real time. It is also extended to time-varying channels in \cite{Chen2014ICC}. In~\cite{chen2015provisioning}, appropriate models of EH transmitters, with meticulous considerations on the EH rate, deadline requirements, and battery size, are investigated to balance the QoS guarantee and the energy consumption based on ``dynamic string tautening'' algorithms.
Targeting at minimizing the total completion time of transmitting all arrived data, the optimal data schedule is obtained by a recursive visualized scheme which jointly checks the conditions of the data and energy departure curves \cite{Jing2012Optimal} in accordance with Rules 1-4.
Considering joint EH and constant grid power supply, different resource allocation problems are formulated to minimize the total power consumption~\cite{gong13,kang14}, or the grid power consumption~\cite{ahmed13,cui15}.
Through convex formulation and KKT optimality conditions, a two-stage water-filling policy is proposed in a heavily loaded traffic condition with the harvested energy distributed in the first stage and the grid energy supply distributed in the second stage \cite{gong13}. For a moderate traffic arrival case, a multi-stage water-filling strategy is developed to reversely allocate the energy from the last frame to the first frame. This policy can only be generated offline. Ahmed et al.~\cite{ahmed13} develop a stochastic DP algorithm for online power allocation. To bypass the high complexity of DP, a suboptimal online scheme is developed through convex formulation for a good performance-complexity tradeoff~\cite{ahmed13}.
\subsubsection{Stationary data and energy arrival processes}
The celebrated Lyapunov optimization framework has been applied to obtain online dynamic resource allocation with i.i.d. data and energy arrivals, under data queue stability constraint \cite{cui15}.
The Lyapunov optimization technique provides a very effective tool to stabilize and optimize networks of queues. Let $L(t)$ denote the Lyapunov function, which is a non-negative metric to measure queue lengths. The growth of $L(t)$ indicates that the queueing system becomes increasingly unstable.
Consider a system of $I$ queues with lengths of $(Q_1^t, Q_2^t, \ldots, Q_I^t)$. The arrival process of each queue is assumed to be stationary (stochastic). The Lyapunov function can be formulated as $L(t)=\frac{1}{2} \sum_{i=1}^I (Q_i^t)^2$.
Then, $\triangle L(t)= L(t+1)-L(t)$ defines a Lyapunov drift, which is the difference of the Lyapunov functions at two adjacent slots. A feasible way to preserve the system stability is to minimize the Lyapunov drift at every slot and prevent the queue lengths from growing~\cite{Nee10}.
The term $\triangle L(t)+V p(t)$ is defined as the Lyapunov drift-plus-penalty, where $p(t)$ stands for a penalty function, and $V$ specifies a positive weight.
By minimizing the upper bound of $\triangle L(t)+V p(t)$ per slot, one can stochastically minimize the time-average penalty with asymptotic optimality while preserving the system stability.
In \cite{cui15}, the data queue in the transmit buffer and the energy queue in the battery are mapped to $\boldsymbol{Q_i^t}=\{Q_{d,i}^t,Q_{e,i}^t\}$, while the total power consumption specifies the penalty function $p(t)$.
As a consequence, minimizing the maximum value of this Lyapunov drift-plus-penalty per slot leads to the asymptotic minimality of the time-average energy cost, while stabilizing all the data and energy buffers.
By exploiting a continuous-time approximation, DP, and sample-path approach, an analytic framework is introduced to study the power-delay tradeoff relationship in the small delay regime \cite{cui15}.
In \cite{blas}, the EH communication system is assumed to be a finite Markov decision process (FMDP) \cite{bellman1957markovian}, where the energy and data arrivals are Markov processes.
A reinforcement learning-based approach, Q-learning, is developed for the transmitter operation of the EH communication system. For any given FMDP, Q-learning can select the optimal actions and maximize the expected total reward for each and all consecutive steps.
In \cite{blas}, the transmitter is designed to learn the optimal transmission strategy gradually by taking exploratory actions (i.e. dropping or transmitting the incoming packets) and maximizing the expected sum rewards (i.e. the total throughput). It is shown that the proposed approach asymptotically converges to the global optimum, as the learning time increases.
\section{Energy Harvesting-Based Multipoint-to-Point Wireless System}\label{sec.multiaccess}
\begin{figure}
\centering
\includegraphics[width=0.47\textwidth]{multi_access.pdf}
\caption{Diagram of an EH-based multi-point-to-point wireless communication system.}
\label{multi access}
\end{figure}
Another wireless communication architecture extensively studied in the context of RES/EH is multipoint-to-point network architecture, where there are multiple EH devices (or sensors) and a single sink node; see Fig.~\ref{multi access}. The sensors need to be scheduled to send their data to the sink. Energy/EH-aware scheduling is a key differentiating factor of the multipoint-to-point networks
to the point-to-point networks (discussed in Section III)~\cite{yang12optimal}. In the case of centralized scheduling, the sink collects information, such as queue backlog and energy availability, and selects accordingly the devices to transmit~\cite{yang12optimal,Wang2014Iterative}. In the case of distributed scheduling, random access protocols are developed to trigger the transmission of a device based on its own queue and battery states~\cite{Baknina18,miche,zheng2016game,Iannello2012Medium,Gurakan2018Energy,Jeon15}.
\subsection{Centralized Scheduling}
Yang and Ulukus \cite{yang12optimal} extend their previous works on power allocation for EH point-to-point links \cite{Ozel2011Transmission,Jing2012Optimal} or EH broadcast channels \cite{Ozel2013Optimal} to a multiple access communication system. By capturing the interference between the two users and following the aforementioned Rules 1 and 2, the authors of \cite{yang12optimal} generalize the well-known backward water-filling algorithm to specify the maximum data departure region with a given deadline. An offline transmission strategy is then obtained by decomposing the transmission completion time minimization problem into several convex subproblems, according to the region sequence at energy arrival instants.
By taking the maximum per-slot energy consumption into account, an iterative dynamic water-filling approach is designed in \cite{Wang2014Iterative} to provide the optimal energy schedule for EH multi-access channels and maximize the throughput of the channels. It is shown that, in practice, the convergence can be reached within only a few iterations.
The optimal resource allocation is specifically designed in multi-input multi-output (MIMO) systems powered by smart grid in \cite{hu16con, hu16}
by maximizing the weighted or expected sum-rate.
Relying on an uplink-downlink duality derived information-theoretically \cite{jindal2004},
the downlink MIMO broadcast channel capacity region in the downlink can be equivalently calculated as the union of the uplink multi-access channels capacity regions when the uplink and downlink have to meet the same sum-power constraint.
To derive the optimal power allocation strategy in an offline fashion,
the Lagrangian dual based subgradient method is leveraged in~\cite{hu16con, hu16}
by applying a nested optimization process.
The downlink covariance matrices can be derived from their uplink counterparts using the uplink-downlink duality.
\subsection{Distributed Scheduling}
Baknina and Ulukus \cite{Baknina18} extend the results of \cite{yang12optimal} to the online scenario where the arrivals or availability of ambient energy are typically unpredictable. A distributed fractional power (DFP) policy is proposed and proven to be near-optimal. By assuming that the energy collected by the users is synchronized Bernoulli process, it is shown that the optimally allocated power decreases until reaching the end of the renewal time, and has a pentagon time-average throughput region. It is also shown in \cite{Baknina18} that the correlation of the energy sources is detrimental to the achievable throughput, as the throughput is much larger under asynchronous Bernoulli energy arrivals than it is under synchronized ones.
Michelusi and Zorzi \cite{miche} investigate a multi-access policy maximizing the utility of the EH wireless sensor networks (WSNs), where different EH sensors transmit packets to a fusion center by randomly accessing a shared wireless channel. Each packet has a random utility value. A distributed random access protocol is designed based on a game theoretic framework, where all sensors perform the same strategy.
The work in \cite{miche} is extended to a multi-channel case with delay-sensitive data transmissions \cite{zheng2016game}.
Considering a similar scenario as the one in \cite{miche}, Iannello et al. \cite{Iannello2012Medium} design the medium access control (MAC) by balancing the tradeoff between time efficiency and transmission probability.
A recent work \cite{Gurakan2018Energy} considers a EH-based two-user cooperative multiple access channel, where the two users perform data cooperation by cooperatively establishing and sending common messages, and perform energy cooperation by wireless energy transfer. By leveraging the Lagrange dual based method, the offline energy allocation and transfer policy maximizing the departure region are jointly optimized.
The exact stability region is characterized in \cite{Jeon15} where two EH nodes randomly access the same receiver. Relying on Loynes' theorem \cite{loynes1962stability}, the analysis of the stability region takes into account the effect of limited energy availability, finite battery capacity, and data reception capability. Loynes' theorem indicates that, if the inbound rate is smaller on average than the outbound counterpart, and the incoming and outgoing processes are ergodic, then the queueing system is stable \cite{loynes1962stability}.
To solve the problem in \cite{hu16con, hu16} over an infinite scheduling period by an online algorithm,
Wang et al. \cite{wang2016} rely on the stochastic subgradient method to obtain resource schedules ``on-the-fly''
by suppressing (decoupling) the time-coupling between the variables and constraints.
The random variables are supposed to be i.i.d..
Using stochastically estimated Lagrange multipliers,
this method updates the subgradients with their online approximations based on
the instantaneous decision variables per time slot.
It is proven in \cite{wang2016} that asymptotically optimal and feasible solutions can be achieved in no need of any prior knowledge of underlying randomnesses.
The optimality gap diminishes when the iteration stepsize approaches zero.
When achieving the optimality, the BS purchases more electricity to transmit its data and charge its battery from the smart energy grid if the grid offers a low energy price, and uses the energy stored in battery if the grid asks for a high price.
The BS can even sell some of its surplus energy back into the grid, hence offsetting part of its energy bill.
Compared with a traditional grid-powered BS, the proposed system in \cite{wang2016} can achieve higher sum rates under the same cost budget.
\begin{figure*}[th]
\centering
\includegraphics[width=0.7\textwidth]{compmodel.pdf}
\caption{A typical smart grid-powered CoMP system with two BSs.}
\label{compmodel}
\end{figure*}
\section{Energy Harvesting-Based Multipoint-to-Multipoint Wireless Communication System}\label{sec.comp}
Coordinated multi-point transmission and reception (CoMP) was initiated in
the Third Generation Partnership Project (3GPP), as one of the key technologies
in the long-term evolution-advanced (LTE-A) standard,
in order to achieve interference management and mitigation.
A CoMP system can be
{\color{black} viewed as a group}
of geographically collocated transmit antennas
which coordinately serve several multi-antenna end users \cite{lee12}.
Thus, a CoMP system can be referred to as a multipoint-to-multipoint system.
For coordinated transmission in the downlink,
{\color{black} the data sent by several transmission points are coordinated to enhance the
acquired intensity of the expected information
at the user equipment (UE) or to decrease the inter-cell interference.}
For coordinated reception in the uplink, it is ensured that the uplink
{\color{black} data from the UE can be steadily detected}
by the network with limited uplink interferences and the existence of multiple reception points.
As there are a large number of users and service demands, it costs great energy to realize transmit beamforming, interference alignment, user scheduling,
and backhaul signaling in multipoint-to-multipoint systems.
The integration of RES can reduce the electricity consumption from traditional power sources and
facilitate economic and ecological operations of such systems in the age of ``green communications''.
Many recent works have minimized the energy consumption and operational cost of RES-powered
multipoint-to-multipoint systems.
Classic techniques and methodologies applied in such problems include the Lagrangian dual-based method,
(stochastic) subgradient method (SGM) \cite{sgm86, sgm09, sgm17, Kiwi04}, cutting-plane method (CPM) \cite{cpm95, cpm02, cpm15},
and proximal bundle method (PBM) \cite{Kiwi95, Kiwi, pbm06}.
For a minimization problem, its Lagrangian dual function is always concave,
{\color{black} even if the primal problem is not convex \cite{boyd}.}
The optimal dual solutions can be readily obtained by using off-the-shelf convex optimization tools,
such as SDP, SOCP, and interior point method \cite{boyd}.
To effectively solve non-differentiable convex dual problems, SGM and CPM are commonly used,
as they deal with subgradients, rather than gradients, of the objective functions.
Although CPM converges faster (i.e. with fewer iterations) than SGM, it is computationally more demanding (per iteration),
and does not allow for a distributed implementation \cite{Xiao04}.
The stochastic SGM is applied when the random variables are i.i.d. and traditional online solvers,
such as DP, are intractable
{\color{black} since the optimization variables are closely coupled over time.}
The optimal primal solutions can be recovered from the dual solutions with no duality gap when the primal problem is strictly convex.
Extra care must be taken for such operations
{\color{black} if the original problem is not strictly convex.}
A sophisticated method to deal with this situation is the PBM,
{\color{black} which is to approach the epigraph of a function
through using the intersection of several halfspaces.}
\subsection{Minimization of Total Energy Consumption}
A CoMP downlink energized by a smart power grid
is studied in~\cite{Xu16} where the BSs have on-spot RES
and carry out bidirectional energy trading in real-time with the smart grid.
Yet, the BSs may not be equipped with energy storage capability.
The optimal solution for minimizing the
{\color{black} overall energy expenditure is obtained by an approach utilizing convex optimization}
and uplink-downlink duality \cite{yu2007tx}.
In particular, let $k \in {\cal K}=[1, \ldots, K]$ denote the user index, and $\mathbf{w}_k$ the beamforming vector
associated with user $k$.
A phase rotation is performed for each $\mathbf{w}_k$,
since the phase rotation does not change the signal-to-interference-plus-noise ratio (SINR) constraints,
i.e., $\text{SINR}_k(\{\mathbf{w}_k\})=\text{SINR}_k(\{\mathbf{w}_k e^{j\phi_k}\})$,
where $\phi_k$ is an arbitrary phase.
Without loss of optimality, $\{\mathbf{w}_k\}$ is chosen in such a way that
$\mathbf{h}_{k}^H \mathbf{w}_k$ is real, and $\mathbf{h}_{k}^H \mathbf{w}_k \geq 0$ in \cite{Xu16},
to convert the original nonconvex SINR constraints:
\begin{equation}
\frac{|{\mathbf{h}_{k}^H} \mathbf{w}_k|^2}{\sum_{l\neq k} (|{\mathbf{h}_{k}^H} \mathbf{w}_l|^2) + \sigma_k^2} \geq \gamma_k,
~\forall k \in {\cal K}
\end{equation}
into convex (second-order conic) constraints \cite[eq. (14)]{Xu16}:
\begin{equation}
\sqrt{\sum_{l \in {\cal K}} |\mathbf{h}_k^H \mathbf{w}_l |^2+ \sigma_k^2} \leq \sqrt{1+\frac{1}{\gamma_k}} \mathbf{h}_k^H \mathbf{w}_k,
~\forall k \in {\cal K},
\end{equation}
where $\mathbf{h}_k$ stands for the channel vector of any user $k$.
Xu and Zhang \cite{Xu16} exploit the uplink-downlink duality to convert
the multiple-input single-output broadcast channel (MISO-BC)
to a dual single-input multiple-output multiple access channel (SIMO-MAC) by
taking conjugate transpose of the channel vectors,
under the same SINR constraints $\{\gamma_k\}$.
Hence, the optimal transmit beamformers $\{\mathbf{w}_k^*\}$ can be obtained by first deriving the uplink dual problem solution
via an iterative function evaluation procedure \cite{wiesel2006},
and then mapping the solution to the original problem.
Other variables of the problem are decided via an ellipsoid method \cite{boyd2}.
As the optimal solver incurs a high computational complexity,
Xu and Zhang \cite{Xu16} also propose a suboptimal solution of a comparatively lower complexity,
by implementing zero-forcing (ZF) beamforming methods at the BSs.
The transmit beamforming vectors are produced to
cancel any mutual interference between different users,
i.e., $\mathbf{h}_k^H \mathbf{w}_l =0$, where $l,k \in {\cal K}$ and $l \neq k$
are the indexes to two different users.
{\color{black} As typically required, ZF beamforming is only implementable under the condition
that there are fewer users than the transmit antennas across the BSs.}
\subsection{Minimization of Operational Cost}
{\color{black} Due to an unbalanced supply of RES and energy requirements across geographically dispersed BSs,
and a considerable price gap of the BSs purchasing (or selling) electricity from (or towards) the smart energy grid,
it is cost-effective for these BSs to collectively plan their transactional dealings with the smart energy grid,
as well as electricity usage for CoMP-enabled communications.}
A framework is developed in \cite{wang2015} to capture finite storage, bidirectional electricity trading
and dynamic pricing of the smart grid into CoMP downlink communication systems
with imperfect channel state information (CSI) at the transmitter.
The system model is pictorially illustrated in Fig. \ref{compmodel},
where each BS has RES devices (e.g. solar-electric converters and/or hydroelectric generators),
local energy storage devices (e.g. batteries),
and a smart meter to collect energy information and coordinate bidirectional electricity trading activities
by interacting towards the smart power grid.
The BSs in the CoMP cluster jointly serve the mobile users.
In such a system, a central controller is necessary to collect the information across the entire network,
and correspondingly coordinate the activities of the BSs.
{\color{black} The authors of \cite{wang2015} develop the worst-case energy scheduling and transmit beamforming schemes
to minimize the system-wide transaction expenditure,
while guaranteeing user QoS in a CoMP-enabled downlink network.
Let $P_{b,i}^t$ stand for the power transferred into, or taken out of,
the batteries at slot $t$ for BS $i$.}
In the case of $P_{b,i}^t>0$, the BS charges the battery.
If $P_{b,i}^t<0$, the battery is being discharged.
$P_{g,i}^t$ denotes the total power usage for BS $i$ at time slot $t$ (including the transmit power with respect to
beamforming vectors and constant circuits consumption).
With the auxiliary variable $P_i^t=P_{g,i}^t+P_{b,i}^t$ and the energy transaction prices $\alpha_t$ (buying) and $\beta_t$ (selling),
{\color{black} the worst-case transaction expenditure of BS $i$ across the entire
scheduling period can be formulated as \cite{Zha2012} }
\begin{equation}
G(\{P_{i}^t\}):= \max_{E_i \in {\cal E}_i} \sum_{t=1}^T \Big(\alpha^t[P_{i}^t-E_i^t]^+
- \beta^t [E_i^t-P_{i}^t]^+\Big),
\end{equation}
where $E_i^t$ is the harvested energy of BS $i$ at time $t$,
{\color{black} $[P_{i}^t-E_i^t]^+$ is the shortfall of the energy to be procured from the smart power grid,
$[E_i^t-P_{i}^t]^+$ is the redundant energy to be sold to the grid,}
and $[a]^+:= \max\{a, 0\}$.
Applying the semidefinite relaxation (SDR) technique \cite{luo2010se} and the S-procedure \cite{Polik2007},
the energy management and transmit beamforming
{\color{black} optimization is constructed as a convex problem.}
Due to the non-differentiability of $G(\{P_{i}^t\})$, this nonsmooth convex problem is intractable to general solvers.
Its global optimal solution can be
{\color{black} acquired offline}
by employing the Lagrangian dual based subgradient iteration \cite{Bert99, Bert03, Kiwi04, Xiao04, Gatsis12},
together with a proximal bundle method \cite{Kiwi, Kiwi95}.
Ahead-of-time resource planning can be realized,
{\color{black} provided that the energy and data arrivals are obtained beforehand.}
\subsection{Minimization of Long-term Average Cost}
The dynamic energy management of a CoMP system is considered in an infinite scheduling horizon in \cite{wang2016dyn}.
{\color{black} The target is to minimize the time-averaged
overall expenditure over an infinite time horizon}
by determining the power allocation variables, i.e.
$\min_{\{P_i^t, P_{g,i}^t, C_i^t\}} ~\lim_{T\rightarrow \infty} \frac{1}{T} \sum_{t=0}^{T-1} \sum_{i=1}^I G(P_i^t).$
The battery level relations (as one of the constraints)
$C_i^{t+1} = C_i^{t} +P_i^t - P_{g,i}^t, \, \forall i, t$
couple the optimization variables over time.
{\color{black} This makes the original problem hardly malleable for traditional solvers such as DP.}
Assuming that the RES amounts and energy transaction prices $\{\mathbf{e}^t, \alpha^t, \beta^t\}$ are i.i.d.
at every individual slot, the authors of \cite{wang2016dyn} use the Lagrange dual based stochastic subgradient approach to tackle this problem.
In essence, this method updates the Lagrange variables by their stochastic estimates at each time slot,
which can reduce the otherwise high computational complexity.
Based on the stochastic iterations, the authors then construct a virtual energy queue $Q_i^t$ for each BS $i$.
The virtual queue obeys the same dynamic equation as in battery level:
$Q_i^{t+1}=Q_i^t + P_i^t(\mathbf{Q}^t) - P_{g,i}^t(\mathbf{Q}^t)$,
where $P_i^t(\mathbf{Q}^t)$ and $P_{g,i}^t(\mathbf{Q}^t)$ are
{\color{black} procured by tackling the dual problem
with stochastic estimates of the Lagrange variables.
Different from real queues,}
the value of $Q_i^t$ can be negative, which is important to the procedures of the
virtual-queue based online control (VQOC) approach at the central scheduler to obtain the asymptotically optimal solutions.
Depending on the state-of-the-art stochastic optimization methodologies \cite{Urg11, Lak14},
the solution can be proven to be asymptotically optimal over a long term.
{\color{black} A two-scale online resource management problem is
investigated for RES-integrated CoMP-enabled communications in~\cite{wang2016two}.
By considering the dynamics of CSI, RES, beforehand/real-time electricity prices, and battery shortcomings,
a stochastic optimization task is built up to minimize the average electricity transactional expenditure
over a substantially long time frame, and also satisfy the QoS of the users.
The authors of \cite{wang2016two} reformulate the primal problem into a malleable structure}
by replacing the time-coupled queue dynamics with a time-averaged constraint, i.e.
$C_i^{t+1} = \vartheta_b C_i^t+P_{b,i}^t, ~ C_{\min} \leq C_i^t \leq C_{\max}, ~ \forall i$
are replaced by$(1-\vartheta_b)C_{\min} \leq \bar{P}_{b,i} \leq (1-\vartheta_b)C_{\max}, \quad \forall i,$
where $\vartheta_b \in (0,1]$ is the storage efficiency.
It is supposed that the battery capacity $C_{\max}$ is finite and the minimum energy level of the battery is $C_{\min}$.
By doing so, the variables $\{C_i^t\}$ are suppressed in the original problem,
and other optimization variables are ``decoupled''
{\color{black} over time.}
The reformulated problem is a relaxed version of the original problem.
A two-scale online optimization method is then
{\color{black} proposed to create ruling policies in real-time in \cite{wang2016two}}
by minimizing the Lyapunov drift-plus-penalty
$\triangle L_t + V p_t$, where $\triangle L_t = L_{t+1}-L_t$ is the Lyapunov drift,
$p_t$ is a penalty function (in the paper $p_t$ is the time-average energy consumption (or utilization) of the BSs),
{\color{black} and $V$ is a preset positive weighting coefficient of the penalty.
It is analytically validated in \cite{wang2016two} that asymptotically close-to-optimal resource allocation can be established
for the above-mentioned original problem with proper settings,
without any prior statistical knowledge of the underlying stochastic processes.
}
\section{Energy Harvesting-Based Multi-Hop Wireless Communication Link}\label{sec.multihop}
\subsection{Information Cooperation Between Nodes}
Cooperation between nodes is an effective way to enlarge system throughput and improve diversity for wireless communication systems. Luo et al. \cite{luo13} consider a dual-hop network with an EH-powered source node and a half-duplex relay node powered by persistent power supply, and investigate joint time and power management.
An important insight is that directional water-filling (DWF) developed for single-hop communication
systems \cite{Ozel2011Transmission} may be generalized to this two-hop scenario \cite{luo13}.
Specifically, based on DWF, a performance upper bound is first found for any given energy arrival process at the source.
The properties of the optimal solutions are then derived, which indicate that: i) The source (relay) node should employ the same transmit power during a given DWF interval; and ii) The data buffer at the relay and the energy buffer at the source are emptied at the end of DWF intervals. The resultant relaxed EH profile
is later modified to optimize the time and power allocation, as shown in Fig.~\ref{luo13}.
\begin{figure}
\centering
\includegraphics[width=0.49\textwidth]{fig_luo13.pdf}
\caption{The solution to the relaxed EH profile in \cite{luo13} is slightly modified to yield the solution for the original, non-relaxed power allocation problem of \cite{luo13}. The slope of the solution is the optimal transmit power at every instant.}
\label{luo13}
\end{figure}
The ``on-off'' strategy during each interval is strongly analogy to the problem of sum-rate maximization in the presence of battery leakage \cite{Devillers2012A} or with non-ideal circuit power consumption \cite{Bai2011Throughput,Orhan2012Throughput,Xu2012Throughput}. However, the ``on-off'' structure in \cite{luo13} results from a half-duplex constraint.
The structure is attributable to the objective of the optimization problem and the constraining factor of battery leakage in \cite{Devillers2012A} and non-negligible circuit energy consumption
in~\cite{Bai2011Throughput},~\cite{Orhan2012Throughput,Xu2012Throughput}.
Huang et al. \cite{huang13} consider EH source and relay nodes performing decode-and-forward (DF) relay, with the a-priori knowledge of the EH profile.
In the case of transmitting delay-constrained (DC) traffic, a new power allocation strategy is developed to maximize the throughput by using the KKT optimality conditions. It is shown in \cite{huang13} that the search algorithm over the two-dimensional EH profiles of the source and relay is an extension of the earlier algorithm developed over the one-dimensional EH profiles in \cite{Jing2012Optimal}.
In the case of transmitting non-delay-constrained (NDC) traffic, based on a separation principle \cite{huang13}, the original problem can be solved by two stages: the transmit power of the source is first jointly optimized by ignoring the requirement of the relay, according to which the transmit power of the relay is then optimized.
It is noted in \cite{huang13} that, in practical EH scenarios, ``energy diversity'' exists due to the independent EH processes at the source and the relay. By relaxing the decoding delay, the proposed transmission policy for NDC traffic can exploit ``energy diversity'' in cooperative communication, and result in a much larger system capacity than the DC counterpart.
Pappas et al. \cite{pappas} study the non-negligible effect of EH on a two-hop network with a collision-prone wireless channel, e.g. IEEE 802.11 WiFi, where an EH-powered source node and an intermediate relay node both receive external traffic. A cooperation of the source and the relay is performed at the protocol (network) level, where the relay takes responsibility of data transmission and can decode the transmissions of the source.
By deriving the sufficient and necessary conditions for the stability of the traffic queues, tight inner and outer bounds of the stability region are obtained with a given transmission probability.
\subsection{Information and Energy Cooperations Between Nodes}
Unlike \cite{luo13,huang13} and \cite{pappas} where energy cooperation between nodes is largely overlooked, Gurak et al. \cite{gurak} develop an iterative algorithm which jointly optimizes power control,
data routing and energy transfer for a EH communication network. In \cite{gurak}, all nodes can harvest energy from ambient environments, and transfer part of the harvested energy to neighboring nodes by energy cooperation.
Based on the Lagrangian function of the convex energy management problem, the necessary conditions are established for the optimal solution. The proposed algorithm is shown to converge towards a Pareto-optimal equilibrium. When there is no energy cooperation, it is shown in \cite{gurak} that, with fixed data flows, a higher transmit power needs to be assigned towards the links either suffering from stronger noises or admitting higher data flows. It is also revealed in \cite{gurak} that, with multiple attempts of EH per node, the optimal power consumption of the outgoing links per slot is equal to that of point-to-point transmission.
In \cite{Ding2014Power}, the power allocation strategies and the resultant outage probabilities are studied in a cooperative communication system, where multiple source-destination pairs are connected by one single EH relay, as shown in Fig.~\ref{ding14}.
By exploiting simultaneous wireless information and power transfer (SWIPT) technologies, the source nodes transmit signals and energize relaying retransmissions.
Assuming that CSI is available at the transmitter, a centralized strategy is proposed based on the concept of sequential water-filling. Specifically, the strategy always serves users with better channel conditions first. Such an opportunistic scheme can minimize the outage probability of the system. A distributed auction based strategy is developed to balance between the overall system performance and the computational complexity, where the relay updates the power allocation scheme at each iteration after the destination nodes submit their bids to the relay.
\begin{figure}
\centering
\includegraphics[width=0.47\textwidth]{Ding14fig.pdf}
\caption{Cooperative communication using EH relay.}
\label{ding14}
\end{figure}
\section{Wireless Power and Information Transfer}\label{sec.wpt}
So far, energy is harvested from ambient environments (e.g. solar power and wind power)
and treated often as constraints in the optimization of wireless networks.
{\color{black} The approach arising from wireless power transfer (WPT) is able to}
provide a convenient and flexible way for EH that can be
performed anywhere, at anytime, under any weather condition, and for any desirable amount.
{\color{black} Practically, WPT can be realized by multiple different technologies,}
such as induction, magnetic resonating, and electromagnetic (EM) radiation.
As the low-power Internet-of-Things (IoT) devices such as sensors and tags proliferate in the 5G/B5G wireless networks,
how to power end users with green energy has become a critical issue for system designs.
{\color{black} WPT has arisen as a new and promising technique to offer on-spot and on-demand energy replenishment to wireless networks.
Since radio signals can transfer power and information simultaneously,}
study on SWIPT has been pursued for wireless communication systems.
\subsection{SWIPT-Enabled Single-Output Systems}
Earlier designs on SWIPT systems focus on single-input single-output (SISO) settings.
In particular, a SISO wireless link is considered in \cite{liuliang} where the receiver
{\color{black} is short of persistent power sources and has to restock energy through}
WPT from the signals sent by the transmitter.
{\color{black} The single-antenna receiver cannot decipher information and collect energy}
independently from the same communication signal.
A dynamic power splitting (PS) scheme is developed to
{\color{black} separate the communication signal into two fluids with adaptable powers
for information deciphering and EH, respectively, according to the CSI known at the receiver.}
The PS factors (PSFs) of the receiver and transmit power are
{\color{black} collectively optimized in \cite{liuliang} to achieve the largest ergodic capacity,}
satisfying the demand for EH amount.
Given the special structure of the non-convex optimization problem, the Lagrange duality
{\color{black} approach is employed to procure}
the globally optimal solution.
A Pareto-optimal algorithm is proposed in \cite{tdd} to optimally pick a terminal device and distribute its power budget
across the orthogonal frequency division multiplexing (OFDM) subcarriers under an SISO setting.
The maximum EE is attained in both of the forward and reverse link directions in \cite{tdd},
{\color{black} with known PSFs and uplink/downlink operating time.}
The sum rate in the uplink is maximized in \cite{har-then-tran} by optimizing the durations of both the uplink and the downlink,
where the terminals are attended one after the other in both of the uplink and downlink.
Combined
power allocation and time switching (TS) policy is developed in \cite{tang19} for an SISO NOMA system.
The EE of the network is maximized while
{\color{black} meeting the demands on transmit power budget, data rate, and EH amount per user.
A two-layer approach with the Dinkelbach method~\cite{Ished} is put forth to solve the problem.}
Some existing works are particularly interested in the downlink of MISO SWIPT
{\color{black} networks, and give no consideration to the uplink.
Given an access point (AP) installing multiple transmit antennas and the PSFs of multiple users each
operating a single receive antenna,
transmit beamforming techniques are investigated}
in \cite{6783665} and \cite{jointPS} in attempts to minimize the downlink transmit power of the multi-antenna AP,
while satisfying some given requirements of the transmit rate and EH amount.
{\color{black} SDR is applied to convert the original task into a convex program,
and suboptimal solutions are obtained by leveraging}
ZF \cite{6783665} and SINR maximization \cite{jointPS}.
Interference alignment is adopted in \cite{optimal} to
{\color{black} subdue interference among information transmission
and achieve the totally minimized transmit power in the downlink.}
The semidefinite programming (SDP) technique is applied in \cite{robust1,robust2,robust3} to extend \cite{jointPS} and \cite{optimal}
to enhance robust beamforming under imperfect CSI.
The EE of an SWIPT system is maximized in \cite{A1}
{\color{black} by considering a persistent circuit power at the AP, as well as the terminal stations.
Considerable circuit power is accounted only at the transmit node in \cite{A2},}
without addressing the receiver side.
Harvest-then-transmit policies have been applied to multiuser MISO systems,
{\color{black} where only the power is delivered through the downlink stream (as contrary to the transfer of both power and information in SWIPT).
In this scenario, power splitting at users would not be called for.}
Combined time splitting and beamforming design are considered in \cite{shenchao} to maximize the sum throughput.
{\color{black} In the scenario of perfect CSI at the transmit node, a semi-closed-form solution is developed
by utilizing the strict concavity of the problem.
Taking into account Gaussian CSI errors,
a robust approach is developed to maximize the sum throughput
given a channel outage probability requirement.}
The downlink energy beamformers
{\color{black} and the information transmit power and beamformers in the uplink
are collectively adjusted to achieve the maximum system throughput in \cite{MultiAntenna},
where all users can send data at the same time.}
A spectral radius minimization problem is
{\color{black} constructed and tackled in \cite{MultiAntenna} by leveraging the non-negative matrix theory.
Generalized eigenvectors are applied
to find the optimal beamformers and link operating time in \cite{VT}.}
The combined uplink and downlink sum rate is maximized in \cite{7874074}, without considering QoS in the downlink.
Non-linear EH model is considered in \cite{tran18} and \cite{zhou18} for a multiuser MISO system with SWIPT.
In \cite{tran18}, issues on power-efficient, user-fairness, and channel non-reciprocity are addressed
by a multi-objective optimization problem.
{\color{black} To secure the primary system, an artificial-noise-aided collaborative jamming policy is developed in \cite{zhou18}.}
Transmit power is minimized under secrecy rate and EH constraints.
Algorithms based on SDR or a cost function are developed for the problem.
\subsection{SWIPT-Enabled MIMO System}
Multi-antenna beamforming
{\color{black} can potentially enhance the implementation and operation of SWIPT.
An MIMO wireless broadcast network with three nodes is studied in \cite{rui13},
where, apart from a source node, one of the nodes gathers RF energy and another node receives information.
All of the nodes can have multiple antennas.
Two interesting cases are investigated in \cite{rui13}.
In the first case, the above-mentioned two nodes are far apart.
They have distinctive MIMO channels from the source.
In the other case, the two nodes separately receiving energy and information are
co-located and therefore they have identical MIMO channels from the source.
In the first case,
the optimal transmit policy is derived to optimally trade off information data rate for energy delivery,
as can be portrayed by a so-termed rate-energy (R-E) region.}
Fig. \ref{reseparate} \cite[Fig. 4]{rui13} plots this R-E region,
where $M, N_{\text{EH}}$ and $N_{\text{ID}}$ are the number of antennas at the source node,
the node harvesting RF energy, and the node receiving information data, respectively,
$Q$ is the total harvested RF power, and the transmit power is $P=1$W.
{\color{black} In the second case, the attainable R-E region is demonstrated,
which is potentially limited in practice due to the incapability of the EH node to decode information directly.
Restrained by this shortcoming, two practical operating policies}
are developed for the second scenario, referred to as time switching (TS) and power splitting (PS).
The attainable R-E regions of the policies are characterized in Fig. \ref{recolocate} (i.e., \cite[Fig. 8]{rui13}),
where $P=100$.
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{rui4.pdf}
\caption{The R-E region of a MIMO BC with two separate receiving devices for energy and information, where $M =N_{EH} =N_{ID} =4$
\cite[Fig. 4]{rui13}.}
\label{reseparate}
\end{figure}
\begin{figure}
\centering
\includegraphics[width=0.45\textwidth]{rui8.pdf}
\caption{The R-E region of a $2$-by-$2$ MIMO with a single receiver for both the energy and information, where
$\mathbf{H} =[1 ~0.8; 0.8~ 1]$ \cite[Fig. 8]{rui13}.}
\label{recolocate}
\end{figure}
Multiuser collaborative MIMO SWIPT networks are investigated in \cite{qin17}
{\color{black} where non-negligible circuit power consumption is included.
In specific, the authors of \cite{qin17} aim to maximize the overall data rate of all the active users in the system uplink
while providing satisfactory QoS to the downlink service of the users.
The task is then transformed into a convex program.
The beamformers and operating time, and the PSFs of every user are optimally designed
with a joint consideration of both the uplink and downlink.
SDP and golden search are used for the optimal design.
Additionally, an optimally selected subset of users are activated in \cite{qin17}, which is achieved by first activating the users at the beginning
and then turning off those contributing negatively to the growth of the sum rate.
Numerical results indicate that the approach developed in \cite{qin17} incurs a lower computational complexity
at a marginal penalty of sum rate, in comparison with the conventional combinatorial integer programming alternative.}
The authors of \cite{khan}
{\color{black} develop a malleable system structure to portray the performance}
of wireless power and information transfer enabled by an mmWave cellular network,
where devices can align their beams to that of the BS, or where no such beam alignment is undertaken.
{\color{black} For the two operating scenarios, the authors investigate the function of several device-dependent}
parameters on the system performance.
The authors find out that
the total (power and information) coverage probability can be enhanced by optimizing the PSF
to optimally allocate the received signal between the EH and the information decoding segments.
{\color{black} To utilize multiple antennas at the receiver with the least power consumption,}
they develop a simple switch-based receiver framework for SWIPT.
Many existing designs of SWIPT systems are based on Gaussian inputs,
{\color{black} which may result in significant performance deterioration
when applied to the situation with finite-alphabet inputs.}
Authors of \cite{zhu17} design the precoder for such situation, in the presence of
real-time CSI of an MIMO channel.
They construct the precoder design task as an optimization problem
{\color{black} to maximize the reciprocal information from the transmitter to the receivers,
constrained by the transmit power and a requirement on EH amount.
Since the problem is NP-hard, the global optimum cannot be obtained in a polynomial time.}
Utilizing its structure, they relax the problem to an SDP problem.
By applying the SDR technique,
they develop a general solver for both co-located and separated receivers to realize a near-optimal beamforming precoder.
In a special scenario where multiple receivers are co-located, the authors
demonstrate that the optimal design of the beamformer exhibits strong concavity in regards to the transmit power.
A specialized algorithm is developed particularly for this special scenario, and it
{\color{black} demonstrates in \cite{zhu17} nearly identical effect yet with a substantially lower complexity,
as compared to the SDR solution designed for the general scenario.}
In \cite{xing2013}, the authors investigate MIMO wireless communication networks
{\color{black} constrained by EH amounts.
The studied EH network includes
one transmitter, one receiver, and multiple EH nodes.
The EH nodes can convert their captured electromagnetic waves into power to
extend the system operating duration.}
When the transmitter sends data to the receiver, it should also optimize the beamforming/precoder matrix to charge the
{\color{black} EH nodes in the meantime.
Additionally, the amount of the charged energy should exceed a given threshold.}
Under the EH constraints, both the minimum mean-square-error (MMSE) and reciprocal
{\color{black} messages are considered as optimization metrics
to contrive the beamformers at the transmitter.
In order to make the developed approaches adaptable for real-world implementation with reasonable overhead,
the authors of \cite{xing2013} also generalize the beamforming policies with partial CSI.}
\begin{figure*}[th]
\centering
\includegraphics[width=0.7\textwidth]{system.pdf}
\caption{A smart grid-powered wireless cellular network \cite{wang2015}, where each BS serves several mobile users and is equipped with RES devices and batteries. The BSs can carry out bidirectional energy transactions with the smart grid, and share energy with other BSs through the aggregator.}
\label{system}
\end{figure*}
\section{Smart Grid-Powered Wireless Networks}\label{sec.sharing}
The traditional power grid is shifting to a ``smart'' one with many state-of-the-art new functionalities, such as smart metering, RES, demand-side management, dynamic pricing, and two-way energy trading. Powered by such an electricity grid with one or more emerging techniques, cellular networks can have more choices in energy types and can design energy-efficient operation schemes.
For example, there can be redundant energy at some BSs, which can be redistributed to power other BSs and their services.
Fig. \ref{system} depicts a typical framework of the smart-grid powered cellular networks,
where each BS serves several mobile users and is equipped with RES devices
(such as solar-electric converters and/or hydroelectric generators) and batteries.
The BSs can carry out redistribution of unused and/or redundant energy to enhance the EE across the entire systems.
Featuring (part of) the system model in Fig. \ref{system}, many recent works focus on enhancing system performances by
minimizing energy consumption and operational cost \cite{yeow14, gong14, che16, sheng17, hu17con, hu17, farooq, Xu15},
or maximizing system's efficiency and operator's utility \cite{ghaz17, ghaz, zhang17, rama}.
State-of-the-art techniques and methodologies, such as game theory,
DP \cite{dp1966, dp78, dp95}, and stochastic gradient descent (SGD) \cite{sgd10, sgd13, sgd15, sgd16}, can be leveraged.
The objectives and the solving techniques of the optimization problems are categorized and summarized in Table \ref{tab.trade}.
Game theory is applied when competition or cooperation exists in the system consisting of BSs and electricity retailers.
{\color{black} DP usually decomposes a sophisticated problem into a set of much easier subproblems with recurrence expressions.}
This relationship is known as Bellman optimality equation.
SGD is usually applied to achieve the asymptotically minimum time-average expenditure of a network
in no need of any prior knowledge
of system's randomness (such as the EH amounts and electricity prices).
The real gradient value of the objective is replaced with the gradient from the training set,
which helps to decouple the optimization and constraints over time.
It is proven that the optimality loss of the objective can asymptotically diminish by reducing the stepsize of SGD~\cite{sgdiot}.
The application scenarios, merits and disadvantages of some popular algorithms are summarized in Table \ref{tab.alg}.
Conditions and auxiliary methods applied to solve the problems are summarized in Table \ref{tab:aux}.
In Sections \ref{sec.sharing}, \ref{sec.purchasing}, and \ref{sec.trading}, we will review the literature on smart grid-powered cellular networks with different functionalities. We first focus on the RES powered systems in Section \ref{sec.sharing} and discuss the works on energy harvesting and sharing.
Then we steer the survey to smart-grid powered systems in Section \ref{sec.purchasing} with energy purchasing based on dynamic prices.
Finally, we review the works on two-way energy trading in Section \ref{sec.trading}.
\begin{table*}[t]
\renewcommand{\arraystretch}{1.4}
\centering
\caption{Optimization objectives and methods for smart grid powered communication systems}
\label{tab.trade}
\begin{tabular}{ | p{3.5cm}<{\centering} | p{1.8cm}<{\centering} | c | p{1.6cm}<{\centering} | c | p{0.8cm}<{\centering} | c | p{1.6cm}<{\centering} |}
\hline
\diagbox{\makecell{Optimization \\ methods}}{\makecell{Optimization \\ objectives}}
&\makecell{Total energy \\consumption} &\makecell{Operational \\ cost} &\makecell{Utility of \\ operators}
&\makecell{Energy/\\cost \\ efficiency} &\makecell{QoS} &\makecell{Weighted/ \\ expected \\ sum rate}
&\makecell{Long-term \\ average cost} \\ \hline
Online greedy/heuristic algorithm &\cite{yeow14, liu15} & & & & & & \\ \hline
Stochastic sub-gradient method & &\cite{Xujie15} & & & &\cite{wang2016} &\cite{wang2016dyn} \\ \hline
Lyapunov-based online algorithm & & & & & & &\cite{wang2016two, xiaojing2017, mao15, zhai15, dong17} \\ \hline
Stochastic or deterministic ADMM approach & &\cite{hu17con, hu17} & &\cite{zhang17} & & & \\ \hline
Lagrange dual based (sub-gradient) method &\cite{wang2015, shan16} &\cite{Xu16} & &\cite{xures} & &\cite{hu16con, hu16} & \\ \hline
Multi-stage or nested optimization &\cite{gong13, gong14, farooq, liu15} &\cite{Xujie15} &\cite{Bu12, bu122, bu13} & & &\cite{hu16} & \\ \hline
Ellipsoid method & &\cite{Xu16} & & & & & \\ \hline
Evolutionary algorithm & & &\cite{ghaz} & & & & \\ \hline
Iterative algorithm &\cite{sheng17, liu15} & &\cite{ghaz17, li2016} &\cite{rama} & & & \\ \hline
Dynamic programming &\cite{gong14} &\cite{che16} & & & & & \\ \hline
Game-theory based method & &\cite{Xujie15} &\cite{bu122, bu13} & & \cite{Bu12, ghaz14, li2016} & & \\
\hline
\end{tabular}
\end{table*}
\begin{table*}[t]
\renewcommand{\arraystretch}{1.5}
\centering
\caption{Analysis of algorithms}
\label{tab.alg}
\begin{tabular}{ | p{3.5cm}<{\centering} | p{3.5cm}<{\centering} | p{3.5cm}<{\centering} | p{3.5cm}<{\centering} |}
\hline
Algorithms &Application scenarios &Merits &Disadvantages \\ \hline
Greedy algorithm \cite{barron08, yeow14, liu15} & A wide range of problems & Obtaining local optimum in a fast and efficient way
& Seldom achieving global optimum \\ \hline
Deterministic ADMM \cite{zhang17} & Distributed computation & Fast convergence & Many samples needed per iteration to deal with stochasticity \\ \hline
Stochastic ADMM \cite{hu17con, hu17, ouyang2013} & Stochastic and distributed computation & One sample per iteration & Converging with oscillations \\ \hline
Lagrange dual-based sub-gradient method \cite{wang2015, Xu16, xures, hu16con, hu16} & Non-differentiable functions & Converging to global optimum for (pseudo)convex functions under certain conditions & Only locally optimal for non-(pseudo)convex functions; iterative computation \\ \hline
Stochastic sub-gradient method \cite{Xujie15, wang2016, wang2016dyn} & Time-coupling sub-gradients; sum-minimization problems where certain parameters are to be estimated & Smoother convergence; time-decoupling & Near-optimal; iterative computation \\ \hline
Lyapunov-based online algorithm \cite{wang2016two, xiaojing2017, mao15, zhai15, dong17} & Time-coupling long-term scheduling horizon; uncertain models &Time-decoupling; ensuring system stability and system penalty minimization & Near-optimal; iterative computation \\ \hline
\end{tabular}
\end{table*}
\begin{table*}[t]
\renewcommand{\arraystretch}{1.5}
\centering
\caption{Conditions and auxiliary methods}\label{tab:aux}
\begin{tabular}{ | c | c |}
\hline
Conditions and auxiliary methods & References \\ \hline
S-lemma & \cite{wang2015} \\ \hline
Semi-definite relaxation technique & \cite{wang2015} \\ \hline
Time-sharing condition & \cite{ng13} \\ \hline
KKT optimality condition & \cite{xures, shan16} \\ \hline
Uplink-downlink duality & \cite{Xu16} \\ \hline
Zero-forcing beamforming & \cite{Xu16, dong17} \\ \hline
Game theory (Nash bargaining, Stackelberg game ) &\cite{Bu12, ghaz14, bu122, bu13, li2016} \\ \hline
\end{tabular}
\end{table*}
\subsection{Utility Maximization}
Ramamonjison et al. \cite{rama} study the resource allocation problem for a two-tier wireless system,
where smart grid-powered BSs can share renewable energy and battery storage through the aggregator.
The authors aim to maximize the system EE
{\color{black} while meeting the demand of an average sum-rate at each cell.}
They first design an extended convex-concave procedure to tackle the non-convexity issue in the problem,
and then take a well-known Dinkelbach method \cite{Ished} to address the resultant subproblems.
The offline algorithms developed in \cite{rama} have a polynomial-time complexity
as the inner optimization problems can be
{\color{black} resolved in a polynomial time by standard convex solvers like the interior point method~\cite{boyd}.}
The authors of \cite{zeng2014} and \cite{zeng2016} design multi-antenna beamformer for EH transmitters
according to finite-alphabet inputs and the statistical knowledge of the CSI at the transmitters in real-time.
{\color{black} They aim to maximize
the sum of the average reciprocal messages within a channel frame without violating the causality of the EH process.
This results in a $2N_t^2$-dimensional stochastic DP problem.
The objective of the problem exhibits non-concavity
in which $N_t$ is the number of transmit antennas.
The authors of \cite{zeng2014} and \cite{zeng2016} prove the equivalence of the multi-dimensional stochastic DP problem
to a one-dimensional problem to select the transmit power level.
Dealing with the one-dimensional alternative can alleviate the computations without penalizing the optimality.
The one-dimensional alternative is first interpreted as
a discrete-battery-state discrete-power-choice task and solved by backward recursion \cite{Bert05};
and then translated to a continuous-battery-state continuous-power-choice task
and tackled by approximating the one-dimensional objective over a continuous feasible solution region.}
\subsection{User-Engaged Energy-Efficient Communication Scheme}
{\color{black} A resource allocation task is studied in \cite{xures} for energy-collaboration}
enabled two-tier heterogeneous networks (HetNets) with NOMA,
including a macro BS and several pico BSs.
User association and power control are optimally designed to maximize the efficiency in the energy utilization of
the whole system under QoS constraints.
To achieve this, a decentralized technique is first proposed to
{\color{black} draw the optimal user association given a transmit power.
Then, user association and power control are jointly and optimally specified.
This allows for far higher EE than other alternative policies, such as those developed in \cite{saito13, ding16}.
}
A network is proposed in \cite{niyato16} where mobile end users can share energy with each other at their encounter,
hence minimizing the
{\color{black} probabilities of inadequate energy for their consumption.
Optimization of the corresponding network contains two major stages.
The first stage shares energy optimally amongst the mobile end users}
who agree to share (in other words, a couple of matched users).
{\color{black} A stochastic optimization problem is constructed to acquire this optimal scheme,}
by considering the mobility patterns and the energy availability of the users.
The second stage of the developed network is to design
a steadfast user-matching policy.
{\color{black} Each individual of the users finds a peer as its partner to share energy.
The scheme drawn in the earlier stage can be utilized in such a way that a pair of well matched users
are most unlikely to undergo an energy outage.}
Energy-aware traffic offloading schemes are studied in~\cite{shan16},
where small BSs (SBSs) are powered by conventional electricity grid and/or RES.
User associations, on/off modes of SBSs, and power control are
{\color{black} collectively optimized based on
the statistical data of energy and traffic arrival.
In a single SBS scenario, the closed-form expression for energy saving gain is derived,
which facilitates the calculation of the SBS activation and traffic offloading strategy.
A two-phase energy-aware traffic offloading approach is further developed in a multiple-SBS scenario,
taking into account multiple characteristics of SBSs with a range of energy sources.}
A user association problem is first formulated in \cite{liu15} via convex optimization in the space dimension.
Total energy consumption is minimized by
{\color{black} allocating the traffic among different BSs
dynamically in a given time slot.
Then, RES allocation is optimized over different time slots for each BS to minimize the usage of the
energy from the grid.
To tackle this optimization task, a low-complexity offline approach with infinite battery capacity is designed
by assuming non-causal RES amounts and data traffic statistics.
The offline algorithm can achieve the optimality in this scenario, and play the role of a
performance upper bound for evaluating practical online approaches.
Heuristic online approaches with finite battery capacity are further developed
which are reliant only on causal RES and traffic information.}
\subsection{Minimization of Energy Consumption
Chia et al. \cite{yeow14} present a new model to describe energy cooperation among BSs powered by a smart grid
(including conventional electricity grid and RES), limited energy storage, and connection by resistive power lines
to share surplus electricity.
They aim to minimize the expectation of the electrical energy supplied by the conventional grid and utilized by the BSs, i.e.
\begin{equation}\label{ce}
\mathbb{E}_{E_i^t}\big[\frac{1}{T}\sum_{t=1}^T(w_1^t+w_2^t)\big],
\end{equation}
{\color{black} where $E_i^t$ is the EH amount captured by BS $i$ at time $t$,
$w_i^t$ stands for the energy procured from the traditional electricity grid,}
and $T$ is the total scheduling time horizon.
If the renewable energy profile (REP) and energy demand profile (RDP) of all the BSs
{\color{black} are deterministic or known in advance (Case 1),
the optimal energy collaboration scheme for BSs can be awarded straightforwardly by tackling a relatively simple linear programming problem,
since the objective function in \eqref{ce} is simplified linearly to be}
$\sum_{t=1}^T(w_1^t+w_2^t)$,
and all the constraints of \eqref{ce} are linear in the first place.
If the REP and RDP are two stochastic processes and only causally known at the BSs (Case 2),
Chia et al. propose a greedy online algorithm by {\color{black} taking a quick picture of the aforementioned linear optimization problems}
(Case 1) with $T=1$.
Let $r_{\alpha}$ and $r_{\beta}$ be the energy loss coefficients
which describe the ratio of loss during charging the battery and transferring energy between BSs, respectively.
Chia et al. \cite{yeow14} analyze the optimal structural properties of the greedy online algorithm under certain conditions.
For example, if $r_{\beta}=0$ or $r_{\beta}=1$, the greedy method can preserve optimality for any feasible energy profiles.
If $r_{\beta} \ge r_{\alpha}$, then energy transfer is optimal.
That is, if $E_1^t \ge 0 \ge E_2^t$ at time slot $t$, then sending $\Delta = \min \{|E_2^t|/r_{\beta}, E_1^t\}$
units of electricity from BS $1$ to BS $2$ to {\color{black} make up for the shortage of $E_2^t$ is part of an optimal scheme.}
If $E_1^t \geq 0, \forall t$ and $r_{\beta} \ge r_{\alpha} $, the greedy policy is optimal.
According to the symmetry between $E_1^t$ and $E_2^t$, the same result holds if $E_2^t \geq 0, \forall t$ and $r_{\beta} \ge r_{\alpha}$.
Chia et al. \cite{yeow14} also provide insightful analysis and conclusions:
i) for the optimal scheme, no electrical energy should be bought to increase the battery levels from the grid;
ii) a system beginning with highly charged batteries can have a low optimal cost;
and iii) it is more cost-saving to save energy locally at each BS than to transfer and save the energy at the other BS.
On the other hand, it is reasonable to assume partial knowledge of REP, which consists of
a deterministic waveform with small random noises added at each time slot as the prediction errors.
Inspired by the aforementioned two cases, the authors of \cite{yeow14} then propose a
{\color{black} compound approach which can utilize offline statistics
about the REP and operate in an online fashion.
They use the non-real-time offline approach to draw the adequate policy (or schedule) for the deterministic part of the
REP, and then apply the greedy heuristic to recoup any gaps pertaining to non-negligible noise effects.}
The average grid power consumption is minimized in \cite{gong14} for RES-powered BSs
under users' QoS (blocking probability) constraints.
The task is converted into an unconstrained optimization problem to minimize
the weighted sum of the grid energy usage and blocking probability.
{\color{black} A two-phase DP approach is developed
by leveraging statistical data for traffic load and RES.
The BSs' on/off
modes are optimally decided in the first phase.}
The active BSs' resource blocks are assigned iteratively in the second phase.
Compared with the optimal collective BSs' on/off modes and active resource blocks allocation approach,
{\color{black} the proposed approach significantly decreases
the computational complexity
and can realize the optimal operation when the traffic obeys a uniform distribution.}
The grid energy expenditure is minimized for smart grid-powered cellular networks in \cite{sheng17}.
The task is formulated as an NP-complete mixed-integer nonlinear program.
For centralized systems, a cost-aware approach is designed to tackle the load distribution problem
and the energy configuration problem in an alternating manner.
The centralized algorithm requires a low computational complexity, and rapidly converges to the near-optimal solutions.
For distributed networks,
{\color{black} a three-stage decentralized ruling scheme is proposed in \cite{sheng17} where the BSs and mobile terminals can independently calibrate
their individual policies only based on limited knowledge locally accessible to them.}
System expenditure can be greatly reduced in both types of networks.
\subsection{Lyapunov-based Online Optimization}
The grid energy consumption (GEC) is minimized in \cite{zhai15} for a smart grid-powered
queueing orthogonal frequency-division multiple-access (OFDMA) system with battery leakage.
{\color{black} By considering the temporal variation of the network, the GEC minimization task is formulated
to collaboratively design the admission regulating, power assignment,
subcarrier distribution, and communication duration.
The random RES amounts are simplified to be an i.i.d. process.
By taking advantage of the state-of-the-art Lyapunov optimization, an efficient online approach is developed,
termed as leakage-aware dynamic resource allocation strategy.
This strategy tracks present system states which consist of CSI and battery level}
with no need for the a-priori knowledge on the states.
Furthermore, it is proven that the minimum GEC value can be
{\color{black} reached asymptotically with the proposed approach.}
The network service cost is introduced in \cite{mao15} as a performance metric
to account for both the grid
{\color{black} power usage and attainable QoS.}
A computationally inexpensive online approach is proposed to minimize the average system service expenditure
over a long time by conducting joint BS association and power control (BAPC),
referred to as the Lyapunov optimization based BAPC (LBAPC) algorithm.
{\color{black} A merit of the approach is that the decisions rely solely on the instantaneous state knowledge with no need for any
a-priori knowledge on the distribution statistics of CSI and EH processes.
To decide the system activity,
only a deterministic problem needs to be solved at every time slot.
A simple inner-outer optimization approach is developed to provide effective solutions to the deterministic problem.}
It is further proven that the LBAPC approach is asymptotically optimal,
as the control parameter $V$ (with unit J$^2$/cost) $\rightarrow \infty$.
\section{Energy Planning Under Dynamic Pricing}\label{sec.purchasing}
Dynamic pricing is a vital mechanism of smart power grids.
It can help shift some load in peak time to off-peak time,
and thus balance the power consumption in these two periods for the power grid.
Cooperative BSs can plan their energy purchasing, storing, and sharing jointly according to the prices
to reduce the system-wide operational expenditure.
\subsection{Operational Cost Minimization}
In \cite{che16}, the on-grid energy expenditure is minimized in a large-scale green cellular system
{\color{black} by collectively designing the optimal BS on/off strategy and electricity procuring scheme.}
The green cellular network often experiences fluctuations brought by RES, energy prices,
{\color{black} wireless data traffic, BS coordination, and traffic offloads.
Hence, it is usually NP-hard to obtain the optimal scheme that minimizes the electricity
expenditure over a long-term meanwhile guaranteeing the users' QoS.}
For a dynamic system design, stochastic geometry (Geo) can be applied to account for
large-scale wireless network.
DP can be used to develop adaptive on/off schedule of the BS
and the electricity procurement.
{\color{black} By integrating these two aspects, a new
Geo-DP design is shown to guarantee that the optimal probability of the BS being activated (or staying ``on'')
can just suffice the QoS requested by the users.
Nonetheless, the typical curse of dimensionality of DP \cite{dp1966}
prevents the optimal electricity procurement scheme from scaling up to large-scale wireless networks.
Therefore, a suboptimal energy procurement scheme with a low complexity is put forth,
where on-grid electricity is procured in abundance with an adequate price only if the present battery reading
and the expected future RES level are both low.}
This suboptimal policy can realize a near-optimal performance.
\subsection{Utility Maximization}
The authors of \cite{ghaz} aim to maximize the profit of
cellular operators meanwhile minimizing the CO$_2$ emissions in green cellular networks
and satisfying the desired QoS.
The cellular network is powered by the smart grid where electricity retailers sell renewable energy to the BSs.
Energy from different retailers may have various types, and thus have distinctive prices and pollutant levels.
The BSs' sleeping policy and electricity purchase policy are decided via several algorithms,
such as an iterative algorithm and an evolutionary algorithm
(including the genetic algorithm and the particle swarm optimization method).
For the iterative algorithm, it is assumed that all BSs are switched on at the beginning.
{\color{black} Then, at each precluding stage, one BS is shut down at a time.
For the $i$-th precluded BS, the corresponding optimal utility function is calculated
and compared with the previous maximum utility to determine whether precluding BSs is possible or not.
The algorithm terminates when there are no more BSs to be precluded.}
The utility of the mobile operators is maximized in \cite{ghaz17}, which collaboratively make decisions on
energy procurement and BS sleeping policy based on profits,
network demands, retailers' capacity, and CO$_2$ emissions.
Energy harvesting, dynamic pricing, and energy sharing are implemented in the framework
to help reduce energy consumption of the network.
Three utility metrics are introduced to
{\color{black} measure the level of fairness}
in optimization, including the weighted sum, the max-min criterion, and proportional fairness (PF).
The sum utility metric measures and quantifies the overall profit of the network.
This metric promotes operators with higher revenues, while depriving the possibility for low-revenue operators
to purchase the cheapest energy.
The max-min metric maximizes the minimum profit across the network, thus improves fairness to the system.
The PF metric maximizes the geometric mean of the profits, which can efficiently avoid very low profit since
a close-to-zero profit would
{\color{black} cause the entire objective function to diminish.}
Given the BSs' on-off state, the energy procurement problem exhibits convexity and can be readily tackled by the Lagrangian method.
Given the optimal energy procurement, the BS on-off switching problem is non-convex.
A deterministic iterative approach is first developed to establish the optimal on-off policy for the BS in a centralized fashion.
Later, a decentralized algorithm is proposed with faster convergence and lower complexity,
yet penalizing performance gain.
\subsection{Game Theory for Energy Procurement}
Liberalization of the electric power market has been advocated in many countries and regions \cite{Bu12},
where electricity retailers can set their prices and compete for best interest.
To achieve energy-efficient green communication,
it is necessary to consider data traffic, dynamic electricity price, the pollutant level {\color{black} incurred by brown energy} consumption,
and the robustness of the smart grid when shaping green wireless cellular mobile systems.
Every BS is expected to choose its most cost-effective electricity retailers at any moment
for economical and ecological profits \cite{Bu12}.
Aligned with this goal, the smart-grid powered cellular network system is constructed
as a two-level Stackelberg game in \cite{Bu12, ghaz14}.
At the cellular network level,
the active BSs can choose the electricity retailers and the corresponding purchasing amounts,
aiming to achieve the lowest service blocking probability with the least possible expenditures.
At the smart grid level,
the retailers can decide on their electricity prices such that they can acquire as much extra profit as possible,
competing to get selected by the BSs at the same time.
Based on the Lagrange dual method, the existence and uniqueness of the Stackelberg equilibrium
are proven in \cite{Bu12} for the proposed Stackelberg game;
while an iterative algorithm with low complexity is applied in \cite{ghaz14} to draw the optimal solutions.
It is shown that the smart grid has substantial influence on green wireless cellular systems,
{\color{black} and the developed strategy can greatly diminish the energy expenditure}
and $\text{CO}_2$ emissions in these systems.
The same mechanisms developed in \cite{Bu12} and \cite{ghaz14} are extended to
a three-level Stackelberg game for cognitive HetNets in \cite{bu122, bu13},
where the three parities in the game are smart grid retailers, macro-cell BSs (MBSs), and femto-cell BSs (FBSs).
A homogeneous Bertrand game is designed to model the price decisions made by the retailers.
Then, a backward induction approach is leveraged to analyze the designed game.
It is observed that both the FBSs and the MBSs intend to choose the electricity retailer with the cheapest price.
The electricity prices are set according to the Nash equilibrium at the smart grid level.
In this case, no retailer can increase its individual net
{\color{black} profit by selecting a different price,
given the prices provided by the other retailers.}
The RES is utilized to power millimeter-wave (mmWave) backhaul networks in \cite{li2016},
{\color{black} where wireless operators purchase electricity from several renewable power suppliers
to support mobile terminals.
A lead time-dependent pricing strategy is developed, which enables a wireless operator to control
the latency of traffic and service deliveries over the backhaul links and coordinate the suppliers to decide on
how much RES to be stored at each supplier.
The task is constructed as a standard Stackelberg game between the network operator and several renewable power suppliers.
Different from \cite{Bu12, ghaz14, bu122, bu13},
the wireless operator acts as the leader in this game, who determines the pricing mechanism for the power suppliers,
while the suppliers play the followers who decide their self energy storage policies according to any given pricing scheme.}
In a centralized network, the operator and the renewable power suppliers jointly maximize the system profit \cite{li2016},
while in a decentralized one, the operator and the renewable power suppliers maximize their individual profit.
{\color{black} Effective decentralized methods are developed in \cite{li2016} to acquire the optimal pricing strategy of the wireless operator,
and the Pareto equilibrium storage policies for the suppliers, respectively.}
Both the algorithms start by treating each renewable power supplier as a separate group.
For the operator's game, the algorithm merges two neighboring groups in each iteration.
For the suppliers' game, the algorithm decides whether or not to merge two groups
by comparing their supportable traffic loads in each iteration.
Both algorithms stop when no more mergers happen.
{\color{black} It is also shown in \cite{li2016} that the proposed distributed policy allows a wireless operator to generate a}
higher profit than a centralized scheme.
{\color{black} Traditional electricity market is shifting to a ``smart'' one, offering several electricity purchase policies and their combinations
for mobile network operators (MNOs) of cellular networks.
It can be possible for the MNOs to prepay for electricity day-ahead
at a relatively economical price and also purchase electricity based on a real-time demand at
a relatively high and less economical price, respectively \cite{dms06}.
To reduce the power expenditure, it can be very important for MNOs to comprehensively organize}
their day-ahead and real-time electricity purchases {\color{black} according to their dynamic traffic load over time.}
The BSs of the MNOs can offload their traffic and services, so as to switch the most number of lightly-loaded BSs
into the sleep state for system-wide energy-efficiency.
To this end, the authors of \cite{Xujie15} take two different MNOs {\color{black} co-located in a region for an example.
The two MNOs interplay in both electricity procurement and traffic load balancing for operational expenditure reduction.}
The two MNOs can both intend to minimize their own electricity expenditure,
two-phase stochastic programming is adopted to draw the optimal policy for electricity group purchasing with load balance.
In the case where the two aforementioned MNOs are from two competitive organizations
and are only interested in minimizing their own electricity expenditures,
the authors of \cite{Xujie15} develop a repeated Nash bargaining scheme,
where the MNOs bargain and split electricity expenditures
under electricity group purchasing and load sharing.
At the first stage, the two MNOs settle the deals on the day-ahead electricity group purchase,
as well as how to {\color{black} split the collective electricity} commitments between them,
by considering the potential real-time collaboration benefits.
At the second stage, under given day-ahead electricity commitment and the corresponding electricity group buying,
the two MNOs negotiate in real-time at each slot $t$ about the real-time electricity group purchasing,
and how to {\color{black} allocate the collective electricity} trading amounts, the wireless loads, and the inter-MNO payment.
This Nash bargaining scheme can {\color{black} realize Pareto-optimality and,
in turn, the effective electricity expenditure decreases for both MNOs.}
\section{Two-way Energy Trading and Cooperation}\label{sec.trading}
The electricity bills of cellular operators continue rising due to explosive demands for wireless services
in the 5G and beyond communication networks.
The BSs are seeking new approaches to diminish the energy expenditure with the integration of RES.
The bidirectional electricity trading capability of smart power grids allows the cellular BSs
to sell their redundant renewable energy to the grid for profit,
which is a straightforward way to save the operational costs.
\subsection{Energy-efficient Schemes}
With the spatial variations of user density, data traffic, and the amount of RES,
it is more efficient for the BSs to collaborate and jointly schedule their energy, wireless resources, and/or downlink users.
An energy-efficient framework is proposed in~\cite{Xu15} where different BSs
share or trade electricity with the assistance of an aggregator in a smart power grid,
and/or share radio resources and offload traffic {\color{black} to cut off the operating expenditure.}
The following three approaches are presented to achieve this goal.
The first approach is energy collaboration on the side of power supply.
The BSs use a bidirectional flow to merchandise redundant electricity with the smart grid or share renewable energy with each other
through the aggregator.
The two BSs in the same group schedule the energy to be injected to, or drawn from the grid simultaneously,
since their energy surplus and deficit can be matched.
The energy demands for communications are specified and analyzed.
The second approach is communication {\color{black} collaboration} on the demand side.
{\color{black} The BSs perform cost-oriented wireless communication collaboration to share resources and
reschedule traffic load both spacially and temporally,
by considering a preset amount of the energy (RES and/or traditional).}
Three different cost-oriented schemes are typically studied for various time scales to achieve such cooperation.
The first cost-oriented scheme is traffic offloading \cite{niu2010cell},
where the BSs {\color{black} in short of RES can transfer their users to adjacent BSs
with ample RES (even if they bear heavier traffic}), to reduce the total amount of electricity purchased from the smart power grid in an attempt to save the operating expenditure.
Traffic offloading can be executed on a basis of several seconds.
The second cost-oriented scheme is spectrum sharing \cite{golds2009},
where BS$1$ shares {\color{black} a portion} of its available spectrum with BS$2$.
Under the same users' QoS constraints, BS$2$ can reduce its transmit power procured from the grid,
while BS1 consumes more RES for transmission. Hence, the total cost is diminished.
This can be implemented at a time scale of minutes.
The last cost-oriented scheme to achieve cooperation is CoMP \cite{gesb2010},
{\color{black} which helps pair the BSs' transmit power with their EH amounts}
by accommodating the BSs' transmit signals.
In particular, the BSs with larger RES amounts are expected to use higher transmit powers to provide stronger wireless signals to the users.
CoMP runs at a symbol- or frame-level on a typical basis of microseconds to milliseconds.
This can be much complicated but save more energy budget,
as compared to the two earlier schemes developed in \cite{niu2010cell} and \cite{golds2009}.
The third approach to achieving bidirectional energy trading and sharing is joint cooperation of energy and communication
from both the sides of demand and supply.
The BSs collaborate to {\color{black} reduce their operating expenditure} (i.e. electricity bills) to the greatest extent.
A small cell network (SCN) with EH capabilities is studied in \cite{mao215}, from the perspectives of
outage probability, system performance, grid power consumption, and cell association.
Analysis and simulation in \cite{mao215} reveal that the outage probability declines with the density
of the BSs deployed in the SCN (denoted as $\lambda_{BS}$),
and that the grid power consumption $P_G$ also decreases with $\lambda_{BS}$.
To reduce $P_G$ or enhance system performance, it is more efficient to increase $\lambda_{BS}$ than it is to increase the EH rate.
When $\lambda_{BS}$ is extremely small or large, the battery capacity has little impact on $P_G$ or system performance.
As for cell association schemes,
the distance-based policy suffers performance loss as it overlooks the spatial variation of available energy at different BSs.
Therefore, conventional cell association strategies cannot be directly adopted in EH-SCNs.
It is demonstrated in \cite{mao215} that the SNR-based scheme outperforms the distance-based scheme,
as it utilizes information on both the distance and the current energy state.
However, it still undergoes performance degradation as it makes decisions only {\color{black} according to the present} system state
and overlooks the coupling in different transmission blocks among different users.
\subsection{Minimization of Operational Cost}
A transmit beamforming scheme is designed in \cite{hu17con, hu17} for a coordinated multicell system,
where the transmission is powered by a smart power grid.
Operating in a distributed fashion, the scheme uses the state-of-the-art stochastic alternating direction method of multipliers (ADMM) \cite{ouyang2013}.
The conditional-value-at-risk (CVaR) cost~\cite{rock2002, quar2008} is introduced to reduce the risk of extremely high cost of the system.
The long-term SINR is considered to guarantee users' QoS based on the stable downlink channel covariance matrices
$\mathbf{R}_{ijk}$, where $i,j \in [1, \ldots, I]$ are the BS indexes.
It is proven that when $\text{rank}(\mathbf{R}_{ijk})=1$ or when the number of BSs $I \leq 2$,
the optimal beamforming matrices $\{\mathbf{W}_{ik}^*\}$ of the SDR problem is always rank-one,
which means that the relaxation is tight, and the solutions $\{\mathbf{W}_{ik}^*\}$ are globally optimal.
Simulation results verify the tightness of the SDR in general cases.
The problem is solved offline in a distributed fashion via the stochastic ADMM without the {\em a priori} knowledge of the
EH amounts and electricity prices $\{s_i\}$.
The BSs update their primal and dual variables by visiting one sample of the historical realizations of $\{s_i\}$ at each iteration.
The historical realizations are stored in the data base of each BS $i$.
The BSs do not have to communicate their inter-BS interference powers with each other in this way,
which greatly reduces signaling and backhaul overheads.
\subsection{Utility Maximization
{\color{black} The idea of cost efficiency (CE) is applied in \cite{zhang17} to calculate the total data rate transmitted at the cost of a dollar}
for micro-grid (MG)-powered BSs.
The MG has smart grid features such as RES, bidirectional electricity trading, and dynamic price adjustment.
CE is maximized by jointly scheduling the electricity generation in the MG and optimizing the transmit power of the BSs.
The CE maximization task includes constraints accounting for the strong multivariate coupling over time.
To address this formulated fractional optimization problem, the Dinkelbach method is first applied.
Then a low-complexity method exploiting the ADMM approach is developed.
Several auxiliary variables are introduced to split variables into two sets, so that
the constraints capturing the different coupling are separable between the two subsets of all the optimization variables.
Consequently, the approach developed in \cite{zhang17} only accommodates simple updates at every step,
and thereby permits decentralized executions.
The approach is ensured to converge to the global optimum of original maximization of the CE.
Farooq et al. \cite{farooq} propose a mixed energy redistribution framework for mobile cellular networks,
which combines physical power lines and energy transaction between the BSs facilitated by the smart grid.
{\color{black} According to the average value or the full statistics of the availability of the RES,}
algorithms are proposed to optimally deploy physical power lines between the BSs.
Taking into account the battery volumes and dynamic electricity pricing,
{\color{black} a framework is
developed to schedule energy, and determine the optimal amounts of energy
and RES to be obtained and shared among the BSs, respectively.
Three cases are studied, in which the RES amount is unknown,
fully known, and partially known, in advance.}
\subsection{Lyapunov-based Online Optimization}\label{sub.lyap
Based on \cite{wang2016two}, two-way trading and multi-timescale planning of energy in 5G networks are presented in \cite{xiaojing2017},
where implementation challenges are discussed, and the use of stochastic control theory is studied.
{\color{black} The Lyapunov control theory is evaluated for potential applications.
The concrete usefulness of the theory can be validated by numerical simulation results in practical scenarios without
knowing the future CSI, transaction prices and EH amounts.}
{\color{black}
The long-term energy cost minimization problem is studied in \cite{dong17}
for a smart grid powered communication network.
Facilitated by the two-way trading mechanism in the network, a harvest-use-trade strategy is selected
to deal with the shortcomings of the batteries
to enhance usage efficiency of the RES.
With the help of the Lyapunov optimization technique and the Lyapunov drift-plus-penalty function,
the stochastic optimization problem is reformulated into a joint minimization problem of energy
and packet rate.
Two suboptimal algorithms are proposed to tackle the NP-complete problem by considering
the CSI and the packet detection failure,
featuring the techniques of successive approximation beamforming (SABF)
and zero-forcing beamforming (ZFBF) \cite{wiesel2008}.
}
\section{Applications of Energy Harvesting and Smart Grid-Powered Wireless Communications to 5G/B5G}\label{sec.app}
The importance of energy harvesting and smart grid-powered wireless communications has also been found in many emerging applications in the 5G and beyond wireless networks,
such as mobile edge computing, machine learning, NOMA, URLLC, and so forth.
\subsection{Mobile Edge Computing (MEC)}
{\color{black} Many recent and emerging developments of the IoT have opened up possibilities for a wide range of new mobile applications, requiring low-latency communication and intensive computation over massive mobile devices.
The emerging MEC has offered a new paradigm to offload computing workload from mobile users.
This can enhance computation capability for mobile users by leveraging remote execution,
and significantly reduce communication latency by having servers placed in the proximity of mobile users.}
By integrating the network function virtualization (NFV) techniques, MEC provides flexibility on the resource scheduling and service deployment~\cite{chen18m, chen19auto}.
Initial investigations~on~EH powered MEC systems have been conducted i
\cite{xu2016online,guo2018joint,zhang2018energy,zhang2018distributed,
mao2016dynamic,min2019learning,wei2018dynamic, feng17, lyu17},
focusing on EH-based MEC servers~\cite{xu2016online},~\cite{guo2018joint} and EH
mobile~users~\cite{zhang2018energy,zhang2018distributed, mao2016dynamic, min2019learning, wei2018dynamic, feng17}.~In~\cite{xu2016online, feng17}, the system operator learns online {\color{black} the task amounts to be offloaded from the MEC server to the central cloud and the CPU frequency of the MEC server, based on the states of core network congestion and RES.}
Considering inter-cell interference in dense small cells, a distributed three-stage strategy is proposed in \cite{guo2018joint} to jointly
optimize task offloading, channel allocation, and computing resource allocation by decomposing the original problem.
Considering practical stochastic system environments, algorithms based on Lyapunov optimization techniques \cite{zhang2018energy,zhang2018distributed,mao2016dynamic} and deep learning \cite{min2019learning,wei2018dynamic}
have been used to produce dynamic task offloading and resource allocation strategies.
\subsection{Deep (Reinforcement) Learning}
Deep (reinforcement) learning has been widely employed in image processing and natural language processing \cite{krizhevsky2012imagenet,ren2015faster}.
{\color{black} It has also been increasingly used to solve challenging
(in many cases, non-linear non-convex) problems in wireless communication systems,
e.g., Polar decoding \cite{Gruber2017On, Cammerer2017Scaling}
and massive MIMO channel estimation \cite{He2018Deep, Wen2017Deep}.
Deep neural networks (DNNs) are able to solve sophisticated non-convex problems without explicit mathematical formulations~\cite{Sun2017Learning,Lee2018Deep,Wang2018A}.}
Several recent works have investigated the EH-based wireless communication systems
where deep learning is utilized as an optimization method~\cite{do2019dynamic,kim2018action,chu2018reinforcement}.
\subsection{Non-Orthogonal Multiple Access (NOMA)}
{\color{black} NOMA is a useful method to improve the spectral efficiency of wireless communication systems.
NOMA transmitters adopts superposition coding (SC) to stack the signals destined for multiple destinations or users.
Successive interference cancellation (SIC) is carried out at each of the destinations or users to extract the signals of interest
and suppress those intended for the others.
NOMA is able to connect}
multiple active users by using a single piece of time-frequency resources \cite{nomagsvd, nomaoppo},
and outperform its orthogonal counterpart in terms of spectral efficiency (SE) and flexibility.
EH-based NOMA is attracting increasing interests \cite{Zhang2017Performance,Min2018Energy,Alsaba18}.
In \cite{Zhang2017Performance}, a NOMA-based relaying network is
analyzed with a EH powered relay node to enhance system SE and user fairness.
{\color{black} The outage performance of the network is examined, in which the transmit antenna selection is applied at the BS and maximal ratio combining (MRC) is applied at the end users. Closed-form formulations are established for the outage probability.}
Min and Meng \cite{Min2018Energy} study energy-efficient resource management for NOMA-based wireless powered sensor networks
{\color{black} by constructing a EE maximization task regarding the EH time and transmit powers.
A particle-swarm-optimization-based approach is derived with fast convergence
by analyzing the structure of the optimization problem.
In~\cite{Alsaba18}, NOMA is first leveraged with beamforming to support several users in each beamforming vector.
SWIPT is applied to NOMA systems in \cite{nomarelay, nomasumrate, nomaswpt}.
It is proven in \cite{nomarelay, nomasumrate, nomaswpt} that integrating SWIPT not only facilitates cooperation among users,
but also alleviates the level of self-interference stemming from signal leakage from the output to the input.
Furthermore, the task of the total sum rate maximization is constructed
and tackled via a two-step convex programming based process.
The outage probabilities of both weak and strong users are established with closed-form solutions deduced.}
Some existing works have studied the power allocation on the multicast-unicast transmission \cite{nomapower},
spectral efficiency and confidentiality \cite{nomase} of NOMA,
as well as comparisons of system capacity between the emerging MIMO-NOMA and the existing MIMO-OMA~\cite{nomacapa}.
Transmit antenna selection at the BS is studied in~\cite{nomarelay}.
The weighted sum-rate is maximized for an SWIPT enabled cooperative NOMA system in \cite{nomasumrate},
by optimizing the power arrangement of the source and the
{\color{black} PS coefficient at the users.
A new collaborative SWIPT NOMA network is developed in \cite{nomaswpt}, where the NOMA users near the source can
serve as EH relays to assist NOMA users far away.
Closed-form outage probability and sum throughput validate that
the application of SWIPT does not compromise the diversity gain, as compared with conventional NOMA.
It is confirmed in \cite{nomaswpt} that the opportunistic choice of node locations for picking users can realize a low outage probability
and yield better throughput than random picking schemes.}
\subsection{Ultra-Reliable Low Latency Communications (URLLC)}
5G/B5G mobile cellular networks are expected to support URLLC
which is expected to offer substantially short processing and transmission delays ($< 1$ ms),
meanwhile securing strong reliability (i.e. about $99.999\%$ successful delivery rate).
Resource allocation are studied
to enable URLLC in an OFDMA downlink in \cite{urharq, urmulti},
by minimizing the required system bandwidth or maximizing the system
{\color{black} sum rate under QoS requirements.
An optimization problem is constructed}
in \cite{urpayload} to find the payload allocation weights that maximize the reliability
at targeted latency values.
A risk-aware machine learning approach is proposed for URLLC traffic management in \cite{urmachine},
by minimizing the risk of loss.
An SWIPT-enabled URLLC network is studied in~\cite{urswpt},
{\color{black} where the credibility of the system is maximized by choosing the optimal SWIPT parameters
based on both the PS and TS protocols.}
\section{Lessons Learnt and Future Research Directions}\label{sec.future}
This article reviews the RES/smart-grid powered wireless communication systems, including
single point-to-point link, multi-hop link, multipoint-to-multipoint system, multi-point-to-point system, and multi-cell system.
In this section, we draw useful insights from the literature and explore promising future research directions.
\subsection{Point-to-Point Links}
As reported in Section \ref{sec.single}, one of the most popular techniques is the Lagrange multiplier method
which is applied to convex programming, as shown in Fig.~\ref{roadmap}.
The method has been utilized to unveil the underlying optimal structure of data transmission policies.
Several main challenges are worth future research.
\subsubsection{Learn-and-Adapt Algorithms for EH Systems}
Most existing works assume non-causal information about the EH, data arrivals and channel states
in the typical offline optimization framework, which is generally impractical. In the online scenario, the existing studies,
such as \cite{Xu2012Throughput,Chen2016Optimal} and \cite{gong13},
assume that there exists no a-priori knowledge on these system variations,
and develop heuristic schemes.
A potential online optimization technique is to employ learn-and-adapt algorithms \cite{chen17, chen19}
{\color{black} which are expected to learn online the EH, data arrival processes and channel states,
and adapt the transmission strategy accordingly.
In \cite{blas}, Q-learning is considered to learn the optimal transmission policy with the EH,
data arrivals and channel states modeled as Markov (decision) processes.}
Exploring other learn-and-adapt algorithms with affordable complexity is an interesting research direction.
\subsubsection{Multi-User Networks and Energy Cooperation}
From a networking point-of-view, data transmission of multiple users/nodes (such as multi-hop and multiple-access networks) is of potential interest.
{\color{black} The computational complexity of specifying the optimal data schedules increases generally with the user number.
Even in a two-hop link, the data schedule of the source can affect the data arrivals at the relay,
thus coupling strongly the transmission policy over the system \cite{Gunduz14design}.
Additionally, the causal information over different users is hard to obtain in practice.
Optimal schedules based only on current information need to be further investigated.}
Some basic multi-user scenarios have been studied in the literature, as summarized in Sections IV and V.
\subsection{Multipoint-to-Point Systems}
Apart from the data scheduling and energy management techniques for EH-powered multi-access networks
reviewed in Section \ref{sec.multiaccess},
potential future research directions are as follows.
\subsubsection{Power Allocation for EH-powered NOMA}
The power allocation policy for NOMA determines the interference cancellation capability of the receivers, and directly affects the throughput and user fairness of NOMA \cite{Dai2018A}. For EH-powered NOMA, power constraints need to be involved in the development of power allocation schemes.
The optimal scheme can be obtained by searching through the entire legitimate solutions (satisfying the power constraints),
which would lead to an excessively high complexity.
Low-complexity and dynamic power allocations constitute a promising research topic for future work.
\subsubsection{Channel Estimation and EH Prediction}
Most works on multi-access networks assume perfect CSI and non-causal information about EH, which is hardly possible in practice.
The design of practical channel estimators for NOMA is studied in \cite{Tan2016Novel} and \cite{Struminsky2016A},
and optimal approaches have been proposed to reduce the channel estimation errors.
However, the increase of the user number in 5G/B5G systems is expected to result in severe inter-user interference and,
in turn, severe channel estimation errors.
Moreover, few works have considered EH prediction for multi-access systems.
To this end, advanced channel estimation and EH prediction methods are required for multi-access systems.
\subsection{Multipoint-to-Multipoint Systems}
Existing studies on RES powered CoMP systems typically amount to minimize the total energy or cost.
Lagrangian dual-based methods and Lyapunov optimization methods are two popular classes of techniques used.
The optimality can be often achieved for convex problems, while asymptotic optimality is typically possible for online optimizations.
Some further research effort could be helpful to further advance the following aspects.
\subsubsection{Implementation of Uplink CoMP Techniques}
Most existing works study the joint transmission and energy management in RES powered downlink CoMP systems.
However, in practical network implementations, CoMP also supports
{\color{black} accentuations to uplink reference information,
power regulating,}
and signaling for coordinated uplink reception (CoUR) \cite{lee12}.
An important feature of CoUR is to decouple the multiple points which
{\color{black} send downlink signals from those which receive uplink information.}
The implementation of CoUR includes coordination and exchange of information among reception points,
computation of the receiving combiner,
{\color{black} coordinated designation, and exchange of received data.}
The energy consumption of end users is not negligible and should be considered while implementing these techniques
and optimizing CoUR networks.
By exploiting energy harvesting, utilization, redistribution, and management policies at the user side,
energy-efficient operations of the CoMP network become promising.
New challenges of optimizing the design of CoUR include low latency,
imperfect CSI, increased signaling overhead, EH and coordination at the user side,
SE, EE and computational complexities.
\subsubsection{Dynamic CoMP Clustering}
Dynamic CoMP clustering can be increasingly complex with growing signaling overhead.
Nonetheless, it is responsive to network changes, as compared to static CoMP scenarios.
Inter-cluster interference can be minimized and the cluster size of users can be optimized adaptively and dynamically.
To optimize SE, EE, load balancing, QoS, and backhaul scheduling for dynamic clustering
in RES-powered CoMP systems,
methodologies such as greedy algorithms \cite{barron08}, game theoretic approaches \cite{song14},
and multi-stage optimizations \cite{pere} have been utilized.
However, those existing dynamic CoMP clustering approaches may lack scalability
and can suffer from a high complexity of scheduling and precoding designs.
It is a challenge to provide fully dynamic clustering at low complexities and costs when there are
increased scheduling and signaling overhead.
To this end, machine learning (ML) algorithms \cite{blum98, jiang17} can potentially help design the ahead-of-time and online resource allocation schemes of systems with the integration of unpredictable and non-dispatchable RES.
ML and Big Data techniques \cite{gupta16} can facilitate dynamic energy sharing, traffic scheduling, and CoMP clustering in a network
by considering user locations, traffic demands, latency, imperfect CSI, EH amount, and electricity prices;
and therefore deserve comprehensive investigations.
\subsection{Multi-Hop Wireless Links}
As shown in Section \ref{sec.multihop}, an interesting aspect of multi-hop networks is that network nodes can benefit from information and energy cooperation when they can share information and energy with each other.
This opens up the following potential research opportunities in this context.
\subsubsection{Opportunistic Routing}
{\color{black} Opportunistic routing can achieve reliable data transmission for disconnected and sparse multi-hop networks,} and provide flexibility and easy adaptation to high system dynamics \cite{Shaikh2018Routing},
e.g. time-varying channels, bursty data arrivals, and intermittent EH.
The routing techniques utilize the broadcast nature of radio.
{\color{black} Relay nodes are opportunistically chosen to forward packets.
This procedure continues until all packets are successfully delivered.}
Opportunistic routing also supports a high amount of data transfers.
Existing studies on opportunistic routing and EH are limited.
\subsubsection{Impact of Mobility on EH-Based Multi-Hop Routing}
Proper mobility models can estimate the movement of nodes with regards to position, direction, and velocity.
This can be readily captured in emerging D2D communications~\cite{Shaikh2018Routing}.
By observing the movement pattern of nodes, several works have proposed proper mobility models
and studied the impact of mobility on EH for one-hop links \cite{Niyato2014Delay,Coarasa2013Impact}.
Yet, effective resource allocation schemes that can integrate the characteristics of EH-based multi-hop routing are still missing.
The impact of mobility on the routing decisions for multi-hop networks is to be investigated.
\subsubsection{Network Coding-Aware Routing}
Network coding-aware (NC-aware) routing techniques use omni-directional antennas to utilize the broadcast nature of wireless channels. This technique shows many performance metrics over conventional routing, including improved system capacity and reliability,
and reduced delay and energy consumption \cite{Shaikh2018Routing}.
It is proven in \cite{Douik2017Instantly} that NC is effective for achieving the maximum data flow in D2D networks.
Therefore, NC-aware routing can be potentially used in multi-hop networks for performance improvement.
How to exploit RES and integrate the EH feature of multi-hop networks in NC-aware routing is an open problem.
\subsection{SWIPT Systems}
The application and integration of the SWIPT technique in SISO, MISO, MIMO, relay, and mmWave systems rely on
power allocation (transmitter) and power splitting (receiver) schemes, as unveiled in Section \ref{sec.wpt}.
The following topics on SWIPT enabled systems are worth in-depth studies.
\subsubsection{Security of SWIPT}
Increasing the transmit power can have double-sided effects on SWIPT systems.
On one hand, the desired power transferred from a
{\color{black} source to a legitimate destination can be enhanced.}
On the other hand, the undesired risk of information stealth by an eavesdropper can be escalated,
leading to a security concern in SWIPT systems.
{\color{black} How to enhance the signal intensity on the legitimate recipient side while reducing the signal intensity on the eavesdropping side}
can be an exciting research direction to pursue.
\subsubsection{SWIPT for CoMP Systems}
{\color{black} Currently, CoMP systems are categorized into two groups: joint transmission (JT)
in which an end user is served by several BSs and its data is shared globally,
versus coordinated beamforming (CB) where an end user is supported only by a single BS and its information is owned locally.
From the practicality perspective, CB-CoMP is preferred over JT-CoMP
since it requires much less signal communication overhead.}
{\color{black} It is useful to examine the merits and challenges of incorporating SWIPT techniques into CoMP,}
where full-scale cooperations can reduce the total transmit power.
However, an enormous backhaul capacity would be needed to integrate CoMP with SWIPT
if all BSs and end users are involved in the energy transfer and information sharing.
Interference management and mitigation also needs to be dealt with in such a system.
\subsubsection{Robust Designs of SWIPT Systems}
Information transmission and EH process can have dynamic and time-varying characteristics,
rendering difficulties for the transmitters to obtain the accurate CSI ahead of time.
Offline ahead-of-time transmission policies with imprecise CSI may cause a large outage rate of the system.
It is a necessary and challenging task to design robust beamforming schemes to cope with the dynamics
of SWIPT systems.
\subsection{Energy Trading and Planning}
As discussed in Sections \ref{sec.sharing}, \ref{sec.purchasing}, and \ref{sec.trading},
the most popular optimization metrics of smart grid-powered wireless communications networks are
energy consumption and operational cost, followed by operators' utility and QoS.
The Lagrange dual based method, multi-stage optimization, and game theory are among the most
widely used techniques for offline scheduling,
while SGD and Lyapunov-based algorithms are typically applied to online optimization problems,
as collated in Table \ref{tab.trade}.
The Lagrange dual based technique provides global optimality for convex problems,
while the Lyapunov-based algorithms are asymptotically optimal for online optimizations under i.i.d. environments.
The following are some interesting research directions to be further pursued.
\subsubsection{Energy Harvesting at End Users}
Many existing works focus on EH-based BSs and the energy consumption in the downlink.
Mobile end users also need to consume energy for information reception, signal decoding, and communication in the uplink.
To fully realize self-sustained communication systems, new frameworks need to be in place to integrate the
EH capabilities for the end users in system design.
In such a system, it is important to carry out grouping among end users for
energy sharing, power allocation, interference alignment, QoS enhancement, and efficiency improvement.
The information exchange and computational complexity in the system can increase dramatically
with the growth of scheduling variables and dimensions.
Distributed optimization techniques can help alleviate the complexity of the network and protect private information of each user,
and deserve research effort.
\subsubsection{Application of Machine Learning}
ML has been one of the most active research fields due to its great success in many domains,
such as pattern recognition and computational learning theory in artificial intelligence.
It develops algorithms to learn from the past and make predictions in complicated scenarios \cite{jiang17}.
{\color{black} ML can be widely applied to model and analyze technical problems of 5G/B5G networks.}
In particular, 5G/B5G smart end users are expected to access different spectral bands autonomously with the aid of
learning schemes of spectral efficiency.
Future Internet service providers are expected to control their transmit power and adjust their transmit protocols
with the help of QoS learning.
Future smart grid-powered BSs are expected to schedule and allocate their power according to the demand side response from the users,
and carry out online load sharing and traffic offloading based on dynamic user locations, QoS requirements, and EH amounts.
{\color{black} Typical supervised learning methodologies depend on preexisting models and labels
that can support the extrapolation of unknown parameters
\cite{carn07, alpa14}.
They are applicable to channel estimation, data analytics, spectrum assignment, and EH amount prediction.}
They can also be applied to extrapolate locations and behaviors of mobile end users,
which can help enhance users' QoS.
{\color{black} Unsupervised learning depends upon the input statistics in a heuristic fashion \cite{hofmann01, nieble08}.
It can be leveraged for dynamic BS or cell clustering in collaborative systems,
the association of APs in ubiquitously availing WiFi environments, and load balancing in HetNets.}
Reinforcement learning depends on a dynamic iterative learning and decision-making process \cite{kael96, sutton98}.
It may potentially be utilized to model the EH process as a Markov decision process without historical data.
It can be applied to infer the decisions made by users under unknown network conditions.
It can also facilitate the solution for the game theoretic problems between smart grid, BSs, and users.
Right now, uses of these learning techniques into the EH powered communication network design are almost an open topic.
\section{Conclusion}
We have provided a contemporary and comprehensive survey on recent breakthroughs on the utilization, redistribution, trading and planning of energy harvested in future wireless communication networks connected to smart grids.
We have reviewed a wide range of energy harvesting-based wireless architectures such as
point-to-point, multipoint-to-point, multipoint-to-multipoint, multi-hop, and multi-cell architectures,
with an emphasis on their energy-efficient operations.
We have also gone through the SWIPT technologies as an extension of energy harvesting wireless networks.
A significant part of the article has been devoted to the redistribution redundant energy within wireless networks,
predictive planning and purchase of energy from smart grids,
and two-way trading of energy between the wireless networks and smart grids.
By redistributing and trading redundant energy, wireless service providers can reduce their electricity bills
and the consumption of brown energy.
Future research topics on each of these different aspects of energy harvesting wireless networks
and their interoperability with smart grids have also been discussed.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 4,622 |
The 500th Fighter-Bomber Squadron is an inactive United States Air Force unit. Its last assignment was with the 85th Fighter-Bomber Group stationed at Harris Neck Army Air Field, 1eorgia. It was inactivated on 1 May 1944.
History
Participated in air-ground maneuvers, October 1942— April 1943, and afterward served as a replacement training unit until 1 May 1944
Lineage
Constituted as the 306th Bombardment Squadron (Light) on 13 January 1942
Activated on 10 February 1942
Redesignated 306th Bombardment Squadron (Dive) on 27 July 1942
Redesignated 500th Fighter-Bomber Squadron on 10 August 1943
Disbanded on 1 May 1944
Assignments
* 85th Bombardment Group (later 85th Fighter-Bomber Group), 10 February 1942 – 1 May 1944
Stations
Army Air Base, Savannah, Georgia, 10 February 1942
Bowman Field, Kentucky, c. 16 February 1942
Hunter Field, Georgia, 8 June 1942
Waycross Army Air Field, Georgia, 15 August 1942
Gillespie Field, Tennessee, 3 October 1942
Blythe Army Air Base, California, 2 November 1942
Rice Army Air Field, California, c. 11 December 1942
Harding Army Air Field, Louisiana, c. 9 April 1943
Waycross Army Air Field, Georgia, 23 August 1943
Harris Neck Army Air Field, Georgia, 11 December 1943 – 1 May 1944
Aircraft
Vultee V-72 Vengeance, 1942
Douglas A-24 Dauntless, 1942–1943
North American A-36 Apache, 1943
Bell P-39 Airacobra, 1943–1944
Curtiss P-40 Warhawk, 1944
References
Notes
Bibliography
Fighter squadrons of the United States Army Air Forces
Military units and formations disestablished in 1944 | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 1,432 |
\section{Background information}
\subsection{Latitude and longitude}
Any location on an area is defined by two coordinates. The surface of a sphere is a curved area, but using coordinates like up and down does not make much sense, because the surface of a sphere has neither a beginning nor an ending. Instead, we can use
\newglossaryentry{spherical}
{
name = {Spherical polar coordinates},
description = {The natural coordinate system of a flat plane is Cartesian and measures distances in two perpendicular directions (ahead, back, left, right). For a sphere, this is not very useful, because it has neither beginning nor ending. Instead, the fixed point is the centre of the sphere. When projected outside from the central position, any point on the surface of the sphere can be determined by two angles with one of them being related to the symmetry axis. Such axis defines two poles. In addition, there is the radius that represents the third dimension of space, which permits determining each point within a sphere. This defines the spherical polar coordinates. When defining points on the surface of a sphere, the radius stays constant.}
}
spherical polar coordinates originating from the centre of the sphere with the radius being fixed (Fig.~\ref{f:latlong}). Two angular coordinates remain. Applied to the Earth, they are called the latitude and the longitude. Its rotation provides the symmetry axis. The North Pole is defined as the point, where the theoretical axis of rotation meets the surface of the sphere and the rotation is counter-clockwise when looking at the North Pole from above. The opposite point is the South Pole. The equator is defined as the great circle
\newglossaryentry{great}
{
name = {Great circle},
description = {A circle on a sphere, whose radius is identical to the radius of the sphere.}
}
half way between the two poles.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{Latitude_and_Longitude.png}}
\caption{Illustration of how the latitudes and longitudes of the Earth are defined (Peter Mercator, djexplo, CC0).}
\label{f:latlong}
\end{figure}
The latitudes are circles parallel to the equator. They are counted from $0\degr$ at the equator to $\pm 90\degr$ at the poles. The longitudes are great circles connecting the two poles of the Earth. For a given position on Earth, the longitude going through the
\newglossaryentry{zenit}
{
name = {Zenith},
description = {Point in the sky directly above.}
}
zenith, the point directly above, is called the meridian. This is the line the Sun apparently
\newglossaryentry{appa}
{
name = {Apparent movement},
description = {Movement of celestial objects in the sky which in fact is caused by the rotation of the Earth.}
}
crosses at local noon. The origin of this coordinate is defined as the
\newglossaryentry{meri}
{
name = {Meridian},
description = {A line that connects North and South at the horizon via the zenith.}
}
Prime Meridian, and passes Greenwich, where the Royal Observatory of England is located. From there, longitudes are counted from $0\degr$ to $+180\degr$ (eastward) and $-180\degr$ (westward).
Example: Heidelberg in Germany is located at 49\fdg4 North and 8\fdg7 East.
\subsection{Elevation of the pole (pole height)}
If we project the terrestrial coordinate system of latitudes and longitudes at the sky, we get the celestial equatorial coordinate system. The Earth's equator becomes the celestial equator and the geographic poles are extrapolated to build
the celestial poles. If we were to make a photograph with a long exposure of the northern sky, we would see from the trails of the stars that they all revolve about a common point, the northern celestial pole (Fig.~\ref{f:trails}).
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{LiveOakStarTrails.jpg}}
\caption{Trails of stars at the sky after an exposure time of approximately 2 hours (Ralph Arvesen, Live Oak star trails,
\url{https://www.flickr.com/photos/rarvesen/9494908143}, \url{https://creativecommons.org/licenses/by/2.0/legalcode}).}
\label{f:trails}
\end{figure}
In the northern hemisphere, there is a moderately bright star near the celestial pole, the North Star or Polaris. At the southern celestial pole, there is no such star that can be observed with the naked eye. Other procedures have to be applied to find it. If we stood exactly at the geographic North Pole, Polaris would always be directly overhead. We can say that its elevation
\newglossaryentry{elev}
{
name = {Elevation},
description = {Angular distance between a celestial object and the horizon.}
}
would be (almost) $90\degr$. This information already introduces the horizontal coordinate system (Fig.~\ref{f:altaz}).
\begin{figure}[!ht]
\centering
\resizebox{0.45\hsize}{!}{\includegraphics{Azimuth-Altitude_schematic.png}}
\caption{Illustration of the horizontal coordinate system. The observer is the origin of the coordinates assigned as azimuth and altitude or elevation (TWCarlson, \url{https://commons.wikimedia.org/wiki/File:Azimuth-Altitude_schematic.svg},
``Azimuth-Altitude schematic'', \url{https://creativecommons.org/licenses/by-sa/3.0/legalcode}).}
\label{f:altaz}
\end{figure}
It is the natural reference we use every day. We, the observers, are the origin of that coordinate system located on a flat plane whose edge is the horizon. The sky is imagined as a hemisphere above. The angle between an object in the sky and the horizon is the altitude or elevation. The direction within the plane is given as an angle between $0\degr$ and $360\degr$, the azimuth, which is usually counted clockwise from north. In navigation, this is also called the bearing. The meridian is the line that connects North and South at the horizon and passes the zenith.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{PoleHeightLatitude_high_low.png}}
\caption{When combining the three coordinate systems (terrestrial spherical, celestial equatorial, local horizontal), it becomes clear that the latitude of the observer is exactly the elevation of the celestial pole, also known as the pole height (own work).}
\label{f:poleheight}
\end{figure}
For any other position on Earth, the celestial pole or Polaris would appear at an elevation smaller than $90\degr$. At the equator, it would just graze the horizon, i.e. be at an elevation of $0\degr$. The correlation between the latitude (North Pole = $90\degr$, Equator = $0\degr$) and the elevation of Polaris is no coincidence. Figure~\ref{f:poleheight} combines all three
mentioned coordinate systems. For a given observer at any latitude on Earth, the local horizontal coordinate system touches the terrestrial spherical polar coordinate system at a single tangent point. The sketch demonstrates that the elevation of the celestial North Pole, also called the
\newglossaryentry{poleht}
{
name = {Pole height},
description = {Elevation of a celestial pole. Its value is identical to the latitude of the observer on Earth.}
}
pole height, is exactly the northern latitude of the observer on Earth.
\subsection{Early navigational skills}
Early seafaring peoples often navigated along coastlines before sophisticated navigational skills were developed and tools were invented. Sailing directions helped to identify coastal landmarks \citep{hertel_geheimnis_1990}. To some extent, their knowledge about winds and currents helped them to cross short distances, like e.g.~in the Mediterranean.
Soon, the navigators realised that celestial objects, especially stars, can be used to keep the course of a ship. Such skills have been mentioned in early literature like Homer's Odyssey which is believed to date back to the 8th century BCE. There are accounts of the ancient people of the Phoenicians who were able to even leave the Mediterranean and ventured on voyages to the British coast and even several hundred miles south along the African coast \citep{johnson_history_2009}. A very notable and well documented long distance voyage has been passed on by ancient authors and scholars like Strabo, Pliny and Diodorus of Sicily. It is the voyage of Pytheas, a Greek astronomer, geographer and explorer from Marseille who around 300 BCE apparently left the Mediterranean by passing Gibraltar and made it up north until the British Isles and beyond the Arctic Circle, where he possibly reached Iceland or the Faroe Islands that he called Thule \citep{baker_ancient_1997,cunliffe_extraordinary_2003}. Pytheas already used a gnomon or a sundial, which allowed him to determine his latitude and measure the time during his voyage \citep{nansen_northern_1911}.
\subsection{Sailing along latitude}
At these times, the technique of sailing along a parallel (of the equator) or latitude was used by observing
\newglossaryentry{circumpolar}
{
name = {Circumpolar},
description = {Property of celestial objects that never set below the horizon.}
}
circumpolar stars. The concept of latitudes in the sense of angular distances from the equator was probably not known. However, it was soon realised that when looking at the night sky, some stars within a certain radius around the celestial poles never set; they are circumpolar. When sailing north or south, sailors observe that the position of the celestial pole change as well, and with it the circumpolar radius. Therefore, whenever navigators see the same star
\newglossaryentry{culminate}
{
name = {Culmination},
description = {Passing the meridian of celestial objects. These objects attain their highest or lowest elevation there.}
}
culminating -- transiting the meridian -- at the same elevation, they stay on the ``latitude''. For them, it was sufficient to realise the connection between the elevation of stars and their course. Navigators had navigational documents that listed seaports together with the elevation of known stars. To reach the port, they simply sailed north or south until they reached the corresponding latitude and then continued west or east.
Nowadays, the easiest way to determine one's own latitude on Earth is to measure the elevation of the North Star, Polaris, as a proxy for the true celestial North Pole. In our era, Polaris is less than a degree off. Due to the
\newglossaryentry{precess}
{
name = {Precession},
description = {Besides the rotation of a spinning body, the rotation axis often also moves in space. This is called precession. As a result, the rotation axis constantly changes its orientation and points to different points in space. The full cycle of the precession of the Earth's axis takes roughly 26,000 years.}
}
precession of the Earth's axis, 1000 years ago, it was $8\degr$ away from the celestial pole.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{VikingRoutesGoogle.png}}
\caption{Vikings probably used the technique of sailing along latitude to reach destinations west of Scandinavia (red lines). Iceland is on the 64th northern latitude and 680 nautical miles away from Norway's coast. The voyage to Greenland along the 61st northern latitude passes the Shetland and Faroe Islands. A stopover in Iceland is a viable alternative.}
\label{f:sailing}
\end{figure}
However, using Polaris to determine the north bearing and one's own latitude of course only works when it is dark enough to see the 2~mag bright star. At a clear day, this is only possible during Nautical or Astronomical Twilight, i.e. when the Sun has set and its centre is more than $6\degr$ below the horizon. However, at latitudes higher than $61\degr$ north, the Sun can stay above such low (negative) elevations, especially around summer solstice. This is the realm north of the Shetland Islands, i.e. certainly the Faroe Islands and Iceland. Hence, observing Polaris becomes rather difficult during summer, which is the preferred season for sailing. For latitudes north of the Arctic Circle, where sea ice can block passages during winter, the sun never sets for a certain period during summer. Therefore, other techniques were needed for navigation.
\subsection{The Vikings}
he Vikings were Northern Germanic tribes who were known for their seamanship, their influential culture and a wide trade network. And they were feared for their raids and pillages that were executed with roaring brutality. However, contrary to common urban legends, the Vikings were not the filthy, savage barbarians that wore horned helmets when going into battle. Instead, they seemed to be well groomed, and bathed at least once per week \citep{berg_petersen_what_2012}. Their origins are the coastal regions around western and southern Scandinavia as well as Denmark. During their explorations, they settled in Iceland, Greenland, Normandy and the British Isles. However, they ventured as far as Northern America, all around Europe, the Black Sea and the Caspian Sea (Fig.~\ref{f:vikingrealm}).
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{Viking_Expansion.png}}
\caption{Map of Viking expansion between the 8th and 11th century. Their origins are the Norwegian coast, Southern Sweden as well as Denmark (Max Naylor, \url{https://commons.wikimedia.org/wiki/File:Viking_Expansion.svg}, public domain).}
\label{f:vikingrealm}
\end{figure}
The beginning of the Viking Era is commonly dated to 793~CE with the raid of Christian monastery of Lindisfarne \citep{graham-campbell_viking_2001} in Northumbria, England. However, the Gallo-Roman historian St.~Gregory of Tours reports on an earlier attack by a Danish king named Chlochilaicus on Austrasia, the homeland of the Merovingian Franks, around 520~CE. It is believed that this Danish king may be identical to the mythical character of Hygelac in the Beowulf poem \citep{susanek_hygelac_2000}. The Viking Era ended with the Battle of Hastings between the English and the Norman-French, who were descendants of the Vikings, and the destruction and abandonment of Hedeby, an important Viking settlement and trading post, both in 1066. As it marked the Norman conquest of Britain, the Battle of Hastings was such an important turning point in British history that it was documented with colourful and vivid pictures on the Bayeux Tapestry (Fig.~\ref{f:bayeux}), made in the 1070s which is still in brilliant shape \citep{hicks_bayeux_2007}.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{Odo_bayeux_tapestry.png}}
\caption{A segment of the Bayeux Tapestry depicting Odo, Bishop of Bayeux and half-brother to William the Conqueror, rallying the Norman troops during the Battle of Hastings in 1066. The Bayeux Tapestry is a 70~metre long embroidered cloth depicting the Battle of Hastings and the events leading up to the Norman Conquest of England. It was probably commissioned by Odo himself \citep{hicks_bayeux_2007} (\url{https://commons.wikimedia.org/wiki/File:Odo_bayeux_tapestry.png}, public domain).}
\label{f:bayeux}
\end{figure}
\subsection{Viking navigation}
The Vikings were famous for their longships, multi-purpose ships that could be used on rivers, shallow coastal waters and oceans. They were used for trade, exploration and warfare. Depending on their size, they could carry from a dozen up to 80 sailors. Because of their shallow draught, many of them did not need a harbour to make landfall but could simply be beached. Those ships were usually decorated with carved ornaments. Propulsion was provided by sail or oars which could lead to speeds of 15 to 20 knots.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{Viking_replica_of_the_Gokstad_Viking_ship.jpg}}
\caption{The ``Viking'', a replica of the Gokstad Viking ship, at the Chicago World Fair 1893 \citep{di_cola_images_2012}. With a crew of 11, it crossed the Atlantic and reached Chicago within 2 months (public domain).}
\label{f:gokstad}
\end{figure}
Assuming an average speed of 5 knots, crossing the Northern Sea would have been possible within one or two days. Longer trips, e.g.~from Norway to Iceland would have been achieved within five to seven days.
The Viking sailors were very experienced in interpreting the signs nature provides. They were able to read the migratory routes of birds \citep{forte_viking_2005} and whales as well as the smell and sound that the wind carries from distant shores. The Vikings probably did not have any sea charts, but they used chants and rhymes that contained sailing information as mentioned in the medieval Hauksb\'{o}k chronicle \citep{sawyer_oxford_1997} and were passed on from generation to generation. For instance, the route from southern Norway to Greenland passes the Shetland Islands and Iceland. Their sightings could be used to correct the course, which perfectly coincides with staying on latitude $61\degr$ north. Therefore, the Vikings must have had skills to follow it.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{North_season.jpg}}
\caption{Illumination of the northern and southern hemisphere of the Earth during its orbit around the Sun (Tau'olunga, \url{https://en.wikipedia.org/wiki/File:North_season.jpg}, CC0).}
\label{f:season}
\end{figure}
As mentioned before, the Sun played an important role for finding a ship's course. The difficulty with the Sun compared to the stars is that the Sun changes its declination, i.e. the elevation above the equator. The reason is that the Earth with its tilted axis revolves around the Sun. In the northern summer, the northern hemisphere faces the Sun, while during northern winter, it is the southern hemisphere. The range, under which the Sun appears in the zenith, is the latitudes between 23\fdg4 north, the Tropic of Cancer, and 23\fdg4 South, the Tropic of Capricorn. For any given location on Earth, the Sun's elevation while it transits the meridian -- the line that connects North and South at the horizon through the zenith -- changes by the same amount.
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{Earth-lighting-summer-solstice_EN.png}}
\caption{At summer solstice, the Sun is directly above the Tropic of Cancer. Its apparent position changes during the year (Przemyslaw "Blueshade" Idzkiewicz, \url{https://commons.wikimedia.org/wiki/File:Earth-lighting-summer-solstice_EN.png}, ``Earth-lighting-summer-solstice EN'', \url{https://creativecommons.org/licenses/by-sa/2.0/legalcode}).}
\label{f:solstice}
\end{figure}
For latitude of $61\degr$ north, the elevation of the Sun above the horizon is shown in Fig.~\ref{f:solarpath}. South is at the centre at an azimuth of $180\degr$. Throughout the year, the elevation of the Sun at local noon changes by almost $47\degr$. However, the rate of change is not constant. We can assume a variation of the solar declination of up to $1\degr$ per voyage to be acceptable for navigational purposes.
If we allow such a variation during two consecutive days, the Sun could be used at any time of the year. This means, within two days the declination of the Sun –- or its elevation at noon -– never changes more than $1\degr$. This corresponds to a deviation of 8~km after travelling for 240 nautical miles. As already pointed out, two days are sufficient for voyages through the Northern Sea. For five to seven day journeys, the allowed period is between end of May and beginning of July. This is enough to travel from southern Norway to Iceland. The corresponding drift due to the changing solar elevation amounts to 25~km or less. For longer travels, e.g.~to Greenland, the course can be adjusted by landmarks on the way when for instance passing the Shetland Islands, the Faroe Islands and Iceland. Is there evidence for navigational tools the Vikings used with the Sun?
\begin{figure}[!ht]
\resizebox{\hsize}{!}{\includegraphics{SunAltitude.png}}
\caption{The diurnal and annual elevation of the Sun above the horizon for a latitude of $61\degr$ north (Created with the sun chart path program of the University of Oregon, USA, \url{http://solardat.uoregon.edu/SunChartProgram.html}).}
\label{f:solarpath}
\end{figure}
\newglossaryentry{diurnal}
{
name = {Diurnal},
description = {Concerning a period that is caused by the daily rotation of the earth around its axis.}
}
\subsection{The Sun Shadow Board}
Sailing along latitude was probably facilitated by a device that was called {\em solskuggerfj{\o}l} (sun shadow board, Fig.~\ref{f:shadow}). 18th century sailors of the Faroe Islands have been seen using a wooden disk of up to 30~cm in diameter with engraved concentric rings and a central
\newglossaryentry{gnomon}
{
name = {Gnomon},
description = {Any object that casts a shadow.}
}
gnomon whose height could be adjusted \citep{tjgaard_windjamming_2011}. It was put inside a bucket with water to cancel out ship movements. It is quite likely that it was already used during the Viking age.
If we assume a negligible change of the Sun's declination, the shadow of the gnomon at noon can be calibrated to any latitude by aligning the tip of the shadow with a circle. When read during noon of the following days, the shadow should again touch the same circle. If the shadow is shorter, the position is too far South; if it is longer, the location is too far north.
\begin{figure}[!ht]
\centering
\resizebox{0.5\hsize}{!}{\includegraphics{shadowboard.png}}
\caption{Sketch of the Viking sun shadow board (M. Nielbock, own work).}
\label{f:shadow}
\end{figure}
\subsection{The Sun Compass}
The magnetic compass was unknown in Europe during the Viking age. And it would have been quite useless for them anyway, because the magnetic field of the Earth is far from homogeneous. The phenomenon that the magnetic poles do not align well with the geographical ones is called magnetic declination. In addition, the field lines are strongly curved. And both processes change in time (Fig.~\ref{f:magnetic}). Measuring campaigns like ESA's SWARM satellites constantly monitor the magnetic field \citep{esa_esas_2013}.
Thus, especially at high latitudes, a magnetic compass would have let the Vikings lose their way more often than it would have aided them in finding the correct course. But it seems they were able to find the cardinal directions using the Sun.
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{MagneticPoles.png}}
\caption{Change of the magnetic North Pole and its position relative to Scandinavia (Created with the NOAA Historical Magnetic Declination Viewer, \url{http://maps.ngdc.noaa.gov/viewers/historical_declination/}).}
\label{f:magnetic}
\end{figure}
In 1948, fragments of a small wooden disk were found during historic excavations of an abandoned monastery of Uunartoq in southwest Greenland (Fig.~\ref{f:suncompass}). In the following decades, people started to interpret it as a navigational tool to determine the cardinal directions using the Sun \citep{thirslund_viking_2007}. However, even to date, there are doubts that it truly served that purpose. Nonetheless, there are quite remarkable scientific analyses that demonstrate that in fact this disk could have been a combination of a
\newglossaryentry{sundial}
{
name = {Sundial},
description = {A stick that projects a shadow cast by the sun, i.e.~ a gnomon. The orientation and length of the shadow permits determining time and latitude.}
}
sundial, a compass, and a sun shadow board \citep{bernath_alternative_2013}.
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{suncompass.png}}
\caption{Image of the original wooden disk fragment found in Uunartoq, Greenland. Annotations denote elements for its possible usage as a sun compass \citep{bernath_alternative_2013}. When the shadow is aligned with the shadow lines, North is up. Incisions in that direction permit measuring the shadow length (Lennart Larsen, Danish National Museum, \url{http://samlinger.natmus.dk/DO/10775}, ``Tr{\ae}disk\_Gr{\o}nland'', background of photograph removed and annotations added by Markus Nielbock, \url{https://creativecommons.org/licenses/by-sa/2.0/legalcode}).}
\label{f:suncompass}
\end{figure}
Incised lines have been identified as paths of a shadow cast by a central gnomon during the days of
\newglossaryentry{equinox}
{
name = {Equinox},
description = {This is the configuration, when the Sun apparently crosses the equator. This happens twice a year. At these dates, the Sun is exactly at zenith at the Earth equator. These two dates define the beginning of spring and autumn.}
}
equinox and summer
\newglossaryentry{solstice}
{
name = {Solstice},
description = {This is the configuration, when the Sun apparently touches the tropics. The Sun reaches its most northern and most southern extreme. These dates define the begin of summer and winter.}
}
solstice at a latitude of $61\degr$ north. These lines hypothetically helped to determine local noon, i.e.~when the Sun attains its highest elevation when crossing the meridian. This moment indicates the time when the device can be used. At local noon, a central gnomon produces a shadow that points north. Similar to the sun shadow board mentioned above, incisions on the wooden board towards the northern direction can be used to determine possible deviations from the course along a predefined latitude.
\subsection{Local time and time zone}
The shadow of a gnomon or a sundial is shortest and points north, whenever the Sun is exactly south (northern hemisphere). This is what defines local noon. Since the Earth rotates continuously, the apparent position of the Sun changes as well. This means that at any given point in time local noon is actually defined for one longitude only. However, clocks show a different time. Among other effects, this is due to daylight saving time during summer, and the time zones (Figure 15). Here, noon happens at many longitudes simultaneously. However, it is obvious that the Sun cannot transit the meridian for all those places at the same time. Therefore, the times provided by common clocks are detached from the "natural" local time a sundial shows.
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{Standard_World_Time_Zones.png}}
\caption{World time zones. Instead of the local time that is based on the apparent course of the Sun in the sky and valid for single longitudes only, the common clocks show a time based on time zones which applies to many longitudes simultaneously (TimeZonesBoy, \url{https://commons.wikimedia.org/wiki/File:Standard_World_Time_Zones.png}, \url{https://creativecommons.org/licenses/by-sa/4.0/legalcode}).}
\label{f:tz}
\end{figure}
\section{List of material}
The list contains items needed by one student. Some of them can be shared by two to four individuals.
\begin{itemize}
\item Worksheet
\item Cardboard (diameter at least 4 cm)
\item Toothpick
\item Earth globe (+ stable mounting, e.g. inflatable: \url{https://goo.gl/gq1d5N}, \url{http://www.unawe.org/earthball})
\item Compass (drawing tool)
\item Lamp or spot light
\item Scissors
\item Cutter or sharp knife
\item Glue
\item Blu Tack (or similar)
\end{itemize}
\section{Goals}
With this activity, the students will learn that
\begin{itemize}
\item the Vikings were much more than warriors.
\item the Vikings were a people that have been very influential for European history.
\item the Vikings were skilled sailors and used to navigate by the Sun.
\item the cardinal directions can be determined by the position of the Sun.
\item the astronomical (local) noon does not coincide with noon on the clock.
\end{itemize}
\newglossaryentry{cardinal}
{
name = {Cardinal directions},
description = {Main directions, i.e. North, South, West, East}
}
\section{Learning objectives}
At age 14, students should already understand the concepts of latitude and longitude for defining a position on Earth.
\begin{itemize}
\item After reading a story about a Viking voyage, the students will be able to explain how the Sun can be used to find the cardinal directions.
\item They will also be able to explain, how the Sun can be used to maintain a course along latitude.
\item With the same story, the students will be able to describe the region of origin of the Vikings and some of their typical professions.
\item With a hands-on activity, the students will be able to explain the basic functionality of a shadow board, an old Viking navigational tool.
\item More experience students will be able to explain the geometry behind the shadow board and how trigonometry of a right angle triangle helps to calculate the length of a shadow.
\end{itemize}
\section{Target group details}
\noindent
Suggested age range: 12 -- 16 years\\
Suggested school level: Middle School, Secondary School\\
Duration: 45 minutes
\section{Evaluation}
The evaluation is done twofold: by checking the results of the activities and from the answers of the students and their discussions.
\begin{itemize}
\item In particular, the teacher may ask the students, to what direction the Sun attains its highest elevation and how the cardinal directions can be derived from this.
\item The teacher may ask the students, how the elevation of the Sun at noon changes with latitude, and how this information can be used to navigate along it.
\item The teacher can ask the students why the length of the shadow cast by the Sun is indicative of the local latitude.
\item Together with the students, the teacher can develop a sketch that illustrates the geometry of a stick that produces a shadow when illuminated by the Sun. He then asks about the trigonometric functions involved in this.
\item While showing a map of Europe, the teacher may ask the students, where the Vikings originated from.
\end{itemize}
\section{Full description of the activity}
\subsection{Introduction}
It would be beneficial, if the activity be included into a larger context of seafaring, e.g. in geography, history, literature, etc.
Tip: This activity could be combined with other forms of acquiring knowledge like giving oral presentations in history, literature or geography highlighting navigation. This would prepare the field in a much more interactive way than what a teacher can achieve by summarising the facts.
Tip: There are certainly good documentaries available on Vikings and sea exploration that could be shown as an introduction. Some suggestions are:
\medskip\noindent
History Channel | The Vikings [New] HD (Duration: 1:28:22)\\\noindent
\url{https://www.youtube.com/watch?v=6mkib3lYA2s}
\medskip\noindent
Vikings, The Founders of Europe (Duration: 50:32)\\\noindent
\url{https://www.youtube.com/watch?v=jngPAIGrzJs}
\medskip\noindent
Building a Viking Ship (Duration: 1:46)\\\noindent
\url{https://www.youtube.com/watch?v=78kpzwGmBxk}
\subsection{Questions, Answers and Discussion}
Ask the students, if they had an idea for how long mankind already uses ships to cross oceans. One may point out the spread of the Homo sapiens to islands and isolated continents like Australia.
\medskip\noindent
Possible answers:\\\noindent
We know for sure that ships have been used to cross large distances already since 3,000 BCE or earlier. However, the early settlers of Australia must have found a way to cross the Oceans around 50,000 BCE
\medskip\noindent
Ask them, what could have been the benefit to try to explore the seas. Perhaps, someone knows historic cultures or peoples that were famous sailors. The teacher can support this with a few examples of ancient seafaring peoples, e.g. from the Mediterranean and the art of navigation.
\medskip\noindent
Possible answers:\\\noindent
Finding new resources and food, trade, spirit of exploration, curiosity.
\medskip\noindent
Ask the students, how they find the way to school every day. What supports their orientation to not get lost? As soon as reference points (buildings, traffic lights, bus stops, etc.) have been mentioned ask the students, how navigators were able to find their way on the seas. In early times, they used sailing directions in connection to landmarks that can be recognised. But for this, the ships would have to stay close to the coast. Lighthouses improved the situation. But what could be used as reference points at open sea? Probably the students will soon mention celestial objects like the Sun, the Moon and stars.
Let the students read the story below (separate document available).
\subsection{Story: Galmi the Viking}
``This is the day'', Galmi thinks by himself as he looks out into the bay of Vikebygd. He is a Norseman in his early thirties and has spent most of his life struggling to feed his family on his farm. His wife S\'{a}ga and his daughter Oda have endured a lot, but Galmi has made plans that could change things for the better. He came here 15 years ago with his parents who set out to find their own little piece of land and live peacefully. However, the last two winters have struck them hard leaving only little that could be spared for sowing out next spring.
Last night, Galmi told S\'{a}ga and Oda that he would go to Avaldsnes and sign on for the next raid to the land in the West. News had travelled about the riches his fellow Vikings had brought home from the realm of the Scots and the Picts. And he definitely wanted a share. ``We would be able to buy us food and seeds to survive until next summer'', he explains. Galmi packs his pouch for the hike that should take not much more than 9 hours. S\'{a}ga and Oda are sad and afraid, but they also know that this would probably be their last chance. And if everything turns out for the best, Galmi should be back within a week the latest.
He arrives in Avaldsnes just before sunset. It is a busy little town with about 15 houses, a market place, the chief's residency, and, of course, a harbour with a handful of longships anchoring. Tomorrow will be the last raid for this season, and Galmi wants to be on board. He enters a tavern and quickly finds a group of experienced sailors. They share a few drinks and Galmi befriends them. It turns out that one of them is the nephew of an old friend of his fathers, Floki. And Ragnar is the leader of this group. They are about to head for the mead hall where the chief of the island of Karm{\o}y, Augvald, assigns the raiding parties to their ships. Galmi is lucky. Together with Ragnar, Floki and 21 other Vikings, he will set sail for Inbhir Nis next morning, a rich Celtic village at the mouth of the river Ness.
Galmi does not get much sleep during the night. He is torn between the excitement of the journey and the battle ahead, and the insecure future of his family. Just as his fatigue starts to win against the racing thoughts in his head, Ragnar calls him. And Floki is already at his side. It is before sunrise and the chilling breeze from the North delivers a glimpse of the nearing autumn. As they reach the shore, three ships have already left the pier and 8 oars at each side of the boats accelerate them quickly north to the mouth of the fjord. The rest of Galmi's crew is already here and prepares the ship. It is a real beauty. ``Galmi! Here is your seat'', shouts Rollo. ``You'll be among the first to row!'' Galmi shrugs, ``Sure! Why not?'' Ragnar and Floki smile and they jump on board.
One hour later, the ship leaves the fjord and the winds turn out to be favourable. They set their sail and the ship accelerates smoothly out to the open sea. Galmi is excited and surprised how steady this ship is despite the waves and the shallow draught. It is a sunny day and the gods seem to be with them.
The journey continues without any problem. Galmi uses this opportunity to get to know the crew. They tell him stories from their last expeditions and how proud they are being a part of this. ``Galmi, bring me a bucket with water'', Floki suddenly suggests. ``What for?'', Galmi returns puzzled. ``You'll see.'' Galmi hands him the bucket while Floki grabs a wooden disk. ``It's noon and the Sun is shining, let's see.'' He puts it into the bucket where it begins to float. As Galmi looks closer, he discovers a ring incised about half way between the edge of the disk and the centre, where a small cone sticks out. A shadow extends to the edge of the board and slightly beyond the ring. ``Okay,'' says Floki, ``we have to continue our course to the Southwest for another five hours. Then we'll turn west.''
Galmi is surprised. Is Floki a seer or a magician? Is he in contact with Kvasir, the god of wisdom? ``Not at all'', laughs Ragnar, ``he is just our navigator. Floki, can you explain what you do?'' "Sure. You see, Galmi. The Sun shines on this board and the shadow points north. You know that the Sun is south at noon, do you? The length of the shadow tells me, if we are on course. If the shadow is too long, we are too far north. The Sun is lower there. Is it too short, we know that we are too far south.'' ``How do you know all this?'', asks Galmi. ``My grandfather taught me. He was one of the first to scare the hell out of the Scots'', Floki replies with pride in his eyes.
Four hours after the course correction the steady breeze picks up and dark clouds appear at the horizon. ``Darn! Seems like Thor is angry again!'', Ragnar shouts. ``Get prepared for some rough weather ahead!'' The wind evolves into a storm. Floki strikes the sail. ``Okay guys! Take the oars and row!'' Ragnar has to shout in order to be heard through the howling wind. Galmi pulls as hard as he can. It starts to rain heavily and thunder and lightning seem to tear the skies apart. ``Pitch the tent!'', Ragnar shouts. The crewmen pull up a thick and long piece of linen and cover the ship almost from bow to stern. The ship rolls heavily, but the men keep on rowing. Two hours later, the crew at the oars changes. Galmi tries to get some sleep. He is so tired that neither the rocking boat nor Thor's hammer can keep him awake.
Galmi dreams of S\'{a}ga and Oda. He feels a warm sensation on his cheeks and opens his eyes. The Sun is rising and the wind has died, but through the silent hissing of the waves the snoring of the crew sounds like the howling of the Fenrir wolf. The sail is up and Floki leans at the rudder. ``How did it go, Floki?'', Galmi asks. ``Oh, it wasn't too bad. Nothing we hadn't managed before. It is about 12 hours until we reach the shores.'' ``Come, let me take the rudder for a while and get some rest. I think I can hold that stick for you.'' Floki smiles. ``Thank you, my friend.''
Twelve hours later Ragnar hears the distant calling of seagulls. Everyone on board knows that this means they are right on course and the shore is not very far. ``Can you smell the smoke, Galmi?'', asks Floki. ``The Scots burn peat for heating their homes.'' ``Land ahead!'' Rollo is the first to discover the coastline. But it is another four hours until Inbhir Nis. Ragnar discusses the plan with his crew. They will beach outside the town and camp until the next morning. After the tiring passage everybody needs the rest. Two days after they left Avaldsnes, Ragnar, Floki, Rollo and Galmi are prepared as is the rest of the crew. They ask for Odin's support and head for Inbhir Nis, whose clueless inhabitants will be struck by surprise. ``This is the day'', Galmi says to Floki.
\subsubsection{Questions about the story}
Q: What is Galmi's job?\\\noindent
A: He is a farmer.
\medskip\noindent
Q: Why does he want to go on a raid?\\\noindent
A: Harvests have been poor. He needs resources to buy seeds.
\medskip\noindent
Q: Who is leading the crew of sailors that Galmi joins?\\\noindent
A: Ragnar
\medskip\noindent
Q: What is their destination? Would you know its modern name?\\\noindent
A: Inbhir Nis is the old Gaelic name of Inverness.
\medskip\noindent
Q: What propulsion do longships have?\\\noindent
A: Oars and sail
\medskip\noindent
Q: How do the Vikings protect themselves against heavy rainfall on open seas?\\\noindent
A: A linen tent
\medskip\noindent
Q: How does Floki determine the course?\\\noindent
A: He uses a shadow board to determine their latitude.
\medskip\noindent
Q: How does the crew know that the coast is near?\\\noindent
A: They observe seagulls. They smell smoke.
\medskip\noindent
Q: Do longships need anchors to dock?\\\noindent
A: No, longships are shallow enough to be beached.
\subsection{Activity: A Game of Shadows}
This activity employs the educational tool ``Parallel Earth'' (\url{http://www.unawe.org/resources/books/
Parallel_Earth/}) which demonstrates on model level the phenomena related to the Sun illuminating the Earth. The students produce a miniature version of a shadow board and experiment with it.
If there are not many globes available, the teacher may choose to introduce this activity as a demonstration with only one globe. However, there are inflatable globes available for only a few Euros that can be distributed among the students. In that case, let them work in groups of two.
\subsubsection{Building a miniature shadow board}
\begin{enumerate}
\item Use the compass to draw three concentric circles with radii of 1, 1.5, and 2~cm on a piece of cardboard.
\item Cut out the disc along the circle with the radius of 2~cm.
\item Cut a 2~cm long piece from the toothpick.
\item Run it through the centre of the cardboard disc and glue it. Make sure that it remains perpendicular to the surface of the disc. The two rings on the disc must be on the same side like the stick (see Fig.~\ref{f:gnomon}).
\item Let the glue dry.
\end{enumerate}
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ShadowBoardMini.jpg}}
\caption{Miniature shadow board made of cardboard and a toothpick. Left: side view, right: top view (own work).}
\label{f:gnomon}
\end{figure}
\subsubsection{Part 1: Shadows}
Put the shadow board on the desk. Before doing some experiments, answer the following questions:
\medskip\noindent
Q: When you illuminate the shadow board, how will the shadow cast by the stick behave when changing the position of the lamp? What will be the direction of the shadow relative to the lamp?\\\noindent
A: It always points away from the lamp.
\medskip\noindent
Q: How will the shadow change when you hold the lamp high or low?\\\noindent
A: The higher the lamp, the shorter the shadow.
\medskip
Take a lamp and illuminate the shadow board. Change the position of the lamp relative to the board and observe how the shadow changes.
Compare your observations to your predictions. Did the shadow behave as you have anticipated? Discuss with your classmates:
\medskip\noindent
Q: Imagine the lamp represents the Sun. Where does the shadow point to, when the Sun is south (northern hemisphere)/north (southern hemisphere) of you?\\\noindent
A: The shadow points north (northern hemisphere)/south (southern hemisphere).
\medskip\noindent
Q: Imagine the lamp represents the Sun. Are the shadows longer in winter or summer? Explain!\\\noindent
A: As the Sun attains lower elevations above the horizon during winter, this is the season when the shadows are longer.
\subsubsection{Part 2: Navigate}
The Vikings had travelled between Scandinavia and Greenland. Fig.~\ref{f:sailing} demonstrates that when embarking from southern Norway and travelling along the 61st northern latitude, they would end up at the southern tip of Greenland. It is quite likely that at least during parts of such a voyage they used the navigational tool of the shadow board.
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ExpSetup1.png}}
\caption{The lamp that represents the Sun illuminates the globe. Northern summer is achieved, when the axis of the globe and the line connecting it with the lamp subtends an angle smaller than $90\degr$ (own work).}
\label{f:summer}
\end{figure}
To simulate the point of embarkment, attach the miniature shadow board with a Blu Tack on the globe at the southern tip of Norway. Since the Vikings predominantly sailed during summer, the angle between the axis of the globe and the connecting line to the lamp should be less than a right angle ($90\degr$, see Fig.\ref{f:summer}) -- although this is not very important for the purpose of this exercise. The easiest way to do this is to keep the North Pole up.
Important: Always try to keep the lamp, the shadow board and the North Pole within the same vertical plane.
In the beginning, put the globe in a position so that the shadow on the shadow board points up, i.e.~to the North Pole. Adjust the distance between the globe and the lamp until the shadow touches one of the rings (inner ring in Fig.~\ref{f:globe1}).
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ShadowBoard_Pos1.jpg}}
\caption{Starting position of the shadow board with the gnomon located at southern Norway (own work).}
\label{f:globe1}
\end{figure}
\medskip\noindent
Q: What is the local time of the day, when the lamp (the Sun), the shadow board and the axis of the globe (Earth) are within the same plane? From the perspective of the shadow board on the Earth, where would be the Sun in the sky?\\\noindent
A: The Sun just passes the meridian, i.e. it is due south. Therefore, this situation is local noon.
\medskip
While keeping the orientation of the globe, rotate it around its axis and watch how the shadow changes (Fig.~\ref{f:globe2}).
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ShadowBoard_Time.jpg}}
\caption{Change of shadow for situations before (left) and after local noon (right). The orientation of the shadow indicates time (own work, not presented to the students).}
\label{f:globe2}
\end{figure}
\medskip\noindent
Q: Which situation corresponds to the configuration with the shadow board east of the previous orientation of the globe?\\\noindent
A: This is the morning of the day.
\medskip\noindent
Q: In which way does the shadow change?\\\noindent
A: It turns away from the previous direction and becomes longer.
\medskip\noindent
Q: When is the shadow shortest?\\\noindent
A: At local noon.
\medskip
Now, return to the initial configuration. Then change the latitude of the starting position by moving the shadow board north and south (Fig.~\ref{f:globe3}).
Tip: If an inflatable globe is used, its orientation can be fixed by mounting it on a bowl.
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ShadowBoard_Latitude.jpg}}
\caption{Change of shadow during local noon for situations more northern (left) and more southern (right) than the initial position. The length of the shadow at noon indicates latitude (own work, not presented to the students).}
\label{f:globe3}
\end{figure}
\medskip\noindent
Q: In which way does the shadow change?\\\noindent
A: The length changes. It is shorter for more southern positions, and longer for more northern positions.
\medskip
You will now simulate a voyage to the southern tip of Greenland. During each measurement with the shadow board adjust the globe such that it indicates local noon for the board.
Now put the shadow board on a position west along the current latitude. Rotate the globe until the shadow points north. Repeat this procedure a few times until you reach the southern tip of Greenland. Make sure, the tilt of the axis is kept constant.
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ShadowBoard_Voyage.jpg}}
\caption{Functionality of the shadow board when travelling west along latitude. When measured at local noon, the orientation and the length remains the same (own work, not presented to the students).}
\label{f:globe4}
\end{figure}
\medskip\noindent
Q: Explain why the length of the shadow during local noon is always the same anywhere on the same latitude.\\\noindent
A: The configuration between the lamp (the Sun) and any position on a given latitude is always the same. Rotating the globe (Earth) does not change the angle under which the shadow board is illuminated.
\subsection{The Math of the Shadow Board (optional, for higher terms, trigonometric functions needed)}
This topic is an interesting application of simple trigonometry. Therefore, the example of the shadow board can be used to motivate reinforcing trigonometry.
For simplicity, the calculations assume:
\begin{itemize}
\item The Sun is above the equator (equinox).
\item The radius of the Earth is negligible in comparison to Sun's distance.
\item Local noon at the location of the shadow board.
\item The local horizon at the position of the shadow board is flat.
\end{itemize}
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ExpSetup2.png}}
\caption{Sketch that represents the illumination of a gnomon at a certain latitude on Earth by the Sun. For simplicity, the Sun is located above the equator (equinox). Local noon is assumed (own work).}
\label{f:sun-earth}
\end{figure}
The basic configuration of the Sun and Earth is shown in Fig.~\ref{f:sun-earth}. There is a gnomon (i.e.~the shadow board) extending from the surface of the Earth that, illuminated by the Sun, casts a shadow. Since the Earth is small in comparison to the Sun's distance, the rays of light hitting the equator and the gnomon are considered to be parallel to each other (Fig.~\ref{f:shadowlength}).
\begin{figure}[!ht]
\centering
\resizebox{\hsize}{!}{\includegraphics{ExpSetup3.png}}
\caption{Sketch that demonstrates the geometric relations of a gnomon (stick) of height $h$ at latitude $\varphi$ that, illuminated by the Sun, casts a shadow of the length $\ell$. For simplicity, the Sun is located above the equator (equinox). The local horizon is assumed to be flat (own work).}
\label{f:shadowlength}
\end{figure}
Since the local horizon at the position of the shadow board is a tangent at the surface of the Earth, the gnomon and the horizon subtend a right angle. The height of the gnomon is $h$ and the length of the shadow is $\ell$. The geometry of Fig.~\ref{f:shadowlength} demonstrates that the latitude $\varphi$ is also the angle opposite of $\ell$.
As a task, develop Fig.~\ref{f:shadowlength} with the entire class or group.
Our local coordinate system that extends to the horizon is a tangent area that touches the surface of the Earth. When looked at from the side, this area appears like a line that touches the circumference of the Earth -- a circle.
\medskip\noindent
Q: What is the angle between a tangent and a line connecting it to the centre of the circle?\\\noindent
A: It is a right angle.
\medskip\noindent
Let them identify the right angled triangle.
\medskip\noindent
Q: What is the trigonometric function that describes the relation between $\ell$ and $h$?\\\noindent
A: The tangent.
\medskip\noindent
Q: If $h = 10\,{\rm cm}$, what is the length of the shadow $\ell$ at latitudes of $\varphi = 40\degr$ and $60\degr$?\\\noindent
A: $\tan\varphi = \frac{\ell}{h} \leftrightarrow \ell=h\cdot\tan\varphi = 8.4\,{\rm cm}$ and $17.3\,{\rm cm}$.
\subsection{Conclusions}
Q: Why does the shortest shadow during the day point north (northern hemisphere)?\\\noindent
A: The shadow is shortest, when the Sun is highest during the day. In the northern hemisphere, this is when the Sun transits the meridian, i.e. it is exactly south. The shadow hast to point north.
\medskip\noindent
Q: What time was it, when the Sun was in the South (northern hemisphere)?\\\noindent
A: Most probably not 12 h, noon.
\medskip\noindent
Q: Why does the clock show something else than 12 h at local noon, when the Sun attains its highest elevation?\\\noindent
A: Time zones, daylight saving time, equation of time (bonus knowledge)
\medskip\noindent
Q: The length of the shadow at local noon changes throughout the year. Why?\\\noindent
A: The declination of the Sun changes. This is because the Earth with its titled axis revolves around the Sun. From the surface of the Earth, the Sun appears to be alternating between the Tropic of Cancer and the Tropic of Capricorn. This modifies the elevation of the Sun seen from any point on Earth.
\section{Conclusion}
The activity shows how the cardinal directions can be determined with the shadow of a gnomon caused by the Sun during the day. At the same time, the length of the shadow is a measure of the latitude on Earth. This knowledge represents a navigational skill that Vikings during the 8th until the 11th century used to find their course to distant destinations across the open seas. A short story is included that tells the students something about what the life of a Viking may have looked like and generates interest to study this important and influential era of European history.
\begin{acknowledgements}
This resource was developed in the framework of Space Awareness. Space Awareness is funded by the European Commission's Horizon 2020 Programme under grant agreement no. 638653.
The hands-on activity is based on the "Parallel Earth" tool developed by Carme Alemany and Rosa Maria Ros within the educational programme EU-UNAWE.
\end{acknowledgements}
\bibliographystyle{aa}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 5,873 |
Q: RxJava Observable to smooth out bursts of events I'm writing a streaming Twitter client that simply throws the stream up onto a tv. I'm observing the stream with RxJava.
When the stream comes in a burst, I want to buffer it and slow it down so that each tweet is displayed for at least 6 seconds. Then during the quiet times, any buffer that's been built up will gradually empty itself out by pulling the head of the queue, one tweet every 6 seconds. If a new tweet comes in and faces an empty queue (but >6s after the last was displayed), I want it to be displayed immediately.
I imagine the stream looking like that described here:
Raw: --oooo--------------ooooo-----oo----------------ooo|
Buffered: --o--o--o--o--------o--o--o--o--o--o--o---------o--o--o|
And I understand that the question posed there has a solution. But I just can't wrap my head around its answer. Here is my solution:
myObservable
.concatMap(new Func1<Long, Observable<Long>>() {
@Override
public Observable<Long> call(Long l) {
return Observable.concat(
Observable.just(l),
Observable.<Long>empty().delay(6, TimeUnit.SECONDS)
);
}
})
.subscribe(...);
So, my question is: Is this too naïve of an approach? Where is the buffering/backpressure happening? Is there a better solution?
A: Looks like you want to delay a message if it came too soon relative to the previous message. You have to track the last target emission time and schedule a new emission after it:
public class SpanOutV2 {
public static void main(String[] args) {
Observable<Integer> source = Observable.just(0, 5, 13)
.concatMapEager(v -> Observable.just(v).delay(v, TimeUnit.SECONDS));
long minSpan = 6;
TimeUnit unit = TimeUnit.SECONDS;
Scheduler scheduler = Schedulers.computation();
long minSpanMillis = TimeUnit.MILLISECONDS.convert(minSpan, unit);
Observable.defer(() -> {
AtomicLong lastEmission = new AtomicLong();
return source
.concatMapEager(v -> {
long now = scheduler.now();
long emission = lastEmission.get();
if (emission + minSpanMillis > now) {
lastEmission.set(emission + minSpanMillis);
return Observable.just(v).delay(emission + minSpanMillis - now, TimeUnit.MILLISECONDS);
}
lastEmission.set(now);
return Observable.just(v);
});
})
.timeInterval()
.toBlocking()
.subscribe(System.out::println);
}
}
Here, the source is delayed by the number of seconds relative to the start of the problem. 0 should arrive immediately, 5 should arrive @ T = 6 seconds and 13 should arrive @ T = 13. concatMapEager makes sure the order and timing is kept. Since only standard operators are in use, backpressure and unsubscription composes naturally.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 1,527 |
\section{A Description of \dataName}
\begin{figure*}[h!t!]
\includegraphics[width=\linewidth]{images/Interface.pdf}
\caption{A compressed version of the Mechanical Turk interface for evaluating answer correctness. Workers were asked to score (1 to 5) how similar a candidate is to a reference \textbf{using} the passage and the question.}
\label{fig:dataset:interface}
\end{figure*}
Reading comprehension is the task of probing how well systems can understand passages of text. Framing reading comprehension as a generation problem provides a great deal of flexibility, but introduces the challenging problem of evaluation.
These challenges are further amplified when applied to generative reading comprehension, where the introduction of a passage and a question can add to the complexity of evaluation (Table \ref{tab:dataset:examples}).
To handle this challenge, we propose to \textit{train} a generative reading comprehension metric.
This first requires a large set of human judgement scores to be gathered.
In this section, we present \dataName, a dataset that pairs reading comprehension instances, which consists of a passage, question, and reference, with candidates and human judgement scores.
We describe the process of gathering candidates, collecting human judgement scores, and creating minimal pairs for evaluation.
\subsection{Datasets}
Candidates in \dataName come from 6 constituent QA datasets that are diverse in their domains and answer types.
This ensures that training and evaluation with \dataName does not overfit to the characteristics of any constituent dataset.
\paragraph{\fontfamily{cmss}\selectfont NarrativeQA} \citep{Kocisk2017TheNR}
tests reasoning about events, entities, and their relations on movie scripts and book summaries.
\paragraph{\fontfamily{cmss}\selectfont MCScript} \citep{Ostermann2018MCScriptAN}
tests reasoning on stories written for a child-level reader.
\paragraph{\fontfamily{cmss}\selectfont CosmosQA} \citep{Huang2019CosmosQM}
tests commonsense reasoning on blogs describing everyday events.
\paragraph{\fontfamily{cmss}\selectfont SocialIQA} \citep{Sap2019SocialIC}
tests social reasoning with passages constructed from a knowledge base.
\paragraph{\fontfamily{cmss}\selectfont DROP} \citep{Dua2019DROPAR}
tests predicate argument structure and numerical reasoning on Wikipedia articles concerning American football games, census results, and history.
\paragraph{\fontfamily{cmss}\selectfont Quoref} \citep{Dasigi2019QuorefAR}
tests coreferential reasoning on Wikipedia articles.\\
NarrativeQA was created as a generative RC dataset.
CosmosQA, MCScript, and SocialIQA were created as MC datasets which we re-purpose as generative datasets by using the correct choice as the reference.
Our motivation for doing this is that the number of generative QA datasets is quite small, which we attribute to the quality of evaluation metrics.
The main focus of this work is in developing and evaluating metrics for generative RC. However, we wanted to see whether a learned metric could do well on span-selection datasets.
We collected candidates on two span-based datasets, DROP and Quoref, to test this.
\subsection{Collecting Candidates}
Candidates on all four generative datasets are generated using backtranslation \citep{Sennrich2016ImprovingNM} and using a fine-tuned GPT-2 model \citep{Radford2019LanguageMA}.
We also generate candidates for NarrativeQA and MCScript using a trained MHPG model \citep{Bauer2018CommonsenseFG}.
We tried using MHPG for CosmosQA and SocialIQA but candidates were of poor quality.
Unique to NarrativeQA, each question has two references.
We treat the second reference as a candidate to be annotated if it has low \textit{n}-gram overlap with the first reference.
We use a span-selection BERT-based model to generate candidates for Quoref and NAQANET~\cite{Dua2019DROPAR} and NABERT\footnote{https://github.com/raylin1000/drop-bert} models for DROP.
Models are trained on the training sets of each constituent dataset and candidates are produced on instances from the validation set (and test set if available).
We filtered out candidates that exactly matched the reference.
We also filtered out instances in DROP where the reference and the candidate are both numbers.\footnote{From our inspection, if the reference and candidate are both numbers that are not equal, the candidate is always wrong.}
In total, \dataName contains 40K candidates, large enough for training a learned metric as well as for evaluating current and future metrics.
\begin{table*}[t!h!]
\centering
\resizebox{16cm}{!}{
\begin{tabular}{lccccccccccccc}
\toprule
\multirow{2}{*}{\bf Dataset} & \multirow{2}{*}{\bf \thead{Avg \\Pass. Len}} & \multirow{2}{*}{\bf \thead{Avg \\ Ques. Len}} & \multirow{2}{*}{\bf \thead{Avg \\ Ref. Len}} & \multirow{2}{*}{\bf \thead{Avg \\ Cand. Len}} & \multicolumn{3}{c}{\bf \# Passages} & \multicolumn{3}{c}{\bf \# Ques./Ref. Pairs} & \multicolumn{3}{c}{\bf \# Candidates} \\
\cmidrule(lr){6-8}
\cmidrule(lr){9-11}
\cmidrule(lr){12-14}
& & & & & Train & Dev & Test & Train & Dev & Test & Train & Dev & Test \\\midrule
NarrativeQA & 333.0 & 9.6 & 5.8 & 5.9 & 85 & 11 & 18 & 2249 & 277 & 500 & 7471 & 890 & 1707 \\
MCScript & 197.1 & 7.8 & 4.3 & 4.1 & 462 & 61 & 93 & 2940 & 390 & 583 & 7210 & 978 & 1409 \\
CosmosQA & 72.8 & 10.8 & 7.5 & 8.8 & 1064 & 142 & 212 & 1139 & 156 & 226 & 5033 & 683 & 1017 \\
SocialIQA & 15.7 & 7.2 & 3.9 & 3.9 & 3075 & 414 & 611 & 3075 & 414 & 611 & 7409 & 1017 & 1527 \\
DROP & 213.4 & 11.6 & 3.6 & 5.1 & 80 & 10 & 17 & 542 & 76 & 117 & 687 & 97 & 152 \\
Quoref & 324.0 & 15.8 & 2.3 & 8.2 & 184 & 24 & 38 & 1098 & 123 & 180 & 3259 & 344 & 509\\
\midrule
Total & & & & & 4950 & 662 & 989 & 11043 & 1436 & 2217 & 31069 & 4009 & 6321 \\
\bottomrule
\end{tabular}
}
\caption{Statistics for the human judgements per constituent dataset in \dataName.}
\label{table:dataset:HARC-stats}
\end{table*}
\subsection{Annotation Procedure}
Annotations are collected with Mechanical Turk using the interface in Fig. \ref{fig:dataset:interface}.
Workers are asked to score candidate answers on an ordinal scale from 1 to 5.
We start by collecting a single annotation per candidate.
Following this, candidates are split into training, validation, and test sets such that all candidates from a passage are contained within a dataset split.
For instances in our validation and test sets, we collect one additional human judgement score per candidate for span-based datasets, and two additional human judgement scores per candidate for generative datasets.
Multiple annotations for a given candidate are averaged to form a gold annotation.
More details such as payout and qualification testing are provided in Appendix \ref{sec:appendix_mechanical_turk}.
We calculated inter-annotator agreement using Krippendorff's Alpha-Reliability~\citep{Krippendorff2011ComputingKA} on the validation set of all 6 constituent datasets. We choose this metric because it applies to our setting, where there are multiple annotators per instance, and the annotators vary between instances. Agreement on our 6 datasets range from 0.71 to 0.92 (average = 0.82), indicating strong agreement.
\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{images/score_distribution.pdf}
\caption{Human judgement score distribution on the training set of \dataName, divided into the 6 constituent datasets. The distribution of scores is right-skewed because we did not annotate candidates that exactly matched a reference.}
\label{fig:dataset:all-scores}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{images/gpt2_score_distribution.pdf}
\caption{Score distribution on candidates from GPT-2. GPT-2 produces a \textit{very} skewed score distribution for CosmosQA and SocialIQA, highlighting the difficulty of generative RC on commonsense questions.}
\label{fig:dataset:gpt2-scores}
\end{figure}
\subsection{Statistics for \dataName}
Statistics of instances and dataset splits in \dataName are provided in Table \ref{table:dataset:HARC-stats}.
The number of unique passages varies considerably across datasets.
NarrativeQA, which has the longest passages, has few unique passages, while SocialIQA has a unique passage for each question/reference pair.
The number of candidates also varies across datasets.
The most pronounced outlier is DROP, where we collected a tenth of the candidates compared to the other datasets.
This is because we filtered out instances when both the candidate and reference were numbers, leaving much fewer candidates to annotate.
The number of candidates outnumbers the question/reference pairs because for each pair, we generated multiple candidates using different generation sources (e.g. backtranslation, different model outputs).
Fig. \ref{fig:dataset:all-scores} provides the annotation score distribution on the training set of \dataName.
Score distributions are right-skewed because we did not collect annotations when the reference exactly matched the candidate.
The right-skew is most pronounced for Quoref because the number of ways a candidate can get a perfect score while not matching the reference is limited in a span extraction format.
\begin{table*}[t!]
\centering
\small
\begin{tabular}{p{.7in} p{2.75in} p{2.1in}}
\toprule \textbf{Phenomenon} & \textbf{Original Instance} & \textbf{Minimal Pairs}\\ \midrule
Coreference &
\textbf{Passage:} Norman is the supposed son of Frenchman de Vac \ldots As de Vac dies, he reveals Norman is Richard, the king's son and Edward's brother, who he kidnapped. \newline
\textbf{Q:} Who is the Frenchman de Vac? \newline
\textbf{Ref:} a fencing master who kidnapped Norman &
\textbf{\textcolor{blue}{Cand. 1:}} a fencing master who kidnapped Richard \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} a fencing master who kidnapped Edward \textbf{\textcolor{olive}{(3)}}\\\\
Hyponymy &
\textbf{Passage:} With the electric rifle, Tom and friends bring down elephants, rhinoceroses, and buffalo. \newline
\textbf{Q:} What does Tom bring down with his rifle? \newline
\textbf{Ref:} Rhinoceroses, buffalo, and elephants. &
\textbf{\textcolor{blue}{Cand. 1:}} Animals \textbf{\textcolor{olive}{(4)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Humans \textbf{\textcolor{olive}{(1)}}\\\\
Negation &
\textbf{Passage:} skylar told quinn's friend about a secret that quinn wanted to keep hidden. \newline
\textbf{Q:} What will Quinn want to do next? \newline
\textbf{Ref:} be angry &
\textbf{\textcolor{blue}{Cand. 1:}} Quinn will be mad at Skylar \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Quinn will not be mad at Skylar \textbf{\textcolor{olive}{(1)}}\\\\
Semantic Role &
\textbf{Passage:} Taylor gave a raise and promotion to Kendall. \newline
\textbf{Q:} How would you describe Taylor? \newline
\textbf{Ref:} As someone who appreciates what Kendall does &
\textbf{\textcolor{blue}{Cand. 1:}} Taylor appreciates Kendall \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Kendall appreciates Taylor \textbf{\textcolor{olive}{(1)}}\\\\
Syntax &
\textbf{Passage:} Taylor looked around in Robin's cupboards and peeked inside Robin's drawers and medicine cabinet. \newline
\textbf{Q:} How would you describe Taylor? \newline
\textbf{Ref:} intrusive &
\textbf{\textcolor{blue}{Cand. 1:}} I would describe Taylor as intrusive \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Would I describe Taylor as intrusive \textbf{\textcolor{olive}{(3)}}\\\\
Word Sense &
\textbf{Passage:} Taylor got married but kept her last name. \newline
\textbf{Q:} How would you describe Taylor? \newline
\textbf{Ref:} independent &
\textbf{\textcolor{blue}{Cand. 1:}} individualistic \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} nonpartisan \textbf{\textcolor{olive}{(1)}}\\\\
Other &
\textbf{Passage:} The Princess stuffs her ears with cotton and begins her journey. \newline
\textbf{Q:} What does the Princess put in her ears? \newline
\textbf{Ref:} She puts cotton in her ears. &
\textbf{\textcolor{blue}{Cand. 1:}} Her ears have cotton \textbf{\textcolor{olive}{(4)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Her ears are cotton \textbf{\textcolor{olive}{(2)}}\\
\bottomrule
\end{tabular}
\caption{Minimal pairs categorized by the linguistic phenomena. Given a passage, question, and reference, we create two new candidates, \textcolor{blue}{$\mathbf{c_1}$} and \textcolor{red}{$\mathbf{c_2}$}, with associated human judgement scores \textcolor{olive}{$\mathbf{s_1}$} and \textcolor{olive}{$\mathbf{s_2}$}. In total, we wrote 200 minimal pairs (50 for each generative QA dataset).}
\label{tab:dataset:minimal-pairs}
\end{table*}
\subsection{Limitations and Robust Evaluation with Minimal Pairs}
Candidates in \dataName come from existing models, so that a metric learned on this data will be most applicable to current research.
However, as research in generative reading comprehension models is presently limited, the strength of these models can be low.
Fig. \ref{fig:dataset:gpt2-scores} shows that generative QA models struggle to produce quality answers when asked about commonsense scenarios.
The majority of 5's in CosmosQA and SocialIQA are produced via backtranslation, while GPT-2 struggles to produce ``correct'' candidates.
This raises an issue with the evaluation; a metric can look strong when evaluated on current model outputs, but may in-fact struggle in the future when QA systems produce better answers.
Thus, using only these candidates for evaluation could lead to overconfidence in a learned metric's capabilities.
We take inspiration from from recent work creating more robust evaluations \citep{Kaushik2020LearningTD, Gardner2020EvaluatingNM} and augment the test set of \dataName with a small number of minimal pairs created by the authors.
Given a passage, question, and reference from the test set, we manually create two new candidates, $\mathbf{c_1}$ and $\mathbf{c_2}$, which form a minimal pair.
Accompanying $\mathbf{c_1}$ and $\mathbf{c_2}$ are human judgement scores, $\mathbf{s_1}$ and $\mathbf{s_2}$, collected using the same interface in Fig. \ref{fig:dataset:interface}.
The minimal pair is created so that $\mathbf{c_1}$ has a higher score (i.e. is a better answer) than $\mathbf{c_2}$.
Each minimal pair is designed to capture a particular linguistic phenomenon (see Table \ref{tab:dataset:minimal-pairs}).
Using this set of minimal pairs, we can study how often a metric prefers the better candidate.
We create 200 minimal pairs (50 for each generative QA dataset), which we use for evaluation \textit{separately} from the original test set.
\section{Background}
We first define the task the problem of generative reading comprehension.
Given two input sequences, a passage, $\textbf{p}$, and a question, $\textbf{q}$, a model is tasked to produce an output sequence: a \textit{candidate} answer, $\hat{\textbf{a}}$.
Evaluation is done by comparing $\hat{\textbf{a}}$ against a reference answer, $\textbf{a}$, using an evaluation metric \citep{Sellam2020BLEURTLR, Banerjee2005METEORAA}.
Most existing metrics compare the token overlap between the reference and candidate while ignoring the passage and the question.
Our proposed solution is to \textit{train} a metric (as opposed to engineering a metric) which incorporates the passage and question for evaluating generative RC.
\sameer{if this is all in this section, it shouldn't be a section by itself. You don't use the notation till section 4. I thought you had more materials here earlier}
\section{Conclusion}
We present \dataName, a dataset of human judgement scores for training and evaluating generative reading comprehension metrics.
Using \dataName, we train a learned metric, \metricName, that outperforms all existing metrics and is much more robust when evaluated on a set of minimal pairs.
While we have demonstrated that \metricName is a better metric for evaluating generative reading comprehension than any existing metric, considerable work remains.
Error analysis reveals that there exist gaps in \metricName's ability to handle certain phenomena, such as correctly leveraging the passage.
Future work involves collecting data to addresses weaknesses of \metricName.
We also anticipate a continual cycle of generative RC model and dataset developments that will enable easier collection of more diverse and useful candidates.
This in turn will allow better learned metrics, which can be used to evaluate ever more complex models.
\section{Experiments}
\textbf{Training LERC:}
We use the PyTorch \citep{Paszke2019PyTorchAI}, HuggingFace Transformers \citep{Wolf2019HuggingFacesTS}, and AllenNLP \citep{Gardner2017ADS} libraries to implement \metricName.
We pre-train \metricName before fine-tuning on \dataName.
We evaluate \metricName in two settings, an out-of-dataset (OOD) setting and an all-datasets (AD) setting.
In the OOD setting, we train and tune \metricName on all datasets in \dataName \textit{except} the dataset we are evaluating on.
This reflects the use case where we want to apply \metricName to evaluate a new dataset where we do not have human judgement scores.
In the AD setting, we train on all datasets in \dataName and evaluate on all datasets.
All results reported for \metricName are the average of three runs using the best set of hyperparameters found on the validation set of \dataName.
\vspace{2mm}
\noindent\textbf{Baselines:}
We compare \metricName against BLEU-1 \citep{Papineni2001BleuAM}, ROUGE-L \citep{Lin2004ROUGEAP}, METEOR \citep{Banerjee2005METEORAA}, and BERTScore \citep{Zhang2019BERTScoreET}.
We also compare \metricName against a BERT-base model fine-tuned on the sentence similarity task, STS-B \citep{Cer2017SemEval2017T1}.
Results for BERT STS-B are the average of three runs using the best set of hyperparameters found on the validation set of STS-B.
All baselines are agnostic to the passage and the question.
\subsection{Correlation Results}
We evaluate the baselines and OOD \metricName in Table \ref{tab:experiments:metric-correlation} using Pearson correlation.
\metricName outperforms the baseline metrics despite being trained in a out-of-dataset situation.
METEOR does surprisingly well despite relying on \textit{n}-gram overlap to do evaluation.
Interestingly, the sentence similarity model does better than the baseline metrics while falling behind \metricName.
We also study whether having human judgements for a particular dataset helps.
We present results in Table \ref{tab:experiments:lerc-all} on the validation set of \dataName when \metricName is trained in an AD setting.
Having human judgements for the target dataset is always helpful.
\begin{table}[tb]
\begin{center}
\begin{tabular}{lc}
\toprule
\bf Dataset & \bf Dev \textit{r} \\
\midrule
NarrativeQA & 0.805 \\
MCScript & 0.816 \\
CosmosQA & 0.864 \\
SocialIQA & 0.820 \\
DROP & 0.796 \\
Quoref & 0.794 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Pearson correlation on the validation set of \dataName with \metricName trained on all constituent datasets.}
\label{tab:experiments:lerc-all}
\end{table}
\begin{table}[t!]
\begin{center}
\begin{tabular}{p{1.85 in} c}
\toprule
\bf Ablation & \bf Avg. Dev \textit{r} \\\midrule
Ref. Only & 0.081 \\
Cand. Only & 0.093 \\
Ref. \& Cand. & 0.742 \\
Ques. \& Ref. \& Cand. & 0.723 \\
Pass. \& Ques. \& Ref. \& Cand. & 0.726\\
\addlinespace\hline\addlinespace
\metricName (with pre-training) & 0.755 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Partial-input ablations of LERC trained in an out-of-dataset fashion.
Results are Pearson correlation on the validation set, averaged across all constituent datasets.}
\label{tab:experiments:lerc-ablation}
\end{table}
\begin{table}[h!t]
\small
\begin{center}
\begin{tabular}{p{0.5in} p{2.2 in}}
\toprule
\bf Error Source & \bf Example \\
\midrule
Passage Use \textit{(22.5\%)} &
\textbf{Passage:} Edward takes charge and the children develop and expand the farmstead, aided by the entrepreneurial spirit of the younger brother Humphrey. They are assisted by a gypsy boy, Pablo, who they rescue from a pitfall trap.\newline
\textbf{Q:} Who do the children rescue from a trap?\newline
\textbf{Ref:} Pablo \quad \textbf{Cand:} A gypsy kid\newline
\textbf{Human Score:} 4.6 \quad \textbf{\metricName:} 1.0 \\\\
Same Meaning \textit{(35\%)}&
\textbf{Passage:} The story centres on the relationship between Mrs Kitty Warren and her daughter, Vivie. Mrs. Warren, a former prostitute. \newline
\textbf{Q:} What did Mrs. Warren previously do for work?\newline
\textbf{Ref:} Prostitution \newline
\textbf{Cand:} She was an escort. \newline
\textbf{Human Score:} 4.6 \quad \textbf{\metricName:} 1.06 \\\\
Opposite Meaning \textit{(15\%)} &
\textbf{Passage:} Sasha hated her neighbours dog as it barked all day and night so after going to the shop and buying poisonous slug pellets, Sasha gave the dog some pills. \newline
\textbf{Q:} How would you describe Sasha? \newline
\textbf{Ref:} mean \quad \textbf{Cand:} kind \newline
\textbf{Human Score:} 1 \quad \textbf{\metricName:} 4.32 \\\\
Other \textit{(27.5\%)} &
\textbf{Passage:} The train was slow and ambling, so much so that we were 2 hours late when we arrived in Montreal, missing our connection.\newline
\textbf{Q:} What might be true if the freight trains didn't cause a delay ? \newline
\textbf{Ref:} They wouldn't have missed their connection \newline
\textbf{Cand:} they couldn't help noticing their connection \newline
\textbf{Human Score:} 1 \quad \textbf{\metricName:} 4.2 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Error analysis of \metricName. We take the 10 validation instances per \textit{generative} dataset (40 total) with the largest difference between the score assigned by \metricName and the score assigned by humans. We then group the highest error instances by the sources of the error.}
\label{tab:experiments:error analysis}
\end{table}
\subsection{Error Analysis of \metricName}
We gather the 10 validation instances per generative dataset (40 instances total) with the highest absolute difference between the human judgement score and \metricName score.
We categorize the errors made by \metricName in Table \ref{tab:experiments:error analysis}.
A large source of error is the inability to leverage the passage correctly as well as handling large lexical gaps between references and correctly paraphrased candidates.
The ``Other'' category includes understanding semantic roles and misspellings of the reference.
\begin{table*}[t!]
\begin{center}
\begin{tabular}{lccccc}
\toprule
\bf Metric & \bf NarrativeQA & \bf MCScript & \bf CosmosQA & \bf SocialIQA & \bf Avg. \\
BLEU-1 & 53 & 54 & 52 & 55 & 53.5 \\
ROUGE-L & 53 & 57 & 53 & 53 & 61.2 \\
METEOR & 60 & 62 & 57 & 53 & 54 \\
BERTScore & 70 & 58 & \textbf{74} & 62 & 66 \\
\addlinespace \hline \addlinespace
BERT STS-B & 70.6 & 70 & 59.3 & 66.6 & 66.6 \\
\addlinespace \hline \addlinespace
\metricName & \textbf{80} & \textbf{87.3} & 72.6 & \textbf{81.3} & \textbf{80.3} \\
\bottomrule
\end{tabular}
\end{center}
\caption{Results of \metricName (OOD setting) and baselines evaluated on minimal pairs. Numbers are accuracy values: given a minimal pair of candidates, what percent of the time does a metric prefer the better candidate.}
\label{tab:experiments:minimal pair}
\end{table*}
\subsection{Ablation Results}
We study five ablations of OOD LERC with results in Table \ref{tab:experiments:lerc-ablation}.
All ablations do not involve any pre-training.
When looking at ablations of \metricName, several interesting phenomena emerge.
Pre-training is important with such a complex input structure.
Removing pre-training while still using the passage and question as input hurts performance.
Ablations of \metricName that do not use the passage but still have the reference and candidate as input only fall slightly behind the complete metric.
One explanation is that current generative QA models may not generate many candidates that would require the metric to use the passage.
Therefore, even the complete version of \metricName may have learned to ignore the passage.
We explore this in the following section when conducting an error analysis of \metricName.
As sanity checks for dataset biases, we also evaluate impoverished ablations that should not perform well: when the model has access only to the reference or to the candidate.
These ablations correlate quite poorly with human judgments.
The correlation is slightly positive for both, however, perhaps measuring the grammaticality of a candidate, or the difficulty of matching long references.
\subsection{Minimal Pair Results}
We now present results on the set of minimal pairs.
We use these minimal pairs to evaluate preference: given a minimal pair of candidates ($\mathbf{c_1}$, $\mathbf{c_2}$), what percentage of the time does a metric prefer the better candidate?
For cases where a metric assigns the same score to both candidates, we give a half-point.
Results are reported in terms of accuracy in Table \ref{tab:experiments:minimal pair}.
\textit{N}-gram based metrics are close to random, which aligns with intuition because minimal pairs were created such that both candidates have a similar token overlap with the reference.
The sentence similarity model does much better, likely because it generalizes beyond token overlap.
Finally, \metricName (OOD setting) does the best, suggesting that while there is still room for improvement, the phenomena targeted by the minimal pairs is captured when evaluated using preference.
\subsection{\metricName vs BLEU}
To understand the differences in behavior between \metricName and the popular BLEU metric, we collect the 10 validation instances per generative dataset with the highest absolute difference between the BLEU-1 and \metricName score.
We categorize the source of the differences in Table \ref{tab:experiments:lerc-vs-bleu}.
In about 90\% of the cases, the gap is due to BLEU scoring candidates too low (e.g. not capturing paraphrases).
In the remaining cases, the gap is due to \metricName over-scoring the candidate, usually due to the reference and candidate being similar (e.g. both are numbers).
\begin{table}[tb!]
\small
\begin{center}
\begin{tabular}{p{0.7in} p{2 in}}
\toprule
\bf Difference Source & \bf Examples \\
\midrule
BLEU under-scores paraphrases \textit{(92.5\%)} &
\textbf{Passage:} Tracy took Jesse's students to the park. Jesse had an emergency and asked her to.\newline
\textbf{Q:} How would Jesse feel afterwards?\newline
\textbf{Ref:} grateful \quad \textbf{Cand:} thankful\newline
\textbf{\metricName:} 5.0 \quad \textbf{BLEU-1:} 0 \newline
\textbf{Human Score:} 5\\\\
\metricName overly sensitive \textit{(7.5\%)}&
\textbf{Passage:} By 17, Norman is the best swordsman in all of England; by the age of 18, he has a large bounty on his head, and by the age of 19, he leads the largest band of thieves in all of England.\newline
\textbf{Q:} What age was Norman when there was a bounty on his head?\newline
\textbf{Ref:} 18 \quad \textbf{Cand:} 19 \newline
\textbf{\metricName:} 5.0 \quad \textbf{BLEU-1:} 0 \newline
\textbf{Human Score:} 1 \\\\
\bottomrule
\end{tabular}
\end{center}
\caption{Analysis of \metricName vs BLEU-1. We take the 10 validation instances per \textit{generative} dataset (40 total) with the largest difference between the score assigned by \metricName and the score assigned by BLEU-1. We then group these instances by the source of the difference.}
\label{tab:experiments:lerc-vs-bleu}
\end{table}
\section{A Learned Metric}
We provide details on \metricName, our learned metric.
\metricName is initialized using BERT-base \citep{Devlin2018BERTPO}
We define as input a tuple consisting of a passage, $\textbf{p}$, a question, $\textbf{q}$, a reference answer, $\textbf{a}$, and a candidate answer, $\hat{\textbf{a}}$.
The input to BERT is structured as:
\begin{align*}
\text{[CLS]}\;\text{\textbf{p}}\;\text{[SEP]}\;\text{\textbf{q}} \;\text{[SEP]}\;\text{\textbf{a}}\;\text{[SEP]}\;\hat{\text{\textbf{a}}}\;\text{[SEP]}
\end{align*}
BERT returns a hidden state for each input token. We use the first hidden state $\textbf{h}_{[CLS]}$, as the pooled representation of the input.
\subsection{Fine-Tuning with Human Judgements}
Our goal is to train BERT to mimic the human judgements given a set of input tuples, $\{(\textbf{p}, \textbf{q}, \textbf{a}, \hat{\textbf{a}})\}_{i=1}^n$, and a set of human judgment scores, $\{y\}_{i=1}^n$,
We apply a regression layer on top of our pooled representation (Fig. \ref{fig:model}) and train with a MSE loss.
\begin{gather*}
\hat{y_i} = \textbf{W}\:\textbf{h}_{i\:[CLS]} \\
\text{loss}_i = (y_i - \hat{y}_i)^2
\end{gather*}
\subsection{Pre-Training the Learned Metric}
Learning the interactions between the input components can be difficult with only human judgement fine-tuning.
To overcome this, we \textit{pre-train} on four multiple-choice QA datasets: BoolQ \citep{Clark2019BoolQET}, MCTest \citep{Richardson2013MCTestAC}, RACE \citep{Lai2017RACELR}, and MultiRC \citep{Khashabi2018LookingBT}.
We use the same input structure as fine-tuning, but the reference and candidate are replaced by two answer choices, $\mathbf{a_1}$ and $\mathbf{a_2}$:
\begin{align*}
\text{[CLS]}\;\text{\textbf{p}}\;\text{[SEP]}\;\text{\textbf{q}} \;\text{[SEP]}\;\mathbf{a_1}\;\text{[SEP]}\;\mathbf{a_2}\;\text{[SEP]}
\end{align*}
We pre-train BERT via 3-way classification to predict whether: $\mathbf{a_1}$ is the correct answer, $\mathbf{a_2}$ is the correct answer, or $\mathbf{a_1}$ and $\mathbf{a_2}$ are both correct.
MultiRC has multiple correct answers per question and we create additional instances where both $\mathbf{a_1}$ and $\mathbf{a_2}$ are correct by duplicating the correct answer for all three datasets.
\section{Related Work}
There has been a long history of developing evaluation metrics, which have generally fallen into one of three categories.
The first consists of metrics that use some variant of \textit{n}-gram matching \citep{Papineni2001BleuAM,Lin2004ROUGEAP,Banerjee2005METEORAA}.
They are easy to implement, but lack flexibility by focusing only on token overlap.
The second cateogry of metrics eschew some of the aforementioned issues by calculating a \textit{softer} similarity score using \textit{embeddings} of tokens \citep{Clark2019SentenceMS,Zhang2019BERTScoreET}.
However, it is unclear how to tailor them to question answering, where the passage and question should be assimilated.
The final category consists of metrics learned end-to-end from human judgements \citep{Cui2018LearningTE,Sellam2020BLEURTLR}.
These metrics are flexible in that they can be tuned to the specific evaluation setting but depend on a large corpus of human judgement scores to train on.
We hope that the release of \dataName pushes the development of QA metrics that fall into this category.
\dataName is directly inspired by the annual WMT Metrics Shared Task \citep{Machcek2014ResultsOT,Stanojevi2015ResultsOT,Bojar2016ResultsOT,Bojar2017ResultsOT,Ma2018ResultsOT,Ma2019ResultsOT}.
Participants submit automatic translations and human judgement scores are collected for the submitted translations.
The annotations collected as part of the WMT Metrics Shared Task have made it easy to evaluate and create new translation metrics~\cite{Popovic2015chrFCN,Ma2017BlendAN,Shimanaka2018RUSERU}.
In a similar vein, SummEval is a recently released dataset that evaluates a number of evaluation metrics for summarization \citep{Fabbri2020SummEvalRS}.
\section{Introduction}
Reading comprehension (RC) has seen significant progress in the last few years, with a number of question answering (QA) datasets being created \citep{Rajpurkar2016SQuAD10,Lai2017RACELR,Talmor2018CommonsenseQAAQ}.
However, a majority of datasets are presented using a span-selection or multiple-choice (MC) format.
Both formats are easy to evaluate, but in return, have restrictions placed on the questions that can be asked or the answers that can be returned.
Furthermore, both formats hinge on distractor spans/choices for learning to be effective.
Ensuring high quality distractors is a challenging task in and of itself, which can lead to models that exploit spurious correlations \citep{Jia2017AdversarialEF, Min2019CompositionalQD, Geva2019AreWM}.
Posing RC as a generation task addresses the aforementioned issues.
Generative RC does not require distractors, circumventing biases that could be introduced by them, and allows arbitrary questions and answers.
\begin{figure}[t!]
\begin{framed}
\small \textbf{Passage:} \ldots Behind one door is a lady whom the king has deemed an appropriate match for the accused; behind the other is a fierce, hungry tiger. Both doors are \textbf{\textcolor{purple}{heavily soundproofed to prevent the accused from hearing what is behind each one}}\ldots
\vskip 2mm
{\small
\begin{tabular}{@{}lp{50mm}}
\textbf{Question:} & What feature do the doors have?
\end{tabular}
\begin{tabular}{@{}lp{45mm}}
\textbf{Reference:} & soundproofed \\
\textbf{Candidate:} & They are \textbf{\textcolor{purple}{heavily soundproofed to prevent the accused from hearing what's behind each one}}.
\end{tabular}
}
\vskip 2mm
\small \textbf{Human Judgement:} 5 out of 5\\
\small \textbf{LERC:} 4.98 out of 5 \vspace{1.5mm}\\
\small \textbf{BLEU-1:} 0.07 \\
\small \textbf{ROUGE-L:} 0.15 \\
\small \textbf{METEOR:} 0.17
\end{framed}
\caption{Generative reading comprehension example. Properly scoring the candidate requires access to the passage. Current metrics, such as BLEU, ROUGE and METEOR, are agnostic to the end-task while \metricName is trained with the passage and question as input. As a result, \metricName assigns a score that better reflects human judgement.}
\label{fig:introduction:metric-flaws}
\end{figure}
Unfortunately, existing metrics for evaluating text generation come with significant shortcomings.
Many metrics score \textit{n}-gram overlap, and it is well established that using token overlap as a measure of similarity has drawbacks \citep{Chen2019EvaluatingQA,Edunov2019OnTE,Wang2020AskingAA}.
Current metrics also only consider the reference and are agnostic to the end-task being evaluated.
Fig. \ref{fig:introduction:metric-flaws} demonstrates that this is problematic for generative RC because scoring a candidate may require a metric to also consider the passage and the question.
Without cheap and reliable evaluation, progress in generative reading comprehension has been extremely slow.
To address the need for better evaluation metrics tailored to reading comprehension, we present a dataset called \dataName, aimed at developing \textit{learned} metrics that \textbf{MO}del the \textbf{C}orrectness of candidates using \textbf{H}uman \textbf{A}nnotation scores.
\dataName contains human judgement scores on 40K candidates, an order of magnitude larger than prior work~\citep{Chen2019EvaluatingQA}.
The candidates come from six diverse QA datasets which test a wide range of RC phenomena such as commonsense reasoning and understanding narrative over movie scripts.
After collecting all annotations, we follow work on creating more robust evaluation sets~\citep{Kaushik2020LearningTD, Gardner2020EvaluatingNM} and augment the test set of \dataName by manually writing a small set of minimal pairs (Table \ref{tab:dataset:minimal-pairs}).
The set of minimal pairs serve as a harder evaluation set for probing metric robustness.
Using \dataName, we train a \textbf{L}earned \textbf{M}etric for \textbf{R}eading \textbf{C}omprehension which we abbreviate as LERC.
We compare \metricName against two sets of baselines: (1) existing metrics such as METEOR~\citep{Banerjee2005METEORAA} and BERTScore~\citep{Zhang2019BERTScoreET}; and (2) a sentence similarity model trained on STS-B~\citep{Cer2017SemEval2017T1}.
To ensure fair comparison, we evaluate \metricName in an out-of-dataset setting: \metricName is trained on all datasets \textit{except} the one it is being evaluated on.
On the test set, \metricName outperforms baselines by as much as 36 Pearson correlation points and on the minimal pairs set, by as much as 26 accuracy points.
Error analysis and minimal pair results indicate that there is substantial room to improve the robustness of \metricName and its sensitivity to different linguistic phenomena.
We hope that \dataName and \metricName enables a continual cycle of generative RC model and dataset developments that will enable easier collection of more diverse and useful candidates, allowing better learned metrics to be trained.
\section*{Appendix}
\section{Details on Training \metricName}
Training of \metricName is broken into pre-training on multiple-choice QA datasets followed by fine-tuning on human judgement scores.
During pre-training, we used batch size of 32 and train for 4 epochs.
We tune the learning rate (\{1e-5, 2e-5, 3e-5\}) over held out questions using a single runs' loss.
We use accuracy as the criteria to pick the best pre-trained model.
We then take the best pre-trained model and fine-tune on human judgement scores in \dataName.
We again fix the batch size at 32 and train for 3 epochs, tuning the learning rate (\{1e-5, 2e-5, 3e-5\}) over the validation set of \dataName using the average of three runs.
We use Pearson correlation to pick the best fine-tuned model.
When LERC is trained in an OOD setting, we do not tune on the held-out dataset.
\section{Details on Baselines}
We use implementations of BLEU, METEOR, and ROUGE using Microsoft MS COCO evaluation scripts \footnote{https://github.com/salaniz/pycocoevalcap}.
We removed question marks, periods, and exclamation marks from references and candidates when evaluating with BLEU, METEOR, and ROUGE.
The hash-code for BERTScore is \path{roberta-large_L17_no-idf_version=0.3.6(hug_trans=3.0.2)}.
We fine-tune BERT-base on STS-B as another baseline.
We use a batch size of 32 and train for 4 epochs.
We tune the learning rate (\{1e-5, 2e-5, 3e-5\}) over the validation set of STS-B using the average of three runs.
\section{Computational Resources}
All experiments on conducted on a NVIDIA Titan RTX with 24 GB of RAM.
Pre-training of \metricName takes about 3.5 hours while fine-tuning (one run) takes roughly 20 minutes.
\section{Details on Mechanical Turk}
\label{sec:appendix_mechanical_turk}
Collecting \dataName involves three stages: a qualification testing stage, a trial stage, and the full dataset collection stage.
During qualification testing, workers are given 10 candidates to label, and they must score 80\% to pass the test.
After qualification testing, we run a small trial.
During this trial, we release 200 candidates and gather 5 human judgements per candidate to get a sense of annotation agreement and to see if our instructions and examples need to be revised.
Finally, during the full dataset collection process we solicit human judgements on all candidates.
Here, each HIT is an aggregate of 10 candidates that all share the same passage to amortize the cost of reading the passage and workers are paid 40 cents per HIT.\footnote{This amount is set by the authors manually working on this task. We estimate that it takes between a minute and a half to two and a half minutes to complete a HIT depending on the dataset.}
During dataset collection, we randomly sample annotations to check for quality and remove workers that consistently do a poor job.
Workers are paid for working on any of the three stages. The total cost of collecting \dataName is about \$6,000.
\section{Correlation Results based on Generation Source}
We supplement Table \ref{tab:experiments:metric-correlation} by calculating correlation results per generation source for the generative datasets in Table \ref{tab:appendix:generation-correlation}.
We find that \metricName handles candidates from different generation sources with roughly the same performance.
\begin{table}[t!]
\begin{center}
\begin{tabular}{p{1.9 in} c}
\toprule
\bf Dataset/Generation Source & \bf Avg. Dev \textit{r} \\\midrule
CosmosQA & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.714 \\
\hspace{6pt} \small \textit{GPT-2} & 0.636 \\
MCScript & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.545 \\
\hspace{6pt} \small \textit{GPT-2} & 0.661 \\
\hspace{6pt} \small \textit{MHPG} & 0.742 \\
NarrativeQA & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.707 \\
\hspace{6pt} \small \textit{GPT-2} & 0.791 \\
\hspace{6pt} \small \textit{MHPG} & 0.814 \\
SocialIQA & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.602 \\
\hspace{6pt} \small \textit{GPT-2} & 0.596 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Correlation on the validation set (OOD setting) broken down by the source of the generation.}
\label{tab:appendix:generation-correlation}
\end{table}
\section*{Acknowledgements}
We would like to thank AI2 for the funding to collect \dataName.
We would also like to thank members of AI2 and UCI NLP for looking over early drafts of the paper.
This paper is based upon work sponsored by the DARPA MCS program under Contract No. N660011924033 with the United States Office Of Naval Research.
\section*{Acknowledgements}
We would like to thank AI2 for the funding to collect \dataName.
We would also like to thank members of AI2 and UCI NLP for looking over early drafts of the paper.
This paper is based upon work sponsored by the DARPA MCS program under Contract No. N660011924033 with the United States Office Of Naval Research.
\section{A Description of \dataName}
\begin{figure*}[h!t!]
\includegraphics[width=\linewidth]{images/Interface.pdf}
\caption{A compressed version of the Mechanical Turk interface for evaluating answer correctness. Workers were asked to score (1 to 5) how similar a candidate is to a reference \textbf{using} the passage and the question.}
\label{fig:dataset:interface}
\end{figure*}
Reading comprehension is the task of probing how well systems can understand passages of text. Framing reading comprehension as a generation problem provides a great deal of flexibility, but introduces the challenging problem of evaluation.
These challenges are further amplified when applied to generative reading comprehension, where the introduction of a passage and a question can add to the complexity of evaluation (Table \ref{tab:dataset:examples}).
To handle this challenge, we propose to \textit{train} a generative reading comprehension metric.
This first requires a large set of human judgement scores to be gathered.
In this section, we present \dataName, a dataset that pairs reading comprehension instances, which consists of a passage, question, and reference, with candidates and human judgement scores.
We describe the process of gathering candidates, collecting human judgement scores, and creating minimal pairs for evaluation.
\subsection{Datasets}
Candidates in \dataName come from 6 constituent QA datasets that are diverse in their domains and answer types.
This ensures that training and evaluation with \dataName does not overfit to the characteristics of any constituent dataset.
\paragraph{\fontfamily{cmss}\selectfont NarrativeQA} \citep{Kocisk2017TheNR}
tests reasoning about events, entities, and their relations on movie scripts and book summaries.
\paragraph{\fontfamily{cmss}\selectfont MCScript} \citep{Ostermann2018MCScriptAN}
tests reasoning on stories written for a child-level reader.
\paragraph{\fontfamily{cmss}\selectfont CosmosQA} \citep{Huang2019CosmosQM}
tests commonsense reasoning on blogs describing everyday events.
\paragraph{\fontfamily{cmss}\selectfont SocialIQA} \citep{Sap2019SocialIC}
tests social reasoning with passages constructed from a knowledge base.
\paragraph{\fontfamily{cmss}\selectfont DROP} \citep{Dua2019DROPAR}
tests predicate argument structure and numerical reasoning on Wikipedia articles concerning American football games, census results, and history.
\paragraph{\fontfamily{cmss}\selectfont Quoref} \citep{Dasigi2019QuorefAR}
tests coreferential reasoning on Wikipedia articles.\\
NarrativeQA was created as a generative RC dataset.
CosmosQA, MCScript, and SocialIQA were created as MC datasets which we re-purpose as generative datasets by using the correct choice as the reference.
Our motivation for doing this is that the number of generative QA datasets is quite small, which we attribute to the quality of evaluation metrics.
The main focus of this work is in developing and evaluating metrics for generative RC. However, we wanted to see whether a learned metric could do well on span-selection datasets.
We collected candidates on two span-based datasets, DROP and Quoref, to test this.
\subsection{Collecting Candidates}
Candidates on all four generative datasets are generated using backtranslation \citep{Sennrich2016ImprovingNM} and using a fine-tuned GPT-2 model \citep{Radford2019LanguageMA}.
We also generate candidates for NarrativeQA and MCScript using a trained MHPG model \citep{Bauer2018CommonsenseFG}.
We tried using MHPG for CosmosQA and SocialIQA but candidates were of poor quality.
Unique to NarrativeQA, each question has two references.
We treat the second reference as a candidate to be annotated if it has low \textit{n}-gram overlap with the first reference.
We use a span-selection BERT-based model to generate candidates for Quoref and NAQANET~\cite{Dua2019DROPAR} and NABERT\footnote{https://github.com/raylin1000/drop-bert} models for DROP.
Models are trained on the training sets of each constituent dataset and candidates are produced on instances from the validation set (and test set if available).
We filtered out candidates that exactly matched the reference.
We also filtered out instances in DROP where the reference and the candidate are both numbers.\footnote{From our inspection, if the reference and candidate are both numbers that are not equal, the candidate is always wrong.}
In total, \dataName contains 40K candidates, large enough for training a learned metric as well as for evaluating current and future metrics.
\begin{table*}[t!h!]
\centering
\resizebox{16cm}{!}{
\begin{tabular}{lccccccccccccc}
\toprule
\multirow{2}{*}{\bf Dataset} & \multirow{2}{*}{\bf \thead{Avg \\Pass. Len}} & \multirow{2}{*}{\bf \thead{Avg \\ Ques. Len}} & \multirow{2}{*}{\bf \thead{Avg \\ Ref. Len}} & \multirow{2}{*}{\bf \thead{Avg \\ Cand. Len}} & \multicolumn{3}{c}{\bf \# Passages} & \multicolumn{3}{c}{\bf \# Ques./Ref. Pairs} & \multicolumn{3}{c}{\bf \# Candidates} \\
\cmidrule(lr){6-8}
\cmidrule(lr){9-11}
\cmidrule(lr){12-14}
& & & & & Train & Dev & Test & Train & Dev & Test & Train & Dev & Test \\\midrule
NarrativeQA & 333.0 & 9.6 & 5.8 & 5.9 & 85 & 11 & 18 & 2249 & 277 & 500 & 7471 & 890 & 1707 \\
MCScript & 197.1 & 7.8 & 4.3 & 4.1 & 462 & 61 & 93 & 2940 & 390 & 583 & 7210 & 978 & 1409 \\
CosmosQA & 72.8 & 10.8 & 7.5 & 8.8 & 1064 & 142 & 212 & 1139 & 156 & 226 & 5033 & 683 & 1017 \\
SocialIQA & 15.7 & 7.2 & 3.9 & 3.9 & 3075 & 414 & 611 & 3075 & 414 & 611 & 7409 & 1017 & 1527 \\
DROP & 213.4 & 11.6 & 3.6 & 5.1 & 80 & 10 & 17 & 542 & 76 & 117 & 687 & 97 & 152 \\
Quoref & 324.0 & 15.8 & 2.3 & 8.2 & 184 & 24 & 38 & 1098 & 123 & 180 & 3259 & 344 & 509\\
\midrule
Total & & & & & 4950 & 662 & 989 & 11043 & 1436 & 2217 & 31069 & 4009 & 6321 \\
\bottomrule
\end{tabular}
}
\caption{Statistics for the human judgements per constituent dataset in \dataName.}
\label{table:dataset:HARC-stats}
\end{table*}
\subsection{Annotation Procedure}
Annotations are collected with Mechanical Turk using the interface in Fig. \ref{fig:dataset:interface}.
Workers are asked to score candidate answers on an ordinal scale from 1 to 5.
We start by collecting a single annotation per candidate.
Following this, candidates are split into training, validation, and test sets such that all candidates from a passage are contained within a dataset split.
For instances in our validation and test sets, we collect one additional human judgement score per candidate for span-based datasets, and two additional human judgement scores per candidate for generative datasets.
Multiple annotations for a given candidate are averaged to form a gold annotation.
More details such as payout and qualification testing are provided in Appendix \ref{sec:appendix_mechanical_turk}.
We calculated inter-annotator agreement using Krippendorff's Alpha-Reliability~\citep{Krippendorff2011ComputingKA} on the validation set of all 6 constituent datasets. We choose this metric because it applies to our setting, where there are multiple annotators per instance, and the annotators vary between instances. Agreement on our 6 datasets range from 0.71 to 0.92 (average = 0.82), indicating strong agreement.
\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{images/score_distribution.pdf}
\caption{Human judgement score distribution on the training set of \dataName, divided into the 6 constituent datasets. The distribution of scores is right-skewed because we did not annotate candidates that exactly matched a reference.}
\label{fig:dataset:all-scores}
\end{figure}
\begin{figure}[t]
\centering
\includegraphics[width=0.8\linewidth]{images/gpt2_score_distribution.pdf}
\caption{Score distribution on candidates from GPT-2. GPT-2 produces a \textit{very} skewed score distribution for CosmosQA and SocialIQA, highlighting the difficulty of generative RC on commonsense questions.}
\label{fig:dataset:gpt2-scores}
\end{figure}
\subsection{Statistics for \dataName}
Statistics of instances and dataset splits in \dataName are provided in Table \ref{table:dataset:HARC-stats}.
The number of unique passages varies considerably across datasets.
NarrativeQA, which has the longest passages, has few unique passages, while SocialIQA has a unique passage for each question/reference pair.
The number of candidates also varies across datasets.
The most pronounced outlier is DROP, where we collected a tenth of the candidates compared to the other datasets.
This is because we filtered out instances when both the candidate and reference were numbers, leaving much fewer candidates to annotate.
The number of candidates outnumbers the question/reference pairs because for each pair, we generated multiple candidates using different generation sources (e.g. backtranslation, different model outputs).
Fig. \ref{fig:dataset:all-scores} provides the annotation score distribution on the training set of \dataName.
Score distributions are right-skewed because we did not collect annotations when the reference exactly matched the candidate.
The right-skew is most pronounced for Quoref because the number of ways a candidate can get a perfect score while not matching the reference is limited in a span extraction format.
\begin{table*}[t!]
\centering
\small
\begin{tabular}{p{.7in} p{2.75in} p{2.1in}}
\toprule \textbf{Phenomenon} & \textbf{Original Instance} & \textbf{Minimal Pairs}\\ \midrule
Coreference &
\textbf{Passage:} Norman is the supposed son of Frenchman de Vac \ldots As de Vac dies, he reveals Norman is Richard, the king's son and Edward's brother, who he kidnapped. \newline
\textbf{Q:} Who is the Frenchman de Vac? \newline
\textbf{Ref:} a fencing master who kidnapped Norman &
\textbf{\textcolor{blue}{Cand. 1:}} a fencing master who kidnapped Richard \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} a fencing master who kidnapped Edward \textbf{\textcolor{olive}{(3)}}\\\\
Hyponymy &
\textbf{Passage:} With the electric rifle, Tom and friends bring down elephants, rhinoceroses, and buffalo. \newline
\textbf{Q:} What does Tom bring down with his rifle? \newline
\textbf{Ref:} Rhinoceroses, buffalo, and elephants. &
\textbf{\textcolor{blue}{Cand. 1:}} Animals \textbf{\textcolor{olive}{(4)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Humans \textbf{\textcolor{olive}{(1)}}\\\\
Negation &
\textbf{Passage:} skylar told quinn's friend about a secret that quinn wanted to keep hidden. \newline
\textbf{Q:} What will Quinn want to do next? \newline
\textbf{Ref:} be angry &
\textbf{\textcolor{blue}{Cand. 1:}} Quinn will be mad at Skylar \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Quinn will not be mad at Skylar \textbf{\textcolor{olive}{(1)}}\\\\
Semantic Role &
\textbf{Passage:} Taylor gave a raise and promotion to Kendall. \newline
\textbf{Q:} How would you describe Taylor? \newline
\textbf{Ref:} As someone who appreciates what Kendall does &
\textbf{\textcolor{blue}{Cand. 1:}} Taylor appreciates Kendall \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Kendall appreciates Taylor \textbf{\textcolor{olive}{(1)}}\\\\
Syntax &
\textbf{Passage:} Taylor looked around in Robin's cupboards and peeked inside Robin's drawers and medicine cabinet. \newline
\textbf{Q:} How would you describe Taylor? \newline
\textbf{Ref:} intrusive &
\textbf{\textcolor{blue}{Cand. 1:}} I would describe Taylor as intrusive \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Would I describe Taylor as intrusive \textbf{\textcolor{olive}{(3)}}\\\\
Word Sense &
\textbf{Passage:} Taylor got married but kept her last name. \newline
\textbf{Q:} How would you describe Taylor? \newline
\textbf{Ref:} independent &
\textbf{\textcolor{blue}{Cand. 1:}} individualistic \textbf{\textcolor{olive}{(5)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} nonpartisan \textbf{\textcolor{olive}{(1)}}\\\\
Other &
\textbf{Passage:} The Princess stuffs her ears with cotton and begins her journey. \newline
\textbf{Q:} What does the Princess put in her ears? \newline
\textbf{Ref:} She puts cotton in her ears. &
\textbf{\textcolor{blue}{Cand. 1:}} Her ears have cotton \textbf{\textcolor{olive}{(4)}} \vspace{1mm} \newline
\textbf{\textcolor{red}{Cand. 2:}} Her ears are cotton \textbf{\textcolor{olive}{(2)}}\\
\bottomrule
\end{tabular}
\caption{Minimal pairs categorized by the linguistic phenomena. Given a passage, question, and reference, we create two new candidates, \textcolor{blue}{$\mathbf{c_1}$} and \textcolor{red}{$\mathbf{c_2}$}, with associated human judgement scores \textcolor{olive}{$\mathbf{s_1}$} and \textcolor{olive}{$\mathbf{s_2}$}. In total, we wrote 200 minimal pairs (50 for each generative QA dataset).}
\label{tab:dataset:minimal-pairs}
\end{table*}
\subsection{Limitations and Robust Evaluation with Minimal Pairs}
Candidates in \dataName come from existing models, so that a metric learned on this data will be most applicable to current research.
However, as research in generative reading comprehension models is presently limited, the strength of these models can be low.
Fig. \ref{fig:dataset:gpt2-scores} shows that generative QA models struggle to produce quality answers when asked about commonsense scenarios.
The majority of 5's in CosmosQA and SocialIQA are produced via backtranslation, while GPT-2 struggles to produce ``correct'' candidates.
This raises an issue with the evaluation; a metric can look strong when evaluated on current model outputs, but may in-fact struggle in the future when QA systems produce better answers.
Thus, using only these candidates for evaluation could lead to overconfidence in a learned metric's capabilities.
We take inspiration from from recent work creating more robust evaluations \citep{Kaushik2020LearningTD, Gardner2020EvaluatingNM} and augment the test set of \dataName with a small number of minimal pairs created by the authors.
Given a passage, question, and reference from the test set, we manually create two new candidates, $\mathbf{c_1}$ and $\mathbf{c_2}$, which form a minimal pair.
Accompanying $\mathbf{c_1}$ and $\mathbf{c_2}$ are human judgement scores, $\mathbf{s_1}$ and $\mathbf{s_2}$, collected using the same interface in Fig. \ref{fig:dataset:interface}.
The minimal pair is created so that $\mathbf{c_1}$ has a higher score (i.e. is a better answer) than $\mathbf{c_2}$.
Each minimal pair is designed to capture a particular linguistic phenomenon (see Table \ref{tab:dataset:minimal-pairs}).
Using this set of minimal pairs, we can study how often a metric prefers the better candidate.
We create 200 minimal pairs (50 for each generative QA dataset), which we use for evaluation \textit{separately} from the original test set.
\section{Background}
We first define the task the problem of generative reading comprehension.
Given two input sequences, a passage, $\textbf{p}$, and a question, $\textbf{q}$, a model is tasked to produce an output sequence: a \textit{candidate} answer, $\hat{\textbf{a}}$.
Evaluation is done by comparing $\hat{\textbf{a}}$ against a reference answer, $\textbf{a}$, using an evaluation metric \citep{Sellam2020BLEURTLR, Banerjee2005METEORAA}.
Most existing metrics compare the token overlap between the reference and candidate while ignoring the passage and the question.
Our proposed solution is to \textit{train} a metric (as opposed to engineering a metric) which incorporates the passage and question for evaluating generative RC.
\sameer{if this is all in this section, it shouldn't be a section by itself. You don't use the notation till section 4. I thought you had more materials here earlier}
\section{Conclusion}
We present \dataName, a dataset of human judgement scores for training and evaluating generative reading comprehension metrics.
Using \dataName, we train a learned metric, \metricName, that outperforms all existing metrics and is much more robust when evaluated on a set of minimal pairs.
While we have demonstrated that \metricName is a better metric for evaluating generative reading comprehension than any existing metric, considerable work remains.
Error analysis reveals that there exist gaps in \metricName's ability to handle certain phenomena, such as correctly leveraging the passage.
Future work involves collecting data to addresses weaknesses of \metricName.
We also anticipate a continual cycle of generative RC model and dataset developments that will enable easier collection of more diverse and useful candidates.
This in turn will allow better learned metrics, which can be used to evaluate ever more complex models.
\section{Experiments}
\textbf{Training LERC:}
We use the PyTorch \citep{Paszke2019PyTorchAI}, HuggingFace Transformers \citep{Wolf2019HuggingFacesTS}, and AllenNLP \citep{Gardner2017ADS} libraries to implement \metricName.
We pre-train \metricName before fine-tuning on \dataName.
We evaluate \metricName in two settings, an out-of-dataset (OOD) setting and an all-datasets (AD) setting.
In the OOD setting, we train and tune \metricName on all datasets in \dataName \textit{except} the dataset we are evaluating on.
This reflects the use case where we want to apply \metricName to evaluate a new dataset where we do not have human judgement scores.
In the AD setting, we train on all datasets in \dataName and evaluate on all datasets.
All results reported for \metricName are the average of three runs using the best set of hyperparameters found on the validation set of \dataName.
\vspace{2mm}
\noindent\textbf{Baselines:}
We compare \metricName against BLEU-1 \citep{Papineni2001BleuAM}, ROUGE-L \citep{Lin2004ROUGEAP}, METEOR \citep{Banerjee2005METEORAA}, and BERTScore \citep{Zhang2019BERTScoreET}.
We also compare \metricName against a BERT-base model fine-tuned on the sentence similarity task, STS-B \citep{Cer2017SemEval2017T1}.
Results for BERT STS-B are the average of three runs using the best set of hyperparameters found on the validation set of STS-B.
All baselines are agnostic to the passage and the question.
\subsection{Correlation Results}
We evaluate the baselines and OOD \metricName in Table \ref{tab:experiments:metric-correlation} using Pearson correlation.
\metricName outperforms the baseline metrics despite being trained in a out-of-dataset situation.
METEOR does surprisingly well despite relying on \textit{n}-gram overlap to do evaluation.
Interestingly, the sentence similarity model does better than the baseline metrics while falling behind \metricName.
We also study whether having human judgements for a particular dataset helps.
We present results in Table \ref{tab:experiments:lerc-all} on the validation set of \dataName when \metricName is trained in an AD setting.
Having human judgements for the target dataset is always helpful.
\begin{table}[tb]
\begin{center}
\begin{tabular}{lc}
\toprule
\bf Dataset & \bf Dev \textit{r} \\
\midrule
NarrativeQA & 0.805 \\
MCScript & 0.816 \\
CosmosQA & 0.864 \\
SocialIQA & 0.820 \\
DROP & 0.796 \\
Quoref & 0.794 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Pearson correlation on the validation set of \dataName with \metricName trained on all constituent datasets.}
\label{tab:experiments:lerc-all}
\end{table}
\begin{table}[t!]
\begin{center}
\begin{tabular}{p{1.85 in} c}
\toprule
\bf Ablation & \bf Avg. Dev \textit{r} \\\midrule
Ref. Only & 0.081 \\
Cand. Only & 0.093 \\
Ref. \& Cand. & 0.742 \\
Ques. \& Ref. \& Cand. & 0.723 \\
Pass. \& Ques. \& Ref. \& Cand. & 0.726\\
\addlinespace\hline\addlinespace
\metricName (with pre-training) & 0.755 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Partial-input ablations of LERC trained in an out-of-dataset fashion.
Results are Pearson correlation on the validation set, averaged across all constituent datasets.}
\label{tab:experiments:lerc-ablation}
\end{table}
\begin{table}[h!t]
\small
\begin{center}
\begin{tabular}{p{0.5in} p{2.2 in}}
\toprule
\bf Error Source & \bf Example \\
\midrule
Passage Use \textit{(22.5\%)} &
\textbf{Passage:} Edward takes charge and the children develop and expand the farmstead, aided by the entrepreneurial spirit of the younger brother Humphrey. They are assisted by a gypsy boy, Pablo, who they rescue from a pitfall trap.\newline
\textbf{Q:} Who do the children rescue from a trap?\newline
\textbf{Ref:} Pablo \quad \textbf{Cand:} A gypsy kid\newline
\textbf{Human Score:} 4.6 \quad \textbf{\metricName:} 1.0 \\\\
Same Meaning \textit{(35\%)}&
\textbf{Passage:} The story centres on the relationship between Mrs Kitty Warren and her daughter, Vivie. Mrs. Warren, a former prostitute. \newline
\textbf{Q:} What did Mrs. Warren previously do for work?\newline
\textbf{Ref:} Prostitution \newline
\textbf{Cand:} She was an escort. \newline
\textbf{Human Score:} 4.6 \quad \textbf{\metricName:} 1.06 \\\\
Opposite Meaning \textit{(15\%)} &
\textbf{Passage:} Sasha hated her neighbours dog as it barked all day and night so after going to the shop and buying poisonous slug pellets, Sasha gave the dog some pills. \newline
\textbf{Q:} How would you describe Sasha? \newline
\textbf{Ref:} mean \quad \textbf{Cand:} kind \newline
\textbf{Human Score:} 1 \quad \textbf{\metricName:} 4.32 \\\\
Other \textit{(27.5\%)} &
\textbf{Passage:} The train was slow and ambling, so much so that we were 2 hours late when we arrived in Montreal, missing our connection.\newline
\textbf{Q:} What might be true if the freight trains didn't cause a delay ? \newline
\textbf{Ref:} They wouldn't have missed their connection \newline
\textbf{Cand:} they couldn't help noticing their connection \newline
\textbf{Human Score:} 1 \quad \textbf{\metricName:} 4.2 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Error analysis of \metricName. We take the 10 validation instances per \textit{generative} dataset (40 total) with the largest difference between the score assigned by \metricName and the score assigned by humans. We then group the highest error instances by the sources of the error.}
\label{tab:experiments:error analysis}
\end{table}
\subsection{Error Analysis of \metricName}
We gather the 10 validation instances per generative dataset (40 instances total) with the highest absolute difference between the human judgement score and \metricName score.
We categorize the errors made by \metricName in Table \ref{tab:experiments:error analysis}.
A large source of error is the inability to leverage the passage correctly as well as handling large lexical gaps between references and correctly paraphrased candidates.
The ``Other'' category includes understanding semantic roles and misspellings of the reference.
\begin{table*}[t!]
\begin{center}
\begin{tabular}{lccccc}
\toprule
\bf Metric & \bf NarrativeQA & \bf MCScript & \bf CosmosQA & \bf SocialIQA & \bf Avg. \\
BLEU-1 & 53 & 54 & 52 & 55 & 53.5 \\
ROUGE-L & 53 & 57 & 53 & 53 & 61.2 \\
METEOR & 60 & 62 & 57 & 53 & 54 \\
BERTScore & 70 & 58 & \textbf{74} & 62 & 66 \\
\addlinespace \hline \addlinespace
BERT STS-B & 70.6 & 70 & 59.3 & 66.6 & 66.6 \\
\addlinespace \hline \addlinespace
\metricName & \textbf{80} & \textbf{87.3} & 72.6 & \textbf{81.3} & \textbf{80.3} \\
\bottomrule
\end{tabular}
\end{center}
\caption{Results of \metricName (OOD setting) and baselines evaluated on minimal pairs. Numbers are accuracy values: given a minimal pair of candidates, what percent of the time does a metric prefer the better candidate.}
\label{tab:experiments:minimal pair}
\end{table*}
\subsection{Ablation Results}
We study five ablations of OOD LERC with results in Table \ref{tab:experiments:lerc-ablation}.
All ablations do not involve any pre-training.
When looking at ablations of \metricName, several interesting phenomena emerge.
Pre-training is important with such a complex input structure.
Removing pre-training while still using the passage and question as input hurts performance.
Ablations of \metricName that do not use the passage but still have the reference and candidate as input only fall slightly behind the complete metric.
One explanation is that current generative QA models may not generate many candidates that would require the metric to use the passage.
Therefore, even the complete version of \metricName may have learned to ignore the passage.
We explore this in the following section when conducting an error analysis of \metricName.
As sanity checks for dataset biases, we also evaluate impoverished ablations that should not perform well: when the model has access only to the reference or to the candidate.
These ablations correlate quite poorly with human judgments.
The correlation is slightly positive for both, however, perhaps measuring the grammaticality of a candidate, or the difficulty of matching long references.
\subsection{Minimal Pair Results}
We now present results on the set of minimal pairs.
We use these minimal pairs to evaluate preference: given a minimal pair of candidates ($\mathbf{c_1}$, $\mathbf{c_2}$), what percentage of the time does a metric prefer the better candidate?
For cases where a metric assigns the same score to both candidates, we give a half-point.
Results are reported in terms of accuracy in Table \ref{tab:experiments:minimal pair}.
\textit{N}-gram based metrics are close to random, which aligns with intuition because minimal pairs were created such that both candidates have a similar token overlap with the reference.
The sentence similarity model does much better, likely because it generalizes beyond token overlap.
Finally, \metricName (OOD setting) does the best, suggesting that while there is still room for improvement, the phenomena targeted by the minimal pairs is captured when evaluated using preference.
\subsection{\metricName vs BLEU}
To understand the differences in behavior between \metricName and the popular BLEU metric, we collect the 10 validation instances per generative dataset with the highest absolute difference between the BLEU-1 and \metricName score.
We categorize the source of the differences in Table \ref{tab:experiments:lerc-vs-bleu}.
In about 90\% of the cases, the gap is due to BLEU scoring candidates too low (e.g. not capturing paraphrases).
In the remaining cases, the gap is due to \metricName over-scoring the candidate, usually due to the reference and candidate being similar (e.g. both are numbers).
\begin{table}[tb!]
\small
\begin{center}
\begin{tabular}{p{0.7in} p{2 in}}
\toprule
\bf Difference Source & \bf Examples \\
\midrule
BLEU under-scores paraphrases \textit{(92.5\%)} &
\textbf{Passage:} Tracy took Jesse's students to the park. Jesse had an emergency and asked her to.\newline
\textbf{Q:} How would Jesse feel afterwards?\newline
\textbf{Ref:} grateful \quad \textbf{Cand:} thankful\newline
\textbf{\metricName:} 5.0 \quad \textbf{BLEU-1:} 0 \newline
\textbf{Human Score:} 5\\\\
\metricName overly sensitive \textit{(7.5\%)}&
\textbf{Passage:} By 17, Norman is the best swordsman in all of England; by the age of 18, he has a large bounty on his head, and by the age of 19, he leads the largest band of thieves in all of England.\newline
\textbf{Q:} What age was Norman when there was a bounty on his head?\newline
\textbf{Ref:} 18 \quad \textbf{Cand:} 19 \newline
\textbf{\metricName:} 5.0 \quad \textbf{BLEU-1:} 0 \newline
\textbf{Human Score:} 1 \\\\
\bottomrule
\end{tabular}
\end{center}
\caption{Analysis of \metricName vs BLEU-1. We take the 10 validation instances per \textit{generative} dataset (40 total) with the largest difference between the score assigned by \metricName and the score assigned by BLEU-1. We then group these instances by the source of the difference.}
\label{tab:experiments:lerc-vs-bleu}
\end{table}
\section{A Learned Metric}
We provide details on \metricName, our learned metric.
\metricName is initialized using BERT-base \citep{Devlin2018BERTPO}
We define as input a tuple consisting of a passage, $\textbf{p}$, a question, $\textbf{q}$, a reference answer, $\textbf{a}$, and a candidate answer, $\hat{\textbf{a}}$.
The input to BERT is structured as:
\begin{align*}
\text{[CLS]}\;\text{\textbf{p}}\;\text{[SEP]}\;\text{\textbf{q}} \;\text{[SEP]}\;\text{\textbf{a}}\;\text{[SEP]}\;\hat{\text{\textbf{a}}}\;\text{[SEP]}
\end{align*}
BERT returns a hidden state for each input token. We use the first hidden state $\textbf{h}_{[CLS]}$, as the pooled representation of the input.
\subsection{Fine-Tuning with Human Judgements}
Our goal is to train BERT to mimic the human judgements given a set of input tuples, $\{(\textbf{p}, \textbf{q}, \textbf{a}, \hat{\textbf{a}})\}_{i=1}^n$, and a set of human judgment scores, $\{y\}_{i=1}^n$,
We apply a regression layer on top of our pooled representation (Fig. \ref{fig:model}) and train with a MSE loss.
\begin{gather*}
\hat{y_i} = \textbf{W}\:\textbf{h}_{i\:[CLS]} \\
\text{loss}_i = (y_i - \hat{y}_i)^2
\end{gather*}
\subsection{Pre-Training the Learned Metric}
Learning the interactions between the input components can be difficult with only human judgement fine-tuning.
To overcome this, we \textit{pre-train} on four multiple-choice QA datasets: BoolQ \citep{Clark2019BoolQET}, MCTest \citep{Richardson2013MCTestAC}, RACE \citep{Lai2017RACELR}, and MultiRC \citep{Khashabi2018LookingBT}.
We use the same input structure as fine-tuning, but the reference and candidate are replaced by two answer choices, $\mathbf{a_1}$ and $\mathbf{a_2}$:
\begin{align*}
\text{[CLS]}\;\text{\textbf{p}}\;\text{[SEP]}\;\text{\textbf{q}} \;\text{[SEP]}\;\mathbf{a_1}\;\text{[SEP]}\;\mathbf{a_2}\;\text{[SEP]}
\end{align*}
We pre-train BERT via 3-way classification to predict whether: $\mathbf{a_1}$ is the correct answer, $\mathbf{a_2}$ is the correct answer, or $\mathbf{a_1}$ and $\mathbf{a_2}$ are both correct.
MultiRC has multiple correct answers per question and we create additional instances where both $\mathbf{a_1}$ and $\mathbf{a_2}$ are correct by duplicating the correct answer for all three datasets.
\section{Related Work}
There has been a long history of developing evaluation metrics, which have generally fallen into one of three categories.
The first consists of metrics that use some variant of \textit{n}-gram matching \citep{Papineni2001BleuAM,Lin2004ROUGEAP,Banerjee2005METEORAA}.
They are easy to implement, but lack flexibility by focusing only on token overlap.
The second cateogry of metrics eschew some of the aforementioned issues by calculating a \textit{softer} similarity score using \textit{embeddings} of tokens \citep{Clark2019SentenceMS,Zhang2019BERTScoreET}.
However, it is unclear how to tailor them to question answering, where the passage and question should be assimilated.
The final category consists of metrics learned end-to-end from human judgements \citep{Cui2018LearningTE,Sellam2020BLEURTLR}.
These metrics are flexible in that they can be tuned to the specific evaluation setting but depend on a large corpus of human judgement scores to train on.
We hope that the release of \dataName pushes the development of QA metrics that fall into this category.
\dataName is directly inspired by the annual WMT Metrics Shared Task \citep{Machcek2014ResultsOT,Stanojevi2015ResultsOT,Bojar2016ResultsOT,Bojar2017ResultsOT,Ma2018ResultsOT,Ma2019ResultsOT}.
Participants submit automatic translations and human judgement scores are collected for the submitted translations.
The annotations collected as part of the WMT Metrics Shared Task have made it easy to evaluate and create new translation metrics~\cite{Popovic2015chrFCN,Ma2017BlendAN,Shimanaka2018RUSERU}.
In a similar vein, SummEval is a recently released dataset that evaluates a number of evaluation metrics for summarization \citep{Fabbri2020SummEvalRS}.
\section{Introduction}
Reading comprehension (RC) has seen significant progress in the last few years, with a number of question answering (QA) datasets being created \citep{Rajpurkar2016SQuAD10,Lai2017RACELR,Talmor2018CommonsenseQAAQ}.
However, a majority of datasets are presented using a span-selection or multiple-choice (MC) format.
Both formats are easy to evaluate, but in return, have restrictions placed on the questions that can be asked or the answers that can be returned.
Furthermore, both formats hinge on distractor spans/choices for learning to be effective.
Ensuring high quality distractors is a challenging task in and of itself, which can lead to models that exploit spurious correlations \citep{Jia2017AdversarialEF, Min2019CompositionalQD, Geva2019AreWM}.
Posing RC as a generation task addresses the aforementioned issues.
Generative RC does not require distractors, circumventing biases that could be introduced by them, and allows arbitrary questions and answers.
\begin{figure}[t!]
\begin{framed}
\small \textbf{Passage:} \ldots Behind one door is a lady whom the king has deemed an appropriate match for the accused; behind the other is a fierce, hungry tiger. Both doors are \textbf{\textcolor{purple}{heavily soundproofed to prevent the accused from hearing what is behind each one}}\ldots
\vskip 2mm
{\small
\begin{tabular}{@{}lp{50mm}}
\textbf{Question:} & What feature do the doors have?
\end{tabular}
\begin{tabular}{@{}lp{45mm}}
\textbf{Reference:} & soundproofed \\
\textbf{Candidate:} & They are \textbf{\textcolor{purple}{heavily soundproofed to prevent the accused from hearing what's behind each one}}.
\end{tabular}
}
\vskip 2mm
\small \textbf{Human Judgement:} 5 out of 5\\
\small \textbf{LERC:} 4.98 out of 5 \vspace{1.5mm}\\
\small \textbf{BLEU-1:} 0.07 \\
\small \textbf{ROUGE-L:} 0.15 \\
\small \textbf{METEOR:} 0.17
\end{framed}
\caption{Generative reading comprehension example. Properly scoring the candidate requires access to the passage. Current metrics, such as BLEU, ROUGE and METEOR, are agnostic to the end-task while \metricName is trained with the passage and question as input. As a result, \metricName assigns a score that better reflects human judgement.}
\label{fig:introduction:metric-flaws}
\end{figure}
Unfortunately, existing metrics for evaluating text generation come with significant shortcomings.
Many metrics score \textit{n}-gram overlap, and it is well established that using token overlap as a measure of similarity has drawbacks \citep{Chen2019EvaluatingQA,Edunov2019OnTE,Wang2020AskingAA}.
Current metrics also only consider the reference and are agnostic to the end-task being evaluated.
Fig. \ref{fig:introduction:metric-flaws} demonstrates that this is problematic for generative RC because scoring a candidate may require a metric to also consider the passage and the question.
Without cheap and reliable evaluation, progress in generative reading comprehension has been extremely slow.
To address the need for better evaluation metrics tailored to reading comprehension, we present a dataset called \dataName, aimed at developing \textit{learned} metrics that \textbf{MO}del the \textbf{C}orrectness of candidates using \textbf{H}uman \textbf{A}nnotation scores.
\dataName contains human judgement scores on 40K candidates, an order of magnitude larger than prior work~\citep{Chen2019EvaluatingQA}.
The candidates come from six diverse QA datasets which test a wide range of RC phenomena such as commonsense reasoning and understanding narrative over movie scripts.
After collecting all annotations, we follow work on creating more robust evaluation sets~\citep{Kaushik2020LearningTD, Gardner2020EvaluatingNM} and augment the test set of \dataName by manually writing a small set of minimal pairs (Table \ref{tab:dataset:minimal-pairs}).
The set of minimal pairs serve as a harder evaluation set for probing metric robustness.
Using \dataName, we train a \textbf{L}earned \textbf{M}etric for \textbf{R}eading \textbf{C}omprehension which we abbreviate as LERC.
We compare \metricName against two sets of baselines: (1) existing metrics such as METEOR~\citep{Banerjee2005METEORAA} and BERTScore~\citep{Zhang2019BERTScoreET}; and (2) a sentence similarity model trained on STS-B~\citep{Cer2017SemEval2017T1}.
To ensure fair comparison, we evaluate \metricName in an out-of-dataset setting: \metricName is trained on all datasets \textit{except} the one it is being evaluated on.
On the test set, \metricName outperforms baselines by as much as 36 Pearson correlation points and on the minimal pairs set, by as much as 26 accuracy points.
Error analysis and minimal pair results indicate that there is substantial room to improve the robustness of \metricName and its sensitivity to different linguistic phenomena.
We hope that \dataName and \metricName enables a continual cycle of generative RC model and dataset developments that will enable easier collection of more diverse and useful candidates, allowing better learned metrics to be trained.
\section*{Appendix}
\section{Details on Training \metricName}
Training of \metricName is broken into pre-training on multiple-choice QA datasets followed by fine-tuning on human judgement scores.
During pre-training, we used batch size of 32 and train for 4 epochs.
We tune the learning rate (\{1e-5, 2e-5, 3e-5\}) over held out questions using a single runs' loss.
We use accuracy as the criteria to pick the best pre-trained model.
We then take the best pre-trained model and fine-tune on human judgement scores in \dataName.
We again fix the batch size at 32 and train for 3 epochs, tuning the learning rate (\{1e-5, 2e-5, 3e-5\}) over the validation set of \dataName using the average of three runs.
We use Pearson correlation to pick the best fine-tuned model.
When LERC is trained in an OOD setting, we do not tune on the held-out dataset.
\section{Details on Baselines}
We use implementations of BLEU, METEOR, and ROUGE using Microsoft MS COCO evaluation scripts \footnote{https://github.com/salaniz/pycocoevalcap}.
We removed question marks, periods, and exclamation marks from references and candidates when evaluating with BLEU, METEOR, and ROUGE.
The hash-code for BERTScore is \path{roberta-large_L17_no-idf_version=0.3.6(hug_trans=3.0.2)}.
We fine-tune BERT-base on STS-B as another baseline.
We use a batch size of 32 and train for 4 epochs.
We tune the learning rate (\{1e-5, 2e-5, 3e-5\}) over the validation set of STS-B using the average of three runs.
\section{Computational Resources}
All experiments on conducted on a NVIDIA Titan RTX with 24 GB of RAM.
Pre-training of \metricName takes about 3.5 hours while fine-tuning (one run) takes roughly 20 minutes.
\section{Details on Mechanical Turk}
\label{sec:appendix_mechanical_turk}
Collecting \dataName involves three stages: a qualification testing stage, a trial stage, and the full dataset collection stage.
During qualification testing, workers are given 10 candidates to label, and they must score 80\% to pass the test.
After qualification testing, we run a small trial.
During this trial, we release 200 candidates and gather 5 human judgements per candidate to get a sense of annotation agreement and to see if our instructions and examples need to be revised.
Finally, during the full dataset collection process we solicit human judgements on all candidates.
Here, each HIT is an aggregate of 10 candidates that all share the same passage to amortize the cost of reading the passage and workers are paid 40 cents per HIT.\footnote{This amount is set by the authors manually working on this task. We estimate that it takes between a minute and a half to two and a half minutes to complete a HIT depending on the dataset.}
During dataset collection, we randomly sample annotations to check for quality and remove workers that consistently do a poor job.
Workers are paid for working on any of the three stages. The total cost of collecting \dataName is about \$6,000.
\section{Correlation Results based on Generation Source}
We supplement Table \ref{tab:experiments:metric-correlation} by calculating correlation results per generation source for the generative datasets in Table \ref{tab:appendix:generation-correlation}.
We find that \metricName handles candidates from different generation sources with roughly the same performance.
\begin{table}[t!]
\begin{center}
\begin{tabular}{p{1.9 in} c}
\toprule
\bf Dataset/Generation Source & \bf Avg. Dev \textit{r} \\\midrule
CosmosQA & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.714 \\
\hspace{6pt} \small \textit{GPT-2} & 0.636 \\
MCScript & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.545 \\
\hspace{6pt} \small \textit{GPT-2} & 0.661 \\
\hspace{6pt} \small \textit{MHPG} & 0.742 \\
NarrativeQA & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.707 \\
\hspace{6pt} \small \textit{GPT-2} & 0.791 \\
\hspace{6pt} \small \textit{MHPG} & 0.814 \\
SocialIQA & \\
\hspace{6pt} \small \textit{Backtranslation} & 0.602 \\
\hspace{6pt} \small \textit{GPT-2} & 0.596 \\
\bottomrule
\end{tabular}
\end{center}
\caption{Correlation on the validation set (OOD setting) broken down by the source of the generation.}
\label{tab:appendix:generation-correlation}
\end{table} | {
"redpajama_set_name": "RedPajamaArXiv"
} | 8,426 |
Rwenzori Mountains
Key information: Rwenzori Mountains
Explore the extraordinary vegetation and landscapes of the fabled "Mountains of the Moon".
Demanding walking, but an unforgettable experience.
Accessed from Uganda.
Note: Negs: altitude, very rainy.
Length: 70km, up to 7 days
Maximum Altitude: 5,090m
The Rwenzori Mountains of western Uganda are the fabled "Mountains of the moon" and the true source of the Nile. A UN world heritage site, the mountains stretch some 130km along the border between the Congo and Uganda. While farming and settlement is intense outside the park, the lands within the park are wonderfully pristine.
It is claimed that nowhere else can you enjoy such an extraordinary variety of landscapes and strange, stratified vegetation, right on the equator: the Rwenzori have a marvellous stack of different vegetation zones. Above the thick jungle of the lower slopes, you enter zones of bamboo and giant ferns and cloud forests. The higher you go, the stranger the misty, boggy glacier-carved valleys become: you spend time among giant heather, giant lobelias, groundsels, and so-called everlasting flowers; a particular feature is high bogs with weird bog plants, thick mosses, giant heathers and draping lichens. Above this are tundra and ice fields, glaciers and rocky peaks. And add in fast flowing rivers and magnificent waterfalls throughout.
Unlike East Africa's other great mountains, the Rwenzori are not volcanic in origin, but the result of a vast uplift - hard to imagine the forces!
The Rwenzori get a lot of rainfall, and their trails are rocky, muddy and often steep. The driest times and the best times to visit are December-January and late June to late August.
Visiting the park from Uganda is safe. Uganda's government has been stable for years and, while many Ugandans struggle for the basics in life, they are friendly and welcoming to tourists.
Exploration on foot has a long history in the Rwenzori. Henry Morton Stanley (of "Dr. Livingston I presume" fame) was the first westerner to confirm the presence of glaciated mountains on the equator, in 1888. The Duke of Abruzzi led an Italian mountaineering expedition to the Rwenzori in 1906 and named and climbed many of the peaks. Today, about a thousand western tourists visit the Mountains of the Moon annually. Perhaps half that many complete the Central Circuit and perhaps a hundred people scale the high snow and rock to the summits.
One of the most interesting aspects of trekking here is the opportunity to get to know the Bakonjo people – your guides, cooks and porters. They work in the mountains to supplement their cash income.
Day walks and shorter overnighters can be made from the road heads, but it is the 6-7 day Central Circuit which is the thriller here. With the summit at 5,090m this is a serious undertaking, gaining 3,500m in 5 days.
The following description of the Central Circuit is derived from Charles Bookman's brilliant account (see below). Thank you Charles.
During the colonial era, the Uganda Wildlife Authority in partnership with the Uganda Mountain Club constructed a system of trails and huts known as the "Central Circuit." All of the major peaks – Mt. Luigi di Savoia, Mt. Baker, Mt. Speke and Mt. Stanley (at 16,700' the highest peak in Uganda (and the Congo) and the third highest peak in Africa) – can be climbed from the Central Circuit. The trail system and the huts fell into disuse and disrepair during the 1970s and 1980s, when Mt. Stanley was known as Mt. Idi Amin. The trails and huts were rebuilt during the 1990s.
Day 1: The first stage on the Central Circuit is a 3,500' climb up a ridge alongside and above the Mobuku River. You climb through thick, broken equatorial forest and then through stands of giant ferns. After four hours you reach Nyabitaba Hut, at 8,500', a large cabin with several bunk rooms and associated dining areas.
Day 2: Descend to cross the Mobuku River at its confluence with the Bujuku River, then climb through bamboo forest and moss-covered trees, arriving at John Matte Hut on the Bujuku River in about 5 hours.
Day 3: The Bigo bogs start a few minutes beyond the John Matte Hut. Sometimes on boardwalks, sometimes mired in mud, rubber boots are the footwear of choice. Sometimes you are among giant heather, sometimes the bog sports giant lobelias, groundsels and everlasting flowers. The bogs lead you to Bujuku Lake and your first view of the high snowfields on Mt. Stanley. After four hours, you reach Bujuku Hut (13,000'), which is also the jumping off place for Mt. Speke (16,043').
Day 4: takes you above the forest into steep, rocky terrain with unearthly vegetation to the true alpine high country. Camp at Elena Hut, at nearly 15,000', on the side of Mt. Stanley (16,763').
Day 5: Summit: The African glaciers really are receding. Elena Hut was constructed in 1951 at the toe of the Stanley ice field. Sixty years later, in 2012, you climb for around an hour, before through a cliff band with the help of a fixed rope to reach a long, striated, rocky plateau, before reaching the snow line. The views are stunning. Rock turns to ice at the beginning of the Stanley plateau. While the climbing is not very technical, there are some steep drop-offs and crevasses. Cross the Stanley glacier, then the Margharita glacier and traverse to the rocky summit approach on a snow-covered ice shelf. Look out from the summit over the Congo and admire the other high peaks of the Rwenzori. Rugged, jagged ice fields flow off the mountain. This is a big day. Leave the hut early, reach the summit late morning, return to Elena Hut in mid-afternoon, then (if energy levels allow) complete one of the most beautiful legs of the circuit, the descent from Scott-Eliot Pass to Kitandara Hut (13,200'). Drop steeply for a couple of hours through a spectacular valley flanked by enormous cliffs.
Day 6: From Kitandara, the route climbs steeply up to 14,000' Freshfield Pass. The pass is lush with green vegetation, and offers stunning views of the surrounding peaks, as well as views into the Congo. You then make a series of steep, cliffy, colorful descents that take you in one day from the 14,000' pass back to Nyabitaba Hut at 8,500', thus completing the Central Circuit. The steep descent offers some of the finest scenery in the Rwenzori. Lush, muddy, rocky, and wildly colorful, it follows streams running down chutes next to cliff bands. Enjoy stunning waterfalls and cascades. The route then opens into a wide valley flanked by Mt. Baker on the left and a monstrous rock outcropping on the right. Lobelia covers the valley floor. You will need to hop from one tuft of marsh grass to another.
Day 7: Return to the roadhead.
This is described by Claes Grundsten, who knows what he is talking, about as "the most taxing trek you can imagine".
Have a look at the dreaded TripAdvisor so you may get good, current views on this walk.
We want to give more. Please help us by making suggestions and sending photos! Thank you!
Account by Charles Bookman
Uganda's Rwenzori Central Circuit: Hiking on the Equator.
The bog stretched to the horizon. Footprints of the dikdik, a miniature antelope wove around giant lobelia plants. Snow capped peaks beckoned. It was a fine spring-like day at 13,000' in the Rwenzori Mountains of western Uganda, the fabled "Mountains of the moon" and the true source of the Nile. A UN world heritage site, the Rwenzori mountains, stretch some 80 miles along the border between the Congo and Uganda. While farming and settlement is intense outside the park, the lands within the park are respected by the people and are coherently managed.
Moreover, important for tourists, visiting the park is safe. Uganda's government has been stable for years and while Ugandans struggle for the basics in life, they are friendly and welcoming to tourists.
The Rwenzori get a lot of rainfall, as much eight feet of rain a year! The driest times and the best times to visit are December-January and late June to late August.
Hiking has a long history in the Rwenzori. Henry Morton Stanley (of Dr. Livingston I presume fame) was the first westerner to confirm the presence of glaciated mountains on the equator, in 1888. The Duke of Abruzzi led an Italian mountaineering expedition to the Rwenzori in 1906 and named and climbed many of the peaks. The British have always enjoyed mountain walks and during the colonial era, the Uganda Wildlife Authority in partnership with the Uganda Mountain Club constructed a system of trails and huts known as the "Central Circuit." All of the major peaks—Mt. Luigi di Savoia, Mt. Baker, Mt. Speke and Mt. Stanley (at 16,700' the highest peak in.....
Other great walks in Uganda | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 7,388 |
Beers Bucket List is to Represent Canada at Home
The summer heat is finally upon us and with it, we will all be beating a path outdoors to enjoy some fun in the sun.
Well, most of us will.
Vancouver Warriors Captain Matt Beers has just added more to his already overflowing plate of life. Beers, 29, was earlier this summer selected to represent Team Canada at the 2019 World Indoor Lacrosse Championships being held in Langley from September 19-28. The father of two and firefighter with the Burnaby Fire Department is already chock a block with several different projects, and now can add 'Player for Team Canada' to his checklist of things to do this summer. It is something that he is honoured to be a part of.
"When the Warriors season ended, I spoke with Dan (Vancouver Warriors GM Dan Richardson) about how I can put my name forward to be considered for Team Canada," explained Beers. "Dan advised me that Team Canada was asking players to put forth their names for consideration, knowing that the Worlds would be a time commitment on top of what we are already doing. I put in my name, asked Canada to consider me, and I was lucky enough to be considered and selected for the team."
Beers said that a Team Canada email that went out, he was included on it and found out along with many of his friends. "I play summer lacrosse with Robert Church (Teammates with the Burnaby Lakers – WLA) and we both found out together, which was great," says Beers. "But I was just as excited to find out that I get to play with four other teammates that are from Coquitlam where I grew up playing. To play for your country with friends is pretty special."
Donning the Red and White Colors for Canada will certainly be special for Beers and his family, who are thrilled that he will play in nearby Langley, just a short ten-minute commute from his home in Maple Ridge. But for Beers, more so than ever, he sees his schedule filling up and needs to prioritize as the World Championships approach.
"Between catching up on work at the fire hall, to playing summer lacrosse for Burnaby, to making sure I spend as much time with my family, (Beers is married to wife Jamie and has two children, Benjamin 2 and Ellie 9 months), making time for Team Canada is a commitment and I will be ready," Beers professes. "But everything is centred around my family. I am making sure that I can spend as much quality time with them as well as making sure I can maintain my work obligations. The Burnaby Lakers have been great about being flexible with my time so it gives me every opportunity to do everything I can fit in to this summer. It's a great problem to have."
Matt Beers will be ready to go and is proud and humbled to be selected for Team Canada. Bringing home the gold will certainly be a feather in his cap. "Playing for Team Canada is certainly special, but winning Gold in Langley would be the ultimate bucket list item," proclaims Beers. "I hope Langley can pack the LEC and we can bring it home."
For more information and tickets to the event visit www.wilc2019.ca or click the links below.
Single Day Tickets
Full-Tournament Pass
4-Day Pass
2 Semi-Final Games
2 Final Games
October 28, 2022 WARRIORS GET READY FOR NEW LOOK AT 2022 TRAINING CAMP WARRIORS GET READY FOR NEW LOOK AT 2022 TRAINI...
April 25, 2022 Third Time's The Charm For Keegan Bal Third Time's The Charm For Keegan Bal
Features, Stories
March 9, 2022 Woah, We're Halfway There! Woah, We're Halfway There!
Features, News, Stories | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 2,286 |
Q: Webserver establishing new outgoing connections from port 443 I've been trying to configure the firewall on a webserver running Apache using iptables commands. I took the approach of blocking all outgoing connections, except for those that are required. Everything seems to be working fine, although in the firewall logs I see some blocked outgoing connections with the source port of 443:
IPTables-Dropped: IN= OUT=eth0 SRC={SERVERIP} DST={DESTIP} LEN=40 TOS=0x00 PREC=0x00 TTL=64 ID=36863 DF PROTO=TCP SPT=443 DPT=37096 WINDOW=0 RES=0x00 RST URGP=0
In my firewall configuration file, I use the following rule:
iptables -A OUTPUT -p tcp --sport 443 -m state --state ESTABLISHED,RELATED -j ACCEPT
The fact that the packets are being dropped, suggests that the connection from port 443 has to be a NEW connection, which I want to block since I don't see the reason why my server should connect to any other machine this way.
The destination IPs change and look like IPs of ordinary clients, based on their location and whois information.
What am I missing here? Is this expected behavior that is somehow dictated by the HTTPS connection or are those connections suspect? Should I ACCEPT NEW connections as well?
TLDR; The webserver seems to be trying to establish NEW connections from port 443 to various clients, as indicated by the firewall log. Should this be happening? Should I allow this traffic? What could be its source?
EDIT: We're running Ubuntu Server 12.04
apache2 -v
Server version: Apache/2.2.22 (Ubuntu)
Server built: Jul 12 2013 13:37:10
iptables -V
iptables v1.4.12
iptables -L -v
Chain INPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
814 86082 ACCEPT all -- lo any anywhere anywhere
2382K 99M ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
2 108 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:ssh
1404 77906 ACCEPT tcp -- any any anywhere anywhere tcp dpt:https
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:https
286 15356 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:http
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:domain dpts:1024:65535 state ESTABLISHED
0 0 ACCEPT tcp -- any any anywhere anywhere tcp spt:domain dpts:1024:65535 state ESTABLISHED
1 83 ACCEPT udp -- any any anywhere anywhere udp spts:1024:65535 dpt:domain state NEW,ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:domain dpt:domain state NEW,ESTABLISHED
0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-reply state RELATED,ESTABLISHED
47 3892 ACCEPT icmp -- any any anywhere anywhere icmp echo-request state NEW,RELATED,ESTABLISHED
94 28900 LOGGING all -- any any anywhere anywhere
Chain FORWARD (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
0 0 ACCEPT all -- any lo anywhere anywhere
0 0 ACCEPT all -- any any anywhere anywhere ctstate RELATED,ESTABLISHED
Chain OUTPUT (policy DROP 0 packets, 0 bytes)
pkts bytes target prot opt in out source destination
527 34635 ACCEPT udp -- any any anywhere anywhere udp spts:1024:65535 dpt:domain state NEW,ESTABLISHED
0 0 ACCEPT tcp -- any any anywhere anywhere tcp spts:1024:65535 dpt:domain state NEW,ESTABLISHED
407 60108 ACCEPT udp -- any any anywhere anywhere udp spt:domain dpts:1024:65535 state ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:domain dpt:domain state ESTABLISHED
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:ssh state NEW,ESTABLISHED
1634 206K ACCEPT tcp -- any any anywhere anywhere tcp dpt:https state NEW,ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:https state NEW,ESTABLISHED
0 0 ACCEPT tcp -- any any anywhere anywhere tcp dpt:http state NEW,ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp dpt:http state NEW,ESTABLISHED
25185 42M ACCEPT tcp -- any any anywhere anywhere tcp spt:https state NEW,RELATED,ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:https state NEW,RELATED,ESTABLISHED
1198 260K ACCEPT tcp -- any any anywhere anywhere tcp spt:http state NEW,RELATED,ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:http state NEW,RELATED,ESTABLISHED
4891K 358M ACCEPT tcp -- any any anywhere anywhere tcp spt:ssh state ESTABLISHED
0 0 ACCEPT udp -- any any anywhere anywhere udp spt:ssh state ESTABLISHED
0 0 ACCEPT icmp -- any any anywhere anywhere icmp echo-request state NEW,RELATED,ESTABLISHED
47 3892 ACCEPT icmp -- any any anywhere anywhere icmp echo-reply state RELATED,ESTABLISHED
69 2831 LOGGING all -- any any anywhere anywhere
Chain LOGGING (2 references)
pkts bytes target prot opt in out source destination
89 16387 LOG all -- any any anywhere anywhere limit: avg 15/min burst 5 LOG level warning prefix "IPTables-Dropped: "
163 31731 DROP all -- any any anywhere anywhere
A:
Is this expected behavior that is somehow dictated by the HTTPS connection or are those connections suspect? Should I ACCEPT NEW connections as well?
No it's not, yes they are, and no you shouldn't. Your server should not initiate new connections; it should accept incoming ones and respond on the session that is already open. If you were to allow your system to initiate new connections as long as they originate from a known port, that would be an attack vector for anyone trying to hack your system or use it e.g. in a bot net.
A probable reason for this traffic is that your apache server still thinks that the connection is open and is trying to reply to it, while your firewall thinks that the connection is closed and thus that the session is no longer active. This may happen if a connection is idle for a longer time than the conntrack module thinks reasonable.
To fix it, you need to make sure that the timeout values in Apache and the conntrack values are in sync. For apache, check the KeepAliveTimeout value. For the conntrack module, check your sysconfig for all conntrack items. Also check any firewall or routers between your webserver and the internet, to make sure it's not one of those that is dropping the connections.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 782 |
Lenny Kravitz talks to CNN's Alina Cho about his interior design business.
Always liked Lenny's style. Wouldn't mind seeing his look become a lifestyle brand. I know just what means about seeing something out of place in a room – I'm the same. Maybe that's why the French Folly Renovations are driving me crazy!
Hey I see you are wearing the new Kravitz afro. Yes and I have the indoor ultra-black sunglasses. I learned to walk letting cool guide me. The pants are Kravitz as well. They are reinforced seal hide and were designed to protect women from attacking him in public. | {
"redpajama_set_name": "RedPajamaC4"
} | 5,688 |
Home Abraham Lincoln - Documents Page 157
The life and public services of Abraham Lincoln, sixteenth president of the United States: together with his state papers
State Papers of Abraham Lincoln. 157-
thing of my own feelings, excited by the occasion, somewhat to harmonize and give shape to the feelings that had been really the feelings of my whole life. Besides this, our friends there had provided a magnificent flag of the country. They had arranged it so that I was given the honor of arising it to the head of its staff. [Applause.] And when it went up, I was pleased that it went to its place by the strength of my own feeble arm, when, according to the arrangement, the cord was pulled, and it floated gloriously to the wind, without an accident, in the light, glowing sunshine of the morning. I could not help hoping that there was, in the entire success of that beautiful ceremony, at least something of an omen of what is to come. [Loud applause.] How could I help feeling then as I often have felt ? In the whole of that proceeding I was a very humble instrument. I had not provided the flag; I had not made the arrangements for elevating it to its place; I had applied but a very small portion of my feeble strength in raising it. In the whole transaction I was in the hands of the people who had arranged it, and if I can have the same generous co-operation of the people of the nation, I think the flag of our country may yet be kept flaunting gloriously. [Loud, enthusiastic, and continued cheers.] I recur for a moment but to repeat some words uttered at the hotel, in regard to what has been said about the military support which the General Government may expect from the Commonwealth of Pennsylvania in a proper emergency. To guard against any possible mistake do I recur to this. It is not with any pleasure that I contemplate the possibility that a necessity may arise in this country for the use of the military arm. [Applause.] While I am exceedingly gratified to see the manifestation upon your streets of your military force here, and exceedingly gratified at your promises here to use that force upon a proper emergency—while I make these acknowledgments I desire to repeat, in order to preclude any possible misconstruction, that I do most sincerely hope that we shall have no use for them. [Applause.] That it will never become their duty to shed blood, and most especially never to shed fraternal blood. I promise that, so far as I may have wisdom to direct, if so painful a result shall in any-wise be brought about, it shall be through no fault of mine. [Cheers.] Allusion has also been made by one of your honored speakers to some remarks recently made by myself at Pittsburg, in regard to what is supposed to be the especial interest of this great Commonwealth of Pennsylvania. I now wish only to say, in regard to that matter, that the few remarks which I uttered on that occasion were rather carefully worded. I took pains that they should be so. I have seen no occasion since to add to them, or subtract from them. I leave them precisely as they stand [applause], adding only now, that I am pleased to have an expression from you, gentlemen of Pennsylvania, significant that they are satisfactory to you. And now, gentlemen of the General Assembly of the Commonwealth of Pennsylvania, allow me to return you again my most sincere thanks.
Title The life and public services of Abraham Lincoln, sixteenth president of the United States: together with his state papers
Creator Raymond, Henry J. (Henry Jarvis), 1820-1869
Subject [LCSH] Lincoln, Abraham, 1809-1865--Biography
United States--Politics and government--1861-1865
Contributors Carpenter, F. B. (Francis Bicknell), 1830-1900
Transcript State Papers of Abraham Lincoln. 157- thing of my own feelings, excited by the occasion, somewhat to harmonize and give shape to the feelings that had been really the feelings of my whole life. Besides this, our friends there had provided a magnificent flag of the country. They had arranged it so that I was given the honor of arising it to the head of its staff. [Applause.] And when it went up, I was pleased that it went to its place by the strength of my own feeble arm, when, according to the arrangement, the cord was pulled, and it floated gloriously to the wind, without an accident, in the light, glowing sunshine of the morning. I could not help hoping that there was, in the entire success of that beautiful ceremony, at least something of an omen of what is to come. [Loud applause.] How could I help feeling then as I often have felt ? In the whole of that proceeding I was a very humble instrument. I had not provided the flag; I had not made the arrangements for elevating it to its place; I had applied but a very small portion of my feeble strength in raising it. In the whole transaction I was in the hands of the people who had arranged it, and if I can have the same generous co-operation of the people of the nation, I think the flag of our country may yet be kept flaunting gloriously. [Loud, enthusiastic, and continued cheers.] I recur for a moment but to repeat some words uttered at the hotel, in regard to what has been said about the military support which the General Government may expect from the Commonwealth of Pennsylvania in a proper emergency. To guard against any possible mistake do I recur to this. It is not with any pleasure that I contemplate the possibility that a necessity may arise in this country for the use of the military arm. [Applause.] While I am exceedingly gratified to see the manifestation upon your streets of your military force here, and exceedingly gratified at your promises here to use that force upon a proper emergency—while I make these acknowledgments I desire to repeat, in order to preclude any possible misconstruction, that I do most sincerely hope that we shall have no use for them. [Applause.] That it will never become their duty to shed blood, and most especially never to shed fraternal blood. I promise that, so far as I may have wisdom to direct, if so painful a result shall in any-wise be brought about, it shall be through no fault of mine. [Cheers.] Allusion has also been made by one of your honored speakers to some remarks recently made by myself at Pittsburg, in regard to what is supposed to be the especial interest of this great Commonwealth of Pennsylvania. I now wish only to say, in regard to that matter, that the few remarks which I uttered on that occasion were rather carefully worded. I took pains that they should be so. I have seen no occasion since to add to them, or subtract from them. I leave them precisely as they stand [applause], adding only now, that I am pleased to have an expression from you, gentlemen of Pennsylvania, significant that they are satisfactory to you. And now, gentlemen of the General Assembly of the Commonwealth of Pennsylvania, allow me to return you again my most sincere thanks.
The life and public services of Abraham Lincoln, sixteenth...
Illlustrations
Photo Lincoln entering Richmond
Photo Early Home
Photo Springfield Home
Photo Independence Hall
Photo Lincoln Family
Photo Inauguration
Photo Proclamation of Emancipation
Letter Page 88-89
Photo Ford Theatre
Photo Death of Abraham Lincoln
Photo Funeral Cortege
Photo Remaine lying in state
Photo Last Rites
Photo Funeral Arch
- Front Cover
- Illlustrations
- Appendix
- Memorandum
- Photo Lincoln entering Richmond
- Photo Early Home
ChapterIII
- Photo Springfield Home
- Photo Independence Hall
- Photo Lincoln Family
- Photo Inauguration
- Photo Proclamation of Emancipation
Chapter XIV
Chapter XV
Chapter XVI
Chapter XVII
Chapter XVIII
- Letter Page 88-89 | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 8,892 |
\section{Introduction}
We discuss methods for finding simplicial harmonic cochains --
approximations of harmonic forms on simplicial meshes. In particular,
we want to find the harmonic cochain cohomologous to a given cocycle.
That is, given a cocycle $\omega$, we want a harmonic cochain $h$ such
that $h = \omega + \operatorname{d} \alpha$ for some $\alpha$. We either solve an
eigenvector problem followed by post processing or use a weighted least
squares method.
Harmonic cochains are used in finite element solution of elliptic
partial differential equations like the Poisson's equation
$\laplacian_p u=f$. See for instance \cite{ArFaWi2010}. They are also
useful in computer graphics for design of vector fields, since they
can provide a background on which vortices, sources and sinks may be
superimposed~\cite{FiScDeHo2007}. In computer graphics they are also
useful for finding conformal parameterization for texture mapping and
other applications~\cite{GuYa2008}.
We prove an easy discrete version of the Hodge-deRham isomorphism
theorem. This leads to a weighted least squares based method which is
the main contribution of this paper. The linear system is an obvious
one and can be derived also from the gradient part of Hodge
decomposition or in other ways. The two other methods we describe are
based on finding eigenvectors followed by post processing. The least
squares method solves the mixed finite element exterior calculus
equations for harmonic cochains given in~\cite[Lemma
3.10]{ArFaWi2010}. (This is a result of Demlow and Hirani, and the
proof can be found in~\cite{HiKaWaWa2011v6}.) For each of the harmonic
cochain methods considered, the choice of the Hodge star operator
(Whitney or primal-dual) can be made, leading to two variations of
each method.
Other methods are those by Gu and Yau~\cite{GuYa2008}, and Desbrun et
al.~\cite{DeKaTo2008}. Both of these have some numerical disadvantages
especially when Whitney Hodge star is used instead of the diagonal
primal-dual Hodge star of discrete exterior calculus. (The Whitney
Hodge star is needed for general simplicial meshes, and for the lowest
order finite element exterior calculus.) In cases such as
2-dimensional cochains in tetrahedral meshes, the Desbrun et
al.~method does more work than is necessary for forming the linear
system, no matter which Hodge star is used.
\section{Preliminaries} \label{sec:prlmnrs}
Most of the needed background information on algebraic topology and
exterior calculus can be found in an earlier longer version of this
paper which is still available on arXiv~\cite{HiKaWaWa2011v6}. We use
two types of discretizations of exterior calculus -- discrete exterior
calculus, and finite element exterior calculus. In finite element
exterior calculus, we only consider the version that uses Whitney
forms.
We first recall the smooth Hodge-deRham theorem on the isomorphism
between cohomology and \emph{harmonic forms} ($\ker \laplacian)$ or
\emph{harmonic fields} ($\ker \operatorname{d} \cap \ker \codiff$). (This material
is based on~\cite{Schwarz1995}). The space of harmonic $p$-dimensional
fields on a manifold $M$ is denoted $\mathcal{H}^p(M)$. For a
\emph{closed manifold} (i.e., compact manifold without boundary),
harmonic forms and harmonic fields are the same, i.e., $\ker
\laplacian = \ker \operatorname{d} \cap \ker \codiff$. However, in the case of
compact manifolds with boundary $\partial M$, which we will refer to
as $\partial$-manifolds, one only has that $\ker \operatorname{d} \cap \ker \codiff
\subset \ker \laplacian$ and there can exist harmonic forms which are
not harmonic fields~\cite{CaDeGlMi2005}.
One of the striking properties of harmonic forms or fields is the link
they yield between topology and analysis or geometry. For closed
manifolds there is an isomorphism between real cohomology and the
space of harmonic forms. For compact $\partial$-manifolds however,
even the space of harmonic fields is infinite dimensional due to the
possibility of specifying boundary conditions. An isomorphism with
cohomology can be obtained by restricting harmonic fields by
specifying certain boundary conditions.
The \emph{tangential} component of a $p$-form $\omega$ is denoted
$\tangential \omega$ and its value is the value of $\omega$ on the
tangential (to $\partial M$) components of its vector field
arguments. Then the \emph{normal} component of $\omega$ is $\normal
\omega = \omega\vert_{\partial M} - \tangential
\omega$. See~\cite[page 27]{Schwarz1995} or~\cite[page
540]{AbMaRa1988}. These can also be defined using the pullback via the
inclusion map of the boundary into the manifold. A differential form
$\omega$ is said to satisfy the \emph{Neumann} or \emph{absolute}
boundary conditions if it has zero normal component ($\normal \omega =
0$), and the \emph{Dirichlet} or \emph{relative} boundary conditions
if it has zero tangential component ($\tangential \omega = 0$). Let
$\mathcal{H}^p_N(M)$ and $\mathcal{H}^p_D(M)$ be harmonic fields
satisfying the Neumann or Dirichlet boundary conditions,
respectively. Then one has:
\begin{theorem*}[Hodge-deRham
Isomorphism~\cite{Schwarz1995}] \label{thm:smthhdgdrhm} If $M$ is a
closed manifold, then $H^p(M; \mathbb{R}) \cong \mathcal{H}^p(M) = \ker
\laplacian_p$, and if it is a compact $\partial$-manifold then
$H^p(M;\mathbb{R})\cong \mathcal{H}^p_N(M)$ and $H^p(M, \partial M; \mathbb{R})
\cong \mathcal{H}^p_D(M)$.
\end{theorem*}
The space $H^p(M; \mathbb{R})$ is the (absolute) real $p$-cohomology vector
space of $M$, and $H^p(M,\partial M; \mathbb{R})$ is the relative real
$p$-cohomology vector space of $M$, relative to its boundary. For
$\partial$-manifolds, we will only consider harmonic fields satisfying
Neumann conditions. This is because the least squares method is based
on a weak form of the Laplace-deRham operator, and in that framework
the Neumann conditions are automatic, that is they do not have to be
enforced explicitly. For manifold complexes with boundary we will use
\emph{harmonic cochains} synonymously with \emph{harmonic Neumann
cochains}.
\section{Eigenvector Methods} \label{sec:eigen}
Cohomologous harmonic cochains can be computed by first computing a
harmonic cochain basis followed by some post processing. Such a basis
can be obtained as eigenvectors of the zero eigenvalue of a discrete
$\laplacian_p$. The problem of finding eigenvectors can be formulated
(in the terminology of finite element methods) using a weak mixed or
weak direct method. While nothing is published about the eigenvector
method, the weak mixed method was the one used by Arnold et
al.~\cite{ArFaWi2010} in one of their examples.
Let $\laplacian = \operatorname{d} \codiff + \codiff \operatorname{d}$ be the smooth
Laplace-deRham operator on some manifold $M$. Then the direct
eigenvalue problem is to find a nonzero differential form $u$ and a
real scalar $\lambda$ such that $\laplacian u = \lambda u$. The
formal derivation of the weak direct method goes like this: start by
posing the problem of finding a $u$ such that
$\pinnerproduct{\laplacian u}{v} = \lambda \pinnerproduct{u}{v}$ for
all $v$, the inner products being those on forms. Then using the
formula for the Laplace-deRham operator, and assuming appropriate
boundary conditions (which implies adjointness of $\operatorname{d}$ and $\codiff$)
this is equivalent to finding a $u$ such that $\pinnerproduct{\operatorname{d} u}{\operatorname{d}
v}+ \pinnerproduct{\codiff u}{\codiff v} = \lambda
\pinnerproduct{u}{v}$ for all $v$. If $M$ is replaced by its
simplicial complex approximation (which we will also refer to as $M$)
then the discretization yields the linear system $\laplacian_p u =
\lambda \hodge_p u$, where now $\laplacian_p := \operatorname{d}_p \hodge_{p+1} \operatorname{d}_p
+ (-1)^{(p-1)(n-p+1)} \hodge_p \operatorname{d}_{p-1} \hodge^{-1}_{p-1} \operatorname{d}^T_{p-1}
\hodge_p$ is the discrete Laplace-deRham
operator~\cite{HiKaWaWa2011v6} and $u$ is a $p$-cochain. Here
$\hodge_p$ is the mass matrix for Whitney $p$-forms or the primal-dual
discrete Hodge star. The harmonic cochains are thus the solutions
corresponding to the zero eigenvalue for this generalized eigenvalue
problem.
For the weak mixed eigenvector method, consider the linear system for
the unknowns $\sigma$ and $u$:
\begin{align*}
\pinnerproduct{\sigma}{\tau}-\pinnerproduct{\operatorname{d}_{p-1}\tau}{u} &=0\,,\\
\pinnerproduct{\operatorname{d}_{p-1}\sigma}{v} + \pinnerproduct{\operatorname{d}_p u}{\operatorname{d}_p v}&=0\,,
\end{align*}
for all $\tau$ and $v$. Then $(\sigma, u)$ is a solution if and only
if $\sigma = 0$ and $u$ is a harmonic $p$-form~\cite[Lemma
3.10]{ArFaWi2010}. We discretize these equations and obtain the system
matrix
\begin{equation}\label{eq:mxdmtrx}
\begin{bmatrix}
-\hodge_{p-1} & \operatorname{d}_{p-1}^T \hodge_p\\
\hodge_p \operatorname{d}_{p-1} & \operatorname{d}_p^T\hodge_{p+1} \operatorname{d}_p
\end{bmatrix} \, ,
\end{equation}
whose eigenvectors corresponding to the zero eigenvalue we seek.
Figure~\ref{fig:eigen} shows results of the eigenvector
calculations.The eigenvector methods will often suffice, if all that
is needed is \emph{some} harmonic basis, which may be the common case
in finite element exterior calculus. Applications like vector field
design in computer graphics may require more control over the process,
namely the satisfaction of the cohomology constraint.
\begin{figure}[p]
\centering
\begin{tabular}{c}
\begin{tabular}{cc}
\includegraphics[scale=0.30, trim=3.1in 2.3in 3.1in 3.0in, clip]
{egnvctr/torus_E1.png} &
\includegraphics[scale=0.30, trim=3.1in 2.3in 3.1in 3.0in, clip]
{egnvctr/torus_E2.png}
\end{tabular} \\
\begin{tabular}{cc}
\includegraphics[scale=0.35, trim=2.0in 0.9in 1.8in 0.9in, clip]
{2d/fourholes_4326/eigen/arpack/egnvctr0whtny.png} &
\includegraphics[scale=0.35, trim=2.0in 0.9in 1.8in 0.9in, clip]
{2d/fourholes_4326/eigen/arpack/egnvctr1whtny.png} \\
\includegraphics[scale=0.35, trim=2.0in 0.9in 1.8in 0.9in, clip]
{2d/fourholes_4326/eigen/arpack/egnvctr2whtny.png} &
\includegraphics[scale=0.35, trim=2.0in 0.9in 1.8in 0.9in, clip]
{2d/fourholes_4326/eigen/arpack/egnvctr3whtny.png}
\end{tabular}
\end{tabular}
\caption{Harmonic cochains produced by the mixed eigenvector
method. The torus has a two-dimensional space of harmonic cochains
and the four-holed disc has a four-dimensional space of harmonic
Neumann fields.}
\label{fig:eigen}
\end{figure}
\subsection{Projection based methods} \label{sub:prjctn}
If a harmonic cochain basis is available, then orthogonal projection
to the harmonics can be used to obtain a harmonic cochain $h$
cohomologous to a given cocycle $\omega$. (This method was suggested
to us by Ari Stern.) In contrast, the least squares method discussed
in Section~\ref{sec:lstsqrs} finds a cohomologous harmonic cochain
without requiring any precomputation of a harmonic basis. Moreover,
the projection method does not find the potential of the gradient
part. If that is needed, then the least squares method
equation~\eqref{eq:lstsqrs} has to be solved anyway.
Let $H$ be a matrix whose columns form a harmonic $p$-cochain basis.
Given a nontrivial cocycle $\omega$, we seek the harmonic cochain $h$
such that $h = \omega + \operatorname{d} \alpha$ for some $\alpha$. (Thus we are
interested in a Hodge decomposition of $\omega$. Note that the Hodge
decomposition of an arbitrary $\omega$ would be $\operatorname{d} \alpha + \codiff
\beta + h$, but since the given $\omega$ is a nontrivial cocycle, it
has no curl part.) Since $\im \operatorname{d}$ is orthogonal to every column $h_i$
of $H$, we have that $\pInnerproduct{\omega + \operatorname{d} \alpha}{h_i} =
\pInnerproduct{\omega}{h_i} = \left(\sum_j a_j h_j, h_i\right)$ for
all $i$, where $\sum_j a_j h_j$ is the $h$ that we seek. (The inner
product above is the $p$-cochain inner product.) Writing $a$ for the
vector of unknown coefficients $a_j$, we can express the last equality
as the linear system $H^T \! \hodge H \, a = H^T \hodge
\omega$. After solving this for the unknowns $a$, the vector $H\, a$
is the desired $h$. This is the normal equation for a weighted least
squares problem (a different system from theh one in
Section~\ref{sec:lstsqrs}). The matrix of the linear system is of
order of the $p$-Betti number and the cost of this projection will be
dominated by the matrix vector multiplications needed in forming $H^T
\! \hodge H$ if the Betti number is small. If the columns of $H$ are
orthonormal in the $\hodge$ inner product then no linear solve is
required.
\subsection{Pairing with homology basis}
\label{sub:pairing}
For vector field design in computer graphics or in physical
applications, the usual cases are dimension 2 with 1-cochains and
dimension 3 with 1-cochains or 2-cochains. In the latter case, only
solid handles and cavities are relevant since general 3-manifolds are
typically not used in such applications. In all these cases, it makes
sense to talk of homology basis elements corresponding to topological
features. These can be used by pairing with cohomology to find
cohomologous harmonic cochains. (This method was suggested to us by
Douglas Arnold.) For this one needs an explicit isomorphism $H^p(M)
\cong H_p(M)^\ast$, where $H_p(M)^\ast$ is the vector space dual of
real-valued homology. Note that this method requires not only the
entire harmonic cochain basis but also a full homology basis.
Given $[\omega]\in H^{p}(M)$, define the map $\varphi:
H^{p}(M)\rightarrow H_{p}(M)^{*}$ by $\varphi[\omega][z]:= \omega(z)$
for any $[z]\in H_{p}(M)$. This map is well-defined: given other
representatives $\omega + \operatorname{d} \alpha$ and $z + \partial y$, one has
$(\omega + \operatorname{d} \alpha) (z + \partial y) = \omega(z) + \operatorname{d} \alpha(z) +
\omega(\partial y) + \operatorname{d} \alpha(\partial y) = \omega(z)$. To prove that
$\varphi$ is an isomorphism, it is enough to show that it is
injective. That is, we would like to show that for any $[\omega]\in
H^{p}(M)$, $\omega(z) = 0$ for all $[z] \in H_{p}(M)$ implies that
$[\omega] = 0$. This is equivalent to showing that if $\omega$ is a
representative of an element of $H^{p}(M)$, $\omega(z) = 0$ for all
nontrivial cycles $z$ implies that $\omega$ is exact. Since $\omega$
is nontrivial, $\omega = \operatorname{d} \alpha + h$ for some $\alpha$ and harmonic
cochain $h$. To show $\omega$ is exact is the same as showing $h =
0$. Thus we have to show that given a harmonic cochain $h$, $h(z) = 0$
for all nontrivial cycles $z$ implies that $h = 0$. We now show this
for the case of $n = 2$ ($\dim $ of $M$) and $p = 1$.
\setcounter{theoremgi}{0}
\begin{theoremgi}
Let $M$ be a surface simplicial complex. Then $\varphi : H^{1}(M)
\rightarrow H_1(M)^{\ast}$ is injective (hence an isomorphism).
\end{theoremgi}
\begin{proof}
It is enough to consider a homology basis of nontrivial
cycles. Suppose $M$ has $b$ holes and $g$ handles. Consider a
homology basis corresponding to the holes, handles and tunnels. That
is, let $z_1 \, , \dots , z_{b - 1}$ be cycles corresponding to $b -
1$ of the $b$ holes (the remaning one hole is considered the outer
boundary), $\mu_1 \, , \dots , \mu_g$ be handle cycles corresponding
to the $g$ handles, $\lambda_1 \, , \dots , \lambda_g$ be tunnel
cycles corresponding to the $g$ handles. (Handle cycles are like
longitudes on a torus and tunnel cycles are like latitudes on a
torus.) Let $\omega_z$ be the collection of $b - 1$ nontrivial
cocycles corresponding to the hole cycles in, and let $\omega_{\mu}$
and $\omega_{\lambda}$ be similarly defined. Each such cocycle
$\omega$ is a ``picket fence'' (see
Figure~\ref{fig:lstsqrschmlgy}). Either two edges of a triangle
carry a part of $\omega$ or none. The hole cocycles join the
boundary of a hole to the outer boundary. The handle and tunnel
coycles go around the handle or tunnel. Such cocycles are obtained
by dualizing cycles on the dual mesh. By
Theorem~\ref{thm:dscrthdgdrhm}, there is a basis of cohomologous
cochains $h_z$ for all $z$, $h_{\mu}$ for all $\mu$, and
$h_{\lambda}$ for all $\lambda$ (cohomologous to the corresponding
$\omega$'s).
Now consider a harmonic 1-cochain that evaluates to 0 on all the
basis cycles above. In terms of the harmonic basis above,
\begin{equation} \label{eq:hrmnccmbntn}
h = \sum\limits_z r_z h_z +
\sum\limits_{\mu} r_{\mu} h_{\mu} + \sum\limits_{\lambda}
r_{\lambda} h_{\lambda} \, .
\end{equation}
Note that $h_z$ evaluates to nonzero on $z$ and 0 on every other
cycle, $h_{\mu_i}$ evaluates to nonzero on $\lambda_i$ and 0 on
every other cycle, $h_{\lambda_i}$ evaluates to nonzero on $\mu_i$
and 0 on every other cycle. $h_z (z) = \omega_z (z) = \omega_z
(B_z)$, where $B_z$ is the boundary of the corresponding hole since
$h_z$ is cohomologous to $\omega_z$ and $z$ is homologous to
$B_z$. But $\omega_z (B_z) = \pm 1$ (or whatever value was picked
for edges). Likewise, $h_z (z') = \omega_z (z') = \omega_z (B_{z'})
= 0$, for $z' \neq z$ since $\omega_z$ takes value 0 on edges of
$B_{z'}$. Similarly for $h_z$ on other types of cycles, and for the
other harmonic basis elements. Thus, the coefficients
in~\eqref{eq:hrmnccmbntn} are all zero.
\end{proof}
If $M$ is the closure of a connected open subset of $\mathbb{R}^3$ and the
topological features of interest are cavities and solid handles then a
result similar to the above one can be shown. Now let $H$ be a matrix
whose columns form a basis of harmonic $p$-cochains and $B$ a matrix
whose columns form a homology basis corresponding to topological
features in the sense described in the proof above. Then $(B^{T}
H)^{-1}$ contains the harmonic cochains cohomologous to the
topological features.
\section{Least Squares Method} \label{sec:lstsqrs}
In what follows, $M$ will be a simplicial manifold complex, with or
without boundary. All references to $\laplacian$ are to the discrete
Laplace-deRham operators~\cite{HiKaWaWa2011v6}. For a closed manifold,
one way to show the Hodge-deRham isomorphism theorem of
Section~\ref{sec:prlmnrs} for the smooth case is to use a variational
approach~\cite[Theorem 2.2.1]{Jost2005}. One shows that in each
cohomology class there is exactly one harmonic form and it is the one
with the smallest norm. The norm used is the $L^2$ norm induced from
the inner product of differential forms. Inspired by this, we
formulate a simple discrete version of this theorem. This is done for
harmonic cochains in the case of manifold simplicial complexes without
boundary, and for harmonic Neumann cochains in the case with
boundary. First we derive the necessary stationarity conditions in the
discrete case. For $\omega\in C^{p}$ s.t. $\dd_p\omega=0$, we
consider the optimization problem $\min_{\alpha \, \in \, C^{p-1}}
\pinnerproduct{\omega + \operatorname{d}_{p-1}\alpha\,} {\,\omega +
\dd_{p-1}\alpha}_{C^p}$, where the
$\pinnerproduct{\cdot}{\cdot}_{C^p}$ is the inner product on
$p$-cochains~\cite{BeHi2011a}. Writing this in matrix notation, we want
to find the minimizer $\alpha$ in the optimization problem
\begin{equation} \label{eq:min}
\min_{\alpha\in C^{p-1}} \bigl(\omega + \dd_{p-1}
\alpha\bigr)^T \hodge_p \, \bigl(\omega + \dd_{p-1}
\alpha\bigr) \, .
\end{equation}
From the stationary condition for the minimizer and using properties
of the Hodge star matrix, we obtain:
\begin{equation} \label{eq:lstsqrs}
\dd_{p-1}^T \hodge_p \dd_{p-1} \alpha = -\dd_{p-1}^T \hodge_p
\omega \, .
\end{equation}
This is the normal equation for the weighted least squares problem
$\operatorname{d} \alpha \simeq -\omega$. Although the above equation is a necessary
condition for solving the optimization problem~\eqref{eq:min}, the
matrix $\operatorname{d}_{p - 1}^T\hodge_p\operatorname{d}_{p - 1}$ may have a nontrivial
kernel. In fact in the interesting cases it generally will. (For
example, for $p=1$, the $\ker \operatorname{d}_0$ will have dimension equal to the
number of connected components in the complex.) Thus, for $\alpha$ to
be a minimizer we need that the Hessian $\operatorname{d}_{p - 1}^T\hodge_p\operatorname{d}_{p -
1}$ be at least positive semidefinite, which is true because of the
positive definiteness of $\hodge_p$. In this case, $\alpha$ may not be
unique, but as we will show next, $\operatorname{d}_{p-1}\alpha$ will be
unique. Note that equation~\eqref{eq:lstsqrs} is equivalent to
$\codiff_p \operatorname{d}_{p-1} \alpha = -\codiff_p \omega$ which is $\codiff_p
(\omega + \operatorname{d}_{p-1} \alpha) = 0$. This should make the connection to
$\omega + \operatorname{d}_{p-1} \alpha$ being harmonic more transparent since we
also have that $\operatorname{d} (\omega + \operatorname{d} \alpha) = 0$.
From the above, if $[\omega] \in H^p(K \, ; \mathbb{R})$, then it is easy to
see that
\begin{inparaenum}[\itshape (i)]
\item there exists a cochain $\alpha \in C^{p - 1}(K \, ; \mathbb{R})$, not
necessarily unique, such that $\codiff_p \, (\omega + \operatorname{d}_{p - 1}
\alpha) = 0$;
\item there is a unique cochain $\operatorname{d}_{p - 1} \alpha$ satisfying
$\codiff_p \, (\omega + \operatorname{d}_{p - 1} \alpha) = 0$ ; and
\item $\codiff_p \, (\omega + \operatorname{d}_{p - 1} \alpha) = 0$ implies
$\laplacian_p \, (\omega + \operatorname{d}_{p - 1} \alpha) = 0$.
\end{inparaenum}
To see
\begin{inparaenum}[\itshape (i)]
\item consider the least squares problem $\operatorname{d}_{p - 1} a \simeq
\omega$. Let $-\alpha$ be a solution. Some such $\alpha$ always
exists because least squares problems always have a solution. Note
that the norm used in formulating this problem as a residual
minimization is the one induced from the Hodge star inner product
on cochains. Specifically, the inner product matrix is $\hodge_p$
and the least squares problem minimizes $(\omega + \operatorname{d}_{p - 1}
\alpha)^T \hodge_p (\omega + \operatorname{d}_{p - 1} \alpha)$ since $\omega -
\operatorname{d}_{p - 1} \, (-\alpha) = (\omega + \operatorname{d}_{p - 1} \alpha)$ is the
residual. But from properties of least squares~\cite{Bjork1996}
the residual $(\omega + \operatorname{d}_{p - 1} \alpha)$ is
$\hodge_p$-orthogonal to $\im \operatorname{d}_{p - 1}$. Thus we have that
$(\omega + \operatorname{d}_{p - 1} \alpha) \in \im {\operatorname{d}_{p -
1}}^{\perp_{\hodge_p}} = \ker \codiff_p$ since $\codiff_p$ is
the adjoint of $\operatorname{d}_{p - 1}$ up to sign in the Hodge star inner
product on cochains. In \item uniqueness of $\operatorname{d}_{p - 1} \alpha$
follows from properties of least squares, and \item is obvious
since $\omega + \operatorname{d}_{p-1} \alpha$ is also closed.
\end{inparaenum}
Note that unlike in the smooth case, $\codiff_{p+1}$ and $\operatorname{d}_p$ are
adjoints of each other up to sign only. Specifically,
$\pInnerproduct{\operatorname{d}_p \alpha}{\beta}_{C_{p+1}} \! \! = (-1)^{1 - p^2}
\pInnerproduct{\alpha}{\codiff_{p + 1} \beta}_{C_p}$ for any
$p$-cochain $\alpha$ and $(p+1)$-cochain $\beta$. From the preceding
discussion, we have the following elementary but useful theorem:
\begin{theoremgi}[Discrete Hodge-deRham
Isomorphism] \label{thm:dscrthdgdrhm} There is a unique harmonic
cochain in each cohomology class and it is the one with the smallest
norm. Given a cocycle $\omega$ its cohomologous harmonic cochain is
$\omega + \operatorname{d} \alpha$ where $\alpha$ is a solution of $\dd^T \hodge
\dd \alpha = -\dd^T \hodge \omega$.
\end{theoremgi}
An alternative derivation of \eqref{eq:lstsqrs} is to project $\omega$
to image of $\operatorname{d}$ by requiring that $\pinnerproduct{\operatorname{d} \alpha}{\operatorname{d} \tau}
= \pinnerproduct{\omega}{\operatorname{d} \tau}$ for all $\tau$. Yet another
derivation is the following. Given an $\omega$, to find its Hodge
decomposition, one starts with $\omega = \operatorname{d} \alpha + \codiff \beta +
h$, where we are seeking a harmonic field or cochain $h$ and an
$\alpha$ and $\beta$. Applying $\codiff$ to both sides yields
$\hodge^{-1} \operatorname{d}^T \! \hodge \operatorname{d} \alpha = \hodge^{-1} \operatorname{d}^T \! \hodge
\omega$, which is the same as~\eqref{eq:lstsqrs} up to sign after the
$\hodge^{-1}$ is cancelled from both sides. Note that the linear
system for the $\beta$ part is $\operatorname{d} \codiff \beta = \operatorname{d} \omega$. This
has a $\hodge^{-1}$ which cannot be removed by cancellation since this
is $\operatorname{d} \hodge^{-1} \operatorname{d}^T \! \hodge \beta = \operatorname{d} \omega$. In his
thesis~\cite{Bell2008}, Bell was motivated by the need to address the
inverse Hodge star matrix in order to apply algebraic multigrid to the
Hodge decomposition problem. He proposed replacing the Hodge stars by
identity and solving the above systems starting with random cochains
until one has obtained a cohomology basis. (He did not prove that the
procedure is guaranteed to produce such a basis.) He then showed that
choosing the basis elements as $\omega$ and solving~\eqref{eq:lstsqrs}
for each one yields a basis of harmonic cochains. In contrast we have
shown above that each such $\omega$ is cohomologous to the
corresponding harmonic cochain $h$ individually.
\begin{figure}[p]
\centering
\begin{tabular}{c}
\begin{tabular}{cc}
\includegraphics[scale=0.3, trim=2.9in 2.2in 2.9in 2.5in, clip]
{2dsurf/torus_2700/handle_zero.png} &
\includegraphics[scale=0.3, trim=2.9in 2.2in 2.9in 2.5in, clip]
{2dsurf/torus_2700/handle_harmonic.png} \\
\includegraphics[scale=0.3, trim=2.9in 2.2in 2.9in 2.5in, clip]
{2dsurf/torus_2700/tunnel_zero.png} &
\includegraphics[scale=0.3, trim=2.9in 2.2in 2.9in 2.5in, clip]
{2dsurf/torus_2700/tunnel_harmonic.png}
\end{tabular} \\
\begin{tabular}{ccc}
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in,
clip]
{2d/fourholes_4326/illinois/12whtny.png} &
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in,
clip]
{2d/fourholes_4326/illinois/3whtny.png} &
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in,
clip]
{2d/fourholes_4326/illinois/6whtny.png} \\
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in,
clip]
{2d/fourholes_4326/illinois/9whtny.png} &
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in,
clip]
{2d/fourholes_4326/illinois/39whtny.png} &
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in,
clip]
{2d/fourholes_4326/illinois/69whtny.png}
\end{tabular}
\end{tabular}
\caption{Some example computations using the least squares
method. \emph{Top two rows~:} Cocycles representing a cohomology
basis for the torus are shown as thick edges in the left
figures. These are the $\omega$ cocycles of the text. The cocycles
have value $\pm 1$ on these edges and 0 on the other edges. The
right figures show the harmonic cochains in the corresponding
cohomology classes. \emph{Bottom two rows :} The nontrivial
cocycles are marked in red. Note that the proxy vector fields
circulate \emph{around} only those holes associated with the
cocycle, and \emph{past} others.}
\label{fig:lstsqrschmlgy}
\end{figure}
All computations in this paper were done using the Python language
with SciPy, NumPy, and PyDEC~\cite{BeHi2011a} packages. The top two
rows of Figure~\ref{fig:lstsqrschmlgy} show the harmonic cochains
cohomologous to given nontrivial cocycles on a torus surface. The
bottom two rows of Figure~\ref{fig:lstsqrschmlgy} show several
examples on a planar mesh with holes. To single out a particular hole,
so that the harmonic cochain proxy vector field will circulate around
that hole, one picks a cocycle connecting that boundary to the outer
boundary. Connecting two holes results in a harmonic cochain that
circulates about those two holes. For the cochains shown in the third
row of Figure~\ref{fig:lstsqrschmlgy}, from left to right, the values
of $\norm{\laplacian h}_{\hodge_1}$ relative to $\norm{h}_{\hodge_1}$
are approximately $4.12 \times 10^{-11}$, $7.32 \times 10^{-11}$ and
$3.02 \times 10^{-11}$, respectively. Similarly, for the cochains in
the bottom row, from left to right, these values are $4.98 \times
10^{-11}$, $5.73 \times 10^{-11}$ and $5.64 \times 10^{-11}$,
respectively. Figure~\ref{fig:2rprsnttvs} shows that the least
squares method (as expected) finds the same harmonic cochain when very
different initial cocycles from the same cohomology class are given as
input. If the cohomologous cochains are denoted $h$, $h'$, $h''$ from
left to right, respectively, then the differences between them are
$\norm{h - h'}_{\hodge_1} = 1.1 \times 10^{-14}$, $\norm{h -
h''}_{\hodge_1} = 2.8 \times 10^{-14}$ and $\norm{h' -
h''}_{\hodge_1} = 2.2 \times 10^{-14}$.
\begin{figure}[t]
\centering
\begin{tabular}{ccc}
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in, clip]
{2d/fourholes_4326/illinois/3whtny.png} &
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in, clip]
{2d/fourholes_4326/illinois/3_6whtny.png} &
\includegraphics[scale=0.35, trim=2.05in 0.95in 1.85in 0.95in, clip]
{2d/fourholes_4326/illinois/3_4whtny.png}
\end{tabular}
\caption{Three different cocycles ($\omega$ of the text) representing
the same cohomology class lead to the same harmonic cochain when
least squares method is used.}
\label{fig:2rprsnttvs}
\end{figure}
\subsection{Linear solvers for the least squares
method} \label{sec:solvers}
As noted earlier, the matrix $\operatorname{d}_{p-1}^T\hodge_p\operatorname{d}_{p-1}$
in~\eqref{eq:lstsqrs} is positive semidefinite since $\operatorname{d}_{p-1}$ will
typically have a nontrivial kernel. For example, for $p=1$ for a
connected domain, the space of constant functions on the domain is in
the kernel of $d_0$. In this case, it is easy to make the system
nonsingular (mod out the nontrivial kernel) by fixing the value at a
vertex and adjusting the linear system accordingly. For the case of
2-cochains in tetrahedral meshes however, the kernel of $\operatorname{d}_1$ can be
large. Let $M$ be a three-dimensional manifold simplicial
complex. Simple linear algebra and elementary topology reveals that
the $\dim(\ker \operatorname{d}_1) \ge N_0 - \chi(K)$ where $N_0$ is the number of
vertices and $\chi(K)$ is the Euler number (the alternating sum of
Betti numbers at all dimensions)~\cite{Munkres1984}. For example, for
a connected domain with boundary, we will have $\dim(\ker \operatorname{d}_1) \ge
\text{number of vertices} - 1 + \text{number of solid handles} -
\text{number of cavities}$. By refining the mesh this kernel dimension
can be made arbitrarily large. If a direct solver is to be used for
solving~\eqref{eq:lstsqrs} then one must mod out this potentially
large nontrivial kernel. An alternative is to use iterative Krylov
solvers as they work well even in the presence of a nontrivial kernel
and this is the approach we chose in our experiments. Specifically, we
used a conjugate gradient solver without any preconditioning or
modifications. Algebraic multigrid is another very efficient
alternative whose effectiveness for this problem has been shown
in~\cite{Bell2008}.
\subsection{Finding the initial nontrivial
cochains} \label{sub:initial}
In this paper we assume that a nontrivial cocycle is given. Our aim
here is not to give algorithms for finding a cocycle. However, a few
words about this are in order. An initial nontrivial cocycle in a
cohomology class can be found in a number of ways. For surfaces,
efficient algorithms to do this exist. By a folklore theorem, in time
linear in the number of simplices, one can find a homology basis for
the topological dual (e.g., barycentric dual) graph of the
triangulation. One can then use Poincar\'e-Lefschetz
duality~\cite{Munkres1984} to get a cohomology basis on the primal
mesh. For a boundaryless manifold simplicial complex, one would start
with nontrivial cycles on the dual graph. But in case of a manifold
with boundary, due to Lefschetz duality, one has to start with a
nontrivial relative cycle on the dual mesh, relative to the boundary.
One can also start with a random cochain and compute the desired
nontrivial cocycle using a Hodge decomposition with standard inner
product~\cite{Bell2008}. Yet another method is to use the persistence
algorithm~\cite{EdLeZo2002}. This is usually implemented using
coefficients in finite field $\mathbb{F}_2$ and has cubic (in the number of
simplices) complexity.
\section{Comparisons with Other Methods} \label{sec:comparisons}
The first relevant method to compare with is from the book of Gu and
Yau~\cite{GuYa2008} and also appears in their earlier work. The
formulation is very simple and straight forward, but it leads to
inefficient methods on general simplicial meshes. This method was
further simplified by Desbrun et al.~\cite{DeKaTo2008} who solve a
Poisson's-like equation at a different dimension. The resulting linear
systems in both methods suffer from numerical and scalability issues
for general simplicial meshes.
Gu and Yau start with a nontrivial cocycle $\omega$ representing a
cohomology class in $H^p(K)$ and seek a cochain $\omega + \operatorname{d} \alpha'$
such that $\laplacian (\omega+\operatorname{d} \alpha') = 0$. This leads to the
linear system $\operatorname{d}_{p-1}\hodge_{p-1}^{-1}\operatorname{d}_{p-1}^T\hodge_p\operatorname{d}_{p-1}
\alpha' = -\operatorname{d}_{p-1}\hodge_{p-1}^{-1}\operatorname{d}_{p-1}^T\hodge_p\omega$. The
presence of the inverse Hodge stars in this systems lead to numerical
disadvantages.
Desbrun et al.~\cite{DeKaTo2008} solve a different Poisson's equation
$(\operatorname{d}_{p - 2} \codiff_{p - 1} + \codiff_p \operatorname{d}_{p - 1}) \alpha'$ $= -
\codiff_p \omega$. A solution $\alpha'$ to the above equation yields
an $\omega+\operatorname{d}\alpha'$ that is harmonic in the sense of this paper. Of
course, if harmonic 1-cochains are being sought, then $\alpha'$ is a
0-cochain and $\codiff_0$ is the 0 operator. Thus the $\operatorname{d} \codiff$
term is not present. However, the $\operatorname{d}\codiff$ term is superfluous at
every dimension as we have shown. Thus their linear system has an
extra, unnecessary term. This extra term causes numerical and
scalability problems when Whitney Hodge star is used.
In Figure~\ref{fig:dnstydsbrn}, we compare the sparsity of the least
squares and Desbrun et al.~matrices for finding harmonic 2-cochains on
a tetrahedral mesh of a solid annulus (a solid ball with an internal
cavity). The matrices are shown in Figure~\ref{fig:dnstydsbrn} for
both the Whitney and DEC Hodge stars. Both matrices are of the same
size but the Desbrun et al.~matrix is denser. This is very obvious for
the Whitney Hodge star case (14.3 million vs.~56 thousand
nonzeros). However, it is also evident in the DEC Hodge star case (94
thousand vs.~40 thousand nonzeros). Here the increased density is due
to the extra term in the Desbrun et al.~system.
\begin{figure}[p]
\centering
\begin{tabular}{ccc}
\imagetop{\begin{xyoverpic}
{(1, 1)}{scale=0.4, trim=0.0in 0.0in 0.0in 0.0in, clip}
{sprs/illnssldannls.png},
(-0.05, 0.5)*{\begin{sideways}\text{Whitney}\end{sideways}},
(0.5, 1.05)*{\text{Least squares matrix}} \end{xyoverpic}} &
\imagetop{\begin{xyoverpic}
{(1, 1)}{scale=0.4, trim=0.0in 0.0in 0.0in 0.0in, clip}
{sprs/dsbrnsldannls.png},
(0.5, 1.05)*{\text{Desbrun et al.~matrix}} \end{xyoverpic}} &
\imagetop{\begin{xyoverpic}
{(1, 1)}{scale=0.4, trim=0.0in 0.0in 0.0in 0.0in, clip}
{sprs/dsbrnclrbr.png},
(1.9, 0.98)*{10^{4}},
(1.9, 0.84)*{10^{2}},
(1.9, 0.685)*{10^{0}},
(2.25, 0.53)*{10^{-2}},
(2.25, 0.37)*{10^{-4}},
(2.25, 0.215)*{10^{-6}},
(2.25, 0.055)*{10^{-8}},
(0.5, 1.08)*{\,}
\end{xyoverpic}} \\
\imagetop{\begin{xyoverpic}
{(1,1)}{scale=0.4, trim=0.0in 0.0in 0.0in 0.0in, clip}
{sprs/illnssldannlsdec.png},
(-0.05, 0.5)*{\begin{sideways}\text{DEC}\end{sideways}}
\end{xyoverpic}} &
\imagetop{\includegraphics[scale=0.4, trim=0.0in 0.0in 0.0in 0.0in, clip]
{sprs/dsbrnsldannlsdec.png}} &
\imagetop{\begin{xyoverpic}
{(1, 1)}{scale=0.4, trim=0.0in 0.0in 0.0in 0.0in, clip}
{sprs/dsbrnclrbrdec.png},
(1.9, 0.98)*{10^{4}},
(1.9, 0.84)*{10^{2}},
(1.9, 0.685)*{10^{0}},
(2.25, 0.53)*{10^{-2}},
(2.25, 0.37)*{10^{-4}},
(2.25, 0.215)*{10^{-6}},
(2.25, 0.055)*{10^{-8}}
\end{xyoverpic}}
\end{tabular}
\caption{Magnitudes of nonzeros in operators using the Whitney (top
row) and DEC (bottom row) Hodge stars. The least squares matrix
(left column) is sparser than the Desbrun et al.~matrix (right
column) in the case of DEC Hodge star and significantly sparser in
the case of Whitney Hodge star. This is due to the extra term in
the Desbrun et al.~matrix. The colorbar shows the magnitude of the
nonzero components. The two matrices are of equal size, and are
for finding harmonic 2-cochains on the tetrahedral mesh of the
solid annulus.}
\label{fig:dnstydsbrn}
\end{figure}
The superior sparsity of the linear system matrix in the least squares
method leads to improved solution time. To illustrate this, we compare
the time taken for again finding harmonic 2-cochains on a tetrahedral
mesh of a solid annulus. For the least squares method, using conjugate
gradient method (without preconditioning), the times are 0.1355 and
0.1181 seconds for the DEC and Whitney Hodge stars, respectively. For
the Desbrun et al.~method, these times are 3.510 and 1746 seconds,
respectively. We also used a sparse solver in SuperLU for Desbrun et
al.~system and in this case, the times are 0.3171 and 13.05 seconds,
respectively. (All times are averaged over many trials. Also, it may
be possible to improve the times for both the methods by using
preconditioners or special solvers.) Another least square method is
that of Fisher et al.~\cite{FiScDeHo2007}. Comparisons with it are in
an earlier version of this paper available on
arXiv~\cite{HiKaWaWa2011v6}.
\section{Conclusions} \label{sec:cnclsns}
We presented two methods for finding harmonic cochains in the
cohomology class of a given cocycle -- an eigenvector method (using
direct or mixed formulation) followed by post processing and a least
squares method. The most salient feature of the least squares method
is in finding a cohomologous harmonic cochain without requiring an
entire harmonic or homology basis. The least squares method is
numerically superior and independent of the choice of Hodge stars in
comparison with the Poisson's equation methods of Gu and Yao, and
Desbrun et al. In future we plan to develop harmonic cochain methods
for higher order finite element exterior calculus analogous to the one
for Whitney forms. A precise quantification of the efficiency of the
least squares method in comparison with the eigenvector method for
finding a cohomologous harmonic basis is another direction to pursue.
\addcontentsline{toc}{section}{Acknowledgement}
\section*{Acknowledgement} This research was funded in part by NSF
Grant DMS-0645604. We thank Douglas Arnold, Alan Demlow, Tamal Dey,
Nathan Dunfield, Damrong Guoy, Rich Lehoucq, and Ari Stern for
discussions, and Mathieu Desbrun for pointing out the Fisher et
al.~paper.
\bibliographystyle{acmdoi}
\addcontentsline{toc}{section}{References}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 1,543 |
\subsection{Proof of Proposition~\ref{prop-link-trace-refinement-bisim}}
For a trace-based strategy $\alpha : {\sf L}^{*} \times Q \to {\sf Dist}({\sf moves})$ and a trace $w \in {\sf L}^*$,
define the local strategy $\alpha[w] : Q \to {\sf Dist}({\sf moves})$ with $\alpha[w](q) = \alpha(w,q)$ for all $q \in Q$.
We have the following lemma.
\begin{lemma} \label{lem-subDis-as-matrix-prod}
Let ${\cal D} = \tuple{Q,\mu_0,{\sf L},\delta}$ be an MDP.
Let $\alpha : {\sf L}^{*} \times Q \to {\sf Dist}({\sf moves})$ be a trace-based strategy.
Let $w \in {\sf L}^*$ and $a \in {\sf L}$.
Then:
\[ \mathit{subDis}_{{\cal D},\alpha}(w a) = \mathit{subDis}_{{\cal D},\alpha}(w) \cdot \Delta_{\alpha[w]}(a)
\]
\end{lemma}
\begin{proof}
Let $q' \in Q$.
We have:
\begin{align*}
& \mathit{subDis}_{{\cal D},\alpha}(w a)(q') \\
& = \sum_{\rho \in {\sf Paths}(w)} {\sf Pr}_{{\cal D},\alpha}(\rho a q')
&& \text{definition of $\mathit{subDis}$} \\
& = \sum_{q \in Q} \mathop{\sum_{\rho \in {\sf Paths}(w)}}_{{\sf last}(\rho)=q} {\sf Pr}_{{\cal D},\alpha}(\rho) \cdot
\sum_{{\sf m} \in {\sf moves}(q)} \alpha(\rho)({\sf m}) \cdot {\sf m}(a,q')
&& \text{definition of ${\sf Pr}$} \\
& = \sum_{q \in Q} \mathop{\sum_{\rho \in {\sf Paths}(w)}}_{{\sf last}(\rho)=q} {\sf Pr}_{{\cal D},\alpha}(\rho) \cdot
\sum_{{\sf m} \in {\sf moves}(q)} \alpha(w,q)({\sf m}) \cdot {\sf m}(a,q')
&& \text{$\alpha$ is trace-based} \\
& = \sum_{q \in Q} \mathit{subDis}_{{\cal D},\alpha}(w)(q) \cdot
\sum_{{\sf m} \in {\sf moves}(q)} \alpha(w,q)({\sf m}) \cdot {\sf m}(a,q')
&& \text{definition of $\mathit{subDis}$} \\
& = \sum_{q \in Q} \mathit{subDis}_{{\cal D},\alpha}(w)(q) \cdot
\sum_{{\sf m} \in {\sf moves}(q)} \alpha[w](q)({\sf m}) \cdot {\sf m}(a,q')
&& \text{definition of $\alpha[w]$} \\
& = \sum_{q \in Q} \mathit{subDis}_{{\cal D},\alpha}(w)(q) \cdot
\Delta_{\alpha[w]}(a)[q,q']
&& \text{definition of $\Delta_{\alpha[w]}(a)$} \\
& = \left( \mathit{subDis}_{{\cal D},\alpha}(w) \cdot \Delta_{\alpha[w]}(a) \right) (q')
\end{align*}
\qed
\end{proof}
The following lemma allows us to view strategies as a composition of local strategies, and conversely.
\begin{lemma} \label{lem-link-trace-local}
Let ${\cal D} = \tuple{Q,\mu_0,{\sf L},\delta}$ be an MDP.
Let $w = a_1 a_2 \cdots a_n \in {\sf L}^*$.
Let $\mu_1, \mu_2, \ldots, \mu_n$ be subdistributions over~$Q$.
Then there is a strategy $\alpha : {\sf Paths}({\cal D}) \to {\sf Dist}({\sf moves})$ with
\[
\mu_i = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_i) \qquad \text{for all $i \in \{0, 1, \ldots, n\}$}
\]
if and only if there are local strategies $\alpha_0, \alpha_1, \ldots, \alpha_{n-1} : Q \to {\sf Dist}({\sf moves})$ with
\[
\mu_{i+1} = {\sf Succ}(\mu_i, \alpha_i, a_{i+1}) \qquad \text{for all $i \in \{0, 1, \ldots, n-1\}$}.
\]
\end{lemma}
\begin{proof}
We prove the two implications from the lemma in turn.
\begin{itemize}
\item[``$\Longrightarrow$'':]
Let $\alpha$ be a strategy with
$
\mu_i = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_i)
$
for all $i \in \{0, 1, \ldots, n\}$.
By Lemma~\ref{lem-trace-based-enough} we can assume that $\alpha$ is trace-based.
For all $i \in \{0, 1, \ldots, n-1\}$ define a local strategy $\alpha_i$ with $\alpha_i = \alpha[a_1 a_2 \cdots a_i]$.
Then we have for all $i \in \{0, 1, \ldots, n-1\}$:
\begin{align*}
\mu_{i+1}
& = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_{i+1}) && \text{definition of $\alpha$} \\
& = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_{i}) \cdot \Delta_{\alpha[a_1 a_2 \cdots a_i]}(a_{i+1})
&& \text{Lemma~\ref{lem-subDis-as-matrix-prod}} \\
& = \mu_i \cdot \Delta_{\alpha_i}(a_{i+1})
&& \text{definitions of $\alpha, \alpha_i$} \\
& = {\sf Succ}(\mu_i, \alpha_i, a_{i+1})
&& \text{by~\eqref{eq-Succ-as-prod}}
\end{align*}
\item[``$\Longleftarrow$'':]
Let $\alpha_0, \alpha_1, \ldots, \alpha_{n-1}$ be local strategies with
$
\mu_{i+1} = {\sf Succ}(\mu_i, \alpha_i, a_{i+1})
$
for all $i \in \{0, 1, \ldots, n-1\}$.
Define a trace-based strategy~$\alpha$
such that
$\alpha[a_1 a_2 \cdots a_i] = \alpha_i$ for all $i \in \{0, 1, \ldots, n-1\}$.
(This condition need not completely determine~$\alpha$.)
We prove by induction on~$i$ that
$
\mu_i = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_i)
$
for all $i \in \{0, 1, \ldots, n\}$.
For $i=0$ this is trivial.
For the step, we have:
\begin{align*}
\mu_{i+1}
& = {\sf Succ}(\mu_i, \alpha_i, a_{i+1}) && \text{definition of $\alpha_i$} \\
& = \mu_i \cdot \Delta_{\alpha_i}(a_{i+1}) && \text{by~\eqref{eq-Succ-as-prod}} \\
& = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_i) \cdot \Delta_{\alpha_i}(a_{i+1}) && \text{induction hypothesis} \\
& = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_i) \cdot \Delta_{\alpha[a_1 a_2 \cdots a_i]}(a_{i+1}) && \text{definition of $\alpha$} \\
& = \mathit{subDis}_{{\cal D},\alpha}(a_1 a_2 \cdots a_{i+1}) && \text{Lemma~\ref{lem-subDis-as-matrix-prod}}
\end{align*}
\end{itemize}
\qed
\end{proof}
Now we can prove Proposition~\ref{prop-link-trace-refinement-bisim} from the main text:
\begin{qproposition}{\ref{prop-link-trace-refinement-bisim}}
\stmtproplinktracerefinementbisim
\end{qproposition}
\begin{proof}
Let ${\cal D} = \tuple{Q_{\cal D},\mu^{{\cal D}}_{0},{\sf L},\delta^{{\cal D}}}$ and ${\cal C} = \tuple{Q_{\cal C},\mu^{{\cal C}}_{0},{\sf L},\delta^{{\cal C}}}$.
\begin{itemize}
\item[``$\Longrightarrow$'':]
Let ${\cal D} \sim {\cal C}$.
Hence $\mu^{{\cal D}}_{0} \sim \mu^{{\cal C}}_{0}$.
We show that ${\cal D} \sqsubseteq {\cal C}$.
Let $\alpha^{{\cal D}}$ be a strategy for~${\cal D}$.
Let $w = a_1 a_2 \cdots a_n \in {\sf L}^*$.
Let $\mu^{{\cal D}}_{0}, \mu^{{\cal D}}_{1}, \ldots, \mu^{{\cal D}}_{n}$ be the subdistributions with
$\mu^{{\cal D}}_{i} = \mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(a_1 a_2 \cdots a_i)$ for all~$i$.
By Lemma~\ref{lem-link-trace-local} there exist local strategies $\alpha^{{\cal D}}_0, \alpha^{{\cal D}}_1, \ldots, \alpha^{{\cal D}}_{n-1}$ with
$\mu^{{\cal D}}_{i+1} = {\sf Succ}(\mu^{{\cal D}}_{i}, \alpha^{{\cal D}}_i, a_{i+1})$ for all~$i$.
Since $\mu^{{\cal D}}_{0} \sim \mu^{{\cal C}}_{0}$,
there exist local strategies $\alpha^{{\cal C}}_0, \alpha^{{\cal C}}_1, \ldots, \alpha^{{\cal C}}_{n-1}$ for~${\cal C}$ and subdistributions $\mu^{{\cal C}}_1, \mu^{{\cal C}}_2, \ldots, \mu^{{\cal C}}_n$ with
$\mu^{{\cal C}}_{i+1} = {\sf Succ}(\mu^{{\cal C}}_{i}, \alpha^{{\cal C}}_i, a_{i+1})$ for all~$i$ and
$\mu^{{\cal D}}_i \sim \mu^{{\cal C}}_i$ for all~$i$.
Since ${\cal C}$ is an MC, the local strategies~$\alpha^{{\cal C}}_i$ are, in fact, irrelevant.
By Lemma~\ref{lem-link-trace-local} we have $\mu^{{\cal C}}_i = \mathit{subDis}_{{\cal C}}(a_1 a_2 \cdots a_i)$ for all~$i$.
So we have:
\begin{align*}
\mathit{Tr}_{{\cal D},\alpha^{{\cal D}}}(w)
& = \norm{\mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(w)} && \text{by~\eqref{eq-subdis=trace-probability}} \\
& = \norm{\mu^{{\cal D}}_n} && \mu^{{\cal D}}_n = \mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(w) \\
& = \norm{\mu^{{\cal C}}_n} && \mu^{{\cal D}}_n \sim \mu^{{\cal C}}_n \\
& = \norm{\mathit{subDis}_{{\cal C}}(w)} && \mu^{{\cal C}}_n = \mathit{subDis}_{{\cal C}}(w) \\
& = \mathit{Tr}_{{\cal C}}(w) && \text{by~\eqref{eq-subdis=trace-probability}}
\end{align*}
Since $\alpha^{{\cal D}}$ and~$w$ were chosen arbitrarily, we conclude that ${\cal D} \sqsubseteq {\cal C}$.
\item[``$\Longleftarrow$'':]
Let ${\cal D} \sqsubseteq {\cal C}$.
We show $\mu^{{\cal D}}_{0} \sim \mu^{{\cal C}}_{0}$.
Define a relation ${\cal R} \subseteq {\sf subDist}(Q_{\cal D}) \times {\sf subDist}(Q_{\cal C})$
such that $\mu^{{\cal D}} \mathrel{{\cal R}} \mu^{{\cal C}}$ if and only if there exist a strategy~$\alpha^{{\cal D}}$ for~${\cal D}$ and a trace~$w$ with
$\mu^{{\cal D}} = \mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(w)$ and $\mu^{{\cal C}} = \mathit{subDis}_{{\cal C}}(w)$.
We claim that ${\cal R}$ is a bisimulation.
To prove the claim, consider any $\mu^{{\cal D}}, \mu^{{\cal C}}$ with $\mu^{{\cal D}} \mathrel{{\cal R}} \mu^{{\cal C}}$.
Then there exist a strategy~$\alpha^{{\cal D}}$ for~${\cal D}$ and a trace~$w$ with
$\mu^{{\cal D}} = \mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(w)$ and $\mu^C = \mathit{subDis}_{{\cal C}}(w)$.
Since ${\cal D} \sqsubseteq {\cal C}$, we have $\mathit{Tr}_{{\cal D},\alpha^{{\cal D}}}(w) = \mathit{Tr}_{{\cal C}}(w)$.
So we have:
\begin{align*}
\norm{\mu^{{\cal D}}}
& = \norm{\mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(w)} && \mu^{{\cal D}} = \mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(w) \\
& = \mathit{Tr}_{{\cal D},\alpha^{{\cal D}}}(w) && \text{by~\eqref{eq-subdis=trace-probability}} \\
& = \mathit{Tr}_{{\cal C}}(w) && \text{as argued above} \\
& = \norm{\mathit{subDis}_{{\cal C}}(w)} && \text{by~\eqref{eq-subdis=trace-probability}} \\
& = \norm{\mu^{{\cal C}}} && \mu^{{\cal C}} = \mathit{subDis}_{{\cal C}}(w)
\end{align*}
This proves the first condition for ${\cal R}$ being a bisimulation.
For the rest of the proof assume $w = a_1 a_2 \cdots a_n$.
Write $\mu^{{\cal D}}_n = \mu^{{\cal D}}$ and $\mu^{{\cal C}}_n = \mu^{{\cal C}}$.
Let $\alpha^{{\cal D}}_n$ be a local strategy for~${\cal D}$.
Let $a_{n+1} \in {\sf L}$.
Define $\mu^{{\cal D}}_{n+1} = {\sf Succ}(\mu^{{\cal D}}_n, \alpha^{{\cal D}}_n, a_{n+1})$,
and $\mu^{{\cal C}}_{n+1} = {\sf Succ}(\mu^{{\cal C}}_n, \alpha^{{\cal C}}_n, a_{n+1})$ for an arbitrary (and unimportant) local strategy $\alpha^{{\cal C}}_n$ for~${\cal C}$.
For the second and the third condition of ${\cal R}$ being a bisimulation we need to prove
$\mu^{{\cal D}}_{n+1} \mathrel{{\cal R}} \mu^{{\cal C}}_{n+1}$.
Define $\mu^{{\cal D}}_1, \mu^{{\cal D}}_2, \ldots, \mu^{{\cal D}}_{n-1}$ such that
$\mu^{{\cal D}}_i = \mathit{subDis}_{{\cal D},\alpha^{{\cal D}}}(a_1 a_2 \cdots a_i)$ for all $i \in \{0, 1, \ldots, n\}$.
By Lemma~\ref{lem-link-trace-local} there are local strategies $\alpha^{{\cal D}}_0, \alpha^{{\cal D}}_1, \ldots, \alpha^{{\cal D}}_{n-1}$
such that $\mu^{{\cal D}}_{i+1} = {\sf Succ}(\mu^{{\cal D}}_i, \alpha^{{\cal D}}_i, a_{i+1})$ for all $i \in \{0, 1, \ldots, n-1\}$.
We also have $\mu^{{\cal D}}_{n+1} = {\sf Succ}(\mu^{{\cal D}}_n, \alpha^{{\cal D}}_n, a_{n+1})$,
so again by Lemma~\ref{lem-link-trace-local} there is a strategy~$\beta^{{\cal D}}$ with
$\mu^{{\cal D}}_i = \mathit{subDis}_{{\cal D},\beta^{{\cal D}}}(a_1 a_2 \cdots a_i)$ for all $i \in \{0, 1, \ldots, n+1\}$.
In particular, $\mu^{{\cal D}}_{n+1} = \mathit{subDis}_{{\cal D},\beta^{{\cal D}}}(w a_{n+1})$.
Similarly, we have $\mu^{{\cal C}}_{n+1} = \mathit{subDis}_{{\cal C}}(w a_{n+1})$.
Thus, $\mu^{{\cal D}}_{n+1} \mathrel{{\cal R}} \mu^{{\cal C}}_{n+1}$.
Hence we have proved that ${\cal R}$ is a bisimulation.
Considering the empty trace, we see that $\mu^{{\cal D}}_0 \mathrel{{\cal R}} \mu^{{\cal C}}_0$.
Since ${\cal R} \subseteq \mathord{\sim}$, we also have $\mu^{{\cal D}}_0 \sim \mu^{{\cal C}}_0$, as desired.
\end{itemize}
\qed
\end{proof}
\subsection{On the Notion of \emph{Extremal with Respect to a Vector Space}} \label{app-sub-extremal-independent}
We prove here:
\begin{qproposition}{\ref{proposition-extremal-independent}}
\propositionextremalindependent
\end{qproposition}
\begin{proof}
Let $\vec{v}_1 \in \mathbb{R}^{|{\sf L}| \cdot k_1}$ be a direction in which $\widehat{\alpha}$ is extremal with respect to~$B_1$.
Since $\mathcal{V}_1 \subseteq \mathcal{V}_2$, there exists a matrix $T \in \mathbb{R}^{k_2 \times k_1}$ with $B_1 = B_2 T$.
Define columns
$\vec{v}_{1, 1}, \vec{v}_{1, 2}, \ldots, \vec{v}_{1, |{\sf L}|} \in \mathbb{R}^{k_1}$ such that:
\[
\vec{v}_1 = \begin{pmatrix} \vec{v}_{1, 1} \\ \vec{v}_{1, 2} \\ \vdots \\ \vec{v}_{1, |{\sf L}|} \end{pmatrix}
\]
Define $\vec{v}_2 \in \mathbb{R}^{|{\sf L}| \cdot k_2}$ by:
\[
\vec{v}_2 = \begin{pmatrix} T \vec{v}_{1, 1} \\ T \vec{v}_{1, 2} \\ \vdots \\ T \vec{v}_{1, |{\sf L}|} \end{pmatrix}
\]
For $\mu \in {\sf subDist}(Q)$ and $\alpha : Q \to {\sf Dist}({\sf moves})$, let us write $p_1(\mu, \alpha) \in \mathbb{R}^{|{\sf L}| \cdot k_1}$ (resp., $p_2(\mu, \alpha) \in \mathbb{R}^{|{\sf L}| \cdot k_2}$) for the point $p(\mu, \alpha)$ defined in terms of~$B_1$ (resp.,~$B_2$).
We have:
\begin{align*}
p_1(\mu, \alpha) \vec{v}_1
& = \sum_{i=1}^{|{\sf L}|} \mu \Delta_{\alpha}(a_i) B_1 \vec{v}_{1, i}
&& \text{definitions of $p_1$ and $\vec{v}_{1,i}$} \\
& = \sum_{i=1}^{|{\sf L}|} \mu \Delta_{\alpha}(a_i) B_2 T \vec{v}_{1, i}
&& B_1 = B_2 T \\
& = p_2(\mu, \alpha) \vec{v}_2
&& \text{definitions of $p_2$ and $\vec{v}_2$} \\
\end{align*}
It follows that $\widehat{\alpha}$ is extremal in direction~$\vec{v}_2$ with respect to~$B_2$.
\qed
\end{proof}
\subsection{Further Geometrical Facts about Extremal Strategies}
In this section we prove facts about extremal local strategies that will be needed later.
\begin{lemma} \label{lem-remove-v}
Let ${\cal D} = \tuple{Q,\mu_{0},{\sf L},\delta}$ be an MDP.
Let $B \in \mathbb{R}^{Q \times k}$ with $k \ge 1$.
Let $\mu \in {\sf subDist}(Q)$.
Let $\alpha, \widehat{\alpha}$ be local strategies.
Suppose $\vec{v} \in \mathbb{R}^{{|{\sf L}|} \cdot k}$ is a direction in which $\widehat{\alpha}$ is extremal and
$p(\mu, \alpha) \vec{v} = p(\mu, \widehat{\alpha}) \vec{v}$.
Then $p(\mu, \alpha) = p(\mu, \widehat{\alpha})$.
\end{lemma}
\begin{proof}
We have:
\begin{align*}
\sum_{q \in Q} \mu(q) \cdot p(d_q, \alpha) \vec{v}
& = p(\mu, \alpha) \vec{v} && \text{definition of~$p$} \\
& = p(\mu, \widehat{\alpha}) \vec{v} && \text{assumption on~$\widehat{\alpha}$} \\
& = \sum_{q \in Q} \mu(q) \cdot p(d_q, \widehat{\alpha}) \vec{v} && \text{definition of~$p$}
\end{align*}
With~\eqref{eq-remove-v1} it follows that for all $q \in {\sf Supp}(\mu)$ we have $p(d_q, \alpha) \vec{v} = p(d_q, \widehat{\alpha}) \vec{v}$.
Hence by~\eqref{eq-remove-v2} we obtain $p(d_q, \alpha) = p(d_q, \widehat{\alpha})$ for all $q \in {\sf Supp}(\mu)$.
Thus:
\[
p(\mu, \alpha)
= \sum_{q \in Q} \mu(q) \cdot p(d_q, \alpha)
= \sum_{q \in Q} \mu(q) \cdot p(d_q, \widehat{\alpha})
= p(\mu, \widehat{\alpha})
\]
\qed
\end{proof}
For a subdistribution~$\mu$ define the bounded, convex polytope $P_{\mu} \subseteq \mathbb{R}^{{|{\sf L}|} \cdot k}$ with
\[
P_{\mu} = \{p(\mu, \alpha) \mid \alpha : Q \to {\sf Dist}({\sf moves})\}.
\]
Comparing two polytopes $P_{\mu_{\cal D}}$ and~$P_{\mu_{\cal E}}$ for subdistributions $\mu_{\cal D}, \mu_{\cal E}$ will play a key role for deciding bisimulation.
First we prove the following lemma, which states that any vertex of the polytope~$P_\mu$ can be obtained by applying an extremal local strategy.
Although this is intuitive, the proof is not very easy.
\begin{lemma} \label{lem-vertex-extremal}
Let ${\cal D} = \tuple{Q,\mu_{0},{\sf L},\delta}$ be an MDP.
Let $B \in \mathbb{R}^{Q \times k}$ with $k \ge 1$.
Let $\mu \in {\sf subDist}(Q)$.
If $x \in P_{\mu}$ is a vertex of~$P_{\mu}$ then there is an extremal local strategy~$\widehat{\alpha}$ with $x = p(\mu, \widehat{\alpha})$.
\end{lemma}
\begin{proof}
Let $x \in P_{\mu}$ be a vertex of~$P_{\mu}$.
Let $\alpha_1 : Q \to {\sf Dist}({\sf moves})$ be a local strategy so that $x = p(\mu, \alpha_1)$.
Since $x$ is a vertex, we can assume that $\alpha_1$ is pure.
Since $x$ is a vertex of~$P_{\mu}$, there is a hyperplane $H \subseteq \mathbb{R}^{{|{\sf L}|} \cdot k}$ such that $\{x\} = P_{\mu} \cap H$.
Let $\vec{v}_1 \in \mathbb{R}^{{|{\sf L}|} \cdot k}$ be a normal vector of~$H$.
Since $\{x\} = P_{\mu} \cap H$, we have $x \vec{v}_1 = \max_{y \in P_{\mu}} y \vec{v}_1$ or $x \vec{v}_1 = \min_{y \in P_{\mu}} y \vec{v}_1$; without loss of generality, say $x \vec{v}_1 = \max_{y \in P_{\mu}} y \vec{v}_1$.
Since $\{x\} = P_{\mu} \cap H$, we have for all $q \in {\sf Supp}(\mu)$ and all $\alpha$:
\begin{equation} \label{eq-lem-vertex-extremal-suppD}
p(d_q, \alpha) \vec{v}_1 = p(d_q, \alpha_1) \vec{v}_1 \quad \text{implies} \quad p(d_q, \alpha) = p(d_q, \alpha_1).
\end{equation}
For all $q \in Q \setminus {\sf Supp}(\mu)$, redefine the pure local strategy~$\alpha_1(q)$ so that all $q \in Q$ and all local strategies~$\alpha$ satisfy $p(d_q, \alpha) \vec{v}_1 \le p(d_q, \alpha_1) \vec{v}_1$.
Since $Q$~and~${\sf moves}$ are finite, there is $\varepsilon > 0$ such that all $q \in Q$ and all \emph{pure} local strategies~$\alpha$ either satisfy $p(d_q, \alpha) \vec{v}_1 = p(d_q, \alpha_1) \vec{v}_1$ or $p(d_q, \alpha) \vec{v}_1 \le p(d_q, \alpha_1) \vec{v}_1 - \varepsilon$.
Define
\[
\Sigma = \left\{ \alpha : Q \to {\sf Dist}({\sf moves}) \mid \forall\, q \in Q: p(d_q, \alpha) \vec{v}_1 = p(d_q, \alpha_1) \vec{v}_1 \right\}.
\]
Consider the bounded, convex polytope $P_2 \subseteq \mathbb{R}^{{|{\sf L}|} \cdot k}$ defined by
\[
P_2 = \left\{
\sum_{q \in Q} p(d_q, \alpha) \; \middle\vert \;
\alpha \in \Sigma\right\} .
\]
By an argument similar to the one above, there are a pure local strategy $\widehat{\alpha} \in \Sigma$, a vertex $x_2 = \sum_{q \in Q} p(d_q, \widehat{\alpha})$ of~$P_2$, and a vector $\vec{v}_2 \in \mathbb{R}^{{|{\sf L}|} \cdot k}$ such that for all $q \in Q$ and all $\alpha \in \Sigma$, we have $p(d_q, \alpha) \vec{v}_2 \le p(d_q, \widehat{\alpha}) \vec{v}_2$, and if $p(d_q, \alpha) \vec{v}_2 = p(d_q, \widehat{\alpha}) \vec{v}_2$ then $p(d_q, \alpha) = p(d_q, \widehat{\alpha})$.
By scaling down~$\vec{v}_2$ by a small positive scalar, we can assume that all $q \in Q$ and all local strategies~$\alpha$ satisfy
\begin{equation} \label{eq-small-epsilon}
\left\lvert p(d_q, \alpha) \vec{v}_2 \right\rvert \le \frac{\varepsilon}{3}.
\end{equation}
Since $\widehat{\alpha} \in \Sigma$, all $q \in Q$ satisfy $p(d_q, \widehat{\alpha}) \vec{v}_1 = p(d_q, \alpha_1) \vec{v}_1$.
By~\eqref{eq-lem-vertex-extremal-suppD} all $q \in {\sf Supp}(\mu_{\cal D})$ satisfy $p(d_q, \widehat{\alpha}) = p(d_q, \alpha_1)$.
Hence:
\[
p(\mu_{\cal D}, \widehat{\alpha})
= \sum_{q \in {\sf Supp}(\mu_{\cal D})} \mu_{\cal D}(q) p(d_q, \widehat{\alpha})
= \sum_{q \in {\sf Supp}(\mu_{\cal D})} \mu_{\cal D}(q) p(d_q, \alpha_1)
= p(\mu_{\cal D}, \alpha_1) = x
\]
It remains to show that there is a direction~$\vec{v}$ in which $\widehat{\alpha}$ is extremal.
Take $\vec{v} = \vec{v}_1 + \vec{v}_2$.
Let $q \in Q$ and let $\alpha$ be a pure local strategy.
We consider two cases:
\begin{itemize}
\item
Assume $p(d_q, \alpha) \vec{v}_1 = p(d_q, \alpha_1) \vec{v}_1$.
Then there is $\beta \in \Sigma$ with $\alpha(q) = \beta(q)$, hence $p(d_q, \alpha) = p(d_q, \beta)$.
We have:
\begin{align*}
p(d_q, \alpha) \vec{v}
& = p(d_q, \beta) \vec{v} && p(d_q, \alpha) = p(d_q, \beta) \\
& = p(d_q, \beta) \vec{v}_1 + p(d_q, \beta) \vec{v}_2 && \text{definition of~$\vec{v}$} \\
& = p(d_q, \alpha_1) \vec{v}_1 + p(d_q, \beta) \vec{v}_2 && \beta \in \Sigma \\
& = p(d_q, \widehat{\alpha}) \vec{v}_1 + p(d_q, \beta) \vec{v}_2 && \widehat{\alpha} \in \Sigma \\
& \le p(d_q, \widehat{\alpha}) \vec{v}_1 + p(d_q, \widehat{\alpha}) \vec{v}_2 && \text{definition of $\widehat{\alpha}$} \\
& = p(d_q, \widehat{\alpha}) \vec{v} && \text{definition of~$\vec{v}$}
\end{align*}
Hence \eqref{eq-remove-v1} holds for~$\widehat{\alpha}$.
To show~\eqref{eq-remove-v2}, assume $p(d_q, \alpha) \vec{v} = p(d_q, \widehat{\alpha}) \vec{v}$.
Then all terms in the computation above are equal, and $p(d_q, \beta) \vec{v}_2 = p(d_q, \widehat{\alpha}) \vec{v}_2$.
By the definition of~$\widehat{\alpha}$, this implies $p(d_q, \beta) = p(d_q, \widehat{\alpha})$.
Hence $p(d_q, \alpha) = p(d_q, \beta) = p(d_q, \widehat{\alpha})$.
Hence \eqref{eq-remove-v2} holds for~$\widehat{\alpha}$.
\item
Assume $p(d_q, \alpha) \vec{v}_1 \ne p(d_q, \alpha_1) \vec{v}_1$.
By the definition of~$\varepsilon$ it follows $p(d_q, \alpha) \vec{v}_1 \le p(d_q, \alpha_1) \vec{v}_1 - \varepsilon$.
We have:
\begin{align*}
p(d_q, \alpha) \vec{v}
& = p(d_q, \alpha) \vec{v}_1 + p(d_q, \alpha) \vec{v}_2 && \text{definition of~$\vec{v}$} \\
& \le p(d_q, \alpha_1) \vec{v}_1 - \varepsilon + p(d_q, \alpha) \vec{v}_2 && \text{as argued above} \\
& = p(d_q, \widehat{\alpha}) \vec{v}_1 - \varepsilon + p(d_q, \alpha) \vec{v}_2 && \widehat{\alpha} \in \Sigma \\
& \le p(d_q, \widehat{\alpha}) \vec{v}_1 - \varepsilon + \frac{\varepsilon}{3} && \text{by~\eqref{eq-small-epsilon}} \\
& \le p(d_q, \widehat{\alpha}) \vec{v}_1 + p(d_q, \widehat{\alpha}) \vec{v}_2 - \varepsilon + \frac{\varepsilon}{3} + \frac{\varepsilon}{3} && \text{by~\eqref{eq-small-epsilon}} \\
& < p(d_q, \widehat{\alpha}) \vec{v}_1 + p(d_q, \widehat{\alpha}) \vec{v}_2 && \varepsilon > 0 \\
& = p(d_q, \widehat{\alpha}) \vec{v} && \text{definition of~$\vec{v}$}
\end{align*}
This implies \eqref{eq-remove-v1} and~\eqref{eq-remove-v2} for~$\widehat{\alpha}$.
\end{itemize}
Hence, $\widehat{\alpha}$ is extremal in direction~$\vec{v}$.
\qed
\end{proof}
The following lemma states the intuitive fact that in order to compare the polytopes $P_{\mu_{\cal D}}$ and~$P_{\mu_{\cal E}}$, it suffices to compare the vertices obtained by applying extremal local strategies:
\begin{lemma} \label{lem-check-extremal-enough}
Let ${\cal D} = \tuple{Q,\mu_{0},{\sf L},\delta}$ be an MDP.
Let $B \in \mathbb{R}^{Q \times k}$ with $k \ge 1$.
Then for all $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$ we have $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$ if and only if for all extremal local strategies~$\widehat{\alpha}$ we have $p(\mu_{\cal D}, \widehat{\alpha}) = p(\mu_{\cal E}, \widehat{\alpha})$.
\end{lemma}
\begin{proof}
We prove the two implications from the lemma in turn.
\begin{itemize}
\item[``$\Longrightarrow$'':]
Suppose $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$.
Let $\widehat{\alpha}$ be a local strategy that is extremal in direction~$\vec{v}$.
Since $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$, there are $\alpha_{{\cal E}}$ and~$\alpha_{{\cal D}}$ such that
$p(\mu_{\cal D}, \widehat{\alpha}) = p(\mu_{\cal E}, \alpha_{\cal E})$ and
$p(\mu_{\cal E}, \widehat{\alpha}) = p(\mu_{\cal D}, \alpha_{\cal D})$.
We have:
\begin{align*}
p(\mu_{\cal D}, \widehat{\alpha}) \vec{v}
& = p(\mu_{\cal E}, \alpha_{\cal E}) \vec{v}
&& p(\mu_{\cal D}, \widehat{\alpha}) = p(\mu_{\cal E}, \alpha_{\cal E}) \\
& \le p(\mu_{\cal E}, \widehat{\alpha}) \vec{v}
&& \text{$\widehat{\alpha}$ is extremal in direction~$\vec{v}$} \\
& = p(\mu_{\cal D}, \alpha_{\cal D}) \vec{v}
&& \text{$p(\mu_{\cal E}, \widehat{\alpha}) = p(\mu_{\cal D}, \alpha_{\cal D})$} \\
& \le p(\mu_{\cal D}, \widehat{\alpha}) \vec{v}
&& \text{$\widehat{\alpha}$ is extremal in direction~$\vec{v}$}
\end{align*}
So all inequalities are in fact equalities.
In particular, we have $p(\mu_{\cal D}, \widehat{\alpha}) \vec{v} = p(\mu_{\cal D}, \alpha_{\cal D}) \vec{v}$.
It follows:
\begin{align*}
p(\mu_{\cal D}, \widehat{\alpha})
& = p(\mu_{\cal D}, \alpha_{\cal D}) && \text{Lemma~\ref{lem-remove-v}} \\
& = p(\mu_{\cal E}, \widehat{\alpha}) && \text{definition of~$\alpha_{\cal D}$}
\end{align*}
\item[``$\Longleftarrow$'':]
Let $x$ be a vertex of~$P_{\mu_{\cal D}}$.
By Lemma~\ref{lem-vertex-extremal} there exists an extremal local strategy~$\widehat{\alpha}$ with $x = p(\mu_{\cal D}, \widehat{\alpha})$.
By the assumption we have $p(\mu_{\cal D}, \widehat{\alpha}) = p(\mu_{\cal E}, \widehat{\alpha})$.
Hence $x = p(\mu_{\cal D}, \widehat{\alpha}) = p(\mu_{\cal E}, \widehat{\alpha}) \in P_{\mu_{\cal E}}$.
Since $x$ is an arbitrary vertex of~$P_{\mu_{\cal D}}$, and $P_{\mu_{\cal D}}, P_{\mu_{\cal E}}$ are bounded, convex polytopes, it follows $P_{\mu_{\cal D}} \subseteq P_{\mu_{\cal E}}$.
The reverse inclusion is shown similarly.
\end{itemize}
\qed
\end{proof}
\subsection{Proof of Proposition~\ref{prop-coNP-vector-space}}
For $n \ge 0$, define a relation $\mathord{\sim}_n \subseteq {\sf subDist}(Q) \times {\sf subDist}(Q)$ as follows.
Let $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$.
Define~$\mathord{\sim}_0$ such that $\mu_{\cal D} \sim_0 \mu_{\cal E}$ if and only if $\norm{\mu_{\cal D}} = \norm{\mu_{\cal E}}$.
For $n \ge 0$, define $\mathord{\sim}_{n+1}$ such that $\mu_{\cal D} \sim_{n+1} \mu_{\cal E}$ if and only if
\begin{itemize}
\item $\norm{\mu_{\cal D}} = \norm{\mu_{\cal E}}$;
\item for all local strategies~$\alpha_{\cal D}$ there exists a local strategy~$\alpha_{\cal E}$ such that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$;
\item for all local strategies~$\alpha_{\cal E}$ there exists a local strategy~$\alpha_{\cal D}$ such that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$.
\end{itemize}
\begin{lemma} \label{lem-sim-n-properties}
We have:
\begin{enumerate}
\item $\mathord{\sim}_{n} \supseteq \mathord{\sim}_{n+1} \supseteq \mathord{\sim}$ for all $n \ge 0$.
\item If $\mathord{\sim}_{n} = \mathord{\sim}_{n+1}$ then $\mathord{\sim}_{n} = \mathord{\sim}$.
\end{enumerate}
\end{lemma}
\begin{proof}
Item~1.\ follows from a straightforward induction.
For item~2., let $\mathord{\sim}_{n} = \mathord{\sim}_{n+1}$.
By item~1.\ we have $\mathord{\sim}_{n} \supseteq \mathord{\sim}$, so it remains to prove $\mathord{\sim}_{n} \subseteq \mathord{\sim}$.
It suffices to prove that $\mathord{\sim}_{n}$ is a bisimulation.
Suppose $\mu_{\cal D} \sim_n \mu_{\cal E}$.
Since $\mathord{\sim}_{n} = \mathord{\sim}_{n+1}$, we have $\mu_{\cal D} \sim_{n+1} \mu_{\cal E}$.
Thus:
\begin{itemize}
\item $\norm{\mu_{\cal D}} = \norm{\mu_{\cal E}}$;
\item for all local strategies~$\alpha_{\cal D}$ there exists a local strategy~$\alpha_{\cal E}$ such that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$;
\item for all local strategies~$\alpha_{\cal E}$ there exists a local strategy~$\alpha_{\cal D}$ such that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$.
\end{itemize}
Hence we have shown that $\mathord{\sim}_{n}$ is a bisimulation.
\qed
\end{proof}
We will show later that we have $\mathord{\sim}_n = \mathord{\sim}$ for $n = |Q| - 1$.
The following lemma reduces the membership problem of~$\mathord{\sim}_{n+1}$ to the membership problem of $\mathord{\sim}_{n}$ and a polytope-comparison problem.
\begin{lemma} \label{lem-sim=polyhedronequal}
Let ${\cal D} = \tuple{Q,\mu_{0},{\sf L},\delta}$ be an MDP.
Let $n \ge 0$ and $k \ge 1$.
Suppose that a matrix $B \in \mathbb{R}^{Q \times k}$ is such that for all $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$ we have $\mu_{\cal D} \sim_n \mu_{\cal E}$ if and only if $\mu_{\cal D} B = \mu_{\cal E} B$.
Then for all $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$ we have $\mu_{\cal D} \sim_{n+1} \mu_{\cal E}$ if and only if $\mu_{\cal D} B = \mu_{\cal E} B$ and $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$.
\end{lemma}
\begin{proof}
Let $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$.
For any local strategies $\alpha_{\cal D}, \alpha_{\cal E}$ we have:
\begin{equation} \label{eq-Succ-points-equal}
\begin{aligned}
& \forall\, a \in {\sf L}: {\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a) \\
\Longleftrightarrow\quad & \forall\, a \in {\sf L}: \mu_{\cal D} \Delta_{\alpha_{\cal D}}(a) \sim_n \mu_{\cal E} \Delta_{\alpha_{\cal E}}(a)
&& \text{by~\eqref{eq-Succ-as-prod}} \\
\Longleftrightarrow\quad & \forall\, a \in {\sf L}: \mu_{\cal D} \Delta_{\alpha_{\cal D}}(a) B = \mu_{\cal E} \Delta_{\alpha_{\cal E}}(a) B
&& \text{assumption on $B$} \\
\Longleftrightarrow\quad & p(\mu_{\cal D}, \alpha_{\cal D}) = p(\mu_{\cal E}, \alpha_{\cal E})
&& \text{definition of~$p$}
\end{aligned}
\end{equation}
We prove the two implications from the lemma in turn.
\begin{itemize}
\item[``$\Longrightarrow$'':]
Let $\mu_{\cal D} \sim_{n+1} \mu_{\cal E}$.
Since $\mathord{\sim}_{n+1} \subseteq \mathord{\sim}_{n}$, we have $\mu_{\cal D} \sim_n \mu_{\cal E}$.
By the assumption on~$B$ it follows $\mu_{\cal D} B = \mu_{\cal E} B$.
To show $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$, choose an arbitrary local strategy~$\alpha_{\cal D}$.
Since $\mu_{\cal D} \sim_{n+1} \mu_{\cal E}$, there is~$\alpha_{\cal E}$ such that for all $a \in {\sf L}$ we have
${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$.
By~\eqref{eq-Succ-points-equal} we have $p(\mu_{\cal D}, \alpha_{\cal D}) = p(\mu_{\cal E}, \alpha_{\cal E})$.
Since $\alpha_{\cal D}$ was chosen arbitrarily, we have shown $P_{\mu_{\cal D}} \subseteq P_{\mu_{\cal E}}$.
The reverse inclusion is shown similarly.
\item[``$\Longleftarrow$'':]
Suppose $\mu_{\cal D} B = \mu_{\cal E} B$ and $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$.
By the assumption on~$B$ it follows $\mu_{\cal D} \sim_n \mu_{\cal E}$, hence $\norm{\mu_{\cal D}} = \norm{\mu_{\cal E}}$.
It remains to show:
\begin{itemize}
\item for all local strategies~$\alpha_{\cal D}$ there exists a local strategy~$\alpha_{\cal E}$ such that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$;
\item for all local strategies~$\alpha_{\cal E}$ there exists a local strategy~$\alpha_{\cal D}$ such that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$.
\end{itemize}
Let $\alpha_{\cal D}$ be a local strategy.
Since $P_{\mu_{\cal D}} = P_{\mu_{\cal E}}$, there is a local strategy~$\alpha_{\cal E}$ such that $p(\mu_{\cal D}, \alpha_{\cal D}) = p(\mu_{\cal E}, \alpha_{\cal E})$.
By~\eqref{eq-Succ-points-equal} we obtain that for all $a \in {\sf L}$ we have ${\sf Succ}(\mu_{\cal D}, \alpha_{\cal D}, a) \sim_n {\sf Succ}(\mu_{\cal E}, \alpha_{\cal E}, a)$.
We have shown the first condition.
The second condition is shown similarly.
\end{itemize}
\qed
\end{proof}
The characterization of~$\mathord{\sim}_{n+1}$ provided by Lemma~\ref{lem-sim=polyhedronequal} depends strongly on comparing two polytopes $P_{\mu_{\cal D}}$ and~$P_{\mu_{\cal E}}$.
Using Lemma~\ref{lem-check-extremal-enough}, we can instead formulate a characterization in terms of matrices and extremal local strategies:
\begin{lemma} \label{lem-sim=closed}
Let ${\cal D} = \tuple{Q,\mu_{0},{\sf L},\delta}$ be an MDP.
Let $n \ge 0$ and $k \ge 1$.
Suppose that a matrix $B \in \mathbb{R}^{Q \times k}$ is such that for all $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$ we have $\mu_{\cal D} \sim_n \mu_{\cal E}$ if and only if $\mu_{\cal D} B = \mu_{\cal E} B$.
Then for all $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$ we have $\mu_{\cal D} \sim_{n+1} \mu_{\cal E}$ if and only if $\mu_{\cal D} B = \mu_{\cal E} B$ and
$\mu_{\cal D} \Delta_{\widehat{\alpha}}(a) B = \mu_{\cal E} \Delta_{\widehat{\alpha}}(a) B$
holds for all $a \in {\sf L}$ and for all extremal local strategies~$\widehat{\alpha}$.
\end{lemma}
\begin{proof}
By combining Lemmas \ref{lem-sim=polyhedronequal}~and~\ref{lem-check-extremal-enough}, and the definitions of $p(\mu_{\cal D}, \widehat{\alpha})$ and $p(\mu_{\cal E}, \widehat{\alpha})$.
\qed
\end{proof}
Now we can prove Proposition~\ref{prop-coNP-vector-space} from the main text:
\begin{qproposition}{\ref{prop-coNP-vector-space}}
\stmtpropcoNPvectorspace
\end{qproposition}
\begin{proof}
Define $\mathcal{V}_0 = \{r \vec{1} \mid r \in \mathbb{R}\} \subseteq \mathbb{R}^{Q}$.
For all $n \ge 0$ define $\mathcal{V}_{n+1}$ to be the smallest vector space such that
\begin{itemize}
\item
$\mathcal{V}_{n} \subseteq \mathcal{V}_{n+1}$
\item
$\Delta_{\widehat{\alpha}}(a) \vec{u} \in \mathcal{V}_{n+1}$, for all $\vec{u} \in \mathcal{V}_n$ and all $a \in {\sf L}$ and all local strategies $\widehat{\alpha}$ that are extremal with respect to~$\mathcal{V}_n$.
\end{itemize}
We have $\mathcal{V}_n \subseteq \mathcal{V}$ for all $n \ge 0$.
We claim for all $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$:
\begin{equation} \label{eq-prop-coNP-vector-space-inductive}
\mu_{\cal D} \sim_n \mu_{\cal E} \quad \Longleftrightarrow \quad \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_n$}
\end{equation}
We proceed by induction on~$n$.
For $n=0$, we have:
\begin{align*}
\mu_{\cal D} \sim_0 \mu_{\cal E}
& \Longleftrightarrow \norm{\mu_{\cal D}} = \norm{\mu_{\cal E}} && \text{definition of~$\mathord{\sim}_0$} \\
& \Longleftrightarrow \mu_{\cal D} \vec{1} = \mu_{\cal E} \vec{1} && \text{definition of~$\norm{\cdot}$} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \quad \forall\, \vec{u} \in \mathcal{V}_0 && \text{definition of~$\mathcal{V}_0$}
\end{align*}
For the induction step, let $n \ge 0$.
Define~$B$ as a matrix whose columns span~$\mathcal{V}_n$.
We have:
\begin{equation} \label{eq-prop-coNP-vector-space-indhyp}
\begin{aligned}
\mu_{\cal D} \sim_n \mu_{\cal E}
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \quad \forall\, \vec{u} \in \mathcal{V}_n
&& \text{induction hypothesis} \\
& \Longleftrightarrow \mu_{\cal D} B = \mu_{\cal E} B
&& \text{definition of $B$}
\end{aligned}
\end{equation}
In the following, let $\widehat{\alpha}$ range over all local strategies that are extremal with respect to~$B$:
\begin{align*}
& \mu_{\cal D} \sim_{n+1} \mu_{\cal E} \\
& \Longleftrightarrow \mu_{\cal D} B = \mu_{\cal E} B\ \text{ and } \
\mu_{\cal D} \Delta_{\widehat{\alpha}}(a) B = \mu_{\cal E} \Delta_{\widehat{\alpha}}(a) B
\qquad \forall\, a \in {\sf L} \quad \forall\, \widehat{\alpha} \\
& \hspace{90mm} \text{\eqref{eq-prop-coNP-vector-space-indhyp}, Lemma~\ref{lem-sim=closed}} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u}\ \text{ and } \
\mu_{\cal D} \Delta_{\widehat{\alpha}}(a) \vec{u} = \mu_{\cal E} \Delta_{\widehat{\alpha}}(a) \vec{u}
\qquad \forall\, \vec{u} \in \mathcal{V}_n \quad \forall\, a \in {\sf L} \quad \forall\, \widehat{\alpha} \\
& \hspace{90mm} \text{definition of $B$} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u}
\qquad \forall\, \vec{u} \in \mathcal{V}_{n+1} \\
& \hspace{90mm} \text{definition of $\mathcal{V}_{n+1}$}
\end{align*}
Hence \eqref{eq-prop-coNP-vector-space-inductive} is shown.
Let $s$ be the smallest number with $\mathcal{V}_s = \mathcal{V}_{s+1}$.
We have $s \le |Q| - 1$, since $\mathcal{V}_0, \mathcal{V}_1, \ldots$ are increasing subspaces of~$\mathbb{R}^{Q}$.
By the definition, the subspace~$\mathcal{V}_{n+1}$ depends only on~$\mathcal{V}_n$, so we have $\mathcal{V}_s = \mathcal{V}_t$ for all $t \ge s$.
The vector space~$\mathcal{V}_s$ has the closure properties required by the definition of~$\mathcal{V}$, hence $\mathcal{V}_s \supseteq \mathcal{V}$.
Since $\mathcal{V}_n \subseteq \mathcal{V}$ for all~$n$, it follows that $\mathcal{V}_s = \mathcal{V}$.
Let $\mu_{\cal D}, \mu_{\cal E} \in {\sf subDist}(Q)$.
We have:
\begin{align*}
\mu_{\cal D} \sim_s \mu_{\cal E}
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_s$}
&& \text{by~\eqref{eq-prop-coNP-vector-space-inductive}} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_{s+1}$}
&& \mathcal{V}_s = \mathcal{V}_{s+1} \\
& \Longleftrightarrow \mu_{\cal D} \sim_{s+1} \mu_{\cal E}
&& \text{by~\eqref{eq-prop-coNP-vector-space-inductive}} \\
\end{align*}
By Lemma~\ref{lem-sim-n-properties}.2.\ this implies $\mathord{\sim}_s = \mathord{\sim}$.
We have:
\begin{align*}
\mu_{\cal D} \sim \mu_{\cal E}
& \Longleftrightarrow \mu_{\cal D} \sim_s \mu_{\cal E} && \mathord{\sim} = \mathord{\sim}_s \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_s$}
&& \text{by~\eqref{eq-prop-coNP-vector-space-inductive}} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal E} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}$}
&& \mathcal{V}_s = \mathcal{V}
\end{align*}
\qed
\end{proof}
\subsection{Proof of Theorem~\ref{thm-coNP-result}}
We prove Theorem~\ref{thm-coNP-result} from the main text.
The proof is mainly based on Proposition~\ref{prop-coNP-vector-space}.
\begin{qtheorem}{\ref{thm-coNP-result}}
\stmtthmcoNPresult
\end{qtheorem}
\begin{proof}
Without loss of generality we assume
${\cal D} = \tuple{Q,\mu^{{\cal D}}_{0},{\sf L},\delta}$ and
${\cal E} = \tuple{Q,\mu^{{\cal E}}_{0},{\sf L},\delta}$.
Hence we wish to decide in {\sf NP} whether $\mu^{{\cal D}}_{0} \not\sim \mu^{{\cal E}}_{0}$.
Let $\mathcal{V} \subseteq \mathbb{R}^Q$ be the vector space defined in Proposition~\ref{prop-coNP-vector-space}.
We have:
\begin{align*}
\mu^{{\cal D}}_{0} \not\sim \mu^{{\cal E}}_{0}
& \quad\Longleftrightarrow\quad \exists\, \vec{u} \in \mathcal{V} \text{ with } \mu^{{\cal D}}_{0} \vec{u} \ne \mu^{{\cal E}}_{0} \vec{u}
&& \text{Proposition~\ref{prop-coNP-vector-space}} \\
& \quad\Longleftrightarrow\quad \mathit{Cond}
&& \text{from the definition of~$\mathcal{V}$},
\end{align*}
where $\mathit{Cond}$ is the following condition:
\begin{quote}
There are $k \in \{1, 2, \ldots, |Q|\}$ and $\vec{b}_0 = \vec{1}, \vec{b}_1, \ldots, \vec{b}_{k-1} \in \mathbb{R}^Q$
and $i_0, i_1, \ldots, i_{k-1} \in \{0, 1, \ldots, k-2\}$
and $a_1, a_2, \ldots, a_{k-1} \in {\sf L}$ and pure local strategies $\widehat{\alpha}_1, \widehat{\alpha}_2, \ldots, \widehat{\alpha}_{k-1}$ such that for all $j \in \{1, 2, \ldots, k-1\}$
\begin{itemize}
\item $\widehat{\alpha}_j$ is extremal with respect to the vector space spanned by $\vec{b}_0, \vec{b}_1, \ldots, \vec{b}_{j-1}$ and
\item $i_j < j$ and
\item $\vec{b}_j = \Delta_{\widehat{\alpha}_j}(a_j) \vec{b}_i$,
\end{itemize}
and $\mu^{{\cal D}}_{0} \vec{b}_{k-1} \ne \mu^{{\cal E}}_{0} \vec{b}_{k-1}$.
\end{quote}
It remains to argue that $\mathit{Cond}$ can be checked in~{\sf NP}.
We can nondeterministically guess $k \le |Q|$ and $i_0, i_1, \ldots, i_{k-1} \le k-2$ and $a_1, a_2, \ldots, a_{k-1} \in {\sf L}$ and pure local strategies $\widehat{\alpha}_1, \widehat{\alpha}_2, \ldots, \widehat{\alpha}_{k-1}$.
This determines $\vec{b}_1, \ldots, \vec{b}_{k-1}$.
All conditions in~$\mathit{Cond}$ are straightforward to check in polynomial time, except the condition that for all $j \in \{1, 2, \ldots, k-1\}$ we have that $\widehat{\alpha}_j$ is extremal with respect to the vector space spanned by $\vec{b}_0, \vec{b}_1, \ldots, \vec{b}_{j-1}$.
In the remainder of the proof, we argue that this can also be checked in polynomial time.
Let $j \in \{1, 2, \ldots, k-1\}$.
Let $B \in \mathbb{R}^{Q \times j}$ be the matrix with columns $\vec{b}_0, \vec{b}_1, \ldots, \vec{b}_{j-1}$.
We want to check that $\widehat{\alpha}_j$ is extremal with respect to~$B$.
For all $q \in Q$, compute in polynomial time the set ${\sf eqmoves}(q) \subseteq {\sf moves}(q)$ defined by
\[
{\sf eqmoves}(q) = \{ {\sf m} \in {\sf moves}(q) \mid p(d_q, \alpha_{q,{\sf m}}) = p(d_q, \widehat{\alpha}_j) \},
\]
where $\alpha_{q,{\sf m}}$ is a pure local strategy with $\alpha_{q,{\sf m}}(q)({\sf m}) = 1$ (it does not matter how $\alpha_{q,{\sf m}}(q')$ is defined for $q' \ne q$).
We want to verify that \eqref{eq-remove-v1}~and~\eqref{eq-remove-v2} holds for~$\widehat{\alpha}_j$.
By linearity, it suffices to check \eqref{eq-remove-v1}~and~\eqref{eq-remove-v2} for all \emph{pure} local strategies~$\alpha$.
Hence we need to find~$\vec{v} \in \mathbb{R}^{|{\sf L}| \cdot j}$ so that for all $q \in Q$ and all ${\sf m} \in {\sf moves}(q) \setminus {\sf eqmoves}(q)$ we have $p(d_q, \alpha_{q,{\sf m}}) \vec{v} < p(d_q, \widehat{\alpha}_j) \vec{v}$.
If such a vector~$\vec{v}$ exists, it can be scaled up by a large positive scalar so that we have:
\begin{equation} \label{eq-v-lp}
p(d_q, \alpha_{q,{\sf m}}) \vec{v} + 1 \le p(d_q, \widehat{\alpha}_j) \vec{v} \quad \forall\, q \in Q \quad \forall\, {\sf m} \in {\sf moves}(q) \setminus {\sf eqmoves}(q)
\end{equation}
Hence it suffices to check if there exists a vector~$\vec{v}$ that satisfies~\eqref{eq-v-lp}.
This amounts to a feasibility check of a linear program of polynomial size.
Such a check can be carried out in polynomial time.
\qed
\end{proof}
\subsection{Proof of Proposition~\ref{prop-coNP-vector-space-MC}}
The following Lemma is analogous to Lemma~\ref{lem-sim=closed}.
\begin{lemma} \label{lem-sim=closed-MC}
Let ${\cal D} = \tuple{Q,\mu^{{\cal D}}_{0},{\sf L},\delta}$ be an MDP
and ${\cal C} = \tuple{Q_{\cal C},\mu^{{\cal C}}_{0},{\sf L},\delta}$ be an MC with $Q_{\cal C} \subseteq Q$.
Let $n \ge 0$ and $k \ge 1$.
Suppose that a matrix $B \in \mathbb{R}^{Q \times k}$ is such that for all $\mu_{\cal D} \in {\sf subDist}(Q)$ and all $\mu_{\cal C} \in {\sf subDist}(Q_{\cal C})$ we have $\mu_{\cal D} \sim_n \mu_{\cal C}$ if and only if $\mu_{\cal D} B = \mu_{\cal C} B$.
Then for all $\mu_{\cal D} \in {\sf subDist}(Q)$ and all $\mu_{\cal C} \in {\sf subDist}(Q_{\cal C})$ we have $\mu_{\cal D} \sim_{n+1} \mu_{\cal C}$ if and only if $\mu_{\cal D} B = \mu_{\cal C} B$ and
$\mu_{\cal D} \Delta_{\alpha}(a) B = \mu_{\cal C} \Delta_{\alpha}(a) B$
holds for all $a \in {\sf L}$ and for all local strategies~$\alpha$.
\end{lemma}
\begin{proof}
By combining Lemma~\ref{lem-sim=polyhedronequal} and the definition of $p(\mu, \alpha)$.
\qed
\end{proof}
Now we can prove Proposition~\ref{prop-coNP-vector-space-MC} from the main text:
\begin{qproposition}{\ref{prop-coNP-vector-space-MC}}
\stmtpropcoNPvectorspaceMC
\end{qproposition}
\begin{proof}
The proof is very similar to the one of Proposition~\ref{prop-coNP-vector-space}.
We give it explicitly for completeness.
Define $\mathcal{V}_0 = \{r \vec{1} \mid r \in \mathbb{R}\} \subseteq \mathbb{R}^{Q}$.
For all $n \ge 0$ define $\mathcal{V}_{n+1}$ to be the smallest vector space such that
\begin{itemize}
\item
$\mathcal{V}_{n} \subseteq \mathcal{V}_{n+1}$
\item
$\Delta_{\alpha}(a) \vec{u} \in \mathcal{V}_{n+1}$, for all $\vec{u} \in \mathcal{V}_n$ and all $a \in {\sf L}$ and all local strategies $\alpha$.
\end{itemize}
We have $\mathcal{V}_n \subseteq \mathcal{V}$ for all $n \ge 0$.
We claim for all $\mu_{\cal D} \in {\sf subDist}(Q)$ and all $\mu_{\cal C} \in {\sf subDist}(Q_{\cal C})$:
\begin{equation} \label{eq-prop-coNP-vector-space-inductive-MC}
\mu_{\cal D} \sim_n \mu_{\cal C} \quad \Longleftrightarrow \quad \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_n$}
\end{equation}
We proceed by induction on~$n$.
For $n=0$, we have:
\begin{align*}
\mu_{\cal D} \sim_0 \mu_{\cal C}
& \Longleftrightarrow \norm{\mu_{\cal D}} = \norm{\mu_{\cal C}} && \text{definition of~$\mathord{\sim}_0$} \\
& \Longleftrightarrow \mu_{\cal D} \vec{1} = \mu_{\cal C} \vec{1} && \text{definition of~$\norm{\cdot}$} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \quad \forall\, \vec{u} \in \mathcal{V}_0 && \text{definition of~$\mathcal{V}_0$}
\end{align*}
For the induction step, let $n \ge 0$.
Define~$B$ as a matrix whose columns span~$\mathcal{V}_n$.
We have:
\begin{equation} \label{eq-prop-coNP-vector-space-indhyp-MC}
\begin{aligned}
\mu_{\cal D} \sim_n \mu_{\cal C}
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \quad \forall\, \vec{u} \in \mathcal{V}_n
&& \text{induction hypothesis} \\
& \Longleftrightarrow \mu_{\cal D} B = \mu_{\cal C} B
&& \text{definition of $B$}
\end{aligned}
\end{equation}
In the following, let $\alpha$ range over all local strategies: \begin{align*}
& \mu_{\cal D} \sim_{n+1} \mu_{\cal C} \\
& \Longleftrightarrow \mu_{\cal D} B = \mu_{\cal C} B \text{ and }
\mu_{\cal D} \Delta_{\alpha}(a) B = \mu_{\cal C} \Delta_{\alpha}(a) B
\qquad \forall\, a \in {\sf L} \quad \forall\, \alpha \\
& \hspace{90mm} \text{\eqref{eq-prop-coNP-vector-space-indhyp-MC}, Lemma~\ref{lem-sim=closed-MC}} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \text{ and }
\mu_{\cal D} \Delta_{\alpha}(a) \vec{u} = \mu_{\cal C} \Delta_{\alpha}(a) \vec{u}
\qquad \forall\, \vec{u} \in \mathcal{V}_n \quad \forall\, a \in {\sf L} \quad \forall\, \alpha \\
& \hspace{90mm} \text{definition of $B$} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u}
\qquad \forall\, \vec{u} \in \mathcal{V}_{n+1} \\
& \hspace{90mm} \text{definition of $\mathcal{V}_{n+1}$}
\end{align*}
Hence \eqref{eq-prop-coNP-vector-space-inductive-MC} is shown.
Let $s$ be the smallest number with $\mathcal{V}_s = \mathcal{V}_{s+1}$.
We have $s \le |Q| - 1$, since $\mathcal{V}_0, \mathcal{V}_1, \ldots$ are increasing subspaces of~$\mathbb{R}^{Q}$.
By the definition, the subspace~$\mathcal{V}_{n+1}$ depends only on~$\mathcal{V}_n$, so we have $\mathcal{V}_s = \mathcal{V}_t$ for all $t \ge s$.
The vector space~$\mathcal{V}_s$ has the closure properties required by the definition of~$\mathcal{V}$, hence $\mathcal{V}_s \supseteq \mathcal{V}$.
Since $\mathcal{V}_n \subseteq \mathcal{V}$ for all~$n$, it follows that $\mathcal{V}_s = \mathcal{V}$.
Let $\mu_{\cal D} \in {\sf subDist}(Q)$ and $\mu_{\cal C} \in {\sf subDist}(Q_{\cal C})$.
We have:
\begin{align*}
\mu_{\cal D} \sim_s \mu_{\cal C}
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_s$}
&& \text{by~\eqref{eq-prop-coNP-vector-space-inductive-MC}} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_{s+1}$}
&& \mathcal{V}_s = \mathcal{V}_{s+1} \\
& \Longleftrightarrow \mu_{\cal D} \sim_{s+1} \mu_{\cal C}
&& \text{by~\eqref{eq-prop-coNP-vector-space-inductive-MC}} \\
\end{align*}
By Lemma~\ref{lem-sim-n-properties}.2.\ this implies $\mathord{\sim}_s = \mathord{\sim}$.
We have:
\begin{align*}
\mu_{\cal D} \sim \mu_{\cal C}
& \Longleftrightarrow \mu_{\cal D} \sim_s \mu_{\cal C} && \mathord{\sim} = \mathord{\sim}_s \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}_s$}
&& \text{by~\eqref{eq-prop-coNP-vector-space-inductive-MC}} \\
& \Longleftrightarrow \mu_{\cal D} \vec{u} = \mu_{\cal C} \vec{u} \text{\quad for all $\vec{u} \in \mathcal{V}$}
&& \mathcal{V}_s = \mathcal{V}
\end{align*}
\qed
\end{proof}
\subsection{Proof of Theorem~\ref{thm-MDP-MC}}
We prove Theorem~\ref{thm-MDP-MC} from the main text:
\begin{qtheorem}{\ref{thm-MDP-MC}}
\stmtthmMDPMC
\end{qtheorem}
\begin{proof}
Let ${\cal D} = \tuple{Q,\mu^{{\cal D}}_{0},{\sf L},\delta}$ be an MDP
and ${\cal C} = \tuple{Q_{\cal C},\mu^{{\cal C}}_{0},{\sf L},\delta}$ be an MC with $Q_{\cal C} \subseteq Q$.
Let $\alpha_0$ denote an arbitrary pure local strategy.
For each $q \in Q$ and each ${\sf m} \in {\sf moves}(q)$ denote by~$\alpha_{q,{\sf m}}$ the pure local strategy such that $\alpha_{q,{\sf m}}(q)({\sf m}) = 1$ and $\alpha_{q,{\sf m}}(q') = \alpha_0(q')$ for all $q' \in Q \setminus \{q\}$.
Define
\begin{align*}
\Sigma &= \{ \alpha_0 \} \cup \{ \alpha_{q,{\sf m}} \mid q \in Q, \ {\sf m} \in {\sf moves}(q) \} && \text{and} \\
\mathcal{M} &= \{ \Delta_{\alpha}(a) \in \mathbb{R}^{Q \times Q} \mid \alpha \in \Sigma,\ a \in {\sf L}\}
&& \text{and} \\
\mathcal{M}_\infty &= \left\{ \Delta_\alpha(a) \in \mathbb{R}^{Q \times Q} \;\middle\vert\; \alpha \text{ is a local strategy, $a \in {\sf L}$}\right\}.
\end{align*}
By the definition of~$\mathcal{M}_\infty$ the vector space~$\mathcal{V} \subseteq \mathbb{R}^Q$ from Proposition~\ref{prop-coNP-vector-space-MC} is the smallest column-vector space such that
\begin{itemize}
\item
$\vec{1} = (1 \ 1 \cdots 1)^T \in \mathcal{V}$ and
\item $M \vec{u} \in \mathcal{V}$, for all $\vec{u} \in \mathcal{V}$ and all $M \in \mathcal{M}_\infty$.
\end{itemize}
We have $\mathcal{M} \subseteq \mathcal{M}_\infty$, where $|\mathcal{M}|$ is finite and $|\mathcal{M}_\infty|$ is infinite.
Every matrix in~$\mathcal{M}_\infty$ can be expressed as a linear combination of matrices from~$\mathcal{M}$:
Indeed, let $\alpha$ be a local strategy.
Then for all $a \in {\sf L}$ we have:
\[
\Delta_\alpha(a) = \Delta_{\alpha_0}(a)
+ \sum_{q \in Q}
\left( - \Delta_{\alpha_0}(a) +
\sum_{{\sf m} \in {\sf moves}(q)}
\alpha(q)({\sf m}) \cdot \Delta_{\alpha_{q,{\sf m}(q)}}(a)
\right)
\]
So by linearity, the vector space~$\mathcal{V}$ is the smallest column-vector space such that
\begin{itemize}
\item
$\vec{1} = (1 \ 1 \cdots 1)^T \in \mathcal{V}$ and
\item $M \vec{u} \in \mathcal{V}$, for all $\vec{u} \in \mathcal{V}$ and all $M \in \mathcal{M}$.
\end{itemize}
Define a finite set of labels ${\sf L}' = \{b_{\alpha, a} \mid \alpha \in \Sigma, \ a \in {\sf L} \}$, and for each $\alpha \in \Sigma$ and each $a \in {\sf L}$ a matrix
\[
\Delta'(b_{\alpha, a}) = \frac{1}{|\Sigma|} \Delta_\alpha(a).
\]
The matrix $\sum_{b \in {\sf L}'} \Delta'(b)$ is stochastic.
Define the MCs ${\cal D}' = \tuple{Q,\mu^{{\cal D}}_{0},{\sf L}',\delta'}$
and ${\cal C}' = \tuple{Q,\mu^{{\cal C}}_{0},{\sf L}',\delta'}$
such that $\delta'$ induces the transition matrices $\Delta'(b)$ for all $b \in {\sf L}'$.
The MCs ${\cal D}'$ and~${\cal C}'$ are computable in logarithmic space.
Let $\mathcal{V}' \subseteq \mathbb{R}^{Q}$ be the smallest column-vector space such that
\begin{itemize}
\item
$\vec{1} = (1 \ 1 \cdots 1)^T \in \mathcal{V}$ and
\item $\Delta'(b) \vec{u} \in \mathcal{V}$, for all $\vec{u} \in \mathcal{V}$ and all $b \in {\sf L}'$.
\end{itemize}
Since the matrices in~$\mathcal{M}$ and the matrices~$\Delta'(b)$ are scalar multiples of each other, we have $\mathcal{V} = \mathcal{V}'$.
It holds:
\begin{align*}
{\cal D} \sqsubseteq {\cal C}
& \Longleftrightarrow {\cal D} \sim {\cal C} \text{ in~${\cal D}$}
&& \text{Proposition~\ref{prop-link-trace-refinement-bisim}} \\
& \Longleftrightarrow \mu^{\cal D}_{0} \sim \mu^{{\cal C}}_{0} \text{ in~${\cal D}$}
&& \text{definition} \\
& \Longleftrightarrow \forall\, \vec{u} \in \mathcal{V} : \mu^{{\cal D}}_{0} \vec{u} = \mu^{{\cal C}}_{0} \vec{u}
&& \text{Proposition~\ref{prop-coNP-vector-space-MC}} \\
& \Longleftrightarrow \forall\, \vec{u} \in \mathcal{V}' : \mu^{{\cal D}}_{0} \vec{u} = \mu^{{\cal C}}_{0} \vec{u}
&& \mathcal{V} = \mathcal{V}' \\
& \Longleftrightarrow \mu^{\cal D}_{0} \sim \mu^{{\cal C}}_{0} \text{ in~${\cal D}'$}
&& \text{Proposition~\ref{prop-coNP-vector-space-MC}} \\
& \Longleftrightarrow {\cal D}' \sim {\cal C}' \text{ in~${\cal D}'$}
&& \text{definition} \\
& \Longleftrightarrow {\cal D}' \sqsubseteq {\cal C}'
&& \text{Proposition~\ref{prop-link-trace-refinement-bisim}}
\end{align*}
As mentioned in Section~\ref{sub-prel-trace-refine},
deciding whether ${\cal D}' \sqsubseteq {\cal C}'$ holds amounts to the trace-equivalence problem for MCs.
It follows from Tzeng~\cite{Tzeng96} that the latter is decidable in~{\sf NC}, hence in~{\sf P}.
\qed
\end{proof}
\subsection{Proofs of Theorems~\ref{theo:MCMDPPM} and~\ref{theo:MDPPM}}
\begin{qtheorem}{\ref{theo:MCMDPPM}}
\stmtthmtheoMCMDPPM
\end{qtheorem}
\begin{proof}
Given an instance of the subset-sum problem, a set~$\{s_1, s_2,\cdots,s_n\}$ and~$N\in \mathbb N$, we construct
the MC~${\cal C}$ and an MDP~${\cal D}$ as described in subsection~\ref{subsec:purememoryless}.
We prove that there exists a subset~$S\subseteq \{s_1, s_2,\cdots,s_n\}$ where
$\sum_{s\in S}s=N$ if and only if
${\cal C} \sqsubseteq {\cal D}$ when~${\cal D}$ uses only pure memoryless strategies.
Observe that, in one hand,
$\mathit{Tr}_{{\cal C}}(ab^{+})=\frac{N}{P}$ and $\mathit{Tr}_{{\cal C}}(a c^{+})=1-\frac{N}{P}$ holds for the MC~${\cal C}$.
On the other hand, in the MDP~${\cal D}$, strategies would purely choose between moves~${\sf m}_{i,b}$ and~${\sf m}_{i,c}$ in states~$s_i$.
For a pure strategy~$\alpha$ for~${\cal D}$,
let~$S_{\alpha}$ be the set of states~$s_i$ where~$\alpha(s_i)=m_{i,b}$. Then,
$\mathit{Tr}_{D}(ab^{+})=\sum_{s\in S_{\alpha}} \frac{s}{P}$ and
$\mathit{Tr}_{D}(ac^{+})=1-Tr_{D}(ab^{+})$.
The above arguments provide that
${\cal C} \sqsubseteq {\cal D}$ if and only if there exists a strategy~$\alpha$ for~${\cal D}$
such that
$\sum_{s\in S_{\alpha}} \frac{s}{P}=\frac{N}{P}$.
It implies that
the instance of subset problem is positive, meaning that
there exists a subset~$S\subseteq \{s_1, s_2,\cdots,s_n\}$ such that
$\sum_{s\in S}s=N$, if and only if ${\cal C} \sqsubseteq {\cal D}$ when ${\cal D}$ uses only pure memoryless strategies.
The {\sf NP}-hardness results follows.
\end{proof}
\begin{qtheorem}{\ref{theo:MDPPM}}
\stmtthmtheoMDPPM
\end{qtheorem}
\begin{proof}
Given an instance of the quantified subset-sum problem, two sets~$\{s_1, s_2,\cdots,s_n\}$ and~$\{t_1,t_2,\cdots, t_m\}$
and~$N\in \mathbb N$, we construct the MDPs~${\cal E}_{univ}$ and~${\cal E}_{exist}$ as described in subsection~\ref{subsec:purememoryless}.
We prove that the existential player wins in one round if and only if ${\cal E}_{univ} \sqsubseteq {\cal E}_{exist}$ where the MDPs use only pure memoryless strategies.
We see that the strategic choices in the MDPs are relevant only in states~$s_i$ and~$t_j$.
For a pure strategy~$\alpha$ of~${\cal E}_{univ}$,
let~$S_{\alpha}$ be the set of states~$s_i$ where~$\alpha(s_i)=m_{i,b}$. We therefore have
$\mathit{Tr}_{{\cal E}_{univ}}(ab^{+})=\frac{1}{2} y_1+\frac{1}{2}\sum_{s\in S_{\alpha}} \frac{xs}{P}$.
For a pure strategy~$\beta$ of~${\cal E}_{exist}$,
let~$T_{\beta}$ be the set of states~$t_j$ where~$\beta(t_j)=m_{i,c}$. Then,
$\mathit{Tr}_{{\cal E}_{exist}}(ab^{+})=\frac{1}{2} y_2+ \frac{1}{2} R(1-\sum_{t\in T_{\beta}} \frac{xt}{R})$.
Since $y_1+x N=y_2+x R$, to achieve $\mathit{Tr}_{{\cal E}_{univ}}= \mathit{Tr}_{{\cal E}_{exist}}$ the equality~$\sum_{s\in S_{\alpha}}s=N-\sum_{t\in T_{\beta}}t$ must be guaranteed.
It shows that
the existential player wins in one round, meaning that
for all subsets~$S\subseteq \{s_1, s_2,\cdots,s_n\}$
there exists a subset~$T\subseteq \{t_1, t_2,\cdots,t_n\}$
such that
$\sum_{s\in S}s+\sum_{t\in T}t=N$, if and only if for all strategies~$\alpha$ of~${\cal D}$
there exists some strategy~$\beta$ for~${\cal E}$ such that~$\sum_{s\in S_{\alpha}}s=N-\sum_{t\in T_{\beta}}t$ implying $\mathit{Tr}_{{\cal E}_{univ}}= \mathit{Tr}_{{\cal E}_{exist}}$.
Note that~$\alpha$ and~$\beta$ are chosen pure and memoryless.
The $\Pi^p_2$-hardness result follows.
\end{proof}
\subsection{Proof of Theorem~\ref{thm-reduction-to-ExThR}}
In this section we prove Theorem~\ref{thm-reduction-to-ExThR} from the main text:
\begin{qtheorem}{\ref{thm-reduction-to-ExThR}}
\stmtthmreductiontoExThR
\end{qtheorem}
\medskip
Given an MC~${\cal C} = \tuple{Q,\mu_{0},{\sf L},\delta}$,
to each label~$a \in {\sf L}$ we associate a \emph{transition matrix} $\Delta(a) \in [0,1]^{Q \times Q}$ with
$\Delta(a)[q,q'] = \delta(q)(a,q')$.
We view subdistributions~$\mu_{0}$ over states as row vectors $\mu_{0} \in [0,1]^Q$.
We denote column vectors in boldface; in particular,
$\vec{1} \in \{1\}^{Q}$ and~$\vec{0} \in \{0\}^{Q}$ are column vectors all whose
entries are $1$ and~$0$, respectively.
We build on \cite[Proposition~10]{14KW-ICALP} which reads---translated to our framework---as follows:
\begin{proposition} \label{prop-Bjoern}
Let ${\cal C}_1 = \tuple{Q_1,\mu_{0},{\sf L},\delta}$ and ${\cal C}_2 = \tuple{Q_2,\mu'_{0},{\sf L},\delta'}$
be MCs with $Q$ as the disjoint union of $Q_1, Q_2$.
Then $\mathit{Tr}_{{\cal C}_1} = \mathit{Tr}_{{\cal C}_2}$ if and only if there exists a matrix $F \in \mathbb{R}^{Q \times Q}$
such that
\begin{itemize}
\item the first row of~$F$ equals $(\mu_0, -\mu'_0)$,
\item $F \vec{1} = \vec{0}$,
\end{itemize}
and moreover, for all labels~$a \in {\sf L}$ there exist matrices $M(a) \in \mathbb{R}^{Q \times Q}$ such that
\[
F \begin{pmatrix} \Delta(a) \ & \ 0 \\ 0 \ & \ \Delta'(a) \end{pmatrix}
= M(a) F
\]
where $\Delta(a), \Delta(a)'$ are the transition matrices of~$C_1$ and~${\cal C}_2$ for the label~$a$.
\end{proposition}
With this at hand we prove Theorem~\ref{thm-reduction-to-ExThR}:
\begin{proof}[of Theorem~\ref{thm-reduction-to-ExThR}]
Let ${\cal C} = \tuple{Q_1,\mu_{0},{\sf L},\delta}$ be an MC and ${\cal D} = \tuple{Q_2,\mu'_{0},{\sf L},\delta'}$ be an MDP
with $Q$ as the disjoint union of $Q_1, Q_2$.
A memoryless strategy~$\alpha$ of~${\cal D}$ can be characterized by numbers $x_{q,{\sf m}} \in [0,1]$
where $q \in Q_2$ and ${\sf m} \in {\sf moves}(q)$, such that $x_{q,{\sf m}} = \alpha(q)({\sf m})$.
We have
$\sum_{{\sf m} \in {\sf moves}(q)} x_{q,{\sf m}} = 1$ for all states~$q$.
\newcommand{\barx}{\overline{x}}%
We write $\barx$ for the collection $(x_{q,{\sf m}})_{q \in Q_2, \ {\sf m} \in {\sf moves}(q)}$, and $\alpha(\barx)$ for the memoryless strategy characterized by~$\barx$.
We have:
\begin{align*}
& {\cal C} \sqsubseteq {\cal D} \text{ for~${\cal D}$ restricted to memoryless strategies} \\
& \Longleftrightarrow \exists\, \text{memoryless strategy }\alpha: \mathit{Tr}_{{\cal C}} = \mathit{Tr}_{{\cal D},\alpha}
&& \text{definition} \\
& \Longleftrightarrow \mathit{Cond}
&& \text{Proposition~\ref{prop-Bjoern}},
\end{align*}
where $\mathit{Cond}$ is the following condition:
\begin{quote}
There exist
\begin{itemize}
\item $x_{q,{\sf m}} \in [0,1]$ for all $q \in Q_2$ and all ${\sf m} \in {\sf moves}(q)$
\item matrices $M(a) \in \mathbb{R}^{Q \times Q}$ for all labels~$a \in {\sf L}$,
\item a matrix $F \in \mathbb{R}^{Q \times Q}$
\end{itemize}
such that
\begin{itemize}
\item $\sum_{{\sf m} \in {\sf moves}(q)} x_{q,{\sf m}} = 1$ for all $q \in Q_2$,
\item
the first row of~$F$ equals $(\mu_0, -\mu'_0)$,
\item $F \vec{1} = \vec{0}$,
\item for all labels~$a \in {\sf L}$,
\[
F \begin{pmatrix} \Delta(a) \ & \ 0 \\ 0 \ & \ \Delta'(a) \end{pmatrix}
= M(a) F
\]
where $\Delta(a),\Delta'(a)$ are the transition matrices of~$C$ and
the finite MC~${\cal D}(\alpha(\barx))$ induced by~${\cal D}$ under the strategy~$\alpha(\barx)$.
\end{itemize}
\end{quote}
This condition~$\mathit{Cond}$ is a closed formula in the existential theory of the reals.
\qed
\end{proof}
\subsection{Proof of Theorem~\ref{thm-hardness-for-NMF}}
\begin{qtheorem}{\ref{thm-hardness-for-NMF}}
\stmtthmhardnessforNMF
\end{qtheorem}
\begin{proof}
Given a nonnegative matrix $M \in \mathbb{R}^{n \times m}$ and rank~$r$,
we construct the MC~${\cal C}$ and the MDP~${\cal D}$ as described in subsection~\ref{subsec:memoryless}.
We prove that there is a nonnegative factorization for~$M=A\cdot W$ such that
$A \in \mathbb{R}^{n \times r}$ and $W \in \mathbb{R}^{r \times m}$
if and only if ${\cal C} \sqsubseteq {\cal D}$
where~${\cal D}$ is restricted to use only memoryless strategies.
We establish the correctness of the reduction as follows. First, assume that there is a nonnegative factorization for~$M$.
Thus, there are stochastic matrices $A \in \mathbb{R}^{n \times r}$ and $W \in \mathbb{R}^{r \times m}$ such that
$M=A \cdot W$.
To prove that ${\cal C} \sqsubseteq {\cal D}$, we construct a memoryless strategy~$\alpha$ such that~$\mathit{Tr}_{{\cal C}}=\mathit{Tr}_{{\cal D},\alpha}$.
For all states~$q$ of~${\cal D}$, strategy~$\alpha$ is defined by
\[
\alpha(q) =
\left\{
\begin{array}{ll}
d\in {\sf Dist}({\sf moves}(p_i)) & \mbox{if } q=p_i \text{ and } 1\leq i\leq n,\\
\text{where } d({\sf m}_{i,k})=A[i,k] \text{ for all } 1 \leq k\leq r \\
&\\
d\in {\sf Dist}({\sf moves}(\ell_k)) & \mbox{if } q=p_i \text{ and } 1\leq k\leq r,\\
\text{where } d({\sf m}'_{k,j})=W[k,j] \text{ for all } 1 \leq j\leq m \\
&\\
\text{ the Dirac distribution on~$(c,p_{{\mathit{fi}}})$ } & \mbox{if } q=p_{{\mathit{fi}}}.\\
\end{array}
\right.
\]
The trace-probability function for~${\cal D}$ and $\alpha$ is such that for all $1\leq i\leq n$ and all $1\leq j\leq m$,
we have $\mathit{Tr}_{{\cal D},\alpha}(a_i)=\frac{1}{n}$,
and
\begin{align*}
\mathit{Tr}_{{\cal D},\alpha}(a_i\cdot b_j \cdot c^{*})& =\frac{1}{n} \sum\limits_{k=1}^{r}\alpha(p_i)({\sf m}_{i,k})\cdot \alpha(\ell_k)({\sf m}'_{k,j})\\
& =\frac{1}{n} \sum\limits_{k=1}^{r} A[i,k]\cdot W[k,j] =\frac{1}{n}M[i,j].
\end{align*}
This gives $\mathit{Tr}_{{\cal D},\alpha}=\mathit{Tr}_{{\cal C}}$, and thus ${\cal C} \sqsubseteq {\cal D}$
where~${\cal D}$ uses a memoryless strategy.
Second, assume that there exists a memoryless strategy~$\beta$ for the MDP~${\cal D}$ such that ~$\mathit{Tr}_{{\cal C}}=\mathit{Tr}_{{\cal D},\beta}$.
We present a factorization $M=A \cdot W$ where $A \in \mathbb{R}^{n \times r}$ and $W \in \mathbb{R}^{r \times m}$.
For all $1\leq i \leq n$, $1 \leq k\leq r$ and $1\leq j\leq m$, let
\[A[i,k]=\beta(p_i)({\sf m}_{i,k}) \quad \quad \text{ and } \quad \quad W[k,j]=\beta(\ell_k)({\sf m}'_{k,j}).\]
Since ${\cal D}$ under the strategy~$\beta$ refines~${\cal C}$, then
for all $1\leq i\leq n$ and all $1\leq j\leq m$
\[\mathit{Tr}_{{\cal D},\beta}(a_i\cdot b_j \cdot c^{*})=\mathit{Tr}_{{\cal C}}(a_i\cdot b_j \cdot c^{*})=\frac{1}{n}M[i,j].\]
Since the probability of generating~$a_i\cdot b_j \cdot c^{*}$ is
$\frac{1}{n} \sum\limits_{k=1}^{r}\beta(p_i)({\sf m}_{i,k})\cdot \beta(\ell_k)({\sf m}'_{k,j})$
then we have
$\sum\limits_{k=1}^{r} A[i,k]\cdot W[k,j] =M[i,j]$. This completes the proof. \qed
\end{proof}
\section{Introduction} \label{sec-intro}
\input{intro.tex}
\section{Preliminaries} \label{sec-preliminaries}
\input{preliminaries.tex}
\section{Undecidability Results} \label{sec-undecidability-results}
\input{UndecidabilityResults.tex}
\section{Decidability for Memoryless Strategies} \label{sec-memoryless-strategies}
\input{MemorylessStrategies.tex}
\section{Bisimulation} \label{sec-BisimulationRefinements}
\input{BisimulationRefinements.tex}
\bibliographystyle{plain}
\subsection{Pure Memoryless Strategies} \label{subsec:purememoryless}
In this subsection, we show that the two problems ${\sf MC\sqsubseteq MDP_{pm}}$ and~${\sf MDP_{pm}\sqsubseteq MDP_{pm}}$
are \mbox{{\sf NP}-complete} and $\Pi^p_2$-complete.
Membership of ${\sf MC\sqsubseteq MDP_{pm}}$ in {\sf NP} and ${\sf MDP_{pm}\sqsubseteq MDP_{pm}}$ in $\Pi^p_2$ are obtained as follows.
Given an MC~${\cal C}$ and an MDP~${\cal D}$, the polynomial witness of~${\cal C}\sqsubseteq {\cal D}$ is a pure memoryless strategy~$\alpha$ for~${\cal D}$.
Once~$\alpha$ is fixed, then~${\cal C} \sqsubseteq {\cal D}(\alpha)$ can be decided in~{\sf P}.
Given another MDP~${\cal E}$, for all pure memoryless strategies~$\beta$ of~${\cal E}$
whether there exists a polynomial witness~$\alpha$ for~${\cal E} \sqsubseteq {\cal D}$ such that~${\cal E}(\beta) \sqsubseteq {\cal D}(\alpha)$
can be decided in~{\sf P}.
The hardness results are by reductions from the \emph{subset-sum problem}
and a variant of the \emph{quantified subset-sum} problem.
Given a set~$\{s_1, s_2,\cdots,s_n\}$ of natural numbers and~$N\in \mathbb N$,
the subset-sum problem asks whether there exists a subset~$S\subseteq \{s_1, \cdots,s_n\}$ such that
$\sum_{s\in S}s=N$. The subset-sum problem is known to be {\sf NP}-complete~\cite{Cormen01}.
The quantified version of subset sum is a game between a \emph{universal player}
and an \emph{existential player}.
Given~$k,N\in \mathbb N$, the game is played turn-based for~$k$ rounds.
For each round~$1\leq i \leq k$, two sets
$\{s_1, s_2,\cdots,s_n\}$ and $\{t_1, t_2,\cdots,t_m\}$ of natural numbers are given.
In each round~$i$, the universal player first chooses~$S_i\subseteq \{s_1, \cdots,s_n\}$
and then the existential player chooses~$T_i\subseteq \{t_1, \cdots,t_m\}$.
The existential player wins if and only if
\[\sum_{s\in S_1}s+\sum_{t\in T_1}t+ \cdots+\sum_{s\in S_k}s+\sum_{t\in T_k}t =N.\]
The quantified subset sum is known to be {\sf PSPACE}-complete~\cite{FearnleyJ15}.
The proof therein implies that the variant of the problem with a fixed number~$k$ of rounds is~$\Pi^p_{2k}$-complete.
To establish the {\sf NP}-hardness of ${\sf MC\sqsubseteq MDP_{pm}}$,
consider an instance of subset sum, i.e., a set~$\{s_1, \cdots,s_n\}$ and~$N\in \mathbb N$.
We construct
an MC~${\cal C}$ and an MDP~${\cal D}$ such that
there exists~$S\subseteq \{s_1, \cdots,s_n\}$ with
$\sum_{s\in S}s=N$ if and only if~
${\cal C} \sqsubseteq {\cal D}$ when~${\cal D}$ uses only pure memoryless strategies.
\begin{figure}[t]
\begin{minipage}[b]{0.45\linewidth}
\centering
\input{reductionfromSubssetMC.tex}
\caption{The MC~${\cal C}$ in the reduction for {\sf NP}-hardness of~${\sf MC\sqsubseteq MDP_m}$.}\label{fig:reductionfromSubssetMC}
\end{minipage}
\hspace{0.5cm}
\begin{minipage}[b]{0.45\linewidth}
\centering
\input{reductionfromSubssetMDP.tex}
\caption{The gadget~$G_u$ for the set~$\{u_1,\cdots,u_k\}$.}\label{fig:reductionfromSubssetMDP}
\end{minipage}
\end{figure}
The MC~${\cal C}$ is shown in Figure~\ref{fig:reductionfromSubssetMC}.
it generates traces in~$ab^+$ with probability~$\frac{N}{P}$ and
traces in~$ac^+$ with probability~$1-\frac{N}{P}$
where $P=s_1+\cdots+s_n$.
For a set~$\{u_1,\cdots, u_k\}$, we define a gadget~$G_u$ that is an MDP
with $k+2$ states: $u_1, \cdots,u_k$ and $u_b,u_c$; see Figure~\ref{fig:reductionfromSubssetMDP}.
For all states~$u_i$, two moves~${\sf m}_{i,b}$ and~${\sf m}_{i,c}$ are available,
the Dirac distributions on~$(a,u_b)$ and~$(a,u_c)$.
The states~$u_{b},u_c$ emit only the single labels~$b$ and~$c$.
The MDP~${\cal D}$ is exactly the gadget~$G_s$ for $\{s_1,\cdots, s_n\}$ equipped with
the initial distribution~$\mu_0$ where
$\mu_0(s_i)=\frac{s_i}{P}$ for all~$1\leq i \leq n$.
Choosing~$b$ in~$s_i$ simulates the membership of~$s_i$ in~$S$ by adding~$\frac{s_i}{P}$
to the probability of generating~$ab^{+}$.
\newcommand{\stmtthmtheoMCMDPPM}{
The problem~${\sf MC\sqsubseteq MDP_{pm}}$ is \mbox{{\sf NP}-complete}.
}
\begin{theorem} \label{theo:MCMDPPM}
\stmtthmtheoMCMDPPM
\end{theorem}
To establish the $\Pi^p_2$-hardness of ${\sf MDP_{pm}\sqsubseteq MDP_{pm}}$,
consider an instance of quantified subset sum, i.e., $N\in \mathbb N$
and two sets~$\{s_1,\cdots,s_n\}$ and $\{t_1,\cdots,t_m\}$.
We construct MDPs~${\cal E}_{univ},{\cal E}_{exist}$ such that
the existential player wins in one round if and only if ${\cal E}_{univ} \sqsubseteq {\cal E}_{exist}$ restricted to use pure memoryless strategies.
Let $P=s_1+\cdots+s_n$ and $R=t_1+\cdots+t_m$.
Pick a small real number $0<x<1$ so that $0 < x P, x R, x N < 1$.
Pick real numbers $0\leq y_1,y_2 \leq 1$ such that $y_1+x N=y_2+x R$.
The MDPs~${\cal E}_{univ}$ and ${\cal E}_{exist}$ have symmetric constructions.
To simulate the choice of the universal player,
the MDP~${\cal E}_{univ}$ is the gadget~$G_s$ for the set~$\{s_1,\cdots,s_n\}$ where two new states~$s_r,s_y$ are added.
The transitions in~$s_r$ and $s_y$ are the Dirac distributions on~$(a,s_b)$ and~$(a,s_c)$, respectively.
The initial distribution~$\mu_0$ for~${\cal E}_{univ}$ is such that
$\mu_0(s_y)=\frac{1}{2}y_1$ and $\mu_0(s_r)=1-\frac{1}{2}(xP+y_1)$, and
$\mu_0(s_i)=\frac{1}{2}xs_i$ for all~$1\leq i \leq n$.
Similarly, to simulate the counter-attack of the existential player,
the MDP~${\cal E}_{exist}$ is the gadget~$G_t$ for~~$\{t_1,\cdots,t_m\}$ with two new states~$t_r,t_y$.
The transitions in~$t_r$ and $t_y$ are the Dirac distributions on~$(a,t_b)$ and~$(a,t_c)$, respectively.
The initial distribution~$\mu'_0$ is
$\mu'_0(p_y)=\frac{1}{2}y_2$ and $\mu'_0(p_r)=1-\frac{1}{2}(xT+y_2)$,
and $\mu'_0(t_j)=\frac{1}{2}xt_j$
for all~$1\leq j \leq m$.
Choosing~$b$ in a set of states~$s_i$ by the universal player must be defended by choosing~$c$ in a right set of states~$t_j$
by existential player such that the probabilities of emitting~$ab^{+}$ in MDPs are equal.
\newcommand{\stmtthmtheoMDPPM}{
The problem~${\sf MDP_{pm}\sqsubseteq MDP_{pm}}$
is $\Pi^p_2$-complete.
}
\begin{theorem} \label{theo:MDPPM}
\stmtthmtheoMDPPM
\end{theorem}
\subsection{Memoryless Strategies}\label{subsec:memoryless}
In this subsection, we provide upper and lower complexity bounds for the problem~${\sf MC\sqsubseteq MDP_{m}}$:
a reduction to the existential theory of the reals
and a reduction from nonnegative factorization of matrices.
A formula of the \emph{existential theory of the reals} is of the form
$\exists x_1 \ldots \exists x_m~R(x_1, \ldots, x_n)$, where $R(x_1, \ldots, x_n)$ is a boolean combination of comparisons of the form
$p(x_1, \ldots, x_n) \sim 0$, where $p(x_1, \ldots, x_n)$ is a multivariate polynomial and
$\mathord{\sim} \in \{ \mathord{<}, \mathord{>}, \mathord{\le}, \mathord{\ge}, \mathord{=}, \mathord{\ne} \}$.
The validity of closed formulas (i.e., when $m=n$) is decidable in {\sf PSPACE}~\cite{Can88,Renegar92},
and is not known to be {\sf PSPACE}-hard.
\newcommand{\stmtthmreductiontoExThR}{
The problem~${\sf MC\sqsubseteq MDP_{m}}$ is polynomial-time reducible to the existential theory of the reals,
hence in {\sf PSPACE}.
}
\begin{theorem} \label{thm-reduction-to-ExThR}
\stmtthmreductiontoExThR
\end{theorem}
\begin{figure}[t]
\centering
\input{reductionfromNMFMC.tex}
\caption{The MC~${\cal C}$ of the reduction from NMF to~${\sf MC\sqsubseteq MDP_m}$.}\label{fig:reductionfromNMFMC}
\end{figure}
Given a nonnegative matrix $M \in \mathbb{R}^{n \times m}$, a \emph{nonnegative factorization} of $M$
is any representation of the form $M = A \cdot W$ where $A \in \mathbb{R}^{n \times r}$ and $W \in \mathbb{R}^{r \times m}$
are nonnegative matrices (see~\cite{CohenR93,Vavasis09,AroraGKM12} for more details).
The \emph{NMF problem} asks, given a nonnegative matrix $M \in \mathbb{R}^{n \times m}$ and a number $r \in \mathbb N$,
whether there exists a factorization $M = A \cdot W$ with nonnegative matrices $A \in \mathbb{R}^{n \times r}$ and $W \in \mathbb{R}^{r \times m}$.
The NMF problem is known to be {\sf NP}-hard, but membership in~{\sf NP} is open~\cite{Vavasis09}.
Below, we present a reduction from the NMF problem to~${\sf MC\sqsubseteq MDP_m}$.
To establish the reduction,
consider an instance of the NMF problem, i.e., a nonnegative matrix $M \in \mathbb{R}^{n \times m}$ and a number~$r \in \mathbb N$.
We construct an MC~${\cal C}$ and an MDP~${\cal D}$ such that the NMF instance is a yes-instance
if and only if ${\cal C} \sqsubseteq {\cal D}$
where~${\cal D}$ is restricted to use only memoryless strategies.
We assume, without loss of generality, that~$M$ is a stochastic matrix, that is
$\sum\limits_{j=1}^m M[i,j]=1$ for all rows~$1\leq i\leq n$. We know, by~\cite[Section~5]{AroraGKM12}, that
there exists a nonnegative factorization of $M$ with rank~$r$ if and only if
there exist two stochastic matrices $A \in \mathbb{R}^{n \times r}$ and $W \in \mathbb{R}^{r \times m}$ such that
$M=A \cdot W$.
The transition probabilities in the MC~${\cal C}$ encode the entries of matrix~$M$.
The initial distribution of the MC is the Dirac distribution on~$q_{{\mathit{in}}}$; see \figurename~\ref{fig:reductionfromNMFMC}.
There are $n+m+1$ labels~$a_1,\cdots,a_n,b_1,\cdots,b_m,c$.
The transition in~$q_{{\mathit{in}}}$ is the uniform distribution over~$\{(a_i,q_i) \mid 1\leq i \leq n\}$.
In each state~$q_i$, each label~$b_j$ is emitted with probability~$M[i,j]$, and a transition to~$q_{{\mathit{fi}}}$
is taken.
In state~$q_{{\mathit{fi}}}$ only~$c$ is emitted.
Observe that for all $1\leq i\leq n$ and $1\leq j\leq m$ we have
$\mathit{Tr}_{{\cal C}}(a_i)=\frac{1}{n}$ and $\mathit{Tr}_{{\cal C}}(a_i\cdot b_j \cdot c^{*})=\frac{1}{n}M[i,j]$.
The initial distribution of the MDP~${\cal D}$ is the uniform distribution over~$\{p_1,\cdots,p_n\}$;
see \figurename~\ref{fig:reductionfromNMFMDP}.
In each~$p_i$ (where~$1\leq i\leq n$), there are $r$ moves~${\sf m}_{i,1}, {\sf m}_{i,2},\cdots,{\sf m}_{i,r}$
where~${\sf m}_{i,k}(a_i,\ell_k)=1$ and $1\leq k \leq r$.
In each~$\ell_k$, there are $m$ moves~${\sf m}'_{k,1}, {\sf m}'_{k,2},\cdots,{\sf m}'_{k,m}$ where
${\sf m}'_{k,j}(b_j,p_{{\mathit{fi}}})=1$ where $1\leq j\leq m$.
In state~$p_{{\mathit{fi}}}$, only~$c$ is emitted.
The probabilities of choosing the move~$m_{i,k}$ in~$p_i$ and
choosing~$m'_{k,j}$ in~$\ell_k$ simulate the entries of~$A[i,k]$ and~$W[k,j]$.
\begin{figure}[t]
\centering
\input{reductionfromNMFMDP.tex}
\caption{The MDP~${\cal D}$ of the reduction from NMF to~${\sf MC\sqsubseteq MDP_m}$.}\label{fig:reductionfromNMFMDP}
\end{figure}
\newcommand{\stmtthmhardnessforNMF}{
The NMF problem is polynomial-time reducible to~${\sf MC\sqsubseteq MDP_m}$,
hence ${\sf MC\sqsubseteq MDP_m}$ is {\sf NP}-hard.
}
\begin{theorem} \label{thm-hardness-for-NMF}
\stmtthmhardnessforNMF
\end{theorem}
Recall that it is open whether the NMF problem is in~{\sf NP} and whether the existential theory of the reals is {\sf PSPACE}-hard.
So Theorems \ref{thm-reduction-to-ExThR}~and~\ref{thm-hardness-for-NMF} show that proving {\sf NP}-completeness or {\sf PSPACE}-completeness of ${\sf MC\sqsubseteq MDP_m}$ requires a breakthrough in those areas.
\subsection{Labelled Markov Decision Processes}
A \emph{labelled Markov decision process} (MDP) ${\cal D} = \tuple{Q,\mu_0,{\sf L},\delta}$
consists of a finite set~$Q$ of states, an initial distribution~$\mu_0 \in {\sf Dist}(Q)$,
a finite set~${\sf L}$ of labels,
and a finite probabilistic transition relation~$\delta \subseteq Q \times {\sf Dist}({\sf L} \times Q)$ where
states are in relation with distributions over pairs of labels and successors.
We assume that for each state $q\in Q$ there exists some distribution
$d\in {\sf Dist}({\sf L} \times Q)$ where~$\tuple{q,d} \in \delta$.
The set of \emph{moves} in~$q$ is~${\sf moves}(q)=\{d\in {\sf Dist}({\sf L} \times Q) \mid \tuple{q,d} \in \delta \}$;
denote by ${\sf moves}=\bigcup_{q\in Q} {\sf moves}(q)$ the set of all moves.
For the complexity results, we assume that probabilities of transitions are rational and
given as fractions of integers represented in binary.
We describe the behaviour of an MDP as a trace generator running in steps.
The MDP starts in the first step in state $q$ with probability~$\mu_{0}(q)$.
In each step, if the MDP is in state $q$
the controller chooses~${\sf m}\in{\sf moves}(q)$;
then, with probability~${\sf m}(a,q')$, the label~$a$ is generated and the next step starts in the
successor state~$q'$.
Given $q\in Q$, denote by ${\sf post}(q)$ the set
$\{(a,q') \in {\sf Supp}({\sf m}) \mid {\sf m} \in {\sf moves}(q)\}$.
A \emph{path} in ${\cal D}$ is a sequence $\rho=q_{0} a_{1} q_{1} \dots a_n q_{n}$
such that $(a_{i+1},q_{i+1})\in {\sf post}(q_{i})$ for all $0\leq i<n$.
The path $\rho$ has the last state ${\sf last}(\rho)=q_{n}$; and
the generated trace after~$\rho$ is~$a_{1} a_{2} \cdots a_{n}$, denoted by~${\sf trace}(\rho)$.
We denote by ${\sf Paths}({\cal D})$ the set of all paths in~${\cal D}$, and by
${\sf Paths}(w)=\{\rho\in {\sf Paths}({\cal D})\mid {\sf trace}(\rho)=w\}$ the set of all path generating~$w$.
\paragraph{Strategies.}
A \textit{randomized strategy} (or simply a strategy) for an MDP ${\cal D}$ is a function
$\alpha: {\sf Paths}({\cal D}) \to {\sf Dist}({\sf moves})$ that, given a finite path $\rho$,
returns a probability distribution $\alpha(\rho) \in {\sf Dist}({\sf moves}({\sf last}(\rho)))$
over the set of moves in~${\sf last}(\rho)$,
used to generate a label~$a$ and select a successor state $q'$ with probability
$\sum_{{\sf m} \in {\sf moves}(q)} \alpha(\rho)({\sf m}) \cdot {\sf m}(a,q')$ where $q={\sf last}(\rho)$.
A strategy~$\alpha$ is \emph{pure} if for all $\rho \in {\sf Paths}({\cal D})$,
we have $\alpha(\rho)({\sf m})=1$ for some~${\sf m} \in {\sf moves}$;
we thus view pure strategies as functions~$\alpha: {\sf Paths}({\cal D})\to {\sf moves}$.
A strategy~$\alpha$ is \emph{memoryless} if $\alpha(\rho) = \alpha(\rho')$
for all paths~$\rho, \rho'$ with ${\sf last}(\rho) = {\sf last}(\rho')$;
we thus view memoryless strategies as functions $\alpha: Q \to {\sf Dist}({\sf moves})$.
A strategy~$\alpha$ is \emph{trace-based} if $\alpha(\rho) = \alpha(\rho')$
for all~$\rho, \rho'$ where ${\sf trace}(\rho)={\sf trace}(\rho')$ and ${\sf last}(\rho) = {\sf last}(\rho')$;
we view trace-based strategies as functions~$\alpha:{\sf L}^{*} \times Q \to {\sf Dist}({\sf moves})$.
\paragraph{Trace-probability function.}
For an MDP~${\cal D}$ and a strategy~$\alpha$,
the probability of a single path is
inductively defined by ${\sf Pr}_{{\cal D},\alpha}(q) = \mu_0(q)$ and
$$
{\sf Pr}_{{\cal D},\alpha}(\rho a q) = {\sf Pr}_{{\cal D},\alpha}(\rho) \cdot \sum_{{\sf m} \in {\sf moves}({\sf last}(\rho))} \alpha(\rho)({\sf m}) \cdot {\sf m}(a,q).
$$
The \emph{trace-probability} function $\mathit{Tr}_{{\cal D},\alpha} : {\sf L}^{*} \to [0,1]$ is, given
a trace~$w$, defined by
$$\mathit{Tr}_{{\cal D},\alpha}( w ) =\sum_{\rho\in {\sf Paths}(w)}{\sf Pr}_{{\cal D},\alpha}(\rho).$$
We may drop the subscript ${\cal D}$ or~$\alpha$ from~$\mathit{Tr}_{{\cal D},\alpha}$ if it is understood.
We denote by $\mathit{subDis}_{{\cal D},\alpha}(w) \in {\sf subDist}(Q)$, the subdistribution after generating a traces~$w$, that is
$$
\mathit{subDis}_{{\cal D},\alpha}(w)(q)=\sum_{\rho\in {\sf Paths}(w):{\sf last}(\rho)=q}{\sf Pr}_{{\cal D},\alpha}(\rho).
$$
We have:
\begin{equation} \label{eq-subdis=trace-probability}
\mathit{Tr}_{{\cal D},\alpha}( w ) =\norm{\mathit{subDis}_{{\cal D},\alpha}(w)}
\end{equation}
\medskip
A version of the following lemma was proved in~\cite[Lemma~1]{DoyenHR08}:
\newcommand{\lemtracebasedenough}{
Let ${\cal D}$ be an MDP and $\alpha$ be a strategy.
There exists a trace-based strategy~$\beta$ such that
$\mathit{Tr}_{\alpha} = \mathit{Tr}_{\beta}$.
}
\begin{lemma} \label{lem-trace-based-enough}
\lemtracebasedenough
\end{lemma}
Here, by $\mathit{Tr}_{\alpha} = \mathit{Tr}_{\beta}$ we mean $\mathit{Tr}_{\alpha}(w) = \mathit{Tr}_{\beta}(w)$ for all traces $w \in {\sf L}^*$.
\paragraph{Labeled Markov Chains.}
A finite-state labeled Markov chain (MC for short) is an MDP where
only a single move is available in each state, and thus controller's choice plays no role.
An MC ${\cal C} = \tuple{Q,\mu_0,{\sf L},\delta}$ is an MDP where~$\delta: Q \to {\sf Dist}({\sf L} \times Q)$
is a probabilistic transition function.
Since MCs are MDPs, we analogously define paths, and the probability of a single path
inductively as follows:
${\sf Pr}_{{\cal C}}(q) = \mu_0(q)$ and ${\sf Pr}_{{\cal C}}(\rho a q) = {\sf Pr}_{{\cal C}}(\rho) \cdot \delta(q')(a,q)$
where $q'={\sf last}(\rho)$.
The notations~$\mathit{subDis}_{{\cal C}}(w)$ and~$\mathit{Tr}_{{\cal C}}$ are defined analogously.
\subsection{Trace Refinement} \label{sub-prel-trace-refine}
Given two MDPs~${\cal D}$ and ${\cal E}$ with the same set~${\sf L}$ of labels, we say that
\emph{${\cal E}$ refines~${\cal D}$}, denoted by ${\cal D} \sqsubseteq {\cal E}$,
if for all strategies~$\alpha$ for~${\cal D}$ there exists some strategy~$\beta$ for~${\cal E}$ such that
$\mathit{Tr}_{{\cal D}} = \mathit{Tr}_{{\cal E}}$.
We are interested in the problem ${\sf MDP\sqsubseteq MDP}$, which asks, for two given MDPs~${\cal D}$ and~${\cal E}$, whether ${\cal D} \sqsubseteq {\cal E}$.
The decidability of this problem was posed as an open question in~\cite{DoyenHR08}.
We show in Theorem~\ref{theo:unde-MDP-MDP} that the problem~${\sf MDP\sqsubseteq MDP}$ is undecidable.
We consider various subproblems of ${\sf MDP\sqsubseteq MDP}$, which asks whether ${\cal D} \sqsubseteq {\cal E}$ holds.
Specifically, we speak of the problem
\begin{itemize}
\item ${\sf MDP\sqsubseteq MC}$ when ${\cal E}$ is restricted to be an MC;
\item ${\sf MC\sqsubseteq MDP}$ when ${\cal D}$ is restricted to be an MC;
\item ${\sf MC\sqsubseteq MC}$ when both ${\cal D}$~and~${\cal E}$ are restricted to be MCs.
\end{itemize}
We show in Theorem~\ref{theo:unde-MDP-MDP} that even the problem ${\sf MC\sqsubseteq MDP}$ is undecidable.
Hence we consider further subproblems.
Specifically, we denote by~${\sf MC\sqsubseteq MDP_{m}}$ the problem where the MDP is restricted to use only memoryless strategies,
and by~${\sf MC\sqsubseteq MDP_{pm}}$ the problem where the MDP is restricted to use only pure memoryless strategies.
When both MDPs~${\cal D}$ and~${\cal E}$ are restricted to use only pure memoryless strategies, the trace-refinement problem is denoted by~${\sf MDP_{pm}\sqsubseteq MDP_{pm}}$.
The problem ${\sf MC\sqsubseteq MC}$ equals the \emph{trace-equivalence problem} for MCs: given two MCs ${\cal C}_1,{\cal C}_2$ we have ${\cal C}_1 \sqsubseteq C_2$ if and only if $\mathit{Tr}_{{\cal C}_1} = \mathit{Tr}_{{\cal C}_2}$ if and only if ${\cal C}_2 \sqsubseteq {\cal C}_1$.
This problem is known to be in {\sf NC}~\cite{Tzeng96}, hence in~{\sf P}.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 4,484 |
\section{INTRODUCTION}
The landmark discovery of neutrino flavor oscillations from neutrino experiments like MINOS \cite{minos}, T2K \cite{t2k}, Double Chooz \cite{doublechooz},
Daya Bay \cite{dayabay}, RENO \cite{reno} etc and hence the evidence of neutrino mass and mixing have immense impact on our perception of the dynamics
of the universe. Regardless of its enormous success, the Standard Model (SM) of particle physics is considered an insufficient theory, owing to the fact
that it fails to address some of the vital questions like, the origin of the tiny neutrino mass, Baryon Asymmetry of the universe (BAU), Dark matter (DM),
Lepton Number Violation (LNV), Lepton Flavor Violation (LFV) and various other cosmological problems.
\par There are many beyond standard model (BSM) frameworks to realize these observables. Amongst them, the seesaw mechanism is the simplest way to understand the smallness of
neutrino masses, which is further categorized into type I, type II, type III, Inverse seesaw (SS) mechanisms \cite{type1}\cite{type2}\cite{type3}\cite{inverse}. In type I seesaw,
the introduction of SM gauge singlet RH neutrinos,
gives rise to the light neutrino mass matrix of the form, $ M_\nu\approx -M_DM^{-1}_{RR}M^T_D$, with a heavy-light neutrino mixing of order $M_D M^{-1}_{RR}$, where,$ M_D$ and $M_{RR}$ are
the Dirac and Majorana masses respectively.
Notwithstanding, one of the most appealing frameworks BSM, in which the seesaw mechanisms arises naturally is the left-right symmetric model (LRSM) which is based on the gauge group,
$ \rm SU(3)_c\times SU(2)_L\times SU(2)_R\times U(1)_{B-L}$. Here, the RH neutrinos are a necessary part of the model, which acquires a Majorana mass when the $SU(2)_R$
symmetry is broken at a scale $v_R$. This is quite analogous to the way in which the charged fermions get masses in the SM by Higgs mechanism when $SU(2)_L$ gauge symmetry
is broken at a scale $v$. \par The RH neutrinos which exist in the seesaw mechanism, besides explaining the neutrino flavour oscillation and neutrino mass can also throw light
on one of the most enthralling problems of particle physics and cosmology, the matter-antimatter asymmetry of the universe, i.e, excess of baryons over anti baryons in the
universe. The decay of the lightest right handed neutrino, $N_1$ can naturally give rise to an excess of baryons over anti baryons in the universe consistent with the cosmological
observable constrained by Big bang Nucleosynthesis and determined recently with a good precision by WMAP experiment as,
\begin{equation}
\eta_B=\frac{n_B}{n_\gamma}=\left(6.5^{+0.4}_{-0.3}\right)\times 10^{-10}.
\end{equation}
The decay of $N_1$ can satisfy all the three Sakharov conditions \cite{sakharov} as required for successful generation of $\eta_B$ as there is sufficient CP and C violation, there is Baryon
number violation and can also occur out of thermal equillibrium. TeV scale LRSM provides an alluring
class of SS models which can be probed at LHC. Matter Antimatter asymmetry is now generated by a resonant baryogenesis mechanism with atleast two Quasi Degenerate RH neutrinos
in TeV range with a mass difference comparable to their decay widths \cite{decaywidth}. The TeV scale new particles in LRSM also leads to interesting collider signals.
\par The possible observation of NDBD would play an important role in understanding the origin of BAU as it would imply that lepton number indeed is not conserved
(one of the essential conditions for leptogenesis \cite{leptogenesis}). Furthermore, the Majorana nature \cite{maj} of neutrinos would also be established from NDBD. The latest experiments
\cite{ndbd} that have improved the lower bound of the half life of the decay process include KamLAND-Zen \cite{kamland} and GERDA \cite{gerda} which uses Xenon-136 and
Germanium-76 nuclei respectively. Incorporating the results from first and second phase of the experiment, KamLAND-Zen imposes the best lower limit on the decay half life using Xe-136 as
$ \rm T_{1/2}^{0\nu}>1.07\times 10^{26}$ yr at $ 90\%$ CL and the corresponding upper limit of effective Majorana mass in the range (0.061-0.165)eV.
The observation of CP violation in
lepton sector, in neutrino osillation experiment and NDBD would suggest the existence of CP violation at high energy which might be related to the one responsible for leptogenesis.
The observation of LNV in NDBD and in addition possibly of CP violation in lepton sector would be a strong indication of leptogenesis as an explaination of baryon asymmetry. It would be interesting to
explore the existence of CP violation in leptonic sector due to Majorana CP phases in the light of leptogenesis.
\par
\par Another important issue of discussion in collider is the relative values of mass of the gauge bosons and heavy right handed neutrinos. However there are theoretical
arguments based on vacuum stability which suggests that the heavy neutrinos are lighter than the RH gauge bosons that appears in the LRSM for a large parameter space.
Again, it has been pointed out in literature that to account for a successful leptogenesis in TeV scale LRSM, the mass of the RH gauge boson,
$M_{W_R}$ has to be larger than the value obtainable at the LHCs. They have found a lower bound of 18 TeV for successful leptogenesis from the decay of heavy RH neutrino
with maximum CP asymmetry, $\varepsilon=1$. \cite{18tev}. This result is much significant as it can provide a way to falsify leptogenesis, if mass of a gauge
boson below below this limit is found in experiments. From the significant outcome of the work, \cite{18tev}, the authors of \cite{3tev} have shown that for
specific symmetry textures of $M_D$ and $M_{RR}$ in the seesaw formula and by considering larger Yukawa couplings, the bound for leptogenesis can be largely
weaker, i.e. $M_{W_R}>3$ TeV and $M_N \leq M_{W_R}$ which is possible owing to the sizeable reduction of dilution effects from $W_R$ mediated decays and
scatterings. They have again reanalyzed their work \cite{3tev} in \cite{10tev} and came out with a lower bound of $M_{W_R} >10$ TeV for successful leptogenesis
in a generic LRSM with large light- heavy mixing. The consistency has also been pointed out for other low energy constraints like NDBD, LFV etc.
\par In LRSM, there are several contributions to NDBD that involve left and right handed sectors individually as well as others that involve both sectors through left-right mixing
accompanied by both light and heavy neutrinos.
Left-right mixing is always a ratio of the Dirac and Majorana mass scales $(M_DM^{-1}_{RR})$ which appears in the type I seesaw formula. NDBD involving left-right mixing can be
enhanced for specific Dirac matrices.
For large left right mixing, significant contributions to NDBD arises from the mixed diagrams with simultaneous mediation of $W_L$ and $W_R$ accompanied by light left handed neutrino
and heavy right handed neutrinos, known as $\lambda$ and $\eta$ contribtions to NDBD , although the later is a bit suppressed by the mixing between left and right
handed gauge bosons. It has been studied in many of the earlier works in the framework of LRSM (see ref.\cite{ls1}\cite{dbd1}\cite{ndbddb2}) The other new physics contributions are also suppressed for a larger
gauge boson mass, $M_{W_R}>$10 TeV which gives sizeable baryogenesis. Furthermore,
the LFV processes are seeking great interest in recent times as the experiments to detect them are becoming increasingly precise. The decay processes, $\left(\mu\rightarrow 3e\right)$ and
$\left(\mu\rightarrow e\gamma\right)$ are simplest to detect with the current experimental limits for these low energy processes as $<1.0\times 10^{-12}$ and $<4.2\times 10^{-13}$ respectively.
\par Apart from the new physics contributions to NDBD in LRSM as available in literature, it is important to study the linkage between
baryogenesis and other low scale phenomenon like NDBD, LFV etc. In this context, with the previous results aforementioned in mind \cite{18tev}\cite{3tev}\cite{10tev}\cite{ls1}\cite{dbd1}\cite{ndbddb2} we have done a phenomenological study of
leptogenesis in TeV scale LRSM by considering different values of RH gauge boson mass within and above
the current collider limits. In particular we have considered the $SU(2)_R$ breaking scale to be 5 TeV, 10 TeV and 18 TeV
(the bounds as available in literature) in order to check the consistency of the results and thereby tried to link baryogenesis with NDBD for these particular values of
gauge boson mass.
Again regarding the $\lambda$ and $\eta$ contributions to be valid, we need to have a large
left-right mixing. But for a generic TeV scale seesaw model, without considering any particular structure for the Dirac and Majorana masses, in order to account for
neutrino mass of the order of sub eV, keeping the heavy masses of TeV scale, the Dirac mass is of the order of MeV. This leads to a not so large left-right mixing parameter,
$\zeta\approx 10^{-6}$. Since we have seen non negligible effects of the momentum dependent mechanisms in NDBD for not so large left light mixing,
we studied all the possible contributions to NDBD. To co-relate with baryogenesis, we have considered only the momentum dependent mechanisms of NDBD, i.e., the $\lambda$ and $\eta$ contributions
to NDBD due to light-heavy and gauge boson mixing. Since the effective mass govering NDBD is dependent upon
the Majorana phases, $\alpha$ and $\beta$, it would be compelling to examine if there exist a link between NDBD and BAU. Besides, the study of LFV processes will also
provide insights about the mechanism of NDBD. LRSM at the TeV scale interlinks high energy collider physics to the low energy observables like NDBD and other LFV processes.
So we tried to correlate all these high and low energy phenomenon and find out if there exist a common parameter space accessible at colliders where leptogenesis can be simultaneously
realized.
\par This paper is outlined as follows. In the next section, we present the left-right
symmetric model framework with its particle contents and the origin of neutrino mass. In section \ref{sec:level4}, we summarized the implications of TeV scale LRSM in processes like BAU and other
low energy observables like NDBD, LFV. In section \ref{sec:level5}, we present our numerical
analysis and results and then give our conclusion in section \ref{sec:level6}
\section{LEFT RIGHT SYMMETRIC MODEL(LRSM) AND NEUTRINO MASS}{\label{sec:level3}}
In the generic LRSM \cite{LRSM}, the fermions are assigned to the gauge group $ \rm SU(3)_c\times SU(2)_L\times SU(2)_R\times U(1)_{B-L}$ \cite{genericlrsm} \cite{LRSM} which
is a very simple extension of the standard model gauge group, $ \rm SU(3)_c\times SU(2)_L\times U(1)_Y$, that provides a UV complete
seesaw model where the type I and II seesaw arises naturally. Most of the problems
like parity violation of weak interaction, masssless neutrinos, CP problems, hierarchy problems etc can be realized in the framework of LRSM. The seesaw scale is
identified as the breaking of the $SU(2)_R$ symmetry.
In this model, the electric charge takes a form,$ Q=T_{3L}+T_{3R}+\frac{B-L}{2}$ \cite{Q}, where $ \rm T_{3L}$ and $ \rm T_{3R}$ are the 3rd components of isospin under $ \rm SU(2)_L$ and $ \rm SU(2)_R$. In LRSM, the left and right handed components of the fields are treated
on the same footing. The leptons (LH and RH) that transform in L-R symmetric gauge group are assigned with quantum numbers $(1,2,1,-1)$ and $(1,1,2,-1)$ respectively under
$ \rm SU(3)_c\times SU(2)_L\times SU(2)_R\times U(1)_{B-L}$. The Higgs sector in LRSM consists of two scalar triplets, $\Delta_L(1,2,1,-1)$, $\Delta_R(1,1,2,-1)$
and a Bidoublet with quantum number $ \rm \phi(1,2,2,0)$.
A 2$\times$ 2 matrix representation for the Higgs bidoublets and the $ \rm SU(2)_{L,R}$ triplets is given as,
\begin{equation}\label{eqx3}
\phi=\left[\begin{array}{cc}
\phi_1^0 & \phi_1^+\\
\phi_2^- & \phi_2^0
\end{array}\right]\equiv \left( \phi_1,\widetilde{\phi_2}\right), \Delta_{L,R}=\left[\begin{array}{cc}
{\delta_\frac{L,R}{\sqrt{2}}}^+ & \delta_{L,R}^{++}\\
\delta_{L,R}^0 & -{\delta_\frac{L,R}{\sqrt{2}}}^+ .
\end{array}\right].
\end{equation}
The VEVs of the neutral component of the Higgs field are $ \rm v_R,v_L,k_1,k_2$ respectively.The VEV $ \rm v_R$ breaks the $ \rm SU(2)_R$ symmetry and sets the mass scale
for the extra gauge bosons $ \rm (W_R$ and Z$ \rm \ensuremath{'})$ and for right handed neutrino
field $ \rm (\nu_R)$. The VEVs $ \rm k_1$ and $ \rm k_2$ serves the twin purpose of breaking the remaining the $ \rm SU(2)_L\times U(1)_{B-L}$ symmetry down to
$ \rm U(1)_{em}$, thereby setting
the mass scales for the observed $ \rm W_L$ and Z bosons and providing Dirac masses for the quarks and leptons. Clearly, $ \rm v_R$ must be significantly larger
than $ \rm k_1$ and $ \rm k_2$ in order for $ \rm W_R$ and Z $\ensuremath{'}$ to have greater masses than the $W_L$ and Z bosons. $v_L$ is the VEV of $\Delta_L$,
it plays a significant role
in the seesaw relation which is the characteristics of the LR model and can be written as,
\begin{equation}\label{eqx7}
<\Delta_L>=v_L=\frac{\gamma k^2}{v_R}.
\end{equation}
\par The Yukawa lagrangian in the lepton sector is given by,
\begin{equation}\label{eqx8}
\mathcal{L}=h_{ij}\overline{\Psi}_{L,i}\phi\Psi_{R,j}+\widetilde{h_{ij}}\overline{\Psi}_{L,i}\widetilde{\phi}\Psi_{R,j}+f_{L,ij}{\Psi_{L,i}}^TCi\sigma_2\Delta_L\Psi_{L,j}+f_{R,ij}{\Psi_{R,i}}^TCi\sigma_2\Delta_R\Psi_{R,j}+h.c.
\end{equation}
Where the family indices i,j are summed over, the indices $i,j=1,2,3$ represents the three generations of fermions. $C=i\gamma_2\gamma_0$ is the charge conjugation
operator, $\widetilde{\phi}=\tau_2\phi^*\tau_2$ and $\gamma_{\mu}$ are the Dirac matrices. Considering discrete parity symmetry, the Majorana Yukawa couplings $f_L=f_R$ (for left-right symmetry) gives rises
to Majorana neutrino mass after electroweak symmetry breaking when the triplet Higgs $\Delta_L$ and $\Delta_R$ acquires non zero vacuum expectation value.
Then equation (\ref{eqx8}) leads to $6\times6$ neutrino mass matrix as shown in reference 2 of \cite{ls1}
\begin{equation}\label{eqx8}
M_\nu=\left[\begin{array}{cc}
M_{LL}&M_D\\
{M_D}^T&M_{RR}
\end{array}\right],
\end{equation}
where
\begin{equation}\label{eqx9}
M_D=\frac{1}{\sqrt{2}}(k_1h+k_2\widetilde{h}), M_{LL}=\sqrt{2}v_Lf_L, M_{RR}=\sqrt{2}v_Rf_R,
\end{equation}
where $M_D$, $M_{LL}$ and $M_{RR}$ are the Dirac neutrino mass matrix, left handed and right handed mass matrix respectively. Assuming $M_L\ll M_D\ll M_R$, the
light neutrino mass, generated within a type I+II seesaw can be written as,
\begin{equation}\label{eqx10}
M_\nu= {M_\nu}^{I}+{M_\nu}^{II},
\end{equation}
\begin{equation}\label{eqx11}
M_\nu=M_{LL}+M_D{M_{RR}}^{-1}{M_D}^T
=\sqrt{2}v_Lf_L+\frac{k^2}{\sqrt{2}v_R}h_D{f_R}^{-1}{h_D}^T,
\end{equation}
where the first and second terms in equation (\ref{eqx11}) corresponds to type II seesaw and type I seesaw mediated by RH neutrino respectively.
Here,
\begin{equation}\label{eqx12}
h_D=\frac{(k_1h+k_2\widetilde{h})}{\sqrt{2}k} , k=\sqrt{\left|{k_1}\right|^2+\left|{k_2}\right|^2}.
\end{equation}
In the context of LRSM both type I and type II seesaw terms can be written in terms of $M_{RR}$ which arises naturally at a high energy scale as a result
of spontaneous parity breaking. In LRSM the Majorana Yukawa couplings $f_L$ and $f_R$ are same (i.e, $f_L=f_R$) and the VEV for left handed triplet $v_L$ can be written as,
\begin{equation}\label{eqx13}
v_L=\frac{\gamma {M_W}^2}{v_R}.
\end{equation}
Thus equation (\ref{eqx11}) can be written as ,
\begin{equation}\label{eqx14}
M_\nu=\gamma(\frac{M_W}{v_R})^2M_{RR}+M_D{M_{RR}}^{-1}{M_D}^T.
\end{equation}
In literature, (reference \cite{breaking} \cite{ndbddb2}) author define the dimensionless parameter $\gamma$ as,
\begin{equation}\label{eqx15}
\gamma=\frac{\beta_1k_1k_2+\beta_2{k_1}^2+\beta_3{k_2}^2}{(2\rho_1-\rho_3)k^2}.
\end{equation}
Here the terms $\beta$, $\rho$ are the dimensionless parameters that appears in the expression of the Higgs potential.
\par Again, the neutrino mass matrix as given in \ref{eqx8} can be digonalized by a $6\times 6$ unitary matrix, as follows,
\begin{equation}\label{eqx16}
\mathcal{V}^T M_\nu \mathcal{V}=\left[\begin{array}{cc}
\widehat{M_\nu}&0\\
0&\widehat{M}_{RR}
\end{array}\right],
\end{equation}
where, $\mathcal{V}$ represents the diagonalizing matrix of the full neutrino mass matrix, $M_\nu$, $\widehat{M_\nu}= diag(m_1,m_2,m_3)$, with $m_i$ being the light neutrino masses and
$\widehat{M}_{RR}= diag(M_1,M_2,M_3)$, with $M_i$ being the heavy RH neutrino masses. The diagonalizing matrix is represented as,
\begin{equation}\label{eqx17}
\mathcal{V}=\left[\begin{array}{cc}
U&S\\
T&V
\end{array}\right] \approx \left[\begin{array}{cc}
1-\frac{1}{2}RR^{\dagger}&R\\
-R^\dagger&1-\frac{1}{2}R^\dagger R
\end{array}\right] \left[\begin{array}{cc}
V_\nu&0\\
0&V_R
\end{array}\right],
\end{equation}
where, R describes the left-right mixing and given by,
\begin{equation}\label{eqx18}
R=M_D M^{-1}_{RR}+\mathcal{O} (M^3_D{(M^{-1}_{RR})}^3).
\end{equation}
The matrices U, V, S and T are as follows,
\begin{equation}\label{eqx19}
U=\left[1-\frac{1}{2}M_DM^{-1}_{RR}{(M_DM^{-1}_{RR})}^\dagger\right]V_\nu,
\end{equation}
\begin{equation}\label{eqx20}
V=\left[1-\frac{1}{2}{(M_DM^{-1}_{RR})}^\dagger M_DM^{-1}_{RR}\right]V_R,
\end{equation}
\begin{equation}\label{eqx21}
S=M_DM^{-1}_{RR}v_Rf_R,
\end{equation}
\begin{equation}\label{eqx22}
T=-(M_DM^{-1}_{RR})^\dagger V_\nu.
\end{equation}
The leptonic charged current interaction in flavour basis is given by,
\begin{equation}
\mathcal{L}^{lepton}_{CC}=\frac{g}{\sqrt{2}}\left[\overline{l^{'}}\gamma^\mu P_L \nu^{'}W^{-}_{L_\mu}+\overline{l^{'}}\gamma^\mu P_R \nu^{'}W^{-}_{R_\mu}\right]+h.c,
\end{equation}
where,
\begin{equation}\label{eqx23}
\left[\begin{array}{cc}
W^{\pm}_L\\
W^{\pm}_R
\end{array}\right]= \left[\begin{array}{cc}
\cos \zeta & \sin\zeta e^{i\alpha}\\
-\sin \zeta e^{-i\alpha} & \cos\zeta
\end{array}\right]\left[\begin{array}{cc}
W^{\pm}_1\\
W^{\pm}_2
\end{array}\right] ,
\end{equation}
characterises the mixing between L-R gauge bosons with,
\begin{equation}\label{eqx24}
\tan 2\zeta= -\frac{2 k_1 k_2}{v^2_R-v^2_L}.
\end{equation}
With negligible mixing, the gauge boson masses become,
\begin{equation}\label{eqx25}
M_{W_L}\approx M_{W_1}\approx \frac{g}{2}k_+, M_{W_R}\approx M_{W_2}\approx \frac{g}{\sqrt{2}}v_R .
\end{equation}.
Assuming $k_2< k_1\Rightarrow \zeta \approx -\frac{k_1k_2}{v^2_R} \approx -2\frac{k_2}{k_1}{\left(\frac{M_{W_L}}{M_{W_R}}\right)}^2$. T and S in equation \ref{eqx17} describes
the left-right mixing and can be written as $\frac{L}{R}$, gauge boson mixing angle $\zeta$ is of order ${\left(\frac{L}{R}\right)}^2$.
\section{Resonant Leptogenesis, NDBD and LFV in TeV scale LRSM}{\label{sec:level4}}
As illustrated in several earlier works, for TeV scale seesaw models, a simple approach for generating adequate lepton asymmetry is to use resonant leptogenesis
(RL) \cite{RL}, which craves for at least two heavy RH Majorana neutrinos to be nearly degenerate, which we have already considered in our analysis. With Quasi degenerate
RH neutrino masses for at least two RH neutrinos, BAU/leptogenesis can be efficient at lower mass scales, but for this case generally a specific
flavour structure is generally considered which allows for large Yukawa couplings which serves the twin purpose of leptogenesis to be efficient as well as
it can be tested in experiments. Nevertheless, as far as Dirac neutrino mass matrix is concerned,
we have not considered any particular structure of the matrix but a general form which is obtained from the type I seesaw when the Majorana mass matrix and the light neutrino mass
matrix is considered to be known. The neutrino mass matrices is such that it fits the current neutrino oscillation data. The basic focus of our work is to relate the
lepton asymmetry with the low observable phenomenons like NDBD, rather than only BAU and NDBD or LFV and to find a common parameter space where all them them holds true.
In the framework of TeV scale LRSM, the presence of the RH neutrinos (type I SS) and the scalar triplets (type II SS) suggests their decays which give rise to lepton asymmetry.
However we will only consider the decay of the heavy RH neutrinos for generating lepton asymmetry . The decay of the scalar triplet $\Delta_L$ would not much affect on our result as above TeV
scale, decay of RH neutrinos are in thermal equillibrium and hence they would wash out any kind of preexisting lepton asymmetry and so we have ignored it \cite{10tev}. So the dominant contribution would come from
the type I seesaw term.
The two heavy RH Majorana neutrinos decay via the decay modes, $N_i\rightarrow l+\phi^{c} $ and its
CP conjugate process, $N_i\rightarrow l^c+\phi $ which can occur at both tree and one loop levels. Hence, their CP violating asymmetry $\epsilon_i$
which arises from the interference between the tree level amplitude and its self-energy \cite{selfenergy} correction is defined as \cite{zing},
\begin{equation}\label{eqa7}
\epsilon_i= \frac{\Gamma\left(N_i\rightarrow l+\phi^{c}\right)-\Gamma\left(N_i\rightarrow l^c+\phi\right)}{\Gamma\left(N_i\rightarrow l+\phi^{c}\right)+\Gamma\left(N_i\rightarrow l^c+\phi\right)}.
\end{equation}
The decay rates of the heavy neutrino decay processes are governed
by the Yukawa couplings, and is given by,
\begin{equation}\label{eqa8}
\Gamma_i= {\left(Y^\dagger_\nu Y_\nu\right)}_{ii}\frac{M_i}{8\pi}.
\end{equation}
An essential condition for RL is that the mass difference between the two heavy RH neutrinos must be comparable to the decay width ( i.e.,$ M_i-M_j \approx \Gamma$). In this
case, the CP aymmetry becomes very large (even of order 1). The CP violating asymmetry $\epsilon_i$ is thus given by,
\begin{equation}\label{eqa9}
\epsilon_i= \frac{Im\left[{\left(Y^\dagger_\nu Y_\nu\right)}^2_{ij}\right]}{\left(Y^\dagger_\nu Y_\nu\right)_{11}\left(Y^\dagger_\nu Y_\nu\right)_{22}}.
\frac{\left(M^2_i-M^2_j\right)M_i \Gamma_j}{\left(M^2_i-M^2_j\right)+M^2_i \Gamma^2_j},
\end{equation}
where,
\begin{equation}
\frac{Im\left[{\left(Y^\dagger_\nu Y_\nu\right)}^2_{ij}\right]}{\left(Y^\dagger_\nu Y_\nu\right)_{11}\left(Y^\dagger_\nu Y_\nu\right)_{22}}\approx 1.
\end{equation}
The variables i, j run over 1 and 2, $i \neq j$.
\par The CP violating asymmetries $\epsilon_1$ and $\epsilon_2$ can give rise to a net lepton number asymmetry, provided the expansion rate of the universe is larger than
$\Gamma_1$ and $\Gamma_2$. This can further be partially converted into baryon asymmetry of the universe by B+L violating sphaleron \cite{sphaleron} processes.
Now that there are several new heavy particles in LRSM, many new physics contributions
to NDBD arises in addition to the standard contribution. It has been extensively studied in many of the earlier works (see ref. \cite{dbd1}\cite{ndbddb2}).
Amongst the new physics contributions to $0\nu\beta\beta$ decay, notable are the contributions coming from the exchange of the heavy gauge bosons ( $ {W_L}^-$ and $ {W_R}^-$ ), the
both the left and right handed gauge bosons (mixed diagrams, $\lambda$ and $\eta$) as well the scalar triplet ($\Delta_L$ and $\Delta_R$ ) contributions. The amplitude of
these processes mostly depends upon the mixing between light and heavy neutrinos, the leptonic mixing matrix elements, the mass of the heavy neutrino ($M_i$), the mass of the gauge
bosons, ${W_L}^-$ and ${W_R}^-$ , the mass of the triplet Higgs as well as their coupling to leptons, $f_L$ and $f_R$ .
\par However in our present work, we have considered only three of the aforesaid contributions to NDBD. The ones mediated by ${W_R}^-$ and the momentum dependent mechanisms,
i.e., the contributions to NDBD from $\lambda$ and $\eta$ diagrams which involves the light and heavy
neutrino mixings and the mixing between ${W_L}^-$ and ${W_R}^-$ bosons (considering a small light heavy neutrino mixing of $\mathcal{O}$($10^{-6}$) .
The amplitudes of the contributions are given in several earlier works like \cite{ndbddb2}.
The mass scales for the heavy particles has been assumed to be $\approx TeV $, with $M_{W_R}> M_N$. Under these assumptions, the amplitude for the
light-heavy mixing contribution which is proportional to $ \frac{{m_D}^2}{M_R}$ remains very small (since $m_\nu \approx \frac{{m_D}^2}{M_R} \approx (0.01-0.1) eV$, $m_D \approx
(10^5-10^6)$ eV which implies $ \frac{m_D}{M_R} \approx (10^{-7}-10^{-6})$ eV).
Again, the contribution
from ${\Delta_L}^-$, ${W_L}^-$ is suppressed by the type II seesaw contribution to light neutrino mass and hence neglected here. Considering these contributions
we have studied the NDBD and tried to correlate the effective mass governing the process with the BAU for different gauge boson masses in
TeV scale LRSM.
As has been pointed out that successful low scale RL requires an absolute lower bound of 18 TeV on the mass of the RH gauge boson and recent work predicted that it can be
produced for considerably lower value of $M_{W_R}$ accessible at LHCs considering relatively large Yukawa couplings. Again, although it has been illustrated as the
light-heavy neutrino mixing to be sufficiently large in TeV scale LRSM inorder to get dominant NDBD contributions from the momentum dependent mixed diagrams, $\lambda$
and $\eta$, we have seen that a sizeable amount of BAU and effective mass governing NDBD ( from $\lambda$ and $\eta$ diagrams) consistent with the experimental value is observed
by considering a general structure of the Dirac mass matrix and not so large light-heavy neutrino mixing parameter. Without considering any special structure of $M_D$ and $M_{RR}$
in generic TeV scale LRSM, inorder to get light neutrino mass of the order of sub eV, $M_D$ has to be fine tuned to be very small which results in a lower value of the light heavy
neutrino mixing parameter, $\zeta$. But, in our present work, by considering
a smaller $\zeta$ value, we have tried to correlate the effective mass from purely RH contribution and the suppressed effective mass coming from $\lambda$ and $\eta$
conributions with leptogenesis at a TEV scale LRSM.
\par The heavy Majorana neutrinos that takes part in explaining BAU as well as NDBD also plays a significant role in giving rise to experimentally testable rates of LFV
processes like, $\mu\rightarrow e\gamma$, $\mu\rightarrow 3e$, $\mu\rightarrow e$ etc. The different neutrino Yukawa couplings for each lepton flavour have a considerable
impact on leptogenesis with nearly degenerate heavy neutrino mass. Owing to the presence of some new heavy particles in the LRSM, the LFV proceses are mediated by these
heavy neutrinos and doubly charged triplet Higgs bosons.
The relevant BR for the
process $(\mu\rightarrow 3e )$ is defined as, \cite{lfv1}
\begin{equation}\label{eq43}
BR\left(\mu\rightarrow 3e\right)=\frac{1}{2}{\left|h_{\mu e}h_{ee}^{*}\right|}^{2}\left(\frac{{m_{W_L}}^4}{{M_{\Delta_L}^{++}}^4}+\frac{{m_{W_R}}^4}{{M_{\Delta_R}^{++}}^4}\right).
\end{equation}
Where $h_{ij}$ describes the lepton Higgs coupling in LRSM and is given by,
\begin{equation}\label{eq44}
h_{ij}=\sum_{n=1}^{3}V_{in}V_{jn}\left(\frac{M_n}{M_{W_R}}\right), i, j=e,\mu,\tau.
\end{equation}
\par For $\mu\rightarrow e\gamma$, the BR is given by, \cite{lfv1}
\begin{equation}\label{eqa}
BR\left(\mu\rightarrow e\gamma\right)= 1.5\times 10^{-7}{\left|g_{lfv}\right|}^2{\left(\frac{1 TeV}{M_{W_R}}\right)}^4,
\end{equation}\\
where, $ g_{lfv}$ is defined as,
\begin{equation}\label{eqb}
g_{lfv}=\sum_{n=1}^{3}V_{\mu n}{V_{e n}}^*{\left(\frac{M_n}{M_{W_R}}\right)}^2=\frac{\left[M_R {M_R}^*\right]_{\mu e}}{{M_{W_R}}^2}.
\end{equation}
\par The sum is over the heavy neutrinos only. $ \rm M_{\Delta_{L,R}}^{++}$ are the masses of the doubly charged bosons, $ \rm {\Delta_{L,R}}^{++}$, V is the mixing matrix
of the right handed neutrinos with the electrons and muons. $ \rm M_n(n=1,2,3) $ are the right handed neutrino masses.
\par Several new sources of LFV are present in new physics BSM in LRSM due to the additional RH current interactions, which could lead to considerble
LFV rates for TeV scale $v_R$. LFV in the LRSM has been studied in many previous works. There are various LFV processes providing constraints on the masses
of the right handed neutrinos and doubly charged scalars. It turns out that the process $\mu\rightarrow 3e $ induced by doubly charged bosons
$\Delta_L^{++}$ and $\Delta_R^{++}$ and $\mu\rightarrow e\gamma$ provides the most relevant constraint.
The upper limits of branching ratio of the process $\mu\rightarrow 3e $ is $<1.0\times 10^{-12}$ \cite{SINDRUM} at $ 90\%$ CL was obtained by the
SINDRUM experiment. Furthermore, the Mu3e collaboration has also submitted a letter of intent to PSI to perform a new improved search for the decay
$\mu\rightarrow 3e $ with a sensitivity of $10^{-16}$ at $95\%$ CL \cite{sindrum2} which corresponds to an improvement by four orders of magnitude
compared to the former SINDRUM experiment. While for the LFV process, $\mu\rightarrow e\gamma$, the BR is established to be
$<4.2\times 10^{-13}$ \cite{muegamma} at $ 90\%$ CL by the MEG collaboration. Considering these
contributions from heavy righthanded neutrinos and Higgs scalars, the expected branching ratios and conversion rates of the above processes have been
calculated in the LRSM in the work (first reference in \cite{lfv}).
\section{NUMERICAL ANALYSIS AND RESULTS}{\label{sec:level5}}
With reference to several earlier works \cite{18tev}\cite{3tev}\cite{10tev}\cite{ndbddb2}\cite{baundbd} for TeV scale LRSM, we carried out an extensive study for
RL, NDBD and LFV, with a view to finding a common parameter space for these observabes. It is reasonable to check if the mass matrices that can explain the BAU of the universe can also provide
sufficient parameter space for other low energy observables like NDBD, LFV etc. For NDBD, we have considered the mixed LH-RH contribution along with the purely RH neutrino
contribution, considering a generalized structure for the Dirac mass matrix. The Dirac and Majorana mass matrices in our case are determined using
the type I seesaw formula ( as shown in appendix) and type II seesaw (equation\ref{eqa5}) respectively which satisfies the recent neutrino oscillation data. Whereas, in the previous works, the authors have considered
specific Dirac and Majorana textures resulting in light neutrinos via type I seesaw with large light heavy neutrino mixing. They have chosen large Yukawa
couplings as allowed by specific textures for calculation of the lepton asymmetry. As stated in \cite{10tev}, we have been found that it is possible to observe BAU with
a lower $W_R$ mass, in our case it is 5 TeV. Further, we have also correlated the LFV of the process, $\mu\rightarrow 3e $, $\mu\rightarrow e\gamma $ and with lightest neutrino mass and atmospheric mixing angle.
In this section we present a detailed analysis of our work by dividing it into several subsections, firstly BAU, then NDBD and then LFV.
\subsection{Baryogenesis via Leptogenesis}
The formula for light $\nu$ masses in LRSM can be written as,
\begin{equation}\label{eqa1}
M_\nu={ M_\nu}^{I}+{ M_\nu}^{II},
\end{equation}
where the type I seesaw mass term is,
\begin{equation}\label{eqa2}
{ M_\nu}^{I}= M_D{M_{RR}}^{-1}{M_D}^T.
\end{equation}
We have considered a tribimaximal mixing (TBM) pattern, such that,
\begin{equation}\label{eqa3}
{ M_\nu}^{I}= U_{(TBM)}U_{Maj}{M_\nu}^{I(diag)}{U_{Maj}}^T{U_{(TBM)}}^T,
\end{equation}
where $ \rm {M_\nu}^{I(diag)}=X{M_\nu}^{(diag)}$ \cite{X},
the parameter X is introduced to describe the relative strength of the type I and II seesaw terms. It can take any numerical value
provided the two seesaw terms gives rise to correct light neutrino mass matrix. In our case, we have considered X=0.5 \cite{X}, i.e., equal
contributions from both the seesaw terms.
Thus, equation (\ref{eqa1}) can be written as,
\begin{equation}\label{eqa4}
U_{PMNS}{M_\nu}^{(diag)} {U_{PMNS}}^T={ M_\nu}^{II}+U_{(TBM)}U_{Maj}X{M_\nu}^{(diag)}{U_{Maj}}^T{U_{(TBM)}}^T,
\end{equation}
where, $\rm U_{PMNS}$ is the diagonalizing matrix of the light neutrino mass matrix, $M_\nu$ and is given by,
\begin{equation}\label{eq5}
\rm U_{PMNS}=\left[\begin{array}{ccc}
c_{12}c_{13}&s_{12}c_{13}&s_{13}e^{-i\delta}\\
-c_{23}s_{12}-s_{23}s_{13}c_{12}e^{i\delta}&-c_{23}c_{12}-s_{23}s_{13}s_{12}e^{i\delta}&s_{23}c_{13}\\
s_{23}s_{12}-c_{23}s_{13}c_{12}e^{i\delta}&-s_{23}c_{12}-c_{23}s_{13}s_{12}e^{i\delta}&c_{23}c_{13}
\end{array}\right]U_{Maj}.
\end{equation}
The abbreviations used are $c_{ij}$= $\cos\theta_{ij}$, $s_{ij}$=$\sin\theta_{ij}$, $\delta$ is the Dirac CP phase while the diagonal phase matrix,
$ \rm U_{Maj}$ is $ \rm diag (1,e^{i\alpha},e^{i(\beta+\delta)}) $, contains the Majorana phases $ \rm \alpha$ and $ \rm \beta$. We have adopted the recent neutrino oscillation
data in our analysis as in the table \ref{t1},
\begin{table}[h!]
\centering
\begin{tabular}{||c| c| c||}
\hline
PARAMETERS & $3 \sigma$ RANGES & BEST FIT$\pm 1 \sigma$\\ \hline
$\Delta m_{21}^2[10^-5 \rm eV^2]$ & 6.93-7.97 & 7.37\\ \hline
$\Delta m_{31}^2[10^-3 \rm eV^2]$(NH) & 2.37-2.63 & 2.50\\
$\Delta m_{23}^2[10^-3 \rm eV^2]$(IH) & 2.33-2.60& 2.46\\ \hline
$\sin^2{\theta_{12}}$ & 0.250-0.354 & 0.297\\ \hline
$\sin^2{\theta_{23}}$(NH) & 0.379-0.616 & 0.437\\
(IH) & 0.383-0.637 & 0.569\\ \hline
$\sin^2{\theta_{13}}$(NH) & 0.0185-0.0246 & 0.0214\\
(IH) & 0.0186-0.0248 & 0.0218\\ \hline
$\delta/\pi$ & 0-2(NH)& 1.35\\
& 0-2(IH)& 1.32\\ \hline
\end{tabular}
\caption{Global fit 3$\sigma$ values of $\nu$ oscillation parameters \cite{sigma}} \label{t1}
\end{table}
From type II seesaw mass term,$ \rm M_{RR}$ can be written in the form(from reference \cite{newphysics})as,
\begin{equation}\label{eqa5}
M_{RR}=\frac{1}{\gamma}{\left(\frac{v_R}{M_{W_L}}\right)}^2{ M_\nu}^{II},
\end{equation}
\begin{equation}\label{eqa6}
U_{R}{M_{RR}}^{(diag)}{U_{R}}^T=\frac{1}{\gamma}{\left(\frac{v_R}{M_{W_L}}\right)}^2{ M_\nu}^{II},
\end{equation}
\begin{equation}
{ M_\nu}^{II}= U_{PMNS}{M_\nu}^{(diag)} {U_{PMNS}}^T- U_{(TBM)}U_{Maj}X{M_\nu}^{(diag)}{U_{Maj}}^T{U_{(TBM)}}^T.
\end{equation}
Where,
${M_{RR}}^{(diag)}=diag(M_1, M_2, M_3)$.
We have fine tuned the dimensionless parameter, $\gamma\sim 10^{-10}$. The variation of the RH gauge boson mass with heavy RH neutrino mass as shown in
fig (\ref{fig1}), corresponds to the condition $M_{W_R}>M_N $. As previously mentioned we have considered three different values of the $SU(2)_R$
breaking scale, $v_R$ for our further analysis, specifically 5 TeV, 10 TeV and 18 TeV respectively, which will be useful to study the common parameter space
of the phenomenon we have considered, i.e., BAU, NDBD, LFV. The left handed gauge boson is $M_{W_L}= 80$ GeV and determined the RHS of equation terms of lightest neutrino mass by varying the Majorana phases from 0 to 2$\pi$. By considering a very tiny mass splitting of the Majorana masses
$M_1$ and $M_2$ as per requirement of resonant leptogenesis, we equated both sides of equation (\ref{eqa5}) and obtained $M_1$, $M_2$ and $M_3$,
where, $ M_1\approx M_2$.
\par We considered the lepton number violating and CP violating decays of two heavy RH Majorana neutrinos, $N_1$ and $N_2$ via the decay modes, $N_i\rightarrow l+\phi^{c} $ and its
CP conjugate process, $N_i\rightarrow l^c+\phi $, $i=1, 2$. Firstly, we determined the leptonic CP asymmetry, $\epsilon_1$ and $\epsilon_2$ using equation (\ref{eqa9})
where $ Y_\nu=\frac{M_D}{v}$, v being the VEV of Higgs bidoublet and is 174 GeV. The decay rates in equation (\ref{eqa9}) can be obtained using equation (\ref{eqa10}).
The Dirac mass, $m_D$ as mentioned before is not of any specific texture, but we have obtained
it from the type I seesaw equation in which we have considered the light neutrino mass $M_{LL}$ and the heavy right handed Majorana neutrino mass to be known, which
satisfies the current neutrino oscillation data.
\par The CP violating asymmetries $\epsilon_1$ and $\epsilon_2$ can give rise to a net lepton number asymmetry, provided the expansion rate of the universe is larger than
$\Gamma_1$ and $\Gamma_2$. The net baryon asymmetry is then calculated using \cite{zing}\cite{BA},
\begin{equation}\label{eqa10}
\eta_B \approx -0.96 \times 10^{-2} \sum_i \left(k_i\epsilon_i\right),
\end{equation}
$k_1$ and $k_2$ being the efficiency factors measuring the washout effects linked with the out of equillibrium decay of $N_1$ and $N_2$. We can define the parameters,
$K_i\equiv \frac{\Gamma_i}{H}$ at temperature, $T= M_i$, $H\equiv \frac{1.66 \sqrt{g_*}T^2}{M_Planck}$ is the Hubble's constant with $g_*\simeq$ 107 and
$M_{Planck}\equiv 1.2 \times 10^{19} GeV$ is the Planck mass. The decay width can be estimated using equation (\ref {eqa8}).
For simplicity, the efficiency factors, $k_i$ can be calculated using the formula \cite{K},
\begin{equation}\label{eqa11}
k_1\equiv k_2\equiv \frac{1}{2}{\left(\sum_i K_i\right)}^{-1.2},
\end{equation}
which holds validity for two nearly degenerate heavy Majorana masses and $ 5\leq K_i\leq 100 $. We have used the formula \ref{eqa10} in calculating the baryon asymmetry.
The result is shown as a function of lightest neutrino mass by varying the Majorana phases from 0 to 2 $\pi$ in fig (\ref{fig2}) for different values of RH gauge boson mass.
It is evident from the figure that the cosmologicl observed BAU from RL can be obtained for varying gauge boson mass $M_{W_R}$, distinctively, 5, 10 and 18 TeV in our
case, which is in accordance to several prior works. In the case of mass hierarchy, IH seems to give better results in our analysis. The required amount of BAU
is perceived for lightest neutrino mass of around (0.05-0.1) eV. For $M_{W_R}=$ 18 TeV, greater parameter space satisfies the observed BAU than for 5 TeV.
\subsection{NDBD from heavy RH neutrino not so large left-right mixing}
In LRSM, owing to the presence of several new heavy particles, many new contributions arises to NDBD amplitudes. In a previous work (second reference of\cite{X})
we have considered the new physics contributions coming from the ones mediated by ${W_R}^-$ and $\Delta_R$ respectively. In the present work,
besides the heavy RH neutrino contribution coming from the
exchange of $W_R$ bosons, we also considered the momentum dependent mechanisms also, i.e., the $\lambda$ and $\eta$ contributions to NDBD due to gauge boson mixing since
we have seen non negligible contributions from these momentum dependent mechanisms in our case.
The effective neutrino mass corresponding to the heavy RH neutrino contribution from the exchange of $W_R$ gauge bosons is given by,
\begin{equation}
\rm M^N_{eff}=p^2\frac{{M_{W_L}}^4}{{M_{W_R}}^4}\frac{{U_{Rei}}^*2}{M_i} .
\end{equation}
\par Here, $ \rm <p^2> = m_e m_p \frac{M_N}{M_\nu}$ is the typical momentum exchange of the process, where $ \rm m_p$ and $ \rm m_e$ are the mass of the proton and electron respectively
and $ \rm M_N$ is the NME corresponding to the RH neutrino exchange. The allowed value of p (the virtuality of the exchanged neutrino) is in the range
$\sim $ (100-200) MeV. In our analysis, we have taken p$\simeq$180 MeV \cite{ndbddb2}. As in case of BAU, herein, we have considered different values of
$M_{W_R}$, namely, 5, 10 and 18 TeV respectively. $U_{Rei}$ are the first row elements of the diagonalizing matrix of the heavy right handed Majorana mass matrix
$ \rm M_{RR}$ and $ \rm M_i$ is its mass eigenvalues, $ \rm M_i$.
\begin{itemize}
\item In case of $\lambda$ contribution, the particle physics parameter that measures the lepton number violation is given by,
\begin{equation}
\left|\eta_\lambda\right|=\left(\frac{M_{W_L}}{M_{W_R}}\right)\left|\sum_i U_{e_i} T^*_{e_i}\right|.
\end{equation}
\item While the $\eta$ contribution to NDBD due to $W_L-W_R$ mixing is described by the parameter, $\tan \zeta$, as in equation (\ref{eqx24}),
with particle physics parameter,
\begin{equation}
\left|\eta_\eta\right|= \tan \zeta \left|\sum_i U_{ei} T^*_{ei}\right|.
\end{equation}
\end{itemize}
In the above equations, $U_{e_i}$ represents the elements of the matrix as defined by equation (\ref{eqx19}), and T is represented by equation (\ref{eqx22}), the term
$\left|\sum_i U_{ei} T^*_{ei}\right|$ can be simplified to the form $ -\left[M_DM_{RR}^{-1}\right]_{ee}$ (as in second reference of \cite{lfv1}).
$V_\nu$ in the expression for T is the diagonalizing matrix of $M_\nu$. The effective Majorana neutrino mass due to $\lambda$ and $\eta$ contribution is thus given by,
\begin{equation}
M^\lambda_{eff}=\frac{\eta_\lambda}{m_e} , \\ M^\eta_{eff}=\frac{\eta_\eta}{m_e}.
\end{equation}
The half lives corresponding to these effective mass values is given by,
\begin{equation}
\left[{T_{\frac{1}{2}}}^{0\nu}\right]^{-1}=G^{0\nu}(Q,Z){\left|M^{0\nu}_N\right|}^2\frac{{\left|M^N_{eff}\right|_N}^2}{{m_e}^2},
\end{equation}
\begin{equation}
\left[{T_{\frac{1}{2}}}^{0\nu}\right]^{-1}=G^{0\nu}(Q,Z){\left|M^{0\nu}_\lambda\right|}^2\frac{{\left| M^\lambda_{eff}\right|_N}^2}{{m_e}^2},
\end{equation}
\begin{equation}
\left[{T_{\frac{1}{2}}}^{0\nu}\right]^{-1}=G^{0\nu}(Q,Z){\left|M^{0\nu}_\eta\right|}^2\frac{{\left| M^\eta_{eff}\right|_N}^2}{{m_e}^2},
\end{equation}
where, $G^{0\nu}$ and $\left|M^{0\nu}\right|$ represents the phase space factor and the nuclear matrix elements of the processes which holds different values as in \cite{nme}
Fig (\ref{fig3}) to (\ref{fig7}) shows the effective mass and half life governing NDBD from RH neutrino, $\lambda$ and $\eta$ contribution against the lightest neutrino mass.
For new physics contribution coming from purely RH current, the effective mass governing NDBD is consistent with the experimental results as propounded by
KamLAND-Zen for all the cases ($M_{W_R}$= 5, 10, 18 TeV) although better results is obtained for 18 TeV. It is not much dependent on the mass hierarchy.
Whereas, for NDBD contributions from $\lambda$ and $\eta$ mechanisms, the effective mass is found to be within the experimental limit but of lower magnitude
than the RH neutrino contributions. We have seen that $\eta$ contribution ($10^{-6}-10^{-8}$)eV is around two orders of magnitude less than the $\lambda$
contribution ($10^{-4}-10^{-6}$)eV in all the cases irrespective of the mass hierarchies. Similar results are obtained for the half lives of the process.
\par Fig (\ref{fig8}) to (\ref{fig10}) shows the correlation of NDBD and BAU for the different contributions. It is seen that BAU and NDBD (for RH $\nu$
contribution) can simultaneously satisfy the experimental results for $M_{W_R}=$ 10 and 18 TeV in our case, although for 10 TeV case only IH is consistent
with the experimental bounds. As far as the mixed contributions are concerned, a common parameter space for NDBD and BAU is observed only for RH gauge boson mass
to be 5 TeV and for IH only.
\subsection{Lepton Flavor Violation}
In our analysis, we further studied the LFV processes, $\mu\rightarrow 3e $ and $\mu\rightarrow e\gamma $ and correlated the branching ratios(BR) with the lightest
neutrino mass and the atmospheric mixing angle respectively as in our previous work ( second reference of \cite{X}).
For calculating the BR, we used the expression given in equation (\ref{eq43}) . The lepton Higgs coupling $h_{ij}$ in (\ref{eq44}) can be computed explicitly for a given RH neutrino mass matrix as shown in
equation (\ref{eqa5}) by diagonalizing the RH neutrino mass matrix and obtaining the mixing matrix element, $V_i$ and the eigenvalues $M_i$. For evaluating $M_{RR}$, we
need to know ${ M_\nu}^{II} $, as evident from equation (\ref{eqa5}). We computed ${ M_\nu}^{II} $ from equation (\ref{eqa6}). For determining the BR for $\mu\rightarrow 3e$,
we imposed the best fit values of
the parameters, $\rm{\Delta m_{sol}}^2$, $\rm{\Delta m_{atm}}^2$, $\rm\delta$, $\rm\theta_{13}$, $\rm\theta_{23}$, $\rm\theta_{12}$ in $\rm M_\nu$ .
The numerical values of $\rm{ M_\nu}^{I} $ can be computed considering TBM mixing pattern in our case. Thus, we get $\rm{ M_\nu}^{II} $ as a function of the
parameters $\rm\alpha,\beta$ and $\rm m_{lightest}$.
Then varying both the Majorana phases, $\rm\alpha, \beta$ from 0 to 2$\pi$, we obtained $\rm{ M_\nu}^{II} $ as a function of $m_{lightest}$.
Similarly, for $\mu\rightarrow e\gamma$
we substituted the values of the lightest mass (m1/m3)for(NH/IH) as (0.07eV/0.065eV) and best fit values for the parameters ${\Delta m_{sol}}^2$, ${\Delta m_{atm}}^2$,
$\rm\delta$, $\rm\theta_{13}$, while varying both the Majorana phases, $\alpha, \beta$ from 0 to 2$\pi$ and thus
obtained $\rm{ M_\nu}^{II} $ and hence $\rm M_{RR}$ as a function of the atmospheric mixing angle $\theta_{23}$. Thus BR can be obtained as a function of $\sin^2\theta_{23}$
from equation (\ref{eq43}). We have varied the value of $\rm\sin^2\theta_{23}$ in its 3\rm$\sigma$ range as in \cite{bestfit} and the lightest neutrino mass
from $10^{-3}$ to $10^{-1}$ and obtained the values of BR. Like the previous cases (BAU and NDBD), we have considered three values of the
right handed gauge boson mass, 5 TeV, 10 TeV and 18 TeV respectively and different results have been obtained for these different values.
\par The variation is shown in figure (\ref{fig11}) and (\ref{fig12}) for both NH and IH. It is obvious from the figures that for both the LFV process, a good amount
of parameter space is consistent with the experimental results for the different RH gauge boson mass we have considered i.e. 5, 10 and 18 TeV.
We have shown a summarized form of our results in tabular form in table \ref{t3}.
\begin{figure}[h!]
\includegraphics[width=0.46\textwidth]{MWR.png}
\caption{$M_{W_R}$ against heavy Majorana neutrino mass $M_1$ in TeV For NH and IH.} \label{fig1}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.46\textwidth]{5TEV.png}
\includegraphics[width=0.46\textwidth]{10TEV.png}
\includegraphics[width=0.46\textwidth]{18TeV.png}
\caption{BAU as a function of lightest neutrino mass, $m_1/m_3$ (in eV)for NH/IH. The blue solid line represents the observed BAU in PLANCK '15\cite{planck} for different values
of RH gauge boson mass, 5, 10 and 18 TeV respectively. } \label{fig2}
\end{figure}
\clearpage
\begin{figure}[h!]
\includegraphics[width=0.46\textwidth]{meff5.png}
\includegraphics[width=0.46\textwidth]{meff10.png}
\includegraphics[width=0.46\textwidth]{meff18.png}
\caption{Effective Majorana mass for 0$\nu\beta\beta$ as a function of lightest neutrino mass, for new physics contribution coming from RH $\nu$ for both NH and IH. The
pink solid line represents the KamLAND-Zen upper bound on the effective neutrino mass.} \label{fig3}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.44\textwidth]{mefflamda5.png}
\includegraphics[width=0.44\textwidth]{meffeta5.png}
\includegraphics[width=0.44\textwidth]{mefflamda10.png}
\includegraphics[width=0.44\textwidth]{meffeta10.png}
\includegraphics[width=0.44\textwidth]{mefflamda18.png}
\includegraphics[width=0.44\textwidth]{meffeta18.png}
\caption{Effective Majorana mass for 0$\nu\beta\beta$ as a function of lightest neutrino mass, for new physics contribution coming from $\lambda$ (left figures)and
$\eta$ mechanisms( right figures) for NH and IH for different RH gauge boson masses. The
pink solid line represents the KamLAND-Zen upper bound on the effective neutrino mass.} \label{fig4}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.43\textwidth]{hl5.png}
\includegraphics[width=0.43\textwidth]{hl10.png}
\includegraphics[width=0.43\textwidth]{hl18.png}
\caption{Half life for 0$\nu\beta\beta$ as a function of lightest neutrino mass for NH and IH
for heavy RH neutrino contribution. The horizontal pink line represents the KamLAND-Zen lower bound on the half life of NDBD.} \label{fig5}
\end{figure}
\clearpage
\begin{figure}[h!]
\includegraphics[width=0.43\textwidth]{hllamda5.png}
\includegraphics[width=0.43\textwidth]{hllamda10.png}
\includegraphics[width=0.43\textwidth]{hllamda18.png}
\caption{Half life for 0$\nu\beta\beta$ as a function of lightest neutrino mass for NH and IH
for $\lambda$ mechanism. The horizontal line represents the KamLAND-Zen lower bound on the half life of NDBD.} \label{fig6}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.40\textwidth]{hleta5.png}
\includegraphics[width=0.40\textwidth]{hleta10.png}
\includegraphics[width=0.40\textwidth]{hleta18.png}
\caption{Half life for 0$\nu\beta\beta$ as a function of lightest neutrino mass for NH and IH
for $\eta$ mechanism. The horizontal line represents the KamLAND-Zen lower bound on the half life of NDBD.} \label{fig7}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.37\textwidth]{BAUNDBD5.png}
\includegraphics[width=0.37\textwidth]{BAUNDBD10.png}
\includegraphics[width=0.37\textwidth]{BAUNDBD18.png}
\caption{BAU against effective Majorana neutrino mass for RH $\nu$ contribution.The solid blue and pink line represents the observed BAU and the KAMLAND upper
bound on effective Majorana neutrino mass.} \label{fig8}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.37\textwidth]{BAUNDBDL5.png}
\includegraphics[width=0.37\textwidth]{BAUNDBDL10.png}
\includegraphics[width=0.37\textwidth]{BAUNDBDL18.png}
\caption{BAU against effective Majorana neutrino mass (for $\lambda$ mechanism) . The solid blue and pink line represents the observed BAU and the KAMLAND upper
bound on effective Majorana neutrino mass.} \label{fig9}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.37\textwidth]{BAUNDBDE5.png}
\includegraphics[width=0.37\textwidth]{BAUNDBDE10.png}
\includegraphics[width=0.37\textwidth]{BAUNDBDE18.png}
\caption{BAU against effective Majorana neutrino mass (for $\eta$ mechanism).The solid blue and pink line represents the observed BAU and the KAMLAND upper
bound on effective Majorana neutrino mass.} \label{fig10}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.38\textwidth]{MU3E5.png}
\includegraphics[width=0.38\textwidth]{MU3E10.png}
\includegraphics[width=0.38\textwidth]{MU3E18.png}
\caption{ BR for $\rm \mu\rightarrow 3e $ shown as a function of the lightest neutrino mass. The solid pink line represents the limit of BR as given
by SINDRUM experiment.} \label{fig11}
\end{figure}
\begin{figure}[h!]
\includegraphics[width=0.36\textwidth]{MUEGAMMA5.png}
\includegraphics[width=0.37\textwidth]{MUEGAMMA10.png}
\includegraphics[width=0.41\textwidth]{MUEGAMMA18.png}
\caption{BR for $\rm \mu\rightarrow e\gamma $ shown as a function of the atmospheric mixing angle. The horizontal solid line shows the limit of BR as
given by MEG experiment.} \label{fig12}
\end{figure}
\begin{table}[h]
\centering
\begin{tabular}{||c| c| c| c||}
\hline
OBSERVABLES& 5 TeV NH (IH) & 10 TeV NH (IH) & 18 TeV NH (IH)\\ \hline
NDBD($N_R$) & $ \checkmark (\checkmark)$ & $ \checkmark (\checkmark)$&$ \checkmark (\checkmark)$ \\ \hline
NDBD$(\lambda)$ &$\checkmark(\checkmark)$ & $\checkmark(\checkmark)$&$\checkmark (\checkmark)$ \\ \hline
NDBD$(\eta)$ &$\checkmark(\checkmark)$ & $\checkmark (\checkmark)$&$\checkmark (\checkmark)$ \\ \hline
BAU & $ \checkmark (\checkmark)$ & $ \checkmark (\checkmark)$&$ \checkmark (\checkmark)$ \\ \hline
BAU and NDBD($N_R$) & $ \times (\times)$ & $ \times (\checkmark)$&$ \checkmark (\checkmark)$ \\ \hline
BAU and NDBD$(\lambda)$ & $ \times (\checkmark)$ & $ \times (\times)$&$ \times (\times)$ \\ \hline
BAU and NDBD$(\eta)$ &$ \times (\checkmark)$ & $ \times (\times)$&$ \times (\times)$ \\ \hline
BR$(\mu\rightarrow 3e )$& $ \checkmark (\checkmark)$ & $ \checkmark (\checkmark)$&$ \checkmark (\checkmark)$ \\ \hline
BR$(\mu\rightarrow e\gamma)$ &$ \checkmark (\checkmark)$ & $ \checkmark(\checkmark)$&$ \checkmark (\checkmark)$ \\ \hline
\end{tabular}
\caption{summarized form of the results for NDBD, BAU, LFV for both NH and IH. The $\checkmark$ and $\times$ symbol are used to denote if the observables are (not are) in
the current experimental limit}\label{t3}
\end{table}
\clearpage
\section{DISCUSSION AND CONCLUSION}{\label{sec:level6}}
While calculating the NDBD contribution and BAU we concentrated on an important issue that whether both the phenomena
can be correlated in TeV scale or not. As addressed by the author in \cite{18tev} TeV-scale LRSM, there are complications due to the presence of RH gauge
interactions that contribute to the dilution and washout of the primordial
lepton asymmetry generated via resonant leptogenesis. Combined with the dilution effects from inverse decays and entropy, this
implies that even for maximal CP asymmetry the observed baryon-to-photon ratio can be obtained only if $M_{W_R} \geq18$ TeV.
They have
basically focussed on the possibilities of falsification of leptogenesis owing to the possible experimental observation of RH gauge boson mass of around
$(3-5)$ TeV.
But in the recent papers \cite{3tev} \cite{10tev} authors have taken up this issue and claim that one can generate the baryon asymmetry within the experimental
limit even if RH gauge boson mass is as low as 5 TeV. In their work, instead of assuming maximal CP asymmetry, they calculated the premordial
CP asymmetry as demanded by their specific neutrino fix. Furthermore, they have also shown the consistency of their model with other low energy constraints
like NDBD, LFV etc. thereby specifying the fact that just the possible observation of $W_R$ at LHC alone cannot falsify leptogenesis as a mechanism to generate
matter- antimatter asymmetry of the universe. Since the main purpose of our work is to see if there is a common parameter space where we can establish a
linkage between baryogenesis and the low scale phenomenon like NDBD and LFV, we have done a phenomenological study of these phenomenon at a TeV
scale LRSM considering some specific values of RH Gauge boson mass, 5 TeV, 10 TeV and 18 TeV (as found separately in the earlier works) and check the
consistency of the previous results.
Based on our study, we could arrive at the following conclusions,
\begin{itemize}
\item For a low scale model independent seesaw model, one can account for successful leptogenesis and also the constraints that comes after regarding mass of the
RH gauge bosons is that larger parameter space for BAU with the observed cosmological value is obtained for $M_{W_R}=$ 18 TeV than for 5 TeV.
\item New Physics contributions to NDBD in TeV scale LRSM for different $M_{W_R}$ shows that dominant contribution comes from the exchange of RH gauge boson rather
than the mixed, LH-RH gauge boson mixing contributions. The $\lambda$ contributions to NDBD is a bit suppressed owing to the less Yukawa coupling and not so
large left-right mixing in our analysis while $\eta$ contribution is further supressed by two orders of magnitude that the $\lambda$ contribution.
\item It is possible to obtain a common parameter space for both NDBD and BAU. This corresponds to the NDBD contribution coming from the heavy RH neutrino for both NH
and IH. However, in this case better results are obtained for 18 TeV RH gauge boson mass. Whereas, as far as the
the momentum dependent $\lambda$ and $\eta$ mechanisms are concerned, both NDBD and BAU can be simultaneously explained for $M_{W_R}=$5 TeV or $\leqslant$ 10 TeV and only
for IH.
\item Sizeable implications for other low energy observable,charged LFV of the processes, $\rm \mu\rightarrow 3e $ and $\rm \mu\rightarrow e\gamma$ are obtained for a
minimal TeV scale LRSM which simultaneously accounts for BAU and NDBD.
\par For LFV, the BR prediction for $\rm \mu\rightarrow e\gamma$ is not much dependent on the atmospheric mixing angle, $\theta_{23}$.
\end{itemize}
Having done an extensive study of several of the earlier works, we have found that our results are in accordance with the previous works where low scale phenomena are discussed.
That successful leptogenesis can be
found within the vicinity of the experimental limit for RH gauge boson mass as low as 5 TeV and is not much dependent on the mass hierachy, NH or IH. However, both low scale BAU and
effective mass governing NDBD can be simultaneously obtained for only some
parameter space that depends on the mass hierarchy and the $W_R$ mass as mentioned in the above points. Notwithstanding a more detailed study is preferred in order to give
a strong concluding remark.
\clearpage
\section{APPENDIX}{\label{sec:level7}}
\textbf{Determination of $\rm M_D$:}\\
From type I SS term, $ { M_\nu}^{I}\approx -M_DM^{-1}_{RR}M^T_D$
Again, ${ M_\nu}^{I}= U_{(TBM)}U_{Maj}X{M_\nu}^{(diag)}{U_{Maj}}^T{U_{(TBM)}}^T$
\begin{equation}\label{b2}
M_{RR}=\frac{1}{\gamma}{\left(\frac{v_R}{M_{W_L}}\right)}^2{ M_\nu}^{II}
\end{equation}
Where, ${ M_\nu}^{II}=U_{PMNS}{M_\nu}^{(diag)} {U_{PMNS}}^T- U_{(TBM)}U_{Maj}X{M_\nu}^{(diag)}{U_{Maj}}^T{U_{(TBM)}}^T$.
Considering, X=0.5, $M_{W_L}= 80$ GeV, $v_R= 5$ TeV (for one case only) ,and expressing ${M_\nu}^{(diag)}$ in terms of lightest
neutrino mass, $m_1(m_3)$ for NH (IH), we obtained $M_{RR}$ varying the Majorana phases $\alpha$ and $\beta$ from 0 to 2$\pi$ and lightest neutrino mass
from $10^{-3}$ to $10^{-1}$.
We have considered $M_D$ as,
\begin{equation}\label{b3}
\rm M_{D}=\left[\begin{array}{ccc}
a_1&a_2&a_3\\
a_2&a_4&a_5\\
a_3&a_5&a_6
\end{array}\right],
\end{equation}
which is $\mu-\tau$ symmetric. Equating both sides of type I seesaw equation and solving for $a_1,a_2,a_3,a_4,a_5,a_6$, we obtain
the matrix elements of one of the $M_D$ of the form,
\begin{equation}\label{b4}
\rm M_{D}=\left[\begin{array}{ccc}
24776.2+122368.i&70524.8+76561.i&-12687.1+21472.4i\\
70524.8+76561.i&14308.4+138730.i&-45802.3-46293.4i\\
-12687.1+21472.4i&-45802.3-46293.4i&87313.6+158166.i
\end{array}\right],
\end{equation}
which we have implemented for our further analysis.
\textbf{Elements of the type II Seesaw mass matrix:}
\begin{equation}
S_{11}=\left(c^2_{12}c^2_{13}-X{c_{12}^2}^{TBM}\right)m_1+e^{2i(\beta-\delta)}s^2_{13}m_3+\left(c^2_{13}s^2_{12}-X{s_{12}^2}^{TBM}\right)e^{2i\alpha}m_2
\end{equation}
\begin{equation}
\begin{split}
S_{12}=\left(-c_{12}c_{13}c_{23}s_{12}-c^2_{12}c_{13}s_{13}s_{23}e^{i\delta}+X{c_{12}^{TBM}}{c_{23}^{TBM}}{s_{12}^{TBM}}\right)m_1+\\
\left(-c_{13}s_{12}c_{12}c_{23}e^{2i\alpha}-c_{13}s^2_{12}s_{13}s_{23}e^{i(2\alpha+\delta)}+X{c_{12}^{TBM}}{c_{23}^{TBM}}{s_{12}^{TBM}}e^{2i\alpha}\right)m_2+\\
\left(c_{13}s_{13}s_{23}e^{i(2\beta-\delta)}\right)m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{13}=\left(c^2_{12}c_{13}c_{23}s_{13}e^{i\delta}+s_{12}s_{23}c_{12}c_{13}-X{c_{12}^{TBM}}{s_{12}^{TBM}}{s_{23}^{TBM}}\right)m_1+\\
\left(-c_{13}s_{12}c_{23}s_{12}s_{13}e^{i(2\alpha+\delta)}-X{c_{12}^{TBM}}{s_{12}^{TBM}}{s_{23}^{TBM}}e^{2i\alpha}\right)m_2+\\
\left(e^{i(2\beta-\delta)}c_{13}c_{23}s_{13}\right)m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{21}=\left(-c_{12}c_{13}c_{23}s_{12}-c^2_{12}c_{13}s_{13}s_{23}e^{i\delta}+X{c_{12}^{TBM}}{c_{23}^{TBM}}{s_{12}^{TBM}}\right)m_1+\\
\left(c_{13}s_{12}c_{12}c_{23}e^{2i\alpha}-s^2_{12}s_{13}s_{23}c_{13}e^{i(2\alpha+\delta)}+X{c_{12}^{TBM}}{c_{23}^{TBM}}{s_{12}^{TBM}}e^{2i\alpha}\right)m_2\\
\left(e^{i(2\beta-\delta)}c_{13}s_{23}s_{13}\right)m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{22}=\left({\left(c_{23}s_{12}-e^{i\delta}c_{12}s_{13}s_{23}\right)}^2-X{c_{23}^2}^{TBM}{s_{12}^2}^{TBM}\right)m_1+\\
\left(-X{c_{12}^2}^{TBM}{c_{23}^2}^{TBM}+{\left(-c_{12}c_{23}-e^{i\delta}s_{12}s_{13}s_{23}\right)}^2\right)m_2e^{2i\alpha}+\\
\left(c^2_{13}s^2_{23}-X{s_{23}^2}^{TBM}e^{2i\beta}\right)m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{23}= \left(\left(-c_{12}c_{23}s_{13}e^{i\delta}+s_{12}s_{23}\right)\left(-c_{23}s_{12}-e^{i\delta}c_{12}s_{13}s_{23}\right)+X{c_{23}^{TBM}}{s_{12}^2}^{TBM}{s_{23}^2}^{TBMu}\right)m_1+\\
\left(\left(-e^{i\delta}c_{23}s_{12}s_{13}+c_{12}s_{23}\right)\left(-c_{12}c_{23}-e^{i\delta}s_{12}s_{13}s_{23}\right)+X{c_{12}^2}^{TBM}{c_{23}^{TBM}}{s_{23}^{TBM}}\right)m_2e^{2i\alpha}+\\
\left(c^2_{13}c_{23}s_{23}e^{2i\beta}-{c_{23}^{TBM}}{s_{23}^{TBM}}\right)m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{31}=\left(c^2_{12}c_{13}c_{23}s_{13}e^{i\delta}+s_{12}s_{23}c_{12}c_{13}-X{c_{12}^{TBM}}{s_{12}^{TBM}}{s_{23}^{TBM}}\right)m_1+\\
\left(c_{13}s^2_{12}e^{i\delta}c_{23}s_{13}+c_{12}s_{23}c_{13}s_{12}e^{2i\alpha}-X{c_{12}^{TBM}}{s_{12}^{TBM}}{s_{23}^{TBM}}\right)m_2e^{2i\alpha}+\\
\left(e^{2i\beta-i\delta}c_{13}c_{23}s_{13}\right)m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{32}=\left(\left(-e^{i\delta}c_{12}c_{23}s_{13}+s_{12}s_{23}\right)\left(-c_{23}s_{12}-e^{i\delta}c_{12}s_{13}s_{23}\right)+{c_{23}^{TBM}}{s_{12}^2}^{TBM}{s_{23}^{TBM}}\right)m_1\\
\left(\left(-e^{i\delta}c_{23}s_{12}s_{13}+c_{12}s_{23}\right)\left(-c_{12}c_{23}-e^{i\delta}s_{12}s_{13}s_{23}\right)+X{c_{12}^2}^{TBM}{c_{23}^{TBM}}{s_{23}^{TBM}}\right)e^{2i\alpha}m_2\\
\left(c^2_{13}c_{23}s_{23}-X{c^{TBM}}_{23}{s^{TBM}}_{23}\right)e^{2i\beta}m_3
\end{split}
\end{equation}
\begin{equation}
\begin{split}
S_{33}=\left({\left(-e^{i\delta}c_{12}c_{23}s_{13}+s_{12}s_{23}\right)}^2-X{s_{12}^2}^{TBM}{s_{23}^2}^{TBM}\right)m_1+\\
\left({\left(-e^{i\delta}c_{23}s_{12}s_{13}+c_{12}s_{23}\right)}^2-X{c_{12}^2}^{TBM}{s_{23}^2}^{TBM}\right)e^{2i\alpha}m_2+\\
\left(c^2_{13}c^2_{23}-{c_{23}^2}^{TBM}\right)e^{2i\beta}m_3
\end{split}
\end{equation}
Where, $\rm {c_{ij}^{TBM}}= \cos\theta_{ij}^{TBM}$, $\rm {s_{ij}^{TBM}}=\sin\theta_{ij}^{TBM}$ represents the mixing angles for TBM neutrino mass matrix.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 50 |
Q: Function to return Maximum Value in Array works only when array has one item I created a function to identify the maximum value at an array. The function call works only when the array has one item. Can you check the code below and tell me what you think?
Output I receive
The Highest Grade Student is: Grade: 0.0
Output Needed (example)
The Highest Grade Student is: 976 Grade: 90.0
Highest Grade Function:
public static String highestGrade(Student[] d)
{ // the function checks the highest grade and returns the corresponding id
// d is an array of Student data type
double max = d[0].getScore(); // assigning max value for reference
int gradeCounter = 1; // counter
String topID = ""; // emplty string
// looping through array
for( ; gradeCounter< d.length; gradeCounter++ )
{
if( d[gradeCounter].getID() != "")
// Checking if there is an ID assigned
{ // comparing the score at index with the max value
if(d[gradeCounter].getScore() > max)
{ // if the score is higher than the max value, the max is updated
max = d[gradeCounter].getScore();
topID=d[gradeCounter].getID();
}
}
}
return topID; // returning the id that corresponds to the highest grade
}
Print Report Function
public static void printReport(Student[] c)
{
System.out.print("\n ***Class Report*** \n\n");
// Looping through the array and printing both Id and Grade
for(int idCounter = 0; idCounter<c.length; idCounter++ )
{
if( c[idCounter].getID() != "")
{
System.out.print("ID: ");
System.out.print(c[idCounter].getID());
System.out.print(" Grade: ");
System.out.println(c[idCounter].getGrade());
}
}
//*******This is the part that has the issue*************
// providing the user with the id having the highest grade
System.out.print("\nThe Highest Grade Student is: ");
// assigning a variable to the function call of highestgrade id
String studentHighestGrade=highestGrade(c);
// printing the variable to provide the id
System.out.print(studentHighestGrade);
// providing the user with grade that corresponds to the id
System.out.print(" Grade: ");
// declaring and initializing a variable
double valueOfHighestGrade = 0.0;
// Looping through the array to get the highest grade that
// corresponds to the ID
for(int idCounter = 0; idCounter<c.length; idCounter++ )
{
// if the id at index =idCounter equals the highest id then
// we get the grade (score) at that index and assign it to
// valueOfHighestGrade
if(c[idCounter].getID().equals(studentHighestGrade))
{
valueOfHighestGrade=c[idCounter].getScore();
}
}
// printing the highest grade (score)
System.out.print(valueOfHighestGrade);
countGrades( c);
System.out.print("\n ***End of Report*** \n");
}
A: If you only have one Student in your array,
as you are doing int gradeCounter = 1; // counter then you will not get the value of the student id,
so before your loop in highestGrade do
topID = d[0].getId();
Not sure why you are doing if (c[idCounter].getID() != "") though
A: Advice to use equals method to compare String instance.
A: *
*If the highest score is in first entry u will not get any output bcz u have set "max" as 1st student's score but not "topID"
*If the max score will be acquired by multiple students then it will return only the student whose entry is in first .Return type of "highestGrade" is String so you can get only get 1 student's marks in o/p even if multiple students get highest mark
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 3,038 |
L'escut d'Alcàntera de Xúquer és un símbol representatiu oficial del municipi valencià d'Alcàntera de Xúquer (Ribera Alta). Té el següent blasonament:
Història
L'escut fou aprovat mitjançant Resolució de 18 de juliol de 1985, de la Conselleria de Governació, publicada en el DOGV núm. 296, de 17 d'octubre de 1985.
Els quatre pals són les armes del Regne de València. La resta d'elements són senyals parlants al·lusius al nom de la localitat: l'ala, per semblança fonètica amb l'inici del topònim, i el pont sobre el Xúquer perquè, segons l'etimologia àrab, al-qantara vol dir, precisament, 'el pont'.
Vegeu també
Llista d'escuts del País Valencià.
Escuts i banderes de la Ribera Alta.
Referències
Alcantera de Xuquer | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 5,331 |
Robert L. Winkler is James B. Duke Professor in the Fuqua School of Business, Duke University and also holds an appointment in the Department of Statistical Science at Duke. He is a member of the decision sciences area at Fuqua, and he served as Senior Associate Dean for Faculty and Research from 1991 through 1997. Professor Winkler received his Ph.D. from the University of Chicago. Prior to joining the Duke faculty in 1984, he was Distinguished Professor of Quantitative Business Analysis at Indiana University, and he has held visiting positions at the University of Washington, the International Institute for Applied Systems Analysis (Laxenburg, Austria), Stanford University, and several times at INSEAD (Fontainebleau, France and Singapore).
Professor Winkler's primary research areas include decision analysis, risk analysis, statistics, and forecasting. He has published more than 200 articles and several books, and has received support from the National Science Foundation and other sources. He was awarded the Frank P. Ramsey Medal for significant contributions to decision analysis and he has also been a recipient of the NCNB Faculty Award in the Fuqua School of Business. His research focuses on probability forecasting, the combination of forecasts, decision modeling, and Bayesian statistical models for inference and decision. He has held a number of editorial positions and has been an officer in several professional organizations.
Professor Winkler has taught courses in statistics and decision analysis in Fuqua's MBA and EMBA programs. He taught the statistical models course in Fuqua's Global Executive MBA Program from the program's inception in 1996 until 2010, and he was the recipient of the Distinguished Teaching Award from the first GEMBA class. He also teaches a Ph.D. course in Bayesian inference and decision.
Winkler, RL. An Introduction to Bayesian Inference and Decision. Probabilistic Pub, January 1, 2003.
Winkler, RL, Maridakis, RL, and Deplas, M. PSI: Programmes de Statistique Interactif. Les Editions d'Organisation, 1988.
Winkler, RL, and Maridakis, S. ISP: Interactive Statistical Programs. St Paul, MN: West, 1986.
Winkler, RL. Statistical Methods. Ed. DL Harnett. 1975.
Hays, WL, and Winkler, RL. Statistics: probability, inference, and decision. Holt, Rinehart and Winston, 1970.
Winkler, RL, Makridakis, S, Andersen, A, Carbone, R, Fildes, R, Hibon, M, Lewandowski, R, Newton, J, and Parzen, E. The Forecasting Accuracy of Major Time Series Method. Chichester, UK: Wiley.
DENUIT, M, EECKHOUDT, L, TSETLIN, I, and WINKLER, RL. Multivariate concave and convex stochastic dominance. July 1, 2010.
Murphy, AH, and Winkler, RL. "Probabilistic tornado forecasts: some experimental results." (January 1, 2017).
Nau, RF, Jose, VRR, and Winkler, RL. "Duality Between Maximization of Expected Utility and Minimization of Relative Entropy When Probabilities are Imprecise." 2009.
Winkler, RL. "Evaluation of probabilities: A level playing field?." 1999. | {
"redpajama_set_name": "RedPajamaC4"
} | 713 |
Q: XCode 12/Swift 4 Custom Cells not displaying on UI Table Cell View Ok so, I am trying to make a custom table that has a news feed from newsapi, from my debugging: the api calls and such get made and the data is acessed, its just that it doesnt display on the table, it shows up as a blank table.
Here is the code:
This is from the "first view controller" as I am using the tabbed template
import UIKit
class FirstViewController: UIViewController, UITableViewDelegate,UITableViewDataSource {
@IBOutlet weak var tableView: UITableView!
var articles: [Article]? = []
override func viewDidLoad() {
super.viewDidLoad()
fetchArticles()
}
func fetchArticles(){
let urlRequest = URLRequest(url: URL(string: "https://newsapi.org/v2/top-headlines?country=us&?category=business&apiKey=sorrynotgivingmykey")!)
let task = URLSession.shared.dataTask(with: urlRequest){(data,response,error) in
if error != nil{
print(error)
return
}
self.articles = [Article]()
do{
let json = try JSONSerialization.jsonObject(with: data!, options: .mutableContainers) as! [String: AnyObject]
if let articlesFromJson = json["articles"] as? [[String: AnyObject]]{
for articlesFromJson in articlesFromJson{
let article = Article()
if let title = articlesFromJson["title"] as? String, let desc = articlesFromJson["description"] as? String, let url = articlesFromJson["url"] as? String, let imageToUrl = articlesFromJson["urlToImage"] as? String, let date = articlesFromJson["publishedAt"] as? String{
article.headline = title
article.desc = desc
article.url = url
article.imageUrl = imageToUrl
article.date = date
// print(article.date)
// print(article.headline)
}
self.articles?.append(article)
}
}
DispatchQueue.main.async {
self.tableView.reloadData()
}
}catch let error{
print(error)
}
}
task.resume()
// print(articles)
}
func tableView(_ tableView: UITableView, numberOfRowsInSection section: Int) -> Int {
return self.articles!.count
}
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell = tableView.dequeueReusableCell(withIdentifier: "worklmao", for: indexPath) as! ArticleCell
cell.title.text = self.articles?[indexPath.item].headline
cell.desc.text = self.articles?[indexPath.item].desc
cell.date.text = self.articles?[indexPath.item].date
print("lol lmao hahax help fuck shit")
return cell
}
func numberOfSections(in tableView: UITableView) -> Int {
1
}
}
And this is the cell classes I used for the articles
import UIKit
class ArticleCell: UITableViewCell {
@IBOutlet weak var date: UILabel!
@IBOutlet weak var desc: UILabel!
@IBOutlet weak var title: UILabel!
@IBOutlet weak var ImgView: UIImageView!
override func awakeFromNib() {
super.awakeFromNib()
// Initialization code
}
override func setSelected(_ selected: Bool, animated: Bool) {
super.setSelected(selected, animated: animated)
// Configure the view for the selected state
}
}
This is the article class
import UIKit
class Article: NSObject {
var headline: String?
var desc: String?
var url: String?
var date: String?
var imageUrl: String?
}
and bare in mind I did setup the class for the cell properly(at least I think
Still, this is what I get:
A: Don't forget to connect dataSource and delegate for tableView.
Change your tableView outlets to this:
@IBOutlet weak var tableView: UITableView! {
didSet {
tableView.delegate = self
tableView.dataSource = self
}
}
Some points:
*
*You don't have to declare articles array as optional. Simply do this :
var articles = [Article]()
*Try to learn about codables for JSON parsing.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 4,856 |
Psychedelic prints, gypsy necklaces, statement fringes, tribal prints, and an unapologetically free spirit. All you need to resemble a bohemian diva. We have the right ensembles to compliment your adventurous and unconventional personality.
What would you like to create today?
Are you sure you want to log out ? | {
"redpajama_set_name": "RedPajamaC4"
} | 2,392 |
sudo apt-get --assume-yes install vagrant
| {
"redpajama_set_name": "RedPajamaGithub"
} | 2,522 |
What if the Founders' generation read the news as we do?
By Larry Kummer, Editor / 14 Comments / 19 April 2015 14 September 2016
Summary: Each day the internet washes up piles of information for us. We have tech allowing us to sort out what we want to see — operationally useful information for work and politically pleasing information about politics. Today we discuss why the information superhighway of political news so seldom affects our action. Fortunately the Founders' generation read the news with more engagement, or we'd be signing "God Bless the Queen" before watching cricket. {2nd of 2 posts today.}
This is a followup to What if Samuel Adams tried to start the Revolution by blogging?
We appear to have entered the final stage of this political cycle. After decades of their slow growth in power — aggregating more and more of our wealth and income — the 1% have begun the equivalent of the third stage of battle: the pursuit of a broken enemy to crush the remnant of opposition and consolidate victory. Every day's news brings more evidence, such as the shocking stories shown below from this weekend's news.
These are of interest not as news in the conventional sense, since they tell us more about what we already know (pouring more water on a rock does not make it wetter). That's why I no longer write posts giving interesting links. There are so many other sites doing a better job providing such entertainment to the outer party.
These stories have value as indicators where we are in the evolution from Republic to plutocracy. I doubt they have any other utility, excerpt in a technical sense (e.g., to people professionally involved in these areas). But at the end are some conclusions you might find of interest.
Government for the 1%, by the 1%, of the 1%
"House quietly passes tax exemption for megadonors"
By Kenneth P. Vogel & Hillary Flynn at Politico — Opening:
The House on Wednesday with little fanfare passed legislation that would protect major donors like the Koch brothers and Tom Steyer from having to pay gift taxes on huge donations to secret money political groups. The legislation, which now heads to the Senate, is seen by fundraising operatives as removing one of the few remaining potential obstacles to unfettered big-money spending by nonprofit groups registered under a section of the Tax Code — 501(c) — that allows them to shield their donors' identities.
Deciding how to share the pie
"Determining the optimal U.S. tax rate for higher earners", by Nick Bunker at the Washington Center for Equitable Growth. Excerpt:
There are two constants in life: death and arguments about the optimal top marginal tax rate. The proper level of income taxation in the United States has been a hotly contested topic since the creation of the first federal income tax more than a century ago. The debate over the optimal tax rate has only intensified in recent years, as income and wealth inequality in the United States increases while taxes on the rich decline. Policymakers need an empirical answer to the question of the optimal level of taxation on top incomes.
… The results of this research also indicate that the rise in income inequality at the very top of the income spectrum was driven primarily by the decline in tax rates, which allowed top earners to get higher incomes without increasing the pace of economic growth. So the main take-away from latest research is clear: Tax rates in the United States on incomes at the very top could be much higher without affecting output growth and potentially boost wages for average workers.
The fight of the decade: the NSA & FBI vs. Citizens of America
"NSA and FBI fight to retain spy powers as surveillance law nears expiration", The Guardian — Excerpt:
On 1 June, Section 215 of the Patriot Act, which permits US law enforcement and surveillance agencies to collect business records, expires. … representatives of the National Security Agency and the FBI are taking to Capitol Hill to convince legislators to preserve their sweeping spy powers.
That effort effectively re-inaugurates a surveillance debate in Congress that has spent much of 2015 behind closed doors. Within days, congressional sources tell the Guardian, the premiere NSA reform bill of the last Congress, known as the USA Freedom Act, is set for reintroduction – and this time, some former supporters fear the latest version of the bill will squander an opportunity for even broader surveillance reform.
… {It} passed the House in May 2014 before narrowly failing in November in the Senate. Belatedly, the White House endorsed it, after seeing it had a greater chance of passage than any pro-NSA alternative. Yet the House version lost substantial civil-libertarian support after the intelligence agencies and House leadership weakened its surveillance restrictions, including its central prohibition on the bulk collection of domestic phone records. … The revived bill would extend the expiring provisions of the Patriot Act for a still-undetermined number of years.
For a starker perspective see Mike Krieger's "Congress is Attempting to Reauthorize Key Patriot Act Provisions by Sneaking it Into USA Freedom Act".
The Boomers' mystery, as Kennedy's assassination was for the Greatest Generation
Who did the anthrax attack after 9/11? The government's various stories have been totally discredited. The original designated "guilty" party, Steven Hatfill, not only proved his innocence but won a $4.6 million civil verdict from the Federal government. Bruce Ivins (the next designated "guilty" party) didn't win any civil suits (although the case against him was ludicrously weak) because (like Lee Harvey Oswald) he died under somewhat mysterious circumstances.
All we know for sure is that the spores came from a US government lab, were beyond the ability of any non-state actor to produce, and that the anthrax attack played a large role in gaining approval for the Patriot Act,
The nature of the Federal government's role remains hidden, but details continue to leak out — oddly with little public interest (nobody wants their world upended, their complacency shattered).
The latest revelations come from Richard Lambert, the FBI agent who ran the investigation. The New York Times reports the story but typically buries the lede: "Former F.B.I. Agent Sues, Claiming Retaliation Over Misgivings in Anthrax Case". Fox runs a more accurate headline: "Former FBI director alleges agency concealing evidence in anthrax case". For the real story go to Washington's blog: "HEAD of the FBI's Anthrax Investigation Says the Whole Thing Was a SHAM".
@FabiusMaximus01 @FearDept Why do some have a good bs detector, but most just buy what's fed to them?
— gregorylent (@gregorylent) April 19, 2015
This is the question of our time! "Why" is a question about people's behavior that defies answering other than by guessing. But to deduce the reason for behavior we can look at its effects. What if Americans were to see that the Republic is near death? It would mean acknowledging that we didn't see the world accurately. We'd have the ugly choice between acting — fulfilling our duty as citizens by working, taking risks, making sacrifices as did previous generations of Americans — or acknowledging our irresponsibility by doing nothing.
This would produce cognitive dissonance of the severest kind. We avoid this by closing our eyes. Simple. Effective. Eventually events will force us to acknowledge the New America. Probably too late for effective action — giving us a good reason for passivity.
Meanwhile we read about events. We keep well-informed. We cheer! and boo! giving us catharsis. It's a fool's paradise.
Other posts in this series
What if Samuel Adams tried to start the Revolution by blogging?
Samuel Adams started the Revolution because he didn't have Twitter.
If you liked this post, like us on Facebook and follow us on Twitter. See all posts about the decay of the Second Republic (built on the Constitution), and those about ways to reform America — paths to a new politics.
14 thoughts on "What if the Founders' generation read the news as we do?"
How about Puerto Rico, and the hundreds of people that the FBI killed there?
Salient,
I don't understand your question. What's the relevance of that to this post?
Dear FBI- Calle 13
the chorus of this very popular song includes the phrase
"100×35 is the caliber"
Editor, You Sir mentioned the FBI,
who defines what is related to what?
"the post mentioned the FBI"
Well, OK. That seems an extreme form of topic drift, but each to his own.
"who defines what is related to you"
What? I asked you to explain the relevance of your comment to the post. I didn't ask God for a ruling on the matter.
I didnt say ""who defines what is related to you?" but "who defines what is related to what?" read carefully
You have posted 33 comments in the past few hours. Almost all brief; posted under different aliases. Mostly argumentative, many senseless, some with profanity.
Troll defenses have been triggered. No more comments are allowed.
gzuckier
Flooding a comments thread with increasingly hostile comments seems to be an odd way to win adherents to one's cause; particularly when there would seem to be a favorable audience initially.
gzuckier,
It's classic troll behavior. Especially posting rapid-fire short weird irrelevant comments (e.g., posting poetry, links to music videos). This one also follows the standard pattern of creating new identities and posting again.
It's a mystery why trolls do these things. They're the vandals of the internet. Like bugs, one just has to keep squishing them until they're gone (until another attack).
Gloucon X
"Why do some have a good bs detector, but most just buy what's fed to them?"
"What if Americans were to see that the Republic is near death? It would mean acknowledging that we didn't see the world accurately."
I haven't watched TV news in at least five years, but I do occasionally click on some network links. I think Bernie Sanders gives an accurate view of America's situation in this interview(notice the reporter's "horse-race" framing wastes half the time and his constant interrupting of and obvious lack on interest in the substance). Could Sam Adams get his message through media like this?
http://video.foxnews.com/v/4182587039001/is-sen-bernie-sanders-ready-to-challenge-hillary-clinton/?#sp=show-clips
Gloucon,
"Could Sam Adams get his message through media like this?"
Sam Adams would laugh at that. The colonial press did not operate under Freedom of the Press, a concept that lie in the future. The revolutionary movement was a small minority in the beginning, and never achieved a majority until after victory.
Anyway; reasons for know-nothingism amongst the American public;
wishful thinking, the knowledge that to accept the information would mean having to do something about it, the desire to go day to day with our comfortable existence rather than make a break in our routine and start an unpleasant struggle which is not very likely to be successful, certainly not totally successful, inexperience and confusion about what to do given that we haven't had to deal with this stuff for a while, the hope that things won't really hit the fan until after we're dead, the business (and busyness) of our 21st century day to day tactical activities keeping us from strategic thinking and deeds, the liberal (in the political philosophy sense) paradigm of wanting to help the underclass, but not at the cost of our own privileged and comfortable lifestyle, the ginned up intergroup hostility (divide and conquer) diffusing the total energy for remediation into dozens of different, often competitive channels, the redefinition of "citizen" into consumer (of infotainment as much as anything else) rather than producer or actor….
Values aside, it's evolution in its most basic and general form. If a system is unstable, it will morph into a different system, and so on, until if finally lands on a configuration where, for whatever reasons, the factors add up to a stable situation; and there it will sit, until something big enough comes along to kick it back into play.
But it is most definitely the question of our time, along with its corollary: what then must we do? Or more precisely, what then must I do?
Perhaps it's the question of our time. But its certainly a question few ask. I see few people writing about it, a sure indicator of low demand (most people are more sensible in their content than I). My 50 posts about this get fewer than usual hits. And few comments. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 4,656 |
\section*{Supplementary information}
\subsection*{Preparation of a 2D superfluid}
We begin the preparation of a Bose-Einstein condensate (BEC) of cesium atoms confined in an optical dipole trap with horizontal (vertical) trap frequency of $\sim 12\,\rm{Hz}$ ($\sim 70\,\rm{Hz}$) through an evaporative cooling procedure.
The $s$-wave scattering length is then gradually decreased to a small value $a\approx12a_{0}$ via a Fechbach resonance \cite{chin2010feshbach}, where $a_{0}$ is the Bohr radius. The BEC is then loaded into a 2D box potential. The vertical confinement of the box is provided by a single node of a repulsive standing wave potential with $ 3\,\rm{\mu m}$ periodicity. The measured vertical trap frequency in the node is $\omega_{z}\approx 2\pi \times 1.8\,\rm{kHz} $ ($\gg k_{\rm{B}}T/\hbar,\, \mu /\hbar$) deeply in the 2D regime, where $k_B$ is the Boltzmann constant, $T < 10~$nK is the temperature, $\mu$ is the chemical potential, and $\hbar$ the reduced Plank constant. The atoms populate the vibrational ground state in the vertical trap with a harmonic oscillator length $l_{z}=\sqrt{\hbar/(m\omega_{z})}\approx 207\,\rm{nm}$, where $m$ is the atomic mass. The horizontal confinement is arbitrarily configured via a blue-detuned light ($780\,\rm{nm}$) patterned with a digital mirror device and projected through a high numerical aperture objective lens (N.A.$\approx 0.6$). In this work we use a circular box with an inner radius of $\approx15 \,\rm{\mu m}$ and a width of $\approx 5\,\rm{\mu m}$.
We obtain in situ density distribution of 2D gases by performing absorption imaging through the same objective lens and recording the image on a CCD camera. The image resolution is $\sim 0.8\,\rm{\mu m}$. The atomic surface density $n$ is calibrated using a similar scheme discussed in \cite{hung2011situ}. Typical initial density is $n \approx 50\,\rm{\mu m^{-2}}$ at a fixed 2D interaction strength $g=\sqrt{8\pi}a/l_{z}\approx0.017$. Shortly after the box potential height is quenched to the final strength ($\approx k_B \times 9~$nK), the bulk density reduces to $n \approx 42\,\rm{\mu m^{-2}}$ and remains roughly constant throughout the subsequent evolution, presumably due to initial finite atom spilling over the box wall. The resulting healing length is $\xi = 1/\sqrt{ng} \approx 1.2\,\rm{\mu m}$, larger than our image resolution.
\subsection*{Soliton and vortex detection}
To obtain the mean position of a ring dark soliton (RDS), we measure mean density linecuts $\bar{n} (x,\,y_{0})$ and $\bar{n} (x_{0},\,y)$ typically averaged over 5 images. By convolving the linecuts with a Gaussian Kernel of a width $\sim$ the healing length $\xi$, we obtain a scale-space representation that suppresses features smaller than $\xi$. A Laplacian of this convolution generates positive features for intensity minima, which correspond to the mean locations of dark stripes. These procedures are applied to the density linecuts obtained at different times $t$ to visualize the evolution of dark stripe locations, as shown in the right panel of Fig.\ref{fig:fig2}(a). The resulting filters are binarized using an amplitude threshold, and are used to determine the initial velocities as well as the radius of an RDS for azimuthal density analysis. At later times ($t\gtrsim 60\,\rm{ms}$) after the box quench, an RDS breaks into vortex dipoles. Vortices are detected automatically using a vortex image processing algorithm \cite{rakonjac2016measuring}, in which the analysis is restricted to dips having nearly zero density ($\lesssim 4\,\rm{\mu m^{-2}}$) to avoid spurious detections.
\subsection*{Wave function and radial dynamics of a ring dark soliton}
An RDS is a quasi-stationary solution of the time-dependent 2D Gross-Pitaevskii equation (GPE),
\begin{equation}
i \hbar \frac{\partial \psi}{\partial t} = \left[-\frac{\hbar^2}{2m}\left( \frac{\partial^2}{\partial r^2} + \frac{1}{r} \frac{\partial }{\partial r} + \frac{1}{r^2}\frac{\partial^2}{\partial \phi^2}\right) + \frac{\hbar^2 g}{m} |\psi|^2\right] \psi \, .
\end{equation}
Assuming rotational symmetry, the wave function of a perfect RDS only has radial dependence. To good approximation, it can be written as
\begin{equation}
\psi(r,t) =\sqrt{n}\left[ i\sqrt{1-d} + \sqrt{d} \tanh (r-r_\mathrm{c})/w \right] e^{-i \mu t/\hbar} \, ,
\end{equation}
where $r_\mathrm{c}(t)$ is the radial position of the density defect, $d=1-(v/v_\mathrm{s})^2 \leq 1$ its depth, $v=\dot{r}_\mathrm{c}$ its radial velocity, and $w=\xi/\sqrt{d}$ its characteristic width. Here, the background density $n$, the healing length $\xi = 1/\sqrt{ng}$, the sound speed $v_\mathrm{s}=\hbar/\xi m$, and the chemical potential $\mu = m v_\mathrm{s}^2$ are the bulk properties of the superfluid. Whereas, the radial motion $v$, width $w$ and depth $d$ are all related to each other; fixing one parameter completely determines the other two. A faster-(slower-)moving soliton would have a shallower (deeper) depth and a broader (narrower) density profile.
This radial wave function is essentially the dark soliton solution in 1D, except that it is perturbed by the $r^{-1}\partial/\partial r$ Laplace term in the 2D GPE. A consequence of this perturbation is that $(d,w,v)$ slowly evolve as the radius of an RDS changes \cite{kivshar1994ring}. The dynamics of an RDS differs from that of a 1D dark soliton. In particular, the soliton depth follows the relation
\begin{equation}
d = d(0) \left[ \frac{r_\mathrm{c}(0)}{r_\mathrm{c}} \right]^{2/3} \, ,
\end{equation}
where $d(0)$ and $r_c(0)$ are the initial depth and radius of the RDS. This additional equation further relates $(d, w, v)$ with $r_\mathrm{c}$. The depth increases (decreases) as an RDS shrinks (expands), and the width and radial velocity change accordingly.
An explanation for this radius-dependent dynamics is from energy conservation. As discussed in \cite{brazhnyi2006dark}, the energy of a 1D dark soliton is $\epsilon=(4/3)\hbar v_\mathrm{s} n d^{3/2}$. For a dark soliton stripe in 2D, $\epsilon$ is the linear energy density. In a uniform medium, the total energy of an RDS is $2\pi r_{c} \epsilon$. For an adiabatic evolution with conserved RDS total energy, one must have $r_{c}(0) d(0)^{3/2} = r_{c} d^{3/2}$, thus leading to the same result obtained from the perturbation theory \cite{kivshar1994ring}.
\subsection*{Time-dependent GPE simulation}
We perform 2D GPE simulations \cite{antoine2013computational} to obtain numerical evidence of RDS emission in our quench protocol. The initial ground state wave function is confined in a repulsive wall potential of the form
\begin{equation}
U(r) = \begin{cases}
U_0 e^{-2 (r-R)^2/\sigma^2} & r \leq R \\
U_0 & r >R\\
\end{cases}
\end{equation}
where $U_0$ is the trap strength, $R$ the box radius, and $\sigma$ the experimentally calibrated $1/e^2$ width of the wall. In the time-dependent GPE, the trap strength is quenched from $U_0=k_B\times 45~$nK to the final value $U_f=k_B\times 9~$nK, and we evaluate the subsequent dynamics of the wave function. We note that in the experiment the wall has a radial Gaussian profile of finite width instead of a semi-infinite form taken in the GPE simulation. The former is responsible for finite atom spilling after the potential is quenched down. The results shown in Fig.~\ref{fig:fig1} are calculated using atom number $N=2.2 \times 10^4$ matching that of the initial experimental condition. While we have obtained qualitative one-to-one agreement of RDS emission and its subsequent evolution, the exact timing cannot be fully matched. The emitted RDS tends to move faster in GPE simulation, and we have increased $U_0$ by $\sim 30\%$ to increase the quench contrast, which slows down the RDS velocity. The slower RDS dynamics observed in the experiment may be due to finite atom-spilling right after the quench, which leads to a lower sound speed and thus a lower RDS velocity.
To take into account density fluctuations in a superfluid, we imprint phase noise in the initial GPE wave function to simulate phonon excitations. Given an initial temperature ($T\approx 3-7~$nK), we calculate the phonon populations according to the Bose-Einstein distribution plus zero-point fluctuations,
\begin{equation}
n_p(k)=\frac{1}{e^{E(k)/k_B T}-1} + \frac{1}{2} = \frac{1}{2}\coth \frac{E(k)}{2k_B T} \, ,
\end{equation}
where $E(k)$ is the Bogoliubov phonon dispersion relation. We populate random Bogoliubov phonon excitations in the ground state wavefunction, with statistical amplitude variance in each mode matching $n_p(k)$. We then evolve the wave function in the time-dependent GPE. We have also taken into account total atom number fluctuations in the experiment, and performed a series of GPE calculations with $N=(2.2 \pm 0.4 )\times 10^4$. Given the range of temperature and atom number fluctuations, we observe numerically RDS fragmentation into necklaces of weakly bound vortex dipoles, tightly bound dipoles, or rarefaction pulses. Representative results are plotted in Fig.~\ref{fig:fig4} (b). Most of the necklaces consist of a chain of $l=2$ vortex dipoles or rarefaction pulses. Increasing the atom number or interaction strength $g$, $l \geq 3$ necklaces can be observed.
\end{document}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 8,891 |
Our All Out Email is very intuitive and easy to use. It's one of the only email marketing applications that offer every customer a private IP address. All Out Email is the most cost-effective web-based email marketing solution and offers features comparable to applications that cost thousands of dollars. We do not require that you sign a one-year contract, as most other robust applications do.
Why Should Your Business Use E-Newletters?
They Work! And "works" is an understatement! Based on research conducted by the Direct Marketing Association, email marketing is predicted to return an incredible $48.29 for every dollar spent in 2008! That's more than double the average return for other forms of online marketing and more than 6 times the return from print catalogs.
Online HTML tool allows you to create rich HTML emails with ease.
No advertising footer on custom emails. | {
"redpajama_set_name": "RedPajamaC4"
} | 9,554 |
H&M Modern Chic Collaboration with Maison Martin Margiela
martin margiela maison martin
Maison Martin Margiela x Cutler & Gross Line 8 Sunglasses London-based Cutler & Gross teams up with Maison Martin Margiela to produce two collections of handmade frames : Anatomic with large, enveloping shapes and Wrong Size with purposely misfitting lenses. While Martin Margiela's values are...
Slowly but surely, images of Maison Martin Margiela's collaboration with H&M are finding their way into the public. Just a month ago, a dress from the capsule appeared, and now pictures from the complete campaign are available. br> H&M on Tuesday released campaign images for the collaboration,...
H&M's New Collabortion – The latest high fashion house rumored to collaborate with Swedish retailer H&M is Maison Martin Margiela. Known for its avant-garde looks like the one above, the one-off collection is allegedly set to hit stores during the holiday season, and if Margiela's past looks...
Margiela is one of the most important and influential fashion houses of the past three decades," said H&M creative advisor Margareta van den Bosch. "I am so excited by this radical collaboration, which will give fashion lovers around the world the chance to wear special pieces by Maison...
trendy and chic. Shoes Maison Martin Margiela.
Photos courtesy of H&M Last night, the Maison Martin Margiela with H&M collection was celebrated at 5 Bleeker Street in New York City, the venue was amazing. The event was held across 9 floors at the venue at the historical building in the city's financial district. Kanye West, Sarah Jessica...
Kanye West, Leandra Medine, and Mia Moretti In Maison Martin Margiela for H&M. Photo: Courtesy of H&M The fact that the launch event for the Maison Martin Margiela x H&M collaboration last night was beyond A-list (A+ List?) comes as no surprise. Immortalized in lyrics of hip-hop songs by...
That's because approximately 8 hours from now, one of the most anticipated collaboration, MAISON MARTIN MARGIELA with H&M, will be available at select H&M retail locations worldwide. Like the Lanvin for H&M and Versace for H&M collaborations in the years past, MAISON MARTIN MARGIELA with H&M...
"MAISON MARTIN MARGIELA is one of the most important and influential fashion houses of the past three decades. I am so excited by this radical collaboration which will give fashion lovers around the world the chance to wear special pieces by MAISON MARTIN MARGIELA. This collaboration will be a...
Maison Martin Margiela Women's Structured Wool Skirt Maison Martin Margiela Women's Structured Wool Skirt Materials: wool. Pair the Maison Martin Margiela skirt with your favorite shoes for a chic and ... Maison Martin Margiela women's mid-rise slim-leg jeans Maison Martin Margiela...
Pierre Hardy bag | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 4,472 |
\section{Optimal Transport Between (Un)Normalized Measures}\label{sec:background}
We introduce in this section Wasserstein distances for non-negative measures on a finite metric space $(\Omega,D)$. Simply put, we consider normalized histograms on a grid of locations, and assume the distance between any two locations is provided. Next, we extend Wasserstein distances to non-negative vectors of \emph{bounded mass}.
\paragraph{Notations.} Let $d$ be the cardinal of $\Omega$. Relabeling arbitrarily all the elements of $\Omega$ as $\{1,\cdots, d\}$ we represent the set of non-negative measures on $\Omega$ by the non-negative orthant $\RR^{d}_+$. Let $\one_d$ be the $d$-dimensional vector of ones. For any vector $u\in\mathbb{R}^d$ we write $\smabs{u}_1$ for the $l_1$ norm of $u$, $\sum_{i=1}^d \smabs{u_i}$. When $u\in\RR^{d}_+$ we also call $\smabs{u}_1$ the (total) \emph{mass} of vector $u$. Let $M=[m_{ij}]\in\mathbb{R}^{d\times d}_+$ be the matrix that describes the metric between all locations in $\Omega$, namely $m_{ij}=D(i,j), i,j\leq d$.
\paragraph{Wasserstein Distance for Normalized Histograms.}
Consider two vectors $a,b\in\RR^{d}_+$ such that $\smabs{a}_1=\smabs{b}_1$. Both can be interpreted as histograms on $\Omega$ of the same mass. A non-trivial example of such normalized data in medical imaging is the discretized ODF used for diffusion imaging data~\cite{descoteaux-etal:2009}. For $p\geq 1$, the $p$-Wasserstein distance $W_p(a,b)$ between $a$ and $b$ is the $p^\text{th}$ root of the optimum of a linear program, known as a \emph{transportation problem} \cite[\S7.2]{bertsimas1997introduction}. A transport problem is a network flow problem on a bipartite graph with cost $M^p$ (the pairwise distance matrix $M$ raised element-wise to the power $p$), and feasible set of flows $U(a,b)$ (known as the transportation polytope of $a$ and $b$), where $U(a,b)$ is the set of $d\times d$ nonnegative matrices such that their row and column marginals are equal to $a$ and $b$ respectively:
\begin{equation}\label{eq:polytope}
U(a,b) \overset{\text{def}}{=} \{ T\in\mathbb{R}_+^{d\times d}\; |\; T\one_d = a,\, T^T\one_d = b \}.
\end{equation}
Given the constraints induced by $a$ and $b$, one naturally has that $U(a,b)$ is empty when $\smabs{a}_1\ne\smabs{b}_1$ and non-empty when $\smabs{a}_1=\smabs{b}_1$ (in which case one can easily check that the matrix $ab^T/\smabs{a}_1$ belongs to that set). The $p$-Wasserstein distance $W_p(a,b)$ raised to the power $p$ (written $W^p_p(a,b)$ below) is equal to the optimum of a parametric Optimal Transport ($\mathbf{OT}$) problem on $d^2$ variables,
\begin{equation}\label{eq:primal}W_p^p(a,b) = \mathbf{OT}(a,b,M^p)\overset{\text{def}}{=}\min_{T\in U(a,b)}\dotprod{T}{M^p},\end{equation}
parameterized by the marginals $a,b$ and matrix $M^p$.
\paragraph{Optimal Transport for Unnormalized Measures.} If the total masses of $a$ and $b$ differ, namely $\smabs{a}_1\ne\smabs{b}_1$, the definition provided above is not useful because $U(a,b)=\emptyset$. Several extensions of the OT problem have been proposed in that setting; we recall them here for the sake of completeness. In the computer vision literature, \cite{rubner1997earth} proposed to handle that case by:
\emph{(i)} \emph{relaxing}
the equality constraints of $U(a,b)$ to inequality constraints $T\one_d \leq a,\, T^T\one_d \leq b$ in Equation~\eqref{eq:polytope}; \emph{(ii)} \emph{adding an equality constraint} on the total mass of the solution $\one_d^TT\one_d=\min(\smabs{a}_1,\smabs{b}_1)$; \emph{(iii)} \emph{dividing} the minimum of $\dotprod{T}{M}$ under constraints \emph{(i,ii)} by $\min(\smabs{a}_1,\smabs{b}_1)$. This modification does not, however, result in a metric. \cite{pele2008linear} proposed later a variant of this approach called EMD-hat that incorporates constraints \emph{(i,ii)} but \emph{(iii')} adds to the optimal cost $\dotprod{T^\star}{M}$ a constant times $\min(\smabs{a}_1,\smabs{b}_1)$. When that constant is large enough $M$, \cite{pele2008linear} claim that EMD-hat is a metric. We also note that \cite{benamou2003numerical} proposed a quadratic penalty between the differences of masses and made use of a dynamic formulation of the transportation problem.
\paragraph{Kantorovich Norms for Signed Measures.} We propose to build on early contributions by Kantorovich to define a generalization of optimal transport distance for unnormalized measures, making optimal transport applicable to a wider class of problems, such as the averaging of functional imaging data. \cite{kantorovich1958space} proposed such a generalization as an intermediary result of a more general definition, the \emph{Kantorovich norm} for signed measures on a compact metric space, which was itself extended to separable metric spaces by~\cite{hanin1999extension}. We summarize this idea here by simplifying it to the case of interest in this paper where $\Omega$ is a finite (of size $d$) probability space, in which case signed measures are equivalent to vectors in $\mathbb{R}^d$. \cite{kantorovich1958space} propose first a norm for vectors $z$ in the orthogonal of $\one_d$ (vectors $z$ such that $z^T\one_d=0$), by considering the 1-Wasserstein distance between the positive and negative parts of $z$, $\norm{z}_K= W_1(z_+,z_-)$. A penalty vector $\Delta\in\RR^{d}_+$ is then introduced to define the norm $\norm{x}_{K}$ of \emph{any} vector $x$ as the minimal value of $\norm{z}_K + \Delta^T\smabs{z-x}$ when $z$ is taken in the space of all vectors $z$ with zero sum, and $\smabs{z-x}$ is the element-wise absolute value of the difference of vectors $z$ and $x$.
For this to define a true norm in $\mathbb{R}^d$, $\Delta$ must be such that $\Delta_i\geq \max_j m_{ij}$ and $\smabs{\Delta_i-\Delta_j}\leq m_{ij}$. The distance between two arbitrary non-negative vectors $a,b$ of different mass is then defined as $\norm{a-b}_K$.
As highlighted by~\cite[p.108]{villani09}, and if we write $e_i$ for the $i^{\text{th}}$ vector of the canonical basis of $\mathbb{R}^d$, this norm is the maximal norm in $\mathbb{R}^d$ such that for any $i,j \leq d$, $\norm{e_i-e_j}_K=m_{ij}$, namely the maximal norm in the space of signed measures on $\Omega$ such that the norm between two Dirac measures coincides with $\Omega$'s metric between these points.
\paragraph{Kantorovich Distances for Unnormalized Nonnegative Measures.} \cite{guittet2002extended} noticed that Kantorovich's distance between unnormalized measures can be cast as a regular optimal transport problem. Indeed, one simply needs to: \emph{(i)} add a \emph{virtual point} $\omega$ to the set $\Omega=\{1,\cdots,d\}$ whose distance $D(i,\omega)=D(\omega,i)$ to any element $i$ in $\Omega$ is set to $\Delta_i\,$; \emph{(ii)} use that point $\omega$ as a buffer when comparing two measures of different mass. The appeal of Kantorovich's formulation in the context of this work is that it boils down to a classic optimal transport problem, which can be approximated efficiently using the smoothing approach of \cite{cuturi2013sinkhorn} as discussed in Section~\ref{sec:contrib}. To simplify our analysis in the next section, we only consider non-negative vectors (histograms) $a\in\RR^{d}_+$ such that their total mass is upper bounded by a known positive constant. This assumption alleviates the definition of our distance below, since it does not require to treat separately the cases where either $\smabs{a}_1 \geq \smabs{b}_1$ or $\smabs{a}_1 < \smabs{b}_1$ when comparing $a,b\in\RR^{d}_+$. Note also that this assumption always holds when dealing with finite collections of data. Without loss of generality, this is equivalent to considering vectors $a$ in $\RR^{d}_+$ such that $\smabs{a}_1\leq 1$ with a simple rescaling of all vectors by that constant. We define next the Kantorovich metric on $S_d$, where $S_d=\{u\in\RR^{d}_+, \smabs{u}_1 \leq 1\}$.
\begin{definition}[Kantorovich Distances on $S_d$] Let $\Delta\in\RR^{d}_+$ such that $\Delta_i\geq \max_j m_{ij}$ and $\smabs{\Delta_i-\Delta_j}\leq m_{ij}$. Let $p\geq 0$. For two elements $a$ and $b$ of $S_d$, we write $\alpha= 1-\smabs{a}_1\geq 0$ and $\beta= 1-\smabs{b}_1\geq 0$. Their $p$-Kantorovich distance raised to the power $p$ is
\begin{equation}\label{eq:kantodis}K^p_{p \Delta}(a,b)= \mathbf{OT}(\smallmat{a\\\alpha},\smallmat{b\\\beta},\hat{M}^p), \text{ where } \hat{M}=\begin{bmatrix}M & \Delta\\\Delta^T & 0\end{bmatrix}\in\mathbb{R}_+^{d+1\times d+1}.\end{equation}
\end{definition}
The Kantorovich distance inherits all metric properties of Wasserstein distances: the mapping which to a vector $a$ associates a vector $[a;1-\smabs{a}_1]\in\Sigma_{d+1}$ can be regarded as a feature map, to which the standard Wasserstein distance using $\hat{M}$ (which is itself a metric matrix) is applied.
\section{Conclusion}
The contributions of this work are two-fold.
First, by considering non-normalized measures particularly
relevant for medical imaging data
we extend the current state of the art in barycenter estimation
using transportation metrics.
Following recent contributions on discrete optimal transport
we propose a smoothed version of the transport problem
that leads us to an efficient optimization algorithm.
While many contributions on optimal transport work only in one or two
dimensions on a regular grid, our approach can cope with the
complex geometry of the brain (irregular grids and surfaces).
Only the definition of a ground metric is here required.
The algorithm proposed involves simple operations
that are particularly adapted to modern GPU hardware and allows
us to compute barycenters on full brain data in a few minutes.
Second, with simulations defined on the cortex triangulation,
a publicly available fMRI dataset with 20 subjects
and an MEG dataset processed with a standard analysis pipeline
with 16 subjects we demonstrated the
ability of the method to clearly highlight activation foci
while avoiding the need to smooth the data. The fMRI data
showed a clear activation in the right motor cortex and
on the MEG data we showed that the proposed approach better
identified activation foci in the primary visual cortex and the
fusiform gyrus. Both findings, that are consistent with previous
neuroscience literature, show that method proposed yields
more accurate results than the current pipelines which
furthermore requires to set a kernel bandwidth
parameter. The removal of any free parameter in the pipeline
is a way towards more reproducible neuroimaging results.
Due to the non-linearity of the approach the estimation of
statistical threshold shall be performed with non-parametric
permutation tests. When thresholding barycenters as presented
in Section~\ref{sec:experiments} it is expected that one will
obtain clear clusters.
\section{Kantorovich Mean of Unnormalized Measures}\label{sec:contrib}
Consider now a collection $\{b^1,\cdots, b^N\}$ of $N$ non-negative measures on $(\Omega,D)$ with mass upper-bounded by $1$, namely $N$ vectors in $S_d$. Let $\beta^j=1-\abs{b^j}$ be the deficient mass of $b^j$. Our goal in this section is to find, given a vector of virtual costs $\Delta$ and an exponent $p$, a vector $a$ in $S_d$ which minimizes the sum of its $p$-Kantorovich distances $K^p_{p \Delta}$ to all the $b^j$,
\begin{equation}
\label{eq:originalkantomean}\tag{P1}
a \in \underset{u\in S_d}{\argmin} \frac{1}{N}\sum_{j=1}^N K_{p \Delta}^p(u,b^j)
=\underset{u\in S_d}{\argmin} \frac{1}{N}\sum_{j=1}^N \mathbf{OT}(\smallmat{u\\1-\smabs{u}_1},\smallmat{b^j\\\beta^j},\hat{M}^p).
\end{equation}
Because of the equivalence between Kantorovich distances for points in $S_d$ and Wasserstein distances in the $d+1$ simplex, this problem can be naturally cast as a Wasserstein barycenter problem~\cite{agueh2011barycenters} with metric $\hat{M}$. Problem (P1) can be cast as a linear program with $N(d+1)^2$ variables. For the applications we have in mind, where $d$ is of the order or larger than $10^4$, solving that program is not tractable. We discuss next computational approaches to solve it efficiently.
\paragraph{Smooth Optimal Transport.} \cite{rabin2012} and \cite{BRPP13} have proposed efficient algorithms to solve the Wasserstein barycenter problem in low dimensional Euclidean spaces. These approaches are not, however, suitable when one considers observations on the cortex, for which \emph{all pairs shortest path} metrics (inferred from a graph structure connecting all voxels) are preferred over Euclidean metrics. To solve Problem~\eqref{eq:originalkantomean} we turn instead to a recent series of algorithms proposed in \cite{cuturi2014fast}, \cite{benamou2014iterative} and \cite{cuturi2015smoothed} that all exploit the regularized OT approach suggested in \cite{cuturi2013sinkhorn}. Among these recent approaches, we propose to build in this work upon the first algorithm in \cite{cuturi2014fast}, which can be easily modified to incorporate constraints on $a$. This flexibility will prove useful in the next section.
The strategy of \cite{cuturi2014fast} is to regularize directly the optimal transport problem by an entropic penalty, whose weight is parameterized by a parameter $\lambda>0$,
\[
\mathbf{OT}_\lambda(a,b,M^p)\overset{\text{def}}{=}\min_{T\in U(a,b)}\dotprod{T}{M^p}-\frac{1}{\lambda} H(T),
\]
where $H(T)$ stands for the entropy of the matrix $T$ seen as an element of the simplex of size $d^2$,
$H(T) \overset{\text{def}}{=} - \sum_{ij} t_{ij} \log (t_{ij})$.
As shown by \cite{cuturi2014fast}, the regularized transport problem $\mathbf{OT}_\lambda$ admits a unique optimal solution. As such, $\mathbf{OT}_\lambda(a,b,M^p)$ is a differentiable function of $a$ whose gradient can be recovered through the solution of the corresponding smoothed dual optimal transport. Without elaborating further on this approach, we propose to simply replace all expressions that involve an optimal transport problem $\mathbf{OT}$ in our formulations by their smoothed counterpart $\mathbf{OT}_\lambda$
\paragraph{Sensitivity of Kantorovich Means to the Parameter $\Delta$.} The magnitude of the solution $a$ to Problem~\eqref{eq:originalkantomean} depends directly on the virtual distance $\Delta$. Suppose, for instance, that $\Delta=\varepsilon \one_d$ with $\varepsilon$ arbitrarily small. In that case $a$ should converge to a unit mass on the last (virtual) bin and would therefore be equal to the null histogram $\mathbf{0}_d$ on the $d$ other bins. If, on the contrary, $\Delta=\gamma\one_d$ and $\gamma$ is large, we obtain that $K_{p\Delta}^p(a,b)/\gamma$ grows as $\abs{\,\smabs{a}_1-\smabs{b}_1}$. Therefore a minimum of Problem~\eqref{eq:originalkantomean} would necessarily need to have a total mass that minimizes $\sum_j\abs{\,\smabs{a}_1-\smabs{b^j}_1}$, namely a total mass equal to the median mass of all $b^j$.
This sensitivity of the solution $a$ to the magnitude of $\Delta$ may be difficult to control. Choosing adequate values for $\Delta$, namely setting the distance of the virtual point to the $d$ other points, may also be a difficult parameter choice. To address this issue we propose to simplify our framework by introducing an equality constraint on the mass of the barycenter $a$ in our definition, and let $\Delta$ be any non-negative vector, typically set to a large quantile of the distribution of all pairwise distances $M_{ij}^p$ times the vector of ones $\one_d$. Under these assumptions, we can now propose $p$-Kantorovich means with a constraint on the total mass of $a$. Remaining parameters in our approach are therefore only $p$ and $\lambda$. In practice we will fix $p=1$, which corresponds to the Earth Mover's Distance~\cite{rubner1997earth}, and use a high $\lambda$, namely a small entropic regularization of order $1/\lambda$, which has also the merit of making Problem~\eqref{eq:originalkantomean} strongly convex. $\lambda$ is set in our experiments to $100/\text{median}(M)$, where $\text{median}(M)$ is the median of all pairwise distances $\{M_{ij}\}_{ij}$.
\begin{definition}[$p$-Kantorovich Means with Constrained Mass] Let $\Delta\in\RR^{d}_+$ and $p\geq 0$. A Kantorovich mean with a target mass $\rho\leq 1$ of a set of $N$ histograms $\{b^1,\cdots, b^N\}$ in $S_d$ is the unique vector $a$ in $S_d$ such that:
$$a\in \underset{\substack{a\in S_d\\\smabs{a}_1=\rho}}{\argmin}\frac{1}{N}\sum_j \mathbf{OT}_\lambda(a,b^j,\hat{M}^p).$$
\end{definition}
We provide in Algorithm~\ref{algo:kantor} an implementation of~\cite[Alg.1]{cuturi2014fast}. Unlike their version, we only consider a fixed step-length exponentiated gradient descent, and add a mass renormalization step. We set the default mass of the barycenter to be the mean of the masses of all histograms. We use the notation $\circ$ for the elementwise (Schur) product of vectors. Note that the computations of $N$ dual optima in line 7 of Algorithm~\ref{algo:kantor} below can be vectorized and computed using only matrix-matrix products. We use GPGPUs to carry out these computations.
\begin{algorithm}
\begin{algorithmic}[1]
\caption{$p$-Kantorovich Barycenter with Constrained Mass\label{algo:kantor}}
\STATE \textbf{\emph{Input}}: $\{b^1,\cdots,b^N\} \subset S_d$, metric $M$, quantile $q$, $p\geq 0$, entropic regularizer $\lambda>0$, step size $c$.
\STATE Compute mean mass $\rho=\frac{1}{N}\sum_i \smabs{b^j}_1$.
\STATE Form virtual cost vector $\Delta=\text{quantile}(M,q\%)\one_d$.
\STATE Form augmented $d+1\times d+1$ ground metric $\hat{M}$ as in Equation~\eqref{eq:kantodis}
\STATE Set $a=\one_{d+1}/(d+1).$
\WHILE{$a$ changes}
\STATE Compute all dual optima $\alpha^j$ of $\mathbf{OT}_\lambda(a,b^j,\hat{M})$ using \cite[Alg.3]{cuturi2014fast}
\STATE $a\leftarrow a \circ \exp(-c \frac{1}{N}\sum_{j=1}^N \alpha^j)$; (gradient update)
\STATE $a_i \leftarrow \begin{cases}\rho a_i/\sum_{l=1}^d a_l &\text{ if } i\leq d, \\
1-\rho &\text{ if } i=d+1.\end{cases}$ (projection on the simplex/mass constraint)
\ENDWHILE
\STATE \textbf{\emph{Output}} $a_{1:d}\in S_d$.
\end{algorithmic}
\end{algorithm}
\section{Application to the Averaging of Neuroimaging Data}\label{sec:experiments}
Neuromaging data are defined on a grid of voxels, eventually
restricted to the brain volume, or on a triangulation of the cortical mantle
obtained by segmentation of MRI data.
Examples of data most commonly analyzed on a grid are fMRI data,
while neural activity estimates derived from MEG/EEG data are often
restricted to the cortical surface~\cite{dspm}. Anatomical data such as
cortical thickness, which is a biomarker of certain neurodegenerative pathologies,
is also defined on the surface. In all cases the data are defined
on a discrete set of points (voxels or vertices) which have a
natural distance given by the geometry of the brain. The data are
also non-normalized as they represent physical or statistical
quantities, such as thickness in millimeters or F statistics.
Such data are therefore particularly well adapted to the algorithm
proposed in this paper: they are defined on discrete space, are non-normalized
and there exists a natural ground metric.
The difficulty when averaging neuroimaging
data is the anatomo-functional variability: every brain is different.
The standard approach to compensate for this variability
across subjects is to smooth the data to favor the
overlap of signal of interest after the individual data have been
ported to a common space using anatomical landmarks
(anatomical registration). Volume data are typically redefined
in MNI space while surface data are transferred to an average
cortical surface, using for instance the FreeSurfer
software\footnote{\url{https://surfer.nmr.mgh.harvard.edu/}}. When working
with fMRI the spatial variability is commonly compensated
by smoothing the data with an isotropic Gaussian kernel of Full Width at Half Maximum (FWHM) between 6 and
8\,mm. MEG and EEG suffer from the same spatial variability, but also
from the temporal variability of neural responses which is compensated
by low pass filtering the data. By employing a transportation metric
informed by the geometry of the domain, this smoothing procedure
as well as the setting of the kernel bandwidth are not needed.
In the following experiments we focus on spatial
averaging, although extension to spatiotemporal data is straightforward
provided the metric is defined along the time axis.
When working with a voxel grid the distance is the Euclidian
distance taking into account the voxel size in millimeters, and
when working on a cortical triangulation, the distance used
is the geodesic distance computed on the folded cortical mantle.
We now present results of a simulation study where standard averaging
with Gaussian smoothing is compared to Kantorovich means.
Simulation results are followed by experimental results obtained
with fMRI data from 20 subjects and MEG data
on a population of 16 subjects.
\paragraph{Simulation setup.}
In this experiment using on a triangulation of the cortex,
we simulated signals of interest in two brain regions using the functional
parcellation provided by the FreeSurfer software. We used regions
Broadman area 45 (BA45) and the visual area MT. We simulated for a group
of 100 subjects random positive signals in these two regions. For each
subject and each region, the signal is focal at a random location
with a random amplitude generated with a truncated Gaussian distribution
(mean 5, std. dev. 1.). We use here focal signals to exemplify
the effect of optimal transport. Such signals could correspond to dipolar
activations derived from MEG/EEG using dipole fitting methods~\cite{scherg-etal:85}
or sparse regression techniques~\cite{wipf-etal:07,gramfort-etal:2013}.
Figure~\ref{fig:simu_results} presents the locations of the two
regions (labels), the averages with and without Gaussian
smoothing and the Kantorovich average.
Gaussian smoothing leads to a highly
blurred average which exceeds the extent of the regions of interest,
while it also strongly reduces the amplitudes of the signals,
potentially washing out the statistical effects.
The peak amplitudes obtained with optimal transport are also
higher and closer to the individual peak amplitudes.
One can clearly observe the limitations of Gaussian smoothing,
which furthermore requires to set the bandwidth of the kernel.
The Kantorovich average nicely highlights two foci of signals
at the group level.
\begin{figure}[t!]
\centering
\includegraphics[width=0.6\linewidth]{fig1.pdf}
\caption{Simulation results with focal random signals generated in areas/labels BA45 (yellow) and MT (red)
in a group of 100 subjects. Data are defined on a surface with 10,024 vertices
(FreeSurfer fsaverage 5).
One shows the standard averaging referred to as \emph{Mean},
the averaging after Gaussian smoothing is referred to as \emph{Mean (S)}
(mean after Gaussian smoothing with FWHM=8\,mm),
and the Kantorovich mean (p=1).
The result \emph{Mean} shows the focal signals with
random positions in the labels delineated in green. The Kantorovich mean
highlights clear foci of activations in the ROIs without
smearing the activation as with Gaussian smoothing which furthermore
significantly dampens the amplitudes.}
\label{fig:simu_results}
\end{figure}
\paragraph{Results on fMRI data.}
We used here fMRI data analyzed on a voxel grid.
It corresponds to 20 subjects from the database described in~\cite{pinel2007}.
We average here the standardized effect of interest induced by left hand button press.
In Fig.~\ref{fig:fmri_grid_results}-a we show the Euclidian average without
smoothing.
In Fig.\ref{fig:fmri_grid_results}-b we report
results obtained by classical averaging following Gaussian smoothing
with FWHM of 8\,mm. Fig.\ref{fig:fmri_grid_results}-c
shows the Kantorovich mean with constrained mass. One can observe that
this barycenter highlights a clear active
region without requiring any kernel smoothing. It also leads
to a amplitude in the average standardized effect around 1.7 which
is much higher than the 0.23 obtained when smoothing.
\begin{figure}[t!]
\centering
\includegraphics[width=0.27\linewidth]{mean_fmri.pdf}
\includegraphics[width=0.27\linewidth]{mean_s_fmri.pdf}
\includegraphics[width=0.27\linewidth]{ot_fmri.pdf}
\caption{Averaging of the standardized effect of interest on fMRI
data.
From left to right, a) the Euclidian mean without smoothing,
b) the Euclidian mean with smoothing (FWHM=8\,mm), c)
the Kantorovich mean with Euclidian ground metric and p=1.
The later result highlights a clear foci of activations
in the ROI without smearing the activation nor
damping the amplitudes as much as the kernel smoothing.}
\label{fig:fmri_grid_results}
\end{figure}
\paragraph{Results on MEG data.} We now evaluate the benefit of the proposed
approach on experimental data. These data were acquired
with a Neuromag VectorView system (Elekta Oy, Helsinki, Finland)
with 306 sensors arranged in 102 triplets, each comprising two orthogonal
planar gradiometers and one magnetometer. Subjects are presented with images
containing faces of familiar (famous)
or unfamiliar persons and so called ``scrambled'' faces.
See~\cite{henson-etal:11} for more details.
Dataset contains 16 subjects. For each one, event related fields (ERF) were
obtained by averaging about 200 repetitions of recordings following
stimuli presentations. Data were band pass filtered between 1 and 40\,Hz.
Following standard MEG source localization pipelines~\cite{mne}, a noise covariance
was estimated from prestimulus time intervals and used for
source reconstruction with the cortically constrained
dSPM method~\cite{dspm}.
The values obtained with dSPM can be considered as F statistics,
where high values are located in active regions.
In Figure~\ref{fig:meg_results}, we present results at a single
time point, 190\,ms after stimulus onset,
which corresponds to the time instant where the dSPM amplitudes
are maximum. Data correspond the visual presentation of
\emph{famous faces}.
In green, is the border of the primary visual
cortex (V1) provided by the FreeSurfer functional atlas.
One can observe that the Kantorovich barycenter yields
a more focal average nicely positioned in the middle of
the calcarine fissure where V1 is located.
Such a strong activation in V1 is expected in
such an experiment consisting of visual stimuli.
To investigate more subtle cognitive effects, such as the
response of the fusiform face area (FFA) reported
about 170\,ms after stimulation in the
literature~\cite{kanwisher-etal:97,henson-etal:11}, we
report results obtained on contrasts of ERFs measured after famous faces
presentations \emph{vs.} scrambled faces. As illustrated in
Figure~\ref{fig:meg_results_ffa}, Kantorovich mean
nicely delineates a focal source of activity in the ventral
part of the cortex known as the fusiform gyrus.
These results show that Kantorovich means provides focal
activation at the population level despite the challenging
problem of inter-subject anatomo-functional variability.
They avoid the smearing of the signal or statistical effects of interests
which naturally occur when data are spatially
smoothed before standard averaging.
Note again that here no smoothing parameter with FWHM in millimeters
is manually specified. Their solution only depends on the metric
naturally derived from the geometry
of the cortical surface.
With a cortical triangulation containing 10,024 vertices and 16 subjects
the computation on a Tesla K40 GPU of one barycenter takes less than
1\,min.
\begin{figure}[h!]
\centering
\includegraphics[width=0.33\linewidth]{test_meg_brain_L2_mean_white.png}
\includegraphics[width=0.33\linewidth]{GradProj_test_meg_brain_ot_mean_p1_alpha00-5_white.png}
\caption{Average of dSPM estimates derived from MEG ERF data on a group of 16 subjects stimulated with
pictures of famous faces. From left to right: standard mean and Kantorovich mean.
The left hemisphere is displayed in medial view.
In green is the border of the primary visual cortex (V1) provided by FreeSurfer.
One can observe that the Kantorovich mean has its peak amplitude within V1.}
\label{fig:meg_results}
\end{figure}
\begin{figure}[h!]
\centering
\includegraphics[width=0.325\linewidth]{famous_scrambled_test_meg_brain_L2_mean_time_white_time000.png}
\includegraphics[width=0.325\linewidth]{famous_scrambled_GradProj_test_meg_brain_ot_mean_p1_lambda60_alpha00-5_time_white_time000.png}
\caption{Group averages (16 subjects) of dSPM estimates derived from MEG
ERF data obtained by contrasting the famous faces stimulation with the scrambled faces.
From left to right: standard mean and the Kantorovich mean.
The right hemisphere is displayed in ventral view. Optimal transport results highlight a focal
activity in the Fusiform gyrus known to be implicated in face
processing~\cite{kanwisher-etal:97}.}
\label{fig:meg_results_ffa}
\end{figure}
\section{Introduction}
Computing the average of some observations may seem like a trivial problem,
yet it remains an active topic of research in mathematics, statistics and
applications such as medical imaging. The problem of atlas computation
from images~\cite{Joshi2004S151}, or meshes \cite{Durrleman201435},
or the problem of group analysis from functional imaging
data~\cite{thirion-etal:2007} are particularly relevant for this field.
The challenge is that natural
phenomena are usually described in terms of physical and temporal event locations,
along with their intensity. While Euclidean averaging is
standard and has some benefits such as low computation time, this
procedure ignores the geometry of the space the observations belong to;
the image of an average brain image obtained by Euclidean averaging of
individual voxels does not yield the image of the brain of an average
individual.
Starting from observations defined on a regular or irregular grid, our aim is to provide a
\emph{model-free} approach to \emph{average} them that only builds upon geometric arguments. An example of such data are functional MRI (fMRI) data defined on a voxel grid or a triangulated cortical surface. The approach aims to be intrinsically geometric in the sense that it \emph{only} requires the prior knowledge of a metric between the locations on the grid. The technique aims to be versatile in the sense that it can be applied to weighted samples
taking values on a discretized space with no assumptions on the regularity of the metric.
The approach we propose is inspired by optimal transport theory~\cite{villani09}
and can be seen as an extension of the Wasserstein barycenter problem~\cite{agueh2011barycenters,rabin2012,cuturi2014fast}, which aims at estimating a probability measure which bests approximates a family of probability measures in the Wasserstein metric sense. The challenge of using optimal transport in the setting we consider comes from the fact that Wasserstein distances (and their barycenters) are defined for \emph{probability} measures only. While some data are normalized such the Orientation Diffusion Function (ODF) in diffusion MRI~\cite{descoteaux-etal:2009}, a number of medical imaging data are non-normalized. Here we bypass this limitation using a generalization of optimal transport distances proposed by~\cite{kantorovich1958space}. This extension comes at a price, since it introduces an additional parameter (the cost of adding or removing mass) which can be difficult to tune. We propose a simple way to mitigate this problem by introducing a natural constraint on the overall mass of the barycenter, which we set to be equal to the average of the masses of all samples. We provide an efficient method to compute Kantorovich means by building upon the first algorithm of~\cite{cuturi2014fast}. We provide intuitions on the behavior of our method and demonstrate its relevance with simulations and experimental results obtained with fMRI and MEG data which are neuroimaging data defined on a voxel grid or a triangulation of the folded cortical mantle.
This paper is organized as follows. We start in Section~\ref{sec:background} with a reminder on optimal transport and the Kantorovich metric for non-normalized measures. We introduce Kantorovich means in Section~\ref{sec:contrib} and describe efficient algorithms to compute them. Section~\ref{sec:experiments} contains simulations and results on publicly available fMRI data with 20 subjects and MEG data with 16 subjects.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 0 |
package org.wso2.carbon.identity.application.authentication.framework.handler.hrd;
import org.wso2.carbon.identity.application.authentication.framework.exception.FrameworkException;
public interface HomeRealmDiscoverer {
public String discover(String value) throws FrameworkException;
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 1,768 |
{"url":"https:\/\/www.physicsforums.com\/threads\/highly-symmetric-spacetimes.146042\/","text":"# Highly symmetric spacetimes\n\n1. Nov 30, 2006\n\n### Stingray\n\nIn 4 dimensions, a spacetime can have a maximum of 10 linearly independent Killing vectors. Are there known examples of spacetimes (satisfying Einstein's equation) with 7, 8, or 9 Killing vectors? I know FRW cosmologies have 6 Killing vectors, but I'm looking for something a bit more symmetric that still has varying curvature.\n\n2. Dec 1, 2006\n\n### Chris Hillman\n\nSolutions with 7 Killing vectors: two explicit examples, plus caveat\n\nHi, Stingray,\n\nThe book by Stephani et al., Exact Solutions of the Einstein Field Equations, 2n Ed., Cambridge University Press, 2001, is a gold mine of information for this classical topic, although it will require some work to extract all the relevant information. (This book offers some nifty tables which can help to quickly get the general idea, however.)\n\nA complete answer would be very complex, but the very short answer is that there are many solutions with 0-4 Killing vectors, and of course an certain explicit vacuum solution has the maximal number of 10, but not very many exact solutions possess \"intermediate\" dimensional Lie algebras of Killing vectors. Indeed, there are various results to the effect that such and such a class is the only spacetime model with various properties and 5 or 6 Killing vectors (one of these refers to the famous Goedel dust, which has 5 Killing vectors but which escapes being isotropic as well as homogeneous). Similarly if you allow homotheties, affine collineations, or other generalizations of Killing vectors.\n\nI seem to recall that there are some dimensions in the range 7-9 which do not occur at all, at least with some restrictions on the Ricci curvature (i.e. on the stress-energy tensor).\n\nOn a more positive note, I can offer a few explicit examples of exact solutions with 7 Killing vectors . The generic plane wave (EK9, the ninth class in the Ehlers & Kundt classification of vacuum plane waves, also SG10, the tenth class in the Sipple and Goenner classification of all plane waves) has a 5 dimensional Lie algebra of Killing vectors, but there are some interesting special cases which have one or two extra ones. In particular, SG16 and SG17 possess seven dimensional Lie algebras of Killing vector fields.\n\nA specific example: the line element of SG16 can be written (in the harmonic or Brinkmann chart)\n$ds^2 = -a^2 \\, \\left( X^2+Y^2 \\right) \\, dU^2 - 2 \\, dU \\, dV + dX^2 + dY^2,$\n$-\\infty < U, V, X, Y < \\infty$\nIf you compute the Einstein tensor you find this is a \"null dust solution\" modeling something like \"incoherent EM radiation\" unaccompanied by gravitational radiation, since this exact plane wave solution happens to conformally flat! A simple choise of seven linearly independent Killing vector fields is:\n$\\partial_U, \\; \\partial_V, \\; \\partial_\\Theta = -Y \\, \\partial_X + X \\, \\partial_Y$\n$a X \\, \\cos(a U) \\, \\partial_V + \\sin(a U) \\partial_X$\n$a X \\, \\sin(a U) \\, \\partial_V - \\cos(a U) \\partial_X$\n$a Y \\, \\cos(a U) \\, \\partial_V + \\sin(a U) \\partial_Y$\n$a Y \\, \\sin(a U) \\, \\partial_V - \\cos(a U) \\partial_Y$\nwhere the first and third in this list are \"extras\".\n\nYou mentioned \"varying curvature\"; you'd probably consider this example to fail that test. For example, using the standard NP tetrad constructed from the Brinkmann chart,\n$$\\vec{\\ell} = \\partial_U - a^2\/2 \\, \\left( X^2 + Y^2 \\right) \\, \\partial_V, \\; \\vec{n} = \\partial_V, \\; \\vec{m} = \\frac{1}{\\sqrt{2}} \\left( \\partial_X + i \\, \\partial_Y \\right)$$\nthe Weyl scalars all vanish and the only nonvanishing Ricci scalar (other than the NP Lambda) is $$\\Phi_{00} = a^2$$.\n\nBut you would probably admit SG17 as an example with \"time-varying curvature\". In a harmonic or Brinkmann chart, the line element can be written\n$ds^2 = -\\frac{m \\, \\left( X^2+Y^2 \\right)}{U^2} \\; dU^2 - 2 \\, dU \\, dV + dX^2 + dY^2,$\n$0 < U < \\infty, \\; -\\infty < V, X, Y < \\infty$\nThe two extra Killing vectors here are\n$$U \\partial_U - V \\partial_V, \\; \\partial_\\Theta$$\n(SG17 also admits an affine collineation which is not a Killing vector, by the way, $$U \\, \\partial_V$$.) This has $$\\Phi_{00} = m\/U^2$$ with respect to the standard NP tetrad.\n\nI should stress that \"invariant characterizations of curvature\" can be quite tricky when radiation is present. That is, different observers, even different classes of inertial observers, might observe very different behavior and might even disagree on whether or not any curvature components diverge on some locus. So we naturally reach for curvature invariants, but these are no help at all, since ALL the curvature invariants of plane waves vanish identically, yet these are curved spacetimes. (This is analogous to the fact that in Lorentzian manifolds, the \"length\" of a nonzero null vector field vanishes identically.) This observation (due to Penrose) gives rise to the provisional rough classification of curvature singularities as scalar or nonscalar and strong or weak in various senses. Some of the other EK and SG classes in fact provide classic examples of plane waves exhibiting some of the heirarchy of strength (where \"weaker\" singularities are more survivable by small objects).\n\nChris Hillman\n\nLast edited: Dec 1, 2006\n3. Dec 1, 2006\n\n### robphy\n\nThe mirror of \"The On-line Exact Solutions Database at UERJ\"\nhttp:\/\/www.astro.queensu.ca\/~jimsk\/\nsuggests that there are known examples with \"Maximal Isometry Group\" from the list: 0 1 2 3 4 5 6 7 10\n\n(does this search form actually work?)\n\nLast edited by a moderator: Apr 22, 2017\n4. Dec 1, 2006\n\n### Chris Hillman\n\nOn-line database of exact solutions?\n\nHi, Rob,\n\nIt hasn't worked for me in quite some time. I have been unable to get responses to email inquiries to Jim Skea; as far as I can tell, he abandoned classical gravitation quite some time ago. Skea's database never included (as far as I know) more than a hundred or so metrics (some describing the same solutions, by design).\n\nYears ago I was informed that MacCallum's group planned to make publically available a more portable implementation of the Karlhede algorithm as well as a searchable database of exact solutions. This intelligence impelled me to abandon my own work on presenting such a thing, but nothing seems to have happened, which I think is regretable. I have been unable to obtain any information about their current plans--- maybe you would have better luck?\n\nI have a database holding thousands of frame field definitions in GRTensorII (this undoubably the most convenient package for computing observable quantities associated with specific solutions or classes of solutions), but I would need to do much work to make a portion of this available to others (maybe several hundred solutions, including dozens of different frame fields for some of the most important examples). Recently, I have been thinking of taking that up that project again. It would help if I had a better idea of how many serious students use GRTensorII; the fact that the fairly recent book by Eric Poisson, A Relativist's Toolkit, plays nice with GRTensorII might be helpful here, but the expense of maple obviously is not. Still, I'd like to assume that I can assume that working installations of maple will be readily available to registered university students.\n\nI would insist on ducking responsibility for dealing with the onerous security issues associated with maintaining publically searchable databases, but I have considered making available a tar file which would allow interested parties to build a local database, if they have say MySQL installed.\n\nChris Hillman\n\nLast edited by a moderator: May 2, 2017\n5. Dec 1, 2006\n\n### Stingray\n\nThanks for the interesting response. I did not know anything about the solutions or classification schemes you've mentioned. I'll take a look at Stephani's book.\n\nAs for GRTensor, it is used pretty commonly in my experience. And for those who haven't discovered it yet, I think pretty much anyone associated with a university has access to Maple anyway.\n\n6. Dec 1, 2006\n\n### Chris Hillman\n\nGlad to hear GRTensor is getting used--- I use it all the time myself.\n\nChris Hillman","date":"2017-12-16 09:26:18","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.703144907951355, \"perplexity\": 923.6681964791395}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-51\/segments\/1512948587496.62\/warc\/CC-MAIN-20171216084601-20171216110601-00298.warc.gz\"}"} | null | null |
Our Story Giving Back Our Team Net Promoter Score
Orthotic & Prosthetic
Medical Manufacturer Reps
All Allied Healthcare
Medicare & Medicaid Bonds
Other Bonds
Start a Bond Application
Renew a Bond Application
Program Applications
Policy Servicing
Request Loss Runs
Request Policy Changes
Other Policy Requests
Home Policy Servicing Request Policy Changes
Request Changes to Your Policy Online
Name of Requestor:*
*XRequired
Requestor Email Address:*
Requestor Phone Number:*
Insured Company Name:*
Insured State* -- Select A State -- Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware DC Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming
Agent or Broker Name (if applicable):
Agency Name (if applicable):
Agency State (if applicable): -- Select A State -- Alabama Alaska Arizona Arkansas California Colorado Connecticut Delaware DC Florida Georgia Hawaii Idaho Illinois Indiana Iowa Kansas Kentucky Louisiana Maine Maryland Massachusetts Michigan Minnesota Mississippi Missouri Montana Nebraska Nevada New Hampshire New Jersey New Mexico New York North Carolina North Dakota Ohio Oklahoma Oregon Pennsylvania Rhode Island South Carolina South Dakota Tennessee Texas Utah Vermont Virginia Washington West Virginia Wisconsin Wyoming
Policy Changes Needed:*
Thank you for making your online request!
After completing this form, our team will reach out to you within one business day. If you have any questions in the meantime, please contact us at services@vgminsurance.com or 800-362-3363.
Facebook Icon LinkedIn Icon Youtube Icon
800-362-3363 programs@vgminsurance.com Who We Are Send Us a Message
Home Medical Equipment Home Health & Hospice Physical Therapy Orthotic & Prosthetic Medical Manufacturer Reps Golf Insurance Golf Equipment Financing Bonds All Allied Healthcare
Risk Management Videos Online Education View Our Blog
Privacy Policy | Terms of Use | Sitemap | Web Accessibility Guidelines
© 2023 VGM Insurance. CA License # 0I27726. All rights reserved. Web Solutions provided by VGM Forbin. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 2,447 |
{"url":"https:\/\/www.speedsolving.com\/threads\/im-a-freelance-speedcube-designer-ama.75675\/","text":"# I'm a Freelance Speedcube Designer. AMA\n\n#### Sion\n\n##### Member\nAs title suggests. I'm sure much of this community (or at least a good portion of it) knows about me designing a cube called the Tempest 3v1. I Have over a year of experience designing 3x3s, and I can confidently say I have learned a significant amount of skills pertaining to it. That said, I can't answer certain questions, which I'll let you know when asked, since I might not cover all bases if I attempt to list them.\n\nAMA!\n\n#### Filipe Teixeira\n\n##### Member\nHi\n\nAs you can create cube designs, what about the possibility to make avaiable simulators for the community?\n\nAlso, could you post your designs?\n\n#### Sion\n\n##### Member\nHi\n\nAs you can create cube designs, what about the possibility to make avaiable simulators for the community?\n\nAlso, could you post your designs?\n\nI can't exactly make simulators; CAD and Coding are rather different from eachother (except if you're talking about scad, but I don't use that one.) I mostly just focus on the actual design\/engineering aspects of the cube than the actual software.\n\nWhile I would love to post my designs, I'm planning on mass producing many of them eventually, and therefore can't be disclosed at this time. I really do wish I can give a detailed and also non-compromising answer (trust me, it is quite painful saying I can't give an in-depth answer when you want to.) I'll give something about it though: the most recent prototype is stable without magnets.\n\nHowever, I do have ways I like to share my expertise (such as commissions, which more often or not I will do for free because It's something I'm just *that* passionate about.) So if you do have some ideas or want to push my limits, let me know! My skills have improved significantly since my last 3x3 comission.\n\n#### OreKehStrah\n\n##### Member\nHave you ever tried designing a mega minx? A lot of the 3x3 design skills would transfer I\u2019d think.\n\n#### Sion\n\n##### Member\nHave you ever tried designing a mega minx? A lot of the 3x3 design skills would transfer I\u2019d think.\nActually, I haven't! I've designed everything other than Skewb, Mega, and Clock (I want to do clock; It'll just be different since it isn't designed like other twisty puzzles.)\n\nI might design a megaminx in between homework and comissions, now that you bring it up!\n\nActually, for most Nxns, your skills transfer from cube to cube. 3x3 is the easiest to design however, by far. Aside of being the most popular event, I'm guessing the simplicty of designing one is why so many designers push their designing limits when it comes to that event, as you can do more and not worry about massive and expensive failures. (For me, a library print or Higher quality $300 prototype versus something that could cost me over a thousand dollars easily.) #### OreKehStrah ##### Member Actually, I haven't! I've designed everything other than Skewb, Mega, and Clock (I want to do clock; It'll just be different since it isn't designed like other twisty puzzles.) I might design a megaminx in between homework and comissions, now that you bring it up! Actually, for most Nxns, your skills transfer from cube to cube. 3x3 is the easiest to design however, by far. Aside of being the most popular event, I'm guessing the simplicty of designing one is why so many designers push their designing limits when it comes to that event, as you can do more and not worry about massive and expensive failures. (For me, a library print or Higher quality$300 prototype versus something that could cost me over a thousand dollars easily.)\nAwesome! If you\u2019re interested we should talk about some potential clock ideas I had a little while back. I actually asked Chris Tran about some of them and he thought they would be good but too expensive for thecubicle to produce.\n\n#### GAN 356 X\n\n##### Member\nWould you get a big company to produce it or make it urself?\n\nqwr\n\n#### OreKehStrah\n\n##### Member\nWould you get a big company to produce it or make it urself?\nI have no way of producing it myself, but I\u2019m willing to put the ideas out into the world and hopefully just help advance the hardware. Mainly I only have 1-2 hardware improvement ideas and a few minor quality of life adjustments to clock design such as rounding the edge of the chasis so it\u2019s more comfortable to hold\n\n#### Sion\n\n##### Member\nWould you get a big company to produce it or make it urself?\nMost likely bigger companies; I don't have the wealth or the resources to do a production run entirely on my own.\n\n#### OreKehStrah\n\n##### Member\nI\u2019m just gonna throw out some ideas for clock here and you guys can tell me what you guys think.\nSo like I said earlier, rounding the edges of the chasis will make holding the clock a bit more comfortable, especially during long sessions. The next thing would be rounding the edges of each of the \u201cclockies\u201d so they have a smoother turning surface.\nThis next idea is the most impactful in my opinion. Idk if any of you guys have seen any really nice game controllers, but for the analogue sticks they use a really high quality anti friction ring, so I was think it would be really good to add anti friction rings to where each clockie makes contact with the frame to allow smoother turning. Chris Tran said he thought this would be a good idea, but only cost effective if a arte company implemented it.\n\n#### GAN 356 X\n\n##### Member\nMost likely bigger companies; I don't have the wealth or the resources to do a production run entirely on my own.\nWhat would you call it\/them? Do you think it would be a sub-brand like x-man is a sub brand of Qiyi? Sorry about all the questions, just think its great that people are designing new ideas!\n\n##### Member\nIs there some particular type of 2x2 core that tends to compromise to lesser extent corner cutting of the fixed side? This is something i have never seen eg. reviewers talk about. Some 2x2s i have experience with have only 1\/2 as much CC range on the fixed side compared to the mobile side, but on some others it can reach near equal\n\n#### Sion\n\n##### Member\nWhat would you call it\/them? Do you think it would be a sub-brand like x-man is a sub brand of Qiyi? Sorry about all the questions, just think its great that people are designing new ideas!\nCan\u2019t disclose anything other than planning on the sub-brand being called Tempest.\n\n#### Sion\n\n##### Member\nIs there some particular type of 2x2 core that tends to compromise to lesser extent corner cutting of the fixed side? This is something i have never seen eg. reviewers talk about. Some 2x2s i have experience with have only 1\/2 as much CC range on the fixed side compared to the mobile side, but on some others it can reach near equal\nit\u2019s less to do with the core and more to do with the alignment mechanism being used.I\u2019m a big fan of the ones in earlier 2x2s like thewittwo v1 and zhanchi 2x2, since they allowed the edges to move afair amount without severely compromising the overall performance. the only major downside is that they were prone to getting dislodged\n\nThat said, I\u2019m not too big a fan of specially designed centers that interlock with each other, though it is an effective alignment regardless.\n\nthe most interesting I\u2019ve seen was the chuwen, which used a corner as an alignment and have that stick into a few edges to immobilize them.\n\nI designed my own alignment for my 2x2 which I hope works as well as I intend it to.\n\n#### Wish Lin\n\n##### Member\nWhich CAD software do you currently use? Having some trouble choosing which one I should get.......\n\n#### Sion\n\n##### Member\nWhich CAD software do you currently use? Having some trouble choosing which one I should get.......\nI currently use OnShape.\n\n#### fortissim2\n\n##### Member\nCan you send a photo of your latest cube that you are making?\n\n#### Sion\n\n##### Member\nCan you send a photo of your latest cube that you are making?\n\nI can't send images of my most recent work, but here is a commission I worked on about half a year ago, when someone requested me to make a cube similar to the GTS series but an improvement over the lineup.","date":"2020-01-19 21:06:40","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.2643764615058899, \"perplexity\": 1734.7303571804312}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2020-05\/segments\/1579250595282.35\/warc\/CC-MAIN-20200119205448-20200119233448-00022.warc.gz\"}"} | null | null |
I don't know how it's already the end of August, but somehow it's time to wrap up this month's remix series! This is probably my favorite look of the three because I love the hip, casual vibe of my Budweiser tee and booties with a skirt. I'm basically dying for a concert to wear this to...haha.
And now for a recap of all 3 looks!
Which remix look was your favorite??
Jacy, la falda es divina y te sienta de maravilla!!!
Love the Budweiser tee one the most.
love that budweiser top! super cute outfit girl!
LOVE THIS! And it is hard to pick a favorite, but I have been all about graphic t-shirts lately, so for me I think this one takes the cake :) Love those booties too!
Loveeeee those booties and Budweiser top! So cute..
Such a pretty little skirt, definitely worth wearing over and over again! All three looks are fabulous!
This is such a fun tshirt and great casual way of styling the skirt. Always love seeing your recaps, thanks for including them. My fav this time has to be the beautiful first look! Happy Friday Doll!
This is such a cute skirt! I haven't seen it at my Target.
My favorite look is the one with the Budweiser t-shirt. It's super on trend and I love that it was from the men's section. They always have cool tee's.
uau!! love your blog and your syle!!
I am obsessed with the fact that you teamed this look with a printed t shirt, so fun!
So stylish and perfect for summer!
love the different looks with the skirt. great post!
Great styling J, love the last one with that Budweiser tee and booties. Something I'd totally wear in a heartbeat! | {
"redpajama_set_name": "RedPajamaC4"
} | 4,918 |
class ApplicationController < ActionController::Base
#keep this at the top at all times
before_filter :load_user
protect_from_forgery
before_filter :require_login
helper_method :current_user, :logged_in?
private
def require_login
session[:redirect] = request.url
unless logged_in?
flash.keep
redirect_to login_path
end
end
def current_user
@current_user
end
def logged_in?
current_user.present?
end
def load_user
if session[:user]
@current_user = User.find(session[:user])
end
end
def login(user, target)
session[:user] = user.id
if session[:redirect] && session[:redirect].starts_with?(root_url)
redirect = session[:redirect]
session[:redirect] = nil
redirect_to redirect, notice: "You are now logged in"
else
redirect_to target, notice: "You are now logged in"
end
end
def logout(target=nil)
session.delete(:user)
target ||= root_url
redirect_to(target, notice: "You are now logged out")
end
end
| {
"redpajama_set_name": "RedPajamaGithub"
} | 1,737 |
{"url":"https:\/\/dapp-world.com\/banking-dapp.md","text":"# Ethereum Banking DApp\n\n## Description\n\nHere we are gonna build a Banking DAPP which is very essential in DAPP world. For that we will be needing :\n\n\u2022 Solidity\n\u2022 Javascript, HTML, Bootstrap\n\u2022 Ganache\n\nLet\u2019s take you through each one step by step,\n\n### 1. Solidity\n\nWe will be using remix compiler for our smart contract . we will smart contract in remix IDE only so that we won\u2019t be needing truffle suite for our project.\n\nMetaMask is an extension used in chrome to connect to ethereum network and to conduct transactions . you can install metamask extension on your chrome browser which will enable chrome to interact with ehtereum block-chain\n\n### 3. JS,HTML,Bootstrap\n\nWe will use html, bootstrap for our web-app and we will use javascript to connect to MetaMask and interact with our smart contract.\n\n### 4. Ganache\n\nGanache is for running a test ethereum node on local network . For testing purposes we can use Ganache which acts like a ethereum network node on our local machine, which is very helpful while building a DApp.\n\nYou can search about above in depth on internet there is plenty of useful information there.\n\n## Instructions\n\nFirst Download Ganauche and run it. keep it running in the background .\nAdd MetaMask Extesnsion in Google Chrome Browser. Add a new network in custom RPC section with url given on Ganache\u2019s RPC server section. Which will connect our Ganache to MetaMask. Now add 2-3 accounts from Ganache into MetaMask by importing them with Private Key for testing purpose.\nthen,\nWe need to write our Code on Remix-IDE .\n\n\u2022 Select Solidity Compiler in Home and create a new file named as Banking\n\u2022 Copy all the code from source into Voting file on Remix.\n\u2022 In solidity compiler Section , Compile the Code.\n\u2022 In Deploy and Run Transaction section change the Environement to Injected Web3\n\u2022 Then click on deploy.\n\nNow MetaMask popup will show up and will ask for connection to our Ganache which is running on our local machine.\n\nWith this step we have succesfully deployed our Smart Contract and we can do transactions through MetaMask.\n\nNow we need to build simple webpage to interact with smart Contract and run it on local server with the help of Node .\n\nCreate a Directory and create files named as index.html and index.js.\n\n$mkdir Banking$ cd Banking\n$touch index.js$ mkdir public\n$cd public$ touch index.html\n\n\nNow we need to install express framework , to do that first we have to initiate node into our directory so that it will create package.json file.\n\n$npm init$ npm install express --save\n\n\nIt will create new package.json file with all dependencies and install express framework in locale folder and create a folder as node_modules.\n\nYou can now copy paste all the code from index.js and index.html provided in source code or replace with respective files in our folder from source code folder.\nSo now in our index.js file contains code which will help run server in http:\/\/localhost:3000 which is set to give index.html in response which contains our website code and javascript code for interaction with the Contract.\n\nWith these steps we have all the code in our Banking directory with Ganache running in the background and in our Remix-IDE we have already compiled and deployed code onto ganache block-chain with the Meta-Mask\u2019s help to deploy it from Remix-IDE to Ganache Block-chain\n\nNow with little change in our Index.html we will be ready to take our Voting DAPP into action .\nWe need two things to be changed\/added in our index.html,\n\n\u2022 Contract ABI.\n\nAll we have to do is replace exsisting ABI and Address with ABI and Address of the contract we compiled From our Remix-IDE .\n\n\u2022 For ContractABI we have to copy it from Compile section of solidity compiler from Remix-Ide .\n\u2022 For ContractAddress we have to copy it from deploy and run transactions section from remix-ide .\n\nNOTE : Everytime we compile and deploy contract on Remix , ContractABI and ContractAddress changes . We need to add those two in our code everytime we do changes in our code and compile on Remix.\n\nNow with everything is done all we have to do is run index.js file from our Voting directory.\n\n\\$ node index.js\nServer running at port 3000...\n\n\n## Working\n\nHere we have six sections,\n\n\u2022 Create Account \u00a0 : \u00a0 Creates account for that address .\n\u2022 Deposit \u00a0: \u00a0 Deposit Amount into User\u2019s address .\n\u2022 Withdraw \u00a0: \u00a0 withdraws Ethers from user\u2019s account into Ethereum account on Block-chain .\n\u2022 Transfer \u00a0 : \u00a0 Transfers money from one account to other in Banking Contract .\n\u2022 Send Ethers \u00a0 : \u00a0 Directly transfers Ethers from Ethereum wallet to other user.\n\u2022 On the Right side user\u2019s account address is shown with balance in user\u2019s account.\n\nCongratulations ,\nWith this we have succesfully completed our Banking DApp .","date":"2021-01-23 03:49:23","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 1, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.17644333839416504, \"perplexity\": 7875.940069760851}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-04\/segments\/1610703533863.67\/warc\/CC-MAIN-20210123032629-20210123062629-00183.warc.gz\"}"} | null | null |
Q: Sum total by two conditions in list of lists cust_id = semi_final_df['0_x'].tolist()
date = semi_final_df[1].tolist()
total_amount = semi_final_df[0].tolist()
prod_num = semi_final_df['0_y'].tolist()
prod_deduped = []
quant_cleaned = []
product_net_amount = []
cust_id_final = []
date_final = []
for row in total_amount:
quant_cleaned.append(float(row))
for unique_prodz in prod_num:
if unique_prodz not in prod_deduped:
prod_deduped.append(unique_prodz)
for unique_product in prod_deduped:
indices = [i for i, x in enumerate(prod_num) if x == unique_product]
product_total = 0
for index in indices:
product_total += quant_cleaned[index]
product_net_amount.append(product_total)
first_index = prod_num.index(unique_product)
cust_id_final.append(cust_id[first_index])
date_final.append(date[first_index])
Above code calculates sum amount by one condition in order to sum the total on an invoice.
The data had multiple lines but shared the same invoice/product number.
Problem:
I need to modify the below code so that I can sum by unique product and unique date.
I have given it a go but I am getting a value error -
saying x, y is not in a list
As per my understanding the issue lies in the fact that I am zipping two de-duped lists together of different lengths and then I am attempting to loop through the result inline.
This line causes the error
for i,[x, y] in enumerate(zipped_list):
Any help would be sincerely appreciated. Here is the second batch of code with comments.
from itertools import zip_longest
#I have not included the code for the three lists below but you can assume they are populated as these are the lists that I will be #working off of. They are of the same length.
prod_numbers = []
datesz = []
converted_quant = []
#Code to dedupe date and product which will end up being different lengths. These two lists are populated by the two for loops below
prod_deduped = []
dates_deduped = []
for unique_prodz in prod_numbers:
if unique_prodz not in prod_deduped:
prod_deduped.append(unique_prodz)
for unique_date in datesz:
if unique_date not in dates_deduped:
dates_deduped.append(unique_date)
#Now for the fun part. Time to sum by date and product. The three lists below are empty until we run the code
converted_net_amount = []
prod_id_final = []
date_final = []
#I zipped the list together using itertools which I imported at the top
for unique_product, unique_date in zip_longest(prod_deduped, dates_deduped, fillvalue = ''):
indices = []
zipped_object = zip(prod_numbers, datesz)
zipped_list = list(zipped_object)
for i,[x, y] in enumerate(zipped_list):
if x == unique_product and y == unique_date:
indices.append(i)
converted_total = 0
for index in indices:
converted_total += converted_quant[index]
converted_net_amount.append[converted_total]
first_index = zipped_list.index([unique_product, unique_date])
prod_id_final.append(prod_numbers[first_index])
date_final.append(datesz[first_index])
A: from collections import defaultdict
summed_dictionary = defaultdict(int)
for x, y, z in list:
summed_dictionary[(x,y)] += z
Using defaultdict should solve your problem and is a lot easier on the eyes than all your code above. I saw this on reddit this morning and figured you crossposted. Credit to the guy from reddit on /r/learnpython
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 4,043 |
Plum eye wash solutions
Your eyesight is one of the most important senses. So take care of your eyes. Regardless how careful you are accidents can happen, but everybody can make sure that they are prepared. With our eye wash solutions, you have done your best.
If an accident happens, seconds can decide whether your eyesight is damaged or not. Therefore, quick access to eye wash is crucial for all workplaces where there is a risk of eye injuries. Our wide product range ensures the best possible solution specifically for your needs. Choose small and large wall-mounted stations directly at the workplace. Or small, mobile solutions for the van, the tool box and the first aid box, and on the cleaning trolley in the special belt bag.
The green Plum Eye Wash deals with dirt. The blue pH Neutral is crucial in connection with accidents involving acids and alkali.
For chemical accidents
If acid or lye comes into contact with the eye, damage to the cornea begins immediately. For such accidents, we recommend our pH Neutral product, which quickly and gently neutralises the liquid in the eye until the normal pH of 7.4% is reached. Further information and documentation on this process is available.
When dirt enters the eye
Time is also of the essence in accidents where metal, wood, dust or any kind of dirt gets into the eye. In such situations, the immediate use of first aid eye wash can prevent the foreign material from sticking to the eyeball, thus avoiding further serious injury. Plum First Aid Eye Wash contains a sterile sodium chloride solution with a pH (0.9%) equal to the pH of the eye fluid. Using Plum First Aid Eye Wash therefore avoids the unpleasant stinging sensation when flushing the eyes and prevents further contamination.
Benefits of Plum First Aid Eye Wash
Effective, optimal eye rinsing solution: for general eye rinsing or neutralisation in case of contact of acids or alkalis with eyes or body
Flexibility: a wide range of products to provide the optimal solution for your needs, including stations, wall-mounted solutions in various sizes, and smaller First Aid Eye Washes that can be mounted in a car, put in a tool box or even carried in a belt pouch.
Sterile and hygienic: when sealed, they have a 3-year warranty. The bottles require no maintenance or cleaning. Expiry date is on the label.
Easy and quick to use: in case of accident, rinsing of eyes or body part is possible within seconds. Clear and precise instructions for use are on the label.
High level of functionality: the ergonomic design of the cap fits snugly into the eye socket, ensuring efficient, gentle eye rinsing. Plum First Aid Eye Washes are sterile and CE certified according to the Medical Device Regulations.
Plum Eyewash
The bottle contains 0.9% sterile sodium chloride solution. The Plum first aid eye wash is suitable for rinsing dirt (such as dust, dirt, metal and wood splinters, etc.) and even certain chemicals such as oils and solvents. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. It is also suitable for stand-alone use or for filling wall-mounted stations. This small, easy-to-handle bottle also fits in a jacket pocket, first aid box, tool bag or a special belt bag. Shelf life: 3 years.
The product is available in the following sizes:
200 ml bottle (art. no. 4691). Rinse time: approx. 2 minutes. Carton: 10 x 200 ml
Plum pH Neutral
The bottle contains 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. It comes with an easy-to-use bottle, a shower head, a dust cover and clear instructions for use. It is also suitable for stand-alone use or for filling wall-mounted stations. This small, easy-to-handle bottle also fits in a jacket pocket, first aid box, tool bag or a special belt bag. Shelf life: 3 years.
1000 ml bottle (art. no. 4746). Rinse time: approx. 5 minutes. Carton: 12 x 500 ml
Plum DUO Eyewash
The bottle contains 0.9% sterile sodium chloride solution. The DUO design for simultaneous washing of both eyes. The Plum first aid eye wash is suitable for rinsing dirt (such as dust, dirt, metal and wood splinters, etc.) and even certain chemicals such as oils and solvents. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. It is also suitable for stand-alone use or for filling wall-mounted stations. This small, easy-to-handle bottle also fits in a jacket pocket, first aid box, tool bag or a special belt bag. Shelf life: 3 years.
500 ml bottle (art. no. 4861). Rinse time: approx. 2 minutes. Carton: 6 x 500 ml
1000 ml bottle (art. no. 4800). Rinse time: approx. 5 minutes. Carton: 6 x 1000 ml
Plum pH Neutral DUO
The bottle contains 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. It comes with an easy-to-use bottle, a shower head, a dust cover and clear instructions for use. The DUO design allows two eyes to be washed simultaneously. It is also suitable for stand-alone use or for filling wall-mounted stations. This small, easy-to-handle bottle also fits in a jacket pocket, first aid box, tool bag or a special belt bag. Shelf life: 3 years.
Wound and Eyewash spray
With Plum Wound and Eyewash Spray you get immediate care to minor accidents such as cuts and scrapes on the skin or dust and dirt in the eyes. It helps you to minimize the risk of further infection or damage. It is a portable, easy to use, saline-based and pain-free spray. It works at any angle, providing a balanced flow rate of sterile 0.9 % saline solution, strong enough for washing away clot and foreign bodies from wounds, yet soft enough for washing the eyes. Ideal for the industrial sector, production industry, laboratories, transport of dangerous goods, first responders, law enforcement, firefighters, military and first rescue services, such as disaster relief. Plum Wound and Eyewash Spray is CE marked according to the Guidelines for Classification of Medical Device Directive (MDD93/42/EEC).
50 ml bottle (art. no. 45531). Rinse time: approx. 5 minutes. Carton: 24 x 50 ml
250 ml bottle (art. no. 4554). Rinse time: approx. 15 minutes. Carton: 12 x 250 ml
QuickRinse® eyewash ampoules
1 x 5 eyewash ampoules with 20 ml 0.9 % sterile sodium chloride. The ampoules provides easy, quick and hygienic relief for rinsing dust and dirt from the eyes. Suitable for refilling QuickSafe®, QuickFix&Rinse® and QuickRinse® stations.
5 x 20 ml ampoules (art. no. 5160). Carton: 4 x 5 ampoules.
Plum ON-the-GO Eyewash set
Practical eyewash set with 3 x 500 ml bottle containing 0.9% sterile sodium chloride solution. The Plum first aid eye wash is suitable for rinsing dirt (such as dust, dirt, metal and wood splinters, etc.) and even certain chemicals such as oils and solvents. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. The box is easy to carry, you can take it with you in the car while you get to the doctor. The bottles can be used individually, but are also suitable for refilling eyewash stations. Shelf life: 3 years. Rinse time: approx. 15 minutes.
Packaging: 3 x 500 ml
Rinse time: approx. 15 minutes
Plum Eyewash station with 500 ml Eyewash bottle
Wall-mounted eyewash station, made in hard plastic for simple and quick first-aid in case of eye injury. With 500 ml Plum first aid eyewash, wall bracket and pictogram. Especially suitable for small and mobile workstations. Dimensions: 300 x 170 x 80 mm. The bottle contains 500 ml of 0.9% sterile sodium chloride solution. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: approx. 5 minutes.
Packaging: 1 x 500 ml bottle with wall holder and pictogram
Carton: 1 piece
Rinse time: approx. 5 minutes
Plum Eyewash station with 2 x 500 ml Eyewash bottle
Wall-mounted eyewash station, made in hard plastic for simple and quick first-aid in case of eye injury. With 2 x 500 ml Plum first aid eyewash, wall bracket and pictogram. Especially suitable for small and mobile workstations. Dimensions: 290 x 228 x 80 mm. The bottle contains 500 ml of 0.9% sterile sodium chloride solution. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: approx. 10 minutes.
Plum MAXI eyewash station with 2 x 1000 ml Eyewash bottle
Wall-mounted eyewash station, made in hard plastic for simple and quick first-aid in case of eye injury. With 2 x 1000 ml Plum first aid eyewash, wall bracket and pictogram. Particularly suitable for small and mobile workstations where prolonged eye rinsing may be required. Dimensions: 375 x 260 x 95 mm. The bottles contains 1000 ml of 0.9% sterile sodium chloride solution. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: approx. 10 minutes.
Packaging: 2 x 1000 ml bottle with wall holder and pictogram
Plum DUO eyewash station with 1000 ml Eyewash bottle
Wall-mounted eyewash station, made in hard plastic for simple and quick first-aid in case of eye injury. With 1 x 1000 ml Plum DUO first aid eyewash, wall bracket and pictogram. It is especially suitable for small and mobile workstations where simultaneous rinsing of the two eyes may be required. Dimensions: 375 x 180 x 95 mm. The bottle contains 1.0 liter of 0.9% sterile sodium chloride solution. The DUO design allows two eyes to be flushed simultaneously. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Thanks to its 1000 ml packaging, it provides a longer rinsing time. Shelf life: 3 years. Rinse time: approx. 5 minutes.
Packaging: 1 x 1000 ml DUO bottle with wall holder and pictogram
Plum Eyewash station with 1000 ml pH Neutral eyewash bottle
Wall-mounted eyewash station, made in hard plastic for simple and quick first-aid in case of eye injury. With 1000 ml pH Neutral eyewash, wall bracket and pictogram. Especially suitable for small and mobile workstations. Dimensions: 300 x 160 x 95 mm. The bottle contains 1000 ml of a 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: approx. 5 minutes.
Packaging: 1 x 1000 ml pH Neutral bottle with wall holder and pictogram
Plum Combi Station eyewash station
Wall-mounted eyewash station made in hard plastic for simple and quick first-aid in case of eye injury. With 200 ml pH Neutral and 500 ml Plum first aid eyewash station. It is especially suitable for workplaces where both mechanical and chemical eye accidents can occur. Dimensions: 290 x 228 x 80 mm. The first aid eyewash bottle contains 500 ml of 0.9% sterile sodium chloride solution. The pH Neutral bottle contains 200 ml of a 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. Both come in an easy-to-use bottle, with an ergonomic cap, dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: pH Neutral about 2 minutes, physiological saline about 5 minutes.
Packaging: 1 x 200 ml pH Neutral and 1 x 500 ml First Aid bottle with wall holder and pictogram
Plum Combi Station DUO Eyewash station
Wall-mounted eyewash station made in hard plastic for simple and quick first-aid in case of eye injury. With 500 ml pH Neutral DUO and 1000 ml Plum first aid DUO eyewash. It is especially suitable for workplaces where both mechanical and chemical eye accidents can occur and there is a risk of both eyes being injured at the same time. Dimensions: 375 x 250 x 95 mm. The first aid eyewash bottle contains 1000 ml of sterile 0.9% sodium chloride solution. The pH Neutral bottle contains 500 ml of a 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. Both come in an easy-to-use bottle, with an ergonomic cap, dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: pH Neutral about 2 minutes, physiological saline about 5 minutes.
Packaging: 1 x 500 ml pH Neutral DUO and 1 x 1000 ml First Aid DUO bottle with wall holder and pictogram
Rinse time: approx. 2+5 minutes
Wall-mounted first aid station
Wall-mounted first aid station with eyewash, plaster dispenser, wound cleansing wipes, mirror, pictogram. The first aid station includes a 500 ml Plum first aid eyewash (4604), a QuickFix® dispenser with 90 elastic plasters (5507), and a QuickClean® 45 wound cleanser (5551). With this one station it is possible to solve eyewash, clean and treat minor scratches and cuts. Dimensions: 300 x 515 x 85 mm
Packaging: 1 x 500 ml First Aid eyewash bottle, QuickFix® dispenser with 90 elastic plasters, QuickClean® 45 wound cleanser with wall holder and pictogram
Plum Eyewash station in box with 2 x 500 ml Eyewash bottle
Dust-free wall-mounted eyewash box, made of polystyrene, 2 x 500 ml Plum first aid with eyewash, mirror and pictogram. Especially suitable for dirty, dusty areas or mobile workstations. Dimensions: 280 x 230 x 110 mm. The bottles contains 500 ml of 0.9% sterile sodium chloride solution. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: approx. 10 minutes.
Packaging: 2 x 500 ml bottle in wall-mounted box, with mirror, pictogram
Plum DUO Box eyewash station with 2 x 1000 ml DUO Eyewash bottle
Dust-free wall-mounted eyewash box, made of polystyrene, 2 x 1000 ml Plum DUO first aid eyewash, mirror and pictogram. It is especially suitable for dirty, dusty areas or mobile workstations and there is a risk of both eyes being damaged at the same time. Dimensions: 357 x 252 x 116 mm. The bottles contains 1.0 liter of 0.9% sterile sodium chloride solution. The DUO design allows two eyes to be flushed simultaneously. It comes in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: approx. 10 minutes.
Packaging: 2 x 1000 ml First Aid bottle in wall-mounted box, with mirror, pictogram
Plum Combi-Box eyewash station
Dust-free wall-mounted eyewash box made of polystyrene with 200 ml pH Neutral eyewash and 500 ml Plum first aid eyewash, mirror and pictogram. Particularly suitable for dusty work environments, plants where both mechanical and chemical injuries can occur. Dimensions: 280 x 230 x 110 mm. The first aid eyewash bottle contains 500 ml of 0.9% sterile sodium chloride solution. The pH Neutral bottle contains 200 ml of a 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. Both come in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: pH Neutral about 2 minutes, physiological saline about 5 minutes.
Packaging: 1 x 200 ml pH Neutral and 1 x 500 ml First Aid bottle in wall-mounted box, with mirror, pictogram
Plum Combi-Box DUO eyewash station
Dust-free wall-mounted eyewash box, made of polystyrene, with 500 ml pH Neutral DUO eyewash and 500 ml Plum DUO first aid eyewash with mirror and pictogram. Particularly suitable for dusty work environments, in plants where both mechanical and chemical injuries can occur and there is a risk of both eyes being injured at the same time. Dimensions: 280 x 230 x 110 mm. The first aid eyewash bottle contains 500 ml of 0.9% sterile sodium chloride solution. The pH Neutral bottle contains 500 ml of a 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. Both come in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: pH Neutral about 2 minutes, physiological saline about 2 minutes.
Packaging: 1 x 500 ml pH Neutral DUO and 1 x 500 ml First Aid eyewash DUO bottle in wall-mounted box, with mirror, pictogram
Rinse time: approx. 2+2 mins
Plum Combi-Box DUO MAXI eyewash station
Dust-free wall-mounted eyewash box, made of polystyrene, with 500 ml pH Neutral DUO eyewash and 1000 ml Plum DUO first aid eyewash with mirror and pictogram. Particularly suitable for dusty work environments, in plants where both mechanical and chemical injuries can occur and there is a risk of both eyes being injured at the same time. Dimensions: 280 x 230 x 110 mm. The first aid eyewash bottle contains 1000 ml of 0.9% sterile sodium chloride solution. The pH Neutral bottle contains 500 ml of a 4.9% sterile phosphate solution, which quickly neutralizes even concentrated acidic or alkaline substances in the event of contact with the eyes. It can be up to 50 times more effective than pure water. The liquid contains phosphates, which are already present in the human body. The hydrogen phosphate component of the buffer neutralizes the acids, while the other part of the buffer, dihydrogen phosphate, neutralizes the alkalis. Both come in an easy-to-use bottle, with an ergonomic cap, a dust cover and clear instructions for use. Shelf life: 3 years. Rinse time: pH Neutral about 2 minutes, physiological saline about 5 minutes.
Packaging: 1 x 500 ml pH Neutral DUO and 1 x 1000 ml First Aid DUO bottle in wall-mounted box, with mirror, pictogram
Plum Plug & Heat heatable eyewash box, small
Dust-free wall-mounted eyewash box, made of polystyrene, with mirror. Plum Plug & Heat Eyewash boxes contain a heating element, that ensures, that the eyewash liquid has a comfortable shower temperature. Suitable for storing 2 x 200 or 500 ml Plum first aid or pH Neutral eyewash, also in single or DUO design. Especially suitable for dirty, dusty areas or mobile workstations. Plum Plug & Heat Eyewash boxes contain a heating element, that ensures, that the eyewash liquid has a comfortable shower temperature. Dimensions: 270 x 225 x 110 mm. Power consumption: 20W. Power supply: Connect to a 12V DC cigarette lighter or a local converter. Heating foil is CE-approved in confirmity with low voltage directive 2006/95/EC (EN 60950-1/A2:2013). The box should be placed sheltered from the influences of the weather (rain, snow, sun, etc.). The box is preset to ensure an eyewash temperature of 16°C to 38°C within an external temperature range of -20°C to +20°C. If a transformer is used, it must meet the applicable local requirements for insulation and overcurrent protection. Refills are not included.
Packaging: wall-mounted, heatable, empty box, with mirror, pictogram
Plum Plug & Heat heatable eyewash box, large
Dust-free wall-mounted eyewash box, made of polystyrene, with mirror. Plum Plug & Heat Eyewash boxes contain a heating element, that ensures, that the eyewash liquid has a comfortable shower temperature. Suitable for storing 2 x 500 or 1000 ml Plum first aid or pH Neutral eyewash, also in single or DUO design. Especially suitable for dirty, dusty areas or mobile workstations. Plum Plug & Heat Eyewash boxes contain a heating element, that ensures, that the eyewash liquid has a comfortable shower temperature. Dimensions: 357 x 252 x 116 mm. Power consumption: 20W. Power supply: Connect to a 12V DC cigarette lighter or a local converter. Heating foil is CE-approved in confirmity with low voltage directive 2006/95/EC (EN 60950-1/A2:2013). The box should be placed sheltered from the influences of the weather (rain, snow, sun, etc.). The box is preset to ensure an eyewash temperature of 16°C to 38°C within an external temperature range of -20°C to +20°C. If a transformer is used, it must meet the applicable local requirements for insulation and overcurrent protection. Refills are not included.
QuickRinse® eyewash ampoules dispenser
Wall-mounted dispenser with 2 x 5 eyewash ampoules with 20 ml 0.9 % sterile sodium chloride. The dispenser provides easy, quick and hygienic relief for rinsing dust and dirt from the eyes. Easily mounted in the location where the need is the greatest. Dispenser dimensions: 135 x 230 x 32 mm.
Packaging: 2 x 5 pcs 20 ml eyewash ampoules
QuickFix&Rinse® plaster and eyewash ampoules dispenser
Wall-mounted dispenser with 45 breathable and elastic textile plasters and 1 x 5 eyewash ampoules with 0.9 % sterile sodium chloride. Comfortable textile plasters that will adjust to the movement of the skin. The CE-labelled plasters are skin sensitive and breathable. The dispenser provides easy, quick and hygienic relief for minor injuries and allows for use of plaster and eyewash as needed. CE-labelled eyewash ampoules with 3-year expiry date. The dispenser can be used in any location with risk of injuries and scratches. Plaster dimensions: 72 x 25 mm. Dispenser dimensions: 190 x 230 x 32 mm.
Packaging: 1 x 5 pcs 20 ml eyewash ampoules and 45 pcs breathable and elastic textile plasters | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 4,516 |
\section{Introduction}
Two models have been used extensively to analyze Gamma ray bursts (GRBs)
and their afterglows (AGs), the fireball (FB) model (for recent reviews
see, e.g., M\'{e}sz\'{a}ros~2002, 2006; Zhang~2007) and the cannonball
(CB) model (Dar \& De R\'ujula~2004, hereafter DD2004; Dado \& Dar
2008a,b, hereafter DD2008a,b, and references therein). Despite their
similar names, the two models are (or were) entirely different (e.g.,
Piran~1999), hence only one of them, if either, may provide a faithful
physical description of GRBs. Until recently, the FB model has been widely
accepted as that model. However, the rich data on GRBs accumulated from
space based observations, in particular from the Swift satellite,
complemented by early time data from ground based robotic telescopes and
late-time follow-up observations with larger telescopes, have challenged
this prevailing view. Kumar et al.~(2007) concluded that the prompt
$\gamma$-ray emission cannot be produced in shocks, internal or external.
Zhang, Liang and Zhang~(2007) found that the fast decay and rapid spectral
softening ending the prompt gamma-ray and X-ray emission cannot be
explained simultaneously by high latitude emission. The X-ray and optical
afterglows (AGs) of the Swift GRBs were found to be chromatic at early
time (Covino et al.~2006) and to have chromatic breaks (Panaitescu et
al.~2006) which differ significantly from the jet breaks expected in the
collimated fireball model of AGs. Burrows and Racusin~(2007) examined the
XRT light curves of the first $\sim\! 150$ Swift GRBs and reported that
the expected jet breaks are extremely rare. In particular, Liang et
al.~(2008) have analyzed the Swift X-ray data for the 179 GRBs detected
between January 2005 and January 2007 and the optical AGs of 57 pre- and
post-Swift GRBs. They found that not a single burst satisfies all the
criteria of a jet break.
In spite of the above, not all authors are so critical and they believe that
the GRB data require only some modifications of the standard FB model in
order to accommodate the results (e.g.,~Panaitescu~2006; Dai et
al.~2007; Sato et al.~2007; Kumar and Panaitescu~2008). Other authors seem
to ignore the failures of the FB model and continue to interpret the
observations with the FB model hypotheses (`internal and external shocks',
`colliding conical shells', `forward and reverse shocks', `continuous
energy injection') and parametrize the data with freely adopted formulae
(e.g., `segmented power laws') which were never derived explicitly from
underlying physical assumptions (for recent examples, see, e.g., Bloom et
al.~(21 authors)~2008; Racusin et al.~(93 authors)~2008).
The situation concerning the CB model is different. The predictions of the
model were derived in fair approximations from its underlying assumptions.
They were shown to describe correctly the main observed properties of GRBs
and reproduce successfully the diverse broad band light curves of large
representative sets of both long GRBs and XRFs (e.g., DD2004; DD2008a and
references therein) and short hard bursts (DD2008b). In this paper, we
demonstrate these for the GRBs 990123 and 080319B, the brightest GRBs
observed so far that have the best sampled and the most accurately
measured multiwavelegth light curves of the prompt and afterglow emission.
We show that the two underlying radiation mechanisms of the CB model,
inverse Compton scattering (ICS) and synchrotron radiation (SR), and the
burst environment suffice within the CB model provide a very simple and
successful description of the observed light curves of their prompt and
afterglow emissions.
\section{GRBs 990123 and 080319B}
GRB 990123, at redshift $z\! =\! 1.600$ (Kulkarni et al.~1999a; Andersen
et al.~1999), with the highest known gamma ray energy under the assumption
of
isotropic emission, $E_{iso}\!\approx\!2\times10^{54}$ erg, was detected
and localized by the Burst And Transient Source Experiment (BATSE) on
board the Compton Gamma Ray Observatory (CGRO), which measured its light
curves
in the 20-50 keV, 50-100 keV, 100-300 keV and $>$300 keV BATSE channels
(see e.g., Fig.~3), and at higher energies by the COMPTEL, OSSE and
EGRET instruments (Briggs et al.~1999). It was also detected and localized
by the Gamma Ray Burst Monitor (GRBM) aboard the BeppoSAX satellite
(Maiorano et al.~2005), which measured its lightcurve and spectrum in the
range 2-700 keV
for the first 80 s before the burst entered Earth occulation. The BeppoSAX
measurements were resumed after it came out of the Earth occulation and
ended 2.49 days after burst because of diminishing statistics. GRB 990123
was also the first GRB in which an optical emission was detected during
the prompt $\gamma$/X-ray emission. The emission, which was detected by
the Robotic Optical Transient Search Experiment (ROTSE) at Los Alamos
National Laboratories, was triggered by BATSE 22 s after the onset of the
burst, brightened and peaked at magnitude $V\!\sim\! 9$, about 50 s after
the GRB onset, and decayed rapidly with time (Akerlof et al.~1999) which
was followed in the $UVONIR$ bands with large ground based telescopes
(Castro-Tirado et al.~1999; Galama et al.~1999; Kulkarni et al.~1999a;
Fruchter et al.~1999; Holland et al.~2000 and references therein) and with
the Hubble Space Telescope until it faded to a magnitude
$V\!=\! 27.7\!\pm\!0.15$, two months after burst
(Fruchter et al.~2000). The broad band
$\gamma$-ray, X-ray, $UVO$ and $NIR$ lightcurves of GRB 990123 were
reanalyzed recently within the synchrotron fireball (FB) model by
Corsi et al.~(2005). Essentially they found that the
spectral and temporal properties of the prompt optical emission are
uncorrelated to the $\gamma$ and X-ray emission, implying different
physical origins, that the optical and X-ray afterglow lightcurves are
chromatic contrary to expectations and that their spectral and temporal
power-law decays do not satisfy the correlations expected in the FB model.
GRB 080319B at redshift $z\!=\!0.937$ was simultaneously detected by the
Swift-Burst Alert Telescope (BAT) and the Konus gamma-ray detector aboard
the Wind satellite (Racusin et al.~2008; Golenetskii et al.~2008). The
location of GRB 080319B was fortuitously only 10$^o$ away from GRB
080319A,
which was detected by Swift less than 30 minutes earlier, and allowed
several wide field telescopes to detect the optical emission of GRB
080319B instantly. It peaked 26 s after the Swift trigger at magnitude
$V\!=\!5.3$ (Racusin et al.~2008; Wozniak et al.~2008) visible to the
naked eye. The extreme
brightness of the burst and its gamma-ray, X-ray and $UVOIR$ afterglows
led to a flurry of follow-up observations with a variety of space-
and
ground-based telescopes, which were summarized in Bloom et al.~2008,
Racusin
et al.~2008 and Wozniak et al.~2008. GRB 080319B was quite similar to GRB
990123 in many respects. Its isotropic equivalent gamma-ray energy release
was $E_{iso}\!\approx\! 1.3\times 10^{54}$ erg, similar to that of GRB
990123. Like in GRB 990123, the fast spectral variation of its hard X-ray
and gamma ray emission was well parametrized with an exponentially
cut-off power-law with a cut-off energy that was strongly correlated with
the peak
structure of the lightcurve and a low-energy photon spectral index,
$\Gamma\!\approx\!1$, which changed abruptly into $\Gamma\!\approx\!2.1$
after the fast decay phase of the prompt emission (e.g., Fig.~10). The
optical and gamma-ray light curves during the explosion were not
correlated (see, e.g., Fig.~1 in Racusin et al.~2008): The onset of the
optical emission lagged behind the gamma ray emission by several seconds
and decayed more slowly at the end of the prompt emission. The typical
time scales of their temporal variability were entirely different. The
extremely bright optical emission could not be reconciled with a single
emission mechanism - extrapolating the gamma-ray spectrum to the optical
band underestimates the optical flux by more than 4 orders of magnitude.
Their spectra were also quite different. Contrary to expectations, the
X-ray and $UVO$ afterglow light curves were also chromatic, with no `jet
breaks' and with spectral and temporal power-law decays which did not
satisfy the correlations expected in the FB model (see, however, Bloom et
al.~2008 (21 authors); Racusin et al.~2008 (93 authors!); Wozniak et
al~2008; Kumar and Panaitescu~2008 for attempts to reconcile the
observations with the FB model).
\section{The CB model}
In the CB model (e.g.,~DD2004 and references therein) {\it long-duration}
GRBs and their AGs are produced by bipolar jets of highly relativistic
plasmoids of ordinary matter (Shaviv \& Dar~1995, Dar~1998) ejected in
core-collapse supernova (SN) explosions (Dar \& Plaga~1999). An accretion
disk or a torus is hypothesized to be produced around the newly formed
compact object, either by stellar material originally close to the surface
of the imploding core and left behind by the explosion-generating outgoing
shock, or by more distant stellar matter falling back after its passage
(De R\'ujula~1987). As observed in microquasars (e.g.,~Mirabel \&
Rodriguez~1999, Rodriguez \& Mirabel~1999 and references therein), each
time part of the accretion disk falls abruptly onto the compact object,
two jets of cannonballs (CBs) made of {\it ordinary-matter plasma} are
emitted with large bulk-motion Lorentz factors in opposite directions
along the rotation axis, wherefrom matter has already fallen back onto the
compact object due to lack of rotational support. The prompt $\gamma$-ray
and X-ray emission is dominated by inverse Compton scattering (ICS) of
photons of the SN glory - light scattered/emitted by the pre-supernova
wind blown from the progenitor star. The CBs' electrons Compton up-scatter
the glory photons to $\gamma$-ray energies and collimate them into a
narrow beam along the CBs' directions of motion.
A second mechanism besides ICS that generates radiation by a CB is
synchrotron radiation (SR). The CBs which initially expand in their rest
frame with the speed of sound in a relativistic plasma, collide and merge
in a short time into a few leading CBs. The jet of CBs encounters matter
in its voyage through the wind/ejecta blown by the progenitor star and
then through the interstellar medium (ISM), which is ionized by the beamed
radiation of the very same CBs. The ISM ions continuously impinging on a
CB generate within it a turbulent magnetic field, which is assumed to be
in approximate energy equipartition with their energy. In this field the
Fermi accelerated CB and ISM intercepted electrons emit synchrotron
radiation. The initial expansion of a CB produces a rapidly rising
lightcurve which stops rising when the expansion slows down. When the CB
expansion stops, its emission turns into a decline which traces the
circumburst density of the pre-supernova wind/ejecta blown by the
progenitor star into the roughly constant ISM density. Only when the CB
has swept a mass comparable to its rest mass, does the continuous
collision with the medium begins to decelerate it effectively, which
results in a gradual steepening (break) of its SR afterglow lightcurve
into an asymptotic power-law decay.
\section{Correlations between the prompt emission observables}
Straightforward consequences of the CB model are simple correlations
among various properties of the prompt emission pulses
(Dar \& De R\'ujula 2000, hereafter DD2000). For instance,
the relativistic boosting and beaming of the glory photons by a CB yield
the relations (DD2000; DD2004),
\begin{equation}
E_{iso}\propto \delta^3\,;~~~~
(1+z)^2\, L_p\propto \delta^4\,;~ ~~~~
(1+ z)\, E_p \propto \gamma\, \delta\,,
\label{correlation}
\end{equation}
where $E_{iso}$ is the isotropic equivalent gamma ray energy, $L_p$ is the
peak isotropic equivalent luminosity, $E_p$ is the photon energy at peak
energy flux density of an ICS pulse, $\gamma$ is the bulk motion Lorentz
factor of a CB, and $\delta\! =\! 1/\gamma\, (1\!-\!\beta\, cos\theta)$ is
its Doppler factor with $\theta$ being the angle between the line of sight
to the CB and its direction of motion. For $\gamma^2 \gg 1$ and $\theta^2
\ll 1$, $\delta \approx 2\, \gamma/(1\!+\!\gamma^2\, \theta^2)$ to an
excellent approximation. The strong dependence of observables such as
$E_{iso}\,,$ $L_p$ and $E_p$ on $\gamma$ and $\delta$ and the
narrow distribution of $\theta$ around $1/\gamma$ result in
correlations among them. The observed correlations between $(1 + z)\, E_p$
and $E_{iso}$ and between $(1 + z)\, E_p$ and $(1+z)^2\, L_p$ in GRBs with
known redshift are shown in Figs.~1a,1b. The correlations predicted by
the CB model (e.g. DD2000; DD2004; Dado, Dar \& De R\'ujula 2007,
hereafter DDD2007), which are
indicated by the thick lines in these figures, well represent the observed
correlations (e.g., Amati 2002,2006) and
are also well satisfed by GRBs 990123 and 080319B. The
locations of GRBs 990123 and 080319B in these correlation plots and in the
other well established correlations in GRBs (see, e.g., DDD2007) suggest
that GRBs 990123 and 080319B were probably ordinary GRBs viewed very near
axis, $\theta^2\!\ll\! 1/\gamma_0^2\, :$ The most probable viewing angle
of GRBs, $\theta\approx 1/\gamma$, yields $\delta\approx \gamma$, while
for small viewing angles, $\theta^2 \!\ll\! 1/\gamma^2$ and then
$\delta\!\approx\! 2 \,\gamma$, yielding a rest frame $E_p$, $E_{iso}$ and
$L_p$, which are 2 times larger, 8 times more energetic and 16 times
brighter, respectively, than their mean values observed in long GRBs with
the most probable $\gamma\, \theta\approx 1$. The inferred large Lorentz
and Doppler factors of GRBs 990123 and 080319B, coupled with a
high-density wind/ejecta blown by their progenitor stars before the
supernova explosion, explains their initially extreme optical
brightness and the lack of `jet breaks' in their afterglows
(Dado, Dar \& De R\'ujula 2008b, hereafter DDD2008b).
\section{The spectrum of ICS pulses}
The predicted time-dependent spectrum of a GRB pulse
is given by (DD2004):
\begin{equation}
E\, {dN_\gamma\over dE} \sim \left({E\over E_p(t)}\right)^{-\beta_g}\,
e^{-E/E_p(t)}+ b\,(1-e^{-E/E_p(t)})\, \left({E \over
E_p(t)}\right)^{-p/2}\,.
\label{GRBspec}
\end{equation}
The first term in Eq.~{\ref{GRBspec} with $\beta_g\!\sim\! 0$, is the
result of inverse Compton scattering of
glory photons with a thin bremsstrahlung spectrum,
\begin{equation}
\epsilon\, {dn_\gamma \over d\epsilon} \approx n_\gamma(r)\,
\left({\epsilon \over T_g }\right)^{-\beta_g}\, e^{-\epsilon/T_g},
\label{thinbrem}
\end{equation}
by the bulk of the CB's electrons, which are comoving with it.
The second term in Eq.~(\ref{GRBspec}) is induced by
a very small fraction of
`knocked on' and Fermi accelerated electrons, whose initial spectrum
(before Compton and synchrotron cooling) is $dN_e/dE\propto E^{-p}$,
with $p\approx 2.2$.
The effective temperature $T_g(r)$ of the glory
that decreases with distance yields (DD2008b)
\begin{eqnarray}
E_p(t)&\approx& E_p(0)\, {t_p^2 \over t^2+t_p^2}\,,
\nonumber\\
E_p(0)&\approx & {\gamma_0\, \delta_0 \over 1+z}\, T_g(0),
\label{PeakE}
\end{eqnarray}
where typically, $T_g(0)\!\sim\!1$ eV, and
$t_p$ is the time when the ICS contribution
to $E\, d^2N_\gamma/ dE\, dt\,, $ reaches its peak value.
For $\beta_g=0$, the peak energy of the time integrated spectrum
of the ICS contribution,
$E_p\!=\!max\, E^2\int (d^2N_\gamma/ dE\, dt)\, dt\,,$
satisfies $E_p\!=\!E_p(t_p)$ (see Appendix I).
For $b={\cal{O}}(1)$,
the energy spectrum predicted by the CB model, Eq.~(\ref{GRBspec}),
bears a striking resemblance
to the Band function (Band et al.~1993) traditionally used to model the
energy spectra of GRBs,
but GRBs where the spectral measurements
extended over a much wider energy range than that of BATSE and Swift/BAT,
are better fit by Eq.~\ref{GRBspec} (e.g., Wigger et al.~2008).
Moreover, the spectral evolution during the prompt emission pulses
is well described by Eqs.~(\ref{GRBspec}) and (\ref{PeakE})
(Dado, Dar and De Ru\'jula 2008a, hereafter DDD2008a; DD2008a).
\section{The lightcurve of an ICS pulses}
An ICS pulse has an approximate lightcurve (DD2008a),
\begin{equation}
E\,{d^2N_\gamma \over dt\, dE} \propto {\Delta t^2\, t^2 \over
(t^2+\Delta t^2)^2}\,E\,{dN_\gamma\over dE}\, ,
\label{ICSPulse}
\end{equation}
where $E\,{dN_\gamma/ dE}$ is given by Eq.~(\ref{GRBspec}).
At the relatively low X-ray energies covered by Swift and,
more so, at smaller ones, the first term on the RHS of
Eq.~(\ref{GRBspec}) usually dominates $E\, dN_\gamma/dE$. Consequently,
the lightcurve generated by a sum of ICS pulses
at a luminosity distance $D_L$ is generally well approximated by:
\begin{equation}
E\,{d^2N_\gamma \over dt\, dE} \approx \Sigma_i\,
A_i\Theta[t\!-\!t_i]\,{\Delta t_i^2\,(t\!-\!t_i)^2 \over
((t\!-\!t_i)^2\!+\!\Delta t_i^2)^2}\, e^{-E/E_{p,i}[t\!-\!t_i]}\, ,
\label{ICSlc}
\end{equation}
where the index `i' denotes the i-th pulse produced by a
CB launched at an observer time $t\!=\!t_i$,
$E_{p,i}[t\!-\!t_i]$ is given by Eq.~(\ref{PeakE}) with $t$ replaced
by $t\!-\!t_i$ and $A_i$ is a constant that depends on the
radius of the CB, its Lorentz and Doppler factors, the density
of the glory light and the redshift and distance of the GRB
(DD2008a).
Thus, in the CB model, each ICS pulse in the GRB light curve
is effectively described by four parameters, $t_i,\, A_i,\,
\Delta t_i$ and $E_{p,i}(0)$,
which are a-priori unknown and thus are best fit to reproduce its observed
light curve.
Setting $t_i=0$, $E_p(t)$ has the approximate form
$E_p(t)\!\approx\! E_p(0)\, t_p^2/(t_p^2\!+\!t^2).$
Such an evolution
has been observed in the time-resolved spectrum of well isolated pulses
(see, for instance, the insert in Fig.~8 of Mangano et al.~2007),
until the ICS emission is overtaken by the broad band
synchrotron emission from the swept-in ISM electrons. Hence,
the temporal behaviour of the separate ICS peaks at $E<E_p$
is given by:
\begin{equation}
E\, {d^2N_\gamma\over dt\,dE}(E,t)
\propto {t^2/\Delta t^2 \over(1+t^2/\Delta t^2)^2}\,
e^{-E\, (t^2+t_p^2)/ E_p(0)\,t_p^2}\approx e^{-E/E_p(0)}\, F(E\,t^2)
\approx F(E\,t^2),
\label{law}
\end{equation}
to which we shall refer as the `$E\,t^2$~{\it law'}.
A simple consequence of this law is that unabsorbed ICS peaks
for $E<E_p$ have
approximately identical shape at different energies when plotted as
a function of $E\, t^2$.
A few other trivial but important consequences of Eq.~(\ref{law})
for unabsorbed GRB peaks at $E \hbox{\rlap{$^<$}$_\sim$} E_p$ are the following:
\begin{itemize}
\item{}
The peak time of a pulse is at,
\begin{equation}
t_p=t_i\!+\!\Delta t_i\,.
\label{peaktime}
\end{equation}
\item{}
The full width at half maximum (FWHM) of a pulse is,
\begin{equation}
{\rm FWHM}\!\approx\! 2\, \Delta t_i,
\label{fwhm}
\end{equation}
and it extends from $t\!\approx\!t_i\!+\! 0.41\, \Delta t_i $ to
$t\!\approx\!t_i\!+\! 2.41\,\Delta t_i)$.
\item{}
The rise time (RT) from half peak
value to peak value satisfies,
\begin{equation}
{\rm RT\approx 0.30\,FWHM},
\label{ratio}
\end{equation}
independent of energy. It agrees with the empirical
relation that was inferred by Kocevski et al.~(2003)
from BATSE bright GRBs,
${\rm RT\!\approx\! (0.32\!\pm\!
0.06)\, FWHM}$.
\item{}
The FWHM increases
with decreasing energy approximately like a power-law,
\begin{equation}
{\rm FWHM}(E)\sim E^{-0.5}\, .
\label{widthrelation}
\end{equation}
This relation is consistent with the empirical relation,
${\rm FWHM}(E) \propto E^{\!-\!0.42\!\pm\! 0.06}$,
satisfied by BATSE GRBs (Fenimore et al.~2003).
\item{}
The onset-time, $t_i$, of a pulse is simultaneous at all energies.
But the peak times $t_p$ at different energies differ and the
lower-energy ones `lag'
behind the higher-energy ones:
\begin{equation}
t_p-t_i \propto E^{-0.5}\, .
\label{lagtime}
\end{equation}
\item{}
The time averaged value of $E_p(t)$ for GRB peaks, which follows from
Eq.~(\ref{PeakE}), satisfies:
\begin{equation}
E_p= E_p(0)/2=E_p(t_p)\, .
\label{Epeak}
\end{equation}
\end{itemize}
\section{The emission of synchrotron radiation}
\label{Synchrotron}
The ISM ions continuously impinging on
a CB generate
within it turbulent magnetic fields, which are assumed to be
in approximate energy equipartition with their energy,
$B\!\approx\! \sqrt{4\,\pi\, n\, m_p\, c^2}\, \gamma$.
In this field, the intercepted
electrons emit synchrotron radiation. The SR, isotropic in the CB's
rest frame, has a characteristic frequency, $\nu_b(t)$,
the typical frequency radiated by the
electrons that enter a CB at time $t$ with a relative Lorentz
factor $\gamma(t)$. In the observer's frame:
\begin{equation}
\nu_b(t)\simeq {\nu_0 \over 1+z}\,
{[\gamma(t)]^3\, \delta(t)\over 10^{12}}\,
\left[{n\over 10^{-2}\;\rm cm^3}\right]^{1/2}
{\rm Hz},
\label{nub}
\end{equation}
where $\nu_0\!\simeq\! 3.85\times 10^{16}\, {\rm Hz}\!\simeq\! 160/h$ eV.
The spectral energy density of the SR
from a single CB at a luminosity distance $D_L$ is given by (DDD2003a):
\begin{equation}
F_\nu \simeq {\eta\, \pi\, R^2\,n\, m_e\, c^3\,
\gamma(t)^2\, \delta(t)^4\, A(\nu,t)\,
\over 4\,\pi\, D_L^2\,\nu_b(t)}\;{p-2\over p-1}\;
\left[{\nu\over\nu_b(t)}\right]^{-1/2}\,
\left[1 + {\nu\over\nu_b(t)}\right]^{-(p-1)/2}\,,
\label{Fnu}
\end{equation}
where $p\!\sim\! 2.2$ is the typical spectral index
of the Fermi accelerated
electrons, $\eta\!\approx\!1$ is the fraction of the impinging ISM
electron energy that is synchrotron re-radiated by the CB, and $A(\nu, t)$
is the attenuation of photons of observed frequency $\nu$ along the line
of sight through the CB, the host galaxy (HG), the intergalactic medium
(IGM) and the Milky Way (MW):
\begin{equation}
A(\nu, t) = {\rm
exp[-\tau_\nu(CB)\!-\!\tau_\nu(HG)\!-\!\tau_\nu(IGM)\!-\!\tau_\nu(MW)].}
\label{attenuation}
\end{equation}
The opacity $\tau_\nu\rm (CB)$ at very early times, during the
fast-expansion phase of the CB, may strongly depend on time and frequency.
The opacity of the circumburst medium [$\tau_\nu\rm (HG)$ at early times]
is affected by the GRB and could also be $t$- and $\nu$-dependent. The
opacities $\tau_\nu\rm (HG)$ and $\tau_\nu\rm (IGM)$ should be functions
of $t$ and $\nu$, for the line of sight to the CBs varies during the AG
observations, due to the hyperluminal motion of CBs.
\subsection{Early-time SR}
The initial rapid expansion of a CB slows down as it propagates
through the wind and scatters its particles
(DDD2002, DD2004). This expansion is roughly described by
$R^2\approx R_{cb}^2\, t^2/(t^2\!+\!t_{exp}^2)$, where $R_{cb}$
is the asymptotic radius of the CB.
The effective deceleration of a CB begins only when it has swept
a mass comparable to its rest mass (see next subsection).
Until that time both $\gamma$
and $\delta$ stay put at their initial values
$\gamma_0$ and $\delta_0$ and
Eq.~(\ref{Fnu})
yields an early-time SR light curve,
$F_\nu\! \propto\! e^{-\tau_{_W}}\, R^2\, n^{(1+\beta)/2}\,\nu^{-\beta}.$
where $\beta(t)\!=\!0.5$ for $\nu\!\ll\!\nu_b(t)$ and
$\beta(t)\!=\!p/2$
for $\nu\!\gg\!\nu_b(t)$.
Since $r\!\propto\!t$, a CB ejected into
a windy density profile, $n\!\propto\!1/r^2$,
created by the mass ejection from the
progenitor star prior to its SN explosion, emits SR
with an early-time light curve,
\begin{equation}
F_\nu \propto {e^{-a/t}\,
t^{1-\beta} \over t^2+t_{exp}^2}\, \nu^{-\beta}\, .
\label{SRP}
\end{equation}
For a jet of CBs ejected at times $t_i$, the early SR lightcurve becomes
the sum of such contributions from the individual CBs with
the time $t$ replaced by, $t\!-\!t_i$, the times after their ejection.
\subsection{SR during the CB's coasting phase}
As it plows through the ionized ISM, a CB
gathers and scatters its constituent ions, mainly protons.(DD2004). The
scattered and re-emitted
protons exert an inward pressure on the CB, countering its expansion.
In the approximation of isotropic re-emission in the CB's
rest frame and a constant ISM density $n\!\sim\!n_e\!\sim\!n_p$,
one finds that, within minutes of observer's time $t$, a typical CB
of baryon number $N_b\!\approx 10^{50}$ reaches an approximately constant
`coasting' asymptotic radius $R\!\sim\!10^{14}$ cm, before it finally
stops and blows up, after a journey of months of observer's
time. During the coasting phase, and in a constant density ISM,
$\gamma(t)$ obeys (Dado et al.~2006):
\begin{equation}
({\gamma_0/ \gamma})^4+
2\,\theta^2\,\gamma_0^2\,(\gamma_0/\gamma)^2
=1\!+\!2\!\,\theta^2\,\gamma_0^2\!+\!t/t_0\,,
\label{decel}
\end{equation}
the solution of which is,
\begin{equation}
\gamma(t) = {\gamma_0\over [\sqrt{(1+\theta^2\,\gamma_0^2)^2 +t/t_0}
- \theta^2\,\gamma_0^2]^{1/2}}\,,
\label{goft}
\end{equation}
with
\begin{equation}
t_0={(1\!+\!z)\, N_{_{\rm B}}\over 8\,c\, n\,\pi\, R^2\,
\gamma_0^3}\,.
\label{break}
\end{equation}
The deceleration law is for the
case in which the ISM particles re-emitted fast by the
CB are a small fraction of the flux of the intercepted ones.
As can be seen from Eq.~(\ref{decel}), $\gamma$ and $\delta$
change little as long as $t\!\ll\! t_b\!=\![1\!+\gamma_0^2\,
\theta^2]^2\,t_0\, .$
In terms of typical CB-model values of $\gamma_0$,
$R$, $N_{_{\rm B}}$ and $n$,
\begin{equation}
t_b= (1300\,{\rm s})\, [1+\gamma_0^2\, \theta^2]^2\,(1+z)
\left[{\gamma_0\over 10^3}\right]^{-3}\,
\left[{n\over 10^{-2}\, {\rm cm}^{-3}}\right]^{-1}
\left[{R\over 10^{14}\,{\rm cm}}\right]^{-2}
\left[{N_{_{\rm B}}\over 10^{50}}\right] \! .
\label{tbreak}
\end{equation}
For $t\!\gg\!t_b$, $\gamma$ and $\delta$ decrease like $t^{-1/4}\,.$
The transition $\gamma(t)\!\sim\! \gamma_0\! \rightarrow\!\gamma\!\sim\!
\gamma_0\,(t/t_0)^{-1/4}$
induces a bend (the so called `jet break')
in the synchrotron AG from a plateau to an asymptotic power-law
decay,
\begin{equation}
F_\nu \propto t^{-p/2-1/2}\,\nu^{-p/2}= t^{-\Gamma+1/2}\,
\nu^{-\Gamma+1},
\label{Asymptotic}
\end{equation}
with a power-law in time steeper by half a unit
than that in frequency.
In terms of the frequently used notation,
the asymptotic behaviour satisfies,
$F_\nu(t)\propto t^{-\alpha}\,\nu^{-\beta}$
with
\begin{equation}
\alpha=\beta+1/2=p/2+1/2=\Gamma-1/2\,,
\label{indices}
\end{equation}
which is valid for a constant density.
For a fast falling density
beyond a distance $r_c$ seen by CBs that
encounter density bumps formed by stellar winds, or seen by CBs that
escape
the galactic bulge or disk into the galactic halo,
$\gamma$ and $\delta$ tend to a constant
and $r\!-\!r_c$ becomes proportional to $t-t_c$
where $r(t_c)\!=\!r_c$.
As a result, for a density profile $n\!\propto\! 1/r^2$ beyond $r_c$,
the unabsorbed synchrotron afterglow as given by
Eq.~(\ref{Fnu}) tends to,
\begin{equation}
F_\nu \propto n^{(p+2)/4}\,\nu^{-p/2} \propto
(t-t_c)^{-(p+2)/2}\,\nu^{-p/2} =(t-t_c)^{-\Gamma}\, \nu^{-\Gamma+1}\,,
\label{Fnurm2}
\end{equation}
and satisfies the asymptotic relation,
\begin{equation}
\alpha=\beta+1=\Gamma \approx 2.1\, .
\label{indicesrm2}
\end{equation}
Thus, unattenuated optical and X-ray AGs
of GRBs may steepen at late times to an asymptotic decay,
$\!\sim\! (t-t_c)^{-2.1}.$
Such an achromatic steepening, which was seen in several late time
optical and X-ray AGs of Swift GRBs (see Figs.~6,7 in DD2008b), may
have been misinterpreted as very late
`jet breaks' (e.g., Dai et al.~2008; Racusin et al.~2008a).
All the late time afterglows of Swift GRBs which are well sampled at
late time seem to satisfy
either the asymptotic relation (\ref{indices}) or (\ref{indicesrm2}).
(see DDD2008b; DD2008b).
\section{Comparison between theory and observations}
\subsection{GRB 990123}
In Fig.~3 we compare the BATSE multipeak lightcurve of GRB 990123 in the
20-50 keV channel (Briggs et al.~1999) and its CB model description. The
count-rate in the 20-50 keV energy band was calculated from the
integral,
$\int F_\nu\, dE/E\,,$ using Eq.~(\ref{ICSlc}) with the
best fit parameters which are listed in Table I for the 9 peaks suggested
by the multichannel BATSE data and by the BeppoSAX data (Maiorano et
al.~2005). As shown in Fig.~3 the shape of the peaks and the entire
lightcurve are well reproduced by Eq.~(\ref{ICSlc}).
In Fig.~4 we compare the early time $V$ band lightcurve of GRB 990123 as
measured by ROTSE (Akerlof et al.~1999) and the CB model expectation as
given by Eq.~(\ref{SRP}) assuming a single CB and the best fit
parameters, $t_0=22$ s, $a=1.974$ s, $\beta_O=0.668$ and
$A=2.49\times 10^8$ $\mu$Jy.
The single CB approximation
was used because of the lack of information on the short time behaviour of
the optical lightcurve during the prompt emission phase. Fig.~4, however,
demonstrates that the rapid decay of the lightcurve at the end of the
prompt emission is well reproduced.
In Fig.~5 we compare the observations of the optical lightcurve of GRB
990123 from onset (Akerlof et al.~1999) until late time ( Castro-Tirado et
al.~1999; Galama et al.~1999; Kulkarni et al.~1999a; Fruchter et al.~1999,
2000; Holland et al.~2000 and references therein), normalized to the
$V$-band, and its CB model description
as given by Eq.~(\ref{Fnu}) with
the afterglow parameters $\gamma\, \theta\!=\!0.24$, $t_0=2250$ s
and $p=1.79\,.$ Due to a
gap in the
data between 500 s and 15,000 s, the expected transition from a
circumstellar density profile $\propto\! 1/r^2$ to a constant ISM density
was not well determined, However, the gradual bending (`jet break') of the
optical AG to an asymptotic power-law decay, $F_\nu\!\propto\!
t^{\!-\!\beta_O\!-\!1/2} \nu^{-\beta_O}\,,$ is well reproduced with the
expected late-time spectral index $\beta_O\!\sim\!\beta_X\!\sim\! 1.1\,.$
In Fig.~6 we compare the the lightcurve of the X-ray afterglow of GRB
990123 in
the 2-10 keV band, which was measured with BeppoSAX (Maiorano et al.~2005)
for $t\!<\!2.5$ days,
and its CB model description. The best fit SR lightcurve
required
$p\!=\!1.79$, implying $\beta_X\!=\!0.90$, consistent with
$\beta_X\!=0.94\!\pm\!0.12$ that was inferred by Maiorano et al.~2005
from their data. The observed temporal power-law decay index of the
late-time X-ray afterglow, $\alpha_X\!=\!1.46\!\pm\!0.04$ (Maiorano et
al.~2005), obeys the CB model relation (Eq.~(\ref{indices})),
$\alpha_X\!=\!\beta_X\!+\!1/2\!=\!1.44\!\pm\!0.13\, .$
\subsection{GRB 080319B}
The prompt $\gamma$-ray and hard X-ray emission in GRB 080319B is composed
of many narrow peaks (see Fig.~1 in Racusin et al.~2008), most of which
are not well resolved, which makes the comparison between theory and
observations for GRB 080319B less conclusive. The early-time optical
lightcurve, was however much better sampled (Racusin et al.~2008; Wozniak
et al.~2008) than that in GRB 990123, as shown in Fig.~7 where it is
compared to its CB model description in terms of 3 SR peaks, each one
described by Eq.~(\ref{SRP}) with the parameters listed in Table II. The
decay of the prompt emission favours a single CB crossing 3 shells which
were ejected by the progenitor star before the supernova explosion, rather
than 3 CBs crossing a continuous pre-supernova blowing wind.
In Fig.~8 we compare the entire $R$-band (and $V$ band renormalized to the
$R$ band) lightcurve of GRB080319 (Racusin et al.~2008) and its CB model
description assuming that the initially expanding 3 CBs merged into a
single CB by the end of the prompt ICS emission of gamma-rays and hard
X-rays around 300 s (observer time) which decelerates in roughly a
constant density ISM. The afterglow parameters are listed in Table III. The
`missing jet break' is hidden under the prompt emission. Shown also is the
contribution to the $R$-band afterglow from an SN akin to SN1998bw (Galama
et al.~1998) displaced to the GRB site.
In Fig.~9 we compare the lightcurve of
the 0.3-10 keV X-ray afterglow of
GRB 080319B measured with the Swift XRT (Racusin et al.~2008) and its CB
model description, assuming a constant ISM density. The best fit
parameters are $\gamma\,\theta\!=\!0.14 $ and $t_b<71$ s. The late time
temporal decay of the X-ray AG is well described by a power-law with
$\alpha_X\!=\!1.54\!\pm\! 0.04 $, except around 40,000 s, where the
lightcurve is poorly sampled. As expected for GRBs with large measured
$E_p$, $E_{iso}$ and $L_p$ (DDD2008b), no AG break was observed in the XRT
lightcurve. The wiggling of the measured lightcurve around
a power-law decay, is probably due to variations in the
ISM density along the CB trajectory, which we have not tried to
parametrize.
In Fig.~10 we compare the photon spectral index of the 15-150 keV light
curve of GRB 080319B, which was inferred from observations with the
Swift broad alert telescope (BAT) and reported in Fig.~2 of the
supplementary material in Racusin et al.~2008, and that expected in the CB
model (DDD2008a). As long as the prompt hard X-ray emission is dominated
by overlapping ICS peaks, $\Gamma\!\sim \!1$. It increases rapidly during
the fast decay phase of the prompt emission (DDD2008a) until the
synchrotron radiation dominates the emission and then
$\Gamma\!\approx \!2.1$ (e.g. DDD2002). These predictions agree
well with the observations as shown in Fig.~10.
\section{Discussion}
Accurate data that have been accumulated in recent years
from space based and ground based observations have challenged the
prevailing views on GRBs. This is true in particular for the brightest and
best studied GRBs, 990123 (e.g., Maiorano et al.~2005; Corsi et al.~2005)
and 080319B (Bloom et al.~2008; Racusin et al.~2008): Their prompt
multiwavelength emission cannot be explained by a single radiation
mechanism. Their hard X-ray and $\gamma$-ray emission cannot be explained
as SR from internal shocks generated by collisions between conical shells.
Their prompt optical emission is not correlated with their hard X-ray and
$\gamma$-ray emission. Their afterglows are chromatic, and roughly decay
like a single power-law without a jet break. Their spectral and temporal
power-law indices do not satisfy the closure relations for conical blast
waves.
To rescue the FB model, SR as the source of the hard X-ray and
$\gamma$-ray emission was replaced by
inverse Compton scattering of the self produced SR.
In this so called `synchrotron self Compton' (SSC) mechanism, the prompt
SR is produced either by internal shocks (e.g., Kumar \& Panaitescu~2008)
or by relativistic magnetic turbulences without internal shocks (e.g.
Kumar \& Narayan~2008). The SSC mechanism implies that the SR emission
begins before the X-ray and $\gamma$-ray emission, and both are
correlated. But, contrary to these expectations, the observed prompt
optical emission lags consideraby
behind the hard X-ray and $\gamma$-ray emission and
no temporal correlation is observed between the hard X-ray and
$\gamma$-ray peaks and the prompt optical peaks. Moreover, the SSC model
predicts a vanishing polarization of the prompt hard X-ray and
$\gamma$-ray emission. The measured polarization, so far in 4 ordinary
GRBs, suggests a large polarization (Cobb et al.~2004; Willis et
al.~2005; Kalemci et al.~2007; McGlynn et al.~2007).
The situation concerning the FB model interpretation of the observed
afterglow of GRBs 990123 and 080319B is similar. Although some aspects of
the data have been explained by invoking structured jets, multiple blast
waves propagating into the ISM, backward shocks and evolving microphysical
parameters, no unique falsifiable predictions to test these suggestions
were made and it is not clear whether the agreement between theory and
some aspects of the data which was claimed is significant or results only
from a flexible parametrization and sufficient adjustable parameters.
The situation concerning the CB model is entirely different. The
predictions of the model were derived in fair approximations from its
original underlying assumptions long ago. They were shown to
predict correctly the main observed properties of GRBs and reproduce
successfully the diverse broad band light curves of large representative
sets of both long GRBs and XRFs (e.g., DD2004; DD2008a and references
therein) and short hard bursts (DD2008b). In this paper, we have
demonstrated these for GRBs 990123 and 080319B, the two brightest and so
far the best studied gamma ray bursts, without invoking any new physics.
They imply that GRBs 990123 and 080319B were ordinary, highly
collimated GRBs produced in a core collapse supernova explosion within a
high-density wind environment and observed from a very near-axis viewing
angle. Massive wind/ejecta blown from the progenitor star before the
supernova explosion probably created a matter-free bubble around the
progenitor star which was filled with radiation. Inverse Compton
scattering of this light by the jet of CBs produced the hard X-rays and
$\gamma$-rays which preceded the broadband SR emission when the jet
crossed the wind. As in all other GRBS, inverse
Compton scattering and
synchrotron radiation, the two dominant radiation mechanisms in the
cannonball model of GRBs, together with the burst environment -wind blown
into a constant density ISM- provide a very simple and sufficiently
accurate description of the multiwavelength lightcurves of their prompt
and afterglow emissions. The dependence of the bend/break frequency on
density variations along the jet trajectory can explain the observed
spectral variations but obviously cannot predict it. The
predicted general trend
$\beta_O(0)\!\sim\! 0.5\!\rightarrow$ $\beta_O(t)\!\sim\! 1.1$
at late time is well satisfiesd.
Two predictions which can be tested in future observations of extremely
bright GRBs are as follows: Because of their small viewing angles, the
polarization of the prompt X-rays and $\gamma$-rays in very bright GRBs,
such as 990123 and 080319B, is predicted to be small (Shaviv \& Dar~1995;
DD2004), unlike that of ordinary GRBs with $\gamma\, \theta\approx 1$
where it is predicted to be very large.
Collisions of the CBs with the dense wind and glory, which are needed to
produce very luminous GRBs, are expected to produce also detectable fluxes
of high energy photons (Dado \& Dar~ 2005: Dado \& Dar, in preparation):
Electrons from the wind and/or ISM which are
swept into, or scattered by, the CBs should
produce sub-GeV photons by ICS of glory light. Hadronic collisions of the
thermal nuclei in the CBs' plasma with wind nuclei are expected to
produce detectable fluxes of sub-TeV photons and marginal fluxes of
neutrinos through $\pi$ production, while wind/ISM nuclei swept into or
scattered by the CBs are expected to produce fluxes of sub-PeV
photons which are detectable only from very nearby bursts
because of the opacity of the infrared background to high energy photons.
(Dar \& De R\'ujula~2006).
{\bf Acknowledgment:}
We thank Elisabetta Maiorano for making
available to us tabulated data of the BeppoSAX measurements
of the X-ray light curves of GRB 990123.
\section{Appendix I}
With $E_p(t)\!\approx\! E_p(0)\, t_p^2/(t_p^2\!+\!t^2)\!$,
the ICS spectral energy density satisfies,
\begin{equation}
E\, {d^2N_\gamma\over dt\,dE}(E,t) \propto e^{-E/E_p(0)}\, F(E\,t^2)\,.
\label{et2}
\end{equation}
and then,
\begin{equation}
\int E^2\, {d^2N_\gamma\over dt\,dE}(E,t)dt \propto E^{1/2}\,
e^{-E/E_p(0)}\,\int_0^\infty F(E\,t^2)\,d(E^{1/2}\,t)\propto
E^{1/2}\,e^{-E/E_p(0)}\,,
\label{tint}
\end{equation}
has a maximum at $E=E_p(0)/2=E_p(t_p)$.
\newpage
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 1,981 |
\section{Introduction}
\label{sec:intro}
Due to the early stage of post-quantum algorithm research,
it is of paramount importance to provide the full range of
quantum secure cryptographic primitives (signatures, key exchange, etc.)
for all the main mathematical problems cryptography relies on.
This way, it will be easier to switch from one scheme to the other
in the case one of the problems turns out to be insecure in the quantum model.
Given that it is the oldest quantum resistant family and, hence,
the most thoroughly studied among all the contenders,
code-based cryptography is a strong candidate in the NIST competition to standardize quantum resistant cryptographic algorithms \cite{NISTRound1}.
This work focuses on code-based cryptography digital signature schemes.
Designing such schemes efficiently has been a grueling challenge and
mainly three different approaches have been followed, with very little success.
Hash-and-sign was introduced in pioneering work
of Courtois, Finiasz, and Sendrier \cite{courtois2001achieve},
and is probably the most popular approach of the three.
It is based on the existence of a trapdoor which allows fast decoding,
obtained by hiding a structured code into a random linear code.
Different choices of the underlying code lead to different instantiations of the scheme.
All hash-and-sign schemes yield to small signatures (few thousands bits), but large public keys (order of MBytes), in some cases even non-practical ones for 128 bit security level and above.
Furthermore, almost all these schemes have been attacked.
The other two approches avoid the use of trapdoors. The first is usually referred to as the KKS (Kabatianskii-Krouk-Smeets) signature scheme \cite{kabatianskii1997digital}, who later evolved in the BMS (Barreto-Misoczki-Simplicio) scheme \cite{barreto2011one}.
Both of them can be instantiated on top of general linear codes.
KKS and BMS have a good balance between public key (few tens of thousands of bits) and signature size (few thousands of bits), but they can only be considered one-time signature schemes.
The third approach uses the Fiat-Shamir transform to turn a zero-knowledge identification scheme into a signature scheme, as initially proposed by Stern \cite{stern1993new} in 1993.
The main drawback of such scheme is the large signature size.
Many researchers followed Stern approach, trying to improve either the signature or the key size of the scheme.
In this manuscript, we provide a variation of a signature scheme based on Stern approach, obtaining the smallest signature (sgn), secret and public key (pk) sizes in the literature.
Compared to other approaches used to build code-based signature schemes,
we also have the smallest $|\mathsf{sgn}| + |\pk|$ value.
We derive such signature from a 5-pass identification protocol with cheating probability 1/2.
We provide a security proof in the Random Oracle Model,
a detailed pseudo-code, implementation performances,
set of parameters for 80, 128, 192, and 256 bit of classical security, and
a comparison with the parameters of the most important code-based signature schemes.
The paper is organized as follows: Sect.~\ref{sec:rel} provides an overview of previous works
and the ideas behind the scheme.
In Sect.~\ref{sec:prel} we provide the notions that are needed to understand the contribution.
Sect.~\ref{sec:id_veron_dc} presents our new identification protocol.
Sect.~\ref{sec:param} sets the parameters of our signature schemes.
Sect.~\ref{sec:perf} argues about the theoretical complexity of
the key generation, signature and verification algorithms,
providing also implementation details and performances.
Sect.~\ref{sec:comp} shows a comparison of the parameters of our proposal and other well-known code-based signature schemes, and Sect.~\ref{sec:concl} draws the conclusions.
\section{Main idea}
\label{sec:rel}
Commonly, cryptographic signature schemes whose security relies on the difficulty of decoding a linear code are built by converting a 3 or a 5-pass identification protocol into a signature scheme via the Fiat-Shamir transform or a generalization of it.
The first to propose such paradigm was Stern \cite{stern1993new}.
In this work, Stern exhibits a 3-pass identification protocol
whose security is based on the difficulty of decoding a random linear code and finding a hash collision,
and in which a cheater can correctly identify with a probability of 2/3.
For this last reason, the protocol should be run an appropriate number of rounds which depends on the security level the scheme needs to reach.
Since the corresponding signature is proportional to the number of rounds, this means that this type of approach yields to large signatures, of the order of hundreds of KBytes.
The basic idea of the protocol is that, given the parity-check matrix $H$ of a linear code as a public parameter, a random vector $e$ of weight $w$, and a public key $s=eH$,
the prover needs to prove the knowledge of two properties,
namely the fact that
the vector $e$ is generating the syndrome $s$, and
that $e$ has Hamming weight $w$.
Adding a random commitment there are always two possibilities for
cheating among the three cases.
In the same work, Stern shows how to reduce the cheating probability to 1/2,
by splitting the challenge step into two challenges,
the second of which adds a \emph{variation} on $e$,
forcing the protocol to perform 5 passes.
Precisely, $e$ was chosen as a codeword of a Reed-Muller code.
Such trick allows to almost halve the corresponding signature size,
even though, with this particular solution, there is a loss in efficiency.
Stern signature schemes presents very small secret keys (less than a thousand bits) and medium size public keys (one hundred thousand bits).
Subsequent works aim at improving either key or signature sizes,
by (1) choosing a structured code rather than a random linear code,
(2) changing the variation performed on $e$,
(3) working with the dual cryptosystem, or
(4) working in a different metric.
In \cite{veron1997improved}, Veron presents the dual of the 3-pass Stern proposal,
i.e. it uses the generator matrix $G$ of a code, instead of the parity-check matrix as a public parameter, and uses a pair $(x,e)$ as a secret key, and a codeword $y=x G +e$ as a public key. This allows to send less data on average during the response step, implying slightly shorter signatures.
Later, Cayrel-Veron-El Yousfi Alaoui (CVE) \cite{cayrel2010zero} presented a 5-pass identification protocol with cheating probability of 1/2,
using codes over $\FF_{2^m}$, rather than $\FF_2$ as done by Stern and Veron,
and a scalar multiplication as the variation of $e$.
In \cite{dagdelen2016extended} it is shown how to extend the Fiat-Shamir transform to a $n$-pass protocol (with $n$ odd).
In 2011, Gaborit, Schrek and Z\'emor \cite{gaborit2011full}
presented the rank metric version of the Stern identification protocol,
decreasing significantly key and signature sizes,
due to the fact that rank metric decoding has quadratic exponential complexity,
while Hamming metric decoding is linear exponential.
The same year, Aguilar, Gaborit and Schrek \cite{aguilar2011new},
used double circulant codes in the Hamming metric
to reduce the key size of the Veron scheme, and
presented a 5-pass version of it, with cheating probability close to 1/2,
performing a variation of $e$ with a circulant rotation of its two halves in the second challenge step.
Furthermore, they introduced a compression technique to reduce the signature size.
Recently, in \cite{bellini2018code}, a rank metric version of Veron and CVE has been presented, though lacking a security proof.
We are not aware of any attack to any of the Fiat-Shamir paradigm constructions, which probably have not received much attention from the cryptographic community yet.
In this work, we present a rank metric version of the 5-pass Veron double circulant signature scheme of \cite{aguilar2011new}, with a new variation performed on $e$,
which allows us to reach a cheating probability much closer to 1/2.
Precisely, we adopt a random linear combination of all possible rotations of $e$
in the second challenge step.
We also present a compressed version of the scheme, which achieves signature sizes that are comparable to the one of post-quantum hash-based signature schemes.
\section{Preliminaries}
\label{sec:prel}
In this section we provide the essential definition of the objects that are used in our protocol.
A linear $(n,k)_q$-code $C$ is a vector subspace of $(\FF_q)^n$ of dimension $k$, where $k$ and $n$ are positive integers such that $k<n$, $q$ is a prime power, and $\FF_q$ is the finite field with $q$ elements.
Elements of the vector space are called vectors or words, while elements of the code are called codewords.
A matrix $G \in \FF_q^{k \times n}$ is called a generator matrix of $C$ if its rows form a basis of $C$, i.e.
$C = \{x\cdot G : x \in (\FF_q)^k\}$.
A matrix $H \in \FF_q^{(n-k) \times n}$ is called a parity-check matrix of $C$ if
$C = \{x\in (\FF_q)^n: H\cdot x^T = 0\}$.
Our schemes will use a special type of linear codes, called \emph{double circulant} codes,
which are a special case of \emph{quasi-cyclic} (or \emph{circulant}) codes (see e.g. \cite{misoczki2013mdpc}).
\begin{definition}[Double Circulant Codes]
Let $n = 2k$ for an integer $k$.
Consider a vector $x = (x_1, x_2)$ of $(\FF_{q})^n$ as a pair of two blocks of length $k$.
An $[n, k]$ linear code $C$ is \emph{Double Circulant} (DC) if, for any $c = (c_1, c_2) \in C$,
the vector obtained after applying a simultaneous circular shift to both blocks $c_1, c_2$
is also a codeword.
More formally, by considering each block $c_1, c_2$ as a polynomial in $R = \FF_{q}[X]/(X^n - 1)$,
the code $C$ is DC if for any $c = (c_1, c_2) \in C$ it holds that $(X \cdot c_1, X \cdot c_2) \in C$.
A \emph{systematic} double circulant $[n,k]$ code
is a double circulant code with a parity-check matrix of the form $H = [I_k | A]$,
where $I_k$ is the identity matrix of size $k$, and
$A$ is a $k \times k$ circulant matrix.
\end{definition}
In this paper we work with codes in the \emph{rank metric}.
Given a fixed basis $b = \{b_1, \ldots, b_m\}$ of $(\FF_q)^m$,
a vector $a \in (\FF_{q^m})^n$ can be represented as a matrix with entries in $\FF_q$, by expanding each component of $a_i$ with respect to $b$ in a column $(a_{1,i}, \ldots, a_{m,i})^T$.
where $a_i = \sum_{j=1}^{m} a_{j,i} b_j, i = 1, \ldots, n$.
We define the rank of a vector as the rank of its \emph{matrix representation},
with respect to $b$.
We denote the previous matrix representation as $\phi_b(a)$, and
by $\phi_b^{-1}$ the inverse map.
In what follows, we will omit $b$ as we consider it fixed.
To send a binary vector of a certain Hamming weight
to \emph{any} other vector of the same Hamming weight,
it is sufficient to apply a random permutation to vector components.
The map with the analogue property in the rank metric,
i.e. sending a vector of a certain rank to \emph{any} other vector of the same rank,
can be defined as follows (see \cite{gaborit2011full}).
\begin{definition}
Let
$Q \in M_{m,m}(\FF_q)$ be a $q$-ary matrix of size $m \times m$,
$P \in M_{n,n}(\FF_q)$ be a $q$-ary matrix of size $n \times n$, and
$v \in (\FF_{q^m})^n$.
We define the function $\Pi_{P,Q}$ such that $\Pi_{P,Q}(v) = \phi^{-1}(Q \cdot \phi(v) \cdot P)$, i.e.
\begin{align*}
\Pi_{P,Q} : (\FF_{q^m})^n & \mapsto (\FF_{q^m})^n \\
(v_1,\ldots,v_n) & \mapsto (\pi_1, \ldots, \pi_n)
\end{align*}
where for $h=1,\ldots,n$, \\
$
\pi_h:= \beta_1 \sum_{i=1}^m \sum_{j=1}^n Q_{1,i} v_{i,j} P_{j,h} + \ldots + \beta_m \sum_{i=1}^m \sum_{j=1}^n Q_{m,i} v_{i,j} P_{j,h}
$
\end{definition}
It is proved in \cite{gaborit2011full} that
the following properties hold for $\Pi_{P,Q}$.
\begin{itemize}
\item For any $x, y \in (\FF_{q^m})^n, P \in M_{n,n}(\FF_q)$ and $Q \in M_{m,m}(\FF_q)$ then:
\begin{itemize}
\item (rank preservation) $\mathrm{w_R}(\Pi_{P,Q}(x)) = \mathrm{w_R}(x)$;
\item (linearity) $a \Pi_{P,Q}(x) + b \Pi_{P,Q}(y) = \Pi_{P,Q}(ax+by)$.
\end{itemize}
\item For any $x, y \in (\FF_{q^m})^n$ such that $\mathrm{w_R}(x)=\mathrm{w_R}(y)$, it is possible to find $P \in M_{n,n}(\FF_q)$ and $Q \in M_{m,m}(\FF_q)$ such that $x = \Pi_{P,Q}(y)$.
\end{itemize}
Both in the Hamming and in the rank metric,
random codes over $\FF_q$ asymptotically achieve the Gilbert-Varshamov bound~\cite{gabidulin1985theory}.
Furthermore, they have close to optimal correction capability \cite{loidreau2006properties}.
We now define the problems upon which the security of the schemes we present is based.
\begin{definition}[RSD Distribution]
Given the positive integers $n, k$, and $r$, the $RSD(n, k, r)$ Distribution chooses
$H \sample (\FF_{q^m})^{(n-k) \times n}$ and $x \sample (\FF_{q^m})^{n}$
such that $\mathrm{w_R}(x) = r$, and outputs $(H, H \cdot x^T)$
\end{definition}
\begin{problem}[RSD Problem]
On input $(H, y^T) \in (\FF_{q^m})^{(n-k) \times n} \times (\FF_{q^m})^{n}$ from the RSD distribution,
the Rank Syndrome Decoding problem RSD($n, k, r)$ asks to find $x \in (\FF_{q^m})^n$
such that $H \cdot x^T = y^T$ and $\mathrm{w_R}(x) = r$.
\end{problem}
The previous problem can be defined correspondingly also in the Hamming metric,
in which setting the problem has been proven to be NP-complete \cite{berlekamp1978inherent}.
The RSD problem has recently been proven difficult with a probabilistic reduction to
the Hamming scenario in \cite{aguilar2016efficient}.
For cryptography, it is also useful to use the Decisional version of the problem.
Our scheme security depends on the difficulty of solving the same RSD problem
defined with Double Circulant codes, rather than random linear codes.
The decisional version of this problem is a special case of
the Decisional Rank $s$-Quasi Cyclic Syndrome Decoding Problem
defined for example in \cite{aguilar2016efficient}.
There is no known reduction from the search version of this problem to its decisional version.
However, the best known attacks on the decisional version of the problem
remain the direct attacks on the search version of the problem.
\section{Veron Double Circulant identification protocol in the rank metric}
\label{sec:id_veron_dc}
The scheme we present in this section,
to which we refer to as the Rank Veron Double Circulant (RVDC) identification protocol,
mixes the ideas from \cite{gaborit2011full},
where the Stern protocol is converted from Hamming to rank metric and the function $\Pi_{P,Q}$ (see Section \ref{sec:prel} above) is introduced,
and from \cite{aguilar2011new},
where the cheating probability of the Veron protocol
is improved from 2/3 to 1/2
using the double circulant technique in the Hamming metric.
In \cite{aguilar2011new}, the intermediate challenge is a random parallel left rotation.
To better exploit the rank metric properties, and to make it more difficult to guess the challenge for an attacker, we instead consider a random linear combination of all possible parallel left rotations.
\begin{definition}
Let $n=2k$
and $x = (x_1, \ldots, x_{k}) \in (\FF_{q^m})^{k}, y = (y_1, \ldots, y_{n}) \in (\FF_{q^m})^{n}$.
We denote with
\begin{align*}
\rot_{i}((x_1, \ldots, x_k))=
(x_{i+1}, \ldots, x_{k}, x_{1}, \ldots, x_{i})
\end{align*}
the left rotation of $i$ positions of the vector $x$,
and with
\begin{align*}
\drot_{i}((y_1, \ldots, y_{i},y_{i+1}, \ldots, y_k,y_{k+1}, \ldots, y_{k+i}, y_{k+i+1}, \ldots, y_{k+k} ))= \\
(y_{i+1}, \ldots, y_{k}, y_{1}, \ldots, y_{i},y_{k+i+1}, \ldots, y_{k+k}, y_{k+1}, \ldots, y_{k+i} )
\end{align*}
the parallel left rotation of $i$ positions of the two halves of the vector $y$.
Given
$a = (\alpha_1, \ldots, \alpha_{k}) \in (\FF_{q})^{k}$
we also denote with $\Gamma'_{a}(x)$ the linear combination of all possible $k$ left rotations of $k-i$ positions of $x$, and $\Gamma_{a}(y)$ the linear combination of all possible $k$ parallel left rotations of $i$ positions of $y$
\begin{align*}
\Gamma'_{a}(x) = \sum_{i=1}^{k} \alpha_i \cdot \rot_{k-i}(x) \in (\FF_{q^m})^k \,, \quad
\Gamma_{a}(y) = \sum_{i=1}^{k} \alpha_i \cdot \drot_{i}(y) \in (\FF_{q^m})^n \,.
\end{align*}
\end{definition}
The following lemma, used to prove the completeness of the scheme, can be easily proven.
\begin{lemma}
\label{thm:gamma_property}
Given the $k \times 2k$ generator matrix $G$ of a double circulant linear code
and a vector $x = (x_1, \ldots, x_{k}) \in (\FF_{q^m})^{k}$,
the following property holds
\begin{align*}
\Gamma_a(x \cdot G) = \Gamma'_a(x) \cdot G
\end{align*}
\end{lemma}
As we already noted in Section \ref{sec:prel} a codeword $y$ of a $[2k,k]$ double circulant code can be seen as the concatenation of two blocks, i.e. $y=(y_1, y_2)$, of length $k$.
If we consider each block $y_1, y_2$ as a polynomial in $R = \FF_{q}[X]/(X^k - 1)$ then the function $(y_1,y_2) \mapsto \drot_{i}((y_1,y_2))$ is equal to $(y_1,y_2) \mapsto (X^i \cdot y_1,X^i \cdot y_2)$, where the multiplication by $X^i$ is performed in the ring, i.e. modulo $X^k - 1$.
Although there is no general complexity result for quasi-cyclic codes,
their decoding is considered to be difficult by the community.
There exist structural attacks which uses the cyclic structure of
the code \cite{sendrier2011decoding,hauteville2015new,guo2015new,londahl2016squaring},
but these attacks have only a very limited impact on the practical complexity of the problem.
These attacks are especially efficient in the case when
the polynomial $X^n - 1$ has many small factors.
These attacks become inefficient as soon as $X^n - 1$ has only two factors
of the form $(X - 1)$ and $X^{n-1} + X^{n-2} + \ldots + X + 1$,
which is the case when $n$ is primitive in $\FF_{q^m}$.
The conclusion is that in practice,
the best attacks are the same as those for non-circulant
codes up to a small factor.
Another solution to completely avoid such attacks is to use the ring
$R = \FF_{q}[X]/(X^k - p(X))$, where $p(X)$ is a polynomial with coefficients in $\FF_{q}$, and $X^k - p(X)$ is irreducible over $\FF_{q}$.
Recall that we will denote by $\secpar$ the security level of the scheme.
The key generation algorithm is listed in Fig. \ref{fig:verondb_keygen}.
The RVDC identification protocol is listed
in Fig. \ref{fig:verondb_idp}.
\restylefloat*{figure}
\begin{figure}[htb]
\centering
\procedure{RVDC: \kgen(\secparam)}{%
\pcln \text{Define } m,n,k,r \text{ as in Sect. \ref{sec:param}}\\
\pcln x \sample (\FF_{q^m})^k \\
\pcln e \sample (\FF_{q^m})^n \text{ s.t. } \mathrm{w_R}(e) = r\\
\pcln \sk \gets (x,e) \\
\pcln G \sample (\FF_{q^m})^{n} \\
\pcln G' \in (\FF_{q^m})^{k \times n} \gets \text{ Expand } G \text{ in double circulant form} \\
\pcln y \gets x\cdot G' + e \\
\pcln \pk \gets (y,G,r)\\
\pcln \pcreturn \sk, \pk
}
\caption{RVDC key generation algorithm in the rank metric}
\label{fig:verondb_keygen}
\end{figure}
\begin{figure}[ht]
\centering
\pseudocode[codesize=\scriptsize]{%
\textbf{Prover} \< \< \textbf{Verifier} \\[0.1\baselineskip][\hline]
\< \< \\[-0.5\baselineskip]
\sk,\pk = (x,e),(y,G,r)\gets \kgen \< \< \pk \\[0.1\baselineskip][\hline]
\< \< \\[-0.5\baselineskip]
u \sample (\FF_{q^m})^k \\
Q \sample M_{m,m}(\FF_{q}) , P \sample M_{n,n}(\FF_{q}) \< \< \\ \< \< \\
c_1 \gets \hash(P, Q) \< \< \\
c_2 \gets \hash(\Pi_{P,Q}(u \cdot G)) \< \sendmessageright*[1.5cm]{c_1,c_2} \< \\
\< \< a = (\alpha_1, \ldots, \alpha_{k}) \sample (\FF_{q})^{k}, \\
\< \sendmessageleft*[1.5cm]{a} \< a_i \text{ not all the same} \\
c_3 \gets \hash(\Pi_{P,Q}(u \cdot G + \Gamma_{a}(e))) \< \sendmessageright*[1.5cm]{c_3} \< \\
\< \sendmessageleft*[1.5cm]{b} \< b \sample \{0,1\} \\
\pcif b=0 \< \< \\
\pcind \rsp_1 \gets (P, Q), \rsp_2 \gets u+ \Gamma'_{a}(x) \< \sendmessageright*[1.5cm]{\rsp_1,\rsp_2} \< \pcif c_1 = \hash(\rsp_1) \wedge \\
\< \< \pcind c_3=\hash(\Pi_{\rsp_1}(\rsp_2\cdot G + \Gamma_{a}(y)) \\
\< \< \pcind[2] \pcreturn \true \\
%
\pcif b=1 \< \< \\
\pcind \rsp_1 \gets \Pi_{P,Q}(u \cdot G),\rsp_2 \gets \Pi_{P,Q}( \Gamma_{a}(e)) \< \sendmessageright*[1.5cm]{\rsp_1,\rsp_2} \< \pcif c_2 = \hash(\rsp_1) \wedge \\
\< \< \pcind c_3=\hash(\rsp_1 + \rsp_2) \wedge \\
\< \< \pcind \mathrm{w_R}(\rsp_2)=r \\
\< \< \pcind[2] \pcreturn \true
}
\caption{RVDC identification protocol in the rank metric}
\label{fig:verondb_idp}
\end{figure}
In Section~\ref{sec:sign_descr_rvdc},
we describe how to convert the identification protocol from Fig. \ref{fig:verondb_idp} into a signature scheme,
to which we will refer to as \emph{Rank Veron Double Circulant (RVDC) Signature scheme},
using a generalization of the Fiat-Shamir transform, introduced in \cite{dagdelen2016extended}.
The signature size of the scheme can be reduced
by applying the commitment compression technique used in \cite{aguilar2011new}.
We will call the scheme resulting from this variation \emph{compressed Rank Veron Double Circulant} (cRVDC) scheme.
In Sect.~\ref{sec:id_veron_dc_zn} we prove that the identification protocol is complete, sound and that the communication leaks no information on the secret key.
The security of RVDC scheme is based on a variant of the Rank Syndrome Decoding problem,
that we call \emph{Differential Rank Decoding Problem},
defined as Problem~\ref{prob:DRDP} in the same section.
\section{Parameters choice}
\label{sec:param}
In this section we provide a set parameters for 80, 128, 192, 256 bit of classical security,
corresponding to 40, 64, 96, 128 bit of quantum security, the last three falling into
category 1, 3, and 5 in the NIST post-quantum competition.
The best generic combinatorial attack to solve the RSD problem has a complexity of
$
\bigO{(n-k)^3 m^3 q^{r\frac{(k+1)m}{n}-m}}
$
\cite{aragon2017improvement}.
If $k \ge \left\lceil \frac{(r+1)(k+1)-(n+1)}{r} \right\rceil$,
an algebraic approach \cite{gaborit2016complexity} is also possible to recover the error in
$
\bigO{r^3 k^3 q^{r\left\lceil \frac{(r+1)(k+1)-(n+1)}{r} \right\rceil}}
$ steps.
Finally, to avoid specific Gr\"obner basis attacks, the condition $n > r(k+1)$ should hold.
We choose the values $m,n,k,r$ accordingly.
As far as it concerns post-quantum security, the author of \cite{loidreau2017new}, in line with \cite{bernstein2010grover}, presents some arguments showing that the post-quantum complexity of RSD is computed by square-rooting the exponential term in the classical complexity formula.
Recall that for the case of double circulant code we have to choose $n=2k$.
As suggested in \cite{stern1993new}, it is better to choose $r$ slightly below
the theoretical distance $d$ provided by the Gilbert-Varshamov bound,
in order to avoid possible small rank attacks similar to small weight codewords attack such as \cite{stern1988method}.
We choose $m$ to be prime, so to have no subfields of $\FF_{2^m}$,
which in other cases leads to attacks.
We also need to choose the number of rounds $\delta$ in order to decrease the impersonation probability to our needs.
As far as it concerns the identification protocols, the impersonation probability of one single round for RVDC is $p=\frac{q^k+\rho}{2q^k}$ with overwhelming probability.
To reach a security level $l$ with an impersonation probability of $p$,
i.e. to compute the number of round $\delta$,
we need to set $\delta = \log_{p} (1/2^l)$.
This results in $\delta = 81, 129, 193, 257$,
corresponding to 80, 128, 192, 256 bit security level in the classical scenario.
In Table \ref{tab:param_rvdc}, we propose 4 sets of parameters, respectively for the 80, 128, 192, and 256 bit security level in the classical scenario, for both RVDC and cRVDC signature schemes.
For all the proposed parameters it holds the condition $k < \left\lceil \frac{(r+1)(k+1)-(n+1)}{r} \right\rceil$, so the algebraic attack of \cite{gaborit2016complexity} must be taken into consideration while evaluating the security.
In the table $A=r^3 k^3 q^{r\left\lceil \frac{(r+1)(k+1)-(n+1)}{r} \right\rceil}$,
$B=(n-k)^3 m^3 q^{r\frac{(k+1)m}{n}-m}$,
$C=r^3 k^3 q^{r\left\lceil \frac{(r+1)(k+1)-(n+1)}{2r} \right\rceil}$,
$D=(n-k)^3 m^3 q^{r\frac{(k+1)m}{2n}-m}$,
\begin{table}
\begin{center}
\resizebox{\textwidth}{!}{
\begin{tabular*}{\textwidth}{c @{\extracolsep{\fill}}|cccccccc|cc|cc}
\multicolumn{9}{c}{Parameters} & \multicolumn{2}{c}{Classic Attacks WF} & \multicolumn{2}{c}{Quantum Attacks WF}\\
$\secpar$ & $q$ & $m$ & $n$ & $k$ & $r$ & $\rho$ & $\delta$ & $\mathsf{h}$ & $\log_2 A$ & $\log_2 B$ & $\log_2 C$ & $\log_2 D$ \\
\hline
96 & 2 & 29 & 22 & 11 & 7 & 10 & 81 & 160 & 95.801 & 106.68 & 60.800 & 51.316 \\
125 & 2 & 31 & 26 & 13 & 8 & 10 & 129 & 256 & 124.10 & 128.50 & 76.102 & 61.733 \\
193 & 2 & 41 & 34 & 17 & 10 & 10 & 193 & 384 & 192.23 & 204.39 & 112.23 & 95.864 \\
252 & 2 & 47 & 38 & 19 & 12 & 10 & 257 & 512 & 251.50 & 279.25 & 143.50 & 130.83 \\
\end{tabular*}
}
\end{center}
\caption{RVDC and cRVDC parameters.}
\label{tab:param_rvdc}
\end{table}
\section{Key and signature size comparison}
\label{sec:comp}
\begin{table}[!ht]
\begin{center}
\resizebox{\textwidth}{!}{
\begin{tabular}{cccc|rrr}
$\secpar$ & Scheme & Metric & Scheme parameters & $|\mathsf{sgn}|$ & $|\sk|$ & $|\pk|$ \\
\hline
& & & $(m,t,\delta,i)$ & & & \\
$81$ & Parallel-CFS \cite{finiasz2010parallel} & Hamm. & $(20,8,2,3)$ & 294 & 20\,971\,680 & 167\,746\,560 \\
$80$ & Parallel-CFS \cite{finiasz2010parallel} & Hamm. & $(17,10,2,2)$ & 196 & 2\,228\,394 & 22\,253\,340 \\
\hline
& & & $(n,k,\omega,Q)$ & & & \\
177 & RaCoSS \cite{roy2017racoss} & Hamm. & $(2400,2060,48,0.07)$ & 4800 & 5\,760\,000 & 816\,000 \\
177 & RaCoSS(Compr.) \cite{roy2017racoss} & Hamm. & $(2400,2060,48,0.07)$ & 2436 & 1\,382\,400 & 816\,000 \\
\hline
& & & $(q,m,n,k,d,t,t',r)$ & & & \\
128 & RankSign I \cite{gaborit2014ranksign} & Rank & $(2^{32},21,20,10,2,2,1,8)$ & 11\,008 & 540\,288 & 80\,640 \\
128 & RankSign II \cite{gaborit2014ranksign} & Rank & $(2^{24},24,24,12,2,2,2,10)$& 12\,000 & 652\,032 & 96\,768 \\
192 & RankSign III \cite{gaborit2014ranksign} & Rank & $(2^{32},27,24,12,2,3,1,10)$& 17\,280 & 1\,034\,208 & 155\,520 \\
256 & RankSign IV \cite{gaborit2014ranksign} & Rank & $(2^{32},30,28,14,2,3,2,12)$& 23\,424 & 1\,527\,360 & 228\,480 \\
\hline
& & & $(r,m,p,w)$ & & & \\
128 & pqsigRM-4-12 \cite{lee2017pqsignrm} & Hamm. & $(4,12,16,1295)$ & 4\,224 & 27\,749\,002 & 2\,621\,788 \\
196 & pqsigRM-6-12 \cite{lee2017pqsignrm} & Hamm. & $(6,12, 8, 311)$ & 4\,224 & 19\,326\,902 & 3\,980\,860 \\
256 & pqsigRM-6-13 \cite{lee2017pqsignrm} & Hamm. & $(6,13,16,1441)$ & 8\,320 & 16\,777\,216 & 84\,020\,992 \\
\hline
& & & $(n,k,w,k_U,k_V)$ & & & \\
128 & Wave \cite{debris2018wave} & Hamm. & (5172, 3908, 4980, 2299, 1609) & 8\,326 & na & 7\,840\,000 \\
\hline\hline
& & & $(q,n,k,w,\delta,\mathsf{h})$ & & & \\
$80$ & Stern \cite{alaoui2013code} & Hamm. & $(2, 768, 384, 76, 141, 160)$ & 908\,534 & 768 & 147\,846 \\
$80$ & Veron \cite{alaoui2013code} & Hamm. & $(2, 768, 384, 76, 141, 160)$ & 872\,438 & 1\,152 & 148\,230 \\
$80$ & CVE \cite{alaoui2013code} & Hamm. & $(2^8, 144, 72, 55, 80, 160)$ & 531\,539 & 1\,152 & 42\,053 \\
\hline
& & & $(n,k,i,w,\delta,\mathsf{h})$ & & & \\
68 & Veron Double Circulant \cite{aguilar2011new} & Hamm. & (698,349,19,70) & 93\,000 & 700 & 1050 \\
\hline
& & & $(q,m,n,k,r,\delta,\mathsf{h})$ & & & \\
68 & Rank Stern \cite{gaborit2011full} & Rank & (2,20,20,11,3,137,160) & na & 400 & 2160 \\
\hline
& & & $(q,m,n,k,r,\rho,\delta,\mathsf{h})$ & & & \\
96 & RVDC & Rank & (2,29,22,11,7,10,81,160) & 157\,140 & 957 & 960 \\
96 & cRVDC & Rank & (2,29,22,11,7,10,81,160) & 84\,863 & 957 & 960 \\
125 & RVDC & Rank & (2,31,26,13,8,10,129,256) & 334\,626 & 1\,209 & 1\,212 \\
125 & cRVDC & Rank & (2,31,26,13,8,10,129,256) & 179\,854 & 1\,209 & 1\,212 \\
193 & RVDC & Rank & (2,41,34,17,10,10,193,384) & 832\,409 & 2\,091 & 2\,095 \\
193 & cRVDC & Rank & (2,41,34,17,10,10,193,384) & 440\,510 & 2\,091 & 2\,095 \\
252 & RVDC & Rank & (2,47,38,19,12,10,257,512) & 1\,437\,915 & 2\,679 & 2\,683 \\
252 & cRVDC & Rank & (2,47,38,19,12,10,257,512) & 762\,935 & 2\,679 & 2\,683 \\
\hline\hline
& & & $(n, h, d, \log t, k, w)$ & & & \\
133 & SPHINCS$^+$-128s \cite{bern2017sphincsplus} & - & (16, 64, 8, 15, 10, 16) & 64\,640 & 512 & 256 \\
128 & SPHINCS$^+$-128f \cite{bern2017sphincsplus} & - & (16, 60, 20, 9, 30, 16) & 135\,808 & 512 & 256 \\
196 & SPHINCS$^+$-192s \cite{bern2017sphincsplus} & - & (24, 64, 8, 16, 14, 16) & 136\,512 & 768 & 384 \\
195 & SPHINCS$^+$-192f \cite{bern2017sphincsplus} & - & (24, 66, 22, 8, 33, 16) & 285\,312 & 768 & 384 \\
255 & SPHINCS$^+$-256s \cite{bern2017sphincsplus} & - & (32, 64, 8, 14, 22, 16) & 238\,336 & 1\,024 & 512 \\
254 & SPHINCS$^+$-256f \cite{bern2017sphincsplus} & - & (32, 68, 17, 10, 20, 16) & 393\,728 & 1\,024 & 512 \\
\hline
\end{tabular}
}
\end{center}
\caption{Comparison of keys and signature bit sizes between our proposals and the most popular code-based and hash-based signature schemes.}
\label{tab:comp_keys_pq}
\end{table}
In Table \ref{tab:comp_keys_pq} we report some key and signature bit sizes
for other signature schemes based on codes.
In particular, we report the results of hash-and-sign signature schemes such as
Parallel-CFS \cite{finiasz2010parallel},
the three NIST competitors for signatures based on codes,
RankSign \cite{gaborit2014ranksign}, RaCoSS \cite{roy2017racoss}, and pqsigRM \cite{lee2017pqsignrm},
and Wave \cite{debris2018wave}, which has been proposed very recently.
We also add the results from \cite{alaoui2013code} regarding the Hamming variants of Stern, Veron and CVE signature schemes,
one entry for the parameters proposed in \cite{aguilar2011new} for the double circulant version of Veron scheme in the Hamming metric,
and one entry for the parameters proposed in \cite{gaborit2011full} for the rank version of Stern signature scheme.
As far as it concerns the latter, we remark that when the work was published,
results from \cite{gaborit2016complexity}, \cite{aragon2017improvement}, and \cite{loidreau2017new}
were not known, so the security was believed to be 83 bits.
While for the parameters in \cite{aguilar2011new}, according the decoding complexity estimation of $2^{0.097n}$ given in \cite{may2015computing},
the security of the scheme is about 68 bits,
while in \cite{aguilar2011new} was claimed to be 81.
Recall also that for all three NIST competitors some attacks have been found,
so either the parameters should be made larger or
some modification of the scheme will be proposed in the future.
For completeness, we also report key and signature size of one of the most popular hash-based signature scheme, SPHINCS$^+$, introduced in \cite{bernstein2015sphincs}. The parameters that we consider are from the NIST submission document \cite{bern2017sphincsplus}. We can see that SPHINCS$^+$ has signatures and keys that are from 2 to 5 times smaller compared to cRVDC.
\section{Performance}
\label{sec:perf}
The cost of
RVDC, and cRVDC key generation algorithm
is dominated by the multiplication of a vector to the generator matrix.
Only one multiplication is needed to generate the public key,
and this makes the key generation particularly fast.
On the other hand,
the cost of signature and verification algorithms
are dominated by the number of rounds and the cost of the underlying hash function.
In particular,
in the RVDC scheme (see Appendix \ref{sec:sign_descr_rvdc}),
$3\delta + 2$ and $2\delta+2$ hashes have to be computed, respectively, for the signature and the verification.
In the cRVDC scheme,
$3\delta + 3$ and $2\delta + 3$ hashes have to be computed, respectively, for the signature and the verification.
In Table \ref{tab:perf}, we report the performance of our scheme on a MacBook Pro equipped with a 2.9 GHz Intel Core i7 and a Huawei P20 Pro equipped with a Kirin 970 supporting ARMv8 instructions. The implementation is using AVX2 or NEON instructions sets for the finite field arithmetic but not on any other part of the code. The hash functions used are from the SHA2 family when the digest size matched the requirements and SHAKE256 when a longer output was needed. We also used AES-CTR-DRBG as a PRNG for random number generation. We compared our implementation with the optimized implementation of SPHINCS$^+$-SHAKE256 from SPHINCS$^+$ NIST submission package. As observed, our proposals outperform SPHINCS$^+$ in all cases. The table entries are in operations per second.
\begin{table}
\begin{center}
\begin{tabular}{lccccccc}
& & \multicolumn{3}{c}{Macbook Pro} & \multicolumn{3}{c}{Huawei P20 Pro} \\
Scheme & Security Level & $\;\;\kgen$ & $\;\;\sign$ & $\;\;\verify$ & $\;\;\kgen$ & $\;\;\sign$ & $\;\;\verify$ \\
\hline
RVDC & 80 & 122706.66 & 333.27 & 1447.46 & 68023.54 & 153.42 & 607.5 \\
cRVDC & 80 & 122706.66 & 332.24 & 1420 & 68023.54 & 148.07 & 582.97 \\
\hline
RVDC & 128 & 94041.80 & 146.87 & 738.04 & 51771.48 & 76.93 & 299.02 \\
cRVDC & 128 & 94041.80 & 161.45 & 701.09 & 51771.48 & 74.1 & 315.97 \\
SPHINCS$^+$-128f & 128 & 194.81 & 12.88 & 143.73 & na & na & na \\
\hline
RVDC & 192 & 47343.91 & 62 & 267.3 & 24982.4 & 32.79 & 130.31 \\
cRVDC & 192 & 47343.91 & 64.69 & 287.27 & 24982.4 & 31.61 & 129.87\\
SPHINCS$^+$-192f & 192 & 132.14 & 9.73 & 93.75 & na & na & na\\
\hline
RVDC & 256 & 28134.23 & 43.49 & 178.53 & 14157.74 & 19.79 & 81.46\\
cRVDC & 256 & 28134.23 & 41.74 & 182.27 & 14157.74 & 19.08 & 80.33 \\
SPHINCS$^+$-256f & 256 & 55.72 & 4.7 & 95.45 & na & na & na\\
\end{tabular}
\end{center}
\caption{RVDC and cRVDC operations per second.}
\label{tab:perf}
\end{table}
\section{Conclusions}
\label{sec:concl}
We have presented two code-based signature schemes derived from a 5-pass identification protocol with cheating probability close to 1/2, using double circulant codes in the rank metric.
The second scheme optimizes the signature size from the first one, at the cost of few hash computations.
The resulting signature scheme has a signature size of approximately 11, 22, 54, and 93 KBytes for a corresponding security level of 96, 125, 193, and 254.
When compared to one of the most popular post-quantum hash-based signature schemes, namely SPHINCS+, the key generation algorithm is between 350 and 500 times faster, the signing algorithm is approximately ten times faster, and the verification algorithm is twice as fast.
\input{output.bbl}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 7,322 |
SKU: N/A. Category: Western. Tags: paintings, western, wild mustangs.
The furious stampede of wild mustangs will send any soul to find protection. As mustangs fiercely gallop along, the Native American Indian crouches along a stabile rock & brushery as he observes the Earth shake. | {
"redpajama_set_name": "RedPajamaC4"
} | 8,682 |
In cell biology, microsomes are heterogeneous vesicle-like artifacts (~20-200 nm diameter) re-formed from pieces of the endoplasmic reticulum (ER) when eukaryotic cells are broken-up in the laboratory; microsomes are not present in healthy, living cells.
Rough (containing ribosomes) and smooth (without ribosomes) microsomes are made from the endoplasmic reticulum through cell disruption. These microsomes have an inside that is exactly the same as the endoplasmic reticulum lumen. Both forms of microsomes can be purified by a process known as equilibrium density centrifugation. Rough and smooth microsomes do differ in their proteins and rough microsomes have shown occurrence of translation and translocation at the same time besides certain exceptions from proteins in yeast.
Signal Hypothesis
The Signal Hypothesis was postulated by Günter Blobel and David Sabatini in 1971, stating that a unique peptide sequence is encoded by mRNA specific for proteins destined for translocation across the ER membrane. This peptide signal directs the active ribosome to the membrane surface and creates the conditions for transfer of the nascent polypeptide across the membrane. The generalization of the Signal Hypothesis to include signals for every organelle and location within the cell had an impact far beyond illuminating the targeting of secretory proteins, as it introduced the concept of 'topogenic' signals for the first time. Before the Signal Hypothesis, it was almost inconceivable that information encoded in the polypeptide chain could determine the localization of proteins in the cell.
Cell-free Protein Synthesis
This relates to cell-free protein synthesis. Cell-free protein synthesis that is without microsomes has no way for incorporation into the microsomes to happen. This means that when microsomal membranes are presented later there isn't the removal of the signal sequence. With microsomes there, cell-free protein synthesis demonstrates cotranslational transport of the protein into the microsome and therefore the removal of the signal sequence. This process produces a mature protein chain. Studies have looked into the cell-free protein synthesis process when microsomes have their bound ribosomes stripped away from them. This explained certain details about endoplasmic reticulum signal sequences. Normally, a secretory protein only has its signal sequence removed if the microsomes are there for protein synthesis due to the secretory protein being incorporated into the microsomes. Protein transport doesn't happen if there is a late addition of microsomes after the completion of the protein synthesis process.
Protein extrusion into a microsome can be described by multiple factors. A protein has been extruded if it is resistant to proteases, is not resistant to proteases when detergents are present, or is glycosylated by enzymes residing in the microsomes. Additionally, another sign that a protein has been extruded is signal peptidase cleaving off the N-terminal signal peptide inside the microsome that may cause the protein to be smaller in size.
Pulse-Chase experiments
Microsomes also play a part in the Pulse-Chase experiments. The Pulse-Chase experiments showed that secreted proteins move across the endoplasmic reticulum membrane when the membranes are purified. It was important to take the endoplasmic reticulum away from the rest of the cell to look into translocation but this isn't possible due to how delicate and interconnected it is. This allowed microsomes to come into play as they have the majority of the biochemical properties of the endoplasmic reticulum. The microsomes are formed through homogenizing the cells and small closed vesicles with ribosomes outside being formed from rough endoplasmic reticulum breakdown. When microsomes were treated with protease, it was found that the polypeptide made by ribosomes ended in the microsomal lumen. This takes place even though the proteins are made on the cytosolic face of the endoplasmic reticulum membrane.
Other experiments have shown that microsomes have to be introduced before about the first 70 amino acids are translated for the secretory protein to go into the microsomal lumen. At this point, 40 amino acids are sticking out from the ribosome and the 30 amino acids after that are in the ribosomal channel. Cotranslational translocation explains that transport into the endoplasmic reticulum lumen of secretory proteins starts with the protein still bound to the ribosomes and not completely synthesized.
Microsomes can be concentrated and separated from other cellular debris by differential centrifugation. Unbroken cells, nuclei, and mitochondria sediment out at 10,000 g (where g is the Earth's gravitational acceleration), whereas soluble enzymes and fragmented ER, which contains cytochrome P450 (CYP), remain in solution. At 100,000 g, achieved by faster centrifuge rotation, ER sediments out of solution as a pellet but the soluble enzymes remain in the supernatant. In this way, cytochrome P450 in microsomes is concentrated and isolated. Microsomes have a reddish-brown color, due to the presence of the heme. Because of the need for a multi-part protein-system, microsomes are necessary to analyze the metabolic activity of CYPs. These CYPs are highly abundant in livers of rats, mice and humans, but present in all other organs and organisms as well.
To get microsomes containing a specific CYP or for high amounts of active enzyme, microsomes are prepared from Sf9 insect cells or in yeast via heterologous expression. Alternatively expression in Escherichia coli of whole or truncated proteins can also be performed. Therefore, microsomes are a valuable tool for investigating the metabolism of compounds (enzyme inhibition, clearance and metabolite identification) and for examining drug-drug interactions by in vitro-research. Researchers often select microsome lots based on the enzyme activity level of specific CYPs. Some lots are available to study specific populations (for example, lung microsomes from smokers or non-smokers) or divided into classifications to meet target CYP activity levels for inhibition and metabolism studies.
Microsomes are used to mimic the activity of the endoplasmic reticulum in a test tube and conduct experiments that require protein synthesis on a membrane. They provide a way for scientists to figure out how proteins are being made on the ER in a cell by reconstituting the process in a test tube.
Keefer et al. looked into how human liver microsomes and human hepatocytes are used to study metabolic stability and inhibition for in vitro systems. Going into their similarities and differences can shine light on the mechanisms of metabolism, passive permeability, and transporters. It was shown that passive permeability is important in metabolism and enzyme inhibition in human hepatocytes. Also, P-gp efflux has a smaller role in this same area. Also, liver microsomes are more predictive than hepatocytes of in vivo clearance when they give higher intrinsic clearance than the hepatocytes.
MTP
Iqbal, Jahangir, and Al-Qarni studied the microsomal triglyceride transfer protein (MTP). MTP is an endoplasmic reticulum resident protein and assists in transferring neutral lipids to nascent apolipoprotein B. MTP has a large use for abetalipoproteinemia patients with MTP mutations because of how it affects the assembly and secretion of apoB-containing lipoproteins. These MTP mutations are linked with not having circulation of the apoB-containing lipoproteins. MTP is also involved with cholesterol ester and cluster of differentiation 1d biosynthesis. Transferring sphingolipids to apoB-containing lipoproteins also falls under the ability of MTP. MTP works with the homeostasis of lipids and lipoproteins and is related to certain pathophysiological conditions and metabolic diseases.
Wang et al. explored drug metabolism in vitro using human liver microsomes and human liver S9 fractions. The study found significant differences between human liver microsomes and human liver S9 fractions in drug-metabolizing enzyme and transporter protein concentrations. The protein-protein correlations of these drug-metabolizing enzymes and transporters was determined relating to the two hepatic preparations.
See also
Cytochrome P450
List of biological development disorders
S9 fraction
Cell-free protein synthesis
Pulse-Chase experiments
Differential Centrifugation
Microsomal Triglyceride Transfer Protein
References
External links
Membrane biology | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 3,353 |
Pioneer Valley Unites All-Gender Skaters
The United Front is the first team built to welcome any skater of any gender identification. We talk to its captain to find out what this means for derby.
Steven Rodriguez May 10, 2015 Read Comments
Tags: MRDA, WFTDA
Pioneer Valley Roller Derby is what you might call a trendsetter.
In 2006, as women's teams around the country were beginning to form the structure that would eventually become the WFTDA, PVRD did something that went against the grain: Create the first-ever men's roller derby team, the Dirty Dozen.
With time, that team helped to pave way for men's players to be seen as equals on the track. After that acceptance came growth. With that growth came the Men's Roller Derby Association. Then the Men's Roller Derby World Cup. At the rate the men's game is blossoming today, it can only keep going from here—and it all started when Pioneer Valley bucked the established trend.
Recently, the league has identified another trend worth bucking. As the participation rate in men's and women's games keep expanding, a literal gender gap is emerging.
The roller derby community is welcoming to athletes that identify as transgender. However, the current binary landscape of organized derby has not been a perfect fit for them. Individual leagues or an overseeing governing body can at least prevent discrimination through gender policies, but they don't give trans* athletes an arena to call their own.
Pioneer Valley is giving them one by forming the United Front, the first all-gender/no-gender roller derby team. The United Front is open to any bout-ready skater that self-identifies any way he, she, or they chooses, and in any manner of sexual preference, gender identity, or gender expression.
This groundbreaking concept in roller derby—and maybe in all of sports—is a natural fit for PVRD. Having been a co-ed league since nearly its inception, it has always been open to skaters of any gender.
"However, as we gained more non-binary members, it became more clear that having just single-gender teams that skaters can self-select didn't address their needs," said Mai Tai Fighter, the team captain for United Front. "For those of us who exist within the binary it can be easy to overlook or not recognize the discomfort of non-binary individuals constantly being required to pick between two options that they might not feel they belong in.
"It was a logical step for us to take because we recognized the need for an all-gender team to support all our skaters and are already used to playing all together."
Pioneer Valley is positioning its all-gender team differently than the typical co-ed team that many are familiar with today. While it isn't locked to a single gender, co-ed is still traditionally a term for men and women—a binary setup that by strict definition excludes those that don't identify as either.
"We use the terms 'all-' and 'no-gender' to be all-inclusive of gender identities," Mai Tai Fighter says, explaining how the all-ed setup of the team is deliberate, to differentiate itself from the boys & girls nature of co-ed play.
The United Front will be making their on-track debut on May 16 in the first game home double-header, opposite a mash-up team of skaters from leagues around the western Massachusetts area. But beyond that, history may be repeating itself a little bit.
As PVRD discovered in 2006, the problem with creating the first men's roller derby team is that it can't exactly play an opponent until somebody else forms the second men's roller derby team. In creating the first all-gender roller derby team, Mai Tai Fighter realizes there may be some difficulty in finding opponents for it—at first.
"Since other all-gender teams don't currently exist and there are few all-gender leagues in the area, it is likely that finding opponents will be harder than it is for our single-gender teams," noted the captain. "However, within New England there are a lot of mixed scrimmages open to all genders that are well attended, so I don't doubt in our ability to attract skaters we can play against."
A lot of those opponents will likely come from skaters and teams affiliated with the WFTDA and MRDA, given how prolific those organizations are. Pioneer Valley itself is a member of the MRDA thanks to the Dirty Dozen. However, despite having one of the first women's teams in the world, Western Mass Desturction, it is not a WFTDA member league. WFTDA which forbids its entry due to a policy requiring leagues be majority-owned and operated by women.
If there comes a time when more leagues, WFTDA or MRDA leagues in particular, start thinking about fielding all-gender teams like the United Front, Mai Tai Fighter realizes there are two sides to the coin.
"MRDA policy doesn't restrict the gender of players, which is great. WFTDA on the other hand does, and can result in discrimination against trans women. For a sport that is supposed to be empowering for women, that is not okay."
In the long run, gender policies are things that the membership of both organizations will need to hammer out to be more representative of the day and age we live in. Pioneer Valley is certainly doing its part, looking forward to the day, "hopefully soon," says Mai Tai Fighter, where there is a second (and more) all-ed team out there.
"I hope United Front can open the door for all-gender teams like the Dirty Dozen did for men's derby."
(Then an all-gender roller derby organization, then an all-gender World Cup, and then…)
That would be a trend worth uniting for.
Previous PostBetter Daze Ahead for Banked Track Roller DerbyNext PostUSARS Roller Derby Begins Program for U.S. National Team | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 333 |
Q: Confused about namespace scope! I'm getting confused about the scope of 'using namespace' declarations... hoping someone can clear this up for me!
I'm using two libraries (OpenCV and Ogre3D). I have two cpp files, one uses exclusively OpenCV (PoseEstimator.cpp) and the other exclusively Ogre3D (OgreLogic.cpp).
The top of OgreLogic.cpp looks like this:
#include "stdafx.h"
#include "PoseEstimator.h"
#include "OgreLogic.h"
using namespace Ogre;
And the top of PoseEstimator.cpp looks like this:
#include "StdAfx.h"
#include "PoseEstimator.h"
using namespace cv;
using namespace std;
This 'using namespace cv' is the only occurrence in the whole project (I double checked by doing a search). The are no 'using namespace's in headers, only ever in cpp files.
However, when compiling OgreLogic.cpp I get ambiguity errors, e.g.:
cxmat.hpp(3465) : error C2872: 'uchar'
: ambiguous symbol 1> could be
'd:\libraries\opencv2.1\include\opencv\cxtypes.h(154)
: unsigned char uchar' 1> or
'd:\libraries\ogresdk\include\ogre\OgrePrerequisites.h(106)
: Ogre::uchar'
I seem to be misunderstanding something, because I think this should be OK?
Any help greatly appreciated!
Thanks,
Jack
A: It looks like what is happening is you have a line declaring a uchar, e.g. uchar x = 12 or something. At the top of your file, you've specified that you're using the Ogre namespace. The compiler is running into a problem determining which uchar you're using - the cxtypes.h one or the Ogre::uchar.
Try taking out the using namespace Ogre; and do your function calls as Ogre::doStuff() to remove ambiguity.
A: The root problem is that the uchar in cxtypes.h is not in the cv namespace. The uchar in the OrgePrerequisites.h is in the Orge namespace (hence Ogre::). By adding using namespace Ogre; you are actually making any reference to uchar ambiguous.
As spbots noted, you can remove the namespace usage to solve your problem, but I wanted to address your root question about namespaces. The answer/issue is that the other uchar (the cxtypes one) isn't in a namespace at all. It is simply declared in the header file outside of any namespace.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 3 |
{"url":"https:\/\/gonitsora.com\/pi-day-once-in-a-century-celebration-2015\/","text":"## 24 Mar Pi Day: Once-in-a-century Celebration (2015)\n\nExactly a month after the Valentine\u2019s Day, there comes an event which is not less than Valentine\u2019s Day for many people around the world. Those are the math-lovers. Very popularly known as the Pi Day, this day celebrates the mathematical constant $\\pi$. $\\pi$, an irrational number cannot be written as the ratio of two integers and it is the ratio of a circle\u2019s circumference to its diameter.\n\n14th March is also the birthday of the great theoretical physicist who developed the general theory of relativity, one of the two pillars of modern physics. He is best known for his mass-energy equivalence formula $E=mc^2$. He received the 1921 Nobel Prize in Physics for his discovery of the law of the photoelectric effect. He is none other than Albert Einstein and his intellectual achievements have popularized the word \u2018Einstein\u2019 as a synonym of genius.\n\nThe number $\\pi$ is a mathematical constant, commonly approximated as 3.14159. It has been represented by the Greek letter \u201c$\\pi$\u201d since the mid-18th century. Being an irrational number, $\\pi$ cannot be expressed exactly as a common fraction. Though fractions such as 22\/7 and other rational numbers are commonly used to approximate $\\pi$, its decimal representation neither ends nor settles into a permanently repeating pattern.\n\nAs the definition relates to the circle, $\\pi$ has found its applications in trigonometry and geometry, especially those concerning circles, ellipses, cylinders or spheres. It is also found in other branches of science and mathematics such as cosmology, number theory, statistics, thermodynamics, mechanics and electromagnetism. Even it has found its applications in testing supercomputers and high-precision multiplication algorithms.\n\nThe earliest known use of the Greek letter $\\pi$ for this mathematical constant was by mathematician William Jones in his 1706 work A New Introduction to the Mathematics. After Jones\u2019, Euler started using it with his 1736 work Mechanica. John von Neumann was part of the team that first used a digital computer, ENIAC, to compute $\\pi$. The team achieved 2,037 digits with a calculation taking 70 hours of computer time on the ENIAC. Srinivasa Ramanujan, working in isolation in India, produced many innovative series for computing $\\pi$. His work was the basis for the fastest algorithms used to calculate $\\pi$ and in used in some computer algebra software too.\n\nAn annual celebration, Pi Day is observed on March 14 (or 3\/14 in the month\/date format), since 3, 1, and 4 are the first three significant digits of $\\pi$ in decimal form. In 2009, the United States House of Representatives supported the designation of Pi Day. Pi Approximation Day is observed on July 22 (or 22\/7 in the date\/month format), since the fraction 22\u20447 is a common approximation of $\\pi$, which is accurate to two decimal places. People celebrate this event around the world with pie-eating, pie-recitation competition, quizzes on pi, discussing the significance of the number $\\pi$ etc. Attempts to memorize the value of $\\pi$ with increasing precision have led to records of over 67,000 digits.\n\nMemorizing $\\pi$ is also of great fun. If we round up to 4 places after decimal it comes to 3.1416, which can be memorized by \u201cYes, I have a number\u201d as \u2018Yes\u2019 contains 3 letters, \u2018,\u2019 is used in place of decimal, \u2018I\u2019 has 1 letter and so on. If we want to remember the value of $\\pi$ (3.1415926) in easy way up to 7 places after decimal, we can do it by counting each word\u2019s letters in \u2018May I have a large container of coffee?\u2019\n\nThere are many fascinating facts about $\\pi$. One fascinating thing among these is that if one writes $\\pi$ to two decimal places, backwards it spells \u201cpie\u201d or the mirror image of 3.14 is \u201cPI\u025b\u201d. A pizza with radius \u201cz\u201d and height \u201ca\u201d has volume Pi x z x z x a or Pizza.\n\nThe earliest known official celebration of Pi Day was organized by Larry Shaw in 1988 at the San Francisco Exploratorium, where he worked as a physicist, with staff and public marching around one of its circular spaces, then consuming fruit pies. On March 12, 2009, the U.S. House of Representatives passed a non-binding resolution (HRES 224), recognizing March 14, 2009 as National Pi Day. For Pi Day 2010, Google presented a Google Doodle celebrating the holiday, with the word Google laid over images of circles and pi symbols. Few mathematics lovers celebrate the whole month as \u201cPi Month\u201d.\n\nThis 2015 Pi Day has special significance at 9:26:53 a.m. and p.m., with the date and time representing the first 10 digits of $\\pi$, that is 3.141592653. However, few argue that 9:26:54 a.m. and p.m. on 3\/14\/15 are more accurate because of the 11th digit of $\\pi$ being 5, which would cause the 10th digit to round up to 4. So, the moment when the clock stuck 9: 26: 53 a.m. on the 14th March of 2015, was shockingly unique. This moment takes place for once in a hundred year. So, this year\u2019s Pi Day was a reason for grand celebration especially for those whose first love is Mathematics. In other words, this Pi Day was a once-in-a-century celebration.\n\nIn a survey of OECD in 2012, the U.S. was below average in its math score, falling behind the Slovak Republic in this survey. A study in Spain in 2009 reveals that six out of 10 college students experience anxiety around math. In 2012, 46.5 per cent of rural children in Class V could not solve a two-digit subtraction problem without seeking help in India. To conclude, we can say that maths is not a much-loved subject. In fact, the phenomenon of \u201cmaths phobia\u201d is becoming an increasing problem worldwide.\n\nIt is high time for us to recognize these challenges and work hard so that they don\u2019t get mirrored in the next generation. Let us be thankful to this wonderful subject and fall in love with it by exploring such interesting facts as being rightly quoted by Paul Dirac \u201cGod used beautiful mathematics in creating the world\u201d.\n\nDownload this post as PDF (will not include images and mathematical symbols).\n\n, , , ,","date":"2019-08-17 18:07:37","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 22, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.6192357540130615, \"perplexity\": 1020.6785888906037}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 20, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-35\/segments\/1566027313436.2\/warc\/CC-MAIN-20190817164742-20190817190742-00164.warc.gz\"}"} | null | null |
\section{Data} \label{sec:data}
In this paper, we leverage two data sources as described below.
\paragraph*{User activity trails:}
We use user activity trails data provided by Verizon Media. This includes online activities done in chronological order by a user. The activities are derived from heterogeneous sources, \emph{e.g.}, Yahoo Search, Yahoo Gemini ad interactions,
and viewing content on other publishers associated with Yahoo. The representation of an activity comprises
of an activity ID, time stamp, the type (\emph{e.g.}, search, content view), and a raw description of the activity (\emph{e.g.}, the exact search query for search activities) after stripping personally identifiable information.
In total, there are more than $3$ billion unique activities in our data spanning over $100$ million anonymized users.
\paragraph*{User ID $\rightarrow$ Cluster ID map:}
We use user ID to cluster ID maps determined by proprietary identity management algorithms at Verizon Media.
Such clusters represent groups of users deemed to belong to the same household or organization. In our data set, we had over $92$ million unique cluster IDs.
\section{Conclusion} \label{sec:discussion}
The proposed trail augmentation approach shows strong performance lifts for the B2B advertiser considered in our experiments. The information theoretic arguments in this paper support the approach for a wider regime,
making it is useful for a significant class of advertisers (for whom type-$2$ organizations are customers).
Also, the proposed seed list expansion provides a scalable method to infer relevant users for B2B ad targeting in an interpretable manner.
\section{Information theoretic analysis} \label{sec:info_theory}
In this section, we provide an information theoretic justification for augmenting the trails of users in a cluster with the trails of other relevant users in the cluster.
In particular, we analyze a simple setup where there exists a relevant activity which can \textit{perfectly} predict conversion of the owner in an organization.
In other words, an owner converts if and only if the owner or a researcher in the same organization performs the relevant activity.
Even in this simple setup, it is plausible (\emph{e.g.}, in a type-$2$ organization)
that the relevant activity does not occur in the owner's activity trail, and still the owner converts under the influence of a researcher (who is not labeled as a researcher a priori but is in the same organization) performing the relevant activity.
Hence, just looking at an individual's activity trail for the presence of the relevant activity may not be sufficient to perfectly predict conversion. Intuitively, augmenting the owner's activity trail with the researcher's activity trail can help conversion prediction in this situation, and we theoretically prove how such augmentation can reduce the entropy (information theoretic uncertainty) \cite{cover_and_thomas} associated with the conversion event.
We use the terms cluster and organization interchangeably in the analysis described below. We first describe additional notation in Section~\ref{sec:info_notation},
and then analyze type-$2$ organizations in Section~\ref{sec:info_type2}.
\subsection{Analysis setup} \label{sec:info_notation}
Consider a homogeneous setup with the following notation:
\begin{itemize}
\item $k$: number of organizations,
\item $r$: researchers per organization,
\item $n$: non-researchers per organization,
\item $d$: owners per organization ($=1$),
\item $s $: total users in an organization ($= n + r + 1$),
\item $p_{u}$: conversion probability of a user, and
\item $p_{o}$: conversion probability of an organization ($=sp_{u}$),
\item $C$: binary random variable indicating user conversion ($C=1$ if user converts, else $C=0$),
\item $R$: binary random variable indicating relevant activity in user trail ($R=1$ if relevant activity present in trail, else $R=0$),
\end{itemize}
where all organizations are of the same size ($=s$), and an organization is said to convert if there exists a converter user belonging to the organization. As per the above notation,
on an average there are $kp_o$ organizations out of $k$ who convert.
Also, since each organization has $s$ users, out of which at most one (\emph{i.e.}, the owner) can have the \textit{user} conversion label, the relation $p_u = \frac{p_o}{s}$ holds.
In the remainder of this section, for simplicity, we will assume that, if and only if, a relevant activity is done by any researcher in an organization, the owner in the organization converts with probability $1$. Hence, if the organization was type-$1$, where the researcher is the owner, the following information theoretic relation would hold:
\begin{align}
I\left( C ; R \right) = H \left( C \right) - H \left ( C | R \right) \stackrel{(a)}= H \left( C \right), \nonumber
\end{align}
where $I\left( C ; R \right)$ denotes the mutual information \cite{cover_and_thomas} between the user conversion indicator $C$, and the relevant activity indicator $R$.
The entropy\footnote{For a binary random variable $X$, the entropy \cite{cover_and_thomas} is defined as $H(X) = \sum_{x \in {0,1} } - p(X=x)log\left( p(X=x)\right)$, where $p(\cdot)$ is the probability mass function.}
of $C$ is denoted by $H(C)$, the conditional entropy of $C$ given $R$ is denoted by $H(C|R)$,
and step (a) follows from the assumption that for a type-$1$ organization $C=1$ iff $R=1$, \emph{i.e.}, given $R$ there is no uncertainty left in the value of $C$.
The mutual information is representative of how well the observation variable $R$
can predict the outcome variable $C$; as shown above, for a type-$1$ organization with the above assumptions, $R$ can predict $C$ perfectly. \\
Following the definition of type-$2$ organizations introduced in Section~\ref{sec:introduction}, for our analysis we assume that all $k$ organizations are of type-$2$, \emph{i.e.}, if they convert, the relevant activities are done by a researcher, and the act of conversion is performed by the owner.
From the mutual information calculation above, one can observe that increasing the mutual information between $C$ and $R$ boils down to reducing
the conditional entropy of $C$ given $R$; this motivates the analysis for conditional entropy as described below.
\subsection{Conditional entropy analysis for type-$2$ organizations} \label{sec:info_type2}
We first analyze a toy example, and then generalize it as follows.
\begin{example}
Consider a data set with two type-$2$ organizations (clusters) as shown in Figure~\ref{fig:info_example}.
The conditional entropy $H(C|R)$ can be computed before and after trail augmentation as follows.
\begin{figure}[!htb]
\centering
\includegraphics[width=0.95 \columnwidth]{infoTheory_example.pdf}
\caption{Toy example with two clusters such that $n=1, r=1, k=2, p_{o} = \frac{1}{2}, p_{u} = \frac{1}{6}$. Only the researcher in cluster $1$ has a relevant activity ($R=1$), and the owner in the cluster converts. After trail augmentation, all users in cluster $1$ have $R=1$. The conditional entropy $H(C|R)$ decreases after trail augmentation (equals $0.46$ versus $0.72$ before augmentation).}
\label{fig:info_example}
\end{figure}
\paragraph*{$H(C|R)$ before augmentation:}
\begin{align}
H\left (C|R \right) & = H\left(C|R=0\right) \mathbb{P}\left(R=0 \right) + H\left(C|R=1\right) \mathbb{P}\left(R=1 \right) \nonumber \\
& = H\left ( \mathcal{B} \left (\frac{1}{5} \right ) \right ) \times \frac{5}{6} + 0 \times \frac{1}{6} = 0.72, \nonumber
\end{align}
where $ \mathcal{B} \left (\frac{1}{5} \right )$ denotes a Bernoulli distribution with mean $\frac{1}{5}$. Also, $H\left(C|R=1\right)$$= 0$ holds since $C=0$ when $R=1$
in the example.
\paragraph*{$H(C|R)$ after augmentation:}
\begin{align}
H\left (C|R \right) & = H\left(C|R=0\right) \mathbb{P}\left(R=0 \right) + H\left(C|R=1\right) \mathbb{P}\left(R=1 \right) \nonumber \\
& = 0 \times \frac{1}{2} + H\left ( \mathcal{B} \left (\frac{1}{3} \right ) \right ) \times \frac{1}{2} = 0.46 \nonumber
\end{align}
\end{example}
CIearly the conditional entropy is lower after augmentation in the above example; this implies better conversion prediction given $R$. In fact, this advantage holds for a broader regime
of parameters (\emph{i.e.}, $r, p_o, s$) as derived below. For a general setup, the $H(C|R)$ before augmentation is:
\begin{align}
H(C|R) &= H\left(C|R=0\right) \mathbb{P}\left(R=0 \right) + H\left(C|R=1\right) \mathbb{P}\left(R=1 \right) \nonumber \\
& = H\left(C|R=0\right) \mathbb{P}\left(R=0 \right)
= H\left( \mathcal{B} \left ( \frac{ p_0 }{s - r p_0} \right ) \right) \times \left (1- \frac{r p_o}{s} \right ), \nonumber
\end{align}
and after augmentation it becomes:
\begin{align}
H(C|R) &= H\left(C|R=0\right) \mathbb{P}\left(R=0 \right) + H\left(C|R=1\right) \mathbb{P}\left(R=1 \right) \nonumber \\
& = 0 + H\left(C|R=1\right) \mathbb{P}\left(R=1 \right)
= H\left( \mathcal{B} \left (\frac{1}{s} \right ) \right) \times p_o. \nonumber
\end{align}
Based on the above derivation,
Figure~\ref{fig:info_analysis} shows the $H(C|R)$ comparison for a choice of $p_o=0.1$, and $r=1$ across a range of $s$. Clearly, $H(C|R)$ is lower after augmentation, but the gap decreases as $s$
increases.
\begin{figure}[!htb]
\centering
\includegraphics[width=0.65 \columnwidth]{infoTheory_analysis.png}
\caption{Comparison of $H(C|R)$ before and after trail augmentation for $p_0=0.1$ and $r=1$ across a range of $s$.}
\label{fig:info_analysis}
\end{figure}
This is intuitive since for fixed $p_o$, as $s\rightarrow \infty$, $p_u \rightarrow 0$, and hence $H(C) \rightarrow 0$.
By definition \cite{cover_and_thomas}, $H(C) \leq H(C|R) $, so as $s\rightarrow \infty$, $H(C|R) \rightarrow 0$. Hence, as Figure~\ref{fig:info_analysis} suggests, the benefit of trail augmentation is significant for \textit{smaller} organizations in particular.
\section{Introduction} \label{sec:introduction}
Even before the dawn of online advertising, understanding purchase decisions in organizations was considered a complex topic \cite{webster}; with the B2B interaction opportunities added by online advertising platforms, the complexity has only increased over time \cite{mckinsey_b2b}. A fundamental factor contributing to such complexity is the presence of multiple agents involved in various \textit{stages} of the decision process \cite{mckinsey_b2b,wiki_b2b}. For example, in the purchase funnel terminology \cite{mckinsey,jansen2011bidding}, some employees (researchers) in an organization
may perform market research (upper funnel activities), and then pass on relevant information to the decision makers (owners) who may just place the purchase order (lower funnel activities).
There might also be smaller organizations where a single employee does all the market research and places the purchase order. Figure~\ref{fig:pull_figure} illustrates such an example, and introduces the notion of type-$1$ and type-$2$ organizations.
\begin{figure}[!htb]
\centering
\includegraphics[width=0.95 \columnwidth]{pull_figure.pdf}
\caption{Example of type-$1$ and type-$2$ organizations vis-a-vis the B2B purchase (conversion) funnel. In a type-$1$ organization, a single user does the market research and converts, while in type-$2$, the market research and conversion activities are split across users in the same organization.}
\label{fig:pull_figure}
\end{figure}
Intuitively, if an advertising platform \textit{knows} a priori which online users are owners + researchers (in type-$1$),
or just researchers (in type-$2$), it can efficiently target such individuals with relevant B2B ads \cite{linkedin_kdd2016}.
Such knowledge can be derived from multiple sources including: (i) declared user profiles in professional social networks (\emph{e.g.} LinkedIn), and (ii) data from customer relationship management (CRM) tools, \emph{e.g.}, Salesforce. The impact of using such proprietary user profile knowledge can be gauged by the following statistic: the
projected spending on B2B digital advertising in the US in 2019 is $6$ billion USD,
and ad platforms based on professional social networks account for over one-fifth of it \cite{b2b_2019_spending}. \\
In contrast to the scenarios mentioned above, in this paper, we consider a setup where such user profiles are not known a priori to an advertising platform. We assume that the advertising platform has access to online user activity trails (\emph{e.g.}, search queries, site visits, ad interactions), and has the ability to cluster users in the same geographic neighborhood at the granularity of a household or commercial establishment\footnote{Such user clustering can be based on deterministic or probabilistic methods for cross-device identity management \cite{neufeld_crossdevice, learning_to_rank_crossdevice}.}.
This setup is fairly common in (business-to-consumer) B2C ad platforms, where click and conversion prediction models \cite{mappi_cikm,google_FTRL} are trained on user activity trails to target users with relevant ads.
In this paper, we propose methods to refine such B2C conversion prediction models for B2B ads by leveraging the activities performed by users in a cluster as opposed to using only a single user's activity trail. Using the notion of type-$1$ and type-$2$ organizations, the following toy example explains the fundamental problem encountered by a B2C conversion model when naively used for predicting B2B conversions.
\paragraph*{Toy example:}
Consider a situation, where for a B2B advertiser, user activity trails from only type-$2$ organizations are present in the training data for a conversion prediction model.
Each user is marked with a unique user-id, \emph{i.e.}, an owner, researcher, and non-researcher in an organization have separate user-ids. Furthermore, the activity distribution
is such that the owner does not do any market research, and if a purchase decision is made, the purchase (conversion) activity appears only in the owner's activity trail. In comparison, market research activities relevant to the conversion event, are only present in the activity trails of researchers. Given such training data, if a conversion prediction model is trained solely on basis of user activity trails (\emph{i.e.}, labeling only the converted owner's as positive and the rest as negative), it will have poor performance since it completely misses out on activities predictive of conversion. On the other hand, if the training data had only type-$1$ organizations, the conversion model can easily learn predictive activities since the market research activities
and the conversion activity occur in the same converter trail. Learning such predictive activities
is crucial for targeting users with relevant B2B ads.\\
As the above toy example suggests, the presence of type-$2$ organizations can degrade the performance of a conversion model working on just user activity trails.
In practice, depending on the B2B advertiser, the training data can be a mix of trails from type-$1$ and type-$2$ organizations. It is plausible that for an advertiser relevant for smaller businesses, the fraction of conversions from type-$1$ organizations may be dominant, whereas for an advertiser relevant for both small and large businesses, the conversions may span both type-$1$
and type-$2$ organizations in significant proportions; we assume that the distribution of such organizations is not known a priori for a given B2B advertiser.
An intuitive approach to get around the problems introduced by type-$2$ organizations
can be to use the trails of all users in an organization (user cluster) who have done activities \textit{relevant}
to the B2B advertiser. We build on top of this intuition, and introduce scalable approaches for leveraging such \textit{multi-user} trails for the task of B2B conversion prediction, as well as inferring
activities relevant for targeting ads of a given B2B advertiser.
Our main contributions can be summarized as follows.
\begin{enumerate}
\item For a given B2B advertiser, we introduce a notion of \textit{relevant} users within a user cluster.
We show that augmenting trails of all users in a cluster by adding activities of such relevant users can significantly improve user conversion prediction ($\sim8.8\%$ AUC lift in our experiments using data from Yahoo Gemini). The relevant users are based on a seed list of relevant activities for the given B2B advertiser.
\item For generating the seed list of relevant activities for a given B2B advertiser, we propose starting with an initial list and expanding it using a set expansion method based on distributed activity representations (referred to as activity2vec in the same spirit as word2vec \cite{w2v}). We validate the efficacy of the expansion method
using a logistic regression based B2B conversion prediction model. Such relevant activities can be directly used to create segments for B2B ad targeting.
\item We provide an information theoretic justification behind augmenting trails of users in a cluster with activity trails of relevant users within the same cluster. In particular, we show how such augmentation reduces the conditional entropy (uncertainty) in the conversion event random variable.
\end{enumerate}
The remainder of the paper is organized as follows.
Section~\ref{sec:related} covers related work,
and Section~\ref{sec:data} describes the data sources used in this paper.
Section~\ref{sec:method} goes over the proposed method, and Section~\ref{sec:info_theory} deals with the information theoretic justification behind augmenting user trails.
Section~\ref{sec:results} covers experimental results,
and we decribe conclusions in Section~\ref{sec:discussion}.
\begin{comment}
\begin{enumerate}
\item b2b advertising - potential and challenges
\item current solutions - dissadvantages - social networks
\item our proposal -
\begin{itemize}
\item methodology: some kind of set expansion based on initial keyword-based seedlist
\item enrich trails with the same cluster id BO + research
\end{itemize}
\item results
\begin{itemize}
\item convr only on typeA org
\item convr model on type A + type B (BO+research cluster ids)
\item convr model on type A + type B (all users fromt that same cluster id)
\end{itemize}
\end{enumerate}
\end{comment}
\section{Methodology} \label{sec:method}
In this section, we first give a high level overview of our proposed approach in Section~\ref{sec:overview}.
This is followed by details on the conversion prediction model (Section~\ref{sec:relevant_conversion_model}), and seed list generation (Section~\ref{sec:seed_list}).
\subsection{Overview} \label{sec:overview}
We introduce the notion of a \textit{relevant} activities seed list for a B2B advertiser. This is
a list of online activities which are expected to be performed before a B2B conversion; both owners and researchers spanning type-$1$ and type-$2$ organizations can perform such activities prior to a conversion event (seed list generation details in Section~\ref{sec:seed_list}).
Given a seed list, we identify \textit{relevant} users in each (user) cluster\footnote{We assume that the ad platform has access to the cluster information based on cross device identity management and IP addresses.} as follows: in each cluster, we find users who have performed at least one relevant activity in the seed list, and refer to them as \textit{relevant} users. Having identified relevant users, we train a conversion prediction model to estimate:
\begin{align}\label{eq:cnv_pred}
user \;conv. \;probability\; = \; \mathbb{P}\left(conv \bigg | trail_{u}, \{trail_r\}_{r \in \mathcal{C}_u} \right ),
\end{align}
where $trail_u$ denotes a user's trail of activities\footnote{The user activity trail is the sequence of user activities up to the time the conversion prediction is being made.
},
$\mathcal{C}_u$ denotes the cluster(s) the user is present in,
$\{trail_r\}$ is the collection of trails of all relevant users in $\mathcal{C}_u$. For a given B2B advertiser,
the conversion model is fed information from others users in the cluster who have done activities relevant to the B2B conversion event. In other words, for
a user's conversion prediction,
the activity trail of the user is augmented with the activities of other relevant users in the same cluster.
For scalability in terms of augmented trail lengths, and to control the noise injected while augmenting trails, we augment trails only via relevant users in a cluster.
The details of the conversion prediction model are covered in Section~\ref{sec:relevant_conversion_model}.
In summary, the conversion prediction model is designed towards better user conversion prediction,
and the seed list can be used to identify relevant users involved in the conversion decision process
(business owners and researchers) in an organization. Identifying such users can be helpful for B2B ad targeting segments.
\subsection{Conversion prediction model} \label{sec:relevant_conversion_model}
As mentioned above in Section~\ref{sec:overview}, we train an advertiser specific conversion prediction model using a user's activity trail, augmented with activity trails of all relevant users in the cluster(s) associated with the user.
We use an LR model for the purpose of conversion prediction; a one-hot encoded feature vector of activities from the augmented trails is used as input.
Although the choice of LR was motivated by scalability \cite{mappi_cikm,google_FTRL}, our approach can be extended to more sophisticated models like RNNs.
For training and testing the prediction model, label generation is done such that users who converted are given a positive label, and the users who did not convert are given a negative label (regardless of their cluster which may or may not contain a converter).
\begin{comment}
{\color{red} In addition,
users who performed relevant activities, and were in a cluster containing a converter, were also given a positive label; the remaining users were marked negative. [comment: we do not label researchers as positives. But we do train models that use research trails in addition to user trails as inputs, and even there user labels are always used. ]} We explain additional variations to the label generation process and its implications on the results in Section~\ref{sec:results} on experimental results.
\subsection{Type-$1$ and type-$2$ organizational setup}
\begin{align}
&\mathbb{P}\left(conv | user_{id},\; cluster_{id} \right ) \nonumber \\
& = \sum_{org \in\{A,B\}} \mathbb{P}\left(conv | user_{id},\; cluster_{id}, \; org\right ) \mathbb{P}\left( org | user_{id},\; cluster_{id}\right ) \nonumber \\
& = \mathbb{P}\left(conv | user_{id},\; cluster_{id}, \; org = A \right ) \mathbb{P}\left( org = A | user_{id},\; cluster_{id}\right ) \nonumber \\
& + \mathbb{P}\left(conv | user_{id},\; cluster_{id}, \; org = B \right ) \mathbb{P}\left( org = B | user_{id},\; cluster_{id}\right ) \nonumber \\
\end{align}
For estimating the conversion probability, we can build the following predictors.
\end{comment}
\subsection{Seed list generation algorithm} \label{sec:seed_list}
Intuitively, the relevant activities seed list should include activities which can identify researchers from both type-$1$
and type-$2$ organizations for a given B2B advertiser. For example, the seed list can cover activities like
visiting the advertiser's website, search queries for the advertiser's product or a competing brand's offerings in the same product category. In a web scale setup with billions of unique activities (as in our setup), obtaining such an \textit{interpretable} seed list can be challenging if the conversions are sparse, and if type-$2$ organizations dominate the data. For example, a naive conversion rate (per activity) based method may not be reliable in such a setup. To get around such challenges,
we propose the following two step process: (i) create a small yet interpretable initial seed list, and (ii) iteratively expand this initial list using activity2vec embeddings (described below) to add \text{similar} activities.
We provide below details on initial seed list generation (Section~\ref{sec:initial_seed_list}),
activity2vec (Section~\ref{sec:act2vec}), and seed list expansion (Section~\ref{sec:expansion}).
\subsubsection{Initial seed list} \label{sec:initial_seed_list}
For an initial seed list $S_{initial}$, we select the top $k$ activities by conversion rate for the given B2B advertiser.
The conversion rate for an activity $a_i$ is
defined as the ratio of count of users who did $a_i$, and converted within a time window (\emph{e.g.}, $2$ months) over the count of users who did $a_i$. The choice of $k$ can be adjusted to do editorial curation within time constraints, \emph{e.g.}, a few hundred activities can be reviewed by an editor in a matter of hours. The editor(s) can also add a few obvious activities like visiting web sites of the advertiser
to the intial seed list. However, this conversion rate based method suffers
from noise arising from sparse conversions, and the presence of type-$2$ organizations.
Editorial curation is done to remove such noise from the initial seed list, and passed on to the activity2vec based expansion described below.
\subsubsection{Activity2vec} \label{sec:act2vec}
Similar to the word2vec embedding model \cite{w2v}, we train a
skip-gram based embedding model of activities (activity2vec), and obtain a $300$ dimensional embedding for each activity in our data. For training, each user's chronological trail of online activities is treated as a document, and activity sessions are treated as sentences within the document.
Each sentence comprises of the activities (in chronological order)
done within the session, where a session is defined as a sequence of consecutive
activities that have inter-activity time gaps of less than $30$ minutes.
Using locality-sensitive hashing (LSH), for each activity, the top nearest neighbors in the activity2vec space
can be obtained in a scalable manner.
\subsubsection{Expansion algorithm} \label{sec:expansion}
Given an initial seed list $S_{initial}$ of relevant activities (as discussed in Section~\ref{sec:initial_seed_list}),
we add related activities using the activity2vec based expansion as decribed in Algorithm~\ref{alg:seedlist_expansion_act2vec}.
In particular, we assume a train-test data set for conversion prediction as described in Section~\ref{sec:relevant_conversion_model}, and $conv\_prediction\_AUC(S)$ returns the test AUC (area under ROC curve) metric, when the conversion model ingests augmented user trails, \emph{i.e.}, a user trail is augmented with the collective trails of all relevant users (determined by seed list $S$) in the cluster.
In addition, $neighbors \left (S , \mathcal{V}, \Delta_{sim}, \Delta_{nbr} \right )$, returns
the list of activities $\in \mathcal{V}$ and $\not \in S$ which have activity2vec cosine similarity
greater than a threshold $\Delta_{sim}$ for at least $\Delta_{nbr}$ activities in $S$. In simple words,
the algorithm iteratively expands the current seed list with new activities which have high similarity with a lot of current seed list activities. The expansion algorithm terminates when conversion prediction using relevant users' trails does not improve in terms of AUC after adding new activities (which may be just noise).
\begin{algorithm}[H]
\caption{\bf B2B seed list expansion using activity2vec}\label{alg:seedlist_expansion_act2vec}
\begin{algorithmic}[1]
\item initialize $\mathcal{V} = set\;of\;all\;activities$
\item initialize $S_0=S_{initial}$
\item initialize $i = 1$
\item initialize $AUC_0 = conv\_prediction\_AUC(S_0)$
\item initialize $stopping\_criteria = FALSE$
\While {$stopping\_criteria = FALSE$}{
\State $N_i = neighbors \left (S_{i-1} , \mathcal{V}, \Delta_{sim}, \Delta_{nbr} \right )$
\State $AUC_i = conv\_prediction\_AUC(S_{i-1} \cup N_i)$
\If {$ AUC_{i} > AUC_{i-1} + \epsilon $ }
\State $ S_i = S_{i-1 } \cup N_i $
\Else
\State $stopping\_criteria = TRUE$
\EndIf
\State $i = i +1$
\EndWhile}
\item final seed list = $S_{i-1}$
\end{algorithmic}
\end{algorithm}
\begin{comment}
\subsubsection{Seedlist - set expansion...JELENA}
Given a small set of keyword-matched activies like activities containing \textit{business owner} term, we expend this initial seedlist using constrained multi-level breadth-first inspired set expansion based on activity representation 'graph'.
We learn activity representations using activity2vec method \cite{act2vec} and concider each activiy representation as a \textit{node} in the activities graph and cosine similarity of two activity nodes as an \textit{edge} in that graph if the similarity value is higher than a given threshold (eg. $0.5$).
In each breadth-first pass ($l_i$) of the expanssion process we control parameters like:
\begin{enumerate}
\item number of activity nodes that are neighbors of the canidate activity and are a part of the resulting set of the previous expanssion pass ($l_{i-1}$)
\item number of activity nodes that are neighbors of the canidate activity and are a part of the resulting set of the initial seedlist ($l_{0}$)
\item similarity threshold for each level
\item keywords match
\end{enumerate}
The control parameters are set to influence selection of nodes that will be selected in each pass and in final set.
\begin{figure}[h]
\includegraphics[width= 0.7 \linewidth]{./figures/setexpansion2.png}
\centering
\caption{TBD.}\label{fig:latt}
\end{figure}
\end{comment}
\section{Related work} \label{sec:related}
In this section, we cover related work on online advertising (Section~\ref{sec:ads}),
purchase behavior modeling in B2B and B2C setups (Section~\ref{sec:purchase}),
activity embeddings (Section~\ref{sec:embeddings}), and
online identity management approaches (Section~\ref{sec:id_management}).
\subsection{Online advertising} \label{sec:ads}
Brands (advertisers) typically signup with ad platforms (\emph{e.g.}, Google Ads, Facebook Ads, Yahoo Gemini)
to show their ads to online users.
As a part of setting up online ad campaigns in an ad platform, advertisers
may create one or more creatives (ad text and images) to target relevant audience (\emph{i.e.}, ad groups),
and for each ad group they specify a bid \cite{broder2008computational}.
During the auction for ad serving \cite{broder2008computational,mappi_cikm},
the bid may be used in conjunction with the predicted click through rate (CTR) and the predicted conversion rate (CVR).
Such CTR and CVR prediction models are trained based on historical user data \cite{google_FTRL,mappi_cikm,gligorijevicdeeply}
with click and conversion labels, and are crucial for advertisers to target relevant users.
In large scale advertising setups, logistic regression (LR) models have been successfully used \cite{google_FTRL,mappi_cikm} for CTR and CVR prediction. Recently, deep learning models have also been introduced in this context, \emph{e.g.}, deep residual networks \cite{deep_crossing} and sequential models like recurrent neural networks (RNNs)
\cite{jelena_sigir2018,
cui2018modelling}.
In this paper, we use an LR model for conversion prediction (details in Section~\ref{sec:method}), but our methods can be extended to
sequential models, \emph{e.g.}, RNNs.
\subsection{B2C and B2B purchase behavior models} \label{sec:purchase}
In general, an online user may go through various stages of the purchase funnel \cite{funnelwiki,mckinsey}
(\emph{e.g.}, unaware, aware, interest, consideration, intent) before purchasing from an advertiser.
In the B2C context, where a single individual's journey can be mapped through the purchase funnel,
the funnel structure can be leveraged
for ad targeting \cite{jansen2011bidding,geminix_kdd}.
In a similar spirit, B2B marketing literature includes purchase funnel studies which indicate
that multiple users in an organization may go through such funnel stages before the organization decides to purchase
\cite{mckinsey_b2b,webster}. In the context of professional social
networks there has been work on identifying key decision makers within an organization (via declared user profiles) for the purpose of
B2B ad targeting \cite{linkedin_kdd2016}. In the B2B marketing industry, identifying such \textit{leads} \cite{duncan_kdd2015}
and key decision makers in an organization is widely seen as an effective approach for B2B marketing \cite{linkedin_kdd2016}.
Compared to prior work in professional social networks (where users explicitly declare their roles in an organization),
we do not focus on identifying generic decision makers in an organization. In particular, we focus on leveraging online activity trails (\emph{e.g.}, search queries, site visits) to identify users relevant to the purchase decision for a given B2B advertiser.
\subsection{Activity embeddings and corpus-based set expansion} \label{sec:embeddings}
Online users perform a variety of activities including reading articles, search queries,
purchasing items, visiting websites, and interacting with ads.
Across the activities done by a user, there can be richer semantic relationships,
and many such activities can be editorially mapped to stages in the purchase funnel \cite{jansen2011bidding}.
However, discovering such semantic relationship across activities with web scale data is non-trivial.
For example, a user planning a trip to a theme park in Orlando, could look for hotels in Orlando, check about weather,
and query for the theme park deals prior to the trip; hence, such events occurring in the user's trail are not isolated events,
but are related to the activity of buying the theme park's ticket.
Understanding such activity relationships can help in identifying users likely to click and convert on the theme park ads in the above example.
In the past, similarities between activities of one particular kind: either search \cite{search2vec} or purchase data from email extractions \cite{prod2vec} have been derived using embedding models constructed similar to word2vec \cite{w2v}.
In this paper, we take a similar approach to identify multi-modal activities \textit{relevant} to a given B2B conversion via activity2vec embeddings (details in Section~\ref{sec:act2vec}).
In addition, we iteratively refining such a seed list of relevant activities taking inspiration from
corpus based set expansion methods \cite{set_expan_first,set_expan} used to expand a small list of entities, while maintaining the same semantic class.
In particular, we propose an iterative (activity) seed list expansion method which tries to preserve the
semantic relationship of activities with respect to a B2B conversion.
\subsection{Online identity management} \label{sec:id_management}
With the proliferation of mobile devices, users switching between desktop and mobile devices
(\emph{e.g.}, laptop, phone, tablet) have made it challenging for ad platforms to track a user's online history.
Approaches for cross-device identity management are still evolving, and it is a topic of great importance in the online advertising industry. Currently there exist both deterministic as well as probabilistic algorithms for such cross device identity management \cite{neufeld_crossdevice, learning_to_rank_crossdevice}, and major ad platforms typically use proprietary methods.
In addition, there are deterministic ways to identify commercial IP addresses.
\section{Experimental Results} \label{sec:results}
To evaluate the proposed seed list expansion approach, as well as the idea of augmenting user trails (via relevant users) for the task of conversion prediction,
we carried out (offline) conversion prediction experiments based on a B2B advertiser's data from Yahoo Gemini.
In particular, we studied how different iterations of seed list expansion help the proposed B2B conversion prediction model, when compared to a baseline B2C model
where no trail augmentation is done (\emph{i.e.}, seed list $S=\phi$).
In other words, for each user, the B2C model uses only the user's activity trail,
while the B2B model uses the user's augmented activity trail, where the augmentation is based on a seed list (as described in Section~\ref{sec:relevant_conversion_model}).\\
Table~\ref{tab:auc_lifts} summarizes the conversion prediction (test) AUC lifts obtained for different versions of the seed list arising from iterations of the proposed
expansion algorithm. It also shows, for each iteration, the lifts in the number of activities in the expanded seed list (compared to the initial seed list),
and the average count of relevant users (including converters) per converted cluster. As expected, these numbers are monotonically increasing.
The average number of relevant users (including converters) per cluster is observed to be close to one; this is partially related to the large percentage of single user clusters in the data set, and indicates that many organizations in our data set may be of type-$1$.
As shown, expanding the seed list with similar activities, marks more users in a cluster as relevant,
and the resultant trail augmentation demonstrates strong conversion prediction AUC lifts (peaking at iteration $2$).
\begin{table}[h!]
\caption{ (1) AUC lifts from the proposed B2B conversion prediction model over B2C model
for $S_{initial}$ to $S_5$ iterations of seed list expansion. (2) Lifts in the number of activities in the seed lists compared to $S_{initial}$.
(3) Average count of relevant users (including converters) in a converted clusters.
} \label{tab:auc_lifts}
\begin{tabular}{c||c|c|c}
\textbf{Seed list} & & & \textbf{\# relevant users per} \\
\textbf{iteration} & \multirow{-2}{*}{\textbf{AUC lift}} & \multirow{-2}{*}{\textbf{\#activities lift}} & \textbf{converter cluster} \\ \hline
\textbf{$S_{initial}$} & 7.96\% &
- & 1.241 \\
\textbf{$S_{1}$} & 7.98\% & 5.24\% & 1.278 \\
\textbf{$S_{2}$} & \textbf{8.80\%} & 6.07\% & 1.283 \\
\textbf{$S_{3}$} & 8.44\% & 7.54\% & 1.297 \\
\textbf{$S_{4}$} & 8.29\% & 10.85\% & 1.317 \\
\textbf{$S_{5}$} & 8.27\% & 12.87\% & 1.325
\end{tabular}
\end{table}
A visualization of the AUC lifts is provided in Figure \ref{fig:res_auc_lifts}.
\begin{figure}[h!]
\centering
\includegraphics[width=0.85 \columnwidth]{AUC_lifts_per_seedlist_iterations.pdf}
\caption{
AUC lifts over B2C model (ingesting only user trails) for the proposed B2B model (using user trails plus relevant users from the same cluster) across seedlist iterations.}
\label{fig:res_auc_lifts}
\end{figure}
Guided by the AUC lifts, seed list expansion can be terminated after iteration $2
$, and the seed list $S_2$ can be used for relevant user detection and B2B ad targeting.
\begin{comment}
\begin{itemize}
\item \textbf{Organization type A}:
where \textit{business owners} are doing research and are making purchases (converting). In their trails we can see both search events and conversions events.
\item \textbf{Organization type B}:
where \textit{business owners} are not researching, but are directly converting.
This means that there exist some other person in that organization that is doing research on their behalf. In the case of \textit{business owners} we see conversions events, and not relevant search events (but we do see other search events in their trails). And in the case of \textit{researchers} we see only relevant search events and not conversion events.
\end{itemize}
It is important to discover relevant activities in users' trails such that you can target them on time and to collect proper positive and negative labels for our conversion models.
In our small example, we have $4210$ \textit{Organization type A }cases (where \textit{business owner} is also a \textit{researcher} - has relevant search events as well as conversion events in their trails, which are desirable cases for our conversion models).
In addition to these desirable cases, using cluster ids we were able to find $1052$ more \textit{researchers} which we can connect to other \textit{business owners} in \textit{Organizations type B}, which is $\sim25\%$ of increase in coverage of positive labels for this conversion model (which could be labeled as negatives otherwise).
Potential questions:
\begin{enumerate}
\item \textbf{Question: } Why don't you just target researchers? Why do you need to know if this person converted or not?
\textbf{Answer: } It is important to have correct positive labels for our conversion model. Labelining positive examples as negative can hurt the model's performance.
\item \textbf{Question: } What if you do targeting on one whole cluster id? Or learn the model on the union of these trails (cluster id based conversion models).
\textbf{Answer: } This can introduce a lot of noise, { \color{gray} which we can show by getting results of conversions models based on 1. cluster ids trail, 2. only business owner + researcher trails 3. only user based trails}
{\color{gray}TODO: Check how many users out of these 1052 clusters have other users in these same cluster ids. }
\end{enumerate}
Some more points:
\begin{enumerate}
\item maybe there are other researchers in the organization that are using some other search engine (therefore we do not have relevant search events for them), that we could not find using cluster ids (or we could find them, but we just don't have relevant events for them because they used some other search engine)
\item we don't have cluster ids for them (they are not registered in our system to belong to same cluster ids)
\item 1052/68737 type B converters (business owners in type B organizations) we could trace back to researchers using yahoo (while business owners have yahoo search events, just not any relevant search events)
\item Adding 25\% more data points to 'proper' conversions
\end{enumerate}
\end{comment}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 3,963 |
\section{Introduction}
\subsection{From intervention to counterfactuals}
In \cite{pearl2018book}, a ``ladder of causation'' is introduced, to describe the three levels of causal reasoning. The first level, named ``{\em association}'', discusses associations (not to use the word ``{\em correlation}'') between variables. Questions such as ``{\em is variable $X$ associated with variable $Y$}?'' can be answered at this level. Econometric models are usually simply based on such associations.
The second level is labelled ``{\em intervention}''. Reasoning on this level answers questions of the form ``{\em if I make the intervention $T$, how will this affect the level of the outcome $Y$?}'' For example, the question ``{\em would a patient heal faster at home or at the hospital, after some surgery?}'' is a standard question on this second level of the ladder of causation. This kind of reasoning invokes causality and can be used to investigate more questions than the reasoning of the first level.
The third level of the ``ladder of causation'' is labelled ``{\em counterfactuals}'' and involves answering questions which ask what might have been, had circumstances been different.
Counterfactual modeling implies that, to each individual in the control space, described through variables $\boldsymbol{x}$ and $y$, we will associate a counterfactual version of that individual in the hypothetical space. More formally, we will use notations of causal inference to answer counterfactual questions, such as ``{\em would that person have had surgery if she had been Afro-American?}''
\subsection{Causal inference framework}
Consider, as in \cite{rubin1974estimating} or
\cite{hernan2010causal}, the following framework: let $t$ denote some binary treatment, $t\in\{0,1\}$, with respectively, the control and the treatment. Let $\boldsymbol{x}$ be some covariates, $y$ the observed outcome, with $y_{T\leftarrow 1}^\star$ and $y_{T\leftarrow 0}^\star$ the potential outcomes (also denoted $y(1)$ and $y(0)$ in \cite{imbens2015causal} or \cite{imai2018quantitative}, or $y^1$ and $y^0$ in \cite{morgan2014counterfactuals} or \cite{cunningham2021causal}, even $y_{t=1}$ and $y_{t=0}$ in \cite{pearl2018book}), realized either under treatment condition ($t=1$) or under control condition ($t=0$). Note that the observed outcome is $y=y_{T\leftarrow t}^\star$, or $y=t\cdot y_{T\leftarrow 1}^\star+(1-t)\cdot y_{T\leftarrow 0}^\star$. An illustration is reported in Table~\ref{Tab:potential:outcome}.
\begin{table}[!ht]\centering
\begin{tabular}{lcccccccc}\hline\hline
& Treatment & \multicolumn{3}{c}{Outcome} & Age & Gender & Height & Weight \\
\cmidrule(lr){3-5}
& $t_i$ & $y_i$ & $y_{i,T\leftarrow 1}^\star$ & $y_{i,T\leftarrow o}^\star$ & $x_{1,i}$ & $x_{2,i}$ & $x_{3,i}$ & $x_{4,i}$ \\ \midrule
1 & 1 & 121 & 121 & {\bf ?} & 37 & F & 160 & 56 \\
2 & 0 & 109 & {\bf ?} & 109 & 28 & F & 156 & 54 \\
3 & 1 & 162 & 162 & {\bf ?} & 53 & M & 190 & 87 \\ \hline\hline
\end{tabular}
\caption{Potential outcome framework of causal inference, with one binary treatment $t_i$, the observed outcome variable $y_i$ and the two potential outcomes $y_{i,T\leftarrow 1}^\star$ and $y_{i,T\leftarrow 0}^\star$, as well as some covariates $\boldsymbol{x}_i$. One of the two potential outcomes is observed, and the other is missing, indicated by the question mark in the table.}\label{Tab:potential:outcome}
\end{table}
We will use the term ``treatment'' (and letter $t$) even if interventions are not possible, so it is no {\em per se} a ``treatment''. In this article, we try to answer a hypothetical question, like most questions asked at the third level of the ``ladder of causality''. For instance, in a context of quantifying discrimination, the ``treatment'' will denote the sensitive attribute, as in \cite{charpentier2023fairness}, such as the race of an individual, \textit{e.g.}, ``{\em what would have been the outcome if that person had been Afro-American?}'' Since our approach proposes an improvement on the metrics used in causal inference literature, we will use similar notations.
There will be a significant impact of treatment $t$ on $y$ if $y^\star_{T\leftarrow0}\neq y^\star_{T\leftarrow1}$. More specifically, the causal effect for individual $i$ is ${\tau_i=y^\star_{i,T\leftarrow1} - y^\star_{i,T\leftarrow0}}$. The {average treatment effect} (ATE) can the be defined as follows:
$$
\tau = \text{ATE} = \mathbb{E}\big[ Y^\star_{i,T\leftarrow1} - Y^\star_{i,T\leftarrow0}\big].
$$
Its empirical counterpart, the {sample average treatment effect} (SATE) writes:
$$
\widehat{\tau} =
\text{SATE} = \frac{1}{n}\sum_{i=1}^n y^\star_{i,T\leftarrow1} - y^\star_{i,T\leftarrow0}.
$$
Unfortunately, the latter is not directly observable, since one of the two is always missing, but some techniques can be used to provide some robust estimate of that quantity (we will present some of them in the next section).
Lastly, in the context of possibly heterogeneous effects, captured through covariates $\boldsymbol{x}$ (that can be a subset of the entire set of covariates), the {conditional average treatment effect} (CATE) is defined as the functional
$$
\tau(\boldsymbol{x}) = \text{CATE}(\boldsymbol{x}) = \mathbb{E}\big[ Y^\star_{T\leftarrow1} - Y^\star_{T\leftarrow0}\big\vert \boldsymbol{X}=\boldsymbol{x}\big]
$$
that can be written
$$
\tau(\boldsymbol{x}) = \text{CATE}(\boldsymbol{x}) = \mathbb{E}\big[ Y^\star_{T\leftarrow1} \big\vert \boldsymbol{X}=\boldsymbol{x}\big]- \mathbb{E}\big[ Y^\star_{T\leftarrow0} \big\vert \boldsymbol{X}=\boldsymbol{x}\big],
$$
as introduced in \cite{hahn1998role} and \cite{heckman1998matching}. More recently, \cite{hitsch2018heterogeneous} used that measure to quantify heterogeneous treatment effects to evaluate optimal targeting policies, as well as \cite{powers2018some} and \cite{fan2022estimation}. \cite{wager2018estimation}, \cite{athey2019estimating} and \cite{athey2019generalized} suggested to use random forests to estimate this quantity, inspired by \cite{davis2017using}. See also \cite{kunzel2019metalearners} or \cite{hsu2022counterfactual} for additional discussion on that quantity.
\
A classical assumption is that $(t_i,y_i,\boldsymbol{x}_i)$ is a random sample of size $n$ from some joint random vector $(T,Y,\boldsymbol{X})$. \cite{rosenbaum1983central} suggested a strong ``ignorable treatment assignment'' assumption defined as a conditional independence between $(Y^\star_{T\leftarrow0},Y^\star_{T\leftarrow1})$ and $T$, conditional on the covariates $\boldsymbol{X}$.
\subsection{Agenda}
In Section~\ref{sec:exogeneous}, and more specifically in Section~\ref{subsec:1}, we will discuss further the (possible) connection between covariates $\boldsymbol{x}$, treatment $t$ and the outcome $y$. Following our example on discrimination, the treatment variable $t$ (such as skin color) is an ``exogenous variable'', in the sense that it cannot be influenced either by covariates $\boldsymbol{x}$ or by the outcome $y$. Using the terminology from directed acyclic graphs (DAGs), $t$ will have no parent, so in a sense, it will be easier to pretend that an hypothetical intervention on $t$ is possible. In most applications, $t$ will have an impact on the outcome $y$, but not only. More precisely, it is possible that $t$ might influence some covariates $\boldsymbol{x}$, and those covariates can, in turn, impact the outcome $y$. In Section~\ref{subsec:3}, we suggest an extension from the standard {\em ceteris paribus} $\text{CATE}(\boldsymbol{x})$ defined as the difference $
\mathbb{E}\big[Y^*_{T\leftarrow 1}\big|\boldsymbol{x}\big] -
\mathbb{E}\big[Y^*_{T\leftarrow 0}\big|\boldsymbol{x}\big]$, to some {\em mutatis mutandis} $\text{CATE}(\boldsymbol{x})$ defined as the difference $
\mathbb{E}\big[Y^*_{T\leftarrow 1}\big|\boldsymbol{x}_{T\leftarrow 1}\big] -
\mathbb{E}\big[Y^*_{T\leftarrow 0}\big|\boldsymbol{x}\big]$, where, if $\boldsymbol{x}$ is considered with respect to the control group, the counterfactual in the treated population should be based on a different version of $\boldsymbol{x}$, in the treated space.
As discussed in Section~\ref{subsec:5}, the classical tool used in econometrics is the propensity score, based on $\mathbb{P}[T=1|\boldsymbol{X}=\boldsymbol{x}]$, that is usually considered to take into account the association that exists between the treatment and the covariates. At the second stage of the ``ladder of causation'' --the intervention-- we consider the fact that $\boldsymbol{x}$ might influence $t$. When answering the question ``{\em would a patient heal faster at home or at the hospital, after some surgery?}'', it might be relevant to assume that the propensity score can be used to correct for the bias we have in the data, since some patient have been healing at the hospital, not by choice, but because of some $\boldsymbol{x}$. At the third stage of the ladder --the counterfactuals-- some sort of dual version should be considered, since $t$ is not influenced by $\boldsymbol{x}$, quite the opposite: some $\boldsymbol{x}$ might be influenced by $t$. A simple toy example, based on a Gaussian structural equation model (SEM), is presented in Section~\ref{sec:gaussian:toy}, while in Section~\ref{subsec:7}, we briefly present real data that we will use in the next sections to illustrate various algorithms, based on births in the United States. The variable of interest $y$ is a binary variable, indicating whether a birth was natural, or not. The covariates $\boldsymbol{x}$ considered here will be the weight of the newborn, and the weight gain of the mother. And various ``treatments'' are considered: whether the mother is Afro-American, or not; whether the mother is a smoker, or not; whether the baby is a girl, or not (results for the last two are reported in Appendix~\ref{app:3}).
In Section~\ref{sec:opt:transp:univarie}, we will focus on the case where only one covariate $x$ is considered. We will start with classical matching techniques in Section~\ref{sub:sec:univ:classical:coupling}, used to match each point in $(y_i,x_i,t_i=0)$ --in the control group-- with another one in $(y_j,x_j,t_j=1)$ --in the treated group-- when the two groups have the same size. In Section~\ref{sub:sec:univ:optimal:coupling}, we will suggest on ``optimal'' matching algorithm, to associate individual $i$ (in the control group) to $j$ (in the treated group), that we will denote $j_i^\star$. Then, in Section~\ref{sub:sec:univ:optimal:matching}, we will discuss the case where the two groups have different sizes, that will be called optimal ``coupling''. In Section~\ref{sub:sec:univ:cate}, we will define an estimator, the {\em mutatis mutandis} CATE, $\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)$, where $\widehat{\mathcal{T}}(x)= \widehat{F}_1^{-1}\circ \widehat{F}_0(x)$, with $ \widehat{F}_0$ and $ \widehat{F}_1$ denoting the empirical distribution functions of $x$ conditional on $t=0$ and $t=1$, respectively. We will use quantiles to optimally ``transport'' $\boldsymbol{x}$'s from the control group to the treated group, formally through the $\mathcal{T}$ mapping. Finally, in Section~\ref{sub:ex}, we will illustrate this on probability to have a non-natural baby delivery, on our dataset.
In Section~\ref{sec:opt:transp:multivarie}, we will extend our previous approach to the case where several covariates $\boldsymbol{x}$ are considered. Formally, we will use optimal transport techniques to get a proper counterfactual of $\boldsymbol{x}$, not in the control group, but in the treated group. In Section~\ref{sect:multi:ot}, we will define the optimal transport problem for any number of dimensions and then, in Section~\ref{sect:multi:matching}, we will explain how to optimally associate each observation $\boldsymbol{x}_i$ in the control group (when $t=0$) with a single counterfactual observation $\boldsymbol{x}_j$ in the treated group (when $t=1$) when the two groups have the same size. This can be related to the Gaussian SEM discussed in Section~\ref{sec:gaussian:toy}. In Section~\ref{sect:multi:coupling}, we will see the extension when the two groups have different sizes.
Unfortunately, those approach do not provide an explicit mapping $\mathcal{T}$, but simply a matching of a single individual $\boldsymbol{x}_i$ (in the control group) to a weighted sum of multiple $\boldsymbol{x}_j$ (in the treated group). As we will see in Section~\ref{sec:gaussian}, it will be possible to get explicit formulation for the mapping $\mathcal{T}$ (from the space of covariates in the control group to the space of covariates in the treated group) when we assume that $\boldsymbol{X}$ conditional on $T$ has Gaussian distributions. In Section~\ref{sub:ex:multi}, those techniques will be further discussed in the context of the application to non-natural birth\footnote{See \href{https://github.com/3wen/counterfactual-estimation-optimal-transport}{\sffamily https://github.com/3wen/counterfactual-estimation-optimal-transport} for more details}..
\section{Ceteris Paribus vs. Mutatis Mutandis}\label{sec:exogeneous}
Before introducing another concept of CATE, we will formalize a little bit more the connections between the ``treatment'' $t$, the outcome $y$ and the covariates $\boldsymbol{x}$.
\subsection{Exogeneity, endogeneity and causal graphs}\label{subsec:1}
As discussed earlier, when presenting the second stage of the ``ladder of causation'', $t$ is a treatment. For example, in epidemiology, $t$ may be a treatment given to patients, possibly resulting from an intervention. At the third level, the treatment would be more a thought experiment (the ``\textit{gedankenexperiment}'' in \cite{mach1893science}), to answer a question such as ``{\em what if $t$ had taken another value?}'', without being able to make an experiment. \cite{chisholm1946contrary} introduced the idea of ``{\em contrary-to-fact conditional}'', coined as ``{\em counterfactual}'' in \cite{goodman1947problem}. A classical example would be when $t\in\{\text{smoker},\text{non-smoker}\}$, since it is not ethically possible to force someone to smoke, but it can also be used on inherent variables, such as the gender or the race of a person, that cannot be changed in a real experiment, to quantify possible discrimination.
Covariates $\boldsymbol{x}$ are available variables that have an impact on the outcome $y$. It is necessary here to distinguish two kinds of covariates, with variables that are influenced by the value of $t$, that might be seen as ''endogenous'', and those that are not influenced by the value of $t$, that might be seen as ``exogenous''. For example, the weight of the baby $x$ is an endogenous variable with respect to the variable indicating whether the mother is a smoker or not. Using a terminology used on causal graphs, ``endogeneous'' covariates $x$ are mediator variables (between $t$ and $y$), while ``exogeneous'' ones are variables colliding with $t$ on $y$, sometimes called collider variables (see Figure~\ref{Fig:DAG:3}).
The Markov assumption, on causal networks, states that each variable is conditionally independent of its non-descendants, given its parents. In Figure~\ref{Fig:DAG:3}, in the `cofounder' case (with the fork $t\to x$ and $t\to y$), and in the `mediator' case (with the chain $t\to x\to y$), $y$ is independent of $t$, conditional on $x$. But in the ``colider'' case (with $x\to y$ and $t\to y$), while $x$ and $t$ are independent, they become conditionally dependent, conditional on $y$. We will not discuss here the construction of the causal graphs, that is supposed to be given (see, e.g., \cite{vowels2021d} for a survey on techniques used to discover causal structures).
\begin{figure}[!ht]
\centering
\include{dessin/match-DAG-1.tex}
\vspace{-.8cm}\caption{Distinction of covariates, with confounding variables that will not influence $y$ on the top right, and two sets of explanatory variables that will influence $y$, that are influenced, or not, by ``treatment'' $t$, with mediators and colliders, at the bottom left.}\label{Fig:DAG:3}
\end{figure}
\subsection{Impact of a treatment $t$ on $y$ and $\boldsymbol{x}$, and CATE}\label{subsec:3}
\begin{figure}[!ht]
\centering
\include{dessin/match-DAG-2.tex}
\vspace{-.8cm}\caption{A causal graph on the left, and the impact of an intervention on the treatment $t$ on the right.}\label{Fig:DAG:intervention}
\end{figure}
Consider some treatment $t$. Let $\boldsymbol{x}^m$ denote the set of mediator variables and $\boldsymbol{x}^c$ denote the set of collider variables, as in Figure~\ref{Fig:DAG:intervention}.
Following the SEM terminology used in causal inference, consider data generated according to the equations on the left below (real world), prior to intervention on $t$. The right hand equations describe the data generating process with an intervention on $t$ (denoted $do(t)$ in \cite{pearl2018book}):
\begin{center}
\begin{tabular}{cc}
real world ~~~~~~~~~ & with intervention ($do(t)$)\\
$\displaystyle{\begin{cases}
T = h_t(U_t) \\
\boldsymbol{X}^m = h_m(T,\boldsymbol{U}_m) \\
\boldsymbol{X}^c = h_c(\boldsymbol{U}_c) \\
Y = h_y(T,\boldsymbol{X}^m,\boldsymbol{X}^c,U_y) \\
\end{cases}}$& $\displaystyle{\begin{cases}
T = t \\
\boldsymbol{X}^m_{T\leftarrow t} = h_m(t,\boldsymbol{U}_m) \\
\boldsymbol{X}^c = h_c(\boldsymbol{U}_c) \\
Y_{T\leftarrow t} = h_y(t,\boldsymbol{X}^m_{T\leftarrow t},\boldsymbol{X} ^c,U_y) \\
\end{cases}}$
\end{tabular}
\end{center}
Consider some independent noise variables $\{U_t,\boldsymbol{U}_m,\boldsymbol{U}_c,U_y\}$ (that can be assumed to be centered Gaussian to be close to the econometric literature). In the ``real world'', $T$ is a function of $U_t$, and $U_t$ only, through some $h_t:\mathbb{R}\to\{0,1\}$ function, $h_t(u) = \boldsymbol{1}(u>\text{threshold})$. Then we have two possible explanatory variables: mediator (endogenous) and collider (exogenous). If $\boldsymbol{X}^c$ are functions of the noise $\boldsymbol{U}_c$ only (through function $h_c$), $\boldsymbol{X}^m$ are functions of the noise $\boldsymbol{U}_m$ and the treatment $T$ (through function $h_c$). And finally, the outcome $Y$ is function of $\boldsymbol{X}^c$ and $\boldsymbol{X}^m$, also possibly $T$, and some idiosyncratic noise $U_y$.
In a {\em ceteris paribus} approach, $\text{CATE}(x)$ is equal to $\mathbb{E}\big[Y^*_{T\leftarrow 1}\big|{x}\big] - \mathbb{E}\big[Y^*_{T\leftarrow 0}\big|{x}\big]$. In a {\em mutatis mutandis} version, we should not consider $x$, but a version of $x$ that should be influenced by the treatment $t$, denoted ${x}_{T\leftarrow 1}$.
In a general setting, we have the following definition:
\begin{definition}
The {\em mutatis mutandis} CATE is
$$
\text{CATE}(\boldsymbol{x})=
\mathbb{E}\big[Y^*_{T\leftarrow 1}\big|\boldsymbol{x}_{T\leftarrow 1}\big] -
\mathbb{E}\big[Y^*_{T\leftarrow 0}\big|\boldsymbol{x}\big]
$$
(we might denote $\boldsymbol{x}_{T\leftarrow 0}$ instead of $x$ to avoid confusion for the second term).
\end{definition}
More specifically, when we ask the question ``{\em what would have been the probability to have a non-natural delivery for a baby with weight $x$ if the mother had been smoking?}'', we have to take into account the fact that if the mother had been smoking, the weight of the baby would have been impacted. The original weight $x$, associated with a non-Black mother, would become $\boldsymbol{x}_{T\leftarrow 1}$ (instead of $x$) if we seek a counterfactual version of $x$ in the treated population.
\subsection{Propensity score weighting}\label{subsec:5}
The classical approach in causal inference is based on the idea that $T$ is not really exogenous, and can be influenced by $\boldsymbol{x}$. Therefore,
the average treatment effect $\text{ATE} = \mathbb{E}[Y^\star_{T\leftarrow 1}-Y^\star_{T\leftarrow 0}]$, that can be written
$$\text{ATE} =
\mathbb{E}\left[\frac{TY}{p(\boldsymbol{X})}-\frac{(1-T)Y}{1-p(\boldsymbol{X})}\right]
$$
would be estimated by
$$
\text{SATE}=
\frac{1}{n}\sum_{i=1}^n \frac{t_iy_i}{\widehat{p}(\boldsymbol{x}_i)}-\frac{(1-t_i)y_i}{1-\widehat{p}(\boldsymbol{x}_i)},
$$
where $p(\boldsymbol{x})$ is a ``propensity score'' defined as $p(\boldsymbol{x})=\mathbb{P}[T=1|\boldsymbol{X}=\boldsymbol{x}]$, that can be estimated using, for instance, a logistic regression
$$
\widehat{p}(\boldsymbol{x})=\frac{\exp[
\boldsymbol{x}^\top\widehat{\boldsymbol{\beta}}]}{1+\exp[
\boldsymbol{x}^\top\widehat{\boldsymbol{\beta}}]}.
$$
Thus, the SATE can be seen as the difference between two weighted averages of $y_i$'s.
As discussed in \cite{abrevaya2015estimating}, it can be used to estimate $\text{CATE}(x)$, on a subset of features, with a local estimate of the average
$$
\text{CATE}(x) = \frac{1}{\sum K_{h}(x_{i}-x)}\sum \left(\frac{t_iy_i}{\widehat{p}(\boldsymbol{x}_i)}-\frac{(1-t_i)y_i}{1-\widehat{p}(\boldsymbol{x}_i)}\right) K_{h}(x_{i}-x),
$$
using some kernel function $K_h$. A $k$-nearest neighbors estimate can also be considered:
$$
\text{CATE}(x) = \frac{1}{k}\sum_{i\in\mathcal{V}_{k}(x)} \left(\frac{t_iy_i}{\widehat{p}(\boldsymbol{x}_i)}-\frac{(1-t_i)y_i}{1-\widehat{p}(\boldsymbol{x}_i)}\right),
$$
where $i\in\mathcal{V}_{k}(x)$ when $x_i$ is among the $k$-nearest neighbors of $x$.
If $y$ is binary (as the example we will use later on), the ATE is a difference between two probabilities, and logtistic regressions can be used to properly estimate $\mathbb{E}[Y^\star_{T\leftarrow t}|\boldsymbol{X}=\boldsymbol{x}]$, with weights in the regressions, that would be either the inverse of $1-\widehat{p}(\boldsymbol{x}_i)$ if $t_i=0$ or the inverse of $\widehat{p}(\boldsymbol{x}_i)$ if $t_i=1$, as in \cite{li2018balancing}.
\subsection{A toy (Gaussian) example}\label{sec:gaussian:toy}
To illustrate our approach, as an alternative to the use of a propensity score, consider the following toy example, with three explanatory variables, two endogenous (and correlated) ones, and an exogenous one, with some linear model (a Gaussian structural equation model, SEM):
\begin{equation}\label{eq:SEM}
\displaystyle{\begin{cases}
T = \boldsymbol{1}(U_t<0),~U_t\sim\mathcal{N}(0,1) \\
\boldsymbol{X}^m =\boldsymbol{\mu}_T+\boldsymbol{\Sigma}_T^{1/2}\boldsymbol{U}_{m},~\boldsymbol{U}_m\sim\mathcal{N}(\boldsymbol{0},\mathbb{I}) \\
{X}^c = \mu+\sigma {U}_c,~U_c\sim\mathcal{N}(0,1) \\
Y = \alpha+(\boldsymbol{\beta}_m,\beta_c)(\boldsymbol{X}^m , X^c)^\top +\gamma T+U_y,~U_y\sim\mathcal{N}(0,1) \\
\end{cases}}\end{equation}
where all the noises $(U_t,\boldsymbol{U}_m,U_c,U_y)$ are assumed to be centered, and independent. Here $\boldsymbol{\Sigma}_0^{1/2}$ is Cholesky decomposition of $\boldsymbol{\Sigma}_0$, so that $\boldsymbol{X}^m$ conditional on $T=t$ has distribution $\mathcal{N}(\boldsymbol{\mu}_t,\boldsymbol{\Sigma}_t)$.
Treatment $T$ is a binary variable, well-balanced since $\mathbb{P}(T=0)=\mathbb{P}(T=1)$. Conditional on $T=t$, the mediator (endogenous) variables $\boldsymbol{X}^m$ have a Gaussian distribution, with mean $\boldsymbol{\mu}_t$ and variance matrix $\boldsymbol{\Sigma}_t$. A collider variable $X^c$ is supposed to be independent of the other ones. And finally, $Y$ is a Gaussian variable where the average is a linear combination of $\boldsymbol{X}^m$ and $X^c$, plus $\gamma$ when $T=1$.
In Figure~\ref{Fig:ex:1}, the left-hand panel shows a scatter plot of $\boldsymbol{x}^m=(x^m_1,x^m_2)$ with blue points when $t=0$ and red points when $t=1$. The right-hand panel shows $(x^m_1,t)$ on a scatter plot, with the two conditional densities, as well as the logistic regression of $t$ against $x_1^m$ (that could be seen as the propensity score).
\begin{figure}[!ht]
\centering
\includegraphics[width=.48\textwidth]{dessin/simulation-points-SEM-1b.png}\includegraphics[width=.48\textwidth]{dessin/simulation-points-SEM-4b.png}
\caption{Scatter plot of $\boldsymbol{x}^m=(x^m_1,x^m_2)$ with blue points when $t=0$, and red points when $t=1$, on the left, and the logistic regression of $t$ against $x_1^m$ on the right. Toy dataset generated from Equation~(\ref{eq:SEM}).}\label{Fig:ex:1}
\end{figure}
The two interventions yield
\begin{center}
\begin{tabular}{cc}
$do(T=0)$~~~~~~~~~~ & $do(T=1)$~~~~~~~~~~\\
$\displaystyle{\begin{cases}
T \leftarrow 0 \\
\boldsymbol{X}^m =\boldsymbol{\mu}_0+\boldsymbol{\Sigma}_0^{1/2}\boldsymbol{U}_{m}\\
{X}^c = \mu+\sigma {U}_c \\
Y = \alpha+(\boldsymbol{\beta}_m,\beta_c)(\boldsymbol{X}^m , X^c)^\top +U_y \\
\end{cases}}$& $\displaystyle{\begin{cases}
T\leftarrow 1\\
\boldsymbol{X}^m =\boldsymbol{\mu}_1+\boldsymbol{\Sigma}_1^{1/2}\boldsymbol{U}_{m}' \\
{X}^c = \mu+\sigma {U}_c' \\
Y = \alpha+(\boldsymbol{\beta}_m,\beta_c)(\boldsymbol{X}^m , X^c)^\top +\gamma +U_y'\\
\end{cases}}$
\end{tabular}
\end{center}
more precisely, in that model with three covariates, $\boldsymbol{X}^m=(X_1^m,X_2^m)$, and since
$$
\boldsymbol{\Sigma}_t=\begin{pmatrix}
\sigma_{t1}^2 & r_t\sigma_{t1}\sigma_{t2} \\
r_t\sigma_{t1}\sigma_{t2} & \sigma_{t2}^2 \\
\end{pmatrix}\text{ and }
\boldsymbol{\Sigma}_t^{1/2}=\begin{pmatrix}
\sigma_{t1} & 0 \\
\sigma_{t2}r_t & \sigma_{t2}\sqrt{1-r_t^2} \\
\end{pmatrix}
$$
we can write
\begin{center}
\begin{tabular}{cc}
$do(T=0)$~~~~~~~~~~ & $do(T=1)$~~~~~~~~~~\\
$\displaystyle{\begin{cases}
T \leftarrow 0 \\
X_1^m = \mu_{01} + \sigma_{01} U_{1}^m\\
X_2^m = \mu_{02} + \sigma_{02}(r_0 U_{1}^m+\sqrt{1-r_0^2}U_{2}^m)\\
{X}^c = \mu+\sigma {U}_c \\
Y = \alpha+\beta_1^m X_1^m+\beta_2^m X_2^m+\beta^cX^c +U_y \\
\end{cases}}$& $\displaystyle{\begin{cases}
T \leftarrow 1 \\
X_1^m = \mu_{11} + \sigma_{11} U_{1}^{m'}\\
X_2^m = \mu_{12} + \sigma_{12}(r_1 U_{1}^{m'}+\sqrt{1-r_1^2}U_{2}^{m'})\\
{X}^c = \mu+\sigma {U}_c' \\
Y = \alpha+\beta_1^m X_1^m+\beta_2^m X_2^m+\beta^cX^c+\gamma +U_y' \\
\end{cases}}$
\end{tabular}
\end{center}
and therefore
$$\displaystyle{\begin{cases}
Y_{T\leftarrow 0} = \alpha+\beta_1^m x_1+\beta_2^m \big(\mu_{02} + \sigma_{02}(r_0 \sigma_{01}^{-1}[x_1-\mu_{01}]+\sqrt{1-r_0^2}U_{2}^m)\big)+\beta^c(\mu+\sigma {U}_c) +U_y\\
Y_{T\leftarrow 1} = \alpha+\beta_1^m x_1'+\beta_2^m \big(\mu_{12} + \sigma_{12}(r_1 \sigma_{11}^{-1}[x_1'-\mu_{11}]+\sqrt{1-r_1^2}U_{2}^{m'})\big)+\beta^c(\mu+\sigma {U}_c')+\gamma +U_y'\\
\end{cases}}.$$
Hence,
$$
\text{ATE} = \mathbb{E}[Y_{T\leftarrow 1}-Y_{T\leftarrow 0}]=\gamma.
$$
For conditional average treatment effects,
$$\displaystyle{\begin{cases}
\mathbb{E}[Y_{T\leftarrow 0}|X_1^m = x_1] = \alpha+\beta_1^m x_1+\beta_2^m \big(\mu_{02} + \sigma_{02}r_0 \sigma_{01}^{-1}[x_1-\mu_{01}]\big)+\beta^c\mu\\
\mathbb{E}[Y_{T\leftarrow 1}|X_1^m = x_1'] = \alpha+\beta_1^m x_1'+\beta_2^m \big(\mu_{12} + \sigma_{12}r_1 \sigma_{11}^{-1}[x_1'-\mu_{11}]\big)+\beta^c\mu +\gamma \\
\end{cases}}.$$
{\em Ceteris paribus}, we suppose that $x_1'=x_1$, then
$$
\text{CATE}_{cp}(x_1)=\mathbb{E}[Y_{T\leftarrow 1}|X_1^m = x_1] -\mathbb{E}[Y_{T\leftarrow 0}|X_1^m = x_1] =\text{ATE} +\delta x_1 +\kappa,
$$
where
$$
\begin{cases}
\kappa = \beta_2^m \big(\mu_{12} + \sigma_{02}r_0 \sigma_{01}^{-1}\mu_{01} - \sigma_{12}r_1 \sigma_{11}^{-1}\mu_{11} - \mu_{02} \big)\\
\delta = \beta_2^m \big( \sigma_{12}r_1 \sigma_{11}^{-1}- \sigma_{02}r_0 \sigma_{01}^{-1}\big)
\end{cases}.
$$
{\em Mutatis mutandis}, since $X_1^m = \mu_{01} + \sigma_{01} U_{1}^m$ when $T=0$ while $X_1^m = \mu_{11} + \sigma_{11} U_{1}^m$ when $t=1$, it is legitimate to consider that $x_1'=x_{1:T\leftarrow 1}=\mu_{11} + \sigma_{11}(\sigma_{01}^{-1}[x_1-\mu_{01}])$. Therefore, {\em mutatis mutandis},$$
\text{CATE}_{mm}(x_1) =\text{ATE}+ \delta' x_1 +\kappa',
$$
where
$$
\begin{cases}
\kappa' = \kappa + \beta_1^m [\mu_{11} - \sigma_{11}\sigma_{01}^{-1}\mu_{01}] \kappa+k\\
\delta' = \delta + \beta_1^m (\sigma_{11}\sigma_{01}^{-1}-1)=\delta+d
\end{cases},
$$
so that we can also write
$$
\text{CATE}_{mm}(x_1) = \text{CATE}_{cp}(x_1)+\big(dx_1+k\big).
$$
In Figure~\ref{Fig:ex:3}, the horizontal orange line is the true average treatment effect (ATE). The green line is the true {\em ceteris paribus} CATE, while the blue line is the true {\em mutatis mutandis} CATE, both function of $x_1^m$. The dashed and erratic lines on the right-hand graph are estimations of the CATE function using two techniques, described in the next section.
\begin{figure}[!ht]
\centering
\includegraphics[width=.48\textwidth]{dessin/simulation-points-SEM-tau-2-A.png}
\includegraphics[width=.48\textwidth]{dessin/simulation-points-SEM-tau-2-B.png}
\caption{ATE, {\em ceteribs paris} $\text{CATE}_{cp}(x_1)$ and {\em mutatis mutandis} $\text{CATE}_{mm}(x_1)$ on the left, with an estimate of {\em mutatis mutandis} $\text{CATE}_{mm}(x_1)$ on the right, from the toy dataset from example~\ref{eq:SEM}. Numerical details are given in Appendix~\ref{app:2}.}\label{Fig:ex:3}
\end{figure}
\subsection{Application on birth data}\label{subsec:7}
Let us now consider the dataset of all deliveries in the U.S. in 2013.\footnote{\href{https://www.cdc.gov/nchs/data_access/Vitalstatsonline.htm}{https://www.cdc.gov/nchs/data\_access/Vitalstatsonline.htm}}
Those data have been intensively used to discuss the ``low birth weight paradox''.
As explained in \cite{wilcox1993birth,wilcox2001importance}, low birth weight of babies $x$ is strongly associated with increased neonatal mortality $y$. However, low birth weight infants born to mothers who smoke $t=1$ usually have lower mortality rates than low birth weight infants born to nonsmoking mothers $t=0$. \cite{hernandez2006birth} discussed the birth weight paradox based on causal directed acyclic graphs as a conceptual framework. Multiple causal models have been considered. Figure~\ref{Fig:BWP:3ex} illustrates four situations, using directed acyclic graphs. In the first case (Figure~\ref{Fig:BWP:3ex}a), birth weight $x$ has a direct effect on mortality $y$, while smoking $t$ has not. It is also possible to consider a second case where birth weight $x$, and possibly smoking $t$, have a direct effect on mortality $y$ (Figure~\ref{Fig:BWP:3ex}b). To increase the plausibility of this scenario, some known common causes of lower birth weight and mortality, denoted $z$, can be added (Figure~\ref{Fig:BWP:3ex}c). In this third case, \cite{hernandez2006birth} claims that the variables $z$ might induce an association between smoking and mortality, conditional on birth weight $x$. Lastly, a fourth situation that combines the second and the third can be considered (Figure~\ref{Fig:BWP:3ex}d).
\begin{figure}[!ht]
\include{BWP.tex}
\vspace{-1cm}
\caption{Directed acyclic graphs for the birth weight paradox, when $y$ is the mortality indicator, $x$ the birth weight and $t$ a smoking indicator. $z$ denotes some possible common causes of infant death, from \cite{hernandez2006birth}.}\label{Fig:BWP:3ex}
\end{figure}
Here, instead of focusing on newborn mortality (which is an unbalanced variable, with less than $0.5\%$ mortality rate), we consider $y=\boldsymbol{1}(\text{non-natural delivery})$. As can be seen in Table~\ref{Tab:Stat:Des:XY-T}, about a third of all deliveries can be considered as ``un-natural'' (or ``complicated'', involving a least a C-section). Among possible explanatory variables, we consider the weight of the newborn infant $x_1$ and the weight gain of the mother $x_2$. Conditional densities, of $\boldsymbol{x}=\begin{bmatrix} x_1 & x_2\end{bmatrix}$ given $y$ can be visualized in Figure~\ref{fig:densite-1x3-conditional-k}. To illustrate various techniques based on optimal transport, we will consider $\text{CATE}(\boldsymbol{x})$,
$$\tau(\boldsymbol{x}) = \text{CATE}(\boldsymbol{x}) = \mathbb{P}\big[ Y^\star_{T\leftarrow1} =1\big\vert \boldsymbol{X}=\boldsymbol{x}\big]- \mathbb{P}\big[ Y^\star_{T\leftarrow0}=1 \big\vert \boldsymbol{X}=\boldsymbol{x}\big],
$$
for several possible ``treatment'' $t$, that can be visualized in Figure~\ref{Fig:NN:1ex}, with either a smoker indicator (for the mother) or a variable indicating whether the newborn is a boy or not. However, emphasis will be placed on a variable indicating whether the mother is Black (Afro-American) or not. Conditional densities of $\boldsymbol{x}$ given $t$ can be visualized in Figure~\ref{fig:densite-2x3-conditional-t}.
In a nutshell, we want to address the following questions ``{\em what would have been the probability of a non-natural delivery for a baby of weight $x_1$ whose mother gained weight $x_2$ during pregnancy, if the mother had been Afro-American?}'' or ``{\em if the mother had been smoking?}''
\begin{table}[!ht]\centering
\begin{tabular}{lrrrrrr}\hline\hline
& \multicolumn{6}{c}{Variable of interest}\\
\cmidrule(lr){2-7}
& \multicolumn{3}{c}{$y=0$ (natural)} & \multicolumn{3}{c}{$y=1$ (non-natural)} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
$n$ number of observations & \multicolumn{3}{c}{2,221,522 (65.70\%)} & \multicolumn{3}{c}{1,159,776 (34.30\%)} \\
$x_1$ weight of newborn & \multicolumn{3}{c}{average 3,299 g.} & \multicolumn{3}{c}{average 3,231 g.} \\
$x_2$ weight gain of mother & \multicolumn{3}{c}{average 30.02 lbs.} & \multicolumn{3}{c}{average 31.16 lbs.} \\
\hline
& \multicolumn{6}{c}{``Treatment''}\\
\cmidrule(lr){2-7}
& \multicolumn{3}{c}{$t=0$} & \multicolumn{3}{c}{$t=1$} \\
\cmidrule(lr){2-4}\cmidrule(lr){5-7}
Afro-American variable & non-Black & 2,980,387 & (88.14\%) & Black & 400,911& (11.86\%) \\
smoker variable & non-smoker & 2,959,847 & (91.54\%)& smoker & 273,685 & (8.46\%) \\
sex variable & baby boy & 1,730,837 & (51.18\%) & baby girl & 1,650,461 & (48.82\%) \\
\hline\hline
\end{tabular}
\caption{Statistics about the variable of interest $y$, indicating a non-natural delivery, and two explanatory variables, the weight of the newborn child ($x_1$) and the weight gain of the mother $(x_2)$, on top; and statistics about the ``treatment'' considered at the bottom.}\label{Tab:Stat:Des:XY-T}
\end{table}
\begin{figure}[!ht]
\centering
\include{dessin/tik-non-nat-2.tex}
\vspace{-.8cm}\caption{Directed acyclic graphs to explain non-natural deliveries, when $y=\boldsymbol{1}(\text{non-natural delivery})$, $x$ is either the birth weight of the infant ($x_1$), or the weight gain of the pregnant mother ($x_2$), and $t$ is either a smoker indicator (for the mother), or an indicator that the mother is Black (Afro-American), or that the baby is a boy.}\label{Fig:NN:1ex}
\end{figure}
\section{Quantile based matching}\label{sec:opt:transp:univarie}
In this section, we consider the simple case where $x$ is univariate. This allows us to introduce properties that will be extended more formally in higher dimension in the next section. Following the example of Section~\ref{sec:gaussian:toy}, we will propose some techniques to generate a counterfactual version of $(x,y,t=0)$, or $(x,y_{T\leftarrow 0}^\star)$, that will be $(x_{T\leftarrow 1},y_{T\leftarrow 1}^\star)$. In Section~\ref{sub:sec:univ:classical:coupling}, we will discuss classical matching techniques, used to match each point in $(y_i,x_i,t_i=0)$ --in the control group-- with another one in $(y_j,x_j,t_j=1)$ --in the treated group-- when the two groups have the same size. In Section~\ref{sub:sec:univ:optimal:coupling}, we will suggest on optimal matching algorithm, to associate individual $i$ (in the control group) to $j$ (in the treated group), or $j_i^\star$. Then, in Section~\ref{sub:sec:univ:optimal:matching}, we will discuss the case where the two groups have different sizes, that will be called optimal ``coupling''. In Section~\ref{sub:sec:univ:cate}, we will define an estimator, the {\em mutatis mutandis} CATE, $\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)$, where $\widehat{\mathcal{T}}(x)= \widehat{F}_1^{-1}\circ \widehat{F}_0(x)$, with $ \widehat{F}_0$ and $ \widehat{F}_1$ denoting the empirical distribution functions of $x$ conditional on $t=0$ and $t=1$, respectively. Thus, we will use quantiles to optimal ``transport'' $x$'s from the control group to the treated group, formally through the $\mathcal{T}$ mapping. Finally, in Section~\ref{sub:ex}, we will illustrate this on the probability that a non-natural baby delivery occurs.
\subsection{Classical matching techniques}\label{sub:sec:univ:classical:coupling}
To estimate the average treatment effect $\displaystyle{\tau = \mathbb{E}\big[ Y^\star_{T\leftarrow1} - Y^\star_{T\leftarrow0}\big]}$, a standard technique is to consider matching techniques to match each point in $(y_i,x_i,t_i=0)$ or $(y_i^{(0)},x_i^{(0)})$ with another one in $(y_j,x_j,t_j=1)$, or $(y_j^{(1)},x_j^{(1)})$. In this coupling approach, we assume that there are $n$ treated and $n$ non-treated individuals. A treated individual $i$ ($t_i=1$) is matched to someone in the non-treated group ($t_j=0$) that is close enough for some distance on the set of covariates $\mathcal{X}$, $j^\star_i=\displaystyle{\underset{j:t_j=0}{\text{argmin}}\{d(x_i^{(0)},x_j^{(1)})\}}$, so that
$$
\widehat{\tau} = \frac{1}{n}\sum_{i=1}^{n} \big(y^{(1)}_{j^\star_i}-y_{i}^{(0)}\big)= \frac{1}{n}\sum_{i=1}^{n}y_{j^\star_i}^{(1)}-\frac{1}{n}\sum_{i=1}^{n} y^{(0)}_i=\overline{y}^{(1)}-\overline{y}^{(0)},
$$
since we simply consider a re-ordering of the treated population. But interestingly, that approach provides a counterfactual version of $(x_i,y_i)$ in the treated population, $(x_{j^\star_i},y_{j^\star_i})$. An algorithm performing such a matching would be Algorithm~\ref{alg:ate:0}.
\begin{algorithm}[!ht]
\caption{Counterfactual matching -- ``1:1 nearest neighbor matching'' (classical)}\label{alg:ate:0}
\begin{algorithmic}
\State$\mathcal{D} \gets \{(y_i,\boldsymbol{x}_i,t_i)\}$
\Function{Counterfactual1}{$\mathcal{D}$}
\State $\mathcal{D}_0 \gets $ subset of $\mathcal{D}$ when $t=0$ (size $n$) shuffled, with indices $i$
\State $\mathcal{D}_1 \gets $ subset of $\mathcal{D}$ when $t=1$ (size $n$), with indices $j$
\For{$i=1,2,\cdots,n$}
\State $j^\star_i=\displaystyle{\underset{j:t_j=1}{\text{argmin}}\{d(\boldsymbol{x}_i,\boldsymbol{x}_j)\}}$ in $\mathcal{D}_1$,
\State $L_i \gets (i,j^\star_i,y_{j^\star_i}^{(1)}-y^{(0)}_i)$
\State remove observation $j^\star_i$ from $\mathcal{D}_1$
\EndFor
\State \Return matrix $L$ ~~ ($n\times 3$, with $L=(L_i)$)
\EndFunction
\end{algorithmic}
\end{algorithm}
This algorithm, introduced by \cite{rubin1973matching}, is described in \cite{stuart2010matching} under the name ``1:1 nearest neighbor matching'', and properties are discussed in \cite{ho2007matching} or \cite{dehejia1999causal} that focuses on the problem of not removing selected observations (also called ``Greedy Matching'').
Quite naturally, it is possible to define some local version of the previous quantity using weights or some $k$ nearest neighbors approach, to derive an estimate of the CATE $\widehat{\tau}(x)$, as in Algorithm~\ref{alg:cate:0}
$$
\widehat{\tau}(x) \propto \sum_{i=1}^{n} \omega_{i}(x)\big(y_{j^\star_i}^{(1)}-y^{(0)}_i\big),
$$
where weight $\omega_i(x)$ are all the higher that $x_i$ is close to $x$, either based on a $k$-nearest neighbors approach ($\omega_i(x) = \boldsymbol{1}(i\in V_{{x}}^k)$, as in Algorithm~\ref{alg:cate:0}) or based on a kernel approach ($\omega_i(x) =K(|{x}-{x}_i|)$ for some kernel $K$).
\begin{algorithm}[!ht]
\caption{Estimate SCATE (classical, with $k$-NN)}\label{alg:cate:0}
\begin{algorithmic}
\State dataset $\mathcal{D}\gets\{(y_i,\boldsymbol{x}_i,t_i)\}$,
\Function{scate1}{$\mathcal{D},k,\boldsymbol{x}$}
\State $L \gets $ {\sc Counterfactual1}$(\mathcal{D})$
\State $V_{\boldsymbol{x}}^k\gets$ list of $k$ nearest neighbors of $\boldsymbol{x}_i$'s in $\mathcal{D}_0$ close to $\boldsymbol{x}$
\For{$i\in V_{\boldsymbol{x}}^k$}
\State $d_i\gets L\$d(i)$
\EndFor
\State\Return $\displaystyle{\frac{1}{k}\sum_{i\in V_{\boldsymbol{x}}^k} d_i}$
\EndFunction
\end{algorithmic}
\end{algorithm}
Unfortunately, that matching mechanism can be very sensitive to the initial permutation: individuals picked first will have a counterfactual in the treated group close to them, but it might not be the case for the individuals picked last. In the next section, we will consider some optimal matching among individuals in the two populations.
\subsection{Optimal matching}\label{sub:sec:univ:optimal:coupling}
The matching procedure described previously is characterized by some $n\times n$ permutation matrix, $P$, with entries in $\{0,1\}$, satisfying $\mathbb{P}\boldsymbol{1}_n=\boldsymbol{1}_n$ and $\mathbb{P}^{\star\top}\boldsymbol{1}_n=\boldsymbol{1}_n$, see \cite{brualdi2006combinatorial}. Hence, there is a permutation $\sigma$ of $\{1,\cdots,n\}$ such that $j_i^\star = \sigma(i)$, and $P$ is the matrix associated with $\sigma$ (that satisfies $\boldsymbol{e}_i P=\boldsymbol{e}_{\sigma(i)}$, where $\boldsymbol{e}_i$'s denote the standard basis vector, i.e., a row vector of length $n$ with $1$ in the $i$-th position and $0$ in every other position). It is possible to seek an ``optimal'' permutation: if $C$ is the $n\times n$ matrix that quantifies the distance between individuals in the two groups, $C_{i,j}=d(x_i^{(0)},x_j^{(1)})=\delta(x_i^{(0)}-x_j^{(1)})$, the optimal matching is solution of
$$
\min_{P\in\mathcal{P}} \langle P,C\rangle =
\min_{P\in\mathcal{P}} \sum_{i,j} P_{i,j}C_{i,j},
$$
where $\mathcal{P}$ is the set of permutation matrices, and $\langle \cdot,\cdot\rangle$ is the Frobenius dot-product. This is also called Kantorovich's optimal transport problem, from \cite{kantorovich1942translocation}. If $\delta$ is (strictly) convex --as is the standard Euclidean distance-- it can be proven that this optimal transport problem has a simple solution.
Instead of using $(y_i^{(0)},x_i^{(0)})$, let $r_i^{(0)}$ denote the rank of $x_i^{(0)}$ in $\{x_1^{(0)},\cdots,x_n^{(0)}\}$. Similarly, let $r_i^{(1)}$ denote the rank of $x_i^{(1)}$ in the treated dataset $\{x_1^{(1)},\cdots,x_n^{(1)}\}$. The procedure then becomes simply a matching based on ranks, in the sense that $j_i^\star$ satisfies $r_{j_i^\star}^{(1)}=r_i^{(0)}$, as discussed in Chapter 2 of \cite{santambrogio2015optimal}. Since ranks are defined on $\{1,2,\cdots,n\}$, vectors $\boldsymbol{r}^{(0)}$ and $\boldsymbol{r}^{(1)}$ correspond to two permutations of $\{1,2,\cdots,n\}$, that we can denote $\sigma_0$ and $\sigma_1$, respectively. The optimal coupling is based on permutation $\sigma=\sigma_1\circ\sigma_0^{-1}$ in the sense that $x_i^{(0)}$ is associated to $x_{\sigma(i)}^{(1)}$.
If the $\boldsymbol{x}^{(0)}$'s and the $\boldsymbol{x}^{(1)}$'s are sorted, then $P=\mathbb{I}_n$, i.e., $x_i^{(0)}$ is coupled with $x_i^{(1)}$. Or, if $\widehat{F}_0$ and $\widehat{F}_1$ are the cumulative distribution functions associated with sample $\boldsymbol{x}^{(0)}$ and $\boldsymbol{x}^{(1)}$, we can see that if $u\in(0,1)$ is such that $\widehat{F}_0^{-1}(u)=x_i^{(0)}$, then $\widehat{F}_1^{-1}(u)=x_i^{(1)}$, with the exact same $i$.
\subsection{Optimal coupling}\label{sub:sec:univ:optimal:matching}
The previous procedure can be extended in the case where the two groups do not necessarily have the same size. If the two groups $({x}_i,t_i=0)$ and $({x}_j,t_j=1)$ have different sizes, namely $n_0$ and $n_1$, respectively, it is possible to define some matching using weights, and weighted mean of individuals in the two groups.
In a very general setting, if $\boldsymbol{a}_0\in\mathbb{R}_+^{n_0}$ and $\boldsymbol{a}_1\in\mathbb{R}_+^{n_1}$ satisfy $\boldsymbol{a}_0 ^\top\boldsymbol{}{1}_{n_0}=\boldsymbol{a}_1 ^\top\boldsymbol{}{1}_{n_1}$ (identical sums), define
$$
U(\boldsymbol{a}_0,\boldsymbol{a}_1)=\big\lbrace
M\in\mathbb{R}_+^{n_0\times n_1}:M\boldsymbol{1}_{n_1}=\boldsymbol{a}_{0}\text{ and }{M}^\top\boldsymbol{1}_{n_0}=\boldsymbol{a}_{1}
\big\rbrace.
$$
This set of matrices is a convex polytope (see \cite{brualdi2006combinatorial}). The optimal coupling is matrix $P^\star$ solution of
$$
\min_{P\in U(\boldsymbol{a}_0,\boldsymbol{a}_1)} \left\lbrace \langle C,P\rangle \right\rbrace,
$$
which is solved using linear programming, by casting matrix $P\in\mathbb{R}_+^{n_0\times n_1}$ as a vector $\boldsymbol{p}\in\mathbb{R}_+^{n_0n_1}$ such that $\boldsymbol{p}_{i+n(j-1)}=P_{i,j}$, and similarly for the cost matrix $C$. The constraint $P\in U(\boldsymbol{a}_0,\boldsymbol{a}_1)$ becomes equivalently
$$\begin{pmatrix}
\boldsymbol{1}_{n_0}^\top\otimes\mathbb{I}_{n_1}\\
\mathbb{I}_{n_0}\otimes\boldsymbol{1}_{n_1}^\top
\end{pmatrix}\boldsymbol{p} =
A\boldsymbol{p} =(\boldsymbol{a}_0,\boldsymbol{a}_1)^\top= \begin{pmatrix}
\boldsymbol{a}_0\\
\boldsymbol{a}_1
\end{pmatrix},
$$
where $A$ is some $(n_0+n_1)\times(n_0n_1)$ matrix. The optimal matching problem is then simply
$$
\min\left\lbrace \boldsymbol{c}^\top\boldsymbol{p} \right\rbrace\text{ subject to }A\boldsymbol{p} =(\boldsymbol{a}_0,\boldsymbol{a}_1)^\top.
$$
In our case, let $U_{n_0,n_1}$ denote $U(\boldsymbol{1}_0,\frac{n_0}{n_1}\boldsymbol{1}_1)$
\begin{equation}\label{prog:match}
P^* \in \underset{P\in U_{n_0,n_1}}{\text{argmin}} \langle P,C\rangle \text{ ou }
\underset{P\in U_{n_0,n_1}}{\text{argmin}}\sum_{i=1}^{n_0} \sum_{j=1}^{n_1} P_{i,j}C_{i,j}.
\end{equation}
One can notice that this matrix optimisation problem does not depend on the dimension of space, so it will easily be extended to the case where $x$ is multivariate. Nevertheless, in the univariate setting, this approach can be related to quantile functions.
\subsection{From optimal matching to CATE}\label{sub:sec:univ:cate}
Let $F_0$ and $F_1$ denote the two conditional distributions of $X$, an absolutely continuous variable, in the control group ($t=0$) and in the treatment group ($t=1$), respectively. Then the optimal matching between the two groups is based on transformation $\mathcal{T}:x_0\mapsto x_1 = F_1^{-1}\circ F_0(x_0)$. From the probability integral transform property: if $X_0\sim F_0$, then $F_0(X_0)$ is uniform on the unit interval $[0,1]$, and then $X_1 = \mathcal{T}(X_0)\sim F_1$.
\begin{lemma}
If $X_0\sim F_0$, then $X_1 = \mathcal{T}(X_0)\sim F_1$, where $\mathcal{T}:x_0\mapsto x_1 = F_1^{-1}\circ F_0(x_0)$.
\end{lemma}
\begin{definition}
The {\em mutatis mutandis} quantile-based CATE is
\begin{equation}\label{eq:CATE:quantile}
\text{QCATE}(u) =
\mathbb{E}\big[Y^*_{T\leftarrow 1}\big|X=F_{1}^{-1}(u)\big] -
\mathbb{E}\big[Y^*_{T\leftarrow 0}\big|X=F_{0}^{-1}(u)\big],
\end{equation}
where $F_t$ is the cumulative distribution function of $X$, conditional on $T=t$, or
\begin{equation}\label{eq:CATE:quantile:2}
\text{CATE}(x) =
\mathbb{E}\big[Y^*_{T\leftarrow 1}\big|X=\mathcal{T}(x)\big] -
\mathbb{E}\big[Y^*_{T\leftarrow 0}\big|X=x\big],~ \mathcal{T} = F_1^{-1}\circ F_0
\end{equation}
where $x$ is considered with respect to the control group.
\end{definition}
Thus, $\text{CATE}(x) =\text{QCATE}(F_0(x))$.
\begin{definition}
Consider two models, $\widehat{m}_0(x)$ and $\widehat{m}_1(x)$, that estimate, respectively, $\mathbb{E}[Y|X=x,T=0]$ and $\mathbb{E}[Y|X=x,T=1]$.
A natural estimator of the {\em mutatis mutandis} CATE is
$$
\text{SCATE}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)
$$
where $\widehat{\mathcal{T}}(x)= \widehat{F}_1^{-1}\circ \widehat{F}_0(x)$, $ \widehat{F}_0$ with $ \widehat{F}_1$ denoting the empirical distribution functions of $x$ conditional on $t=0$ and $t=1$, respectively.
\end{definition}
Note that a simple parametric transformation can be obtained, based on the assumption that $X$ conditional on $T$ is Gaussian. More precisely, if $X_1\overset{\mathcal{L}}{=}{X}|t=1\sim\mathcal{N}({\mu}_1,{\sigma}_1^2)$ and $X_0\overset{\mathcal{L}}{=}{X}|t=0\sim\mathcal{N}({\mu}_0,{\Sigma}_0)$,
$$
\mu_1+\sigma_1\cdot \frac{X_0-\mu_0}{\sigma_0} \overset{\mathcal{L}}{=} X_1
$$
\begin{definition}
Consider two models, $\widehat{m}_0(x)$ and $\widehat{m}_1(x)$, that estimate respectively $\mathbb{E}[Y|X=x,T=0]$ and $\mathbb{E}[Y|X=x,T=0]$.
A Gaussian estimator of the {\em mutatis mutandis} CATE is
$$
\text{SCATE}_{\mathcal{N}}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}}_{\mathcal{N}}(x)\big) - \widehat{m}_0\big(x\big)
$$
where $\widehat{\mathcal{T}}_{\mathcal{N}}(x)= \overline{x}_1+s_1s_0^{-1} (x-\overline{x}_0)$,
$\overline{x}_0$ and $\overline{x}_0$ being respectively the averages of $x$ in the two sub-populations, and $s_0$ and $s_1$ the sample standard deviations.
\end{definition}
An algorithm to compute that estimator is Algorithm~\ref{alg:1:gauss:1} (in higher dimension).
\subsection{Application to non-natural deliveries}\label{sub:ex}
In Figure~\ref{fig:opt-transport-quantiles-2x3}, we can visualize $x\mapsto\widehat{\mathcal{T}}(x)$ when $x$ is either the weight of the newborn infant on the left, or the weight gain of the mother on the right, when $t$ indicates whether the mother is Black or not. The $x$-axis is the value of $x$ in the control group ($t=0$) and the $y$-axis is the value of $x$ in the treated group ($t=1$). On the left, observe that $x\mapsto\widehat{\mathcal{T}}(x)$ is almost linear, parallel to the first diagonal, below. This corresponds to the fact that the distribution of $X$ conditional on $T=0$ and $T=1$ are similar, up to a translation (same standard deviation but different mean if a Gaussian transport $\widehat{\mathcal{T}}_{\mathcal{N}}$ was considered). On the right, $x\mapsto\widehat{\mathcal{T}}(x)$ is single-crossing the first diagonal. This corresponds to the fact that the distribution of $X$ conditional on $T=0$ and $T=1$ have different variances.
\begin{figure}[!ht]
\centering
\centering
\includegraphics[width=.49\textwidth]{figures/joint-transport-black-weight-1}
\includegraphics[width=.49\textwidth]{figures/joint-transport-black-weight-gain-1}
\caption{Optimal transport (quantile based) when $X$ is the weight of the newborn infant on the left, and the weight gain of the mother on the right, when $T$ indicates whether the mother is Black or not in the middle. The solid line depicts the transported values while the dashed line is the identity line. See Figure~\ref{fig:opt-transport-quantiles-2x3:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{fig:opt-transport-quantiles-2x3}
\end{figure}
In Figure~\ref{fig:densite-1x3-conditional-k}, we can visualize the conditional distributions of $x$, when $y=0$ and $y=1$ (natural and non-natural deliveries, respectively), when $x$ is the weight of the baby (on the left) and the weight gain of the mother (on the right). In Figure~\ref{fig:densite-2x3-conditional-t}, we can visualize the conditional distributions of $x$, when $y=0$ and $y=1$, when $t=0$ and $t=1$, where $t$ denotes whether the mother is Afro-American or not.
\begin{figure}[!ht]
\centering
\includegraphics[width=.49\textwidth]{figures/density-weight-Y-natural-1.png}
\includegraphics[width=.49\textwidth]{figures/density-weight-gain-Y-natural-1.png}
\caption{Distribution of the weight of the newborn infant (in grams) on the left and distribution of the weight gain of the mother on the right, conditional on the delivery mode, $Y=\boldsymbol{1}(\text{non-natural delivery})$.}
\label{fig:densite-1x3-conditional-k}
\end{figure}
\begin{figure}[!ht]
\centering
\centering
\includegraphics[width=.49\textwidth]{figures/density-weight-black-1.png}
\includegraphics[width=.49\textwidth]{figures/density-weight-gain-black-1.png}
\caption{Distribution of the weight of the newborn infant (in grams) on the left and distribution of the weight gain of the mother on the right, whether the mother is Black or not. See Figure~\ref{fig:densite-2x3-conditional-t:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{fig:densite-2x3-conditional-t}
\end{figure}
In Figure~\ref{fig:opt-transport-quantiles-2x3}, we can visualize the empirical optimal coupling function $\widehat{\mathcal{T}}:x_0\mapsto x_1 = \widehat{F}_1^{-1}\circ \widehat{F}_0(x_0)$, where $ \widehat{F}_0$ and $ \widehat{F}_1$ denote the empirical distribution functions of $x$ conditional on $t=0$ and $t=1$, respectively.
In Figures~\ref{fig:CATE-compare-quantiles-2x3-weight} and~\ref{fig:CATE-compare-quantiles-2x3-weight-gain}, we can visualize $\widehat{m}_0(x)$ and $\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big)$ on the left, when $t$ indicates whether the mother is Afro-American or not, when $x$ the weight of the newborn infant in Figure~\ref{fig:CATE-compare-quantiles-2x3-weight} and when $x$ is the weight gain of the mother in Figure~\ref{fig:CATE-compare-quantiles-2x3-weight-gain}. On the right, we can visualize $x\mapsto \text{CATE}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)$ as a function of $x$. The light curve in the back is $\widehat{m}_1\big(x\big) - \widehat{m}_0\big(x\big)$. Numerical values are given in Table~\ref{tab:num:CATE:w} when $x$ is the weight of the newborn, and Table~\ref{tab:num:CATE:g} when $x$ is the weight gain of the pregnant mother. For instance, a baby weighting $2500$g (7.46\% quantile in the non-Black population) corresponds to a baby weighting $2301$g if the mother had been Black. The probability to have a non-natural delivery has then an additional $5.5\%$ compared with non-Black mother, using the GAM-SCATE approach. Using a Gaussian transport, the counterfactual in the Black population is a $2297$g baby, and the probability to have a non-natural delivery has then an additional $5.60\%$ compared with a non-Black mother, using the GAM-$\text{SCATE}_{\mathcal{N}}$ approach. Similarly, a baby weighting $3500$g (64.13\% quantile in the non-Black population) corresponds to a baby weighting $3375$g had the mother been Black (about $3.6\%$ less). The probability to have a non-natural delivery has then an additional $4.42\%$ compared with non-Black mother, using the GAM-SCATE approach. Using a Gaussian transport, estimates are similar.
\begin{table}[!ht]
\centering
\begin{tabular}{c|cccccc}\hline\hline
\multicolumn{7}{c}{$t$: mother is Afro-American}\\
\hline
$x$ (newborn's weight) & 2000 & 2500 & 3000 & 3500 & 4000 & 4500 \\\hline
$u$ & 2.67\% & 7.46\% & 25.13\% & 64.13\% & 91.73\% & 98.87\% \\
$\text{CATE}_0(x)$ (GAM) & 0.58\% & 1.99\% & 3.24\% & 4.86\% & 7.78\% & 11.70\% \\
$\widehat{\mathcal{T}}(x)$ &1595 & 2301 & 2863 & 3375 & 3890 & 4415\\
$\text{SCATE}(x)$ (GAM) & 7.94\% & 5.53\% & 4.53\% & 4.42\% & 5.16\% & 7.46\% \\
$\widehat{\mathcal{T}}_{\mathcal{N}}(x)$ &1758 &2297 &2836& 3376& 3915& 4455\\
$\text{SCATE}_{\mathcal{N}}(x)$ (GAM) & 5.15\%& 5.60\%& 4.82\%& 4.42\%& 5.71\%& 9.41\% \\
$\text{SCATE}_{\mathcal{N}}(x)$ (kernel) & 6.98\%& 6.64\%& 4.34\%& 4.53\%& 5.34\%& 7.13\% \\\hline\hline
\end{tabular}
\caption{Estimation of the conditional average treatment (CATE), on the probability to have a non-natural birth ($y$), as a function of the weight of the baby ($x$, in g.), when the mother is Afro-American. Several weights $x$ are considered, from $2$ to $4.5$kg. $u$ is the probability associated with $x$, in the baseline population ($t=0$). $\text{CATE}_0$ is simply the difference $\widehat{m}_1(x)-\widehat{m}_0(x)$, where both $\widehat{m}_0$ and $\widehat{m}_1$ are GAMs. $\widehat{\mathcal{T}}(x)$ is the quantile based transport function ($\widehat{\mathcal{T}}(x)= \widehat{F}_1^{-1}\circ \widehat{F}_0(x)$), while $\widehat{\mathcal{T}}_{\mathcal{N}}(x)$ is the Gaussian one. Thus, $\text{SCATE}(x)$ is the {\em mutatis mutandis CATE} $
\text{SCATE}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)
$, while $
\text{SCATE}_{\mathcal{N}}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}_{\mathcal{N}}}(x)\big) - \widehat{m}_0\big(x\big)
$, where both $\widehat{m}_0$ and $\widehat{m}_1$ are GAMs. Finally, the last estimate is obtained when $\widehat{m}_0$ and $\widehat{m}_1$ are simple local averages, using kernels. See Table~\ref{tab:num:CATE:w:appendix} in Appendix~\ref{app:3} for similar table when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{tab:num:CATE:w}
\end{table}
\begin{table}[!ht]
\centering
\begin{tabular}{c|cccccc}\hline\hline
\multicolumn{7}{c}{$t$: mother is Afro-American}\\
\hline
$x$ (weight gain of the mother) & 5& 15& 25& 35& 45& 55 \\\hline\hline
$u$ & 4.57\% & 14.34\% & 37.15\% & 66.81\% & 86.34\% & 94.94 \\
$\text{CATE}_0(x)$ (GAM) & 3.79\% & 4.79\% & 5.06\% & 4.82\% & 4.18\% & 3.26\% \\
$\widehat{\mathcal{T}}(x)$ & 1 & 12 & 24 & 35 & 47 & 58 \\
$\text{CATE}(x)$ (GAM) & 5.25\% & 5.25\% & 5.04\% & 4.82\% & 4.69\% & 4.19\% \\
$\widehat{\mathcal{T}}_{\mathcal{N}}(x)$ &1& 12& 23& 34& 46& 57\\
$\text{CATE}_{\mathcal{N}}(x)$ (GAM) & 5.22\% & 5.21\% & 5.03\% & 4.74\% & 4.33\% & 3.78\% \\
$\text{CATE}_{\mathcal{N}}(x)$ (kernel) & 3.78\% & 5.49\% & 5.31\% & 4.49\% & 4.12\% & 3.61\% \\\hline
\end{tabular}
\caption{Estimation of the conditional average treatment (CATE), on the probability to have a non-natural birth ($y$), as a function of the weight gain of the mother ($x$, in lbs), when the mother is Afro-American. Several weight gains $x$ are considered, from $5$ to $55$lbs. $u$ is the probability associated with $x$, in the baseline population ($t=0$). $\text{CATE}_0$ is simply the difference $\widehat{m}_1(x)-\widehat{m}_0(x)$, where both $\widehat{m}_0$ and $\widehat{m}_1$ are GAMs. $\widehat{\mathcal{T}}(x)$ is the quantile based transport function ($\widehat{\mathcal{T}}(x)= \widehat{F}_1^{-1}\circ \widehat{F}_0(x)$), while $\widehat{\mathcal{T}}_{\mathcal{N}}(x)$ is the Gaussian one. Thus, $\text{SCATE}(x)$ is the {\em mutatis mutandis} CATE $
\text{SCATE}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)
$, while $
\text{SCATE}_{\mathcal{N}}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}_{\mathcal{N}}}(x)\big) - \widehat{m}_0\big(x\big)
$, where both $\widehat{m}_0$ and $\widehat{m}_1$ are GAMs. Finally, the last estimate is obtained when $\widehat{m}_0$ and $\widehat{m}_1$ are simple local averages, using kernels. See Table~\ref{tab:num:CATE:g:appendix} in Appendix~\ref{app:3} for similar table when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{tab:num:CATE:g}
\end{table}
In Figure~\ref{fig:CATE-compare-gaussian-2x2-weight-gain}, as previously, $\widehat{m}_0(x)$ and $\widehat{m}_1\big(\widehat{\mathcal{T}}_{\mathcal{N}}(x)\big)$ can be visualized on the left, when $t$ indicates whether the mother is Afro-American or not, and when $x$ is the gain weight of the mother. On the right, we can visualize $x\mapsto \text{CATE}(x)=\widehat{m}_1\big(\widehat{\mathcal{T}}(x)\big) - \widehat{m}_0\big(x\big)$ as a function of $x$. Numerical values are given in Table~\ref{tab:num:CATE:w} when $x$ is the weight of the newborn, and Table~\ref{tab:num:CATE:g} when $x$ is the weight gain of the pregnant mother.
In Figure~\ref{fig:CATE-compare-kernel-2x3-weight}, some local kernels are used to estimate $\widehat{m}_0(x)$ and $\widehat{m}_1\big(\widehat{\mathcal{T}}_{\mathcal{N}}(x)\big)$ on the left. Numerical values are given in Table~\ref{tab:num:CATE:w} when $x$ is the weight of the newborn, and Table~\ref{tab:num:CATE:g} when $x$ is the weight gain of the pregnant mother.
\begin{figure}[!ht]
\centering
\includegraphics[width=.49\textwidth]{figures/gam-univariate-black-weight-compare-transport-1}
\includegraphics[width=.49\textwidth]{figures/gam-univariate-diff-CATE-black-weight-compare-transport-1}
\caption{On the left, evolution of $x\mapsto\mathbb{E}[Y|X_{T\leftarrow t}=x,T=t]$, estimated using a logistic GAM model, when $Y=\boldsymbol{1}(\text{non-natural delivery})$, and $X$ is the weight of the newborn infant, respectively when $T$ indicates whether the mother is Black or not. On the right, evolution of $x\mapsto\text{SCATE}[Y|X=x]$. See Figure~\ref{fig:CATE-compare-quantiles-2x3-weight:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{fig:CATE-compare-quantiles-2x3-weight}
\end{figure}
\begin{figure}[!ht]
\centering
\includegraphics[width=.49\textwidth]{figures/gam-univariate-black-weight-gain-compare-transport-1}
\includegraphics[width=.49\textwidth]{figures/gam-univariate-diff-CATE-black-weight-gain-compare-transport-1}
\caption{On the left, evolution of $x\mapsto\mathbb{E}[Y|X_{T\leftarrow t}=x,T=t]$, estimated using a logistic GAM model, when $Y=\boldsymbol{1}(\text{non-natural delivery})$, and $X$ is the weight gain of the mother, respectively when $T$ indicates whether the mother is Black or not. On the right, evolution of $x\mapsto\text{SCATE}[Y|X=x]$. See Figure~\ref{fig:CATE-compare-quantiles-2x3-weight-gain:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{fig:CATE-compare-quantiles-2x3-weight-gain}
\end{figure}
\begin{figure}[!ht]
\centering
\includegraphics[width=.49\textwidth]{figures/gam-univariate-black-weight-gain-compare-gaussian-transport-1}
\includegraphics[width=.49\textwidth]{figures/gam-univariate-CATE-black-weight-gain-compare-gaussian-transport-1}
\caption{On the left, evolution of $x\mapsto\mathbb{E}[Y|X_{T\leftarrow t}=x,T=t]$, estimated using a logistic GAM model, when $Y=\boldsymbol{1}(\text{non-natural delivery})$, and $X$ is the weight gain of the mother, respectively when $T$ indicates whether the mother is Black or not. On the right, evolution of $x\mapsto\text{SCATE}_{\mathcal{N}}[Y|X=x]$. See Figure~\ref{fig:CATE-compare-gaussian-2x2-weight-gain:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not.}
\label{fig:CATE-compare-gaussian-2x2-weight-gain}
\end{figure}
\begin{figure}[!ht]
\centering
\includegraphics[width=.49\textwidth]{figures/kernel-univariate-black-weight-compare-gaussian-transport-1}
\includegraphics[width=.49\textwidth]{figures/kernel-univariate-CATE-black-weight-compare-gaussian-transport-1.png}
\caption{On the left, evolution of $x\mapsto\mathbb{E}[Y|X_{T\leftarrow t}=x,T=t]$, estimated using a kernel based local average, when $Y=\boldsymbol{1}(\text{non-natural delivery})$, and $X$ is the weight of the newborn infant, respectively when $T$ indicates whether the mother is a smoker or not (on top), when the mother is Black or not in the middle, and the sex of the infant below. On the right, evolution of $x\mapsto\text{SCATE}_{\mathcal{N}}[Y|X=x]$ with an without transport, based on a Gaussian transport. See Figure~\ref{fig:CATE-compare-kernel-2x3-weight:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not, or indicates the sex of the newborn.}
\label{fig:CATE-compare-kernel-2x3-weight}
\end{figure}
\section{Optimal transport based matching}\label{sec:opt:transp:multivarie}
In this section, we will extend what was derived in the previous section. Heuristically, optimal matching of margins components of $\boldsymbol{x}$ will probably not work, and the mapping should be multivariate.
We will therefore use optimal transport techniques to get a proper counterfactual of $\boldsymbol{x}$, not in the control group, but in the treated group. In Section~\ref{sect:multi:ot}, we will define properly the optimal transport problem (in any dimension). Then, in Section~\ref{sect:multi:matching}, we will describe how to optimally associate each observation $\boldsymbol{x}_i$ in the control group (when $t=0$) with a single counterfactual observation $\boldsymbol{x}_j$ in the treated group (when $t=1$), when two groups have the same size. This can be related to the Gaussian SEM discussed in Section~\ref{sec:gaussian:toy}. In Section~\ref{sect:multi:coupling}, we will present the extension when the two groups have different sizes. In Section~\ref{sec:gaussian}, we will give an explicit formulation for $\mathcal{T}$ when we the distribution of $\boldsymbol{X}$ conditional on $T$ is assumed to be Gaussian. The application to non-natural deliveries will finally be discussed in Section~\ref{sub:ex:multi}.
\subsection{Optimal transport}\label{sect:multi:ot}
In the mathematical formulation of \cite{monge1781memoire}'s problem, we want to push a distribution from $\mathbb{P}_0$ to $\mathbb{P}_1$ (distributions on $\mathbb{R}^k$, not necessarily in $\mathbb{R}$ as considered in the previous section).
Given $\mathcal{T}:\mathbb{R}^k\rightarrow\mathbb{R}^k$, define the ``{\em push-forward}'' measure,
$$
\mathbb{P}_1(A)= \mathcal{T}_{\#}\mathbb{P}_0(A)= \mathbb{P}_0\big(\mathcal{T}^{-1}(A)\big),~\forall A\subset \mathbb{R}^k.
$$
For instance, when $k=1$, if $F$ is the cumulative distribution of a univariate random variable $X$ under $\mathbb{P}$ (i.e., $F(x)=\mathbb{P}[X\leq x]$) then $\mathbb{Q}=F_{\#}\mathbb{P}$ is the uniform distribution on the unit interval $[0,1]$ as well as $\mathbb{Q}'=\overline F_{\#}\mathbb{P}$, where $\overline F$ is the survival function associated with $F$ (i.e., $\overline F(x)=\mathbb{P}[X> x]$). Similarly, or conversely, if $Q$ is the quantile function associated with $F$ --$Q(u)=F^{-1}(u)$ for any $u\in(0,1)$-- then if $\mathbb{P}$ is the uniform distribution on the unit interval $[0,1]$, $\mathbb{Q}=Q_{\#}\mathbb{P}$ satisfies $\mathbb{Q}[X\leq x]=Q^{-1}(x)=F(x)$, and similarly for $\overline Q$ where $\overline Q(u)=F^{-1}(1-u)$.
Observe that if $\mathbb{P}_0$ and $\mathbb{P}_1$ have densities $f_0$ and $f_1$, respectively, and if $T$ is continuously differentiable, $\mathbb{P}_1= \mathcal{T}_{\#}\mathbb{P}_0$ is any only if $f_0(\boldsymbol{x})=f_1(\mathcal{T}(\boldsymbol{x}))\cdot |\det \nabla \mathcal{T}(\boldsymbol{x})|$, for all $\boldsymbol{x}$. This non-linear function is a special case of the so-called Monge-Ampère partial differential equations.
An optimal transport $\mathcal{T}^\star$ (in Brenier's sense, from \cite{brenier1991polar}, see \cite{villani2009optimal} or \cite{galichon2016optimal}) from $\mathbb{P}_0$ towards $\mathbb{P}_1$ will be solution of
$$
\mathcal{T}^\star\in \underset{\mathcal{T}:\mathcal{T}_{\#}\mathbb{P}_0=\mathbb{P}_1}{\text{arginf}}\left\lbrace\int_{\mathbb{R}^k} \|\boldsymbol{x}-\mathcal{T}(\boldsymbol{x})\|^2d\mathbb{P}_0(\boldsymbol{x})\right\rbrace,
$$
for a quadratic cost, or more generally,
$$
\mathcal{T}^\star\in \underset{\mathcal T:\mathcal T_{\#}\mathbb{P}_0=\mathbb{P}_1}{\text{arginf}}\left\lbrace\int_{\mathbb{R}^k} \gamma(\boldsymbol{x},\mathcal{T}(\boldsymbol{x}))d\mathbb{P}_0(\boldsymbol{x})\right\rbrace,
$$
for some cost function $\gamma:\mathbb{R}^k\times\mathbb{R}^k\to\mathbb{R}_+$.
If $k=1$, and if the cost function $\gamma$ can be written $\gamma(x,y)=h(|x-y|)$ for some strictly convex and positive function $h$, then $T^\star$ is an increasing function, and more precisely, if $F_0(x)=\mathbb{P}_0[X\leq x]$ and $F_1(x)=\mathbb{P}_1[X\leq x]$, with $F_0$ absolutely continuous, then {$\mathcal{T}^\star (x) = F_1^{-1}\circ F_0(x)$} satisfies $\mathcal{T}^\star_{\#}\mathbb{P}_0=\mathbb{P}_1$ (since $F_1(x)=F_0(T^{\star-1} (x))$ and $\mathcal{T}^\star$ is optimal. the quadratic cost function (when $h(x)=x^2$) is a particular case. The case where $h$ is concave was discussed in \cite{mccann1999exact}.
In higher dimension, for a quadratic cost, one can prove (see \cite{villani2003optimal,villani2009optimal} or \cite{galichon2016optimal}) that $\mathcal{T}^\star=\nabla \psi$ where $\psi$ is a convex function.
\subsection{Empirical version of optimal matching}\label{sect:multi:matching}
This transport can be seen as a matching between individuals in the two groups, both of size $n$, $(\boldsymbol{x}_i,t_i=0)$ and $(\boldsymbol{x}_j,t_j=1)$, instead of two distributions $\mathbb{P}_0$ and $\mathbb{P}_1$. If $C$ is a $n\times n$ matrix that quantifies the distance between individuals in the two groups, $C_{i,j}=d(\boldsymbol{x}_i,\boldsymbol{x}_j)$, the optimal matching is solution of
$$
\min_{P\in\mathcal{P}} \langle P,C\rangle =
\min_{P\in\mathcal{P}} \sum_{i=1}^n\sum_{j=1}^n P_{i,j}C_{i,j},
$$
where $\mathcal{P}$ is the set of permutation matrices, and $\langle \cdot,\cdot\rangle$ is the Frobenius dot-product. This is also called Kantorovich's optimal transport problem, from \cite{kantorovich1942translocation}. Interestingly, there are some algorithms that can be used to find that optimal coupling, or matching, which can, in turn, be used to get a counterfactual for all individuals in each group.
\subsection{Empirical version of optimal coupling}\label{sect:multi:coupling}
If the two groups $(\boldsymbol{x}_i,t_i=0)$ and $(\boldsymbol{x}_j,t_j=1)$ have different sizes, namely $n_0$ and $n_1$, respectively, it is possible to define some matching using weights. In the coupling case, described previously, $P$ was some $n\times n$ permutation matrix. But here, as in Section~\ref{sub:sec:univ:optimal:matching} some $n_0\times n_1$ matrices will be involved, and similar problems are considered
\begin{equation}\label{prog:match:2}
\min_{P\in U(\boldsymbol{a}_0,\boldsymbol{a}_1)} \langle P,C\rangle =
\min_{P\in U(\boldsymbol{a}_0,\boldsymbol{a}_1)} \sum_{i=1}^{n_0} \sum_{j=1}^{n_1} P_{i,j}C_{i,j}.
\end{equation}
And again, assuming Gaussian distributions for $\boldsymbol{X}$ conditional on $T$ will provide an explicit simple transport formula that can be used to get an estimation of the {\em mutatis mutandis} CATE. This algorithm is given by Algorithm~\ref{alg:1:empirical}, used to compute the Average Treatment Effect.
\begin{algorithm}[!ht]
\caption{Counterfactual matching, with optimal matching}\label{alg:ATE:1}
\begin{algorithmic}
\State$\mathcal{D} \gets \{(y_i,\boldsymbol{x}_i,t_i)\}$
\Function{Counterfactual2}{$\mathcal{D}$}
\State $\mathcal{D}_0 \gets $ subset of $\mathcal{D}$ when $t=0$ (size $n_0$), with indices $i$
\State $\mathcal{D}_1 \gets $ subset of $\mathcal{D}$ when $t=1$ (size $n_1$), with indices $j$
\State $C \gets $ matrix $n_0\times n_1$, $C_{i,j}=d(\boldsymbol{x}_i,\boldsymbol{x}_j)$ between points in $\mathcal{D}_0$ and $\mathcal{D}_1$
\State $P^* \gets$ solution of Problem (\ref{prog:match})
\State \Return matrix $P^*$ ~~ ($n_0\times n_1$)
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[!ht]
\caption{Estimate SCATE (optimal matching based)}\label{alg:1:empirical}
\begin{algorithmic}
\State dataset $\mathcal{D}\gets\{(y_i,\boldsymbol{x}_i,t_i)\}$,
\Function{scate2}{$\mathcal{D},k,\boldsymbol{x}$}
\State $P \gets $ {\sc Counterfactual2}$(\mathcal{D})$
\State $V_{\boldsymbol{x}}^k\gets$ list of $k$ nearest neighbors of $\boldsymbol{x}_i$'s in $\mathcal{D}_0$ close to $\boldsymbol{x}$
\State\Return $\displaystyle{\frac{1}{k}\sum_{i\in V_{\boldsymbol{x}}^k} y_i^1-{P}_i^{\top}\boldsymbol{y}^0}$
\EndFunction
\end{algorithmic}
\end{algorithm}
\subsection{Counterfactuals for Gaussian covariates}\label{sec:gaussian}
In the general case, there are no simple construction and interpretation of the optimal mapping $\mathcal{T}^*$, as the one we had in the univariate case, based on quantiles. If it is possible, following \cite{hallin2021distribution}, to define multivariate quantiles (and therefore to extend concepts defined in Section \ref{sub:sec:univ:cate}). But here, we will simply consider the multivariate Gaussian case.
Suppose that $\boldsymbol{X}|t=1\sim\mathcal{N}(\boldsymbol{\mu}_1,\boldsymbol{\Sigma}_1)$ and $\boldsymbol{X}|t=0\sim\mathcal{N}(\boldsymbol{\mu}_0,\boldsymbol{\Sigma}_0)$. There is an explicit expression for the optimal transport, which is simply an affine map (see \cite{villani2003optimal} for more details). In the univariate case, $x_1 = \mathcal{T}^*_{\mathcal{N}}(x_0) = \mu_1+ \displaystyle{\frac{\sigma_1}{\sigma_0}(x_0-\mu_0)}$, while in the multivariate case, an analogous expression can be derived:
$$
\boldsymbol{x}_1 = \mathcal{T}^*_{\mathcal{N}}(\boldsymbol{x}_0)=\boldsymbol{\mu}_1 + \boldsymbol{A}(\boldsymbol{x}_0-\boldsymbol{\mu}_0),
$$
where $\boldsymbol{A}$ is a symmetric positive matrix that satisfies $\boldsymbol{A}\boldsymbol{\Sigma}_0\boldsymbol{A}=\boldsymbol{\Sigma}_1$, which has a unique solution given by $\boldsymbol{A}=\boldsymbol{\Sigma}_0^{-1/2}\big(\boldsymbol{\Sigma}_0^{1/2}\boldsymbol{\Sigma}_1\boldsymbol{\Sigma}_0^{1/2}\big)^{1/2}\boldsymbol{\Sigma}_0^{-1/2}$, where $\boldsymbol{M}^{1/2}$ is the square root of the square (symmetric) positive matrix $\boldsymbol{M}$ based on the Schur decomposition ($\boldsymbol{M}^{1/2}$ is a positive symmetric matrix), as described in \cite{higham2008functions}.
\begin{definition}
Consider two models, $\widehat{m}_0(\boldsymbol{x})$ and $\widehat{m}_1(\boldsymbol{x})$, that estimate, respectively, $\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=0]$ and $\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=1]$.
A Gaussian estimator of the {\em mutatis mutandis} CATE is
$$
\text{SCATE}_{\mathcal{N}}(\boldsymbol{x})=\widehat{m}_1\big(\widehat{\mathcal{T}}_{\mathcal{N}}(\boldsymbol{x})\big) - \widehat{m}_0\big(\boldsymbol{x}\big),
$$
where $\widehat{\mathcal{T}}_{\mathcal{N}}(\boldsymbol{x})= \overline{\boldsymbol{x}}_1 +\widehat{\boldsymbol{A}}(\boldsymbol{x}-\overline{\boldsymbol{x}}_0)$, with
$\overline{\boldsymbol{x}}_0$ and $\overline{\boldsymbol{x}}_1$ being, respectively, the averages of $x$ in the two sub-populations, and $\widehat{\boldsymbol{A}}=\widehat{\boldsymbol{\Sigma}}_0^{-1/2}\big(\widehat{\boldsymbol{\Sigma}}_0^{1/2}\widehat{\boldsymbol{\Sigma}}_1\widehat{\boldsymbol{\Sigma}}_0^{1/2}\big)^{1/2}\widehat{\boldsymbol{\Sigma}}_0^{-1/2}$ where $\widehat{\boldsymbol{\Sigma}}_0$ and $\widehat{\boldsymbol{\Sigma}}_1$ denote the sample variance.
\end{definition}
The algorithm to compute that estimate is Algorithm~\ref{alg:1:gauss:1}.
\begin{algorithm}[!ht]
\caption{Optimal Gaussian Transport}\label{alg:gauss:-}
\begin{algorithmic}
\State dataset $\mathcal{D}\gets\{(y_i,\boldsymbol{x}_i,t_i)\}$,
\Function{Tgaussian}{$\mathcal{D}$}
\State $\mathcal{D}_0 \gets $ subset of $\mathcal{D}$ when $t=0$
\State $\mathcal{D}_1 \gets $ subset of $\mathcal{D}$ when $t=1$
\State estimate moments of $\boldsymbol{x}$'s $\hat{\boldsymbol{\mu}}_0$, $\hat{\boldsymbol{\mu}}_1$, $\hat{ \boldsymbol {\Sigma}}_0$ and $\hat{\boldsymbol{\Sigma}}_1$, in $\mathcal{D}_0$ and $\mathcal{D}_1$
\State $\hat{\boldsymbol{A}} \gets \hat{\boldsymbol{\Sigma}}_0^{-1/2}\big(\hat{\boldsymbol{\Sigma}}_0^{1/2}\hat{\boldsymbol{\Sigma}}_1\hat{\boldsymbol{\Sigma}}_0^{1/2}\big)^{1/2}\hat{\boldsymbol{\Sigma}}_0^{-1/2}$
\Function{T}{$\boldsymbol{x}$}
\State\Return $\hat{\boldsymbol{\mu}}_1 + \hat{\boldsymbol{A}}(\boldsymbol{x}-\hat{\boldsymbol{\mu}}_0)$,
\EndFunction
\State \Return function {\sc T}
\EndFunction
\end{algorithmic}
\end{algorithm}
\begin{algorithm}[!ht]
\caption{Parametric Estimate $\text{SCATE}_{\mathcal{N}}$ (Gaussian transport)}\label{alg:1:gauss:1}
\begin{algorithmic}
\State dataset $\mathcal{D}\gets\{(y_i,\boldsymbol{x}_i,t_i)\}$,
\State $\mathcal{D}_0 \gets $ subset of $\mathcal{D}$ when $t=0$
\State $\mathcal{D}_1 \gets $ subset of $\mathcal{D}$ when $t=1$
\State $\widehat{m}_0 \gets $ model to predict $y$ based on $\boldsymbol{x}$, trained on $\mathcal{D}_0$
\State $\widehat{m}_1 \gets $ model to predict $y$ based on $\boldsymbol{x}$, trained on $\mathcal{D}_1$
\State $T\gets $ {\sc Tgaussian}($\mathcal{D}$)
\Function{Scate3}{$\widehat{m}_0,\widehat{m}_1,T,\boldsymbol{x}$}
\State\Return $\displaystyle{\widehat{m}_1(T(\boldsymbol{x})) - \widehat{m}_0({\boldsymbol{x}})}$
\EndFunction
\end{algorithmic}
\end{algorithm}
We should probably stress here that, in the very general case, we should transport {\em only} endogenous variables $\boldsymbol{x}^m$ (or mediators) and not exogenous ones $\boldsymbol{x}^c$ (or coliders), as discussed in Section \ref{subsec:1} (and Figure \ref{Fig:DAG:intervention}).
\subsection{Application to non-natural deliveries}\label{sub:ex:multi}
\begin{figure}[!ht]
\centering
\includegraphics[width=.49\textwidth]{figures/distrib-joint-weight-gain-ellipse-black-1}
\includegraphics[width=.49\textwidth]{figures/transport-black-arrows-v2-0-1-1}
\caption{Joint distributions of $\boldsymbol{X}$ (weight of the newborn infant and weight gain of the mother), conditional on the treatment $T$, when $T$ indicates whether the mother is Black or not on the left. On the right, vector field associated with optimal Gaussian transport, in dimension two (weight of the newborn infant and weight gain of the mother). Some numerical values are given in Table~\ref{tab:transport:appendix}. On the right, the origin of the arrow is $\boldsymbol{x}$ in the control group (non-Black pregnant mother) and the arrowhead is $\widehat{\mathcal{T}}_{\mathcal{N}}(\boldsymbol{x}$ in the treated group (Black pregnant mother). See Figure~\ref{fig:joint-ellipse-arrow-black-biv-1x2:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the pregnant mother is a smoker or not.}
\label{fig:joint-arrow-grid-biv-1x2}
\end{figure}
The left-hand side of Figure~\ref{fig:joint-arrow-grid-biv-1x2} displays a scatter plot of $\boldsymbol{x}=(x_1,x_2)$, where $x_1$ represents the weight of the newborn infant while $x_2$ shows the weight gain of the mother, conditional on the treatment $T$, when $T$ indicates whether the mother is Black or not (see Figure~\ref{fig:joint-ellipse-arrow-black-biv-1x2:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not). The ellipses are the iso-density curves under a Gaussian assumption, such that $95\%$ of the points lie in the ellipse. The right-hand side of Figure~\ref{fig:joint-arrow-grid-biv-1x2}, shows $\mathcal{T}_{\mathcal{N}}$ on the same frame, $\boldsymbol{x}=(x_1,x_2)$, with, respectively, the weight of the newborn infant on the $x$-axis and weight gain of the mother on the $y$-axis. The origin of an arrow corresponds to $\boldsymbol{x}=(x_1,x_2)$, while its end corresponds to $\widehat{\mathcal{T}}_{\mathcal{N}}(\boldsymbol{x})$. Note that all the arrows point to the left. Regardless of the weight of the mother, had the latter been Black, the weight of the newborn would have been lower. Nevertheless, the length of the arrows varies according to the weight of the newborn. For infants whose weight is relatively high, for example for $x_1$ close to 4500g, had the mother been Black, the newborn's weight would have been almost the same. For newborns whose weight $x_1$ is much lower than 4500g, had the mother been Black, the baby's weight would have been much smaller. Some numerical values are given in Table~\ref{tab:transport:appendix} in Appendix~\ref{app:3}. For instance, if we consider a non-Black mother with a baby weighting 2584g, who gained 10.8lbs, the counterfactual is a Black mother with a baby weighting 2392g, who gained 7.6lbs.
The top panel of Figures~\ref{fig:CATE-biv-2x3-GAM-1-pred-B} shows the level curves of $\widehat{m}_0:\boldsymbol{x}\mapsto\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=0]$ (left-hand side) and $\widehat{m}_1:\boldsymbol{x}\mapsto\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=1]$ (right-hand side), when the treatment $T$ indicates whether a mother is Black or not, estimated with logistic GAM models (cubic splines). The middle-level panel displays curves of the {\em ceteris paribus} $\boldsymbol{x}\mapsto\text{CATE}[\boldsymbol{x}]$ without any transport (on the left), and $\boldsymbol{x}\mapsto\text{SCATE}[\boldsymbol{x}]$ {\em mutatis mutandis} (on the right). Lastly, the bottom panel shows a positive/negative distinction for the conditional average treatment effect (positive is red, negative is blue). Figure~\ref{fig:CATE-biv-2x3-GAM-2-pred-B} provides different results using more knots in the cubic splines.
We can observe that all mothers are more likely to get a non-natural delivery would they be Black, whatever the weight of the baby (the {\em ceteris paribus} approach would suggest that mothers with small babies, below 2.5kg would be less likely to get a non-natural delivery if they were Black).
\begin{figure}[!ht]
\centering
\includegraphics[width=.48\textwidth]{figures/gam-2-biv-black-image-0-1}
\includegraphics[width=.48\textwidth]{figures/gam-2-biv-black-image-1-1}
\centering
\includegraphics[width=.48\textwidth]{figures/gam-2-biv-black-image-diff-1-0-palette-1}
\includegraphics[width=.48\textwidth]{figures/gam-2-biv-black-image-diff-1-0-transport-palette-1}
\centering
\includegraphics[width=.48\textwidth]{figures/gam-2-biv-black-image-diff-1-0-2-col-1}
\includegraphics[width=.48\textwidth]{figures/gam-2-biv-black-image-diff-1-0-transport-2-col-1}
\caption{On top, contours of $\boldsymbol{x}\mapsto\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=0]$ and $\boldsymbol{x}\mapsto\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=1]$ when $T$ indicates whether a mother is Afro-American or not, estimated with logistic GAM models (cubic splines).
In the middle, contours of the {\em ceteris paribus} $\boldsymbol{x}\mapsto\text{CATE}[\boldsymbol{x}]$ without any transport on the left, and $\boldsymbol{x}\mapsto\text{SCATE}[\boldsymbol{x}]$ {\em mutatis mutandis} on the right. At the bottom, positive/negative distinction for the conditional average treatment effect. See Figure~\ref{fig:CATE-biv-2x3-GAM-2-pred-C:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not.}
\label{fig:CATE-biv-2x3-GAM-1-pred-B}
\end{figure}
\begin{figure}[!ht]
\centering
\includegraphics[width=.48\textwidth]{figures/gam-1-biv-black-image-0-1}
\includegraphics[width=.48\textwidth]{figures/gam-1-biv-black-image-1-1}
\centering
\includegraphics[width=.48\textwidth]{figures/gam-1-biv-black-image-diff-1-0-palette-1}
\includegraphics[width=.48\textwidth]{figures/gam-1-biv-black-image-diff-1-0-transport-palette-1}
\centering
\includegraphics[width=.48\textwidth]{figures/gam-1-biv-black-image-diff-1-0-2-col-1}
\includegraphics[width=.48\textwidth]{figures/gam-1-biv-black-image-diff-1-0-transport-2-col-1}
\caption{On top, contours of $\boldsymbol{x}\mapsto\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=0]$ and $\boldsymbol{x}\mapsto\mathbb{E}[Y|\boldsymbol{X}=\boldsymbol{x},T=1]$ when $T$ indicates whether a mother is Afro-American or not, estimated with logistic GAM models (cubic splines, {\bf with more knots and degrees of freedom}).
In the middle, contours of the {\em ceteris paribus} $\boldsymbol{x}\mapsto\text{CATE}[\boldsymbol{x}]$ without any transport on the left, and $\boldsymbol{x}\mapsto\text{SCATE}[\boldsymbol{x}]$ {\em mutatis mutandis} on the right. At the bottom, positive/negative distinction for the conditional average treatment effect. See Figure~\ref{fig:CATE-biv-2x3-GAM-2-pred-C:appendix} in Appendix~\ref{app:3} for similar graphs when $T$ indicates whether the mother is a smoker or not.}
\label{fig:CATE-biv-2x3-GAM-2-pred-B}
\end{figure}
As briefly discussed earlier, optimal matching or coupling in high dimension can be computationally intensive, since matrices $n_0\times n_1$ are involved. For instance, when $t$ is the sex of the newborn, the cost matrix is a matrix with 3,000 billion entries. Thus, it is quite natural to consider sub-sampling techniques (since our dataset is quite large). For convenience, we can use optimal matching on groups of size $n$, and study the robustness of estimated, as a function of $n$. Some simulations are mentioned in the Appendix.
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 4,843 |
Slovo bahník může znamenat:
v biologii
bahník – české označení pro několik druhů ryb z podtřídy dvojdyšní
bahník (Protopterus) – rod afrických bahníků s několika druhy
bahník americký (Lepidosiren paradoxa) – americký bahník, jediný zástupce rodu Lepidosiren
bahník australský (Neoceratodus forsteri) – australský bahník, jediný zástupce rodu Neoceratodus
bahník (brouk) – rod brouků z čeledi potápníkovití
jiné významy
Bahník (příjmení) – české příjmení
bahník (zařízení) – zařízení sloužící k zachytávání splavenin z tramvajové trati
bahník (skřítek) – řídce užívané označení pro drobné pohádkové nebo fantasy bytosti spojené s vodou | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 8,595 |
\section{Introduction\protect\\}
The production of ultracold samples of heteronuclear molecules has been of widespread interest.
A variety of new applications for ultracold heteronuclear molecules have been proposed and discussed \cite{Krems2009,DeMilleReview2009}.
With this strong motivation, many groups across the world have continued efforts toward the production of ultracold samples of heteronuclear molecules. Following early success on KRb \cite{Ni10102008}, the production of the absolute ground state of RbCs \cite{InnsbruckRbCs2014,PhysRevLett.113.255301}, NaK \cite{PhysRevLett.114.205302}, and NaRb \cite{PhysRevLett.116.205303} have been reported. These results have been accomplished by magneto-association of molecules and stimulated Raman adiabatic passage (STIRAP). This type of approach is currently most successful in terms of minimum achievable temperature and highest phase space density. However, production of ground state molecules via short-range photoassociation (PA) has the potential to be an interesting alternative: an experimental setup for PA is relatively simple, and PA can be used to produce rovibronic ground state molecules continuously. In particular, for RbCs molecules, co-trapping Cs atoms with RbCs molecules is predicted to eject unwanted molecules in the excited states, potentially leaving a pure sample of RbCs molecules in the rovibronic ground state \cite{ERHudson2008}.
Over the past several years, a series of studies showed that short-range PA is generally possible for bi-alkali molecules: short-range PA has been demonstrated for
NaCs \cite{PhysRevA.84.061401}, Rb$_2$ \cite{PhysRevA.87.053404,Bellos2011}, LiCs \cite{Weidemuller2008}, RbCs \cite{Bruzewicz14,PhysRevA.91.021401,Shimasaki2016}, and LiRb \cite{PhysRevA.94.062504, PhysRevA.94.062510}. Furthermore, production of rovibronic ground-state has been verified for LiCs \cite{Weidemuller2008}, RbCs \cite{PhysRevA.91.021401,Shimasaki2016}, and LiRb \cite{PhysRevA.94.062510}.
In previous work, we investigated multiple electronic states of RbCs for potentially efficient PA pathways to produce rovibronic ground state molecules. Initially, we studied the $2^3\Pi_{0^+}$ states, where we demonstrated production of the rovibronic ground state via two-photon cascade decay \cite{Bruzewicz14,PhysRevA.91.021401}. In a more recent report \cite{Shimasaki2016}, we investigated PA to the $2^1\Pi_{1}$, $2^3\Pi_{1}$ and $3^3\Sigma^+_{1}$ states. With these PA states, we achieved rovibronic ground state molecule production rate up to 2$\times10^3$ molecules/s.
In this study, we report short-range PA to the $b^3\Pi_1-c^3\Sigma^+_1-B^1\Pi_1$ states of $^{85}$Rb$^{133}$Cs.
This work is motivated by a recent spectroscopic study on the $B^1\Pi_1$ state of RbCs \cite{Birzniece2013}.
In \cite{Birzniece2013}, Birzniece {\it et al.} performed Fourier-transform spectroscopy (FTS) on high-$J$ states with a resolution of $\sim$900 MHz.
The empirical potential obtained thereby shows a clearly visible kink, which indicates strong mixing between the $B^1\Pi_1$ state and the $b^3\Pi_1$ and $c^3\Sigma^+_1$ states.
Such singlet-triplet mixing is essential for efficient production of rovibronic ground state molecules via PA: short-range PA occurs through triplet-triplet transitions around the inner classical turning point of the triplet $a^3\Sigma^+$ potential, and the PA state decays into the singlet $X^1\Sigma^+$ potential through a singlet-singlet transition.
We investigated deeply-bound rovibrational levels of the strongly perturbed $b^3\Pi_{0^{\pm},1}-c^3\Sigma^+_{0^{-},1}-B^1\Pi_1$ states with moderately high resolution ($\sim$10 MHz), utilizing ultracold PA spectroscopy. In particular, we obtained direct information on the low rotational levels and even resolved hyperfine structures in these states.
By using states with mixed singlet-triplet character, molecule production with rates up to $\sim$1$\times 10^4$ molecules/s into the rovibronic ground state has been achieved.
\section{The $b^3\Pi-c^3\Sigma^+-B^1\Pi$ complex of R\lowercase{b}C\lowercase{s}\protect\\}
We studied the energy region of $E=13950-$14200 cm$^{-1}$ above the minimum of the $X^1\Sigma^+$ potential in RbCs.
The relevant potentials (shown in Fig. \ref{fig:PotentialZoom}) are those that are typically labelled as the $b^3\Pi_\Omega$, $c^3\Sigma^+_\Omega$, and $B^1\Pi_1$ states in Hund's case (a) notation. (High vibrational states of the $A^1\Sigma^+$ potential exist in this region as well, but do not lead to observable PA signals in this study, so we omit them here.)
The $b^3\Pi_\Omega$ and $c^3\Sigma^+_\Omega$ states split into multiple fine-structure components, namely $\Omega = 0^+,0^-,1$, and $2$ for $b^3\Pi$, and $\Omega = 0^-$ and $1$ for $c^3\Sigma^+$, respectively. Although we observed some of the $\Omega=0^{\pm}$ components as described below, our primary interest is $\Omega=1$ components: here we expect strong singlet-triplet mixing through coupling between the $b^3\Pi_{1}$, $c^3\Pi_{1}$, and $B^1\Pi_1$ states. Theoretical {\it ab initio} potential curves are available for these states \cite{Allouche2002}.
\begin{figure
\includegraphics[scale=0.5]{Potential_bcBzoomLongerRangeVer9.eps
\caption{\label{fig:PotentialZoom}(Color online) The energy region studied in this experiment. Potential curves are theoretical predictions from \cite{Allouche2002}. The empirical potential reported in \cite{Birzniece2013} is shown with dots connected by a dotted line. Hund's case (c) notation is indicated by square brackets.}
\end{figure}
In the past, our group performed resonance-enhanced multiphoton ionization (REMPI) spectroscopy of the $b^3\Pi_{0^\pm,1}-c^3\Sigma^+_{0^-,1}-B^1\Pi_1$ states, starting with molecules populating the $a^3\Sigma^+$ state \cite{Bergeman2004}. In that experiment, weakly-bound molecules were produced in the $a^3\Sigma^+$ potential by long-range PA, and these molecules were resonantly excited into the $b^3\Pi-c^3\Sigma^+-B^1\Pi$ complex and ionized for detection.
However, the long-range PA populated multiple vibrational levels in the $a^3\Sigma^+$ potential that are separated by a few wavenumbers or less. Further, multiple unresolved hyperfine states of the $a^3\Sigma^+$ states contributed to the signal simultaneously. Also, the dye laser used for the $1^{\rm st}$ step of REMPI had a broad linewidth ($\sim$5 GHz), resulting in limited energy resolution. This significantly complicated the analysis of the REMPI spectra and hence information on the $b^3\Pi-c^3\Sigma^+-B^1\Pi$ energy levels.
Other experimental studies for this energy region of RbCs are provided by FTS \cite{Birzniece2013, KruzinsRbCs, PhysRevA.96.022510}. In particular, in \cite{Birzniece2013}, Birzniece {\it et al.} reported a kink in the empirical potential of the $B^1\Pi_1$ state. This indicates strong mixing between the $B^1\Pi_1$ and $c^3\Sigma^+_1$ states through spin-orbit coupling. As shown in Fig. \ref{fig:PotentialZoom}, this kink was observed to occur at an internuclear distance, $R$, almost identical to that at the minimum of the $X^1\Sigma^+$ potential. Hence, vibrational levels near this kink could potentially decay efficiently to the vibrational ground state of the $X^1\Sigma^+$ potential. However, the experiment was performed with a thermal vapor, and information on the potential was obtained through extrapolation from high-$J$ data. According to Ref. \cite{Birzniece2013}, the reported frequencies for low-$J$ levels of the $B^1\Pi_1$ state have $\sim$2 cm$^{-1}$ uncertainties. More recent reports \cite{KruzinsRbCs, PhysRevA.96.022510} provided additional relevant information on the $A^1\Sigma^+-b^3\Pi$ potential curves up to $E\sim$14050 cm$^{-1}$, which has a slight overlap with the energy region investigated in this study. Some of the term values for $\Omega=0^+$ states provided in \cite{PhysRevA.96.022510} coincide with PA levels observed in our experiment.
As shown in Fig. \ref{fig:PotentialZoom}, the $b-c-B$ potentials are strongly mixed through spin-orbit interaction in the energy region above $\sim$13300 cm$^{-1}$. Therefore, we use Hund's case (c) notation [$n(\Omega)$] for PA states found in this study. States originating from the $b^3\Pi_1-c^3\Sigma^+_1-B^1\Pi_1$ complex will be labelled as 2(1), 3(1), and 4(1) states. The relevant $\Omega=0^{\pm}$ states in this energy region, which mostly originate from the $b^3\Pi_{0^-}$, $b^3\Pi_{0^+}$, and $c^3\Sigma^+_{0^-}$ states, are labelled as 2(0$^{-}$), 3(0$^{+}$), and 3(0$^{-}$) states.
\section{Experimental Scheme\protect\\}
Our experimental scheme is similar to that used in our previous studies (Fig. \ref{fig:scheme}). We start with $^{85}$Rb and $^{133}$Cs atoms co-trapped in a dual-species forced dark spontaneous-force optical trap (dark SPOT) \cite{KetterleDarkSPOT,CornellForcedDarkSPOT}.
Typically, we trap $\sim$5$\times 10^6$ Rb atoms and $\sim$1$\times 10^7$ Cs atoms with density $n_{{\rm Rb}} \sim$6$\times 10^{10}$ cm$^{-3}$ and $n_{{\rm Cs}} \sim$8$\times 10^{10}$ cm$^{-3}$, respectively, in their lowest hyperfine states.
The spatial overlap of the two atom clouds is ensured by absorption imaging from two orthogonal directions.
The translational temperature of the atoms is estimated to be $T \sim$100 $\mu$K based on time-of-flight imaging.
We irradiate the atom clouds with a PA laser, which associates pairs of colliding Rb and Cs atoms into an excited RbCs molecular state. For this PA transition, we use up to 600 mW from a diode laser, which was set up in a fiber-based master-slave system \cite{FiberInjection}.
The master laser, which consists of a 980 nm diode laser in an external cavity diode laser (ECDL) configuration, can be tuned from 10120 cm$^{-1}$ to 10350 cm$^{-1}$. The frequency of the master laser was controlled by software, using information from the transmission signal through a scanning Fabry-P\'erot cavity \cite{OrozcoCavityFeedback}.
Typically, we were able to scan the PA laser over several GHz without an interruption such as from mode-hops.
The frequency jitter was as high as $\sim$10 MHz, which limited the frequency resolution of our PA scans. The slave laser seamlessly follows the master laser frequency by injection-locking. The PA beam is focused onto the atom clouds with a beam waist ($1/e^2$ power radius) of $\sim$150 $\mu$m.
\begin{figure
\includegraphics[scale=0.55]{Potential_bcB_REMPIDepletionVer5.eps
\caption{\label{fig:scheme} (Color online) Experimental scheme for the molecule production and detection. Potential curves are from \cite{Allouche2002}. }
\end{figure}
The excited RbCs molecules produced by PA spontaneously decay into the electronic ground state.
We detect molecules state-selectively by using two-color (1+1$^\prime$) REMPI as shown in Fig. \ref{fig:scheme}.
For most of this study, the wavelength of the first REMPI photon, generated from a nanosecond pulse dye laser, is tuned to 15342.0 cm$^{-1}$, which selectively excites the vibronic ground state $X(v=0)$ to the $2^1\Pi_1 (v=12)$ state \cite{Gustavsson1988}.
The energy of the resonant pulse is kept below $\sim$0.1 mJ (with the diameter of the beam $\sim$5 mm) to reduce power broadening and off-resonance excitation.
Molecules in the intermediate excited state are ionized by an intense ($\sim$2 mJ/pulse, $\sim$5 mm in diameter) 532 nm pulse arriving 10 ns later.
The molecular ions are detected by a Channeltron detector after acceleration by a static electric field ($\sim$100 V/cm).
The RbCs$^+$ signals are separated from other atomic and molecular signals based on travel time to the detector.
The repetition rate of the ionization and detection is 100 Hz.
Since the linewidth of the dye laser ($\sim$5 GHz) is larger than the spacing of rotational levels,
we use the depletion spectroscopy method to resolve rotational levels \cite{WangPRA2007, Weidemuller2008}.
The details of our depletion spectroscopy setup have been described in \cite{PhysRevA.91.021401}.
\section{\label{sec:level1}PA spectroscopy\protect\\}
Due to the lack of complete knowledge about the potential curves in the energy region of interest, it is difficult to accurately predict energy level positions \textit{a priori}.
Thus, we mostly relied on previous experiments to infer initial estimates for energy locations of the PA states.
We first performed PA spectroscopy around the $v=8$ vibrational level of the $B^1\Pi$ state reported in \cite{Birzniece2013} to occur at $E \approx 14100$ cm$^{-1}$, where we expect a strong singlet-triplet mixing around the potential kink due to strong spin-orbit coupling.
However, we did not observe PA lines in this energy region, possibly due to the large uncertainty in extrapolating data from the high-$J$ to low-$J$ rotational levels.
Then we performed PA spectroscopy around the positions of the $b^3\Pi-c^3\Sigma^+-B^1\Pi$ states reported in \cite{Bergeman2004}.
Although the frequencies reported in \cite{Bergeman2004} had some deviations from our observed line positions, we observed several PA states with hyperfine structure clearly resolved (Figs. \ref{fig:PAspectra_b}, \ref{fig:PAspectra_c}, \ref{fig:PAspectra_capB}, and \ref{fig:PAspectra_Omega0}).
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.5]{PAscans_b_seriesVer5upward.eps}
\caption{(Color online) PA spectra of the 2(1) states in a vibrational series with spacing $\Delta E_v \simeq$ 23 cm$^{-1}$. The arrows indicate peaks used in depletion spectroscopy. The labels indicate the absolute frequency of the PA laser and the corresponding level energy at the zero of the $x$-axis for each trace. The spectra with PA at 10197.43 cm$^{-1}$, 10267.73 cm$^{-1}$, and 10291.16 cm$^{-1}$ are expanded by a factor of 5.\label{fig:PAspectra_b}}
\end{figure}
\end{center}
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.5]{PAscans_c_seriesVer5upward.eps}
\caption{(Color online) PA spectra of the 3(1) states in a vibrational series with spacing $\Delta E_v \simeq$ 27 cm$^{-1}$. The spectrum with PA at 10144.53 cm$^{-1}$ is expanded by a factor of 5. The arrows indicate peaks used in depletion spectroscopy. The labels indicate the absolute frequency of the PA laser and the corresponding level energy (relative to the minimum of the $X^1\Sigma^+$ state potential) at the zero of the $x$-axis for each trace. \label{fig:PAspectra_c}
}
\end{figure}
\end{center}
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.55]{PAscans_capitalB_seriesVer4upward.eps}
\caption{(Color online) PA spectra of the 4(1) states ($v=$ 5, 6, and 10). The arrow indicate peaks used in depletion spectroscopy. The labels indicate the absolute frequency of the PA laser and the corresponding level energy (relative to the minimum of the $X^1\Sigma^+$ state potential) at the zero of the $x$-axis for each trace.\label{fig:PAspectra_capB}}
\end{figure}
\end{center}
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.45]{PAscans_Omega0Ver6.eps}
\caption{(Color online) PA spectra of $\Omega=0^+$ and $0^-$ states. $\Omega=0^+$ and $0^-$ spectra are indicated by blue and red traces, respectively. Clear rotational progressions ($J=0,1,2$ and 3) have been observed. For the PA spectrum at 10141 cm$^{-1}$, two sets of progressions\textemdash one from an $\Omega=0^+$ state, and one from an $\Omega=0^-$ state\textemdash are observed. The labels indicate the absolute frequency of the PA laser and the corresponding level energy (relative to the minimum of the $X^1\Sigma^+$ state potential) at the zero of the $x$-axis for each trace. The spectra with PA at 10237.34 and 10274.65 cm$^{-1}$ are expanded by a factor of 5.\label{fig:PAspectra_Omega0}}
\end{figure}
\end{center}
The projection quantum number $\Omega$ of the total electronic angular momentum $\bm{J_e} = \bm{L} + \bm{S}$ onto the internuclear axis can have the values of $0^+, 0^-,$ and 1 for the unbound scattering state of a pair of Rb and Cs atoms.
According to the $ \Delta\Omega=0, \pm1$ selection rule for electric dipole transitions, we can access PA states with $\Omega=0^+, 0^-$, 1, and 2.
For the newly observed PA lines, we identified the $\Omega$ quantum number of each PA state based on the rotational progression and hyperfine structures.
Specifically, the existence of hyperfine structures and lack of a $J=0$ line characterizes $\Omega=1$ states.
$\Omega=0^{\pm}$ states show a clear rotational progression without hyperfine structure, but $\Omega=0^+$ and $\Omega=0^-$ states can be distinguished by their different, characteristic patterns of relative rotational line strengths in the PA spectra \cite{Bruzewicz14,ColinThesis,Gabbanini2013}.
The details of the spectra will be analyzed in a subsequent publication \cite{RotationalStrength}.
Our current assignments of $\Omega$ to each PA state are given in Table \ref{tab:PAlines}, which includes updates to some of the previous assignments in \cite{Bergeman2004}.
Our new assignments of $\Omega$ are more reliable because we resolve hyperfine structure in this study.
By grouping PA states based on $\Omega$, we initially identified three sets of $\Omega=1$ series, one series of $\Omega=0^-$ states, and one set of $\Omega=0^+$ states. These series were somewhat incomplete, but allowed us to infer the location of other missing vibrational levels based on the observed progressions (Fig. \ref{fig:EnergyDiagram}).
The PA laser was then scanned in a range around the inferred locations. With this approach, we eventually observed 30 vibronic states in this energy region in total.
All the PA lines observed in this study are listed in Table \ref{tab:PAlines}.
However, we did not find all of the vibrational levels in these progressions due to the difficulty in scanning the narrowband ECDL over a broad frequency range.
It should be noted that we detect only $X(v=0)$ molecules with our REMPI detection. This means that we could miss some of the PA states if they solely decay into other vibronic levels.
\begin{center}
\begin{figure*}[htbp]
\centering
\includegraphics[scale=0.6]{bcB_EnergyDiagramVerXfinal2.eps}
\caption{(Color online) Summary of the observed PA lines. The states are grouped based on $\Omega$ and vibrational progressions. Energy levels and spacings between vibrational levels are given in cm$^{-1}$. Energy levels are reported as the peak at PA Laser Offset frequency equal to zero in Figs. 3-6. The energy ranges corresponding to PA scans are shown by painted rectangles. The actual frequencies for these scans are summarized in supplementary information \cite{SuppInfo}. The expected range of the kink in the empirical potential ($E\approx$14100 cm$^{-1}$) \cite{Birzniece2013} is indicated by a shaded rectangle. Several vibrational levels were reported in \cite{Bergeman2004} but were not observed in this study. One such vibrational level, which matches the vibrational progression observed here, is indicated by a dotted line. The other missing levels do not appear to match the vibrational progressions in any sensible way. These missing levels are 3-4 cm$^{-1}$ away from the levels we did observe. This is a typical value for the vibrational splittings in the populated $a^3\Sigma^+$ states that were the lower states for the transitions analyzed in \cite{Bergeman2004}. Hence, we suspect that these levels may have been assigned in error, due to a miscounting of the vibrational quantum number of the $a^3\Sigma^+$ states, in \cite{Bergeman2004}. \label{fig:EnergyDiagram} }
\end{figure*}
\end{center}
\begin{table*}[htbp]
\caption{\label{tab:PAlines} Summary of the observed PA lines.}
\begin{ruledtabular}
\begin{tabular}{cccccc}
Observed & Energy from & Normalized & & Tentative State & Rotational \\
PA Frequency\footnote{Frequency of one of the central peaks in the lowest $J$ manifold, that is, $J=1$ for $\Omega=1$ states and $J=0$ for $\Omega=0$ states. These peaks are taken as the frequency origin in Fig. \ref{fig:PAspectra_b}, Fig. \ref{fig:PAspectra_c}, Fig. \ref{fig:PAspectra_capB} and Fig. \ref{fig:PAspectra_Omega0}. The absolute accuracy is $\sim$0.01 cm$^{-1}$.} & $X$ minimum\footnote{The energy of each state with respect to the minimum of the $X$ potential is obtained by adding 3836.14 cm$^{-1}$ to the PA frequency. This conversion is based on the measured value (3836.37 cm$^{-1}$) of the hyperfine-averaged dissociation energy of RbCs \cite{TiemannPhysRevA.83.052519} and the known atomic hyperfine splittings: we photoassociate a pair of $^{85}$Rb and $^{133}$Cs atoms both in their lowest hyperfine state.
} & Signal Strength\footnote{ $X(v=0)$ molecule signal size per unit power, normalized to that for PA at 11817.15 cm$^{-1}$ [PA to the $2 ^3 \Pi_{0^+}(v=10,J=0)$ state] \cite{Bruzewicz14}, with the condition of $I \ll I_{\rm sat}$. } & $\Omega$ & Assignments & Constant\footnote{Due to the hyperfine structure, we have not extracted rotational constants from $\Omega$ =1 states.} \\
(cm$^{-1}$) & (cm$^{-1}$) & & & in Hund's Case (c) & (MHz) \\
\hline
10126.52 & 13962.66 & 4(1) & 1 & $2(1)$ & \\ \hline
10129.30 & 13965.44 & 0.6(2) & 1 & $4(1)(v=5)$ & \\ \hline
10141.18 & 13977.32 & 3(1) & $0^-$ & $2(0^-)$ & 323 \\ \hline
10141.19 & 13977.33 & 0.3(1) & $0^+$ & $3(0^+)$ & 298 \\ \hline
10144.53 & 13980.67 & 0.1(1) & 1 & $3(1)$ & \\ \hline
10151.24 & 13987.38 & 6(2) & 1 & $2(1)$ & \\ \hline
10165.76 & 14001.91 & 0.2(1) & $0^-$ & $2(0^-)$ & 320 \\ \hline
10166.16 & 14002.30 & 0.2(1) & 1 & $4(1)(v=6)$ & \\ \hline
10167.01 & 14003.15 & 0.4(2) & $0^+$ & $3(0^+)$ & 295 \\ \hline
10172.35 & 14008.49 & 0.7(2) & 1 & $3(1)$ & \\ \hline
10174.87 & 14011.02 & 1.0(3) & 1 & $2(1)$ & \\ \hline
10190.01 & 14026.16 & 0.4(2) & $0^-$ & $2(0^-)$ & 317 \\ \hline
10197.43 & 14033.57 & 0.2(1) & 1 & $2(1)$ & \\ \hline
10199.57 & 14035.71 & 2(1) & 1 & $3(1)$ & \\ \hline
10213.94 & 14050.08 & 1.1(3) & $0^-$ & $2(0^-)$ & 314 \\ \hline
10220.81 & 14056.96 & 2(1) & 1 & $2(1)$ & \\ \hline
10226.70 & 14062.84 & 2(1) & 1 & $3(1)$ & \\ \hline
10237.34 & 14073.48 & 0.1(1) & $0^-$ & $2(0^-)$ & 288 \\ \hline
10244.22 & 14080.36 & 2(1) & 1 & $2(1)$ & \\ \hline
10253.19 & 14089.33 & 0.2(1) & 1 & $3(1)$ & \\ \hline
10267.73 & 14103.87 & 0.1(1) & 1 & $2(1)$ & \\ \hline
10274.65 & 14110.79 & 0.1(1) & $0^+$ & $3(0^+)$ & 304 \\ \hline
10280.87 & 14117.01 & 0.5(2) & 1 & $3(1)$ & \\ \hline
10291.16 & 14127.30 & 0.4(2) & 1 & $2(1)$ & \\ \hline
10302.66 & 14138.80 & 0.9(3) & 1 & $3(1)$ & \\ \hline
10306.65 & 14142.79 & 3(1) & $0^-$ & $2(0^-)$ & 304 \\ \hline
10311.91 & 14148.05 & 3(1) & 1 & $4(1)(v=10)$ & \\ \hline
10315.26 & 14151.40 & 1.0(3) & 1 & $2(1)$ & \\ \hline
10329.93 & 14166.07 & 0.5(2) & 1 & $3(1)$ & \\ \hline
10335.19 & 14171.33 & 1.4(3) & 1 & $2(1)$ & \\
\end{tabular
\end{ruledtabular}
\end{table*}
Next, we attempted to assign electronic states to these series of vibrational levels. The $\Omega=0^+$ series should belong to the only $\Omega=0^+$ state, that is, the $3(0^+)$ state. Out of the three $\Omega=1$ series, the one with only three levels (shown in Fig. \ref{fig:PAspectra_capB}) is assigned to the $4(1)$ state. This is based on a comparison between our observation and the potential curve data from \cite{Birzniece2013}; we used LEVEL \cite{LeRoyLevel} with the emprical potential reported in \cite{Birzniece2013} to obtain energy levels (included in Fig. \ref{fig:EnergyDiagram}).
The three observed levels match the levels calculated with errors up to 5 cm$^{-1}$, with a consistent vibrational spacing of $\sim$35 cm$^{-1}$. In contrast, the other two $\Omega=1$ series have much smaller vibrational spacings ($\sim$23 cm$^{-1}$ and $\sim$27 cm$^{-1}$). We similarly performed LEVEL calculations with {\it ab initio} potentials from \cite{Allouche2002} for the $2(1)$ and $3(1)$ potentials, yielding predicted vibrational spacings of $\sim$24 cm$^{-1}$ and $\sim$26 cm$^{-1}$, respectively, in the energy region studied. By comparing the vibrational spacings, the observed series with $\sim$27 cm$^{-1}$ spacing is assigned to the $3(1)$ state, and the series with $\sim$23 cm$^{-1}$ spacing should be the $2(1)$ state. Finally, by comapring the vibrational spacing of the $\Omega=0^-$ series ($\sim$24 cm$^{-1}$) with these spacings in $\Omega=1$ series, we conclude that the $\Omega=0^-$ series observed here is likely to be the $2(0^-)$ state. However, we are still missing many vibrational levels and the other $\Omega=0^-$ series (tentatively the $3(0^-)$ state); we would need more complete data sets to confirm our state assignments.
As already mentioned, we observed clear hyperfine structures for $\Omega=1$ PA states. Interestingly, different electronic and vibrational states of the $2(1)$, $3(1)$, and $4(1)$ states show similar hyperfine structures.
This indicates that there are likely quite strong mixings between the electronic states, notably different from the situation observed in the $2^3\Pi_{1}-3^3\Sigma^+_{1}-2^1\Pi_1$ states \cite{Shimasaki2016}.
Analysis of these hyperfine structures will be reported elsewhere.
It is also worth mentioning that a direct decay from an $\Omega=0^-$ PA state into the $X^1\Sigma^+$ state is prohibited by the $\Omega=0^+ \not \leftrightarrow \Omega=0^-$ selection rule.
Nevertheless, we observed production of molecules in the $X$ state through $\Omega=0^-$ PA states, possibly due to a two-photon cascade decay.
Lastly, we did not observe any $\Omega=2$ states through PA spectroscopy in this study, although PA transitions to $\Omega=2$ states are allowed and we expect the $b^3\Pi_2$ states to exist in this energy region.
Given that we observe $\Omega = 0^-$ PA states that somehow lead to population in the rovibronic ground state, there is no clear reason why $\Omega = 2$ states should not also be observable.
Because there is no information available on $\Omega=2$ states from the previous experiment \cite{Bergeman2004}, these states may simply have fallen into gaps in our PA laser scanning range \cite{SuppInfo}.
\section{REMPI spectroscopy\protect\\}
In order to study vibrational branching in the decay of the photoassociated molecules, REMPI spectroscopy can be utilized \cite{Bruzewicz14}.
We performed similar REMPI spectroscopy for selected strong PA lines we found.
For this type of experiment, the PA laser is fixed to a particular transition and the wavelength of the 1st step of REMPI is scanned instead. A REMPI spectrum with PA laser fixed to 10151.25 cm$^{-1}$ state is shown in Fig. \ref{fig:REMPI} as an example. By following the procedure described in \cite{Bruzewicz14}, we extracted vibrational branching ratios to low $v$ levels of the $X$ state for each PA state. Results of this analysis are summarized in Table \ref{tab:REMPI}.
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.45]{REMPIanalysisSingleFigure2_ionsignal10151_vx0-3ver7.eps}
\caption{(Color online) (a) REMPI spectrum with PA laser tuned to 10151.25 cm$^{-1}$ (the peak indicated by an arrow in Fig. \ref{fig:PAspectra_b}). (b) Simulated spectra obtained based on known REMPI transition frequencies with vibrational populations as free parameters. The red and black curves correspond to signals from molecules in the $X(v=0)$ and $X(1 \leq v \leq 3)$ states, respectively, which account for the majority of the observed peaks in the range. \label{fig:REMPI}}
\end{figure}
\end{center}
\begin{table*}[htpb]
\caption{\label{tab:REMPI} Summary of vibrational branching ratios in the decay of selected PA states. }
\begin{ruledtabular}
\begin{tabular}{cccccccc}
PA & Energy from & Tentative & \multicolumn{5}{c}{Vibrational Branching } \\
Frequency & $X$ minimum & State & \multicolumn{5}{c}{ Normalized to $v_X=0$ population} \\
(cm$^{-1}$) & (cm$^{-1}$) & Assignment & $v_X=1$ & $v_X=2$ & $v_X=3$ & $v_X=4$ & $v_X=5$ \\
\hline
10126.52 & 13962.66 & $2(1)$ & 0.2(1) & 0.2(1) & 0.2(1) & 0.1(1) & 0.2(1) \\
10151.24 & 13987.38 & $2(1)$ & 0.6(1) & 0.1(1) & 0.2(1) & 0.1(1) & 0.1(1) \\
10166.16 & 14002.30 & $4(1)$ & 0.1(2) & 0.4(2) & 0.3(2) & 0.2(2) & 0.1(2) \\
10199.57 & 14035.71 & $3(1)$ & 1.2(1) & 0.2(1) & 0.1(1) & 0.1(1) & 0.0(1) \\
10220.81 & 14056.96 & $2(1)$ & 1.5(2) & 0.7(1) & 0.1(1) & 0.1(1) & 0.1(1) \\
10226.70 & 14062.84 & $3(1)$ & 1.1(2) & 0.6(2) & 0.3(2) & 0.2(2) & 0.2(2) \\
10244.22 & 14080.36 & $2(1)$ & 1.5(3) & 0.7(2) & 0.1(2) & 0.1(2) & 0.1(2) \\
10306.65 & 14142.79 & $2(0^-)$ & 0.5(1) & 0.2(1) & 0.2(1) & 0.1(1) & 0.2(1) \\
10311.91 & 14148.05 & $4(1)$ & 0.3(2) & 0.5(2) & 1.6(2) & 0.3(2) & 1.0(2) \\
\end{tabular
\end{ruledtabular}
\end{table*}
\section{Depletion spectroscopy\protect\\}
The relatively broad spectrum of our REMPI laser ($\sim$5 GHz) prevents us from resolving the rotational distribution of population in the vibrational ground state $X(v=0)$ simply with REMPI. As in our previous studies \cite{PhysRevA.91.021401,Shimasaki2016}, we utilize depletion spectroscopy \cite{WangPRA2007} to detect molecules in the rovibrational ground state.
The details of our depletion spectroscopy scheme can be found in \cite{PhysRevA.91.021401}. A typcial depletion spectrum, with PA laser tuned to 10151.25 cm$^{-1}$ ($J_{{\rm PA}}=1$, indicated by an arrow in Fig. \ref{fig:PAspectra_b}) is shown in Fig. \ref{fig:Depletion}. For this PA line, we observed three peaks corresponding to $J_X=0,1$ and 2 of $X(v=0)$, with a rotational branching $\sim$25\% to $J_X=0$.
The sum of the dips is nearly 95\%, confirming the effectiveness of our molecule detection and the accuracy of the rotational branching ratios we extract. We also performed similar measurements for other strong PA lines. For $\Omega=1$ states, the central PA peaks show lower branching ratios to $J_X=0$, typically $\sim$15\%. In general, we observed $J_X$=$J_{{\rm PA}}$, $J_{{\rm PA}}\pm1$ and $J_{{\rm PA}}\pm2$. Branching to $J_{{\rm PA}}\pm2$ is usually very small, at most 10\%. We believe that $J_X=J_{{\rm PA}} \pm 2$ originates from two-photon cascade decays or mixing of different rotational levels due to hyperfine interaction. However, it is difficult to separate these two contributions with our setup.
Rotational branching ratios obtained from depletion spectroscopy data are summarized in Table \ref{tab:strongPAlines}.
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.3]{PA10151252DepletionJX012Ver2.eps}
\caption{(Color online) Depletion spectrum with PA laser tuned to 10151.25 cm$^{-1}$ (the peak indicated by an arrow in Fig. \ref{fig:PAspectra_b}). Population distributions in each rotational state in the $X(v=0)$ were obtained by curve-fitting a sum of Lorentzians (blue line) to the experimental data.\label{fig:Depletion}}
\end{figure}
\end{center}
\section{Saturation behavior of new PA lines\protect\\}
For efficient molecule production, both efficient PA and a high branching ratio to the rovibronic ground state are required. The molecule (ion) signal size (listed in Table \ref{tab:PAlines}) only gives information on the product of these two factors. Saturation intensity measurements allow us to investigate the efficiency of the PA step itself in the entire molecule production process.
We expect the PA rate $K$ to depend on the PA laser intensity $I$ as follows \cite{PhysRevA.60.414}:
\begin{equation}\label{eq:Sat}
K(I) = 4K_{{\rm Max}} \frac{I/I_{{\rm Sat}}}{(1+I/I_{{\rm Sat}})^2},
\end{equation}
where $K_{{\rm Max}}$ is the maximum PA rate at the saturation intensity $I_{{\rm Sat}}$.
To observe saturation behavior, we performed PA with varying laser power controlled by an acoustic optic modulator (AOM). This allows us to alternate the PA intensity between the desired value and a fixed reference PA intensity, $I_{{\rm Ref}}$. By normalizing the molecule ion signal with PA intensity $I$ by another signal taken with PA intensity $I_{{\rm Ref}}$, we can minimize the effect of experimental signal size drifts. In this configuration, Eq. \ref{eq:Sat} is modified to describe the normalized PA rate $\hat{K}$, given by
\begin{equation}
\hat{K}(I) = K(I)/K(I_{{\rm Ref}}) = \frac{I}{I_{{\rm Ref}}}\frac{(1+I_{{\rm Sat}}/I_{{\rm Ref}})^2}{(I/I_{{\rm Ref}}+I_{{\rm Sat}}/I_{{\rm Ref}})^2}. \label{eq:Sat2}
\end{equation}
Throughout these measurements, the absolute ion signal size was maintained at a low level to ensure that the ion detector response was linear even at the maximum PA power. The absolute ion signal size was reduced, if needed, by detuning the 1$^{\rm st}$-step REMPI laser a fixed distance from resonance while the PA laser power was changed.
An example PA saturation data set, taken with the PA laser tuned to 10151.25 cm$^{-1}$, is shown in Fig. \ref{fig:Saturation}. Saturation intensities, extracted by fitting the theoretical curve to experimental data, are summarized in Table \ref{tab:strongPAlines}. PA lines with higher saturation intensities are considered more promising in the long term, because it should be possible to provide a higher PA power by utilizing an enhancement cavity, and this would ultimately allow a higher molecule production rate. The maximum molecule production rates, projected based on the extracted saturation intensities, are given in Table \ref{tab:strongPAlines}.
\begin{center}
\begin{figure}[htbp]
\centering
\includegraphics[scale=0.63]{SaturationAnalysis_PA10151REMPIdetune651795ver4Line.eps}
\caption{(Color online) Saturation behavior of PA with PA laser tuned to 10151.25 cm$^{-1}$ (the peak indicated by an arrow in Fig. \ref{fig:PAspectra_b}). $I_{{\rm Ref}} = 0.36$ kW/cm$^2$, used for reference shots, is indicated by the arrow. The dotted line is a line fit to the first four data points. The curve is a fit to Eq. \ref{eq:Sat2}, with $I_{{\rm Sat}}$ as the only free parameter. $I_{{\rm Sat}} = 3 \pm 1$ kW/cm$^2$ was extracted from this data. \label{fig:Saturation}}
\end{figure}
\end{center}
\begin{table*}[htpb]
\caption{\label{tab:strongPAlines} Summary of measurements on selected PA lines.}
\begin{ruledtabular}
\begin{tabular}{ccccccc}
& & & Normalized & & & Projected maximum \\
Observed & Energy from & Tentative & vibronic & Saturation & Rotational & rovibronic ground-\\
PA Frequency & $X$ minimum & state & ground state & intensity \footnote{The uncertainties mostly originate from our limited knowledge of the PA beam size.} & branching & state production \\
(cm$^{-1}$) & (cm$^{-1}$) & assignment & production rate & (kW/cm$^2$) & to $J_X=0$ \footnote{Obtained from depletion spectroscopy. For $\Omega=1$ states, the PA laser was tuned to the peaks indicated by arrows in Figs. \ref{fig:PAspectra_b}, \ref{fig:PAspectra_c}, and \ref{fig:PAspectra_capB}. For $\Omega=0^{\pm}$ states, $J=0$ PA peaks were used. Lower bounds are given.} & rate \footnote{Estimated achievable production rate at the saturation intensity $I_{{\rm Sat}}$, for our experimental conditions.} (s$^{-1}$)\\
\hline
11817.15 & 15653.29 & $2^3\Pi_{0^+}$ & 1 & 5(3) & 33 \% & 1(1)$\times$ 10$^4$ \\
& & $(v=10)$ & & & & \\
\hline
10126.52 & 13962.66 & $2(1)$ & 4(1) & 2(1) & 15(5)\% & 5(3) $\times$ 10$^3$ \\
10141.18 & 13977.32 & $2(0^-)$ & 3(1) & 10(5) & 25(5)\% & 2(1) $\times$ 10$^4$ \\
10151.24 & 13987.38 & $3(1)$ & 6(2) & 3(2) & 25(5)\% & 2(1) $\times$ 10$^4$ \\
10166.16 & 14002.30 & $4(1)$ & 0.2(1) & & 10(5)\% & \\
10167.01 & 14003.15 & $3(0^+)$ & 0.4(2) & & 20(5)\% & \\
10199.57 & 14035.71 & $2(1)$ & 2(1) & 5(3) & 30(5)\% & 1(1) $\times$ 10$^4$ \\
10220.81 & 14056.96 & $3(1)$ & 2(1) & 6(3) & 25(5)\% & 1(1) $\times$ 10$^4$ \\
10226.70 & 14062.84 & $2(1)$ & 2(1) & 4(2) & 25(5)\% & 7(4) $\times$ 10$^3$ \\
10244.22 & 14080.36 & $3(1)$ & 2(1) & 4(2) & 20(5)\% & 6(4) $\times$ 10$^3$ \\
10306.65 & 14142.79 & $2(0^-)$ & 3(1) & & 30(5)\% & \\%\hline
10311.91 & 14148.05 & $4(1)$ & 3(1) & & 20(5)\% & \\
10335.19 & 14171.33 & $3(1)$ & 1.4(3) & & 10(5)\% & \\
\end{tabular
\end{ruledtabular}
\end{table*}
\section{Discussion\protect\\}
Contrary to our original expectation, the highest rovibronic ground state production was observed for triplet PA states in this energy region.
This is probably because the short-range PA originates from the $a^3\Sigma^+$ potential. A strong coupling between the scattering state and the PA state appears to play a more important role than the coupling between the PA state and the ground state that governs the branching ratio for decay to the rovibronic ground state versus to the $a^3\Sigma^+$ state.
Although we expect that the singlet $B^1\Pi_1$ state populates the rovibronic ground state primarily via direct (one-photon) decay from the PA state, it is difficult to determine the decay path with our experimental setup; it is still possible that the PA states studied here decay to the ground state via two-photon cascade as was observed for higher-lying PA states in \cite{PhysRevA.91.021401}.
It would be interesting to investigate other vibrational levels below the region studied here, which were not accessible to us due to tuning limitations of our PA laser. Specifically, the contribution of the $B^1\Pi_1$ state is expected to vanish below 13740 cm$^{-1}$. A study of PA in this region would help us understand the mechanism of the spontaneous decay from the simpler $b^3\Pi_1-c^3\Sigma^+_1$ complex, which then might in turn illuminate the mechanisms for decay in the full $b-c-B$ system.
\section{Conclusions\protect\\}
We have performed short-range PA spectroscopy of $^{85}$Rb$^{133}$Cs in the PA frequency range between 10120 cm$^{-1}$ and 10350 cm$^{-1}$ (corresponding to the energy range of $E=13950-$14200 cm$^{-1}$ above the minimum of the $X$ potential).
30 new PA lines have been observed and assigned tentative state labels, mainly based on their vibrational progressions.
These results supplement previous data on the energy levels of the rovibronic states of RbCs in this region.
For selected PA states, vibrational branching and rotational branching into the $X^1\Sigma^+ (v=0)$ state have been characterized. Measurements of PA saturation behavior indicate that a higher PA power would increase the molecule production beyond what was actually observed here.
One of the $\Omega=1$ states ($E = 13987.39$ cm$^{-1}$, PA frequency, 10151.25 cm$^{-1}$, assigned as a 2(1) state) is particularly interesting for its efficient production of the $X(v=0,J=0)$ molecules.
The $X(v=0,J=0)$ molecule production rate we achieved for this PA state is $\sim$1$\times 10^4$ molecules/s, a factor of 5 improvement compared to previously observed production rates of rovibronic ground state RbCs molecules using PA. We project that with higher laser power, up to 2$\times 10^4$ molecules/s could be produced via PA through this state.
\begin{acknowledgments}
We thank M. A. Bellos for reading the manuscript and providing comments. This work was supported by ARO MURI. TS and JTK acknowledge support from Yale University.
\end{acknowledgments}
\bibliographystyle{apsrev4-1}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 9,764 |
Happy Halloween my lovely seven thirty three friends! I hope you have a frightfully festive day! Now that Halloween is here my brain has checked it off my list and now is looking towards Thanksgiving. I love Thanksgiving! It's a fabulous weekend filled with food, family, & fun! It's the perfect way to wrap up a month that is spent focusing on gratitude. As an adult I love lingering at the table chatting it up with cousins but in order to really enjoy the conversation, the kids need to something to keep them busy while they are at the table. How about decorating their own folded turkey place card!?!
To make the turkey you'll need to start with a 9×9 sheet of brown craft paper. *You want paper with a little weight to it so the turkey will be able to support itself but not too thick like cardstock so it is easy to fold. I used construction paper and it was perfect!
Fold the 9×9 square in half to make a triangle.
Next, fold in the two corners on each side so they meet in the middle.
Now fold in the two new corners to the middle.
To make the neck, fold the bottom point up to meet the wide top.
Create a head by folding the thin point down.
For the tail you'll fold the wide point up to the fold of the neck.
Finally it's time for the feathers!
I cut these out using my Cricut but you could do these with any craft cutter or even by hand.
I glued the big feathers on first touching the base of the tail.
Once I had all the big feathers glued onto the tail it was time to add the smaller feathers.
You could make your smaller feathers a different color but I'm digging the subtle color palate with the touch of dimension from the combo of the bigger and smaller feathers.
If your kiddos are bigger they could help fold all of the turkey place cards, cut the feathers, and even glue them on after you have a chance to write about them.
On the big day, your kids will adore their feather messages and enjoy decorating their turkeys while the grown-ups get to chat. Win, win!
I'd love it if you would pop on by Dolen Diaries and check out my other projects and kids crafts! | {
"redpajama_set_name": "RedPajamaC4"
} | 7,733 |
The thermal action of red pepper extract, in combination with rose, black pepper and 12 other precious essential oils helps tone microcirculation and naturally stimulates fat burning. It improves skin elasticity and firmness and revitalizes its appearance.
The 100% natural scent from the essential oil combination of lemon, juniper, rosemary, bergamot, pine, grapefruit, orange, cypress, ginger, bitter orange, fennel and neroli tones microcirculation and combats local fat.
Red and black pepper extract, organic ivy, organic arnica extract, ruscus, goldenrod and astragalus have a firming, detoxifying and decongestant action.
Organic rose essential oil regenerates, hydrates and smoothes skin.
Organic green tea infusion offers intense antioxidant and anti-aging effects. | {
"redpajama_set_name": "RedPajamaC4"
} | 7,750 |
namespace dev
{
namespace eth
{
namespace jit
{
Arith256::Arith256(IRBuilder& _builder) :
CompilerHelper(_builder)
{}
void Arith256::debug(llvm::Value* _value, char _c, llvm::Module& _module, IRBuilder& _builder)
{
static const auto funcName = "debug";
auto func = _module.getFunction(funcName);
if (!func)
func = llvm::Function::Create(llvm::FunctionType::get(Type::Void, {Type::Word, _builder.getInt8Ty()}, false), llvm::Function::ExternalLinkage, funcName, &_module);
_builder.CreateCall(func, {_builder.CreateZExtOrTrunc(_value, Type::Word), _builder.getInt8(_c)});
}
namespace
{
llvm::Function* generateLongMulFunc(char const* _funcName, llvm::IntegerType* _ty, llvm::IntegerType* _wordTy, llvm::Module& _module)
{
// C++ reference implementation:
// using word = std::uint64_t;
// using dword = __uint128_t;
//
// static const auto wordBits = sizeof(word) * 8;
//
// template<unsigned _N>
// struct i
// {
// static const unsigned N = _N/8/sizeof(word);
// word w[N];
// };
//
// using int256 = i<256>;
//
// template<unsigned N>
// i<N> long_mul(i<N> a, i<N> b)
// {
// decltype(a) r = {{0}};
//
// for (int j = 0; j < b.N; ++j)
// {
// dword carry = 0;
// for (int i = 0; i < (a.N - j); ++i)
// {
// auto& slot = r.w[j + i];
//
// // sum of current multiplication, carry and the value from previous round using dword type
// // no overflow because (2^N - 1)*(2^N - 1) + (2^N - 1) + (2^N - 1) == 2^2N - 1
// auto s = (dword)b.w[j] * a.w[i] + carry + slot; // safe, no overflow
//
// slot = (word) s;
// carry = s >> wordBits;
// }
// }
//
// return r;
// }
auto func = llvm::Function::Create(llvm::FunctionType::get(_ty, {_ty, _ty}, false), llvm::Function::PrivateLinkage, _funcName, &_module);
func->setDoesNotAccessMemory();
func->setDoesNotThrow();
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto entryBB = llvm::BasicBlock::Create(func->getContext(), "Entry", func);
auto outerLoopHeaderBB = llvm::BasicBlock::Create(func->getContext(), "OuterLoop.Header", func);
auto innerLoopBB = llvm::BasicBlock::Create(func->getContext(), "InnerLoop", func);
auto outerLoopFooterBB = llvm::BasicBlock::Create(func->getContext(), "OuterLoop.Footer", func);
auto exitBB = llvm::BasicBlock::Create(func->getContext(), "Exit", func);
auto builder = IRBuilder{entryBB};
auto dwordTy = builder.getIntNTy(_wordTy->getBitWidth() * 2);
auto indexTy = builder.getInt32Ty();
auto _0 = builder.getInt32(0);
auto _1 = builder.getInt32(1);
auto wordMask = builder.CreateZExt(llvm::ConstantInt::get(_wordTy, -1, true), dwordTy);
auto wordBitWidth = builder.getInt32(_wordTy->getBitWidth());
assert(_ty->getBitWidth() / _wordTy->getBitWidth() >= 4 && "Word type must be at least 4 times smaller than full type");
auto dim = builder.getInt32(_ty->getBitWidth() / _wordTy->getBitWidth());
builder.CreateBr(outerLoopHeaderBB);
auto extractWordAsDword = [&](llvm::Value* _a, llvm::Value* _idx, llvm::Twine const& _name)
{
auto word = builder.CreateLShr(_a, builder.CreateZExt(builder.CreateNUWMul(_idx, wordBitWidth), _ty));
word = builder.CreateAnd(builder.CreateTrunc(word, dwordTy), wordMask, _name);
return word;
};
builder.SetInsertPoint(outerLoopHeaderBB);
auto j = builder.CreatePHI(indexTy, 2, "j");
auto p = builder.CreatePHI(_ty, 2, "p");
auto yj = extractWordAsDword(y, j, "y.j");
auto iEnd = builder.CreateSub(dim, j, "i.end", true, true);
builder.CreateBr(innerLoopBB);
builder.SetInsertPoint(innerLoopBB);
auto i = builder.CreatePHI(indexTy, 2, "i");
auto pInner = builder.CreatePHI(_ty, 2, "p.inner");
auto carry = builder.CreatePHI(_wordTy, 2, "carry");
auto k = builder.CreateNUWAdd(i, j, "k");
auto offset = builder.CreateZExt(builder.CreateNUWMul(k, wordBitWidth), _ty, "offset");
auto xi = extractWordAsDword(x, i, "x.i");
auto m = builder.CreateNUWMul(xi, yj, "m");
auto mask = builder.CreateShl(builder.CreateZExt(wordMask, _ty), offset, "mask");
auto nmask = builder.CreateXor(mask, llvm::ConstantInt::get(_ty, -1, true), "nmask");
auto w = builder.CreateTrunc(builder.CreateLShr(pInner, offset), dwordTy);
w = builder.CreateAnd(w, wordMask, "w");
auto s = builder.CreateAdd(w, builder.CreateZExt(carry, dwordTy), "s.wc", true, true);
s = builder.CreateNUWAdd(s, m, "s");
auto carryNext = builder.CreateTrunc(builder.CreateLShr(s, llvm::ConstantInt::get(dwordTy, _wordTy->getBitWidth())), _wordTy, "carry.next");
auto wNext = builder.CreateAnd(s, wordMask);
auto pMasked = builder.CreateAnd(pInner, nmask, "p.masked");
auto pNext = builder.CreateOr(builder.CreateShl(builder.CreateZExt(wNext, _ty), offset), pMasked, "p.next");
auto iNext = builder.CreateNUWAdd(i, _1, "i.next");
auto innerLoopCond = builder.CreateICmpEQ(iNext, iEnd, "i.cond");
builder.CreateCondBr(innerLoopCond, outerLoopFooterBB, innerLoopBB);
i->addIncoming(_0, outerLoopHeaderBB);
i->addIncoming(iNext, innerLoopBB);
pInner->addIncoming(p, outerLoopHeaderBB);
pInner->addIncoming(pNext, innerLoopBB);
carry->addIncoming(llvm::ConstantInt::get(_wordTy, 0), outerLoopHeaderBB);
carry->addIncoming(carryNext, innerLoopBB);
builder.SetInsertPoint(outerLoopFooterBB);
auto jNext = builder.CreateNUWAdd(j, _1, "j.next");
auto outerLoopCond = builder.CreateICmpEQ(jNext, dim, "j.cond");
builder.CreateCondBr(outerLoopCond, exitBB, outerLoopHeaderBB);
j->addIncoming(_0, entryBB);
j->addIncoming(jNext, outerLoopFooterBB);
p->addIncoming(llvm::ConstantInt::get(_ty, 0), entryBB);
p->addIncoming(pNext, outerLoopFooterBB);
builder.SetInsertPoint(exitBB);
builder.CreateRet(pNext);
return func;
}
}
llvm::Function* Arith256::getMulFunc(llvm::Module& _module)
{
static const auto funcName = "evm.mul.i256";
if (auto func = _module.getFunction(funcName))
return func;
return generateLongMulFunc(funcName, Type::Word, Type::Size, _module);
}
llvm::Function* Arith256::getMul512Func(llvm::Module& _module)
{
static const auto funcName = "evm.mul.i512";
if (auto func = _module.getFunction(funcName))
return func;
auto i512Ty = llvm::IntegerType::get(_module.getContext(), 512);
return generateLongMulFunc(funcName, i512Ty, Type::Size, _module);
}
namespace
{
llvm::Function* createUDivRemFunc(llvm::Type* _type, llvm::Module& _module, char const* _funcName)
{
// Based of "Improved shift divisor algorithm" from "Software Integer Division" by Microsoft Research
// The following algorithm also handles divisor of value 0 returning 0 for both quotient and remainder
auto retType = llvm::VectorType::get(_type, 2);
auto func = llvm::Function::Create(llvm::FunctionType::get(retType, {_type, _type}, false), llvm::Function::PrivateLinkage, _funcName, &_module);
func->setDoesNotThrow();
func->setDoesNotAccessMemory();
auto zero = llvm::ConstantInt::get(_type, 0);
auto one = llvm::ConstantInt::get(_type, 1);
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto entryBB = llvm::BasicBlock::Create(_module.getContext(), "Entry", func);
auto mainBB = llvm::BasicBlock::Create(_module.getContext(), "Main", func);
auto loopBB = llvm::BasicBlock::Create(_module.getContext(), "Loop", func);
auto continueBB = llvm::BasicBlock::Create(_module.getContext(), "Continue", func);
auto returnBB = llvm::BasicBlock::Create(_module.getContext(), "Return", func);
auto builder = IRBuilder{entryBB};
auto yLEx = builder.CreateICmpULE(y, x);
auto r0 = x;
builder.CreateCondBr(yLEx, mainBB, returnBB);
builder.SetInsertPoint(mainBB);
auto ctlzIntr = llvm::Intrinsic::getDeclaration(&_module, llvm::Intrinsic::ctlz, _type);
// both y and r are non-zero
auto yLz = builder.CreateCall(ctlzIntr, {y, builder.getInt1(true)}, "y.lz");
auto rLz = builder.CreateCall(ctlzIntr, {r0, builder.getInt1(true)}, "r.lz");
auto i0 = builder.CreateNUWSub(yLz, rLz, "i0");
auto y0 = builder.CreateShl(y, i0);
builder.CreateBr(loopBB);
builder.SetInsertPoint(loopBB);
auto yPhi = builder.CreatePHI(_type, 2, "y.phi");
auto rPhi = builder.CreatePHI(_type, 2, "r.phi");
auto iPhi = builder.CreatePHI(_type, 2, "i.phi");
auto qPhi = builder.CreatePHI(_type, 2, "q.phi");
auto rUpdate = builder.CreateNUWSub(rPhi, yPhi);
auto qUpdate = builder.CreateOr(qPhi, one); // q += 1, q lowest bit is 0
auto rGEy = builder.CreateICmpUGE(rPhi, yPhi);
auto r1 = builder.CreateSelect(rGEy, rUpdate, rPhi, "r1");
auto q1 = builder.CreateSelect(rGEy, qUpdate, qPhi, "q");
auto iZero = builder.CreateICmpEQ(iPhi, zero);
builder.CreateCondBr(iZero, returnBB, continueBB);
builder.SetInsertPoint(continueBB);
auto i2 = builder.CreateNUWSub(iPhi, one);
auto q2 = builder.CreateShl(q1, one);
auto y2 = builder.CreateLShr(yPhi, one);
builder.CreateBr(loopBB);
yPhi->addIncoming(y0, mainBB);
yPhi->addIncoming(y2, continueBB);
rPhi->addIncoming(r0, mainBB);
rPhi->addIncoming(r1, continueBB);
iPhi->addIncoming(i0, mainBB);
iPhi->addIncoming(i2, continueBB);
qPhi->addIncoming(zero, mainBB);
qPhi->addIncoming(q2, continueBB);
builder.SetInsertPoint(returnBB);
auto qRet = builder.CreatePHI(_type, 2, "q.ret");
qRet->addIncoming(zero, entryBB);
qRet->addIncoming(q1, loopBB);
auto rRet = builder.CreatePHI(_type, 2, "r.ret");
rRet->addIncoming(r0, entryBB);
rRet->addIncoming(r1, loopBB);
auto ret = builder.CreateInsertElement(llvm::UndefValue::get(retType), qRet, uint64_t(0), "ret0");
ret = builder.CreateInsertElement(ret, rRet, 1, "ret");
builder.CreateRet(ret);
return func;
}
}
llvm::Function* Arith256::getUDivRem256Func(llvm::Module& _module)
{
static const auto funcName = "evm.udivrem.i256";
if (auto func = _module.getFunction(funcName))
return func;
return createUDivRemFunc(Type::Word, _module, funcName);
}
llvm::Function* Arith256::getUDivRem512Func(llvm::Module& _module)
{
static const auto funcName = "evm.udivrem.i512";
if (auto func = _module.getFunction(funcName))
return func;
return createUDivRemFunc(llvm::IntegerType::get(_module.getContext(), 512), _module, funcName);
}
llvm::Function* Arith256::getUDiv256Func(llvm::Module& _module)
{
static const auto funcName = "evm.udiv.i256";
if (auto func = _module.getFunction(funcName))
return func;
auto udivremFunc = getUDivRem256Func(_module);
auto func = llvm::Function::Create(llvm::FunctionType::get(Type::Word, {Type::Word, Type::Word}, false), llvm::Function::PrivateLinkage, funcName, &_module);
func->setDoesNotThrow();
func->setDoesNotAccessMemory();
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto bb = llvm::BasicBlock::Create(_module.getContext(), {}, func);
auto builder = IRBuilder{bb};
auto udivrem = builder.CreateCall(udivremFunc, {x, y});
auto udiv = builder.CreateExtractElement(udivrem, uint64_t(0));
builder.CreateRet(udiv);
return func;
}
namespace
{
llvm::Function* createURemFunc(llvm::Type* _type, llvm::Module& _module, char const* _funcName)
{
auto udivremFunc = _type == Type::Word ? Arith256::getUDivRem256Func(_module) : Arith256::getUDivRem512Func(_module);
auto func = llvm::Function::Create(llvm::FunctionType::get(_type, {_type, _type}, false), llvm::Function::PrivateLinkage, _funcName, &_module);
func->setDoesNotThrow();
func->setDoesNotAccessMemory();
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto bb = llvm::BasicBlock::Create(_module.getContext(), {}, func);
auto builder = IRBuilder{bb};
auto udivrem = builder.CreateCall(udivremFunc, {x, y});
auto r = builder.CreateExtractElement(udivrem, uint64_t(1));
builder.CreateRet(r);
return func;
}
}
llvm::Function* Arith256::getURem256Func(llvm::Module& _module)
{
static const auto funcName = "evm.urem.i256";
if (auto func = _module.getFunction(funcName))
return func;
return createURemFunc(Type::Word, _module, funcName);
}
llvm::Function* Arith256::getURem512Func(llvm::Module& _module)
{
static const auto funcName = "evm.urem.i512";
if (auto func = _module.getFunction(funcName))
return func;
return createURemFunc(llvm::IntegerType::get(_module.getContext(), 512), _module, funcName);
}
llvm::Function* Arith256::getSDivRem256Func(llvm::Module& _module)
{
static const auto funcName = "evm.sdivrem.i256";
if (auto func = _module.getFunction(funcName))
return func;
auto udivremFunc = getUDivRem256Func(_module);
auto retType = llvm::VectorType::get(Type::Word, 2);
auto func = llvm::Function::Create(llvm::FunctionType::get(retType, {Type::Word, Type::Word}, false), llvm::Function::PrivateLinkage, funcName, &_module);
func->setDoesNotThrow();
func->setDoesNotAccessMemory();
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto bb = llvm::BasicBlock::Create(_module.getContext(), "", func);
auto builder = IRBuilder{bb};
auto xIsNeg = builder.CreateICmpSLT(x, Constant::get(0));
auto xNeg = builder.CreateSub(Constant::get(0), x);
auto xAbs = builder.CreateSelect(xIsNeg, xNeg, x);
auto yIsNeg = builder.CreateICmpSLT(y, Constant::get(0));
auto yNeg = builder.CreateSub(Constant::get(0), y);
auto yAbs = builder.CreateSelect(yIsNeg, yNeg, y);
auto res = builder.CreateCall(udivremFunc, {xAbs, yAbs});
auto qAbs = builder.CreateExtractElement(res, uint64_t(0));
auto rAbs = builder.CreateExtractElement(res, 1);
// the remainder has the same sign as dividend
auto rNeg = builder.CreateSub(Constant::get(0), rAbs);
auto r = builder.CreateSelect(xIsNeg, rNeg, rAbs);
auto qNeg = builder.CreateSub(Constant::get(0), qAbs);
auto xyOpposite = builder.CreateXor(xIsNeg, yIsNeg);
auto q = builder.CreateSelect(xyOpposite, qNeg, qAbs);
auto ret = builder.CreateInsertElement(llvm::UndefValue::get(retType), q, uint64_t(0));
ret = builder.CreateInsertElement(ret, r, 1);
builder.CreateRet(ret);
return func;
}
llvm::Function* Arith256::getSDiv256Func(llvm::Module& _module)
{
static const auto funcName = "evm.sdiv.i256";
if (auto func = _module.getFunction(funcName))
return func;
auto sdivremFunc = getSDivRem256Func(_module);
auto func = llvm::Function::Create(llvm::FunctionType::get(Type::Word, {Type::Word, Type::Word}, false), llvm::Function::PrivateLinkage, funcName, &_module);
func->setDoesNotThrow();
func->setDoesNotAccessMemory();
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto bb = llvm::BasicBlock::Create(_module.getContext(), {}, func);
auto builder = IRBuilder{bb};
auto sdivrem = builder.CreateCall(sdivremFunc, {x, y});
auto q = builder.CreateExtractElement(sdivrem, uint64_t(0));
builder.CreateRet(q);
return func;
}
llvm::Function* Arith256::getSRem256Func(llvm::Module& _module)
{
static const auto funcName = "evm.srem.i256";
if (auto func = _module.getFunction(funcName))
return func;
auto sdivremFunc = getSDivRem256Func(_module);
auto func = llvm::Function::Create(llvm::FunctionType::get(Type::Word, {Type::Word, Type::Word}, false), llvm::Function::PrivateLinkage, funcName, &_module);
func->setDoesNotThrow();
func->setDoesNotAccessMemory();
auto iter = func->arg_begin();
llvm::Argument* x = &(*iter++);
x->setName("x");
llvm::Argument* y = &(*iter);
y->setName("y");
auto bb = llvm::BasicBlock::Create(_module.getContext(), {}, func);
auto builder = IRBuilder{bb};
auto sdivrem = builder.CreateCall(sdivremFunc, {x, y});
auto r = builder.CreateExtractElement(sdivrem, uint64_t(1));
builder.CreateRet(r);
return func;
}
llvm::Function* Arith256::getExpFunc()
{
if (!m_exp)
{
llvm::Type* argTypes[] = {Type::Word, Type::Word};
m_exp = llvm::Function::Create(llvm::FunctionType::get(Type::Word, argTypes, false), llvm::Function::PrivateLinkage, "exp", getModule());
m_exp->setDoesNotThrow();
m_exp->setDoesNotAccessMemory();
auto iter = m_exp->arg_begin();
llvm::Argument* base = &(*iter++);
base->setName("base");
llvm::Argument* exponent = &(*iter);
exponent->setName("exponent");
InsertPointGuard guard{m_builder};
// while (e != 0) {
// if (e % 2 == 1)
// r *= b;
// b *= b;
// e /= 2;
// }
auto entryBB = llvm::BasicBlock::Create(m_builder.getContext(), "Entry", m_exp);
auto headerBB = llvm::BasicBlock::Create(m_builder.getContext(), "LoopHeader", m_exp);
auto bodyBB = llvm::BasicBlock::Create(m_builder.getContext(), "LoopBody", m_exp);
auto updateBB = llvm::BasicBlock::Create(m_builder.getContext(), "ResultUpdate", m_exp);
auto continueBB = llvm::BasicBlock::Create(m_builder.getContext(), "Continue", m_exp);
auto returnBB = llvm::BasicBlock::Create(m_builder.getContext(), "Return", m_exp);
m_builder.SetInsertPoint(entryBB);
m_builder.CreateBr(headerBB);
m_builder.SetInsertPoint(headerBB);
auto r = m_builder.CreatePHI(Type::Word, 2, "r");
auto b = m_builder.CreatePHI(Type::Word, 2, "b");
auto e = m_builder.CreatePHI(Type::Word, 2, "e");
auto eNonZero = m_builder.CreateICmpNE(e, Constant::get(0), "e.nonzero");
m_builder.CreateCondBr(eNonZero, bodyBB, returnBB);
m_builder.SetInsertPoint(bodyBB);
auto eOdd = m_builder.CreateICmpNE(m_builder.CreateAnd(e, Constant::get(1)), Constant::get(0), "e.isodd");
m_builder.CreateCondBr(eOdd, updateBB, continueBB);
m_builder.SetInsertPoint(updateBB);
auto mul256Func = getMulFunc(*getModule());
auto r0 = m_builder.CreateCall(mul256Func, {r, b});
m_builder.CreateBr(continueBB);
m_builder.SetInsertPoint(continueBB);
auto r1 = m_builder.CreatePHI(Type::Word, 2, "r1");
r1->addIncoming(r, bodyBB);
r1->addIncoming(r0, updateBB);
auto b1 = m_builder.CreateCall(mul256Func, {b, b});
auto e1 = m_builder.CreateLShr(e, Constant::get(1), "e1");
m_builder.CreateBr(headerBB);
r->addIncoming(Constant::get(1), entryBB);
r->addIncoming(r1, continueBB);
b->addIncoming(base, entryBB);
b->addIncoming(b1, continueBB);
e->addIncoming(exponent, entryBB);
e->addIncoming(e1, continueBB);
m_builder.SetInsertPoint(returnBB);
m_builder.CreateRet(r);
}
return m_exp;
}
llvm::Value* Arith256::exp(llvm::Value* _arg1, llvm::Value* _arg2)
{
// while (e != 0) {
// if (e % 2 == 1)
// r *= b;
// b *= b;
// e /= 2;
// }
if (auto c1 = llvm::dyn_cast<llvm::ConstantInt>(_arg1))
{
if (auto c2 = llvm::dyn_cast<llvm::ConstantInt>(_arg2))
{
auto b = c1->getValue();
auto e = c2->getValue();
auto r = llvm::APInt{256, 1};
while (e != 0)
{
if (e[0])
r *= b;
b *= b;
e = e.lshr(1);
}
return Constant::get(r);
}
}
return m_builder.CreateCall(getExpFunc(), {_arg1, _arg2});
}
}
}
}
extern "C"
{
EVMJIT_API void debug(uint64_t a, uint64_t b, uint64_t c, uint64_t d, char z)
{
DLOG(JIT) << "DEBUG " << std::dec << z << ": " //<< d << c << b << a
<< " [" << std::hex << std::setfill('0') << std::setw(16) << d << std::setw(16) << c << std::setw(16) << b << std::setw(16) << a << "]\n";
}
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 4,534 |
Are you or a loved one looking for a drug rehab facility in Idaho? If so call us now at 877-420-2948. Counselors are standing by that can find you the right rehab. Idaho is the 14th largest, and 39th most populous of the 50 United States with a population of over 1.5 million. Boise is the capital and the state's largest city. Idaho is a mountainous state, and 60 percent of its land is held by the National Forest Service. It leads the nation in forest service land as a percentage of total area. Since nearly every known type of gemstone has been found there Idaho's nickname is the Gem State. It is one of only two places in the world where star garnets can be found in any quantity with the other being India. It is also sometimes called the Potato State due to its popular and widely distributed crop. Nearly one-third of the potatoes grown in the United States come from Idaho. Important industries in Idaho are tourism, food processing, machinery, chemical products, lumber, paper products, mining, and electronics manufacturing. The largest industry in Idaho is the science and technology sector. It accounts for over 70 percent of the state's exports and a quarter of the state's total revenue. The industrial economy in Idaho is growing with high-tech products leading the way. A number of Fortune 500 companies have their origins in Idaho including Albertsons, Safeway, JC Penny, and JR Simplot. Continental Airlines included Idaho's Zimmerly Air Transport in a five company merger that make-up the brand today.
As far as statistics are concerned, Idaho residents rank at or around the national averages when it comes to substance abuse. According to surveys conducted by the National Survey on Drug Use and Health 6.7 percent of the population reported past-month heavy alcohol use and 8 percent reported past month illicit drug use. The national averages are 6.9 percent and 8.2 percent. 6.7 percent of Idahoans experienced alcohol dependence in the past-year, and 2.3 percent experienced dependence to an illicit drug in the past 12 months. The national averages were 6.6 percent and 2.7 percent. Alcohol ranks the highest for primary treatment admissions at Idaho drug rehab facilities. 18.6 percent of rehab clients enter treatment for alcohol only, and another 63.5 percent enter for problems with alcohol and other drugs. Alcohol has a high incidence of dependence with regular use, and once it develops heavy drinkers have a hard time quitting without help. Dependent individuals experience a difficult withdrawal syndrome when they stop drinking which can actually be life-threatening in extreme cases. Idaho drug rehab facilities can safely detox alcoholics, and help them learn to avoid relapse traps that could lead them back to drinking. Marijuana ranks highest for illicit drug primary treatment admissions in the state. According to data from a report issued by the White House nearly 50 percent of primary drug admissions in Idaho were for marijuana. Pot also has a high incidence of dependence in heavy users, and can create significant problems for addicts. The withdrawal syndrome for marijuana is mild compared to other substances, but can be equally hard to overcome. Stimulants rank third for primary treatment admissions and make up a significant portion of the remaining 50 percent of admissions for illicit drugs. Methamphetamine is the most widely abused stimulant in the state, and the drug brings more people to Idaho drug rehab facilities each year than all of the remaining illicit drugs combined. Methamphetamine is a powerful stimulant that has a very high incidence of abuse in dependence in regular users. The drug creates a strong psychological dependence which is directly related to high rate of relapse that meth addicts experience. Methamphetamine can be one of the hardest drugs for addicts to quit due in large part to the strong cravings that individuals experience for several months after they have stopped using the drug. Idaho drug rehab facilities are often necessary for meth addicts to get clean, and these addicts often require continued support. By learning relapse-prevention techniques, and new life skills many meth addicts can and do recover. Other opiates such as prescription pain relievers have been the fastest growing category of drugs of abuse in the US for the past fifteen years. Non-medical use of pain pills has reached epidemic proportions across the country, and these medications rank third for illicit drug primary treatment admissions in Idaho drug rehab facilities. Narcotic painkillers or other opiates produce a strong physical dependence in regular users which has a very uncomfortable withdrawal syndrome associated with it. Many people experiment with these drugs under the false assumption that they are safer than street drugs only to end up addicted before they realize what's happened. Once dependence has set in the user will start to experience uncomfortable symptoms in as little as 12 hours after their last dose. Idaho drug rehab facilities can get opiate addicts through this difficult period with a minimum of discomfort, and get them stabilized in a drug-free state. Once stabilized addicts can then begin to recover, and learn to maintain long-term abstinence. Other drugs such as cocaine and heroin round-out the list of illicit drug primary treatment admissions in Idaho. While the signs and symptoms of addiction for all of the mentioned substances are varied, they can all be equally difficult to quit. Dependence creates long-term negative side-effects for users that can be very hard to manage. These side effects can persist for months into sobriety, and can lead to relapse. For this reason Idaho drug rehab facilities apply a comprehensive approach to addiction recovery designed to not only get clients clean from drugs and alcohol, but to also teach them how to remain that way. Regardless of the substance of choice all addictions can be devastating. Many addicts and alcoholics fail when they try to quit on their own, and this can lead to a sense of hopelessness. Idaho drug rehab facilities are an integral part of long-term sobriety, and are the best places to find help for addiction related issues.
Idaho drug rehab facilities are widely available, and provide a number of options to addict's individual needs. There are options available to everyone regardless of background, life restrictions, or personal means. With so many choices available the process of finding the right treatment center can seem overwhelming, but the good news is that it doesn't have to be a difficult process. There are trained treatment center specialists who can help guide addicts through the process, and ensure that they find the most effective treatment solution. These specialists understand the needs of addicts and alcoholics, and can help to find Idaho drug rehab facilities that will be a good match for each individual. If you or someone you love is struggling with an addiction to alcohol or drugs it is recommended that you address the issue directly. Addiction is a complex condition that rarely gets better without help, and will continue to progress over time. No addict should feel that they have to face addiction alone, and no addict should feel that there rehab is beyond their reach. With the help of good Idaho drug rehab facilities recovery is possible, and treatment specialists can help to find a suitable option. Find the help you need right now, and get started on the path to recovery today. Call now at 877-420-2948 for immediate help. | {
"redpajama_set_name": "RedPajamaC4"
} | 1,793 |
Q: Extending ListPointPlot3D with a 3rd variable? I am trying to extend a function like this: (a 4x4 square)
ListPointPlot3D[Table[{x, y, 0}, {x, 0, 4, 1}, {y, 0, 4, 1}]]
into something like this: (a 4x4x4 cube)
ListPointPlot3D[Table[{x, y, z}, {x, 0, 4, 1}, {y, 0, 4, 1}, {z, 0, 4, 1}]]
by adding a 3rd dimension.
However, the dimensions of the latter seem to be incorrect. It seems to form a 2x2 matrix of 3d points rather than a list.
Any ideas how to fix this?
A: If you look a bit more closely you'll see that the expression
Table[{x, y, z}, {x, 0, 4, 1}, {y, 0, 4, 1}, {z, 0, 4, 1}]
returns a structure with 5x5x5 triplets. That is exactly what the expression is supposed to return. You can see this if you apply the Dimensions[] function to the returned structure.
There are several ways to turn the table into a list of 125 triplets, one is to use Flatten like this
Flatten[Table[{x, y, z}, {x, 0, 4, 1}, {y, 0, 4, 1}, {z, 0, 4, 1}], 2]
Or you could simply generate your list of triplets directly; for your example one alternative would be
Tuples[Range[0, 4], 3]
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 9,598 |
Q: Как правильно настроить Notification в андроид проекте? У меня имеется небольшое приложение, которое выполняет роль Task Manager'a. Попробовал настроить уведомление по конкретной дате (то есть выставляю дату через DataPickerDialog) и хотелось бы чтобы приходило уведомление в назначенный день, чего собственно не происходит. Прошу помочь разобраться в проблеме
NoteActivity:
public class NoteActivity extends AppCompatActivity {
private static final String EXTRA_NOTE = "NoteActivity.EXTRA_NOTE";
public static final String NOTIFICATION_CHANNEL_ID = "10001" ;
private final static String default_notification_channel_id = "default" ;
final Calendar myCalendar = Calendar. getInstance () ;
private Note note;
private EditText etTitle;
private EditText etDesc;
private TextView tvDateOfCreate;
private Button btnDate;
int DIALOG_DATE = 1;
int myYear = 2021;
int myMonth = 1;
int myDay = 1;
SimpleDateFormat sdf = new SimpleDateFormat("HH:mm, dd-MM-yyyy");
public static void start(Activity caller, Note note) {
Intent intent = new Intent (caller, NoteActivity.class);
if (note != null) {
intent.putExtra(EXTRA_NOTE, note);
}
caller.startActivity(intent);
}
@Override
protected void onCreate(@Nullable Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
setContentView(R.layout.activity_note);
Toolbar toolbar = findViewById(R.id.toolbarNote);
setSupportActionBar(toolbar);
getSupportActionBar().setDisplayHomeAsUpEnabled(true);
getSupportActionBar().setHomeButtonEnabled(true);
setTitle(getString(R.string.note_create));
etTitle = findViewById(R.id.etTitle);
etDesc = findViewById(R.id.etDesc);
tvDateOfCreate = findViewById(R.id.tvDateOfCreateNote);
btnDate = findViewById(R.id.btnDate);
if (getIntent().hasExtra(EXTRA_NOTE)) {
note = getIntent().getParcelableExtra(EXTRA_NOTE);
btnDate.setVisibility(View.INVISIBLE);
etTitle.setText(note.title);
etDesc.setText(note.text);
tvDateOfCreate.setText("Дата создания заметки: " + note.date);
tvDateOfCreate.setVisibility(View.VISIBLE);
} else {
note = new Note();
}
}
private void scheduleNotification (Notification notification , long delay) {
Intent notificationIntent = new Intent( this, MyNotificationPublisher. class ) ;
notificationIntent.putExtra(MyNotificationPublisher. NOTIFICATION_ID , 1 ) ;
notificationIntent.putExtra(MyNotificationPublisher. NOTIFICATION , notification) ;
PendingIntent pendingIntent = PendingIntent. getBroadcast ( this, 0 ,
notificationIntent , PendingIntent. FLAG_UPDATE_CURRENT ) ;
AlarmManager alarmManager = (AlarmManager) getSystemService(Context. ALARM_SERVICE ) ;
assert alarmManager != null;
alarmManager.set(AlarmManager. ELAPSED_REALTIME_WAKEUP , delay , pendingIntent) ;
}
private Notification getNotification (String content) {
NotificationCompat.Builder builder = new NotificationCompat.Builder( this,
default_notification_channel_id ) ;
builder.setContentTitle( "Scheduled Notification" ) ;
builder.setContentText(content) ;
builder.setSmallIcon(R.mipmap.ic_launcher ) ;
builder.setAutoCancel( true ) ;
builder.setChannelId( NOTIFICATION_CHANNEL_ID ) ;
return builder.build() ;
}
@Override
public boolean onCreateOptionsMenu(Menu menu) {
getMenuInflater().inflate(R.menu.menu_note, menu);
return super.onCreateOptionsMenu(menu);
}
@SuppressLint("NonConstantResourceId")
@Override
public boolean onOptionsItemSelected(@NonNull MenuItem item) {
switch (item.getItemId()) {
case android.R.id.home:
finish();
break;
case R.id.action_save:
if ((etDesc.getText().length() > 0) && (etTitle.getText().length() > 0)) {
note.title = etTitle.getText().toString();
note.text = etDesc.getText().toString();
note.done = false;
note.plannedDay = btnDate.getText().toString();
note.date = sdf.format(Calendar.getInstance().getTime());
note.timestamp = System.currentTimeMillis();
if (getIntent().hasExtra(EXTRA_NOTE)) {
App.getInstance().getNoteDao().update(note);
} else {
App.getInstance().getNoteDao().insert(note);
}
finish();
} else {
Toast.makeText(this, "Заполните поля названия и описания заметки",
Toast.LENGTH_SHORT).show();
}
break;
}
return super.onOptionsItemSelected(item);
}
public void onChangeDate(View view) {
showDialog(DIALOG_DATE);
}
protected Dialog onCreateDialog(int id) {
if (id == DIALOG_DATE) {
DatePickerDialog tpd = new DatePickerDialog(this, myCallBack, myYear, myMonth, myDay);
return tpd;
}
return super.onCreateDialog(id);
}
DatePickerDialog.OnDateSetListener myCallBack = new DatePickerDialog.OnDateSetListener() {
public void onDateSet(DatePicker view, int year, int monthOfYear,
int dayOfMonth) {
myYear = year;
myMonth = monthOfYear;
myDay = dayOfMonth;
btnDate.setText("Задана дата " + myDay + "/" + myMonth + "/" + myYear);
myCalendar.set(Calendar. YEAR , year) ;
myCalendar.set(Calendar. MONTH , monthOfYear) ;
myCalendar.set(Calendar. DAY_OF_MONTH , dayOfMonth) ;
updateLabel();
}
};
private void updateLabel () {
Date date = myCalendar.getTime();
scheduleNotification(getNotification(btnDate.getText().toString()) , date.getTime()) ;
}
}
NotificationPublisher:
public class MyNotificationPublisher extends BroadcastReceiver {
public static String NOTIFICATION_ID = "notification-id" ;
public static String NOTIFICATION = "notification" ;
public void onReceive (Context context , Intent intent) {
NotificationManager notificationManager = (NotificationManager) context.getSystemService(Context. NOTIFICATION_SERVICE ) ;
Notification notification = intent.getParcelableExtra( NOTIFICATION ) ;
if (android.os.Build.VERSION. SDK_INT >= android.os.Build.VERSION_CODES. O ) {
int importance = NotificationManager. IMPORTANCE_HIGH ;
NotificationChannel notificationChannel = new NotificationChannel( NOTIFICATION_CHANNEL_ID , "NOTIFICATION_CHANNEL_NAME" , importance) ;
assert notificationManager != null;
notificationManager.createNotificationChannel(notificationChannel) ;
}
int id = intent.getIntExtra( NOTIFICATION_ID , 0 ) ;
assert notificationManager != null;
notificationManager.notify(id , notification) ;
}
}
Уже думал, может как то через Firebase (FCM) организовать, но не знаю, как это правильно сделать.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 7,044 |
Q: How can I design my Spring program so that when a user logs in I can tell if they are a Staff member, student or faculty member? A little more detail. Like I said I'm building this University Management System and it will have user authentication. It will also user authorization for some parts of the web layer, for example only a Student will be able to access the Student web portal to add/drop classes and only a Faculty will be able to use the faculty portal to grade students and see their list of course.
Here is the problem: When someone logs in (This is all using Spring Security and Spring MVC btw) I need to be able to tell if this a student, faculty or staff ideally from the login info itself. And querying each table until I find a match seems like TERRIBLE design. Each Entity inherits from a common abstract class Person but the interface that they share is very basic, they have getters and setters for the ID, first name, last name ect. I could store the Authorization role in the abstract class and that would tell me if this Person instance is a Staff, Student or Faculty and then check the role to figure what specific subclass I am using but that seems contrived as well. Is there a intuitive and common sense way to approach this problem?
A: I think you could create an enum field in the entity class called userType, and then create a filter class that determine the access to the functions located in the api layer, based on the userType of the user. You can get the userType efficiently by requesting it from the DB and store it in a data structure (like HashMap) on the server after the user logged in.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 1,578 |
Q: Why is a JavaScript reserved keyword allowed as a variable name? We know that let is a reserved keyword that defines a variable in JavaScript.
var let = 2;
console.log(let); // return 2
So why is this not an error?
A: let and some of the other works acts as reserved words only in strict mode. The specs says
Disallowed in strict mode: Those that are contextually disallowed as identifiers, in strict mode code: let, static, implements, interface, package, private, protected, and public;
You can see let inside the list of words which are only disallowed in strict mode. If you want to throw error for using let as variable name you can use strict mode
"use strict";
var let = 3
A: let is only a reserved word in strict mode:
'use strict';
var let = 5;
Uncaught SyntaxError: Unexpected strict mode reserved word
This is because browsers generally prioritize backwards compatibility above all else. Although let was introduced in ES2015 (and its use was forseen sometime before then), prior scripts which used let as a variable name would continue to work as desired. For example, if your script was written in 2008:
var let = 2;
console.log(let);
Then it would continue to work in 2020 as well.
For very similar reasons, async and await are also permitted as variable names.
As for why the use of let errors in strict mode - strict mode was introduced in ES5, in 2009. Back then, the language designers saw that the use of new keyword(s) to declare variables was a possibility in the future, but it wasn't set in stone yet, and ES6 was still a long ways off. Once ES5 came out, script writers could opt-in to strict mode to make code less confusing, and change silent errors to explicit errors. Although let wasn't usable for variable declaration yet, prohibiting it as a variable name in strict mode improved the readability of future scripts which opted into strict mode, while also not breaking any existing scripts.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 5,459 |
Why New Mexico
In the Path of Growth
World Class Talent
Culture of Innovation
Strong Value Proposition
Pro-Business Environment
Quality of Place
Business HQ, Support and Sales
IT & Data Centers
Logistics, Transportation & Distribution
Value Added Agriculture
INCENTIVES & DATA
Project Announcements
Advisory Partners
Aerospace Firm Targets ABQ for New Campus
BY STEPHEN HAMWAY AND JESSICA DYER / JOURNAL STAFF WRITERS
November 12th, 2020 – An East Coast aerospace company that aims to digitally model the entire planet using a network of satellites is eyeing an expansion into Albuquerque, with plans to build a massive campus near Kirtland Air Force Base.
On Thursday, the Albuquerque Environmental Planning Commission approved a new site plan for an approximately 122-acre parcel situated between the base and Albuquerque International Sunport, helping pave the way for Washington, D.C.-based Group Orion to develop the land.
While the city still needs to complete the lease agreement and secure permission from the Federal Aviation Administration, Group Orion hopes to build a campus that will include a two-million-square-foot manufacturing center, an eight-story office and laboratory building, a new food hall and an extended-stay hotel, among other developments.
"This is going to be a little city in itself," said David Shaffer, vice chair of the planning commission.
The campus, which would be known as the Orion Center, could house 1,000 jobs once it opens and eventually expand to include 2,500 jobs, according to James Strozier, principal at Albuquerque-based Consensus Planning, which submitted the plans on behalf of Group Orion.
Albuquerque Economic Development Director Synthia Jaramillo said the project represents the latest opportunity to attract development from the commercial space industry, which she said was slated to be worth $3 trillion globally by 2045.
At a press conference alongside Mayor Tim Keller late Thursday afternoon, Jaramillo cited the community's "engineering-savvy" workforce, low property tax and tax deductions that target the aviation and aerospace industries. In addition, she said, the city boasts "large swaths of vacant land, unrestricted air space and low population density."
"This company is very much in line with Mayor Keller's goals for economic development," Jaramillo said during the commission meeting.
The project represents the city's latest effort to develop the parcel of land that once held the Sunport's north-south runway.
The city began marketing the site – which it dubbed the Aviation Center for Excellence – to commercial and office developers in 2017 in an attempt to spur development in Southeast Albuquerque.
Nyika Allen, Albuquerque's director of aviation, said the city began working with Group Orion in late 2018.
READ MORE ABOUT NEW MEXICO'S AEROSPACE INDUSTRY
Posted in Aerospace
← New facility to Boost US Space Capabilities
From New Mexico to Mars →
New Mexico Companies
Value-Added Agriculture
1720 Louisiana Blvd NE, Suite 312, Albuquerque, NM 87110 | (505) 247-8500 | (888) 715-5293 | info@nmpartnership.com | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 4,374 |
Apply to Camp Master Chef's Summer Camp For Kids Now!
Welcome to the Best Job a Summer Can Offer!
2. Promote a Healthy Lifestyle.
3. Develop Personal Growth Skills.
We are a health-minded leadership team that leads by example. Good health includes a balanced diet, being physically active, and a healthy state of mind. As part of our hiring process, we carefully interview all candidates to find people who fit with our core values.
We have high expectations. You must be 20 years old or older, or have completed your 2nd year of college. All staff undergoes a rigorous background check and thorough interview. As a general counselor, experience and enthusiasm for working with children are necessities. As a specialty counselor, you need to have a high level of skill in a specific activity, or show an aptitude and strong interest.
We hold a mandatory orientation the week before the camp season launches.
Finally, we expect you to have sound judgment and decision-making skills, and be warm, caring, and patient.
Camp MasterChef is a smoke-free environment.
You and your co-counselors will live with a group of campers in a dorm. You will be their mentor, companion, and big brother or sister as you guide them through their daily activities, including meals, special events, and field trips.
Nothing is more important than cooking instructor's in our camps and we know it. If you are a hard-working individual who enjoys children and cooking is your passion, you may be just the person we're searching for. Cooking instructors must be able to inspire and teach children the passion of cooking, be strong role models for our campers and organize dynamic and fun cooking lessons adapted to the age of each group. And because we're working with kids, we have strict policies in many areas including alcohol, smoking, etc.
Being a cooking instructor at MasterChef camps is an incredibly fun and rewarding experience for someone whose passion is cooking and for someone who enjoy children and helping them grow as they learn cooking skills. But it is also physically and emotionally demanding and not for everyone. Please consider both before applying.
Join the Camp MasterChef team! | {
"redpajama_set_name": "RedPajamaC4"
} | 1,111 |
Q: check for the current screen i'm working on my core theme plugin, i created a theme options in theme admin page, normally to avoid nonces errors, i must separate the sections with tabbed navigation, so i successfully did it , the idea was to set one section as default when the user enter the theme options page, when i tried to do , the only way to do it is to check on the current screen either with get_current_screen() function or the global variable $current_screen, unfortunately with the classes oop i couldn't achieve it with success .
that's my code .
class myClass {
protected $curScreen;
public function load_Hooks() {
if ( is_admin() ) {
add_action( 'admin_init', array( $this, 'admin_Settins_Pages' ) );
}
global $current_screen;
$this->curScreen = $current_screen;
}
public function admin_Settins_Pages() {
global $current_screen;
if ( $this->curScreen->parent_base == 'parent-page-slug' || isset( $_GET['tab'] ) && $_GET['tab'] == 'head_options' ) {
add_settings_section( 'handle-id', 'Head Options', array( $this, 'head_section_callback' ), 'parent-page-slug' );
}
}
public function head_section_callback() {
// Do Something ...
}
}
if ( class_exists('myClass') ) {
$instClass = new myClass();
$instClass->load_Hooks();
}
*
*when i use the function get_current_screen() i fall in fatal error ( call to undefined function).
*when i use the global variable $current_screen i fall in notice error ( trying to call property of non-object).
so please guys, i'm in need for solution, i hope someone can help me work it out. thanks in advance.
A: Those variables and functions only exist in the admin area, and aren't for frontend use. You will need to use a different mechanism for the frontend.
Additionally:
*
*the docs say that you have to call this after the admin_init hook, calling on that hook will always return null
*the function is not loaded on all admin pages, e.g. the customizer
*Use it on the current_screen hook or later
When in doubt, read the documentation
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 7,013 |
Functions of the Uniform Crime Report and the National Crime Victimization Survey.
Explanations for the recent increase of prosecuting more juveniles in adult court settings.
Explanations for current increase in homicides of stranger and non-intimates vs. past trends.
4. use of weapons for youth and spouses during violent acts.
Impact of drugs and guns on school violence.
Criticism of the Uniform Crime Report and the National Crime Victimization Survey.
What are the concerns and predictions for the projected increase of the "Juvenile" population in our society.
What percent of juveniles are projected to be "career criminals"?
What age group for juveniles is the best known predictor to determine the potential for serious delinquency issues?
What age group for juveniles is the best known predictor to determine lack of socialites and involvement with anti-social peers.
Is there a causal relationship between juvenile violence and abusive parents and broken homes?
Which intervention strategies have proven to be more effective for juvenile offenders; addressing socioeconomics and abusive parents or substance abuse and anti-social peers?
What are the social and psychological characteristics that are consistent for "High Risk Juvenile Offenders"?
What is the degree of relationship between alcohol/drugs and the victim/offenders of violent and non-violent crime?
What relationship does Cocaine have in respect to violent or non-violent crime?
What is the explanation for the recent increase in activity of females in both violent and non-violent criminal activity.
What is the Social Bonding Theory? How can it utilized as an intervention strategy?
What are the characteristics of women in society who were involved in violent behavior?
Chapter 3-The Social and Economic Cost of Violence.
Define monetary and non-monetary costs to victims.
Know the impact of direct and indirect costs to victims. Which is more devastating to the victim?
What percent of all crime is property vs. violent crime.
What percent of crime actually involves victim contact?
Does the media contribute towards in-direct costs for victims?
What factors are taken to consideration to to establish "Actual Costs"? What percent is considered non-monetary?
What is effect of crime and violence on the elderly?
What age group is least likely to be victimized by violent crime?
What age group is more likely to be victimized by violent crime?
What ethnic group is most likely to be victimized?
What factors make the elderly more likely to suffer in-direct cost vs. other age groups?
What form of victimization are the elderly more likely to suffer, violent or property crime?
Which age group (elderly vs. younger) is more likely to attempt to protect themselves during the victimization?
What are three determinant factors for fear of crime?
What is recidivism? How has the truth in sentencing law impacted the state and federal prison system?
At what stage of incarceration is treatment for drug/alcohol addiction most effective? What steps would help diminish the current relapse rate?
Essay: To be announced in class during the review. | {
"redpajama_set_name": "RedPajamaC4"
} | 4,871 |
Q: Awk - insert a new row after the regular expression? File contents: (based on topic -> 1)
"Shimshon A",
"(blank)",
"November 24, 2012",
"13,481",
"jonathan t",
"Laguna Niguel, CA",
"November 24, 2012",
"13,480",
"scott b",
"Sussex, NJ",
"November 24, 2012",
"13,479",
How to improve the command?:
gawk --posix 'ORS="";{sub(/,[0-9]{3}/, "&&\n"); print }' file
Result:
$ gawk --posix 'ORS="";{sub(/,[0-9]{3}/, "&&\n"); print }' file
"Shimshon A","(blank)","November 24, 2012","13,481,481
","jonathan t","Laguna Niguel, CA","November 24, 2012","13,480,480
","scott b","Sussex, NJ","November 24, 2012","13,479,479
",userpc@userpc-desktop:~/Pulpit$
I want to print:
"Shimshon A","(blank)","November 24, 2012","13,481"
"jonathan t","Laguna Niguel, CA","November 24, 2012","13,480"
"scott b","Sussex, NJ","November 24, 2012","13,479"
Please only solution in awk.
Thank you for your help.
A: This one liner will work,
awk -FS="" 'BEGIN{ORS=""} {print substr($1, 1, length($1)-1) ((c%4==3)? "\n": ",");c=c+1;}' file
Here is a more elaborated version.
awk -FS="" 'BEGIN{
ORS="";
c=0
} {
print substr($1, 1, length($1)-1) ((c%4==3)? "\n": ",");
c=c+1;
}' < file
A: I think this is what you're looking for:
awk -v ORS="" '/"[0-9]{2},[0-9]{3}"/ { sub(/,$/,""); print $0 "\n"; next }1' file
Results:
"Shimshon A","(blank)","November 24, 2012","13,481"
"jonathan t","Laguna Niguel, CA","November 24, 2012","13,480"
"scott b","Sussex, NJ","November 24, 2012","13,479"
A: I know you said only awk. If you're willing to stretch:
paste -d "" - - - - < file | sed 's/,$//'
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 4,856 |
Q: On what SE site should I post a Chrome (browser) usability question? I'd like to ask a question about how to use Chrome profiles/persons.
On what SE site should I post such a question?
A: Super User looks like the right fit in general.
If you're on Mac, Ask Different is an option, as is Ask Ubuntu if you're on that platform. (Although Super User is ok for those too.)
If you're using Chrome on Android, ask over at Android Enthusiasts.
Web Apps doesn't fit, it is for using web applications, not the browser you're viewing them from.
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 8,689 |
2019 Tennessee CyberSecurity Collaboration Forum
April 18, 2019 – Gaylord Opryland Resort & Convention Center, Nashville
Diane Ball, CISSP
Vice President and Chief Information Security Officer
BlueCross BlueShield of Tennessee Peter Gallinari
Domain Information Security Officer
State of Tennessee, Department of Finance and Administration
Mark Hackney
Tennessee Bureau of Investigation Lester K. Mathews
University of Tennessee System
• Robert Banniza, Associate Vice President, Information Security, AmSurg
• Steve Barnard, Vice President Information Technology, EnergySolutions
• Ed Balsmann, Senior Vice President, Chief Compliance Officer, Jackson National Life
• Thomas Bartolomeo, Executive Vice President, Head of Cyber Security Defense and Monitoring, Wells Fargo
• Michael D. Boyd, Chief Information Officer, Southwest Tennessee Community College
• Charles Bertrand, Cyber Security Engineer and Chief Information Security Officer, Buckman Laboratories
• Scott Breece, Vice President and Chief Information Security Officer, Community Health Systems
• Stephen Brown, Senior IT Security and Cyber Analyst, University of Tennessee
• Curtis Campbell, Vice President, Manager, IT Procurement and Vendor Management, Atlantic Capital Bank
• Sean Datcher, Chief Technology Officer, Check Into Cash Online
• Andrea Di Fabio, Chief Information Security Officer and Associate Chief Information Officer, East Tennessee State University
• Jamie Engstrom, Chief Information Officer, Caterpillar Financial Services
• Ahmed Esmail, Chief Technology Officer, The Conrad Pearson Clinic
• Wes Floyd, Director IT Security, Kenco Group
• Eddie Gadsey, Chief Technology Officer, RCCH Healthcare
• Dennis Gendron, Chief Information Officer, University of Tennessee - Chattanooga
• Angela Gibson, Chief Information Officer, University of Tennessee Institute of Agriculture
• Aaron J. Goodwin, Chief Information Officer and Chief Information Security Officer, B. Riley Wealth
• Ricky Grant, Senior Cyber Security Architect, Volkswagen Group of America
• Ryan Hammer, Senior Director, Global Security and Risk, Asurion
• Tim Hill, Chief Information Officer and Senior Vice President, Lifeway Christian Resources
• David Holman, Chief Technology Officer, Clarksville Montgomery County School System
• Andrew Hutchinson, Executive Director Cyber Security, Vanderbilt University Medical Center
• John Jeffries, Chief Information Security Officer, Information Security Director, University of Tennessee Medical Center
• Joey Johnson, Chief Information Security Officer, Premise Health
• Walter Kolodziey, Chief Information Officer, American Bath Group
• Dawn Lambert, Chief Information Security Officer, Steward Health Care System
• Sandra D. Lindsey, Chief Information Security Officer, University of Tennessee Institute of Agriculture
• Scott Mackelprang, Chief Security Officer, Asurion
• Michael Mangold, Vice President, IT Infrastructure Services & Security, Tractor Supply Company
• Steve Marshall, Vice President, IT Services, Ingram Content Group
• Ron McClure, Chief Information Officer, Acadia Health
• Shawn McClure, System Security Officer, Chief Information Security Officer, Shelby County
• Gray Mitchell, Chief Information Security Officer, TeamHealth
• Paul Novak, Vice President, IT and Cyber Security, A. O. Smith
• Jason Powell, Vice President, Chief Information Security Officer, Brookdale Senior Living Center
• Robert Ridenour, Chief Information Security Officer, University of Tennessee System
• Rockwell Scott, CISSP, Chief Information Officer, Delek US Holdings
• David Ulloa, Chief Information Security Officer, Technology Solutions, IMC Companies
• Jan J. van der Aa, Vice Chancellor for IT and Chief Information Officer, University of Tennessee Health Science Center
• Steve Vieira, Chief Information Officer, Tennessee Board of Regents
• Dan Wittig, Chief Information Security Officer, Louisiana Pacific Corporation
Thank you to the Leadership Board who developed the agenda based on their insights and direction.
View Final Agenda
Gaining Visibility as an Information Security Executive
As the information security experts within your organizations, you understand the critical nature of your role. The problem is conveying that importance throughout the company. Join Diane Ball as she outlines the responsibility you have as a business leader, thought leader and people leader. Learn ways to take more initiative, gain influencing power, and better frame your messaging as you communicate up, down and across all levels of the business. - Sponsored by Duo Security -
Vice President and Chief Information Security Officer, BlueCross BlueShield of Tennessee
Elements of an Effective Endpoint Security Strategy
To minimize attack vectors, organizations must reevaluate their overall endpoint security strategy. In this fireside chat, David Ulloa and Egon Rinderer outline how a shift toward a multilayered approach can enhance endpoint protection and better protect users. Learn how comprehensive analysis of user behavior coupled with customizable security tactics will fit your individual organization's needs can mitigate common critical risks. - Sponsored by Tanium -
David Ulloa, ME
Chief Information Security Officer, Technology Solutions, IMC Companies LLC
E. Egon Rinderer
Global Vice President, Enterprise Services and Federal Chief Technology Officer, Tanium
Identifying and Managing Cloud-Based and Third-Party Risk
With the industry moving to software as a service for cloud-hosted platforms, there's the assumption that these types of services are confidential, widely available and have data integrity. This isn't always the case, as increasing reliance and exposure to third parties comes with new risks. Join Rockwell Scott as he outlines those risks and misconceptions. Learn the steps you must be taking to ensure vendors meet your needs and gain an understanding of opportunities to better protect your organization when using the cloud.
Rockwell Scott, CISSP
Chief Information Officer, Delek U.S. Holdings
In Case of Breach: Strategizing Incident Response Practices
How do defense tactics differ depending on attack vectors? What ways must an incident in a cloud-based environment be handled differently? In this Executive Boardroom, Jan van der Aa and Chris Madeksho outline a real-world case study of a full-fledged assault on email accounts in the cloud. The session then opens up to a collaborative discussion where participants outline how their own organizations would handle threats. Work across sectors to examine tactics and best practices to prepare for, respond to and follow-up on an incident. - Sponsored by ExtraHop -
Jan J. van der Aa, PhD
Vice Chancellor for IT and Chief Information Officer, University of Tennessee Health Science Center
Chris Madeksho, CISA CRISC
Information Security Coordinator, Information Technology Services, University of Tennessee Health Science Center
Kanen Clement - Moderator
Principal Sales Engineer, ExtraHop
Social Engineering to Mitigate Insider Threats
Your workforce can be your greatest ally, but they can also be a significant threat. Special Agent Tim Marsh brings FBI case studies to identify common insider risks and the dangers they pose to organizations. Learn how to recognize risky human behaviors within and around your organization and gain an understanding of how to use that knowledge to identify these threats and understand tactics to mitigate problems before they start.
Timothy S. Marsh
Counterintelligence/Cyber Program Private Sector Coordinator, Federal Bureau of Investigation Memphis Field Office
Defining Better Risk Assessment Standards
While risk assessments are necessary to identify crucial gaps in security, the 200-plus-word surveys that are common often lack the cohesion and standardization necessary to easily and clearly provide solid answers. This Executive Boardroom discussion takes aim at the root causes of what isn't working and develops best practices to create tactical, more streamlined assessments.
Executive Director, VUMC Enterprise Cybersecurity, Vanderbilt University Medical Center
Steven Barnard
Vice President, Information Technology, EnergySolutions
Mending the System: Leveraging a More Inclusive Talent Pool
The talent shortage in information security is nothing new, and yet, organizations are put under continuous stress as the issue grows. This deep-dive gets down to the root behind the shortage, identifying opportunities to improve educational programs and develop tactics and best practices to identify and secure viable talent.
Supplemental Document
John Jeffries
Chief Information Security Officer and Information Security Director, University of Tennessee Medical Center
Dawn E. Lambert
Chief Information Security Officer, Steward Health Care System
Secure Strategies: Cyber Security Maturity Assessment and Roadmap
How mature are our current cyber capabilities? How mature should they be based on our size and industry? How do we compare to others? How do we build a multi-year roadmap to fill the gaps? These are all questions that most information security executives are asking today. These are questions A.O. Smith began asking in 2015. Hear how A.O. Smith worked to create a customized maturity assessment model and roadmap. Learn how they implemented that multi-year plan all while continuously updating the model and reporting to the Board.
Paul Novak
Vice President of IT, A.O. Smith
Cultivating Confidence in Digital Transformation
Today, new technology capabilities are vastly outpacing those from just a few years ago. Oftentimes, it's still a struggle to understand what exposure vectors are and how to create an integrated strategy that enables innovation while managing risk around the most important parts of new and evolving business operations. The new face of business requires organizations to manage and coordinate cross-functionally, with more fluidity and agility than ever before. When it comes to digital risk, many leaders are grappling with where to start, where to go next and how to keep a sustainable and evolving strategy aligned with the business. This session will discuss critical capabilities for success in Digital Risk Management, and outline how organizations can gain confidence as they embrace digital transformations. - Sponsored by RSA -
Peter Beardmore
Director of Marketing for Digital Risk Management Solutions, RSA
Hacker Lab: Closing the Gaps in Cyber Defense
Cyber breach headlines are now commonplace despite our best efforts and increasing investments in "next gen" technologies. The reason – cyber criminals adapt – sometimes taking advantage of the very tools we use for protection. To understand how cyber criminals still get through traditional defenses and move undetected within a network to compromise systems, you must enter the mind of a hacker. In this session, Josh Smith and Robert Dowling examine the changing cyber threat landscape and present a live cyber-attack to demonstrate threat-faithful tactics used by motivated cyber criminals. As the attack unfolds, you'll see the both the attacker's and the victim's screens as an Elite Ethical Hacker moves among systems and steals data. - Sponsored by Dynetics -
Robert Dowling
Cyber Risk Practice Lead, Dynetics
Senior Cybersecurity Analyst, Dynetics
Optimizing your GRC
Employing Governance, Risk and Compliance (GRC) technology enables the organization, leadership and operation of IT areas within a business, ensuring all elements align with a company's strategic objectives. The model ensures corporate risk strategy is balanced, with defined responsibilities for risk oversight, and that accountability is clearly defined. Scott Breece examines the fundamental components for successful GRC implementation and optimal use, enabling compliance with regulatory requirements and sound financial, operational and regulatory decision-making on managing enterprise risks. - Sponsored by Forescout Technologies -
Scott Breece
Vice President of Security and Chief Information Security Officer, Community Health Systems
Gaining C-Suite Buy-In
To gain approval and financial backing from your executives, you have to be prepared. Preparation comes in many forms such as confidence, business sense, technical expertise, understanding their mindsets, self-awareness and support of your peers. Your goal is to make them aware of the threats posed to the organization and the remediations needed. Internal and external forces will help you get acceptance now and in the future. You will succeed if you are prepared.
Aaron J. Goodwin
Chief Information Officer and Chief Information Security Officer, B. Riley Wealth
Ensuring Your Incident Response Plan Works When You Need it Most
Last year, East Tennessee State University (ETSU) became the victim of a phishing attack that resulted in a potential data breach of sensitive employees' information. This session provides a deep dive into ETSU's incident response (IR) plan, from incident identification to resolution and lesson learned. The session will examine the role of key internal and external partnerships and discuss how the slower and meticulous approach to evidence gathering affects senior leadership's damage control plan. This session will also look at how ETSU transformed its security controls and IR plan after post mortem incident review.
Andrea di Fabio
Chief Information Security Officer and Associate Chief Information Officer, East Tennessee State University
Overhauling Cybersecurity Infrastructure
Les Mathews and Robert Ridenour will discuss creating a cybersecurity program based on the NIST Cybersecurity Framework that includes risk management, procedure development and controls implementation. The success of the University of Tennessee System Administration (UTSA) IT security program is based on a sound plan developed from the Framework as well as engagement by the leadership and staff of UTSA. Les and Robert will outline how they accomplished both of these tasks.
Lester K. Mathews
Chief Information Officer, University of Tennessee System
Robert Ridenour
Chief Information Security Officer, University of Tennessee System
Navigating Security and Privacy On-Prem and in the Cloud
With an ever-changing threat landscape, we've seen the convergence of Data Privacy and Cybersecurity functions as a response to those shifting risks. To stay ahead of bad actors, these two teams need to work closely together to ensure they have a complete data protection program in place to cover all aspects of data security. This session will outline key components of effective data security programs within organizations and within the cloud. This is all with the ultimate goal of establishing an environment in which data privacy and data protection teams across the State of Tennessee are able to successfully fulfil regulatory and state obligations, both individually and in concert, through diffusion of knowledge and supportive connections.
Peter Gallinari
Domain Information Security Officer, State of Tennessee, Department of Finance and Administration
Using AI and Automation to Protect Against Emerging and Advanced Threats
Beyond buzzwords, AI and automation capabilities are making great strides in disrupting and improving cybersecurity. This Executive Boardroom is a collaborative deep dive into demystifying common misconceptions and identifying opportunities where AI and automation have great potential. Join Dr. Kevin Mahoney and John Jeffries as they outline opportunities to implement AI and UEBA to fortify protection, defense and remediation capabilities. - Sponsored by Fortinet -
Kevin Mahoney, PhD, JD
Practice Director, Enhanced Technologies – ATP, Fortinet
Final event speakers.
BlueCross BlueShield of Tennessee
View Bio Steven Barnard
Vice President Information Technology
EnergySolutions
Director of Marketing for Digital Risk Management Solutions
RSA Scott Breece
Vice President, Chief Information Security Officer
Community Health System
Kanen Clement
Principal Sales Engineer
View Bio Andrea Di Fabio
Chief Information Security Officer and Associate Chief Information Officer, Information Technology Services
Cyber Risk Practice Lead
Dynetics
View Bio Peter Gallinari
Chief Information Officer and Chief Information Security Officer
B. Riley Wealth
View Bio Gina Greenwood, JD, CIPP/US
Attorney - Shareholder
Tennessee Bureau of Investigation
View Bio Byron Herlong
Lead Systems Engineer – Unix
David Holman
Clarksville Montgomery County School System
View Bio Andrew Hutchinson
Executive Director, VUMC Enterprise Cybersecurity
Information Security Director
University of Tennessee Medical Center
View Bio Geoffrey F. Jenista, CISSP, MBA, MA
Cyber Security Advisor, Region VII (MO, KS, IA, NE)
Cybersecurity and Infrastructure Security Agency, Cybersecurity Division Stakeholder Engagement and Cyber Infrastructure Resilience
Chief Information Security Officer, West Division
Steward Health Care
View Bio Chris Madeksho, CISA CRISC
Information Security, Information Technology Services
University of Tennessee Health Science Center
Practice Director, Enhanced Technologies – ATP
View Bio Timothy S. Marsh
Special Agent, Counterintelligence/Cyber Program Private Sector Coordinator
FBI Memphis Field Office
View Bio Paul Novak
Vice President, IT and Cyber Security
University of Tennessee System E. Egon Rinderer
Global Vice President, Enterprise Services and Federal Chief Technology Officer
Tanium
Delek U.S. Holdings
View Bio Josh Smith
Senior Cybersecurity Analyst
Chief Information Security Officer, Technology Solutions
IMC Companies, LLC
View Bio Jan van der Aa
Vice Chancellor for Information Technology and Chief Information Officer
Kyle Yoches
Keynote Presentation
Dynetics was founded in Huntsville, Alabama in 1974 to provide engineering expertise to high value, high-risk national security missions within the Department of Defense and NASA while also providing similar expertise to large commercial businesses such as Ford and Chrysler. Since 2000, Dynetics has provided information security expertise to commercial and government clients ranging in size from small local businesses to large agencies and Fortune 100 corporations. Today, Dynetics leverages offensive security expertise to assess, optimize and test cybersecurity and ensure effective cyber risk management programs. www.dynetics.com
Executive Boardroom
ExtraHop provides enterprise cyber analytics that deliver security and performance from the inside out. Our breakthrough approach analyzes all network interactions and applies advanced machine learning for complete visibility, real-time detection, and guided investigation. With this approach, we help the world's leading enterprises including Hasbro, Credit Suisse, Caesars Entertainment, and Liberty Global to rise above the noise of alerts, organizational silos, and runaway technology. Whether you're investigating threats, ensuring delivery of critical applications, or securing your investment in cloud, ExtraHop helps you protect and accelerate your business. Learn more at www.extrahop.com
The Fortinet vision is to deliver broad, truly integrated, high-performance security across the IT infrastructure. We provide top-rated network and content security, as well as secure access products that share intelligence and work together to form a cooperative fabric. Our unique security fabric combines Security Processors, an intuitive operating system, and applied threat intelligence to give you proven security, exceptional performance, and better visibility and control--while providing easier administration. In addition to our flagship enterprise firewall platform, complementary products can be deployed with a Fortinet FortiGate to enable a simplified, end-to-end security infrastructure. www.fortinet.com
Best Practice Partner
RSA, a Dell Technologies business, offers business-driven security solutions that uniquely link business context with security incidents to help organizations manage digital risk and protect what matters most. RSA's award winning cybersecurity solutions are designed to effectively detect and respond to advanced attacks; manage user identities and access; and, reduce business risk, fraud, and cybercrime. RSA protects millions of users around the world and helps more than 90% of the Fortune 500 companies thrive in an uncertain, high-risk world. For more information, go to rsa.com
Tanium offers a proven platform for endpoint visibility and control that transforms how organizations manage and secure their computing devices with unparalleled speed and agility. Many of the world's largest and most sophisticated organizations, including half of the Fortune 100, top retailers and financial institutions, and four branches of the US Armed Forces rely on Tanium to make confident decisions, operate efficiently and effectively, and remain resilient against disruptions. Tanium recently ranked 4th on the Forbes list of "Top 100 Private Companies In Cloud Computing For 2018" and 55th on FORTUNE's list of the "100 Best Medium Workplaces". Visit: www.tanium.com
Session Host - Keynote
Duo Security helps defend organizations against data breaches by making security easy and effective. Duo Beyond, the company's category defining zero-trust security platform, enables organizations to provide trusted access to all of their critical applications, for any user, from anywhere, and with any device. The company is a trusted partner to more than 10,000 customers globally, including Dresser-Rand, Etsy, Facebook, K-Swiss, Random House, Yelp, Zillow, Paramount Pictures, and more. Founded in Michigan, Duo has offices in Ann Arbor and Detroit, as well as growing hubs in Austin, Texas; San Mateo, California; and London, UK. Visit: duo.com
Session Host
Forescout Technologies is the leader in device visibility and control. Our unified security platform enables enterprises and government agencies to gain complete situational awareness of their extended enterprise environment and orchestrate actions to reduce cyber and operational risk. Forescout products deploy quickly with agentless, real-time discovery and classification of every IP-connected device, as well as continuous posture assessment. As of December 31, 2018, 3,300 customers in over 80 countries rely on Forescout's infrastructure-agnostic solution to reduce the risk of business disruption from security incidents or breaches, ensure and demonstrate security compliance and increase security operations productivity. Learn how at www.forescout.com
Recorded Future delivers the only complete threat intelligence solution powered by patented machine learning to lower risk. We empower organizations to reveal unknown threats before they impact business, and enable teams to respond to alerts 10 times faster. To supercharge the efforts of security teams, our technology automatically collects and analyzes intelligence from technical, open, and dark web sources and aggregates customer-proprietary data. Recorded Future delivers more context than threat feeds, updates in real time so intelligence stays relevant, and centralizes information ready for human analysis, collaboration, and integration with security technologies. 91 percent of the Fortune 100 use Recorded Future. www.recordedfuture.com
www.zscaler.com
Emerging Game Changers
Binary Defense is a leader in cybersecurity. As a Managed Security Service Provider (MSSP), Binary Defense manages every aspect of cybersecurity environments for organizations of all sizes in all industries. Our service and technology solutions identify and isolate threats, ultimately working to protect our clients' data, brands, and people. Leading SOC-as-a-Service from a US based Security Operations Center (SOC) monitors clients 24/7/365. Binary Defense's proprietary Endpoint Detection and Response (EDR) can manage every aspect of an endpoint security environment, rapidly identifying and isolating endpoint threats to stop breaches and keep organizations secure. Real people detecting real threats in real time. www.binarydefense.com
Nyotron pioneers a new generation of automatic Endpoint Detection and Response with integrated protection called Endpoint Prevention and Response (EPR). Our product prevents damage from malware that evades existing security layers and offers granular visibility into the attack source, timelines and TTPs. Based on the OS-Centric Positive Security, Nyotron's PARANOID automatically whitelists trusted operating system behavior and rejects everything else. No manual threat hunting, disk scanning, machine learning or cloud connectivity required. With PARANOID organizations gain true defense-in-depth protection against the most advanced attacks. Nyotron is headquartered in Santa Clara, CA with an R&D office in Israel. www.nyotron.com
Gaylord Opryland Resort & Convention Center
2800 Opryland Dr.
Phone: 1.615.889.1000 | Website
Room Reservation and Info: Click Here
Please contact Steve about any of your Forum or sponsorship needs.
Steve Bangsund
D: 503.765.5117 | M: 503.481.5263
E: steveb@cxocollaboaration.com
With nearly 30 years of Federal and private sector industry experience, Egon leads Tanium's global Technical Account Management organization. The TAM organization is made up of over 230 of the world's finest technologists who specialize in the deployment, use, operationalization, and integration of Tanium throughout our 20+ million customer endpoints. Prior to joining Tanium, Egon was with Intel Corporation and served in the US military and intelligence community.
Kanen is an experienced systems engineer based out of Nashville, TN with a degree in computer science and a strong background in both healthcare IT operations and higher education. Prior to joining ExtraHop Kanen worked as a Systems Architect for a large healthcare system. He prides himself with having a broad technical skill-set and a knack for problem-solving, and is highly experienced in cyber forensics and threat hunting using network traffic analysis.
Dr. Kevin Mahoney is a 20-year veteran of the IT industry. He currently runs the Advanced Threat Protection Practice for a leading cybersecurity vendor. Kevin holds a PhD in IT Management from Capella University and a JD in Technology Law from Purdue University.
Rockwell Scott, CISSP, is a technology executive with more than 25 years of experience in IT engineering and supply chain/logistics management. As the CIO of Delek US Holdings, he is responsible for cybersecurity as well as the business and technology alignment for the publicly held businesses of Delek US (DK) and Delek Logistics (DKL). As the Partner and GM of Supply Chain Engineering at Microsoft (MSFT), Scott was responsible for the digital transformation of the supply chain systems as well as the migration to cloud and PaaS. His most recent leadership positions, prior to joining Microsoft, were VP and CIO of the Americas for Ingram Micro (IM) and CISO of BrightPoint (CELL). Before joining the wireless and logistics industry, Scott held various senior IT management positions within several U.S. and U.S./multinational organizations.
Scott has earned numerous industry-recognized accreditations, including field and design engineer certifications from several vendors. He has also been awarded the designation of CISSP®, a globally recognized standard of achievement in information assurance.
Scott holds a Masters and Advanced Certificates in Information Systems Security Management and is currently enrolled in an International MBA program with a focus on global organizational effectiveness.
Gina Greenwood, JD, CIPP/US
Ms. Greenwood concentrates her practice on a wide range of privacy/security matters.
These include cyber liability, risk management, big data issues, financial, personal and medical data breaches and the investigation, response, notification and defense of data breaches, HIPAA Privacy and Security Rule compliance and HIPAA breaches; HITECH Act Compliance (including HIPAA updates, meaningful use of Certified EHR incentive program compliance and meaningful use audit responses); Red Flag Rules compliance; Genetic Information Nondiscrimination Act (GINA) compliance; 42 C.F.R. Part 2 federal alcohol and drug abuse privacy compliance, FTC Act privacy/security compliance, PCI Standard Compliance, state privacy laws, identity theft, IT and EHR implementation and donation; Patient Protection & Affordable Care Act (Health Reform or PPACA) and physician integration accountable care organizations (ACOs); Emergency Medical Treatment and Labor Act (EMTALA) compliance, investigations, hearings, and survey responses; fraud and abuse compliance plans, advice and investigations (Stark Law, Anti-Kickback Statute and False Claims Act, etc.); Medicare/Medicaid audits, Joint Commission and licensure compliance and training boot camps; reimbursement issues; certificate of need (CON) matters; hospital and medical staff bylaw drafting and revision; drug diversion and selfreporting; risk management assessments; emergency preparedness (pandemic/Ebola); mental health issues and psychiatric and substance abuse involuntary commitment and guardianships; corporate health care transactions (including due diligence, change of ownership and compliance issues); contract drafting and general business advice; and many other regulatory and compliance matters pertinent to large and small businesses, device/pharmaceutical manufacturers and health care entities (such as hospitals [including psychiatric and critical access hospitals], pharmacies, hospices, skilled nursing facilities, dialysis centers, clinics, physician/dental practices, home health agencies and assisted living facilities).
Ms. Greenwood has authored numerous data privacy/security and health care materials including HIPAA Privacy and Security policy manuals, licensure policy manuals, Internet-based employee training modules, fraud and abuse compliance plans/programs and employee manuals. She is a frequent speaker on the topics of licensure/Joint Commission compliance, avoiding medical malpractice, reporting medical errors, electronic health records, fraud and abuse, HIPAA and EMTALA compliance data breaches and various other health care topics.
Prior to graduating from law school at Mercer University, Ms. Greenwood interned for the Honorable Judge Tommy Day Wilcox Jr., Superior Court Judge of the Macon Judicial Circuit in the summer of 1999.
Ms. Greenwood received her J.D. degree with Advanced Legal Writing Certification from Mercer University School of Law, where she earned the Faculty's Award for Outstanding Achievement in Legal Writing. Ms. Greenwood has been recognized in Chambers USA as a leading lawyer in health care and has been selected as one of "Georgia's Legal Elite" in Healthcare Law by Georgia Trend Magazine. Ms. Greenwood was selected by the U.S. Commission on Civil Rights as a national EMTALA legal expert and provided oral testimony for a U.S. Commission on Civil Rights (USCCR) hearing in Washington, D.C., and corresponding written testimony, which was included in the USCCR "Patient Dumping" report to U.S. Congress (submitted September 2014).
Ms. Greenwood plays a very active role in her community and various civic organizations, including her church. Ms. Greenwood serves on the Vineville United Methodist Church Pleasant Hill Committee. She recently rotated off the United Methodist Women Executive Board, the Counsel on Ministries Committees and the Goodwill Fundraising Gala Committee. She serves on Campus Clubs Ministries Board of Directors. She and her husband also serve as host parents to a child at the Masonic Home of Georgia.
David Ulloa is the Technology Solutions / CISO for the IMC Companies and Affiliated, with corporate offices located in Memphis. The IMC Companies provides all back-office services to the IMC Companies Group. With a team over 2,000, IMC Companies' comprehensive, integrated network of trucking transport and support centers give its customers the advantage of local market knowledge combined with coast-to-coast coverage. David has over 20 years of experience in the Information Systems fields across multiple industries, from automotive to pharmaceutical, from manufacturing to custom brokerage. David has a passion on empowering the next generation while building the current one. David is part of the board of directors on the Society for Information Management at the Memphis Chapter, additionally he is part of leadership team for the local VMUG Memphis group and several other organizations. David is currently focused on supporting the overall company vision by leading the strategic information security efforts. During his spare time, David loves to play soccer and chess with his kids.
Dawn Lambert is Chief Information Security Officer for Steward Health Care's West Division (formerly IASIS Healthcare). Founded in 1998, privately held IASIS Healthcare owned and operated 16 acute care hospitals and one behavioral health hospital throughout the U.S., including in Arizona, Arkansas, Colorado, Louisiana, Texas and Utah. In total, IASIS had more than 3,800 licensed beds and employed more than 13,000 dedicated professionals. IASIS Healthcare had been named among the Fortune 1000 as one of America's biggest, most successful companies in 2014. Being included in this list gives special recognition to the bold, innovative efforts the company has taken this past year as a health services organization and represents a tribute among business accolades.
On October 1, 2017, Steward Health Care purchased IASIS Healthcare, making Steward the largest privately held for-profit hospital operator in the United States. Steward has 36 community hospitals across 9 states and the country of Malta serving over 800 communities, with more than 40,000 employees.
As the Chief Information Security Officer for Steward's West Division, Ms. Lambert provides guidance on security rules and regulations to ensure that information and data can be shared in a timely manner with the public while protecting the individual's privacy as required by law. She works with the West Division's Information Technology Directors located within the hospitals.
Ms. Lambert earned a Bachelor of Applied Arts and Sciences from Lamar University in Beaumont, TX. Her concentration was in business and computer science. Her work history includes serving as Professor in Computer Programming, IS/IT director, Registration/Scheduling/Insurance Verification Director, Assistant Administrator, Regional Compliance/Privacy Officer, Chief Privacy Officer and Chief Information Security Officer. Her background in programming and technology has served her employers well in the past several years with the merging of technology and compliance.
Ms. Lambert joined the Health Care Compliance Association and the Society of Corporate Compliance and Ethics in 2013. She actively contributes to the roundtables and discussions hosted by these two associations. This platform allows her to share her expertise and knowledge with others while gaining valuable insight from them. Synergy of compliance professionals through the use of technology, such as these, will be an invaluable tool in the coming years as our profession continues to evolve.
Dawn is a native of Texas where her 3 children and 5 grandchildren live. She currently resides in Tennessee with Sasha, her "fur" child, a rescued Siberian Husky. She enjoys hiking with Sasha and working in her yard. She is active in the "Live Service Out" projects that give back to the community.
Robert Dowling is the Cyber Risk Practice Lead for Dynetics, Inc. in Huntsville, AL where he is responsible for developing cyber risk management solutions to address business and technical risks and serves as the primary interface to customers, business partners and associations. Robert is a frequent speaker on cyber risk across multiple industries.
Robert has supported systems and software engineering for NASA and Defense programs before moving into business development for companies such as Northrop Grumman and SAIC. Robert graduated with honors in Computer Engineering from Auburn University where he was also a member of the 1983 SEC Championship Football team.
Josh Smith is a Sr. Cybersecurity Analyst and has been in the information security field for over 10 years. He currently holds several certifications, including OSCP, CISSP, GWAPT, GAWN, VCP, and Security+.
As an Elite Ethical Hacker, Josh focuses on red teaming, penetration testing, vulnerability assessments, and web application assessments. Josh also has extensive experience developing defense-in-depth environments and equipping clients to manage the complexity and concerns of today's cyber threat landscape. Josh is a graduate of Mississippi State and former professional golfer.
Geoffrey F. Jenista, CISSP, MBA, MA
Mr. Jenista serves as Cyber Security Advisor, Region VII, for the Office of Stakeholder Engagement and Cyber Infrastructure Resilience, Cybersecurity Division, Cybersecurity and Infrastructure Security Agency (CISA). He supports the Department of Homeland Security's (DHS) mission of strengthening the security and resilience of the nation's critical infrastructure.
His program coordinates cyber preparedness, risk mitigation, incident coordination, and cyber security policy promotion & situational awareness resources, including assessments, to the nation's sixteen critical infrastructure sectors and state, local, tribal, and territorial government entities.
Prior to joining the Department of Homeland Security he worked for the U.S. Army as an Army Enterprise Systems Branch Chief and Information Systems Security Manager. Prior to joining the U.S. Army he served in the U.S. Navy as a Senior Chief Petty Officer, holding duties as an Executive Officer, Weapons Officer and AEGIS Maintenance Supervisor from 1983 to 2005.
Mr. Jenista holds a MBA and a MA in Information Technology Management from Webster University. He has a BS in Computer Information Systems from Park University and he holds the Certified Information System Security Professional (CISSP) certification.
David Holman serves as the Chief Technology Officer for the Clarksville-Montgomery County School System (CMCSS) in Clarksville, Tennessee. In his current role, David provides the strategic vision for the district's technology department and infrastructure, supporting the achievement of all 35,300 students. He led the district's 1:1 initiative for all 20,300 high school and middle school students and increased accessibility of computers for elementary school students to 80%. Prior to joining CMCSS in 2005, David served as the Chief Information Officer and Director of Information Technology for American Package Express in California. With an extensive background in technology, information systems, and project management, David has more than 25 years of experience in government, corporate business, and healthcare industries. A graduate of California Polytechnic University in Pomona, California, David received his B.S. in Business Administration, specializing in finance, real estate, and law.
Paul Novak is a Vice President of IT at A.O. Smith, the world's leading manufacturer of water heaters and water technology. A.O. Smith is a $3B global manufacturer headquartered in Milwaukee with IT centered in Nashville. It has multiple manufacturing sites across North American, Europe and Asia focused on water heaters, boilers, filters and softeners.
Paul has responsibility for all infrastructure, cloud, information security, IT operations and governance. Over the past 5 years, Paul and his team have focused on creating a standardized, state of the art architecture across all layers of IT, while implementing a common business process within a single ERP system.
He has over 25 years of IT experience working in both industry and consulting. He started his career working for Accenture for 14 years, followed by industry jobs at Ecolab and Target. He then started his own consulting company before coming to A.O. Smith in 2013. Paul has a degree in Electrical and Computer Engineering from the University of Notre Dame.
Wes Floyd
Wes has spent more than 20 years in Information Technology the majority of that time in a leadership role, most recently as Director IT Security for Kenco Group. He currently serves on the Board of Directors for Chattanooga Technology Council and is the liaison for the Chatech Infosec Forum. Wes was one of the founding board members of the local Chattanooga ISSA chapter and served as Vice President. He served honorably in the Air Force Special Operations Command and continues to work as a veterans advocate. He can often be found giving his spare time in support of disaster relief and humanitarian aid with Team Rubicon. Wes holds a Bachelor's degree in Information Technology and is a Certified Information Systems Security Professional (CISSP).
Steven Barnard is the VP of Information Technology for EnergySolutions headquartered in Salt Lake City, Utah, focused on providing strategic direction and operational oversight. His mission is to align technology with the priorities of the business and establish IT as a partner in strategic projects with meaningful impact to the business's productivity and revenue.
Over the past 20 years Mr. Barnard has held multiple Information Technology leadership positions in heavily regulated industries including healthcare and aerospace dealing with a wide range of business functions and supporting technologies.
Mr. Barnard received his Bachelor of Science in Information Technology with a focus on Software Engineering from the University of Phoenix. He also earned an Associate degree in Networking and Information Technology from HTI in Phoenix, Arizona.
Byron Herlong
Byron Herlong is a Unix specialist with 20 years supporting Solaris, AIX, HPUX, and various Linux platforms, as well as enterprise storage. He was an instructor in fault analysis and network administration for Sun Microsystems, and has worked in the healthcare and banking industries before joining Tractor Supply Company 4 years ago.
Kyle Yoches is an Information Security Specialist who is working with Tractor Supply Company to develop and grow their Identity and Access Management strategy.
Les Mathews was named Chief Information Officer of the UT System in May 2014. The Chief Information Officer manages the Information Technology Services office and reports to the Chief Financial Officer. The Office of Information Technology Services supports the university ERP systems including Finance, HR, Payroll, Procurement, Research, and Development. In addition, this office is responsible for IT policy and promotes collaboration among the campuses and institutes in the areas of security, procurement, and operational efficiencies.
Les has worked at UT for more than 33 years. He started as a programmer/analyst in 1985 before being named Assistant Director of the System Payroll Office in 1991, and Director in 1994. In 2007, Les was named Assistant Vice President and in 2014 named Chief Information Officer for the UT system.
He serves as the chair of the Statewide Information Technology Committee and serves on a number of other committees including the Business Intelligence and Research Communities of Practice, and the Benefits Advisory Group.
A native of Tennessee, Mathews earned her bachelor's degree in finance at The University of Tennessee.
He lives in Farragut, Tennessee with his wife Pam.
Jan van der Aa
Jan J. van der Aa is currently the Vice Chancellor for Information Technology / CIO at the University of Tennessee Health Science Center (UTHSC). He serves in this role since October 2012. He is responsible for coordinating all IT services and resources in support of the UT-HSC Educational and Research missions and the associated Administrative functions.
Prior to joining UTHSC, he not only was an active member of University of Florida HSC clinical research projects, but also managed departmental Information Technology (IT) services and staff. Since mid-2000, Jan transitioned to IT full time and served as the University of Florida Health Science Center CIO since 2012 for close to 10 years.
Jan received degrees from the Eindhoven University of Technology in the Netherlands, including a doctorate in Medical Engineering, as well as a ME in Electrical Engineering degree from the University of Florida.
Chris Madeksho is the Information Security Coordinator at the University of Tennessee Health Science Center (UTHSC). She brings years of experience regarding many different aspects of Information Security Awareness Training. She also conducts penetration testing for phishing campus wide to conduct assessments on who is the most susceptible to attack. Other areas of responsibilities include various risk assessments (including HIPAA) and InfoSec policy management.
Prior to joining UTHSC, Chris was in the pharmaceutical industry for thirteen years, primarily dealing with medical information, reporting of adverse events and quality control.
She is a member of ISACA and holds CISA and CRISC certifications.
Chris received a Bachelor's degree from Christian Brothers University in Memphis.
Andrea Di Fabio is currently the Chief Information Security Officer (CISO) and Associate CIO at East Tennessee State University, where he plays a significant role in strategic planning, business process re-engineering, policy development, risk management, and technology transformation. He is currently an adjunct faculty at the university's college of computing. In his previous life, Andrea served twelve years as Norfolk State University's CISO, and two years as CIO supporting IT mission essential functions in a time of institutional crisis. In his spare time, he taught a wide range of hands-on IT security classes at Tidewater Community College and volunteered with local schools and ham radio clubs.
Andrea is a member of four prestigious CompTIA committees: The Executive Advisory Board, the Governance Board, the Technical Advisory Committee, and the Certification Development Committee. In these roles, Andrea helps facilitate the recruitment of qualified IT professionals worldwide and provides CompTIA with the support and expertise needed during the planning and development of globally recognized IT certifications.
Additionally, Andrea served as a member of the Commonwealth of Virginia Information Security Council where he recommended strategic direction on Commonwealth information security and privacy-related initiatives. He chaired and participated in multiple technology committees. He currently serves on the Tennessee Board of Regents CISO committee.
Finally, Andrea served as a member of the InfraGard Board of Directors. He was the InfraGard's Information Technology sector chief for Hampton Roads. In these roles, Andrea helped provide synchronized communication between local InfraGard leadership, FBI Coordinators, and area members, by promoting key insight into the IT sector to help protect and ensure the continuity of the critical infrastructure of the United States.
Andrea is currently seeking a Ph.D. in Information Assurance at Nova Southeastern University to inspire his young kids about the benefits of continued self-improvement and education. Andrea completed his Master of Science in Computer Science at Old Dominion University in Norfolk, VA where he also earned a Bachelor in Computer Engineering.
Aaron J. Goodwin is the CIO/CISO for B Riley Wealth Management, based in Memphis, and the CISO for the parent company, B Riley Financial, based in Los Angeles. B Riley Financial has over 1200 employees across 40 locations in the country that serve thousands of financial customers daily. Mr. Goodwin has over 15 years of experience in the Information Technology and Information Security fields and focuses on mentoring others in their desire to grow professionally within IT and business. Throughout his career with B Riley Wealth, formerly Wunderlich Securities, he has been in almost all job rolls within the IT Department, which has enabled him to be very nimble in all areas of technology. Today, Mr. Goodwin focuses on alignment with the business to forecast strategic roadmaps for their growth and resilience while delivering solid technology solutions. He is a Phi Beta Kappa and valedictorian graduate from ITT Technical Institute with a Bachelor of Applied Science in Information Security from ITT Technical Institute. In Mr. Goodwin's spare time, he enjoys doing things with his photography business and enjoying the outdoors.
John S. Jeffries is the Chief Information Security Officer for University Tennessee Medical Center (UTMC), where he is responsible for leading UTMC's diverse information security and IT risk strategy.
Prior to joining UTMC, John served in the military for 23 years active duty in the U.S. Navy. He joined the military in 1989 and served onboard various ships, aviation and submarine squadrons. He served in Operation Desert Shield/Storm the Persian Gulf War in 1991, Operation Enduring Freedom/Operation Iraqi Freedom in 2001, 2003, and 2009-2010. In this role, John held a top-secret security clearance and managed military service members regarding their professional performance measurements. He evaluated instructor presentations and the effectiveness of training programs of military commands. He conducted and arranged ongoing training and personal development classes for military service members.
Outside of the office, John is an active member in the cyber security industry. He has volunteered to lead campus visits and discussion about cyber security with local community colleges in Knoxville TN with cyber security students. He participates and supports the local ISSA chapter meetings. He organizes meetings with other cyber security professionals in the East TN area and is a member of the Knoxville Chapter InfraGard Team.
He received his master's degree from Trident University College.
Scott Breece is the Vice President and Chief Information Security Officer for Community Health Systems. He leads Information Security activities across all CHS hospitals, physician practices, multi-tiered data centers, and service centers. Mr. Breece's primary responsibilities include cyber security, risk management for regulatory compliance, identity management, threat and vulnerability management, security awareness, and Information Security strategy and architecture.
Mr. Breece has more than 17 years of experience in the healthcare industry in a variety of Information Technology and Security roles. He is a results-oriented Information Security leader who drives high quality, innovative, and effective enterprise solutions to strategically support the business and maintain acceptable levels of service. He is recognized for his ability to develop a customer-focused culture and strives to provide quality service while exceeding customer expectations.
Mr. Breece has a Bachelors of Science in Computer Information Systems from Middle Tennessee State University. His professional affiliations include HIMSS, Nashville Technology Council, ISSA, and ISACA. He enjoys volunteering his technology experiences to non-profit organizations and giving back to the community. Mr. Breece and his team were the 2010 Information Security Executive (ISE) Southeast winners for project of the year.
Tim Marsh transferred to the Memphis FBI Field Office in July of 2015 and was assigned to investigate Counterintelligence matters along with Cyber violations. After almost 15 years in the FBI working Counterintelligence matters Mr. Marsh has become an expert in all facets of this skill set. Reading people, understanding body language and most importantly becoming an expert in the science known as social engineering has allowed him to be very successful in speaking to numerous groups/companies as the FBI's Memphis Chapter InfraGard Coordinator as well as the division's Private Sector Coordinator.
Mr. Marsh began his career as a Special Agent with the FBI in 2004, where he was assigned to the New Orleans Field Office. Mr. Marsh investigated a variety of counterintelligence matters, and in 2009 was transferred to the Los Angeles Field Office where he continued his work with counterintelligence. In 2011, he was named Supervisory Special Agent of the cyber program in the New Orleans Field Office.
In 2012, Mr. Marsh was instrumental in identifying cyber-related victims and developing a method of effectively notifying impacted victims. Mr. Marsh was essential in the Cyber Division's redevelopment of the Guardian for Cyber threat tracking program. Additionally, Mr. Marsh drove to implement the Guardian for Cyber program, to include iGuardian, to be utilized throughout the US government effectively implanting Section 4 of Executive Order 13636. In April of 2013, and before his final transfer to Memphis, he was selected as the Unit Chief of the Cyber Division's Guardian Victim Analysis Unit responsible for ensuring the FBI successfully implemented the Guardian for Cyber program enterprise-wide. Before entering the FBI, Mr. Marsh worked as an engineer with a company in the Memphis area, specifically associated with the manufacturing of HID lighting products as well as computer/networking management. He received a Bachelor of Science degree from the University of Memphis in 1999.
Andrew Hutchinson is the Executive Director of Vanderbilt University Medical Center Enterprise Cybersecurity. In this role, he oversees information security strategy, policy, operations, and cybersecurity services for Vanderbilt University Medical Center.
Prior to his current role, Andrew served as the Executive Director of Strategy and Risk Management, overseeing the development, operation, and improvement of Vanderbilt's ITIL based service management processes. Andrew also directed Vanderbilt's Network Security team for a number of years prior to his involvement in IT Service Management.
Before moving to Vanderbilt University, Andrew lived in Chicago, Illinois and Holland, Michigan. He worked as an independent information security consultant and for a shared security services organization based in Grand Rapids, Michigan.
Andrew holds a Bachelor's degree from the University of Michigan, and is a current holder of the ISC2 CISSP certification and SABSA SCF certification.
Michael Mangold, CISM
Michael serves as Vice President, Infrastructure & Information Security for Tractor Supply Company. He is responsible for all aspects of Tractor Supply Company's infrastructure & information security program including enterprise network services, data center operations, IT governance, system/storage administration and end user support. Michael is also responsible for setting the information security strategy and business continuity and disaster recovery planning efforts.
Jamie Engstrom
Jamie Engstrom is the CIO of Caterpillar Financial Services. Prior to, she was the IT director of the Develop and Deploy department for Global Information Services at Caterpillar Inc responsible for the development and deployment of large-scale IT and business transformation initiatives that serve all Caterpillar lines of business including SAP implementations, modernizing the enterprise network and the enterprise roll-out of Microsoft Office 365. She additionally was the IT director for the Global Technology Services department responsible for strategy, deployment, and support of the compute and network infrastructure that serves all Caterpillar's lines of business, as well as connecting Caterpillar to suppliers and dealers worldwide. In 2017, Jamie was selected as a core Strategic Planning Committee (SPC) member and is actively engaged in establishing the refreshed corporate strategy.
Engstrom joined Caterpillar in 1999, holding a variety of positions with the company focusing on information technology. She has held various leadership positions in Information Technology including an international leadership role in Northern Ireland as the IT Manager for Electric Power, Caterpillar's power generation business. Before her leadership opportunities, she held positions in applications development, project management, 6 Sigma, Global Purchasing, and regional product owner matrix roles in Desktop and Help Desk Operations.
Engstrom earned a bachelor's degree in Management and Business Information Systems from Illinois State University, Bloomington, IL, and an MBA from Bradley University, Peoria, IL. She has also participated in a Women's Executive Development Program at Northwestern University, Kellogg School of Management and Duke University. In 2016, Jamie was awarded the Peoria 40 Leaders under Forty award. In 2018, Jamie was named as a Ones to Watch award honoree by the CIO Executive Council – judged by a panel of veteran CIOs and the CIO Executive Council members. Jamie serves on the Board of Directors for Easter Seals in central Illinois, the Illinois Cancer Care Advisory Board and volunteers for Junior Achievement.
Joey Johnson
Joey Johnson is Chief Information Security Officer at Premise Health, the nation's leading provider of employer sponsored health and wellness centers for employees with nearly 600 facilities across America. Joey is responsible for leading all organizational efforts related to security operations and engineering, security monitoring and incident response, information technology and security compliance, identity access management, policy development, security audit, third party risk management, and physical security to meet challenging security and compliance demands. In his eight years with Premise Health, Joey has been instrumental in implementing a proactive security and risk management environment focused business alignment, organizational risk awareness, and positioning security as a business enabler that is transformative in the healthcare industry.
Prior to joining Premise Health, Joey was the Chief Security Officer for the United States Department of Commerce, Office of Computer Services. He has over 18 years of experience in the cyber-security industry including leadership roles in both the public and private sectors, with a focus on organizations in the federal government, defense, information technology, healthcare, and transportation industries. Outside of Premise Health Joey maintains an active leadership presence in both the healthcare and legal cyber-security industries participating in numerous steering and advisory committees with the Healthcare Information Sharing & Analysis Center (H-ISAC), various threat intelligence and sharing groups, security news groups, and private/public sector partnerships. He serves on the Editorial Board for the Journal of Law and Cyberwarfare helping to shape the future national and international regulatory landscape around cybersecurity, and also works as an advisor and lecturer for the UCLA post-graduate Global Cyber Institute program. Joey additionally works as an advisor and board member with various cyber security product & technology investment organizations, internationally renowned university law schools, as well as frequently serving as a keynote speaker at numerous security and regulatory industry events.
In 2016 Joey was recognized as the Nashville CISO of the by the Nashville Technology Council, followed by being recognized the 2017 Southeast US Security Executive of the Year, and finalist for the North America Security Executive of the Year. The Premise Health security operations team was recently recognized by CSO Magazine as winner of the 2018 CSO50 awards for having one of the top fifty national cybersecurity projects for the year.
Peter Gallinari, over 44 years of experience in Information Technology, with 25+ years as a professional leader in the field of Data Privacy, Cyber Security & Compliance. Industry expertise in Financial services, Health Care and Government Sectors. Have held positions as: Chief Data Privacy Officer for the State of Tennessee, Domain Information Security Officer for the State of Tennessee, former Chief Security Officer at GE Capital and GE IT Director of Operations, and Chief Security Officer supporting 3 hospitals in New York. Regulatory compliance leader for GLBA, SOX, HIPAA, FISMA, FERPA, FTI, CJIS, SSA, EU Privacy Directive (GDPR), Commercial compliance for PCI. Subject matter participant in support of Cloud innovative solutions (how to prepare to meet compliance). Keynote speaker for cyber security conferences, both public and private sector audiences.
Twenty four years of extensive information systems experience, including nineteen years of middle and executive level management in the public sector of state government, and more than five years of private industry experience in systems consulting. Progressive responsibility from Consultant Sales Engineer to Executive Director of Data Center Operations, and currently, Chief Information Officer. Possess outstanding leadership skills in the areas of customer and human resource management, as well as in developing technology solutions to meet business requirements, including knowledge of networking, firewall functionality, host and network intrusion detection systems, operating systems, databases, encryption, load balancing, and other technologies. In depth knowledge of the public sector industry, providing the expertise to maintain and develop strong and varied technical and procurement skills, as well as, management of a large staff in both information technology and operational areas. Authored Governmental News article, published nationwide to assist other public sector technology organizations with green IT initiatives. Currently serve as Information Security Officer for Criminal Justice Information Systems (CJIS) data in the state of Tennessee.
Diane Ball is Vice President (VP) and Chief Information Security Officer (CISO) for BlueCross BlueShield of Tennessee. She has been in this role since November 2015.
Diane is a proven leader well-versed in influencing change, developing internal and external customer relationships, and building technically diverse and engaged teams across a broad range of information technology disciplines. She is a Certified Information Systems Security Professional (CISSP) offering over 20 years of security management practice. Diane has also lead privacy, enterprise risk, records management, and operational risks programs.
Throughout Diane's career, she has served as the CISO for Fujitsu America Inc., and as Director of Enterprise Security, Privacy & Records Management for BlueCross BlueShield of North Carolina. She began her Information Security career at Wachovia Bank, where she was successful at building many components of Wachovia's information security programs as well as the technology operational risk program.
Diane held an instructor position with Dale Carnegie in which she facilitated a course in leading individuals to improve human relation skills, leadership skills, and stress management.
Diane earned a Computer Science Associates Degree from Pellissippi State Community College and a Business and Administration Management degree from Tusculum College. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 4,715 |
Q: Induced Emf in turning coil
From the photo, why is the emf zero? Wont it cut field lines when it rotate? When it cut field lines wont there be a change in magnetic flux? Thankyou.
A: Magnetic flux is the area integral of the flux density ($B$) component perpendicular to the area (in this case the coil area). Since the flux density is always parallel to the coil area in the example, the flux is zero, and with it the change of flux, which results in zero EMF.
Thus, the conductor cutting field lines is not relevant for induction, but rather the area inside the loop cutting field lines at some angle (which it doesn't in the example provided).
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 3,859 |
Dogs GO WILD for Alaska Salmon
By Brooke Arnold
Posted on Apr 2, 2014
Dogs all over the country are going wild because of one man's passion for dogs coupled with his personal motivation to stop practicing law.
14 years ago, Brett Gibson was in his kitchen in Anchorage, Alaska, cleaning three Sockeye salmon he had just caught in the Russian River and feeding the scraps to his boxer, Kila. At that moment, a news special came on television explaining that the Alaskan salmon industry was suffering because there was no market for all the scraps after the fish were processed and filleted.
Brett thought to himself, "For hundreds of years Alaskans have been feeding salmon to their sled dogs. Why aren't we making dog food and treats with it?"
After a year of educating himself on the nutritional needs of dogs and experimenting with recipes, Yummy Chummies became a reality. The Wild Alaska Salmon dog treats quickly became a mainstay in Alaska – and still can be found in nearly any grocery or pet store in the state. In fact, Yummy Chummies outsell any other product on a weekly basis in the 3 Alaskan Costco stores! About 5 years ago, the little homegrown treat company began growing significantly. Brett tells us, "Eventually the sales of Yummy Chummies in the 'lower 48' were higher than sales in Alaska. We were making due but it became more challenging to justify manufacturing in Alaska because of logistics and economics." You see, the popular treats began selling regionally in the Lower 48 but it was very expensive to deliver from Alaska and they were at the mercy of Mother Nature. "When a shipment gets delayed because of weather, our customers don't care about that. They only see that the product wasn't delivered on time."
So, Brett made some large investments in Alaska that allowed him to secure 110,000 pounds of fresh salmon, halibut and cod daily. "We get the trim. The frames and bones are high in calcium, the heads are a good source of chondroitin, protein and collagen. The bellies and collars are all meat and high in omega fatty acids. The only thing we don't get is the guts – our fish is very clean." After the fish are filleted for human consumption, the rest of the fish is packed into human-grade totes then ground and frozen to -10 degrees – every day.
"Sometimes I'll open up a carton in our plant and there will be a whole fish in the box because maybe the machine didn't cut it properly and now they can't sell it." Brett chuckles, "I'll take it home and eat it! We put a vacuum sealing machine in the plant, and my employees take fish home and feed their families with it." That's a testament to the quality and freshness of the fish the company uses in their dog treats.
Before Yummy Chummies, there was no use for the fish after the filets were made. The company is proud to be helping the Alaskan economy and it's environment by using a sustainable product.
To solve their logistics problem, Brett decided to build a processing plant in Phoenix, Arizona. By May of last year, the plant was fully operational. "We still have our offices in Anchorage, but now we're able to handle the growing demand by offering faster service and better prices."
"We make everything we sell," says Brett. "We control where our supplies come from. We control production."
Yummy Chummies pays particular attention to the problems with Chinese ingredients and manufacturing. "We are a product of the USA," he says proudly. In fact, 3 years ago the company made the decision to stop sourcing their packaging from China and now the bags and boxes are produced in Alabama. "We recently ordered pea flour and I could've saved 30 to 40% by buying from China, but we didn't. We bought the U.S. pea flour." Brett tells me he doesn't even like to buy Chinese equipment for his plant. They only order from reputable, American-based companies.
Recently, Brett made a bid to get Yummy Chummies into every Costco store – and got it. Their opening order was huge. They produced about a million pounds of treats in 58 days to fill the order! Yummy Chummies are available in all Costco stores right now, in an exclusive 2.5 pound bulk bag. There's even a $3.50 off in-store coupon running for the soft and chewy grain-free Alaska Salmon treats.
About Yummy Chummies, Brett says, "It's a treat, yes, but there's also got to be a health component. And it has to be desired by the dog." So what makes Yummy Chummies healthy? Salmon has a very good fat/oil content. It is rich with Omega 3 and 6 fatty acids, which can help dogs with skin problems and is great for aging dogs. They are low calorie – only about 11 calories per treat, with most of the calories coming from the fatty acids. They contain collagen and calcium because bones are included in the recipe. What's more, salmon doesn't naturally carry Salmonella. That being said, the treats are fully cooked and carefully monitored for food safety. Not to mention, dogs go crazy for the 95% salmon treats.
"People have told us their dog will sit and stare at the cabinet where the Yummy Chummies are kept," he laughs. "Dogs are wild about Yummy Chummies!"
Yummy Chummies are a product of the United States, 100% sourced and made in the U.S., right down to the packaging. You can feed them to your dog knowing they're healthy, safe, and made from human-grade ingredients all carefully selected for a reason – without unnecessary fillers or grains. Best of all, dogs LOVE them!
Support this American company, and treat your dog well, by picking up a bag of Yummy Chummies at your local Costco store. Learn more about Brett and the company by visiting YummyChummies.com and follow them on Facebook.
Related Items:alaska salmon, dog treats, salmon for dogs, yummy chummies
The Importance of Limited Ingredient Dog Treats
Dog Doesn't Want a Cookie? Tips to Train a Dog That Couldn't Care Less About Treats from FitDog
WATCH: Humans Eating Dog Treats… How Do They Taste?!
We found bugs in our last bag and the maker won't even call.
Louie Moller
We bought these at Costco in coon rapids minn,our dog just loved them and it took care of his dry skin but now I can't find them anywhere.
Nancy Maria
The product is a 95% Alaskan salmon. With all respect I'd like to ask; what 's the content of the remaining 5%? Thank you !!!
Project POOCH
Our POOCH dogs love Yummy Chummies. When Albertson's grocery store
first started carrying them, I could buy 1 and get 1 free. Unfortunately,
the offer soon ended.
I will be sharing Brett's story with our youth who save shelter dogs.
Robin L. Phifer
I can't wait for my dog to try these. She is so picky and the only treats she'll eat so far are the Asian made duck treats. I would love for her to eat treats that I know are safe and healthy. Thank you for your dedication and love for our dogs and this country. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 2,523 |
\section{Introduction: novel aspects of heavy-ion physics at the LHC}
\label{intro}
The nucleon--nucleon c.m.s. energy for \mbox{Pb--Pb}\ collisions
at the LHC, $\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}=5.5~\mathrm{TeV}$, will exceed that available at RHIC by
a factor about 30, opening up a new domain for the study of
strongly-interacting matter in conditions of high temperature and energy
density (QCD medium).
Particle production at the LHC will present quantitative and qualitative
new features, as discussed in the following.
{\it Hard processes} should contribute significantly to the total
cross section. The mechanism of energy loss
due to medium-induced gluon radiation allows to use the energetic
partons produced in initial hard-scattering processes as probes
to collect information on the opacity and density of the medium itself.
At the LHC, the set of available probes will be extended both
quantitatively and qualitatively. In fact, hard (light)quarks and
gluons will be produced
with high rates up to very large transverse momentum ($\pt$).
Additionally, charm and beauty quarks, which, due to their masses,
would show different attenuation patterns
(see section~\ref{pheno}), will become
available for detailed measurements, since their production cross
sections are expected to increase by factors 10 and 100, respectively,
from RHIC to the LHC~\cite{ramona}.
{\it High-density parton distributions} are expected to dominate particle
production. The density of low momentum-fraction, $x$,
gluons in the two colliding nuclei is expected to be
close to saturation of the available phase space, so as to produce significant
recombination effects. As an example, at central rapidity,
low-$\pt$ c (b) quarks will be produced by partons
with
$x_1\simeq x_2~{\buildrel > \over {_\sim}}~ 2\,m_{\rm c}(m_{\rm b})/\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}\simeq
2.4(10)~\mathrm{GeV}/5500~\mathrm{GeV}\simeq 4(16)\times 10^{-4}$.
In section~\ref{pheno} we will discuss how gluon fusions
in this $x$ region are expected to affect $\mbox{$\mathrm {c\overline{c}}$}$ (and, to a lower
extent, $\mbox{$\mathrm {b\overline{b}}$}$) production,
not only in \mbox{p--Pb}\ and \mbox{Pb--Pb}\ collisions (nuclear shadowing),
but possibly even in pp collisions.
\section{Heavy-quark phenomenology from pp to nucleus--nucleus collisions}
\label{pheno}
Heavy-quark pairs, $\rm Q\overline Q$, are produced in partonic scatterings
with large virtuality (momentum transfer) $Q~{\buildrel > \over {_\sim}}~ 2\,m_{\rm Q}$.
Therefore, the
production cross sections in \mbox{nucleon--nucleon}~(NN) collisions can be calculated
in the framework of collinearly factorized perturbative QCD (pQCD).
The differential $\rm Q\overline{Q}$ cross section is written as:
\begin{eqnarray}
\d\sigma^{{\rm NN\to Q\overline{Q}}X}
(\sqrt{s_{\scriptscriptstyle{{\rm NN}}}},m_{\rm Q},\mu_{\rm F}^2,\mu_{\rm R}^2)
&=&
\sum_{i,j=\rm q,\overline q,g}
f_i(x_1,\mu_{\rm F}^2)\,\otimes\, f_j(x_2,\mu_{\rm F}^2)\,\otimes\nonumber\\
&& \d\hat\sigma^{ij\to {\rm Q \overline Q}\{k\}}
(\alpha_{\rm s}(\mu_{\rm R}^2),\mu_{\rm F}^2,m_{\rm Q},x_1x_2s_{\scriptscriptstyle{\rm NN}}),
\label{sigQQ}
\end{eqnarray}
where the partonic $\d\hat \sigma^{ij\to {\rm Q \overline Q}\{k\} }$
is calculable as a power series in the strong
coupling $\alpha_{\rm s}$,
which depends on the renormalization scale
$\mu_{\rm R}$;
currently, calculations are performed up to next-to-leading order (NLO),
$\mathcal{O}(\alpha_{\rm s}^3)$.
The nucleon Parton Distribution Function (PDF)
for the parton of type $i$ at momentum fraction $x_1$
and factorization scale $\mu_{\rm F}$,
which can be interpreted as the virtuality
of the hard process, is denoted by $f_i(x_1,\mu_{\rm F}^2)$.
\begin{table}
\caption{Expected $\rm Q\overline Q$ yields at the LHC,
from NLO pQCD
(parameters in the text)~\cite{notehvq}. For \mbox{p--Pb}\ and \mbox{Pb--Pb},
PDF shadowing is included and $N_{\rm coll}$ scaling is applied.}
\label{tab:xsec}
\begin{center}
\begin{tabular}{ccccc}
\hline
colliding system & $\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}$ & centrality & $N^{\rm c\overline{c}}$/event & $N^{\rm b\overline{b}}$/event \\
\hline
pp & $14~\mathrm{TeV}$ & minimum bias & 0.16 & 0.0072 \\
\mbox{p--Pb}\ & $8.8~\mathrm{TeV}$ & minimum bias & 0.78 & 0.029 \\
\mbox{Pb--Pb}\ & $5.5~\mathrm{TeV}$ & central (0--5\% $\sigma^{\rm tot}$) & 115 & 4.6 \\
\hline
\end{tabular}
\end{center}
\end{table}
The expected yields in pp collisions at $\sqrt{s}=14~\mathrm{TeV}$
are reported in the first line of Table~\ref{tab:xsec}.
These numbers are obtained at NLO
using the MNR program~\cite{hvqmnr}
with $m_{\rm c}=1.2~\mathrm{GeV}$ and $\mu_F=\mu_R=2\,m_{\rm c}$
for charm and $m_{\rm b}=4.75~\mathrm{GeV}$ and $\mu_F=\mu_R=\,m_{\rm b}$ for beauty;
the PDF set is CTEQ~4M~\cite{cteq4}.
The predicted yields have large uncertainties, of about a factor 2,
estimated by varying the values of the masses and of the scales
(much smaller uncertainties, $\approx 20\%$,
arise from the indetermination in the PDFs)~\cite{yrhvq,notehvq}.
The theoretical uncertainty band for the D-meson cross section as a function
of $\pt$ will be shown in section~\ref{exp}, along with the expected
sensitivity of the ALICE experiment~\cite{alicePPR}.
As aforementioned, in the $x$ range relevant for $\mbox{$\mathrm {Q\overline{Q}}$}$ production,
the PDFs will be close to phase-space saturation and, already in the case
of pp collisions, there will be important gluon-fusion effects
($\rm gg\to g$).
These can be accounted for in the PDF scale-evolution equations
by adding to the standard linear DGLAP term a negative nonlinear
(quadratic) term (see~\cite{ehkqs} and references therein):
\begin{equation}
\partial f_{\rm g}(x,Q^2) \Big/ \partial \log Q^2= \Big[{\rm DGLAP~term~of~}
\mathcal{O}(f_{\rm g})\Big] -
\Big[{\rm term~of~}\mathcal{O}(f_{\rm g}^2)\Big]\,.
\end{equation}
The nonlinear term, currently calculated only at LO,
`slows down' the $Q^2$ evolution at given $x$. It has been shown~\cite{ehkqs}
that, for $x\lsim 10^{-2}$, it allows to have a higher gluon density
at small $Q^2$ ($\lsim 10~\mathrm{GeV}^2$),
with respect to that obtained with DGLAP terms only, and to maintain at the
same time a good fit of the proton structure function data from HERA.
A higher gluon PDF would imply an enhancement, w.r.t. to DGLAP-based
calculations, of $\mbox{$\mathrm {c\overline{c}}$}$ production at low $\pt$ at LHC energy~\cite{ekv}.
Figure~\ref{fig:smallx} (left) shows, as a function of $\pt$, the
enhancement at the c-quark and at the D-meson level,
for $m_{\rm c}=1.2~\mathrm{GeV}$ and $\mu_{\rm F}^2=\mu_{\rm R}^2=Q^2=4\,m^2_{\rm t,c}
\equiv 4\,(m_{\rm c}^2+\pt^2)$~\cite{dvbek}.
Here, as well as for the other results presented in the following,
the hadronization of heavy quarks is performed using the string fragmentation
model implemented in PYTHIA~\cite{pythia}.
The enhancement survives fragmentation and it is of about 30\% for D-meson
$\pt\to 0$,
even in this `pessimistic' case where relatively-large $Q^2$ values are
considered (it should be noted, however, that this is a LO result and
the effect might be smaller at NLO).
In section~\ref{exp} we will discuss a possible
strategy to detect the enhancement in pp collisions at the LHC.
\begin{figure}[!t]
\begin{center}
\includegraphics[width=0.317\textwidth]{cDenh.eps}
\includegraphics[width=0.325\textwidth]{EKS98scaled.eps}
\includegraphics[width=0.317\textwidth]{RpA_shadowing.eps}
\caption{Left: enhancement due to nonlinear gluon evolution for c quarks
and D mesons in pp collisions at $\sqrt{s}=14~\mathrm{TeV}$
\cite{dvbek}. Centre: modification of the gluon PDF
in a Pb nucleus at $Q^2\simeq 4\,m_{\rm c}^2$.
Right: corresponding
$R_{\rm pA}^{\rm D}$ in p--Pb at $\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}=8.8~\mathrm{TeV}$.}
\label{fig:smallx}
\end{center}
\end{figure}
For hard processes, in the absence of nuclear
and medium effects, a \AA~(or \mbox{p--nucleus}) collision
would behave as a superposition of independent NN collisions.
The charm and beauty differential
yields would then scale from pp to AA (or pA)
proportionally to the number $N_{\rm coll}$
of inelastic NN collisions (binary scaling):
\begin{equation}
\d^2 N^{\scriptstyle\rm Q}_{\rm AA(pA)}/\d\pt\d y =
N_{\rm coll}\times\d^2 N^{\scriptstyle\rm Q}_{\rm pp}/\d\pt\d y\,.
\end{equation}
Binary scaling is, indeed, expected to break down due to both initial-state
effects, such as nuclear shadowing of the PDFs, and final-state effects,
such as parton energy loss in the medium formed in \AA~collisions. As a
consequence,
as we will detail in the following, heavy quarks are important tools
to probe and investigate these effects.
In Table~\ref{tab:xsec} we report the $\mbox{$\mathrm {c\overline{c}}$}$ and $\mbox{$\mathrm {b\overline{b}}$}$ yields
in \mbox{p--Pb}\ and \mbox{Pb--Pb}\ collisions calculated including in the NLO pQCD
calculation the EKS98 parameterization~\cite{eks} of the PDFs nuclear
modification $f_i^{\rm Pb}(x,Q^2)/f_i^{\rm p}(x,Q^2)$,
shown in Fig.~\ref{fig:smallx} (centre) for $Q^2=5~\mathrm{GeV}^2$,
and applying binary scaling~\cite{notehvq}. The charm (beauty)
cross-section reduction induced by shadowing is about 35\% (20\%) in
\mbox{Pb--Pb}\ and 15\% (10\%) in \mbox{p--Pb}. There is a significant
uncertainty on the strength of shadowing in the small-$x$ region and
some models predict much larger suppression than EKS98
(see~\cite{yrpA} for a review). The comparison of $Q\overline Q$ production in
pp and \mbox{p--Pb}\ collisions (where final-state effects are not present)
is regarded as a sensitive tool
to probe nuclear PDFs at the LHC.
The ratio of invariant-mass spectra of di-leptons from heavy-quark decays
in \mbox{p--Pb}\ and pp collisions would measure
the nuclear modification $f_{\rm g}^{\rm Pb}/f_{\rm g}^{\rm p}$~\cite{yrpA}.
Another promising observable in this respect is the nuclear modification
factor of the D-meson $\pt$ distribution:
\begin{equation}
R^{\rm D}_{\rm pA(AA)}(\pt)=
{1\over N_{\rm coll}} \times
{\d^2 N^{\rm D}_{\rm pA(AA)}/\d\pt\d y \over
\d^2 N^{\rm D}_{\rm pp}/\d\pt\d y}\,.
\end{equation}
We note that at the LHC, the pp, \mbox{p--Pb}\ and \mbox{Pb--Pb}\ runs will have different
$\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}$ values; however, pQCD can be used to
extrapolate the measured cross sections between different
energies~\cite{yrhvq} and,
thus, calculate the $R_{\rm pA(AA)}$ ratios.
In Fig.~\ref{fig:smallx} (right) we show the sensitivity of
$R^{\rm D}_{\rm pA}$ to
different shadowing scenarios, obtained by varying the modification of the
PDFs (shown for gluons in the central panel of the same figure).
\begin{figure}[!t]
\begin{center}
\begin{tabular}{lc}
\begin{minipage}{0.41\linewidth}
\includegraphics[width=1.4\textwidth]{RAAhDB.eps}
\end{minipage}
&
\begin{minipage}{0.53\linewidth}
\caption{Nuclear modification factors for charged hadrons~\cite{pqm},
D mesons ($m_{\rm c}=1.2~\mathrm{GeV}$) and B mesons
($m_{\rm b}=4.8~\mathrm{GeV}$)~\cite{adsw}
in central (0--10\% $\sigma^{\rm tot}$) \mbox{Pb--Pb}\ collisions relative
to binary scaling from pp collisions, at $\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}=5.5~\mathrm{TeV}$.
The D-meson result does not include feed-down from ${\rm B\to D}+X$
decays, which is, however, expected to be rather small
($\sim 5\%$)~\cite{thesis}.}
\end{minipage}
\end{tabular}
\label{fig:RAA}
\end{center}
\end{figure}
Experiments at RHIC have shown that the nuclear modification factor $R_{\rm AA}$
is an effective tool for the study of the interaction of the hard partons
with the medium produced in nucleus--nucleus collisions.
Heavy-quark medium-induced quenching is one of the most captivating
topics to be
addressed in \mbox{Pb--Pb}\ collisions at the LHC, where both c and b quarks
will be produced with high rates (see Table~\ref{tab:xsec}). Due to the
QCD nature of parton energy loss, quarks are predicted to lose less
energy than gluons (that have a higher colour charge) and, in addition,
the `dead-cone effect' is expected to reduce the energy loss of massive
quarks~\cite{dk,asw}. Therefore, one should observe a pattern
of gradually decreasing $R_{\rm AA}$ suppression when going from gluon-originated
light-flavour hadrons ($h$) to D and to B mesons:
$R_{\rm AA}^h\lsimR_{\rm AA}^{\rm D}\lsimR_{\rm AA}^{\rm B}$.
In Fig.~\ref{fig:RAA} we report recent
estimates of these quantities for central \mbox{Pb--Pb}\ collisions at the
LHC~\cite{pqm,adsw}, obtained in the framework of a model~\cite{pqm}
where energy loss is simulated in a parton-by-parton approach combining
the BDMPS `quenching weights'~\cite{sw} and a Glauber-model-based definition
of the in-medium parton path length. For c and b quarks,
the quenching weights were specifically calculated
using the formalism developed in~\cite{asw}.
The BDMPS transport coefficient (a measure of the medium density)
at the LHC was set to the value $\hat{q}=100~\mathrm{GeV}^2/\mathrm{fm}$, estimated on the
basis of the analysis of RHIC data performed in~\cite{pqm}.
The results are plotted as bands that represent the theoretical
uncertainty~\cite{pqm,adsw}. For charged hadrons, $R_{\rm AA}$ is given for
$\pt~{\buildrel > \over {_\sim}}~ 8~\mathrm{GeV}$ because at lower $\pt$ the soft-particle component
produced from the radiated gluons, which is not implemented
in the model, might strongly contribute in shaping the nuclear modification
factor. Whereas for D and B mesons $R_{\rm AA}$ can be calculated down to $\pt=0$
by assigning a `thermal' transverse momentum (according to
$\d N/\d m_{\rm t} \propto m_{\rm t}\exp(-m_{t}/T)$, $T=300~\mathrm{MeV}$)
to the c and b quarks that lose most of their initial energy in the
medium~\cite{adsw}. The presence of this thermalized component determines
the rise of $R_{\rm AA}^{\rm D,B}$ at $\pt\to 0$. It should be mentioned here that,
in the low $\pt$ region, the hadronization of heavy quarks in nucleus--nucleus
collisions is likely to happen inside the medium via parton
recombination~\cite{molnar},
thus producing deviations from the simple pattern obtained from the
aforementioned thermalization assumption.
\section{Looking for heavy quarks at the LHC: tools, techniques, performance}
\label{exp}
Three experiments will participate in the LHC heavy-ion program:
ALICE, the dedicated heavy-ion experiment~\cite{alicePPR}; CMS, with a
strong heavy-ion program~\cite{cms}; (most probably) ATLAS, which
recently expressed interest in participating~\cite{atlas}. The three
detectors have different features and design requirements, but all of them
are expected to have excellent capabilities for heavy-flavour measurements.
Their complementarity will provide
a very broad coverage in terms of phase-space, decay channels and observables.
Experimentally, the two key elements for a rich heavy-flavour program are:
tracking/vertexing and particle identification (PID).
Open charm and beauty mesons have typical life-times of few hundred microns
($c\tau$ values are about $125$--$300~\mathrm{\mu m}$ for D mesons and $500~\mathrm{\mu m}$ for B
mesons) and the most direct detection strategy is the identification of single
tracks or vertices that are displaced from the interaction vertex.
The detector capability to perform this task is
determined by the impact parameter\footnote{We define as impact
parameter the distance of closest approach to the interaction vertex
of the track projection in the plane transverse to the beam direction.}
($d_0$) resolution. All experiments will be equipped with
high position-resolution silicon-detector layers, including pixels, for
precise tracking and impact parameter measurement also in the
high-multiplicity environment of central \mbox{Pb--Pb}\ collisions.
Tracking is done in the central (pseudo)rapidity region:
$|\eta|<0.9$ for ALICE and $|\eta|\lsim 1.5$ for CMS and ATLAS.
In Fig.~\ref{fig:ptd0} we show the $d_0$ resolution of ALICE and
CMS\footnote{ATLAS may perform similarly to ALICE,
but systematic \mbox{Pb--Pb}\ studies
are still in progress.}, along
with the $\pt$ resolution, which is another important ingredient for
heavy-flavour measurements (e.g. it determines the invariant mass resolution).
The main difference between the two
experiments is given by the magnetic field values: ALICE (0.4~T) has a very
low $\pt$ cutoff of $0.2~\mathrm{GeV}$, while CMS (4~T) has a higher cutoff of $1~\mathrm{GeV}$
but better $\pt$ resolution at high $\pt$. The $d_0$ resolutions are
quite similar and better than $50~\mathrm{\mu m}$ for $\pt~{\buildrel > \over {_\sim}}~ 1.5$--$3~\mathrm{GeV}$.
\begin{figure}[!t]
\begin{center}
\includegraphics[width=.75\textwidth]{ptd0res.eps}
\caption{Transverse momentum (left) and transverse track impact parameter
(right) resolutions for the ALICE and CMS detectors in \mbox{Pb--Pb}\
collisions.}
\label{fig:ptd0}
\end{center}
\end{figure}
Both lepton and hadron identification are important for heavy-flavour
detection. D and B mesons have relatively-large branching ratios (BR) in the
semi-leptonic channels, $\simeq 10\%$ to electrons and $\simeq 10\%$ to muons,
and inclusive cross-section measurements can be performed via single leptons
or di-leptons. ALICE can identify electrons with $\pt>1~\mathrm{GeV}$ and
$|\eta|<0.9$, via transition radiation and ${\rm d}E/{\rm d}x$ measurements, and muons
in the forward region, $2.5<\eta<4$, which allows a very low $\pt$ cutoff
of $1~\mathrm{GeV}$. CMS and ATLAS have
a broad pseudorapidity coverage for muons, $|\eta|<2.4$ and $|\eta|<2.7$,
respectively, but they have a quite-high $\pt$ cutoff of
$\approx 4~\mathrm{GeV}$. Both CMS and ATLAS have high-resolution
electro-magnetic calorimeters that can be used to identify
electrons, although performance studies for heavy-ion collisions have not
been carried out yet. Semi-leptonic inclusive measurements do not
provide direct information on the D(B)-meson $\pt$ distribution, especially
at low $\pt$, because of the weak correlation between the lepton and meson
momenta. Therefore, for charm in particular, the reconstruction of exclusive
(hadronic) decays is preferable. In this case,
in a high-multiplicity environment,
hadron identification allows a more effective rejection
of the large combinatorial background in the low-$\pt$ region.
ALICE disposes of $\rm \pi/K/p$ separation via ${\rm d}E/{\rm d}x$ and time-of-flight
measurement for $p<3$--$4~\mathrm{GeV}$ and $|\eta|<0.9$.
In the following we present results on the expected performance for the
detection of D and B mesons in ALICE (CMS and ATLAS studies are described
in~\cite{yrhvq,petrushankoklay}).
The $\mbox{$\mathrm {c\overline{c}}$}$ and $\mbox{$\mathrm {b\overline{b}}$}$ cross
sections from Table~\ref{tab:xsec} are used and the charged-particles
rapidity density of a central ($0$--$5\%~\sigma^{\rm tot}$)
\mbox{Pb--Pb}\ collision is assumed to be
${\rm d}N_{\rm ch}/{\rm d}y\simeq 6000$. The results, based on realistic detector simulations,
are given for samples of $10^9$ pp events
(about 9 months of data taking) and of $10^7$ central \mbox{Pb--Pb}\ events
(about 1 month of data taking).
\paragraph{Charm reconstruction in ALICE.}
One of the most promising channels for open charm detection is the
$\rm D^0 \to K^-\pi^+$ decay (and charge conjugate) that
has a BR of $3.8\%$.
The expected yields (${\rm BR}\times\d N/\d y$ at $y=0$),
in central \mbox{Pb--Pb}\ ($0$--$5\%~\sigma^{\rm tot}$) at $\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}=5.5~{\rm TeV}$ and
in pp collisions at $\sqrt{s}=14~{\rm TeV}$ are $5.3\times 10^{-1}$ and
$7.5\times 10^{-4}$ per event, respectively.
The main feature of this decay topology is the presence of two tracks with
impact parameters $d_0\sim 100~\mathrm{\mu m}$. The detection strategy~\cite{D0jpg}
to cope with the large combinatorial background from the underlying event
is based on the selection of displaced-vertex topologies, i.e. two tracks with
large impact parameters and good alignment between the $\rm D^0$ momentum
and flight-line, and on invariant-mass analysis to extract the signal
yield.
This strategy was optimized separately for pp and \mbox{Pb--Pb}\ ~collisions, as a
function of the $\rm D^0$ transverse momentum, and statistical and
systematic errors were estimated~\cite{thesis}.
Figure~\ref{fig:D0pt} (left) shows the expected
sensitivity of ALICE for the measurement of the $\mbox{$\mathrm {D^0}$}$ $\pt$-differential
cross section in pp collisions, compared to the pQCD calculations uncertainty
that we mentioned in section~\ref{pheno}, and in central
(0--5\% $\sigma^{\rm tot}$) \mbox{Pb--Pb}\ collisions.
The low-$\pt$ reach, provided by the moderate ALICE magnetic field (0.4~T)
and the $\rm K/\pi$ separation via time-of-flight,
allows to address the issue of charm `enhancement' in pp
collisions due to nonlinear gluon evolution (section~\ref{pheno}).
Here, the idea is that the effect ---enhancement only at low $\pt$---
cannot be
mimicked by standard DGLAP-based pQCD just by varying the input parameters.
This is illustrated
in Fig.~\ref{fig:D0pt} (from~\cite{dvbek}), where the data-to-theory ratio is
plotted versus the $\mbox{$\mathrm {D^0}$}$ $\pt$. The data are obtained with
$m_{\rm c}=1.2~\mathrm{GeV}$ and $Q^2=4\,m_{\rm t,c}^2$ and they
include the enhancement (from Fig.~\ref{fig:smallx} (left)),
while the theory results do not: only for $m_{\rm c}\lsim 1.1~\mathrm{GeV}$ the theory
can mimic the enhancement, but such small values are not supported
by lower-$\sqrt{s}$ measurements.
The direct measurement of the D-meson $\pt$ distribution allows a good
sensitivity to the suppression of the nuclear modification factor due to
c-quark energy loss in \mbox{Pb--Pb}\ collisions.
Figure~\ref{fig:RAADandBtomu} (left) shows the
estimated experimental errors on $R_{\rm AA}^{\rm D}$, reported on a curve that lies
in the middle of the D-meson band from Fig.~\ref{fig:RAA}.
Simulation studies to assess the performance for $\mbox{$\mathrm {D^0}$}$ reconstruction in
\mbox{p--Pb}\ are in progress and the results are expected to be similar to the
pp case~\cite{thesis}. This might allow to measure nuclear shadowing
via the $R_{\rm pA}^{\rm D}$ ratio, as discussed in section~\ref{pheno}.
\begin{figure}[!t]
\begin{center}
\includegraphics[width=0.4\textwidth]{D0ptFinal_ppPbPb.eps}
\includegraphics[width=0.4\textwidth]{D0nonlin.eps}
\caption{Left: $\mbox{$\mathrm {D^0}$}$ production cross section
vs. $\pt$, as it can be measured by ALICE in pp
($10^9$ events) and in central \mbox{Pb--Pb}\ ($10^7$ events) collisions;
statistical (bars) and $\pt$-dependent
systematic errors (band) are shown; a normalization error of 5\%
in pp and 11\% in \mbox{Pb--Pb}\ is not shown;
pQCD predictions for different sets of
parameters ($m_{\rm c}$~[GeV],
$\mu_F/m_{\rm t,c}$, $\mu_R/m_{\rm t,c}$, PDF set)
are also reported for the pp case.
Right: ratios of simulated ALICE $\mbox{$\mathrm {D^0}$}$ data to pQCD curves
(parameters: $m_{\rm c}$~[GeV],
$Q/m_{\rm t,c}=\mu_F/m_{\rm t,c}=\mu_R/m_{\rm t,c}$,
PDF set);
the data contain the
enhancement due to nonlinear gluon evolution while the theory
curves do not~\cite{dvbek}.}
\label{fig:D0pt}
\end{center}
\end{figure}
\begin{figure}[!t]
\begin{center}
\includegraphics[width=0.52\textwidth]{RAADalice.eps}
\includegraphics[width=0.42\textwidth]{BtomuNEW.eps}
\caption{Left: ALICE sensitivity for $\mbox{$\mathrm {D^0}$}$-meson $R_{\rm AA}$ with $10^7$ central
\mbox{Pb--Pb}\ events and $10^9$ pp events; statistical (bars) and systematic
(bands) errors are shown.
Right: B production cross section vs. $\pt^{\rm min}$ reconstructed
by ALICE with single muons and di-muons
in $10^7$ central \mbox{Pb--Pb}\ collisions; only (very small)
statistical errors shown.}
\label{fig:RAADandBtomu}
\end{center}
\end{figure}
\paragraph{Beauty via single electrons in ALICE.}
The expected yield (${\rm BR}\times\d N/\d y$ at $y=0$)
for ${\rm B}\to e^{\pm}+X$
per central (0--$5\%~\sigma^{\rm tot}$)
\mbox{Pb--Pb}\ collision at $\sqrt{s_{\scriptscriptstyle{{\rm NN}}}}=5.5~\mathrm{TeV}$ is $9\times 10^{-2}$.
The main sources of background electrons are: (a) decays of D mesons;
(b) decays of light mesons (e.g. $\rho$ and $\omega$);
(c) conversions of photons in the beam pipe or in the inner detector
layers and (d) pions misidentified as electrons.
Given that electrons from beauty have average
impact parameter $d_0\simeq 500~\mathrm{\mu m}$
and a hard momentum spectrum, it is possible to
obtain a high-purity sample with a strategy that relies on:
electron identification with a combined ${\rm d}E/{\rm d}x$ and transition
radiation selection, which allows to reduce the pion contamination
by a factor $10^4$;
impact parameter cut to reject misidentified pions and electrons
from sources (b) and (c);
transverse momentum cut to reject electrons from charm decays.
As an example, with $d_0>180~\mathrm{\mu m}$ and $\pt>2~\mathrm{GeV}$, the expected statistics
of electrons from B decays is $5\times 10^4$ for $10^7$ central \mbox{Pb--Pb}\
events, with a contamination of about 10\%, mainly given by electrons from
charm decays~\cite{yrhvq,alicePPR2}.
The sensitivity on the extraction of the $\mbox{$\mathrm {b\overline{b}}$}$ production
cross section and of the B-meson $\pt$ distribution is currently being
investigated.
\paragraph{Beauty via (di-)muons in ALICE.}
B production in \mbox{Pb--Pb}\ collisions
can be measured also in the ALICE forward muon
spectrometer, $2.5<\eta<4$, analyzing the single-muon $\pt$ distribution
and the opposite-sign di-muons invariant mass distribution~\cite{alicePPR2}.
The main backgrounds to the `beauty muon' signal are $\pi^\pm$,
$\rm K^\pm$ and charm decays. The cut $\pt>1.5~\mathrm{GeV}$ is applied to all
reconstructed muons in order to increase the signal-to-background ratio.
For the opposite-sign di-muons, the residual combinatorial background is
subtracted using the technique of event-mixing and the resulting distribution
is subdivided into two samples: the low-mass region, $M_{\mu^+\mu^-}<5~\mathrm{GeV}$,
dominated by muons originating from a single b quark decay through
$\rm b\to c(\to \mu^+)\mu^-$ ($\rm BD_{\rm same}$), and the high-mass region,
$5<M_{\mu^+\mu^-}<20~\mathrm{GeV}$, dominated by $\mbox{$\mathrm {b\overline{b}}$}\to\mu^+\mu^-$, with each muon
coming from a different quark in the pair ($\rm BB_{\rm diff}$).
Both samples have a background
from $\mbox{$\mathrm {c\overline{c}}$}\to \mu^+\mu^-$ and a fit is done to extract the charm- and
beauty-component yields. The single-muon $\pt$ distribution has three
components with different slopes: K and $\pi$, charm, and beauty decays.
Also in this case a fit technique allows to
extract a $\pt$ distribution of muons from B decays.
From the $\mu$-level cross sections a Monte-Carlo-based procedure is used
to compute B-level cross sections for the data sets (low-mass $\mu^+\mu^-$,
high-mass $\mu^+\mu^-$,
and $\pt$-binned single-muon distribution),
each set covering a specific B-meson $\pt>\pt^{\rm min}$ region,
as preliminarly shown in Fig.~\ref{fig:RAADandBtomu} (right).
Since only minimal cuts are applied, the reported statistical errors are very
small and high-$\pt$ reach is excellent.
Systematic errors are currently under study.
\section{Summary}
\label{summary}
We have discussed how heavy quarks, abundantly produced at LHC energies,
will allow to address several physics issues, in
\mbox{proton--proton},
\mbox{proton--nucleus} and \mbox{nucleus--nucleus} collisions. In particular,
they provide tools to:
\begin{itemize}
\item probe, via parton energy loss and its predicted mass dependence,
the high-density QCD medium formed in \mbox{Pb--Pb}\ collisions;
\item probe, in pp collisions, the pQCD calculations parameters space;
\item probe the small-$x$ regime of the PDFs,
where saturation/recombination effects
are expected to be important, even in pp collisions.
\end{itemize}
The excellent tracking, vertexing and particle identification performance
of ALICE, ATLAS and CMS will allow to fully explore this rich phenomenology,
as we have shown with some specific ALICE studies on D and B meson
measurements.
\paragraph{Acknowledgment.} The author, member of the ALICE Collaboration,
would like to thank the ALICE off-line group, within which part of the
results here reported have been obtained. Fruitful discussions on the
manuscript with F.~Antinori are also acknowledged.
\vspace{.4cm}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 3,948 |
Пустовíти — пасажирський зупинний пункт Київської дирекції Південно-Західної залізниці.
Розташований на околиці села Пустовіти Миронівського району Київської області на лінії Київ-Деміївський — Миронівка між станціями Галине (9 км) та Миронівка (6 км).
Сполучення
На платформі зупиняються приміські електропоїзди сполученням Київ-Пасажирський — Миронівка.
Автошлях
Неподалік від зупинного пункту пролягає автошлях .
Джерела
Пустовіти в ЄМР
Посилання
Розклад руху приміських електропоїздів
Зупинні пункти Південно-Західної залізниці
Зупинні пункти Київської області
Транспорт Миронівського району | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 4,793 |
\section{Introduction}
\begin{figure}[h]
\includegraphics[width=0.8\textwidth]{universe2.pdf}
\caption{\label{fig:1} QCD impact on the evolution of the early
Universe. }
\end{figure}
\begin{figure}[h]
\begin{minipage}{15pc}
\includegraphics[width=15pc]{diagram.pdf}
\caption{\label{fig:2a} Sketch of the QCD phase diagram. }
\end{minipage}\hspace{2pc}%
\begin{minipage}{15pc}
\includegraphics[width=15pc]{dia_not.pdf}
\caption{\label{fig:2b} QCD phase diagram: first principle
calculations and model building. }
\end{minipage}
\end{figure}
The properties of strongly interacting matter has sparked many
important investigations using accelerator experiments and large scale
theoretical studies. In an astrophysical context, the theory of
interactions, QCD, dominates the area around $10^{-6}$ seconds after
the Big Bang when quark matter confines to colour neutral
hadrons. Since QCD captures the impact of the strong nuclear forces,
it is widely believed that QCD plays an essential role to understand
compact star matter as it may exist nowadays e.g.~in neutron stars
(see figure~\ref{fig:1} for an illustration). The so-called QCD phase
diagram characterises the states of matter as a function of the
density and temperature in a 2d graph. Completing this diagram in its
extreme regions and in particular for cold and dense matter is an
outstanding problem which still triggers model building and new
techniques for computer simulation after 30 years of intense
research. Under moderate conditions, quarks and gluons are confined to
colour-neutral hadrons, while this {\it confinement} feature of QCD is
believed to cease to exist under extreme conditions, temperatures
and/or densities. In the early universe before the QCD phase
transition roughly at time $10^{-6}$ seconds, matter has not yet
clustered due to gravity and, as a result, the density is very low
compared to e.g.~nuclear matter density. Similarly, the conditions in
heavy ion collision experiments carried out at RHIC (located at
Brookhaven National Laboratory (BNL) in Upton, New York) or LHC (built
by the European Organization for Nuclear Research (CERN)) produce very
hot matter at low densities. From an experimental point of view, very
little is known even at moderate densities let alone the cold and
dense regime of compact star matters (see figure~\ref{fig:2a}).
\medskip
Lattice gauge simulations offer first principle non-perturbative
results with good control over the errors. Markov chain Monte-Carlo
simulations can be very successfully applied and reliable results for
the states of matter can be obtained at all temperatures and small
baryon chemical potentials (shaded area in figure~\ref{fig:2b}, see
e.g.~\cite{Laermann:2003cv} for a review). Over the recent years, many
new models have been developed to describe QCD matter at high
densities: quarkyonic matter is motivated by the so-called 't~Hooft
limit of the hypothetical theory with a large number of colours and
sees the quarks deconfined inside the Fermi sphere while only the
baryons at the surface of the Fermi sphere undergo colour
confinement|\cite{McLerran:2007qj}. The chiral magnetic
effect~\cite{Fukushima:2010fe} takes into account the strong magnetic
field that are produced by the colliding charges in heavy ion
experiments and uses an effective quark model to estimate their impact
on the QCD phase structure. In the confinement phase, quarks in a
certain gluonic background can change their statistics from Fermi to
Bose type. At moderate densities, these so-called centre dressed and
confined quarks therefore might undergo Bose condensation leading to to
new state of cold and confined matter~\cite{Langfeld:2011rh}. None of
these ideas have yet been tested by first principle
calculations. At a finite baryon chemical potential, the QCD action
acquires an imaginary part, and, hence, standard Monte-Carlo
techniques cannot be applied for the lattice simulation of QCD at
finite densities. This has become known as the {\it notorious sign
problem.} Early attempts pursued Monte-Carlo simulations with
the modulus of the quark determinant and included the phase factor to
the observable to be calculated. It turns out that the expectation
value of the phase factor is very small (see~\cite{Splittorff:2006fu}
for an illustration) showing that the such generated Monte-Carlo
configurations contain very little information on finite density
QCD. The {\it sign} problem has turned into an {\it overlap} problem.
\medskip
The recent past has seen a renaissance of ideas targeting dense and
cold fermionic matter. Some of the methods were proposed some time
ago, but have now reached an unprecedented level of sophistication. The
{\it reweighting} approach proposed by Fodor and
Katz~\cite{Fodor:2001au} uses a multi-parameter action to optimise the
overlap. This method is particularly suited for intermediate
temperatures and might possess a reach that covers the critical
endpoint of the QCD phase diagram~\cite{Fodor:2001pe}. Langevin
simulations of lattice gauge theories avoid the positivity constraint
of the Gibbs factor, which lies at the heart of Monte-Carlo
simulations, and might therefore be suitable for finite density
simulations~\cite{Parisi:1984cs,Karsch:1985cb}. This technique
regained a lot of interest when Aarts showed that {\it stochastic
quantisation} can evade the sign problem at least for the
relativistic Bose gas~\cite{Aarts:2008wh,Aarts:2009hn}. Although the
conceptional question whether the approach converges to the correct
answer~\cite{Aarts:2009uq} is still under active investigations, the
approach is one of the few methods that are currently applied to
finite density QCD~\cite{Aarts:2014bwa}. It might appear that
integrating the gluonic degrees of freedom {\it before} the fermion
fields alleviates the sign problem. This could be done e.g.~in the
strong coupling limit~\cite{Rossi:1984cv} leading to a description of
Nuclear Physics suiting lattice simulations~\cite{deForcrand:2009dh}.
It was observed in 1d QCD that even integrating part of the gluonic
degrees of freedom leads to substantial
improvements~\cite{Bloch:2013ara}. Finally, a reformulation of the
theory might improve on the sign the problem or remove it
altogether. Indeed, theories the dual of which are real are then
accessible by standard Monte-Carlo techniques. Example for
complex action spin models that are real upon dualisation are $Z_3$
spin model~\cite{Mercado:2011ua} or the $O(2)$ model at
finite densities~\cite{Banerjee:2010kc,Langfeld:2013kno}. These models
can be efficiently simulated using worm type
algorithms~\cite{Prokof'ev:2009xw}. Alternative lattice
discretisations~\cite{Brandt:2014rca} and spin blocking techniques in
combination with the (tensor) renormalisation group
approach~\cite{Meurice:2014tca} might be equally successful to
eliminate the sign problem from Yang-Mills theories. Also not hinging
on a real dualisation of the theory is the {\it fermion bag approach}
approach by Chandrasekharan~\cite{Chandrasekharan:2009wc} for which
the sign problem is relegated to finite size fermion bags. This
approach has been seen to be very efficient for fermion theories with
four-fermion coupling such as the Thirring model with massless
fermions on large lattices~\cite{Chandrasekharan:2011mn}.
\medskip
An efficient alternative to conventional Monte-Carlo simulations is
based upon the numerical computation of the density of states using
the multi-canonical algorithm~\cite{Bazavov:2012ex} or a Wang-Landau
type strategy~\cite{WangLandau2001}. A modified version of the
Wang-Landau method is the LLR algorithm~\cite{Langfeld:2012ah}, which
is effective for theories with continuous degrees of freedom as
opposed to spin models (see also~\cite{Pellegrini:2014gha}). The
latter algorithm has been extended from the calculation of the action
distribution to accessing probability distributions of other extensive
quantities such as the SU(2) Polyakov
line~\cite{Langfeld:2013xbf}. Furthermore, it has been proposed
in~\cite{Langfeld:2014nta} to use LLR techniques for a high precision
calculation of the distribution of the {\it imaginary part} of the
action. Once this quantity has been determined, the partition function
of the complex theory can be computed semi-analytically by carrying
out the Fourier transform of the corresponding probability
distribution~\cite{Langfeld:2014nta}. Below, we will summarise the
state of affairs concerning density-of-states methods and the LLR
algorithm in particular to simulate theories with a sign problem. An
overview on selected new methods solving the sign problem can be
found in the recent review by Aarts~\cite{Aarts:2015kea}.
\section{Density-of-states approach to complex action systems}
\subsection{Density-of-states and the overlap problem}
Let us consider the partition function $Z$ of a theory of one degree
of freedom $\phi $ with a complex action:
\be
Z = \int {\cal D}\phi \;
\exp \{ \beta S_R[\phi] + i \mu S_I[\phi] \}
\label{eq:1}
\end{equation}
where $\mu $ is the ``chemical potential'', and $S_{R/I} $ are real
and imaginary parts of the action. We introduce the generalised density
of states~\cite{Langfeld:2014nta} by
\be
P_\beta (s) = \int {\cal D}\phi \; \delta \Bigl( s - S_I[\phi] \Bigr) \;
\exp \{ \beta S_R[\phi]\} \; .
\label{eq:2}
\end{equation}
For $\beta=0$, $P_0(s)$ just counts the number of states with the
constraint that the imaginary part of the action is given by $s$. At
finite $\beta $, the number count is weighted by the ``Gibbs'' factor
$ \exp \{ \beta S_R[\phi]\}$. Once $P_\beta (s)$ is known, the task to
calculate the partition function boils down to evaluate the integral
\be
Z(\beta,\mu) \; = \; \int ds \; P_\beta (s) \; \exp \{ i \, \mu \,
s\} .
\label{eq:3}
\end{equation}
Since the integrand in (\ref{eq:2}) is perfectly real, the
difficulties with the sign problem are relegated to the 1-dimensional
integral (\ref{eq:3}). In fact, $P_\beta (s)$ could be estimated by
performing a standard Monte-Carlo simulation with the Gibbs factor
$\exp \{ \beta S_R[\phi]\}$ and to bin the values for $S_I$ in a
histogram. The LLR algorithm will provide us with $\beta=0$, $P_0(s)$
over hundreds of orders of magnitude (see below for an example). The
aim of this paper is to discuss the options for a calculation of the
highly oscillating integral (\ref{eq:3}).
\medskip
Let us scope the amount of difficulty that resides with this task. We
firstly note that the action $S_i$ is an extensive quantity $S_I(\phi)
= V s_I$ with $V$ the number of degrees of freedom (volume) and with the
action density $s_i$ of order one. A good qualitative choice (see
e.g.~\cite{Langfeld:2013kno}) is given by
$$
P_\beta (s) = \exp \Bigl\{ - \frac{ s^2 }{ V } \Bigr\}
\hbo \hbox{leading to } \hbo
Z \; = \; \int ds \; \mathrm{e}^{-s^2/{ V}} \; \exp \{ i \, \mu s \}
\; \propto \; { \exp\{ - \frac{\mu^2}{4} \, { V} \} } \; .
$$
For a chemical potential $\mu $ of order one, $Z$ is exponentially
suppressed with the number of degrees of freedom $V$. On the other
hand, $P_\beta (s)$ is only known numerically and of order one at
least for small $s$. For a successful evaluation of the integral
in $Z$ (\ref{eq:3}), any numerical method for obtaining $P_\beta (s)$
must have the properties
\begin{itemize}
\item exponential error suppression for extensive quantities
\item for the whole domain of support for $S_I$.
\end{itemize}
The LLR algorithm proposed in~\cite{Langfeld:2012ah} just delivers
that.
\subsection{The $Z_3$ spin model as showcase }
\begin{figure}[t]
\begin{minipage}{18pc}
\includegraphics[width=18pc]{deltaN_den_24_34_05b.pdf}
\caption{\label{fig:3a} Histogram count for $N_+-N_- \propto S_I$
(linear scale); $24^3$ lattice, $\tau=0.17$, $\kappa=0.05$. }
\end{minipage}\hspace{2pc}%
\begin{minipage}{14pc}
\includegraphics[width=14pc]{deltaN_histo_log2.pdf}
\caption{\label{fig:3b} Same histogram on a logarithmic scale with the
LLR result now reaching beyond $ N_+-N_- \approx 5,500$. }
\end{minipage}
\end{figure}
The key question is whether the quality of the result for $P_\beta
(s)$ obtained by the LLR algorithm is good enough to admit a reliable
calculation of the partition function $Z$ via the integral
(\ref{eq:3}). The answer to this question is model dependent. The
3-dimensional $Z_3$ spin model on a cubic lattice at finite density
maps onto a real action system upon dualisation and is thus open to
standard Monte-Carlo simulations. It serves as a first benchmark test
in the feasibility study for our approach to theories with a sign
problem. Here, we will review our findings for the 3-dimensional
case. Degrees of freedom are the centre elements $z(x)$ that take
values from the group $Z_3$
$$
z(x) \; \in \{1,z_+,z_-\} \; , \hbo z_{\pm } = (1 + i \sqrt{3})/2 .
$$
The action is given by
\be
S[z] = { \tau} \sum _{x,\nu} [z_x z^\ast _{x+\nu} +cc ] \; + \;
\sum _x [ { \eta} z_x + { \bar{\eta}} z^\ast _x ] \; , \hbo
\eta = \kappa \; \exp (\mu ) \; , \; \; \; \bar{\eta } = \kappa \;
\exp ( - \mu ) \; .
\label{eq:10}
\end{equation}
This model is inspired by finite density QCD in the heavy quark limit,
and the parameter $\tau $ is reminiscent of the temperature and
$\kappa $ reflects the quark hopping parameter~\cite{Mercado:2011ua}.
Apparently, the action becomes complex as soon as $\mu \not=0 $. If
for a given configuration $z(x)$ the quantity $N_\pm$ represents the
number of spins on the lattice with $z= z_\pm$, the imaginary part of
the action can be written as:
\be
S_I \; = \; \frac{\eta - \bar{\eta} }{2i} \sum _x [z \, - \, z^\ast]
\; = \; \sqrt{3} \, \kappa \, \mathrm{sinh}(\mu) \; [N_+ - N_-] \; .
\label{eq:11}
\end{equation}
We have performed a standard Monte-Carlo simulation using a $24^3$
lattice, $\kappa = 0.17$ and $\kappa = 0.05$ to obtain a histogram for
$N_+ - N_-$ (see~\cite{Langfeld:2014nta} for details). The result is
shown in figure~\ref{fig:3a} on a linear scale (see
figure~\ref{fig:3b} with the $y$-axis on a logarithmic scale). Note
that we have very little ``events'' with $N_+- N_- >1000$. For the
calculation of the Fourier transform to obtain the partition function
$Z$ in (\ref{eq:3}), the tails with $\vert N_+-N_- \vert \gg 1000$
significantly contribute for $\mu \approx 1$. We recover the {\it
overlap problem} in the light of the density-of-states
approach. Our result for $P(N_+-N_-)$ using the LLR method is also
shown in the figures~\ref{fig:3a} and \ref{fig:3b}. We find a
reassuring agreement with the standard simulation result and moreover
we have obtained the distribution $P(N_+-N_-)$ for values as large as
$N_+- N_- =5000$ and over sixty orders of magnitude.
\section{The partition function from highly oscillating
integrals\label{sec:osc}}
\subsection{Polynomial fit \label{sec:pf} }
Our task is now to carry out the Fourier transform of the generalised
density of states $P (s)$ in order to obtain the partition
function $Z$ (see (\ref{eq:3})). One advantage of our approach is that
we can use sophisticated integration techniques, which converge like
$1/n^p$, $p>1$, where $n$ is the number
of evaluations of the integrand. Note that any Monte-Carlo
integration that sub-sums the Fourier transform necessarily converges at best
like $1/\sqrt{n}$. Note, however, that even the sophisticated
integrations techniques would fail for sizeable values of the chemical
potential without further knowledge of the function $P (s)$. We
have so far studied the density-of-states for the theories $U(1)$,
$SU(2)$, $SU(3)$ and $Z_3$ and a common feature has been that
$log \, P(s)$ is indeed very smooth and, as expected, monotonic
functions of its variable $s$. In the present case, we also have the
symmetry under reflection $P (s) = P (-s)$. The ``smoothness'' of
$P (s)$ is summarised by the fact that the Taylor expansion
\be
\ln \, P (s) \; = \; \sum _{i>0, \mathrm{even} }^q c_i \, s^i \;
, \hbo q = 2,4,6,8,\ldots
\label{eq:20}
\end{equation}
can produce results that are indistinguishable from the numerical
findings for $P (s)$ within error bars. Depending on the region
of the parameter space $\beta = (\tau,\kappa)$, $q$ as small as $4$ might be
sufficient. As soon as an acceptable representation of the numerical
data in terms of the ansatz (\ref{eq:20}) is found, the calculation of
the partition function can be performed in a ``semi-analytic'' way
using advanced numerical integration techniques:
\be
Z(\mu) \; = \; 2 \int ds \; P (s) \; \cos ( \mu \,
\, s \, ) \; = \; 2 \int ds \; \exp \left\{ \sum _i^q c_i s^i
\right\} \, \cos (\mu \, s ) \; .
\label{eq:21}
\end{equation}
\subsection{Asymptotic referencing}
Similar to the scenario in the previous subsection, it might be useful
to describe the gross features of $P(s)$ by an analytic function, say
$P_\mathrm{asy}(s)$ especially for large values $s$. Decomposing
\be
P(s) \; = \; \bar{P}(s) \, P_\mathrm{asy}(s) \; ,
\label{eq:22}
\end{equation}
the function $ \bar{P}(s) $ might have a moderate range of values
although $P(s)$ spans many orders of magnitude. For a technical
side-remark, we point out that the LLR
algorithm~\cite{Langfeld:2012ah} can be easily adapted to directly
produce $ \bar{P}(s) $ for a given choice for $P_\mathrm{asy}(s)$.
The partition function is obtained by Fourier transformation:
\be
Z(\mu) \; = \; \hbox{FT}[P](\mu) \; = \; \int ds \; P(s) \;
\mathrm{e}^{i\mu s} \; = \; \int dx \; \hbox{FT}[\bar{P}](x) \;
\hbox{FT}[P_\mathrm{asy}](\mu \, - \, x ) \; .
\label{eq:23}
\end{equation}
The idea is that $\hbox{FT}[P_\mathrm{asy}]$ is analytically available
and has already incorporated a good deal of the cancellations. For
moderate values of $\kappa $ and $\tau $, a sensible choice is
\be
P_\mathrm{asy}(s) \; \propto \; \exp\{- \alpha s^2\} \hbo \hbox{leading to}
\hbo \hbox{FT}[P_\mathrm{asy}](\mu \, - \, x ) \; \propto \;
\exp \left\{ - \, \frac{ (\mu-x)^2}{4 \alpha } \right\} \; .
\label{eq:24}
\end{equation}
Depending on the size of the intrinsic scale $\alpha $, we only need
to numerically calculate $\bar{P}(s)$ for $s \approx \mu $ for the
chemical potential $\mu $ of interest.
\subsection{Eigenfunction expansion}
Let us expand the generalised density-of-states $P(s)$ in terms of a
complete set of eigenfunctions (in the L2 sense) that are
eigenfunctions of a differential operator:
\be
P(s) \; = \; \sum _n c_n \; \psi _n(ks) \; ,
\label{eq:30}
\end{equation}
where $k$ is a parameter that will be adapted to the intrinsic scale of
the theory under studies. We need not necessarily adopt an eigensystem
with an all discrete set of eigenfunctions. Here, we have indeed the
eigenfunctions of the harmonic oscillator in mind having this
property:
\be
- \; \frac{d^2}{ds^2} \psi _n (ks) \; + \; k^4 \, s^2 \; \psi _n(ks) \; = \;
k^2 \; (2n+1) \; \psi _n (ks) \; .
\label{eq:31}
\end{equation}
The ortho-normal eigenfunctions are the well-known Hermite functions:
\be
\psi_n(x) \; = \; \frac{1}{\sqrt{2^n n! \sqrt{\pi} }} \;
\mathrm{e}^{-x^2/2} \; H_n(x) \; , \hbo
H_n(x) \; = \; (-1)^n \; \mathrm{e}^{x^2} \; \frac{d^n}{dx^n} \;
\mathrm{e}^{-x^2} \; ,
\label{eq:32}
\end{equation}
where the $H_n(x)$ are the Hermite polynomials. Using the
``Schr\"odinger equation'' (\ref{eq:31}), one proves that the
eigenfunctions are fixed points of the Fourier transformation:
\be
\hbox{FT}[\psi _n](\mu) \; = \; \int ds \; \psi_n (ks) \;
\mathrm{e}^{i\mu s} \; = \; \frac{ \sqrt{2 \pi}}{k} \; i^n \;
\psi _n \left( \frac{\mu}{k} \right) \; .
\label{eq:33}
\end{equation}
We therefore find for the partition function
\be
Z(\mu) \; = \; \hbox{FT}[P](\mu) \; = \; \sum _n c_n \; \hbox{FT}[\psi
_n](\mu) \; = \; \frac{ \sqrt{2 \pi}}{k} \; \sum _n i^n \; c_n \; \psi _n
\left( \frac{\mu}{k} \right) \; .
\label{eq:34}
\end{equation}
If the chemical potential $\mu $ is larger than the intrinsic scale
$k$, we observe that we attain small values for $Z$ already from the
asymptotic behaviour of the Hermite functions, i.e., $\psi _n(x)
\approx \exp \{-x^2/2\}$.
\section{The $Z_3$ spin model - numerical results}
\begin{figure}[h]
\includegraphics[width=0.6\textwidth]{overlap_all2.pdf}
\caption{\label{fig:4} The overlap $O(\mu)$ (\ref{eq:41}) from a
direct Monte-Carlo simulation of the dual theory (DS) and from the
LLR approach for several lattice sizes $L^3$. $\tau = 0.1$, $\kappa
= 0.01$. }
\end{figure}
In order to quantify the influence of the imaginary part, we
introduce the partition function $Z_\mathrm{mod}$ that features the
$Z_3$ action (\ref{eq:10}) from which we have dropped the imaginary
part:
\be
S_\mathrm{mod}[z] = { \tau} \sum _{x,\nu} [z_x z^\ast _{x+\nu} +cc ] \; + \;
\kappa \, \cosh (\mu) \, [ 2 N_1 \, + \, N_+ \, + \, N_- \, ] \; ,
\label{eq:40}
\end{equation}
where $N_1$ is the number of $z=1$ elements on the lattice.
The partition function of the modified theory does depend on the
chemical potential, but note that it can be simulated by standard
Monte-Carlo techniques since its Gibbs factor is real and positive by
construction. We then define the {\it overlap} between the full theory
and the modified theory by
\be
O(\mu ) = \frac{ Z(\mu) }{ Z_\mathrm{mod}(\mu) } \; .
\label{eq:41}
\end{equation}
We point out that being able to calculate the overlap $O(\mu)$
provides access to the observables of the full theory. For instance,
the density $\rho (\mu)$ acquires two parts:
\be
\rho (\mu) \; = \; \frac{d \, \ln Z(\mu) }{ d\mu } \; = \;
\frac{d \, \ln O(\mu) }{ d\mu } \; + \; \frac{d \, \ln
Z_\mathrm{mod}(\mu) }{ d\mu } \; ,
\label{eq:42}
\end{equation}
where the latter part is free of a sign problem and is calculable by
standard Monte-Carlo simulations.
\medskip
An appealing feature of the $Z_3$ spin model is that its dual is a
real theory open for Monte-Carlo simulations. In fact, the theory can
be efficiently simulated by a worm type algorithm
(see~\cite{Mercado:2011ua}) where the ``worms'' are conserved flux
lines of the dual theory (see~\cite{Langfeld:2013kno} for this
interpretation). It is still difficult to calculate the partition
function itself since theories with different chemical potentials
differ in the free energy density $f(\mu)$ leading to poor overlap:
\be
\frac{ Z(\mu + \Delta \mu) }{ Z(\mu) } \; = \;
\exp \Bigl\{ - \, [ f(\mu + \Delta \mu) \, - \, f(\mu) ] \; V \Bigr\}
\; .
\label{eq:43}
\end{equation}
We used a variant of the ``snake
algorithm''~\cite{deForcrand:2000fi} to calculate ratios of the
partition function and to reconstruct the partition function from those:
\be
Z( k \, \Delta \mu ) \; = \; Z(0) \, \prod _{\ell=1}^k \frac{ Z(\ell \Delta
\mu ) }{ Z((\ell-1) \Delta \mu ) } \; ,
\label{eq:44}
\end{equation}
where $\Delta \mu $ must be chosen small enough (depending on the
number of degrees of freedom $V$) to ensure a good enough
signal-to-noise ratio. We here point out an advantage of the LLR
approach: $k$ simulations of the dual theories are necessary to
arrive at the target value $\mu _t \; = \; k \Delta \mu
$, while the LLR approach can aim directly at the chemical potential
$\mu _t$ of interest.
\medskip
We have simulated the $Z_3$ theory with non-zero chemical potentials
using the LLR method~\cite{Langfeld:2014nta}. We point out that the
method is {\it exact} implying that the numerical results need to
agree within error bars with the exact values. Note, however, that
sophisticated techniques for the error analysis (e.g.~bootstrap) might
be needed and that standard Gaussian error analysis might fail at least
in certain regions of parameter space~\cite{Mercado:2014dva}.
Our results from the direct simulation (DS) of the dual theory are
shown in figure~\ref{fig:4} in comparison with our results from the
LLR approach. In the latter case, we have used
the method of the {\it polynomial fit} from subsection~\ref{sec:pf}
for the evaluation of the highly oscillating integral. We indeed
encounter a strong sign problem since the overlap is as small as
$10^{-16}$ for $\mu \approx 2$. So far, we have only explored a
limited region of the parameter space $(\tau,\kappa)$, but our results
serve as a proof of concept: for a range of volumes and for the
case of a strong sign problem, the simulation of the theory in its
original degrees of freedom is feasible using the LLR techniques.
\section{Conclusions}
Quantum field theory at finite density or, more general, statistical
systems with complex actions such as the imbalanced Fermi
gas~\cite{Goulko:2010rw} still await first principles results from
computer simulations. In the latter case, theoretical findings can be
scrutinised against experiments, and, given the level of abstraction that
went into model building, agreement would signal an
understanding of the materials at hand (see
e.g.~\cite{Wingate:2012jh}). In the context of QCD at finite baryon
densities, a variety of mechanisms have been proposed over the last
couple of years that should describe the states of baryon matter in
the intermediate temperature and density range with or without a
strong magnetic field. Proposals feature ``quarkyonic
matter''~\cite{McLerran:2007qj}, suggested on the basis of the
't~Hooft limit, the ``chiral magnetic effect''~\cite{Fukushima:2010fe}
or the ``Fermi-Einstein condensation'' of
quarks~\cite{Langfeld:2011rh}, and this is not meant to be a complete
list. Lattice simulations would provide a genuine non-perturbative
approach with good systematic control of the errors, but are hampered
by the notorious sign problem: for a non-vanishing chemical potential,
the Gibbs factor is complex (or, at least, not positive definite) and
the action based importance sampling, which is at the heart of the
Monte-Carlo simulations, are impossible.
\medskip
Alongside the new theory proposals for the potential state of matter a
finite densities, the last decade has seen promising progress for the
simulation of theories with a sign problem. In fact, many of the
related ideas are rooted in the literature for decades, but techniques
have reached an unprecedented level of sophistication. A good example
are the Langevin simulation of complex actions systems, which date back
to the early works by Parisi~\cite{Parisi:1984cs} and Karsch and
Wyld~\cite{Karsch:1985cb} from the mid eighties, but underwent a
Renaissance when it was realised the Silver-Blaze problem can be
avoided for the case of a relativistic Bose gas~\cite{Aarts:2008wh}.
\medskip
Similarly, the LLR algorithm~\cite{Langfeld:2012ah} emerged from a
modification of Wang-Landau type algorithms~\cite{WangLandau2001} and
have progressed along the lines of the so-called density-of-states
methods (see e.g.~\cite{Bazavov:2012ex}
or~\cite{Azcoiti:1989rv,Anagnostopoulos:2001yb,Azcoiti:2002vk,Azcoiti:2011ei}).
The LLR algorithm copes with
continuous degrees of freedom and is designed to numerically calculate
the probability distribution of an extensive quantity,
the action~\cite{Langfeld:2012ah} or e.g.~the Polyakov
line~\cite{Langfeld:2013xbf}, to an unprecedented precision and for
regions of the variable (e.g.~action) that would never be visited by an
action based importance sampling Monte-Carlo approach. Thus, the LLR
algorithm naturally solves overlap problems. Given the belief of a
correspondence between the overlap and the sign problem in finite
density quantum field theory, it was natural to explore its readiness
for complex action theories~\cite{Langfeld:2014nta}. Here, the LLR
algorithm provides a high quality probability distribution for the
imaginary part of the action, and the partition function emerges as
the Fourier transform of this distribution with the chemical potential
as its frequency (see (\ref{eq:3})). Details and advances of the LLR
methods have e.g.~been reported
in~\cite{Langfeld:2012ah,Pellegrini:2014gha,Mercado:2014dva,Langfeld:2014nta}.
In this paper, we have focused on possible techniques to extract an
signal, which is exponentially small with the volume, from the highly
oscillating Fourier integral. As a proof of concept, we have studied
the $Z_3$ spin model~\cite{Langfeld:2014nta}. For this model, we have
used (for a limited range of the parameter space) the Polynomial Fit
technique from subsection 3.1. Despite of a severe sign problem (as
quantified by a phase factor expectation value at the $10^{−16}$
level; see figure~\ref{fig:4}), we were able to obtain reliable
results by simulating the theory in its original formulation using the
LLR techniques. An analysis of the full parameter
space of the $Z_3$ model, the LLR simulation of more involved theories
(e.g.~the $O(2)$-model) and the exploration of the techniques outlined
in section~\ref{sec:osc} to carry out the Fourier transform are
currently work in progress.
\ack
We are indebted to Arieh Iserles for fruitful discussions on highly
oscillating integrals. This work is supported by STFC under the DiRAC
framework. We are grateful for the support from the HPCC Plymouth,
where the numerical computations have been carried out. KL and AR are
supported by the Leverhulme Trust (grant RPG-2014-118) and STFC
(grant ST/L000350/1). BL is supported by the Royal Society (grant
UF09003) and by STFC (grant ST/G000506/1).
\section*{References}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 483 |
"""Entry point for applications with platform specific initializations."""
from absl.app import * # pylint: disable=wildcard-import
| {
"redpajama_set_name": "RedPajamaGithub"
} | 2,945 |
package org.lolxml;
public interface Constants {
public static final String TAG_DATA="data";
public static final String TAG_SYM="sym";
public static final String TAG_SWITCH="switch";
public static final String TAG_CASE="case";
public static final String TAG_EVAL="eval";
public static final String TAG_STORE="store";
public static final String TAG_FOREACH="foreach";
public static final String TAG_IF="if";
public static final String TAG_WHILE="while";
public static final String TAG_GRAMMAR="grammar";
public static final String TAG_EXP="exp";
public static final String ATT_ID="id";
public static final String ATT_TEST="test";
public static final String ATT_IDREF="idref";
public static final String ATT_VALUE="value";
public static final String ATT_PROPERTY="property";
public static final String ATT_TYPE="type";
public static final String ATT_SELECT="select";
public static final String ATT_VAR="var";
public static final String TYPE_STRING="string";
public static final String TYPE_NODE="node";
public static final String TYPE_NODESET="nodeset";
public static final String TYPE_NUMBER="number";
public static final String TYPE_BOOLEAN="boolean";
public static final String KEY_GRAMMARNODE="grammarNode";
public static final String NAMESPACE = "http://lolxml.org";
public static final String FUNC_RANDOM = "random";
public static final String FUNC_EVALUATE = "evaluate";
}
| {
"redpajama_set_name": "RedPajamaGithub"
} | 8,710 |
In this post we are providing the set of free Christmas icons. These best Christmas icon sets are absolutely free to download and can be used for different purposes like website icons, application icons, computer icons and lot more. These cute Christmas icon packages are designed by our professional designers for our all regular readers.
Free Christmas Icons Set : Christmas is just on the door; we all wait for this festival all along the year. Fair of lights, creative snowman, decorated trees, beautiful gifts and a lot of happiness; that's what Christmas brings into our lives. The theme of Christmas can be easily seen everywhere. Whether it is a common market or costumes, toys, gadget screens, mobile ringtones and almost everything; Christmas is everywhere.
Christmas pictures and Christmas icons are the hot search among every web monks. Beside with filling the colors of Christmas; Christmas icons bounds the guest to the screen. So to help our readers to add the merry feel of Christmas on the websites, desktops and applications; we are providing the collection of best free Christmas icons set.
These Christmas icons are specially designed by our professional designers to save you from the hassle of exploring the google for the perfect option. In our last post we also provided you the set of Christmas wallpapers which was admired by a lot of our readers.
You too can download this collection of free Christmas icon set to wish your viewers a merry Christmas. These free Christmas web icon sets are available in different sizes (including 48X48 icons, 64X64 icons,128X128 icons and 256X256 icons) so that you can use them directly according to your need.
These royalty free cool Christmas icon packages can be used for different genre of purposes including web icons, application icons, folder icons, computer icons and many more.
This free Christmas icon set is loaded with the coolest web icons simply dipped in the merry spirit of Christmas. These icons are royalty free and can be used for different screen sizes.
Christmas trees covered in snow; it is the most beautiful scene of the Christmas. This set of Christmas tree icons and snow man icon will surely add the beauty to your screens. You can instantly download this icon package by clicking on the below provided Download button.
Red is the color of the Christmas; to serve this flow we are providing you this set of cute Christmas icons. These free icons are the best way to express your greeting on the websites, applications and desktop icons.
I hope you will like our this freebie of Christmas icons. You are welcome to give your reviews and suggestion about our work. Keep following Webgranth for more amazing freebies and information bags.
Merry Christmas to all of you from the Team Webgranth.
I like your Christmas Icon sets. They all are very nice and attractive. | {
"redpajama_set_name": "RedPajamaC4"
} | 2,458 |
Q: ERROR: Gradle DSL method not found: 'google()' Possible causes: Erros in log
ERROR: Gradle DSL method not found: 'google()'
Possible causes:
The project 'Project Name' may be using a version of the Android Gradle plug-in that does not contain the method (e.g. 'testCompile' was added in 1.1.0).
Upgrade plugin to version 3.4.0-alpha01 and sync project
The project 'Project Name' may be using a version of Gradle that does not contain the method.
Open Gradle wrapper file
The build file may be missing a Gradle plugin.
Apply Gradle plugin
Gradle
buildscript {
google()
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url 'https://jitpack.io' }
repositories {
maven { url 'https://maven.fabric.io/public' }
}
dependencies {
classpath 'io.fabric.tools:gradle:1.+'
}
}
apply plugin: 'com.android.application'
apply plugin: 'io.fabric'
repositories {
maven {
url "https://maven.google.com"
}
maven { url 'https://maven.fabric.io/public' }
maven { url 'https://jitpack.io' }
}
android {
compileSdkVersion 28
buildToolsVersion '28.0.3'
defaultConfig {
applicationId "package"
minSdkVersion 16
targetSdkVersion 28
versionCode 1
versionName "1.0.0"
multiDexEnabled true
}
buildTypes {
release {
minifyEnabled false
proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro'
}
}
}
dependencies {
implementation 'com.github.Kunzisoft:Android-SwitchDateTimePicker:2.0'
implementation 'com.android.support:support-v4:28.0.0'
implementation 'com.google.android.gms:play-services-auth:16.0.1'
implementation 'com.google.firebase:firebase-messaging:17.3.4'
implementation 'com.google.android.gms:play-services-maps:16.0.0'
implementation 'com.google.android.gms:play-services-location:16.0.0'
implementation 'com.flipboard:bottomsheet-commons:1.5.3'
implementation 'org.greenrobot:eventbus:3.1.1'
implementation 'com.ramotion.foldingcell:folding-cell:1.2.1'
implementation 'com.braintreepayments.api:drop-in:3.6.1'
implementation('com.facebook.android:facebook-android-sdk:4.27.0') {
exclude group: 'com.google.android.gms'
}
implementation('com.facebook.android:account-kit-sdk:4.+')
implementation 'com.github.bumptech.glide:glide:4.8.0'
annotationProcessor 'com.github.bumptech.glide:compiler:4.8.0'
implementation 'com.github.TheBrownArrow:PermissionManager:1.0.0'
implementation 'com.loopj.android:android-async-http:1.4.9'
implementation 'com.android.support:design:28.0.0'
implementation 'com.android.support:appcompat-v7:28.0.0'
implementation 'com.android.support:cardview-v7:28.0.0'
implementation 'com.github.jrvansuita:PickImage:2.2.4'
implementation 'com.github.demoNo:AutoScrollViewPager:v1.0.2'
implementation 'com.github.sujithkanna:smileyrating:1.6.8'
implementation 'com.google.code.gson:gson:2.8.5'
implementation('com.crashlytics.sdk.android:crashlytics:2.6.8@aar') {
transitive = true;
}
implementation 'com.airbnb.android:lottie:2.3.0'
implementation 'com.tubb.smrv:swipemenu-recyclerview:5.4.4'
implementation 'com.yarolegovich:discrete-scrollview:1.3.2'
implementation 'com.norbsoft.typefacehelper:library:0.9.0'
implementation 'com.github.florent37:diagonallayout:1.0.7'
implementation 'com.yinglan.shadowimageview:shadowimageview:1.0.4'
implementation 'agency.tango.android:material-intro-screen:0.0.5'
}
configurations.all {
resolutionStrategy {
force 'com.android.support:support-v4:28.0.0'
}}
apply plugin: 'com.google.gms.google-services'
Build.gradle
// Top-level build file where you can add configuration options common to all sub-projects/modules.
buildscript {
repositories {
google()
maven {
url 'https://maven.google.com'
}
jcenter()
maven { url 'https://jitpack.io' }
}
dependencies {
classpath 'com.google.gms:google-services:4.0.2'
classpath 'com.android.tools.build:gradle:3.4.0-alpha01'
// NOTE: Do not place your application dependencies here; they belong
// in the individual module build.gradle files
}
}
allprojects {
repositories {
google()
maven {
url 'https://maven.google.com'
}
jcenter()
mavenCentral()
maven {
url "http://dl.bintray.com/dasar/maven"
}
maven { url 'https://jitpack.io' }
}
}
task clean(type: Delete) {
delete rootProject.buildDir
}
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 8,343 |
Q: call a function of another class in same component file I have 2 classes in the same component.ts file. one class is for embedding the Doc blot and another one is component class. so I have to call a function that resides in component class from Doc blot class. i have tried this solution but it wasn't working. it throws an error Expected 12 arguments, but got 0.. any help is very much appreciated.
xyz.component.ts
class DOCBlock extends Embed {
foo() {
let component = new SomeComponent()
component.bar()
}
export class SomeComponent implements Oninit {
contructor(12 arguments......) { }
bar() { // magic happens here }
}
A: When you call let component = new SomeComponent() where are the arguments for the constructor? You have specified that the constructor takes 12 arguments but not provided any. Do you need a constructor on DBCBlock that takes 12 arguments too, so it can forward them to SomeComponent's constructor?
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 2,470 |
La Clasificación UEFA para la Copa Mundial de Fútbol es un torneo internacional de selecciones masculinas nacionales de fútbol en Europa, organizado por la Unión de Asociaciones Europeas de Fútbol (UEFA). Se lleva a cabo para determinar aquellas selecciones que participarán al principal torneo internacional oficial de fútbol masculino entre selecciones nacionales en el mundo, la Copa Mundial de Fútbol.
Actualmente, participan cincuenta y cinco equipos que disputan por dieciséis cupos.
Selecciones nacionales asociadas
La siguiente lista se organiza por última calificación obtenida y mejor posición final en la última Copa mundial de fútbol.
Formato de competición
El torneo clasificatorio europeo consta de 2 rondas.
En la primera ronda o fase de grupos las 55 selecciones participantes fueron divididas en 5 grupos de 6 equipos y 5 grupos de 5 equipos. Todos los grupos se desarrollan bajo un sistema de todos contra todos en el que cada equipo juega dos veces contra sus 5 rivales en partidos de local y visitante, los equipos se clasifican de acuerdo a los puntos obtenidos, los cuales son otorgados de la siguiente manera:
Si dos o más equipos culminan sus partidos empatados en puntos se aplican los siguientes criterios de desempate (de acuerdo a los artículos 20.6 y 20.7 del reglamento de la competición preliminar de la Copa Mundial de la FIFA :
Mejor diferencia de gol en todos los partidos de grupo.
Mayor cantidad de goles marcados en todos los partidos de grupo.
Mayor cantidad de puntos obtenidos en los partidos entre los equipos en cuestión.
Mejor diferencia de gol resultado de los partidos entre los equipos en cuestión.
Mayor cantidad de goles marcados en los partidos entre los equipos en cuestión.
Mayor cantidad de goles marcados en condición de visitante (si el empate es solo entre dos equipos).
Bajo la aprobación de la Comisión Organizadora de la FIFA, un partido de desempate en un campo neutral con un tiempo extra de dos periodos de 15 minutos y tiros desde el punto penal si fuese necesario.
Historia
Inicios
Tras la adjudicación del torneo a Uruguay de la Copa Mundial de Fútbol de 1930, el Comité Organizador repartió las invitaciones de los 16 cupos para el torneo. Ha sido la única edición de la Copa del Mundo sin fase clasificatoria. Todos los países afiliados a la FIFA fueron invitados a competir, teniendo como fecha límite para su respuesta el 28 de febrero de 1930.
Sin embargo, hubo un notable rechazo entre los países europeos. Argumentaron su ausencia debido a los altos costos que implicaba el viaje en barco a través del océano Atlántico y la grave crisis económica que había afectado al mundo en el último año. Los uruguayos se ofrecieron a pagar todos los gastos involucrados y compensar a los equipos de fútbol profesional por la ausencia de sus jugadores. A pesar de ello, la mayoría siguió rechazando la invitación y asistieron en el mismo mes a la Copa de las Naciones entre clubes en Suiza. La Asociación Uruguaya de Fútbol envió una carta de invitación a la Asociación de Fútbol de Inglaterra, pero su comité rechazó la propuesta el 18 de noviembre de 1929. Dos meses antes del comienzo del torneo, ningún equipo europeo confirmó su presencia.
Finalmente , , y asistieron a la cita en Montevideo. Francia lo hizo debido a la presión ejercida por Jules Rimet, aunque no acudieron Manuel Anatol, una de las figuras deportivas más sobresalientes de aquel país, ni el entrenador Gaston Barreau. Rimet también solicitó ayuda en persona al rey Carlos II de Rumania. El monarca obligó a la participación de sus jugadores, los cuales fueron elegidos al azar personalmente por el Rey en una empresa petrolera rumana. Los belgas, por su parte, participaron por la insistencia del vicepresidente de la FIFA, Rudolf Seedrayers.
Primeras clasificatorias
Para la Copa Mundial de Fútbol de 1934, realizada en Italia, se realizaron por primera vez eventos clasificatorios. 21 equipos compitieron por 12 cupos. debió participar en la clasificatoria, siendo el único organizador que ha participado en este tipo de torneos. Por su parte, en la Copa Mundial de Fútbol de 1938, realizada en Francia, se inscribieron 25 equipos para un total de 11 cupos. Por primera vez, los campeones del torneo previo (en este caso, Italia) y el equipo local (Francia) clasificaron automáticamente, por lo que en las clasificatorias se disputaron 14 cupos directos al evento mundial.
Clasificatorias años 50, 60 , 70 y 80
Luego de la Segunda Guerra Mundial que provocó una pausa del torneo durante 12 años, la Copa Mundial de Fútbol de 1950, disputada en Brasil, se inscribieron 18 selecciones para un total de 7 cupos. El campeón del torneo previo (en este caso, Italia) clasificó automáticamente, por lo que en las clasificatorias se disputaron en 6 grupos, repartidos de acuerdo a criterios geográficos incluyendo Israel y Siria. Para las rondas de clasificación para la Copa Mundial de Fútbol de 1954 participaron un total de 27 selecciones nacionales, compitiendo por 11 puestos en la fase final. Suiza calificó automáticamente. Egipto e Israel participaron en estas eliminatorias. Para las rondas de clasificación para la Copa Mundial de Fútbol de 1958 participaron un total de 29 selecciones nacionales, compitiendo por 11 puestos en la fase final. (como el organizador) y (como el campeón del anterior mundial) se clasificaron automáticamente.
En los años 60, para la clasificación para la Copa Mundial de Fútbol de 1962 participaron un total de 30 selecciones nacionales, compitiendo por 10 puestos en la fase final. Incluyendo Israel y Etiopía. En la clasificación para la Copa Mundial de Fútbol de 1966 participaron un total de 32 selecciones nacionales, incluyendo Israel y Siria, compitiendo por 9 puestos en la fase final. Inglaterra se clasificó automáticamente.
30 equipos participaron en la clasificación para la Copa Mundial de Fútbol de 1970, por 9 plazas. (como campeón del mundial anterior) se clasificó automáticamente. La FIFA rechazó la participación de Albania. Con los 29 equipos restantes se formaron 8 grupos de 3 o 4 equipos (3 grupos de 3 equipos y 5 grupos de 4 equipos). Se disputaron por el sistema de liguilla, con encuentros en casa y fuera. Los primeros de grupo se clasificaron para el Mundial. Para la Copa Mundial de Fútbol de 1974 de Alemania Federal, la UEFA disponía de 9,5 plazas de las 16 totales del mundial. Una plaza estaba asignada directamente para , por ser el país anfitrión, por lo que un total de 32 selecciones se disputaron 8,5 plazas. Los 32 equipos se repartieron en nueve grupos, cinco de ellos con cuatro equipos y el resto con tres. El primer clasificado de cada grupo se clasificaba automáticamente para el mundial, a excepción del ganador del grupo 9, que debía jugar antes un play-off con un representante de la zona CONMEBOL. Para la Copa Mundial de Fútbol de 1978, se repitió el mismo proceso.
Un total de 34 selecciones participaron en la Clasificación UEFA para la Copa Mundial de Fútbol de 1982, disputándose 14 plazas de las 24 totales del mundial, después de una ampliación con respecto al anterior mundial. Una plaza se asignó automáticamente a , por ser el país anfitrión. Las restantes 33 selecciones, en la que se incluyó a para evitar tensiones políticas en su zona geográfica, se dividieron en seis grupos de cinco equipos y en uno de tan solo tres. En cada grupo lograban la clasificación los dos primeros clasificados, a excepción del grupo de tres equipos, en el que solo se clasificaba el campeón. Para la Copa Mundial de Fútbol de 1986, Copa Mundial de Fútbol de 1990 se repitió el mismo proceso.
Clasificatorias años 90 y principios del siglo XXI
Para la Copa Mundial de Fútbol de 1994, la UEFA posee un total de doce cupos directos que fueron disputados por 39 selecciones. El torneo clasificatorio se inició en abril de 1992, antes de la Eurocopa 1992. Alemania, campeón vigente, tuvo asegurado su lugar en el Mundial, completando así 13 cupos para el continente. Los 39 equipos fueron divididos en seis grupos, uno de cinco, uno de siete y cuatro de seis. En cada grupo se disputa una liguilla de ida y vuelta, en que los dos primeros se clasificaron directamente para la Copa Mundial.Liechtenstein se retiró antes del sorteo, Islas Feroe debutó en una fase clasificatoria, Rusia reemplazó a la desaparecida Unión Soviética y Yugoslavia estaba suspendida por las guerras yugoslavas. Por otra parte, con la disolución de Checoslovaquia en enero de 1993, la selección de ese país siguió compitiendo como una sola nación bajo el nombre de "Equipo de Checos y Eslovacos".
En la Copa Mundial de Fútbol de 1998 de Francia, la UEFA disponía de 15 cupos de las 32 totales del mundial. Una plaza estaba asignada directamente para , como organizador del mundial, por lo que 49 selecciones se disputaron 14 plazas restantes. Con los 49 equipos se formaron 9 grupos (4 grupos de 6 equipos y 5 grupos de 5 equipos). Jugándose por el sistema de liguilla, con encuentros en casa y fuera. Los primeros de grupo se clasificaron para la Copa Mundial de Fútbol de 1998. Los segundos de grupo se ordenarían en una tabla con los puntos y diferencia de goles (contando solo con los encuentros disputados con el 1º, 3º y 4º de su grupo). El mejor segundo también se clasificaría directamente, el resto de los equipos jugarían una eliminatoria.En estas eliminatorias se clasificó por primera vez la Selección de futbol de Croacia.
El formato se repitió en Clasificación de UEFA para la Copa Mundial de Fútbol de 2002 ,En estas eliminatorias se clasificó por primera vez la Selección de futbol de Eslovenia , con 50 participantes por 14 cupos; la Clasificación de UEFA para la Copa Mundial de Fútbol de 2006, en estas eliminatorias se clasificó por primera vez la Selección de futbol de Ucrania, con 51 participantes por 14 cupos; en la Clasificación de UEFA para la Copa Mundial de Fútbol de 2010, en estas eliminatorias se clasificó por primera vez la Selección de futbol de Eslovaquia, con 51 participantes por 13 cupos ; y la Clasificación de UEFA para la Copa Mundial de Fútbol de 2014, en estas eliminatorias se clasificó por primera vez la Bosnia y Herzegovina, con 53 participantes por 13 cupos.
En la Clasificación de UEFA para la Copa Mundial de Fútbol de 2018 la UEFA contó con 14 cupos, uno otorgado previamente a Rusia, que se clasificó automáticamente como país anfitrión. En estas eliminatorias se clasificó por primera vez la Selección de futbol de Islandia.
Para la Clasificación de UEFA para la Copa Mundial de Fútbol de 2022, la UEFA cuenta con 13 cupos para otorgar, según la decisión del Comité Ejecutivo de la FIFA de mantener la distribución de plazas por confederación. Estas 13 plazas serán distribuidas tanto para este torneo como para la Liga de las Naciones de la UEFA 2020-21 y el formato de ambos torneos serán adaptados al número de plazas que les corresponda. Las 55 selecciones participantes participarán en cinco grupos de seis equipos y cinco grupos adicionales de cinco equipos. Los 10 primeros lugares clasificarán directamente mientras que los segundos lugares jugaran eliminatorias directas a dos rondas para definir los tres cupos restantes. En estas eliminatorias participarán los dos mejores equipos ubicados en la Liga de las Naciones de la UEFA 2020-21 que no lograron clasificarse.
Clasificaciones Europeas a las Copas del Mundo
Esta tabla muestra los principales resultados de las diversas ediciones.
Equipos clasificados
En negrita los Mundiales en los que fueron campeones.
En cursiva los Mundiales en los que fueron anfitriones.
Tabla histórica de las Eliminatorias europeas
Esta tabla histórica presenta el rendimiento estadístico de las 55 selecciones de fútbol de la UEFA que han participado en las respectivas fases de Clasificación para la Copa Mundial de Fútbol realizadas por la FIFA entre 1930 hasta 2020.
Se ordena a las selecciones asignándoles una posición general basándose en tres criterios:
Puntos obtenidos. Se otorgan 3 puntos por victoria, 1 por empate y ninguno por derrota. Este criterio es utilizado para todos los partidos a lo largo del torneo, aunque solamente fue establecido por la FIFA a partir de la edición de 1998.
Mayor diferencia de goles
Mayor cantidad de goles obtenidos.
Nota: Se incluyen los resultados de los partidos de repesca contra las selecciones de otras confederaciones
Goleadores por edición
Tabla histórica de goleadores
Cobertura mediática
La cobertura mediática se cubre bajo 4 formatos de comunicación diferentes: la televisión en directo, la radio en directo, la trasmisión en directo bajo el formato streaming por internet y la retransmisión de los momentos importantes del encuentro en directo por internet (este último normalmente lo hace la prensa digital y las páginas de apuestas).
Sudamérica
Derechos de transmisión en TV (abierta o no) y streaming:
: DSports, ESPN y Star+
: ESPN y Star+
: TNT Sports
: DSports, ESPN y Star+
: DSports, ESPN y Star+
: DSports, ESPN y Star+
: ESPN y Star+
: DSports, ESPN y Star+
: DSports, ESPN y Star+
: DSports, ESPN y Star+
Norteamérica
Derechos de transmisión en TV (abierta o no) y streaming:
: Sky Sports
: TUDN
: Telelatino y UEFA TV
Europa
Derechos de transmisión en TV (abierta o no) y streaming:
: Bein Sports.
: La 1, Cuatro (canal de televisión).
Véase también
Clasificación para la Copa Mundial de Fútbol
Clasificación de Conmebol para la Copa Mundial de Fútbol
Clasificación de AFC para la Copa Mundial de Fútbol
Clasificación de CAF para la Copa Mundial de Fútbol
Clasificación de Concacaf para la Copa Mundial de Fútbol
Clasificación de OFC para la Copa Mundial de Fútbol
Referencias
Notas | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 7,798 |
Q: Convert 24h to 12h datetime format in SQL Server I want a datetime variable which will be having 12 hour datetime format.
Below example converts date in 12 hour but not helpful because it is in VARCHAR format, if tries to convert in datetime it shows like 2016-03-08 00:00:00.000-
declare @t datetime = NULL
set @t = '2016-03-08 00:00:00'
SELECT CONVERT(VARCHAR, @t, 100) AS DateTime_In_12h_Format
I want a variable which will be holding 12 hour format something like this
declare @t datetime = NULL
set @t = '2016-03-08 00:00:00'
set @t = CONVERT(datetime, @t, 100)
select @t -> this should be -> Mar 8 2016 12:00AM
A: If you want to convert the current datetime for example:
SELECT CONVERT(VARCHAR, getdate(), 100) AS DateTime_In_12h_Format
Instead of getdate() you can put your desired column in a query (such as tdate in your example). If you want JUST the time in 12h and not the date and time use substring/right to separate them. It seems that you already know how to =).
This page lists every datetime conversion. It's really handy if you need other types of conversions.
A: Declare one more varchar to save new datetime
declare @t datetime = NULL
declare @t1 varchar(20) = NULL
set @t = '2016-03-08 00:00:00'
set @t1 = CONVERT(varchar(20), @t, 100)
select @t1 as DateTime_In_12h_Format
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 2,025 |
{"url":"http:\/\/annals.math.princeton.edu\/2017\/185-3\/p01","text":"# On the growth of $L^2$-invariants for sequences of lattices in Lie groups\n\n### Abstract\n\nWe study the asymptotic behaviour of Betti numbers, twisted torsion and other spectral invariants of sequences of locally symmetric spaces. Our main results are uniform versions of the DeGeorge\u2013Wallach Theorem, of a theorem of Delorme and various other limit multiplicity theorems.\n\nA basic idea is to adapt the notion of Benjamini\u2013Schramm convergence (BS-convergence), originally introduced for sequences of finite graphs of bounded degree, to sequences of Riemannian manifolds, and analyze the possible limits. We show that BS-convergence of locally symmetric spaces $\\Gamma\\backslash G\/K$ implies convergence, in an appropriate sense, of the normalized relative Plancherel measures associated to $L^2 (\\Gamma\\backslash G)$. This then yields convergence of normalized multiplicities of unitary representations, Betti numbers and other spectral invariants. On the other hand, when the corresponding Lie group $G$ is simple and of real rank at least two, we prove that there is only one possible BS-limit; i.e., when the volume tends to infinity, locally symmetric spaces always BS-converge to their universal cover $G\/K$. This leads to various general uniform results.\n\nWhen restricting to arbitrary sequences of congruence covers of a fixed arithmetic manifold we prove a strong quantitative version of BS-convergence, which in turn implies upper estimates on the rate of convergence of normalized Betti numbers in the spirit of Sarnak\u2013Xue.\n\nAn important role in our approach is played by the notion of Invariant Random Subgroups. For higher rank simple Lie groups $G$, we exploit rigidity theory and, in particular, the Nevo\u2013St\u00fcck\u2013Zimmer theorem and Kazhdan`s property (T), to obtain a complete understanding of the space of IRS\u2019s of $G$.\n\n## Authors\n\nMiklos Abert\n\nMTA Alfr\u00e9d R\u00e9nyi Institute of Mathematics, Budapest, Hungary\n\nNicolas Bergeron\n\nSorbonne Universit\u00e9s UPMC Universit\u00e9 Paris 06, Institut de Math\u00e9matiques de Jussieu-Paris Rive Gauche, UMR 7586 CNRS, Universit\u00e9 Paris Diderot, Sorbonne Paris Cit\u00e9 FR-75005 Paris\n\nIan Biringer\n\nBoston College, Chestnut Hill, MA\n\nTsachik Gelander\n\nFaculty of Mathematics and Computer Science, The Weizmann Institute of Science, Rehovot 76100, Israel\n\nNikolay Nikolov\n\nUniversity College, Oxford, OX1 4BH, United Kingdom\n\nJean Raimbault\n\nInstitut de Math\u00e9matiques de Toulouse, UMR5219 Universit\u00e9 de Toulouse, CNRS, UPS IMT, Toulouse, France\n\nIddo Samet","date":"2017-06-25 13:46:31","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.539932370185852, \"perplexity\": 589.6245109239458}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": false}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2017-26\/segments\/1498128320532.88\/warc\/CC-MAIN-20170625134002-20170625154002-00024.warc.gz\"}"} | null | null |
{"url":"http:\/\/astrobunny.net\/2015\/03\/27\/","text":"One of the great things about Junketsu no Maria is how much it examines the crappiness of people. There is so much facepalm to be had against the people in the story blatantly blurting out things that people nowadays still do but don't say. This isn't about the witch at all. Its about how ugly everything just is.\nContinue reading \u00bb\n\nwritten by astrobunny \\\\ ann, bishop, ezekiel, junketsu no maria, maria, priapus","date":"2021-10-26 06:21:18","metadata":"{\"extraction_info\": {\"found_math\": false, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 0, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.8979164361953735, \"perplexity\": 5784.295128365144}, \"config\": {\"markdown_headings\": true, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": false}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-43\/segments\/1634323587799.46\/warc\/CC-MAIN-20211026042101-20211026072101-00467.warc.gz\"}"} | null | null |
{"url":"https:\/\/socratic.org\/questions\/56f257877c01496905685889","text":"Question #85889\n\nMar 9, 2017\n\n(b)\n\nExplanation:\n\nRotational inertia of a cylinder of mass $M$ and radius $R$ rolling around cylinder axis or symmetry axis which passes through its center of mass is given by the expression.\n\n${I}_{c m} = \\frac{1}{2} M {R}^{2}$ ......(1)\n\n$\\implies$ For same mass of two cylinders\n\n${I}_{c m} \\propto {R}^{2}$\n\nImplies that cylinder with larger radius will have larger rotational inertia.","date":"2019-05-21 16:32:03","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 5, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 0, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.7527132630348206, \"perplexity\": 536.6398534969085}, \"config\": {\"markdown_headings\": false, \"markdown_code\": true, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2019-22\/segments\/1558232256494.24\/warc\/CC-MAIN-20190521162634-20190521184634-00161.warc.gz\"}"} | null | null |
Q: From SQL query to JPA query How I transform this into a jpa/jpl query? Will it be possible/cleaner to write it using CriteriaQuery?
select vc.category_id, count(distinct vc.something_id)
from
place p, something_category vc, something_poi vp, something v left join something_external_provider vep on vep.something_id=v.id
and (vep.provider is null or (vep.provider = 'EULA' and vep.lastretrieveddate >= now()-interval 1 day))
where p.id=vp.place_id and
v.id=vc.something_id and
v.id=vp.something_id and
v.isprivate=0 and
(v.is_sponsored is null OR v.is_sponsored=0) and
v.status in (1,11,31) and
vp.status in (1,2) and
(EXISTS (select id from something_app where something_id=v.id and app_id=1) OR NOT EXISTS (select id from something_app where something_id=v.id)) and
v.enddate>now() and
(country='US' and type='country,political')
group by vc.category_id;
here's what I came out with so far
private static final String QUERY = "SELECT vc.category, COUNT(DISTINCT vc.something) "
+ "FROM Place p, SomethingCategory vc, SomethingPoi vp, Something v LEFT JOIN SomethingExternalProvider vep ON vep.something=v AND "
+ "(vep.provider IS null or (vep.provider in ( :providers ) and vep.lastretrieveddate >= (now() - INTERVAL 1 DAY))) "
+ "WHERE p=vp.place AND v=vc.something AND v=vp.something AND v.isprivate=0 AND "
+ "(v.isSponsored is null OR v.isSponsored=0) AND v.status IN (?,?,?)) AND vp.status IN (1,2) and "
+ "(EXISTS (SELECT vga.id FROM SomethingApp vga WHERE something = v AND app = :app) OR NOT EXISTS (SELECT vga.id FROM SomethingApp vga WHERE something=v)) AND "
+ "v.enddate>now() AND (country = :country AND type='country, political') " + "GROUP BY vc.category";
and then
Query query = entityManager.createQuery(QUERY).setParameter("providers", string)
.setParameter("app", app).setParameter("US", country)
.setParameter(1, SomethingStatusType.ACTIVE.getType())
.setParameter(2, SomethingStatusType.EXTERNAL.getType());
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 2,348 |
\section*{Introduction}
In the algebraic theory of difference equations there has long been a focus on fields, but in the last decade the importance of studying solutions of systems of algebraic difference equations in more general difference rings has more and more been recognized. See e.g., \cite{SingerPut:difference,Hrushovski:elementarytheoryoffrobenius,Tomasic:ATwistedTheoremOfChebotarev,Tomasic:TwistedGaloisStratification,MoosaScanlon:GeneralizedHasseSchmidtVarietiesAndTheirJetSpaces,DiVizioHardouinWibmer:DifferenceGaloisofDifferential, Wibmer:FinitenessPropertiesOfAffineDifferenceAlgebraicGroups, Tomasic:AToposTheoreticViewOfDifferenceAlgebra}. In particular, the solution sets of systems of algebraic difference equations in the ring of sequences, which are of utmost importance from an applied perspective, have been studied in
\cite{OvchinnikovPogudinScanlon:EffectiveDifferenceElimination} and \cite{PogudinScanlonWibmer:SolvingDifferenceEquationsInSequences}.
Classical difference algebra (\cite{Cohn:difference, Levin}) provides a notion of dimension for a system of algebraic difference equations via the difference transcendence degree of an extension of difference fields. However, this approach is wholly inadequate for measuring the size of the solution set in the ring of sequences.
In respect to a system $F$ of algebraic difference equations, this shortcoming can be explained via difference ideals and difference Nullstellens\"{a}tze. In terms of difference ideals, the solution set of $F$ in difference fields corresponds to $\{F\}$, the smallest perfect difference ideal containing $F$, while the solution set of $F$ in the ring of sequences, corresponds to $\sqrt{[F]}$, the smallest radical difference ideal containing $F$. One has $\sqrt{[F]}\subseteq \{F\}$ but often this inclusion is strict. Classical difference algebra assigns a dimension to $\{F\}$, it does not provide a sensible notion of dimension for $\sqrt{[F]}$.
Let us illustrate the situation with the concrete example $F=\{y\s(y),\ yz-z\s(z)\}$. In a difference field, i.e., in a field equipped with an endomorphism $\s$, the equation $y\s(y)=0$ implies $y=0$. But then the second equation $yz-z\s(z)=0$ implies that also $z=0$. Thus, in difference fields, the only solution of $F$ is $(y,z)=(0,0)$ and the corresponding difference dimension is $0$. On the other hand, $F$ has plenty solutions in the ring of sequences. Rewriting the system in sequence notation we obtain
\begin{equation} \label{eq: ex intro}
y_iy_{i+1}=0, \quad y_iz_{i}-z_iz_{i+1}=0\quad \forall\ i\geq 0.
\end{equation}
For an arbitrary choice of $y_0,y_2,\ldots\in\mathbb{C}$ and $z_1,z_3,\ldots\in\mathbb{C}$ we have a sequence solution
$$
\begin{pmatrix} y \\
z
\end{pmatrix}
=\begin{pmatrix}
y_0 & 0 & y_2 & 0 & \ldots \\
0 & z_1 & 0 & z_3 & \ldots
\end{pmatrix}\in (\mathbb{C}^\N)^2.
$$
According to our definition, the difference dimension of $F$ is $1$ and this number is obtained by counting the degrees of freedom when determining a solution to (\ref{eq: ex intro}): For $i\geq 0$, the maximal number of values of $y_0,y_1,\ldots,y_i,z_0,z_1,\ldots,z_i$ that can be chosen freely in a solution $(y,z)$ of (\ref{eq: ex intro}) is $i+1$. Being able to choose all of these $2(i+1)$ values freely should correspond to difference dimension $2$, thus being able to choose $i+1$ values freely corresponds to difference dimension $1$.
For a general system $F$ of algebraic difference equations, our definition of the difference dimension of $F$ is
$$\sdim(F)=\lim_{i\to\infty}\frac{d_i}{i+1},$$
where $d_i$ is the number of degrees of freedom available when determining a sequence solution of $F$ up to order $i$. Implicit in the above definition is the important and non-trivial fact that this limit exists.
The above definition of the difference dimension can be seen as an algebraic version of the mean dimension, an important numerical invariant of discrete dynamical systems first introduced by M. Gromov in \cite{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI}.
Our definition is also in line with the description of the transformal dimension given by E. Hrushovski in \cite[Section 4.1]{Hrushovski:elementarytheoryoffrobenius}: ``If one thinks of sequences $(a_i)$ with $\s(a_i) = a_{i+1}$, the transformal dimension measures, intuitively, the
eventual number of degrees of freedom in choosing $a_{i+1}$, given the previous elements of the
sequence.''
In case $F$ is a perfect difference ideal, the above definition agrees with the standard definition via the difference transcendence degree. Thus, our definition of the difference dimension provides a meaningful generalization of the standard definition to situations where the approach via the difference transcendence degree cannot be applied.
For a system $F$ of algebraic difference equations in $n$ difference variables, the difference dimension of $F$ takes a value between $0$ and $n$. However, it does not need to be an integer. For example, the difference dimension of the difference monomial $y\s(y)\ldots\s^m(y)$ is $\frac{m}{m+1}$. This corresponds to the fact that when determining a solution to $y_iy_{i+1}\ldots y_{i+m}=0,\ i\geq 0$, in essence, every $(m+1)$-st entry of $y$ has to be zero, whereas all the other entries can be chosen freely. It is non-trivial to determine the difference dimension of a general univariate difference monomial. In fact, we will show that the difference dimension of $\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_m}(y)^{\beta_m}$ equals $1-c(\{\alpha_1,\ldots,\alpha_m\})$, where $c(\{\alpha_1,\ldots,\alpha_m\})$ denotes the \emph{covering density} of $\{\alpha_1,\ldots,\alpha_m\}\subseteq \mathbb{Z}$, a classical invariant in additive number theory.
Our notion of difference dimension can very conveniently be expressed in terms of difference algebras. In fact we assign a difference dimension to an arbitrary finitely difference generated difference algebra over a difference field. Even though this number need not be an integer, we are able to show that the difference dimension of a finitely difference generated difference algebra satisfies all the properties one might expect by way of analogy with the familiar case of finitely generated algebras over a field.
As our difference dimension need not be an integer, it is natural to ask: When is it an integer and what values can occur? We isolate several cases
in which the difference dimension is an integer. For example, we show that the difference dimension of a finitely difference generated difference algebra is an integer if the difference algebra can be equipped with the structure of a Hopf-algebra in such a way that the Hopf-algebra structure maps commute with $\s$. We do not fully answer the question which numbers occur as difference dimensions, but we reduce this question to a purely combinatorial problem.
In this article we are only concerned with ordinary difference equations. That is, we only consider a single endomorphism $\s$. We think it would be interesting to extend the definitions and results to the more general case of several commuting endomorphisms $\s_1,\ldots,\s_n$.
\medskip
We conclude the introduction with an overview of the article. In Section \ref{sec: counting} we make precise how to count the degrees of freedom when determining sequence solutions and we define the difference dimension of a system of algebraic difference equations based on this. In Section \ref{sec: The difference dimension} we define the difference dimension of a finitely difference generated difference algebra and show that it has several nice properties, e.g., it is compatible with base change and additive over tensor products. In Section \ref{sec: Comparison} we then compare our notion of difference dimension with two other notions in the literature: The classical one defined via the difference transcendence degree and the difference Krull dimension defined via chains of prime difference ideals. In Section~\ref{sec:Covering Density and the dimension of difference monomials} we establish the connection between the difference dimension and the covering density. Finally, in the last section we discuss which numbers occur as difference dimension.
The author is grateful to Marc Technau, Lei Fu and the anonymous referees for helpful comments and suggestions.
\section{Counting degrees of freedom in the ring of sequences}
\label{sec: counting}
In this section we define the difference dimension of a system of algebraic difference equations by counting the degrees of freedom encountered, when writing down a solution in the ring of sequences. The reader mainly interested in difference algebras could in principle skip this section and be content with the definition of the difference dimension of a difference algebra given in Section \ref{sec: The difference dimension}. On the other hand, the reader with a more applied background, mainly interested in solutions in the ring of sequences, might find the definition of the difference dimension given in this section much more illuminating than the more abstract approach of Section \ref{sec: The difference dimension}.
\subsection{Notation}
We start by recalling some basic definitions from difference algebra (\cite{Cohn:difference,Levin}) and by fixing notation that will be used throughout the text.
All rings are assumed to be commutative and unital. $\N$ denotes the natural numbers including zero.
A \emph{difference ring}, or \emph{$\s$-ring} for short, is a ring $R$ together with a ring endomorphism $\s\colon R\to R$. A morphism between $\s$-rings $R$ and $S$ is a morphism of rings $R\to S$ such that
$$
\xymatrix{
R \ar[r] \ar_\s[d] & S \ar^\s[d] \\
R \ar[r] & S
}
$$
commutes. In this situation $S$ is also called an \emph{$R$-$\s$-algebra}. A morphism of $R$-$\s$-algebras is a morphism of $R$-algebras that is a morphism of $\s$-rings. The tensor product $S_1\otimes_R S_2$ of two $R$-$\s$-algebras is an $R$-$\s$-algebra via $\s(s_1\otimes s_2)=\s(s_1)\otimes \s(s_2)$.
An ideal $I$ in a $\s$-ring $R$ is a \emph{$\s$-ideal} if $\s(I)\subseteq I$. In that case $R/I$ naturally inherits the structure of a $\s$-ring such that $R\to R/I$ is a morphism of $\s$-rings.
For a subset $F$ of $R$, the smallest $\s$-ideal of $R$ containing $F$ is denoted by $[F]$, so $[F]=(F,\s(F),\ldots)$.
The \emph{$\s$-polynomial ring} $R\{y\}=R\{y_1,\ldots,y_n\}$ over a $\s$-ring $R$ in the $\s$-variables $y_1,\ldots,y_n$ is the polynomial ring over $R$ in the variables $\s^i(y_j)$ ($i\in\N, 1\leq j\leq n$)
with action of $\s$ extended from $R$ as suggested by the names of the variables. The \emph{order} $\ord(f)$ of a $\s$-polynomial $f$ is the maximal $i$ such that $\s^i(y_j)$ occurs in $f$ for some $j$. For $f\in R\{y_1,\ldots,y_n\}$, $S$ an $R$-$\s$-algebra and $a=(a_1,\ldots,a_n)\in S^n$, the expression $f(a)$ denotes the element of $S$ obtained by substituting $\s^i(y_j)$ with $\s^i(a_j)$ in $f$.
An $R$-subalgebra of an $R$-$\s$-algebra is an $R$-$\s$-subalgebra if it is stable under $\s$. Let $S$ be an $R$-$\s$-algebra and $A\subseteq S$. The smallest $R$-$\s$-subalgebra of $S$ containing $A$ is denoted with $R\{A\}$. Explicitly, $R\{A\}=R[A,\s(A),\ldots]$. If there exists a finite subset $A$ of $S$ such that $S=R\{A\}$, then $S$ is called \emph{finitely $\s$-generated} (over $R$).
A difference ring $R$ is a \emph{$\s$-field} if $R$ is a field.
An $R$-$\s$-algebra $S$ with $R$ and $S$ fields is a \emph{$\s$-field extension}.
{\bf Throughout this article $k$ will denote a $\s$-field} and $\kb$ denotes an algebraic closure of $k$. (It is possible to extend $\s$ from $k$ to $\kb$ but we have no need to choose such an extension.) The Krull-dimension of a finitely generated $k$-algebra $R$ is denoted with $\dim(R)$.
Let $Y$ be a (not necessarily finite) set of variables over $\kb$ and let $F\subseteq k[Y]$. We denote the set of solutions of $F$ in $\kb^Y$ with $\V(F)$. Affine space of dimension $n$ over $\kb$ is denoted with $\A^n=\kb^n$.
\subsection{Affine sequence solutions} \label{subsec: Affine sequence solutions}
We consider the set $\kb^{\N}$ of sequences in $\kb$ as a $\s$-ring with componentwise addition and multiplication and $\s$ given by the left-shift
$\s((a_i)_{i\in\N})=(a_{i+1})_{i\in\N}$. Moreover, we consider $\kb^\N$ as a \ks-algebra via $k\to \kb^\N,\ \lambda\mapsto (\s^i(\lambda))_{i\in\N}$. For a subset $F$ of $k\{y_1,\ldots,y_n\}$ we define the set of \emph{affine sequence solutions} of $F$ as
$$\Sol^\A(F)=\big\{a\in \big(\kb^\N\big)^n|\ f(a)=0 \ \forall\ f\in F\big\}.$$
Note that $\big(\kb^\N\big)^n$ can be identified with $(\A^n)^\N$. For $$a=\big(a_{i,j}\big)_{(i,j)\in\mathbb{N}\times\{1,\ldots,n\}}\in \big(\kb^\N\big)^n= (\A^n)^\N$$ and $f\in k\{y_1,\ldots,y_n\}$ one has $f(a)=0\in \kb^\N$ if and only if $\s^i(f)(a)=0\in \kb$ for all $i\in \N$.
Thus $$\Sol^\A(F)=\Sol^\A([F])=\V([F])\subseteq (\A^n)^\N.$$
For a finite subset $T$ of $\N\times \{1,\ldots,n\}$
we set $y_T=\{\s^i(y_j)|\ (i,j)\in T\}$ and $$\Sol^\A_T(F)=\V([F]\cap k[y_T])\subseteq \A^T,$$
where $\A^T$ is an affine space of dimension $|T|$.
The projection maps $$(\A^n)^\N\to \A^T,\ \big(a_{i,j}\big)_{(i,j)\in\mathbb{N}\times\{1,\ldots,n\}}\mapsto \big(a_{i,j}\big)_{(i,j)\in T}$$ induce maps
$$\pi_T\colon \Sol^\A(F)\to \Sol^\A_T(F).$$
As a first approximation to counting the degrees of freedom encountered, when writing down an affine sequence solution of $F$, one may feel tempted to say that $T$ is free with respect to $F$ if every $a_T\in \A^T$ extends to an affine sequence solution of $F$, i.e., if $\pi_T(\Sol^\A(F))=\A^T$. Or, in other words, if the initial value problem $$f(a)=0\ \forall \ f\in F,\quad \pi_T(a)=a_T$$
has a solution $a\in \big(\kb^\N\big)^n$ for all $a_T\in \A^T$. However, as illustrated in the following simple example, such a definition would be too stringent.
\begin{ex} \label{ex: infinity}
Let us consider the affine sequence solutions of the $\s$-polynomial $f=y_1\s(y_1)-1$ over $(k,\s)=(\mathbb{C},\id)$. A sequence $a=(a_i)_{i\in \N}\in \mathbb{C}^\N$ is a solution if and only if $a_ia_{i+1}=1$. Thus
$$\Sol^\A(f)=\{(a_0,a_0^{-1},a_0,a_0^{-1},\ldots) \ | \ a_0\in\mathbb{C}\smallsetminus\{0\}\}.$$
Intuitively, we should count one degree of freedom here because $a_0$ can be chosen more or less arbitrarily and then all the other coefficients are determined, i.e., $T=\{0\}$ should be considered to be free. However, $a_0=0$ does not extend to an affine sequence solution.
\end{ex}
The above example also shows that in general the projection maps $\pi_T\colon \Sol^\A(F)\to \Sol^\A_T(F)$ are not surjective. Moreover, as illustrated in the following example, the image of $\pi_T$ is in general not a constructible subset of the algebraic variety $\Sol^\A_T(F)$.
\begin{ex} \label{ex: not constructible}
We consider the system $F=\{\s(y_1)-y_1-1,\ y_1y_2-1\}$ over $(k,\s)=(\mathbb{C},\id)$, which we may rewrite more succinctly as
\begin{align*}
y_{1,i+1} & =y_{1,i}+1, \\
y_{1,i}y_{2,i} & =1.
\end{align*}
Clearly $y_{2,i}$ is determined by $y_{1,i}$ and $y_{1,i}$ is determined by $y_{1,i-1}$, so the only freedom available when determining an affine sequence solution of $F$ is the choice of $y_{1,0}$. But not all choices of $y_{1,0}$ yield a solution. Indeed, $y_{1,0}\in\mathbb{C}$ extends to an affine sequence solution of $F$ if and only if $y_{1,0}\neq -n$, for $n\in\N$. In other words, the image of $\pi_T\colon\Sol^\A(F)\to \Sol^{\A}_T(F)$ for $T=\{(0,1)\}$ is $\mathbb{C}\smallsetminus\{-n|\ n\in \N\}$, which is not a constructible subset of $\mathbb{C}$.
\end{ex}
Even worse, as explained in the following example, the image of $\pi_T\colon \Sol^\A(F)\to \Sol^\A_T(F)$ need not be Zariski dense in $\Sol^\A_T(F)$.
We will see in Subsection \ref{subsec: A characterization of free sets in terms of affine} that such a pathology cannot happen if $k$ is uncountable.
\begin{ex} \label{ex: not Zariski dense}
We will not explicitly write down such an example but rather give an abstract argument why such an example exists. Using ideas and methods from \cite{PogudinScanlonWibmer:SolvingDifferenceEquationsInSequences} it would in principle be possible to write down an explicit example but that would be extremely tedious.
It is shown in \cite[Theorem 3.2]{PogudinScanlonWibmer:SolvingDifferenceEquationsInSequences}
that there exists an integer $n\geq 1$, a finite set $F\subseteq k\{y_1,\ldots,y_n\}$ of $\s$-polynomials over $(k,\s)=(\overline{\mathbb{Q}},\id)$ and a $\s$-polynomial $g\in k\{y_1,\ldots,y_n\}$ such that $g$ vanishes on every element of $\Sol^\A(F)$ but $g\notin \sqrt{[F]}$. Let $T\subseteq \N\times\{1,\ldots,n\}$ be such that $g\in k[y_T]$. We claim that the image of $\pi_T\colon \Sol^\A(F)\to \Sol^\A_T(F)$ is not Zariski dense in $\Sol^\A_T(F)$. As $g$ vanishes on $\Sol^\A(F)$, we see that the image of $\pi_T$ is contained in $\V(g)\subseteq \A^T$. On the other hand, as $g\notin\sqrt{[F]}$, we also have $g\notin\sqrt{[F]\cap k[y_T]}$. So $g$ does not vanish on $\Sol^\A_T(F)$. We conclude $$\pi_T(\Sol^\A(F))\subseteq \V(g)\nsubseteq \Sol^\A_{T}(F).$$
Thus $\pi_T(\Sol^\A(F))$ is not Zariski dense in $\Sol^\A_T(F)$.
\end{ex}
\subsection{Projective sequence solutions}
We have seen above that for a finite subset $T$ of $\N\times\{1,\ldots,n\}$, the set of elements of $\Sol^\A_T(F)$ that extends to an affine sequence solution of $F$, is in general not Zariski dense and not constructible. In this section we show that the situation can be improved by allowing projective sequence solutions instead of just affine sequence solutions: The set of all elements of $\Sol^\A_T(F)$ that extend to a projective sequence solution of $F$ contains an open Zariski dense subset of $\Sol^\A_T(F)$ (Lemma \ref{lemma: U extends}).
We write $\P^n=\P^n(\kb)$ for $n$-dimensional projective space over $\kb$.
\begin{rem}[Multiprojective space] \label{rem: multiprojective space}
Let $n,r\geq 1$. The closed subsets of the algebraic $\kb$-variety $\P^{n}\times\ldots\times\P^{n}=(\P^n)^r$ are exactly the solution sets of systems of multihomogeneous polynomials
(cf. \cite[Chapter 1, Section 5.1]{Shafarevich:BasicAlgebraicGeometry1}). Here a polynomial $f\in \kb[y_{1,0},\ldots,y_{1,n},\ldots,y_{r,0},\ldots,y_{r,n}]$ is called \emph{multihomogeneous} of \emph{multidegree} $(d_1,\ldots,d_r)$ if $f$ is homogeneous of degree $d_i$ in the variables $y_{i,0},\ldots,y_{i,n}$ for $i=1,\ldots,r$. For a set $F$ of multihomogeneous polynomials we write $\V^h(F)$ for the closed subset of $(\P^{n})^r$ defined by $F$. We consider $\A^{n}\times\ldots\times \A^{n}=(\A^n)^r=\A^{nr}$ as an open subset of $(\P^{n})^r$ via the embedding
$$\big((a_{1,1},\ldots,a_{1,n}),\ldots,(a_{r,1},\ldots,a_{r,n})\big)\mapsto \big((1:a_{1,1}:\ldots:a_{1,n}),\ldots,(1:a_{r,1}:\ldots:a_{r,n})\big).$$ Then $(\P^{n})^r$ is the union of $(\A^n)^r$ and the points at infinity $\V^h(y_{1,0}\ldots y_{r,0})$.
Let $f\in \kb[y_{1,1},\ldots,y_{1,n},\ldots,y_{r,1},\ldots,y_{r,n}]$ and for $i=1,\ldots,r$ let $d_i$ denote the degree of $f$ in $y_{i,1},\ldots,y_{i,n}$. The multihomogenization $f^h\in \kb[y_{1,0},\ldots,y_{1,n},\ldots,y_{r,0},\ldots,y_{r,n}]$ of $f$ is defined as $$f^h=y_{1,0}^{d_1}\ldots y_{r,0}^{d_r}f\big(\tfrac{y_{1,1}}{y_{1,0}},\ldots,\tfrac{y_{1,n}}{y_{1,0}},\ldots,\tfrac{y_{r,1}}{y_{r,0}},\ldots,\tfrac{y_{r,n}}{y_{r,0}}\big).$$
For a closed subset $X$ of $(\A^{n})^r$, the closure $\overline{X}$ of $X$ in $(\P^{n})^r$ equals $\V^h(\mathbb{I}(X)^h)$, where $\mathbb{I}(X)\subseteq \kb[y_{1,1},\ldots,y_{1,n},\ldots,y_{r,1},\ldots,y_{r,n}]$ is the defining ideal of $X$ and $\mathbb{I}(X)^h=\{f^h|\ f\in\mathbb{I}(X)\}$.
\end{rem}
Let $\N[\s]$ denote the set of polynomials in the variable $\s$ with natural number coefficients. We consider $\N[\s]$ as an abelian monoid under addition. The $\s$-polynomial ring $k\{y_0,\ldots,y_n\}$ has a natural $\N[\s]$-grading that we shall now describe. We define the \emph{$\s$-degree} of a $\s$-monomial as
$$\sdeg\left(\prod_{i=0}^r\prod_{j=0}^n\s^i(y_j)^{\alpha_{i,j}}\right)=\sum_{i=0}^r\left(\sum_{j=0}^n\alpha_{i,j}\right)\s^i.$$
A $\s$-polynomial $f\in k\{y_0,\ldots,y_n\}$ is \emph{$\s$-homogeneous} of $\s$-degree $\sdeg(f)=d\in\N[\s]$ if all $\s$-monomials of $f$ have $\s$-degree $d$. Thus $f$ is $\s$-homogeneous if and only if $f$ is homogeneous in $\s^i(y_0),\ldots,\s^i(y_n)$ for every $i\in\N$.
Note that every $\s$-polynomial $f\in k\{y_0,\ldots,y_n\}$ can uniquely be written as a sum of $\s$-homogeneous $\s$-polynomials.
Let $f\in k\{y_1,\ldots,y_n\}$ be of order $r$, (so $f=f(y_1,\ldots,y_n,\ldots,\s^r(y_1),\ldots,\s^r(y_n))$ and for $i=0,\ldots,r$, let $d_i$ denote the degree of $f$ in the variables $\s^i(y_1),\ldots,\s^i(y_n)$. The \emph{$\s$-homogenization} $f^h\in k\{y_0,\ldots,y_n\}$ of $f$ is defined as
$$f^h=y_0^{d_0}\ldots\s^r(y_0)^{d_r}f\big(\tfrac{y_1}{y_0},\ldots,\tfrac{y_n}{y_0},\ldots,\tfrac{\s^r(y_1)}{\s^r(y_0)},\ldots,\tfrac{\s^r(y_n)}{\s^r(y_0)}\big).$$
For a subset $F$ of $k\{y_1,\ldots,y_n\}$ we set $F^h=\{f^h|\ f\in F\}$.
\begin{ex}
We have $(y_1\s(y_1)-1)^h=y_1\s(y_1)-y_0\s(y_0)$
\end{ex}
For $i\in \N$, the grading on $k[y_0,\ldots,y_n,\ldots,\s^i(y_0),\ldots,\s^i(y_n)]\subseteq k\{y_0,\ldots,y_n\}$ induced by the $\N[\s]$-grading on $k\{y_0,\ldots,y_n\}$, exactly corresponds to the multidegree as in Remark~\ref{rem: multiprojective space}. Thus, a set of $\s$-homogeneous $\s$-polynomials of $k\{y_0,\ldots,y_n\}$ of order at most $i$, defines a closed subset of $(\P^n)^{i+1}$.
We note that if $f\in k\{y_0,\ldots,y_n\}$ is $\s$-homogeneous of degree $d=d_r\s^r+\ldots+d_0$ and $a=(a_0,\ldots,a_n)\in k^{n+1}$, then
$f(\lambda a)=\lambda^{d_0}\ldots\s^r(\lambda)^{d_r}f(a)$ for all $\lambda\in k$. Thus the expression $f(b)=0$ is well-defined for $b\in\P^n(k)$. On the other hand, we can also consider $f$ as a multihomogeneous polynomial in the variables $\s^i(y_j)$ (rather than as a difference polynomial) and in this context the expression $f(a)=0$ is well-defined for any $a\in \big(\P^n\big)^\N$.
\medskip
Let, as in Subsection \ref{subsec: Affine sequence solutions}, $F$ be a subset of $k\{y_1,\ldots,y_n\}$. The set of \emph{projective sequence solutions}
of $F$ is
$$\Sol^\P(F)=\big\{a\in \big(\P^n)^\N|\ f(a)=0 \ \forall \ f\in [F]^h\big\}.$$
For $i\in\N$ let $T_i=\{0,\ldots,i\}\times \{1,\ldots,n\}$ and
$$\Sol^\P_i(F)=\V^h(([F]\cap k[y_{T_i}])^h)\subseteq(\P^n)^{i+1}.$$
Thus, $\Sol_i^\P(F)$ is the closure of $\Sol_{T_i}^\A(F)$ in $(\P^n)^{i+1}$ (Remark \ref{rem: multiprojective space}). Since $[F]\cap k[y_{T_i}]\subseteq [F]\cap k[y_{T_{i+1}}]$, the maps $(\P^n)^{i+2}\to (\P^n)^{i+1},\ (b_0,\ldots,b_{i+1})\mapsto (b_0,\ldots,b_i)$ induce maps
$$\pi_{i+1,i}\colon \Sol^\P_{i+1}(F)\to \Sol^\P_i(F).$$
The standard embedding $\A^n\hookrightarrow \P^n,\ (a_1,\ldots,a_n)\mapsto(1:a_1:\ldots:a_n)$ yields an inclusion $(\A^n)^\N\subseteq(\P^n)^\N$, which, in turn, induces an inclusion $\Sol^\A(F)\subseteq\Sol^\P(F)$.
Also, the projection maps $$(\P^n)^\N\to (\P^n)^{i+1},\ (b_0,b_1,\ldots)\mapsto (b_0,\ldots,b_i)$$ induce maps
$\pi_i\colon \Sol^\P(F)\to \Sol_i^\P(F)$. We have commutative diagrams
\begin{align} \label{eq: commuate for Sol}
\xymatrix{
\Sol^\A(F) \ar@{^(->}[r] \ar_{\pi_{T_i}}[d] & \Sol^\P(F) \ar^{\pi_i}[d] \\
\Sol^\A_{T_i}(F) \ar@{^(->}[r] & \Sol_i^\P(F)
}
\text{\quad \quad and \quad \quad }
\xymatrix{ \Sol^\A_{T_{i+1}}(F) \ar[d] \ar@{^(->}[r] & \Sol^\P_{i+1}(F) \ar^-{\pi_{i+1,{i}}}[d] \\
\Sol^\A_{T_i}(F) \ar@{^(->}[r] & \Sol^\P_{i}(F).
}
\end{align}
However, note that for an arbitrary finite subset $T$ of $\N\times\{1,\ldots,n\}$, there may not be a projective version of the map $\pi_T\colon \Sol^\A(F)\to \Sol^\A_{T}(F)$, because there are no projective analogs of the coordinate projections on $\A^n$.
\begin{lemma} \label{lemma: projections surjective}
The projection maps $\pi_i\colon\Sol^\P(F)\to \Sol^\P_i(F)$ are surjective.
\end{lemma}
\begin{proof}
Note that $b\in(\P^n)^\N$ lies in $\Sol^\P(F)$ if and only if $\pi_i(b)\in (\P^n)^{i+1}$ lies in $\Sol^\P_i(F)$ for every $i\in\N$.
In other words, $\Sol^\P(F)$ can be identified with the inverse limit of the $\Sol^\P_i(F)$'s. It thus suffices to show that the maps $\pi_{i+1,i}\colon \Sol^\P_{i+1}(F)\to \Sol^\P_{i}(F)$,
are surjective.
The inclusion $$k[y_{T_i}]/(k[y_{T_i}]\cap[F])\hookrightarrow k[y_{T_{i+1}}]/(k[y_{T_{i+1}}]\cap [F])$$ of finitely generated $k$-algebras, corresponds to a dominant morphism of affine $k$-schemes.
Therefore, also the morphism $\Sol^\A_{T_{i+1}}(F)\to \Sol^\A_{T_i}(F)$ of affine $\kb$-varieties is dominant.
As $\Sol^\P_{i}(F)$ is the closure of $\Sol^\A_{T_{i}}(F)$, this and the commutativity of (\ref{eq: commuate for Sol}), implies that also $\pi_{i+1,i}$ is dominant.
Projective space is complete and so are products and closed subvarieties of complete varieties. Thus $\Sol^\P_{i+1}(F)$ is complete. Since the image of a complete variety under a morphism is closed, it follows that $\pi_{i+1,i}$ has a dense and closed image. Therefore $\pi_{i+1,i}$ is surjective.
\end{proof}
As discussed in Section \ref{subsec: Affine sequence solutions}, for a finite subset $T$ of $\N\times\{1,\ldots,n\}$, the set of elements of $\A^T$ that extend to an affine sequence solution of $F$ is not so well-behaved. In particular, it need not contain a non-empty open subset of $\Sol^\A_T(F)$. To remedy this situation (see Lemma \ref{lemma: U extends} below), we consider the possibility of extending elements of $\A^T$ to projective sequence solutions of $F$.
\begin{defi} \label{defi: extends}
Let $F\subseteq k\{y_1,\ldots,y_n\}$ and let $T$ be a finite subset of $\N\times\{1,\ldots,n\}$. An element $a=(a_{i,j})_{(i,j)\in T}\in \A^T$ \emph{extends to a projective sequence solution} of $F$, if there exists $b=(b_{i,0}:\ldots: b_{i,n})_{i\in\N}\in \Sol^\P(F)\subseteq (\P^n)^\N$ such that $a_{i,j}=b_{i,j}$ for all $(i,j)\in T$ and $b_{i0}=1$ for all $i\in \N$ with $(i,j)\in T$ for some $j$.
\end{defi}
Clearly, if $a\in \A^T$ extends to an affine sequence solution of $F$, then $a$ also extends to a projective sequence solution of $F$. On the other hand, an $a\in\A^T$ that extends to a projective sequence solution of $F$ need not extend to an affine sequence solution of $F$, since projective sequence solutions allow the possibility of $b_{i,0}=0$ as long as $(i,j)\notin T$ for all $j\in\{1,\ldots,n\}$.
\begin{lemma} \label{lemma: extends implies solution}
If $a\in \A^T$ extends to a projective sequence solution of $F$, then $a\in\Sol^\A_T(F)$.
\end{lemma}
\begin{proof}
Assume that $a=(a_{i,j})_{(i,j)\in T}\in \A^T$ extends to a projective sequence solution of $F$ and let $f\in [F]\cap k[y_T]$. Moreover, let $b=(b_{i,0}:\ldots: b_{i,n})_{i\in\N}\in \Sol^\P(F)$ be as in Definition \ref{defi: extends}. Let $I$ be the smallest subset of $\N$ such that $T\subseteq I\times\{1,\ldots,n\}$, i.e., $I=\{i\in \N|\ \exists \ j\in\{1,\ldots,n\} \text{ such that } (i,j)\in T\}$.
Since every element of $[F]^h$ vanishes on $b$, we see that $f^h\in k[\s^i(y_j)|\ (i,j)\in I\times \{0,\ldots,n\}]$ vanishes on $((b_{i,0}:\ldots :b_{i,n}))_{i\in I}\in (\P^n)^{|I|}$. Since $f\in k[y_T]$, the polynomial $f^h$ only involves the variables $\s^i(y_0), (i\in I)$ and $\s^i(y_j), ((i,j)\in T)$. Since $a_{i,j}=b_{i,j}$ for $(i,j)\in T$ and $b_{i,0}=1$ for $i\in I$, we see that $f^h(b)=0$ implies $f(a)=0$. So $a\in\Sol^\A_T(F)$.
\end{proof}
\begin{lemma} \label{lemma: U extends}
Let $F\subseteq k\{y_1,\ldots,y_n\}$ and let $T$ be a finite subset of $\N\times\{1,\ldots,n\}$. Then there exists an open Zariski dense subset $U$ of $\Sol^\A_T(F)$ such that every $a\in U$ extends to a projective sequence solution of $F$.
\end{lemma}
\begin{proof}
Let $i\in\N$ be such that $T\subseteq T_i=\{0,\ldots,i\}\times\{1,\ldots,n\}$. The inclusion $$k[y_{T}]/(k[y_{T}]\cap[F])\hookrightarrow k[y_{T_i}]/(k[y_{T_i}]\cap [F])$$ of finitely generated $k$-algebras, corresponds to dominant morphism of affine $k$-schemes. Therefore, also the morphism $\pi_{T_i,T}\colon \Sol^\A_{T_i}(F)\to \Sol^\A_{T}(F)$ of affine $\kb$-varieties is dominant. By Chevalley's theorem (see e.g., \cite[Theorem 2.2.11]{Geck:AnIntroductionToAlgebraicGeometryAndAlgebraicGroups}) the image of a morphism of varieties is constructible. So the image of $\pi_{T_i,T}$ is a Zariski dense, constructible subset of $\Sol^\A_{T}(F)$. It therefore contains a subset $U$ that is open and Zariski dense in $\Sol^\A_{T}(F)$.
Thus, every $a\in U$ extends to some $\widetilde{a}\in\Sol^\A_{T_i}(F)$. Via the embedding $\Sol^\A_{T_i}(F)\to \Sol^\P_i(F)$ we obtain an element $\widetilde{b}\in \Sol^\P_{i}(F)$ from $\widetilde{a}\in\Sol^\A_{T_i}(F)$. By Lemma \ref{lemma: projections surjective}, there exists a $b\in \Sol^\P(F)$ mapping to $\widetilde{b}\in \Sol^\P_{i}(F)$. This $b$ has the required property of Definition~\ref{defi: extends}.
\end{proof}
\subsection{Free sets and difference dimension}
We are now prepared to specify precisely how to count the degrees of freedom when determining sequence solutions.
\begin{prop} \label{prop: characterize free}
Let $F\subseteq k\{y_1,\ldots,y_n\}$. For a finite subset $T$ of $\N\times\{1,\ldots,n\}$ the following conditions are equivalent:
\begin{enumerate}
\item There exists a Zariski dense open subset $U$ of $\A^T$ such that every $a\in U$ extends to a projective sequence solution of $F$.
\item $\Sol^\A_T(F)=\A^T$.
\item $k[y_T]\cap[F]=\{0\}$.
\item The image of $y_T$ in $k\{y_1,\ldots,y_n\}/[F]$ is algebraically independent over $k$.
\end{enumerate}
\end{prop}
\begin{proof}
Let $U$ be as in (i). By Lemma \ref{lemma: extends implies solution} we have $U\subseteq \Sol^\A_T(F)\subseteq \A^T$. Since $U$ is Zariski dense in $\A^T$ and $\Sol^\A_T(F)$ is closed in $\A^T$, we see that $\Sol^\A_T(F)=\A^T$. So (i)$\Rightarrow$(ii). On the other hand, (ii)$\Rightarrow$(i) by Lemma \ref{lemma: U extends}.
Clearly, (iv) and (iii) are equivalent. Moreover, (iii)$\Leftrightarrow$(ii) by definition of $\Sol^\A_T(F)$.
\end{proof}
\begin{defi} \label{defi: free sets} Let $F\subseteq k\{y_1,\ldots,y_n\}$. A finite subset $T$ of $\N\times\{1,\ldots,n\}$ is \emph{free} with respect to $F$ if it satisfies the equivalent properties of Proposition \ref{prop: characterize free}.
\end{defi}
In Section \ref{subsec: A characterization of free sets in terms of affine} below we will obtain yet another characterization of free sets.
We next look at a couple of examples to familiarize ourselves with the definitions introduced above.
\begin{ex} \label{ex: infty continued}
Let us return to Example \ref{ex: infinity}. So $F=\{y_1\s(y_1)-1\}$. We have already seen that for $T=\{0\}$ every non-zero $a_0\in \mathbb{C}=\A^T$ extends to an affine sequence solution. Thus $T=\{0\}$ is free with respect to $F$.
The element $a_0=0\in \A^T$ does not extend to an affine sequence solution but it extends to the projective sequence solution
$$((1:0),(0:1),(1:0),(0:1),\ldots)\in(\P^1)^\N.$$ Indeed, for $i\geq 1$ and $T_i=\{0,\ldots,i\}$ we have
$$\Sol^\A_{T_i}(F)=\{(a_0,a_0^{-1},\ldots,a_0^{\pm 1})|\ a_0\in \mathbb{C}\smallsetminus\{0\}\}\subseteq\A^{T_i}$$
and $\Sol^\P_i(F)$ is obtained from $\Sol^\A_{T_i}(F)\simeq \A^1\smallsetminus\{0\}$ by adding two points, $((1:0),(0:1),\ldots)\in(\P^1)^{i+1}$ corresponding to the missing origin of $\A^1\smallsetminus\{0\}$ and $((0:1),(1:0),\ldots)\in(\P^1)^{i+1}$ corresponding to the missing point at infinity of $\A^1\smallsetminus\{0\}$. This shows that $\Sol^\P(F)\simeq \P^1$ is obtained from $\Sol^\A(F)\simeq \A^1\smallsetminus\{0\}$ by adding two points, namely $$((1:0),(0:1),\ldots) \text{ and } ((0:1),(1:0),\ldots)\in(\P^1)^\N.$$
Note that $\Sol^\P(F)\subseteq (\P^1)^\N$ can also be described as the solution set of the multihomogeneous polynomials $$\s^i(y_1\s(y_1)-y_0\s(y_0))=\s^i(y_1)\s^{i+1}(y_1)-\s^i(y_0)\s^{i+1}(y_0), \ (i\geq 0).$$
Every one-element subset $T$ of $\N$ is free with respect to $F$ but no subset of $\N$ with two or more elements is free. So, clearly, there is only one degree of freedom that should be counted in this example.
\end{ex}
\begin{ex} \label{ex: not constructible continued}
Let us also revisit Example \ref{ex: not constructible}. So $F=\{\s(y_1)-y_1-1,\ y_1y_2-1\}$.
For $T_i=\{0,\ldots,i\}\times \{1,2\}$ we have
$$\Sol^\A_{T_i}(F)=\left\{\begin{pmatrix}
a & a+1 & \cdots & a+i \\
a^{-1} & (a+1)^{-1} & \cdots & (a+i)^{-1}
\end{pmatrix}\Big|\ a\in\mathbb{C}\smallsetminus\{0,-1,\ldots,-i\} \right\}\subseteq(\A^2)^{i+1}.
$$
So $\Sol^\A_{T_i}(F)\simeq \A^1\smallsetminus\{0,\ldots,-i\}$ and $\Sol^\P_i(F)\simeq\P^1$ is obtained from $\Sol_{T_i}^\A(F)$ by adding $i+2$ points at infinity. These are
$$\left((a:a^2:1),\ (a+1:(a+1)^2:1),\ldots,\ (a+i:(a+i)^2:1)\right)\in(\P^2)^{i+1}, $$
where $a=0,\ldots,-i$, corresponding to the missing points $\{0,\ldots,-i\}$ and the point
$$\left((0:1:0),(0:1:0),\ldots,(0:1:0)\right)\in(\P^2)^{i+1}, $$
corresponding to the missing point at infinity.
To explicitly describe $\Sol_i^\P(F)\subseteq (\P^2)^{i+1}$ set $X=\V^h(y_1y_2-y_0^2)=\V^h((y_1y_2-1)^h)\subseteq\P^2$. Note that $X$ is isomorphic to $\P^1$ (via $\P^1\to X,\ (a:b)\mapsto (ab:b^2:a^2)$) and that
$$
\xymatrix{
X \ar^{\simeq}[rr] & & \P^1 \\
& \A^1 \ar@{_(->}[lu] \ar@{^(->}[ru] &
}
$$
commutes, where $\A^1\hookrightarrow\P^1,\ a\mapsto (1:a)$ is the standard embedding and $\A^1\hookrightarrow X,\ a\mapsto (a:a^2:1)$ extends $\A^1\smallsetminus\{0\}\simeq \V(y_1y_2-1)\hookrightarrow X$. The automorphism $p\colon\A^1\to \A^1,\ a\mapsto a+1$ extends to an automorphism $p\colon X\to X$. We claim that
\begin{equation} \label{eq: psols for p}
\Sol^\P_i(F)=\left\{(x,p(x),\ldots,p^i(x))\in(\P^2)^{i+1}|\ x\in X\right\}.
\end{equation}
The right-hand side of (\ref{eq: psols for p}) is closed in $(\P^2)^{i+1}$ and, by construction, it contains the image of $\Sol^\A_{T_i}(F)$ in $(\P^2)^{i+1}$. In fact, $\{(x,p(x),\ldots,p^i(x))\in(\P^2)^{i+1}|\ x\in X\}\simeq X\simeq \P^1$ is obtained from $\Sol^\A_{T_i}(F)\simeq \A^1\smallsetminus\{0,\ldots,-i\}$ by adding the $i+2$ points described above. This implies (\ref{eq: psols for p}).
Similarly,
$$\Sol^\A(F)=\left\{\begin{pmatrix}
a & a+1 & \cdots & \\
a^{-1} & (a+1)^{-1} & \cdots &
\end{pmatrix}\in(\A^2)^\N\Big|\ a\in\mathbb{C}\smallsetminus\{-n|\ n\in\N\} \right\}\subseteq(\A^2)^\N
$$
is in bijection with $\A^1\smallsetminus\{-n|\ n\in \N\}$ and
$$\Sol^\P(F)=\left\{(x,p(x),p^2(x),\ldots)\in(\P^2)^\N|\ x\in X\right\}\subseteq(\P^2)^\N$$
is in bijection with $\P^1$. So we obtain $\Sol^\P(F)$ from $\Sol^\A(F)$ by adding infinitely many points, namely,
$\left((0:1:0),(0:1:0),\ldots\right)\in(\P^2)^\N$ and
$$\left((a:a^2:1),\ (a+1:(a+1)^2:1),\ldots,\ \right)\in(\P^2)^\N, $$
where $a=0,-1,-2,\ldots$.
Note that, in general, for $F\subseteq k\{y_1,\ldots,y_n\}$ we have an inclusion $$ \Sol^\P(F)=\left\{a\in(\P^n)^\N\big|\ f(a)=0 \ \forall\ f \in [F]^h\right\}\subseteq \left\{a\in(\P^n)^\N\big|\ \s^i(f)(a)=0 \ \forall\ f \in F^h,\ i\in \N\right\}.$$
However, this inclusion can be strict. Indeed, in the present example, the point
$$a=((0:1:0),(0:0:1),(0:0:1),\ldots)\in(\P^2)^\N$$ is a solution to $\s^i(y_1y_2-y_0^2)$ and $\s^i(\s(y_1)y_0-y_1\s(y_0)-y_0\s(y_0))$ for all $i\in \N$ but $a$ does not belong to $\Sol^\P(F)$ because $p(0:1:0)=(0:1:0)\neq (0:0:1)$. Of course, this can also be seen in terms of the equations: From $\s(y_1)\s(y_2)-1\in[F]$ and $\s(y_1)-y_1-1\in[F]$ we obtain $(y_1+1)\s(y_2)-1\in[F]$. Therefore $f=\s(y_2)y_1+\s(y_2)-1\in[F]$ but $f^h=\s(y_2)y_1+\s(y_2)y_0-y_0\s(y_0)$ does not vanish on $a$.
For $T=\{(1,0)\}$, the set of all $a\in \A^T=\mathbb{C}$ that extend to an affine sequence solution of $F$ is $\mathbb{C}\smallsetminus\{-n|\ n\in\N\}$, which does not contain a non-empty Zariski open subset. The set of all $a\in \A^T=\mathbb{C}$ that extend to a projective sequence solution of $F$ is $\mathbb{C}\smallsetminus \{0\}$, which is Zariski open: Indeed, for $a\in\mathbb{C}\smallsetminus \{0\}$ the point $$b=b_a=\left((a:a^2:1),\ (a+1:(a+1)^2:1),\ldots,\ \right)\in(\P^2)^\N $$
is a projective sequence solution of $F$ that extends $a$ because $(a:a^2:1)=(1:a:a^{-1})$. The point $a=0\in \A^T$ does not extend to a projective sequence solution of $F$ because the equation $y_1y_2-y_0^2=0$ does not have a solution with $y_0=1$ and $y_1=0$. This shows that in Lemma \ref{lemma: U extends} one cannot choose $U=\Sol^\A_T(F)$ in general.
So $T=\{(0,1)\}$ is free with respect to $F$. More generally, every one-element subset of $\N\times \{1,2\}$ is free with respect to $F$ but no subset with two or more elements is free with respect to $F$. To see this, note that for a one-element subset $T$ of $\N\times \{1,2\}$, all elements of $\A^T\smallsetminus\{0\}$ extend to a projective sequence solution of $F$: For $T=\{(i,1)\}$, $b_{a-i}$ extends $a\in \A^T\smallsetminus\{0\}$ and for $T=\{(i,2)\}$, $b_{a^{-1}-i}$ extends $a\in \A^T\smallsetminus\{0\}$. No subset with two or more elements can be free because $\Sol^\P_i(F)\simeq \P^1$ is one dimensional for every $i\in \N$. Alternatively, for any two distinct elements in $\{y_1,y_2,\s(y_1),\s(y_2),\ldots\}$ we can always find a non-zero polynomial in $[\s(y_1)-y_1-1,\ y_1y_2-1]$ that only contains those two elements. So condition (iii) of Proposition \ref{prop: characterize free} is violated.
\end{ex}
\begin{ex} \label{ex: linear}
Let $f=\s^m(y_1)+\lambda_{m-1}\s^{m-1}(y_1)+\ldots+\lambda_0y_1$ be a homogeneous linear difference polynomial over $k$. Then every $a=(a_0,\ldots,a_{m-1})\in\kb^m$ extends to an affine sequence solution via the recursive formula $a_{m+i}=\s^i(\lambda_{m-1})a_{m-1+i}+\ldots+\s^i(\lambda_0)a_i$ for $i\geq 0$. Thus $T=\{0,\ldots,m-1\}$ is free with respect to $F=\{f\}$. On the other hand, no subset of $\N$ containing more than $m$ elements is free with respect to $f$. So, overall, we count $m$ degrees of freedom.
The same reasoning applies to any order $m$ difference polynomial of the form $f=\s^m(y_1)+g(y_1,\ldots,\s^m(y_1))$.
\end{ex}
\begin{ex} \label{ex: product}
Let $f=y_1\s(y_1)$ over $(k,\s)=(\mathbb{C},\id)$. A sequence $a=(a_0,a_1,\ldots)\in\mathbb{C}^\N$ is an affine sequence solution if and only if $a_ia_{i+1}=0$ for $i\geq 0$, i.e., if every second entry is zero. For $m\geq 0$ the sets $T=\{0,2,4,\ldots,2m\}$ and $T=\{1,3,\ldots,2m+1\}$ are free with respect to $f$ but no subset of $\N$ containing two consecutive integers is free with respect to $f$.
\end{ex}
As in the above example, for a general system $F\subseteq k\{y_1,\ldots,y_n\}$ of algebraic difference equations one expects to encounter infinitely many degrees of freedom, when writing down a solution in the ring of sequences. Thus, to count them in a reasonable fashion, we need to count them asymptotically. For $i\geq 0$,
$$d_i(F)=\max\big\{|T| \ |\ T\subseteq \{0,\ldots,i\}\times\{1,\ldots,n\} \text{ is free w.r.t. } F\big\}$$
counts the degrees of freedom up to order $i$. To obtain a value between $0$ and $n$ we normalize $d_i(F)$ appropriately, i.e., we consider $0\leq\frac{d_i(F)}{i+1}\leq n$.
\begin{defi} \label{def: sdim for systems}
Let $F\subseteq k\{y_1,\ldots,y_n\}$. In Corollary \ref{cor: limit exists} below it is shown that $$\sdim(F)=\lim_{i\to\infty}\frac{d_i(F)}{i+1}$$
exists (inside $\mathbb{R}$). We call this limit the \emph{$\s$-dimension of $F$}.
\end{defi}
Note that by construction $\sdim(F)=\sdim([F])$ and $0\leq \sdim(F)\leq n$ for $F\subseteq k\{y_1,\ldots,y_n\}$. In Section \ref{sec: Comparison} we will compare $\sdim(F)$ with other notions of dimensions in difference algebra. In particular, we will show that our definition agrees with the standard definition via $\s$-transcendence bases whenever the latter notion applies.
\begin{ex}
For the sets $F$ in Examples \ref{ex: infty continued} and \ref{ex: not constructible continued} we have $d_i(F)=1$ for all $i\geq 0$ and so $\sdim(F)=0$. Also for $F$ as in Example \ref{ex: linear} $d_i(F)$ is bounded and so $\sdim(F)=0$. For $F=\{0\}\subseteq k\{y_1,\ldots,y_n\}$ one has $d_i(F)=n(i+1)$ and so $\sdim(F)=n$ as expected.
\end{ex}
The following example shows that $\sdim(F)$ does not need to be an integer.
\begin{ex}
As in Example \ref{ex: product} let $F=\{y_1\s(y_1)\}$. For $i\geq 0$ even we have $d_i(F)=\frac{i}{2}$ and for $i$ odd we have $d_i(F)=\frac{i+1}{2}$. So $\sdim(F)=\lim_{i\to\infty}\frac{d_i(F)}{i+1}=\frac{1}{2}$.
\end{ex}
In Section \ref{sec:Covering Density and the dimension of difference monomials} we will determine the $\s$-dimension of a general univariate $\s$-monomial. Moreover, since the $\s$-dimension is not necessarily an integer it is natural to wonder which numbers occur. This question will be addressed in Section \ref{sec:Values of the difference dimension}.
\subsection{A characterization of free sets in terms of affine sequence solutions} \label{subsec: A characterization of free sets in terms of affine}
To complement Definition \ref{defi: free sets}, we deduce in this subsection a characterization of free sets that avoids projective sequence solutions. In fact, we show that, at least over an uncountable $\s$-field $k$, $T\subseteq \N\times \{1,\ldots,n\}$ is free with respect to $F\subseteq k\{y_1,\ldots,y_n\}$ if and only if the set of all $a\in\A^T$ that extend to an affine sequence solution of $F$ is Zariski dense in $\A^T$.
To also have a statement available for arbitrary $\s$-fields $k$, we fix an uncountable algebraically closed field $K$ containing $k$ as a subfield and we consider all solutions sets over $K$. For example, if $k$ is uncountable, we could choose $K=\kb$. Similarly to Subsection \ref{subsec: Affine sequence solutions}, we consider $K^\N$ as a \ks-algebra via $\s((a_i)_{i\in\N})=(a_{i+1})_{i\in\N}$ and $k\to K^\N,\ \lambda\mapsto (\s^i(\lambda))_{i\in\N}$. We set $\A^n_K=K^n$ and for $F\subseteq k\{y_1,\ldots,y_n\}$ we set
$$\Sol^{\A_K}(F)=\{a\in (K^\N)^n|\ f(a)=0 \ \forall \ f\in F\}=\V([F])\subseteq (\A^n_K)^\N.$$
For a finite subset $T$ of $\N\times\{1,\ldots,n\}$ we define
$$\Sol^{\A_K}_T(F)=\V([F]\cap k[y_T])\subseteq \A_K^T.$$
\begin{lemma} \label{lemma: Zariski dense}
The image of $\Sol^{\A_K}(F)$ in $\Sol^{\A_K}_T(F)$ is Zariski dense.
\end{lemma}
\begin{proof}
Let $g\in K[y_T]$ be a polynomial that vanishes on $\Sol^{\A_K}(F)$. We have to show that $g$ also vanishes on $\Sol^{\A_K}_T(F)$.
There is a (strong) Nullstellensatz for polynomials in an arbitrary set of variables $Y$ (\cite{Lang:HilbertsNullstellensatzInInfiniteDimensionalSpace}). It states that for an algebraically closed field $K$ with $|K|>|Y|$, a polynomial $h\in K[Y]$ vanishes on all solutions of $H\subseteq K[Y]$ in $K^Y$ if and only if $h\in \sqrt{(H)}$. Therefore $g\in \sqrt{(F,\s(F),\ldots)}\subseteq K[\s^i(y_j)|\ (i,j)\in\N\times\{1,\ldots,n\}]$. Thus $g^m\in (F,\s(F),\ldots)=[F]\otimes_k K\subseteq k\{y_1,\ldots,y_n\}\otimes_kK$
for some $m\geq 1$. Since $g\in K[y_T]=k[y_T]\otimes_k K$, it follows that
$$g^m\in ([F]\otimes_k K)\cap (k[y_T]\otimes_k K)=([F]\cap k[y_T])\otimes_k K\subseteq k\{y_1,\ldots,y_n\}\otimes_k K.$$
Thus $g^m$ vanishes on $\Sol^{\A_K}_T(F)$ and therefore also $g$ vanishes on $\Sol^{\A_K}_T(F)$.
\end{proof}
In \cite{Lang:HilbertsNullstellensatzInInfiniteDimensionalSpace} it is shown that the cardinality assumption $|K|>|Y|$ in the above proof is necessary for the Nullstellensatz in infinitely many variables. In fact, Lemma \ref{lemma: Zariski dense} does not hold without the assumption that $K$ is uncountable (Example \ref{ex: not Zariski dense}).
\begin{cor}
Let $F\subseteq k\{y_1,\ldots,y_n\}$ and let $T$ be a finite subset of $\N\times\{1,\ldots,n\}$. Then $T$ is free with respect to $F$ if and only if the image of $\Sol^{\A_K}(F)$ in $\A_K^T$ is Zariski dense.
\end{cor}
\begin{proof}
A polynomial in $[F]\cap k[y_T]$ vanishes on the image of $\Sol^{\A_K}(F)$ in $\A_K^T$. Thus, if the latter is Zariski dense in $\A_K^T$, then $[F]\cap k[y_T]=\{0\}$ and so $T$ is free with respect to $F$ (Proposition \ref{prop: characterize free}).
On the other hand, if $T$ is free with respect to $F$, then $[F]\cap k[y_T]=\{0\}$ and so $\Sol_T^{\A_K}(F)=\A_K^T$. Thus the image of $\Sol^{\A_K}(F)$ in $\A_K^T$ is Zariski dense by Lemma \ref{lemma: Zariski dense}.
\end{proof}
\section{The difference dimension of a difference algebra} \label{sec: The difference dimension}
In this section we introduce the $\s$-dimension $\sdim(R)$ of a finitely $\s$-generated \ks-algebra. We then show that, despite the fact that $\sdim(R)$ need not be an integer, it satisfies many properties similar to the familiar case of finitely generated algebras over a field. For example, the difference dimension is compatible with tensor products and base change. For $F\subseteq k\{y_1,\ldots,y_n\}$ we have $\sdim(F)=\sdim(k\{y_1,\ldots,y_n\}/[F])$ and so results about the $\s$-dimension of $\s$-algebras have immediate corollaries for the $\s$-dimension of systems of algebraic difference equations.
\subsection{Recollection: Dimension of algebras}
Before defining the $\s$-dimension, we recall some well-known properties of the Krull dimension for finitely generated algebras over a field. (See, e.g., Sections 8 and 13 in \cite{Eisenbud:view}). This will be helpful for two reasons. Firstly, we will use these results in our later poofs and secondly, some of our results are difference analogs of these classical results about the Krull dimension.
Recall that the Krull dimension $\dim(R)$ of a ring $R$ is defined as the supremum over the lengths $n$ of all chains $\p_0\subsetneqq\p_1\subsetneqq\ldots\subsetneqq\p_n$ of prime ideals in $R$. For finitely generated algebras over a field, this supremum is finite and can be described through algebraically independent elements:
\begin{prop} \label{prop: dim and algebraic independence}
Let $R$ be an algebra over a field $k$ and let $A$ be a finite subset of $R$ such that $R=k[A]$.
Then
\begin{equation} \label{eq: dim}
\dim(R)=\max\{|B|\ |\ B\subseteq A, \text{ $B$ is algebraically independent over $k$}\}.
\end{equation}
In particular, if $R$ is an integral domain, then $\dim(R)$ equals the transcendence degree of the field of fractions of $R$ over $k$.
\end{prop}
\begin{proof}
See \cite[Tag 00P0]{stacks-project}
for a proof that $\dim(R)$ equals the transcendence degree of the field of fractions of $R$ over $k$ in case $R$ is an integral domain. In general, let $d$ denote the value on the right hand side of equation (\ref{eq: dim}). From the definition of $\dim(R)$, it follows that $\dim(R)=\dim(R/\p)$ for some minimal prime ideal $\p$ of $R$. Since the image of $A$ in $R/\p$ generates the field of fractions of $R/\p$ as a field extensions of $k$, it contains a transcendence basis. So we may choose $B\subseteq A$ such that the image of $B$ is a transcendence basis of the field of fractions of $R/\p$ over $k$. Then $|B|=\dim(R/\p)=\dim(R)$. Since the image of $B$ in $R/\p$ is algebraically independent over $k$, also $B$ itself is algebraically independent over $k$. Therefore, $\dim(R)\leq d$.
Conversely, assume that $B\subseteq A$ is algebraically independent over $k$ and $|B|=d$. Then $k[B]$ is a polynomial ring in $d$ variables. In particular, it is an integral domain. For any inclusion of rings $S_1\subseteq S_2$, any minimal prime ideal $\p_1$ of $S_1$ is of the form $\p_1=\p_2\cap S_1$ for some prime ideal $\p_2$ of $S_2$ (\cite[Chapter II, \S 2.6, Prop. 16]{Bourbaki:commutativealgebra}). Applying this to $k[B]\subseteq R$ with $\p_1$ the zero ideal of $k[B]$, we find a prime ideal $\p$ of $R$ with $\p\cap k[B]=\{0\}$. So $k[B]$ embeds into $R/\p$ and it follows that the transcendence degree of the field of fractions of $R/\p$ over $k$ is at least $|B|$. So, using \cite[Tag 00P0]{stacks-project} again, we obtain $d=|B|\leq\dim(R/\p)\leq\dim(R)$. Altogether, we obtain $\dim(R)=d$ as desired.
\end{proof}
The following lemma explains the behavior of Krull dimension under morphisms.
\begin{lemma} \label{lemma: dim under morphisms}
Let $R$ and $S$ be finitely generated $k$-algebras.
\begin{enumerate}
\item If there exists an injective morphism $R\to S$ of $k$-algebras, then $\dim(R)\leq\dim(S)$.
\item If there exists a surjective morphism $R\to S$ of rings, then $\dim(R)\geq\dim(S)$.
\end{enumerate}
\end{lemma}
\begin{proof}
For (i), note that a finite generating set $A$ of $R$ can be extended to a finite generating set of $S$. An algebraically independent subset of $A$ remains algebraically independent in $S$ by the injectivity of $R\to S$. Thus the claim follows from Proposition \ref{prop: dim and algebraic independence}.
Claim (ii) follows from the fact that prime ideals in $S$ are in bijection with prime ideals in $R$ containing the kernel of $R\to S$.
\end{proof}
The Krull dimension is additive with respect to the tensor product:
\begin{lemma} \label{lemma: dim and tensor}
Let $R$ and $S$ be finitely generated $k$-algebras. Then $\dim(R\otimes_k S)=\dim(R)+\dim(S)$.
\end{lemma}
\begin{proof}
Let $A\subseteq R$ and $B\subseteq S$ be finite such that $R=k[A]$ and $S=k[B]$. Set
$C=\{a\otimes 1|\ a\in A\}\cup \{1\otimes b|\ b\in B\}$.
Then $k[C]=R\otimes_k S$ and a subset $C'$ of $C$ is algebraically independent over $k$ if and only if
$A'=\{a\in A|\ a\otimes 1\in C'\}$ and $B'=\{b\in B|\ 1\otimes b\in C'\}$ are algebraically independent over $k$. Therefore $|C'|$ is maximal if and only if $|A'|$ and $|B'|$ is maximal. So the claim follows from Proposition \ref{prop: dim and algebraic independence}.
\end{proof}
The Krull dimension is invariant under base change:
\begin{lemma}[{\cite[Tag 00P3]{stacks-project}}] \label{lemma: dim and base change}
Let $k'/k$ be a field extension and $R$ a finitely generated $k$-algebra. Then $\dim(R\otimes_k k')=\dim(R)$.
\end{lemma}
Taking the quotient by the nilradical does not affect the Krull dimension:
\begin{lemma} \label{lemma: dim and nilradical}
Let $R$ be a finitely generated $k$-algebra and $R_{\operatorname{red}}=R/\sqrt{0}$ the quotient of $R$ by the nilradical $\sqrt{0}$ of $R$. Then $\dim(R_{\operatorname{red}})=\dim(R)$.
\end{lemma}
\begin{proof}
The nilradical $\sqrt{0}$ is contained in every prime ideal of $R$.
\end{proof}
\subsection{Difference dimension of difference algebras}
We first show that the limit from Definition \ref{def: sdim for systems} exists. To achieve this we will use the following well-known elementary lemma. See, e.g., \cite[Prop. 10.7]{DenkerGrillenbergerSigmund:ErgodicTheoryOnCompactSpaces}.
\begin{lemma}[Fekete's Subadditive Lemma] \label{lemma:subadditive}
If $(e_i)_{i\geq 1}$ is a sequence of non-negative real numbers that is subadditve, i.e., $e_{i+j}\leq e_i+e_j$ for all $i,j\geq 1$, then $\lim_{i\to\infty} \frac{e_i}{i}$ exists (inside $\mathbb{R}$) and is equal to $\inf \frac{e_i}{i}$.
\end{lemma}
The following theorem allows us to define a meaningful notion of $\s$-dimension for \emph{any} finitely $\s$-generated \ks-algebra.
\begin{theo} \label{theo:sdimdef}
Let $R$ be a finitely $\s$-generated $k$-$\s$-algebra. Choose a finite subset $A$ of $R$ such that $R=k\{A\}$ and set
$d_i=\dim(k[A,\ldots,\s^{i}(A)])$ for $i\geq 0$. Then the limit
$$d=\lim_{i\to\infty}\frac{d_i}{i+1}$$ exists (inside $\R$) and does not depend on the choice of $A$.
\end{theo}
\begin{proof}
As the first step, we will show that we can assume without loss of generality that $k$ is inversive. Let $k^*$ denote the inversive closure of $k$ (\cite[Def. 2.1.6]{Levin}) and set $R'=R\otimes_k k^*$. Then $A'=\{a\otimes1 |\ a\in A\}$ $\s$-generates $R'$ over $k^*$. Set
$d_i'=\dim(k^*[A',\ldots,\s^{i}(A')])$ for $i\geq 0$. As $k^*[A',\ldots,\s^{i}(A')]=k[A,\ldots,\s^{i}(A)]\otimes_k k^*$ we have $d_i=d'_i$ for $i\geq0$.
So, we can assume that $k$ is inversive.
To show that $\lim_{i\to\infty}\frac{d_i}{i+1}$ exists, it suffices to show that the sequence $(e_i)_{i\in\N}=(d_{i-1})_{i\in\N}$ is subadditive, because then $$\lim_{i\to\infty}\frac{d_i}{i+1}=\lim_{i\to\infty}\frac{d_{i-1}}{i}=\lim_{i\to\infty}\frac{e_i}{i}$$ exists by Lemma~\ref{lemma:subadditive}. Let $i,j\geq 1$. Since $k$ is inversive, the map $$\s^i\colon k[A,\ldots,\s^{j-1}(A)]\to k[\s^i(A),\ldots,\s^{i+j-1}(A)]$$ is surjective. Thus $\dim(k[\s^i(A),\ldots,\s^{i+j-1}(A)])\leq d_{j-1}=e_j$ by Lemma \ref{lemma: dim under morphisms} (ii). The canonical map
$$k[A,\ldots,\s^{i-1}(A)]\otimes_k k[\s^i(A),\ldots,\s^{i+j-1}(A)]\longrightarrow k[A,\ldots,\s^{i+j-1}(A)]$$ is also surjective. Therefore, using Lemma \ref{lemma: dim under morphisms} (ii) and Lemma \ref{lemma: dim and tensor}, we find
$$e_{i+j}\leq e_i+\dim(k[\s^i(A),\ldots,\s^{i+j-1}(A)])\leq e_i+e_j.$$
It remains to show that $d=\lim_{i\to\infty}\frac{d_i}{i+1}$ does not depend on the choice of the $\s$-generating set $A$. This is similar to \cite[Prop. A.24]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential} but we include the argument for the sake of completeness.
So let $A'\subseteq R$ be another finite set such that $R=k\{A'\}$ and set
$d_i'=\dim(k[A',\ldots,\s^{i}(A')])$ for $i\geq 0$. Then $A'\subseteq k[A,\ldots,\s^{j}(A)]$ for some $j\geq 0$ and therefore $k[A',\ldots, \s^{i}(A')]\subseteq k[A,\ldots,\s^{i+j}(A)]$. Thus $d_i'\leq d_{i+j}$ by Lemma \ref{lemma: dim under morphisms}(i).
If $B$ is an algebraically independent subset of $A\cup\ldots\cup \s^{i+j}(A)$ such that $|B|=d_{i+j}$, then $B\cap (A\cup\ldots\cup\s^i(A))$ is an algebraically independent subset of $A\cup\ldots\cup\s^i(A)$ and therefore $|B\cap (A\cup\ldots\cup\s^i(A))|\leq d_i$ by Proposition \ref{prop: dim and algebraic independence}. Thus
$$d_{i+j}=|B|\leq |B\cap (A\cup\ldots\cup\s^i(A))|+|B\cap (\s^{i+1}(A)\cup\ldots\cup\s^{i+j}(A))|\leq d_i+|A|j.$$
So
$$\frac{d'_i}{i+1}\leq\frac{d_{i+j}}{i+1}\leq\frac{d_i}{i+1}+\frac{|A|j}{i+1}.$$
Since $\lim_{i\to\infty}\frac{|A|j}{i+1}=0$, it follows that $\lim_{i\to\infty}\frac{d'_i}{i+1}\leq \lim_{i\to\infty}\frac{d_i}{i+1}$.
\end{proof}
\begin{defi} \label{defi: sdim}
Let $R$ be a finitely $\s$-generated $k$-$\s$-algebra. The real number $d\geq 0$ defined in Theorem \ref{theo:sdimdef} above is called the \emph{$\s$-dimension} of $R$. We denote it by $\sdim(R).$
\end{defi}
We note that the idea to consider the sequence $\frac{d_i}{i+1}$ already appears in \cite[A~7]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential}. There, the $\s$-dimension is defined as $\lfloor\limsup_{i\to\infty} \frac{d_i}{i+1}\rfloor$ and it is shown (\cite[Prop.~A.24]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential}) that $\limsup_{i\to\infty} \frac{d_i}{i+1}$ does not depend on the choice of the finite $\s$-generating set. Here $\lfloor x\rfloor$ is the floor of $x$, i.e., the largest integer not greater than $x$. Theorem \ref{theo:sdimdef} shows that there is no need to consider the limes superior since indeed the limit exists.
The floor of the limes superior was taken in \cite{DiVizioHardouinWibmer:DifferenceGaloisofDifferential} simply to obtain an integer value. The dimension of an algebraic variety is always an integer and so it may seem natural to also only allow integer values for the dimension in difference algebraic geometry. However, omitting the floor function makes the invariant stronger: Two difference algebras with distinct difference dimensions cannot be isomorphic and not using the floor allows us to recognize more difference algebras as non-isomorphic.
Moreover, while non-integer values for the dimension may look unusual to the algebraist, in discrete dynamics, it is very common to consider numerical invariants that are not necessarily integers, for example, the topological entropy and the mean dimension need not be integers. In fact, our notion of difference dimension can be seen as an algebraic version of mean dimension. Mean dimension was first introduced by M. Gromov in \cite{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI}
and curiously enough, in Section 0.7 he writes: ``The present notion of mean dimension(s) arose from my attempts to geometrize the algebraic and model theoretic conceptions of dimensions over difference fields.''
We note that \cite{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI} is mainly concerned with compact metric spaces but as pointed out in Section 1.9.3 and remark \emph{On extension of Prodim to Nontoplogical Categories} right before Section 1.9.7 in \cite{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI}, some definitions and constructions there, also make sense in some algebraic categories. Our definition of difference dimension is more or less the same as the definition of projective dimension in \cite[Section 1.9]{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI}, a quantity closely related to the mean dimension.
To make the connection between the two definitions, note that in \cite{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI} the base difference field $k$ is assumed to be constant, i.e., $\s\colon k\to k$ is the identity map. To match the notation in the beginning of \cite[Section~1.9]{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI} replace the group $\Gamma$ there with the monoid $\N$ and set $\Omega_i=\{0,\ldots,i\}$ for $i\in \N$. Moreover, choose $\underline{X}=\A^n$ so that $X=\underline{X}^\Gamma=(\A^n)^\N$. For $F\subseteq k\{y_1,\ldots,y_n\}$ (as in Section \ref{sec: counting}) set $Y=\Sol^\A(F)\subseteq X$ and $Y|\Omega_i=\Sol^\A_{T_i}(F)$, where $T_i=\{0,\ldots,i\}\times \{1,\ldots,n\}$. Then
$$\operatorname{prodim}(Y : \{\Omega_i\})=\liminf_{i\to \infty}\dim(Y|\Omega_i)/|\Omega_i|$$
from \cite{Gromov:TopologicalInvariantsOfDynamicalSystemsAndSpacesOfHolomorphicMapsI} becomes the limit in our Definition \ref{def: sdim for systems}.
In Section \ref{sec: Comparison} below we will compare Definition \ref{defi: sdim} with other notions of dimension in difference algebra. In particular, we will show (Proposition \ref{prop: compare stredeg}) that $\sdim(R)$ agrees with the $\s$-transcendence degree over $k$ of the field of fractions of $R$ in case $R$ is an integral domain with $\s\colon R\to R$ injective.
We can now justify Definition \ref{def: sdim for systems}.
\begin{cor} \label{cor: limit exists}
Let $F\subseteq k\{y_1,\ldots,y_n\}$ and for $i\geq 0$ set
$$d_i(F)=\max\big\{|T| \ |\ T\subseteq \{0,\ldots,i\}\times\{1,\ldots,n\} \text{ is free w.r.t. } F\big\}.$$
Then $d=\lim_{i\to\infty}\frac{d_i(F)}{i+1}$
exists.
\end{cor}
\begin{proof}
Set $R=k\{y_1,\ldots,y_n\}/[F]$ and let $A=\{a_1,\ldots,a_n\}$ denote the image of $\{y_1,\ldots,y_n\}$ in $R$. Recall (Proposition \ref{prop: characterize free}) that $T\subseteq \N\times\{1,\ldots,n\}$ is free with respect to $F$ if and only if $\{\s^i(a_j)|\ (i,j)\in T\}$ is algebraically independent over $k$.
Therefore, Proposition \ref{prop: characterize free} implies $d_i(F)=\dim(k[A,\ldots,\s^i(A)])$ for $i\geq 0$ and the claim follows from Theorem~\ref{theo:sdimdef}.
\end{proof}
Note that in Theorem \ref{theo:sdimdef} and Corollary \ref{cor: limit exists} the limit of the sequence is in fact the infimum of the sequence. This follows from Lemma \ref{lemma:subadditive} and the proofs of Theorem \ref{theo:sdimdef} and Corollary \ref{cor: limit exists}.
From the proof of Corollary \ref{cor: limit exists} we also obtain:
\begin{rem} \label{rem: cut at i}
For $i\geq 0$ set $k\{y\}[i]=k[y_1,\ldots,y_n,\ldots,\s^i(y_1),\ldots,\s^i(y_n)]$ and for a $\s$-ideal $I$ of $k\{y_1,\ldots,y_n\}$ set $I[i]=I\cap k\{y\}[i]$. We have
$$\sdim(I)=\sdim(k\{y_1,\ldots,y_n\}/I)=\lim_{i\to\infty}\frac{d_i}{i+1},$$
where $d_i=\dim(k\{y\}[i]/I[i])$.
\end{rem}
\begin{ex}
Let $R$ be a \ks-algebra that is finitely generated as a $k$-algebra. Then $\sdim(R)=0$. To see this, note that if $A$ generates $R$ as a $k$-algebra, then also $k\{A\}=R$ and so $d_i=\dim(R)$ for $i\geq 0$.
\end{ex}
The following proposition shows that our notion of $\s$-dimension generalizes the usual notion of dimension in algebraic geometry.
\begin{prop} \label{prop: sdim for algebraic}
Let $F\subseteq k[y_1,\ldots,y_n]\subseteq k\{y_1,\ldots,y_n\}$ be a system of algebraic equations. Then $\sdim(F)$ equals the dimension of the algebraic variety defined by $F$.
\end{prop}
\begin{proof}
Let $X$ be the algebraic variety defined by $F$ and $d=\dim(X)$. For $i\geq 0$, the algebraic variety defined by $\s^i(F)\subseteq k[\s^i(y_1),\ldots,\s^i(y_n)]$ is the base change of $X$ via $\s^i\colon k\to k$. In particular, it also has dimension $d$ (cf. Lemma \ref{lemma: dim and base change}). So
$$(F,\s(F),\ldots,\s^i(F))\subseteq k[y_1,\ldots,y_n,\ldots,\s^i(y_1),\ldots,\s^i(y_n)]$$
defines an $(i+1)$-fold product of varieties of dimension $d$, i.e., a variety of dimension $d(i+1)$ (cf. Lemma \ref{lemma: dim and tensor}).
We next show that, with the notation of Remark \ref{rem: cut at i}, we have
\begin{equation} \label{eq: order i}
[F][i]=(F,\s(F),\ldots,\s^i(F))\subseteq k\{y\}[i]
\end{equation}
for all $i\in \N$. Clearly, $(F,\s(F),\ldots,\s^i(F))\subseteq [F][i]$. So let us establish the reverse inclusion. To this end, note that for a $k$-algebra $S$, a set of indeterminates $Y$ over $S$ and an ideal $I$ of $k[Y]$ one has $(I)\cap k[Y]=I$, where $(I)\subseteq S[Y]$ denotes the ideal of $S[Y]$ generated by $I$. (This follows from $S[Y]=S\otimes_k k[Y]$ and the fact that the tensor product has this property. See, e.g., \cite[Lemma 1.4.5 ]{DuascualescuNuastuasescu:HopfAlgebras}). We will apply this with $S=k[\s^{i+1}(y_1),\ldots,\s^{i+1}(y_n),\s^{i+2}(y_1),\ldots]/(\s^{i+1}(F),\s^{i+2}(F),\ldots)$,
$Y=\{y_1,\ldots,y_n,\ldots,\s^i(y_1),\ldots,\s^i(y_n)\}$ and $I=(F,\ldots,\s^i(F))\subseteq k[Y]=k\{y\}[i]$. The image of any $h\in [F]$ in $S[Y]$ lies in $(I)\subseteq S[Y]$, because an element in $\s^j(F)$ ($j\geq i+1$) becomes zero in $S$. If, moreover, $h\in [F][i]$, then $h\in k[Y]$, and so $h\in (I)\cap k[Y]=I$. This proves (\ref{eq: order i}).
Thus, if $A$ denotes the image of $\{y_1,\ldots,y_n\}$ in $k\{y_1,\ldots,y_n\}/[F]$, then
$$k[A,\ldots,\s^i(A)]=k\{y\}[i]/[F][i]=k\{y\}[i]/(F,\ldots,\s^i(F))$$
has dimension $d_i=d(i+1)$. Therefore $$\sdim(F)=\sdim(k\{A\})=\lim_{i\to\infty}\frac{d_i}{i+1}=d.$$
\end{proof}
We will next establish some elementary properties of the $\s$-dimension which show that it behaves as one may expect from a notion of dimension. Most of these properties follow rather directly from the corresponding property of finitely generated algebras.
\begin{prop} \label{prop: morphism and sdim}
Let $R$ and $S$ be finitely $\s$-generated $k$-$\s$-algebras.
\begin{enumerate}
\item If there exists an injective morphism $R\to S$ of $k$-$\s$-algebras, then $\sdim(R)\leq\sdim(S)$.
\item If there exists a surjective morphism $R\to S$ of $k$-$\s$-algebras, then $\sdim(R)\geq\sdim(S)$.
\end{enumerate}
\end{prop}
\begin{proof}
(i): We may assume that $R$ is a \ks-subalgebra of $S$. Let $A$ be a finite $\s$-generating set for $R$. Then we can extend $A$ to a finite $\s$-generating set $B$ of $S$. For $i\geq 0$ we have $k[A,\ldots,\s^{i}(A)]\subseteq k[B,\ldots,\s^{i}(B)]$ and therefore, using Lemma \ref{lemma: dim under morphisms} (i),
$$\dim(k[A,\ldots,\s^{i}(A)])\leq\dim(k[B,\ldots,\s^{i}(B)]).$$
Thus $\sdim(R)\leq\sdim(S)$.
(ii): Let $A\subseteq R$ be finite such that $R=k\{A\}$ and let $\overline{A}$ denote the image of $A$ in $S$ under a surjective morphism. Then $k\{\overline{A}\}=S$. Since $k[A,\ldots,\s^{i}(A)]$ surjects onto $k[\overline{A},\ldots,\s^{i}(\overline{A})]$ for $i\geq 0$, we see, using Lemma \ref{lemma: dim under morphisms} (ii), that $$\dim(k[A,\ldots,\s^{i}(A)])\geq\dim(k[\overline{A},\ldots,\s^{i}(\overline{A})]),$$
and therefore $\sdim(R)\geq \sdim(S)$.
\end{proof}
In terms of systems of algebraic difference equations Proposition \ref{prop: morphism and sdim} has the following interpretation:
\begin{cor} \label{cor: morphism and sdim}
\begin{enumerate}\item If $F\subseteq k\{y_1,\ldots,y_n\}$ and $G\subseteq k\{y_1,\ldots,y_n,z_1,\ldots,z_m\}$ are such that $[G]\cap k\{y_1,\ldots,y_n\}=[F]$, then $\sdim(F)\leq\sdim(G)$.
\item If $F,G\subseteq k\{y_1,\ldots,y_n\}$ are such that $[F]\subseteq [G]$ (e.g., $F\subseteq G$), then $\sdim(F)\geq\sdim(G)$.
\end{enumerate}
\qed
\end{cor}
Like the Krull dimension of finitely generated algebras our $\s$-dimension is additive with respect to the tensor product.
\begin{prop} \label{prop: sdim and tensor products}
Let $R$ and $S$ be finitely $\s$-generated $k$-$\s$-algebras. Then
$$\sdim(R\otimes_k S)=\sdim(R)+\sdim(S).$$
\end{prop}
\begin{proof}
Let $A$ and $B$ be finite $\s$-generating sets for $R$ and $S$ respectively. Then $C=\{a\otimes 1|\ a\in A\}\cup\{1\otimes b|\ b\in B\}$ is a finite $\s$-generating set for $R\otimes_k S$. Moreover, for $i\geq 0$ we have $k[C,\ldots,\s^{i}(C)]=k[A,\ldots,\s^{i}(A)]\otimes_k k[B,\ldots,\s^{i}(B)]$ and therefore, using Lemma~\ref{lemma: dim and tensor}, $$\dim(k[C,\ldots,\s^{i}(C)])=\dim(k[A,\ldots,\s^{i}(A)])+\dim(k[B,\ldots,\s^{i}(B)]).$$
\end{proof}
In terms of systems of algebraic difference equations, Proposition \ref{prop: sdim and tensor products} has the following interpretation:
\begin{cor}
If $F\subseteq k\{y_1,\ldots,y_n\}$ and $G\subseteq k\{z_1,\ldots,z_m\}$, then $F\cup G\subseteq k\{y_1,\ldots,y_n,z_1,\ldots,z_m\}$ has $\s$-dimension $\sdim(F)+\sdim(G)$. \qed
\end{cor}
The following proposition shows that our notion of $\s$-dimension is well-behaved under extension of the base $\s$-field (cf. \cite[Lemma A.27]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential}).
\begin{prop} \label{prop: sdim and base extension}
Let $R$ be a finitely $\s$-generated $k$-$\s$-algebra. Let $k'$ be a $\s$-field extension of $k$ and consider $R'=R\otimes_k k'$ as a $k'$-$\s$-algebra. Then
$$\sdim(R')=\sdim(R).$$
\end{prop}
\begin{proof}
If $A\subseteq R$ is a finite $\s$-generating set for the \ks-algebra $R$, then $A'=\{a\otimes 1|\ a\in A\}$ is a finite $\s$-generating set for the $k'$-$\s$-algebra $R'$. Moreover, $\dim(k[A,\ldots,\s^{i}(A)])=\dim(k'[A',\ldots,\s^{i}(A')])$ for $i\geq 0$ by Lemma~\ref{lemma: dim and base change} since $k'[A',\ldots,\s^{i}(A')]=k[A,\ldots,\s^{i}(A)]\otimes_k k'$ .
\end{proof}
In terms of systems of algebraic difference equations, Proposition \ref{prop: sdim and base extension} has the following interpretation:
\begin{cor}
Let $k'$ be a $\s$-field extension $k$ and $F\subseteq k\{y_1,\ldots,y_n\}$. Then the $\s$-dimension of $F$ considered as a subset of $k\{y_1,\ldots,y_n\}$ agrees with the $\s$-dimensions of $F$ considered as a subset of $k'\{y_1,\ldots,y_n\}$.\qed
\end{cor}
For a $\s$-ring $R$, the nilradical $\sqrt{0}\subseteq R$ of $R$ is a $\s$-ideal. Therefore $R_{\operatorname{red}}:=R/\sqrt{0}$ has naturally the structure of a $\s$-ring. As in commutative algebra, passing from $R$ to $R_{\operatorname{red}}$ does not affect the dimension:
\begin{prop} \label{prop: sdim and radical}
Let $R$ be a finitely $\s$-generated $k$-$\s$-algebra. Then
$$\sdim(R_{\operatorname{red}})=\sdim(R).$$
\end{prop}
\begin{proof}
Let $A\subseteq R$ be a finite $\s$-generating set for $R$ and let $\overline{A}$ denote the image of $A$ in $R_{\operatorname{red}}$. Then $\overline{A}$ is a finite $\s$-generating set for $R_{\operatorname{red}}$ and
$k[\overline{A},\ldots,\s^{i}(\overline{A})]=k[A,\ldots,\s^{i}(A)]_{\operatorname{red}}$ for $i\geq 0$. Therefore $\dim(k[\overline{A},\ldots,\s^{i}(\overline{A})])=\dim(k[A,\ldots,\s^{i}(A)])$ by Lemma \ref{lemma: dim and nilradical}.
\end{proof}
In terms of systems of algebraic difference equations Proposition \ref{prop: sdim and radical} can be reinterpreted as:
\begin{cor} \label{cor: radical}
Let $F\subseteq k\{y_1,\ldots,y_n\}$. Then
$$\sdim(F)=\sdim([F])=\sdim(\sqrt{[F]}).$$ \qed
\end{cor}
\section{Comparison with other notions of dimension} \label{sec: Comparison}
In this section we compare our notion of $\s$-dimension with two other notions in the literature. Firstly, we show that our notion generalizes the standard definition via $\s$-transcendence bases. Secondly, we show that our $\s$-dimension is an upper bound for the difference Krull dimension.
Let us first recall some basic facts about the $\s$-transcendence degree (\cite[Section~4.1]{Levin}). Let $R$ be a \ks-algebra. A subset $A$ of $R$ is \emph{$\s$-algebraically independent} (over $k$) if the family $(\s^i(a))_{a\in A, i\in\N}$ is algebraically independent over $k$. If $K$ is a $\s$-field extension of $k$, a maximal $\s$-algebraically independent subset is called a \emph{$\s$-transcendence basis} of $K/k$. Any two $\s$-transcendence bases have the same cardinality, which is called the \emph{$\s$-transcendence degree} of $K/k$.
Also recall that a $\s$-ideal $I$ of a $\s$-ring $R$ is \emph{reflexive} if $\s^{-1}(I)=I$. (This implies that $\s\colon R/I\to R/I$ is injective.)
In \cite[Definition 4.2.21]{Levin} the difference dimension of a prime reflexive $\s$-ideal $I$ of $k\{y_1,\ldots,y_n\}$ is defined as the $\s$-transcendence degree of the fraction field of $k\{y_1,\ldots,y_n\}/I$ over $k$. (We will see in a moment that our $\sdim(I)$ agrees with this definition, so there is no ambiguity with the naming.)
The following proposition shows that our definition of $\s$-dimension agrees with the classical definition whenever the latter applies, i.e., when $R$ is an integral domain with $\s\colon R\to R$ injective (cf. \cite[Lemma A.26]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential}).
\begin{prop} \label{prop: compare stredeg}
Let $R$ be a finitely $\s$-generated $k$-$\s$-algebra. Assume that $R$ is an integral domain. Then $\sdim(R)$ equals the largest integer $n$ such that there exist $n$ $\s$-algebraically independent elements inside $R$. Moreover, if $\s\colon R\to R$ is injective, $\sdim(R)$ equals the $\s$-transcendence degree of the field of fractions of $R$ over $k$.
\end{prop}
\begin{proof}
Let $A$ be a finite subset of $R$ such that $R=k\{A\}$ and set $d_i=\dim(k[A,\ldots,\s^i(A)])$ for $i\geq 0$. In \cite[Lemma and Definition 4.21]{Hrushovski:elementarytheoryoffrobenius} (cf. \cite[Theorem 5.1.1]{Wibmer:AlgebraicDifferenceEquations}) it is shown that there exist $d,e\in\N$ such that $d_i=d(i+1)+e$ for $i\gg 0$.
Moreover, $d$ is the $\s$-transcendence degree over $k$ of the field of fractions $K$ of $R/(0)^*$, where $$(0)^*=\{r\in R|\ \exists\ m\geq 1 : \s^m(r)=0\}.$$
Note that because $R$ is an integral domain, $(0)^*$ is a (reflexive) prime ideal and $K$ is a $\s$-field extension of $k$. We have
$$\sdim(R)=\lim_{i\to\infty}\frac{d_i}{i+1}=\lim_{i\to\infty}\frac{d(i+1)+e}{i+1}=d.$$
If $a_1,\ldots,a_n\in R$ are $\s$-algebraically independent over $k$, then $k\{a_1,\ldots,a_n\}\cap(0)^*=\{0\}$, because $\s$ is injective on $k\{a_1,\ldots,a_n\}$. Thus $k\{a_1,\ldots,a_n\}$ embeds into $K$ and it follows that $n\leq d$.
On the other hand, we can choose a $\s$-transcendence basis $b_1,\ldots,b_d$ of $K/k$ that is contained in $R/(0)^*$. If $a_1,\ldots,a_d\in R$ are such that they are mapped onto $b_1,\ldots,b_d$, then $a_1,\ldots,a_d\in R$ are $\s$-algebraically independent over $k$. It follows that $d=\sdim(R)$ is the largest integer such that there exist $d$ $\s$-algebraically independent elements in $R$.
If $\s\colon R\to R$ is injective, then $(0)^*=\{0\}$ and $K$ equals the field of fractions of $R$.
\end{proof}
Recall that a $\s$-ideal $I$ of a $\s$-ring $R$ is \emph{perfect} if $f\s(f)\in I$ implies $f\in I$ for all $f\in R$. Perfect $\s$-ideals are important in classical difference algebra because they feature prominently in a difference Nullstellensatz (\cite[Theorem 2.6.4]{Levin}). In fact, there is a bijection between the difference subvarieties of $\A^n_k$ and the perfect $\s$-ideals of $k\{y_1,\ldots,y_n\}$. Note however, that in this setup solutions are restricted to be solutions in $\s$-field extensions of $k$. Allowing solutions in more general \ks-algebras, such as rings of sequences, leads to a different kind of Nullstellensatz. (See \cite{PogudinScanlonWibmer:SolvingDifferenceEquationsInSequences}.)
Any perfect $\s$-ideal $I$ of $k\{y_1,\ldots,y_n\}$ can be written uniquely as an irredundant intersection $I=\p_1\cap\ldots\cap\p_m$ of prime reflexive $\s$-ideals (\cite[Theorem 2.5.7]{Levin}).
\begin{cor} \label{cor: sdim for perfect}
Let $I\subseteq k\{y_1,\ldots,y_n\}$ be a perfect $\s$-ideal, written as an irredundant intersection $I=\p_1\cap\ldots\cap\p_m$ of prime reflexive $\s$-ideals. Then $\sdim(I)$ is the maximum (over $1\leq j\leq m$) of the $\s$-transcendence degrees of the fields of fractions of $k\{y_1,\ldots,y_n\}/\p_j$. In particular, for a reflexive prime $\s$-ideal $\p$, $\sdim(\p)$ equals the $\s$-transcendence degree of the field of fractions of $k\{y_1,\ldots,y_n\}/\p$.
\end{cor}
\begin{proof}
With notation as in Remark \ref{rem: cut at i} we have $I[i]=\p_1[i]\cap\ldots\cap\p_m[i]$ for $i\geq 0$ and it follows that
$$d_i=\dim(k\{y\}[i]/I[i])=\max\{\dim (k\{y\}[i]/\p_j[i]) |\ 1\leq j\leq m\}.$$
As in the proof of Proposition \ref{prop: compare stredeg}, for every $1\leq j\leq m$, there exist $d(\p_j), e(\p_j)\in \N$ such that $$d_i(\p_j)=\dim(k\{y\}[i]/\p_j[i])=d(\p_j)(i+1)+e(\p_j)$$
for $i\gg0$. Thus, if $j_0\in\{1,\ldots,m\}$ is such that $d(\p_{j_0})$ is maximal and $e(\p_{j_0})$ is maximal among all $e(\p_j)$ with $d(\p_j)$ maximal, then
$d_i=d(\p_{j_0})(i+1)+e(\p_{j_0})$ for $i\gg 0$. It follows that
$$\sdim(I)=\lim_{i\to\infty}\frac{d_i}{i+1}=d(\p_{j_0}).$$
Since $d(\p_{j})$ agrees with the $\s$-transcendence degree of the field of fractions of $k\{y_1,\ldots,y_n\}/\p_j$ over $k$ the claim follows.
\end{proof}
We next compare our notion of $\s$-dimension with a difference analog of the Krull dimension. Let us first explain how the idea of the definition of the Krull dimension can be adapted to difference algebra. (Cf. \cite[Definition 4.6.1]{Levin} or \cite[Section 7.2]{KontradievaLevinMikhalev:DifferentialAndDiffereneDimensionPolynomials}.) Since the $\s$-polynomial ring $k\{y_1\}$ in one $\s$-variable contains infinite descending chains of prime $\s$-ideals one cannot simply take the maximal length of chains of prime $\s$-ideals as the definition. Instead one has to work with chains of chains: Let $R$ be a finitely $\s$-generated \ks-algebra. The largest integer $d\geq 0$ such that there exists a chain of infinite chains of prime $\s$-ideals of $R$ of the form
\begin{equation} \label{eq:chain}
\p_0\supsetneq\p_0^1\supsetneq\p_0^2\supsetneq\ldots \supsetneq\p_1\supsetneq\p_1^1\supsetneq\p_1^2\supsetneq\ldots \supsetneq\p_2\supsetneq \ldots\supsetneq \p_{d-1}\supsetneq\p_{d-1}^1\supsetneq\p_{d-1}^2\supsetneq\ldots\supsetneq\p_d
\end{equation}
is called the \emph{difference Krull dimension} of $R$ and denoted by $\dim_U(R)$. By definition $\dim_U(R)=0$ if $R$ has no (or only finitely many) prime $\s$-ideals. The existence of a maximal $d$ follows from the proof of Proposition \ref{prop:compare with Krull} below.
\begin{prop} \label{prop:compare with Krull}
Let $R$ be a finitely $\s$-generated \ks-algebra. Then $$\dim_U(R)\leq\sdim(R).$$
\end{prop}
\begin{proof}
Let $A\subseteq R$ be finite such that $R=k\{A\}$. For a prime $\s$-ideal $\p$ of $R$ let $\overline A$ denote the image of $A$ in $R/\p$ and consider the sequence $(d_i)_{i\geq 0}$ defined by $d_i=\dim(k[\overline{A},\ldots,\s^{i}(\overline{A})])$. According to \cite[Lemma and Definition 4.21]{Hrushovski:elementarytheoryoffrobenius} (cf. \cite[Theorem 5.1.1]{Wibmer:AlgebraicDifferenceEquations}) there exist $d(\p),e(\p)\in\N$ such that $d_i=d(\p)(i+1)+e(\p)$ for $i\gg 0$. So the polynomial $\omega_\p(t)=d(\p)(t+1)+e(\p)$ satisfies $\omega_\p(i)=d_i$ for $i\gg 0$.
We define a total order on the set of polynomials of the form $d(t+1)+e$ with $d,e\in\N$ by
$d(t+1)+e\leq d'(t+1)+e'$ if $d(i+1)+e\leq d'(i+1)+e'$ for $i\gg 0$. This is a well-order since it corresponds to the lexicographic order on pairs $(d,e)$. If $\p\supseteq\q$ are prime $\s$-ideals of $R$, then $\omega_\p(t)\leq\omega_\q(t)$. Moreover, $\omega_\p(t)<\omega_\q(t)$ if $\p\supsetneq\q$.
So an infinite descending chain $\p\supsetneq\p^1\supsetneq \p^2\supsetneq\dots\supsetneq\q$ of prime $\s$-ideals in $R$ gives rise to an infinite ascending chain $\omega_\p(t)<\omega_{\p^1}(t)<\omega_{\p^2}(t)<\ldots <\omega_\q(t)$ of polynomials. But in such a chain we necessarily have $d(\p)<d(\q)$. Thus for a descending chain of infinite chains of prime $\s$-ideals as in equation (\ref{eq:chain}) we have $d({\p_d})\geq d$. So $d(\p_d)\geq\dim_U(R)$.
As $\sdim(R)\geq \sdim(R/\p_d)=d(\p_d)$ by Proposition \ref{prop: morphism and sdim} (ii), it follows that $\sdim(R)\geq \dim_U(R)$ as desired.
\end{proof}
\begin{rem}
In the definition of the difference Krull dimension above we have used prime $\s$-ideals. A similar invariant $\dim_{U^*}(R)$ could be obtained by modifying the definition by only allowing reflexive prime $\s$-ideals. Then clearly, $\dim_{U^*}(R)\leq\dim_U(R)$ and therefore also $\dim_{U^*}(R)\leq \sdim(R)$.
\end{rem}
The following example shows that the inequality from Proposition \ref{prop:compare with Krull} can be strict, even if $\sdim(R)$ is an integer.
\begin{ex}
Consider $S=k\times k$ as a \ks-algebra via $\s(a,b)=(\s(b),\s(a))$ and $k\to S,\ \lambda\mapsto (\lambda,\lambda)$. Let $R=S\{y\}$ denote the univariate $\s$-polynomial ring over $S$. We first show that $R$ has no prime $\s$-ideals and so $\dim_U(R)=0$.
Suppose $\p$ is a prime $\s$-ideal of $R$. Let $e_1=(1,0)\in S$ and $e_2=(0,1)\in S$. Since $e_1e_2=0\in\p$, we have $e_1\in\p$ or $e_2\in \p$. Assume (without loss of generality) that $e_1\in \p$. Since $\p$ is a $\s$-ideal, also $\s(e_1)=e_2\in \p$. But then $1=e_1+e+2\in \p$; a contradiction.
To see that $\sdim(R)=1$, we choose $A=\{e_1,e_2, y\}$. Then $\dim(k[A,\ldots,\s^i(A)])=i+1$ for all $i\in \N$ because $\{y_1,\ldots,\s^i(y)\}\subseteq A\cup\ldots\s^i(A)$ is an algebraically independent subset of maximal cardinality (Proposition \ref{prop: dim and algebraic independence}).
\end{ex}
\section{Covering density and the dimension of difference monomials} \label{sec:Covering Density and the dimension of difference monomials}
In this section we determine the $\s$-dimension of a univariate $\s$-monomial $\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_n}(y)^{\beta_n}$. It turns out that this $\s$-dimension is essentially given by the \emph{covering density} of $\{\alpha_1,\ldots,\alpha_n\}$.
There is a vast body of literature on covering, packing and tiling problems. We refer the interested reader to \cite{BollobasJansonRiordan:OnCoveringByTranslatesOfaSet} and the references given there. In rather general terms the covering problem can be formulated as follows: Given an additive group $G$ and a subset $E$ of $G$, find a ``minimal'' subset $E'$ of $G$ such that $E+E'=\{e+e'|\ e\in E,\ e'\in E'\}$ equals $G$. Such an $E'$ is often called a \emph{complement} of $E$.
It is instructive to think of $E+E'$ as a union of translates $E+e'$ of $E$. The question then becomes, ``how many'' translates of $E$ are needed to cover $G$? To give a precise meaning to ``minimal'' and ``how many'' one usually assumes that $G$ is equipped with some measure or density. A well studied special case is $G=\R^n$ and $E$ a ball or convex body. For our purpose we are interested in the case $G=\Z$ and $E$ a finite set, studied e.g., in \cite[Section 5]{BollobasJansonRiordan:OnCoveringByTranslatesOfaSet}, \cite{Newman:ComplememtsOfFiniteSetsOfIntegers},\cite{Weinstein:SomeCoveringAndPackingResultsInNumberTheory},\cite{Tuller:thesis},\cite{Schmidt:ComplementarySetsOfFiniteSets},\cite{SchmidtTuller:CoveringAndPackingI},\cite{SchmidtTuller:CoveringAndPackingII}.
For a finite subset $E$ of $\Z$, the \emph{covering density} $\c(E)$ of $E$ can be defined as
$$\c(E)=\inf_{E'}\d(E'),$$
where $\d(E')=\lim_{i\to\infty}\frac{|E'\cap[-i,i]|}{2i}$ is the density of $E'$ and
the infimum is taken over all complements of $E$ for which the density exists. We note that the covering density is called the \emph{codensity} in \cite{Newman:ComplememtsOfFiniteSetsOfIntegers} and the \emph{minimal covering frequency} in \cite{SchmidtTuller:CoveringAndPackingI,SchmidtTuller:CoveringAndPackingII}. We are using the nomenclature from \cite{BollobasJansonRiordan:OnCoveringByTranslatesOfaSet}. As pointed out in
\cite[Section 5]{BollobasJansonRiordan:OnCoveringByTranslatesOfaSet}, there is an equivalent definition of $c(E)$, which we will use: For $i\geq 1$ let $\tau(E,i)$ be the smallest number of translates of $E$ that cover $\{1,\ldots,i\}$, i.e.,$$\tau(E,i)=\min\{|E'|\ |\ E+E'\supseteq\{1,\ldots,i\} \}.$$
Then $\c(E)=\lim_{i\to\infty}\frac{\tau(E,i)}{i}$.
\begin{theo} \label{theo: covering density and smonomial}
The $\s$-dimension of a univariate $\s$-monomial $\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_n}(y)^{\beta_n}$ with $0\leq\alpha_1<\alpha_2<\ldots<\alpha_n$ and $\beta_1,\ldots,\beta_n\geq 1$ is $1-\c(E)$, where $c(E)$ is the covering density of $E=\{\alpha_1,\ldots,\alpha_n\}$.
\end{theo}
\begin{proof}
We first observe that $\sdim(\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_n}(y)^{\beta_n})=\sdim(\s^{\alpha_1}(y)\ldots\s^{\alpha_n}(y))$ by Corollary \ref{cor: morphism and sdim} (ii) and Corollary \ref{cor: radical}, where we use that $$[\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_n}(y)^{\beta_n}]\subseteq [\s^{\alpha_1}(y)\ldots\s^{\alpha_n}(y)]\subseteq \sqrt{[\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_n}(y)^{\beta_n}]}.$$
So it remains to show that $\sdim(f)=1-\c(E)$ for $f=\s^{\alpha_1}(y)\ldots\s^{\alpha_n}(y)$.
As in Remark \ref{rem: cut at i}, we set $k\{y\}[i]=k[y,\ldots,\s^i(y)]$ and $[f][i]=[f]\cap k\{y\}[i]$ for $i\geq 0$. Then $\sdim(f)=\lim_{i\to\infty}\frac{d_i}{i+1}$, where $d_i=\dim(k\{y\}[i]/[f][i])$.
For an arbitrary $F\subseteq k\{y\}$, it is non-trivial to determine $[F][i]$. However, in our situation, since we are only dealing with monomial ideals, we see that $$[f][i]=[f,\s(f),\ldots,\s^{i-\alpha_n}(f)]\subseteq k\{y\}[i]$$ for $i\geq\alpha_n$.
To determine the dimension of this monomial ideal, let us recall (\cite[Chapter 9, \S 1, Prop. 3]{CoxLittleOShea:IdealsVarietiesAndAlgorithms}) how to determine the dimension of a monomial ideal $M=(f_1,\ldots,f_r)\subseteq k[y_1,\ldots,y_m]$ in general, where $f_j=\prod_{l\in S_j}y_l$ and $S_1,\ldots,S_r\subseteq \{1,\ldots,m\}$. The solution set of $M$ is a finite union of coordinate subspaces and to find the dimension of $k[y_1,\ldots,y_m]/M$, it suffices to find the coordinate subspace of the largest dimension, which is given by $$m-\min\{|T|\ |\ T\subseteq\{1,\ldots,m\},\ T\cap S_j\neq\emptyset \text{ for } j=1,\ldots,r\}.$$
Therefore $$\dim(k\{y\}[i]/[f][i])=i+1-\min\{|T|\ |\ T\subseteq\{0,\ldots,i\},\ T\cap (E+j)\neq\emptyset \text{ for } j=0,\ldots,i-\alpha_n\}.$$
But for $T\subseteq\{0,\ldots,i\}$, we have $T\cap (E+j)\neq\emptyset \text{ for } j=0,\ldots,i-\alpha_n$ if and only if $\{0,\ldots,i-\alpha_n\}\subseteq \cup_{t\in T}(-E+t)$, where $-E=\{-e|\ e\in E\}$. Thus
\begin{align*}
&\min\{|T|\ |\ T\subseteq\{0,\ldots,i\},\ T\cap (E+j)\neq\emptyset \text{ for } j=0,\ldots,i-\alpha_n\} \\
&=\min\{|T|\ |\ T\subseteq\{0,\ldots,i\},\ \{0,\ldots,i-\alpha_n\}\subseteq -E+T \}\\
&=\min\{|T|\ |\ T\subseteq \Z,\ \{0,\ldots,i-\alpha_n\}\subseteq -E+T\}\\
&=\min\{|T|\ |\ T\subseteq \Z,\ \{1,\ldots,i-\alpha_n+1\}\subseteq -E+T\}\\
&=\tau(-E,i-\alpha_n+1)
\end{align*}
and so, $d_i=i+1-\tau(-E,i-\alpha_n+1)$.
Consequently,
\begin{align*}
\sdim(f)&=\lim_{i\to\infty}\frac{d_i}{i+1}=1-\lim_{i\to\infty}\frac{\tau(-E,i-\alpha_n+1)}{i+1}=\\ &=1-\lim_{i\to\infty}\frac{\tau(-E,i-\alpha_n+1)}{i-\alpha_n+1}\left(\frac{i-\alpha_n+1}{i+1}\right)=\\
&=1-\c(-E)\cdot 1.
\end{align*}
Since $\c(-E)=\c(E)$ (\cite[Lemma 2.8]{Tuller:thesis}) the claim follows.
\end{proof}
\begin{ex} \label{ex: sdim of monomial}
The covering density of a one-element set is $1$ and the covering density $c(E)$ of a finite subset $E$ of $\Z$ with at least two elements satisfies $\frac{1}{|E|}\leq c(E)\leq \frac{1}{2}$ (\cite[Lemma 2.9]{Tuller:thesis}). Moreover, $c(E)$ is rational (\cite[Theorem 2.13]{Tuller:thesis} or \cite[Theorem~5.1]{BollobasJansonRiordan:OnCoveringByTranslatesOfaSet}).
Thus the $\s$-dimension of a $\s$-monomial $\s^{\alpha_1}(y)^{\beta_1}\ldots\s^{\alpha_n}(y)^{\beta_n}$ is $0$ if $n=1$ and otherwise it is a rational number between $\frac{1}{2}$ and $1-\frac{1}{n}$.
\end{ex}
\section{Values of the difference dimension} \label{sec:Values of the difference dimension}
As seen in Example \ref{ex: sdim of monomial} above, the $\s$-dimension of a system of algebraic difference equations need not be an integer. This raises two questions:
\begin{itemize}
\item When is the $\s$-dimension an integer?
\item What values can the $\s$-dimension take?
\end{itemize}
Concerning the first question, we add to the already known cases, the case of a finitely $\s$-generated \ks-Hopf algebra. We do not fully answer the second question but we reduce it to a purely combinatorial problem. This reduction shows in particular, that the answer does not depend on the base $\s$-field $k$.
We have already seen that the $\s$-dimension of $R=k\{y_1,\ldots,y_n\}/I$ is an integer in all of the following cases:
\begin{itemize}
\item $R$ is an integral domain, i.e., $I$ is a prime $\s$-ideal (Proposition \ref{prop: compare stredeg}).
\item $I=[F]$ for some $F\subseteq k[y_1,\ldots,y_n]$ (Proposition \ref{prop: sdim for algebraic}).
\item $I$ is a perfect $\s$-ideal (Corollary \ref{cor: sdim for perfect}).
\end{itemize}
The following theorem shows that the $\s$-dimension of a finitely $\s$-generated \ks-Hopf algebra is also always an integer. This result was already alluded to in \cite[Remark~A.30]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential}. Hopf algebras are important in algebraic geometry because they are the coordinate rings of affine group schemes (\cite[Section~1.4]{Waterhouse:IntrotoAffineGroupSchemes}). Hopf algebras over a field $k$ that are finitely generated as $k$-algebras correspond to affine group schemes of finite type over $k$, i.e., affine (sometimes also called linear) algebraic groups. A similar duality exists in difference algebraic geometry: \ks-Hopf algebras that are finitely $\s$-generated as \ks-algebras correspond to affine difference algebraic groups. See \cite[Appendix~A]{DiVizioHardouinWibmer:DifferenceGaloisofDifferential}, \cite{Wibmer:FinitenessPropertiesOfAffineDifferenceAlgebraicGroups} and \cite{Wibme:AlmostSimpleAffineDiffferenceAlgebraicGroups} for more background of affine difference algebraic groups.
\begin{theo}[{\cite[Theorem 3.7]{Wibmer:FinitenessPropertiesOfAffineDifferenceAlgebraicGroups}}]
Let $R$ be a finitely $\s$-generated $k$-$\s$-algebra. Assume that $R$ can be equipped with the structure of a $k$-$\s$-Hopf algebra, i.e., there exist morphisms of $k$-$\s$-algebras $\Delta\colon R\to R\otimes_k R$, $S\colon R\to R$ and $\varepsilon\colon R\to k$ that turn $R$ into a Hopf algebra. Then $\sdim(R)$ is an integer.
\end{theo}
\begin{proof}
In \cite[Theorem 3.7]{Wibmer:FinitenessPropertiesOfAffineDifferenceAlgebraicGroups} it is shown that there exists a finite subset $A$ of $R$ such that $k\{A\}=R$, $k[A]$ is a Hopf-subalgebra of $R$ and
$\dim(k[A,\ldots,\s^i(A)])=d(i+1)+e$ for some $d,e\in \N$ and $i\gg 0$. So $\sdim(R)=d\in\N$.
\end{proof}
We next address the question, which non-negative real numbers $d$ are of the form $d=\sdim(F)$ for some $F\subseteq k\{y_1,\ldots,y_n\}$? As a first step, we show that one can reduce to the case that $F$ consists of $\s$-monomials. Then, we will further reduce to the case of monomial $\s$-ideals generated by squarefree $\s$-monomials.
A \emph{$\s$-monomial} in the $\s$-variables $y_1,\ldots,y_n$ is a monomial in the variables $\s^i(y_j)$, $i\in\N$, $j\in\{1,\ldots,n\}$. A $\s$-ideal $M$ of $k\{y_1,\ldots,y_n\}$ is a \emph{monomial $\s$-ideal} if it is of the form $M=[F]$ for some set $F\subseteq k\{y_1,\ldots,y_n\}$ of $\s$-monomials.
\begin{lemma} \label{lem: groebner}
For any $F\subseteq k\{y_1,\ldots,y_n\}$ there exists a monomial $\s$-ideal $M$ of $k\{y_1,\ldots,y_n\}$ with $\sdim(F)=\sdim(M)$.
\end{lemma}
\begin{proof}
For the proof we will use some notions (orderings and leading monomials) from the theory of difference Gr\"{o}bner bases (\cite{LaScala:GroebnerBasesAndGradingsForPartialDifferenceIdeals,GerdtLaScala:NoetherianQuotientsOfTheAlgebraOfPartialDifferencePolynomialsAndGroebnerBases}). We fix a total order $\leq$ on the set of all $\s$-monomials in $y_1,\ldots,y_n$. Indeed, let us be concrete and choose $\leq$ as the lexicographic order with $$y_1<y_2<\ldots<y_n<\s(y_1)<\s(y_2)<\ldots<\s(y_n)<\s^2(y_1)<\ldots.$$ Then $\leq$ satisfies the following properties:
\begin{enumerate}
\item $\leq$ is a well-order, i.e., every descending chain of $\s$-monomials is finite.
\item $1\leq f$ for every $\s$-monomial $f$.
\item If $f\leq g$, then $hf\leq hg$ for $\s$-monomials $f,g,h$.
\item If $f\leq g$, then $\s(f)\leq\s(g)$ for $\s$-monomials $f,g$.
\item If $\ord(f)<\ord(g)$, then $f<g$ for $\s$-monomials $f,g$.
\end{enumerate}
Recall that the order $\ord(f)$ of a $\s$-polynomial $f$ is the largest power of $\s$ that occurs in $f$.
Let us write a non-zero $\s$-polynomial $f\in k\{y_1,\ldots,y_n\}$ as $f=\sum_{j=1}^m c_jf_j$ for coefficients $c_j\in k\smallsetminus\{0\}$ and distinct $\s$-monomials $f_j$. The \emph{leading monomial} $\lm(f)$ of $f$ is the largest $f_j$. For $f=0$, we set $\lm(f)=0$.
For a $\s$-ideal $I$ of $k\{y_1,\ldots,y_n\}$, we set
$$\lm(I)=(\lm(f)|\ f\in I)\subseteq k\{y_1,\ldots,y_n\}.$$ Thanks to (iv) above, we see that $\lm(I)$ is a $\s$-ideal.
Define $I=[F]$ and $M=\lm(I)$. Then $M$ is a monomial $\s$-ideal and we claim that $\sdim(I)=\sdim(M)$.
With notation as in Remark \ref{rem: cut at i}, we have for $i\geq 0$, thanks to (v), that
$\lm(I[i])=\lm(I)[i]$,
where $\lm(I[i])$ is the ideal of leading monomials of $I[i]\subseteq k[y_1,\ldots,y_n,\ldots,\s^{i}(y_1),\ldots,\s^{i}(y_n)]$ with respect to the lexicographic order with $y_1<y_2<\ldots<\s^{i}(y_n)$.
The dimension of an ideal in a polynomial ring over a field agrees with the dimension of its ideal of leading monomials (\cite[Corollary 7.5.5]{GreuelPfister:SingularIntroductionToCommutativeAlgebra}). Thus
$$\dim(k\{y\}[i]/I[i])=\dim(k\{y\}[i]/\lm(I[i]))=\dim(k\{y\}[i]/\lm(I)[i])=\dim(k\{y\}[i]/M[i])$$ and $\sdim(I)=\sdim(M)$ as desired.
\end{proof}
It remains to determine the possible $\s$-dimensions of monomial $\s$-ideals. As we will see, this can be reduced to a purely combinatorial problem, which we now describe.
Define $\s\colon \N\times\{1,\ldots,n\}\to \N\times\{1,\ldots,n\}$ by $\s(i,j)=(i+1,j)$. For a finite subset $S$ of $\N\times\{1,\ldots,n\}$ we set $\ord(S)=\max\{i|\ \exists\ j : (i,j)\in S\}$. Let $\mathcal{S}$ be a set of non-empty finite subsets of $\N\times\{1,\ldots,n\}$. For $i\geq 0$ we define
$$\tau(\mathcal{S},i)=\min\{|T|\ |\ T\subseteq \N\times\{1,\ldots,n\},\ T\cap\s^\ell(S)\neq \emptyset, \ \forall \ S\in\mathcal{S},\ 0\leq\ell\leq i-\ord(S) \}.$$
In other words, if $[\mathcal{S}]=\{\s^\ell(S)|\ S\in\mathcal{S},\ \ell\in\N\}$ and $$[\mathcal{S}][i]=\{S\in [\mathcal{S}]|\ S\subseteq \{0,\ldots,i\}\times \{1,\ldots,n\}\},$$
then $$\tau(\mathcal{S},i)=\min\{|T|\ |\ T\subseteq \N\times\{1,\ldots,n\},\ T\cap S\neq \emptyset, \ \forall \ S\in [\mathcal{S}][i]\}.$$
It follows from the proof of the following lemma (and Theorem \ref{theo:sdimdef}) that $C(\mathcal{S})=\lim_{i\to\infty}\frac{\tau(\mathcal{S},i)}{i+1}$ exists.
Since $T=\{0,\ldots,i\}\times\{1,\ldots,n\}$ intersects every non-empty subset of $\{0,\ldots,i\}\times\{1,\ldots,n\}$, we have $\tau(\mathcal{S},i)\leq (i+1)n$ and therefore $0\leq C(\mathcal{S})\leq n$. We set $\sdim(\mathcal{S})=n-C(\mathcal{S})$.
For a finite subset $S$ of $\N\times\{1,\ldots,n\}$ we set $y^S=\prod_{(i,j)\in S}\s^i(y_j)$. Furthermore we define $M(\mathcal{S})=[\{y^S|\ S\in\mathcal{S}\} ]\subseteq k\{y_1,\ldots,y_n\}$.
The proof of the following lemma, generalizes some aspects of the proof of Theorem~\ref{theo: covering density and smonomial}.
\begin{lemma} \label{lem: sdim of smonomial ideal}
Let $\mathcal{S}$ be a set of non-empty finite subsets of $\N\times\{1,\ldots,n\}$. Then $\sdim(M(\mathcal{S}))=\sdim(\mathcal{S})$.
\end{lemma}
\begin{proof}
Using the notation of Remark \ref{rem: cut at i}, we have
$$M(\mathcal{S})[i]=\left(\s^\ell(y^S)|\ S\in\mathcal{S},\ 0\leq \ell\leq i-\ord(S)\right)\subseteq k\{y\}[i]$$
for every $i\geq 0$. Using the description of the dimension of monomial ideals in a polynomial ring as in the proof of Theorem \ref{theo: covering density and smonomial} (cf. \cite[Chapter 9, \S 1, Prop. 3]{CoxLittleOShea:IdealsVarietiesAndAlgorithms}), we see that
$\dim(k\{y\}[i]/M(\mathcal{S})[i])=n(i+1)-e_i$ where
\begin{align*}e_i & =\min\{|T|\ |\ T\subseteq \{0,\ldots,i\}\times\{1,\ldots,n\},\ T\cap\s^\ell(S)\neq \emptyset, \ \forall \ S\in\mathcal{S},\ 0\leq\ell\leq i-\ord(S) \} \\
& =\min\{|T|\ |\ T\subseteq \N\times\{1,\ldots,n\},\ T\cap\s^\ell(S)\neq \emptyset, \ \forall \ S\in\mathcal{S},\ 0\leq\ell\leq i-\ord(S)\}\\
& =\tau(\mathcal{S},i).
\end{align*}
Hence $$\sdim(M(\mathcal{S}))=\lim_{i\to\infty}\dim(k\{y\}[i]/M(\mathcal{S})[i])=n-\lim_{i\to\infty}\frac{\tau(\mathcal{S},i)}{i+1}=\sdim(\mathcal{S}).$$
\end{proof}
The following theorem gives a combinatorial description of all numbers that occur as the $\s$-dimension of a finitely $\s$-generated \ks-algebra (equivalently of a system of algebraic difference equations).
\begin{theo}
Let $d\geq 0$ be a real number. Then $d=\sdim(F)$ for some $F\subseteq k\{y_1,\ldots,y_n\}$ if and only if $d=\sdim(\mathcal{S})$ for some set $\mathcal{S}$ of non-empty finite subsets of $\N\times\{1,\ldots,n\}$.
\end{theo}
\begin{proof}
If $d=\sdim(\mathcal{S})$, then $d=\sdim(F)$ for $F=M(\mathcal{S})$ by Lemma \ref{lem: sdim of smonomial ideal}.
Conversely, assume that $d=\sdim(F)$ for some $F\subseteq k\{y_1,\ldots,y_n\}$. By Lemma~\ref{lem: groebner} we can assume without loss of generality that $F=M$ is a monomial $\s$-ideal.
Let $E\subseteq k\{y_1,\ldots,y_n\}$ be a set of $\s$-monomials such that $M=[E]\subseteq k\{y_1,\ldots,y_n\}$.
Let us refer to a $\s$-monomial as square-free if it is square-free as a monomial in the variables $\s^i(y_j)$. The square-free part of a $\s$-monomial is defined in a similar spirit, i.e., by replacing all non-zero exponents with $1$'s. Let $E'\subseteq k\{y_1,\ldots,y_n\}$ be the set of all square-free parts of all $\s$-monomials in $E$. Then $$[E]\subseteq[E']\subseteq\sqrt{[E]}.$$
It thus follows from Corollary \ref{cor: morphism and sdim} (ii) and Corollary \ref{cor: radical} that $\sdim([E])=\sdim([E'])$.
To specify a (non-constant) square-free $\s$-monomial is equivalent to specifying a (non-empty) finite subset $S$ of $\N\times\{1,\ldots,n\}$.
Thus $[E']=M(\mathcal{S})$ for some set $\mathcal{S}$ of finite non-empty subsets of $\N\times\{1,\ldots,n\}$. In summary, $$\sdim(F)=\sdim([E])=\sdim([E'])=\sdim(M(\mathcal{S}))=\sdim(\mathcal{S}),$$
by Lemma \ref{lem: sdim of smonomial ideal}.
\end{proof}
\bibliographystyle{alpha}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 8,215 |
\section{Introduction}
\bigskip
Systems where some of its constraints (first or second class) are not
independent are said to be reducible. The use of the Dirac
method \cite{Dirac} to quantize these systems requires the elimination
of dependent constraints which leads to a final set where just
independent ones are present. We mention that this is an opposit
procedure related to the quantization method due to Batalin, Fradkin
and Vilkovisky (BFV) \cite{BFV,H}. There, the elimination of
dependent constraints (supposing that they are first-class) cannot be
done. This would imply a lower number of ghost fields. In
consequence, it would be impossible to achieve any final covariant
result. The solution of this problem in the BFV method is the
introduction of extra ghosts, called {\it ghost-of-ghost}, one for
each relation among constraints. An interesting example involving
this subject is the quantization of superparticle and superstrings,
where the covariant quantization is just achieved after the
introduction of an infinite tower of ghost-of-ghosts \cite{GSW}.
\medskip
Recently, Faddeev and Jackiw \cite{FJ} have remind us of the
possibility of using the symplectic formalism \cite{W} as an
alternative quantization method to the Dirac one. They use it to
quantize the chiral-boson \cite{CB}, which is not a constrained
system in the symplectic point of view, eventhough it is in the Dirac
case \cite{Gi}. Incidentally we mention that one of the interesting
aspects of the symplectic method is that primary constraints of the
Dirac formalism are not constraints in the symplectic case. That is
why chiral bosons have no constraints in the symplectic formalism.
Another example is the fermionic Dirac theory \cite{Go}. On the other
hand, when the Dirac constraint theory has second-class constraints,
these may also be constraints in the symplectic procedure (we call
them {\it true constraints}). In this case, the symplectic
formalism can also be applied since the phase space is properly
modified in order to consistently define the symplectic tensor
\cite{Eu1,Outros,Eu2}.
\medskip
The purpose of the present paper is to consider the symplectic
formalism for reducible systems. The elimination of dependent
constraints, as is done in the Dirac case, is not possible to be
applied here because this would imply in a reduction of the number of
Lagrange multiplies, which are important in the absorbtion of
superfluos degrees of freedom (The symplectic tensor can only be
defined after the elimination of these superfluous fields). The
solution we propose for this problem is to parallel the BFV
formalism. We also introduce {\it Lagrange multipliers-of-Lagrange
multipliers} for each reducible relation. As an example, we quantize
the antisymmetric Abelian tensor gauge fields. The consistency of our
final results are verified in the comparation with the ones obtained
by using the Hamiltonian Dirac procedure~\cite{Dirac}.
\medskip
Our paper is organized as follows. In Sec. 2 we make a brief review
of the symplectic formalism including the case with (true)
constraints. At the end we address the way of dealing with the
reducible case. In Sec. 3 we apply the developed formalism to the
antisymetric Abelian gauge fields.
\section{Brief review of the simplectic formalism with
constraints}
Let us consider a dynamical system evolving in a phase space and
described by the canonical set of variables $(q_i,\,p_i)\hskip
.3cm(i=1,\dots,N)$. These satisfy the fundamental Poisson brackets
\footnote{We develop this section just using discrete
coordinates. The extension to the continuous case can be done in a
straightforward way.}
\begin{eqnarray}
\bigl\{q_i,\,q_j\bigr\}&=&0
=\bigl\{p_i,\,p_j\bigr\}\,,\nonumber\\
\bigl\{q_i,\,p_j\bigr\}&=&\delta_{ij}\,.\label{1}
\end{eqnarray}
\bigskip
\noindent Considering that the bracket of some quantity $A(q,p)$
with anything satisfies the relation
\begin{equation}
\bigl\{A(q,p),\cdots\bigr\}=\frac{\partial A}{\partial q_i}\,
\bigl\{q_i,\cdots\bigr\}+\frac{\partial A}{\partial p_i}\,
\bigl\{p_i,\cdots\bigr\}\,,
\end{equation}
\bigskip
\noindent and using the fundamental brackets (\ref{1}), one can write the
usual Poisson bracket relation involving two arbitrary quantities, say
$A(p,q)$ and $B(p,q)$, as
\begin{eqnarray}
\bigl\{A(q,p),\,B(p,q)\bigr\}&=&\frac{\partial A}{\partial q_i}\,
\bigl\{q_i,\,q_j\bigr\}\,\frac{\partial B}{\partial q_j}
+\frac{\partial A}{\partial q_i}\,\bigl\{q_i,\,p_j\bigr\}\,
\frac{\partial B}{\partial p_j}\nonumber\\
&+&\,\,\frac{\partial A}{\partial p_i}\,
\bigl\{p_i,\,q_j\bigr\}\,\frac{\partial B}{\partial q_j}
+\frac{\partial A}{\partial p_i}\,\bigl\{p_i,\,p_j\bigr\}\,
\frac{\partial B}{\partial p_j}\,,\nonumber\\
&=&\frac{\partial A}{\partial q_i}\,
\frac{\partial B}{\partial p_i}
-\frac{\partial A}{\partial p_i}\,
\frac{\partial B}{\partial q_i}\,.\label{1a}
\end{eqnarray}
\bigskip
In order to figure out the simplectic structure, we write
coordinates and momenta in just one set of $2N$ generalized
coordinates which we denote by
$y^\alpha\hskip.3cm(\alpha=1,\cdots,2N)$, in such a way that
\begin{eqnarray}
y^i&=&q_i\,,\nonumber\\
y^{N+i}&=&p_i\,.
\end{eqnarray}
\bigskip
\noindent Now, the fundamental Poisson brackets simply read
\begin{equation}
\label{2}
\bigl\{y^\alpha,\,y^\beta\bigr\}
=\epsilon^{\alpha\beta}\,,
\end{equation}
\bigskip
\noindent where the antisymmetric tensor $\epsilon^{\alpha\beta}$ is
given by the matrix
\begin{equation}
\Bigl(\epsilon^{\alpha\beta}\Bigr)
=\left(
\begin{array}{cc}
0&I\\-I&0
\end{array}
\right)\,,
\end{equation}
\bigskip
\noindent and $I$ is the $N\times N$ identity matrix. The Poisson
bracket involving two arbitrary quantities $A(y)$, $B(y)$ can also be
directly obtained in terms of the tensor $\epsilon^{\alpha\beta}$
\begin{eqnarray}
\bigl\{A(y),\,B(y)\bigr\}
&=&\partial_\alpha A\,\bigl\{y^\alpha,\,y^\beta\bigr\}\,
\partial_\beta B\,,\nonumber\\
&=&\epsilon^{\alpha\beta}\,\partial_\alpha A\,
\partial_\beta B\,,
\end{eqnarray}
\bigskip
\noindent where $\partial_\alpha=\partial/\partial y^\alpha$. The
quantity $\epsilon^{\alpha\beta}$ guarantees the usual antisymmetry
of the Poisson bracket relations (for the bosonic case).
\medskip
By the observation of (\ref{2}) one might infer that the general form
of the brackets in the case with constraints is
\begin{equation}
\label{3}
\bigl\{y^\alpha,\,y^\beta\bigr\}
=f^{\alpha\beta}(y)\,,
\end{equation}
\bigskip
\noindent where $f^{\alpha\beta}$ is an antisymmetric tensor and that
must be nonsingular (notice that this last property is also verified
by $\epsilon^{\alpha\beta}$). Its inverse is the simplectic tensor
related to the constrained system. We mention that the simplectic
tensor can be used as a metric (simplectic metric) that raises and
lowers indices in the simplectic manifold~\footnote{Sympletic
manifolds whose metric is $\epsilon^{\alpha\beta}$ are related to
systems without constraints. This is the case, for example, of the
self-dual fields \cite{FJ,CB}.}.
\medskip
Here, one can point out what are the general fundamentals of Dirac
and simplectic methods. The first one is developed by looking at the
left-hand side of expression (\ref{3}), that is to say, it tries to
generalize the Poisson brackets by including the constraints, until a
final form is reached where constraints can be taken as strong
relations \cite{Dirac}. In the case of the simplectic formalism,
constraints (which are usually in a small number than in the Dirac
method) are used to make deformation in the geometrical structures in
order that the simplectic tensor can be consistently defined.
\medskip
The FJ formalism deals with first-order Lagrangians. It is opportune
to mention that this is not a serious restriction because all systems
we know, described by quadratical Lagrangians, can always be set in
the first-order formulation. This is achieved by extending the
configuration space with the introduction of auxiliary fields. These
are usually the momenta, but this is not necessarily so
\cite{Eu1,Outros}. We mention that systems with higher
derivatives can be described in this same way~\cite{Eu2}.
\medskip
Let us consider a system described by a first-order Lagrangian like
\begin{equation}
L=a_\alpha(y)\,\dot y^\alpha-V(y)\,,
\end{equation}
\bigskip
\noindent where $y^\alpha$ is a set of $2N$ coordinates. $y^{i+N}$
can be the momenta or other auxiliary quantities introduced in order
to render the Lagrangian the first-order condition. From the
expression above, the Euler-Lagrange equation of motion reads
\begin{equation}
\label{4}
f_{\alpha\beta}\,\dot y^\beta
=\partial_\alpha V\,,
\end{equation}
\bigskip
\noindent where
\begin{equation}
f_{\alpha\beta}=\partial_\alpha a_\beta
-\partial_\beta a_\alpha\,.
\end{equation}
\bigskip
\noindent If $\det\,(f_{\alpha\beta})\not=0$, one can solve (\ref{4})
for the velocities $\dot y^\alpha$, i.e.
\begin{equation}
\dot y^\alpha=f^{\alpha\beta}\,\partial_\beta V\,,
\end{equation}
\bigskip
\noindent where $f^{\alpha\beta}$ is the inverse of
$f_{\alpha\beta}$. This is the simplectic tensor reported earlier and,
in fact, one can show that $f^{\alpha\beta}$ are the Dirac bracket
between the coordinates $y^\alpha$, $y^\beta$ \cite{Go}.
\medskip
An interesting and instructive point occurs when the quantity
$f_{\alpha\beta}$ is singular. In this case one cannot identify it as
the simplectic tensor and, consequently, the brackets structure of the
theory cannot be consistently defined either. This means that the
system, even in the FJ approach, has constraints (true constraints).
One way to solve this problem is to follow the standard Dirac
formalism. However, this can also be achieved by working in a
geometric manner. In this case, we use the constraints to
conveniently deform the singular tensor quantity in order to obtain
another tensor that may be nonsingular. If this occurs, this new
quantity can be identified as the simplectic tensor of the theory. Let
us briefly review the developments of the simplectic method when there
are true constraints involved \cite{Eu1}.
\medskip
Let us denote the above mentioned singular quantity by
$f^{(0)}_{\alpha\beta}$, and suppose that it has, say, $M$
$(M<2N)$ zero modes $v^{(0)}_m$, $m=1,\cdots,M$, i.e.
\begin{equation}
\label{5}
f^{(0)}_{\alpha\beta}\,v^{(0)\beta}_m=0\,.
\end{equation}
\bigskip
\noindent The combination of (\ref{4}) and (\ref{5}) gives
\begin{equation}
\label{6}
\tilde v_m^{(0)\alpha}\,\partial_\alpha V^{(0)}=0\,.
\end{equation}
\bigskip
\noindent This may be a constraint. Let us suppose that this actually
occurs (we shall discuss the opposite case soon). Usually,
constraints are introduced in the potential part of the Lagrangian by
means of Lagrange multipliers. Here, in order to get a deformation in
the tensor $f^{(0)}_{\alpha\beta}$ we introduce them into the kinetic
part instead. This is done by taking the time-derivative of the
constraint and making use of some Lagrange multiplier
\footnote{It is well-known that constraints satisfy the
consistency condition of not evolving in time, that is to say, if
$\Omega$ is a constraint we have that $\dot\Omega$ is also a constraint.
Another point is that one could, instead, take the time derivative of
the Lagrange multiplier.}.
\medskip
These Lagrange multipliers, which we denote by $\lambda^{(0)}_m$,
enlarge the configuration space of the theory. This permit us to
identify new vectors $a_\alpha^{(1)}$ and $a_m^{(1)}$ as
\begin{eqnarray}
a_\alpha^{(1)}&=&a_\alpha^{(0)}+\lambda_m^{(0)}\,
\partial_\alpha\Omega_m^{(0)}\,,\nonumber\\
a_m^{(1)}&=&0\,,
\end{eqnarray}
\noindent where $\Omega_m^{(0)}$ are the constraints obtained from
(\ref{6}). In consequence, one can now introduce the tensor quantities
\begin{eqnarray}
f_{\alpha\beta}^{(1)}&=&\partial_\alpha\,a_\beta^{(1)}
-\partial_\beta\,a_\alpha^{(1)}\,,\nonumber\\
f_{\alpha m}^{(1)}&=&\partial_\alpha\,a_m^{(1)}
-\partial_m\,a_\alpha^{(1)}=-\partial_m\,a_\alpha^{(1)}\,,\nonumber\\
f_{mn}^{(1)}&=&\partial_m\,a_n^{(1)}
-\partial_n\,a_m^{(1)}=0\,.
\end{eqnarray}
\noindent Here $\partial_m=\partial/\partial\lambda^m$. If $\det
f^{(1)}\not=0$, where $f^{(1)}$ is a matrix which also
involves the Lagrange multipliers, then we have succeeded in
eliminating the constraints. If not, one should repeat the procedure
above as many times as necessary.
\medskip
It may also occur that we arrive at a point where we still obtain a
singular matrix and the corresponding zero modes do not lead to any
new constraint. This is the case, for example, of gauge theories. At
this point, if we want to define the simplectic tensor, we have to
introduce some gauge condition. For details, see reference \cite{Eu1}
\medskip
In order to have a clearer idea of the problem to be circumvented in
the case of reducible systems, we emphasize the role played by the
Lagrange multipliers in the symplectic formalism. They absorb some
superfluous degrees of freedom of the theory. This and the
deformation of the symplectic structure make possible the definiton
of the symplectic tensor, which is the final goal of the formalism.
Its inverse makes the bridge to commutators of the quantum sector.
So, when constraints are not independent and we eliminate some of
them as in the Dirac procedure, we have also a lower number of
Lagrange multipliers. This implies that some superfluous degrees of
freedom cannot be eliminated and, consequently, we are not able to
identify the symplectic tensor.
\medskip
We solve this problem by paralleling the BFV procedure. We introduce
new Lagrange multipliers ({\it Lagrange multiplier-of-Lagrange
multiplier}) for each relation among the constraints and manipulate
these as in the previous case.
\section {An example involving reducible contraints}
Let us consider the case of abelian tensor gauge fields described by
the Lagrangian
\begin{equation}
\label{3.1}
{\cal L}=-\,\frac{1}{6}\,F_{\mu\nu\rho}\,F^{\mu\nu\rho}\,,
\end{equation}
\bigskip
\noindent where $F_{\mu\nu\rho}$ is a totally antisymmetric tensor
which can be written in terms of potential fields $A_{\mu\nu}$ (also
antisymmetric) by the relation
\begin{equation}
F_{\mu\nu\rho}=\partial_\mu A_{\nu\rho}
+\partial_\rho A_{\mu\nu}+\partial_\nu A_{\rho\mu}\,.
\end{equation}
\bigskip
\noindent This tensor is invariant (and consequently the Lagrangian
above) under the gauge transformations
\begin{equation}
A_{\mu\nu} \longrightarrow A_{\mu\nu}
+\partial_\mu\Lambda_\nu-\partial_\nu\Lambda_\mu\,.
\end{equation}
\bigskip
\noindent The reducible aspect of this theory can be envisaged from
the fact that if we choose the gauge parameter $\Lambda_\mu$ as the
derivative os some scalar quantity we will obtain that $A_{\mu\nu}$
do not change under the gauge transformation.
\medskip
This theory was already discussed from the Dirac \cite{Kaul} and the
BFV \cite{H} points of view. In order to use the symplectic method,
it is necessary to write the Lagrangian (\ref{3.1}) in the first
order notation. First we rewrite it as
\begin{eqnarray}
{\cal L}=-\,{1\over2}\,\dot A_{ij}\dot A^{ij}
-2\partial_i A_{j0}\dot A^{ij}
&-&\partial_iA_{0j}\partial^iA^{0j}
+\partial_iA_{0j}\partial^jA^{0i}\nonumber\\
&-&{1\over2}\,\partial_iA_{jk}\partial^iA^{jk}
+\partial_iA_{jk}\partial^jA^{ik}\,.
\label{3.4}
\end{eqnarray}
\bigskip
\noindent It is opportune to mention that the symplectic method is
essentialy a noncovariant one. A first order version of this
Lagrangian reads
\begin{equation}
\label{3.5}
{\cal L}^{(0)}=\pi_{ij}\dot A^{ij}
+{1\over2}\,\pi_{ij}\pi^{ij}
+2\partial_iA_{j0}\pi^{ij}
-{1\over2}\,\partial_iA_{jk}\partial^iA^{jk}
+\partial_iA_{jk}\partial^jA^{ik}\,,
\end{equation}
\bigskip
\noindent where $\pi^{ij}$ is the auxiliary field (here it is the
momentum conjugate to $A_{ij}$). Its equation is a constraint
relation whose equation of motion leads to the initial
Lagrangian~(\ref{3.4}).
\medskip
{}From expression (\ref{3.5}) one identifies the quantitities
\begin{eqnarray}
a^{(0)A}_{\phantom{(0)}{ij}}&=&\pi_{ij}\,,\nonumber\\
a^{(0)A}_{\phantom{(0)}0j}&=&0\,,\nonumber\\
a^{(0)\pi}_{\phantom{(0)}ij}&=&0\,,
\end{eqnarray}
\bigskip
\noindent and obtains the tensors
\begin{eqnarray}
f^{(0)A\pi}_{\phantom{(0)}ijkl}(\vec x,\vec y\,)&=&
\frac{\delta a^{(0)\pi}_{\phantom{(0)}kl}(\vec y\,)}
{\delta A_{ij}(\vec x\,)}
-\frac{\delta a^{(0)A}_{\phantom{(0)}ij}(\vec x\,)}
{\delta\pi_{kl}(\vec y\,)}\,,\nonumber\\
&=&-\,\frac{1}{2}\,\Bigl(\delta_{ik}\delta_{jl}
-\delta_{il}\delta_{jk}\Bigr)\,
\delta^{(3)}(\vec x-\vec y\,)\,.
\end{eqnarray}
\bigskip
\noindent The remaining terms are zero. We then construct the matrix
\begin{equation}
f^{(0)}=\left(
\begin{array}{ccc}
0&0&0\\
0&0&-{1\over2}\bigl(\delta_{ik}\delta_{jl}
-\delta_{il}\delta_{jk}\bigr)\\
0&{1\over2}\bigl(\delta_{ik}\delta_{jl}
-\delta_{il}\delta_{jk}\bigr)&0
\end{array}
\right)
\,\delta^{(3)}(\vec x-\vec y\,)\,.
\end{equation}
\bigskip
\noindent We easily see that it is singular. Let us consider that a
zero mode has the general form $\tilde v^{(0)}=(v_k,\,u_{kl},\,
\omega_{kl})$. We thus get the equations
\begin{eqnarray}
\bigl(\delta_{ik}\delta_{jl}
-\delta_{il}\delta_{jk}\bigr)\,\omega_{kl}
&=0\Rightarrow\omega_{kl}=0\,,\\
\bigl(\delta_{ik}\delta_{jl}
-\delta_{il}\delta_{jk}\bigr)\,u_{kl}
&=0\Rightarrow u_{kl}=0\,,
\end{eqnarray}
\bigskip
\noindent and the quantities $v_k$ remain indeterminated.
Consequently, from the equation
\begin{equation}
\int d^3\vec x\,v_k(\vec x\,)\,
\frac{\delta}{\delta A_{0k}(\vec x\,)}\,
\int d^3\vec y\,V^{(0)}=0\,,
\end{equation}
\bigskip
\noindent that is the corresponding in the continuous of the
expression (\ref{6}) with $V^{(0)}$ given by
\begin{equation}
V^{(0)}=-{1\over2}\,\pi_{ij}\pi^{ij}
-2\partial_iA_{j0}\pi^{ij}
+{1\over2}\,\partial_iA_{jk}\partial^iA{jk}
-\partial_iA_{jk}\partial^jA^{ik}\,,
\end{equation}
\bigskip
\noindent one has
\begin{equation}
\int d^3\vec x\,v_k(\vec x\,)\,\partial_i\pi^{ik}=0\,.
\end{equation}
\bigskip
\noindent Since $v_k$ is a generic function of $\vec x$, we obtain
the constraints
\begin{equation}
\label{3.13}
\partial_i\pi^{ij}=0\,,
\end{equation}
\bigskip
\noindent which plays the role of Gauss' laws in this extension of
the electromagnetic theory. In consequence of the property of
reducibility we have that the constraints above are not independent.
Notice that $\partial_i\partial_j\,\pi^{ij}=0$.
\medskip
Now, what we have to do is to introduce the constraints (\ref{3.13})
into the kinectic part of the Lagrangian by means of Lagrange
multipliers. Since these constraints are not
independent, we restric the Lagrange multipliers by means of some
convenient relation. In virtue of the similarity with the BFV case,
we restrict the Lagrange multipliers as
\begin{equation}
\label{3.14}
\partial^i\lambda_i=0
\end{equation}
\bigskip
\noindent and use another Lagrange multiplier ({\it Lagrange
multiplier-of-Lagrange multiplier}) to also introduce it into the
kinectic part of the Lagrangian. We then have
\begin{equation}
{\cal L}^{(1)}=\pi_{ij}\dot A^{ij}
-\dot\pi_{ij}\partial^i\lambda^j
-\dot\lambda^i\partial_i\eta-V^{(1)}\,,
\end{equation}
\bigskip\noindent
where
\begin{equation}
V^{(1)}=-{1\over2}\,\pi_{ij}\pi^{ij}
+{1\over2}\,\partial_iA_{jk}\partial^iA^{jk}
-\partial_iA_{jk}\partial^jA^{ik}\,,
\end{equation}
\bigskip\noindent
where the fields $A_{0j}$ were absorbed in $\dot\lambda_j$. Now, the
new coefficients are
\begin{eqnarray}
a^{(1)A}_{\phantom{(1)}ij}&=&\pi_{ij}\,,\nonumber\\
a^{(1)\pi}_{\phantom{(1)}ij}&=&\frac{1}{2}\,
\bigl(\partial_j\lambda_i-\partial_i\lambda_j\bigr)\,,\nonumber\\
a^{(1)\lambda}_{\phantom{(1)}i}&=&-\partial_i\eta\,,\nonumber\\
a^{(1)\eta}&=&0
\end{eqnarray}
\bigskip\noindent
and the corresponding matrix $f^{(1)}$ reads
\begin{equation}
f^{(1)}=\left(
\begin{array}{cccc}
0&\hskip-.5cm-\frac{1}{2}
\bigl(\delta_{ik}\delta_{jl}-\delta_{il}\delta_{jk}\bigr)
&\hskip-.5cm0&\hskip-.3cm0\\
{1\over2}\bigl(\delta_{ik}\delta_{jl}
-\delta_{ik}\delta_{jl}\bigr)&\hskip-.5cm0&\hskip-.5cm
{1\over2}\bigl(\delta_{jk}\partial_i
-\delta_{ik}\partial_j\bigr)&\hskip-.3cm0\\
0&\hskip-.5cm{1\over2}\bigl(\delta_{il}\partial_k
-\delta_{ik}\partial_l\bigr)
&\hskip-.5cm0&\hskip-.3cm\partial_i\\
0&\hskip-.5cm0&\hskip-.5cm\partial_k&\hskip-.3cm0
\end{array}
\right)
\,\delta^{(3)}(\vec x-\vec y\,)\,,
\end{equation}
\bigskip\noindent
where rows and columns follow the order $A$, $\pi$, $\lambda$,
$\eta$. This matrix is still singular. Let us consider a zero mode
like $\tilde v^{(1)}=(v_{kl},\,u_{kl},\,\omega_k,\,h)$. This will be
actually a zero mode if
\begin{eqnarray}
u_{ij}&=&0\,,\nonumber\\
v_{ij}&=&{1\over2}\bigl(\partial_j\omega_i
-\partial_i\omega_j\bigr)\,,\nonumber\\
\partial_ih&=&0\,.
\end{eqnarray}
\bigskip\noindent
Using the expression (\ref{6}) and the above conditions in order to
obtain possible new constraints, we get
\begin{eqnarray}
\int d^3\vec x\,\Bigl[v_{ij}(\vec x\,)\,
\frac{\delta}{\delta A_{ij}(\vec x\,)}
+\omega_i(\vec x\,)\frac{\delta}{\delta\lambda_i(\vec x\,)}
+\eta(\vec x\,)\frac{\delta}{\delta\eta(\vec x\,)}\Bigr]\,
\int d^3\vec y\,V^{(1)}&=&0\,,\nonumber\\
\Longrightarrow\hskip.5cm0&=&0\,.
\end{eqnarray}
\bigskip\noindent
As one sees, the zero modes do not lead to any new constraint. This
is a characteristic of gauge theories. So, in order to try to obtain
a nonsingular matrix, we fix the gauge. Let as then choose the
corresponding of the Coulomb gauge of the electromagnetic theory,
i.e.
\begin{equation}
\label{3.21}
\partial_iA^{ij}=0\,.
\end{equation}
\bigskip
Of course, since the Gauss' law constraints are not independent, the
gauge fixing conditions above cannot be independent either. We are
going to proceed as in the previous case, that is to say, we
introduce the constraints (\ref{3.21}) into the kinectic part of the
Lagrangian by means of Lagrange multipliers and restric these as in
(\ref{3.14}). The result is
\begin{equation}
{\cal L}^{(2)}=\bigl(\pi_{ij}-\partial_i\xi_j\bigr)\,\dot A^{ij}
-\dot\pi^{ij}\partial_i\lambda_j
-\dot\lambda^i\partial_i\eta
-\dot\xi^i\partial_i\rho-V^{(2)}\,,
\end{equation}
\bigskip\noindent
where
\begin{equation}
V^{(2)}=-{1\over2}\,\pi_{ij}\pi^{ij}
+{1\over2}\partial_iA_{jk}\,\partial^iA^{jk}\,.
\end{equation}
\bigskip\noindent
The term $\partial_iA_{jk}\partial^jA^{ik}$ of the previous Lagragian
was absorbed into the kinectic part of ${\cal L}^{(2)}$. Once more we
identify the new coefficients to calculate $f^{(2)}$. The final
result reads
\begin{eqnarray}
&&f^{(2)}=\nonumber\\
&&\nonumber\\
&&\left(
\begin{array}{cccccc}
0&\hskip-.5cm-{1\over2}\,
\bigl(\delta_{ik}\delta_{jl}-\delta_{il}\delta_{jk}\bigr)
&\hskip-.5cm0&\hskip-.5cm{1\over2}\,
\bigl(\delta_{jk}\partial_i-\delta_{ik}\partial_j\bigr)
&\hskip-.3cm0&\hskip-.3cm0\\
{1\over2}\,
\bigl(\delta_{ik}\delta_{jl}-\delta_{ik}\delta_{jl}\bigr)
&\hskip-.5cm0&\hskip-.5cm{1\over2}\,
\bigl(\delta_{jk}\partial_i-\delta_{ik}\partial_j\bigr)
&\hskip-.5cm0&\hskip-.3cm0&\hskip-.3cm0\\
0&\hskip-.5cm{1\over2}\,
\bigl(\delta_{il}\partial_k-\delta_{ik}\partial_l\bigr)
&00&\hskip-.5cm0&\hskip-.3cm\partial_i&\hskip-.3cm0\\
{1\over2}\,
\bigl(\delta_{il}\partial_k-\delta_{ik}\partial_l\bigr)
&\hskip-.5cm0&\hskip-.5cm0&\hskip-.5cm0
&\hskip-.3cm0&\hskip-.3cm\partial_i\\
0&\hskip-.5cm0&\hskip-.5cm\partial_k
&\hskip-.5cm0&\hskip-.3cm0&\hskip-.3cm0\\
0&\hskip-.5cm0&\hskip-.5cm0&\hskip-.5cm\partial_k
&\hskip-.3cm0&\hskip-.3cm0
\end{array}
\right)\nonumber\\
&&\nonumber\\
&&\hskip10cm\cdot\delta^{(3)}(\vec x-\vec y\,)
\end{eqnarray}
\bigskip\noindent
where rows and columns follow the order $A$, $\pi$, $\lambda$, $\xi$,
$\eta$, $\rho$. This matrix is not singular. It is the symplectic
tensor of the constrained theory. From its inverse we directly
identify the brackets
\begin{eqnarray}
\bigl\{A_{ij}(\vec x,t),\,\pi_{kl}(\vec y,t)\bigr\}
&=&\frac{1}{2}\Bigl[\Bigl(\delta_{ik}\delta_{jl}
-\delta_{il}\delta_{jk}\Bigr)
+\frac{1}{\nabla^2}\,\Bigl(\delta_{ik}\partial_j\partial_l
-\delta_{jk}\partial_i\partial_l\cr
&\phantom{=}&\phantom{{1\over2}\Bigl[\Bigl(\delta_{ik}\delta_{jl}}
-\delta_{il}\partial_j\partial_k
-\delta_{jl}\partial_i\partial_k\Bigr)\Bigr]\,
\delta^{(3)}(\vec x-\vec y\,)\,,\nonumber\\
\bigl\{A_{ij}(\vec x,t),\,\xi_k(\vec y,t)\bigr\}
&=&-\frac{1}{\nabla^2}\Bigl(\delta_{ik}\partial_j
-\delta_{jk}\partial_i\Bigr)\,
\delta^{(3)}(\vec x-\vec y\,)\,,\nonumber\\
\bigl\{\pi_{ij}(\vec x,t),\,\lambda_k(\vec y,t)\bigr\}
&=&\frac{1}{\nabla^2}\Bigl(\delta_{ik}\partial_j
-\delta_{jk}\partial_i\Bigr)\,
\delta^{(3)}(\vec x-\vec y\,)\,,\nonumber\\
\bigl\{\lambda_i(\vec x,t),\,\xi_j(\vec y,t)\bigr\}
&=&\frac{2}{\nabla^2}\Bigl(\delta_{ij}
+\frac{\partial_i\partial_j}{\nabla^2}\Bigr)\,
\delta^{(3)}(\vec x-\vec y\,)\,,\nonumber\\
\bigl\{\lambda_i(\vec x,t),\,\eta(\vec y,t)\bigr\}
&=&-\frac{\partial_i}{\nabla^2}\,
\delta^{(3)}(\vec x-\vec y\,)\,,\nonumber\\
\bigl\{\xi_i(\vec x,t),\,\rho(\vec y,t)\bigr\}
&=&-\frac{\partial_i}{\nabla^2}\,
\delta(\vec x-\vec y\,)\,.
\end{eqnarray}
\bigskip\noindent
The only really important bracket is the first one, that involves the
physical fields of the theory. It is a Dirac bracket in a sense that
it is strongly satisfied by the constraint relations. Since there is
no problem with ordering operators we can directly transform it to
commutator. Other brackets are not necessarily Dirac brackets. The
role of Lagrange multipliers are just to enlarge the configuration
space in order to make possible the definition of the symplectic
tensor, but they do not play any physical role in the theory.
\medskip
We mention that the first bracket above is the same one obtained in
\cite{Kaul} where the Dirac formalism was used.
\section{Conclusion}
We have considered the use of the symplectic formalism for reducible
systems. We have followed a similar procedure of hte BFV one where it
is necessary the introduction of {\it ghosts-of-ghosts}. Here we have
also introduced {\it Lagrange multipliers-of-Lagrange multipliers} in
order that the symplectic tensor could be defined. We have applied
the formalism to the antisymmetric tensor gauge field as an example.
\vskip 1cm
\noindent {\bf Acknowledgment:} We are in debt with R. Amorim and C.
Wotzasek for many useful comments. This work is supported in part by
Conselho Nacional de Desenvolvimento Cient\'{\i}fico e Tecnol\'ogico
- CNPq (Brazilian Research Agency).
\newpage
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 1,071 |
10-year-old from Pelham Bay stars in new prime-time TV series 'Single Parents
Monday, December 31, 2018 7:11 AM EST
PELHAM BAY -
A Bronx boy has gone from the Big White Way to the silver screen, and he's not even a teenager yet.
When Devin Trey Campbell isn't busy being a kid, he's playing one on prime-time TV.
The Bronx native stars as Rory on the new ABC show 'Single Parents.'
The ABC show is the latest chapter on a journey that started when Devin saw "The Lion King" at 3 years old.
He was inspired to get involved in community theater before breaking out on Broadway by age 7, landing a role in "Kinky Boots" that had him working six days a week.
"Did that for two years, then I was like, OK, I want to transition to TV and film," says Devin.
His family shuffled him to auditions for about a year before Devin scored the job on the series, forcing him to commute from Pelham Bay to Los Angeles, where it takes about a week to film a single episode.
His dad had helped him balance school, work and fun, and is proud of all the success his son has already seen.
"Pretty magical, it was pretty magical, because you talk about something but when it actually comes to pass, you're like oh my gosh it's surreal," says Devin's father, Alvin Campbell.
But for Devin, becoming Rory is natural.
"The kid was like, really fashionable, really fabulous, and I don't know how to describe it, but the kid is just me," says Devin. | {
"redpajama_set_name": "RedPajamaCommonCrawl"
} | 5,741 |
/*
IMPORTANT:
In order to preserve the uniform grid appearance, all cell styles need to have padding, margin and border sizes.
No built-in (selected, editable, highlight, flashing, invalid, loading, :focus) or user-specified CSS
classes should alter those!
.1slick-header-columns {
background: url('images/header-columns-bg.gif') repeat-x center bottom;
border-bottom: 1px solid silver;
}
*/
.slick-header-column {
background-color: rgb(237,237,237);
/*
background: url('images/header-columns-bg.gif') repeat-x center bottom;
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #ddd), color-stop(1, #fff));
background: -ms-linear-gradient(bottom, #eee, #fff);
background: -moz-linear-gradient(center bottom, #eee 0, #fff 100%);
background: -o-linear-gradient(#fff, #eee);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
*/
border-right: 1px solid silver;
}
.slick-header-column:hover, .slick-header-column-active {
/*
background: white url('images/header-columns-over-bg.gif') repeat-x center bottom;
*/
background: -webkit-gradient(linear, left bottom, left top, color-stop(0, #BDF), color-stop(1, #eee));
background: -ms-linear-gradient(bottom, #eee, #fff);
background: -moz-linear-gradient(center bottom, #eee 0, #fff 100%);
background: -o-linear-gradient(#fff, #eee);
filter: progid:DXImageTransform.Microsoft.gradient(startColorstr='#ffffff', endColorstr='#eeeeee', GradientType=0);
}
.slick-headerrow {
background: #fafafa;
}
.slick-headerrow-column {
background: #fafafa;
border-bottom: 0;
height: 100%;
}
.slick-row.ui-state-active {
background: #F5F7D7;
}
.slick-row {
position: absolute;
background: white;
border: 0px;
line-height: 20px;
}
.slick-row.selected {
z-index: 10;
background: #DFE8F6;
}
.slick-cell {
padding-left: 4px;
padding-right: 4px;
}
.slick-group {
border-bottom: 2px solid silver;
}
.slick-group-toggle {
width: 9px;
height: 9px;
margin-right: 5px;
}
.slick-group-toggle.expanded {
background: url(images/collapse.gif) no-repeat center center;
}
.slick-group-toggle.collapsed {
background: url(images/expand.gif) no-repeat center center;
}
.slick-group-totals {
color: gray;
background: white;
}
.slick-cell.selected {
background-color: beige;
}
.slick-cell.active {
border-color: gray;
border-style: solid;
}
.slick-sortable-placeholder {
background: silver !important;
}
.slick-row.odd {
background: #fafafa;
}
.slick-row.ui-state-active {
background: #F5F7D7;
}
.slick-row.loading {
opacity: 0.5;
filter: alpha(opacity = 50);
}
.slick-cell.invalid {
border-color: red;
-moz-animation-duration: 0.2s;
-webkit-animation-duration: 0.2s;
-moz-animation-name: slickgrid-invalid-hilite;
-webkit-animation-name: slickgrid-invalid-hilite;
}
@-moz-keyframes slickgrid-invalid-hilite {
from { box-shadow: 0 0 6px red; }
to { box-shadow: none; }
}
@-webkit-keyframes slickgrid-invalid-hilite {
from { box-shadow: 0 0 6px red; }
to { box-shadow: none; }
} | {
"redpajama_set_name": "RedPajamaGithub"
} | 4,110 |
"use strict";
const path = require('path');
const fs = require('fs-extra');
const arrayEquals = require('array-equal');
module.exports = function assertFileStructure(chai, util) {
console.log('setup fileStructure');
let A = chai.Assertion;
util.addChainableMethod(A.prototype, 'fileStructure', function fileStructure (structure) {
let base = util.flag(this, 'object');
checkDir(base, '/', structure);
});
function checkDir(dir, dirName, structure) {
let expectedFiles = structure._ || [];
let contents = fs.readdirSync(dir);
let actualFiles = contents.filter(f => {
let stat = fs.statSync(path.join(dir, f));
return stat.isFile();
});
let actualDirs = contents.filter(f => {
let stat = fs.statSync(path.join(dir, f));
return stat.isDirectory();
});
let files = new A(actualFiles);
files.assert(
arrayEquals(files._obj, expectedFiles),
`expected ${dirName} to have files #{exp}, but had #{act}`,
`expected ${dirName} to have not files #{exp}, but had #{act}`,
expectedFiles
);
let expectedDirs = Object.keys(structure).filter(k => k !== '_');
let dirs = new A(actualDirs);
dirs.assert(
arrayEquals(dirs._obj, expectedDirs),
`expected ${dirName} to have subdirs #{exp}, but had #{act}`,
`expected ${dirName} to have not subdirs #{exp}, but had #{act}`,
expectedFiles
);
for (let subdir of expectedDirs) {
checkDir(path.join(dir, subdir), path.join(dirName, subdir), structure[subdir]);
}
}
};
| {
"redpajama_set_name": "RedPajamaGithub"
} | 6,421 |
## DEDICATION
To all my readers
who are facing the Middles
in one form or another—
survival is all about
staying true.
## CONTENTS
1. Dedication
2. Contents
3. Chapter One
4. Chapter Two
5. Chapter Three
6. Chapter Four
7. Chapter Five
8. Chapter Six
9. Chapter Seven
10. Chapter Eight
11. Chapter Nine
12. Chapter Ten
13. Chapter Eleven
14. Chapter Twelve
15. Acknowledgments
16. About the Author
17. Credits
18. Copyright
19. About the Publisher
# Guide
1. Cover
2. Contents
3. Chapter 1
1. i
2. ii
3. iii
4. iv
5. v
6. vi
7. vii
8. viii
9.
10.
11.
12.
13.
14.
15.
16.
17.
18.
19.
20.
21.
22.
23.
24.
25.
26.
27.
28.
29.
30.
31.
32.
33.
34.
35.
36.
37.
38.
39.
40.
41.
42.
43.
44.
45.
46.
47.
48.
49.
50.
51.
52.
53.
54.
55.
56.
57.
58.
59.
60.
61.
62.
63.
64.
65.
66.
67.
68.
69.
70.
71.
72.
73.
74.
75.
76.
77.
78.
79.
80.
81.
82.
83.
84.
85.
86.
87.
88.
89.
90.
91.
92.
93.
94.
95.
96.
97.
98.
99.
100.
101.
102.
103.
104.
105.
106.
107.
108.
109.
110.
111.
112.
113.
114.
115.
116.
117.
118.
119.
120.
121.
122.
123.
124.
125.
126.
127.
128.
129.
130.
131.
132.
133.
134.
135.
136.
137.
138.
139.
140.
141.
142.
143.
144.
145.
146.
147.
148.
149.
150.
151.
152.
153.
154.
155.
156.
157.
158.
159.
160.
161.
162.
163.
164.
165.
166.
167.
168.
169.
170.
171.
172.
173.
174.
175.
176.
177.
178.
179.
180.
181.
182.
183.
184.
185.
186.
187.
188.
189.
190.
191.
192.
193.
194.
195.
196.
197.
198.
199.
200.
201.
202.
203.
204.
205.
206.
207.
208.
209.
210.
211.
212.
213.
214.
215.
216.
217.
218.
219.
220.
221.
222.
223.
224.
225.
226.
227.
228.
229.
230.
231.
232.
233.
234.
235.
236.
237.
238.
239.
240.
##
Now that I'm going into middle school, my whole life is about to begin.
That's what Mom told me yesterday. But I didn't know what she meant and I'm pretty sure she didn't either.
Sometimes parents say things because they sound good, even if they aren't true. Like whenever we talk about school, Mom always tells me the same thing over and over again—
—as if saying it will somehow make it more true.
Adults are not helpful at all.
They just don't get it. I guess for most of them, middle school was about a MILLION years ago.
Maybe they forgot all the bad stuff—and there is definitely a LOT of bad stuff.
If you ask me, the worst part about middle school is the fact that it is
Nothing good ever happens in the Middles. Consider:
No electricity, lots of wars, and that whole plague thing.
Good-bye, personal space.
Trust me. I know from experience—it's TERRIBLE.
The middle is the worst place you could possibly be, and since middle school is the middle of all Middles . . .
I've probably warned everyone I know about the Middles, but no one takes me seriously—not even my own family!
At the head of the family, there's
Everyone says we look exactly the same, but I don't see the resemblance at all.
is the youngest—fun, bubbly, and annoyingly adorable.
Clara smiles all the time and says cute things at exactly the right moment. Adults LOVE her, so she can pretty much get away with anything.
She is constantly using this to her advantage.
is the oldest. He's kind of a legend. THE Peter Wu—good at everything, and I mean EVERYTHING.
My archnemeses,
from next door.
treasurer of the homeowners' association and neighborhood snitch.
Even **LUCY,** the demon squirrel that terrorizes Canyon Vista Park.
It's like they are all part of the same club.
Between Clara and Peter, I'm always just that kid left in the middle. I guess that's why I'm keeping a record of my life.
Someday, after I've done lots of ultra-impressive and exceptional things, people will look back and think,
For now, I just have to figure out exactly what those ultra-impressive, exceptional things will be.
* * *
Oh, but first I have to survive middle school and my crazy dreams.
* * *
My dream was an obvious sign of things to come, but when I told everybody about it at dinner the other night, they acted like it was no big deal!
Well, except Clara, who was too busy making a mountain out of her rice to pay attention.
Peter thought I was being dramatic and Mom just blamed it on late-night snacking.
My family doesn't get me at all.
When we were younger and Peter wanted to be extra mean, he would tell me that I was actually an ALIEN, and one day, they would send me back to outer space.
The first time he said it, I cried hysterically for an hour.
Mom was so mad that she grounded him for a week! It was great.
For the most part, though, Peter never gets into trouble. He practically parents himself.
Clara is starting kindergarten, so there isn't much to worry about there. I guess you can only do so much to prepare a six-year-old for finger painting and naptime.
Mom is so used to not having to worry about them that she doesn't worry about me either! She just isn't a worrier. She always thinks things will work out for the best.
Worrying just doesn't seem to run in the Wu family. Maybe I really AM an alien.
I worry more than anyone I know and maybe more than anyone in the
Now that I'm going into the Middles, how can I not?
##
As if to rub in the fact that summer was basically over, I got a package from my new school.
The mailman had to deliver it personally because it didn't even fit in the mailbox.
When he handed it to me, I could've sworn he gave me a look that said:
(If only that was an option.)
It was the official Pointdexter Middle School Welcome Packet.
But it didn't make me feel welcome at all.
Inside, there were long lists of school supplies and never-ending instructions on how to prepare for class and a million rules and expectations and WAY too much information.
It was more reading than I'd done all summer!
Seeing that welcome packet sent Mom into crazy back-to-school mode. The smell of new erasers and sharpened pencils must have gotten to her. When we were out shopping, she started prancing down the aisles and gushing over backpacks. Backpacks, of all things!
We left the store with at least three years' worth of wide-ruled paper, every kind of notebook you could possibly imagine, and an assortment of embarrassing cartoon animal folders that I would never ever use in public.
It wasn't just my mom either. When I talked to my best friends, Maxine and Logan, they said their parents were acting really weird too.
Logan's mom made him pose and take pictures in front of the house in his first-day-of-school outfit. The first day of school wasn't even for another week!
Maxine's dad brought out his yearbooks from the seventies and made her look through embarrassing old pictures of him with bell-bottoms and big hair.
I didn't know how any of that was supposed to make us feel better about starting school.
At least we were in it together. With Maxine and Logan around, the Middles wouldn't be as bad.
The three of us have known each other for a long, long time—since kindergarten, which was basically forever ago.
It all started when Miss Wilson separated us from the class at lunch.
We were forced to sit at a special peanut allergy table for the whole year.
We've been best friends ever since.
Logan Sinclair is the smartest person I know and probably the smartest kid in our grade, but he doesn't care about stuff like that. He thinks class is boring, so he only pays attention when he feels like it. He usually does his homework, but he always forgets to turn it in.
I don't understand how his mind works most of the time, but I know for a fact that Logan Sinclair is a
He's the kind of genius that no one knows about until the day he wakes up, decides he wants to take over the world, and then _does it_.
I guess when that happens, being his best friend won't hurt.
Maxine Barry could probably take over the world one day too. She has this amazing superpower: when she wants something to happen, she makes it happen.
Maxine knows everything. According to her, choosing what to wear on the first day of school is the most important thing.
She knows stuff like this because her mom gets her subscriptions to _Seventeen_ and _Teen Vogue_. My mom just brings home old copies of _The Economist_.
No wonder I'm
Besides Logan and Maxine, the ONLY good thing about Pointdexter Middle School is that it's right around the corner from my favorite place in the whole world—
You can smell the freshly baked pastries from the school parking lot!
There is no one there named Antonia. I don't think Antonia even exists. The bakery is owned by this old Hungarian man named Istvan who reminds me of a walrus but is nice and doesn't smell like dead fish.
My friends and I go to Antonia's so much that Istvan considers us his "regulars." Plus, if we're there around closing time, he lets us take home as many leftover pastries as we can carry.
Istvan is the best. When I told him I was starting middle school soon, he made a face and just said,
He doesn't usually say much, but when he does, he always speaks the truth. Sometimes I think he is the only truly honest adult.
Like one time I wanted a double fudge chocolate chip cookie, but Istvan wrinkled his nose and shook his head a little, so I chose a buttered pretzel covered in homemade cinnamon sugar instead—it was amazing.
Not all adults are that honest. On the way home from back-to-school shopping, Mom made a surprise stop at Antonia's and offered to buy me a pastry.
But, turns out, the pastry was a TRAP!
She buttered me up with baked goods and then ambushed me with SCHOOL TALK!
Specifically, ELECTIVES.
In middle school, everyone has to choose an elective class. There are a zillion different classes to choose from, which sounds like a good thing but is actually just another trap.
THIS IS DEFINITELY A TRAP.
The worst part is that choosing your elective feels like a declaration, a way of saying to everyone—
That's fine for most people, but I don't HAVE a Thing. I didn't know I needed one until now!
Maxine has known her Thing for years. She's wanted to be an actress since third grade.
When the boy playing James in our class play got stage fright, Maxine swooped in to claim the lead. No surprise—she was a hit!
I, on the other hand, was cast as Mrs. Ladybug, a role I conveniently won by being the only kid in class with a red shirt and a pair of antennae. I wasn't very good. It was the end of my stage career, but for Maxine, it was the moment she found her Thing. Choosing drama as her elective was a no-brainer.
Even Logan has a Thing. He has always been good at games—so good that he doesn't bother just playing to win anymore. That's not interesting enough.
Instead, he's started figuring out the games themselves, picking them apart and understanding how it all comes together. Card games, board games, strategy games, you name it. Lately, it's been computer games. When he tries to explain them, he uses words that sound like they belong in some distant, high-tech future world. If I didn't know Logan was a genius, I might think he was a
The second he heard there was a coding elective class that taught you how to program your own computer game, he was sold. I won't be surprised if, by the end of the year, Logan has gained control of the whole internet and all of cyberspace.
School was starting in a few days and I was the only one without an elective!
Logan and Maxine came over to help me choose, but none of them seemed like a good idea.
We went around in circles for HOURS and couldn't agree on a single one! Luckily, Mom brought out a plate of mini pizza bagels fresh from the oven. Nothing helps you forget your worries like pizza sauce and melted cheese on toasted teeny-tiny bagels.
The truth is, choosing an elective kind of reminded me of the time Mom bought a piñata for my fifth birthday party. People say it's easy because you can cheat and see through the blindfold, but they must be lying because I couldn't see a thing!
Everyone just sat there, watching and waiting. Talk about pressure! I stood there swinging and swinging and swinging, but couldn't hit it! They all just laughed until finally one kid jumped up, grabbed the stick, and smashed the piñata open . . . just like that!
I didn't even get any candy because I was still blindfolded!
It was the worst feeling EVER, and facing the Middles without a Thing of my own seemed just as bad.
The night before school started, I couldn't sleep! In a few hours, I would officially be in MIDDLE SCHOOL and there'd be
My body was physically refusing to accept it!
Things got even worse when Peter came into my room to tell me I should go to sleep—as if I didn't know that already.
Peter has a way of always getting into my business. He likes to point out things I'm doing wrong or tell me what to do or make me feel crazy.
Sometimes it feels like we will never understand each other. We're just TOO different.
Peter lives in a world where everything always works out for the best.
That night, all I could think about were the potential disasters waiting for me in middle school.
I bet if Peter had this problem, he wouldn't be able to sleep either.
##
I woke up on the first day of school NEAR DEATH.
Any medical professional would have insisted I stay home, but not Mom.
She dragged me out of bed and told me that I had to be at the bus stop in fifteen minutes . . .
Mom is usually a very relaxed person, but when she gets mad, she morphs into some kind of terrifying
And that morning, she meant business.
I got ready superfast and caught the bus right before it left.
PHEW!
Stepping onto the bus was like entering a big, yellow moving box of chaos. Everyone was yelling and throwing things across the aisle and switching seats when the bus driver wasn't looking. No one bothered with seat belts!
If this was only the ride to middle school, what would actual middle school be like?
Kids on TV always talk about how school is a prison, but I can tell they don't really mean it because the schools on TV look way too fancy to be prisons.
_I_ mean it, though. Pointdexter Middle School really DOES look like a prison.
Building D is the tallest building (four stories!) and all the top windows have thick, metal bars on the outside.
The teachers claim it's for "safety reasons," but Lana Alvarez told me that the whole place used to be a prison in the fifties, but when they decided to change it into a school, all the teachers voted to keep the bars ON.
Lana Alvarez is a HUGE gossip queen and kind of a troublemaker.
She told me that story right as she was mixing up the colored caps on Ms. Bennet's whiteboard markers, so she isn't exactly 100 percent trustworthy.
I don't know if it is completely true, but I also don't know that it's completely UNtrue.
One thing I know for sure: middle school is a LOT bigger than elementary school.
The hallways are bigger! The buildings are bigger! Even the kids are bigger! I thought I was going to be crushed before I even made it to my first class.
The woman standing by the front gate looked too nice to be a teacher. Maybe she worked in the office. I considered asking her how to get to the auditorium, but Maxine told me one rule of surviving middle school was to make sure not to get too chummy with the adults. So I kept walking and figured I'd find it eventually.
When the bell rang, everyone in the auditorium scrambled for a place to sit. I accidentally hit a boy in the face on the way to my seat! It's true what they say about middle school being rough.
Once everyone was settled, a woman in a frumpy suit walked up to the podium and introduced herself. Mrs. Kline looked nice, but she also looked really tired, kind of like the "before" version of ladies on those makeover shows or like one of those grown-ups who always complains about needing coffee.
I felt a little bad for her, so I tried to pay attention, but everything she was saying was just so
No offense to Mrs. Kline, but I had bigger problems to solve . . .
My best friends were in the same homeroom class while I was probably trapped with a bunch of weirdos and jerks I didn't know.
Every one of my teachers was going to see my name during roll call and secretly hope I was a miniature Peter Wu.
The snotty kid sitting next to me had completely taken over my armrest and smelled like wet cabbage.
Then, all of a sudden, Mrs. Kline got this strange look on her face and said:
What did that even mean? Wasn't it hard enough just to BE in middle school?
By the time I walked into my homeroom class, one of my major middle school fears had already come true.
I had the WORST homeroom teacher in the whole school!
She looked like some kind of evil sorceress with her baggy black dresses and her creepy, bony hands. Some boys in class even started calling her
Rumor has it, she is actually a MILLION years old, and the only thing keeping her alive are the souls of all the students she hates, which she keeps in the amulet necklace around her neck. She NEVER takes it off.
I'm convinced she has a third eye in the back of her head. When she wasn't looking, Tyler Pritchett started to throw a paper airplane at Hayley Parks, but Skeletor gave him detention before he even let it go!
Talk about scary.
Homeroom was only fifteen minutes long, but it felt like an
I stared at my empty notebook the whole time because I was afraid if I looked up, I'd make eye contact with Skeletor and get cursed.
It was only my first day of school—I couldn't afford to get cursed.
The bell rang and I was almost out the door, when . . .
Skeletor appeared out of thin air and began to interrogate me.
Then she asked it, the question I had been dreading:
When I said no, Ms. Skelter's lip twitched like she KNEW. _I don't know why I decided to lie._
Maybe it was because I didn't want her to think I was just like him or maybe I was just sick of always being the Middle Wu.
WHO KNEW?
If watching movies should have taught me anything, it was that you did NOT lie to scary underworld creatures who were blocking your escape route.
Somehow I managed to slip past her before she could say anything. I was safe . . .
##
The good thing about starting the day with Ms. Skelter is that, by comparison, the other teachers don't seem so bad—at least not YET.
Teachers always pretended to be extra nice in the beginning of the year to catch you off guard.
One thing I know for sure:
Teachers here are completely unpredictable. Take Miss Myers, for example. Whenever she's in a bad mood, she makes the whole class stay late for absolutely NO reason. That is the worst because, for me, PE is right before lunch!
When I get hungry, two things usually happen:
1. I transform into an unstoppable angry beast.
2. I go crazy.
Sometimes if I stare at the clock for too long, I start thinking about all the lunch foods and wonder whether or not they are as excited about lunchtime as I am. Probably not.
This is probably a sign that I am losing my mind and if I don't get something to eat soon, I will go full-blown crazy starve, and die.
School lunch has always been a tricky business.
In elementary school, you had to eat the food your parents packed or settle for whatever they served in the cafeteria—the same old rubbery pizza squares or lumpy mashed potatoes or soggy sandwiches every single week.
Kindergarten was worse. They passed out packs of carrot sticks and celery and called them "snacks." That's when I realized that adults have a very warped definition of the word "snack."
In middle school, it was SUPPOSED to get better.
I was actually looking forward to lunch. I had been dreaming about middle school lunches for years, ever since I heard that Pointdexter's cafeteria had REAL food—cheese pizza, burgers and fries, chicken nuggets with BBQ sauce.
There were even rumors of a special snack window that sold all kinds of candies and chips and cookies!
Finally, we'd be able to eat whatever we wanted—cupcakes and curly fries and soda for lunch!
OR SO I THOUGHT.
Before I could even get in line, my mortal enemies appeared—the awful, terrible, practically evil Spencer sisters. "Practically evil" because when I said they were FULLY evil, Mom got mad and told me I was exaggerating.
Maybe she was right. But then again, Mom's not the one who had to pull Katie Spencer's chewed bubble gum out of her hair or wrestle her left shoe from Meghan Spencer's clutches.
I am pretty sure their sole mission in life is to make my life miserable—starting with lunch.
Apparently there is a special lunch line for
Now that the Spencer sisters are in eighth grade, they are determined to make sure we NEVER use it.
The whole thing seems really unfair, but I guess things just aren't fair in the Middles.
The line for everyone else is all the way on the opposite side of the cafeteria.
It's so long that it wraps around the entire quad. By the time we found the end and got in line, it was all the way past the trash cans!
I caught a whiff of uneaten tuna sandwiches, Funyuns, and pepperoni pizza soaked in a weird soda-juice mixture. GROSS.
We finally made it to the front of the line. I stepped up to the cafeteria window expecting this:
Instead, all they seemed to have was this:
There had to be a mistake!
When I tried to ask for something else, this mean, ogre-ish-looking cafeteria lady just stared at me from behind the counter. She growled like she wanted to rip off my head with her stubby claws and said,
Turns out, all the food we want is sold at the eighth-grade cafeteria window—the one we aren't allowed to use!
I couldn't believe it!
Nothing made sense in middle school!
##
As if the lunch situation wasn't bad enough, because I didn't choose an elective, they stuck me in the worst one—
Study hall isn't a REAL class.
It doesn't even have a real classroom!
To get there, you have to walk all the way past the science building and across the soccer field to this cluster of
The school tries to make it sound all official by calling it a "temporary annex wing of portable classrooms," but everyone knows what it REALLY is—an exiled wasteland of classes no one actually cares about.
And of course, study hall is the farthest away.
Study hall doesn't have a REAL teacher either. I heard the old one had a mental breakdown last year and got shipped off to a psych ward. And because I am the unluckiest person in the world and the Universe hates me, the school put Ms. Skelter in charge!
Some people think Skeletor hexed the old teacher so she could take over the class and use its students as guinea pigs in her twisted, evil experiments. I don't doubt it.
The other thing about study hall is that there is no purpose for it. The class description says it is:
An elective course designed to improve study skills, supplement academic instruction, and promote independent activity.
That is basically school talk for
And even then, the last two are pretty optional.
Maxine says that the key to surviving class is to find friends and allies, but I don't think I want to be allies with anyone in study hall—let alone friends!
The kind of people who purposefully choose study hall as an elective are:
. . . and now
Does that make me one of THEM?
It was only the beginning of the year, and I had already:
Lied to at least three teachers.
Been blacklisted by the cafeteria staff.
Swallowed an eraser (well, ALMOST swallowed) in a fit of blind hunger.
Somehow my life was already a
When it came down to it,
I blamed the Middles.
I blamed middle school.
I called an EMERGENCY BEST FRIEND MEETING for after school, then spent all of study hall brainstorming alternative non-school-related lifestyle options for us:
1. Run away and join the circus. Maybe this wasn't the best idea since we'd probably end up having to ride in that crowded clown car.
2. Become international pop stars. They didn't have to go to school, right?
3. Time travel to the future, where school is irrelevant and all knowledge can be downloaded into your head by swallowing a microchip.
I didn't get a chance to share my ideas with them because the minute Maxine, Logan, and I started talking about school, I found out . . .
How was that even possible?
Were we even going to the same school??
Were we even living in the same dimension???
It got worse when Maxine and Logan started talking about how GREAT their electives were and how much FUN they were having.
I couldn't take it!
It was all they wanted to talk about!
Ever since we started at Pointdexter, things had been a little _off_. The Middles had a way of making me feel like I was always being left behind.
Maxine finally had the chance to live out her acting dreams, and Logan found a constructive outlet for his weird genius mind powers. It wouldn't be long before things started taking off from there.
It felt like their lives were getting further and further away from mine.
But we were BEST FRIENDS. That wasn't supposed to happen!
##
Well, maybe not EVERYTHING was changing. At home, things were more or less the same.
Peter was still the star player of the high school soccer team.
Clara was still as cute and conniving as ever. Apparently now she was also a budding artist and she made sure to rub it in my face every time I wanted a snack.
Mom still seemed to think middle school was an "exciting new adventure," even though it was very obviously NOT.
My weekly routine hadn't changed much either.
**MONDAY:** Definitely still the hardest morning of the week.
**TUESDAY:** My regular after-school visit to Antonia's. Istvan DID add a new double fudge chocolate cake to the selection, but THAT was a change I could handle.
**WEDNESDAY:** _Wheel of Fortune_ marathon with the family—even though it was totally unfair that you could lose everything just because the spinner landed on
**THURSDAY:** Laundry day.
**FRIDAY:** Family dinner with Aunt Lisa. After dinner, she and Mom always watched _Law & Order_ and fell asleep within twenty minutes. I don't think they ever finished an episode . . . and she had been coming over for as long as I could remember! At this point, it was basically a Wu family tradition.
I used to think this kind of stuff made us boring, but ever since the Middles started turning my life upside down, I didn't mind so much. There were enough things changing in my life, thank you very much.
Plus, I like Aunt Lisa. She is an older, tanner version of Mom—only way kookier. Everyone thinks she's nuts.
Well, Mom calls her a "free spirit."
Aunt Lisa lives in a mobile home because she likes the idea of being able to pick up her life and go somewhere new—even though it has been parked in the same exact spot for _years_.
I am almost positive it isn't really "mobile" anymore.
Aunt Lisa is very into karma and cosmic energy and something called "hot yoga." She is always saying strange things. In the middle of dinner, she suddenly stopped eating and declared:
I don't know why she looked at ME.
Could it be because I didn't have a Thing? Could I really be the ONLY ONE left in the Universe without a Thing?
I always thought the Universe was supposed to send me some kind of sign. Like, all of a sudden, I would discover that I was a genius at something and that would be my sign from the Universe and THAT would be my Thing.
But so far . . . NOTHING.
I hoped that the Universe would get back on track by the end of dinner, but then Aunt Lisa cornered me in the kitchen and asked:
I didn't even know I HAD a core. How was I supposed to know if it was okay?
Usually when adults ask about your life, they want you to spill your guts and tell them everything so they can be "involved."
Aunt Lisa doesn't REALLY count, though. She isn't your "typical adult," the kind that always complains about taxes or insurance claims or real estate.
If I was going to talk to anyone about my problems, Aunt Lisa was my best bet.
Still, I wasn't always sure I trusted her advice. It usually had something to do with meditating.
The Wus are NOT made for meditation. Mom usually falls asleep halfway through, and I clearly can't do it right because both my legs always go numb.
Peter is the only one who looks like he's actually meditating, but then one day, I found out that he secretly listens to music the whole time. When I confronted him about it, he just shrugged and said:
Meditation might not be our thing, but it seems to work for Aunt Lisa. She says listening is a part of meditating, and she is a VERY good listener.
When I finished telling her everything, she closed her eyes and was quiet for a long time. I thought she might have fallen asleep.
Then, all of a sudden, she opened her eyes and said:
Stop thinking? That seemed impossible. Even so, I felt better after talking to her. It might have helped that she also treated me to ice cream later.
The funny thing is, I DID stop thinking about it after a while . . . but only because I had
Between the group projects, dioramas, book reports, work sheets, essays, write-ups, presentations, tests, quizzes, homework, and reading assignments, there just wasn't TIME to think about anything else! I got a huge headache just THINKING about thinking.
##
It didn't look like lunch was EVER going to get better. I knew there would be bullies in school, but I didn't expect them to be wearing hairnets and serving food.
The whole cafeteria system was completely corrupt and the lunch ladies were basically heartless.
They expected us to wait for food that wasn't even real food. Worst of all, the eighth-grade line was right there torturing us! We could see and smell everything we weren't allowed to have!
One time, we tried to pass as eighth graders, but the Spencer sisters were patrolling the line like hawks. They kicked us out before we could even get to the cafeteria window.
I thought lunch would be better in middle school; it was only better if you were in eighth grade, and that was a whole TWO YEARS away.
Once again, Mom's packed lunch was my only option. But when I opened my lunch box, it was worse than I could've ever imagined:
The whole thing was a disaster waiting to happen.
If I opened the Tupperware, the whole cafeteria would start to smell . . .
. . . and just like that, my middle school social life would be OVER.
I could NOT let that happen.
Of course, the Spencer sisters showed up at our table with huge slices of extra-cheesy pizza just to rub it in our faces. I tried to pretend like I wasn't jealous, but the drooling gave me away.
I hadn't eaten anything since breakfast, and that didn't really count. I was the last one to the table, so I got stuck with the cereal crumbs at the bottom of the box. Typical.
Halfway through study hall, it really started to hit me. I could feel my hunger building. It was grumbling and rumbling and growing until I just couldn't control it anymore!
Then the unspeakable happened. My stomach made the
The classroom went dead silent for a second. That's when I knew that EVERYONE had heard it.
I could feel them looking. I could hear them whispering. For the rest of the year, I'd be THAT girl—the girl who made weird noises in class. The GRUMBLER.
I couldn't live like that.
Good thing I always had an escape plan handy.
But then, in the middle of plotting my new identity and ironing out the details of my life on the run, I heard a rumble even louder than mine!
I turned around to see Mikey Mathers grabbing HIS stomach. I thought he would cry from the embarrassment, but instead, he looked right at me and smiled. Then he started laughing his head off!
I always suspected he was crazy. Now I knew for sure.
Maybe I was a little crazy too. Before I knew it, I was laughing WITH him.
Then everybody in class started laughing—TOGETHER.
We didn't stop until Ms. Skelter shushed us and threatened to give us all detention.
After that day, things just felt DIFFERENT.
Something about knowing we were all kind of, sort of in this thing together made it a little more bearable.
We talked a lot about how unfair it was that eighth graders got a special lunch line and how we were always SO hungry after lunch was over.
This was when I learned that everyone has something they just don't like in their lunch box.
One day, I was complaining about having cherry-grape fruit rolls for lunch AGAIN.
I always left them uneaten in my lunch box hoping that Mom would get the hint, but she never did. First off, cherry and grape are two of the worst fruit flavors.
They're bad enough on their own, but TOGETHER?
Secondly, there are four different flavors in a box of twenty-four—strawberry-melon, cherry-grape, lime-orange, and mixed berry.
Mom packs them randomly, but honestly, what are the odds of getting cherry-grape FOUR days in a row?
I bet Peter and Clara NEVER got cherry-grape.
That day in study hall, I found out that Mikey LOVED cherry-grape. He offered to trade me his whole bag of peanut butter-covered pretzels for them, but I was allergic and if I ate one, I'd probably blow up like a balloon and he'd get in trouble for poisoning me.
Amy Becks overheard us talking and she really wanted those pretzels . . . so much so that she was willing to give up a whole bag of cheese puffs! That seemed crazy to me because I thought cheese puffs were delicious, but Amy said she thought it was gross that they turned her fingers and tongue orange.
It got me thinking. A little organized switching and we could each get exactly what we wanted.
THAT was how it all began.
At first, it was just a couple of us swapping snacks in the back of the classroom. Our study hall trailer was pretty small, though, and before long, more people wanted in.
Then things started getting tricky.
Eventually, Ms. Skelter took notice and asked what we were doing. I blurted out,
One look at the spread of lunch leftovers on the table and her eyes narrowed. I thought for SURE we were caught.
Then, out of nowhere, Alexis Bunker popped up behind us and said matter-of-factly—
I almost fell out of my seat—I couldn't believe it!
I wasn't the only one either. Edgar Ortiz's jaw looked like it was about to detach from the rest of his face and Ellen Smith's eyes were just about ready to pop out of her head.
This was Alexis Bunker. If you looked up "teacher's pet" in a dictionary, she'd be right there at the very top.
She was one of those people who joined study hall because she legitimately wanted to study. I had never seen her talk in class without raising her hand, and I had DEFINITELY never seen her lie to a teacher. Maybe that's why they all trusted her.
Ms. Skelter totally bought it. I guess even Alexis Bunker knew that we were in this together now. Later on, she dropped a package of rice cakes on the table and asked if I could help her get something in exchange.
It was a tough sell, but eventually, I made a deal and traded the rice cakes for Fritos. Alexis was SO happy.
I have NEVER seen someone eat a whole bag of chips that quickly. I guess it makes sense, though. I mean, seriously, what kind of parent packs their kid rice cakes for lunch?
##
I didn't know it at the time, but that was only the beginning.
After school, I went to the playground with Logan and Maxine, only we weren't supposed to call it "the playground."
Once you're in middle school, you can't "play" anymore—you have to "hang out."
Anyway, that's when I told them everything!
They couldn't believe it—
Especially the part about swapping snacks right under Skeletor's nose!
Logan gave me a high five and Maxine said:
"Sounds like you're the one in charge of study hall now! You're like their leader!"
I hadn't thought about it that way.
Did I somehow become the leader of our small, unofficial cafeteria rebellion?
"Cool. You're kind of like . . . the Godfather of snacks."
"You're queen of the lunch swap!"
Maybe that was a bit much, but I didn't completely hate the way it sounded.
After all, I was NEVER the mastermind.
Logan was the smart one and Maxine had all the creativity, which usually just left me somewhere in the middle. I didn't mind most of the time, but once in a while, it was nice to be the one with the good idea.
We spent the rest of the day imagining all the things I could do if I was REALLY queen.
The thought of our enemies as court jesters and pig farmers and onion peelers made us laugh so hard I thought our stomachs would explode!
Pointdexter Middle School was not a monarchy, and even if it was, I definitely wasn't its queen . . . but at the same time, I knew what the people wanted.
When it came to lunch, we ALL wanted something different than what we had. That's when it hit me—
Things at school weren't going to change anytime soon. Eighth graders had the cafeteria ladies under their control, and that didn't leave the rest of us with many options.
What if we came up with something that no one at this school had ever thought of before?
It sounded a little crazy, but it was EXACTLY what we needed.
Who knew?
This could be a Thing.
Then it wouldn't matter that the Spencer sisters stopped us from using the eighth-grade-only line. It wouldn't matter that there was an eighth-grade-only line at all!
The cafeteria ladies might still be mean and our parents might still be clueless about snacks, but maybe if we worked together, everyone could get what they wanted.
Now that I had my team assembled, our first step was to figure out a plan, and for that, we needed . . .
Actually, we needed to THINK, but the two were sort of related.
We decided to meet at Antonia's Bake Shop after school every day that week. It became our official headquarters.
Istvan let us stay as long as we needed to—or at least until closing time.
Plus, he had this magical ability of knowing exactly what we wanted without even having to ask.
We did our best work at Antonia's.
To pull off something this big, we would need more help. Luckily, everyone was pretty sick of the cafeteria rules.
First order of business: Recruit Lana Alvarez, Pointdexter gossip queen, to spread the word.
By fourth period, not only did everyone know that something was going on, they all wanted to be a part of it!
Meanwhile, Logan put all the kids in his coding class to work on mapping out a digital tracking system of delivery and exchange sites.
I didn't fully understand what they were doing. Something about programming a virtual layout of the school into everyone's phone. It sounded complicated, but if anyone could get it to work it was Logan.
I could always count on him to figure out the confusing stuff.
Maxine was a "people person," so she got her friends on Student Council to sneak hidden messages into the flyers around school and used her texting expertise to create an elaborate communication system made up of only emojis.
Within a week or so, our little lunch exchange had spread beyond just study hall and made its way across the entire school campus.
Pointdexter Middle School was changing, and we weren't just a part of that change—we were the ones changing it.
After a while, the teachers and lunch ladies started to notice a major drop in the regular cafeteria line, but no one knew why.
Except US, of course.
Things were changing for me too. I didn't know if the Middles were getting easier or if I was just getting used to them, but I wasn't about to question it.
Everyone was talking about the lunch exchange.
They were right too. Everything WAS different.
Not too long ago, the only seats we could get were at the sad, defective lunch table on the far end of the quad.
The tabletop was faded and crusty from old bits of food. The bench was covered in a sticky, permanent layer of leftover juice or soda. We had to sit on sheets of notebook paper just so our pants wouldn't get stained!
Finding a table at lunch used to be impossible, but now we ALWAYS had one.
It was like we FINALLY made it.
Now people actually knew who we were—who _I_ was!
I was more than just Peter's sister or the unexceptional middle Wu. Without even fully realizing it, I had become the center of this whole lunch revolution.
It was my THING.
The bigger the lunch exchange got, the more it became something beyond just us. Someone started calling it
and the name just stuck. News of it had even reached the high school!
I tagged along with Peter to the movies one night, and while we were waiting for the movie to begin, his friends started talking about OUR lunch exchange. They even asked me if I knew about it!
I shrugged and pretended like I didn't know ANYTHING.
Even though I found my Thing, I still felt off about it. How could I be so UNSURE of something I was so SURE about? Maybe there was something wrong with me, something I wasn't doing right. When you found your Thing, nothing could go wrong . . .
That was how it worked.
So why did I still have this feeling that I was on the brink of disaster? Maxine and Logan kept saying there was nothing to worry about, but I couldn't help thinking that things were coming to an end.
##
Turns out, I was RIGHT. It had been a perfectly normal day until a huge, dark cloud started hovering over the classroom trailer.
When I walked into study hall, things were definitely off.
Everyone was huddled in the back of the room around Alexis Bunker, who was completely
When she saw me, she made this wailing noise and started mumbling hysterically—
I should have known what was coming next.
It was one of those moments where you're watching things happen, but you never fully realize it is happening to YOU until it's too late.
It was like I was in a movie theater watching my own personal middle school drama play out before me onscreen. . . .
FADE IN.
Suddenly there are heavy footsteps outside the classroom and a knock on the door.
Enter a snooty-faced office aide. She hands Ms. Skelter a bright-pink note.
They both glance up and look straight at ME . . .
[cue dramatic music]
"Take your bags" meant you weren't just visiting the office. "Take your bags" wasn't just a little bit of trouble. "Take your bags" was the nail in the coffin. "Take your bags" was the worst-case, end-of-the-line, doomsday scenario.
The journey across the school felt a million times longer than it normally did. I could feel a million eyes following my walk of shame all the way up to the front office.
They all knew what I knew—what I had known since before I even started middle school. I was a GONER.
##
The vice principal called me into her office and looked disapprovingly at me from behind her desk. I had never been in Mrs. Kline's office before. It smelled a lot like dust and burnt toast.
I had never _talked_ to Mrs. Kline either, and to be honest, I had never wanted to. She seemed like she meant business—especially now. After all, she started out by calling me:
Maxine has a theory that whenever an adult calls you by your last name, it means you are in serious trouble—that or they can't remember your first name.
This was probably the first time in my entire life that I actually WANTED someone to forget my name, but by the look on Mrs. Kline's face, I knew that wasn't it.
After a while, it started to hit me. Sweaty palms, shaky knees, the undeniable urge to bite my fingernails—all surefire signs that I was about to crack under pressure.
Mrs. Kline must've been a CIA interrogator in her past life.
I tried to channel Clara, who always had a knack for getting out of trouble. I clearly didn't share my little sister's acting talents. Despite my best attempts to look simultaneously innocent and clueless, it didn't seem to work.
Then a voice came in through the intercom:
MRS. BUNKER—just hearing the name gave me chills.
Alexis Bunker's mother was notoriously scary.
Mrs. Bunker was one of the parent chaperones on our first-grade class field trip to the zoo. She made her group hold hands the ENTIRE time and wouldn't give them their snack packs until they recited at least five CORRECT animal facts.
Even worse, she made Alexis wear a harness. I'm not even sure it was a _kid_ harness—it looked more like an old dog leash to me.
Mrs. Bunker HAD to be in control. If she somehow found out about our secret lunch exchange, there would be SERIOUS consequences.
Apparently the trouble started when she found cheese stains on Alexis's homework packet. The dietary regimen in the Bunker house is very strict and does NOT include cheese puffs.
And I thought MY mom was tough because she wouldn't let us have cereal with marshmallows for breakfast! If I was a Bunker, I would definitely starve.
I think Mrs. Bunker trained their family dog to sniff out artificial flavoring, which is probably how she found the empty bag of cheese puffs crumpled at the bottom of Alexis's backpack.
Alexis was caught red-handed . . . or whatever the cheese puff equivalent of that would be.
Her mom threatened to send her to boarding school in Switzerland if she didn't confess everything. Most parents just said that without meaning it, but Mrs. Bunker never made empty threats.
So Alexis told her mom and her mom told the school and that was it—our whole operation brought down by cheese puffs!
Maybe this was what people meant when they said junk food was bad for you.
When Mrs. Kline asked me to wait outside her office while she talked to Mrs. Bunker, I knew it was REALLY bad for me.
I hated getting in trouble, but I hated WAITING to get in trouble even more. Next to the Middles, waiting was the WORST.
You were stuck in between something that had already happened and something that was going to happen—right in the middle where NOTHING was happening.
Waiting for water to boil,
waiting for the dentist,
waiting for the bathroom.
I was pretty sure this was all part of their plan. Making me wait was just the beginning. Who knew what Vice Principal Kline and Mrs. Bunker had in store for me! I could just imagine it:
Not to mention what this meant for my
When something goes on your permanent record, it is with you for LIFE. Hence the word
Bold, all caps, TRIPLE underlined. Not only that, everyone would know. My CHILDREN would know. And my children's children. And my children's children's children! What would they think of me?
All I wanted was to eat a good lunch and figure out my Thing, and now my life was OVER—well, it would be as soon as Mrs. Kline opened the door.
Waiting outside her office felt like sinking in quicksand. I knew I was doomed—it was just a matter of waiting (and waiting and waiting . . .) for it to happen.
The longer I waited, the more time I had to think of all the ways this would RUIN my life.
I braced myself for the worst, but then the strangest thing happened. . . .
She brought me back into her office, sighed, and said—
I'm letting you go with a
There will be NO MORE organized food swaps or snack trades.
We have school lunch rules for a reason. You can't just decide to change the rules.
I nodded because it seemed like the thing I was supposed to do. Then she let me go.
I walked to my next class in a complete and total daze, thinking this must be what it felt like to narrowly escape death.
The next morning, Mrs. Kline gave a school-wide warning during homeroom announcements:
That's when it hit me. It was official—our lunch revolution was OVER.
Okay, so it could have been worse. I wasn't in (much) trouble and my life wasn't in shambles the way I thought it would be, but this was the end of our lunch exchange and that was pretty sad if you asked me.
For a while, it seemed like things were going well and I was starting to find my place in the Middles. People knew who I was—not for being Peter's sister or for being Maxine and Logan's other friend, but for something I started, something that was MINE.
I should have known it was too good to be true!
At first, everyone seemed just as upset as I was—UNTIL Lana Alvarez spotted a shiny new diamond ring on Miss Myers's finger.
Within a matter of hours, the entire school was buzzing.
When would the wedding be?
Was Miss Myers going to change her name??
Which of us would be invited???
Soon our disbanded lunch exchange was old news.
Even Maxine and Logan started moving on.
##
Our whole operation was ruined. Everything we had been working toward was irrelevant now. It didn't matter. No one even cared. Worst of all, I was still stuck in the Middles and would be for what seemed like FOREVER.
Just thinking about the miserable state of things made me sink into a major funk. It was worse than any other funk I had ever been in—including the time my favorite Saturday-morning cartoon show was canceled.
I wore all black every Saturday for WEEKS.
No, this funk was different. It might've even been contagious, because I noticed Peter started acting weird too.
I thought for a second that maybe my REAL brother had been abducted by aliens or replaced by a cyborg clone or switched with an evil twin. Anything was possible.
Then the weirdest thing happened.
He came to pick me up after school, which made no sense because Peter never EVER picked me up after school. He didn't explain why he was there—all he said was:
Then he yanked my backpack right off my back and started walking. At that point, he had taken my personal property hostage. Even if this person was an alternate, evil version of my brother, I had no choice but to follow him.
In retrospect, this was a good decision because we ended up in front of Antonia's Bake Shop!
Peter offered to buy me a cinnamon sticky bun with extra frosting. He knew I had a weakness for frosting. Was this ANOTHER trap?
I decided to accept the pastry, but I wasn't going to let him off that easy. I had to get some answers.
My mouth was still kind of full and crumbs went flying across the table. Peter didn't seem to mind, which was also weird because he usually tells me this makes me look like a caveman.
Instead, he said:
(He somehow sounded both LIKE Peter and NOT like Peter at the same time.)
I was stuck—I DID and DIDN'T. After all, Peter and I were nothing alike. He made it all the way through the Middles, and at the rate I was going, I would be lucky if I even made it to seventh grade.
But he was my brother and he brought me here and he bought me food, so I didn't have much to lose. I just needed to relate it to something we both understood—
Peter started laughing and said:
"That's not the point! All the sad reject pastry wants is to be with her friends and find her Thing! You just don't get it."
Maybe Peter understood me more than I thought. We ended up talking for a long time—so long that Peter got a text from Mom saying that if we didn't get home soon, she wasn't going to let us in for dinner.
Once we left the bakery, I noticed that Peter was carrying ANOTHER pastry. We'd eaten so many already—even I thought this was excessive!
But then—
Did he know what happened to the lunch exchange? Did he know it was my idea?
Before I got the chance to ask, some members of the high school varsity soccer team spotted us waiting at the bus stop and offered to give us a ride home.
Sometimes being Peter Wu's sister had its perks.
##
Back at school, the eighth graders continued to rule the cafeteria with an iron fist, and the lunch ladies continued to let them.
I made some formal complaints, but nothing changed.
It seemed like now that the lunch exchange had failed, everyone was willing to accept that things were just BAD and there was nothing we could do.
The only people who still cared about it were the kids in study hall.
Alexis felt bad about ratting me out to her mom, so she offered to share all her class notes with me for a YEAR.
Everyone else was waiting for the next move—for MY next move. What they didn't know was that the lunch exchange had been IT, my one big Thing.
They expected a
but I had NOTHING.
I had used up all my good ideas.
It was only a matter of time before they found out the truth, and I couldn't bring myself to face them, so for the first time, I spent the whole study hall period
Definitely a sign that things were off.
The entire Universe must have been out of whack because nothing was going the way it usually did.
For one thing, Aunt Lisa showed up unexpectedly that night. It wasn't the right day for our usual Friday night family dinner, but for some reason, there she was.
Of course, Aunt Lisa probably came over BECAUSE she sensed things were off.
The minute she saw me, she immediately asked what was wrong.
After a little prodding . . .
I cracked and told her everything.
Suddenly, she leaned in, and whispered. Then she winked.
What did that mean? What was the point of doing something if you knew it wasn't going to work out? Wasn't the Thing working out the whole point of doing the Thing?
She could probably tell by the look on my face that I wasn't buying it, but all she said was
in a totally vague and cryptic way before disappearing into the backyard.
Probably to commune with nature or something like that.
Maybe Aunt Lisa really is nuts.
In fact, I was starting to think that ALL adults were actually nuts—especially the ones running Pointdexter Middle School.
Even though most of the students had already dismissed the idea of reviving our lunch revolution or staging some kind of cafeteria uprising, the teachers at school just wouldn't let it go!
It's like they were paranoid the school was about to descend into chaos and anarchy!
One warning announcement wasn't enough for them. They had to remind us CONSTANTLY. The number of signs about cafeteria rules and regulations practically tripled overnight! Talk about wasting paper.
Ms. Skelter must have realized that the whole thing started under her watch, and she intended to punish us for it.
One day, instead of letting us work on homework like she usually did, she made us write an essay about the consequences of rule breaking. Then she went off on this long, ranting lecture—
As I stood there in front of everyone, I felt a strange tingling feeling—like a nervous and excited spark.
I had everyone's attention! What I was doing didn't just matter to ME, it mattered to THEM.
We had all been denied access to decent cafeteria food and conned out of our best snacks by eighth graders and unfairly brushed aside by tyrannical lunch ladies. Someone had to say something. . . .
I had to say something—not just for me, but for the kids around me in that creaky classroom trailer. For the kids sitting in all the other classrooms around school. For the next generation of kids. For the future!
That's when it crossed my mind . . .
Maybe THIS was my calling. Maybe THIS was my Thing! I was the voice of the people!
I don't know what made me get up from my seat and interrupt Ms. Skelter. I NEVER spoke in class and I definitely never spoke while a teacher was speaking!
Was I changing? Was this even me? I wasn't sure if I was becoming someone new or if I was just now figuring out that this had always been me.
Just thinking about it was confusing.
Before I started middle school, I had really just wanted to make it through without a fuss. I just wanted to survive.
But there I was, orchestrating lunch revolutions and getting called to the vice principal's office and being asked to stay after class.
I waited for Skeletor to unleash her wrath and seal my fate.
She called me Abbie! I thought that was weird because until this point, I wasn't positive she even knew my name.
Here it was—a hex or a curse or, at the very least, detention!
This was NOT the conversation I had expected. I imagined there would be icy glares and voodoo involved. Instead, Ms. Skelter seemed to be acting almost NICE.
She told me I was free to go, but just as I was leaving, she asked . . .
I can't remember my response because I basically blacked out at that moment. I didn't regain my composure or normal mental functions until about twenty minutes into my next class.
When I told Maxine and Logan what happened later, they thought it was the coolest thing EVER.
"So are you going to do it?" Logan asked. "Sixth-grade class president: Abbie Wu?"
It was the craziest idea I'd ever heard. I couldn't even really imagine it. Then again . . .
Who knew? I probably wasn't meant to be the spokesperson for my generation just yet, but maybe I would be—someday.
Or maybe I could be something else entirely.
When we put our heads together and thought about it, there were a lot of possibilities.
After a while, we ended up imagining a future with transportation pods, teacher holograms, and robot dogs.
That sounded way more fun anyway.
I don't know, though. Maybe Peter is right and it isn't about finding
Maybe it's more about just doing something that you care about and just doing THINGS—plural.
"Well? What do you think?" Maxine asked.
Despite what Aunt Lisa says, I know I will never be good at meditating. I am, however, trying to think LESS and let things figure themselves out MORE.
So I just shrugged.
That's the thing about the Middles. They're complicated and things inside them are always changing. So for now, it's enough just knowing I have a chance and thinking . . .
## ACKNOWLEDGMENTS
Finding the words to thank everyone who helped make this book a BOOK is impossibly hard. All my gratitude, appreciation, and FEELINGS cannot possibly be contained on just these pages. But I have to try, so here goes:
Margaret Anastas, there is no _Frazzled_ without you. You always understand what I want to say and help me find the best ways to say it. I am so lucky to have an editor who is as encouraging, kind, and hilarious as you . . . not to mention one who genuinely seems to think _I_ am hilarious too.
Cindy Hamilton, you are the best of the best, the definition of a gladiator. There is no way to possibly measure what you've done for me and Abbie Wu. You are our greatest champion and deserve all the good things _ever_.
Steve Malk. I don't know exactly where I'd be without you, but I definitely wouldn't be _here_. Thank you for rooting for me from the start and for helping me find my own voice. There is no one I'd rather have on my side than you. Thank you also to my Writers House people, especially Hannah Mann and the incomparable Michael Mejias. You told me to "use my words," and look, I did! Sort of—there are pictures too.
This book would not exist without the amazing efforts of everyone at HarperCollins Children's Books. I couldn't have asked for a better home for _Frazzled_. It really feels like I'm with family, and I don't think it can get much better than that.
To Suzanne, Susan, Kate, and Emily, thank you for seeing something in me and placing so much faith in a book of doodles and an unknown debut. To Barb, Amy, Whitney, and the designers who helped me figure out how to make a book, thank you for using your killer design skills to make me look good. To all my copyeditors, you are lovely people for working on this crazy project and watching my back so closely.
Thank you to Andrea, Kathy, Kerry, and the amazing sales team for carrying this book to a level of excitement that I could never have imagined. Thank you to every member of marketing who worked on this book, particularly Team Middle Grade and brilliant masterminds Kim and Matt. I knew things would be good if you geniuses were behind it. Thank you also to the Sweet Suite (past generations and honorary members included) for appreciating all the weird things I say and always supporting #frazzled. To Jonathan, Alison, and Alia, a million hugs for always listening.
Thanks to Aubry for setting this crazy thing into motion and Lindsey for bringing up doodling at dinner that one time. To the publicity team, for always making it fun no matter what. You constantly impress me with what you do, and I wish I could give you all private islands. Can't wait for our amazing bed-and-breakfast! And to Caroline, who is impossibly cool and infinitely wise, thank you for your guidance this past year. I would follow you off a cliff.
Thank you to my whole family, but especially to you, Mom, for raising me to pursue the things I love and actually trusting in the validity of that pursuit. And to Chucaloo, for keeping me sane throughout this whole process—or at least making me feel like it was all going to be okay even if I was a little crazy.
I wish I could name all the people who have encouraged and supported me up to this point. The list is very, _very_ long. I don't know how I managed to befriend such amazingly wonderful people, but trust me when I say that I appreciate you ALL. Especially Flawless, for giving me the kind of friendships I can always count on.
So much of who I was when I was a kid and who I am now is written into the pages of this book, so my last bit of thanks is to my readers, whoever and wherever you are. This thing is as much yours as it is mine. Thank you for taking the time to live a little in Abbie's head and for giving her a little space in yours.
## ABOUT THE AUTHOR
Photo by Kamoplat Trangratapit
**BOOKI VIVAT** has been doodling somewhat seriously since 2011 and not-so-seriously since childhood. She grew up in Southern California and graduated from the University of California, San Diego. She currently works in publishing and lives in Brooklyn, New York. This is her first novel. You can follow her on Instagram at @bookibookibooki and on Twitter at @thebookiv.
Discover great authors, exclusive offers, and more at hc.com.
## CREDITS
Cover art by Booki Vivat
## COPYRIGHT
FRAZZLED: Everyday Disasters and Impending Doom. Copyright © 2016 by Vissra Vivatnamongkon. All rights reserved under International and Pan-American Copyright Conventions. By payment of the required fees, you have been granted the nonexclusive, nontransferable right to access and read the text of this e-book on-screen. No part of this text may be reproduced, transmitted, downloaded, decompiled, reverse-engineered, or stored in or introduced into any information storage and retrieval system, in any form or by any means, whether electronic or mechanical, now known or hereafter invented, without the express written permission of HarperCollins e-books.
www.harpercollinschildrens.com
* * *
Library of Congress Control Number: 2016936039
ISBN 978-0-06-239879-6
EPub Edition © September 2016 ISBN 9780062398802
* * *
16 17 18 19 20 CG/RRDH 10 9 8 7 6 5 4 3 2 1
FIRST EDITION
## ABOUT THE PUBLISHER
Australia
HarperCollins Publishers Australia Pty. Ltd.
Level 13, 201 Elizabeth Street
Sydney, NSW 2000, Australia
www.harpercollins.com.au
Canada
HarperCollins Canada
2 Bloor Street East - 20th Floor
Toronto, ON M4W 1A8, Canada
www.harpercollins.ca
New Zealand
HarperCollins Publishers New Zealand
Unit D1, 63 Apollo Drive
Rosedale 0632
Auckland, New Zealand
www.harpercollins.co.nz
United Kingdom
HarperCollins Publishers Ltd.
1 London Bridge Street
London SE1 9GF, UK
www.harpercollins.co.uk
United States
HarperCollins Publishers Inc.
195 Broadway
New York, NY 10007
www.harpercollins.com
| {
"redpajama_set_name": "RedPajamaBook"
} | 6,562 |
Roman Adamczyk (4 April 1925 – 19 October 1988) was a Polish footballer who played as a midfielder. During World War Two Adamczyk was involved with the Polish resistance , for which he was awarded the Partisan Cross after the wars conclusion. After the war, Adamczyk moved to Gdańsk and started playing football with Płomień Nowy Port, spending a short time with the club before joining Gedania Gdańsk for 4 years. In 1949 Adamczyk is documented to have joined Lechia Gdańsk, playing for the club in the league in both 1949 and 1950. He made one appearance for the club in the I liga. His only appearance in the top flight of Polish football came on 10 April 1949 in a 3–0 defeat to Polonia Warsaw with his only other appearance, also being a defeat, coming against Pomeranian Toruń. After his stint with Lechia he spent two seasons with AZS Gdańsk before he stopped playing football. His brother, Zygmunt Adamczyk, also played with Adamczyk for Płomień Nowy Port, Gedania Gdańsk, and Lechia Gdańsk.
Awards
Partisan Cross
Order of Polonia Restituta
References
1925 births
1988 deaths
Gedania 1922 Gdańsk players
Lechia Gdańsk players
Polish footballers
Association football midfielders
People from Wieluń County
Sportspeople from Łódź Voivodeship | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 3,154 |
\section{Introduction}
\label{Introduction}
Blazars are active galactic nuclei characterized by ultra-luminous, broad-band, non-thermal radio to $\gamma$-ray continuum radiation, and by irregular, rapid flux variability across wavebands. They are divided into two classes, flat spectrum radio quasars (FSRQs) and BL Lac objects (BL Lacs). A primary method employed to probe our understanding of these objects is to study their spectral energy distributions (SEDs). Until recently, however, studies of blazar SEDs have been hindered by an insufficient number of simultaneous observations across the spectrum for a large enough sample of objects to allow a statistical analysis of their behavior in varying states of activity. A significant advance occurred with the launch of the \textit{Fermi Gamma-ray Space Telescope}. With its sensitivity and its ability to scan the entire sky every three hours, the \textit{Fermi} \gls{lat} \citep{2009ApJ...697.1071A} provides continuous coverage of blazars in the $\gamma$-ray regime. One year prior to the onset of the science mission of \textit{Fermi}, we began international, collaborative, multiwavelength monitoring of 33 blazars at radio to optical bands. These observations, combined with the $\gamma$-ray data from \textit{Fermi} and the X-ray, ultraviolet (UV), and optical data from the \textit{Swift} space observatory \citep{2004ApJ...611.1005G},
as well as measurements with several ground-based instruments, provide a rich dataset to study the behavior of these objects. We focus on measurements across the electromagnetic spectrum, made within 24 hours of each other, at multiple epochs
when the objects are in different $\gamma$-ray activity states.
Long-term monitoring of blazars reveals variability of emission best described by a ``red noise" power spectrum, where the amplitude of variations is greater on longer time-scales \citep[e.g.,][]{2009ApJ...691.1021D,2012ApJ...749..191C}. The light curves contain periods of relative quiescence interrupted by sometimes sudden, prominent outbursts with durations of weeks to several months in one or more energy bands, as well as more rapid lower-level fluctuations. These outbursts can vary dramatically in both time profile and amplitude. Critical to unraveling the physics of blazars is to study how the SED changes between such quiescent and active periods. Many studies have examined a small number of objects in an active state, sometimes contrasting activity at different flux levels \citep[e.g.,][]{2008A&A...491..755R, 2012A&A...545A..48R, 2012ApJ...754..114H, 2013ApJ...773..147J}. Fewer \citep[e.g.,][]{2007A&A...473..819R,2008A&A...491..755R,2008ApJ...679.1029T,Q0528} have studied objects in a quiescent or low $\gamma$-ray state. With the increased sensitivity of instruments and the time coverage of \textit{Fermi}, studies of larger samples are beginning to unveil trends in the behavior of blazars at different $\gamma$-ray activity states \citep[e.g., ][]{2009MNRAS.396L.105G, 2010ApJ...710.1271A}. A statistical analysis of SEDs from optical to $\gamma$-ray wavelengths based on simultaneous observations at different activity states for a sample of blazars should, therefore, be instructive.
A distinctive characteristic of a blazar's SED is its two-peaked shape, with one maximum at infrared (IR) to X-ray frequencies and the other at $\gamma$-ray frequencies. The shape of the SED, combined with polarization characteristics, provides considerable evidence that the emission produced from radio to optical wavelengths is dominated by synchrotron radiation.
If the accretion disk luminosity is important, it will be seen in the UV portion of the spectrum. Commonly seen in other classes of \glspl{agn}, the ``big blue bump" (BBB) is often less prominent, or even undetectable in blazars, owing to the strong, relativistically beamed non-thermal radiation. \citet{2003MNRAS.339.1081D} found that the non-thermal component of the optical/UV emission of FSRQs accounts for an average of $\sim$ 85\% of the total power. Only in about 9\% of the objects they studied did the thermal component dominate. Signatures of the BBB in FSRQs include a decrease of the degree of polarization with frequency \citep[e.g.,][]{Smith1986} and a redder color index at brighter flux states \citep[e.g.,][]{Bregman1986, 2012A&A...545A..48R}. A number of observations have indicated that the accretion disk is less prominent in BL Lacs \citep[e.g.,][]{2009MNRAS.396L.105G,2012MNRAS.420.2899G}. An alternative possibility for flatter-spectrum emission in the UV region of some blazars was suggested by \citet{Raiteri0235}. Studying the spectrum of 0235+164, these authors see the signature of a second synchrotron component.
The higher-energy SED is consistent with inverse Compton (IC) scattering off photons either from inside the jet (synchrotron self-Compton mechanism, SSC) or external to the jet (external Compton mechanism, EC) by relativistic electrons in the jet \citep[e.g.,][]{2010ApJ...710L.126M}. Other mechanisms, e.g., proton synchrotron emission
\citep{BOTTCHER13}, might play a role as well. In IC models, we expect the spectral slope of high-energy emission to be similar to the slope of the synchrotron radiation emitted by the electrons responsible for scattering seed photons up to high energies.
The locations of radiative dissipation zones within the jet and the physical processes involved are still under debate. Polarization and timing of flares relative to changes in images of parsec-scale jets of blazars indicate that near-infrared (NIR) to optical synchrotron flares often take place near the end of the jet's acceleration zone \citep{J07,2008Natur.452..966M}. Using Very Long Baseline Array (VLBA) images, \citet{sj2012} conclude that enhanced $\gamma$-ray emission is produced downstream of the broad emission line clouds, while others \citep[e.g.,][]{2010MNRAS.405L..94T} argue for a sub-parsec origin, based on short timescales of $\gamma$-ray variability. The outbursts, which occur across the electromagnetic spectrum, can be caused by shock formations in the jet or other processes that increase the particle density, magnetic field strength, or seed photon field, change the
magnetic field orientation, and/or enhance the Doppler boosting. The characteristics of the SED represented by spectral indices at different wavebands can provide insights into the interplay between different factors responsible for the outbursts, as well as between different emission components (e.g., the accretion disk and jet) and processes (synchrotron, inverse Compton, and thermal) during active and quiescent states. These insights will improve our understanding of the physics and location of energetic phenomena in blazars.
Here we statistically study how the spectral indices at $\gamma$-ray, X-ray, and optical frequencies change as the flux state varies, as well as whether the behavior depends on the type of blazar.
We present over four years of data (from early 2008 to late 2012) in 13 frequency bands from NIR to $\gamma$-rays. From this compilation, we select epochs of quasi-simultaneous data at both active and quiescent states, compute spectral indices, and examine the trends and correlations between them.
The sample of blazars and the data reduction are described in $\S$2. In $\S$3, we define \textit{quiescent} and \textit{active} states and describe the selection of epochs for our statistical analysis. We describe the computation of spectral indices in $\S$4 and present the trends and correlations of those indices and in the relationships between them in $\S$5. Using these statistical trends, we describe a ``typical'' quiescent and active BL Lac object and FSRQ in $\S$6 and discuss the implications of our results for physical models. We summarize our findings in $\S$7. An expanded version of this paper with a complete set of light curves and SEDs for all sources can be found at \url{www.bu.edu/blazars/VLBAproject.html}.
\section{Observations and Data Reduction}
\label{Observations}
\subsection{The Sample}
Since 2007, we have been collecting multi-waveband fluxes, polarization measurements, and radio images of blazars to provide the data for understanding the physics of the jets \citep[see, e.g.,][]{2012arXiv1201.5402M}. This study includes 28 of the original 30 objects selected for the monitoring campaign, confirmed as $\gamma$-ray sources by EGRET (Energetic $\gamma$-Ray Experiment Telescope) on the {\it Compton Gamma Ray Observatory}, have an \textit{R}-band brightness exceeding 18 mag (bright enough for optical polarization measurements at a 1 $-$ 2 meter class optical telescope without needing excessive amounts of telescope time), exceed 0.5 Jy at 43 GHz, and have a declination accessible to the collaboration's observatories ($> -30^\circ$). Three additional BL Lacs (1055+018, 1308+326, and 1749+096) and two FSRQs (3C345 and 3C446) included in this analysis were among those added when they were detected as $\gamma$-ray sources by the {\it Fermi} LAT \citep{LATsources2009ApJ...700..597A}.
Table \ref{tab:sources} presents general information about these 33 blazars. Column 1 is an object reference number that will be used in plots to identify each source, column 2 is the object name as used in this writing, column 3 is an alternate, commonly used name, column 4 is the object's name as listed in the 2FGL catalog \citep{ackermann2fgl}, column 5 gives the redshift as reported in the NASA/IPAC Extragalactic Database (NED)\footnote{\url{http://nedwww.ipac.caltech.edu}}, and columns 6 and 7 are the right ascension and declination of the object as retrieved by Simbad and reported in \url{http://heasarc.gsfc.nasa.gov}. From \citet{ackermann2fgl}, we include the object's optical classification and the SED classification in columns 8 and 9, respectively. Of the 33 blazars, 12 have optical classifications as BL Lacs and 21 as FSRQs. Of the 12 BL Lacs, 5 have an SED classification \citep{2010ApJ...716...30A} of low synchrotron peak frequency (LSP, $\lesssim 10^{14}$ Hz), 6 as intermediate synchrotron peak frequency (ISP, between $10^{14}$ and $10^{15}$ Hz), and 1 as high synchrotron peak frequency (HSP, $\gtrsim 10^{15}$ Hz) blazar. All of the FSRQs have an SED classification of LSP.
\begin{deluxetable}{llllrrrll}
\tabletypesize{\small}
\tablewidth{0pt}
\tablecaption{Sources Analyzed}
\tablecolumns{9}
\tablehead{
\multicolumn{1}{l}{Ref}&
\multicolumn{1}{c}{Object}&
\multicolumn{1}{c}{Alternate}&
\multicolumn{1}{c}{2FGL Catalog}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{}&
\multicolumn{1}{c}{Optical}&
\multicolumn{1}{c}{SED}
\cr
\multicolumn{1}{l}{Num}&
\multicolumn{1}{c}{Name}&
\multicolumn{1}{c}{Name}&
\multicolumn{1}{c}{Name\tablenotemark{a}}&
\multicolumn{1}{c}{\textit{z}\tablenotemark{b}}&
\multicolumn{1}{c}{R.A. 2000\tablenotemark{c}}&
\multicolumn{1}{c}{Dec. 2000\tablenotemark{c}}&
\multicolumn{1}{c}{Class\tablenotemark{a}}&
\multicolumn{1}{c}{Class\tablenotemark{a}}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{c}{(2)}&
\multicolumn{1}{c}{(3)}&
\multicolumn{1}{c}{(4)}&
\multicolumn{1}{c}{(5)}&
\multicolumn{1}{c}{(6)}&
\multicolumn{1}{c}{(7)}&
\multicolumn{1}{c}{(8)}&
\multicolumn{1}{c}{(9)}
}
\startdata
1 & 3C66A & 0219+428 & J0222.6+4302 & 0.444? & 02 22 39.61 & +43 02 07.8 & BL Lac & ISP \\
2 & 0235+164 & & J0238.7+1637 & 0.940 & 02 38 38.93 & +16 36 59.3 & BL Lac & LSP \\
3 & 0336-019 & CTA26 & J0339.4-0144 & 0.852 & 03 39 30.94 & -01 46 35.8 & FSRQ & LSP \\
4 & 0420-014 & OA129 & J0423.2-0120 & 0.916 & 04 23 15.80 & -01 20 33.1 & FSRQ & LSP \\
5 & 0528+134 & & J0530.8+1333 & 2.060 & 05 30 56.42 & +13 31 55.1 & FSRQ & LSP \\
6 & 0716+714 & & J0721.9+7120 & 0.300\tablenotemark{d} & 07 21 53.45 & +71 20 36.4 & BL Lac & ISP \\
7 & 0735+178 & & J0738.0+1742 & 0.424 & 07 38 07.39 & +17 42 19.0 & BL Lac & LSP \\
8 & 0827+243 & OJ248 & J0830.5+2407 & 0.940 & 08 30 52.09 & +24 10 59.8 & FSRQ & LSP \\
9 & 0829+046 & & J0831.9+0429 & 0.174 & 08 31 48.88 & +04 29 39.1 & BL Lac & LSP \\
10 & 0836+710 & & J0841.6+7052 & 2.172 & 08 41 24.37 & +70 53 42.2 & FSRQ & LSP \\
11 & OJ287 & 0851+202 & J0854.8+2005 & 0.306 & 08 54 48.87 & +20 06 30.6 & BL Lac & ISP \\
12 & 0954+658 & & J0958.6+6533 & 0.368 & 09 58 47.25 & +65 33 54.8 & BL Lac & ISP \\
13 & 1055+018 & 4C+01.28 & J1058.4+0133 & 0.890 & 10 58 29.61 & +01 33 58.8 & BL Lac & LSP \\
14 & Mkn421 & 1101+384 & J1104.4+3812 & 0.030 & 11 04 27.31 & +38 12 31.8 & BL Lac & HSP \\
15 & 1127-145 & & J1130.3-1448 & 1.184 & 11 30 07.05 & -14 49 27.4 & FSRQ & LSP \\
16 & 1156+295 & 4C+29.45 & J1159.5+2914 & 0.724 & 11 59 31.83 & +29 14 43.8 & FSRQ & LSP \\
17 & 1219+285 & WCom & J1221.4+2814 & 0.102 & 12 21 31.69 & +28 13 58.5 & BL Lac & ISP \\
18 & 1222+216 & 4C+21.35 & J1224.9+2122 & 0.432 & 12 24 54.45 & +21 22 46.5 & FSRQ & LSP \\
19 & 3C273 & 1226+023 & J1229.1+0202 & 0.158 & 12 29 06.70 & +02 03 08.7 & FSRQ & LSP \\
20 & 3C279 & 1253-055 & J1256.1-0547 & 0.536 & 12 56 11.17 & -05 47 21.5 & FSRQ & LSP \\
21 & 1308+326 & & J1310.6+3222 & 0.996 & 13 10 28.66 & +32 20 43.8 & FSRQ & LSP \\
22 & 1406-076 & & J1408.8-0751 & 1.494 & 14 08 56.48 & -07 52 26.7 & FSRQ & LSP \\
23 & 1510-089 & & J1512.8-0906 & 0.360 & 15 12 50.53 & -09 05 59.8 & FSRQ & LSP \\
24 & 1611+343 & DA406 & J1613.4+3409 & 1.397 & 16 13 41.06 & +34 12 47.9 & FSRQ & LSP \\
25 & 1622-297 & & J1626.1-2948 & 0.815 & 16 26 06.02 & -29 51 27.0 & FSRQ & LSP \\
26 & 1633+382 & 4C+38.41 & J1635.2+3810 & 1.814 & 16 35 15.49 & +38 08 04.5 & FSRQ & LSP \\
27 & 3C345 & 1641+399 & J1642.9+3949 & 0.593 & 16 42 58.81 & +39 48 37.0 & FSRQ & LSP \\
28 & 1730-130 & NRAO 530 & J1733.1-1307 & 0.902 & 17 33 02.71 & -13 04 49.5 & FSRQ & LSP \\
29 & 1749+096 & OT081 & J1751.5+0938 & 0.322 & 17 51 32.82 & +09 39 00.7 & BL Lac & LSP \\
30 & BL Lacertae & 2200+420 & J2202.8+4216 & 0.069 & 22 02 43.29 & +42 16 40.0 & BL Lac & ISP \\
31 & 3C446 & 2223-052 & J2225.6-0454 & 1.404 & 22 25 47.26 & -04 57 01.4 & FSRQ & LSP \\
32 & CTA102 & 2230+114 & J2232.4+1143 & 1.037 & 22 32 36.42 & +11 43 50.8 & FSRQ & LSP \\
33 & 3C454.3 & 2251+158 & J2253.9+1609 & 0.859 & 22 53 57.75 & +16 08 53.6 & FSRQ & LSP \\
\enddata
\tablenotetext{a}{\citet{ackermann2fgl}.}
\tablenotetext{b}{Information taken from the NASA/IPAC Extragalactic Database (\url{http://nedwww.ipac.caltech.edu/}).}
\tablenotetext{c}{Simbad resolver as reported in \url{http://heasarc.gsfc.nasa.gov}.}
\tablenotetext{d}{\citet{Danforth} set 0.2315 $<$ z $<$ 0.372 (99.7\%).}
\label{tab:sources}%
\end{deluxetable}
\subsection{Gamma-ray Data}
\label{sec:gammareduction}
The $\gamma$-ray data were obtained by the \gls{lat} on board the \textit{Fermi Gamma Ray Space Telescope}. To construct the $\gamma$-ray light curves, we reduced the \textit{Fermi} data using Pass 7 photon and spacecraft data, the V9r23p1 version of the Fermi Science Tools, and the instrument responses for the gal$\_$2yearp7v6$\_$v0 and iso$\_$p7v6clean.txt diffuse source models. All of these are available on the \textit{Fermi} website.\footnote{\url{http://fermi.gsfc.nasa.gov/ssc/}} We modeled the $\gamma$-ray emission between 0.1 and 200 GeV from a given target and other point sources within a 15-degree radius of the target. Comprehensive reduction of the data was first performed with spectral models corresponding to those listed in the 2FGL catalog, typically with a seven-day bin size. However, because the power-law photon index in the 2FGL catalog was computed from the flux collected by \textit{Fermi} over two years \citep{Nolan2FGL}, and because a typical blazar spends less than 5\% of its time in a $\gamma$-ray active state \citep{Abdovariability}, this index best represents the object in a quiescent state. To obtain a spectral index for each object while in an active state (to be defined in $\S$\ref{sec:quiactdefinition}), we re-reduced the data during active states, typically with a 1-3 day bin size, using a simple power law model while allowing the photon index to vary. To obtain a spectral index during long periods of quiescence (defined in $\S$\ref{sec:quiactdefinition}) when only upper limits were obtained with 7-day binning, we re-reduced the data using extended bin sizes.
\subsection{X-Ray Data}
\label{sec:X-Ray}
The X-ray data, including the photon index and its uncertainty, were obtained at a photon energy range of 0.3$-$10 keV by the \gls{xrt} \citep{2005SSRv..120..165B} on board the \textit{Swift} satellite. We reduced the data using the standard HEAsoft package (version 6.11). The standard \texttt{xrtpipeline} task was used to calibrate and clean the events.
We selected events with grades 0$-$12 in \gls{pc} mode and 0$-$2 in \gls{wt} mode. An ancillary response file was created with PSF correction using the \texttt{xrtmkarf} task, and the the data were rebinned with the \texttt{grppha} task to ensure a minimum of 10 photons in every newly defined channel. We fit the spectra with the spectral analysis tool \texttt{xspec}, using a power-law model with minimum $\chi^2$ value, and, except for 0235+164, fixing the hydrogen column density (N$_{H}$) according to the measurements of \cite{Dickey}. For 0235+164, a value of N$_{H}$ of 2.8\e{21} cm\superscript{-2} was used to include an intervening \textit{z} = 0.524 absorber \citep{Madejski, Ackermann0235}. A Monte-Carlo method was used to test the goodness of fit.
The photon counts of the sources were checked for pileup. The threshold for pileup is 0.5~counts~s\superscript{-1} and 100~counts~s\superscript{-1} for \gls{pc} mode and \gls{wt} mode, respectively.
Each event with pileup was individually re-examined to remove the center of the point-spread function (PSF), following the process outlined on the \textit{Swift} website.\footnote{\url{http://www.swift.ac.uk/analysis/xrt/pileup.php}.} We created a new annular source region, determining the inner radius by modeling the PSF as a King function. None of the WT mode events exceeded the threshold for pileup.
\subsection{Swift Optical and Ultraviolet Data}
\label{sec:uvot}
\gls{uvot} \citep{RomingUVOT} data were reduced by using the standard HEAsoft package (version 6.11) and the calibration files released in 2011 July. For each object, we defined a selection region centered on the source with a standard radius of $5''$, except for very faint objects (e.g., 0528+134, 0827+243), for which we chose a $3''$ radius and performed aperture correction according to \citet{Poole}. The background region was defined in a source-free region with a circular aperture of $20''$. Unaligned exposures were individually aligned. All extensions within an image were summed with \texttt{uvotimsum} and processed with \texttt{uvotsource} using a sigma value of five. Only epochs with a summed exposure time exceeding 40 seconds were retained.
\subsection{Ground-Based Optical and Near-Infrared Data}
\label{sec:Ground-Based Optical}
In addition to UVOT data, we used optical data from eight ground-based observatories.
Table \ref{table:obs} provides the symbol we use to identify each observatory in light curves and SEDs (column 1), the identifying color of the observatory in light curves (column 2), the location of the observatory (column 3), the diameter of the telescope (column 4), and the wavebands of the data used in this study (column 5). References to the data reduction procedures are listed in the footnotes of the table.
\begin{deluxetable}{cllll}
\rotate
\tablewidth{0pt}
\tabletypesize{\scriptsize }
\tablecolumns{5}
\tablecaption{List of Observatories Providing Measurements for this Study}
\tablehead{
\multicolumn{2}{l}{\hspace{40pt}Symbol}&
\colhead{}&
\colhead{Telescope}&
\colhead{}
\cr
\colhead{Shape}&
\colhead{Color (Light curves)}&
\colhead{Observatory (Telescope or Monitoring Program) and Location}&
\colhead{Diameter}&
\colhead{Wavebands}
}
\startdata
Space-based&&&\\
$\Diamond$ &black &\textit{Fermi} Gamma Ray Space Telescope (LAT) && Gamma-ray (0.1 GeV $-$ 300 GeV) \\
\scalebox{.8}{$\triangle$} &black&\textit{Swift} Space Satellite (XRT) & & X-ray (0.3 $-$ 10 keV) \\
\scalebox{.8}{$\triangle$}, $\Leftcircle$, \underline{$\,\sqcap\,$} &black, green, orange&\textit{Swift} Space Satellite (UVOT) && \textit{UVW1, UVM2, UVW2} \\
\scalebox{.8}{$\triangle$} &black&\textit{Swift} Space Satellite (UVOT) & & \textit{U, B, V} \\
Ground-based&&&\\
$\times$ &indigo &Lowell Observatory (Perkins Telescope), Flagstaff, Arizona\tablenotemark{a} &1.83 m & \textit{B, V, R, I} \\
$\triangleleft$ &light blue&Crimean Astrophysical Observatory (AZT-8), Nauchnij, Ukraine\tablenotemark{b} &0.70 m & \textit{B, V, R, I} \\
$\triangledown$ &green &Observatorio del Roque de los Muchachos &2.00 m & \textit{R} \\
& & \hspace{25 pt}(Liverpool Telescope), La Palma, Spain\tablenotemark{a} & & \\
$\Rightcircle$ &dark orange &Calar Alto Observatory (MAPCAT), Andaluc\'{\i}a, Spain\tablenotemark{c} &2.20 m & \textit{R} \\
\scalebox{.8}{$\square$} &blue &Cerro Tololo Inter-American Observatory (SMARTS), &0.90 $-$ 1.50 m & \textit{B, V, R, J, K} \\
& & \hspace{25 pt}Cerro Tololo, Chile\tablenotemark{d} & & \\
$\triangleright$ &red &St. Petersburg University (LX-200), St. Petersburg, Russia\tablenotemark{b} &0.40 m & \textit{B, V, R, I} \\
\scalebox{.75}{$\bigcirc$} &yellow &Steward Observatory (Kuiper and Bok Telescopes), &1.54, 2.30 m & \textit{V} \\
& & \hspace{25 pt}Mt. Bigelow and Kitt Peak, Arizona\tablenotemark{e} & & \\
\rotatebox{90}{$\bowtie$} &red &Istituto Nazionale di Astrofisica (AZT-24),&1.10 m & \textit{J, H, K} \\
& & \hspace{25 pt}Campo Imperatore, Italy\tablenotemark{f} & & \\
\enddata
\tablenotetext{a}{Data reduction is performed with the ESO software package MIDAS; refer to \citet{2010ApJ...715..362J}.}
\tablenotetext{b}{Data reduction details provided in \citet{2008A&A...492..389L}.}
\tablenotetext{c}{Monitoring AGN with Polarimetry at the Calar Alto Telescopes (MAPCAT); data reduction details provided in \citet{mapcat}.}
\tablenotetext{d}{The Small and Moderate Aperture Research Telescope System (SMARTS) daily monitoring program; refer to \url{http://www.astro.yale.edu/smarts/}.}
\tablenotetext{e}{Data reduction details provided in \citet{Smith2009}.}
\tablenotetext{f}{AZT-24 observations are made within an agreement between Pulkovo Astronomical Observatory, Rome Astronomical Observatory, and Collurania-Teramo Observatory. Data reduction details provided in \citet{2008ApJ...672...40H}.}
\label{table:obs}
\end{deluxetable}
\subsection{Dereddening and Flux Conversion}
\label{dereddening}
For the UV observations, we dereddened the fluxes using the \citet{Fitzpatrick99} interstellar extinction curve with an $R_{v}$ of 3.1 and $A_{\lambda}$ values \citep{Schlafly} as retrieved from NED in 2012 November. Optical and NIR magnitudes were dereddened using the \citet{Schlafly} values. Dereddening of 0235+164 is complicated by intervening sources of dust and optical emission. We followed the procedure of \citet{Raiteri2008} to remove the additional flux from a foreground galaxy and applied the extinction values from \citet{Raiteri0235} and \citet{Ackermann0235}.
We converted the dereddened magnitudes to fluxes using the zero points and Pickles star spectra conversion factors from \citet{Poole} for \textit{Swift} observations and \citet{Mead} for ground-based observations.
For most objects in our sample, the host galaxy contribution is negligible in the UV. However, host galaxy contamination was subtracted for two nearby objects, BL Lacertae and Mkn 421. The host contribution in the UV is expected to be negligible for these two sources. We used the \textit{R}-Band host galaxy flux values derived by \citet{Nilsson2007} and average effective colors for elliptical galaxies determined by \citet{2001MNRAS.326..745M}. Converting these values as above, we obtained the dereddened host galaxy flux values, reported in Table \ref{table:hostgalaxy}. We subtracted these constant values from the dereddened measured flux.
\begin{deluxetable}{rccrrrrrrr}
\tablewidth{0pt}
\tabletypesize{\small}
\tablecolumns{10}
\tablecaption{Host Galaxy Contaminating Flux}
\tablehead{
\multicolumn{1}{l}{Object and} &
\multicolumn{1}{l}{Uncorrected}&
\multicolumn{8}{c}{Dereddened Host Galaxy Flux}
\cr
\multicolumn{1}{r}{\hspace{10pt}Measurement}&
\multicolumn{1}{l}{\textit{R}-Band Flux\tablenotemark{a}}&
\multicolumn{8}{c}{[mJy]}
\cr
\multicolumn{1}{r}{Source}&
\multicolumn{1}{l}{(uncertainty)}&
\multicolumn{1}{c}{\textit{U}}&
\multicolumn{1}{c}{\textit{B}}&
\multicolumn{1}{c}{\textit{V}}&
\multicolumn{1}{c}{\textit{R}}&
\multicolumn{1}{c}{\textit{I}}&
\multicolumn{1}{c}{\textit{J}}&
\multicolumn{1}{c}{\textit{H}}&
\multicolumn{1}{c}{\textit{K}}
\cr
\multicolumn{1}{c}{(1)}&
\multicolumn{1}{c}{(2)}&
\multicolumn{1}{c}{(3)}&
\multicolumn{1}{c}{(4)}&
\multicolumn{1}{c}{(5)}&
\multicolumn{1}{c}{(6)}&
\multicolumn{1}{c}{(7)}&
\multicolumn{1}{c}{(8)}&
\multicolumn{1}{c}{(9)}&
\multicolumn{1}{c}{(10)}
}
\startdata
\multicolumn{10}{l}{BL Lacertae}\\
Ground-based & 1.35 (0.03) & 0.23 & 0.84 & 1.79 & 2.61 & 3.85 & 7.38 & 9.08 & 6.84 \\
Swift & 1.13 (0.03) & 0.19 & 0.70 & 1.50 & & & & & \\
\cr
\multicolumn{10}{l}{Mkn 421}\\
Ground-based & 7.8 (0.4) & 0.7 & 2.6 & 5.5 & 8.0 & 11.9 & & & \\
Swift & 6.2 (0.4) & 0.6 & 2.1 & 4.4 & & & & & \\
\enddata
\tablenotetext{a}{\citet{Nilsson2007}.}
\tablecomments{Ground-based values are for a typical aperture radius of 7 arcsec, and for Swift, the typical 5 arcsec radius.}
\label{table:hostgalaxy}
\end{deluxetable}
\subsection{Calibration of Near-Infrared through Ultraviolet Spectra}
\label{sec:calibrate}
To determine if any observatory has magnitudes for a band that are consistently higher or lower than other observatories, we examined all measurements for all objects, selecting sets of measurements when a minimum of two observatories observed an object in the same band within the same day. We restricted the observations to days when the source was not active in any NIR through \textit{U} bands. If an observatory had multiple observations within a given day, we computed a weighted mean for each such day and band. We then analyzed the differences between the fluxes from different observatories for a given band based on different epochs and sources.
Overall, no systematic discrepancies appear to be present in any band for any observatory, with the exception of the SMARTS \textit{K} band; hence, these data are used with caution. All light curves were checked for outliers, which were deleted in the final analysis.
\section{Quiescent and Active Epochs}
\subsection{Properties of Quiescent and Active States}
\label{sec:quiactdefinition}
Our monitoring program has resulted in a sufficient number of quasi-simultaneous measurements of each object at different frequencies to compute and compare the spectral indices when objects were in an active versus a quiescent state. Barring a few definitions of ``bright" or ``flares'' \citep[see, e.g.,][]{Abdovariability,Nalewajko}, there is no standard definition for ``quiescent'' and ``active.'' We define these states based on the weighted mean flux, $\langle$F$_{\nu}\rangle$, and its weighted standard deviation,
\begin{equation}
\sigma_{w_{\nu}} = \sqrt{\frac{\sum \limits_{i=1}^{N} w_{i}(x_{i}-\langle F_{\nu}\rangle)^2} {\frac{(N-1)\sum \limits_{i=1}^{N} w_{i}}{N}}},
\end{equation}
where $x_{i}$ is a measurement with uncertainty $\sigma_{i}$, $w_i = 1/\sigma_{i}^{2}$ is the weight of the individual measurement, and $N$ is the number of observations of the source within a given energy band $\nu$. All measurements from all observatories, subject to restrictions stated in Section \ref{sec:calibrate} and with a self-imposed minimum of ten measurements within a band, were used to compute these values. We set as an upper limit to a \textit{quiescent} flux level $\langle$F$_{\nu}\rangle$, and as a lower limit to an \textit{active} flux level $\langle$F$_{\nu}\rangle$\, + 1$\sigma_{w_{\nu}}$. Between these levels, we consider the source to be in a transitional state. Additionally, we further define a \textit{flaring} flux level to be when the flux exceeds $\langle$F$_{\nu}\rangle$\, + 3$\sigma_{w_{\nu}}$. For \textit{Fermi} data, we include upper limits in the computation of $\langle$F$_{\gamma}\rangle$, replacing both the flux and its error with the value of the upper limit. Table \ref{table:statedata} presents $\langle$F$_{\nu}\rangle$, its weighted standard deviation, and the number of data points used in its computation for each of the selected frequency bands for each object.
We restrict our analysis to epochs when $\gamma$-ray emission was in a sustained period of either quiescence or active flux levels. A flaring flux level is, by definition, part of an active state. Based on our typical 7-day binning of $\gamma$-ray data, we require a quiescent period to extend a minimum of 21 consecutive days, with upper limits considered quiescent, and an active period to extend a minimum of 14 consecutive days. As an example, for 7-day binning of \textit{Fermi} data, a minimum of two consecutive data points at least 1$\sigma_{w_{\gamma}}$ above $\langle$F$_{\gamma}\rangle$\, are required before we consider the source to be in an active state. Active $\gamma$-ray periods thus determined initially have been reevaluated using \textit{Fermi} light curves computed with the photon index allowed to vary. A minor exception is made for the active epochs of 1749+096. We allow two active periods to include epochs when the $\gamma$-ray measurement fell marginally below, and well within the uncertainties, of the lower limit for active periods. To evaluate the state of a source at the other bands during a given $\gamma$-ray state, no minimum duration is imposed.
Table \ref{tab:fermiperiodsq} presents a summary of the $\gamma$-ray periods of quiescence for BL Lacs and FSRQs. The columns of Table \ref{tab:fermiperiodsq} are as follows: 1 - the object name, 2 - the number of quiescent periods, 3 - the total number of days during which the object was in a quiescent period (note that this excludes any days for which the object had a low flux value but for less than an uninterrupted 21-day period), and 4$-$6 - the number of days in the longest uninterrupted period of quiescence and the dates of the beginning and end of the longest period, respectively.
Similarly, Table \ref{tab:fermiperiodsa} presents a summary of the $\gamma$-ray active periods (all active periods are identified from the data computed with a fixed photon index): column 1 is the object name, column 2 is the number of active periods identified for the object, column 3 is the number of active periods that have a flux value considered to be in a flaring state, and column 4 is the total number of days during which the object was in an active period. Columns 5$-$7 list the number of days in the longest uninterrupted active period and the dates of the beginning and end of the longest active period, respectively. Columns 8$-$10 give the maximum flux observed, its uncertainty, and the central date of the bin, respectively. The spectral index at the time of measurement of the maximum flux is listed in column 11. If the maximum flux was computed using the fixed photon index in the 2FGL catalog, an ``F" is inserted in column 12; otherwise, if the photon index was allowed to vary, a ``V" is inserted in column 12 (see Section \ref{sec:xandgammasi}). Columns 13 and 14 present the ratio of the maximum flux to $\langle$F$_{\gamma}\rangle$\, and the uncertainty that characterizes an amplitude of $\gamma$-ray variability.
\begin{deluxetable}{lrrrrrrrrrrrrrrr}
\rotate
\tablewidth{0pt}
\tabletypesize{\tiny}
\tablecolumns{16}
\tablecaption{Weighted Mean Flux and Weighted Standard Deviations (Part 1 of 3): Gamma-ray through UVW1 Bands}
\tablehead{
\multicolumn{1}{l}{Object}&
\multicolumn{3}{c}{\textit{Fermi} $\gamma$-ray [phot cm\superscript{-2} s\superscript{-1}]}&
\multicolumn{3}{c}{\textit{Swift} XRT [erg cm\superscript{-2} s\superscript{-1}]}&
\multicolumn{3}{c}{\textit{Swift UVW2} [mJy]}&
\multicolumn{3}{c}{\textit{Swift UVM2} [mJy]}&
\multicolumn{3}{c}{\textit{Swift UVW1} [mJy]}
\cr
\multicolumn{1}{l}{Name}&
\multicolumn{1}{r}{$\langle$F$_{\gamma}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{\gamma}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{X}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{X}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{W2}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{W2}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{M2}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{M2}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{W1}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{W1}}$}&
\multicolumn{1}{r}{\# Items}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{r}{(6)}&
\multicolumn{1}{r}{(7)}&
\multicolumn{1}{r}{(8)}&
\multicolumn{1}{r}{(9)}&
\multicolumn{1}{r}{(10)}&
\multicolumn{1}{r}{(11)}&
\multicolumn{1}{r}{(12)}&
\multicolumn{1}{r}{(13)}&
\multicolumn{1}{r}{(14)}&
\multicolumn{1}{r}{(15)}&
\multicolumn{1}{r}{(16)}
}
\startdata
3C66A & 1.25E-07 & 6.99E-08 & 213 & 4.09E-12 & 2.15E-12 & 19 & 2.313 & 0.832 & 16 & 2.368 & 0.883 & 13 & 3.549 & 1.320 & 15 \\
0235+164 & 1.88E-07 & 2.74E-07 & 206 & 2.28E-12 & 1.96E-12 & 91 & 0.186 & 0.277 & 99 & 0.250 & 0.384 & 95 & 0.292 & 0.460 & 99 \\
0336-019 & 1.23E-07 & 8.20E-08 & 213 & & & 5 & & & 7 & & & 6 & & & 7 \\
0420-014 & 1.33E-07 & 6.81E-08 & 213 & 2.62E-12 & 6.87E-13 & 16 & 0.136 & 0.038 & 12 & 0.203 & 0.078 & 12 & 0.243 & 0.080 & 13 \\
0528+134 & 1.10E-07 & 8.28E-08 & 216 & 2.36E-12 & 1.41E-12 & 73 & 0.476 & 0.177 & 10 & & & 9 & 0.328 & 0.195 & 14 \\
0716+714 & 2.17E-07 & 1.38E-07 & 501 & 7.60E-12 & 4.31E-12 & 103 & 3.975 & 2.034 & 76 & 4.316 & 2.107 & 72 & 6.080 & 3.015 & 83 \\
0735+178 & 7.08E-08 & 3.02E-08 & 212 & 8.12E-13 & 3.75E-13 & 14 & 0.285 & 0.127 & 11 & 0.339 & 0.137 & 10 & & & 9 \\
0827+243 & 1.51E-07 & 1.30E-07 & 228 & 2.76E-12 & 1.85E-12 & 63 & 0.241 & 0.045 & 44 & 0.280 & 0.052 & 50 & 0.376 & 0.071 & 47 \\
0829+046 & 6.41E-08 & 3.78E-08 & 209 & 1.13E-12 & 5.74E-13 & 16 & & & 7 & & & 7 & & & 7 \\
0836+710 & 1.58E-07 & 1.42E-07 & 208 & 1.64E-11 & 4.38E-12 & 28 & 0.057 & 0.008 & 12 & 0.077 & 0.009 & 11 & 0.172 & 0.022 & 13 \\
OJ287 & 1.05E-07 & 8.11E-08 & 209 & 4.81E-12 & 2.31E-12 & 127 & 1.088 & 0.464 & 100 & 1.170 & 0.504 & 90 & 1.773 & 0.757 & 119 \\
0954+658 & 6.86E-08 & 4.71E-08 & 209 & 2.15E-12 & 1.17E-12 & 14 & 0.097 & 0.046 & 11 & & & 9 & 0.164 & 0.067 & 14 \\
1055+018 & 1.17E-07 & 6.69E-08 & 214 & 2.74E-12 & 9.51E-13 & 13 & & & 8 & & & 5 & & & 5 \\
Mkn421 & 1.79E-07 & 7.29E-08 & 219 & 6.09E-10 & 1.72E-10 & 288 & 11.771 & 3.668 & 415 & 11.924 & 3.817 & 402 & 15.449 & 5.086 & 388 \\
1127-145 & 1.03E-07 & 6.01E-08 & 219 & 5.50E-12 & 1.74E-12 & 23 & 0.217 & 0.058 & 19 & 0.274 & 0.069 & 19 & 0.434 & 0.100 & 20 \\
1156+295 & 1.43E-07 & 1.04E-07 & 214 & 1.34E-12 & 4.73E-13 & 21 & & & 8 & & & 8 & 0.454 & 0.392 & 10 \\
1219+285 & 6.03E-08 & 2.62E-08 & 219 & 2.14E-12 & 1.97E-12 & 74 & 1.054 & 0.510 & 70 & 1.119 & 0.540 & 68 & 1.660 & 0.747 & 75 \\
1222+216 & 2.02E-07 & 3.37E-07 & 213 & 3.21E-12 & 7.65E-13 & 66 & 1.671 & 0.417 & 38 & 1.554 & 0.380 & 41 & 1.983 & 0.502 & 41 \\
3C273 & 3.14E-07 & 3.34E-07 & 214 & 1.20E-10 & 4.73E-11 & 148 & 24.924 & 3.002 & 29 & 24.202 & 2.688 & 23 & 30.848 & 2.869 & 27 \\
3C279 & 3.43E-07 & 2.71E-07 & 208 & 1.03E-11 & 2.85E-12 & 284 & 0.353 & 0.454 & 142 & 0.400 & 0.512 & 136 & 0.643 & 0.739 & 170 \\
1308+326 & 7.38E-08 & 3.64E-08 & 219 & 1.43E-12 & 9.03E-13 & 14 & 0.078 & 0.055 & 10 & 0.120 & 0.064 & 11 & & & 7 \\
1406-076 & 8.50E-08 & 4.02E-08 & 219 & 7.14E-13 & 1.75E-13 & 20 & 0.007 & 0.003 & 42 & 0.015 & 0.007 & 42 & 0.036 & 0.014 & 46 \\
1510-089 & 6.11E-07 & 6.29E-07 & 214 & 6.78E-12 & 1.85E-12 & 157 & 0.537 & 0.244 & 154 & 0.615 & 0.242 & 141 & 0.731 & 0.335 & 153 \\
1611+343 & 2.02E-08 & 1.92E-08 & 219 & & & 7 & & & 4 & & & 4 & & & 6 \\
1622-297 & 9.98E-08 & 5.61E-08 & 156 & 2.23E-12 & 9.47E-13 & 39 & 0.256 & 0.060 & 43 & 0.302 & 0.092 & 41 & 0.282 & 0.108 & 47 \\
1633+382 & 2.44E-07 & 1.87E-07 & 216 & 2.29E-12 & 1.59E-12 & 72 & 0.022 & 0.009 & 54 & 0.044 & 0.018 & 59 & 0.160 & 0.066 & 60 \\
3C345 & 1.26E-07 & 6.56E-08 & 222 & 4.76E-12 & 1.05E-12 & 27 & 0.234 & 0.079 & 21 & 0.241 & 0.090 & 19 & 0.327 & 0.121 & 23 \\
1730-130 & 1.82E-07 & 1.25E-07 & 213 & 1.65E-12 & 6.61E-13 & 46 & 0.114 & 0.045 & 37 & 0.182 & 0.063 & 25 & 0.197 & 0.084 & 48 \\
1749+096 & 8.39E-08 & 5.17E-08 & 233 & 4.17E-12 & 3.05E-12 & 25 & 0.694 & 0.994 & 11 & 0.548 & 0.843 & 11 & 1.104 & 1.642 & 13 \\
BL Lacertae & 2.40E-07 & 1.63E-07 & 268 & 1.05E-11 & 6.78E-12 & 196 & 1.117 & 0.755 & 182 & 1.443 & 1.015 & 175 & 2.052 & 1.334 & 189 \\
3C446 & 7.87E-08 & 4.33E-08 & 225 & & & 9 & & & 2 & & & 3 & & & 2 \\
CTA102 & 2.05E-07 & 2.16E-07 & 324 & 4.43E-12 & 2.44E-12 & 53 & 0.437 & 0.306 & 36 & 0.514 & 0.351 & 32 & 0.692 & 0.493 & 39 \\
3C454.3 & 7.79E-07 & 1.58E-06 & 1214 & 3.41E-11 & 3.31E-11 & 331 & 0.987 & 0.465 & 255 & 1.222 & 0.573 & 251 & 1.682 & 0.865 & 280 \\
\enddata
\label{table:statedata}
\end{deluxetable}
\addtocounter{table}{-1}
\begin{deluxetable}{lrrrrrrrrrrrr}
\rotate
\tablewidth{0pt}
\tabletypesize{\tiny}
\tablecolumns{13}
\tablecaption{Weighted Mean Flux and Weighted Standard Deviations (Part 2 of 3): \textit{U - R} Bands}
\tablehead{
\multicolumn{1}{l}{Object}&
\multicolumn{3}{c}{\textit{U}-BAND [mJy]}&
\multicolumn{3}{c}{\textit{B}-BAND [mJy]}&
\multicolumn{3}{c}{\textit{V}-BAND [mJy]}&
\multicolumn{3}{c}{\textit{R}-BAND [mJy]}
\cr
\multicolumn{1}{l}{Name}&
\multicolumn{1}{r}{$\langle$F$_{U}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{U}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{B}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{B}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{V}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{V}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{R}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{R}}$}&
\multicolumn{1}{r}{\# Items}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{r}{(6)}&
\multicolumn{1}{r}{(7)}&
\multicolumn{1}{r}{(8)}&
\multicolumn{1}{r}{(9)}&
\multicolumn{1}{r}{(10)}&
\multicolumn{1}{r}{(11)}&
\multicolumn{1}{r}{(12)}&
\multicolumn{1}{r}{(13)}
}
\startdata
3C66A & 4.492 & 1.733 & 15 & 5.525 & 2.170 & 412 & 7.090 & 2.783 & 590 & 6.795 & 2.941 & 786 \\
0235+164 & 0.507 & 0.817 & 82 & 0.207 & 0.312 & 427 & 0.497 & 0.750 & 690 & 0.523 & 0.814 & 1249 \\
0336-019 & & & 6 & 0.412 & 0.189 & 13 & 0.377 & 0.129 & 29 & 0.600 & 0.242 & 211 \\
0420-014 & 0.247 & 0.072 & 10 & 0.441 & 0.330 & 78 & 0.579 & 0.343 & 154 & 0.686 & 0.653 & 365 \\
0528+134 & 0.262 & 0.122 & 41 & 0.334 & 0.093 & 173 & 0.334 & 0.127 & 203 & 0.296 & 0.049 & 356 \\
0716+714 & 8.111 & 3.735 & 79 & 10.626 & 4.916 & 960 & 14.759 & 6.199 & 1112 & 21.304 & 9.848 & 1908 \\
0735+178 & 0.658 & 0.229 & 10 & 0.865 & 0.240 & 21 & 1.218 & 0.402 & 94 & 1.350 & 0.346 & 240 \\
0827+243 & 0.415 & 0.115 & 45 & 0.460 & 0.088 & 42 & 0.488 & 0.105 & 192 & 0.481 & 0.080 & 276 \\
0829+046 & & & 7 & 0.708 & 0.373 & 29 & 1.491 & 0.754 & 46 & 1.726 & 0.672 & 149 \\
0836+710 & 0.474 & 0.039 & 11 & 0.582 & 0.050 & 67 & 0.633 & 0.060 & 104 & 0.677 & 0.094 & 313 \\
OJ287 & 2.400 & 0.960 & 110 & 3.257 & 1.381 & 826 & 4.669 & 1.905 & 1051 & 5.258 & 2.260 & 1215 \\
0954+658 & 0.261 & 0.099 & 12 & 0.491 & 0.295 & 182 & 0.689 & 0.385 & 229 & 0.950 & 0.552 & 933 \\
1055+018 & & & 7 & 0.355 & 0.165 & 11 & 0.657 & 0.368 & 13 & 0.756 & 0.238 & 100 \\
Mkn421 & 8.914 & 3.656 & 10 & 18.382 & 6.930 & 94 & 19.096 & 7.779 & 304 & 24.475 & 12.253 & 263 \\
1127-145 & & & 4 & 0.599 & 0.153 & 31 & & & 9 & 0.781 & 0.076 & 112 \\
1156+295 & 0.430 & 0.441 & 13 & 0.824 & 0.932 & 118 & 0.397 & 0.483 & 94 & 0.582 & 0.751 & 565 \\
1219+285 & 2.102 & 0.887 & 73 & 2.662 & 1.001 & 170 & 3.749 & 1.394 & 334 & 4.729 & 1.369 & 304 \\
1222+216 & 1.927 & 0.448 & 48 & 2.074 & 0.494 & 50 & 2.162 & 0.596 & 234 & 2.406 & 0.853 & 228 \\
3C273 & & & 4 & 27.088 & 1.877 & 423 & 31.260 & 2.166 & 574 & 31.750 & 2.366 & 248 \\
3C279 & 0.916 & 1.063 & 171 & 0.779 & 1.040 & 636 & 1.632 & 2.093 & 817 & 0.928 & 0.857 & 914 \\
1308+326 & & & 7 & 0.143 & 0.115 & 20 & 0.174 & 0.158 & 22 & 0.264 & 0.147 & 173 \\
1406-076 & 0.076 & 0.024 & 47 & 0.100 & 0.033 & 230 & 0.119 & 0.036 & 222 & 0.144 & 0.046 & 286 \\
1510-089 & 0.963 & 0.431 & 147 & 1.096 & 0.522 & 660 & 1.236 & 0.759 & 850 & 1.347 & 0.642 & 1129 \\
1611+343 & & & 6 & 0.373 & 0.028 & 50 & 0.358 & 0.057 & 54 & 0.433 & 0.055 & 258 \\
1622-297 & 0.333 & 0.067 & 42 & 0.441 & 0.100 & 223 & 0.756 & 0.222 & 232 & 0.409 & 0.150 & 239 \\
1633+382 & 0.332 & 0.142 & 56 & 0.439 & 0.228 & 241 & 0.395 & 0.235 & 429 & 0.470 & 0.211 & 717 \\
3C345 & 0.322 & 0.162 & 22 & 0.474 & 0.332 & 220 & 0.540 & 0.367 & 287 & 0.450 & 0.207 & 699 \\
1730-130 & 0.183 & 0.083 & 46 & 0.331 & 0.126 & 272 & 0.473 & 0.209 & 271 & 0.874 & 0.470 & 368 \\
1749+096 & 2.531 & 2.991 & 11 & 2.798 & 3.591 & 55 & 3.213 & 4.443 & 79 & 0.907 & 0.490 & 459 \\
BL Lacertae & 3.144 & 2.065 & 184 & 4.844 & 3.021 & 818 & 7.710 & 4.571 & 1152 & 13.385 & 7.517 & 1318 \\
3C446 & & & 5 & 0.030 & 0.053 & 13 & 0.152 & 0.035 & 25 & 0.216 & 0.079 & 188 \\
CTA102 & 0.806 & 0.777 & 33 & 0.752 & 0.890 & 175 & 1.162 & 1.446 & 286 & 1.046 & 1.344 & 794 \\
3C454.3 & 2.144 & 1.406 & 225 & 2.549 & 1.728 & 988 & 4.061 & 2.780 & 1304 & 3.221 & 3.090 & 1578 \\
\enddata
\label{table:statedata2}
\end{deluxetable}
\addtocounter{table}{-1}
\begin{deluxetable}{lrrrrrrrrrrrr}
\rotate
\centering
\tablewidth{0pt}
\tabletypesize{\tiny}
\tablecolumns{13}
\tablecaption{Weighted Mean Flux and Weighted Standard Deviations (Part 3 of 3): \textit{I - K} Bands}
\tablehead{
\multicolumn{1}{l}{Object}&
\multicolumn{3}{c}{\textit{I}-BAND [mJy]}&
\multicolumn{3}{c}{\textit{J}-BAND [mJy]}&
\multicolumn{3}{c}{\textit{H}-BAND [mJy]}&
\multicolumn{3}{c}{\textit{K}-BAND [mJy]}
\cr
\multicolumn{1}{l}{Name}&
\multicolumn{1}{r}{$\langle$F$_{I}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{I}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{J}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{J}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{H}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{H}}$}&
\multicolumn{1}{r}{\# Items}&
\multicolumn{1}{r}{$\langle$F$_{K}\rangle$}&
\multicolumn{1}{r}{1-$\sigma_{w_{K}}$}&
\multicolumn{1}{r}{\# Items}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{r}{(6)}&
\multicolumn{1}{r}{(7)}&
\multicolumn{1}{r}{(8)}&
\multicolumn{1}{r}{(9)}&
\multicolumn{1}{r}{(10)}&
\multicolumn{1}{r}{(11)}&
\multicolumn{1}{r}{(12)}&
\multicolumn{1}{r}{(13)}
}
\startdata
3C66A & 9.323 & 3.788 & 498 & 12.355 & 4.022 & 245 & 18.191 & 5.699 & 238 & 24.548 & 7.169 & 252 \\
0235+164 & 0.933 & 2.219 & 469 & 1.835 & 2.465 & 646 & 2.530 & 2.837 & 376 & 5.122 & 6.002 & 547 \\
0336-019 & 0.773 & 0.323 & 33 & & & & & & & & & \\
0420-014 & 1.456 & 1.238 & 112 & 1.850 & 0.933 & 55 & 2.833 & 1.632 & 55 & 2.821 & 2.430 & 55 \\
0528+134 & 0.312 & 0.037 & 16 & 0.627 & 0.303 & 233 & 0.952 & 0.691 & 36 & 1.201 & 0.873 & 36 \\
0716+714 & 26.156 & 12.430 & 990 & 22.779 & 8.237 & 346 & 45.092 & 13.925 & 137 & 57.176 & 21.710 & 134 \\
0735+178 & 2.121 & 0.546 & 75 & 3.550 & 0.489 & 19 & 5.131 & 0.630 & 16 & 6.830 & 0.673 & 16 \\
0827+243 & 0.496 & 0.146 & 36 & 0.602 & 0.119 & 18 & 0.635 & 0.170 & 15 & 0.807 & 0.302 & 15 \\
0829+046 & 2.315 & 0.926 & 45 & 3.963 & 1.110 & 20 & 5.867 & 1.724 & 16 & 8.277 & 1.849 & 16 \\
0836+710 & 0.770 & 0.048 & 22 & 1.046 & 0.483 & 35 & 1.106 & 0.612 & 23 & 1.502 & 1.016 & 21 \\
OJ287 & 7.363 & 3.002 & 460 & 13.000 & 5.704 & 407 & 19.070 & 6.749 & 62 & 35.597 & 17.029 & 313 \\
0954+658 & 1.345 & 0.538 & 98 & 2.473 & 1.193 & 60 & 3.917 & 1.761 & 54 & 5.756 & 3.064 & 49 \\
1055+018 & & & 9 & & & & & & & & & \\
Mkn421 & 32.674 & 7.614 & 11 & & & & & & & & & \\
1127-145 & & & 5 & 0.568 & 0.126 & 31 & & & & & & 9 \\
1156+295 & 1.954 & 1.868 & 181 & 1.288 & 0.797 & 33 & 2.176 & 1.339 & 23 & 4.115 & 2.980 & 16 \\
1219+285 & 5.861 & 1.635 & 109 & 10.653 & 1.798 & 29 & 15.241 & 2.342 & 27 & 17.913 & 2.886 & 23 \\
1222+216 & & & 9 & & & & & & & & & \\
3C273 & 40.046 & 2.983 & 214 & 40.485 & 2.299 & 310 & 54.576 & 3.834 & 15 & 96.516 & 3.114 & 16 \\
3C279 & 1.801 & 1.276 & 164 & 2.721 & 2.646 & 416 & 3.693 & 2.067 & 37 & 8.811 & 9.013 & 362 \\
1308+326 & 0.206 & 0.098 & 31 & & & & & & & & & \\
1406-076 & & & 4 & 0.272 & 0.146 & 181 & & & & 0.379 & 0.144 & 45 \\
1510-089 & 1.879 & 0.938 & 250 & 2.393 & 1.676 & 444 & 3.323 & 1.101 & 76 & 8.011 & 6.008 & 382 \\
1611+343 & 0.520 & 0.068 & 57 & 0.418 & 0.062 & 26 & 0.631 & 0.061 & 25 & 0.586 & 0.086 & 24 \\
1622-297 & & & 1 & 0.887 & 0.430 & 189 & & & & 1.669 & 1.146 & 182 \\
1633+382 & 0.707 & 0.521 & 261 & 0.656 & 0.211 & 62 & 0.923 & 0.338 & 56 & 1.292 & 0.573 & 49 \\
3C345 & 1.008 & 0.806 & 296 & 1.312 & 0.461 & 67 & 2.249 & 0.768 & 64 & 3.372 & 1.233 & 63 \\
1730-130 & & & 4 & 1.331 & 0.523 & 242 & & & & 3.102 & 1.635 & 213 \\
1749+096 & 2.275 & 1.197 & 97 & & & 8 & & & & & & \\
BL Lacertae & 18.983 & 8.823 & 750 & 47.059 & 10.521 & 62 & 71.696 & 16.745 & 58 & 92.027 & 21.234 & 59 \\
3C446 & & & 8 & 0.378 & 0.096 & 53 & & & & & & 2 \\
CTA102 & 0.795 & 0.850 & 176 & 0.915 & 0.233 & 26 & 0.929 & 0.285 & 66 & 1.372 & 0.638 & 63 \\
3C454.3 & 5.153 & 4.962 & 448 & 4.053 & 4.680 & 574 & 2.924 & 3.419 & 141 & 9.302 & 12.282 & 506 \\
\enddata
\label{table:statedata3}
\end{deluxetable}
\begin{deluxetable}{lrrrrr}
\tabletypesize{\small}
\tablewidth{0pt}
\tablecaption{Gamma-Ray Periods of Quiescence}
\tablecolumns{6}
\tablehead{
& Number & Total Days &\multicolumn{3}{c}{\hspace{20pt}Longest Quiescent Period} \\
Object &of & in All & No. of &Start &End \\
Name & Periods & Periods & Days &Date &Date \\
\multicolumn{1}{l}{(1)}&\multicolumn{1}{r}{(2)}&\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&\multicolumn{1}{r}{(5)}&\multicolumn{1}{r}{(6)}
}
\startdata
3C66A & 11 & 517 & 133 & 5931.55 & 6064.55 \\
0235+164 & 3 & 1260 & 1162 & 4958.52 & 6120.55 \\
0716+714 & 10 & 431 & 97 & 4810.50 & 4907.52 \\
0735+178 & 17 & 701 & 97 & 5413.55 & 5511.51 \\
0829+046 & 8 & 889 & 637 & 5504.51 & 6141.54 \\
OJ287 & 14 & 1051 & 288 & 4810.50 & 5098.54 \\
0954+658 & 11 & 1506 & 267 & 4684.50 & 4951.54 \\
1055+018 & 10 & 854 & 439 & 5022.54 & 5462.51 \\
Mkn421 & 10 & 433 & 84 & 4858.16 & 4942.16 \\
1219+285 & 20 & 715 & 195 & 5638.53 & 5833.53 \\
1749+096 & 15 & 1216 & 175 & 5194.16 & 5369.16 \\
BL Lacertae & 12 & 723 & 189 & 5439.16 & 5628.16 \\
\\
\textbf{FSRQs} & & & & & \\
0336-019 & 10 & 869 & 491 & 4691.50 & 5182.51 \\
0420-014 & 11 & 784 & 370 & 5344.55 & 5714.55 \\
0528+134 & 13 & 1247 & 441 & 4880.50 & 5321.50 \\
0827+243 & 5 & 1399 & 780 & 4684.50 & 5464.50 \\
0836+710 & 7 & 1072 & 419 & 4895.56 & 5315.52 \\
1127-145 & 2 & 1063 & 1042 & 5035.54 & 6078.53 \\
1156+295 & 17 & 805 & 168 & 5595.51 & 5763.53 \\
1222+216 & 11 & 715 & 253 & 4684.50 & 4937.52 \\
3C273 & 12 & 792 & 378 & 5669.50 & 6047.50 \\
3C279 & 6 & 650 & 350 & 5845.00 & 6195.00 \\
1308+326 & 12 & 1080 & 336 & 5434.51 & 5770.53 \\
1406-076 & 19 & 1157 & 210 & 5980.53 & 6190.53 \\
1510-089 & 16 & 762 & 112 & 6050.53 & 6162.53 \\
1611+343 & 4 & 1213 & 940 & 4683.16 & 5623.53 \\
1622-297 & 9 & 884 & 401 & 4683.16 & 5084.54 \\
1633+382 & 8 & 770 & 238 & 5860.50 & 6098.50 \\
3C345 & 13 & 1167 & 399 & 5791.53 & 6190.53 \\
1730-130 & 12 & 1251 & 476 & 4790.52 & 5266.54 \\
3C446 & 19 & 1260 & 187 & 6062.16 & 6249.16 \\
CTA102 & 12 & 1064 & 490 & 4963.16 & 5453.16 \\
3C454.3 & 3 & 614 & 477 & 5708.16 & 6185.16 \\
\enddata
\tablecomments{Time has not been adjusted for redshift.\\
\hspace{33pt} --- If two or more quiescent periods have the same longest duration, only the first is shown.}
\label{tab:fermiperiodsq}%
\end{deluxetable}
\begin{deluxetable}{lrrrrrrrrrrrrr}
\rotate
\tabletypesize{\scriptsize}
\tablewidth{0pt}
\tablecaption{Gamma-Ray Active Periods}
\tablecolumns{14}
\centering
\tablehead{
& Number & Number &Total Days &\multicolumn{3}{c}{Longest Active Period} &\multicolumn{3}{c}{Overall Highest Flux Measured} &Spec- & & \\
Object &of &Flaring & in All & No. of &Start &End & & & &tral & & $\langle$F$_{max}\rangle$ / \\
Name & Periods &Periods & Periods & Days &Date &Date &$\langle$F$_{max}\rangle$ & 1-$\sigma$ & Date &Index&Source & $\langle$F$_{\gamma}\rangle$ & 1-$\sigma$ \\
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{r}{(6)}&
\multicolumn{1}{r}{(7)}&
\multicolumn{1}{r}{(8)}&
\multicolumn{1}{r}{(9)}&
\multicolumn{1}{r}{(10)}&
\multicolumn{1}{r}{(11)}&
\multicolumn{1}{r}{(12)}&
\multicolumn{1}{r}{(13)}&
\multicolumn{1}{r}{(14)}
}
\startdata
\textbf{BL Lacs}& & & & & & & & & & & & & \\
3C66A & 10 & 2 & 238 & 70 & 4916.52 & 4986.52 & 7.43E-07 & 6.54E-08 & 4969.02 & -0.85 & F & 6.0 & 3.4 \\
0235+164 & 1 & 1 & 84 & 84 & 4691.50 & 4775.50 & 1.39E-06 & 1.27E-07 & 4728.00 & -0.96 & V & 7.4 & 10.9 \\
0716+714 & 6 & 3 & 105 & 21 & 6101.50 & 6122.50 & 2.18E-06 & 1.66E-07 & 5857.00 & -0.91 & V & 10.0 & 6.4 \\
0735+178 & 5 & 3 & 133 & 77 & 6085.55 & 6162.55 & 2.50E-07 & 4.44E-08 & 6138.05 & -1.05 & F & 3.5 & 1.6 \\
0829+046 & 5 & 2 & 119 & 42 & 5182.51 & 5224.51 & 4.43E-07 & 7.93E-08 & 5130.04 & -1.09 & V & 6.9 & 4.3 \\
OJ287 & 4 & 3 & 147 & 84 & 5819.54 & 5903.54 & 7.40E-07 & 8.81E-08 & 5872.04 & -1.14 & V & 7.1 & 5.5 \\
0954+658 & 3 & 3 & 49 & 21 & 5665.53 & 5686.53 & 3.02E-07 & 4.40E-08 & 5641.03 & -1.42 & F & 4.4 & 3.1 \\
1055+018 & 6 & 3 & 161 & 42 & 5623.53 & 5665.53 & 5.11E-07 & 1.54E-07 & 5648.01 & -1.33 & V & 4.4 & 2.8 \\
Mkn421 & 5 & 1 & 168 & 98 & 6099.53 & 6197.53 & 8.45E-07 & 6.53E-08 & 6124.03 & -0.75 & V & 4.7 & 2.0 \\
1219+285 & 3 & 1 & 63 & 28 & 4683.16 & 4711.16 & 1.88E-07 & 4.08E-08 & 4686.66 & -1.02 & F & 3.1 & 1.5 \\
1749+096 & 4 & 3 & 63 & 21 & 4683.16 & 4704.16 & 3.79E-07 & 5.41E-08 & 4686.66 & -1.10 & F & 4.5 & 2.9 \\
BL Lacertae & 9 & 5 & 247 & 91 & 5691.16 & 5782.16 & 9.89E-07 & 7.41E-08 & 5708.66 & -1.11 & F & 4.1 & 2.8 \\
\\
\textbf{FSRQs}& & & & & & & & & & & & & \\
0336-019 & 8 & 4 & 133 & 21 & 5532.50 & 5553.50 & 4.37E-07 & 6.96E-08 & 5550.00 & -1.48 & F & 3.6 & 2.4 \\
0420-014 & 7 & 1 & 168 & 56 & 5175.51 & 5231.51 & 4.92E-07 & 5.70E-08 & 5221.01 & -1.30 & F & 3.7 & 1.9 \\
0528+134 & 3 & 2 & 49 & 21 & 5805.55 & 5826.55 & 5.71E-07 & 7.19E-08 & 4723.00 & -1.55 & V & 5.2 & 4.0 \\
0827+243 & 2 & 2 & 119 & 77 & 6183.54 & 6260.54 & 7.11E-07 & 8.34E-08 & 6285.04 & -1.30 & V & 4.7 & 4.1 \\
0836+710 & 3 & 2 & 91 & 42 & 5894.01 & 5936.01 & 1.61E-06 & 1.32E-07 & 5870.05 & -1.61 & V & 10.2 & 9.2 \\
1127-145 & 2 & 1 & 63 & 35 & 4809.16 & 4844.16 & 2.99E-07 & 5.90E-08 & 4777.66 & -1.61 & V & 2.9 & 1.8 \\
1156+295 & 4 & 3 & 189 & 84 & 5420.51 & 5504.51 & 9.55E-07 & 7.31E-08 & 5431.01 & -1.13 & V & 6.7 & 4.9 \\
1222+216 & 9 & 6 & 350 & 105 & 5343.55 & 5448.55 & 5.82E-06 & 1.78E-07 & 5368.01 & -1.08 & V & 28.8 & 48.0 \\
3C273 & 8 & 4 & 273 & 84 & 5049.50 & 5133.50 & 5.30E-06 & 3.94E-07 & 5094.00 & -1.40 & V & 16.9 & 18.0 \\
3C279 & 9 & 4 & 287 & 63 & 4839.56 & 4902.56 & 1.91E-06 & 7.74E-08 & 4800.00 & -1.20 & V & 5.6 & 4.4 \\
1308+326 & 4 & 3 & 84 & 42 & 4683.16 & 4725.16 & 3.59E-07 & 4.16E-08 & 4714.66 & -1.10 & F & 4.9 & 2.5 \\
1406-076 & 4 & 1 & 56 & 14 & 4802.16 & 4816.16 & 2.08E-07 & 5.85E-08 & 5424.01 & -1.43 & F & 2.5 & 1.4 \\
1510-089 & 8 & 6 & 315 & 84 & 4951.54 & 5035.54 & 6.37E-06 & 2.01E-07 & 5872.03 & -1.29 & F & 10.4 & 10.7 \\
1611+343 & 0 & 0 & 0 & & & & & & & & & & \\
1622-297 & 2 & 0 & 28 & 14 & 5294.51 & 5308.51 & 2.39E-07 & 7.62E-08 & 5368.01 & -1.34 & F & 2.4 & 1.6 \\
1633+382 & 10 & 3 & 357 & 91 & 5678.50 & 5769.50 & 1.50E-06 & 1.08E-07 & 6193.00 & -1.25 & F & 6.2 & 4.7 \\
3C345 & 3 & 2 & 91 & 42 & 4951.54 & 4993.54 & 4.32E-07 & 9.28E-08 & 4976.04 & -1.45 & V & 3.4 & 1.9 \\
1730-130 & 2 & 1 & 49 & 35 & 5490.50 & 5525.50 & 9.15E-07 & 7.37E-08 & 5501.05 & -0.97 & V & 5.0 & 3.5 \\
3C446 & 1 & 0 & 21 & 21 & 4970.16 & 4991.16 & 1.64E-07 & 5.04E-08 & 4987.66 & -1.44 & F & 2.1 & 1.3 \\
CTA102 & 7 & 4 & 205 & 84 & 6178.53 & 6262.53 & 4.11E-06 & 1.95E-07 & 6194.03 & -1.01 & V & 20.1 & 21.2 \\
3C454.3 & 6 & 5 & 307 & 110 & 5480.16 & 5590.16 & 4.16E-05 & 4.86E-07 & 5522.04 & -1.26 & V & 53.4 & 108.0 \\
\enddata
\tablecomments{All flux values are in photon cm$^{-2}$ s$^{-1}$. Time is in the observer's frame, not adjusted for redshift.\\
\hspace{26pt} --- If two or more active periods have the same longest duration, only the first is shown.}
\label{tab:fermiperiodsa}%
\end{deluxetable}
To identify trends based on the class of objects, we generate a series of plots using the values in Tables \ref{tab:fermiperiodsq} and \ref{tab:fermiperiodsa}. Histograms of the percentage of time that each source was in a quiescent or active period are presented in Figure \ref{fig:numperiods}. Note that measurements in a transitory state or in isolated quiescent/active states are included in the total time. BL Lacs and FSRQs show similar behavior. BL Lacs spend an average of 55 $\pm$ 20\% of their time in quiescent periods, while FSRQs spend 65 $\pm$ 15\% of their time in quiescent periods. Time spent in active periods for BL Lacs is 9 $\pm$ 4\% and for FSRQs, 10 $\pm$ 8\%. Both averaged 5 $\pm$ 3 active periods over the 4.2 years of Fermi measurements included in this study, and BL Lacs averaged 12 $\pm$ 4 quiescent periods and FSRQs 11 $\pm$ 5.
\begin{figure}[t]%
\centering
\subfloat{
\label{fig:numper-a}
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=0.75\linewidth, angle=0]{f1_fp_numq_color.eps}}
\subfloat{
\label{fig:numper-b}%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=0.75\linewidth, angle=0]{f1_fp_numa_color.eps}}
\\
\caption{
Histograms of the percent of time that sources were in a $\gamma$-ray quiescent \protect\subref{fig:numper-a} or active
\protect\subref{fig:numper-b} period. (See text for definitions of periods.) FSRQs are red-filled and BL Lac objects, blue-filled.}%
\label{fig:numperiods}%
\end{figure}
Histograms of the longest uninterrupted quiescent and active periods for each of the sources are displayed in Figure \ref{fig:perlength}. Time is in the host galaxy frame, adjusted for redshift. We checked the ends of the light curves for the longest uninterrupted periods. Four of our objects (0827+243, 0954+658, 1222+216, and 1622-297), were within their longest uninterrupted quiescent period at the start of the \textit{Fermi} mission and the longest uninterrupted active period was in progress for 1308+326. Additionally, 4 of our objects (3C279, 3C345, 3C446, and 3C454.3) were within their longest uninterrupted quiescent period at the end of the monitoring period for this paper. Thus, for these objects, our longest uninterrupted periods represent lower limits. No obvious trends exist for either subclass while in a quiescent state, with both having wide dispersions. The longest uninterrupted quiescent period for most BL Lacs ran from 68 days (0735+178) to 232 days (1055+018), but 0235+164 and 0829+046 had 599 and 543 days, respectively. All but four FSRQs (3C273, 1611+343, 0827+243, and 1127-145) had fewer than 265 days in their longest uninterrupted quiescent period, with the length generally equally dispersed from a minimum of 78 days (3C446). The longest uninterrupted active periods were also highly dispersed for both subclasses, with BL Lac objects generally having a longer uninterrupted period (ranging from 15 to 95 days and averaging 43 $\pm$ 27 days) than FSRQs (ranging from 6 to 73 days and averaging 30 $\pm$ 23 days) when converted to the respective galaxies' restframes.
\begin{figure}[t]%
\centering
\subfloat{%
\label{fig:lengthqui}%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=0.75\linewidth, angle=0]{f2_fp_lengthq_color.eps}}%
\subfloat{%
\label{fig:lengthact}%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=0.75\linewidth, angle=0]{f2_fp_lengtha_color.eps}}%
\caption{Histograms of the durations of the longest uninterrupted periods of $\gamma$-ray \protect\subref{fig:lengthqui} quiescent or
\protect\subref{fig:lengthact} active activity, adjusted for redshift. FSRQs are red-filled and BL Lacs, blue-filled.
\label{fig:perlength}%
\end{figure}
We plot the normalized amplitude of flux variations vs.\ redshift in Figure \ref{fig:pernorm}. Noticeable is the lack of BL Lacs displaying large amplitudes. The average normalized amplitudes are $5.5 \pm 2.0$ for the BL Lacs and a highly dispersed 10 with a standard deviation of 12 for the FSRQs. However, without the four quasars exhibiting the largest values of maximum to mean fluxes (3C454.3, 1222+216, CTA102, and 3C273), the normalized maximum flux average for FSRQs drops to 5.0 $\pm$ 2.5. If the BL Lacs displayed such large amplitudes of $\gamma$-ray outbursts at the same rate as the FSRQs, we could expect, at least, 2 BL Lac objects with large outbursts. This implies that the process responsible for activity in the BL Lacs is more uniform, while the FSRQs appear to have different levels of activity.
\begin{figure}[t]%
\centering
\includegraphics[trim=1.8cm 0cm 0cm 0cm, clip=true,height=0.75\linewidth, angle=0]{f3_fp_maxnorm_color.eps}%
\caption{Maximum amplitude of $\gamma$-ray variations achieved by each object (values listed in Table \ref{tab:fermiperiodsa}) vs.\ redshift. The labels refer to the object reference number (see Table \ref{tab:sources}). The highest amplitudes correspond to 3C454.3 (\#33), 1222+216 (\#18), CTA102 (\#32), and 3C273 (\#19).
\label{fig:pernorm}%
\end{figure}
\subsection{Selection of Representative Epochs}
\label{sec:composition}
To form a well-sampled, representative selection of data for a statistical study of spectral indices, we establish minimum requirements for epochs of data to be extracted for analysis. Because many objects have multiple epochs that can be classified as quiescent or active, and in order to avoid skewing the analysis towards any particular object, four epochs per object are selected for analysis for the majority of the sources, two within $\gamma$-ray quiescent periods and two within $\gamma$-ray active periods. Fewer than four epochs are used for ten sources because of either weak $\gamma$-ray emission and insufficient optical-UV data, or lack of simultaneity of observations across bands. An ideal epoch would include a sufficient number of observations to construct a complete SED and compute spectral indices for the $\gamma$-ray, X-ray, and UV-optical-NIR regions, although some epochs are accepted without X-ray measurements. Epochs are carefully selected to include a minimum separation of time between earliest and latest NIR through X-ray observations, never to exceed 24 hours, resulting in an average elapsed time of measurements for all selected epochs of 9.0 hours. Preference is given to epochs that include a wide range of NIR to UV wavebands and to epochs containing observations obtained from the greatest number of observatories to mitigate potential bias introduced by the use of data from a single observatory.
\subsection{Light Curves and SEDs}
Figure~\ref{fig:1633lc} presents the light curves of the quasar 1633+382 as an example of the data used in the analysis. (Light curves collected for all objects can be found in an expanded version of this paper at \url{www.bu.edu/blazars/VLBAproject.html}.) The light curves are presented in a series of sub-panels, with the highest frequency in the top panel and the lowest in the bottom panel. The energy range of the $\gamma$-ray flux is 0.1$-$200 GeV and of the X-ray flux, 0.3$-$10 keV. The observatory making the measurement is identified by the color and shape of the symbol. Table~\ref{table:obs} presents the legend for the observatories. As explained in $\S$\ref{sec:composition}, up to four epochs per source were selected for analysis. These are indicated on the light curve plots by vertical dashed lines, with each epoch identified by a number and a color. Quiescent epochs are colored blue and green, active epochs are yellow and red. Horizontal dotted lines indicate upper limits of quiescent states and lower limits of active and flaring states.
\begin{figure*}
\centering
\includegraphics[width=0.65\paperwidth, angle=0]{f4_26.eps}
\caption{Light curves at different wavebands from NIR to $\gamma$-ray frequencies, with 1633+382 presented as an example. Energy range of the $\gamma$-ray flux is 0.1$-$200 GeV and for X-ray flux, 0.3$-$10 keV. Symbols identify telescopes used in measurements (see Table~\ref{table:obs}). Horizontal dotted lines on the light curves indicate the upper limit for quiescent states (blue) and lower limits for active states (green) and flaring states (red). Vertical dashed lines indicate specific epochs of interest, each designated with an identifying number located in the lowest panel. [Light curves collected for all objects can be found in an expanded version of this paper at \url{www.bu.edu/blazars/VLBAproject.html}.]}
\label{fig:1633lc}
\end{figure*}
Figure \ref{fig:SED} presents SEDs for 0716+714 and 1633+382 as examples. (SEDs for all objects can be found in an expanded version of this paper at \url{www.bu.edu/blazars/VLBAproject.html}.) The SEDs display the flux data for each selected epoch, with the frequency adjusted to the rest frame of the host galaxy. Information about the selected epochs is given in Table \ref{tab:selecteddata}, where column 1 is the object name, column 2 is the identifying epoch number (corresponding to the number displayed on the light curve plot), column 3 is the date of the earliest NIR $-$ X-ray observation within the epoch, column 4 is the elapsed time in days between the earliest and the latest NIR $-$ X-ray observations of the epoch, column 5 is the date of the center of the \textit{Fermi} binned record, and column 6 is the bin size for that record. Columns 8-20 indicate the activity state of the object at different bands during the epoch: ``Q'' is quiescent, ``A'' is active, ``F'' is flaring, and ``T'' is transient. A dash indicates that although we had some data available for the band, there were fewer than 10 measurements and we did not compute $\langle$F$_{\nu}\rangle$. If there are multiple observations at a particular waveband, the activity state is determined based on the weighted mean of the observations.
\begin{figure*}[t]
\centering
\subfloat{%
\label{fig:SED0716}%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=0.37\linewidth, angle=0]{f5_6.eps}}%
\subfloat{%
\label{fig:SED1633}%
\includegraphics[trim=1.4cm 0cm 0cm 0cm, clip=true,height=0.37\linewidth, angle=0]{f5_26.eps}}\\
\caption{SEDs for 0716+714 and 1633+382, shown as examples. Each epoch retains the identifying color and epoch number as displayed with vertical dashed lines on the light curves. The symbols (but not the color) refer to the observatory making the measurement (see Table \ref{table:obs}). Frequency is adjusted to the object's rest frame. For convenience, $\alpha_{ox}$\, and $\alpha_{xg}$\, are shown if \textit{Swift} X-ray data are available at the epoch. [SEDs for all objects can be found in an expanded version of this paper at \url{www.bu.edu/blazars/VLBAproject.html}.]
}%
\label{fig:SED}%
\centering
\subfloat{%
\label{fig:SI0716}%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=0.35\linewidth, angle=0]{f6_0716+714_SI.eps}}%
\hspace{8pt}%
\subfloat{%
\label{fig:SI1633}%
\includegraphics[trim=1.8cm 0cm 0cm 0cm, clip=true,height=0.35\linewidth, angle=0]{f6_1633+382_SI.eps}}\\
\caption{Examples of optical spectral index computation. Each epoch retains the identifying color and epoch number as displayed with vertical dashed lines on the light curves. The symbols indicate the observatory (see Table \ref{table:obs}). The frequency band of the observation is denoted immediately above the \textsl{X}-axis. Frequencies are adjusted for redshift.
}%
\label{fig:SI}%
\end{figure*}
\clearpage
\begin{deluxetable}{lcrrrrccccccccccccc}
\rotate
\tablewidth{0pt}
\tabletypesize{\tiny}
\tablecolumns{16}
\tablecaption{Epochs Selected For Study}
\tablehead{
\multicolumn{2}{l}{}&
\multicolumn{2}{c}{Non-$\gamma$ Observations}&
\multicolumn{2}{c}{$Fermi$ Obsvs.}&
\multicolumn{10}{l}{}&
\cr
\multicolumn{1}{l}{Object}&
\multicolumn{1}{c}{Epoch}&
\multicolumn{1}{r}{Earliest Date }&
\multicolumn{1}{r}{Elapsed}&
\multicolumn{1}{r}{Mid-Bin}&
\multicolumn{1}{r}{Bin}&
\multicolumn{13}{c}{Activity State of Frequency Band}
\cr
\multicolumn{1}{l}{Name}&
\multicolumn{1}{c}{Number}&
\multicolumn{1}{r}{Within Epoch}&
\multicolumn{1}{r}{Timespan}&
\multicolumn{1}{r}{Date}&
\multicolumn{1}{r}{Size}&
\multicolumn{1}{c}{$G$}&
\multicolumn{1}{c}{$X$}&
\multicolumn{1}{c}{$W2$}&
\multicolumn{1}{c}{$M2$}&
\multicolumn{1}{c}{$W1$}&
\multicolumn{1}{c}{$U$}&
\multicolumn{1}{c}{$B$}&
\multicolumn{1}{c}{$V$}&
\multicolumn{1}{c}{$R$}&
\multicolumn{1}{c}{$I$}&
\multicolumn{1}{c}{$J$}&
\multicolumn{1}{c}{$H$}&
\multicolumn{1}{c}{$K$}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{c}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{r}{(6)}&
\multicolumn{1}{c}{(7)}&
\multicolumn{1}{c}{(8)}&
\multicolumn{1}{c}{(9)}&
\multicolumn{1}{c}{(10)}&
\multicolumn{1}{c}{(11)}&
\multicolumn{1}{c}{(12)}&
\multicolumn{1}{c}{(13)}&
\multicolumn{1}{c}{(14)}&
\multicolumn{1}{c}{(15)}&
\multicolumn{1}{c}{(16)}&
\multicolumn{1}{c}{(17)}&
\multicolumn{1}{c}{(18)}&
\multicolumn{1}{c}{(19)}
}
\startdata
3C66A & 1 & 5784.410 & 0.129 & 5781.048 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q \\
& 2 & 6185.907 & 0.965 & 6187.048 & 7.0 & Q & & & & & & Q & Q & Q & Q & & & \\
& 3 & 4744.658 & 0.763 & 4744.000 & 7.0 & F & A & A & A & T & T & T & T & A & T & & & \\
& 4 & 5390.561 & 0.977 & 5479.999 & 7.0 & A & & & & & & A & A & A & A & F & F & A \\
0235+164 & 1 & 5087.774 & 0.052 & 5087.996 & 7.0 & Q & Q & & & Q & & T & T & T & & Q & & Q \\
& 2 & 5128.683 & 0.192 & 5130.009 & 7.0 & Q & & & & & & T & Q & Q & Q & Q & & Q \\
& 3 & 4729.762 & 0.393 & 4731.000 & 3.0 & F & T & A & A & A & A & F & F & F & & F & & \\
& 4 & 4758.502 & 0.970 & 4758.000 & 3.0 & F & F & A & A & F & A & F & F & F & & F & F & F \\
0336-019 & 1 & 4711.555 & 0.032 & 4714.500 & 5.5 & Q & & & & & & & T & Q & Q & & & \\
& 2 & 4917.231 & 0.109 & 4894.500 & 60.0 & Q & - & - & - & - & - & Q & Q & & & & & \\
& 3 & 5832.461 & 0.466 & 5831.644 & 7.0 & A & & & & & & T & A & T & T & & & \\
& 4 & 5858.888 & 0.016 & 5859.644 & 7.0 & F & & & & & & A & F & A & A & & & \\
0420-014 & 1 & 5124.447 & 0.469 & 5123.009 & 7.0 & Q & & & & & & T & T & T & Q & & & \\
& 2 & 5508.897 & 0.964 & 5512.509 & 32.5 & Q & Q & Q & Q & Q & Q & Q & Q & Q & & & & \\
& 3 & 5217.245 & 0.082 & 5214.009 & 7.0 & A & & & & & & F & F & F & F & & & \\
& 4 & 5899.334 & 0.015 & 5900.048 & 7.0 & A & & & & & & T & T & T & Q & & & \\
0528+134 & 1 & 5120.762 & 0.201 & 5122.000 & 7.0 & Q & & & & & & Q & Q & Q & T & Q & & \\
& 3 & 5825.600 & 0.407 & 5823.048 & 7.0 & A & & & & & & T & T & A & A & & & \\
0716+714 & 1 & 4882.182 & 0.371 & 4882.000 & 3.0 & Q & Q & & & & & Q & Q & Q & Q & T & Q & \\
& 2 & 5587.747 & 0.631 & 5588.000 & 3.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & & & \\
& 3 & 5859.502 & 0.529 & 5860.000 & 3.0 & A & T & T & T & T & T & T & T & T & & F & A & \\
& 4 & 6122.279 & 0.007 & 6183.000 & 3.0 & A & & & & & & F & F & A & A & & & \\
0735+178 & 1 & 5503.001 & 0.628 & 5501.009 & 7.0 & Q & Q & Q & Q & - & Q & Q & & Q & & T & T & T \\
& 2 & 6011.277 & 0.347 & 6012.048 & 7.0 & Q & & & & & & & T & A & T & & & \\
& 3 & 6070.398 & 0.244 & 6068.048 & 7.0 & A & F & A & A & - & A & A & A & A & & & & \\
0827+243 & 1 & 4767.528 & 0.501 & 4759.500 & 30.0 & Q & & & & & & Q & Q & Q & & & & \\
& 2 & 5503.630 & 0.365 & 5509.500 & 30.0 & Q & A & Q & T & Q & Q & & T & T & & A & A & A \\
& 3 & 6198.701 & 0.585 & 6201.041 & 7.0 & A & A & A & A & A & A & & A & F & & & & \\
& 4 & 6284.264 & 0.039 & 6285.041 & 7.0 & F & F & A & A & A & A & & & & & & & \\
0829+046 & 1 & 5663.736 & 0.006 & 5655.510 & 30.0 & Q & & & & & & T & Q & Q & Q & & & \\
& 2 & 6089.713 & 0.010 & 6090.541 & 30.0 & Q & A & - & & & - & & Q & & & & & \\
& 3 & 5234.339 & 0.020 & 5235.044 & 7.0 & A & & & & & & F & A & A & A & & & \\
0836+710 & 1 & 5624.396 & 0.024 & 5627.028 & 14.0 & Q & & & & & & Q & T & T & & & & \\
& 2 & 6020.937 & 0.011 & 6023.506 & 7.0 & Q & T & T & T & T & A & T & Q & & & & & \\
& 3 & 5869.336 & 0.348 & 5870.047 & 7.0 & F & T & T & & & & & & & & Q & Q & Q \\
& 4 & 5923.485 & 0.731 & 5926.047 & 7.0 & F & F & T & T & T & T & T & Q & A & & & & \\
OJ287 & 1 & 5296.542 & 0.837 & 5298.024 & 7.0 & Q & Q & T & T & T & T & T & T & T & T & Q & & Q \\
& 2 & 5340.494 & 0.852 & 5340.024 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & & Q \\
& 3 & 5129.847 & 0.567 & 5130.044 & 7.0 & A & A & T & T & T & T & T & T & T & T & A & & A \\
& 4 & 6038.508 & 0.833 & 6040.041 & 7.0 & A & & & & & & A & A & A & A & A & & A \\
0954+658 & 1 & 4766.685 & 0.918 & 4774.500 & 60.0 & Q & & & & & & Q & Q & Q & & Q & Q & Q \\
& 2 & 4781.697 & 0.006 & 4774.500 & 60.0 & Q & & & & & & & & & & Q & Q & Q \\
& 3 & 5636.232 & 0.384 & 5634.028 & 7.0 & A & & & & & & A & F & A & & & & \\
& 4 & 5667.827 & 0.539 & 5669.028 & 7.0 & F & & & & & & A & A & A & A & & & \\
1055+018 & 1 & 5305.329 & 0.571 & 5306.542 & 30.0 & Q & Q & - & - & - & - & T & Q & Q & & & & \\
& 2 & 6046.729 & 0.022 & 6047.028 & 7.0 & Q & & & & & & Q & Q & Q & - & & & \\
& 3 & 5664.801 & 0.007 & 5662.010 & 7.0 & A & & & & & & A & A & A & - & & & \\
& 4 & 5709.314 & 0.041 & 5711.010 & 7.0 & A & A & - & - & - & - & F & A & & & & & \\
Mkn421 & 1 & 5306.337 & 0.010 & 5305.011 & 7.0 & Q & & & & & & Q & Q & Q & & & & \\
& 2 & 5729.351 & 0.017 & 5732.028 & 7.0 & Q & & & & & & Q & Q & Q & & & & \\
& 3 & 5319.355 & 0.024 & 5319.011 & 7.0 & A & F & Q & Q & Q & & Q & Q & Q & & & & \\
& 4 & 6123.294 & 0.017 & 6124.028 & 7.0 & F & & & & & & A & A & A & & & & \\
1127-145 & 1 & 5193.997 & 0.214 & 5184.542 & 30.0 & Q & T & T & T & T & - & Q & - & & & & & \\
& 2 & 5926.442 & 0.353 & 5933.528 & 30.0 & Q & Q & T & & T & - & Q & & A & & A & & \\
1156+295 & 1 & 5674.348 & 0.030 & 5676.028 & 7.0 & Q & & & & & & Q & Q & Q & Q & & & \\
& 2 & 6038.659 & 0.785 & 6040.028 & 7.0 & Q & A & & - & & & T & A & A & T & & & \\
1219+285 & 1 & 5272.809 & 0.038 & 5270.011 & 7.0 & Q & A & T & T & Q & Q & Q & Q & & & & & \\
& 2 & 5988.436 & 0.151 & 5991.028 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & & & & \\
& 3 & 4877.816 & 0.010 & 4875.655 & 7.0 & A & T & A & A & A & A & A & A & & & & & \\
& 4 & 4884.913 & 0.014 & 4882.655 & 7.0 & A & F & A & A & A & A & A & A & & & & & \\
1222+216 & 1 & 5672.522 & 0.345 & 5675.992 & 7.0 & Q & T & Q & Q & Q & Q & Q & Q & Q & & & & \\
& 2 & 6025.625 & 0.011 & 6026.048 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & & & & & \\
& 3 & 5317.278 & 0.161 & 5319.009 & 7.0 & F & Q & & & & T & & & T & & & & \\
& 4 & 5369.145 & 0.223 & 5368.009 & 7.0 & F & Q & A & A & A & A & A & A & A & & & & \\
\\
3C273 & 1 & 5295.660 & 0.896 & 5298.000 & 7.0 & Q & T & & & & & Q & Q & Q & Q & Q & & \\
& 2 & 6045.359 & 0.491 & 6044.000 & 7.0 & Q & & & & & & F & T & T & Q & Q & Q & Q \\
& 3 & 5207.592 & 0.264 & 5206.000 & 7.0 & A & A & & & & & T & Q & & Q & T & & \\
& 4 & 5272.526 & 0.459 & 5276.000 & 7.0 & F & T & & & & & T & Q & Q & Q & A & & \\
3C279 & 1 & 4966.580 & 0.940 & 4969.042 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & & Q & & Q \\
& 2 & 6011.463 & 0.398 & 6009.504 & 7.0 & Q & T & Q & Q & Q & Q & T & Q & A & & & & \\
& 3 & 4898.744 & 0.798 & 4899.057 & 7.0 & A & Q & Q & Q & Q & Q & Q & Q & T & & T & A & T \\
& 4 & 5665.659 & 0.600 & 5669.028 & 7.0 & A & A & Q & Q & Q & Q & T & Q & A & T & A & & T \\
1308+326 & 1 & 5302.082 & 0.386 & 5305.011 & 7.0 & Q & Q & Q & & & & & & Q & & & & \\
1406-076 & 1 & 5294.737 & 0.007 & 5298.011 & 7.0 & Q & & & & & & T & Q & T & & Q & & \\
& 2 & 5354.102 & 0.646 & 5354.011 & 7.0 & Q & Q & A & Q & Q & T & Q & T & A & & & & \\
1510-089 & 1 & 5714.774 & 0.754 & 5718.028 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & & & & \\
& 2 & 6064.552 & 0.923 & 6068.028 & 7.0 & Q & T & Q & T & T & & Q & Q & T & Q & A & & \\
& 3 & 4918.487 & 0.476 & 4917.655 & 7.0 & F & T & T & T & T & T & A & A & A & A & A & & \\
& 4 & 5747.276 & 0.093 & 5746.028 & 7.0 & F & Q & Q & Q & Q & Q & Q & Q & T & & & & \\
1611+343 & 1 & 5252.722 & 0.341 & 5256.011 & 7.0 & Q & - & - & - & - & - & Q & T & & & & & \\
& 2 & 5832.201 & 0.419 & 5830.028 & 7.0 & Q & & & & & & Q & T & T & Q & & & \\
1622-297 & 1 & 4745.490 & 0.005 & 4758.155 & 30.0 & Q & & & & & & Q & Q & T & & Q & & Q \\
& 2 & 5350.951 & 0.728 & 5354.011 & 7.0 & Q & T & T & A & T & A & T & T & & & & & \\
& 3 & 5295.473 & 0.251 & 5298.011 & 7.0 & A & A & T & Q & Q & A & T & Q & T & & Q & & Q \\
1633+382 & 1 & 5400.397 & 0.762 & 5402.000 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & & & Q & Q & Q \\
& 2 & 6135.430 & 0.911 & 6137.000 & 7.0 & Q & Q & Q & Q & Q & Q & Q & T & Q & Q & & & \\
& 3 & 5744.449 & 0.387 & 5745.000 & 7.0 & F & F & A & A & A & A & A & F & F & F & & & \\
& 4 & 5034.519 & 0.212 & 5038.000 & 7.0 & A & T & A & A & A & T & T & T & A & & & & \\
3C345 & 1 & 5826.277 & 0.420 & 5820.528 & 18.5 & Q & & & & & & Q & Q & Q & Q & & & \\
& 2 & 6036.932 & 0.587 & 6044.528 & 44.0 & Q & & & & & & Q & Q & Q & Q & & & \\
& 3 & 5067.109 & 0.269 & 5067.042 & 7.0 & A & Q & Q & Q & Q & Q & Q & T & A & T & & & \\
& 4 & 5110.554 & 0.669 & 5109.042 & 7.0 & A & Q & T & T & T & T & T & T & A & T & & & \\
1730-130 & 1 & 4980.711 & 0.156 & 4983.022 & 7.0 & Q & & & & & & Q & T & Q & & Q & & Q \\
& 2 & 5376.704 & 0.005 & 5375.046 & 7.0 & Q & & & & & & A & Q & Q & & T & & T \\
& 3 & 5433.603 & 0.734 & 5431.046 & 7.0 & A & & & & & & F & F & F & & & & \\
& 4 & 5494.502 & 0.002 & 5494.046 & 7.0 & A & & & & & & F & F & A & & A & & A \\
1749+096 & 1 & 6070.825 & 0.092 & 6072.155 & 30.0 & Q & & & & & & & & A & & - & & \\
& 2 & 6135.326 & 0.125 & 6132.155 & 30.0 & Q & & & & & & Q & Q & A & T & & & \\
& 3 & 5427.240 & 0.185 & 5428.655 & 7.0 & A & T & & Q & & & Q & Q & F & A & & & \\
& 4 & 5502.790 & 0.803 & 5505.655 & 7.0 & A & A & Q & Q & Q & Q & Q & Q & A & & & & \\
BL Lacertae & 1 & 5033.523 & 0.419 & 5036.655 & 7.0 & Q & T & Q & Q & Q & Q & Q & Q & Q & & & & \\
& 2 & 5503.691 & 0.191 & 5505.655 & 7.0 & Q & T & Q & Q & Q & Q & Q & Q & Q & & & & \\
& 3 & 5707.822 & 0.078 & 5704.048 & 7.0 & F & T & A & A & A & A & A & A & & & & & \\
& 4 & 6029.555 & 0.163 & 6030.506 & 7.0 & A & T & A & A & A & A & A & A & A & & & & \\
3C446 & 1 & 5341.606 & 0.073 & 5351.155 & 30.0 & Q & - & - & & & - & A & T & & & & & \\
& 2 & 5825.797 & 0.775 & 5817.155 & 30.0 & Q & & & & & & A & A & & - & & & \\
CTA102 & 1 & 5126.709 & 0.047 & 5127.655 & 7.0 & Q & & & & & & Q & Q & Q & Q & & & \\
& 2 & 5828.375 & 0.696 & 5827.655 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & & & \\
& 3 & 6191.256 & 0.248 & 6194.030 & 7.0 & F & A & T & T & T & T & T & T & T & A & & & \\
& 4 & 6245.244 & 0.594 & 6243.030 & 7.0 & F & F & A & & & & A & A & A & F & & & \\
3C454.3 & 1 & 5729.702 & 0.840 & 5729.655 & 1.0 & Q & & & & & & & & Q & & & & \\
& 2 & 6180.576 & 0.836 & 6181.655 & 7.0 & Q & Q & Q & Q & Q & Q & Q & Q & Q & Q & & & \\
& 3 & 5167.194 & 0.340 & 5165.042 & 7.0 & F & F & A & A & A & A & A & A & A & & F & & A \\
& 4 & 5522.276 & 0.604 & 5522.042 & 7.0 & F & A & A & A & & & A & A & F & & F & & F \\
\enddata
\tablecomments{Activity States: Q - Quiescent; T - Transitory; A - Active; F - Flaring; Blank - No data; ``--'' - Insufficient number of observations to calculate a mean flux value.}
\label{tab:selecteddata}
\end{deluxetable}
\clearpage
\section{Computation of Spectral Indices}
\noindent \textit{Optical Spectral Index}
\label{sec:opticalsi}
In the optical bands, we fit the blazar spectrum by a power law of the form
\begin{equation}
\label{eqn:alpha}
S_{\nu} \propto \nu^{\alpha_{o}},
\end{equation}
where $S_{\nu}$ is the radiative flux density at frequency $\nu$ and $\alpha_{o}$\, is the spectral index at optical wavelengths. We note that the optical spectrum that we fit with a single power law can include multiple components (emission lines, BBB, synchrotron radiation), the implication of which will be discussed in Section \ref{Results}. To compute $\alpha_{o}$, we perform a weighted linear least-square fit using the IDL routine \texttt{LINFIT}, combining all data available in the UV$-$NIR range unless there is an obvious break in the power law in either the NIR or UV bands. We retrieve the slope and its error and report these as $\alpha_{o}$\, and $\sigma_{\alpha_{o}}$, respectively. Examples of the fit are shown in Figure \ref{fig:SI} for two objects.
Because we assume the model to be linear, testing the goodness of the fit to the model in the usual sense is not very meaningful in this case. The weighted $\chi^{2}$ statistic would be quite large given the small value of many of our uncertainties. To provide some measure of the ``goodness of fit," we compute the standard deviation of the data, $\sigma$, using
\begin{equation}
\label{eqn:stddev}
\sigma^{2} = \frac{1}{N-2}\Sigma(y_{i}-\bar{y})^2,
\end{equation}
where \textit{N} is the number of data points, $y_{i} = \log\;S_{\nu}$, and $\bar{y}$ is the computed best-fit value \citep{Bevington}, with two parameters determined from the fit.
\noindent \textit{X-Ray and Gamma-Ray Photon Indices}
\label{sec:xandgammasi}
Both the X-ray and $\gamma$-ray spectral indices are computed from the power-law photon index, $\Gamma$, as $\alpha = \Gamma + 1$. For $\gamma$-ray observations, $\Gamma_{\gamma}$ is derived differently depending upon whether the epoch corresponds to a quiescent or an active state. For quiescent epochs, we extract from the 2FGL catalog \citep{Nolan2FGL} the photon index and its uncertainty. (Note: the spectra of some sources were also fit with a log parabolic model, in which case the uncertainty in $\alpha_{\gamma}$ is not given in the 2FGL catalog and, therefore, is not listed in the table.) For active states, we calculate $\Gamma_{\gamma}$ values from the photon and spacecraft data (see Section \ref{sec:gammareduction}).
\noindent \textit{Broadband Spectral Slopes}
Two additional spectral indices are of interest to our study: the slope between optical and X-ray frequencies, $\alpha_{ox}$, and the slope between X-ray and $\gamma$-ray energies, $\alpha_{xg}$. We use the weighted mean of the fluxes in \textit{V} band for the optical emission. If no \textit{V}-band observations are available, preference is given to measurements in the \textit{R, J, B, UVM2}, or \textit{UVW1} bands, in that order. We use X-ray and $\gamma$-ray emission at 1 keV and 0.5 GeV, respectively, to represent the high energies.
The computed spectral indices for all objects are summarized in Table \ref{tab:seddata}: column 1 is the object name, column 2 is the identifying epoch number (corresponding to the number displayed on the light curve plot), column 3 is the date of the earliest observation (among X-ray - NIR measurements) within the epoch, columns 4$-$9 are $\alpha_{\gamma}$, $\alpha_{X}$, and $\alpha_{o}$, and their respective 1-$\sigma$ uncertainties, column 10 provides the number of UV$-$optical$-$NIR observations included in the computation of $\alpha_{o}$, and column 11 lists the standard deviation of the data relative to the best-fit line (the measurement of the ``goodness of fit" of the spectral slope for $\alpha_{o}$). Columns 12$-$15 are $\alpha_{ox}$\, and $\alpha_{xg}$\, and their respective 1-$\sigma$ uncertainties. Column 16 indicates the frequency band used in the computation of $\alpha_{ox}$\, if no \textit{V}-band observation is available.
\clearpage
\begin{deluxetable}{lcrrrrrrrrrrrrrc}
\rotate
\tablewidth{0pt}
\tabletypesize{\tiny}
\tablecolumns{16}
\tablecaption{Computed Spectral Indices}
\tablehead{
\multicolumn{1}{l}{Object}&
\multicolumn{1}{c}{Epoch}&
\multicolumn{1}{r}{Earliest Non-$\gamma$}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{\# UV-opt-}&
\multicolumn{1}{r}{Std. Dev.}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{}&
\multicolumn{1}{r}{$\alpha_{o}$}
\cr
\multicolumn{1}{l}{Name}&
\multicolumn{1}{c}{Number}&
\multicolumn{1}{r}{Obsv.in Epoch}&
\multicolumn{1}{r}{$\alpha_{\gamma}$}&
\multicolumn{1}{r}{$\sigma_{\alpha_{\gamma}}$}&
\multicolumn{1}{r}{$\alpha_{X}$}&
\multicolumn{1}{r}{$\sigma_{\alpha_{x}}$}&
\multicolumn{1}{r}{$\alpha_{o}$}&
\multicolumn{1}{r}{$\sigma_{\alpha_{o}}$}&
\multicolumn{1}{r}{NIR pts}&
\multicolumn{1}{r}{of Data}&
\multicolumn{1}{r}{$\alpha_{ox}$}&
\multicolumn{1}{r}{$\sigma_{\alpha_{ox}}$}&
\multicolumn{1}{r}{$\alpha_{xg}$}&
\multicolumn{1}{r}{$\sigma_{\alpha_{xg}}$}&
\multicolumn{1}{r}{Band}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{r}{(6)}&
\multicolumn{1}{r}{(7)}&
\multicolumn{1}{r}{(8)}&
\multicolumn{1}{r}{(9)}&
\multicolumn{1}{r}{(10)}&
\multicolumn{1}{r}{(11)}&
\multicolumn{1}{r}{(12)}&
\multicolumn{1}{r}{(13)}&
\multicolumn{1}{r}{(14)}&
\multicolumn{1}{r}{(15)}&
\multicolumn{1}{r}{(16)}
}
\startdata
3C66A & 1 & 5784.410 & -0.912 & & -1.559 & 0.253 & -1.292 & 0.002 & 14 & 0.007 & -1.503 & 0.026 & -0.780 & 0.012 & \\
& 2 & 6185.907 & -0.912 & & & & -1.044 & 0.019 & 6 & 0.022 & & & & & \\
& 3 & 4744.658 & -0.893 & 0.085 & -1.971 & 0.129 & -0.872 & 0.001 & 10 & 0.057 & -1.443 & 0.010 & -0.757 & 0.005 & \\
& 4 & 5390.561 & -0.746 & 0.098 & & & -0.811 & 0.004 & 8 & 0.059 & & & & & \\
0235+164 & 1 & 5087.774 & -1.124 & & -1.120 & 0.338 & -1.586 & 0.013 & 6 & 0.017 & -1.130 & 0.047 & -0.769 & 0.022 & \\
& 2 & 5128.683 & -1.124 & & & & -1.791 & 0.009 & 10 & 0.122 & & & & & \\
& 3 & 4729.762 & -0.990 & 0.078 & -1.237 & 0.460 & -1.726 & 0.003 & 8 & 0.084 & -1.409 & 0.051 & -0.674 & 0.024 & \\
& 4 & 4758.502 & -1.056 & 0.087 & -1.679 & 0.174 & -1.627 & 0.002 & 10 & 0.081 & -1.115 & 0.018 & -0.812 & 0.008 & \\
0336-019 & 1 & 4711.555 & -1.475 & 0.072 & & & -0.260 & 0.051 & 5 & 0.001 & & & & & \\
& 2 & 4917.231 & -1.475 & 0.072 & -0.924 & 0.677 & -0.366 & 0.030 & 4 & 0.022 & -1.154 & 0.063 & -0.860 & 0.029 & \\
& 3 & 5832.461 & -1.104 & 0.217 & & & -1.009 & 0.023 & 9 & 0.001 & & & & & \\
& 4 & 5858.888 & -1.225 & 0.130 & & & -0.948 & 0.023 & 4 & 0.007 & & & & & \\
0420-014 & 1 & 5124.447 & -1.298 & 0.028 & & & -1.330 & 0.025 & 11 & 0.003 & & & & & \\
& 2 & 5508.897 & -1.298 & 0.028 & -0.984 & 0.367 & -0.807 & 0.031 & 7 & 0.049 & -1.038 & 0.050 & -0.811 & 0.023 & \\
& 3 & 5217.245 & -0.870 & 0.132 & & & -1.146 & 0.073 & 6 & 0.007 & & & & & \\
& 4 & 5899.334 & -1.369 & 0.196 & & & -1.616 & 0.065 & 4 & 0.030 & & & & & \\
0528+134 & 1 & 5120.762 & -1.545 & & & & -0.719 & 0.030 & 9 & 0.025 & & & & & \\
& 3 & 5825.600 & -1.545 & & & & -0.446 & 0.029 & 7 & 0.039 & & & & & \\
0716+714 & 1 & 4882.182 & -1.077 & & -1.159 & 0.136 & -1.224 & 0.012 & 11 & 0.039 & -1.517 & 0.020 & -0.873 & 0.009 & \\
& 2 & 5587.747 & -1.077 & & -1.436 & 0.309 & -1.200 & 0.001 & 11 & 0.035 & -1.591 & 0.031 & -0.771 & 0.014 & \\
& 3 & 5859.502 & -0.962 & 0.086 & -1.450 & 0.119 & -1.231 & 0.001 & 11 & 0.082 & -1.489 & 0.013 & -0.737 & 0.006 & \\
& 4 & 6122.279 & -1.013 & 0.135 & & & -1.223 & 0.006 & 5 & 0.005 & & & & & \\
0735+178 & 1 & 5503.001 & -1.047 & 0.035 & -1.294 & 0.481 & -1.519 & 0.007 & 9 & 0.035 & -1.502 & 0.065 & -0.754 & 0.031 & R \\
& 2 & 6011.277 & -1.047 & 0.035 & & & -1.477 & 0.017 & 5 & 0.011 & & & & & \\
& 3 & 6070.398 & -1.374 & 0.248 & -1.223 & 0.379 & -0.975 & 0.006 & 7 & 0.033 & -1.246 & 0.037 & -0.808 & 0.017 & \\
0827+243 & 1 & 4767.528 & -1.674 & 0.070 & & & -0.548 & 0.070 & 6 & 0.010 & & & & & \\
& 2 & 5503.630 & -1.674 & 0.070 & -0.697 & 0.108 & -0.482 & 0.013 & 7 & 0.038 & -1.001 & 0.018 & -0.937 & 0.008 & \\
& 3 & 6198.701 & -1.268 & 0.229 & -0.577 & 0.095 & -0.890 & 0.011 & 3 & 0.000 & -1.080 & 0.014 & -0.801 & 0.007 & \\
& 4 & 6284.264 & -1.304 & 0.097 & -0.703 & 0.178 & -0.974 & 0.031 & 4 & 0.083 & -1.046 & 0.039 & -0.770 & 0.015 & UVM2 \\
0829+046 & 1 & 5663.736 & -1.181 & & & & -1.729 & 0.011 & 4 & 0.036 & & & & & \\
& 2 & 6089.713 & -1.181 & & -0.430 & 0.454 & -1.501 & 0.015 & 3 & 0.038 & -1.444 & 0.081 & -0.804 & 0.037 & \\
& 3 & 5234.339 & -1.217 & 0.273 & & & -1.596 & 0.011 & 5 & 0.006 & & & & & \\
0836+710 & 1 & 5624.396 & -1.948 & 0.073 & & & -0.629 & 0.039 & 4 & 0.001 & & & & & \\
& 2 & 6020.937 & -1.948 & 0.073 & -0.468 & 0.102 & -0.282 & 0.022 & 3 & 0.006 & -0.797 & 0.021 & -1.016 & 0.010 & \\
& 3 & 5869.336 & -1.607 & 0.081 & -0.438 & 0.095 & -0.904 & 0.114 & 3 & 0.003 & -0.766 & 0.014 & -0.790 & 0.007 & J \\
& 4 & 5923.485 & -1.609 & 0.172 & -0.451 & 0.085 & -0.453 & 0.023 & 5 & 0.067 & -0.714 & 0.013 & -0.928 & 0.006 & \\
OJ287 & 1 & 5296.542 & -1.232 & 0.043 & -1.259 & 0.163 & -1.338 & 0.002 & 19 & 0.075 & -1.426 & 0.017 & -0.863 & 0.008 & \\
& 2 & 5340.494 & -1.232 & 0.043 & -1.279 & 0.173 & -1.528 & 0.003 & 11 & 0.032 & -1.347 & 0.020 & -0.848 & 0.009 & \\
& 3 & 5129.847 & -1.392 & 0.176 & -0.885 & 0.069 & -1.582 & 0.002 & 12 & 0.038 & -1.339 & 0.010 & -0.821 & 0.005 & \\
& 4 & 6038.508 & -1.229 & 0.164 & & & -1.425 & 0.002 & 20 & 0.016 & & & & & \\
0954+658 & 1 & 4766.685 & -1.415 & 0.067 & & & -1.329 & 0.022 & 7 & 0.017 & & & & & \\
& 2 & 4781.697 & -1.415 & 0.067 & & & -1.242 & 0.062 & 3 & 0.022 & & & & & J \\
& 3 & 5636.232 & -1.076 & 0.218 & & & -1.805 & 0.020 & 16 & 0.116 & & & & & \\
& 4 & 5667.827 & -1.292 & 0.253 & & & -1.769 & 0.071 & 17 & 0.037 & & & & & \\
1055+018 & 1 & 5305.329 & -1.217 & 0.039 & -0.998 & 0.408 & -1.509 & 0.019 & 8 & 0.074 & -1.164 & 0.050 & -0.860 & 0.023 & \\
& 2 & 6046.729 & -1.217 & 0.039 & & & -1.438 & 0.015 & 5 & 0.001 & & & & & \\
& 3 & 5664.801 & -1.243 & 0.190 & & & -1.418 & 0.008 & 4 & 0.007 & & & & & \\
& 4 & 5709.314 & -1.434 & 0.252 & -0.718 & 0.179 & -1.581 & 0.009 & 6 & 0.023 & -1.248 & 0.023 & -0.799 & 0.011 & \\
Mkn421 & 1 & 5306.337 & -0.771 & 0.012 & & & -0.521 & 0.046 & 5 & 0.001 & & & & & \\
& 2 & 5729.351 & -0.771 & 0.012 & & & -0.575 & 0.055 & 4 & 0.000 & & & & & \\
& 3 & 5319.355 & -0.770 & 0.089 & -1.061 & 0.012 & -0.419 & 0.063 & 4 & 0.000 & -0.717 & 0.004 & -1.166 & 0.002 & \\
& 4 & 6123.294 & -0.747 & 0.046 & & & -0.587 & 0.024 & 4 & 0.000 & & & & & \\
1127-145 & 1 & 5193.997 & -1.697 & 0.051 & -0.388 & 0.111 & -0.646 & 0.012 & 4 & 0.049 & -1.120 & 0.021 & -0.953 & 0.010 & \\
& 2 & 5926.442 & -1.697 & 0.051 & -0.665 & 0.559 & -0.331 & 0.018 & 4 & 0.031 & -1.001 & 0.048 & -0.957 & 0.025 & J \\
1156+295 & 1 & 5674.348 & -1.295 & 0.027 & & & -1.112 & 0.043 & 5 & 0.018 & & & & & \\
& 2 & 6038.659 & -1.295 & 0.027 & -0.584 & 0.528 & -1.216 & 0.024 & 17 & 0.008 & -1.345 & 0.102 & -0.775 & 0.048 & \\
1219+285 & 1 & 5272.809 & -1.019 & 0.034 & -1.704 & 0.252 & -0.911 & 0.003 & 7 & 0.019 & -1.348 & 0.028 & -0.908 & 0.013 & \\
& 2 & 5988.436 & -1.019 & 0.034 & -1.622 & 0.440 & -1.264 & 0.004 & 7 & 0.009 & -1.554 & 0.043 & -0.837 & 0.020 & \\
& 3 & 4877.816 & -0.965 & 0.156 & -1.686 & 0.441 & -1.022 & 0.002 & 6 & 0.055 & -1.550 & 0.040 & -0.786 & 0.019 & \\
& 4 & 4884.913 & -1.470 & 0.205 & -1.776 & 0.170 & -0.973 & 0.002 & 6 & 0.049 & -1.402 & 0.016 & -0.848 & 0.008 & \\
1222+216 & 1 & 5672.522 & -1.231 & & -0.592 & 0.254 & -0.146 & 0.004 & 6 & 0.013 & -1.359 & 0.035 & -0.787 & 0.016 & \\
& 2 & 6025.625 & -1.231 & & -0.814 & 0.484 & -0.040 & 0.005 & 4 & 0.017 & -1.364 & 0.086 & -0.748 & 0.040 & \\
& 3 & 5317.278 & -0.982 & 0.035 & -0.828 & 0.237 & -0.305 & 0.009 & 3 & & -1.377 & 0.036 & -0.521 & 0.017 & R \\
& 4 & 5369.145 & -1.078 & 0.024 & -0.669 & 0.258 & -0.363 & 0.004 & 6 & 0.094 & -1.473 & 0.036 & -0.482 & 0.017 & \\
\\
3C273 & 1 & 5295.660 & -1.616 & & -0.658 & 0.043 & -0.458 & 0.004 & 8 & 0.024 & -1.236 & 0.006 & -1.035 & 0.003 & \\
& 2 & 6045.359 & -1.616 & & & & -0.564 & 0.070 & 4 & 0.041 & & & & & \\
& 3 & 5207.592 & -1.431 & 0.074 & -0.664 & 0.026 & -0.422 & 0.003 & 4 & 0.019 & -1.165 & 0.004 & -0.915 & 0.002 & \\
& 4 & 5272.526 & -1.492 & 0.088 & -0.693 & 0.044 & -0.494 & 0.003 & 9 & 0.010 & -1.223 & 0.005 & -0.898 & 0.003 & \\
3C279 & 1 & 4966.580 & -1.340 & & -0.797 & 0.131 & -1.696 & 0.007 & 12 & 0.040 & -0.924 & 0.017 & -0.862 & 0.008 & \\
& 2 & 6011.463 & -1.340 & & -0.550 & 0.178 & -1.578 & 0.008 & 12 & 0.102 & -1.115 & 0.028 & -0.895 & 0.013 & \\
& 3 & 4898.744 & -1.419 & 0.083 & -0.875 & 0.215 & -1.770 & 0.006 & 13 & 0.036 & -1.096 & 0.028 & -0.742 & 0.013 & \\
& 4 & 5665.659 & -1.908 & 0.152 & -0.665 & 0.092 & -1.747 & 0.005 & 16 & 0.054 & -1.081 & 0.014 & -0.763 & 0.006 & \\
1308+326 & 1 & 5302.082 & -1.222 & & -0.250 & 0.718 & -1.517 & 0.206 & 3 & 0.002 & -1.159 & 0.171 & -0.757 & 0.081 & R \\
1406-076 & 1 & 5294.737 & -1.429 & 0.064 & & & -0.851 & 0.042 & 4 & 0.045 & & & & & \\
& 2 & 5354.102 & -1.429 & 0.064 & -0.742 & 1.843 & -1.401 & 0.104 & 4 & 0.012 & -1.134 & 0.180 & -0.779 & 0.084 & \\
1510-089 & 1 & 5714.774 & -1.388 & & -0.489 & 0.587 & -0.628 & 0.008 & 8 & 0.022 & -1.213 & 0.083 & -0.727 & 0.039 & \\
& 2 & 6064.552 & -1.388 & & -0.835 & 0.422 & -0.721 & 0.006 & 14 & 0.041 & -1.150 & 0.073 & -0.770 & 0.034 & \\
& 3 & 4918.487 & -1.244 & 0.025 & -0.394 & 0.139 & -1.104 & 0.004 & 17 & 0.161 & -1.309 & 0.021 & -0.550 & 0.010 & \\
& 4 & 5747.276 & -1.268 & 0.046 & -0.585 & 0.146 & -0.710 & 0.007 & 9 & 0.026 & -1.201 & 0.021 & -0.573 & 0.010 & \\
1611+343 & 1 & 5252.722 & -1.307 & 0.171 & -0.443 & 0.578 & -0.461 & 0.059 & 4 & 0.003 & -1.208 & 0.092 & -0.920 & 0.042 & \\
& 2 & 5832.201 & -1.307 & 0.171 & & & -0.422 & 0.014 & 11 & 0.023 & & & & & \\
1622-297 & 1 & 4745.490 & -1.339 & 0.067 & & & -0.647 & 0.043 & 4 & 0.010 & & & & & \\
& 2 & 5350.951 & -1.339 & 0.067 & -0.397 & 0.557 & -0.466 & 0.026 & 5 & 0.026 & -1.283 & 0.056 & -0.791 & 0.026 & \\
& 3 & 5295.473 & -1.423 & 0.230 & -0.301 & 0.399 & -0.490 & 0.025 & 6 & 0.082 & -1.114 & 0.042 & -0.782 & 0.020 & \\
1633+382 & 1 & 5400.397 & -1.410 & & -0.637 & 0.546 & -0.698 & 0.018 & 6 & 0.096 & -1.073 & 0.064 & -0.760 & 0.029 & \\
& 2 & 6135.430 & -1.410 & & -0.859 & 0.581 & -0.885 & 0.031 & 8 & 0.084 & -1.055 & 0.090 & -0.777 & 0.042 & \\
& 3 & 5744.449 & -1.155 & 0.058 & -0.562 & 0.223 & -1.559 & 0.009 & 9 & 0.025 & -1.109 & 0.046 & -0.708 & 0.021 & \\
& 4 & 5034.519 & -1.270 & 0.084 & -1.118 & 0.446 & -1.211 & 0.020 & 4 & 0.116 & -1.052 & 0.044 & -0.721 & 0.020 & \\
3C345 & 1 & 5826.277 & -1.489 & 0.056 & & & -1.438 & 0.030 & 7 & 0.033 & & & & & \\
& 2 & 6036.932 & -1.489 & 0.056 & & & -1.493 & 0.062 & 7 & 0.005 & & & & & \\
& 3 & 5067.109 & -1.073 & 0.174 & -0.859 & 0.135 & -1.515 & 0.017 & 8 & 0.022 & -1.090 & 0.022 & -0.782 & 0.010 & \\
& 4 & 5110.554 & -1.319 & 0.334 & -0.578 & 0.246 & -1.291 & 0.024 & 5 & 0.027 & -1.193 & 0.028 & -0.770 & 0.013 & \\
1730-130 & 1 & 4980.711 & -1.488 & & & & -0.937 & 0.019 & 6 & 0.058 & & & & & \\
& 2 & 5376.704 & -1.488 & & & & -1.520 & 0.027 & 5 & 0.073 & & & & & \\
& 3 & 5433.603 & -1.440 & 0.103 & & & -2.385 & 0.134 & 4 & 0.006 & & & & & \\
& 4 & 5494.502 & -1.132 & 0.087 & & & -1.061 & 0.074 & 3 & 0.001 & & & & & \\
1749+096 & 1 & 6070.825 & -1.243 & & & & -1.536 & 0.012 & 7 & 0.030 & & & & & R \\
& 2 & 6135.326 & -1.243 & & & & -1.717 & 0.028 & 8 & 0.018 & & & & & \\
& 3 & 5427.240 & -1.267 & 0.198 & -0.422 & 0.179 & -1.767 & 0.025 & 9 & 0.060 & -1.404 & 0.026 & -0.766 & 0.012 & \\
& 4 & 5502.790 & -1.394 & 0.148 & -0.579 & 0.141 & -2.066 & 0.014 & 7 & 0.007 & -1.155 & 0.024 & -0.853 & 0.011 & \\
BL Lacertae & 1 & 5033.523 & -1.261 & & -0.957 & 0.182 & -1.745 & 0.005 & 9 & 0.012 & -1.350 & 0.019 & -0.854 & 0.009 & \\
& 2 & 5503.691 & -1.261 & & -0.854 & 0.112 & -1.694 & 0.006 & 8 & 0.021 & -1.323 & 0.015 & -0.884 & 0.007 & \\
& 3 & 5707.822 & -1.240 & 0.074 & -0.790 & 0.157 & -1.640 & 0.002 & 7 & 0.022 & -1.486 & 0.019 & -0.749 & 0.009 & \\
& 4 & 6029.555 & -1.070 & 0.083 & -0.913 & 0.083 & -1.619 & 0.002 & 7 & 0.052 & -1.506 & 0.010 & -0.772 & 0.005 & \\
3C446 & 1 & 5341.606 & -1.436 & 0.053 & 0.217 & 0.825 & -0.650 & 0.087 & 3 & 0.006 & -1.030 & 0.123 & -0.857 & 0.057 & \\
& 2 & 5825.797 & -1.436 & 0.053 & & & -0.679 & 0.025 & 4 & 0.006 & & & & & \\
CTA102 & 1 & 5126.709 & -1.538 & & & & -0.254 & 0.011 & 7 & 0.011 & & & & & \\
& 2 & 5828.375 & -1.538 & & -0.377 & 0.158 & -0.413 & 0.005 & 16 & 0.008 & -1.150 & 0.024 & -0.820 & 0.011 & \\
& 3 & 6191.256 & -1.006 & 0.034 & -0.616 & 0.084 & -1.108 & 0.005 & 18 & 0.034 & -1.098 & 0.014 & -0.619 & 0.007 & \\
& 4 & 6245.244 & -1.396 & 0.080 & -0.514 & 0.120 & -1.409 & 0.008 & 6 & 0.055 & -1.177 & 0.019 & -0.760 & 0.009 & \\
3C454.3 & 1 & 5729.702 & -1.379 & & -0.566 & 0.140 & -0.889 & 0.007 & 9 & 0.115 & -1.151 & 0.022 & -0.752 & 0.010 & \\
& 2 & 6180.576 & -1.379 & & -0.984 & 0.357 & -1.053 & 0.010 & 9 & 0.092 & -1.163 & 0.051 & -0.842 & 0.024 & \\
& 3 & 5167.194 & -1.344 & 0.023 & -0.584 & 0.039 & -1.352 & 0.001 & 9 & 0.031 & -0.972 & 0.006 & -0.749 & 0.003 & \\
& 4 & 5522.276 & -1.259 & 0.010 & -0.602 & 0.040 & -1.548 & 0.003 & 6 & 0.041 & -1.057 & 0.007 & -0.630 & 0.003 & \\
\enddata
\label{tab:seddata}
\end{deluxetable}
\clearpage
\section{Trends and Correlations of Spectral Indices}
\subsection{Distributions of Spectral Indices \label{Sdsi}}
Figure \ref{fig:histograms} presents distributions of the spectral indices $\alpha_{o}$, $\alpha_{X}$, and $\alpha_{\gamma}$, and the spectral index between these regions, $\alpha_{ox}$\, and $\alpha_{xg}$. We compute a mean of each spectral index from our selected epochs for each class in each state. The results are summarized in Table \ref{tab:prefvalues}. The standard deviation is a good indicator of the spread of the indices. We consider a deviation within $\pm$ 0.35 ($\sim 20\%$ of the approximate spread of all indices) to be a sufficiently narrow spread to indicate a ``preferred'' value for the index.
\begin{figure*}
\centering
\mbox{\
\subfloat{
\includegraphics[trim=0cm 0cm 0.1cm 0cm, clip=true,height=.28\linewidth, angle=0]{f7_a_histo_optical_color.eps}
\label{fig:histooptical}
}
\subfloat{
\includegraphics[trim=1.4cm 0cm 0.1cm 0cm, clip=true,height=.28\linewidth, angle=0]{f7_b_histo_xray_color.eps}
\label{fig:histoxray}
}
\subfloat{
\includegraphics[trim=1.4cm 0cm 0.1cm 0cm, clip=true,height=.28\linewidth, angle=0]{f7_c_histo_gamma_color.eps}
\label{fig:histogamma}
}
\subfloat{
\includegraphics[trim=1.4cm 0cm 0.1cm 0cm, clip=true,height=.28\linewidth, angle=0]{f7_d_histo_ox_color.eps}
\label{fig:histoox}
}
\subfloat{
\includegraphics[trim=1.4cm 0cm 0cm 0cm, clip=true,height=.28\linewidth, angle=0]{f7_e_histo_xg_color.eps}
\label{fig:histoxg}
}
}
\caption{Distributions of spectral indices for quiescent and active states:
\protect\subref{fig:histooptical} optical, \protect\subref{fig:histoxray} X-ray,
\protect\subref{fig:histogamma} $\gamma$-ray,
\protect\subref{fig:histoox} optical $-$ X-ray, and
\protect\subref{fig:histoxg} X-ray $-$ $\gamma$-ray.
FSRQs are plotted in red;
BL Lac objects in blue.
}%
\label{fig:histograms}
\end{figure*}
For $\alpha_{o}$, only BL Lacs in a quiescent state maintain a preferred value. For $\alpha_{X}$, both the quiescent and the active FSRQs exhibit small deviations, with a preferred value of $\sim$ $-$0.6, as expected if the X-ray emission is produced via inverse Compton scattering by relatively low energy electrons that also emit synchrotron emission at millimeter-submillimeter (mm-submm) wavelengths. Active BL Lacs have a significant scatter in $\alpha_{X}$, with some values as steep as $-2$. This can be explained by a synchrotron origin of the enhanced X-ray emission in some BL Lacs. Quiescent BL Lacs exhibit a preferred value of $-$1.2, which suggests that the quiescent X-ray emission is a mixture of IC and synchrotron emission.
Both quiescent and active states of both classes exhibit a preferred value of the $\gamma$-ray spectral index. The BL Lacs show little difference in $\alpha_{\gamma}$\, between quiescent and active states. \citet{ackermann2fgl} found a similar mean value for BL Lacs with a range from $-$0.90 to $-$1.17, depending upon the SED classification (LSP, ISP, HSP). The FSRQs show a modest flattening of $\alpha_{\gamma}$\, during active states. \citet{ackermann2fgl} computed a mean value for FSRQs of $-$1.42 $\pm$ 0.17 for a much larger sample, which falls between the average values of $\alpha_{\gamma}$\, during quiescent and active states.
Both quiescent and active states of both classes exhibit preferred values of the spectral index between the optical and X-ray and between the X-ray and $\gamma$-ray regimes. The preferred values of $\alpha_{ox}$\, change little within each class between states, while they are different for the two classes. The preferred values of $\alpha_{xg}$\, are similar for the BL Lacs and FSRQs within the 1$\sigma$ uncertainty, independent of the state.
\begin{deluxetable}{lrrrr}
\tabletypesize{\small}
\tablewidth{0pt}
\tablecaption{Mean Values of Spectral Indices}
\tablecolumns{5}
\tablehead{ \multicolumn{1}{l}{}&
\multicolumn{2}{c}{\hspace{20pt}Quiescent}&
\multicolumn{2}{c}{\hspace{20pt}Active}
\cr
\multicolumn{1}{l}{Spectral Index}&
\multicolumn{1}{r}{\hspace{20pt}BL Lac}&
\multicolumn{1}{r}{FSRQ}&
\multicolumn{1}{c}{\hspace{20pt}BL Lac}&
\multicolumn{1}{c}{FSRQ}
\cr
\multicolumn{1}{c}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{r}{(3)}&
\multicolumn{1}{r}{(4)}&
\multicolumn{1}{r}{(5)}
}
\startdata
$\alpha_{o}$ &&&&\\
Average Value & $-1.4$ & $-0.8$ & $-1.4$ & $-1.1$ \\
Standard Deviation & 0.3 & 0.4 & 0.4 & 0.5 \\
$\alpha_{X}$ &&&&\\
Average Value & $-1.2$ & $-0.60$ & $-1.2$ & $-0.63$ \\
Standard Deviation & 0.3 & 0.27 & 0.5 & 0.18 \\
$\alpha_{\gamma}$ &&&&\\
Average Value & $-1.12$ & $-1.46$ & $-1.13$ & $-1.31$ \\
Standard Deviation & 0.17 & 0.17 & 0.23 & 0.22 \\
$\alpha_{ox}$ &&&&\\
Average Value & $-1.40$ & $-1.13$ & $-1.32$ & $-1.11$ \\
Standard Deviation & 0.14 & 0.13 & 0.22 & 0.17 \\
$\alpha_{xg}$ &&&&\\
Average Value & $-0.83$ & $-0.84$ & $-0.81$ & $-0.73$ \\
Standard Deviation & 0.05 & 0.09 & 0.11 & 0.12
\enddata
\label{tab:prefvalues}%
\end{deluxetable}
\subsection{Change of Spectral Indices between States}
To study the change of spectral indices between states, we compute the difference between the spectral indices of quiescent and active states for each object (between the means of $\alpha$ in the cases of two quiescent and two active states identified). Histograms of these differences are presented in Figure \ref{fig:diff}. The FSRQs tend to have a separation between quiescent and active states in both optical and $\gamma$-ray spectra, while the differences between states for the BL Lacs tend to be equally distributed. Of the active FSRQs, 80\% have a flatter average $\gamma$-ray spectrum, with a weighted mean difference from the average quiescent spectrum of 0.16. (Some caution must be applied in this case, however, because $\Gamma_{\gamma}$ is allowed to vary for the active states, while we use a fixed value taken from the 2FGL catalog for each object in quiescent states.) \citet{2010ApJ...710.1271A} found a weak ``harder when brighter'' effect for all FSRQs and BL Lacs except the HSP subclass, as had been previously suggested by \citet{2009MNRAS.396L.105G} for both classes when comparing some measurements from \textit{Fermi} and EGRET. For our sample of blazars, a significant ``harder when brighter'' effect is seen in the $\gamma$-ray spectral index for FSRQs, but the BL Lacs show no propensity towards a flatter or steeper spectrum, nor is there any obvious trend with SED class.
Of the quiescent FSRQs, 73\% tend to have flatter optical spectra than during active states, while there is no statistical difference for $\alpha_{o}$\, of BL Lacs between the two states. The difference in
behavior of $\alpha_{o}$\, for FSRQs implies an important contribution of the emission from the accretion
disk (BBB) to the optical quiescent radiation, while accretion disk emission in BL Lacs seems to be too weak to play a significant role in the SED. In support of this latter point, the average value of $\alpha_{o}$\, of $\sim -$1.4 in active and quiescent BL Lacs indicates dominance of synchrotron emission during all states. This conforms with the prediction of \citet{2012MNRAS.420.2899G}, who simulated SEDs of blazars with a varying mix of
Doppler-boosted radiation from the jet with emission from the accretion disk, broad-line region, and
light from the host galaxy, and found strong dominance of the jet emission in BL Lacs.
The differences of the X-ray spectral indices of FSRQs between states are equally distributed with a negligible mean of 0.001, as is evident in Figure \ref{fig:diff}e. This suggests that the same mechanism(s) is (are) employed for the X-ray production in FSRQs, independent of the state.
In BL Lacs, the IC X-ray spectrum generally has a slope flatter than $-1$, whereas the slope is generally steeper for X-ray synchrotron radiation \citep[e.g.][]{Bregman1990}.
The very broad scatter of $\alpha_{X}$\,(quiescent) - $\alpha_{X}$\,(active) for BL Lacs indicates: (i) an increase in the contribution of synchrotron emission during active states for some BL Lacs (e.g., 3C66A, the largest
positive difference); (ii) flattening of $\alpha_{X}$\, at active states for another group of BL Lacs (e.g., OJ287, the largest negative difference) that corresponds to an increase of the contribution of IC emission; and (iii) no change of $\alpha_{X}$\, for the rest of BL Lacs. Although we cannot correlate the behavior with the SED subclasses of BL Lacs due to an insufficient amount of statistical data, the BL Lacs of the LSP type tend to have flatter X-ray spectra during active states.
\begin{figure}[t]
\centering
\includegraphics[height=.65\linewidth, angle=0]{f8_quiminusact_color.eps}
\caption{Distribution of difference of spectral indices between quiescent and active states for BL Lac objects ({\it left}, blue) and FSRQs ({\it right}, red), panels (a) and (d) for $\alpha_{o}$, (b) and (e) for $\alpha_{X}$, and (c) and (f) for $\alpha_{\gamma}$.}
\label{fig:diff}
\end{figure}
\subsection{Relationships Between Spectral Indices}
We examine relationships between the spectral indices at the different wavebands. Figures \ref{fig:gammavsoptical}, \ref{fig:gammavsxray}, \ref{fig:xrayvsoptical}, \& \ref{fig:xgvsox} show dependences between $\alpha_{\gamma}$\, and $\alpha_{o}$, $\alpha_{\gamma}$\, and $\alpha_{X}$, $\alpha_{X}$\, and $\alpha_{o}$, and between $\alpha_{ox}$\, and $\alpha_{xg}$, respectively, for all blazars in the sample. The complete set of all plots in color and labeled with object and epoch numbers can be found in an expanded version of this paper at \url{www.bu.edu/blazars/VLBAproject.html}. We have computed Spearman's rank correlation coefficients between different spectral indices for the entire sample, as well as for different classes and states. We have used the IDL routine \texttt{R\_Correlate} to test the significance of the correlation coefficients. The results are presented in Table \ref{tab:spearmanga}, with the number of data points in the computation and the rank correlation coefficient and its significance given for each relationship.
\noindent \textit{The $\alpha_{\gamma}$$-$$\alpha_{o}$\, Plane}: Figure \ref{fig:gammavsoptical} reveals a striking difference between the quiescent BL Lacs and FSRQs: a BL Lac object with a flatter $\alpha_{o}$\, has a flatter $\alpha_{\gamma}$\,, while for the quasars a modest anti-correlation between the indices is observed. The correlation analysis (Table \ref{tab:spearmanga}) confirms a highly significant positive correlation between $\alpha_{\gamma}$\, and $\alpha_{o}$\, of the BL Lacs independent of the state, and suggests a weak anti-correlation between $\alpha_{\gamma}$\, and $\alpha_{o}$\, of the quiescent FSRQs at $\sim$88.5\% confidence level. The latter effect disappears in active FSRQs. We associate flattening of $\alpha_{o}$\, in FSRQs with increasing importance of the BBB contribution to the optical emission when the synchrotron flux decreases. If we assume that a pure synchrotron optical spectral index correlates with $\alpha_{\gamma}$, as in the case of the BL Lacs, then the anti-correlated
behavior between $\alpha_{\gamma}$\, and $\alpha_{o}$\, for the quiescent FSRQs implies that quasars with a stronger BBB have a softer optical synchrotron spectrum. This is supported by the case of 3C273, in which the BBB dominates the optical-UV SED, while the synchrotron spectral index, as measured for the linearly polarized emission, is very steep, $-1.7$ to $-2.7$ \citep{Smith93}. However, the steep optical synchrotron index found for the quasar 3C454.3 during the prominent $\gamma$-ray outbursts, $\alpha_{o}^{syn}\sim -1.7$, is significantly steeper than $\alpha_\gamma\sim -$1.3 \citep{2013ApJ...773..147J}; this implies that relativistic electrons that emit IR synchrotron radiation rather than optical emission are responsible for $\gamma$-ray production.
\begin{figure*}[t]
\centering
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.45\textwidth, angle=0]{f9_a_gammaoptical2_color.eps}
}
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.45\textwidth, angle=0]{f9_b_aa_qq_gammaoptical2_color.eps}
}
\caption{Spectral indices $\alpha_{\gamma}$\,vs.\ $\alpha_{o}$\, at selected epochs (Section \ref{sec:composition}) for all blazars in the sample: FSRQs are red-filled circles in $\gamma$-ray active states, yellow triangles if quiescent, while BL Lacs are dark blue squares if $\gamma$-ray active, light blue if quiescent. Panels are: (a) all BL Lacs, (b) all FSRQs, (c) active BL Lacs and FSRQs, and (d) quiescent BL Lacs and FSRQs. [A combined plot with each data point labeled with object and epoch numbers is printed at the end of this manuscript. A complete set of individual plots, with each data point labeled with object and epoch numbers can be found in an expanded version of this paper at \url{www.bu.edu/blazars/VLBAproject.html}.]}
\label{fig:gammavsoptical}
\end{figure*}
\begin{figure*}
\centering
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.45\textwidth, angle=0]{f10_a_gammaxray2_color.eps}
\label{fig:gammavsxraybbff}
}
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.45\textwidth, angle=0]{f10_b_aa_qq_gammaxray2_color.eps}
\label{fig:gammavsxrayaaqq}
}
\caption{Spectral indices $\alpha_{\gamma}$\,vs.\ $\alpha_{X}$. Designations are the same as in Fig. \ref{fig:gammavsoptical}. }
\label{fig:gammavsxray}
\end{figure*}
\begin{figure*}
\centering
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.48\textwidth, angle=0]{f11_a_xrayoptical2_color.eps}
\label{fig:xrayvsopticalbbff}
}
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.48\textwidth, angle=0]{f11_b_aa_qq_xrayoptical2_color.eps}
\label{fig:xrayvsopticalaaqq}
}
\caption{Spectral indices $\alpha_{X}$\,vs $\alpha_{o}$. Designations are the same as in Fig. \ref{fig:gammavsoptical}. }
\label{fig:xrayvsoptical}
\end{figure*}
\begin{figure*}
\centering
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.5\textwidth, angle=0]{f12_a_xgox2_color.eps}
\label{fig:xgvsoxaaqq}
}
\subfloat{%
\includegraphics[trim=0cm 0cm 0cm 0cm, clip=true,height=.5\textwidth, angle=0]{f12_b_aa_qq_xgox2_color.eps}
\label{fig:xgvsoxbbff}
}
\caption{Spectral indices $\alpha_{xg}$\,vs $\alpha_{ox}$. Designations are the same as in Fig. \ref{fig:gammavsoptical}. }
\label{fig:xgvsox}
\end{figure*}
There are outliers in Figure \ref{fig:gammavsoptical} that are important to mention. Quasar 1730$-$130 at epoch 3 and BL Lac object 1749+096 at epoch 4
(both active states) have extremely steep optical spectra ($-2.4$ and $-2.1$, respectively), and a follow-up study of additional active epochs of these objects could be enlightening. Active epoch 4 of 3C279 has a steep $\gamma$-ray spectrum ($-1.9$), while all epochs of 1222+216 are located in the flat optical$-$flat $\gamma$-ray region of both the active and quiescent FSRQs.
\begin{deluxetable}{lrrrrrrrrrrrr}
\tabletypesize{\small}
\rotate
\tablewidth{0pt}
\tablecaption{Spearman's Rank Correlation ($\rho$)}
\tablecolumns{13}
\tablehead{ \multicolumn{1}{l}{}&
\multicolumn{3}{c}{$\alpha_{\gamma}$ and $\alpha_{o}$}&
\multicolumn{3}{c}{$\alpha_{\gamma}$ and $\alpha_{x}$}&
\multicolumn{3}{c}{$\alpha_{x}$ and $\alpha_{o}$}&
\multicolumn{3}{c}{$\alpha_{xg}$ and $\alpha_{ox}$}
\cr
\multicolumn{1}{l}{}&
\multicolumn{1}{r}{n}&
\multicolumn{1}{c}{$\rho$}&
\multicolumn{1}{c}{Signif.}&
\multicolumn{1}{r}{\hspace{24pt}n}&
\multicolumn{1}{c}{$\rho$}&
\multicolumn{1}{c}{Signif.}&
\multicolumn{1}{r}{\hspace{24pt}n}&
\multicolumn{1}{c}{$\rho$}&
\multicolumn{1}{c}{Signif.}&
\multicolumn{1}{r}{\hspace{24pt}n}&
\multicolumn{1}{c}{$\rho$}&
\multicolumn{1}{c}{Signif.}
\cr
\multicolumn{1}{l}{(1)}&
\multicolumn{1}{r}{(2)}&
\multicolumn{1}{c}{(3)}&
\multicolumn{1}{c}{(4)}&
\multicolumn{1}{r}{(5)}&
\multicolumn{1}{c}{(6)}&
\multicolumn{1}{c}{(7)}&
\multicolumn{1}{r}{(8)}&
\multicolumn{1}{c}{(9)}&
\multicolumn{1}{c}{(10)}&
\multicolumn{1}{r}{(11)}&
\multicolumn{1}{c}{(12)}&
\multicolumn{1}{c}{(13)}
}
\startdata
BL Lac Quiescent & 24 & 0.572 & 0.004 & 13 & -0.776 & 0.002 & 13 & -0.676 & 0.011 & 13 & -0.269 & 0.374 \\
BL Lac Active & 22 & 0.473 & 0.026 & 14 & -0.442 & 0.114 & 14 & -0.631 & 0.016 & 14 & -0.732 & 0.003 \\
All BL Lacs & 46 & 0.504 & 3.6E-04 & 27 & -0.556 & 0.003 & 27 & -0.648 & 2.6E-04 & 27 & -0.395 & 0.041 \\
& & & & & & & & & & & & \\
FSRQ Quiescent & 40 & -0.253 & 0.115 & 24 & -0.055 & 0.799 & 24 & 0.105 & 0.625 & 24 & -0.437 & 0.033 \\
FSRQ Active & 28 & 0.029 & 0.883 & 21 & -0.239 & 0.297 & 21 & 0.113 & 0.626 & 21 & -0.458 & 0.037 \\
All FSRQ & 68 & -0.258 & 0.034 & 45 & -0.134 & 0.379 & 45 & 0.078 & 0.609 & 45 & -0.289 & 0.054 \\
& & & & & & & & & & & & \\
All Quiescent & 64 & -0.445 & 2.3E-04 & 37 & -0.594 & 1.1E-04 & 37 & 0.405 & 0.013 & 37 & -0.238 & 0.156 \\
All Active & 50 & 0.086 & 0.552 & 35 & -0.428 & 0.010 & 35 & 0.060 & 0.731 & 35 & -0.216 & 0.212 \\
All & 114 & -0.256 & 0.006 & 72 & -0.499 & 8.3E-06 & 72 & 0.233 & 0.049 & 72 & -0.180 & 0.129 \\
\enddata
\tablecomments{\textit{n}: number of indices included in the computation; \textit{$\rho$}: rank correlation coefficient; \textit{Signif}: the two-sided significance level.}
\label{tab:spearmanga}%
\end{deluxetable}
\noindent \textit{The $\alpha_{\gamma}$$-$$\alpha_{X}$\, Plane}: Figure \ref{fig:gammavsxray} shows a distinct separation in the $\alpha_{\gamma}$\, $-$ $\alpha_{X}$\, plane for the two classes of blazars, with only a slight overlap. This is obviously driven by the separation of X-ray spectral index values between classes as discussed in \S\ref{Sdsi}. Combining classes yields strong anti-correlations for both active (Fig.\ \ref{fig:gammavsxray}c) and quiescent (Fig.\ \ref{fig:gammavsxray}d) states. Quiescent BL Lacs show a strong anti-correlation between $\alpha_{\gamma}$\, and $\alpha_{X}$, that becomes very weak for active BL Lacs (Table~\ref{tab:spearmanga}). In general, for a blazar in our sample, steeper $\alpha_{X}$\, pairs with flatter $\alpha_{\gamma}$. Within IC mechanisms for $\gamma$-ray production, this suggests that for sources with a synchrotron origin of X-rays (fully or partly), lower-energy relativistic electrons participate in $\gamma$-ray production (those that generate IR-optical synchrotron emission), while for sources with X-rays via IC mechanisms, higher-energy relativistic electrons should be involved in 0.1$-$200 GeV $\gamma$-ray production (those that produce optical-UV synchrotron emission).
There are outliers in the $\alpha_{\gamma}$\, $-$ $\alpha_{X}$\, plane that include three BL Lacs that are well known TeV sources:
1219+285, 3C66A, and Mkn421. Among the FSRQs, the quasars 3C279 and 0836+710 are distinguished by the steepness of their $\gamma$-ray spectra. Additionally, the first quiescent epoch of 3C446 is isolated in the region of flat X-ray spectra ($\alpha_{X}$\, = 0.22), although the uncertainty in the index is high.
\noindent \textit{The $\alpha_{X}$$-$$\alpha_{o}$\, Plane}: Figure \ref{fig:xrayvsoptical}a shows
a strong anti-correlation between $\alpha_{X}$\, and $\alpha_{o}$\ for BL Lacs, independent of activity state, with a high confidence level (see Table~\ref{tab:spearmanga}). According to the discussion in \S\ref{Sdsi}, values of $\alpha_{o}$\, of the BL Lacs should represent pure synchrotron spectra. The observed anti-correlation and steepness of $\alpha_{X}$, up to $-$2.0, imply that in BL Lacs with the hardest optical spectra, the X-ray emission is produced via the synchrotron mechanism. These are the TeV sources Mkn421, 1219+285 and 3C66A mentioned above. As the optical spectrum softens, the contribution from IC mechanisms to the X-ray emission increases. In general, there is no overlap between the BL Lacs and FSRQs in Figures~\ref{fig:xrayvsoptical}(c,d), since the FSRQs have flatter values of $\alpha_{o}$, indicating the presence of the BBB, and uniformly flat values of $\alpha_{X}$\, that point to IC mechanisms for X-ray production. However, some active BL Lacs with the flattest $\alpha_{X}$\, form a continuation of the sequence of active FSRQs into the steepest $\alpha_{o}$\, values. These are among the brightest BL Lacs at radio wavelengths, 1749+096, BL Lacertae, 1055+018 and OJ287. Three quiescent quasars with the steepest $\alpha_{o}$\, values form a continuation of the quiescent BL Lac sequence into the flattest $\alpha_{X}$\, values (3C~279, 1308+326, and 1406$-$076), which most likely have weaker BBB emission with respect to the jet emission than for the other FSRQs.
\noindent \textit{The $\alpha_{ox}$$-$$\alpha_{xg}$\, Plane}: An anti-correlation is expected in this plane if 1) the X-ray flux varies with much higher amplitude than do the optical and $\gamma$-ray fluxes, or 2) the optical and $\gamma$-ray fluxes vary in unison while the X-ray flux is relatively stable in many of the sources. Neither case commonly occurs (see Table \ref{table:statedata}). According to Table~\ref{tab:spearmanga} there is a statistically significant anti-correlation between $\alpha_{ox}$\, and $\alpha_{xg}$\, for active BL Lacs. However, the anti-correlation is driven by the spectral indices of Mkn~421,
which is the only HSP source in our sample. The rest of the BL Lacs show very small scatter in the values of $\alpha_{xg}$, with slightly flatter values during active states. Table~\ref{tab:prefvalues} shows that
the average values of $\alpha_{xg}$\, of FSRQs are similar to those of BL Lacs. The stability of $\alpha_{xg}$\ follows from the high ratio of $\gamma$-ray to X-ray frequencies, the logarithm of which is in the denominator of the X-ray -- $\gamma$-ray spectral index calculation. In this context, the line of active quasars in Figures~\ref{fig:xgvsox}b,c with $\alpha_{xg}$\, flatter than $-$0.7 is especially interesting, since these are the
quasars with the strongest amplitude of $\gamma$-ray activity: 1222+216, 1510-089, CTA102, 3C454.3, and 0836+710 (see Figure \ref{fig:pernorm}). The line shows a clear anti-correlation between $\alpha_{ox}$\, and $\alpha_{xg}$, which corresponds to case 2 above and implies that the $\gamma$-ray and optical fluxes have significantly larger amplitudes of variation than that of the X-ray emission. This is not expected if the SSC mechanism
is responsible for both the X-ray and $\gamma$-ray emission, since in this case the value of $\alpha_{xg}$\, should remain stable across activity states. The significant difference in the amplitude
of X-ray and $\gamma$-ray activity might be caused by different seed photons being scattered by the relativistic electrons: synchrotron from the jet for X-rays (SSC) and external for $\gamma$-rays (EC).
Alternatively, the X-ray variations could be smoothed out by longer timescales of energy losses of the relatively low-energy electrons participating in IC X-ray production. There is a clear separation between the BL Lacs and FSRQs with respect to values of $\alpha_{ox}$, especially for the quiescent blazars (Figure \ref{fig:xgvsox}d): the FSRQs possess flatter $\alpha_{ox}$\ values than those of BL Lacs. This supports the conclusion that different X-ray emission mechanisms operate in the BL Lacs and FSRQs, as pointed out in the analysis of the $\alpha_{X}$$-$$\alpha_{o}$\ plane.
\section{Discussion: Implications for Emission Models}
\label{Results}
The analysis of spectral indices in each waveband and the relationship between these indices allow us to describe a ``typical'' BL Lac object or FSRQ and contrast the results by activity state within each class. Table \ref{tab:typical} summarizes statistically significant results from this exercise.
\begin{deluxetable}{lcccc}
\tabletypesize{\small}
\tablewidth{0pt}
\tablecaption{``Typical" Quiescent or Active Object}
\tablecolumns{5}
\tablehead{ &
\multicolumn{2}{c}{``Typical'' BL Lac} &
\multicolumn{2}{c}{``Typical'' FSRQ}
\cr
\multicolumn{1}{l}{}&
\multicolumn{1}{c}{Quiescent}&
\multicolumn{1}{c}{Active}&
\multicolumn{1}{c}{Quiescent}&
\multicolumn{1}{c}{Active}
\cr
\multicolumn{1}{c}{(1)}&
\multicolumn{1}{c}{(2)}&
\multicolumn{1}{c}{(3)}&
\multicolumn{1}{c}{(4)}&
\multicolumn{1}{c}{(5)}
}
\startdata
\multicolumn{5}{l}{Mean value:}\\
\hspace{8pt}$\alpha_{o}$ & $-1.4 \pm 0.3$ & high dispersion & high dispersion & high dispersion \\
\hspace{8pt}$\alpha_{X}$ & $-1.2 \pm 0.3$ & high dispersion & $-0.60 \pm 0.27$ & $-0.63 \pm 0.18$ \\
\hspace{8pt}$\alpha_{\gamma}$ & $-1.12 \pm 0.17$ & $-1.13 \pm 0.23$ & $-1.46 \pm 0.17$ & $-1.31 \pm 0.22$ \\
\hspace{8pt}$\alpha_{ox}$ & $-1.40 \pm 0.14$ & $-1.32 \pm 0.22$ & $-1.13 \pm 0.13$ & $-1.11 \pm 0.17$ \\
\hspace{8pt}$\alpha_{xg}$ & $-0.83 \pm 0.05$ & $-0.81 \pm 0.11$ & $-0.84 \pm 0.09$ & $-0.73 \pm 0.12$ \\
\cr
\cr
\multicolumn{5}{l}{Correlation probability:}\\
\hspace{8pt}$\alpha_{\gamma}$\, and $\alpha_{o}$ & 99.6\% & 97.4\% & 88.5\% (anti) & ns \\
\hspace{8pt}$\alpha_{\gamma}$\, and $\alpha_{X}$ & 99.8\% (anti) & 88.6\% (anti) & ns & ns \\
\hspace{8pt}$\alpha_{X}$\, and $\alpha_{o}$ & 98.9\% (anti) & 98.4\% (anti) & ns & ns \\
\hspace{8pt}$\alpha_{ox}$\, and $\alpha_{xg}$ & ns & 99.7\% (anti) & 96.7\% (anti) & 96.3\% (anti) \\
\cr
Percentage time in state: & $55 \pm 20\%$ & $9 \pm 4\%$ & $65 \pm 15\%$ & $10 \pm 8\%$\\
\multicolumn{5}{l}{Longest uninterrupted period:}\\
\hspace{8pt}Average number of days&216 &43 & 217 & 30\\
\multicolumn{2}{l}{Normalized amplitude of $\gamma$-ray variations:}& $5.2 \pm 2.0$ && $10 \pm 12$
\enddata
\tablecomments{\textit{ns}: not significant.}
\label{tab:typical}%
\end{deluxetable}
Our findings suggest that the optical emission of a ``typical'' BL Lac object is strongly dominated by synchrotron radiation at any state, independent of SED classification. This implies that any emission from the accretion disk is weak in BL Lacs, consistent with the polarimetry of BL Lacs showing no evidence for the wavelength-dependent polarization expected when the essentially unpolarized BBB contributes substantially to the optical-UV emission \citep[e.g.,][]{SmithSitko1991,Smith1996}.
The X-ray emission from BL Lacs is a mixture of synchrotron and IC radiation. The statistically significant correlation between $\alpha_o$ and $\alpha_X$ implies that the contribution of IC emission to the observed X-rays increases as the optical spectrum softens, especially for active BL Lacs.
The optical and $\gamma$-ray spectral indices are correlated at $>$ 97\% confidence level. No difference in values of $\alpha_{\gamma}$\, between quiescent and active states is observed, which implies that the same mechanism is responsible for quiescent and flaring $\gamma$-ray emission. The modest amplitude of $\gamma$-ray activity, with small scatter across the BL Lac sample, favors the SSC mechanism for $\gamma$-ray production, while slightly flatter values of $\alpha_{\gamma}$\, relative to $\alpha_{o}$\, imply that relativistic electrons radiating at both optical and IR wavelengths are involved.
A ``typical'' FSRQ has a flatter optical spectrum in quiescent than in active states, which can be attributed to the importance of the contribution of the BBB to the optical-UV continuum \citep[e.g.,][]{SMITH88, Giommi12a}. The wide dispersion of optical spectral indices is then due to diversity in the relative strength of the BBB among FSRQs rather than to variations in the slope of their synchrotron spectra. We anticipate that once the BBB component is subtracted, the residual synchrotron spectral index will show a smaller scatter in $\alpha_{o}$, as in BL Lacs, and also as is the case for $\alpha_{\gamma}$\, for both the BL Lacs and FSRQs. A modest
anti-correlation between $\alpha_{\gamma}$\, and $\alpha_{o}$\, for the quiescent FSRQs implies a possible connection between the properties of the BBB and jet if the anti-correlation is driven by the contribution of the BBB to the optical emission. The latter is probable, since the anti-correlation disappears during active states. In this scenario, a quasar with a stronger BBB has softer optical synchrotron and $\gamma$-ray spectra in quiescent states. The $\gamma$-ray spectrum of an FSRQ flattens during active states, which
implies more efficient acceleration of relativistic electrons if the $\gamma$-rays originate via IC mechanisms. This should cause flattening of the optical synchrotron spectra during active states as well. However, to test such an assumption and a possible connection between BBB and jet properties, pure synchrotron optical spectra of FSRQs should be extracted from the observations by subtracting the BBB spectrum from the continuum.
We find a uniform preferred value of $\alpha_{X}$\, $\sim-$0.6, among the FSRQs that is the same as the average spectral index of blazars measured at wavelengths of 0.8 to 4 mm \citep{Giommi12a}. This supports the hypothesis that IC scattering from relativistic electrons emitting synchrotron radiation at mm-submm wavelengths is responsible for X-ray production in a typical FSRQ, independent of the activity state. Whether the X-rays are from the SSC or EC mechanism, or a combination of the two, might depend on the blazar and its activity state.
The large dispersion in the amplitude of $\gamma$-ray activity, and the anti-correlated behavior between
$\alpha_{xg}$\, and $\alpha_{ox}$\, for the FSRQs displaying the highest amplitude of $\gamma$-ray outbursts, require different mechanisms
of $\gamma$-ray production during different activity states. There is most likely a mixture of SSC and EC emission, with a dominance of external IC during the highest $\gamma$-ray states, as has been modeled for some blazars \cite[e.g.,][]{BON11,ANN12}.
\section{Summary}
\label{summary}
We have assembled---and de-reddened at NIR, optical and UV wavelengths---observational measurements obtained from 2008 through 2012 of 33 blazars by ten ground- and space-based observatories.
We have computed a mean flux value for each frequency band for each source and used these values to determine whether the object was in a quiescent or active state in each band. The state of the object in the $\gamma$-ray band was the basis for defining quiescent and active periods. The frequency and length of quiescent and active periods, and the maximum flux achieved during active periods, were compared between the BL Lacs and FSRQs. Up to four epochs per source were selected for further analysis of spectral indices at $\gamma$-ray, X-ray, and, optical wavelengths. All IR through X-ray observations selected for an epoch were obtained within a 24-hour period, with an average span of 9.0 hours.
We find significant diversity in the properties of the BL Lacs and FSRQs in each spectral regime analyzed:
\begin{enumerate}
\item The FSRQs exhibit the highest amplitude of $\gamma$-ray activity, while the duration of an average active period in the source frame is similar for the FSRQs and BL Lacs. On the other hand, the fraction of time when a quasar is dormant exceeds that of a BL Lac object by $\sim$10\%, with less scatter.
\item Comparison of the behavior of $\alpha_{o}$\, between activity states suggests weak accretion disk emission in the BL Lacs, while the contribution of the BBB to the optical emission of the FSRQs dominates quiescent states.
\item The lack of significant variations in $\gamma$-ray spectral indices of the BL Lacs between activity states, the relatively low ratio of $\gamma$-ray to synchrotron luminosity, and the good correlation between
$\alpha_{\gamma}$\, and $\alpha_{o}$, implies that the same inverse Compton mechanism --- most likely SSC --- is responsible for the $\gamma$-ray production at different activity states.
\item The anti-correlation between $\alpha_{xg}$\, and $\alpha_{ox}$\, for the FSRQs during the most extreme activity at $\gamma$-ray energies suggests that the SSC mechanism is insufficient to explain the enhanced $\gamma$-ray flux in these objects. Hence, the EC mechanism for $\gamma$-ray (but not necessarily X-ray) production is favored by the data.
\item The analysis of X-ray spectral indices indicates that the X-ray emission of the BL Lacs is a mixture of synchrotron and inverse Compton radiation. IC scattering dominates during active states of the LSP BL Lacs, while IC scattering by $<$ 1 GeV electrons can explain the entire X-ray emission of the FSRQs at any state.
\end{enumerate}
The relationships among the various spectral indices therefore imply strong connections between the emission at pairs of wavebands: mm-submm and X-ray for FSRQs and LSP BL Lacs, optical and X-ray for ISP and HSP BL Lacs, and IR-optical and $\gamma$-ray for FSRQs and LSP BL Lacs. These connections should be apparent in timing studies of multi-waveband light curves of blazars. We are in the process of compiling such light curves over a sufficiently long time span ($\sim 5$ years) to test whether the predictions of such correlations are fulfilled.
\acknowledgments
We thank the anonymous referee for providing valuable comments and suggestions that improved several sections of the paper. The data acquisition and analysis for this study was supported by National Science Foundation grant AST-0907893, NASA Fermi Guest Investigator grants NNX08AV65G, NNX09AT99G, NNX10AO59G, NNX10AV15G, NNX11AO37G, NNX11AQ03G, NNX12AO90G, and NASA Swift Guest Investigator grants NNX09AR11G, NNX10AL13G, NNX10AF88G, NNX12AF09G, and NNX12AE90G. The effort at Steward Observatory was
funded in part by NASA through Fermi Guest Investigator grants NNX08AW56G, NNX09AU10G, and NNX12AO93G. The St. Petersburg State University team acknowledges support from RFBR grants 12-02-00452 and 12-02-31193.
The research at the IAA-CSIC is supported by the Spanish Ministry of Economy and Competitiveness and the Regional Government of Andaluc\'{i}a (Spain) through grants AYA2010-14844 and P09-FQM-4784, respectively. The {\it Swift} effort at PSU is supported by NASA contract NAS5-00136. The PRISM camera at
Lowell Observatory was developed by K.\ Janes et al. at BU and Lowell Observatory, with funding from
the NSF, BU, and Lowell Observatory. The Liverpool Telescope is operated on the island of La Palma by Liverpool John Moores University in the
Spanish Observatorio del Roque de los Muchachos of the Instituto de Astrofisica de Canarias, with funding
from the UK Science and Technology Facilities Council.
The Calar Alto Observatory is jointly operated by the Max-Planck-Institut f\"ur Astronomie and the Instituto de
Astrof\'{\i}sica de Andaluc\'{\i}a-CSIC. This study is partly based on data taken and assembled by the WEBT collaboration and stored in the WEBT archive at the Osservatorio Astronomico di Torino - INAF (http://www.oato.inaf.it/blazars/webt/).
{\it Facilities:} \facility{Perkins}, \facility{Liverpool:2m}, \facility{CAO:2.2m}, \facility{Bok}, \facility{SO:Kuiper}, \facility{CTIO:1.3m}, \facility{Swift}, \facility{FERMI (LAT)}
\bibliographystyle{apj}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 4,004 |
Cremona violins occupy a unique and storied place in violin history. This book contains a brief account of that history - the rise and fall of the Cremonese art of violin making that dominated over two centuries. It is primarily devoted, however, to the physics behind violin acoustics, specifically the research of William F "Jack" Fry over the past several decades. The gradual evolution of his ideas leading to a holistic approach is chronicled, in sharp contrast to the conventional "reductionist" analysis. With rare insights, he has come closer than anyone before in reproducing the tonal qualities of the great Italian masters. This historic achievement makes the book extremely valuable for violin makers and violin researchers, enabling young and aspiring violinists to own excellent sounding instruments with the acoustical marvels of the old at affordable prices.
The accompanying video features Fry's demonstration of how and why minute changes in thickness graduations make predictable changes in tonal qualities of an instrument. | {
"redpajama_set_name": "RedPajamaC4"
} | 668 |
Q: RPI 3, Python: How do I play and record a sine wave at the same time? I've previously used the sounddevice package which has a playrec function, but it does not release memory which makes the program freeze after a while. It also creates cracling noises with my new Asus Xonar U7 USB sound card. Is there a different way to create, play and record sine waves?
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 131 |
Falkville és una població dels Estats Units a l'estat d'Alabama. Segons el cens del 2000 tenia una població de 1.202 habitants.
Demografia
Segons el cens del 2000, Falkville tenia 1.202 habitants, 365 habitatges, i 254 famílies. La densitat de població era de 126,1 habitants/km².
Dels 365 habitatges en un 27,9% hi vivien nens de menys de 18 anys, en un 55,6% hi vivien parelles casades, en un 10,4% dones solteres, i en un 30,4% no eren unitats familiars. En el 26,8% dels habitatges hi vivien persones soles el 12,6% de les quals corresponia a persones de 65 anys o més que vivien soles. El nombre mitjà de persones vivint en cada habitatge era de 2,42 i el nombre mitjà de persones que vivien en cada família era de 2,94.
Per edats la població es repartia de la següent manera: un 16,6% tenia menys de 18 anys, un 8,7% entre 18 i 24, un 20,7% entre 25 i 44, un 21% de 45 a 60 i un 32,9% 65 anys o més.
L'edat mediana era de 49 anys. Per cada 100 dones hi havia 71,5 homes. Per cada 100 dones de 18 o més anys hi havia 71,3 homes.
La renda mediana per habitatge era de 34.583 $ i la renda mediana per família de 40.759 $. Els homes tenien una renda mediana de 29.231 $ mentre que les dones 23.365 $. La renda per capita de la població era de 13.510 $. Aproximadament el 5,5% de les famílies i l'11,6% de la població estaven per davall del llindar de pobresa.
Poblacions properes
El següent diagrama mostra les poblacions més properes.
Referències
Pobles d'Alabama
Comtat de Morgan (Alabama) | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 3,131 |
Seznam svazů alpínské a subalpínské vegetace v Česku je zpracován (včetně pojetí syntaxonů) dle publikace Chytrý a kol. (2007) a představuje přehled svazů (typů rostlinných společenstev) řazených do alpínské a subalpínské vegetace na území Česka.
Přehled je zpracován pomocí fytocenologických jednotek hlavní úrovně (ranku), kdy nejnižší hlavní jednotkou je asociace, jí nadřazený je pak svaz, nad svazem je řád (pro zjednodušení nejsou zde řády uvedeny) a nejvyšší jednotkou je třída. Vědecký název syntaxonu se řídí podle závazných pravidel, která jsou uvedena v mezinárodním kódu fytocenologické nomenklatury. Český název je pak pouze co nejstručnější a zároveň nejvýstižnějším popisem této vegetace a nepodléhá takovým závazným pravidlům. Celý tento seznam se ovšem vztahuje pouze na území České republiky. Proto zde uvedené třídy (nebo jiné jednotky) mají často další podřazené syntaxony, které zde nejsou uvedeny, protože se vyskytují pouze mimo ČR. Také rovnítko mezi českým názvem a vědeckým je víceméně přesné pouze na úrovni Česka nebo většinou ještě i střední Evropy. Nemusí to být přesné z celosvětového pohledu, např. v Severní Americe, Jižní Americe nebo východní Asii existují acidofilní alpínské trávníky odlišného druhového složení.
Třída Loiseleurio-Vaccinietea – Alpínská vřesoviště
Třída Juncetea trifidi – Acidofilní alpínské trávníky
Třída Elyno-Seslerietea – Bazifilní alpínské trávníky
Třída Mulgedio-Aconitetea – Subalpínská vysokobylinná a křovinná vegetace
Třída Calluno-Ulicetea - Smilkové trávníky a vřesoviště
Zde jsou uvedeny pouze ty jednotky z této třídy, které se týkají subalpínského a alpínského stupně. Ostatní jednotky viz seznam travinné a keříčkové vegetace v Česku.
Třída Asplenietea trichomanis – Vegetace skal, zdí a stabilizovaných sutí
Zde jsou uvedeny pouze ty jednotky z této třídy, které se týkají subalpínského a alpínského stupně. Ostatní jednotky viz seznam skalní a suťové vegetace v Česku.
Třída Montio-Cardaminetea – Vegetace pramenišť
Zde jsou uvedeny pouze ty jednotky z této třídy, které se týkají subalpínského a alpínského stupně. Ostatní jednotky viz seznam prameništní a rašeliništní vegetace v Česku.
Třída Scheuchzerio palustris-Caricetea – Vegetace slatinišť, přechodových rašelinišť a vrchovištních šlenků
Zde jsou uvedeny pouze ty jednotky z této třídy, které se často vyskytují i v subalpínském a alpínském stupni. Ostatní jednotky viz seznam prameništní a rašeliništní vegetace v Česku.
Třída Oxycocco-Sphagnetea – Vegetace vrchovišť
Zde jsou uvedeny pouze ty jednotky z této třídy, které se často vyskytují i v subalpínském a alpínském stupni. Ostatní jednotky viz seznam prameništní a rašeliništní vegetace v Česku.
Třída Vaccinio-Piceetea – Přirozené jehličnaté lesy
Odkazy
Reference
Literatura
Svazy alpínské a subalpínské vegetace v Česku
Fytocenologie | {
"redpajama_set_name": "RedPajamaWikipedia"
} | 5,382 |
\section{\label{sec:intr}Introduction}
In the presence of an external magnetic field $\mathbf{B}$ the problem of
two charged particles cannot be solved in a closed form as the relative
motion and the motion of the center of mass are coupled to each other.
Therefore no theory exists for a solution of this problem that is uniformly
valid for any strength of the magnetic field and the Coulomb force between
the particles. The energy loss of ion beams and the related processes in a
magnetized plasmas which are important in many areas of physics such as
transport, heating, magnetic confinement of thermonuclear plasmas and
astrophysics are examples of physical situations where this problem arises.
This topic was studied starting with the classic papers in Ref.~\onlinecite{ros60}
using kinetic equation approach, where the binary collisions of the
particles are masked due to the velocity average in the collision operator.
Recent applications are the cooling of heavy ion beams by electrons~\cite%
{sor83,pot90,mes94,men08} and the energy transfer for heavy-ion
inertial confinement fusion.\cite{pro08}
Calculations have been performed for binary collisions (BC) between magnetized
electrons~\cite{sia76,gli92} and for collisions between magnetized electrons and
ions.\cite{gzwi99,zwi00,zwi02,zwi06,toe02,ner03,ner07,ner09} In the presence of a
magnetic field only the total energy $E$ of the interacting particles is conserved
but not the relative and center of mass energies separately. In addition,
the rotational symmetry of the system is broken,
and as a consequence only the component of the angular momentum parallel to the
magnetic field is a constant of motion. The apparently simple problem of charged
particle interaction in a magnetic field is in fact a problem of considerable
complexity and the additional degree of freedom of the cyclotron orbital motion
produces a chaotic system with two degrees of freedom.\cite{gut90,sch00,bhu02,ner07}
In this paper we consider the BC between two gyrating charged particles treating the
interaction (Coulomb) as a perturbation to their helical motions. For electron-heavy
ion collisions this has been done previously in first-order in the ion charge $Z$ for
an ion at rest \cite{gel97} and up to $Z^{2}$ for an uniformly moving heavy ion.
\cite{toe02,ner03,ner07,ner09}
Here we focus on second-order perturbation theory and its comparison with classical
trajectory Monte Carlo (CTMC) simulations. The present work considerably extends the
earlier studies in Refs.~\onlinecite{ner07,ner03,ner09} where the second-order energy
transfer was calculated for an electron-heavy ion BC neglecting the gyration of the
ion or assuming identical gyrating particles (e.g. electrons). But in some cases
of an interaction of magnetized electrons with light ions (e.g. protons, antiprotons) at
a rather strong magnetic field (e.g. in traps) the cyclotron motion of the ion cannot be
neglected.
The general expressions for the energy transfers are briefly discussed in Sec.~\ref{sec:s1}.
In Sec.~\ref{sec:s2} we discuss the perturbative methodology used in this work. Then
we turn to the explicit calculation of the second-order energy transfer
for two arbitrary gyrating particle collision and without any restriction on the magnetic
field. In Sec.~\ref{sec:s4} the results of the perturbative BC model are compared with CTMC
simulations. The results are summarized and discussed in Sec.~\ref{sec:disc}. The small
velocity limits of the energy transfers are derived in the Appendix.
\section{\label{sec:s1}Binary collision formulation}
For our description of BC we start with the equations of motion for two
charged particles moving in a homogeneous magnetic field and the related conservation laws
in general. Next the quantities of interest, the velocity transfer, and the energy transfer
of particles during the binary collision will be introduced and discussed, before we turn to
the solution of the equations of motion in the subsequent section. For further details we
refer to Refs.~\onlinecite{ner07,ner03,ner09}.
We consider two point charges with masses $m_{1}$ and $m_{2}$ and charges $q_{1}e$ and $q_{2}e$,
respectively, moving in a homogeneous magnetic field $\mathbf{B}=B\mathbf{b}$ and interacting
with the potential $q_{1}q_{2}e\!\!\!/^{2}U(\mathbf{r})$ with $e\!\!\!/^{2}=e^{2}/4\pi \varepsilon _{0}$.
Here $\varepsilon _{0}$ is the permittivity of the vacuum and $\mathbf{r}=\mathbf{r}_{1}-\mathbf{r}_{2}$
is the relative coordinate of the colliding particles.
In plasma applications the bare Coulomb interaction $U_{\mathrm{C}}(\mathbf{r}) = 1/r$ is shielded by the surrounding
plasma particles and the interaction may
be modeled by $U_{\mathrm{D}}(\mathbf{r})=e^{-r/\lambda }/r$. Relative velocities which exceed the
thermal velocity lead to an asymmetric interaction potential which in general considerably complicates
the theoretical description. It has been shown, however, that such a dynamic, highly asymmetric
interaction potential can be replaced with an effective spherically symmetric velocity-dependent
interaction $U_{\mathrm{D}}(\mathbf{r})$ with a velocity-dependent
screening length $\lambda $.\cite{zwi99,zwi00,gzwi02} We adopt these findings for our present
considerations and assume a spherically symmetric interaction with a given fixed screening length
in both our analytic expressions and the CTMC simulations. For the envisaged applications of our
given results, such as cooling forces, stopping power, etc., which typically involves an average
over the velocity distribution, the screening length has then to be replaced by an appropriately
chosen velocity-dependent one.
The quantum uncertainty principle prevents particles (for $q_{1}q_{2}<0$) from falling into the
center of these potentials. In a classical picture this can be achieved by regularization of
$U(\mathbf{r})$ at the origin. Such a regularized potential (pseudopotential) has been derived
from quantum statistical considerations.\cite{kel63,deu77} In our forthcoming investigations we
take the functional form of this short distance correction and, including as well the screening
contribution, hence use the interaction $U_{\mathrm{R}}(\mathbf{r})=(1-e^{-r/\lambdabar})e^{-r/\lambda }/r$.
It should be emphasized, however, that the use of this regularized interaction, where $\lambdabar$
is usually related to the (thermal) de Broglie wavelength,\cite{kel63,deu77} here essentially
represents an alternative implementation of the standard (lower) cutoff procedure needed to handle
the hard collisions in a classical perturbative approach where $\lambdabar$ is taken as a given
constant or as a function of the classical collision diameter (see Sec.~\ref{sec:s4}).
Introducing the cyclotron frequencies of the particles $\omega _{c\nu }=|q_{\nu }|eB/m_{\nu }$
(with $\nu =1,2$) we start with the classical equations of motion
\begin{equation}
{\dot{\mathbf{v}}}_{\nu }(t)-\varsigma _{\nu }\omega _{c\nu }\left[ \mathbf{v%
}_{\nu }(t)\times \mathbf{b}\right] =\varrho _{\nu }\frac{%
q_{1}q_{2}e\!\!\!/^{2}}{m_{\nu }}\mathbf{F[r}(t)] ,
\label{eq:ind1}
\end{equation}%
where $\varsigma _{\nu }=|q_{\nu }|/q_{\nu }$, $\varrho _{1}=1$, $\varrho
_{2}=-1$. Here $q_{1}q_{2}e\!\!\!/^{2}\mathbf{F}[\mathbf{r}(t)]$ $(\mathbf{F}%
=-\partial U/\partial \mathbf{r})$ is the force exerted by particle 2 on
particle 1. In the presence of an external magnetic field, the Lagrangian
and the corresponding equations of motion cannot be separated into parts
describing the relative motion $[\mathbf{r}=\mathbf{r}_{1}-\mathbf{r}_{2},%
\mathbf{v}=\dot{\mathbf{r}}]$ and the motion of the cm $[\mathbf{R}=(m_{1}%
\mathbf{r}_{1}+m_{2}\mathbf{r}_{2})/(m_{1}+m_{2}),\mathbf{V}=\dot{\mathbf{R}}%
]$, in general.\cite{sia76,zwi02,toe02,ner03,ner09,ner07}
Introducing the reduced and the total masses $1/\mu =1/m_{1}+1/m_{2}$, $%
M=m_{1}+m_{2}$, respectively, and recalling that $\mathbf{v}_{\nu }(t)=%
\mathbf{V}(t)+\varrho _{\nu }(\mu /m_{\nu })\mathbf{v}(t)$ the equations of
the relative and the cm motion are
\begin{eqnarray}
&&{\dot{\mathbf{v}}}-\omega _{3}\left[ \mathbf{v}\times \mathbf{b}\right]
=\omega _{2}\left[ \mathbf{V}\times \mathbf{b}\right] +\frac{%
q_{1}q_{2}e\!\!\!/^{2}}{\mu }\mathbf{F[r}(t)], \label{eq:a1} \\
&&{\dot{\mathbf{V}}}-\omega _{1}\left[ \mathbf{V}\times \mathbf{b}\right]
=\frac{\mu }{M}\omega _{2}\left[ \mathbf{v}\times \mathbf{b}\right] .
\label{eq:a2}
\end{eqnarray}%
The frequencies $\omega _{1}$, $\omega _{2}$ and $\omega _{3}$ are expressed
in terms of the cyclotron frequencies of the particles, $\omega
_{1}=(m_{1}\varsigma _{1}\omega _{c1}+m_{2}\varsigma _{2}\omega _{c2})/M$, $%
\omega _{2}=\varsigma _{1}\omega _{c1}-\varsigma _{2}\omega _{c2}$, $\omega
_{3}=(m_{2}\varsigma _{1}\omega _{c1}+m_{1}\varsigma _{2}\omega _{c2})/M$.
Note that the quantities $|\omega _{1}|$ and $|\omega _{2}|$ play the role
of the cm and relative cyclotron frequencies. The coupled, nonlinear
differential equations~\eqref{eq:a1} and \eqref{eq:a2} (or Eq.~\eqref{eq:ind1})
completely describe the motion of the particles. For solving the
scattering problem, they have to be integrated numerically for a complete
set of the initial conditions.
From Eqs.~\eqref{eq:a1} and \eqref{eq:a2} follow the conservation of the
parallel component of the cm velocity ${\mathbf{V}}(t)\cdot \mathbf{b}%
=V_{0\parallel }$ and the total energy but since, in general, the relative
and center-of-mass motions are coupled the relative $E_{\mathrm{r}}$ and cm $%
E_{\mathrm{cm}}$ energies are not conserved separately. An exception is the
case with $\omega _{2}=0$ (or $q_{1}/m_{1}=q_{2}/m_{2}$) where the energies $%
E_{\mathrm{r}}$ and $E_{\mathrm{cm}}$ are conserved separately.
In the general case the rate $dE_{\nu }/dt$ at which the energy $E_{\nu}=m_{\nu }v_{\nu }^{2}/2$
of particle $\nu $ changes during the collision with the other particle can be obtained by
multiplying the equation of motion for particle $\nu $ by its velocity $\mathbf{v}_{\nu }(t)$.
The integration of this rate over the whole collision yields the energy transfer\cite{ner03,ner07,ner09}
\begin{equation}
\Delta E_{1}=-iq_{1}q_{2}e\!\!\!/^{2} \int d\mathbf{k}U(\mathbf{k})\int_{-\infty }^{\infty }
[\mathbf{k}\cdot \mathbf{V}(t)] e^{i\mathbf{k}\cdot \mathbf{r}(t)}dt
\label{eq:a10}
\end{equation}%
assuming that for $t\to \pm \infty $, $r(t)\to \infty $ and $U[\mathbf{r}(t)]\to 0$. According
to the conservation of total energy we have $\Delta E_{2}=-\Delta E_{1}$, as it can be directly
seen from Eqs.~\eqref{eq:ind1} and \eqref{eq:a10}. In Eq.~\eqref{eq:a10} the force $\mathbf{F}%
(\mathbf{r})$ has been written using a Fourier transformation in space.
\section{\label{sec:s2}Perturbative treatment}
We now seek an approximate solution of Eqs.~\eqref{eq:ind1}-\eqref{eq:a2} by assuming the interaction
force between the particles as a perturbation to their free helical motion. For the case of electron-ion
(without cyclotron motion of the ion) and electron-electron scattering the corresponding considerations
and derivations are discussed in Refs.~\onlinecite{ner07,ner09}. We therefore focus here on the general
case.
We look for a solution of Eq.~\eqref{eq:ind1} for the variables $\mathbf{r}_{\nu },\mathbf{v}_{\nu }=%
\dot{\mathbf{r}}_{\nu }$, or alternatively, of Eqs.~\eqref{eq:a1} and \eqref{eq:a2}) for the variables
$\mathbf{r},\mathbf{v}=\dot{\mathbf{r}}$ and $\mathbf{R},\mathbf{V}=\dot{\mathbf{R}}$, in a perturbative
manner \cite{ner07,ner09}, i.e.~$\mathbf{r}_{\nu }=\mathbf{r}_{\nu }^{(0)}+\mathbf{r}_{\nu }^{(1)}+...$
and $\mathbf{R}=\mathbf{R}_{0}+\mathbf{R}_{1}+... $, $\mathbf{r}=\mathbf{r}_{0}+\mathbf{r}^{(1)}+...$
Starting point is the zero--order unperturbed helical motion of two particles in the laboratory frame
with $\mathbf{v}_{\nu }^{(0)}(t)=\dot{\mathbf{r}}_{\nu }^{(0)}(t)$ and
\begin{eqnarray}
&&\mathbf{r}_{\nu }^{(0)}\left( t\right) =\widetilde{\mathbf{R}}_{\nu }+%
\mathbf{b}v_{0\nu \parallel }t \label{eq:a27} \\
&&+a_{\nu }\left[ \mathbf{u}_{\nu }\sin \left(
\omega _{c\nu }t\right) +\varsigma _{\nu }\left[ \mathbf{b}\times \mathbf{u}%
_{\nu }\right] \cos \left( \omega _{c\nu }t\right) \right] , \nonumber
\end{eqnarray}%
where $\mathbf{u}_{\nu}=(\cos\varphi_{\nu },\sin\varphi_{\nu})$ ($\varphi_{\nu }$ is the initial phase of
the particle $\nu $) is the unit vector perpendicular to the magnetic field, $v_{0\nu \parallel }$ and
$v_{0\nu\bot}\mathbf{u}_{\nu}$ (with $v_{0\nu \bot}\geqslant 0$) are the unperturbed velocity components
parallel and perpendicular to $\mathbf{b}$, respectively. Here $a_{\nu }=v_{0\nu \perp }/\omega _{c\nu }$
is the cyclotron radius of the particle $\nu $. It should be noted that in Eq.~\eqref{eq:a27} the variables
$\mathbf{u}_{\nu }$ and $\widetilde{\mathbf{R}}_{\nu}$ are independent and are defined by the initial conditions.
The unperturbed cm ($\mathbf{R}_{0}(t),\mathbf{V}_{0}(t)=\dot{\mathbf{R}}_{0}(t)$) and relative
($\mathbf{r}_{0}(t),\mathbf{v}_{0}(t)=\dot{\mathbf{r}}_{0}(t)$) coordinates and velocities can be easily
found from Eq.~\eqref{eq:a27}. In general, the cm and relative coordinates and velocities involve two harmonic
oscillations with different frequencies, amplitudes and phases. Therefore in the plane perpendicular to
$\mathbf{b}$ these quantities cannot be represented in the form of a simple cyclotron motion with constant
amplitudes and phases as in the case of electron-electron (or electron-positron) collisions.\cite{ner09}
The equation for the first-order velocity correction is given by
\begin{equation}
{\dot{\mathbf{v}}}_{\nu }^{(1)}(t)-\varsigma _{\nu }\omega _{c\nu }[\mathbf{v%
}_{\nu }^{(1)}(t)\times \mathbf{b}]=\varrho _{\nu }\frac{q_{1}q_{2}e\!\!%
\!/^{2}}{m_{\nu }}\mathbf{F[r}_{0}(t)] ,
\label{eq:a28}
\end{equation}%
where the solutions can be given by an integral involving the force $\mathbf{F[r}_{0}(t)]$ with $\mathbf{r}_{0}(t)%
=\mathbf{r}_{1}^{(0)}(t)-\mathbf{r}_{2}^{(0)}(t)$ and the unperturbed trajectory \eqref{eq:a27} by similar
expressions as Eqs.~(43)-(46) of Ref.~\onlinecite{ner03} (see also Ref.~\onlinecite{ner07,ner09}).
The first- ($\Delta E^{(1)}_{1}$) and the second-order ($\Delta E^{(2)}_{1}$) energy transfers of the particle 1
can be evaluated using general Eq.~\eqref{eq:a10}. Here we consider only the energy change $\Delta E^{(2)}_{1}$
since the angular averaged $\Delta E^{(1)}_{1}$ vanishes due to the symmetry reasons.\cite{ner03,ner07,ner09} We obtain
\begin{eqnarray}
&&\Delta E_{1}^{(2)}=q_{1}q_{2}e\!\!\!/^{2}\int d\mathbf{k}U(\mathbf{k}%
)\int_{-\infty }^{\infty } e^{i\mathbf{k}\cdot \mathbf{r}_{0}(t)}dt \nonumber \\
&&\times \{ [\mathbf{k}\cdot \mathbf{r}^{(1)}(t)][\mathbf{k}\cdot \mathbf{V}_{0}(t)]
-i[\mathbf{k}\cdot \mathbf{V}_{1}(t)] \} . \label{eq:a37}
\end{eqnarray}%
Let us recall that here $\mathbf{r}^{(1)}(t)$\ and $\mathbf{V}_{1}(t)$ are the first-order relative coordinate and
the cm velocity corrections, respectively.
We now introduce the variable $\mathbf{s}=\mathbf{R}_{r\bot }$ which is the
component of $\mathbf{R}_{r}=\widetilde{\mathbf{R}}_{1}-\widetilde{\mathbf{R}%
}_{2}$ perpendicular to the relative velocity of the guiding centers of two
particles $v_{r\parallel }\mathbf{b}$, where $v_{r\parallel }=v_{01\parallel
}-v_{02\parallel }$. From Eq.~\eqref{eq:a27} we can see that $\mathbf{s}$ is
the distance of closest approach for the guiding centers of the two
particles' helical motion. For practical applications the energy change is
given by the average of $\Delta E_{1}$ with respect to the initial
phases of the particles $\varphi _{1}$ and $\varphi _{2}$ and the azimuthal
angle $\vartheta _{\mathbf{s}}$ of $\mathbf{s}$. This averaged quantity
is denoted by $\langle \Delta E_{1}\rangle $ in the forthcoming considerations.
To evaluate the second-order energy transfer $\Delta E_{1}^{(2)}$ we have to insert Eq.~\eqref{eq:a27}
and the solution of Eq.~\eqref{eq:a28} into Eq.~\eqref{eq:a37}. This quantity is then averaged with
respect to the initial phases of the particles $\varphi _{1}$ and $\varphi _{2}$ and the azimuthal angle
$\vartheta _{\mathbf{s}}$ of the impact parameter $\mathbf{s}$. The obtained angular integrals are evaluated
using the Fourier series of the exponential function. After averaging the energy transfer $\Delta E_{1}^{(2)}$
with respect to $\varphi _{1}$ and $\varphi _{2}$ the remaining part will depend on $\delta (k_{\parallel
}+k_{\parallel }^{\prime })$, i.e. the component of $\mathbf{k}+\mathbf{k}^{\prime }$ along the magnetic field
$\mathbf{b}$. This $\delta $-function enforces $\mathbf{k}+\mathbf{k}^{\prime }$ to lie in the plane transverse
to $\mathbf{b}$ so that $e^{i(\mathbf{k+k}^{\prime })\cdot\mathbf{R}_{r}}\delta (k_{\parallel }+k_{\parallel }%
^{\prime })=e^{i\mathbf{Q}\cdot \mathbf{s}}\delta (k_{\parallel }+k_{\parallel }^{\prime })$, where
$\mathbf{Q}=\mathbf{k}_{\bot }+\mathbf{k}_{\bot }^{\prime }$. The result of the angular averaging finally reads
\begin{eqnarray}
&&\langle\Delta E_{1}^{(2)}\rangle =\frac{\pi iq_{1}^{2}q_{2}^{2}e\!\!\!/^{4}%
}{\mu\left\vert v_{r\parallel}\right\vert }\int d\mathbf{k}d\mathbf{k}%
^{\prime}U\left( \mathbf{k}\right) U\left( \mathbf{k}^{\prime}\right)
J_{0}\left( Qs\right) \nonumber\\
&& \times\delta(k_{\parallel}^{\prime}+k_{\parallel})\sum_{n,m=-\infty}%
^{\infty}\left( -1\right) ^{m+n}e^{i(\theta-\theta^{\prime})(n\varsigma
_{1}+m\varsigma_{2})} \nonumber \\
&& \times\left( k_{\parallel}V_{0\parallel}+\frac{\mu}{m_{2}}n\omega
_{c1}-\frac{\mu}{m_{1}}m\omega_{c2}\right) \Bigg\{ \frac{2k_{\parallel}%
^{2}H_{n,m}(k_{\perp},k_{\perp}^{\prime})}{\left( \zeta_{n,m}-i0\right)
^{2}} \nonumber \\
&& -\frac{k_{\perp}^{\prime}k_{\perp}}{\zeta_{n,m}-i0}\bigg[ 2iA H_{n,m}(k_{\perp},k_{\perp}^{\prime})\sin(\theta
-\theta^{\prime}) \nonumber\\
&& +\frac{\mu}{m_{1}\omega_{c1}}\mathcal{H}_{n,m}(k_{\perp
},k_{\perp}^{\prime})+\frac{\mu}{m_{2}\omega_{c2}}\mathcal{P}_{n,m}(k_{\perp
},k_{\perp}^{\prime})\bigg] \Bigg\} . \label{eq:a42}
\end{eqnarray}
Here $H_{n,m}=J_{n}(k_{\perp}a_{1}) J_{n}(k_{\perp }^{\prime }a_{1})J_{m}(k_{\perp }a_{2})
J_{m}(k_{\perp }^{\prime }a_{2})$ and $\mathcal{H}_{n,m}=H_{n-1,m}-H_{n+1,m}$,
$\mathcal{P}_{n,m}=H_{n,m-1}-H_{n,m+1}$, $A=\mu\varsigma_{1}/m_{1}\omega_{c1}
+\mu\varsigma_{2}/m_{2}\omega_{c2}$, where $J_{n}$ are the Bessel functions of the $n$th order. Also $\zeta _{n,m}=n\omega
_{c1}+m\omega _{c2}+k_{\parallel }v_{r\parallel }$, $k_{\parallel }=\mathbf{k%
}\cdot \mathbf{b}$ and $\mathbf{k}_{\bot }$ are the components of $\mathbf{k}$
parallel and transverse to $\mathbf{b}$, respectively, $\tan \theta =k_{y}/k_{x}$.
The series representation \eqref{eq:a42} of the second-order energy transfer is
valid for any strength of the magnetic field.
For most applications it is also useful to integrate the averaged energy transfer, $\langle\Delta E_{1}^{(2)}\rangle $,
with respect to the impact parameters $s$ in the full two-dimensional (2D) space. We thus introduce an energy loss
cross section (ELCS) \cite{gzwi99,zwi00,ner03,ner07,ner09} through the relation
\begin{equation}
\sigma =\int_{0}^{\infty }\langle \Delta E_{1}^{(2)}\rangle sds.
\label{eq:a43}
\end{equation}%
As $\sigma $ results from the $s$-integration of the energy transfer \eqref{eq:a42} one obtains an expression
for $\sigma $ which represents an infinite sum over Bessel functions. Moreover, assuming regularized interaction
and performing $\mathbf{k}$ integration in $\sigma $ yields an infinite sum over modified Bessel functions (see,
e.g., an example for ion-electron collision in Ref.~\onlinecite{ner07}). For arbitrary axially symmetric interaction
potential similar expression is derived in the Appendix [see Eq.~\eqref{eq:apb1}]. However, for practical
applications it is much more convenient to use an equivalent integral representation of the ELCS which does not
involve any special function. This expression can be derived from the Bessel-function representation of $\sigma $
using the integral representation of the Dirac $\delta $ function as well as the summation formula for
$\sum_{n}e^{in\varphi}J_{n}^{2}(a)$.\cite{gra80} The energy transfer $\sigma $ after lengthy but straightforward
calculations then reads
\begin{equation}
\sigma =\int_{0}^{2\pi }\frac{d\varphi }{2\pi }\overline{\sigma }\left(
\varphi \right) ,\quad \overline{\sigma }(\varphi )=\overline{\sigma }%
_{\parallel }(\varphi )+\overline{\sigma }_{\bot }(\varphi ),
\label{eq:cross}
\end{equation}%
with
\begin{eqnarray}
&&\overline{\sigma }_{\parallel }\left( \varphi \right) =-\frac{\left( 2\pi
\right) ^{2}q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}\lambda ^{2}V_{0\parallel }}{\mu
v_{r\parallel }^{3}}\int_{0}^{\infty }tdt\int d\mathbf{k}\left\vert U\left(
\mathbf{k}\right) \right\vert ^{2} \nonumber \\
&&\times \lbrack k_{\parallel }^{2}+k_{\perp }^{2}\phi \left( t\right)
]k_{\parallel }\sin \left( k_{\parallel }\lambda t\right) J_{0}\left[
2k_{\perp }\mathcal{R}\left( t\right) \right] , \label{eq:a43b}
\end{eqnarray}%
\begin{eqnarray}
&&\overline{\sigma }_{\perp }\left( \varphi \right) =-\frac{\left( 2\pi
\right) ^{2}q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}\lambda }{m_{1}m_{2}v_{r\parallel
}^{4}}\int_{0}^{\infty }t^{2}dt\int d\mathbf{k}\left\vert U\left( \mathbf{k}%
\right) \right\vert ^{2}k_{\perp }^{2} \nonumber \\
&&\times \cos \left( k_{\parallel }\lambda t\right) \bigg\{ \lambda ^{2}G_{1}\left( t\right) [k_{\parallel
}^{2}+k_{\perp }^{2}\phi \left( t\right) ]\frac{J_{1}\left[ 2k_{\perp }%
\mathcal{R}\left( t\right) \right] }{2k_{\perp }\mathcal{R}\left( t\right) } \nonumber \\
&& +G_{2}\left( t\right) J_{0}\left[ 2k_{\perp }\mathcal{R}\left( t\right) %
\right] \bigg\} , \label{eq:a43bb}
\end{eqnarray}%
where $\delta _{\nu}=|v_{r\parallel }|/\omega _{c\nu}$ are the relative pitches of the
particles helices, divided by $2\pi $ and $\eta _{\nu}=\lambda /\delta
_{\nu}=\omega _{c\nu}\lambda /|v_{r\parallel }|$. In Eqs.~\eqref{eq:a43b} and
\eqref{eq:a43bb} the time $t$\ is scaled in units $\lambda /|v_{r\parallel }|$,
where the length $\lambda $ is specified in the next section. In addition
in Eq.~\eqref{eq:cross} the energy transfer $\overline{\sigma }(\varphi )$
has been split into two parts which correspond to the cm motion along [$%
\overline{\sigma }_{\parallel }(\varphi )$] and transverse [$\overline{%
\sigma }_{\perp }(\varphi )$] to the magnetic field, where $\varphi =\varphi
_{1}-\varphi _{2}$ is the difference of the initial phases of the particles.
Also
\begin{eqnarray}
&&\phi \left( t\right) =\frac{\mu }{m_{1}}\frac{\sin \left( \eta _{1}t\right)
}{\eta _{1}t}+\frac{\mu }{m_{2}}\frac{\sin \left( \eta _{2}t\right) }{\eta _{2}t}, \label{eq:phi} \\
&&\mathcal{R}^{2}\left( t\right) =a_{1}^{2}\sin ^{2}\frac{\eta _{1}t}{2}%
+a_{2}^{2}\sin ^{2}\frac{\eta _{2}t}{2} \nonumber \\
&&-2a_{1}a_{2}\sin \frac{\eta _{1}t}{2}\sin \frac{\eta _{2}t}{2}\cos \varphi , \label{eq:R}
\end{eqnarray}
\begin{eqnarray}
&&G_{1}\left( t\right) =m_{1}v_{01\perp }^{2}\frac{\sin \left( \eta
_{1}t\right) }{\eta _{1}t}-m_{2}v_{02\perp }^{2}\frac{\sin \left( \eta
_{2}t\right) }{\eta _{2}t}+2v_{01\perp }v_{02\perp } \nonumber \\
&&\times \cos \varphi \left( m_{2}\frac{\sin \frac{\eta
_{1}t}{2}}{\eta _{1}t}\cos \frac{\eta _{2}t}{2}-m_{1}\frac{\sin \frac{\eta
_{2}t}{2}}{\eta _{2}t}\cos \frac{\eta _{1}t}{2}\right) , \label{eq:G1} \\
&&G_{2}\left( t\right) =\mu v_{r\parallel }^{2}\frac{\cos \left( \eta
_{2}t\right) -\cos \left( \eta _{1}t\right) }{t^{2}}. \label{eq:G2}
\end{eqnarray}%
Here the quantity $\mathcal{R}(t)$ represents an effective relative cyclotron radius of the two particles.
The second term in Eq.~\eqref{eq:a43bb} proportional to the function $G_{2}(t)$ is the contribution of the
cm velocity perturbation, see the second term of Eq.~\eqref{eq:a37}. This perturbation and hence this
corresponding term was absent in our previous considerations for electron-electron and electron-ion collisions.
An expression similar to Eq.~\eqref{eq:a42} (or Eqs.~\eqref{eq:cross}-\eqref{eq:a43bb}) has been obtained
for electron-electron collision\cite{ner09} and for electron-heavy ion (without cyclotron motion of the ion)
collision.\cite{ner03,ner07,ner09} In contrast to these specific cases Eqs.~\eqref{eq:a42} and
\eqref{eq:cross}-\eqref{eq:a43bb} are valid for the collision of two arbitrary charged particles. The results
obtained in Refs.~\onlinecite{ner03,ner07,ner09} can be easily derived from these general expressions. The
electron-electron case is recovered assuming that $m_{1}=m_{2}=m$, $q_{1}=q_{2}=q$, i.e., $\omega _{c1}=%
\omega _{c2}=\omega _{c}$, $\eta _{1}=\eta _{2}=\eta $, $\mu =m/2$. Then the term proportional to the function
$G_{2}(t)$ in Eq.~\eqref{eq:a43bb} vanishes and the remaining expressions coincide with the results of
Ref.~\onlinecite{ner09}. It should be noted that for identical particles (e.g. electrons) the effective
cyclotron radius is given by $\mathcal{R}(t) =a\sin (\eta t/2)$, where $a^{2}=a_{1}^{2}+a_{2}^{2}-2a_{1}a_{2}%
\cos \varphi $ is the cyclotron radius of the particles in the relative frame.\cite{ner09} For electron-heavy
ion collision we assume that the ion mass tends to infinity, $m_{2}\to \infty $, and $v_{02\perp }=0$ (ion
moves along the magnetic field direction). Therefore $\mu \to m_{1}=m$, $\omega _{c2}\to 0$ ($\eta _{2}\to 0$).
In this case the transverse ELCS vanishes and the longitudinal cross section coincides with the results of
Ref.~\onlinecite{ner09}.
Next we also consider the ELCS $\overline{\sigma }_{\parallel }(\varphi )$ and $\overline{\sigma }_{\bot }%
(\varphi )$ for vanishing cyclotron radii, $a_{1},a_{2}\to 0$, i.e. when initially the particles move along
the magnetic field ($v_{01\bot }=v_{02\bot }=0$). In this limit $\overline{\sigma }_{\bot }(\varphi )\neq 0$
as in the cases of two identical particles collision or ion-electron collision. For any axially symmetric
interaction potential, $U(\mathbf{k})=U(|k_{\parallel }|,k_{\perp})$, the straightforward integration in
Eqs.~\eqref{eq:a43b} and \eqref{eq:a43bb} yields
\begin{eqnarray}
&&\overline{\sigma }_{\parallel }\left( \varphi \right) =-\frac{%
2q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}V_{0\parallel }}{v_{r\parallel }^{3}}\left[
\frac{\mathcal{F}_{0}\left( \delta _{1}^{-1}\right)}{m_{1}}
+\frac{\mathcal{F}_{0}\left( \delta _{2}^{-1}\right)}{m_{2}} \right] , \label{eq:van1} \\
&&\overline{\sigma }_{\perp }\left( \varphi \right) =\frac{%
2q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}}{Mv_{r\parallel }^{2}}\left[ \mathcal{F}%
_{0}\left( \delta _{1}^{-1}\right) -\mathcal{F}_{0}\left( \delta
_{2}^{-1}\right) \right] , \label{eq:van2}
\end{eqnarray}%
where
\begin{equation}
\mathcal{F}_{0}\left( \kappa \right) =\frac{\left( 2\pi \right) ^{4}}{4}%
\int_{0}^{\infty }U^{2}\left( \kappa ,k_{\perp }\right) k_{\perp
}^{3}dk_{\perp } .
\label{eq:fun}
\end{equation}
The averaged energy transfer, Eq.~\eqref{eq:a42}, can be evaluated without further approximation
for any axially symmetric interaction potential. In this case the energy transfer can be represented
as the sum of all cyclotron harmonics as it has been done for ion-electron interaction in
Ref.~\onlinecite{ner07} and for electron-electron interaction in Ref.~\onlinecite{ner09}.
In the following we consider the regularized screened potential introduced in Sec.~\ref{sec:s1} with
\begin{equation}
U_{\mathrm{R}}(k_{\parallel },k_{\perp })=\frac{2}{(2\pi)^{2}}
\left( \frac{1}{k_{\perp }^{2}+\kappa ^{2}}-\frac{1}{k_{\perp
}^{2}+\chi ^{2}}\right) ,
\label{eq:a48}
\end{equation}%
where $\kappa ^{2}=k_{\parallel }^{2}+\lambda ^{-2}$, $\chi ^{2}=k_{\parallel }^{2}+d^{-2}$,
$d^{-1}=\lambda ^{-1}+\lambdabar ^{-1}$.
As we discussed above the energy transfer \eqref{eq:a42} must be integrated with respect
to the impact parameters $s$ for practical applications. For general interaction potential
this is given by Eqs.~\eqref{eq:a43}-\eqref{eq:a43bb}. In general for a study of the
convergence of the $s$-integrated energy transfers we note that the case with some value
$s=s_{c}$ is most critical for the convergence of the ELCS. This is intuitively clear as
the gyrating particles at $\vert a_{1}-a_{2}\vert <s<a_{1}+a_{2}$ may hit each other on such
a trajectory (see Ref.~\onlinecite{ner07} for some explicit examples). This should not matter
for the potential \eqref{eq:a48}, which has been regularized near the origin for exactly that
purpose.
For the present case of the regularized interaction potential, substituting Eq.~\eqref{eq:a48}
into Eqs.~\eqref{eq:a43b} and \eqref{eq:a43bb}, we obtain
\begin{eqnarray}
&&\overline{\sigma }_{\parallel }(\varphi ) =-\frac{q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}
V_{0\parallel }}{\mu v_{r\parallel }^{3}} \int_{0}^{\infty }\frac{t^{2}dt}{R^{3}(t)}
\bigg\{ e^{-R(t)}\bigg[ \mathcal{F}_{1}[R(t),t,t] \nonumber \\
&&+\frac{4}{\varkappa ^{2}-1}\mathcal{F}_{2}[R(t),t,t] \bigg]
+e^{-\varkappa R(t)}\bigg[ \mathcal{F}_{1}[\varkappa R(t),\varkappa t,t] \nonumber \\
&&-\frac{4\varkappa ^{2}}{\varkappa ^{2}-1}\mathcal{F}_{2}[\varkappa R(t) ,\varkappa
t,t] \bigg] \bigg\} , \label{eq:a63}
\end{eqnarray}
\begin{eqnarray}
&&\overline{\sigma }_{\perp }(\varphi ) =-\frac{q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}}%
{m_{1}m_{2}v_{r\parallel }^{4}}\int_{0}^{\infty }\frac{t^{2}dt}{R^{3}(t)}\Bigg\{ G_{1}(t)
\bigg\{ e^{-R(t)} \nonumber \\
&& \times \left[ \mathcal{F}_{3}[R(t),t,t]+\frac{4}{\varkappa ^{2}-1}\mathcal{F}_{4}[
R(t),t,t]\right]+e^{-\varkappa R(t)} \nonumber \\
&& \times \left[ \mathcal{F}_{3}[\varkappa R(t),\varkappa t,t]-\frac{4\varkappa ^{2}}{
\varkappa ^{2}-1}\mathcal{F}_{4}[\varkappa R(t),\varkappa t,t] \right] \bigg\} \nonumber \\
&&+G_{2}(t)\bigg\{ e^{-R(t)}\left[ \mathcal{F}_{5}[R(t),t] +\frac{4}{\varkappa ^{2}-1}\mathcal{F}_{6}%
[R(t),t]\right] \label{eq:a63x} \\
&& +\frac{e^{-\varkappa R(t)}}{\varkappa ^{2}} \left[ \mathcal{F}_{5}[\varkappa R(t),\varkappa t] -%
\frac{4\varkappa ^{2}}{\varkappa ^{2}-1}\mathcal{F}_{6}[\varkappa R(t),\varkappa t] \right] \bigg\} \Bigg\} . \nonumber
\end{eqnarray}
Here $R^{2}(t)=t^{2}+(4/\lambda ^{2})\mathcal{R}^{2}(t)$, $\varkappa
=\lambda /d=1+\lambda /\lambdabar $, and
\begin{eqnarray}
&&\mathcal{F}_{1}(R,\zeta ,t) =2+2R-R^{2}+[1-\phi (t)] \bigg[ R^{2}+R+1 \nonumber \\
&& -\frac{\zeta ^{2}}{R^{2}}(R^{2}+3R+3) \bigg] , \label{eq:a64} \\
&&\mathcal{F}_{2}(R,\zeta ,t) =R+1-\frac{1}{R^{2}}[1-\phi (t)] \bigg[ R^{3}+4R^{2}+9R+9 \nonumber \\
&& -\frac{\zeta ^{2}}{R^{2}}(R^{3}+6R^{2}+15R+15) \bigg] , \label{eq:a65} \\
&&\mathcal{F}_{3}(R,\zeta ,t) =2+2R-R^{2}+[1-\phi (t)] \bigg[ R^{2}-R-1 \nonumber \\
&&-\frac{\zeta ^{2}}{R^{2}}(R^{2}+3R+3) \bigg] , \label{eq:a66} \\
&&\mathcal{F}_{4}(R,\zeta ,t) =R+1-\frac{1}{R^{2}}[1-\phi (t)] \bigg[ R^{3}+2R^{2}+3R+3 \nonumber \\
&&-\frac{\zeta ^{2}}{R^{2}}( R^{3}+6R^{2}+15R+15) \bigg] , \label{eq:a67} \\
&&\mathcal{F}_{5}(R,\zeta ) =R^{2}\left[ 1-R+\frac{\zeta ^{2}}{%
R^{2}}(R+1) \right] , \label{eq:a66b} \\
&&\mathcal{F}_{6}(R,\zeta )=R^{2}+R+1-\frac{\zeta ^{2}}{R^{2}}(R^{2}+3R+3) .
\label{eq:a67b}
\end{eqnarray}
Next we consider the ELCS $\overline{\sigma }_{\parallel }(\varphi )$ and $\overline{\sigma }_{\perp }(\varphi )$
for vanishing cyclotron radius, $a_{1},a_{2}\to 0$, i.e. when initially the particles move along the magnetic
field ($v_{01\bot }=v_{02\bot }=0$) which are given by Eqs.~\eqref{eq:van1}-\eqref{eq:fun}. Substitution of
Eq.~\eqref{eq:a48} into Eq.~\eqref{eq:fun} yields
\begin{equation}
\mathcal{F}_{0}\left( \kappa \right) =\frac{2\kappa ^{2}\lambda
^{2}+\varkappa ^{2}+1}{2\left( \varkappa ^{2}-1\right) }\ln \frac{\kappa
^{2}\lambda ^{2}+\varkappa ^{2}}{\kappa ^{2}\lambda ^{2}+1}-1 .
\label{eq:fun1}
\end{equation}%
Thus the ELCS at $a_{1},a_{2}\to 0$ are then given by Eqs.~\eqref{eq:van1} and \eqref{eq:van2}, where the function
$\mathcal{F}_{0}(\kappa )$ is defined by Eq.~\eqref{eq:fun1}.
\begin{figure*}[tbp]
\includegraphics[width=8cm]{datievxvzvs08_sigma_par_vi_0.001_ve_0.5625_2.812_7.987.eps} %
\includegraphics[width=8cm]{datievxvzvs08_sigma_par_vi_3.000_ve_0.5625_2.812_7.987.eps}
\includegraphics[width=8cm]{datievxvzvs08_sigma_per_vi_0.001_ve_0.5625_2.812_7.987.eps}
\includegraphics[width=8cm]{datievxvzvs08_sigma_per_vi_3.000_ve_0.5625_2.812_7.987.eps}
\caption{(Color online) Top panels, the ELCS $\sigma_{\parallel}$ for electron--ion ($Z=6$ and
$m_2/m_1\simeq 2.2\times 10^{4}$) collision at $v_{i\bot}/v_{s}=10^{-3}$ (left panel) and $v_{i\bot}/v_{s}=3.0$
(right panel). The curves with and without symbols correspond to CTMC simulations and
the second-order perturbative treatment, respectively. Also $\lambda /a_{se}=45$, $v_{e\bot}/v_{s} =0.5625$
(solid lines), $v_{e\bot}/v_{s} =2.812$ (dashed lines), $v_{e\bot}/v_{s} =7.987$ (dotted lines).
Bottom panels, same as in top but for $\sigma_{\bot}$.}
\label{fig:1}
\end{figure*}
Equations~\eqref{eq:van1} and \eqref{eq:van2} with Eq.~\eqref{eq:fun1} are
approximately valid also for finite cyclotron radii $a_{1}$ and $a_{2}$,
assuming that the longitudinal velocity $v_{r\parallel }$ is larger than the
transversal ones, $v_{01\perp }$ and $v_{02\perp }$. Indeed, in this case $%
R(t)\simeq t$ since $\delta _{1},\delta _{2}\gg a_{1},a_{2}$ and in Eqs.~\eqref{eq:a63}
and \eqref{eq:a63x} the transversal ELCS $\overline{\sigma }%
_{\bot }(\varphi )$ can be neglected compared to the longitudinal one. This
indicates that in the high velocity limit with $v_{r\parallel }\gg
v_{01\perp },$ $v_{02\perp }$ the transversal motion of the particles as
well as its cm transversal motion are not important and can be neglected.
Since only the contribution of small $t$ is important the function $R(t)$
is approximated by $R(t) \simeq t$. Using this result
for $R(t)$ from Eq.~\eqref{eq:a63x} and Eqs.~\eqref{eq:van1}
and \eqref{eq:van2} with \eqref{eq:fun1} in the high velocity limit we
obtain within the leading term approximation for the ELCS
\begin{eqnarray}
&&\overline{\sigma }_{\parallel }(\varphi ) \simeq -\frac{2q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}
V_{0\parallel }}{\mu v_{r\parallel }^{3}}\Lambda (\varkappa ) , \label{eq:a69b} \\
&&\overline{\sigma }_{\perp }(\varphi ) \simeq -\frac{2q_{1}^{2}q_{2}^{2}e\!\!\!/^{4}}%
{Mv_{r\parallel }^{4}}\left[Q_{1} \Lambda (\varkappa )
+Q_{2}\Lambda _{1}(\varkappa ) \right] , \label{eq:a69c}
\end{eqnarray}%
where $Q_{2}=(\lambda ^{2}/2) (\omega _{c1}^{2}-\omega _{c2}^{2})$, $Q_{1}=
(m_{1}/\mu )v_{01\perp }^{2}-(m_{2}/\mu )v_{02\perp }^{2}+((m_2 -m_1)/\mu )v_{01\perp }v_{02\perp }\cos \varphi$,
\begin{eqnarray}
&&\Lambda (u)=\frac{u^{2}+1}{u^{2}-1}\ln u-1 , \label{eq:ap5} \\
&&\Lambda _{1}\left( u\right) =1+\frac{1}{u^{2}}-\frac{4}{u^{2}-1}\ln u .
\label{eq:ap6}
\end{eqnarray}%
Note that $\overline{\sigma }_{\parallel }(\varphi )$ is isotropic, i.e., do
not depend on $\varphi $ while $\overline{\sigma }_{\perp }(\varphi )$
contains a term which is proportional to $\cos \varphi $. Also, in the high
velocity limit the parallel ELCS, $\overline{\sigma }_{\parallel }(\varphi )$%
, does not depend on the magnetic field strength. The ELCS decay as $\overline{\sigma }_{\parallel }(\varphi )\sim
v_{r\parallel }^{-3}$ and $\overline{\sigma }_{\bot }(\varphi )\sim
v_{r\parallel }^{-4}$.
Finally we briefly turn to the case of small relative velocity, $v_{r\parallel }\ll v_{01\bot},v_{02\bot}$.
It should be emphasized that Eqs.~\eqref{eq:a63} and \eqref{eq:a63x}, are not adopted
for evaluation of the ELCS at small velocities. For this purpose it is convenient to use an alternative
Bessel-function representation of the ELCS as shown in the Appendix. In addition, it is expected
that the limit of small $v_{r\parallel }$ is the most critical regime for a violation of the perturbation
theory employed here. Therefore explicit analytical expressions in this limit can be useful for an
improvement of the perturbation theory by comparing the analytical results with numerical simulations,
see Sec.~\ref{sec:s4}.
\section{\label{sec:s4}Results. Comparison with simulations}
A fully numerical treatment is required for applications beyond the perturbative regime and for
checking the validity of the perturbative approach outlined above. In the present case of binary
collisions of two arbitrary particles in a magnetic field and with the effective interaction
$U_{\mathrm{R}}(r)$ \eqref{eq:a48} the numerical evaluation of the BC energy loss is very complicated,
but can be successfully investigated by classical trajectory Monte Carlo (CTMC)
simulations.\cite{gzwi99,zwi00,zwi02} In the CTMC method \cite{abr66} the trajectories for the relative
motion between the particles are calculated by a numerical integration of the equations of
motion~\eqref{eq:a1} and \eqref{eq:a2}, starting with initial conditions for the parallel
${v}_{r\parallel }$ and the transverse $\mathbf{v}_{0\perp}=\mathbf{v}_{01\perp}-\mathbf{v}_{02\perp}$
relative velocity. The required accuracy is achieved by using a modified velocity-Verlet algorithm
which has been specifically designed for particle propagation in a (strong) magnetic field,\cite{spr99,zwi08}
and by adapting continuously the actual time-step by monitoring the constant of motion
$E=E_{1}+E_{2}=E_{\mathrm{r}}+E_{\mathrm{cm}}$. The resulting relative deviations of $E$ are of the order
of $10^{-6}-10^{-5}$.
\begin{figure*}[tbp]
\includegraphics[width=8cm]{datievxvzvs09_sigma_par_vi_0.001_ve_0.5625_2.812_7.988.eps}
\includegraphics[width=8cm]{datievxvzvs09_sigma_par_vi_3.000_ve_0.5625_2.812_7.988.eps}
\includegraphics[width=8cm]{datievxvzvs09_sigma_per_vi_0.001_ve_0.5625_2.812_7.988.eps}
\includegraphics[width=8cm]{datievxvzvs09_sigma_per_vi_3.000_ve_0.5625_2.812_7.988.eps}
\caption{(Color online) Same as in Fig.~\ref{fig:1} but for $\lambda /a_{se}=225$ and $v_{e\bot}/v_{s} =7.988$
(dotted lines).}
\label{fig:2}
\end{figure*}
The desired average over the initial phases and the impact parameter $\mathbf{s}$ is performed
by a Monte Carlo sampling \cite{bin97,fis99} of a large number of trajectories with different
initial values. The actual number of computed trajectories (typically $10^{5}-10^{6}$ trajectories)
is adjusted by monitoring the convergence of the averaging procedure. For further details we
refer to Refs.~\onlinecite{ner07,ner09}.
For the forthcoming discussion we put the equation of the relative motion of two particles in a
more appropriate dimensionless form by scaling lengths in units of the screening length $\lambda $
and velocities in units of a characteristic velocity $v_{s}$ defined by $v_{s}^{2}=\vert q_{1}%
q_{2}\vert e\!\!\!/^{2}/\mu \lambda $. This velocity gives a measure for the strength of the Coulomb
interaction with respect to the (initial) kinetic energy of relative motion $\mu v_{r}^{2}/2$. For
$v_{r}<v_{s}$ the kinetic energy is small compared to the characteristic potential energy $\vert %
q_1 q_2 \vert e\!\!\!/^{2}/\lambda $ in a screened Coulomb potential and we expect to be in a
nonperturbative regime. A perturbative treatment on the other hand should be applicable for
$v_{r}\gg v_{s}$.
The scaled version of Eqs.~\eqref{eq:ind1}-\eqref{eq:a2} depends on the four dimensionless parameters
$a_{s1}/\lambda$, $a_{s2}/\lambda$, $m_{2}/m_{1}$ and $\lambdabar/\lambda$, and the initial
conditions with positions scaled in $\lambda$ and velocities in $v_s$. Here $a_{s1} = v_{s}/\omega_{c1}$
and $a_{s2} = v_{s}/\omega_{c2}$ are the cyclotron radii for $v_{1\perp} =v_{2\perp}= v_s$ and the
parameters $a_{s1}/\lambda \propto a_{s2}/\lambda \propto v_s/B$ represents a measure for the strength
of the magnetic field compared to the strength of the Coulomb interaction [which is $\propto v_s^2$].
The ratio $\lambdabar/\lambda$ describes the amount of softening of the screened interaction at $r\to 0$
with $q_{1}q_{2}e\!\!\!/ ^2 U_{\mathrm{R}}(r\to 0) \to {q_{1}q_{2}e\!\!\!/ ^2}/\lambdabar$.
In the analytical perturbative approach we thus apply the same scaling of length and velocities and
introduce for two particles collisions the dimensionless ELCS
\begin{equation}
\sigma _{\alpha } =-\frac{1}{\mu v_{s}\mathcal{V}_{\alpha}\lambda ^{2}}%
\int_{0}^{2\pi }\frac{d\varphi }{2\pi }\overline{\sigma }_{\alpha }\left(
\varphi \right) , \label{eq:sig1}
\end{equation}
where $\alpha =\parallel ,\bot$, $\mathcal{V}_{\parallel}=V_{0\parallel}$ and $\mathcal{V}_{\bot}=v_{s}$.
\begin{figure*}[tbp]
\includegraphics[width=8cm]{dat09_vs_datie09_sigma_par_vi_0.500.eps} %
\includegraphics[width=8cm]{dat09_vs_datie09_sigma_par_vi_3.000.eps}
\includegraphics[width=8cm]{dat09_vs_datie09_sigma_per_vi_0.500.eps}
\includegraphics[width=8cm]{dat09_vs_datie09_sigma_per_vi_3.000.eps}
\caption{(Color online) Top panels, the ELCS $\sigma_{\parallel}$ for electron-ion ($Z=6$ and $m_{2}/m_{1}\simeq 2.2\times 10^{4}$)
collision at $v_{i\bot}/v_{s}=0.5$ (left panel) and $v_{i\bot}/v_{s}=3.0$ (right panel). The curves
with and without symbols correspond to the CTMC simulations with and without ion gyration effects, respectively. Also
$\lambda /a_{se}=225$, $v_{e\bot}/v_{s} =0.5625$ (solid lines), $v_{e\bot}/v_{s} =2.812$ (dashed lines) and $v_{e\bot}/v_{s} =7.988$ (dotted
lines). Bottom panels, same as in top but for $\sigma_{\bot}$.}
\label{fig:3}
\end{figure*}
Next we specify the cutoff parameter $\lambdabar$ which is a measure of softening of the interaction
potential at short distances. As we discussed in previous section the regularization in the potential
\eqref{eq:a48} is sufficient to guarantee the existence of the $s$-integrated energy transfers, but
there remains the problem of treating hard collisions. For a perturbation treatment the change in
relative velocity must be small compared to $v_{r}$ and this condition is increasingly difficult to
fulfill in the regime $v_{r}\to 0$. This suggests a physically reasonable procedure: the potential
must be softened near the origin. In fact the parameter $\lambdabar$ should be related to the de
Broglie wavelength which is inversely proportional to $v_{r}$. Here within classical picture we employ
in a perturbative treatment the dynamical cutoff parameter $\varkappa (v_{r\parallel})=1+\lambda /%
\lambdabar (v_{r\parallel})$,\cite{ner09} where $\lambdabar^{2}(v_{r\parallel})=Cb^{2}_{0}(v_{r\parallel})%
+\lambdabar^{2}_{0}$ with $b_{0}(v_{r\parallel})=\lambda v^{2}_{s}/(v^{2}_{r\parallel}+v^{2}_{0})$,
$v^{2}_{0}=v^{2}_{01\perp}+v^{2}_{02\perp}$.
Here $\lambdabar_{0}$ is some constant cutoff parameter, and $b_{0}(v_{r\parallel})$ is the distance
of closest approach of two charged particles in the absence of a magnetic field. Also in $\lambdabar(v_{r\parallel})$
we have introduced a fitting parameter $C\simeq 0.292$. In Ref.~\onlinecite{ner09} this parameter is
deduced from the comparison of the ELCS \eqref{eq:a43} with an exact asymptotic expression derived in
Ref.~\onlinecite{hah71} for the Yukawa-type (i.e., with $\lambdabar \to 0$) interaction potential. As
has been shown in Ref.~\onlinecite{ner09} the second-order ELCS for electron-electron and electron-ion
(but wihtout gyration of the ion) collisions with dynamical cutoff parameter $\lambdabar(v_{r\parallel})$ excellently agrees
with CTMC simulations at high velocities. The CTMC simulations have been carried out with constant
$\lambdabar =\lambdabar_{0}\ll \lambda$, that is, the interaction is almost Coulomb at short distances.
The ELCS are presented in Figs.~\ref{fig:1}-\ref{fig:4}.
These results are obtained for the BC of an electron (particle 1, $q_{1}=-1$) with an ion (particle 2,
$q_{2}=Z$) in a strong magnetic field. Shown are $\sigma_{\parallel}$ and $\sigma_{\perp}$ as functions of $v_{r\parallel}/v_{s}$
for fixed transverse velocity of the ion $v_{02\bot}=v_{i\bot}$ and the strength of the magnetic field
$\lambda /a_{se}=B/B_{s}$ (with $a_{se}=a_{s1}$, $B_{s}=m_{1}v_{s}/e\lambda$) and varying the transversal
velocity of the electron $v_{01\bot}=v_{e\bot}$. For each triplet of fixed $v_{i\bot}$, $v_{e\bot}$ and
$B$ the cyclotron radii $a_{1}$, $a_{2}$ and $a_{s2}=a_{si}$ can be easily determined. Both the CTMC
and second-order calculations have been done for a regularized potential $U_{\mathrm{R}}$ with
$\nu_{0}=\lambdabar_{0}/\lambda=10^{-4}$. Note that in all cases shown in Figs.~\ref{fig:1}-\ref{fig:4}
we have $a_{se}/\lambda \ll 1$ and the ELCS is not sensitive to this parameter when $a_{se}/\lambda\to 0$
(see, e.g., Fig.~\ref{fig:4}).
\begin{figure*}[tbp]
\includegraphics[width=8cm]{datievxvzvstr_sigma_par_vi_2.000_ve_0.176_2.499_8.800.eps}
\includegraphics[width=8cm]{datievxvzvstr_sigma_par_vi_3.000_ve_0.176_2.499_8.800.eps}
\caption{(Color online) The ELCS $\sigma_{\parallel}$ for electron--antiproton ($Z=-1$ and
$m_2/m_1 =1836$) collision at $v_{i\bot}/v_{s}=2.0$ (left panel) and $v_{i\bot}/v_{s}=3.0$
(right panel). The curves with symbols correspond to CTMC simulations. Also $\lambda /a_{se}=2.2\times 10^{4}$,
$v_{e\bot}/v_{s} =0.176$
(filled circles), $v_{e\bot}/v_{s} =2.499$ (squares), $v_{e\bot}/v_{s} =8.8$ (open circles).
The dashed curves are obtained employing a model suggested in Ref.~\onlinecite{ner09}.}
\label{fig:4}
\end{figure*}
Comparisons of the ELCS determined by the CTMC simulations and the second-order perturbative treatment
Eqs.~\eqref{eq:a63}, \eqref{eq:a63x}, and \eqref{eq:sig1} are
presented in Figs.~\ref{fig:1} and \ref{fig:2}. It is clearly observed that in the regimes of large relative velocities the
second order perturbative treatment agrees almost perfectly (i.e.~within the unavoidable numerical fluctuations) with
the CTMC results. In addition in the limit of very large velocities $v_{r\parallel}/v_{s} \gg 1$
the ELCS $\sigma_{\parallel}$ calculated either within perturbation theory or CTMC method with different
strength of the magnetic field and $v_{i\perp},v_{e\perp}$ converge to the same value. This behavior agrees
with the predictions of the asymptotic Eq.~\eqref{eq:a69b} which is independent on $B$ and $v_{i\perp}$,
$v_{e\perp}$. Also the smaller the transversal velocities, the better is the convergence to the regime of
Eq.~\eqref{eq:a69b}. At large relative velocities the CTMC and second-order $\sigma_{\perp}$ shown
in Figs.~\ref{fig:1} and \ref{fig:2} agree with Eq.~\eqref{eq:sig1} with the asymptotic Eq.~\eqref{eq:a69c}. Since
at $v_{r\parallel}/v_{s} \gg 1$ the quantity $\sigma_{\perp}$ behaves as $\sigma_{\perp}\sim v^{2}_{i\perp}$
for fixed magnetic field and $v_{e\perp}$ it will increase with the transverse velocity $v_{i\perp}$ as shown
in Figs.~\ref{fig:1} and \ref{fig:2}. At small velocities with $v_{r\parallel}/v_{s} \lesssim 8$ the second-order treatment
considerably deviates from CTMC simulations. Here the second-order ELCS are given by
approximate expressions \eqref{eq:apb7} and \eqref{eq:apb9} where the parameter $\varkappa$ at small relative
velocities is given by $\varkappa \simeq \varkappa (0)=1+\lambda/\lambdabar (0)$ and $\lambdabar (0)$ is the
dynamical cutoff $\lambdabar (v_{r\parallel})$ at $v_{r\parallel}=0$. Note that at finite cyclotron radii of
the particles the quantity $\lambdabar (0)$ is a constant depending on the value of $\nu_{0}$ and the transversal
velocities. However, for vanishing cyclotron radii (as, e.g. in Eqs.~\eqref{eq:van1} and \eqref{eq:van2}) the
cutoff parameter at small velocities behaves as $\lambdabar/\lambda \sim (v_{s}/v_{r\parallel})^{2}$. The quantity
$(\varkappa -1)^{2}$ involved in Eqs.~\eqref{eq:apb7} and \eqref{eq:apb9} falls as $\sim (v_{r\parallel}/v_{s})^{4}$.
This results in a strong self--cutting at small velocities. Thus employing the cutoff $\lambdabar (v_{r\parallel})$
the second order ELCS $\sigma_{\parallel}$ is strongly reduced and decreases as $\sigma_{\parallel}\sim v^{5}_{r\parallel}$
and $\sigma_{\parallel}\sim v^{3}_{r\parallel}\ln (1/v_{r\parallel})$ at $a_{1}=a_{2}=0$ and $a_{1},a_{2}\neq 0$,
respectively. The second term of $\sigma_{\perp}$ in Eq.~\eqref{eq:apb9} does not contain a term $(\varkappa%
-1)^{2}$ and diverges as $\sigma_{\perp} \sim v^{-2}_{r\parallel}$, see Figs.~\ref{fig:1} and \ref{fig:2}. In this small velocity
regime the second-order perturbative treatment is clearly invalid and a nonperturbative description is required.
To highlight the importance of the ion gyration in the presence of very strong magnetic field we demonstrate
in Fig.~\ref{fig:3} the ELCS obtained with CTMC simulations with and without
ion gyration. That is, in the latter case we assume that $m_{2}\to \infty$ and the ion moves with rectilinear
trajectory with the same velocity component $v_{i\perp}$ as in the case of ion gyration. It is seen that
the ion gyration is important at small $v_{r\parallel}$ and the discrepancy between two approaches increases
with $v_{i\bot}$.
In Fig.~\ref{fig:4} we compared the CTMC results for $\sigma_{\parallel}$ with the model
(dashed lines) given in Ref.~\onlinecite{ner09} for a repulsive ($Z<0$) ion-electron interactions. Here
the ions (antiprotons) are strongly magnetized with $a_{2}/\lambda \simeq 0.17$ (left panel) and $a_{2}/%
\lambda \simeq 0.25$ (right panel). Assuming that the magnetic field is infinitely strong this model
completely ignores the cyclotron motion of the particles and they move along $\mathbf{b}$. It has been
shown\cite{ner09} that for repulsive interaction the magnetic field together with the interaction potential
forms a potential barrier because of the particles motion is effectively one-dimensional. In this case the
relative velocity transfer is $\Delta v_{\parallel }=-2v_{r\parallel }$ which corresponds to a reversion
of the initial motion, i.e. to a backscattering event. Then the energy transfer is $\Delta E_{1}=-2\mu%
V_{0\parallel }v_{r\parallel } \Theta (v_{c}^{2}-v_{r\parallel }^{2})\Theta (s_{m}-s)$, where $\Theta (z)$
is the Heavyside function, $v_{c}^{2}=2\vert q_{1}q_{2}\vert e\!\!\!/^{2}/\mu \lambdabar $ and $s_{m}$ is
determined from equation $|q_{1}q_{2}|e\!\!\!/^{2}U_{R}(s_{m})=\mu v^{2}_{r\parallel}/2$. It is seen that
in Fig.~\ref{fig:4} the agreement with CTMC simulations is quite
satisfactory even for finite cyclotron radii and magnetic field. However, with increasing
$v_{i\bot}$ the CTMC simulations show a more involved picture as, e.g., in Fig.~\ref{fig:4}, right panel,
than the predictions of this simple model. In the CTMC simulations the ELCS shrinks strongly at $v_{r\parallel}%
\gtrsim v_{s}$ with increasing relative velocity and $v_{i\bot}$, $v_{e\bot}$. At strong but finite magnetic
field the hard collisions like backscattering events may also occur but the transverse dynamics of the particles
will reduce the domain of the backscattering events\cite{ner09}. With increasing $v_{r\parallel}$ this domain
will be further shrunk and finally the scattering may occur only in the regime where a strong magnetic field
may strongly reduce the energy transfer.\cite{ner03,ner07,ner09}.
\section{\label{sec:disc}Conclusion}
In this paper we have investigated the binary collisions (BC) of two gyrating charged particles
in the presence of constant magnetic field employing second-order perturbation theory and classical
trajectory Monte Carlo (CTMC) simulations. A case with strongly asymmetric masses of the particles
have been considered in detail. The second-order energy transfers for two--particles collision is
calculated with the help of an improved BC treatment which is valid for any strength of the magnetic
field and involves all cyclotron harmonics of the particles motion. For further applications
(e.g., in cooling of ion beams, transport phenomena in magnetized plasmas) the actual calculations
of the energy transfers have been done with a screened interaction potential which is regularized
at the origin. The use of that potential can be viewed as an alternative to the standard cutoff
procedure.
For checking the validity of the perturbative approach and also for applications beyond the perturbative
regime we have employed numerical CTMC simulations. These CTMC calculations have been performed for a
very strong magnetic field and in a wide range of $v_{r\parallel}$ and for a small regularization parameter,
that is, for an interaction which is rather close to Coulomb at short distances. Within the second-order
treatment we have introduced a dynamic cutoff parameter which substantially improves the agreement of
the theory with CTMC simulations. From a comparison with the nonperturbative CTMC simulations we have found
as a quite general rule which is widely independent of the magnetic field strength that the predictions of
the second-order perturbative treatment are very accurate for $v_{r\parallel}/v_{s}\gtrsim 8$ for all studied
parameters and cases. In contrast, for low relative velocities $v_{r\parallel}/v_{s}\lesssim 8$ the results
obtained from perturbation theory strongly deviate from the CTMC simulations. We have also tested the exact
analytical model derived for repulsive interaction and an infinitely strong magnetic field in Ref.~\onlinecite{ner09}
by comparing it in Fig.~\ref{fig:4} with the CTMC simulations and found that the agreement is rather
satisfactory even for finite (but strong) magnetic fields.
We believe that our theoretical findings will be useful for the interpretation of experimental investigations.
Here, it is of particular interest to study some macroscopic physical quantities on the basis of the presented
theoretical model such as cooling forces in storage rings and traps, stopping power of ion beams as well as
transport coefficients in strongly magnetized plasmas. These studies require an average of the energy or velocity
transfers with respect to the velocity distribution of the electrons. The cooling forces obtained by the perturbative
approach are expected to be quite accurate if the low velocity regime only slightly contributes to the
$\mathbf{v}_{r}$ average over $\langle\Delta E\rangle$. That is, if the typical $v_{r\parallel}$, given by the
maximum of the thermal electron velocity and the ion velocity, are large compared to $v_{s}$, as it is usually
the case for, e.g., electron cooling in storage rings.
\begin{acknowledgments}
H.B.N. is grateful for the support of the Alexander von Humboldt Foundation, Germany. This work was
supported by the Bundesministerium f\"{u}r Bildung und Forschung (BMBF) under contract 06ER9064.
\end{acknowledgments}
| {
"redpajama_set_name": "RedPajamaArXiv"
} | 1,488 |
Q: downloading files from server using IntentService in android I am trying to download files using IntentService.My downloading queue is interrupted.
I am using the following code to start a service
Intent intent = new Intent(ViewShowList.this, DownloadService.class);
// Create a new Messenger for the communication back
Messenger messenger = new Messenger(handler);
intent.putExtra("MESSENGER", messenger);
intent.putExtra("url", url);
intent.putExtra("share_id", showID);
intent.putExtra("showname", name);
intent.putExtra("showdatecreated", dateCreated);
intent.putExtra("noofFiles", noofFiles);
startService(intent);
Handler for communication back
@SuppressLint("HandlerLeak")
private Handler handler = new Handler() {
public void handleMessage(Message message) {
Log.d(TAG, "handleMessage.....................");
//Object path = message.obj;
if (message.arg1 == DownloadService.COMPLETED) {
Toast.makeText(mContext, getResources().getString(R.string.Text_MadeOffline), Toast.LENGTH_SHORT).show();
createOfflineShowsList();
syncShowAssets();
if (showListadapter != null) {
showListadapter.notifyDataSetChanged();
}
} else {
Log.e(TAG, "Download Failed...");
}
}
};
DownloadService.java
This is service class which extend IntentService
public class DownloadService
extends IntentService {
private int OFFSET;
private int LIMIT;
String data;
private final String TAG = "DownloadService";
private int result = Activity.RESULT_CANCELED;
public static int COMPLETED = 100;
public static int FAILED = 101;
public static int LOW_SPACE = 102;
public static int NETWORK_PROBLEM = 103;
public static int ASSERT_EXISIT = 104;
public static int PARTIALLY_DOWNLOADED = 105;
public static int NO_FILE = 105;
private NotificationManager notificationManager;
private Notification notification;
ConnectivityManager connMgr;
ArrayList<HashMap<String, String>> showAssetList;
private SharedPreferences sotcPref;
PendingIntent contentIntent;
int i = 1;
String url;
String showname;
String showdatecreated;
String showId;
Messenger messenger;
int noofFiles;
public DownloadService() {
super("DownloadService");
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 5 " + "DownloadService()constructor");
}
if (Constants.DEBUG) {
Log.d(TAG, "DownloadService... Constructor");
}
OFFSET = 0;
LIMIT = 3;
}
@SuppressWarnings("deprecation")
@Override
protected void onHandleIntent(Intent intent) {
// TODO Auto-generated method stub
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 6 " + "onHandleIntent");
}
connMgr = (ConnectivityManager) getApplicationContext().getSystemService(Context.CONNECTIVITY_SERVICE);
notificationManager = (NotificationManager) getApplicationContext().getSystemService(getApplicationContext().NOTIFICATION_SERVICE);
sotcPref = getApplicationContext().getSharedPreferences("SOTCPref", MODE_PRIVATE);
if (Constants.DEBUG) {
Log.d(TAG, "onHandleIntent.........");
}
Bundle extras = intent.getExtras();
url = extras.getString("url");
showname = extras.getString("showname");
showdatecreated = extras.getString("showdatecreated");
//sara
if (showdatecreated.contains("/")) {
data = showdatecreated.replaceAll("/", "#");
if (Constants.DEBUG) {
System.out.println("date");
}
if (Constants.DEBUG) {
System.out.println(data);
}
} else {
data = showdatecreated;
if (Constants.DEBUG) {
System.out.println("date in else");
}
if (Constants.DEBUG) {
System.out.println(showdatecreated);
}
if (Constants.DEBUG) {
System.out.println(data);
}
}
showId = extras.getString("share_id");
noofFiles = extras.getInt("noofFiles");
messenger = (Messenger) extras.get("MESSENGER");
Intent notificationIntent = new Intent();
contentIntent = PendingIntent.getActivity(getApplicationContext(), 0, notificationIntent, 0);
notification = new Notification(R.drawable.sotc_notification_icon, "", System.currentTimeMillis());
notification.flags = notification.flags | Notification.FLAG_ONGOING_EVENT;
notification.contentView = new RemoteViews(getApplicationContext()
.getPackageName(), R.layout.upload_progress_bar);
notification.icon = R.drawable.sotc_notification_icon;
notification.contentView.setTextViewText(R.id.textView1, showname);
notification.contentIntent = contentIntent;
notification.contentView.setProgressBar(R.id.progressBar1, 100, 0, false);
notificationManager.notify(1, notification);
if (Constants.DEBUG) {
Log.i("FOO", "Notification started");
}
if (showname.length() > 18) {
showname = showname.substring(0, 17);
}
if (DownloadAssets.TOTAL_ASSET_COUNT == 0) {
downloadSetofAssets(OFFSET, LIMIT, url);
if (DownloadAssets.TOTAL_ASSET_COUNT > LIMIT) {
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 8 " + "if(DownloadAssets.TOTAL_ASSET_COUNT > LIMIT)");
}
for (OFFSET = LIMIT; OFFSET < DownloadAssets.TOTAL_ASSET_COUNT; ) {
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 8.1 " + "if(DownloadAssets.TOTAL_ASSET_COUNT > LIMIT)");
}
downloadSetofAssets(OFFSET, LIMIT, url);
OFFSET = OFFSET + LIMIT;
}
}
}
if (i > 1) {
result = DownloadService.COMPLETED;
notification.setLatestEventInfo(DownloadService.this, "Downloaded Successfully", "", contentIntent);
Message msg = Message.obtain();
msg.arg1 = result;
try {
messenger.send(msg);
} catch (android.os.RemoteException e1) {
if (Constants.DEBUG) {
Log.w(getClass().getName(), "Exception sending message", e1);
}
}
} else {
result = DownloadService.FAILED;
notification.setLatestEventInfo(DownloadService.this, "Downloaded Failed", "", contentIntent);
if (Constants.DEBUG) {
Log.e(TAG, "Download Failed...");
}
}
notification.contentView.setImageViewResource(R.id.image, R.drawable.icon);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notificationManager.notify(1, notification);
}
private void downloadSetofAssets(int OFFSET, int LIMIT, String url) {
// TODO Auto-generated method stub
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 7 " + "downloadSetofAssets");
}
try {
url = url.replace("value1", URLEncoder.encode("" + OFFSET, "UTF-8"));
url = url.replace("value2", URLEncoder.encode("" + LIMIT, "UTF-8"));
} catch (UnsupportedEncodingException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (Constants.DEBUG) {
Log.i(TAG, "Show offline -- Asset URL: " + url);
}
showAssetList = DownloadAssets.hit(getApplicationContext(), url);
for (HashMap<String, String> asset : showAssetList) {
String thumbUrl = asset.get("thumb_url");
String normalUrl = asset.get("normal_url");
String mp4Url = asset.get("mp4_url");
String fileType = asset.get("filetype");
String assetID = asset.get("id");
String assetType = asset.get("asset_type");
if (Constants.DEBUG) {
Log.d(TAG, "Thumb Url :" + thumbUrl);
}
if (Constants.DEBUG) {
Log.d(TAG, "Normal Url :" + normalUrl);
}
if (Constants.DEBUG) {
Log.d(TAG, "Asset ID : " + assetID);
}
if (Constants.DEBUG) {
Log.d(TAG, "Asset Type : " + assetType);
}
if (Constants.DEBUG) {
Log.d(TAG, "MP4 Url : " + mp4Url);
}
if (Constants.DEBUG) {
Log.d(TAG, "FileType : " + fileType);
}
boolean isDownloaded = false;
if (assetType.equals("1")) { // Image
File assetDirectory = createAssetDirectory(showId, showname, data, assetID, assetType);
if (assetDirectory != null) {
File thumb = new File(assetDirectory.getAbsolutePath(), "/Thumb");
thumb.mkdirs();
// Thumbnail
File thumbFile = new File(thumb.getAbsolutePath(), "/Thumb." + getExtention(thumbUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Thumb File ath : " + thumbFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, thumbUrl, thumbFile.getAbsolutePath(), messenger);
File normal = new File(assetDirectory.getAbsolutePath(), "/Normal");
normal.mkdirs();
// Normal
File normalFile = new File(normal.getAbsolutePath(), "/Normal." + getExtention(normalUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Normal File path: " + normalFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, normalUrl, normalFile.getAbsolutePath(), messenger);
}
} else if (assetType.equals("2")) { // Video
File assetDirectory = createAssetDirectory(showId, showname, data, assetID, assetType);
if (assetDirectory != null) {
if (!fileType.equals("Youtube")) { // via AddLink
File thumb = new File(assetDirectory.getAbsolutePath(), "/Thumb");
thumb.mkdirs();
// Thumbnail
File thumbFile = new File(thumb.getAbsolutePath(), "/Thumb." + getExtention(thumbUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Thumb File ath : " + thumbFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, thumbUrl, thumbFile.getAbsolutePath(), messenger);
File mp4url = new File(assetDirectory.getAbsolutePath(), "/Normal");
mp4url.mkdirs();
// mp4_Url
File mp4File = new File(mp4url.getAbsolutePath(), "/Normal." + getExtention(mp4Url));
if (Constants.DEBUG) {
Log.d(TAG, "Normal File path: " + mp4File.getAbsolutePath());
}
isDownloaded = doInBackground(this, mp4Url, mp4File.getAbsolutePath(), messenger);
} else if (Constants.DEBUG) {
Log.d(TAG, "Asset type is video but is Youtube link. So not proceeding for offline");
}
}
} else if (assetType.equals("3")) { // Audio
File assetDirectory = createAssetDirectory(showId, showname, data, assetID, assetType);
if (assetDirectory != null) {
File thumb = new File(assetDirectory.getAbsolutePath(), "/Thumb");
thumb.mkdirs();
// Thumbnail
File thumbFile = new File(thumb.getAbsolutePath(), "/Thumb." + getExtention(thumbUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Thumb File ath : " + thumbFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, thumbUrl, thumbFile.getAbsolutePath(), messenger);
File normal = new File(assetDirectory.getAbsolutePath(), "/Normal");
normal.mkdirs();
// Normal
File normalFile = new File(normal.getAbsolutePath(), "/Normal." + getExtention(normalUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Normal File path: " + normalFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, normalUrl, normalFile.getAbsolutePath(), messenger);
}
} else {
if (!assetType.equals("5")) {
File assetDirectory = createAssetDirectory(showId, showname, data, assetID, assetType);
if (assetDirectory != null) {
File thumb = new File(assetDirectory.getAbsolutePath(), "/Thumb");
thumb.mkdirs();
// Thumbnail
File thumbFile = new File(thumb.getAbsolutePath(), "/Thumb." + getExtention(thumbUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Thumb File ath : " + thumbFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, thumbUrl, thumbFile.getAbsolutePath(), messenger);
File normal = new File(assetDirectory.getAbsolutePath(), "/Normal");
normal.mkdirs();
// Normal
File normalFile = new File(normal.getAbsolutePath(), "/Normal." + getExtention(normalUrl));
if (Constants.DEBUG) {
Log.d(TAG, "Normal File path: " + normalFile.getAbsolutePath());
}
isDownloaded = doInBackground(this, normalUrl, normalFile.getAbsolutePath(), messenger);
} else { //"5" Link
if (Constants.DEBUG) {
Log.d(TAG, "This is Web Link");
}
isDownloaded = true;
}
}
}
}
}
private String getLoginFolders() {
// TODO Auto-generated method stub
File file = null;
int status = Constants.getSDCardStatus();
if (status == Constants.MOUNTED) {
File f = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),
"/SOTC_OFF/.nomedia");
f.mkdirs();
file = new File(Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_DOWNLOADS),
"/SOTC_OFF/" + sotcPref.getString("domain", "") + "/" + sotcPref.getString("user_id", ""));
file.mkdirs();
}
return file.getAbsolutePath();
}
private File createAssetDirectory(String showid, String showname,
String data, String assetID, String assetType) {
// TODO Auto-generated method stub
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 10 " + "createAssetDirectory");
}
File file = null;
int status = Constants.getSDCardStatus();
if (status == Constants.MOUNTED) {
if (DownloadAssets.TOTAL_ASSET_COUNT != 0) {
/**
* From to concept here is to avoid duplication of new
* offline shows when show is updated. So, we are here
* renaming previous offline show's folder name with
* updated asset count.
*/
boolean isRenameSuccess = false;
File f = new File(getLoginFolders());
if (!f.exists()) {
f.mkdirs();
}
File[] fileArray = f.listFiles();
File f2 = new File(getLoginFolders(), "/"
+ showid.trim() + ","
+ showname.trim() + ","
+ data);
for (File from : fileArray) {
String s1 = from.getName().substring(0, from.getName().lastIndexOf(","));
if (Constants.DEBUG) {
Log.i(TAG, "s1: " + s1);
}
if (f2.getName().equalsIgnoreCase(s1)) {
//Rename
File to = new File(getLoginFolders(), "/"
+ showid.trim() + ","
+ showname.trim() + ","
+ data + ","
+ noofFiles);
if (Constants.DEBUG) {
Log.i(TAG, "from existence: " + from.exists());
}
try {
isRenameSuccess = from.renameTo(to);
} catch (Exception e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
if (Constants.DEBUG) {
Log.i(TAG, "isRenameSuccess: " + isRenameSuccess);
}
break;
}
}
file = new File(getLoginFolders(), "/"
+ showid.trim() + ","
+ showname.trim() + ","
+ data + ","
+ noofFiles +
"/File_"
+ assetID + ","
+ assetType.trim());
}
if (file != null) {
if (!file.exists()) {
file.mkdirs();
}
}
}
return file;
}
public static String getExtention(String url) {
String extension = MimeTypeMap.getFileExtensionFromUrl(url);
return extension;
}
@SuppressWarnings({"deprecation", "deprecation"})
boolean doInBackground(Context context, String urlPath, String destinationPath, Messenger messenger) {
boolean isDownloaded = false;
int lastPercent = 0;
File destination = new File(destinationPath);
if (!destination.exists()) {
if (chkConnectionStatus()) {
InputStream stream = null;
FileOutputStream fos = null;
try {
URL imageUrl = new URL(urlPath);
HttpURLConnection conn = (HttpURLConnection) imageUrl.openConnection();
conn.setConnectTimeout(30000);
conn.setReadTimeout(30000);
conn.setInstanceFollowRedirects(true);
stream = conn.getInputStream();
int contentLength = conn.getContentLength();
if (Constants.DEBUG) {
Log.i(TAG, "contentLength : " + contentLength);
}
if (contentLength == 0) {
result = DownloadService.NO_FILE;
destination.delete();
isDownloaded = false;
Toast.makeText(getApplicationContext(), getResources().getString(R.string.Text_NoFile), 1000).show();
} else if (contentLength > availablestorageOnExternalDir()) {
//No Space Available
result = DownloadService.LOW_SPACE;
destination.delete();
isDownloaded = false;
Toast.makeText(getApplicationContext(), getResources().getString(R.string.Text_NoSpaceShow), 1000).show();
} else {
fos = new FileOutputStream(destination.getPath());
long total = 0l;
final int buffer_size = 4 * 1024;
try {
byte[] bytes = new byte[buffer_size];
for (; ; ) {
int count = stream.read(bytes, 0, buffer_size);
if (count == -1) {
break;
}
fos.write(bytes, 0, count);
total += count;
int percent = (int) ((total * 100) / contentLength);
if (percent > lastPercent) {
notification.contentView.setProgressBar(R.id.progressBar1, 100, percent, false);
lastPercent = percent;
}
}
if (destination.length() < contentLength) {
result = DownloadService.PARTIALLY_DOWNLOADED;
destination.delete();
isDownloaded = false;
} else {
if (Constants.DEBUG) {
Log.e(TAG, "Sucessful downloaded-------------------------------------------------" + i++);
}
// Sucessful finished
//i++;
result = Activity.RESULT_OK;
isDownloaded = true;
}
} catch (Exception ex) {
}
}
conn.disconnect();
Message msg = Message.obtain();
msg.arg1 = result;
msg.obj = destination.getAbsolutePath();
try {
messenger.send(msg);
} catch (android.os.RemoteException e1) {
if (Constants.DEBUG) {
Log.w(getClass().getName(), "Exception sending message", e1);
}
}
if (Constants.DEBUG) {
Log.v(TAG, "Completed.............. ");
}
} catch (Exception e) {
e.printStackTrace();
} finally {
if (stream != null) {
try {
stream.close();
} catch (IOException e) {
e.printStackTrace();
}
}
if (fos != null) {
try {
fos.close();
} catch (IOException e) {
e.printStackTrace();
}
}
}
} else {
/// no network connection
result = DownloadService.NETWORK_PROBLEM;
notification.setLatestEventInfo(context, "Please check your network connection", "", contentIntent);
notification.flags |= Notification.FLAG_AUTO_CANCEL;
notificationManager.notify(1, notification);
isDownloaded = true;
Message msg = Message.obtain();
msg.arg1 = result;
msg.obj = destination.getAbsolutePath();
try {
messenger.send(msg);
} catch (android.os.RemoteException e1) {
if (Constants.DEBUG) {
Log.w(getClass().getName(), "Exception sending message", e1);
}
}
}
} else {
result = DownloadService.ASSERT_EXISIT;
Message msg = Message.obtain();
msg.arg1 = result;
msg.obj = destination.getAbsolutePath();
try {
messenger.send(msg);
} catch (android.os.RemoteException e1) {
if (Constants.DEBUG) {
Log.w(getClass().getName(), "Exception sending message", e1);
}
}
isDownloaded = true;
}
return isDownloaded;
}
public long availablestorageOnExternalDir() //Get Available space(in Bytes)
{
StatFs stat = new StatFs(Environment.getExternalStorageDirectory().getPath());
long bytesAvailable = (long) stat.getBlockSize() * (long) stat.getAvailableBlocks();
long megAvailable = bytesAvailable / (1024 * 1024);
if (Constants.DEBUG) {
Log.e("", "Available MB : " + megAvailable);
}
if (Constants.DEBUG) {
Log.e("", "Available Bytes : " + bytesAvailable);
}
return bytesAvailable;
}
public boolean chkConnectionStatus() {
final android.net.NetworkInfo wifi =
connMgr.getNetworkInfo(ConnectivityManager.TYPE_WIFI);
final android.net.NetworkInfo mobile =
connMgr.getNetworkInfo(ConnectivityManager.TYPE_MOBILE);
if (wifi.isAvailable()) {
if (wifi.isConnected()) {
return true;
}
return false;
} else if (mobile.isAvailable()) {
if (mobile.isConnected()) {
return true;
}
return false;
} else {
return false;
}
}
}
DownloadAssets.java
//To download
//files into
//created folders
public class DownloadAssets {
private static final String TAG = "DownloadAssets";
public static int TOTAL_ASSET_COUNT;
static synchronized ArrayList<HashMap<String, String>> hit(Context context, String url) {
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 9 " + "hit url" + url);
}
ArrayList<HashMap<String, String>> mList = new ArrayList<HashMap<String, String>>();
String message = null;
String result = null;
try {
result = Constants.queryRESTurl(url);
if (result != null) {
if (result.equals("timeout")) {
message = context.getResources().getString(R.string.Text_TimeOut);
} else {
JSONObject json = Constants.convertStringtoJsonObject(result);
try {
JSONObject results = json.getJSONObject(ThumbnailFragment.JSON_RESPONSE_ATTR_RESULTSET);
String totalAssetCount = results.getString(ThumbnailFragment.JSON_RESPONSE_ATTR_ASSET_COUNT);
TOTAL_ASSET_COUNT = Integer.parseInt(totalAssetCount);
if (Constants.DEBUG) {
Log.i("5" + TAG, "totalAssetCount : " + totalAssetCount);
}
if (TOTAL_ASSET_COUNT != 0) {
JSONArray assetData = results.getJSONArray(ThumbnailFragment.JSON_RESPONSE_ATTR_ASSET_ARRAY);
if (Constants.DEBUG) {
Log.i(TAG, "6Madhu " + assetData.toString());
}
int nObjects = assetData.length();
if (Constants.DEBUG) {
Log.i(TAG, "7Madhu " + nObjects);
}
if (nObjects != 0) {
for (int i = 0; i < nObjects; i++) {
HashMap<String, String> map = new HashMap<String, String>();
JSONObject e = assetData.getJSONObject(i);
map.put("id", "" + e.getString("assets_id"));
map.put("asset_name", "" + e.getString("asset_name"));
map.put("thumb_url", "" + e.getString("thumb_url"));
map.put("asset_type", "" + e.getString("asset_type"));
map.put("large_url", "" + e.getString("large_url"));
map.put("mp4_url", "" + e.getString("mp4_url"));
map.put("normal_url", "" + e.getString("normal_url"));
map.put("description", "" + e.getString("description"));
map.put("filetype", "" + e.getString("filetype"));
map.put("filename", "" + e.getString("original_filename"));
map.put("filesize", "" + e.getString("filesize"));
mList.add(map);
if (Constants.DEBUG) {
Log.i(TAG, "Size in Loop " + mList.size());
}
}
} else if (Constants.DEBUG) {
Log.i(TAG, "EXECUTING ELSE nObjects");
}
} else if (Constants.DEBUG) {
Log.i(TAG, "EXECUTING ELSE count");
}
} catch (JSONException e) {
if (Constants.DEBUG) {
Log.e("8log_tag", "Error parsing data " + e.toString());
}
message = context.getResources().getString(R.string.Text_InvalidResponse);
} catch (Exception e) {
if (Constants.DEBUG) {
Log.e("8log_tag", "Error parsing data " + e.toString());
}
message = context.getResources().getString(R.string.Text_InvalidResponse);
e.printStackTrace();
}
}
} else {
if (Constants.DEBUG) {
Log.i(TAG, "EXECUTING ELSE result");
}
message = context.getResources().getString(R.string.Text_InvalidResponse);
}
} catch (Exception e) {
// TODO Auto-generated catch block
message = context.getResources().getString(R.string.Text_ServerProblem);
e.printStackTrace();
}
if (Constants.DEBUG) {
Log.e(TAG, "Message : " + message);
}
if (Constants.DEBUG) {
Log.d(TAG, "Offline step 9 End " + "hit return " + mList);
}
return mList;
}
}
My queries are
Files are downloading but not all files at first time from server.If I download more folders for example Folder1,Folder2 then Folder3, Folder1 and Folder2 interrupted(i.e 1 file is downloaded) but Folder3 downloaded fully...
How can I keep the queue of files/folders to be downloaded? !
A: For speed up and maintaining the queue of intent follow the below approach
protected void onHandleIntent(Intent intent) {
synchronized (intent) {
final Intent intentCpy=intent;
new Thread(new Runnable() {
@Override
public void run() {
//onHandleIntent code which is in question post
}
}
}
Use ConcurrentHashMap for Thread-Safty in following method
private synchronized void downloadSetofAssets(int OFFSET , int LIMIT , String url)
for more details about ConcurrentHashMap please visit
http://www.cs.umd.edu/class/spring2013/cmsc433/Notes/14-CMSC433-ConcurrentCollections.pdf
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 6,993 |
Q: Converting mdx parameter to ssrs between dates I have several section of similar MDX code that has been created in Microsoft SQl Server Management Studio using cube data and I now need to use the code in a SSRS paginated report. I'm getting the following error:
"Query (4, 2) The restrictions imposed by the CONSTRAINED flag in the
STRTOMEMBER function were violated."
This code works fine in Management Studio and SSRS using a date but as soon as I change the date to a parameter I get the error.
MEMBER [Measures].[Sales in Period2] AS
AGGREGATE (
{STRTOMEMBER("[Paid Date].[Date].&[2020-11-01]", CONSTRAINED) : STRTOMEMBER("
[Paid Date].[Date].&[2020-11-30]", CONSTRAINED) }
, [Measures].[Paid Amount]
),FORMAT_STRING = "#.00;(#.00);0;0"
I've tried changing:
[2020-11-01] to [@StartDate1],
[2020-11-01] to [" + @ParameterName + "],
STRTOMEMBER to STRTOSET, and
remove CONSTRAINED.
A: One possibly way to approach this:
This error says that your @ParameterName is not in the correct format. In your example you have the date as 2020-11-30, i.e., yyyy-MM-dd format. So, your parameter should also have the same format. If the format is same you can use it &[@ParameterName] in your StrToMember.
To achieve this, you can change the Dataset of your parameter to format it in the required format.
Since you are using MDX to get the data, you can look at the option of getting the parameter values directly from your main data set or the date dimension, Paid Date in your example.
In my sample below using the AdventureWorks sample, you can see the date format is different. You may want to show the date format in a different format to the users, but internally you would want it in the same format as your Cube wants it.
I would suggest you look at this link as well to see an example end to end flow with MDX parameters:
https://blog.pragmaticworks.com/writing-parametrized-mdx-for-reporting-services
Good luck
| {
"redpajama_set_name": "RedPajamaStackExchange"
} | 6,125 |
{"url":"https:\/\/encyclopediaofmath.org\/wiki\/Orthogonality","text":"# Orthogonality\n\nA generalization of the concept of perpendicularity of vectors in a Euclidean space. The most natural concept of orthogonality is put forward in the theory of Hilbert spaces. Two elements $x$ and $y$ of a Hilbert space $H$ are said to be orthogonal $( x \\perp y)$ if their inner product is equal to zero ( $( x, y) = 0$). This concept of orthogonality in the particular case where $H$ is a Euclidean space coincides with the concept of perpendicularity of two vectors. In terms of this concept, in any Hilbert space Pythagoras' theorem holds: If an element $x \\in H$ is equal to a finite or countable sum of pairwise orthogonal elements $x _ {i} \\in H$( the countable sum $\\sum _ {i=} 1 ^ \\infty x _ {i}$ is understood in the sense of convergence of the series in the metric of $H$), then $\\| x \\| ^ {2} = \\sum _ {i=} 1 ^ \\infty \\| x _ {i} \\| ^ {2}$( see Parseval equality).\n\nA complete, countable, orthonormal system $\\{ x _ {i} \\}$ in a separable Hilbert space is the analogue of a complete system of pairwise orthonormal vectors in a finite-dimensional Euclidean space: Any element $x \\in H$ can be uniquely represented as the sum $\\sum _ {i=} 1 ^ \\infty c _ {i} x _ {i}$, where $c _ {i} x _ {i} = ( x, x _ {i} ) x _ {i}$ is the orthogonal projection of the element $x$ onto the span of the vector $x _ {i}$.\n\nE.g., in the function space $L _ {2} [ a, b]$, if $\\{ \\phi _ {k} \\}$ is a complete orthonormal system, then for every $f \\in L _ {2} [ a, b]$,\n\n$$f = \\sum _ { k= } 1 ^ \\infty c _ {k} \\phi _ {k}$$\n\nin the metric of the space $L _ {2} [ a, b]$, where\n\n$$c _ {k} = \\int\\limits _ { a } ^ { b } f ( x) \\overline{ {\\phi _ {k} ( x) }}\\; dx.$$\n\nWhen the $\\phi _ {k}$ are bounded functions, the coefficients $c _ {k}$ can be defined as above for any integrable function. In these cases the question of the convergence of a corresponding series in one sense or another is of interest (see Trigonometric system; Haar system). With respect to functions, therefore, the term \"orthogonality\" is used in a broader sense: Two functions $f$ and $g$ which are integrable on the segment $[ a, b]$ are orthogonal if\n\n$$\\int\\limits _ { a } ^ { b } f( x) g( x) dx = 0$$\n\n(for the integral to exist, it is usually required that $f \\in L _ {p} [ a, b]$, $1 \\leq p \\leq \\infty$, $g \\in L _ {q} [ a, b]$, $p ^ {- 1 } + q ^ {- 1 } = 1$, where $L _ \\infty [ a, b]$ is the set of bounded measurable functions).\n\nDefinitions of orthogonality of elements of an arbitrary normed linear space also exist. One of them (see [4]) is as follows: An element $x$ of a real normed space $B$ is considered orthogonal to the element $y$ if $\\| x \\| \\leq \\| x + ky \\|$ for all real $k$. In terms of this concept certain necessary and sufficient conditions have been established under which a scalar (inner) product of elements of $B$ can be defined (see [5], [6]).\n\n#### References\n\n [1] L.V. Kantorovich, G.P. Akilov, \"Functionalanalysis in normierten R\u00e4umen\" , Akademie Verlag (1964) (Translated from Russian) [2] N. Dunford, J.T. Schwartz, \"Linear operators. General theory\" , 1 , Wiley, reprint (1988) [3] S. Kaczmarz, H. Steinhaus, \"Theorie der Orthogonalreihen\" , Chelsea, reprint (1951) [4] G. Birkhoff, \"Orthogonality in linear metric spaces\" Duke Math. J. , 1 (1935) pp. 169\u2013172 [5] R. James, \"Orthogonality and linear functionals in normed linear spaces\" Trans. Amer. Math. Soc. , 61 (1947) pp. 265\u2013292 [6] R. James, \"Inner products in normed linear spaces\" Bull. Amer. Math. Soc. , 53 (1947) pp. 559\u2013566","date":"2021-12-02 06:54:23","metadata":"{\"extraction_info\": {\"found_math\": true, \"script_math_tex\": 0, \"script_math_asciimath\": 0, \"math_annotations\": 0, \"math_alttext\": 0, \"mathml\": 0, \"mathjax_tag\": 0, \"mathjax_inline_tex\": 1, \"mathjax_display_tex\": 1, \"mathjax_asciimath\": 0, \"img_math\": 0, \"codecogs_latex\": 0, \"wp_latex\": 0, \"mimetex.cgi\": 0, \"\/images\/math\/codecogs\": 0, \"mathtex.cgi\": 0, \"katex\": 0, \"math-container\": 0, \"wp-katex-eq\": 0, \"align\": 0, \"equation\": 0, \"x-ck12\": 0, \"texerror\": 0, \"math_score\": 0.9399858713150024, \"perplexity\": 229.237188375133}, \"config\": {\"markdown_headings\": true, \"markdown_code\": false, \"boilerplate_config\": {\"ratio_threshold\": 0.18, \"absolute_threshold\": 10, \"end_threshold\": 15, \"enable\": true}, \"remove_buttons\": true, \"remove_image_figures\": true, \"remove_link_clusters\": true, \"table_config\": {\"min_rows\": 2, \"min_cols\": 3, \"format\": \"plain\"}, \"remove_chinese\": true, \"remove_edit_buttons\": true, \"extract_latex\": true}, \"warc_path\": \"s3:\/\/commoncrawl\/crawl-data\/CC-MAIN-2021-49\/segments\/1637964361169.72\/warc\/CC-MAIN-20211202054457-20211202084457-00032.warc.gz\"}"} | null | null |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.