text:
Diarrhea

Diarrhea (American English), also spelled diarrhoea or diarrhœa (British English), is the condition of having at least three loose, liquid, or watery bowel movements in a day. It often lasts for a few days and can result in dehydration due to fluid loss. Signs of dehydration often begin with loss of the normal stretchiness of the skin and irritable behaviour. This can progress to decreased urination, loss of skin color, a fast heart rate, and a decrease in responsiveness as it becomes more severe. Loose but non-watery stools in babies who are exclusively breastfed, however, are normal.

The most common cause is an infection of the intestines due to a virus, bacterium, or parasite—a condition also known as gastroenteritis. These infections are often acquired from food or water that has been contaminated by feces, or directly from another person who is infected. The three types of diarrhea are: short duration watery diarrhea, short duration bloody diarrhea, and persistent diarrhea (lasting more than two weeks, which can be either watery or bloody). The short duration watery diarrhea may be due to cholera, although this is rare in the developed world. If blood is present, it is also known as dysentery. A number of non-infectious causes can result in diarrhea. These include lactose intolerance, irritable bowel syndrome, non-celiac gluten sensitivity, celiac disease, inflammatory bowel disease such as ulcerative colitis, hyperthyroidism, bile acid diarrhea, and a number of medications. In most cases, stool cultures to confirm the exact cause are not required.

Diarrhea can be prevented by improved sanitation, clean drinking water, and hand washing with soap. Breastfeeding for at least six months and vaccination against rotavirus is also recommended. Oral rehydration solution (ORS)—clean water with modest amounts of salts and sugar—is the treatment of choice. Zinc tablets are also recommended. These treatments have been estimated to have saved 50 million children in the past 25 years. When people have diarrhea it is recommended that they continue to eat healthy food, and babies continue to be breastfed. If commercial ORS is not available, homemade solutions may be used. In those with severe dehydration, intravenous fluids may be required. Most cases, however, can be managed well with fluids by mouth. Antibiotics, while rarely used, may be recommended in a few cases such as those who have bloody diarrhea and a high fever, those with severe diarrhea following travelling, and those who grow specific bacteria or parasites in their stool. Loperamide may help decrease the number of bowel movements but is not recommended in those with severe disease.

About 1.7 to 5 billion cases of diarrhea occur per year. It is most common in developing countries, where young children get diarrhea on average three times a year. Total deaths from diarrhea are estimated at 1.53 million in 2019—down from 2.9 million in 1990. In 2012, it was the second most common cause of deaths in children younger than five (0.76 million or 11%). Frequent episodes of diarrhea are also a common cause of malnutrition and the most common cause in those younger than five years of age. Other long term problems that can result include stunted growth and poor intellectual development.

Terminology
The word diarrhea is from the Ancient Greek διάρροια from διά dia "through" and ῥέω rheo "flow".

Diarrhea is the spelling in American English, whereas diarrhoea is the spelling in British English.

Slang terms for the condition include "the runs", "the squirts" (or "squits" in Britain ) and "the trots". The word is often pronounced as.

Definition
Diarrhea is defined by the World Health Organization as having three or more loose or liquid stools per day, or as having more stools than is normal for that person.

Acute diarrhea is defined as an abnormally frequent discharge of semisolid or fluid fecal matter from the bowel, lasting less than 14 days, by World Gastroenterology Organization. Acute diarrhea that is watery may be known as AWD (Acute Watery Diarrhoea.)

Secretory
Secretory diarrhea means that there is an increase in the active secretion, or there is an inhibition of absorption. There is little to no structural damage. The most common cause of this type of diarrhea is a cholera toxin that stimulates the secretion of anions, especially chloride ions (Cl–). Therefore, to maintain a charge balance in the gastrointestinal tract, sodium (Na+) is carried with it, along with water. In this type of diarrhea intestinal fluid secretion is isotonic with plasma even during fasting. It continues even when there is no oral food intake.

Osmotic
Osmotic diarrhea occurs when too much water is drawn into the bowels. If a person drinks solutions with excessive sugar or excessive salt, these can draw water from the body into the bowel and cause osmotic diarrhea. Osmotic diarrhea can also result from maldigestion, e.g. pancreatic disease or coeliac disease, in which the nutrients are left in the lumen to pull in water. Or it can be caused by osmotic laxatives (which work to alleviate constipation by drawing water into the bowels). In healthy individuals, too much magnesium or vitamin C or undigested lactose can produce osmotic diarrhea and distention of the bowel. A person who has lactose intolerance can have difficulty absorbing lactose after an extraordinarily high intake of dairy products. In persons who have fructose malabsorption, excess fructose intake can also cause diarrhea. High-fructose foods that also have a high glucose content are more absorbable and less likely to cause diarrhea. Sugar alcohols such as sorbitol (often found in sugar-free foods) are difficult for the body to absorb and, in large amounts, may lead to osmotic diarrhea. In most of these cases, osmotic diarrhea stops when the offending agent, e.g. milk or sorbitol, is stopped.

Exudative
Exudative diarrhea occurs with the presence of blood and pus in the stool. This occurs with inflammatory bowel diseases, such as Crohn's disease or ulcerative colitis, and other severe infections such as E. coli or other forms of food poisoning.

Inflammatory
Inflammatory diarrhea occurs when there is damage to the mucosal lining or brush border, which leads to a passive loss of protein-rich fluids and a decreased ability to absorb these lost fluids. Features of all three of the other types of diarrhea can be found in this type of diarrhea. It can be caused by bacterial infections, viral infections, parasitic infections, or autoimmune problems such as inflammatory bowel diseases. It can also be caused by tuberculosis, colon cancer, and enteritis.

