text:
Article Text

Impact of short-term reconstructive surgical missions: a systematic review
1. Thom C.C. Hendriks1,2,
2. Matthijs Botman1,2,
3. Charissa N.S. Rahmee1,2,
4. Johannes C.F. Ket3,
5. Margriet G. Mullender1,
6. Barend Gerretsen4,
7. Emanuel Q. Nuwass5,
8. Klaas W. Marck6,
9. Henri A.H. Winters1,2
1. 1 Plastic, Reconstructive and Hand Surgery, VU Medisch Centrum, Amsterdam, The Netherlands
2. 2 Global Surgery Amsterdam, Amsterdam, The Netherlands
3. 3 Medical library, Vrije Universiteit, Amsterdam, The Netherlands
4. 4 Koninklijk Instituut voor de Tropen, Amsterdam, The Netherlands
5. 5 Department of Surgery, Haydom Lutheran Hospital, Haydom, Tanzania
6. 6 Department of Plastic Surgery, Medisch Centrum Leeuwarden, Leeuwarden, The Netherlands
1. Correspondence to Drs. Thom C.C. Hendriks; thom.hendriks{at}gmail.com

## Footnotes

• Contributors The contributorship will be proceeded with the plastic surgery department at VU University Medical Center Amsterdam.

• Funding The authors have not declared a specific grant for this research from any funding agency in the public, commercial or not-for-profit sectors.

• Competing interests None declared.

• Patient consent for publication Not required.

• Provenance and peer review Not commissioned; externally peer reviewed.

View Full Text

## Statistics from Altmetric.com

### Key questions

• There is rising concern about the accountability, patient safety and sustainability of short-term reconstructive surgical missions; however, data on these parameters are lacking.

#### What are the new findings?

• Evidence provided by research on surgical outcomes is limited and of low quality, and the safety of missions is likely to be overestimated by studies in which the quality of follow-up is not reported. Our data suggest that engagement in sustainable development of the local healthcare system and the feasibility of conducting high-quality, long-term follow-up go hand in hand.

#### What do the new findings imply?

• We call for implementing longer-term outcome research of future missions.

• One approach that could provide a framework to conduct such research, is to implement diagonal development missions. These missions combine the positive impact of the short-term vertical inputs (e.g. providing surgical services) and long-term horizontal investments (e.g. development of sustainable healthcare systems), with the aim of improving access to, and capacity of, the local surgical healthcare systems in the long-term.

## Introduction

Conditions that are treatable by reconstructive surgery make up a large part of the global burden of surgical disease. Examples are burns (8 .1 million disability-adjusted life years [DALYs]),1 orofacial clefts (0.23 million DALYs),1 complex wounds including trauma-related wounds (unknown DALYs, but estimated to be significant), pressure sores (0.67 million DALYs)1 or noma (a neglected tropical disease, a roughly estimated 1–10 million DALYs).2 Short-term reconstructive surgical missions are a well-established routine method of addressing these conditions and reducing their impact on global health by providing specialised care in underserved populations.3 Such missions are commonly short term, disease specific, focus on service delivery and have a tendency to work outside the local healthcare system. This is also referred as a ‘vertical approach to healthcare development’.4

Despite being a common model, the impact of reconstructive surgical missions is hardly known.5 6 Medical missions in general are commonly debated in the literature.7–15 There is rising concern about the limited accountability of missions, with little data reported back to healthcare authorities due to a lack of outcome measurements.8 9 Quality of care is debated, as missions often have limited capacity to provide ancillary services or follow-up.16 Furthermore, sustainability is questioned in terms of lasting positive impact on the local healthcare system or its cost-effectiveness. The question is whether short-term surgical missions are the most rational allocation of resources to address local healthcare needs.4 7 8 12 15 Ultimately, the ethical implications of surgical volunteerism often ignite debate.17 18

These concerns are discussed in several reviews of medical missions in low-income and middle-income countries (LMICs).7 9 10 12–15 19 For instance, Martiniuk et al and Roche et al argued that global standards are needed for short-term medical missions,7 14 and Sykes shows that only 6% of all published studies on medical missions report on empirical data.10 Only a few studies reviewed surgical missions specifically.9 12–15 19 Shrime et al systematically compare three types of charitable platforms for global surgery (short-term missions, self-contained surgical platforms and specialty surgical hospitals run by non-governmental organisations [NGOs]). Although they conclude that evidence in the literature is scarce, they state that self-contained temporary platforms and specialised surgical centres appear to provide more effective and cost-effective care than short-term surgical missions, except when no other delivery platform exists.12

These reviews provide valuable insights into medical missions in general. However, the diversity of medical and surgical missions is large, which hampers the interpretation of empirical data. This review aims to systematically review evidence on the impact of short-term reconstructive surgical missions specifically, and critically analyses the quality of the available empirical data. In this review, four key aspects are addressed: basic characteristics of missions, patient safety, health gains of individuals and sustainability.

## Methods

We conducted a systematic review of the literature following the Preferred Reporting Items for Systematic Reviews and Meta-Analysis guidelines.20

### Inclusion criteria

All original studies that analysed empirical data of short-term missions pertaining to reconstructive surgical care in LMICs were eligible. Studies lacking analyses of empirical data, reviews, studies of specialty surgical hospitals that provide continuous year-round care, mobile surgical platforms sent from in-country hospitals, studies in conflicts zones, studies not related to LMICs or studies of patients that were transported to high-income countries (HICs) were excluded. The studies were restricted to English and Dutch language. No restrictions were applied regarding publication dates. Duplicates were excluded.

### Search strategy and data sources

PubMed, Embase.com, Clarivate Analytics/Web of Science and Open Grey were searched up to 1 July 2018; Proquest up to 1 July 2017 (by CR, TH and JK). The last database was no longer available to us after 2017. The following terms—including synonyms—were used as index terms or free-text words: ‘plastic surgery’, ‘reconstructive surgical procedures’, ‘cleft lip’, ‘post-burn contractures’ or ‘noma’ combined with ‘medical missions’, ‘humanitarian’ or ‘charity’. More studies were identified by reviewing the bibliographies of retrieved studies. The full search strategies for all databases can be found in the online supplementary file 1.

### Study selection

Studies were screened for eligibility by two independent investigators (TH and CR): in case of disparity, a third author was involved (MB). Two investigators independently extracted the data to create tables and figures (TH and CR).

Data on mission characteristics and individual patient-level data were extracted and analysed across four key features:

1. Basic characteristics of the missions, including mission length, number of patients who received surgery, and age and gender distribution.

2. Patient safety by means of complication registration. Data were collected on three indicators: follow-up length, follow-up rate and complication rate. The follow-up rate was calculated by the number of patients who completed follow-up divided by the total number of patients who were included for follow-up. The complication rate was calculated as follows: the number of patients with complications divided by the total number of patients who completed follow-up.

3. Health gains: data on surgical outcomes were collected, for example, improvement of range of motion, patient-reported outcome measures (PROMs) or DALYs averted per patient. All reported PROMs were recorded, for example on surgical outcomes, complications or the quality of care provided. All types of formats, questionnaires or any other tool describing these outcomes were included.

DALYs are used to define the overall disease burden over a population and are calculated by ‘adding the number of years of life lost due to premature mortality to the number of years of healthy life lost related to disability’.21 This means that 1 DALY can be defined as one lost year of healthy life.21 Many limitations of this approach are described in the literature. The biggest challenge is that it is not based on health data from countries, but on complex estimation techniques. DALYs are therefore estimations and many concerns exist about their reliability and uncertainty.22 23 Despite these challenges, DALY metrics are commonly applied in global surgery studies.1 21 24

4. Sustainable characteristics of missions: studies were reviewed for data on long-term partnerships, training objectives and involvement of local staff. Also, data on the cost-effectiveness of missions were collected. Missions were categorised either as stand-alone or consecutive missions to the same hospital, region or country.

### Data analysis and synthesis

After a pilot, data were extracted independently and in duplicate using a data extraction sheet (TH and CR). Authors were contacted when data on complication registration were missing. Quantitative data synthesis consisted of compiling total number of patients (eg, total number of patients who were included, total number of patients with complications) to generate overall outcomes. Table 1 and the online supplementary appendix file 1 provide details of the data extracted from each reference. Due to the heterogeneity of studies in types of surgery, local healthcare settings or available resources, statistical analyses were not feasible. Study quality assessment was performed independently by authors TH and CR according to the Oxford CEBM Level of Evidence classification25 and the GRADE (Grades of Recommendation, Assessment, Development and Evaluation) system.26

Table 1

Study characteristics

## Results

The search identified 1662 unique citations. After screening titles and abstracts 1570 studies were excluded because they did not concern short-term reconstructive surgical missions. Ninety-two studies concerned reconstructive surgical missions and were reviewed full-text. Of the full-text studies, 51 were excluded. Please see figure 1 for the screening and selection process. Studies reviewing specialty hospitals missions were excluded, as this was outside the scope of this review. After full-text analyses, 41 met full inclusion criteria (figure 1 and table 1).27–67

Figure 1

Flow diagram. LMIC, low-income and middle-income country.

The studies included predominantly consisted of case series, with 37 studies graded at Oxford CEBM Level IV. The remaining four economic analyses were graded at level IIB. This resulted in a C grade of recommendations for our review, according to CEBM. The overall GRADE score was 2.7 (low to moderate quality), meaning that our confidence in the effect estimate is limited (table 2).26 68

Table 2

Quality assessment results

