You are a helpful, respectful, and honest assistant. Always answer as helpfully as possible, while being safe. Your answers should not include any harmful, unethical, racist, sexist, toxic, dangerous, or illegal content. Please ensure that your responses are socially unbiased and positive in nature. If a question does not make any sense or is not factually coherent, explain why instead of answering something not correct. If you don't know the answer to a question, please don't share false information.
What is Flatulence and explain in detail?
Flatulence, in humans, is the expulsion of gas from the intestines via the anus, commonly referred to as farting. "Flatus" is the medical word for gas generated in the stomach or bowels. A proportion of intestinal gas may be swallowed environmental air, and hence flatus is not entirely generated in the stomach or bowels. The scientific study of this area of medicine is termed flatology.Flatus is brought to the rectum and pressurized by muscles in the intestines. It is normal to pass flatus ("to fart"), though volume and frequency vary greatly among individuals. It is also normal for intestinal gas to have a feculent or unpleasant odor, which may be intense. The noise commonly associated with flatulence ("blowing a raspberry") is produced by the anus and buttocks, which act together in a manner similar to that of an embouchure. Both the sound and odor are sources of embarrassment, annoyance or amusement (flatulence humor).
There are several general symptoms related to intestinal gas: pain, bloating and abdominal distension, excessive flatus volume, excessive flatus odor, and gas incontinence. Furthermore, eructation (colloquially known as "burping") is sometimes included under the topic of flatulence. When excessive or malodorous, flatus can be a sign of a health disorder, such as irritable bowel syndrome, celiac disease or lactose intolerance.

Terminology
Non-medical definitions of the term include "the uncomfortable condition of having gas in the stomach and bowels", or "a state of excessive gas in the alimentary canal". These definitions highlight that many people consider "bloating", abdominal distension or increased volume of intestinal gas, to be synonymous with the term flatulence (although this is technically inaccurate).
Colloquially, flatulence may be referred to as "farting", "pumping", "trumping", "blowing off", "pooting", "passing gas", "breaking wind", "backfiring", or simply (in American English) "gas" or (British English) "wind". Derived terms include vaginal flatulence, otherwise known as a queef.

Signs and symptoms
Generally speaking, there are four different types of complaints that relate to intestinal gas, which may present individually or in combination.

Bloating and pain
Patients may complain of bloating as abdominal distension, discomfort and pain from "trapped wind". In the past, functional bowel disorders such as irritable bowel syndrome that produced symptoms of bloating were attributed to increased production of intestinal gas.
However, three significant pieces of evidence refute this theory. First, in normal subjects, even very high rates of gas infusion into the small intestine (30 mL/min) is tolerated without complaints of pain or bloating and harmlessly passed as flatus per rectum. Secondly, studies aiming to quantify the total volume of gas produced by patients with irritable bowel syndrome (some including gas emitted from the mouth by eructation) have consistently failed to demonstrate increased volumes compared to healthy subjects. The proportion of hydrogen produced may be increased in some patients with irritable bowel syndrome, but this does not affect the total volume. Thirdly, the volume of flatus produced by patients with irritable bowel syndrome who have pain and abdominal distension would be tolerated in normal subjects without any complaints of pain.
Patients who complain of bloating frequently can be shown to have objective increases in abdominal girth, often increased throughout the day and then resolving during sleep. The increase in girth combined with the fact that the total volume of flatus is not increased led to studies aiming to image the distribution of intestinal gas in patients with bloating. They found that gas was not distributed normally in these patients: there was segmental gas pooling and focal distension. In conclusion, abdominal distension, pain and bloating symptoms are the result of abnormal intestinal gas dynamics rather than increased flatus production.

Excessive volume
The normal range of volumes of flatus in normal individuals varies hugely (476–1,491 mL/24 h). All intestinal gas is either swallowed environmental air, present intrinsically in foods and beverages, or the result of gut fermentation.
Swallowing small amounts of air occurs while eating and drinking. This is emitted from the mouth by eructation (burping) and is normal. Excessive swallowing of environmental air is called aerophagia, and has been shown in a few case reports to be responsible for increased flatus volume. This is, however, considered a rare cause of increased flatus volume. Gases contained in food and beverages are likewise emitted largely through eructation, e.g., carbonated beverages.
Endogenously produced intestinal gases make up 74 percent of flatus in normal subjects. The volume of gas produced is partially dependent upon the composition of the intestinal microbiota, which is normally very resistant to change, but is also very different in different individuals. Some patients are predisposed to increased endogenous gas production by virtue of their gut microbiota composition. The greatest concentration of gut bacteria is in the colon, while the small intestine is normally nearly sterile. Fermentation occurs when unabsorbed food residues arrive in the colon.
Therefore, even more than the composition of the microbiota, diet is the primary factor that dictates the volume of flatus produced. Diets that aim to reduce the amount of undigested fermentable food residues arriving in the colon have been shown to significantly reduce the volume of flatus produced. Again, increased volume of intestinal gas will not cause bloating and pain in normal subjects. Abnormal intestinal gas dynamics will create pain, distension, and bloating, regardless of whether there is high or low total flatus volume.