Dysentery
If there is blood visible in the stools, it is also known as dysentery. The blood is a trace of an invasion of bowel tissue. Dysentery is a symptom of, among others, Shigella, Entamoeba histolytica, and Salmonella.

Health effects
Diarrheal disease may have a negative impact on both physical fitness and mental development. "Early childhood malnutrition resulting from any cause reduces physical fitness and work productivity in adults," and diarrhea is a primary cause of childhood malnutrition. Further, evidence suggests that diarrheal disease has significant impacts on mental development and health; it has been shown that, even when controlling for helminth infection and early breastfeeding, children who had experienced severe diarrhea had significantly lower scores on a series of tests of intelligence.

Diarrhea can cause electrolyte imbalances, kidney impairment, dehydration, and defective immune system responses. When oral drugs are administered, the efficiency of the drug is to produce a therapeutic effect and the lack of this effect may be due to the medication travelling too quickly through the digestive system, limiting the time that it can be absorbed. Clinicians try to treat the diarrheas by reducing the dosage of medication, changing the dosing schedule, discontinuation of the drug, and rehydration. The interventions to control the diarrhea are not often effective. Diarrhea can have a profound effect on the quality of life because fecal incontinence is one of the leading factors for placing older adults in long term care facilities (nursing homes).

Causes

In the latter stages of human digestion, ingested materials are inundated with water and digestive fluids such as gastric acid, bile, and digestive enzymes in order to break them down into their nutrient components, which are then absorbed into the bloodstream via the intestinal tract in the small intestine. Prior to defecation, the large intestine reabsorbs the water and other digestive solvents in the waste product in order to maintain proper hydration and overall equilibrium. Diarrhea occurs when the large intestine is prevented, for any number of reasons, from sufficiently absorbing the water or other digestive fluids from fecal matter, resulting in a liquid, or "loose", bowel movement.

Acute diarrhea is most commonly due to viral gastroenteritis with rotavirus, which accounts for 40% of cases in children under five. In travelers, however, bacterial infections predominate. Various toxins such as mushroom poisoning and drugs can also cause acute diarrhea.

Chronic diarrhea can be the part of the presentations of a number of chronic medical conditions affecting the intestine. Common causes include ulcerative colitis, Crohn's disease, microscopic colitis, celiac disease, irritable bowel syndrome, and bile acid malabsorption.

Infections
There are many causes of infectious diarrhea, which include viruses, bacteria and parasites. Infectious diarrhea is frequently referred to as gastroenteritis. Norovirus is the most common cause of viral diarrhea in adults, but rotavirus is the most common cause in children under five years old. Adenovirus types 40 and 41, and astroviruses cause a significant number of infections. Shiga-toxin producing Escherichia coli, such as E coli o157:h7, are the most common cause of infectious bloody diarrhea in the United States.

Campylobacter spp. are a common cause of bacterial diarrhea, but infections by Salmonella spp., Shigella spp. and some strains of Escherichia coli are also a frequent cause.

In the elderly, particularly those who have been treated with antibiotics for unrelated infections, a toxin produced by Clostridioides difficile often causes severe diarrhea.

Parasites, particularly protozoa e.g., Cryptosporidium spp., Giardia spp., Entamoeba histolytica, Blastocystis spp., Cyclospora cayetanensis, are frequently the cause of diarrhea that involves chronic infection. The broad-spectrum antiparasitic agent nitazoxanide has shown efficacy against many diarrhea-causing parasites.

Other infectious agents, such as parasites or bacterial toxins, may exacerbate symptoms. In sanitary living conditions where there is ample food and a supply of clean water, an otherwise healthy person usually recovers from viral infections in a few days. However, for ill or malnourished individuals, diarrhea can lead to severe dehydration and can become life-threatening.

Sanitation
Open defecation is a leading cause of infectious diarrhea leading to death.

Poverty is a good indicator of the rate of infectious diarrhea in a population. This association does not stem from poverty itself, but rather from the conditions under which impoverished people live. The absence of certain resources compromises the ability of the poor to defend themselves against infectious diarrhea. "Poverty is associated with poor housing, crowding, dirt floors, lack of access to clean water or to sanitary disposal of fecal waste (sanitation), cohabitation with domestic animals that may carry human pathogens, and a lack of refrigerated storage for food, all of which increase the frequency of diarrhea... Poverty also restricts the ability to provide age-appropriate, nutritionally balanced diets or to modify diets when diarrhea develops so as to mitigate and repair nutrient losses. The impact is exacerbated by the lack of adequate, available, and affordable medical care."

One of the most common causes of infectious diarrhea is a lack of clean water. Often, improper fecal disposal leads to contamination of groundwater. This can lead to widespread infection among a population, especially in the absence of water filtration or purification. Human feces contains a variety of potentially harmful human pathogens.

Nutrition
Proper nutrition is important for health and functioning, including the prevention of infectious diarrhea. It is especially important to young children who do not have a fully developed immune system. Zinc deficiency, a condition often found in children in developing countries can, even in mild cases, have a significant impact on the development and proper functioning of the human immune system. Indeed, this relationship between zinc deficiency and reduced immune functioning corresponds with an increased severity of infectious diarrhea. Children who have lowered levels of zinc have a greater number of instances of diarrhea, severe diarrhea, and diarrhea associated with fever. Similarly, vitamin A deficiency can cause an increase in the severity of diarrheal episodes. However, there is some discrepancy when it comes to the impact of vitamin A deficiency on the rate of disease. While some argue that a relationship does not exist between the rate of disease and vitamin A status, others suggest an increase in the rate associated with deficiency. Given that estimates suggest 127 million preschool children worldwide are vitamin A deficient, this population has the potential for increased risk of disease contraction.

Malabsorption
Malabsorption is the inability to absorb food fully, mostly from disorders in the small bowel, but also due to maldigestion from diseases of the pancreas.