Twenty-eight of 41 studies included pertained to cleft care (78% of the total study population). The number of patients in all studies totalled 48 546, with a mean age of 13.4 years (SD 8.5) (table 3). The average mission length was 10 days (SD 3.8; range, 6–21 days). Organisations were active in Africa, South-East Asia, Eastern Europe, and South and Central America. A typical mission team consisted of two or three plastic and/or maxillofacial surgeons, one or two anaesthetists, a mission coordinator, theatre nurse and one or two resident doctors, totalling 8 to 10 individuals for one single mission.32 33 37 46 47 50 51 54 58 Some teams were considerably larger, up to 40 individuals.36

Table 3

(A) Overall outcomes on basic characteristics of missions

Regarding patient safety, nine studies (22%) did not report on complications. Twelve studies (29%) only reported a complication rate without reporting on follow-up length or rate. The overall complication rate in these 12 studies was 1.2%. Ten studies (24%) reported a follow-up length shorter than 180 days, with a mean follow-up rate of 81.3% and a complication rate of 7.1%. Ten studies (24%) provided a follow-up length longer than 180 days, reporting a mean follow-up rate of 56.0% and a 22.3% complication rate (table 3). Mortality after cleft surgery was reported in three studies, totalling 3 out of 14 551 patients included in these studies.16 28 64 For general reconstructive surgical missions—not specified for a single disease—one single study reported one death54 and no mortality was reported in contracture and noma missions.

Twelve studies (29%) reported on health gains of the mission, reporting heterogeneous methods and outcomes (table 1). Methods used in cleft studies included photographic assessment of aesthetic outcomes,30 69 speech evaluation16 47 or DALYs averted.41 43 48 55 Three cleft studies evaluated speech functionality postoperatively, either by questionnaires61 or speech tests.16 47 Study methods were clear and showed overall improvements of speech. Four cleft studies reported on DALYs averted by cleft lip and palate repair surgery. DALYs averted per patient were 3.9,43 6.041 and 10.1 per patient.48 In three noma missions, a surgeon-reported outcome scale was used to score aesthetic and functional outcome.32 50 52 Overall findings showed that high-complex surgery is associated with greater risks of unsatisfactory results. Three studies used PROMs. One contracture study reported improvements in quality of life and disability by using validated questionnaires, and reported overall positive outcomes.63 Two cleft studies used self-developed questionnaires to assess PROMs, reporting positive results.61 66 None of the studies reported on patient-reported outcomes on the quality of the care provided.

With regard to the sustainable characteristics of missions, 29 studies reported qualitative data (71%) on sustainability, while none of the studies reported quantitative data. Fifteen out of twenty studies that reported on follow-up and complications also reported on sustainable characteristics such as long-term partnerships or training activities (table 4). Ten organisations (24%) were engaged in longer-term partnerships, and thirteen missions (32%) returned to the same regions or hospitals. Few data were available on the frequency of missions, although several studies reported conducting yearly missions.32 35 43 50 Fifteen studies (35%) described teaching objectives as a goal during their missions. Activities mentioned were lectures,29 37 55 training of local surgeons,16 35 38 54 healthcare workers47 55 60 or fellowships in donor countries.16 54 55 However, none of the studies published empirical data on the effects of training or elaborated on how the training of local healthcare personnel was organised.

Table 4

Sustainable characteristics of short-term missions

Four cost-effectiveness studies were available for short-term cleft missions. Three studies reviewed the effectiveness per DALY averted, reporting US$33.94/DALY,48 US$56.0/DALY55 and US\$247.42/DALY.41 The variation is explained by the differences in study populations, sample sizes, effectiveness measurements and ‘costing approaches’ used.

## Discussion

Several systematic reviews about short-term medical missions are available.7 9 10 12–15 This is the first systematic review that specifically assesses the quality of available data on short-term reconstructive surgical missions.

Although all the studies included in our review reported a positive impact of surgical missions, the level of evidence remains low. It seems that follow-up of treated patients is a challenge. Although a majority of studies provide data on complication rates, the varying quality of this outcome measure makes it difficult to draw any conclusions. The results showed that reported complication rates were considerably higher when the quality and length of follow-up increased. This suggests that without data on quality of follow-up, there is a high risk of reporting bias due to under-reporting of complications. This also means that without comprehensive information on follow-up, the safety of missions is likely to be overestimated.

Furthermore, studies used different control groups to benchmark their respective findings with regard to complication rates. Three of cleft care studies included compared complications between mission patients and patients who underwent similar procedures in a HIC. Results showed substantially higher complication rates in mission patients.34 49 60 One study showed that fistula risk was 15.6 times that for a US cohort.34 Maine et al 49 state that complication rates were 20 times higher in the mission cohort compared with a US cohort, independently of whether the surgery was performed by Ecuadorian or American surgeons. It should be mentioned that comparisons of complication rates between HICs and LMICs cannot be made without taking into consideration that HICs have more resources at their disposal to limit complications. Therefore, we would suggest developing benchmark complication rates of LMICs, which can be used to assess the outcomes of short-term missions.

Some authors argue that longer-term specialty surgical hospitals may be provide more effective care than short-term missions.9 12 39 Specialty hospitals provide continuous care all year round in a LMIC. The cleft care centre of Operation Smile in India,39 or Smile Train’s model are examples of this approach.69–78

Both organisations report lower complication rates than those reported in short-term missions. The centre of Operation Smile reports a short-term complication rate of 4.0% (cleft lip repair) and 15.8% (cleft palate repair), which is lower than the rates of their counterpart short-term missions.39 Smile Train studies report lower rates, between 0.88% and 3%.70 71 73 78 However, they note that there might be a risk of under-reporting or selection bias due to a dependence of Smile Train surgeons on payment-per-patient (risking fewer referrals when higher complication rates are reported) and a limited capacity of surgeons to treat complex cases.70 71 73 78 Furthermore, with only one Smile Train study reporting on follow-up lengths,73 these complication rates should be interpreted with caution. To be able to compare the strengths and weaknesses of different approaches of providing surgical care in a LMIC, there is a need for more high-quality studies.12 39 Apart from registrations of complications, such studies should assess long-term outcome using validated outcome measures and PROMs. Specialty hospitals, which provide services all year round, could provide good conditions for longer-term outcome research.

Several studies in this review consistently report on follow-up, showing that substantial efforts are being made to improve the data output of missions.16 34 35 49–51 61 63 Ten studies reported significant follow-up lengths of more than 6 months and high numbers of patients returning for follow-up were shown.16 34 35 47 49 58 60–62 66 The majority of these missions were engaged in long-term partnerships. This included training of local healthcare personnel, which was likely to improve the feasibility of organising follow-up. Several strategies were implemented to ensure the quality of follow-up. Some missions deployed medical students to assess palate fistulas34 or sent a speech pathologist in-country to review outcomes.61 Others trained local surgeons on follow-up and revision surgery.54 The relatively high number of complications seen in noma missions could be partly explained by a stringent follow-up, done by an independent researcher who consistently reported on follow-up. All the studies mentioned above provide examples of how to ensure patient safety during and after missions.50 79

Although some studies reported on health gains, with several studies reporting positive functional outcomes,16 47 61 63 66 the methods and evidence are heterogeneous and results are too limited to draw conclusions. The role of PROMs are effective in reconstructive surgery to assess the quality and outcomes of healthcare.80 81 Only few of the studies included reported successfully on outcomes using PROMs61 63 66 and none assessed the quality of care experienced by patients. Patient experience of outcomes and quality is important.82 Future studies should include PROMS on surgical outcomes and quality of care. Only a few studies report on the sustainable characteristics of missions. Data on this topic are usually qualitative and highly variable. It is noteworthy that reporting on sustainability and higher quality of patient follow-up often go hand in hand. This suggests that more sustainable missions may be better able to follow their patients for a longer period. However, as empirical evidence on sustainability is still non-existent, there is an urgent need for further studies.12

### Limitations

This systematic review has several limitations. Literature on short-term reconstructive missions is scarce and of limited quality, limiting the strength of this review.25 As the majority of studies are cleft studies, the conclusions and recommendations of this review may not be fully applicable to other types of reconstructive surgical missions.

The studies included represent just a small proportion of the many reconstructive surgical missions conducted worldwide. This may introduce a potential bias. It is likely that the small proportion likely does not fully represent the actual effect of all reconstructive surgical missions. In our view, this emphasises the need to incorporate standard monitoring and evaluations into missions.

Furthermore, this review addresses only short-term missions and does not attempt to make a direct comparison with long-term surgical platforms such as specialty hospitals. It is often argued that specialty hospitals are safer and have a more positive effect on local healthcare systems.12 76–78 83 84 Comparative studies of short-term missions and specialty hospitals can identify strengths and weaknesses of each approach. However, a definitive comparison between missions and specialty hospitals seems to be premature at present given the lack of comparative studies.12 39

Concerns regarding the use of DALY metrics are applicable to the studies included in this review. It is argued that surgical conditions are underestimated in the global burden of disease studies.1 Attempts to estimate the surgical burden across all disease conditions have been challenging.85 86 In a recent study, it was argued that the current DALY approach is inadequate to quantify the burden of paediatric surgical conditions.87

### Recommendations

There are opportunities for NGOs to develop short-term missions towards more sustainable partnerships. In the past, missions have been a ‘vertical’ approach to healthcare development.4 Such missions have limitations, for example in building local capacity of surgical services. The results of this study indicate that longer-term follow-up is frequently lacking, with complications being potentially missed. To address these shortcomings, the ‘diagonal development’ approach has been proposed.4 It combines the short-term vertical inputs of missions with longer-term horizontal benefits, with the ultimate aim of improving access to, and surgical capacity of, the local healthcare system. Such goals may be achieved through long-term development of surgical infrastructure, continued training of the local surgical workforce or building an academic culture.4

One example of such a diagonal approach is to aim for standardised tracking of longer-term outcomes of missions in strong collaboration with local partners. This might yield several advantages. Besides empowering local researchers and building an academic culture, outcomes can be reported back to patients and healthcare authorities. This will enhance the accountability of NGOs8 9 and allow for evaluations of the quality of care provided.

