text:
# Equality of sets supremum and infimum

Suppose we have a right-continuous function $f$ defined on $[0,\infty)$. I now would like to prove if $\lambda >0$ and $t\geq 0$ we have that $$\left\{ \inf \{ s\geq 0 : f(s) \geq \lambda \} \leq t \right\} = \left\{ \sup_{s\leq t} f(s) \geq \lambda \right\}.$$ Is this in general true and if so how could I prove this?

In general, this isn't true. For example, take $t:=2$, $\lambda:=1$, and $$f(x):=\left\{\begin{array}{cc}x, & 0\le x<1,\\ 0, & 1\le x<3,\\ 1, & x\ge 3.\end{array}\right.$$ Then $$\sup_{s\le t} f(s)=\sup_{s\le 2} f(s)=1\ge \lambda$$ but $$\inf \{ s\ge 0: f(s)\ge \lambda\}=\inf \{s\ge 0: f(s)\ge 1\}=\inf \{s: s \ge 3\}=3\not\le t.$$

format: plain


text:
"Never doubt that a small group of thoughtful, committed citizens can change the world. Indeed, it is the only thing that ever has."

Review article
peer-reviewed

# Updates on the Role of Spinal Cord Stimulation in the Management of Non-Surgical Chronic Lower Back Pain

### Abstract

Studies have shown that spinal cord stimulation (SCS) therapy is effective in the management of chronic low back pain. It plays a role by minimizing the intensity of chronic pain, improving the quality of life index, reducing the intake of narcotic analgesics, and increasing the functional improvement in the working environment. However, spinal cord stimulation therapy is not universal because of the complications in the procedure itself, the invasive nature of the treatment, and cost-effectiveness. Therefore, the proper selection of the patients is necessary to get the maximum benefit from the treatment. The study's main objective is to determine the role of spinal cord stimulation in treating non-surgical patients with chronic low back pain. The article will review the mechanism, outcomes, efficacy, predisposing factors in the success and failure of the treatment and indications, contraindications, and selection of patients undergoing spinal cord stimulation therapy. A manual search of the literature was done using databases like Google Scholar and PubMed using the keywords: spinal cord, stimulation, chronic, and low back pain. A total of 37 articles were included in the study after considering the inclusion and exclusion criteria. Spinal cord stimulation therapy effectively treats refractory lower back pain, considering the technology and mechanism of action. The authors conclude that spinal cord stimulation therapy can be used to manage chronic low back pain, other neuropathic pain, and ischemic pain when other standard treatment methods have failed and the pain persisted for more than six months.

### Introduction & Background

Chronic lower back pain is a common comorbidity worldwide and the fifth most common in the United States [1]. In the majority of those who struggle with low back pain, the cause cannot be identified, thereby classifying the pain as non-specific. As this condition is common worldwide, the current treatment recommendations vary between countries. In respect to the large population of people with chronic, non-specific, lower back pain ineligible for surgery, there is a need for effective treatment options. Spinal cord stimulation (SCS) therapy is a commonly practiced procedure in medicine to treat chronic lower back pain [2]. Spinal cord stimulation is a well-accepted form of treatment of neuropathic pain. SCS therapy is a modern form of pain management treatment to reduce chronic back pain with different types of causation. SCS does not change the body's anatomy and the pain pathway, unlike the surgical method of managing the pain [3].

The gate theory of pain proposed by Melzac and Wall in 1965 stated that the large myelinated nerve fibers in the dorsal column inhibit the transmission of impulses to the smaller and unmyelinated afferent nerves in the spinal cord [4]. Experimentally the gate theory was tested using surgically implanted electrodes to stimulate the dorsal columns in treating back pain by Shealy and colleagues in 1967 [5]. After the experiment, it was clear that the implanted electrodes stimulate the dorsal horn and roots of the spinal cord in ablating the neuropathic back pain. Recent studies and clinical research suggest that the impulses of pain transmission through the spinothalamic tract and central mechanism are inhibited by the SCS therapy by a direct influence on the afferent neurons by releasing various neurotransmitters [6].

SCS has been used widely for chronic back pain over pharmacological or surgical treatments, as it has shown favorable outcomes. Many studies and trials have shown the promising results of SCS in improving chronic lower back pain [4]. Efficient treatment modalities are a large clinical need in the present time to treat non-surgical chronic lower back pain. The study's main objective is to determine the role of spinal cord stimulation in treating non-surgical patients with chronic low back pain. The article will give a basic review of the mechanism, outcomes, efficacy, predisposing factors in the success or failure of the treatment, and indications, contraindications, and selection of patients undergoing spinal cord stimulation therapy.

A systematic search was carried out of the literature and relevant articles in databases like Google Scholar, PubMed Central, and Web of Science. The keywords used to search the articles were spinal cord, stimulation, and low back pain. We prepared a separate Microsoft Excel sheet (Microsoft Corporation, Redmond, WA) of the searched literature and did the initial screening by reviewing our inclusion and exclusion criteria. The included patients were more than 18 years old, with symptoms of lower back pain of more than six months and without a history of surgical treatment. In addition, patients with previous surgical treatment, patients with psychiatric illness who are not in a state of evaluating the treatment outcome, and patients with mechanical instability were excluded from the study. The articles that met the exclusion article during the screening and the duplicates were removed. A total of 37 articles were included, and we reached a consensus with a discussion with a third independent author.

### Review

#### Mechanism of pain relief using SCS

Spinal cord stimulation (SCS), previously also known as dorsal column stimulation, is mechanistically based on "gate control theory for pain transmission" [7]. In 1965, a scientific theory was published by Melzack and Wall, describing the dorsal horn as a portal of entry for pain signals and the role of central neural pathways regulating pain signals. The theory explains that the gate opens when there is an activation of thin fibers (A-δ and C) by a noxious stimulus that causes the perception of pain, whereas, large-diameter somatosensory afferent fibers (A-β) form collaterals in the dorsal horn of the spinal cord, leading to inhibition of the transmission of pain signals when activated [8]. The electrical stimulation of the spinal cord can be divided into three groups depending on the anatomical location targeted for pain relief (a) peripheral, i.e., distal to the dorsal root ganglion; (b) spinal cord, dorsal root ganglion; and (c) supraspinal structures [9]. The latest available techniques for SCS involves percutaneous insertion of electrodes into the epidural space via a modified Tuohy needle under imaging guidance, and the analgesic effect is mediated by gamma-aminobutyric acid (GABA), although there is also a rise of other neurotransmitters in the dorsal horns of the spinal cord, including serotonin, substance P, glycine, and adenosine [1,7]. The conventional SCS involves introducing percutaneous leads into the epidural space while undergoing laminectomy or laminotomy procedures; paddle leads with four to 16 electrodes are inserted [10]. Percutaneously SCS leads are mostly are placed in the epidural space (midline) to stimulate the dorsal column tracts of the spinal cord.

Application of electrical stimulation activates the dorsal column, which leads to pain inhibition, the primary mechanism of conventional (tonic) SCS [10-11]. It leads to depolarization of primary afferent fibers, eliciting presynaptic inhibition in dorsal horns. The effect observed results in abrupt cessation of discharges and inhibition of nociceptive signals in the deep lamina wide dynamic range (WDR) neurons of dorsal horns of the spinal cord [9]. The dorsal root ganglion (DRG) neurons are pseudo unipolar and located in the lateral epidural space bilaterally in the spinal cord, at the distal end of the dorsal within fixed bony vertebral structures (neuroforamen) [11-12]. The DRG contains the cell bodies of sensory neurons and has an effective role in controlling pain. The implantation of leads for DRG stimulation involves placing the lead into the neural foramen close to DRG [11]. After epidural access, a unique delivery system comprising a curved sheath is advanced through the en-bloc needle technique toward the contralateral pedicle, and another lead is advanced through the foramen, ensuring electrodes are positioned near the DRG [12]. Nashold et al. were the first to describe supraspinal involvement in pain transmission and pain relief by the stimulation of dorsal fasciculi of the spinal cord. It further suggested that because of the cerebral level processing of pain signals involving the diencephalon and brainstem, the spinal cord stimulation "masks" neuropathic pain but not nociceptive pain [13]. Numerous studies in the previous years have reported effective supra spinal stimulation by somatosensory evoked potentials pain relief [14]. Stiller et al. explained the mechanisms of spinal cord stimulation utilizing microdialysis catheter techniques showing markedly reduced levels of γ-aminobutyric acid (GABA) in freely moving rats after the spinal cord stimulation, particularly involving the peri-aqueductal gray area region [10,15].

Thus, the mechanism of SCS therapy depends on the gate control theory where the noxious stimulus stimulates the smaller fibers to cause the pain, and the large diameter somatosensory fibers lead to the inhibition of the transmission of the pain signals forming collaterals in the dorsal horn after activation. Different anatomical locations like distal to the dorsal root ganglion, dorsal root ganglion, and supraspinal structures are used to place the electrodes for electrical stimulation of the spinal cord.

#### Outcome of spinal cord stimulation therapy

Chronic lower back pain is a disorder that affects all aspects of the individuals' life afflicted by it. In treating lower back pain in non-surgical patients, spinal cord stimulation has been a well-established treatment option [16]. Our study discusses the primary and secondary outcomes in patients after treatment with SCS and compares the patient status at baseline and certain months after the intervention. The main primary outcome to be considered is reducing the pain intensity by using the visual analog scale (VAS) [17]. The general characters of the secondary outcome are the Oswestry Disability Index (ODI score), European quality of life index (EuroQol five), Dimensional Questionnaire (EQ-5D), and the global impression of change, satisfaction, reduction in pain medication [18]. In the study done by Chapman et al., the overall decrease in patients' pain scores is 80% in one month of intervention. There is a mean 77.8% reduction relative to baseline, with around 50% pain relief in all patients. Out of 17 patients, nine reported 80% or more pain relief [1]. In the study done by Al Kaisy et al., there was a significant decrease in VAS score (1-10) from a mean of 79 ± 2 mm to 10 ± 12 mm. More than 60 % reported greater than 50% pain reduction [19]. Likewise, another study done by Carolis et al. showed a decrease in VAS score (1-10) from the mean of 7.8 ± 1.3 to 2.5 ± 2.1 after 19.9 months; the average pain relief percent was 70 ± 24 % [20]. The reduction of pain intensity in the study carried out by Stidd et al. in seven patients, 89% reported > 50 reductions in lower back pain [21]. In the same way, in the study of primary outcomes in 21 patients in the study done by Vallejo et al., there was a decrease of mean VAS score from 79 ± 12 mm to 10 ± 12 mm at 36 months. There was a greater than 50% reduction in pain intensity. The response rate was 58% from baseline in three months [22].