Causes include:
 * enzyme deficiencies or mucosal abnormality, as in food allergy and food intolerance, e.g. celiac disease (gluten intolerance), lactose intolerance (intolerance to milk sugar, common in non-Europeans), and fructose malabsorption.
 * pernicious anemia, or impaired bowel function due to the inability to absorb vitamin B12,
 * loss of pancreatic secretions, which may be due to cystic fibrosis or pancreatitis,
 * structural defects, like short bowel syndrome (surgically removed bowel) and radiation fibrosis, such as usually follows cancer treatment and other drugs, including agents used in chemotherapy; and
 * certain drugs, like orlistat, which inhibits the absorption of fat.

Inflammatory bowel disease
The two overlapping types here are of unknown origin:
 * Ulcerative colitis is marked by chronic bloody diarrhea and inflammation mostly affects the distal colon near the rectum.
 * Crohn's disease typically affects fairly well demarcated segments of bowel in the colon and often affects the end of the small bowel.

Irritable bowel syndrome
Another possible cause of diarrhea is irritable bowel syndrome (IBS), which usually presents with abdominal discomfort relieved by defecation and unusual stool (diarrhea or constipation) for at least three days a week over the previous three months. Symptoms of diarrhea-predominant IBS can be managed through a combination of dietary changes, soluble fiber supplements and medications such as loperamide or codeine. About 30% of patients with diarrhea-predominant IBS have bile acid malabsorption diagnosed with an abnormal SeHCAT test.

Other diseases
Diarrhea can be caused by other diseases and conditions, namely:
 * Chronic ethanol ingestion
 * Hyperthyroidism
 * Certain medications
 * Bile acid malabsorption
 * Ischemic bowel disease: This usually affects older people and can be due to blocked arteries.
 * Microscopic colitis, a type of inflammatory bowel disease where changes are seen only on histological examination of colonic biopsies.
 * Bile salt malabsorption (primary bile acid diarrhea) where excessive bile acids in the colon produce a secretory diarrhea.
 * Hormone-secreting tumors: some hormones, e.g. serotonin, can cause diarrhea if secreted in excess (usually from a tumor).
 * Chronic mild diarrhea in infants and toddlers may occur with no obvious cause and with no other ill effects; this condition is called toddler's diarrhea.
 * Environmental enteropathy
 * Radiation enteropathy following treatment for pelvic and abdominal cancers.

Medications
Over 700 medications, such as penicillin, are known to cause diarrhea. The classes of medications that are known to cause diarrhea are laxatives, antacids, heartburn medications, antibiotics, anti-neoplastic drugs, anti-inflammatories as well as many dietary supplements.

Evolution
According to two researchers, Nesse and Williams, diarrhea may function as an evolved expulsion defense mechanism. As a result, if it is stopped, there might be a delay in recovery. They cite in support of this argument research published in 1973 that found that treating Shigella with the anti-diarrhea drug (Co-phenotrope, Lomotil) caused people to stay feverish twice as long as those not so treated. The researchers indeed themselves observed that: "Lomotil may be contraindicated in shigellosis. Diarrhea may represent a defense mechanism".

Diagnostic approach
The following types of diarrhea may indicate further investigation is needed:

 * In infants
 * Moderate or severe diarrhea in young children
 * Associated with blood
 * Continues for more than two days
 * Associated non-cramping abdominal pain, fever, weight loss, etc.
 * In travelers
 * In food handlers, because of the potential to infect others;
 * In institutions such as hospitals, child care centers, or geriatric and convalescent homes.

A severity score is used to aid diagnosis in children.

When diarrhea lasts for more than four weeks a number of further tests may be recommended including:

 * Complete blood count and a ferritin if anemia is present
 * Thyroid stimulating hormone
 * Tissue transglutaminase for celiac disease
 * Fecal calprotectin to exclude inflammatory bowel disease
 * Stool tests for ova and parasites as well as for Clostridioides difficile
 * A colonoscopy or fecal immunochemical testing for cancer, including biopsies to detect microscopic colitis
 * Testing for bile acid diarrhea with SeHCAT, 7α-hydroxy-4-cholesten-3-one or fecal bile acids depending on availability
 * Hydrogen breath test looking for lactose intolerance
 * Further tests if immunodeficiency, pelvic radiation disease or small intestinal bacterial overgrowth suspected.

A 2019 guideline recommended that testing for ova and parasites was only needed in people who are at high risk though they recommend routine testing for giardia. Erythrocyte sedimentation rate (ESR) and C-reactive protein (CRP) were not recommended.

Epidemiology

Worldwide in 2004, approximately 2.5 billion cases of diarrhea occurred, which resulted in 1.5 million deaths among children under the age of five. Greater than half of these were in Africa and South Asia. This is down from a death rate of 4.5 million in 1980 for gastroenteritis. Diarrhea remains the second leading cause of infant mortality (16%) after pneumonia (17%) in this age group.

The majority of such cases occur in the developing world, with over half of the recorded cases of childhood diarrhea occurring in Africa and Asia, with 696 million and 1.2 billion cases, respectively, compared to only 480 million in the rest of the world.

Infectious diarrhea resulted in about 0.7 million deaths in children under five years old in 2011 and 250 million lost school days. In the Americas, diarrheal disease accounts for a total of 10% of deaths among children aged 1–59 months while in South East Asia, it accounts for 31.3% of deaths. It is estimated that around 21% of child mortalities in developing countries are due to diarrheal disease.

Even though diarrhea is best known in humans, it affects many other species, notably among primates. The cecal appendix, when present, appears to afford some protection against diarrhea to young primates.