Odor
Although flatus possesses an odor, this may be abnormally increased in some patients and cause social distress to the patient. Increased odor of flatus presents a distinct clinical issue from other complaints related to intestinal gas. Some patients may exhibit over-sensitivity to bad flatus odor, and in extreme forms, olfactory reference syndrome may be diagnosed. Recent informal research found a correlation between flatus odor and both loudness and humidity content.

Incontinence of flatus
"Gas incontinence" could be defined as loss of voluntary control over the passage of flatus. It is a recognised subtype of faecal incontinence, and is usually related to minor disruptions of the continence mechanisms. Some consider gas incontinence to be the first, sometimes only, symptom of faecal incontinence.

Cause
Intestinal gas is composed of varying quantities of exogenous sources and endogenous sources. The exogenous gases are swallowed (aerophagia) when eating or drinking or increased swallowing during times of excessive salivation (as might occur when nauseated or as the result of gastroesophageal reflux disease). The endogenous gases are produced either as a by-product of digesting certain types of food, or of incomplete digestion, as is the case during steatorrhea. Anything that causes food to be incompletely digested by the stomach or small intestine may cause flatulence when the material arrives in the large intestine, due to fermentation by yeast or prokaryotes normally or abnormally present in the gastrointestinal tract.
Flatulence-producing foods are typically high in certain polysaccharides, especially oligosaccharides such as inulin. Those foods include beans, lentils, dairy products, onions, garlic, spring onions, leeks, turnips, swedes, radishes, sweet potatoes, potatoes, cashews, Jerusalem artichokes, oats, wheat, and yeast in breads. Cauliflower, broccoli, cabbage, Brussels sprouts and other cruciferous vegetables that belong to the genus Brassica are commonly reputed to not only increase flatulence, but to increase the pungency of the flatus.In beans, endogenous gases seem to arise from complex oligosaccharides (carbohydrates) that are particularly resistant to digestion by mammals, but are readily digestible by microorganisms (methane-producing archaea; Methanobrevibacter smithii) that inhabit the digestive tract. These oligosaccharides pass through the small intestine largely unchanged, and when they reach the large intestine, bacteria ferment them, producing copious amounts of flatus.When excessive or malodorous, flatus can be a sign of a health disorder, such as irritable bowel syndrome, celiac disease, non-celiac gluten sensitivity or lactose intolerance. It can also be caused by certain medicines, such as ibuprofen, laxatives, antifungal medicines or statins. Some infections, such as giardiasis, are also associated with flatulence.Interest in the causes of flatulence was spurred by high-altitude flight and human spaceflight; the low atmospheric pressure, confined conditions, and stresses peculiar to those endeavours were cause for concern. In the field of mountaineering, the phenomenon of high altitude flatus expulsion was first recorded over two hundred years ago.