In the study by Chapman et al. in 17 patients, the ODI score improved from 67.7 ± 14.2 at baseline to a mean of 18.8 ± 11.5 after one month of treatment and 10.0% ± 8.4 after six months of treatment. The EQ-5D index increased from a mean of 0.30 ± 0.16 to a mean of 0.85 ± 0.10 after one month and 0.86 ± 0.07 after six months of treatment [1]. In the study by Chapman et al., the ODI score was reduced from 67.7% ± 14.2 to 14.7 ± 13.1 at 12 months. Among them, 10 did not need a spinal injection after treatment, three decreased the use of opioid analgesics, and two completely left using opioid analgesics. In the study by Alkaisy et al., the ODI score improved from 53 ± 13 at baseline to a mean of 19.8±13 after 12 months. Similarly, the EQ-5D improved from 0.17 to 0.84 after 36 months of treatment by SCS. More than 85% of patients were satisfied with the treatment [17,22]. Improvement in the EQ-5D from baseline to absolute 0.213 ± 0.025 (88%), ODI score from baseline to absolute is 13 ± 42.2 improvements, and the percentage of patient satisfaction was 74% after 90 days in the study carried by Vallejo et al. [22].

Thus, the primary and secondary outcomes in the patients after SCS therapy in the different studies show that it is effective in treating patients with lower back pain in non-surgical patients. The primary and secondary outcomes of the spinal cord stimulation therapy in different clinical trials are shown in Table 1.

#### Clinical efficacy and cost-effectiveness

Chronic low back pain has been the major leading cause of disability worldwide and has impaired the QoL for the past several years. Therefore, there is a huge necessity for improving treatment options for those living with that problem and improving their quality of life [27]. SCS therapy with 10 kHz has promising therapeutic action in reducing chronic back and leg pain compared to the traditional method (SENZA-RCT) [20,27]. The 10KHZ HF-SCS (high-frequency-SCS) in the low back pain study showed >50% pain reduction from baseline measured using a 0-100 mm VAS, and 88% of all subjects were not using any opioid compared with 10% at baseline. In addition, 85% of subjects were satisfied, and 50% were in the minimal disability category at 36 months of follow-up [17]. Also, patients' quality-adjusted life-year (QALY) improved by 27% in those who received SCS as compared to those who received conventional medical management (CMM; 12%).

Great patient satisfaction was reported in 88% and even 12% return to their work who undergone SCS treatment, and subjects treated with 10 kHz SCS therapy has improved disability outcomes [28-29]. The cost-utility analysis measured at the starting cost of SCS is higher than conventional medical management (CMM) due to implantation. Once the implantation is done, cost-utility significantly decreases in SCS [29]. The RCT was a study conducted based on cost-utility analysis follow-up; after 3.1 years, the mean cost of success per patient crossed to SCS was $117,901 [30]. Despite no success achieved for the patients who crossed to reoperation, the mean expenditure was$260,584 [30]. A comparative crossover study in three phases of treatment (intention to treat, treated as intended, and final treatment) showed the mean cost per patient of SCS is more effective and less expensive than the patient in reoperation in failed back surgery syndrome (FBSS)-selected patients [30].

Hence, SCS therapy has greater efficacy in controlling chronic pain and improving quality of life. In addition, SCS proves to be cost-effective, as it is less expensive than surgical treatment because once the electrodes are implanted, the cost-utility decreases significantly. Hence, it would be more appropriate in the long term, as the benefit of SCS therapy is much cheaper and effective than other treatment modalities in patients with chronic lower back pain.

#### Predisposing factors in predicting the success or failure of SCS

Several factors play a role in determining whether spinal cord stimulation will be a success or not in treating low back pain. Identifying these factors could help with appropriate patient selection for this invasive procedure and those patients who can benefit the most from this procedure. In the study by Ondonkor et al., it was analyzed that various factors determine the success or failure of spinal cord stimulation [31]. Success defines as >50% pain relief [31]. The numerous factors are age (p <0.001) - younger patients responded better with a mean age of 54 ± 13 years vs. 64 ± 14 years, primary pain site (p = 0.032) - it was significant in patients with lower extremity pain (86%), stimulator waveform (p = 0.003) - paresthesia-based tonic waveform had the best outcome (46.4%) followed by burst (33.8%), and then paresthesia-free high-frequency waveform (11.3%) [31]. Other variables thought to have an effect were not significant such as diabetes, obesity, opioid use, alcohol, smoking, duration of pain, pain characteristics, and adjuvant medications like anticonvulsants, tricyclics, antidepressants, and number of SCS leads [31].

A retrospective cohort by Cruz et al. shows a significant correlation between smoking (p = 0.017) and recreational/illegal drug use (p = 0.045) with early failure of SCS [32]. The patients who smoked experienced failure due to lead migration or the development of new pain symptoms. It was also found that smokers had more occurrence of depression [32]. The patients who used drugs had to undergo device removal. It was found that body mass index (BMI), depression, and worker's compensation status didn't impact the outcome [32]. It was also seen that there is a significant correlation between the VAS score at one month and six months in the excellent and good groups after SCS surgery is done [33]. The VAS score of the excellent group remained low throughout, whereas the VAS score in the good group increased from one month to six months follow-up (p < 0.05) [33]. However, the VAS score was not statistically significant preoperatively at the baseline between the excellent and good groups [33]. An original study done by Al Jehani et al. showed that intraoperative stimulation (IOS) at the time of SCS surgery determines the success or failure of SCS in the future [34]. A significant difference was observed when IOS was administered for 30-60 minutes between the excellent and good trial outcomes (p = 0.061) [34]. Patients who received IOS for more than 60 minutes experienced high failure rates of SCS (p = 0.0035) [34].

Based on the above information, it can be concluded that the success and failure of spinal cord stimulation therapy depend upon factors like age and different types of stimulator waveform. The other factors include comorbidities, use of oral analgesics, smoking, characteristics and duration of pain, and the number of leads used for the stimulation.

#### Indications, contraindications, and selection of a patient for spinal cord stimulation therapy

Spinal cord stimulation therapy can be used to manage chronic low back pain, other neuropathic pain, and ischemic pain when other standard treatment methods have failed and the pain persisted for more than six months [35-36]. According to the British Pain Society guidelines, good indications for SCS therapy are those patients with failed back surgery, neuropathic pain especially related to peripheral nerve lesions, and refractory angina pectoris [37]. The group of patients with intercostal neuralgia after thoracotomy, complex regional pain syndrome, pain related to peripheral vascular disease, and neuropathic pain following trauma fall into intermediate indications for SCS therapy. Usually, patients with pain of non-spinal cord origin, postherpetic neuralgia, pain due to the spinal cord injury, and avulsive brachial plexopathy fall are not indicated for SCS therapy [37].

There are contraindications where SCS therapy can't be used, like in patients with a bleeding disorder, patients on anticoagulation therapy, and systemic or local sepsis [3,38]. Patients with psychiatric disorders like psychotic disorder, major depressive disorder, drug and alcohol abusers, and somatization disorder are also not considered good patient selection for the treatment [35,39]. More than 80% of the patients required counseling before SCS therapy as shown in one study [40]. There are some relative contraindications like immune suppression, the presence of cardiac pacemakers, and the use of implanted defibrillators [38]. Pregnant women and patients with inconsistent and abnormal pain may be added to the list of contraindications [3].

Patients selected should understand the process, expense, and invasive nature of therapy [41]. So, during the patients' selection, an assessment should be done by a multidisciplinary team or consulted and approved by at least two physicians with extensive knowledge and experience in pain medicine [35]. The team for the implant should obtain consent from the patients and should perform complete documentation. They should be informed about the expected outcomes, implantation procedures, follow-up time, and requirements and complications. The primary aim of the treatment should be discussed with the patients undergoing treatment, i.e. reduction in the intensity of pain, improved quality of pain after the intervention, reduction in pain medications, and adverse effects [41].

To properly select patients for SCS therapy, the indications and contraindications should be determined carefully with the help group of treating physicians to reduce the harmful effects on the patients and draw the maximum benefits. Proper selection of patients minimizes the unnecessary invasive intervention and maximizes the chance of good outcomes.

### Conclusions

In the past four decades, SCS therapy has achieved good results in reducing the pain of patients with chronic low back pain and improving the functional status of patients. In addition, this type of treatment has shown great promise in treating patients who are not eligible for surgery. However, the increasing prevalence and economic burden should be addressed appropriately to make it easier for patients to obtain SCS treatment. Furthermore, spinal cord stimulation may significantly affect refractory low back pain treatment and benefit clinically considering its technology and mechanism of action. Thus, this therapy will occupy a special place in future, multidisciplinary neuropathic pain management.

### References