Sanitation
Numerous studies have shown that improvements in drinking water and sanitation (WASH) lead to decreased risks of diarrhoea. Such improvements might include for example use of water filters, provision of high-quality piped water and sewer connections.

In institutions, communities, and households, interventions that promote hand washing with soap lead to significant reductions in the incidence of diarrhea. The same applies to preventing open defecation at a community-wide level and providing access to improved sanitation. This includes use of toilets and implementation of the entire sanitation chain connected to the toilets (collection, transport, disposal or reuse of human excreta).

There is limited evidence that safe disposal of child or adult feces can prevent diarrheal disease.

Hand washing
Basic sanitation techniques can have a profound effect on the transmission of diarrheal disease. The implementation of hand washing using soap and water, for example, has been experimentally shown to reduce the incidence of disease by approximately 30–48%. Hand washing in developing countries, however, is compromised by poverty as acknowledged by the CDC: "Handwashing is integral to disease prevention in all parts of the world; however, access to soap and water is limited in a number of less developed countries. This lack of access is one of many challenges to proper hygiene in less developed countries." Solutions to this barrier require the implementation of educational programs that encourage sanitary behaviours.

Water
Given that water contamination is a major means of transmitting diarrheal disease, efforts to provide clean water supply and improved sanitation have the potential to dramatically cut the rate of disease incidence. In fact, it has been proposed that we might expect an 88% reduction in child mortality resulting from diarrheal disease as a result of improved water sanitation and hygiene. Similarly, a meta-analysis of numerous studies on improving water supply and sanitation shows a 22–27% reduction in disease incidence, and a 21–30% reduction in mortality rate associated with diarrheal disease.

Chlorine treatment of water, for example, has been shown to reduce both the risk of diarrheal disease, and of contamination of stored water with diarrheal pathogens.

Vaccination
Immunization against the pathogens that cause diarrheal disease is a viable prevention strategy, however it does require targeting certain pathogens for vaccination. In the case of Rotavirus, which was responsible for around 6% of diarrheal episodes and 20% of diarrheal disease deaths in the children of developing countries, use of a Rotavirus vaccine in trials in 1985 yielded a slight (2–3%) decrease in total diarrheal disease incidence, while reducing overall mortality by 6–10%. Similarly, a Cholera vaccine showed a strong reduction in morbidity and mortality, though the overall impact of vaccination was minimal as Cholera is not one of the major causative pathogens of diarrheal disease. Since this time, more effective vaccines have been developed that have the potential to save many thousands of lives in developing nations, while reducing the overall cost of treatment, and the costs to society.

Rotavirus vaccine decreases the rates of diarrhea in a population. New vaccines against rotavirus, Shigella, Enterotoxigenic Escherichia coli (ETEC), and cholera are under development, as well as other causes of infectious diarrhea.

Nutrition
Dietary deficiencies in developing countries can be combated by promoting better eating practices. Zinc supplementation proved successful showing a significant decrease in the incidence of diarrheal disease compared to a control group. The majority of the literature suggests that vitamin A supplementation is advantageous in reducing disease incidence. Development of a supplementation strategy should take into consideration the fact that vitamin A supplementation was less effective in reducing diarrhea incidence when compared to vitamin A and zinc supplementation, and that the latter strategy was estimated to be significantly more cost effective.

Breastfeeding
Breastfeeding practices have been shown to have a dramatic effect on the incidence of diarrheal disease in poor populations. Studies across a number of developing nations have shown that those who receive exclusive breastfeeding during their first 6 months of life are better protected against infection with diarrheal diseases. One study in Brazil found that non-breastfed infants were 14 times more likely to die from diarrhea than exclusively breastfed infants. Exclusive breastfeeding is currently recommended for the first six months of an infant's life by the WHO, with continued breastfeeding until at least two years of age.

Others
Probiotics decrease the risk of diarrhea in those taking antibiotics. Insecticide spraying may reduce fly numbers and the risk of diarrhea in children in a setting where there is seasonal variations in fly numbers throughout the year.

Management
In many cases of diarrhea, replacing lost fluid and salts is the only treatment needed. This is usually by mouth – oral rehydration therapy – or, in severe cases, intravenously. Diet restrictions such as the BRAT diet are no longer recommended. Research does not support the limiting of milk to children as doing so has no effect on duration of diarrhea. To the contrary, WHO recommends that children with diarrhea continue to eat as sufficient nutrients are usually still absorbed to support continued growth and weight gain, and that continuing to eat also speeds up recovery of normal intestinal functioning. CDC recommends that children and adults with cholera also continue to eat. There is no evidence that early refeeding in children can cause an increase in inappropriate use of intravenous fluid, episodes of vomiting, and risk of having persistent diarrhea.

Medications such as loperamide (Imodium) and bismuth subsalicylate may be beneficial; however they may be contraindicated in certain situations.

Fluids
Oral rehydration solution (ORS) (a slightly sweetened and salty water) can be used to prevent dehydration. Standard home solutions such as salted rice water, salted yogurt drinks, vegetable and chicken soups with salt can be given. Home solutions such as water in which cereal has been cooked, unsalted soup, green coconut water, weak tea (unsweetened), and unsweetened fresh fruit juices can have from half a teaspoon to full teaspoon of salt (from one-and-a-half to three grams) added per liter. Clean plain water can also be one of several fluids given. There are commercial solutions such as Pedialyte, and relief agencies such as UNICEF widely distribute packets of salts and sugar. A WHO publication for physicians recommends a homemade ORS consisting of one liter water with one teaspoon salt (3 grams) and two tablespoons sugar (18 grams) added (approximately the "taste of tears" ). Rehydration Project recommends adding the same amount of sugar but only one-half a teaspoon of salt, stating that this more dilute approach is less risky with very little loss of effectiveness. Both agree that drinks with too much sugar or salt can make dehydration worse.