Mechanism
Production, composition, and odor
Flatus (intestinal gas) is mostly produced as a byproduct of bacterial fermentation in the gastrointestinal (GI) tract, especially the colon. There are reports of aerophagia (excessive air swallowing) causing excessive intestinal gas, but this is considered rare.Over 99% of the volume of flatus is composed of odorless gases. These include oxygen, nitrogen, carbon dioxide, hydrogen and methane. Nitrogen is not produced in the gut, but a component of environmental air. Patients who have excessive intestinal gas that is mostly composed of nitrogen have aerophagia. Hydrogen, carbon dioxide and methane are all produced in the gut and contribute 74% of the volume of flatus in normal subjects. Methane and hydrogen are flammable, and so flatus can be ignited if it contains adequate amounts of these components.Not all humans produce flatus that contains methane. For example, in one study of the faeces of nine adults, only five of the samples contained archaea capable of producing methane. The prevalence of methane over hydrogen in human flatus may correlate with obesity, constipation and irritable bowel syndrome, as archaea that oxidise hydrogen into methane promote the metabolisms ability to absorb fatty acids from food.The remaining trace (<1% volume) compounds contribute to the odor of flatus. Historically, compounds such as indole, skatole, ammonia and short chain fatty acids were thought to cause the odor of flatus. More recent evidence proves that the major contribution to the odor of flatus comes from a combination of volatile sulfur compounds. Hydrogen sulfide, methyl mercaptan (also known as methanethiol), dimethyl sulfide, dimethyl disulfide and dimethyl trisulfide are present in flatus. The benzopyrrole volatiles indole and skatole have an odor of mothballs,  and therefore probably do not contribute greatly to the characteristic odor of flatus.
In one study, hydrogen sulfide concentration was shown to correlate convincingly with perceived bad odor of flatus, followed by methyl mercaptan and dimethyl sulfide. This is supported by the fact that hydrogen sulfide may be the most abundant volatile sulfur compound present. These results were generated from subjects who were eating a diet high in pinto beans to stimulate flatus production.
Others report that methyl mercaptan was the greatest contributor to the odor of flatus in patients not under any specific dietary alterations. It has now been demonstrated that methyl mercaptan, dimethyl sulfide, and hydrogen sulfide (described as decomposing vegetables, unpleasantly sweet/wild radish and rotten eggs respectively) are all present in human flatus in concentrations above their smell perception thresholds.It is recognized that increased dietary sulfur-containing amino acids significantly increases the odor of flatus. It is therefore likely that the odor of flatus is created by a combination of volatile sulfur compounds, with minimal contribution from non-sulfur volatiles. This odor can also be caused by the presence of large numbers of microflora bacteria or the presence of faeces in the rectum. Diets high in protein, especially sulfur-containing amino acids, have been demonstrated to significantly increase the odor of flatus.

Volume and intestinal gas dynamics
Normal flatus volume is 476 to 1491 mL per 24 hours. This variability between individuals is greatly dependent upon diet. Similarly, the number of flatus episodes per day is variable; the normal range is given as 8–20 per day. The volume of flatus associated with each flatulence event again varies (5–375 mL). The volume of the first flatulence upon waking in the morning is significantly larger than those during the day. This may be due to buildup of intestinal gas in the colon during sleep, the peak in peristaltic activity in the first few hours after waking or the strong prokinetic effect of rectal distension on the rate of transit of intestinal gas. It is now known that gas is moved along the gut independently of solids and liquids, and this transit is more efficient in the erect position compared to when supine. It is thought that large volumes of intestinal gas present low resistance, and can be propelled by subtle changes in gut tone, capacitance and proximal contraction and distal relaxation. This process is thought not to affect solid and liquid intra-lumenal contents.Researchers investigating the role of sensory nerve endings in the anal canal did not find them to be essential for retaining fluids in the anus, and instead speculate that their role may be to distinguish between flatus and faeces, thereby helping detect a need to defecate or to signal the end of defecation.The sound varies depending on the tightness of the sphincter muscle and velocity of the gas being propelled, as well as other factors, such as water and body fat. The auditory pitch (sound) of the flatulence outburst can also be affected by the anal embouchure. Among humans, flatulence occasionally happens accidentally, such as incidentally to coughing or sneezing or during orgasm; on other occasions, flatulence can be voluntarily elicited by tensing the rectum or "bearing down" on stomach or bowel muscles and subsequently relaxing the anal sphincter, resulting in the expulsion of flatus.

Management
Since problems involving intestinal gas present as different (but sometimes combined) complaints, the management is cause-related.

Pain and bloating
While not affecting the production of the gases themselves, surfactants (agents that lower surface tension) can reduce the disagreeable sensations associated with flatulence, by aiding the dissolution of the gases into liquid and solid faecal matter. Preparations containing simethicone reportedly operate by promoting the coalescence of smaller bubbles into larger ones more easily passed from the body, either by burping or flatulence. Such preparations do not decrease the total amount of gas generated in or passed from the colon, but make the bubbles larger and thereby allowing them to be passed more easily.Other drugs including prokinetics, lubiprostone, antibiotics and probiotics are also used to treat bloating in patients with functional bowel disorders such as irritable bowel syndrome, and there is some evidence that these measures may reduce symptoms.A flexible tube, inserted into the rectum, can be used to collect intestinal gas in a flatus bag. This method is occasionally needed in a hospital setting, when the patient is unable to pass gas normally.