Another example of long-term investments in the local surgical capacity is strengthening of the training activities of surgical NGOs. Such activities should be integrated into existing national or regional training activities. The training should be adapted to local settings, needs-driven and should focus on bilateral knowledge exchange.4

## Conclusion

This review shows that evidence for the effectiveness of short-term reconstructive surgical missions is both of limited substance and quality. Given the overall lack of evidence, there is an urgent need to incorporate outcomes research in future missions. This should include longer-term complication registration and measurements of health gains among individual patients. The effectiveness of training activities should also be evaluated. One approach to achieve this is to develop short-term missions towards diagonal development missions, which aim to build surgical capacity of local healthcare systems through long-term investments.

1. 1.
2. 2.
3. 3.
4. 4.
5. 5.
6. 6.
7. 7.
8. 8.
9. 9.
10. 10.
11. 11.
12. 12.
13. 13.
14. 14.
15. 15.
16. 16.
17. 17.
18. 18.
19. 19.
20. 20.
21. 21.
22. 22.
23. 23.
24. 24.
25. 25.
26. 26.
27. 27.
28. 28.
29. 29.
30. 30.
31. 31.
32. 32.
33. 33.
34. 34.
35. 35.
36. 36.
37. 37.
38. 38.
39. 39.
40. 40.
41. 41.
42. 42.
43. 43.
44. 44.
45. 45.
46. 46.
47. 47.
48. 48.
49. 49.
50. 50.
51. 51.
52. 52.
53. 53.
54. 54.
55. 55.
56. 56.
57. 57.
58. 58.
59. 59.
60. 60.
61. 61.
62. 62.
63. 63.
64. 64.
65. 65.
66. 66.
67. 67.
68. 68.
69. 69.
70. 70.
71. 71.
72. 72.
73. 73.
74. 74.
75. 75.
76. 76.
77. 77.
78. 78.
79. 79.
80. 80.
81. 81.
82. 82.
83. 83.
84. 84.
85. 85.
86. 86.
87. 87.
View Abstract

## Footnotes

• Contributors The contributorship will be proceeded with the plastic surgery department at VU University Medical Center Amsterdam.

• Funding The authors have not declared a specific grant for this research from any funding agency in the public, commercial or not-for-profit sectors.

• Competing interests None declared.

• Patient consent for publication Not required.

• Provenance and peer review Not commissioned; externally peer reviewed.

## Request Permissions

If you wish to reuse any or all of this article please use the link below which will take you to the Copyright Clearance Center’s RightsLink service. You will be able to get a quick price and instant permission to reuse the content in many different ways.


text:
# Extreme temperatures

USA hit extreme heat wave. Calculate percentage of the air temperature change from normal summer temperature 23 °C to 40 °C.

Correct result:

p =  5.7 %

#### Solution:

$p=100\mathrm{%}\cdot \frac{40-23}{23+273.15}=5.7\mathrm{%}$

We would be pleased if you find an error in the word problem, spelling mistakes, or inaccuracies and send it to us. Thank you!

Tips to related online calculators

## Next similar math problems:

After two hours and 40 minutes the job is finished. Compared to last year we were 40 minutes faster. What is the percentage increase to our performance?
• Temperature calculus
Calculate the percentage of temperature increase if changed from 18°C to 33°C?
• Speed of Slovakian trains
Rudolf decided to take the train from the station 'Ostratice' to 'Horné Ozorovce'. In the train timetables found train Os 5409 : km 0 Chynorany 15:17 5 Ostratice 15:23 15:23 8 Rybany 15:27 15:27 10 Dolné Naštice 15:31 15:31 14 Bánovce nad Bebravou 15:35 1
• Percent
From 99 children who participated in the ski course were 23 excellent skiers, 13 good and 20 average and the rest were beginners. Calculate this data in percentages.
• The raw
The raw data presented here are the scores (out of 100 marks) of a market survey regarding the acceptability of new product launched by a company for random sample of 50 respondents: 40 45 41 45 45 30 30 8 48 25 26 9 23 24 26 29 8 40 41 42 39 35 18 25 35
• Difference in temperatures
The temperature in the number line show minus 15 degree celsius and 8 degree celsius. What is the different between the temperatures?
• The freezer
1. The temperature inside a freezer is minus 23 degree Celsius. The temperature falls by a further 12 degree degree Celsius. What is the new temperature? 2. What is the difference between temperatures of 12 degree Celsius and 210 degree Celsius?
• Mixture
How many percentages mixtures do we get by adding 23ml of matter to 89ml of water?
• On Sunday
On Sunday the temperature reached a high of 38° above 0. That night it dropped to 23° below 0. What is the difference between the high and low temperatures for Sunday?
• Temperature conversion
The normal human body temperature is 98.6 degrees Fahrenheit. What is the temperature in degrees Celcius?
• The temperature 3
The temperature is -12 degrees Fahrenheit. During the following 5 hours, the temperature decrease by 23 degrees Fahrenheit. What is the weather at 11 pm?
• TVs
Production of television sets increased from 3,500 units to 4,200 units. Calculate the percentage of production increase.
• Father and son
Father is 48 years old, son 23. When will be the father twice older than a son?
• Fixed expenses 2013
Since 2013, the Slovak government plans to tax more small one person businesses. Instead of fixed expences 40% will be fixed expences 40% of gross income up to 420 Eur. Calculate what percentage of fixed expences will in 2013 pays from gross income 1569 E
• Cottages
The summer camp is 41 cottages. Rooms are for three and for four in them. How many of the 140 campers lives of three?
• Percentage - fractions
About what percentage we must increase number 1/6 to get number 1/3?
• Divers
20-member group of divers carries the air for 15 hours of diving. 4 members of the expedition sick or wasn't came. How many hours is sufficient air to other divers?

format: plain


text:
Does this sequence $x_{n}=(\sqrt[n]{e}-1)\cdot n$ converge?

Does the sequence defined by $$x_{n} =\left(\sqrt[n]{e}-1\right)\cdot n$$ converge.

For finding the limit one has to solve for $\displaystyle\lim_{x \to \infty} x_{n}$ which I think I can solve, but how do I prove that it converges/diverges.