Appropriate amounts of supplemental zinc and potassium should be added if available. But the availability of these should not delay rehydration. As WHO points out, the most important thing is to begin preventing dehydration as early as possible. In another example of prompt ORS hopefully preventing dehydration, CDC recommends for the treatment of cholera continuing to give Oral Rehydration Solution during travel to medical treatment.

Vomiting often occurs during the first hour or two of treatment with ORS, especially if a child drinks the solution too quickly, but this seldom prevents successful rehydration since most of the fluid is still absorbed. WHO recommends that if a child vomits, to wait five or ten minutes and then start to give the solution again more slowly.

Drinks especially high in simple sugars, such as soft drinks and fruit juices, are not recommended in children under five as they may increase dehydration. A too rich solution in the gut draws water from the rest of the body, just as if the person were to drink sea water. Plain water may be used if more specific and effective ORT preparations are unavailable or are not palatable. Additionally, a mix of both plain water and drinks perhaps too rich in sugar and salt can alternatively be given to the same person, with the goal of providing a medium amount of sodium overall. A nasogastric tube can be used in young children to administer fluids if warranted.

Eating
The WHO recommends a child with diarrhea continue to be fed. Continued feeding speeds the recovery of normal intestinal function. In contrast, children whose food is restricted have diarrhea of longer duration and recover intestinal function more slowly. The WHO states "Food should never be withheld and the child's usual foods should not be diluted. Breastfeeding should always be continued." In the specific example of cholera, the CDC makes the same recommendation. Breast-fed infants with diarrhea often choose to breastfeed more, and should be encouraged to do so. In young children who are not breast-fed and live in the developed world, a lactose-free diet may be useful to speed recovery. Eating food containing soluble fibre may help, but insoluble fibre might make it worse.

Medications
Antidiarrheal agents  can  be  classified  into  four  different groups: antimotility, antisecretory, adsorbent, and anti-infectious. While antibiotics are beneficial in certain types of acute diarrhea, they are usually not used except in specific situations. There are concerns that antibiotics may increase the risk of hemolytic uremic syndrome in people infected with Escherichia coli O157:H7. In resource-poor countries, treatment with antibiotics may be beneficial. However, some bacteria are developing antibiotic resistance, particularly Shigella. Antibiotics can also cause diarrhea, and antibiotic-associated diarrhea is the most common adverse effect of treatment with general antibiotics.

While bismuth compounds (Pepto-Bismol) decreased the number of bowel movements in those with travelers' diarrhea, they do not decrease the length of illness. Anti-motility agents like loperamide are also effective at reducing the number of stools but not the duration of disease. These agents should be used only if bloody diarrhea is not present.

Diosmectite, a natural aluminomagnesium silicate clay, is effective in alleviating symptoms of acute diarrhea in children, and also has some effects in chronic functional diarrhea, radiation-induced diarrhea, and chemotherapy-induced diarrhea. Another absorbent agent used for the treatment of mild diarrhea is kaopectate.

Racecadotril an antisecretory medication may be used to treat diarrhea in children and adults. It has better tolerability than loperamide, as it causes less constipation and flatulence. However, it has little benefit in improving acute diarrhea in children.

Bile acid sequestrants such as cholestyramine can be effective in chronic diarrhea due to bile acid malabsorption. Therapeutic trials of these drugs are indicated in chronic diarrhea if bile acid malabsorption cannot be diagnosed with a specific test, such as SeHCAT retention.

Alternative therapies
Zinc supplementation may benefit children over six months old with diarrhea in areas with high rates of malnourishment or zinc deficiency. This supports the World Health Organization guidelines for zinc, but not in the very young.

A Cochrane Review from 2020 concludes that probiotics make little or no difference to people who have diarrhea lasting 2 days or longer and that there is no proof that they reduce its duration. The probiotic lactobacillus can help prevent antibiotic-associated diarrhea in adults but possibly not children. For those with lactose intolerance, taking digestive enzymes containing lactase when consuming dairy products often improves symptoms.

title: Diarrhea


text:
Sokoban

Sokoban (倉庫番) is a puzzle video game in which the player pushes boxes around in a warehouse, trying to get them to storage locations. The game was designed in 1981 by Hiroyuki Imabayashi, and first published in December 1982.

Gameplay
The warehouse is depicted as a grid of squares, each one representing either a floor section or a wall section. Some floor squares contain boxes and some are marked as storage locations. The player, often represented as a worker character, can move one square at a time horizontally or vertically onto empty floor squares, but cannot pass through walls or boxes.

To move a box, the player walks up to it and pushes it to an empty square directly beyond the box. Boxes cannot be pushed to squares with walls or other boxes, and they cannot be pulled. The number of boxes matches the number of storage locations. The puzzle is solved when all boxes occupy the storage locations.

Challenges and strategy
Progressing through the game often requires meticulous planning and strategic maneuvering. A single misstep, like pushing a box into a corner or blocking others, can create unsolvable scenarios, forcing the player to backtrack or restart the puzzle. Anticipating the consequences of each push, and considering the overall layout of the puzzle are crucial to avoid these deadlocks.

Development
Sokoban was created in 1981 by Hiroyuki Imabayashi. The first commercial game was published in December 1982 by Thinking Rabbit, a software house based in Takarazuka, Japan. Sokoban was a hit in Japan, selling more than 400,000 copies before being released in the United States. In 1988, Sokoban was published in US by Spectrum HoloByte for the IBM PC, Commodore 64, and Apple II as Soko-Ban.

Implementations
Sokoban has been implemented for almost all home computers, personal computers and video game consoles. Versions also exist for mobile phones, graphing calculators, digital cameras and electronic organizers.