Volume
One method of reducing the volume of flatus produced is dietary modification, reducing the amount of fermentable carbohydrates. This is the theory behind diets such as the low-FODMAP diet (a diet low in fermentable oligosaccharides, disaccharides, monosaccharides, alcohols, and polyols).Most starches, including potatoes, corn, noodles, and wheat, produce gas as they are broken down in the large intestine. Intestinal gas can be reduced by fermenting the beans, and making them less gas-inducing, or by cooking them in the liquor from a previous batch. For example, the fermented bean product miso is less likely to produce as much intestinal gas. Some legumes also stand up to prolonged cooking, which can help break down the oligosaccharides into simple sugars. Fermentative lactic acid bacteria such as Lactobacillus casei and Lactobacillus plantarum reduce flatulence in the human intestinal tract.Probiotics (live yogurt, kefir, etc.) are reputed to reduce flatulence when used to restore balance to the normal intestinal flora. Live (bioactive) yogurt contains, among other lactic bacteria, Lactobacillus acidophilus, which may be useful in reducing flatulence. L. acidophilus may make the intestinal environment more acidic, supporting a natural balance of the fermentative processes. L. acidophilus is available in supplements. Prebiotics, which generally are non-digestible oligosaccharides, such as fructooligosaccharide, generally increase flatulence in a similar way as described for lactose intolerance.
Digestive enzyme supplements may significantly reduce the amount of flatulence caused by some components of foods not being digested by the body and thereby promoting the action of microbes in the small and large intestines. It has been suggested that alpha-galactosidase enzymes, which can digest certain complex sugars, are effective in reducing the volume and frequency of flatus. The enzymes alpha-galactosidase, lactase, amylase, lipase, protease, cellulase, glucoamylase, invertase, malt diastase, pectinase, and bromelain are available, either individually or in combination blends, in commercial products.
The antibiotic rifaximin, often used to treat diarrhea caused by the microorganism E. coli, may reduce both the production of intestinal gas and the frequency of flatus events.

Odor
Bismuth
The odor created by flatulence is commonly treated with bismuth subgallate, available over-the-counter in the US as Devrom. Bismuth subgallate is commonly used by individuals who have had ostomy surgery, bariatric surgery, faecal incontinence and irritable bowel syndrome. Bismuth subsalicylate is a compound that binds hydrogen sulfide, and one study reported a dose of 524 mg four times a day for 3–7 days bismuth subsalicylate yielded a >95% reduction in faecal hydrogen sulfide release in both humans and rats.
Another bismuth compound, bismuth subnitrate was also shown to bind to hydrogen sulfide. Another study showed that bismuth acted synergistically with various antibiotics to inhibit sulfate-reducing gut bacteria and sulfide production. Some authors proposed a theory that hydrogen sulfide was involved in the development of ulcerative colitis and that bismuth might be helpful in the management of this condition. However, bismuth administration in rats did not prevent them from developing ulcerative colitis despite reduced hydrogen sulfide production. Also, evidence suggests that colonic hydrogen sulfide is largely present in bound forms, probably sulfides of iron and other metals. Rarely, serious bismuth toxicity may occur with higher doses. Activated charcoal
Despite being an ancient treatment for various digestive complaints, activated charcoal did not produce reduction in both the total flatus volume nor the release of sulfur-containing gasses, and there was no reduction in abdominal symptoms (after 0.52 g activated charcoal four times a day for one week). The authors suggested that saturation of charcoal binding sites during its passage through the gut was the reason for this. A further study concluded that activated charcoal (4 g) does not influence gas formation in vitro or in vivo. Other authors reported that activated charcoal was effective. A study in 8 dogs concluded activated charcoal (unknown oral dose) reduced hydrogen sulfide levels by 71%. In combination with yucca schidigera, and zinc acetate, this was increased to an 86% reduction in hydrogen sulfide, although flatus volume and number was unchanged. An early study reported activated charcoal (unknown oral dose) prevented a large increase in the number of flatus events and increased breath hydrogen concentrations that normally occur following a gas-producing meal.Garments and external devices
In 1998, Chester "Buck" Weimer of Pueblo, Colorado, received a patent for the first undergarment that contained a replaceable charcoal filter. The undergarments are air-tight and provide a pocketed escape hole in which a charcoal filter can be inserted. In 2001 Weimer received the Ig Nobel Prize for Biology for his invention.A similar product was released in 2002, but rather than an entire undergarment, consumers are able to purchase an insert similar to a pantiliner that contains activated charcoal. The inventors, Myra and Brian Conant of Mililani, Hawaii, still claim on their website to have discovered the undergarment product in 2002 (four years after Chester Weimer filed for a patent for his product), but state that their tests "concluded" that they should release an insert instead.