1. Chapman KB, Groenen PS, Patel KV, Vissers KC, van Helmond N: T12 dorsal root ganglion stimulation to treat chronic low back pain: a case series. Neuromodulation. 2020, 23:203-12. 10.1111/ner.13047
2. Granville M, Berti AF, Jacobson RE: Use of spinal cord stimulation in elderly patients with multi-factorial chronic lumbar and non-radicular lower extremity pain. Cureus. 2017, 9:e1855. 10.7759/cureus.1855
3. North R, Shipley J: Practice parameters for the use of spinal cord stimulation in the treatment of chronic neuropathic pain. Pain Med. 2007, 8 Suppl 4:S200-75. 10.1111/j.1526-4637.2007.00388.x
4. Melzack R, Wall PD: Pain mechanisms: a new theory: a gate control system modulates sensory input from the skin before it evokes pain perception and response. Science. 1965, 150:971-9. 10.1126/science.150.3699.971
5. Shealy CN, Taslitz N, Mortimer JT, Becker DP: Electrical inhibition of pain: experimental evaluation. Anesth Analg. 1967, 46:299-305.
6. Linderoth B, Gazelius B, Franck J, Brodin E: Dorsal column stimulation induces release of serotonin and substance P in the cat dorsal horn. Neurosurgery. 1992, 31:289-96; discussion 296-7. 10.1227/00006123-199208000-00014
7. Carter ML: Spinal cord stimulation in chronic pain: a review of the evidence. Anaesth Intensive Care. 2004, 32:11-21. 10.1177/0310057X0403200102
8. Guan Y: Spinal cord stimulation: neurophysiological and neurochemical mechanisms of action. Curr Pain Headache Rep. 2012, 16:217-25. 10.1007/s11916-012-0260-4
9. Sivanesan E, Maher DP, Raja SN, Linderoth B, Guan Y: Supraspinal mechanisms of spinal cord stimulation for modulation of pain: five decades of research and prospects for the future. Anesthesiology. 2019, 130:651-65.
10. Song JJ, Popescu A, Bell RL, et al.: Present and potential use of spinal cord stimulation to control chronic pain. Pain physician. 2014, 17:235-46.
11. Huygen FJ, Kallewaard JW, Nijhuis H, et al.: Effectiveness and safety of dorsal root ganglion stimulation for the treatment of chronic pain: a pooled analysis. Neuromodulation. 2020, 23:213-21. 10.1111/ner.13074
12. Esposito MF, Malayil R, Hanes M, Deer T: Unique characteristics of the dorsal root ganglion as a target for neuromodulation. Pain Med. 2019, 20:S23-30. 10.1093/pm/pnz012
13. Nashold B, Somjen G, Friedman H, et al.: Paresthesias and EEG potentials evoked by stimulation of the dorsal funiculi in man. Exp Neurol. 1972, 36:273-87. 10.1016/0014-4886(72)90023-4
14. Larson SJ, Sances A Jr, Riegel DH, Meyer GA, Dallmann DE, Swiontek T: Neurophysiological effects of dorsal column stimulation in man and monkey. J Neurosurg. 1974, 41:217-23. 10.3171/jns.1974.41.2.0217
15. Stiller C-O, Linderoth B, O'Connor WT, Franck J, Falkenberg T, Ungerstedt U, Brodin E: Repeated spinal cord stimulation decreases the extracellular level of γ-aminobutyric acid in the periaqueductal gray matter of freely moving rats. Brain research. 1995, 699:231-41. 10.1016/0006-8993(95)00911-9
16. Deer T, Pope J, Hayek S, et al.: Neurostimulation for the treatment of axial back pain: a review of mechanisms, techniques, outcomes, and future advances. Neuromodulation. 2014, 17 Suppl 2:52-68. 10.1111/j.1525-1403.2012.00530.x
17. Al-Kaisy A, Palmisani S, Smith TE, et al.: Long-term improvements in chronic axial low back pain patients without previous spinal surgery: a cohort analysis of 10-kHz high-frequency spinal cord stimulation over 36 months. Pain Med. 2018, 19:1219-26. 10.1093/pm/pnx237
18. Ware JE Jr: SF-36 health survey update. Spine (Phila Pa 1976). 2000, 25:3130-9. 10.1097/00007632-200012150-00008
19. Al-Kaisy A, Van Buyten JP, Smet I, Palmisani S, Pang D, Smith T: Sustained effectiveness of 10 kHz high-frequency spinal cord stimulation for patients with chronic, low back pain: 24-month results of a prospective multicenter study. Pain Med. 2014, 15:347-54. 10.1111/pme.12294
20. De Carolis G, Paroli M, Tollapi L, et al.: Paresthesia-independence: an assessment of technical factors related to 10 kHz paresthesia-free spinal cord stimulation. Pain Physician. 2017, 20:331-41.
21. Stidd DA, Rivero S, Weinand ME: Spinal cord stimulation with implanted epidural paddle lead relieves chronic axial low back pain. J Pain Res. 2014, 7:465-70. 10.2147/JPR.S66414
22. Vallejo R, Gupta A, Cedeno DL, et al.: Clinical effectiveness and mechanism of action of spinal cord stimulation for treating chronic low back and lower extremity pain: a systematic review. Curr Pain Headache Rep. 2020, 24:70. 10.1007/s11916-020-00907-2
23. Benyamin R, Galan MV, Hatheway MJ, et al.: Options: a prospective, open-label study of high-dose spinal cord stimulation in patients with chronic back and leg pain. Pain Physician. 2020, 23:87-98.
24. Russo M, Verrills P, Mitchell B, Salmon JB, Barnard A, Santarelli DM: High frequency spinal cord stimulation at 10 kHz for the treatment of chronic pain: 6-month Australian clinical experience. Pain Physician. 2016, 19:267-80.
25. Al-Kaisy A, Van Buyten JP, Kapural L, et al.: 10 kHz spinal cord stimulation for the treatment of non-surgical refractory back pain: subanalysis of pooled data from two prospective studies. Anaesthesia. 2020, 75:775-84. 10.1111/anae.15036
26. Deckers K, De Smedt K, Mitchell B, et al.: New therapy for refractory chronic mechanical low back pain-restorative neurostimulation to activate the lumbar multifidus: one year results of a prospective multicenter clinical trial. Neuromodulation. 2018, 21:48-55. 10.1111/ner.12741
27. Kapural L, Yu C, Doust MW, et al.: Novel 10-kHz high-frequency therapy (HF10 Therapy) is superior to traditional low-frequency spinal cord stimulation for the treatment of chronic back and leg pain: the SENZA-RCT randomized controlled trial. Anesthesiology. 2015, 123:851-60. 10.1097/ALN.0000000000000774
28. Amirdelfan K, Yu C, Doust MW, et al.: Long-term quality of life improvement for chronic intractable back and leg pain patients using spinal cord stimulation: 12-month results from the SENZA-RCT. Qual Life Res. 2018, 27:2035-44. 10.1007/s11136-018-1890-8
29. Kumar K, Rizvi S: Cost-effectiveness of spinal cord stimulation therapy in management of chronic pain. Pain Med. 2013, 14:1631-49. 10.1111/pme.12146
30. North RB, Kidd D, Shipley J, Taylor RS: Spinal cord stimulation versus reoperation for failed back surgery syndrome: a cost effectiveness and cost utility analysis based on a randomized, controlled trial. Neurosurgery. 2007, 61:361-8; discussion 368-9. 10.1227/01.NEU.0000255522.42579.EA
31. Charles Odonkor M, Ruby Kwak B, Kimberly Ting M, et al.: Fantastic four: age, spinal cord stimulator waveform, pain localization and history of spine surgery influence the odds of successful spinal cord stimulator trial. Pain Physician. 2020, 23:19-30.
32. De La Cruz P, Fama C, Roth S, Haller J, Wilock M, Lange S, Pilitsis J: Predictors of spinal cord stimulation success. Neuromodulation. 2015, 18:599-602; discussion 602. 10.1111/ner.12325
33. Tanei T, Kajita Y, Maesawa S, et al.: Long-term effect and predictive factors of motor cortex and spinal cord stimulation for chronic neuropathic pain. Neurol Med Chir (Tokyo). 2018, 58:422-34. 10.2176/nmc.oa.2018-0106
34. Al-Jehani H, Essawi W, Jacques L: Duration of intra-operative stimulation as a predictor of success of spinal cord stimulation for chronic pain syndromes. Turk Neurosurg. 2012, 22:588-90. 10.5137/1019-5149.JTN.5599-11.0
35. Kumar K, Hunter G, Demeria D: Spinal cord stimulation in treatment of chronic benign pain: challenges in treatment planning and present status, a 22-year experience. Neurosurgery. 2006, 58:481-96; discussion 481-96. 10.1227/01.NEU.0000192162.99567.96
36. Simpson BA: The role of neurostimulation: the neurosurgical perspective. J Pain Symptom Manage. 2006, 31:S3-5. 10.1016/j.jpainsymman.2005.12.006
37. Simpson K, Raphael J, Stannard C, et al.: Spinal Cord Stimulation for the Management of Pain: Recommendations for Best Clinical Practice. British Pain Society, London; 2009.
38. Campbell W: Current treatment options in the management of severe pain. Prescriber. 2010, 21:23-38. 10.1002/psb.601
39. Olson KA, Bedder MD, Anderson VC, Burchiel KJ, Villanueva MR: Psychological variables associated with outcome of spinal cord stimulation trials. Neuromodulation. 1998, 1:6-13. 10.1111/j.1525-1403.1998.tb00025.x
40. Sundaraj SR, Johnstone C, Noore F, Wynn P, Castro M: Spinal cord stimulation: a seven-year audit. J Clin Neurosci. 2005, 12:264-70. 10.1016/j.jocn.2004.06.010
41. Atkinson L, Sundaraj SR, Brooker C, et al.: Recommendations for patient selection in spinal cord stimulation. J Clin Neurosci. 2011, 18:1295-302. 10.1016/j.jocn.2011.02.025

Review article
peer-reviewed

### Author Information

###### Ethics Statement and Conflict of Interest Disclosures

Conflicts of interest: In compliance with the ICMJE uniform disclosure form, all authors declare the following: Payment/services info: All authors have declared that no financial support was received from any organization for the submitted work. Financial relationships: All authors have declared that they have no financial relationships at present or within the previous three years with any organizations that might have an interest in the submitted work. Other relationships: All authors have declared that there are no other relationships or activities that could appear to have influenced the submitted work.

Review article
peer-reviewed

8.4


text:
# Rigorous version of heuristic argument for genus-degree formula?

A recent MO question about non-rigorous reasoning reminded me of something I've wondered about for some time. The genus–degree formula says that genus $g$ of a nonsingular projective plane curve of degree $d$ is given by the formula $g=(d−1)(d−2)/2$. Here is a heuristic argument for the formula that someone once told me. Take $d$ lines in general position in the plane; collectively these form a (singular) degree-$d$ curve. There are $d\choose 2$ points of intersection. Now think in terms of complex numbers and visualize each line as a Riemannian sphere. If you start with $d$ disjoint spheres and then bring them together so that every one touches every other one (deforming when necessary) then you expect the genus of the resulting surface to be ${d\choose 2}−(d−1)=(d−1)(d−2)/2$, because after you connect them together in a line with $d−1$ connections, each subsequent connection increases the genus by one.

Is there any rigorous proof of the genus–degree formula that closely follows the above line of argumentation?

A standard proof of the genus–degree formula proceeds by way of the adjunction formula. This doesn't seem to me to answer my question, but perhaps I just don't understand the adjunction formula properly?

## 2 Answers

Yes, this argument can be made rigorous. One needs three steps.

Step 1. Show that there is at least one smooth plane curve of degree $d$ with the expected genus. Essentially, the proof is given by your heuristic topological argument (deform the union of $d$ lines in general position).

Step 2. Show that if one slightly perturbs the coefficients of a homogeneous polynomial defining a smooth curve, the genus remain unchanged. This is basically a continuity argument.

Step 3. Show that the space $\mathbb{C}^{\rm nonsing}[x,\,y,\,z]_d$ of homogeneous polynomials of degree $d$ in three variables defining smooth curves is path-connected. This is because the complement of $\mathbb{C}^{\rm nonsing}[x,\,y,\,z]_d$ in $\mathbb{C}[x,\,y,\,z]_d$ (the so-called "discriminant locus") has real codimension $2$.

Putting these three steps together one easily obtains the desired result. For further details you can look at Chapter 4 of Kirvan's book Plane algebraic curves.

• More details than Kirwan gives, are in chap. 6 of C.T.C.Wall's book, Singular Points of Plane curves. The essential point in making step 1 rigorous is to describe the topology of the Milnor fiber, a neighborhood of the singular point, on a nearby smooth curve. It is a smooth connected manifold with as many boundary components as the singularity has local branches, and first homology of rank equal to the Milnor number, which is 1 for a transverse union of lines. Hence indeed smoothing the node replaces it by plumbing in a cylinder, as expected. Step 2 is implied by Ehresmann's theorem. – roy smith Jun 9 '14 at 19:10