-
It often happens that finding the limit is in itself a proof of its existence (if you don't use tricky methods that assume convergence implicitly). If you could show us how you find $\lim x_n$, then we'd see if you have already proved convergence without realizing it. –  Dan Shved Apr 16 '13 at 4:48
@DanShved: OK. What we have is $\lim_{n\to\infty} \frac{e^{1/n}-1}{1/n} \to 1$ since this is same as $\displaystyle \lim_{h \to 0} \frac{e^{h}-1}{h} = \frac{1+h+h^{2}/2! + \cdots -1}{h} = 1$ –  hint Apr 16 '13 at 4:50
@DanShved: How did u get it means i don't understand, are u giving the hint by saying, this sequence must be decreasing/increasing and bounded above by $1$ and hence should convege to $1$. –  hint Apr 16 '13 at 4:53
Nevermind, I said that before I saw your second comment. –  Dan Shved Apr 16 '13 at 4:54
There you go: you've proved that $\lim x_n = 1$, which automatically means that $x_n$ converges. –  Dan Shved Apr 16 '13 at 4:55
show 1 more comment

Set $x=\frac{1}{n}$. Then the limit becomes $$\lim_{n\to\infty}\dfrac{\sqrt[n]{e}-1}{\frac{1}{n}}=\lim_{x\to0}\dfrac{e^x-1}{x}.$$ Can you proceed?
Hint: Derivatives.

-

You have: $$x_{n} =\left(\sqrt[n]{e}-1\right)\cdot n$$ Expanding $\sqrt[n]{e}$ in series will give: $$1+\frac{1}{n}+\frac{1}{2 n^2}+O\left(\left(\frac{1}{n}\right)^3\right)$$ So $$\left(\sqrt n{e}-1\right)\cdot n=\left(\frac{1}{n}+\frac{1}{2 n^2}+O\left(\left(\frac{1}{n}\right)^3\right)\right)\cdot n=1+\frac{1}{2 n}+O\left(\left(\frac{1}{n}\right)^3\right)\cdot n$$ And $$\lim_{x \to \infty} x_{n}=1$$

-

HINT: $\lim\limits_{x \to 0}\frac{e^x-1}{x} = 1$

Sequence converge if $\exists \lim\limits_{n \to \infty}{x_n} \quad \text{and} \quad \lim\limits_{n \to \infty}{x_n} \not=\pm\infty$

-

Here is an approach purely based on the ideas of sequences . Let $x_n=\bigg(1- \dfrac1n\bigg)^n$ , then $x_{n+1}=\bigg(1- \dfrac1{n+1}\bigg)^{n+1}=\dfrac 1{\bigg(1+ \dfrac1n\bigg)^n\bigg(1+ \dfrac1n\bigg)}$ , so $(x_{n+1})$ is convergent hence $(x_n)$ is

convergent and $\lim (x_n)=\lim (x_{n+1})=\dfrac1e$. Now it is easy to prove by A.M.-G.M. inequality that

$\bigg(1- \dfrac1{n+1}\bigg)^{n+1}>\bigg(1- \dfrac1n\bigg)^n , \forall n>1$ , hence $(x_n)$ is increasing so

$\dfrac1e=\lim (x_n)=$sup{ $x_n : n \in \mathbb N$ }$≥ x_{n+1}=\dfrac 1{\bigg(1+ \dfrac1n\bigg)^{n+1}} , \forall n\in \mathbb N$ i.e. $\bigg(1+ \dfrac1n\bigg)^{n+1}≥e \space, \forall n \in \mathbb N$ .

Moreover , $e=\lim \bigg(1+\dfrac1n\bigg)^n=$sup {$\bigg(1+\dfrac1n\bigg)^n: n\in \mathbb N$ }$≥\bigg(1+ \dfrac1{n+1}\bigg)^{n+1} , \forall n \in \mathbb N$ . So we

get $\bigg(1+ \dfrac1n\bigg)^{n+1}≥e ≥\bigg(1+ \dfrac1{n+1}\bigg)^{n+1} , \forall n \in \mathbb N \implies \dfrac1n≥ \sqrt[n+1]{e}-1≥\dfrac1{n+1} , \forall n \in \mathbb N$

$\implies 1+\dfrac1n ≥ (n+1)(\sqrt[n+1]{e}-1)≥1 , \forall n \in \mathbb N$. So by squeeze theorem ,

$\lim \bigg((n+1)(\sqrt[n+1]{e}-1)\bigg)=1$ i.e. $\lim \bigg(n(\sqrt[n]{e}-1)\bigg)=1$

-


text:
Q.: Does the use of I or 2 percent calcium chloride in concrete weaken the concrete measurably? Why does concrete containing calcium chloride seem to work better?

A.: The addition of calcium chloride tends to increase the early strength of concrete though it may slightly decrease the ultimate strength. We are not sure why calcium chloride should seem to make the concrete more workable, if it does, unless it is the combined effect of shortening the setting time and decreasing the rate of bleeding.


text:
# What does it mean by saying someone is “effectively risk averse/loving”?

Recently I am reading a paper by Ortner & Chassang (2018) on corruption control. It is a nice paper to read, and the idea is kinda cool.

The game is as follows. There are 3 players, a principle, a monitor, and an agent. The agent can choose to engage crime, and the principle offers a wage structure to the monitor in order to deter crime (for details, please refer to the paper if you are interested). One of the results says that, when the monitor's private cost of misreporting is strictly concave (convex) over the support, the agent is effectively risk-loving (risk-averse).

However, I do not quite understand the concept of being "effectively risk averse/loving" that they mentioned. I never saw this before. What does it mean? Does it simply mean that it is beneficial for the agent to be risk-loving?

• I think "effective" risk aversion means the agent's risk aversion is an equilibrium property, since "[the agent] obtains a higher payoff from a random wage schedule than from a deterministic one with the same expectation." In other words, in equilibrium the agent behaves as if she's risk averse. – Herr K. May 23 at 4:39
• Thanks for the comment. That's also my guess. But I can't find any formal definition of it or any reference about it. – Lin Jing May 23 at 7:18

"Effectively" has two definitions:

1: in such a manner as to achieve a desired result.

2: actually but not officially or explicitly.

O+C are using the second definition here. This is because the risk averse/loving behaviour that is being exhibited does not come from the concavity of the agent's utility function, but instead indirectly, from the concavity of the c.d.f of the random cost $$\eta$$ that the monitor will have to pay if they misreport information. So the agents are not "officially" risk averse/loving but as a result of the concavity/convexity of the monitor's cost cdf they will behave as a risk averse/loving agent would when the cdf is linear.

Hope this helps!

• Thanks for the comment! You made it clear that it is not derived from the agent's utility function which is an important point. So, the as-if risk averse/loving behavior is actually induced by the environment under which being risk averse/loving is optimal, is this right? Any related reference the notion of "effective risk averse" would be great! Thanks again. – Lin Jing May 23 at 13:37
• That's correct! Since it's not really a formal term I don't think you'll be able to find much in the way of external references, in the same way there isn't really a strict definition of what it means to be "extremely risk averse". But if it helps, I can give a couple other examples of the word effective being used in a similar way: one might say a war is "effectively over" after fighting has stopped but before treaties have been signed. Or that a powerful advisor to a weak willed king is the "effective leader" of the kingdom. – H Rogers May 23 at 13:48
• Thanks a lot. The examples do help. – Lin Jing May 24 at 1:54


text:
# гравітаційний потенціал

## On the gravitational potential energy of the Earth

To estimate the gravitational potential energy of Earth E, the 3D distribution of the density of the ellipsoidal planet together with its accuracy estimate is used. It was the use of the latter that allowed E to be evaluated on the basis of only the radial distribution of density in the form of its continuous and piecewise continuous models: Legendre-Laplace, Rosh, Bullard, and Gauss. The result is an inequality for E with an upper bound EH for a homogeneous distribution and the lower edge of EGauss, which corresponds to the Gaussian distribution for Earth's density.


text:
## horsegal244 one year ago James left a bin outside in his garden to collect rainwater. He notices that 1 over 4 gallon of water fills 2 over 3 of the bin. Write and solve an equation to find the amount of water that will fill the entire bin. Show your work. Explain your answer in words.

1. horsegal244

@Michele_Laino

2. Michele_Laino

in order to fill completely one bin, we need $\frac{3}{2} \times \frac{1}{4}$ gallon

3. horsegal244

ok

4. Michele_Laino

of rainwater

5. Michele_Laino

so the requested amount Q of water is : $Q = \frac{3}{2} \times \frac{1}{4} = ...?$ please complete the computation above

6. horsegal244

12/2

7. Michele_Laino

hint: |dw:1432754070754:dw|

8. Michele_Laino

so, what is the right result?

9. horsegal244

3/8

10. Michele_Laino

that's right! we need of 3/8 gallon of rainwater

11. horsegal244

ty

12. Michele_Laino

thank you! :)


text:
Standard Markdown allows the addition of images to the page. Both local images, and images from the Internet can be displayed on the Markdown pages

Hide the pain Harold

![hide the pain Harold](img/Harold-main.png)

Extended Markdown allows centering and styling the images with Attribute lists

Image left

# Hide the Pain Harold is the meme of the decade (according to Imgur).

## Hungarian legend András Arató found fame after he was turned into a meme for his seemingly pained smiling expression.

![Placeholder](img/Harold-1.png){ align=left style="height: 30%; width: 30%; border-radius: 5px;" loading=lazy}
# Hide the Pain Harold is the meme of the decade (according to Imgur).
## Hungarian legend András Arató found fame after he was turned into a meme for his seemingly pained smiling expression.

Image right

## All he was doing was posing for stock photos and was doing his best to look natural. However, people picked up on his facial expressions and he's since become one of the most recognisable memes on the internet.

![Placeholder](img/Harold-2.png){ align=right style="height: 40%; width: 40%; border-radius: 5px;" loading=lazy}
## All he was doing was posing for stock photos and was doing his best to look natural.
However, people picked up on his facial expressions and he's since become
one of the most recognisable memes on the internet.


text:
# Can Grover's Algorithm be combined with a meet-in-the-middle attack?

We all know and love the meet-in-the-middle attack which basically makes double encryption pointless using a time-memory-tradeoff. Now there was recently the recommendation by the NSA to use double encryption to protect sensitive data adequately from quantum attackers.

Can one combine Grover's algorithm with the mitm attack to make double encryption "pointless" in the quantum setting?

Example:
The classical strength of double AES-256 encryption is 257-bits and $2^{256}$ storage. Using Grover's algorithm to attack the full cipher would take $2^{256}$ time. Can this time be reduced using a mitm tradeoff and a quantum computer?

• – CodesInChaos Oct 25 '15 at 20:30

The combination of Grover algorithm and man in the middle attack is the main subject of a paper (arXiv:1410.1434) published last year by Marc Kaplan (Full disclosure: Marc is a friend of mine.)

In this paper beyond applying Grover to MITM to reduce the time needed to analyse double-encryption, he also looks at the time-space gain, which is different, and quadruple encryption.

From the conclusion:

Equipped with a quantum computer, an attacker can run a quantum algorithm for collision finding. We have proven that this approach leads to optimal time complexity for extracting keys, making crucial use of the generalized adversary method, a tool from quantum complexity theory. Extracting a pair of keys $(k_1, k_2)$ takes time $N^{2/3}$, where $N$ is the size of the key space of a single encryption

You could be able to reduce the space required for a meet-in-the-middle attack, if you follow a similar idea as the application of Grover's algorithm on collisions. Suppose you have two layers of $n$-bit encryption:

1. Partition the inner keyspace into $2^{n/4}$ parts of size $2^{3n/4}$.
2. For each partition generate the inner encryption table.
3. Run Grover's on the outer keyspace in $O(2^{n/2})$ time.
4. If you find the preimage in the table, you found both keys, otherwise return to 2.

You would get $O(2^{n})$ time and $O(2^{3n/4})$ storage, which is better than classical meet-in-the-middle and requires less quantum computations, $O(2^{3n/4})$, than just using Grover's on the whole combined keyspace in $O(2^{n})$ time.

The problem of the size of the quantum computer would probably apply (maybe $O(2^{3n/4})$ qubits here?).


text:
# Current Trends in Algebraic Topology, Volume II, Part II

Format: Paperback

Language:

Format: PDF / Kindle / ePub

Size: 6.45 MB

Downloadable formats: PDF

Jim Sethna assisted with applications of Topology to condensed/soft matter physics such as liquid crystals and superfluid helium and other unusual phases of matter, in Chapter 5 of Topology and Its Applications. In one view, [1] differential topology distinguishes itself from differential geometry by studying primarily those problems which are inherently global. These families are of particular interest as they exhibit the largest number of exceptional Dehn fillings.

# Introduction to Differential Geometry an

Format: Hardcover

Language: English

Format: PDF / Kindle / ePub

Size: 13.37 MB

Downloadable formats: PDF

In the same vein (equivalently, really) let me mention that affine algebraic varieties (or affine schemes ) satisfy the Urysohn property: every regular function on the closed $C\subset X$ extends to a regular function on $X$. Here I will describe the space of all AdS structures on such a circle bundle and explain how to compute their volume. Thousands of geographic information systems were in use, and numerous datasets were readily available. What if the land parcel is a single piece but there is that lake in the middle of it?