Scientific research
Sokoban has been studied using the theory of computational complexity. The computational problem of solving Sokoban puzzles was first shown to be NP-hard. Further work proved it is also PSPACE-complete.

Solving non-trivial Sokoban puzzles is difficult for computers because of the high branching factor (many legal pushes at each turn) and the large search depth (many pushes needed to reach a solution). Even small puzzles can require lengthy solutions.

The Sokoban game provides a challenging testbed for developing and evaluating planning techniques. The first documented automated solver was Rolling Stone, developed at the University of Alberta. Its core principles laid the groundwork for many newer solvers. It employed a conventional search algorithm enhanced with domain-specific knowledge. Festival, utilizing its FESS algorithm, was the first automatic solver to complete all 90 puzzles in the widely used XSokoban test suite. However, even the best automated solvers cannot solve many of the more challenging puzzles that humans can solve with time and effort.

Variants
Several puzzles can be considered variants of the original Sokoban game in the sense that they all make use of a controllable character pushing boxes around in a maze.

 * Alternative tilings: In the standard game, the mazes are laid out on a square grid. Several variants apply the rules of Sokoban to mazes laid out on other tilings. Hexoban uses regular hexagons, and Trioban uses equilateral triangles.
 * Multiple pushers: In the variant Multiban, the puzzle contains more than one pusher. In the game Sokoboxes Duo, strictly two pushers collaborate to solve the puzzle.
 * Designated storage locations: In Sokomind Plus, some boxes and target squares are uniquely numbered. In Block-o-Mania, the boxes have different colours, and the goal is to push them onto squares with matching colours.
 * Alternative game objectives: Several variants feature different objectives from the traditional Sokoban gameplay. For instance, in Interlock and Sokolor, the boxes have different colours, but the objective is to move them so that similarly coloured boxes are adjacent. In CyberBox, each level has a designated exit square, and the objective is to reach that exit by pushing boxes, potentially more than one simultaneously. In a variant called Beanstalk, the objective is to push the elements of the level onto a target square in a fixed sequence.
 * Additional game elements: Push Crate, Sokonex, Xsok, Cyberbox and Block-o-Mania all add new elements to the basic puzzle. Examples include holes, teleports, moving blocks and one-way passages.
 * Character actions: In Pukoban, the character can pull boxes in addition to pushing them.
 * Reverse mode: In this variant, the player solves the standard puzzle backward, starting with all boxes on goal squares. Then the player pulls the boxes to reach the initial position. Solutions obtained in reverse mode can be directly applied to solve the standard puzzle by reversing the order of the moves. This makes reverse mode a useful tool for players, allowing them to develop strategies for solving puzzles in the standard game.

Selected official releases
This table lists some prominent official Sokoban releases that mark milestones, such as expanding to new platforms or achieving widespread popularity. They are organized by release date.

license: Creative Commons - Attribution Share-Alike - https://creativecommons.org/licenses/by-sa/4.0/

title: Sokoban


text:
Work function

In solid-state physics, the work function (sometimes spelled workfunction) is the minimum thermodynamic work (i.e., energy) needed to remove an electron from a solid to a point in the vacuum immediately outside the solid surface. Here "immediately" means that the final electron position is far from the surface on the atomic scale, but still too close to the solid to be influenced by ambient electric fields in the vacuum. The work function is not a characteristic of a bulk material, but rather a property of the surface of the material (depending on crystal face and contamination).

Definition
The work function $W$ for a given surface is defined by the difference
 * $$W = -e\phi - E_{\rm F}, $$

where $−e$ is the charge of an electron, $ϕ$ is the electrostatic potential in the vacuum nearby the surface, and $E_{F}$ is the Fermi level (electrochemical potential of electrons) inside the material. The term $−eϕ$ is the energy of an electron at rest in the vacuum nearby the surface.

In practice, one directly controls $ϕ$ by the voltage applied to the material through electrodes, and the work function is generally a fixed characteristic of the surface material. Consequently, this means that when a voltage is applied to a material, the electrostatic potential $E_{F}$ produced in the vacuum will be somewhat lower than the applied voltage, the difference depending on the work function of the material surface. Rearranging the above equation, one has
 * $$\phi = V - \frac{W}{e}$$

where $ϕ$ is the voltage of the material (as measured by a voltmeter, through an attached electrode), relative to an electrical ground that is defined as having zero Fermi level. The fact that $V = −E_{F} / e$ depends on the material surface means that the space between two dissimilar conductors will have a built-in electric field, when those conductors are in total equilibrium with each other (electrically shorted to each other, and with equal temperatures).

The work function refers to removal of an electron to a position that is far enough from the surface (many nm) that the force between the electron and its image charge in the surface can be neglected. The electron must also be close to the surface compared to the nearest edge of a crystal facet, or to any other change in the surface structure, such as a change in the material composition, surface coating or reconstruction. The built-in electric field that results from these structures, and any other ambient electric field present in the vacuum are excluded in defining the work function.