Of course it seems you meant topological genus, but here is a similar argument for the arithmetic genus, that I learned from a paper of Fulton. Maybe this is related to the adjunction argument you refer to. And if you combine this with Francesco's answer, you get a proof that the two are equal for smooth plane curves, (or if you assume that result, the Hirzebruch-Riemann-Roch theorem for curves, then you get an answer to your question).

Lemma A: If $X,Y$ are two curves on a smooth surface $S$, and if $X,Y$ are linearly equivalent as divisors on $S$, then $\chi(\mathcal{O}_X) = \chi(\mathcal{O}_Y)$.

Remark: This says in some sense $\chi(\mathcal{O})$ is a deformation invariant, at least for linear deformations.

Proof: Since the line bundles $\mathcal{O}_S(-X)$ and $\mathcal{O}_S(-Y)$ are isomorphic on $S$, the invariants $\chi(\mathcal{O}_S(-X))$ and $\chi(\mathcal{O}_S(-Y))$ are equal. By the usual exact sheaf sequence $$0\to \mathcal{O}_S(-X)\to \mathcal{O}_S\to \mathcal{O}_X\to 0$$ and the analogous one for $Y$, plus the additivity of $\chi$, we get that \begin{align} \chi(\mathcal{O}_X) &= \chi(\mathcal{O}_S) - \chi(\mathcal{O}_S(-X)) \\ &= \chi(\mathcal{O}_S) - \chi(\mathcal{O}_S(-Y)) \\ &= \chi(\mathcal{O}_Y).\hspace{1cm}&\text{qed.}\end{align}

Lemma B: Now suppose that $Y, Y'$ are curves on a smooth surface $S$, and that $Y$ and $Y'$ meet transversely at precisely $n$ points. Then we claim $\chi(\mathcal{O}_{Y+Y'}) = \chi(\mathcal{O}_Y) + \chi(\mathcal{O}_{Y'}) - n.$