# Proceedings of the Tennessee Topology Conference: Tennessee

Format: Hardcover

Language: English

Format: PDF / Kindle / ePub

Size: 5.82 MB

Downloadable formats: PDF

However, to the author's credit appropriate supplementary texts are provided. We say a function from the manifold to R is infinitely differentiable if its composition with every homemorphism results in an infinitely differentiable function from the open unit ball to R. To convey the complexity inherent in this information, this page has been changed many times since it was first published. In either case one can think of this as an acceleration.

# Algebraic Topology

Format: Paperback

Language:

Format: PDF / Kindle / ePub

Size: 5.40 MB

Downloadable formats: PDF

If no line feature is found within the distance specified, the line will not be snapped. Together they make it possible to rigorously axiomatize topology as a bottom-up theory of geometry that is concerned with the abstract idea of shape, independently of recognizable notions of measurement or "distance". And as time goes on, more and more physics becomes geometrized. Attributes from the original features will be maintained in the split features. We already know that the linear form of DNA is the one of minimum energy and, if we can�t have linear DNA, then the next best thing would be to have a closed circle of DNA with a "large" diameter.

# Academic writings Series: Topology-aware application layer

Format: Paperback

Language:

Format: PDF / Kindle / ePub

Size: 5.49 MB

Downloadable formats: PDF

Introduction to Topology and Geometry is the most comprehensive introductory-level presentation of modern geometry currently available. Their implications have been summarized with respect to Social organization determined by incommunicability of insight (1995). This is essentially a textbook for a modern course on differential geometry and topology, which is much wider than the traditional courses on classical differential geometry, and it covers many branches of mathematics a knowledge of which has now become essential for a modern mathematical education.

# Topological Methods in Chemistry

Format: Hardcover

Language: English

Format: PDF / Kindle / ePub

Size: 12.16 MB

Downloadable formats: PDF