Applications

 * Thermionic emission: In thermionic electron guns, the work function and temperature of the hot cathode are critical parameters in determining the amount of current that can be emitted. Tungsten, the common choice for vacuum tube filaments, can survive to high temperatures but its emission is somewhat limited due to its relatively high work function (approximately 4.5 eV). By coating the tungsten with a substance of lower work function (e.g., thorium or barium oxide), the emission can be greatly increased. This prolongs the lifetime of the filament by allowing operation at lower temperatures (for more information, see hot cathode).
 * Band bending models in solid-state electronics: The behavior of a solid-state device is strongly dependent on the size of various Schottky barriers and band offsets in the junctions of differing materials, such as metals, semiconductors, and insulators. Some commonly used heuristic approaches to predict the band alignment between materials, such as Anderson's rule and the Schottky–Mott rule, are based on the thought experiment of two materials coming together in vacuum, such that the surfaces charge up and adjust their work functions to become equal just before contact. In reality these work function heuristics are inaccurate due to their neglect of numerous microscopic effects. However, they provide a convenient estimate until the true value can be determined by experiment.
 * Equilibrium electric fields in vacuum chambers: Variation in work function between different surfaces causes a non-uniform electrostatic potential in the vacuum. Even on an ostensibly uniform surface, variations in $ϕ$ known as patch potentials are always present due to microscopic inhomogeneities. Patch potentials have disrupted sensitive apparatus that rely on a perfectly uniform vacuum, such as Casimir force experiments and the Gravity Probe B experiment. Critical apparatus may have surfaces covered with molybdenum, which shows low variations in work function between different crystal faces.
 * Contact electrification: If two conducting surfaces are moved relative to each other, and there is potential difference in the space between them, then an electric current will be driven. This is because the surface charge on a conductor depends on the magnitude of the electric field, which in turn depends on the distance between the surfaces. The externally observed electrical effects are largest when the conductors are separated by the smallest distance without touching (once brought into contact, the charge will instead flow internally through the junction between the conductors). Since two conductors in equilibrium can have a built-in potential difference due to work function differences, this means that bringing dissimilar conductors into contact, or pulling them apart, will drive electric currents. These contact currents can damage sensitive microelectronic circuitry and occur even when the conductors would be grounded in the absence of motion.

Measurement
Certain physical phenomena are highly sensitive to the value of the work function. The observed data from these effects can be fitted to simplified theoretical models, allowing one to extract a value of the work function. These phenomenologically extracted work functions may be slightly different from the thermodynamic definition given above. For inhomogeneous surfaces, the work function varies from place to place, and different methods will yield different values of the typical "work function" as they average or select differently among the microscopic work functions.

Many techniques have been developed based on different physical effects to measure the electronic work function of a sample. One may distinguish between two groups of experimental methods for work function measurements: absolute and relative.

 * Absolute methods employ electron emission from the sample induced by photon absorption (photoemission), by high temperature (thermionic emission), due to an electric field (field electron emission), or using electron tunnelling.
 * Relative methods make use of the contact potential difference between the sample and a reference electrode. Experimentally, either an anode current of a diode is used or the displacement current between the sample and reference, created by an artificial change in the capacitance between the two, is measured (the Kelvin Probe method, Kelvin probe force microscope). However, absolute work function values can be obtained if the tip is first calibrated against a reference sample.

Methods based on thermionic emission
The work function is important in the theory of thermionic emission, where thermal fluctuations provide enough energy to "evaporate" electrons out of a hot material (called the 'emitter') into the vacuum. If these electrons are absorbed by another, cooler material (called the collector) then a measurable electric current will be observed. Thermionic emission can be used to measure the work function of both the hot emitter and cold collector. Generally, these measurements involve fitting to Richardson's law, and so they must be carried out in a low temperature and low current regime where space charge effects are absent.

In order to move from the hot emitter to the vacuum, an electron's energy must exceed the emitter Fermi level by an amount
 * $$E_{\rm barrier} = W_{\rm e}$$

determined simply by the thermionic work function of the emitter. If an electric field is applied towards the surface of the emitter, then all of the escaping electrons will be accelerated away from the emitter and absorbed into whichever material is applying the electric field. According to Richardson's law the emitted current density (per unit area of emitter), Je (A/m2), is related to the absolute temperature Te of the emitter by the equation:
 * $$J_{\rm e} = -A_{\rm e} T_{\rm e}^2 e^{-E_{\rm barrier} / k T_{\rm e}}$$

where k is the Boltzmann constant and the proportionality constant Ae is the Richardson's constant of the emitter. In this case, the dependence of Je on Te can be fitted to yield We.

Work function of cold electron collector

The same setup can be used to instead measure the work function in the collector, simply by adjusting the applied voltage. If an electric field is applied away from the emitter instead, then most of the electrons coming from the emitter will simply be reflected back to the emitter. Only the highest energy electrons will have enough energy to reach the collector, and the height of the potential barrier in this case depends on the collector's work function, rather than the emitter's.

The current is still governed by Richardson's law. However, in this case the barrier height does not depend on We. The barrier height now depends on the work function of the collector, as well as any additional applied voltages:
 * $$E_{\rm barrier} = W_{\rm c} - e (\Delta V_{\rm ce} - \Delta V_{\rm S})$$

where Wc is the collector's thermionic work function, ΔVce is the applied collector–emitter voltage, and ΔVS is the Seebeck voltage in the hot emitter (the influence of ΔVS is often omitted, as it is a small contribution of order 10 mV). The resulting current density Jc through the collector (per unit of collector area) is again given by Richardson's Law, except now
 * $$J_{\rm c} = A T_{\rm e}^2 e^{-E_{\rm barrier}/kT_{\rm e}} $$

where A is a Richardson-type constant that depends on the collector material but may also depend on the emitter material, and the diode geometry. In this case, the dependence of Jc on Te, or on ΔVce, can be fitted to yield Wc.

This retarding potential method is one of the simplest and oldest methods of measuring work functions, and is advantageous since the measured material (collector) is not required to survive high temperatures.

Methods based on photoemission

The photoelectric work function is the minimum photon energy required to liberate an electron from a substance, in the photoelectric effect. If the photon's energy is greater than the substance's work function, photoelectric emission occurs and the electron is liberated from the surface. Similar to the thermionic case described above, the liberated electrons can be extracted into a collector and produce a detectable current, if an electric field is applied into the surface of the emitter. Excess photon energy results in a liberated electron with non-zero kinetic energy. It is expected that the minimum photon energy $$ \hbar \omega $$ required to liberate an electron (and generate a current) is
 * $$\hbar \omega = W_{\rm e} $$