Proof: Consider the sequence $$0\to \mathcal{O}_{Y+Y'}\to \mathcal{O}_Y + \mathcal{O}_{Y'}\to O_{Y\cdot Y'}\to 0,$$ induced by the map from the disjoint union of $Y,Y'$, to their union $Y+Y'$ on $S$, and where the map to $\mathcal{O}_{Y\cdot Y'}$ is the difference of the two restrictions, from $Y$ and from $Y'$, to the intersection of $Y$ and $Y'$. The additivity of $\chi$ then implies the desired relation, i.e. \begin{align} \chi(\mathcal{O}_Y) + \chi(\mathcal{O}_Y') &= \chi(\mathcal{O}_Y + \mathcal{O}_{Y'}) \\ &= \chi(\mathcal{O}_{Y+Y'}) + \chi(\mathcal{O}_{Y\cdot Y'}) \\ &= \chi(\mathcal{O}_{Y+Y'}) + n. \end{align} Thus $\chi(\mathcal{O}_{Y+Y'}) = \chi(\mathcal{O}_Y) + \chi(\mathcal{O}_{Y'}) - n.$ qed.

Now that we know how the function chi(O) behaves under linear degeneration, all we need is to find a formula that behaves this way, and it must be the formula for $chi(\mathcal{O})$.

Corollary: If $X$ is a smooth plane curve of degree $d$, then $\chi(\mathcal{O}_X) = 1 - \frac12 (d-1)(d-2).$

Proof: Induction on $d$. If $d = 2$, then the smooth conic $X$ moves in a linear series also containing a union $Y$ of two lines $Y_1 + Y_2$, where each line is isomorphic to $X$. Then by lemmas A,B above, we have $$\chi(X) = \chi(Y_1)+\chi(Y_2) - 1 = \chi(X)+\chi(X)-1,$$ hence $\chi(X) = 1$. This proves the case $d = 2$, and since a smooth curve of degree $d = 1$ is isomorphic to one of degree 2, we also obtain the formula for degree $d=1$.

Now assume $d \geq 3$ and that we have proved the formula for smooth curves of degree $<d$. A smooth degree-$d$ curve $X$ moves in a linear series that also contains a curve of form $Y = Y_1+Y_2,$ where $Y_1$ is smooth of degree $d-1$, and $Y_2$ is a line meeting $Y_1$ transversely in $d-1$ distinct points. Then lemmas A, B and induction give us that \begin{align} \chi(\mathcal{O}_X) &= \chi(\mathcal{O}_Y) \\ &= \chi(\mathcal{O}_{Y_1})+\chi(O_{Y_2})-(d-1) \\ &= 1-\frac12 (d-2)(d-3) + 1 - (d-1) \\ &= 1-\frac12 (d-1)(d-2),\end{align} as desired. qed.


text:
Probability question (Birthday problem)

I was wondering if someone could critique my argument here. The problem is to find the probability where exactly 2 people in a room full of 23 people share the same birthday.

My argument is that there are 23 choose 2 ways times $\displaystyle \frac{1}{365^{2}}$ for 2 people to share the same birthday. But, we also have to consider the case involving 21 people who don't share the same birthday. This is just 365 permute 21 times $\displaystyle \frac{1}{365^{21}}$. To summarize:

$$\binom{23}{2} \frac{1}{365^2} \frac{1}{365^{21}} P\binom{365}{21}$$

-
The idea is good. We need to choose the $2$ people. Then we need to choose a birthday for them. Then we need to choose different birthdays for the others. The numerator will be a little different from yours, we need to choose different birthdays for $22$ "people," our birthday pair and the other people. The denominator is right. –  André Nicolas May 3 '12 at 4:17
Why are you multiplying by $1/365^2$? Are you trying to count (as your use of "there are .... ways..." suggests) or probability? And are you taking into account that among the other 21 people two may share the same birthday, though not have it the same day as the two you selected to begin with? I don't understand your throught process... –  Arturo Magidin May 3 '12 at 4:17
My thinking is that there are 23 people and each have a probability of $\frac{1}{365}$ of sharing the same birthday if I want 2, then I would have to pick 2 people from that group of 23. That is the reason why I multiplied $\frac{1}{365}$ by $\binom{23}{2}$. My calculation for the other 21 people takes into account that every person has a different birthday from the other. Andre seems to think I should consider 22 people and not 21 for the numerator. I've got to think... –  Low Scores May 3 '12 at 4:27
@LowScores: You seem to be trying to both count and compute probabilities at the same time. Can't really do that. It's also false that "there are 23 people and each has a probability of 1/365 of sharing the same birthday". Sharing the same birthday with whom? Again: are you trying to count the number of ways in which exactly two people can share a birthday (so that then you can compute probability as "number of good cases"/"number of total cases", or are you trying to compute probability along the way? It might be simpler if you first count, and then you compute probability. –  Arturo Magidin May 3 '12 at 4:33
@LowScores If you are counting the number of ways to get just one match then as Andre Nicolas said, you need to count the number of ways to get one match, but then also make sure there are no other matches by having the rest not be matching. –  yiyi May 3 '12 at 4:52

The basic idea was right, and a small modification is enough.

Line up the people in some arbitrary order. There are, under the usual simplifying assumption that the year has $365$ days, $365^{23}$ possible birthday sequences. Under the usual assumptions of independence, and that all birthdays are equally likely, all these sequences are equally likely. The assumption "equally likely" is not correct, though it is more correct for people than for eagles.

Now we count how many ways we can have precisely $2$ people have the same birthday, with everybody else having a different birthday, meaning different from each other and also different from the birthday of our birthday couple.

The couple can be chosen in $\binom{23}{2}$ ways. For each of these ways, the couple's birthday can be chosen in $365$ ways. And the birthdays of the others can be chosen in what is sometimes called $P(364,21)$ ways. (I have always avoided giving it a name.) So the number of birthday assignments that satisfy our condition is $$\binom{23}{2}(365)P(364,21), \quad\text{that is,}\quad \binom{23}{2}(365)(364)(363)\cdots (344).$$ For the probability, divide by $(365)^{23}$.

Remark: Or else argue this way, which may be closer in spirit to your thinking. Pick two people, $i$ and $j$. What is the probability these two have the same birthday, and all other birthdays are different from this one, and different from each other? Whatever $i$'s birthday is, the probability that $j$'s matches it is $\frac{1}{365}$. By the usual birthday argument, the probability that the birthdays of the other people are different, and different from the birthdays couple's, is $$\frac{364}{365}\frac{363}{365}\frac{363}{365}\cdots\frac{344}{365}.$$ Multiply the above expression by $\frac{1}{365}$. Finally, sum the result over the $\binom{23}{2}$ ways to choose $i$ and $j$, that is, multiply by $\binom{23}{2}$.

-

This question has been asked in more ways than there are Buddhas. Try looking here http://math.stackexchange.com/search?q=birthday+problem


text:
<img src="https://d5nxst8fruw4z.cloudfront.net/atrk.gif?account=iA1Pi1a8Dy00ym" style="display:none" height="1" width="1" alt="" />
Our Terms of Use (click here to view) have changed. By continuing to use this site, you are agreeing to our new Terms of Use.

# Algebra Expressions with Fraction Bars

## Evaluate the numerator, evaluate the denominator, then simplify

Estimated26 minsto complete
%
Progress
Practice Algebra Expressions with Fraction Bars

MEMORY METER
This indicates how strong in your memory this concept is
Progress
Estimated26 minsto complete
%
Algebra Expressions with Fraction Bars

### Expressions Involving Fraction Bars

Fraction bars count as grouping symbols for PEMDAS, so we evaluate them in the first step of solving an expression. All numerators and all denominators can be treated as if they have invisible parentheses around them. When real parentheses are also present, remember that the innermost grouping symbols come first. If, for example, parentheses appear on a numerator, they would take precedence over the fraction bar. If the parentheses appear outside of the fraction, then the fraction bar takes precedence.

#### Evaluating Expressions

Use the order of operations to evaluate the following expression: \begin{align*}\frac { z + 3 } { 4 } - 1\end{align*} when \begin{align*}z = 2\end{align*}

We substitute the value for \begin{align*}z\end{align*} into the expression.

\begin{align*} \frac { 2 + 3 } { 4 } - 1\end{align*}

Although this expression has no parentheses, the fraction bar is also a grouping symbol, it has the same effect as a set of parentheses. We can write in the “invisible parentheses” for clarity:

\begin{align*} \frac { (2 + 3) }{ 4 } - 1\end{align*}

Using PEMDAS, we first evaluate the numerator, 2 + 3 = 5. Now we have:

\begin{align*}\frac { 5 } { 4 } - 1\end{align*}

We can convert \begin{align*} \frac { 5 } { 4 }\end{align*} to a mixed number:

\begin{align*} \frac { 5 } { 4 } = 1 \frac{1}{4}\end{align*}

Then evaluate the expression:

\begin{align*}\frac{5}{4}-1=1\frac{1}{4}-1=\frac{1}{4}\end{align*}

#### Evaluating Multi-Variable Expressions

Use the order of operations to evaluate the expression \begin{align*}\left ( \frac{ a + 2 } { b + 4 } - 1 \right ) + b\end{align*} when \begin{align*}a = 3\end{align*} and \begin{align*}b = 1.\end{align*}

Substitute the given values for \begin{align*}a\end{align*} and \begin{align*}b\end{align*} into the expression:

\begin{align*} \left ( \frac { 3 + 2 } { 1 + 4 } - 1 \right ) + 1\end{align*}

This expression effectively has nested parentheses (remember the effect of the fraction bar). The innermost grouping symbol is provided by the fraction bar. Evaluate the numerator \begin{align*}(3 + 2) = 5\end{align*} and denominator \begin{align*}(1 + 4) = 5\end{align*} first:

\begin{align*}\left ( \frac { 3 + 2 } { 1 + 4 } +1 \right ) + 1 \\ = \left ( \frac { 5 } { 5 } - 1 \right ) + 1 \qquad \text{Now evaluate inside the parentheses. First, divide.}\\ = (1 - 1) + 1 \qquad \quad \text{Next, subtract.}\\ = 0 + 1 = 1\end{align*}

#### Using a Graphing Calculator

Use a graphing calculator to evaluate the expression \begin{align*} \frac { 3x^2 - 4y^2 + x^4 } { (x + y)^\frac { 1 } { 2 }}\end{align*} for \begin{align*}x = 2, \ y = -1.\end{align*}

License: CC BY-NC 3.0

Store the values of \begin{align*}x\end{align*} and \begin{align*}y\end{align*}: 2 [STO] \begin{align*}x\end{align*}, -1 [STO] \begin{align*}y\end{align*}. (The letters \begin{align*}x\end{align*} and \begin{align*}y\end{align*} can be entered using [ALPHA] + [KEY].) Input the expression in the calculator. When an expression includes a fraction, be sure to use parentheses: \begin{align*}\frac{(\text{numerator})}{(\text{denominator})}\end{align*}.

Press [ENTER] to obtain the answer, \begin{align*}24\end{align*}.

### Example

#### Example 1

Use the order of operations to evaluate the expression \begin{align*}2 \times \left ( \frac { w + (x - 2z) } {(y + 2)^2} - 1 \right )\end{align*} when \begin{align*}w = 11, \ x = 3, \ y = 1, \end{align*} and \begin{align*}z = -2.\end{align*}

Substitute the values for \begin{align*}w, \ x, \ y,\end{align*} and \begin{align*}z\end{align*} into the expression:

\begin{align*} 2 \times \left ( \frac { 11 + (3 - 2(-2)) } { (1 + 2)^2 } - 1 \right )\end{align*}

This complicated expression has several layers of nested parentheses. One method for ensuring that we start with the innermost parentheses is to use more than one type of parentheses. Working from the inside, we leave the innermost grouping symbols as parentheses \begin{align*}\left( \ \right)\end{align*}. Next will be the “invisible brackets” from the fraction bar, write these as \begin{align*}\left[ \ \right]\end{align*}. The third level of nested parentheses will be the braces \begin{align*}\left\{ \ \right\}\end{align*}. Leave negative numbers in regular parentheses.

\begin{align} & 2 \times \left \{ \frac {\left[ 11 + \left( 3 - 2 \left(-2 \right) \right) \right] } { \left [ \left( 1 + 2 \right) ^2 \right ] } - 1 \right \} \qquad \ \ \ \text{Start by evaluating the parentheses.} \\ & \qquad \qquad \qquad \qquad \qquad \qquad \qquad \ \ \left (3 - 2(-2)\right ) = 3 + 4 = 7 \ : \ \left (1 + 2\right ) = 3\\ & = 2 \left \{ \frac{ [11 + 7] } { [3^2] } - 1 \right \} \qquad \qquad \qquad \text{Next, evaluate the square brackets.}\\ & = 2 \left \{ \frac { 18 } { 9 } - 1 \right \} \qquad \qquad \qquad \qquad \ \ \text{Now evaluate the braces. Start with division.}\\ & = 2 \{2 - 1 \} \qquad \qquad \qquad \qquad \qquad \text{Finally, do the addition and subtraction.}\\ & = 2 \{ 1\} = 2\\ \end{align}

### Review

For 1-3, use the order of operations to evaluate the expressions.

1. \begin{align*}\frac {2 \cdot (3 + (2 - 1)) } { 4 - (6 + 2) } - (3 - 5)\end{align*}
2. \begin{align*}\frac { 4 + 7(3) } { 9 - 4 } + \frac { 12 - 3 \cdot 2 } { 2 }\end{align*}
3. \begin{align*}\frac { (2^2 + 5)^2} { 5^2 - 4^2} \div (2 + 1)\end{align*}

For 4-9, evaluate the expressions by substituting for the variables.

1. \begin{align*}\frac { jk } { j + k }\end{align*} when \begin{align*}j = 6\end{align*} and \begin{align*}k = 12\end{align*}
2. \begin{align*}\frac{ x + y^2 } { y - x }\end{align*} when \begin{align*}x = 2\end{align*} and \begin{align*}y = 3\end{align*}
1. \begin{align*}\frac{ 4x } { 9x^2 - 3x + 1}\end{align*} when \begin{align*}x = 2\end{align*}
2. \begin{align*}\frac { z^2 } { x + y } + \frac{ x^2 } { x - y }\end{align*} when \begin{align*}x = 1, \ y = -2,\end{align*} and \begin{align*}z = 4\end{align*}
3. \begin{align*}\frac { 4xyz } { y^2 - x^2 }\end{align*} when \begin{align*}x = 3, \ y = 2,\end{align*} and \begin{align*}z = 5\end{align*}
4. \begin{align*}\frac { x^2 - z^2 } { xz - 2x(z - x)}\end{align*} when \begin{align*}x = -1 \end{align*} and \begin{align*}z = 3\end{align*}

For 10-14, evaluate each expression using a graphing calculator.

1. \begin{align*}x^2 + 2x - xy\end{align*} when \begin{align*}x = 250\end{align*} and \begin{align*}y = -120\end{align*}
2. \begin{align*}(xy - y^4)^2\end{align*} when \begin{align*}x = 0.02\end{align*} and \begin{align*}y = -0.025\end{align*}
3. \begin{align*}\frac { x + y - z } { xy + yz + xz }\end{align*} when \begin{align*}x = \frac { 1 } { 2 }, \ y = \frac{3}{2},\end{align*} and \begin{align*}z = -1 \end{align*}
4. \begin{align*}\frac{(x + y)^2}{4x^2 - y^2}\end{align*} when \begin{align*}x = 3\end{align*} and \begin{align*}y = -5\end{align*}
5. \begin{align*}\frac{(x - y)^3}{x^3 - y} + \frac{(x + y)^2}{x + y^4}\end{align*} when \begin{align*}x = 4\end{align*} and \begin{align*}y = -2\end{align*}

### Review (Answers)

To view the Review answers, open this PDF file and look for section 1.5.

### Notes/Highlights Having trouble? Report an issue.

Color Highlighted Text Notes
Please to create your own Highlights / Notes
Show More

### Vocabulary Language: English

Fraction Bar

A fraction bar is a line used to divide the numerator and the denominator of a fraction. The fraction bar means division.

Order of Operations

The order of operations specifies the order in which to perform each of multiple operations in an expression or equation. The order of operations is: P - parentheses, E - exponents, M/D - multiplication and division in order from left to right, A/S - addition and subtraction in order from left to right.

Parentheses

Parentheses "(" and ")" are used in algebraic expressions as grouping symbols.

PEMDAS

PEMDAS (Please Excuse My Daring Aunt Sally) is a mnemonic device used to help remember the order of operations: Parentheses, Exponents, Multiplication/Division, Addition/Subtraction.

### Image Attributions

1. [1]^ License: CC BY-NC 3.0

### Explore More

Sign in to explore more, including practice questions and solutions for Algebra Expressions with Fraction Bars.
Please wait...
Please wait...


text:
# C code problem

Figured this forum might be able to help more than the homework help, if not, feel free to redirect.

I'm writing a program that calculates Blood Alcohol Content from various input the user gives (nothing fancy, straight forward simple calculation, prompting user for data, that sort of thing).

However it is doing something weird, and I cannot figure out for the life of me why it is doing this. The code is:

#include<stdio.h>

#define POUNDS_PER_KILO 2.2406
#define OZ_ALCOHOL_PER_DRINK 0.54
#define PERCENT_WATER_MALE 0.58
#define PERCENT_WATER_FEMALE 0.49
#define GRAMS_ALC_PER_OZ 23.36
#define PERCENT_WATER_BLOOD 0.806
#define METABOLISM_RATE 0.012

int main(void)
{

float numDrinks, weight, bac, mlWater, gramsAlc, alcPerMlWater, alcPerMlBlood, timeDrinking;
char gender = 'c';

printf("Welcome to the Percent Blood Alcohol Calculator!\n\n");
printf("Enter the number of drinks you've had so far: ");
scanf("%f", &numDrinks);

printf("How many hours ago did you start drinking: ");
scanf("%f", &timeDrinking);

while((gender!='m')&&(gender!='M')&&(gender!='f')&&(gender!='f')) {
printf("Enter your gender(m or f): ");
scanf("%c", &gender);
}

printf("How much do you weigh (yes, your real weight): ");
scanf("%f", &weight);

if (gender == 'M' || gender == 'm') {
mlWater = weight/POUNDS_PER_KILO * PERCENT_WATER_MALE*1000;
}else if(gender=='F' || gender == 'f') {
mlWater = weight/POUNDS_PER_KILO * PERCENT_WATER_FEMALE*1000;
}

gramsAlc = numDrinks*OZ_ALCOHOL_PER_DRINK*GRAMS_ALC_PER_OZ;
alcPerMlWater = gramsAlc / mlWater;
alcPerMlBlood = alcPerMlWater * PERCENT_WATER_BLOOD;
bac = alcPerMlBlood * 100;
bac = bac - METABOLISM_RATE * timeDrinking;

printf("\n**Discalimer: The information from this calculator is only an estimate**\n");
printf(" In fact, you're probably not the least bit inebriated, go have five more.\n");

return 0;
}
The output is:

Welcome to the Percent Blood Alcohol Calculator!

Enter the number of drinks you've had so far: 5

How many hours ago did you start drinking: 1

How much do you weigh (yes, your real weight): 150

**Discalimer: The information from this calculator is only an estimate**
What i can't figure out is why its printing that message (in bold) twice. I've checked the loop that prints that part in the code(also bolded) and have no idea what is wrong with it.

Related Computing and Technology News on Phys.org
Are you piping this info into the program?
If so there might be a whitesapce or a incorect return char after you timeDrinking.

In any case it looks like there is somethign waitin gon the buffer for you that is not m, M, F,f.

Less likely answer is if you are typing it in by hand that the concole you are using uses a return char that is not regonized by scanf.

Find out what is there on the buffer by:
Code:
 while((gender!='m')&&(gender!='M')&&(gender!='f')&&(gender!='f')) {
printf("Enter your gender(m or f): ");
scanf("%c", &gender);
printf("Test output buffer char: %c %i \n",gender,gender);
}
That will at least tell you what is on the buffer.

I should have clarified, when it prints that bolded line, it only prompts me once, its prints both statements as one.

I initialised gender when i declared so that it was 'c', so the loop would run once for sure, and keep running until a proper input was given. But it double prints the prompt for some reason.

Right, probably because something is on the buffer before it enters the loop.

Then the program prints out your question. Scanf reads form the buffer and finds something, but it is not m,M,f,F so the loop runs again but this time the buffer is empty so it waits for your input.

This is just a guess btw.

Ok, i added that line like you suggested and the output becomes:

Welcome to the Percent Blood Alcohol Calculator!

Enter the number of drinks you've had so far: 5
How many hours ago did you start drinking: 1
Enter your gender(m or f): Test output buffer char
10
Enter your gender(m or f): m
Test output buffer char m 109

How much do you weigh (yes, your real weight): 150

**Discalimer: The information from this calculator is only an estimate**
For some reason its not initialising gender correctly, since its supposed to be initialised to 'c' which is not 10(it should be 99). In fact, its initialising gender as a newline character....hmmm....Any idea why?

I was right something is on the buffer waiting for scanf.

The 10 is not inside the gender variable, it is in the input buffer. The buffer holds the input from the keyboard and other sources, then you program reads from the buffer to get its input.

You have two options, try and track down the source of the random char on the buffer, or if it is always something off the alphabet chart, just If statement out the printf statement when it is not in the correct range.

Question is it 10 each time? Or does it change each time you run the program?

Davorak said:
I was right something is on the buffer waiting for scanf.

The 10 is not inside the gender variable, it is in the input buffer. The buffer holds the input from the keyboard and other sources, then you program reads from the buffer to get its input.

You have two options, try and track down the source of the random char on the buffer, or if it is always something off the alphabet chart, just If statement out the printf statement when it is not in the correct range.

Right, the 10 is not the gender variable, but the newline character right before it is. So what's happening is the previous scanf for weight, reads in the weight, but then went i hit enter the newline character gets passed to the next scanf, so i need to do something to prevent that....

If i enter 1m for the time drinking, it reads the m into gender and jumps right out of the loop. So for some reason, whatever i enter immediately after the time drinking gets passed to scanf....

Davorak said:
Question is it 10 each time? Or does it change each time you run the program?
10 is the ASCII code for a newline. And it is 10 each time.

Sounds like you just need to burn the newline then.

scanf(%c,&gender);

while(...

It also sounds like two spreate return chars are being used by the console and scanf only burns the first of the two. I think they are called newline and the return carriage. The console is putting them both in the buffer while scanf only expects there to be one.

I fixed the problem.

Rather than trying to stop it from running the loop twice unnecessarily, i just pulled the printf statement that prompted the user out of the loop, so that no matter how many times the loop is run the prompt only appear once. So when the newline char gets passed to scanf and the loop runs a second time it is invisible to the user.

So it willl not reask the quesiton if the user enters in the wrong input?

j
k
l
m

How much do you weigh (yes, your real weight):

Something like that?

It is also odd that it is not ignored in the first place scanf is supposed to ignore leading newlinesk, whitespaces, and carriage.

What library are you useing?
Are using the command console? I would assume with windows nt or higher?

All you have to do is add a getchar() to your while loop (in your original program), like this:

Code:
while((gender!='m')&&(gender!='M')&&(gender!='f')&&(gender!='f')) {
getchar();
printf("Enter your gender(m or f): ");
scanf("%c", &gender);
}
Your problem is each time the user enters a response (ended by a newline) to a question, scanf leaves the newline character in the buffer. On the next call to scanf, if scanf is looking for a number it discards that newline & keeps looking (and takes the number that the user enters). But in the while loop, scanf is looking for a char, so it simply accepts that leftover newline as the response & stores that as the value of gender. Adding getchar() soaks up and discards the extra newlines.

Davorak said:
So it willl not reask the quesiton if the user enters in the wrong input?

j
k
l
m

How much do you weigh (yes, your real weight):

Something like that?
Exactly.

It is also odd that it is not ignored in the first place scanf is supposed to ignore leading newlinesk, whitespaces, and carriage.

What library are you useing?
Are using the command console? I would assume with windows nt or higher?
Gcc-3.3.4, on Linux.

I don't do any work for anything in windows. Not voluntarily anyway.

This will correct the problem!

#include<stdio.h>

#define POUNDS_PER_KILO 2.2406
#define OZ_ALCOHOL_PER_DRINK 0.54
#define PERCENT_WATER_MALE 0.58
#define PERCENT_WATER_FEMALE 0.49
#define GRAMS_ALC_PER_OZ 23.36
#define PERCENT_WATER_BLOOD 0.806
#define METABOLISM_RATE 0.012

int main(void)
{

float numDrinks, weight, bac, mlWater, gramsAlc, alcPerMlWater, alcPerMlBlood, timeDrinking;
char gender = 'c';

printf("Welcome to the Percent Blood Alcohol Calculator!\n\n");
printf("Enter the number of drinks you've had so far: ");
scanf("%f", &numDrinks);

printf("How many hours ago did you start drinking: ");
scanf("%f", &timeDrinking);

printf("Enter your gender(m or f): ");
while((gender!='m')&&(gender!='M')&&(gender!='f')&&(gender!='F')) {

scanf("%c", &gender);
}

printf("How much do you weigh (yes, your real weight): ");
scanf("%f", &weight);

if (gender == 'M' || gender == 'm') {
mlWater = weight/POUNDS_PER_KILO * PERCENT_WATER_MALE*1000;
}else if(gender=='F' || gender == 'f') {
mlWater = weight/POUNDS_PER_KILO * PERCENT_WATER_FEMALE*1000;
}

gramsAlc = numDrinks*OZ_ALCOHOL_PER_DRINK*GRAMS_ALC_PER_OZ;
alcPerMlWater = gramsAlc / mlWater;
alcPerMlBlood = alcPerMlWater * PERCENT_WATER_BLOOD;
bac = alcPerMlBlood * 100;
bac = bac - METABOLISM_RATE * timeDrinking;

printf("\n**Discalimer: The information from this calculator is only an estimate**\n");
printf(" In fact, you're probably not the least bit inebriated, go have five more.\n");

return 0;
}

What did you change asher. You have "printf("Enter your gender(m or f): ");" out side of the loop, but franznietzsche already did that.

Did you guys read post #13?

One solution is to use a character string. Instead of
...
scanf("%c", &gender);
....

I would declare 'gender' to be a string, and then test

char gender[10];

....

do {
printf("Enter your gender(m or f): ");
scanf("%s", &gender);
}
while((gender[0]!='m')&&(gender[0]!='M')&&(gender[0]!='f')&&(gender[0]!='F'))

I believe the more elegant alternative is to use getchar() and echo the output, like so:
do {
printf("Enter your gender(m or f): ");
gender = getchar();
printf(gender);
}
while((gender!='m')&&(gender!='M')&&(gender!='f')&&(gender!='F'))

getchar() avoids having to deal with a newline, as it returns as soon as a key is pressed.

gnome said:
Did you guys read post #13?

Yes. And i liked that idea more than moving the prompt out of the loop, but i had submitted it already.


text:
# Thread: Sigma X Squared = 330 find value of X

1. ## Sigma X Squared = 330 find value of X

I have a quesion and the answer im not sure how they have got to the answer can anyone help?

E = Denotes sigma

Ey = 555.10
Ex Squared = 330
Eysquared = 61,627,40
Exy = 4,442.15

The value of x = 40 how do you get to this answer?

Thanks

2. Originally Posted by jasoncfc
I have a quesion and the answer im not sure how they have got to the answer can anyone help?

E = Denotes sigma

Ey = 555.10
Ex Squared = 330
Eysquared = 61,627,40
Exy = 4,442.15

The value of x = 40 how do you get to this answer?

Thanks
"The value of x = 40" makes no sense. Please post the whole question exactly as it's written from wherever you got it from.

,

,

,

### (Sigmax)square

Click on a term to search for related topics.


text:
# How to integrate with reduction formula?

$$\begin{array}{|c|c|} \hline \text{Integral} & \text{Reduction formula} \\ \hline\displaystyle I_{m,n}=\int\sin^max\cos^nax\,\mathrm dx & I_{m,n}=\begin{cases}-\tfrac{\sin^{m-1}ax\cos^{n+1}ax}{a(m+n)}+\tfrac{m-1}{m+n}I_{m-2,n}\\\tfrac{\sin^{m+1}ax\cos^{n-1}ax}{a(m+n)}+\tfrac{n-1}{m+n}I_{m,n-2}\end{cases} \\ \hline \end{array}$$

How to integrate $(\cos x)^n\cdot(\sin x)^m$ with reduction formula. The actual steps please in terms of $(n-2,m)$ and in terms of $(n, m-2)$ like in the table shown. I'm stuck halfway.

Thanks

• Click enter image description here to view the picture Thanks – Natalia Dec 14 '15 at 12:34
• please be more precise about where exactly you are stuck (in the wikipedia article I guess). – Surb Dec 14 '15 at 12:44
• – Lucian Dec 14 '15 at 14:29
• @Surb I don't know how to integrate from the beginning. I don't understand how to integrate this equation since there are sin and cos but i understand how to integrate sin^n(x). Pls help I tried so long to understand but I cant. @ Lucian I read it but I don't understand Thanks – Natalia Dec 16 '15 at 12:13
• Are you familiar with integration by parts? – Simon Jan 2 '16 at 3:17

Consider the example with $m = 3$ and $n= 2$.

We have,

$$I_{m,n} = I_{3,2} = \int \sin^3(ax)\cos^2(ax) \,d x= -\frac{\sin^{3-1}(ax)\cos^{2 + 1}(ax)}{a(3 + 2)} + \frac{3-1}{3 + 2}I_{1,2}.$$

Here I have applied the first reduction formula. I have not reduced the result far enough to be complete. However, I can now continue until the $I_{1,2}$ term disappears. Maybe apply the second reduction next?

Every example would proceed in this way. You must iteratively apply the formula until the integral dissapears or becomes one that you know how to handle.

As an aside for $m \ge 3$ you can also make use of the identity $\sin^2(x) + \cos^2(x) = 1$,

$$\int sin^m(ax) \,d x = \int \sin^{m-2}(ax)(1-\cos^2(ax)) \,d x .$$

In addition, the double-angle substitutions can be useful as well.

These are $$\cos^2(x) = \frac{1}{2}(1 + \cos(2x))$$ and $$\sin^2(x) = \frac{1}{2}(1 - \cos(2x)).$$


text:
## Advanced Studies in Pure Mathematics

### A proof of a conjecture of Degtyarev on non-torus plane sextics

#### Abstract

A $\mathbb{D}_{10}$-sextic is an irreducible sextic $C \subset \mathbb{CP}^2$ with simple singularities such that the fundamental group $\pi_1 (\mathbb{CP}^2 \setminus C)$ factors to the dihedral group $\mathbb{D}_{10}$. A $\mathbb{D}_{10}$-sextic is not of torus type. In this paper, we show that if $C$ is a $\mathbb{D}_{10}$-sextic with the set of singularities $4\mathbf{A}_4$ or $4\mathbf{A}_4 \oplus \mathbf{A}_1$, then $\pi_1 (\mathbb{CP}^2 \setminus C)$ is isomorphic to $\mathbb{D}_{10} \times \mathbb{Z}/3\mathbb{Z}$. This positively answers a conjecture by Degtyarev.

#### Article information

Dates
Revised: 30 May 2008
First available in Project Euclid: 28 November 2018

https://projecteuclid.org/ euclid.aspm/1543448014

Digital Object Identifier
doi:10.2969/aspm/05610109

Mathematical Reviews number (MathSciNet)
MR2604079

Zentralblatt MATH identifier
1193.14039

#### Citation

Eyral, Christophe; Oka, Mutsuo. A proof of a conjecture of Degtyarev on non-torus plane sextics. Singularities — Niigata–Toyama 2007, 109--131, Mathematical Society of Japan, Tokyo, Japan, 2009. doi:10.2969/aspm/05610109. https://projecteuclid.org/euclid.aspm/1543448014


text:
# How do you multiply using the distributive property (13)6?

Apr 3, 2018

$78$

#### Explanation:

Using the distributive property, you multiply the number/variable outside of a parenthesis to everything inside it. You "distribute" the outside value" to each of the insides.

In this scenario, you have $6 \left(13\right)$, so you multiply the $6$ to the $13$.

So the answer is $78$.

Hope this helps!


text:
# More on 18% Gray

I’m not quite sure what got me going on 18% gray. I suppose it might have been the association with Ansel Adams, who obviously knew what he was doing, and the notion that 18% and 50% were not equal. I mean, how could they say that 18% gray was the same as 50% gray; where did that come from?

Of course, in Photoshop, one of the built-in options for filling a layer is 50% gray; and there didn’t seem to be anything off the wall about that. Then, I watched Dean Collin’s “On Lighting” DVD; and much of what he had to say about photographic lighting began with the concept of metering off an 18% gray card. He frequently referred to the apparent issue that, if 18% gray was the mid-value of exposure, then 1-stop up was 36%, 2-stops up were 72%, and 3-stops up blew the image. That seemed pretty simple, and yet contradicted the core of Adam’s Zone System, which had 4 or 5 stops up and down from Zone V. How could Adams be so wrong? Or was Dean Collins wrong? Both have exceptional reputations as photographers, so what was I missing?

So, I got to googling around and came across Thom Hogan on Meters Don’t See 18% Gray and that just added even more confusion. After all, if I couldn’t see how 18% matched up with 50%, then all of the other ideas that maybe it was really 12% or 14% or something instead didn’t really clear anything up.

In my mind, there was a fairly simple binary sequence associated with doubling anything, light, apertures, exposures, whatever. It went like this:

1 2 4 8 16 32 64 128 512 1024 and so on, up to 2 to the power 10.

There is certainly nothing obvious about 18% in this sequence. However, if you take the mid-stop values in this sequence, you get

1.4 2.8 5.6 11.3 22.6 45.2 90.5 181 362 724

and at least the initial values will be familiar to any photographer from lens aperture settings.

Now, if you express this sequence as a percentage of the maximum value of 1024, you get

0.14% 0.28% 0.57% 1.1% 2.3% 4.5% 9.1% 18% 36% 72%

Well, isn’t that interesting… There is the exact upper end to the sequence that Dean Collins was talking about, and 18% is there as clear as day. However, it’s in the wrong place since in this sequence it would have to be the middle of Zone VII not Zone V. In short, if cameras worked along the lines of this sequence, you couldn’t help but blow out the highlights on every shot.

So, I finally went to the source and got a copy of Ansel Adams’ The Negative. My humble copy is the 14th paperback edition, printed 2008. On page 33, Adams writes that the “18% reflectance value is mathematically a middle gray on a geometric scale from ‘black’ to ‘white,’ and it is this value that the meter is calibrated to reproduce in the final print….” Well this is just dead wrong.

The geometric mean of two numbers is the square root of their product (you can google this.) So if black is 0 and white is 1, the geometric mean is badly defined [it’s just 0, which gets you nowhere.] So, for Adams claim to make any sense, black can’t be 0. It’s possible to come up with arbitrary values for black and white that will give you a geometric mean of 18%, but minor changes to those values will give very different results.

One can also come up with a way to pick an offset from 0 and 1 that yields 0.18 as the geometric mean. If we set x to be black and (1 – x) to be white, then we want their product to be $0.18^2$, so the equation to solve is $x (1-x) = 0.18^2$. This is a quadratic equation that’s easy to solve and x is 0.033. The result is that if we define black as 3.3% and white as 96.7%, we’ll get a geometric mean at 18%; but that’s extremely arbitrary. Besides, move black to 2% and white to 98% and the geometric mean shifts to 14%, so the arbitrary game isn’t even very stable. The results of this approach aren’t satisfying at all.

On page 55 of my edition of The Negative, Adams introduces a binary scale of subject luminances in exposure units that goes like this:

———————————————————————————————–

Subject Luminances:

 Exposure Value Exposure Zone 1/2 1 2 4 8 16 32 64 128 256 512 (0) I II III IV V VI VII VIII IX (X)

Now, other than being offset by a factor of 1/2, this is the same scale that I was using above. Unlike that scale, Zone V is 5 stops down from the maximum of 512, and corresponds on this scale to a value of about 3.1%. He has also associated the straight binary sequence with mid-points on his Zone scale; this contrasts with the approach above of finding the geometric means (the square roots of the scale values.) Certainly, there is no 18% gray value here; and because of the binary sequence, the 50% value of maximum is just 1 stop down from the peak value.

Again, frustrated understanding….

In what follows page 55 in Adams’ book, he makes much of various meters to establish reference exposure values for negatives. On page 66, he introduces an “Exposure Formula” for turning meter readings into physical values for subject luminances. The formula uses the notion of a “key stop” that is defined as the square root of the (then) ASA speed of the film being used, or at least, set into the meter. For example, for an ISO 200 setting then, the “key stop” would be f/14. For a properly calibrated metering system at the key stop and aiming to set exposure for an 18% gray luminance on Zone V, the Exposure Formula is that the correct shutter speed is the reciprocal of the luminance in candles per square foot. For example, this would suggest that if I set my Nikon D80 for ISO 200, put it into aperture priority with f/14, used spot metering, and pointed it at any subject at all with available light, then 1 over the recommended shutter speed should tell me the luminance of that subject in candles per square foot.

Well, is that true? It seems to be a testable hypothesis. On this simple topic, there are a ton of external references. Here are a few for you to stumble through like I did. First a few Wikipedia articles: Film Speed, Exposure Meter, Gray Card, and the Oren-Nayar diffuse model. This sequence of articles are getting at the concept of how physical stuff (that we might want to take a picture of) reflects light. The basic idea being that a surface can’t reflect more light than what’s hitting it (that would violate conservation of energy, don’t you see?) These reflections can be either diffuse, like a matte, or specular, like a mirror. Most stuff that we’ll take pictures of is closer to a diffuse reflector. So, by definition, a perfect 18% gray card is one that is a diffuse reflector that sends back exactly 18% of the incident light energy that falls on it all across the visible spectrum.

We get a little closer to our answer by checking into what Adams’ units, candles per square foot, meant. Now, the candle as a measure of luminous intensity, has been replaced by the candela. The two are more or less equal. Notably, the candela implies a certain power (1/683 Watts) being radiated into a certain solid angle (1 steradian) at a certain frequency of light (540•10**12 Hertz) which just happens to be in the center of the sensitivity of the human eye to visible light. In other words, the unit that Adams was using is not just about any old light, it’s about light that the human eye can see.

After all, that shouldn’t be too surprising, we’re supposed to be making photographs that look something like what people would have seen if they were standing where the camera was. In fact, the candela is a unit of luminous intensity, which is itself a measure of the power of light in a certain direction weighted by a luminosity function that represents the sensitivity of human vision.

So I was led, inevitably, in tracking down the meaning of 18% gray, to consider human vision and how science has come to model it. Now, I was close to the answer; and the real and simple relationship between 18% gray and 50% gray. In reading about luminosity functions, I found that human vision has two components, photopic and scotopic. Photopic vision occurs under normal light, and is associated with color perception due to the cones in the retina. Scotopic vision occurs under low light, and is due to the response of the rods in the retina. More particularly, I learned that the standard photopic luminosity function used to define the candela is taken from the CIE 1931 color space standard.

Well, at last, here comes our answer. The International Commission on Illumination (CIE, ‘cos the original name is in French), did a landmark piece of work in 1931 to define a mathematical model for human color vision. The result is variously called the CIE 1931 XYZ color space or the CIE 1931 color space. It was based on prior research into human color vision, which had discovered that the cones of the retina had response at short, medium, and long wavelengths of light. These response curves were close to, but not exactly equivalent to, blue, green and red, respectively. As a result, and to avoid confusion, they were simply labelled X, Y, and Z, where X is roughly red, Y is roughly green, and Z is roughly blue. You can see the curves yourself on the referenced Wikipedia page.

The bright folks at the CIE figured out that human vision could be separated into two distinct aspects, the perception of brightness and the perception of color, which they called chromaticity. Since the eye is most sensitive to the green part of the spectrum, they decided to use the Y curve as the basis for their measure of brightness. Then, they could refer any given color to a notion of what “white” was. For this they defined three derived values from X, Y, and Z as follows:

$x=X/(X+Y+Z)$ $y = Y/(X + Y + Z)$ and $z=Z/(X+Y+Z)=1-x-y$.

So, you can go back and forth between x, y, and Y since X = x•Y/y and Z = (1-x-y)•Y/y. The result is a derived color space, the CIE xyY color space. The notion of a color space is used almost everywhere to represent the range of colors that various computer presentation devices such as monitors, printers, and so on, can manage. You can see a graphical representation of this color space here. Note that ‘white’ occurs near the middle of the space where x = y = 1/3.

From the CIE XYZ and xyY color spaces, many other models were derived, such as CIE RGB and CIE L*a*b*. The concept of an RGB color space is much more convenient for practical equipment, such as cameras, monitors, and printers since it is more natural to generate color by combining red, green, and blue than by coming up with X, Y, and Z responsive materials. Of course, there are many practical RGB color spaces, such as sRGB, Adobe RGB, ProPhoto RGB, and so on. To complete the full definition of an RGB space also requires definition of a white point and a tone curve, or gamma correction curve.

This takes us to the CIE L*a*b* color space, often called CIELAB. In this model, L* is a specific measure of brightness, while a* and b* represent color. L* can range from 0 to 100.

$L^*=116f\left(Y\left/Y_n\right.\right) - 16$ $a^*=500 \left( f\left(X\left/X_n\right.\right) - f\left(Y\left/Y_n\right.\right)\right)$, and $b^*=200 \left(f\left(Y\left/Y_n\right.\right) - f\left(Z\left/Z_n\right.\right) \right)$.

where $X_n$, $Y_n$, and $Z_n$ are the X, Y, and Z values of the white point; that is, the reference illumination.

The function $f(t)$ in the equations is given by

$f(t)= \sqrt[3]{t}$ if $t > (6/29)^3$ or $f(t) = (1/3) (29/6)^2 t + (4/29)$, otherwise.

Well, here it is, 18% gray and 50% gray. Don’t you see? No… It’s the brightness parameter, L*, as a function of Y, the peak response function of the eye, normalized to scene illumination, Yn.

When Y/Yn = 0.184, then L* = 50!!!

There you go, the relationship between an object that reflects 18% of the incident light and the perception of its brightness as 50% is given within the CIE model of human perception. As such, it is not a claim about any inherent property of light, or scenes, or black relative to white. Rather, it is a claim about the way human perception responds to the illumination of a scene. As such, using 18% as a reference point for photography is part of a calibration strategy to make an image in a print or on a monitor look like the original scene that it is meant to represent to the human observer. I don’t know about, say canine vision, or that of the aliens from Tralfamador; but my guess is that neither dogs nor Tralfamadorians would perceive an Ansel Adams print as a match for the scene it represented since it would not be calibrated for their eyes.

Put another way, Adams’ Zone System and the use of an 18% gray reference point was part of a tonal management workflow from camera to negative to print. This also suggests that, so long as the underlying research behind the CIE color space is accurate about human perception, then a reflectance of 18% gray just is the correct reference point for the perceived tonal mid-point in a photographic image. It is not 12%, for example, which corresponds to a 41% L* value.

As I’ve written in my first blog here, there is a reason that the equivalent of a 12% value is used in many DSLRs. The standard behind this is CIPA-004 on the sensitivity of digital cameras. It is also described in detail by Douglas Kerr at his web page on Measures of the Sensitivity of Digital Cameras. As a hint, I discover that the sensitivity of my Nikon D80 is not really specified in terms of ISO speed at all, but rather a Recommended Exposure Index or REI, which is made to look like an ISO speed rating. As a consequence, Adams’ Exposure Formula is not quite accurate for my D80; and I expect that it would not be quite right for a lot of other DSLRs.

This takes me back to the question I raised above, would my D80, set in aperture priority for the key stop corresponding to its ISO setting, meter out a shutter speed that is the reciprocal of the subject luminance in candles per square foot? I believe that the answer is ‘no’. More on that in my next blog entry.

But the upshot of all of this is that, in my belief, almost no image taken with a DSLR will yield a proper print without post-processing to adjust the exposure back to a 50% middle gray. This would certainly be true for my D80.

1. Joan Gastó

Hi Allan,

It is an amazing article, a must see for all filmmakers and photographers. Congratulations and thanks for all the information!

I might have missed some concepts tough since english is not my first language, so i would like to make a question/example.

If we were working with a video camera and we would like to set a light meter (with cine functions) to match the camera´s values and to TRUST in its readings, would it be right to use a 18% “mid gray” card and change the aperture until the gray represents 50% in the camera´s spot meter or in a vectorscope? So then we could read the card with the light meter and change the ISO until we have the same aperture value and be sure that we would be reading with the same sensitivity both in c
amera and light meter?

Regards from Barcelona
Joan

2. Sorry it’s taken me a while to post this response. With upcoming blog posts, you’ll see that I’ve been rather busy lately.

In any case, here is the core idea. For an accurate exposure and, arguably, representation of a scene photographically, you would like a minimum set of fixed reference values of light from the scene to correspond to a similar set of fixed reference exposures on your film or sensor or whatever your shooting with. For most work, this minimum set is a black point, a neutral point and a white point. In the present case, considering 18% gray, we’re talking about just the neutral point.

From some of the other posts in this blog and their references, you’ll note that this 18% reference luminance was chosen originally because it meant something in the context of human visual perception, and had nothing much to do with cameras or film as such. Of course, it’s then only natural to attempt to take a value from the scene that the human eye would more or less universally have recognized as a middle and neutral gray and attempt to create a photographic representation, a print say, in which the reflectance of a middle gray in the original scene was matched by the same middle gray for the corresponding region in the print.

There is a story that Ansel Adams was personally responsible for achieving this kind of “color management” as we might now call it with Kodak and their film and paper back in his day.

For a variety of reasons, the mapping of a middle gray in a scene to an 18% reference value on a digital SLR sensor has been superseded by other considerations. Since digital sensors are less forgiving than film at the highlights of a scene, it is now typical for camera manufacturers to contrive a reference exposure for middle gray that is closer to 12% or 14% of the nominal 100% value on an sensor pixel. [Keep in mind that there really isn’t a physical sensor pixel as such. Red, green and blue values are calculated for any given “pixel position” by combining a set of physical sensor values from adjacent positions under the sensor light filter. But I am off topic.]

Also, many real gray card products are not actually at 50%. For example, the Opteka OPT-DGC 3 card set has a gray card that yields Lab values of L* 63.8, a* -1.6, and b* -0.4 with a standard D50 (5000K) light source. This gives RGB values of 162, 162, 160; not 128, 128, 128. In the era of digital photography, this generation of gray card is designed to be used for color correction and not exposure. So the idea here with the Opteka card, and others like the Lastolite Expobalance is to get a reference set of neutral values at 3 points along the tone curve, none of them exactly at black, white or gray. In the case of the Opteka, the black card is at RGB (16, 16, 15) and white is at (220, 224, 223) for a D50 illuminant. Now, I tend to set my black point at RGB (7,7,7) and my white point at (247, 247, 247) as far as Photoshop or other post processing software is concerned. So, a little caution is necessary in using some of these gray cards.

So, back to your question. You would first have to know what the specifications for your gray card were. Not all of them are designed to deliver a 50% reference under standard light conditions. Second, you’d have to know the specifications for your camera’s sensor. Not all of them are designed to map 50% neutral illuminance to 18% exposure; in fact, most of them are not.

With digital, you tend to want to expose for the highlights, that is, to ensure that no pixels have any blown channels, red, green or blue. Much camera technology goes into metering scenes across much or all of the entire field on the sensor to get this right. You would then use something like the Opteka or Lastolite products to ensure neutral tone values all across the scene illumination. Post processing s/w like Photoshop and Capture NX is very good at bending curves to achieve tonal neutrality given black, gray, and white points.

With these caveats though, if you wanted to calibrate your camera for a neutral reference in the scene, you could take a reference card like the Opteka, work out how many stops off 50% it was (1/3 EV), find out what the exposure reference for your camera was (12%, 14% or whatever), work out how many stops off 18% that was (about 0.5 EV). With this compensation factors you could achieve the exposure calibration that you’re describing. The objective test of your exposure calibration should show up in post processing the images that you captured when you meter them in your s/w during editing. For this to come out, you’d also have to consider the color space you’re editing in, I assume PAL for a Barcelona location and video work. Check the PAL specification to see where it puts neutral gray. You might consider this in your work.

Although it is more focussed on printing, this is also interesting in this context.

I hope this helps.

3. great post, thanks for sharing

4. Ansel Adams wasn’t “wrong,” he also was not using a computer or dSLR, he was working with film.

You mentioned starting with 18% and doubling (a stop up) or halving (a stop down), which does not seem unreasonable as we are dealing with light which is linear, BUT… not actually the relevant way to look at it.

Film, sRGB, The human eye are all NOT linear. “18%” was discovered to be the middle grey between black and white as judged by test subjects in controlled laboratory experiments.

And ALSO, an “18% grey card” is referring to its “Lambertian reflectance” (also called diffuse reflectance). This is not at all the same as an emissive light source, or a specular reflection. (A perfect/ideal Lambertian surface reflects equally in all directions — that is, no matter what angle you view it from, it does not change in intensity. In other words, it is diffuse, flat, not shiny in any way.)

18% is ALSO the geometric mean between a maximum lambertian reflector such as white snow (about 95%) and a minimum (black soot, around 3.5%). sqrt(95 * 3.5) = 18.23

In CIEXYZ, Luminance Y of 18.4 equals LIELUV L* of 50, or exactly in the middle of human perception. (Y of CIEXYZ is linear LIGHT, and L* of CIELUV is Perceptually Uniform based on human vision experiments).

One other thing – if the LIGHT hitting the Lambertian surface is at an angle, then Lambert’s cosine law will affect the luminance. If the light is at a 45 degree angle that will result in an 18% grey card having an APPARENT reflection of about 12.7% (cosine 45 degrees is .707 times 18).

On your computer, where that 18% should be depends on the transfer curve (gamma) of your colorspace. In sRGB it is 119 119 119 (#777),

Back to Ansel and film and Kodak: various laboratory AIM density checks are intended to get the negative density in the middle of the total exposure range. These AIM cards have been around 14% to 18% depending on the specific application.

TLDR:

A) 18% is HUMAN PERCEPTION of middle grey between a black and a white diffuse surface.

B) In FILM it is also about where you’d normally want the midpoint of film density.

C) On the computer in web standard colorspace (sRGB) it’s 119 119 119 (#777).

D) Some digital cameras internal meter seem to be set about 12.5% — this corresponds with the 45 degree light reflectance off an 18% grey card. Coincidence? We’d need to ask a Nikon engineer I think to know if that’s what they intended…

5. I agree with just about everything that you’re saying here. I will say that I think that the middle gray on sRGB and most computer monitors is not at 18%; but rather, somewhat less. I’d also agree that typical DSLRs from Nikon and Canon are also calibrated for a mid-gray that’s somewhat low as well; I think to provide more overhead against blowing out pixels.