I give the definition of the zeta regularized determinant of the Laplacian. Lagrangian field theory: basics of the calculus of variations, examples: free and interacting scalar fields, gauge theories, Yang-Mills theory in 2 dimensions, Chern-Simons theory in 3 dimensions. When the open ends are connected (3 to 3' in the gluing pattern) an embedded shape results, as shown in the middle left-hand diagram. While the Listel is off campus it offers great value for PIMS guests.

# Thirteen Papers on Algebra, Topology, Complex Variables and

Format: Hardcover

Language: English

Format: PDF / Kindle / ePub

Size: 14.61 MB

Downloadable formats: PDF

Topology: Spaces of Transformation, conceived by Jean Matthee, is a major series of keynote conversations with leading intellectuals, artists and writers on the stakes and implications of topology on thinking, writing, making and acting in the world. Unless a change is noted below, the CUNY Geometry and Topology Seminar takes place at 4:15pm on Tuesdays in Room 3212 of the Graduate Center, located at 365 Fifth Avenue across the street from the Empire State Building.

# KAM: A System for Intelligently Guiding Numerical

Format: Hardcover

Language: English

Format: PDF / Kindle / ePub

Size: 13.54 MB

Downloadable formats: PDF

For example, look at a plate on a table from directly above the table, and the plate looks round, like a circle. It turns out that a topological 2-manifold can be constructed out of pieces which have one of only three types of geometric structure. Following is brief review of the development. Often it is a big headache for students as well as teachers. Example rules include polygons must not overlap, lines must not have dangles, points must be covered by the boundary of a polygon, polygon class must not have gaps, lines must not intersect, and points must be located at an endpoint.

# Reviews in K-Theory, 1940-84

Format: Paperback

Language: English

Format: PDF / Kindle / ePub

Size: 10.56 MB

Downloadable formats: PDF

Upgrade your geodatabase to make use of the z cluster tolerance. Ben Amar, M. and Goriely, A. [2005], Growth and instability in elastic tissues. Topology and geometry for physicists by C. Furthermore, these topics extend into other mathematical areas such as combinatorics and algebraic geometry. The concern here is with the interplay between a sense of identity and the forms through which identity is expressed and patterned by psychological processes of identification.

# Controlled Simple Homotopy Theory and Applications (Lecture

Format: Paperback

Language: English

Format: PDF / Kindle / ePub

Size: 9.43 MB

Downloadable formats: PDF

This relatively young field grows out of the Gelfand-Naimark theorem, establishing a strong connection between compact Hausdorff spaces and commutative C*-algebras. If we try to axiomatize the properties of the notion of "$f\in R$ vanishes at $x\in X"$, we arrive at: If $f$ vanishes at $x$, then $(f\cdot g)(x)$ also vanishes. You can check the size by using a rotation transformation to rotate each into one another and then match sizes.


text:
One of the big sources of difficulty on the async ecosystem is spawning tasks. Because there is no API in std for spawning tasks, library authors who want their library to spawn tasks have to depend on one of the multiple executors in the ecosystem to spawn a task, coupling the library to that executor in undesirable ways.

Ideally, many of these library authors would not need to spawn tasks at all. Indeed, I think probably most libraries which spawn tasks should be rewritten to do something else (and we should provide tools to make that easier, like async destructors).

Despite this, there’s a pretty clear desire for spawn sort of task spawning functionality in std. I just wanted to make some notes about what that could look like.

## Spawn APIs: thread::block_on and task::spawn

I think there are two APIs that make sense to add to std eventually:

• thread::block_on would be a function that takes a future and blocks the current thread until that future polls to completion.
• task::spawn would be a function that takes a future and spawns it on some sort of “global executor,” running it to completion without blocking the current thread.

The first of these APIs has already been proposed. I think we need more discussion about the nuance of the API’s form, but overall its a good idea and relatively straightforward.

The second API is more complicated. Specifically we are forced to ask: what does it mean to add a “global executor” to Rust? I think global allocators provide a good model for how to move forward here.

## #[global_executor]

What I would propose is a global executor attribute that functions just the same as the global allocator attribute we have already added to stable Rust. Only one of these attributes can be applied in given compilation, and so libraries should not use the attribute unless that is their express purpose (though they can use them in their tests and so forth, just outside of the normal library crate).

This attribute would be applied to some static that implements a GlobalExec trait or something of the sort, being the global executor for this compiled artefact.

### Should there be a default global executor?

However, what if there is no executor entrypoint specified anywhere in this program? There are two obvious options:

• task::spawn would panic by default.
• We would ship a default executor to use in that case.

The latter case is nice, but would likely arouse controversy. We would need to be clear about what kinds of guarantees we make around the performance and behavior of our default global executor.

In particular, it’s possible to write a simple multithreaded executor in only a few hundred lines of Rust; I think we should not aim for something with better performance than that if we do this, and expect that most production users would replace the global executor with one more optimized for their kinds of workloads. However, it may be simpler just to provide nothing, but this is what the RFC process is for.

## async fn main and #[test] async fn

Finally, having some kind of executor available as part of the libstd would enable us to make the main function and test functions into async contexts, setting up an async environment for you automatically. This way, you can .await directly inside of tests and the main function. Yoshua Wuyts talked about this a bit in his RustConf talk.

The big design question this raises is this: should these run the main future using the block_on executor or by spawning a task? Another question to figure out during the RFC period.

## Next steps

Having laid out this road map, I think the easiest thing to move forward on is the block_on API, which has only minor design questions to resolve. I would love to see an RFC laying out a proposed design and its alternatives, so that we could begin to have this functionality on nightly.

We can also begin moving forward on the rest of these APIs - an RFC for the task::spawn and GlobalExec could also be appropriate. But we should be careful to follow those processes in a steady, inclusive and consensus-seeking manner and make sure we are “bringing the community along” with us.

mod task {
fn spawn<T, F>(future: F) -> JoinHandle<T> where
F: Future<Output = T> + Send + 'static
{ ... }

// TODO how do we allow GlobalExec impls to construct JoinHandle?
struct JoinHandle<T> {
async fn join(self) -> Result<T> { ... }
}

// The #[global_executor] static must implement this trait
trait GlobalExec {
fn spawn<T, F>(&self, future: F) -> JoinHandle<T> where
F: Future<Output = T> + Send + 'static
{ ... }
}
}


text: Title A simple preparation method for air-sensitive specimens for transmission electron microscopy demonstrated by $Rb_{6}C_{60}$ Author Zhang, X.F. Zhang, X.B. Bernaerts, D. Van Tendeloo, G. Amelinckx, S. van Landuyt, J. Werner, H. Faculty/Department Faculty of Sciences. Physics Publication type article Publication 1994 Amsterdam , 1994 Subject Chemistry Source (journal) Ultramicroscopy. - Amsterdam Volume/pages 55(1994) , p. 25-30 ISSN 0304-3991 ISI A1994PE30800005 Carrier E Target language English (eng) Full text (Publishers DOI) Affiliation University of Antwerp Abstract In this paper a particularly simple but efficient method is presented by which samples of alkali-doped C-60 materials or other air-sensitive materials can be prepared and transferred into a transmission electron microscope for direct observations and investigations. Flexible, transparent glove bags are used which are filled to a slight overpressure with dry nitrogen. Under this protective atmosphere, the air-sensitive sample is mounted in the specimen holder and inserted in the vacuum of the electron microscope. Rb6C60 which is prepared and transferred into the microscope in this way has been investigated by transmission electron microscopy (TEM). The results confirm the bcc structure and especially the location of the rubidium atoms. E-info http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:A1994PE30800005&DestLinkType=RelatedRecords&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:A1994PE30800005&DestLinkType=FullRecord&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 http://gateway.webofknowledge.com/gateway/Gateway.cgi?GWVersion=2&SrcApp=PARTNER_APP&SrcAuth=LinksAMR&KeyUT=WOS:A1994PE30800005&DestLinkType=CitingArticles&DestApp=ALL_WOS&UsrCustomerID=ef845e08c439e550330acc77c7d2d848 https://repository.uantwerpen.be/docman/iruaauth/061fff/10922.pdf Handle


text:
Absolute Value of Cut is Greater Than or Equal To Zero Cut

Jump to navigation Jump to search

Definition

Let $\alpha$ be a cut.

Let $\size \alpha$ denote the absolute value of $\alpha$.

Then:

$\size \alpha \ge 0^*$

where:

$0^*$ denotes the rational cut associated with the (rational) number $0$
$\ge$ denotes the ordering on cuts.

Proof

Let $\alpha \ge 0^*$.

Then by definition $\size \alpha = \alpha \ge 0^*$.

Let $\alpha < 0^*$.

Then:

$\exists \beta: \beta + \alpha = 0^*$

Thus:

$\alpha = -\beta$

and it follows that $\beta > 0^*$.

The result follows.

$\blacksquare$


text:
The open source CFD toolbox
Command line interface user@openfoam:~\$...

Basic usage

OpenFOAM comprises many applications, primarily designed to be driven by the command line. Whilst sometimes unfamiliar to new users, this interface provides the most flexible means by which to control the phases of case set-up, execution and evaluation of results, and lends itself to automation and batch-processing.

Applications are typically invoked using commands of the form:

<application> [OPTIONS] <arguments>

More detailed usage information is available using the help option; for example, when applied to the blockMesh application as:

blockMesh -help

the following text is presented:

Usage: blockMesh [OPTIONS]
Options:
-blockTopology    Write block edges and centres as obj files and exit
-case <dir>       Specify case directory to use (instead of the cwd)
-dict <file>      Alternative dictionary for the blockMesh description
-noClean          Do not remove any existing polyMesh/ directory or files
-region <name>    Specify alternative mesh region
-sets             Write cellZones as cellSets too (for processing purposes)
-time <time>      Specify a time to write mesh to (default: constant)
-doc              Display documentation in browser
-help             Display short help and exit
-help-compat      Display compatibility options and exit
-help-full        Display full help and exit

Block mesh generator.
The ordering of vertex and face labels within a block as shown below.
For the local vertex numbering in the sequence 0 to 7:
Faces 0, 1 (x-direction) are left, right.
Faces 2, 3 (y-direction) are front, back.
Faces 4, 5 (z-direction) are bottom, top.
7 ---- 6
f5     |\     |\     f3
|      | 4 ---- 5     \
|      3 |--- 2 |      \
|       \|     \|      f2
f4       0 ---- 1
Y  Z
\ |                f0 ------ f1
\|
O--- X

Using: OpenFOAM-v1906 (1906) (see www.OpenFOAM.com)
Build: v1906
Arch:  LSB;label=32;scalar=64

Useful commands

Moving around the source code and cases is easily performed using standard linux commands, e.g.

• ls: list directory contents
• cd: change directory

In addition, several aliases are available which provide short cuts to many OpenFOAM directories. These include:

• foam: change to the main OpenFOAM project directory
• src: change to the top-level source directory
• sol: change to the top-level solver directory
• util: change to the top-level utilities directory
• tut: change to the top-level tutorial directory

Tab completion

Command line tab completion of OpenFOAM applications presents users with selections that are tailored for the current action. For example, issuing

checkMesh <TAB> <TAB>

returns the list of available options for the checkMesh utility:

-allGeometry		-latestTime		-roots			-help
-allTopology		-meshQuality		-time			-help-man
-case			-noFunctionObjects	-writeAllFields		-help-notes
-constant		-noTopology		-writeFields		-help-full
-decomposeParDict	-noZero			-writeSets
-fileHandler		-parallel		-doc
-hostRoots		-region			-doc-source

Many options require additional user input, shown by the -option <value> type entries when requesting help via the -help option as shown in the previous blockMesh example.

If using the -time option, the completion will limit the options to the list of availabe times, e.g. after running the tutorial:

Invoking the following:

checkMesh -time <TAB> <TAB>

returns:

0    0.1  0.2  0.3  0.4  0.5

Multi-region cases are notoriously complex to set-up and process. The -region option will limit the available options to the list of regions, e.g. applied to the tutorial:

Invoking the following:

checkMesh -region <TAB> <TAB>

returns:

air     porous

Command line help

Manual pages provide a straightforward interface to access the options available to all OpenFOAM applications. See the full list of options here:

 Would you like to suggest an improvement to this page? Create an issue


text:
Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

DZone's Guide to

# Getting Started With Data Mining

· Java Zone
Free Resource

Comment (0)

Save
{{ articles[0].views | formatCount}} Views

Just released, a free O’Reilly book on Reactive Microsystems: The Evolution of Microservices at Scale. Brought to you in partnership with Lightbend.

Here are just notes from my data mining class which I will begin to consolidate here in my blog as a way to assimilate the lessons.

1. The market basket model is probably the easiest introduction to anyone interested in data mining. The concept is simple. There are baskets and there are items in those baskets.

The market basket model: There are items and there baskets, also called itemsets, that hold those items.

2. Closely related to the the Market Basket model is the concept of frequent itemsets. Intuitively, a set of items is frequent if it occurs many times.

3. The following terms are used a lot when talking about frequent itemsets:

• Support count – is a term that refers to the number of times an itemset appears in a set of baskets. For example in the basket set

[ ('cheese', 'milk', 'eggs'), ('milk'), ('milk', 'eggs', 'bread') ]

the support count of the itemset (‘milk’, ‘eggs’) is 2 since it was a subset two times

• Support threshold – is a numerical limit that draws the line between a frequent itemset and non-frequent itemset. For example, in the basket set above, if one sets the support threshold at >= 2, then one can say that the itemset (‘milk’, ‘eggs’) is frequent.

4. Frequent itemsets are presented as an if-then rule like so: $I \to j$ where I is a set of items and j is an item. This representation is called an association rule. In words, it can be said that if I appears in a basket then j is “likely” to appear as well.

5. In data mining parlance, the concept of ‘likely’ is more formally known as the confidence of the rule $I \to j$. Mathematically,

$Confidence(I \to j) = \frac{Support(I U {j})}{Support(I)}$

The insights behind this formula are that

• Baskets with $I \cup {j}$ in them cannot be more than baskets with I in them. Think about it. If one has I then there may or may not be the j around it in the same basket.
• Having said that, the more baskets with $I \cup {j}$ in them, the better. This makes the confidence in the rule stronger
• If $Support(I \cup {j})$ is the same as the $Support(I)$ then that means that the confidence is 1 or 100%. In other words $I \to j$ all the time!

6. In an association rule, interest is an indicator of how the item on the left affects the item on the right in $I \to {j}$ . The formula is:

$Interest = Confidence(I \to j) - \frac{\# of item j in baskets}{\# of baskets}$

The insight behind this formula is that

• If the confidence outweighs the fraction of baskets with j, then it can be said that there is indeed a correlation between I and J and/or the presence of I somehow affects the presence of j.

• On the other hand, If there are significantly more baskets with j but not I, then the association rule $I \to {j}$ isn’t really strong. It definitely is not the presence of I that implies the presence of j but something else. The instances when I and j are together in a basket can be said to be isolated

Strategies and techniques for building scalable and resilient microservices to refactor a monolithic application step-by-step, a free O'Reilly book. Brought to you in partnership with Lightbend.

Topics:

Comment (0)

Save
{{ articles[0].views | formatCount}} Views

Published at DZone with permission of Jose Asuncion, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.


text:
## Terms

A worm is any list of nonnegative integers, and its rightmost (i.e., last) element is called the head. If the head is not 0, the worm has an active segment consisting of the longest contiguous block of elements that includes the head and has all of its elements at least as large as the head. The reduced active segment is the active segment with the head decremented by 1. For example, the worm 3 1 2 3 2 has active segment 2 3 2, and the reduced active segment is 2 3 1.

## Rules of evolution

A worm evolves step-by-step as follows:

In step t (= 1, 2, 3, ...),
else: replace the active segment by t+1 concatenated copies of the reduced active segment.

Fact: Any worm eventually evolves into the empty list, and the number of steps to do so is the worm's lifetime.

(Details can be found in The Worm Principle, a paper by L. D. Beklemishev. The usage of "list" to mean a finite sequence, and "head" to mean its last element, is taken from this paper -- it should not be confused with the common usage for lists as an abstract data type, where head usually means the first element.)

## Examples (active segment in parentheses)

Worm: 0,1

step    worm
0(1)
1        0 0 0
2        0 0
3        0

Worm: 1,0

step    worm
1 0
1       (1)
2        0 0 0
3        0 0
4        0

Worm: 1,1

step    worm
(1 1)
1        1 0 1 0
2        1 0(1)
3        1 0 0 0 0 0
4        1 0 0 0 0
5        1 0 0 0
...
8       (1)
9        0 0 0 0 0 0 0 0 0 0
10       0 0 0 0 0 0 0 0 0
...
18       0

Worm: 2

step    worm
(2)
1       (1 1)
2        1 0 1 0 1 0
3        1 0 1 0(1)
4        1 0 1 0 0 0 0 0 0
5        1 0 1 0 0 0 0 0
6        1 0 1 0 0 0 0
...
10       1 0(1)
11       1 0 0 0 0 0 0 0 0 0 0 0 0 0
12       1 0 0 0 0 0 0 0 0 0 0 0 0
...
24      (1)
25       0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
...
50       0

Worm: 2,1

        (2 1)
1        2 0 2 0
2        2 0(2)
3        2 0(1 1 1 1)
4        2 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0
5        2 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0(1 1 1)
6        2 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0
7        2 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0(1 1)
8        2 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0 1 1 0{1 0}^9
...

Worm: 3

step    worm
(3)
1       (2 2)
2       (2 1 2 1 2 1)
3        2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0
4        2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1(2)
5        2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0(2 1 2 1 1 1 1 1 1 1)
6        2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0{2 1 2 1 1 1 1 1 1 0}^7
7        2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0{2 1 2 1 1 1 1 1 1 0}^6 (2 1 2 1 1 1 1 1 1)
...      ...

## Aside

Worm lifetimes are typically enormous, as shown by the following lower bounds in terms of the standard fast-growing hierarchy of functions fα:

worm                lower bound on lifetime
----------------    ------------------------------------------
11..10 (k 1s)       f_k(2)
2                   f_ω(2)
211..1 (k 1s)       f_(ω+k)(2)
2121..212 (k 2s)    f_(ωk)(2)
22..2 (k 2s)        f_(ω^k)(2)
3                   f_(ω^ω)(2)
...
n                   f_(ω^ω^..^ω)(2) (n-1 ωs)  >  f_(ε_0) (n-1)

Remarkably, worm [3] already has a lifetime that far surpasses Graham's number, G:

fωω(2) = fω2(2) = fω2(2) = fω+2(2) = fω+1(fω+1(2)) >> fω+1(64) > G.

## Code Golf Challenge

Write the shortest possible function subprogram with the following behavior:

Input: Any worm.
Output: The lifetime of the worm.

Code size is measured in bytes.

Here's an example (Python, golfs to about 167 bytes):

from itertools import *
def T(w):
w=w[::-1]
t=0
while w:
t+=1
if w[0]:a=list(takewhile(lambda e:e>=w[0],w));a[0]-=1;w=a*(t+1)+w[len(a):]
else:w=w[1:]
return t

NB: If t(n) is the lifetime of the worm [n], then the rate of growth of t(n) is roughly that of the Goodstein function. So if this can be golfed to below 100 bytes, it could well give a winning answer to the Largest Number Printable question. (For that answer, the growth-rate could be vastly accelerated by always starting the step-counter at n -- the same value as the worm [n] -- instead of starting it at 0.)

• I am confused by your code. You said the head is the rightmost element, but in your Python example, you treat the head as a w[0] which is the *leftmost element of that list? – user8777 Jan 20 '14 at 0:22
• @LegoStormtroopr If you can consider a list as having a left and right. If you just consider a first and last, you could map the rightmost to first or last when reading the initial string - which isn't part of the question. But the function inputs weren't strictly defined either. – Bob Jan 20 '14 at 3:26
• @LegoStormtroopr - Good catch; I corrected the code by adding a line to reverse the input worm, whose head is indeed supposed to be on the right (i.e. the last element in the list w). It's for efficiency that the program operates on the reversed worm. – r.e.s. Jan 20 '14 at 4:55
• Getting the correct answer for 2 1 might be too much to ask in a reasonable time, but a useful test is that the sequence should start (2 1), 2 0 2 0, 2 0 (2), 2 0 (1 1 1 1), ... – Peter Taylor Jan 20 '14 at 12:03
• @ThePlasmaRailgun - To paraphrase Harvey Friedman, numbers derived from functions at level ε_0 in the fast-growing hierarchy (such as worm-lifetimes) are completely UNNOTICEABLE in comparison to TREE(3). – r.e.s. Mar 13 at 18:17

## GolfScript (56 54 chars)

{-1%0\{\)\.0={.0+.({<}+??$$(\+.@<2*\+}{(;}if.}do;}:L;  Online demo I think that the key trick here is probably keeping the worm in reverse order. That means that it's pretty compact to find the length of the active segment: .0+.({<}+?? (where the 0 is added as a guard to ensure that we find an element smaller than the head). As an aside, some analysis of the worm lifespan. I'll denote the worm as age, head tail (i.e. in reverse order from the question's notation) using exponents to indicate repetition in the head and tail: e.g. 2^3 is 2 2 2. Lemma: for any active segment xs, there is a function f_xs such that age, xs 0 tail transforms into f_xs(age), tail. Proof: no active segment can ever contain a 0, so the age by the time we delete everything before the tail is independent of the tail and is hence a function only of xs. Lemma: for any active segment xs, the worm age, xs dies at age f_xs(age) - 1. Proof: by the previous lemma, age, xs 0 transforms into f_xs(age), []. The final step is deletion of that 0, which is not touched previously because it can never form part of an active segment. With those two lemmata, we can study some simple active segments. For n > 0, age, 1^n 0 xs -> age+1, (0 1^{n-1})^{age+1} 0 xs == age+1, 0 (1^{n-1} 0)^{age+1} xs -> age+2, (1^{n-1} 0)^{age+1} xs -> f_{1^{n-1}}^{age+1}(age+2), xs  so f_{1^n} = x -> f_{1^{n-1}}^{x+1}(x+2) (with base case f_{[]} = x -> x+1, or if you prefer f_{1} = x -> 2x+3). We see that f_{1^n}(x) ~ A(n+1, x) where A is the Ackermann–Péter function. age, 2 0 xs -> age+1, 1^{age+1} 0 xs -> f_{1^{age+1}}(age+1)  That's enough to get a handle on 1 2 (2 1 in the notation of the question): 1, 1 2 -> 2, 0 2 0 2 -> 3, 2 0 2 -> f_{1^4}(4), 2 -> f_{1^{f_{1^4}(4)+1}}(f_{1^4}(4)+1) - 1, []  So given input 2 1 we expect output ~ A(A(5,4), A(5,4)). 1, 3 -> 2, 2 2 -> 3, 1 2 1 2 1 2 -> 4, 0 2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 -> 5, 2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 0 2 1 2 1 2 -> f_{21212}^4(5) - 1 age, 2 1 2 1 2 -> age+1, (1 1 2 1 2)^{age+1} -> age+2, 0 1 2 1 2 (1 1 2 1 2)^age -> age+3, 1 2 1 2 (1 1 2 1 2)^age  and I can really start to comprehend why this function grows so insanely. • Very cool. I think this program will also give a winning answer to the Shortest terminating program whose output size exceeds Graham's number. (The current winner there is 63 bytes of Haskell code.) E.g., at 55 bytes, something like (since I'm prone to syntax errors) 9{-1%0\{$$\.0={.0+.({<}+??\((\+.@<2$*\+}{(;}if.}do;}:L~ computes the lifetime of worm [9], which far exceeds Graham's number -- and can be golfed further. – r.e.s. Jan 23 '14 at 12:42 ### GolfScript, 69 62 characters {0:?~%{(.{[(]{:^0=2$0+0=<}{\(@\+}/}{,:^}if;^?):?)*\+.}do;?}:C;

The function C expects the worm on the stack and replaces it by the result.

Examples:

> [1 1]
19

> [2]
51

> [1 1 0]
51

• Fantastic! Surely you can modify this a bit to also give a definite winner for the "Largest Number Printable" question. – r.e.s. Jan 19 '14 at 19:25
• I didn't see you post anything over there, so I went ahead and posted a modification of this code as what I believe to be the winning answer there so far -- assuming that the * and ^ are not being used as the arithmetic operators of multiply and exponentiate. Certainly, if you want to submit your own (doubtlessly superior) answer there, I will happily remove mine. – r.e.s. Jan 19 '14 at 21:21

### Ruby — 131 characters

I know this can't compete with the GolfScript solutions above and I'm fairly sure that this can be reduced a score or more characters, but honestly I'm happy to have been able to solve the problem ungolfed. Great puzzle!

f=->w{t=0;w.reverse!;until w==[];t+=1;if w[0]<1;w.shift;else;h=w.take_while{|x|x>=w[0]};h[0]-=1;w.shift h.size;w=h*t+h+w;end;end;t}

My pre-golfed solution from which the above is derived:

def life_time(worm)
step = 0
worm.reverse!
until worm.empty?
step += 1
if worm.first == 0
worm.shift
else
head = worm.take_while{ |x| x >= worm.first }
worm = head * (step + 1) + worm
end
end
step
end

• Generic tip: many golf problems work on non-negative integers, in which case if foo==0 can be trimmed to if foo<1. That can save you one char here. – Peter Taylor Jan 20 '14 at 8:40
• Incidentally, I find it fascinating that this works without a second reverse. – Peter Taylor Jan 20 '14 at 8:41
• Ah, it doesn't. It just works on the test cases because they only have palindromic active segments. – Peter Taylor Jan 20 '14 at 11:54
• Thanks for the golf tip, @PeterTaylor. Also, good catch on the missing second reverse. I've added it in. I'll try to rewrite this another way without using reverse later. I'm pretty sure I can get the else clause down to one line and then swap the if..else..end for a ternary statement. I could also use a lambda to save a few characters, I think. – O-I Jan 20 '14 at 16:54

# Sclipting (43 characters)

글坼가⑴감套擘終長①加⒈丟倘⓶增⓶가采⓶擘❷小終⓷丟❶長貶❷가掊貶插①增復合감不가終終

This expects the input as a space-separated list. This outputs the correct answer for 1 1 and 2, but for 2 1 or 3 it takes too long so I gave up waiting for it to finish.

With commentary:

글坼 | split at spaces
가⑴ | iteration count = 0

감套 | while:
擘終長①加⒈丟 | remove zeros from end and add to iteration count
倘 | if the list is not empty:
⓶增⓶ | increment iteration count
가采⓶擘❷小終⓷丟 | separate out active segment
❶長貶❷가掊貶插 | compute reduced active segment
①增復合 | repeat reduced active segment and concat
감 | continue while loop
不 | else
가 | stop while loop
終 | end if

• A link to an interpreter would be handy... Also, 86 bytes, using UTF-16? – Peter Taylor Jan 20 '14 at 18:48
• @PeterTaylor: Thanks, added the link to the interpreter to the article. And yes, 43 BMP characters do translate to 86 bytes in UTF-16. – Timwi Jan 23 '14 at 11:59

# k (83)

worm:{-1+*({x,,(,/((x+:i)#,@[y@&w;(i:~~#y)#0;-1+]),y@&~w:&\~y<*y;1_y)@~*y}.)/(1;|,/x)}

this can probably be golfed further, as it just implements the recurrence fairly straightforwardly.

the basic evolution function, {x,,(,/((x+:i)#,@[y@&w;(i:~~#y)#0;-1+]),y@&~w:&\~y<*y;1_y)@~*y}, is 65 chars, and uses some tricks to stop incrementing the age when the worm dies. the wrapper coerces an input of a single integer to a list, reverses the input (it's shorter to write the recurrence in terms of a worm reversed from your notation), asks for the fixpoint, selects the age as the output, and adjusts the result to account for the overshoot in the last generation.

if i do the coercion and reversal manually, it drops to 80 ({-1+*({x,,(,/((x+:i)#,@[y@&w;(i:~~#y)#0;-1+]),y@&~w:&\~y<*y;1_y)@~*y}.)/(1;x)}).

some examples:

  worm 1 1 0
51
worm 2
51
worm 1 1
19

unfortunately, it's probably not much use for Largest Number Printable, except in a very theoretical sense, as it's quite slow, limited to 64-bit integers, and probably not particularly memory-efficient.

in particular, worm 2 1 and worm 3 just churn (and would probably throw 'wsfull (out of memory) if i let them keep going).

• I've tried to run your program with this online interpreter, but it doesn't show any output. (Submitting a text file with extension .k is supposed to invoke the K interpreter.) Do you know what might be done to send the output to stdout? – r.e.s. Jan 27 '14 at 17:27
• It looks like that's running kona, an open-source clone of k3. My code is written in k4, and is unlikely to be compatible with k3. You can get a time-limited free copy of q/k4 at kx.com/software-download.php; once you have that, start the REPL, type  to switch from q to k, and paste my code in. Alternatively, you can save my code in a file with a .k extension and load it into the interpreter. – Aaron Davies Jan 27 '14 at 21:51

# APL (Dyalog Unicode), 52 bytesSBCS

Saved 7 bytes thanks to @ngn and @Adám.

0{⍬≡⍵:⍺⋄n←⍺+1⋄0=⊃⍵:n∇1↓⍵⋄n∇∊(⊂1n/-∘1@1¨)@1⊆∘⍵⍳⍨⌊\⍵}⌽

Try it online!

Explanation:

0{...}⌽    ⍝ A monadic function train. We define a recursive function with two
⍝ arguments: zero (our counter), and the reverse of our input
⍬≡⍵:⍺      ⍝ Our base case - if our input is an empty list, return our counter
n←⍺+1      ⍝ Define 'n' as our counter plus 1
0=⊃⍵:n∇1↓⍵ ⍝ If the first element of the input is zero, recurse with the tail
⍝ of our input and n
⌊\⍵        ⍝ Minimum-expand: creates a new list from our input where each element
⍝ is the incremental minimum
⍳⍨         ⍝ Applies above to both sides of the index-of function. Index-of returns
⍝ the index of the first occurence of each element in the left-side list.
⍝ At this point, a (reversed) input list of [3 4 5 2 3 4] would result
⍝ in [1 1 1 4 4 4]
⊆∘⍵        ⍝ Partition, composed with our input. Partition creates sublists of the
⍝ right input whenever the integer list in the left input increases.
⍝ This means we now have a list of sub-lists, with the first element
⍝ being the worm's active segment.
(...)@1    ⍝ Take the active segment and apply the following function train...
-∘1@1¨     ⍝ Subtract 1 from the first element of the active segment
1n/        ⍝ Replicate the resultant list above n+1 times
⊂          ⍝ Enclose the above, so as to keep the original shape of our sub-array
∊          ⍝ Enlist everything above together - this recursively concatenates our
⍝ new active segment with the remainder of the list
n∇         ⍝ Recurse with the above and n

• I figured APL would have a really clean solution for this, isn't it an array-based language? – ThePlasmaRailgun Mar 13 at 6:16

# Scala, 198

type A=List[Int]
def T(w:A)={def s(i:Int,l:A):Stream[A]=l match{case f::r=>l#::s(i+1,if(f<1)r
else{val(h,t)=l.span(_>=l(0));List.fill(i)(h(0)-1::h.tail).flatten++t})
case _=>Stream()};s(2,w).length}

Usage:

scala> T(List(2))
res0: Int = 51

# K, 95

{i::0;#{~x~,0}{((x@!b),,[;r]/[i+:1;r:{@[x;-1+#x;-1+]}@_(b:0^1+*|&h>x)_x];-1_x)@0=h:*|x:(),x}\x}

.

k)worm:{i::0;#{~x~,0}{((x@!b),,[;r]/[i+:1;r:{@[x;-1+#x;-1+]}@_(b:0^1+*|&h>x)_x];-1_x)@0=h:*|x:(),x}\x}
k)worm 2
51
k)worm 1 1
19
q)worm 1 1 0 0 0 0
635

# C (gcc), 396 bytes

#define K malloc(8)
typedef*n;E(n e,n o){n s=K,t=s;for(*s=*o;o=o[1];*t=*o)t=t[1]=K;t[1]=e;e=s;}main(c,f,l,j,a)n*f;{n w=K,x=w;for(;l=--c;x=x[1]=K)*x=atoi(f[c]);for(;w&&++l;)if(*w){n v=K,z=v,u=w,t=K;for(a=*v=*w;(u=u[1])&&*u>=*w;*z=*u)z=z[1]=K;for(x=v[1],v=K,*v=a-1,1[u=v]=x;u;u=u[1])w=w[1];for(j=~l;j++;)u=t=E(t,v);for(;(u=u[1])&&(x=u[1])&&x[1];);u[1]=0;w=w?E(w,t):t;}else w=w[1];printf("%d",--l);}

Try it online!

I know I'm EXTREMELY late to the party, but I thought I'd try my hand at this in C, which required a linked-list implementation. It's not really golfed at all besides changing all the identifiers to single characters, but it functions!

All in all, I'm pretty happy considering this is the 3rd C/C++ program I've ever wrote.

• Do you really need a linked list? Why not just allocate arrays? Since this is code golf, you don't even need to bother freeing them when you're done. You might even be able to find a way to store them on the call stack (not sure). – dfeuer Mar 16 at 3:38
• Also, you don't need a main function. Just write a function that takes the worm as an argument and returns its lifespan. The worm can be an array and its length, or maybe an array ending in a negative number. – dfeuer Mar 16 at 3:43

(0!).reverse
n!(x:y)|x<1=(n+1)!y|(a,b)<-span(>=x)y=(n+1)!(([-1..n]*>x-1:a)++b)
n!_=n

Try it online!

Thanks to @xnor for two bytes.

I feel like there should be a good way to factor out the common increment, but I haven't found a short one yet.

• Two small golfs: check the empty list case second, and shift n down by 1. – xnor Mar 16 at 16:47
• I also think there should be a way to not write (n+1)! twice, but my attempt only tied. – xnor Mar 16 at 16:52

# Perl 5-pa, 92 bytes

while(@F){++$\;my@a;if($b=pop@F){unshift@a,pop@F while$F[-1]>=$b;push@F,(@a,--$b)x($\+1)}}}{

Try it online!

# Stax, 31 bytes

àîz7αan♣óàNµK2☻₧⌡▐Γl½f{♂♂_KZÖÄ
`

Run and debug it


text:
# Resulting expected value of a bounded exponential pdf

#### endlessend25

##### New Member
I need to determine the distribution function of an exponential random variable with mean 2, given that its outcome is larger than 2 and give the resulting expected value?

I know that the mean is 1/lambda, so lambda should be 1/2.

I get that way 0.5*e^(-0.5x) >= 2. How can I deal with the inequality if I want to compute the expected value ?


text:
# Natural examples of deformation retracts that are not strong deformation retracts

The question here asks for examples of deformation retracts which are not strong deformation retracts. A comment is given refering the asker to Exercise 0.6 in Hatcher. (The description of this space also appears in this question, which is about this very same exercise.)

This space, however, seems to be constructed specifically for this purpose.

Are there any naturally occurring (by which I mean not constructed specifically for this purpose, arising in some other way) spaces that are deformation retracts but not strong deformation retracts?

The main reason for asking is that it doesn't seem very likely to me that one would stumble upon such a space at random, so I don't know what to watch out for. One can never be too careful.

-

This depends on what you mean by being "specifically constructed for this purpose". A nice example (that I'm sure inspired the example given by Hatcher) is the comb space $$X=[0,1]\times\{0\}\cup\{0\}\times [0,1]\cup\bigcup_{n=1}^\infty \left(\left\{\frac{1}{n}\right\}\times [0,1]\right)$$

Any connected subset of the leftmost tooth $\{0\}\times[0,1]$ is a deformation retract of $X$, since $X$ contracts to the point $(0,0)$. But most of the time these won't be strong deformation retracts; in fact the only subset of that tooth that is a strong deformation retract is the point $(0,0)$.

-
Thanks, this is a perfect answer to the question I asked, so I've decided to accept it. I see I've asked the wrong question, though. =/ What I'm actually interested in is nicer examples of spaces that deformation retract to some point but do not strongly deformation retract to any point. I guess I'll do some more thinking and ask a separate question in case I fail to reach a conclusion. –  Dejan Govc Mar 30 '13 at 16:28