Incontinence
Flatus incontinence where there is involuntary passage of gas, is a type of faecal incontinence, and is managed similarly.

Society and culture
In many cultures, flatulence in public is regarded as embarrassing, but, depending on context, may also be considered humorous. People will often strain to hold in the passing of gas when in polite company, or position themselves to silence or conceal the passing of gas. In other cultures, it may be no more embarrassing than coughing.
While the act of passing flatus in some cultures is generally considered to be an unfortunate occurrence in public settings, flatulence may, in casual circumstances and especially among children, be used as either a humorous supplement to a joke ("pull my finger"), or as a comic activity in and of itself. The social acceptability of flatulence-based humour in entertainment and the mass media varies over the course of time and between cultures. A sufficient number of entertainers have performed using their flatus to lead to the coining of the term flatulist. The whoopee cushion is a joking device invented in the early 20th century for simulating a fart. In 2008, a farting application for the iPhone earned nearly $10,000 in one day.A farting game named Touch Wood was documented by John Gregory Bourke in the 1890s. It existed under the name of Safety in the 20th century in the U.S., and has been found being played in 2011.In January 2011, the Malawi Minister of Justice, George Chaponda, said that Air Fouling Legislation would make public "farting" illegal in his country. When reporting the story, the media satirised Chapondas statement with punning headlines. Later, the minister withdrew his statement.

Environmental impact
Flatulence is often blamed as a significant source of greenhouse gases, owing to the erroneous belief that the methane released by livestock is in the flatus. While livestock account for around 20% of global methane emissions, 90–95% of that is released by exhaling or burping. In cows, gas and burps are produced by methane-generating microbes called methanogens, that live inside the cows digestive system. Proposals for reducing methane production in cows include the feeding of supplements such as oregano and seaweed, and the genetic engineering of gut biome microbes to produce less methane.Since New Zealand produces large amounts of agricultural products, it is in the unique position of having high methane emissions from livestock compared to other greenhouse gas sources. The New Zealand government is a signatory to the Kyoto Protocol and therefore attempts are being made to reduce greenhouse emissions. To achieve this, an agricultural emissions research levy was proposed, which promptly became known as a "fart tax" or "flatulence tax". It encountered opposition from farmers, farming lobby groups and opposition politicians.

Entertainment
Historical comment on the ability to fart at will is observed as early as Saint Augustines The City of God (5th century A.D.). Augustine mentions men who "have such command of their bowels, that they can break wind continuously at will, so as to produce the effect of singing". Intentional passing of gas and its use as entertainment for others appear to have been somewhat well known in pre-modern Europe, according to mentions of it in medieval and later literature, including Rabelais.
Le Pétomane ("the Fartomaniac") was a famous French performer in the 19th century who, as well as many professional farters before him, did flatulence impressions and held shows. The performer Mr. Methane carries on le Pétomanes tradition today. Also, a 2002 fiction film Thunderpants revolves around a boy named Patrick Smash who has an ongoing flatulence problem from the time of his birth.Since the 1970s, farting has increasingly been featured in film, especially comedies such as Blazing Saddles and Scooby-Doo.

Religion
In Islam, flatulence, if audible or odorous, invalidates wudu (ritual purity).

Personal experiences
People find other peoples flatus unpleasant, but are unfazed by, and may even enjoy, the scent of their own. While there has been little research carried out upon the subject, some speculative guesses have been made as to why this might be so. For example, one explanation for this phenomenon is that people are very familiar with the scent of their own flatus, and that survival in nature may depend on the detection of and reaction to foreign scents.

See also
References
Citations
General and cited references
Allen, V. (2007). On Farting: Language and Laughter in the Middle Ages. Palgrave MacMillan. ISBN 978-0-312-23493-5.
Bolin, T. D. & Stanton, R. (1997). Wind Breaks. Allen & Unwin. ISBN 978-1-86448-321-5.
Dawson, Jim (1999). Who Cut the Cheese?: A Cultural History of the Fart. Ten Speed Press. ISBN 1-58008-011-1.
Dawson, Jim (2006). Blame it on the Dog: A Modern History of the Fart. Ten Speed Press. ISBN 1-58008-751-5.
Franklin, Benjamin (2003).  Japikse, Carl (ed.). Fart Proudly ((Reprint) ed.). Frog Ltd/Blue Snake