where We is the work function of the emitter.

Photoelectric measurements require a great deal of care, as an incorrectly designed experimental geometry can result in an erroneous measurement of work function. This may be responsible for the large variation in work function values in scientific literature. Moreover, the minimum energy can be misleading in materials where there are no actual electron states at the Fermi level that are available for excitation. For example, in a semiconductor the minimum photon energy would actually correspond to the valence band edge rather than work function.

Of course, the photoelectric effect may be used in the retarding mode, as with the thermionic apparatus described above. In the retarding case, the dark collector's work function is measured instead.

Kelvin probe method

The Kelvin probe technique relies on the detection of an electric field (gradient in ϕ) between a sample material and probe material. The electric field can be varied by the voltage ΔVsp that is applied to the probe relative to the sample. If the voltage is chosen such that the electric field is eliminated (the flat vacuum condition), then
 * $$e\Delta V_{\rm sp} = W_{\rm s} - W_{\rm p}, \quad \text{when}~\phi~\text{is flat}.$$

Since the experimenter controls and knows ΔVsp, then finding the flat vacuum condition gives directly the work function difference between the two materials. The only question is, how to detect the flat vacuum condition? Typically, the electric field is detected by varying the distance between the sample and probe. When the distance is changed but ΔVsp is held constant, a current will flow due to the change in capacitance. This current is proportional to the vacuum electric field, and so when the electric field is neutralized no current will flow.

Although the Kelvin probe technique only measures a work function difference, it is possible to obtain an absolute work function by first calibrating the probe against a reference material (with known work function) and then using the same probe to measure a desired sample. The Kelvin probe technique can be used to obtain work function maps of a surface with extremely high spatial resolution, by using a sharp tip for the probe (see Kelvin probe force microscope).

Work functions of elements
The work function depends on the configurations of atoms at the surface of the material. For example, on polycrystalline silver the work function is 4.26 eV, but on silver crystals it varies for different crystal faces as (100) face: 4.64 eV, (110) face: 4.52 eV, (111) face: 4.74 eV. Ranges for typical surfaces are shown in the table below.

Physical factors that determine the work function
Due to the complications described in the modelling section below, it is difficult to theoretically predict the work function with accuracy. Various trends have, however, been identified. The work function tends to be smaller for metals with an open lattice, and larger for metals in which the atoms are closely packed. It is somewhat higher on dense crystal faces than open crystal faces, also depending on surface reconstructions for the given crystal face.

Surface dipole
The work function is not simply dependent on the "internal vacuum level" inside the material (i.e., its average electrostatic potential), because of the formation of an atomic-scale electric double layer at the surface. This surface electric dipole gives a jump in the electrostatic potential between the material and the vacuum.

A variety of factors are responsible for the surface electric dipole. Even with a completely clean surface, the electrons can spread slightly into the vacuum, leaving behind a slightly positively charged layer of material. This primarily occurs in metals, where the bound electrons do not encounter a hard wall potential at the surface but rather a gradual ramping potential due to image charge attraction. The amount of surface dipole depends on the detailed layout of the atoms at the surface of the material, leading to the variation in work function for different crystal faces.

Doping and electric field effect (semiconductors)

In a semiconductor, the work function is sensitive to the doping level at the surface of the semiconductor. Since the doping near the surface can also be controlled by electric fields, the work function of a semiconductor is also sensitive to the electric field in the vacuum.

The reason for the dependence is that, typically, the vacuum level and the conduction band edge retain a fixed spacing independent of doping. This spacing is called the electron affinity (note that this has a different meaning than the electron affinity of chemistry); in silicon for example the electron affinity is 4.05 eV. If the electron affinity EEA and the surface's band-referenced Fermi level EF-EC are known, then the work function is given by
 * $$ W = E_{\rm EA} + E_{\rm C} - E_{\rm F}$$

where EC is taken at the surface.

From this one might expect that by doping the bulk of the semiconductor, the work function can be tuned. In reality, however, the energies of the bands near the surface are often pinned to the Fermi level, due to the influence of surface states. If there is a large density of surface states, then the work function of the semiconductor will show a very weak dependence on doping or electric field.

Theoretical models of metal work functions
Theoretical modeling of the work function is difficult, as an accurate model requires a careful treatment of both electronic many body effects and surface chemistry; both of these topics are already complex in their own right.

One of the earliest successful models for metal work function trends was the jellium model, which allowed for oscillations in electronic density nearby the abrupt surface (these are similar to Friedel oscillations) as well as the tail of electron density extending outside the surface. This model showed why the density of conduction electrons (as represented by the Wigner–Seitz radius rs) is an important parameter in determining work function.

The jellium model is only a partial explanation, as its predictions still show significant deviation from real work functions. More recent models have focused on including more accurate forms of electron exchange and correlation effects, as well as including the crystal face dependence (this requires the inclusion of the actual atomic lattice, something that is neglected in the jellium model).

Temperature dependence of the electron work function
The electron behavior in metals varies with temperature and is largely reflected by the electron work function. A theoretical model for predicting the temperature dependence of the electron work function, developed by Rahemi et al. explains the underlying mechanism and predicts this temperature dependence for various crystal structures via calculable and measurable parameters. In general, as the temperature increases, the EWF decreases via $\varphi(T)=\varphi_0-\gamma\frac{(k_\text{B}T)^2}{\varphi_0}$ and $$\gamma$$ is a calculable material property which is dependent on the crystal structure (for example, BCC, FCC). $$\varphi_0$$ is the electron work function at T=0 and $$k_\text{B}$$ is constant throughout the change.

title: Work function