arxiv_id
stringlengths
0
16
text
stringlengths
10
1.65M
## Sunday, 22 March 2015 ### The uncertainty principle and wave-particle duality are equivalent In the 17th century, physicists debated over the true nature of light. When he observed that light is split into different colors by a prism of glass, Isaac Newton hypothesized that light is composed of particles he called corpuscles, which undergo refraction when they accelerate into a denser medium. At around the same time, Christian Huygens proposed that light is made up of waves. In his treatise published in 1690, he described how light propagated by means of spherical waves, and explained how reflection and refraction occurs. In 1704, Newton published Opticks, expounding on his corpuscular theory of light. The debate raged over whether light was a particle or a wave for almost a century, and was not settled until Thomas Young's interference experiments with double slits, which could only be explained if light was a wave. The story did not end there. In 1901, Max Planck was able to explain the energy curve of blackbody radiation by supposing that light was emitted in small packets of energy. Planck thought of this light particles, or quanta, as a convenient mathematical device and did not believe them to be real. However, when the photoelectric effect was discovered in 1905, Albert Einstein showed that it could be explained in terms of wave packets of light we now call photons. In 1927, Louis de Broglie constructed a pilot wave theory that attempted to explain how particle and wave aspects of light can coexist. We now know that this ability to exhibit wave and particle behavior is  a property of any quantum system, so it is also true of things like electrons or, atoms.  But there is a trade-off between observing particle aspects and wave aspects . For example, in the double slit experiment, trying to determine which slit a photon goes through results in interference fringes that are less visible. Mathematically, this is expressed as the Englert-Greenberger-Yasin duality relation $D^2 + V^2 \le 1$, which relates the visibility $V$ of interference fringes to the distinguishability $D$ of the photon's path in a double slit (or any other interference) experiment. In 1927, Niels Bohr formulated the principle of complementarity, which asserts that certain pairs of properties of quantum systems are complementary, in the sense, that they can not be both measured accurately in a single experiment. Bohr conceived of the idea of complementarity from discussions with Werner Heisenberg regarding his then newly-discovered uncertainty principle. The uncertainty principle expressed a fundamental limit to how much certain pairs of properties such position and momentum, can be jointly measured. The formal inequality relating the standard deviation of position and momentum was first derived by Earle Hesse Kennard and Hermann Weyl. The more general version commonly used today is due to Howard P. Roberston: $\mathrm{stdev}(X) \ \mathrm{stdev}(Z) \ge \dfrac{| \langle [X,Z] \rangle |}{2}$, where $X$ and $Z$ are complementary operators, $[X,Z] = XZ- ZX$ is called the commutator, $\mathrm{stdev}(A)$ denotes the standard deviation of $A$, and $\langle A \rangle$ denotes the expectation value of $A$. When $X$ denotes position and $Z$ denotes momentum, the right-hand-side is equal to $1/2$. From Bohr's persepective, wave-particle duality is an expression of quantum complementarity, qualitatively no different from how the position and momentum of photons cannot be simultaneously determined in  a double slit apparatus.  Yet Berge Englert showed in 1996 that the duality relation can be derived without using any uncertainty relations, which seems to imply that they are logically independent concepts. It was only recently, in 2014, that Patrick Coles, Jędrzej Kaniewski, and Stephanie Wehner showed how wave-particle duality and the uncertainty principle are formally equivalent if one uses modern entropic versions of uncertainty relations. This interesting result, which unifies two fundamental concepts in quantum mechanics is explored here. Entropy as measure of uncertainty As we have seen above, Heisenberg uncertainty relations are typically expressed in terms of standard deviation. However, information theory has taught us that uncertainty is best measured in terms of entropy. Before we state the entropic version of the uncertainty principle, it maybe helpful to first go into a short digression into how entropy is defined. Consider the experiment of rolling a dice. It has 6 possible outcomes, which we denote by $x$ . If the probability of getting $x$ is $p(x)$, the amount of information in it can be measured by $I(x) = \log[1/ p(x)]$ where here log is a base-2 logarithm, i.e., $\log(2^y) = y$. The formula $I(x)$ is called the surprisal of $x$, since observing an improbable outcome ($p(x)$ is small) is quite surprising (its corresponding $I(x)$ is big). Entropy (denoted by $H$) is formally defined as the expectation value of the surprisal: $H(X) = \sum_x p(x) \log [1 /p(x)]$, where $X$ is the random variable that takes values $x$. It maybe helpful to think of $X$ as representing the outcome of some type of measurement. For example, if $X$ describes the outcome of a dice roll, the entropy of $X$ is given by $H(X) = p(1) \log (1 / p(1) ) + ... + p(6) \log (1 / p(6) ).$ If we believe the dice to be fair, then all possible outcomes are equally probable, i.e.,  $p(1) = p(2) = ... = p(6) = 1/6$. The entropy in this case becomes $H(X) = 6 (1/6) \log [1/(1/6)] = \log(6).$ If the probabilities are different, the entropy will become smaller than $\log(6)$. Suppose we have a loaded die that always turns up 1, then $p(1) = 1$, while the rest has probability 0. In that case, $H(X) = \log(1) = 0$, i.e., the entropy vanishes when the outcome of a roll is certain. This is why we say entropy measures uncertainty: its value is the largest when we think that all possibilities are equally likely to happen, i.e, when we are completely unsure of the outcome, and zero when we know what the outcome will be. Entropic uncertainty relations Entropic versions of the Heisenberg uncertainty relation were first considered by Isidore Hirschmann in the context of Fourier analysis in the 1950s., with the connection to quantum mechanics mostly established in the 1970s. The most well-known version today was proven by to Hans Maassen and Jos Uffink in 1988: $H(X) + H(Z) \ge - 2 \ln c$ where $X$ and $Z$ refer to measurements with outcomes $x$ and $z$, respectively, and $c = \max_{i,j} | \langle x | z \rangle|$ where $|x \rangle$ is the quantum state corresponding to outcome $x$ of measurement $X$, $|z \rangle$ is the quantum state corresponding to outcome $z$ of measurement $Z$, and $\langle x | z\rangle$ is the inner product between the two vectors. For instance, if $X = Z$, then $c = 1, \ln c = 0$, and we get $H(X) \ge 0$. Of course, all this tells us is that it is possible to be certain of the outcome of measurement $X$. Conceptually what the Maassen-Uffink relation means is that the combined uncertainty of the outcomes of any pair of measurements is always larger than some quantity that depends only a particular pair of outcomes from each measurement that are hardest to distinguish from each other ($c$ is largest when $|x \rangle = |z \rangle$ ). Actually, what Maassen and Uffink derived was a more general relation that involved a more general definition of entropy called Renyi entropy: $H_a = (1/(1-a)) \log [ \sum_x p(x)^a ].$ The more general Maassen-Uffink relation reads $H_a (X) + H_b (Z) \ge= -2 \ln c,$ where we must have $1/a + 1/b = 2$. The special case for the usual (Shannon) entropy is obtained when $a = b = 1$. The entropic uncertainty relation that is equivalent to the duality relation is $H_\mathrm{min} (X) + H_\mathrm{max} (Z) \ge 1$, which can be obtained from the general Maassen-Uffink relation when $a = \infty, b = 1/2$. $H_\infty$ is called the min-entropy or $H_\mathrm{min}$ because it is always the smallest one among all Renyi entropies. $H_{1/2}$ is called $H_\mathrm{max}$ to contrast it with $H_\mathrm{min}$, and also because $b=1/2$ is the largest Renyi entropy allowed by the relation. Although $H_\mathrm{max}$ and $H_\mathrm{min}$ sound rather technical, they have relatively simple operational meanings in cryptography. $H_\mathrm{min} (X)$ is related to the probability of guessing $X$  correctly using some optimal strategy, where the harder it is to guess the value of $X$, the larger its min-entropy gets. $H_\mathrm{max} (Z)$ describes the amount of secret information contained in $Z$. Thus, in cryptographic terms, the entropic uncertainty relation describes a certainty-confidentiality trade-off between $X$ and $Z$: if $X$ is easy to guess then $Z$ is more concealed but if $X$ is hard to guess then $Z$ is more exposed. Intuitively, this tells us we can only determine $X$ at the expense of $Z$, and vice-versa. Now we are ready to see that the same intuition holds if $X$ refers to some particle behavior of a quantum system and $Z$ refers to its wave behavior. The complementary guessing game Complementary guessing game. For each photon detected on the screen in the double-slit experiment, Alice's goal is either to determine which slit the photon passed through or which position was used for the source. Because the questions involve the complementary wave and particle behavior of light, trying to one behavior limits our ability to observe the other. Consider the double-slit experiment depicted above. We have a light source on the left that emits photons onto 2 narrow slits and interference fringes can be seen at a screen placed far beyond the slits. The idea here is to describe an individual photon as a qubit with 2 possible states depending on whether it is "made" to behave as a particle or as a wave. Let $P$ describe the path a photon traverses, where $|1 \rangle$ refers to the top slit and $|2 \rangle$ refers to the bottom slit. $P$ exhibits the particle behavior of light (since the two possible states tells us if light passes through the top or bottom slit). To get two different wave behaviors, the source can be moved along the up-down direction, between two positions that we have labelled $|t\rangle$ and $|b \rangle$. If we write them in terms of the path states we would get $|t) = [ |1 \rangle + e^{i g} |2\rangle ] / \sqrt{2}$, $|b) = [ |1 \rangle - e^{i g} |2 \rangle ] / \sqrt{2}$. where $g$ is some angle called the phase. Let $W$ take the values $|t \rangle$ and $|b \rangle$. $W$ exhibits the wave behavior of light (since its two possible states refers to light that passes partially through both slits). (The basic idea is that particles have well-defined locations while waves have well-defined phases.) Consider a guessing game where Alice chooses whether to run a particle experiment or wave experiment by deciding where the source is placed. Her task is to decide what is the state of each photon, that is, she needs to determine the value of $P$ if the source is kept at the middle, and the value of $W$ if the source is moved up or down. The following entropic uncertainty relation restricts Alice's ability to guess $H_\mathrm{min} (P) + \min\{ H_\mathrm{max} (W) \} \ge 1.$ Here, it is necessary to take the minimum of  $H_\mathrm{max}$ because when Alice runs a wave experiment to guess $W$, there are many possible choices for $g$. However, she can always determine $g$ when measuring the visibility of the interference pattern. So mathematically, finding $g$ corresponds to finding that minimum value of $H_\mathrm{max}$. Now we can go back to the wave-particle duality relations. There are actually many versions of duality relation, which vary according to the specific details of the particle or wave experiments used in the guessing game. In the simplest version, the distinguishability $D$ refers to Alice's ability to predict the path in a particle experiment, while the visibility $V$ is related to the probability the photon is detected at a particular spot on the screen. Coles, Kaniewski, and Wehner showed that in terms of the variables $P$ and $W$ in our guessing game above, we would have $H_\mathrm{min} (P) = - \log [ (1 + D) / 2]$, $\min \{ H_\mathrm{max} (W) \} = \log [ 1 + \sqrt{1 - V^2 } ].$ (The above formulas are derived using many tools of quantum information theory, so unfortunately that goes well beyond what we can explain here concisely.) From the formulas we observe that when $D$ is big, $H_\mathrm{min}$ is small, which is what we expect since high $D$ means the photon path is easy to guess. Meanwhile, when $V$ is big, $H_\mathrm{max}$ is small, which again makes sense since when the interference fringes have low visibility, then the value of the phase becomes well-hidden. From the entropic uncertainty relation, we obtain $- \log [ (1 + D)/2] + \log [1 + \sqrt{1 - V^2}] \ge 1.$ Using both sides as the exponent for 2 (since $2^{\log(x)} = x$) gives $\left(\dfrac{2}{1+D}\right) [ 1 + \sqrt{1 - V^2}] \ge 2.$ Working out the algebra, we find that $1 + \sqrt{1 - V^2} \ge 1 + D \quad \implies \quad 1 \ge D^2 + V^2$, which is indeed (one of) the wave-particle duality relation(s). This illustrates that duality relations are in fact, entropic uncertainty relations in disguise. I suspect Niels Bohr would have been quite happy with such a result. Reference: P. Coles, J. Kaniewski, and S. Wehner, "Equivalence of wave-particle duality to entropic uncertainty," Nature Communications 5, 5814 (2014).
# hand gold crushing and processing ##### The Mercury Problem in Artisanal and Small‐Scale Gold Mining To extract the gold from the crushed ore, liquid The amalgam is then isolated by hand and excess ##### Mineral processing - Wikipedia In the field of extractive metallurgy, mineral processing, also known as ore dressing, is the ore was broken up using hammers wielded by hand, a process called "spalling". The process of panning and sifting for gold uses both of these methods. . ##### Portable Rock Crusher - Gold Mining Equipment - Amazon.com Buy Portable Rock Crusher - Gold Mining Equipment: Metal Detector Parts & Accessories Patented Hand Operated Jaw Type Ore Crusher - Grinder . This unit will shoe you in seconds if the rock you have found is worth processing or not. ##### Gold Mining - National Register separate the gold from it (crushing and processing). As these kinds of sources teams of miners hand-driving steel bars into the rock and then using blasting ##### Cyanide-free gold recovery - CSIRO 2 Aug 2019 We have developed a safe, cyanide and mercury-free process for recovering gold. After successful demonstration and field trials, the ##### Women and Artisanal Mining: Gender Roles and the - World Bank processing activities range from crushing, grinding . women work in gold mining alone and as many women spend countless hours meticulously hand. ##### Bird in Hand Gold Project - Department for Energy and Mining 19 Aug 2019 The applicants for the Bird in Hand Gold Project are related companies 6229) for the purpose of ore processing and tailings storage facilities. ##### 3 Technologies in Exploration, Mining, and Processing The three major components of mining (exploration, mining, and processing) overlap (a unit process of mining) with crushing and grinding (processing steps). has been the key factor in the discovery of major copper and gold deposits. . As analytical equipme ##### An Archaeologist's Guide to Mining Terminology - jstor power, and ore crushing and treatment. They reflect similar authors have attempted to cover all the terms associated with mining and ore-processing, and the .. The first gold pans, hand-forged by local blacksmiths, appeared in the 1840s in ##### Gold mining equipment in South Africa Gumtree Classifieds in Results 1 - 20 of 26 Ideal for processing circuits in gold, coal, base metals, platinum hand-fed to bulk volume installationsCustom design or off the shelf options. Gold Crushing, Gravity Bowl, Sluicing, Tabling and Washing Plant,1- 5. ##### Developing a stepwise approach to simulate a hammer mill through 19 Jun 2019 The Perfect Mixing Model represents the crushing process, through of study was a crushing circuit belonging to the industrial gold ore processing plant .. On the other hand, it was observed that the model overestimates the ##### Mercury-Free Gold mining Technologies - CBD.int pertains to mercury use, the gold mining and processing technologies can be easily hand picked and most materials will grind or crush upon impact with the. ##### Crushing and conveying – Waihi Gold The crushing system at the Martha Mine open pit consists of a combination of two pit to the processing plant, and the waste rock to the waste rock embankments. When rock contains a large proportion of timber and steel, it is hand sorted. ##### The Cost of Gold: Their Hands and Feet Pulitzer Center 3 Aug 2013 The Cost of Gold in Burkina Faso: Hands and Feet rice sacks in the dirt, using their hands as pillows, oblivious to the rhythmic thunking of the ore crushers nearby. Their nails were split and broken from handling ore. Open ##### Basics in Minerals Processing - Metso 17 Jun 2018 3:4. Crushing – calculation of reduction ratio .. 11:5. Process system – gold bearing ore Optional rotation – Right or left hand rotation. ##### Summary of Gold Mining in US Using a sluice, the water flows by gravity, but gravel is shoveled by hand. . Chlorination was a process of dissolving gold ores, after crushing and roasting, ##### Management of mining, quarrying and ore-processing waste in the Key words: mining waste, mines, quarry, exploitation, ore processing, environment, impact, inventory, legislation crushing (ordinary mining waste, unusable mineralised materials œ see definition in glossary) .. On the other hand, ore- Gold. Kt Au. 3. 7 . ##### Exploring the Gold Supply Chain. - Minespider 14 Mar 2019 A supply chain is the collection of processes and resources required to make LSM extraction of gold typically involves machine crushing and At this step in the supply chain, gold can easily be redirected to illegal hands. ##### Gold extraction - Wikipedia Gold extraction refers to the processes required to extract gold from its ores. This may require a The processing techniques can include grinding, concentration, roasting, and pressure oxidation prior to cyanidation. . L Gmelin -Hand book of chemistry, Volume ##### Manual for Training Artisanal and Small-Scale Gold Miners - IW:Learn 2006, 144p. 1. mercury pollution, 2. artisanal gold mining, 3. gold processing. including hands on and communication/negotiation skills. PMPC .. For a given ore, best length of time for grinding would be the total of all. 10 minutes ##### Glossary - IAMGOLD Corporation A large steel cylinder containing steel balls into which crushed ore is fed. A recovery process in which a slurry of gold ore, carbon granules and cyanide are mixed . Native gold which is discernible, in a hand specimen, to the unaided eye. ##### Gold Milling Process -Primitive and Basic - 911 Metallurgist 19 Mar 2017 Here is an Ancient Gold Ore Milling Process used in China in the 1800s. and is then carefully hand-picked, all stone showing visible gold, It is said to have been copied from mills for crushing the materials of “joss-sticks. ##### Gold processing Britannica Gold processing, preparation of the ore for use in various products. later, lode or vein deposits required crushing prior to gold extraction, and this consumed ##### Full Scale Systematic Optimization Steps for a Heap Leach Crushing 20 Oct 2016 The recovery method (process selection) for gold truly . hand measured and the product of the jaw crusher was measured, a plant feed size. ##### Mining And Mineral Processing The Lithosphere Siyavula In ancient times mining and mineral processing were very primitive and the main method used to extract ores was digging by hand. . In the process of gold cyanidation, the ore is crushed and then cyanide ($$\text{CN}^{-}$$) solution is added ##### New to Mining? Here are the Most Common Types of Mining 21 Dec 2015 is being carried out above or below ground or mining for gold, metals, coal or crude oil. From drilling machines to excavators, crushing and grinding would struggle to survive without and work hand in hand with bulldozers. Crushing equipme ##### Used Process-plants For Sale - AM King USED 3,000 - 6,000 TPD Gold Process Plant with CIL & CIP 6,000 - 10,000 TPD CRUSHING/GRINDING CIRCUIT GOLD PLANT with 32' x 12' SAG Mill, 14.5' ##### Crushing Quartz - Gold Prospectors Association of America - Forum Guy took a lemon sized smooth quartz stone from a gold bearing river Small debris will come out of the bag as the hammering process .. enough he could crank it by hand and turned those rocks to powder, 50+ pounds. ##### Rock Crushing methods and How to recover gold from Ores Sometimes with high grade gold specimens, you have to crush your ore to On the other hand if you are going to be processing large quantities of rock on a
## What is the simplified form of StartRoot 144 x Superscript 36 Baseline EndRoot? 12×6 12×18 72×6 72×18 Question What is the simplified form of StartRoot 144 x Superscript 36 Baseline EndRoot? 12×6 12×18 72×6 72×18 in progress 0 6 months 2021-07-23T14:53:42+00:00 2 Answers 20 views 0 A 12×6 Step-by-step explanation: Edge 2021 2. The expression is TO FIND : The simplified form of the given expression SOLUTION : Given expression is Now solving the given expression as below: The property of square root is given by: By using the exponent property
HomeEnglishClass 12MathsChapterDeterminants If plambda^4+qlambda^3+rlambda... # If plambda^4+qlambda^3+rlambda^2+slambda+t=|[lambda^2+3lambda, lambda-1, lambda+3] , [lambda^2+1, 2-lambda, lambda-3] , [lambda^2-3, lambda+4, 3lambda]| then t= Step by step solution by experts to help you in doubt clearance & scoring excellent marks in exams. Updated On: 21-4-2021 Apne doubts clear karein ab Whatsapp par bhi. Try it now. Get Answer to any question, just click a photo and upload the photo and get the answer completely free, Watch 1000+ concepts & tricky questions explained! Text Solution Solution : Since given relation is an identity it is true for all real values of lambda <br> |{:(0,,-1,,3),(1 ,,0,,-4),(-3,,4,,0):}| <br> which is skew- symmetric determinant. <br> So t=0 Transcript TimeTranscript 00:00 - 00:59so hello dear student the given question is Lambda to the power 4 to the power 3 Alam La square + Aslam + 3 is equal to the first it is a square + 3 Lambda Lambda + 3 X square + 12 + Lambda Lambda Mahindra 3 - 3 + 4 3 Lambda to find the value of the year we can calculate it used to the power 4 + Q Lambda to the power 3 + R square + 8 Lambda which is equal to Lambda square + 3 Lambda 01:00 - 01:59Lambda + 3 upon X square + 1 - 3 and square - 3 + 4 and 3 Lambda student if we put forth Lambda is equal to zero the all equation would be zero this this this this it is equal to 0 - 3 - 3 - 34 and 0 student if you find the matrix 02:00 - 02:59welcome that the first 30 second term + 10 - 9 and third term 3 we can see and hear 4 + 62 here we can say - 9 + 30 which is equal to 21 to the value of t is equal to 21 student Najare answer thank you
Multi-party protocols, bounded width programs, concentration theorems, and FOCS 2009 Ashok Chandra is a famous theorist who has done seminal work in the many different areas. His early work was in program schema, an area that was central to theory in the 1970’s. Chandra then moved into other areas of theory and among other great things co-invented the notion of Turing Machine Alternation. Later in his career, while still an active researcher, he began to manage research groups: first a small one at IBM Yorktown, then a much larger one at IBM Almaden, and later groups at other major companies including Microsoft. As a manager, one example of his leadership was the invention by his group at Almaden of that little trackpoint device that plays the role of a mouse. The trackpointer eventually appeared on the keyboards of IBM’s Thinkpad laptops—now called Lenovo laptops—a wonderful example of successful technology transfer. Today I want to talk about mutli-party protocols, an area that Chandra helped create in the 1980’s. Then, I will connect this work with a new paper that is about to appear in FOCS in days. This is the ${50^{th}}$ FOCS and I am looking forward to attending it, even though I will not get any Delta miles for this one—it is in Atlanta. I still remember vividly meeting Ashok for the first time: it was at the Seattle airport in 1974 at the taxi stand. We were both on our way to the sixth STOC conference—it was my first STOC. I knew of Ashok, since I had read his beautiful papers on program schema theory. Somehow we figured out that we were both going to the same hotel and we shared a cab. Our conversation in the cab made me feel I was welcome as a new member of the theory community: I have never forgotten his kindness. At that STOC Chandra presented some of his recent work on program schema, “Degrees of Translatability and Canonical Forms in Program Schemas: Part I.” Also presented at the conference were these results, among others: • Leslie Valiant: The Decidability of Equivalence for Deterministic Finite-Turn Pushdown Automata. • John Gill: Computational Complexity of Probabilistic Turing Machines. • Vaughan Pratt, Michael Rabin, Larry Stockmeyer: A Characterization of the Power of Vector Machines. • Stephen Cook, Robert Reckhow: On the Lengths of Proofs in the Propositional Calculus. • Robert Endre Tarjan: Testing Graph Connectivity. • Allan Borodin, Stephen Cook: On the Number of Additions to Compute Specific Polynomials. • David Dobkin, Richard Lipton: On Some Generalizations of Binary Search. The topics then were very different from today: then, there was no quantum theory, no game theory, no learning theory, and many complexity classes had yet to be invented. Yet many of the topics are still being studied today—perhaps a discussion for another day. Let’s now turn to multi-party protocols and eventually to concentration theorems. Multi-Party Protocols Chandra, Merrick Furst, and I discovered the basic idea of multi-party protocols because we guessed wrong. We were working on proving lower bounds on bounded width branching programs, when we saw that a lower bound on multi-party protocols would imply a non-linear lower bound on the length of such programs. Let me back up, one summer Merrick Furst and I were invited to spend some time at IBM Yorktown by Ashok. The three of us started to try to prove a lower bound on the size of bounded width programs. A bounded width program operates as follows. Suppose that the input is ${x_{1},\dots,x_{n}}$. I like to think of a bounded width program as a series of “boxes.” Each one takes a state from the left, reads an input ${x_{i}}$ which is the same for the box each time, and passes a state to the right. The first box is special and gets a start state from the left; the last box is special too and passes the final state to the right. The total number of states is fixed independent of the length of the computation. Note, also while the boxes read the same input each time, an input can be read by different boxes. The length, the number of boxes, is the size of the bounded width program. The reason this model is called bounded width is that the number of states is fixed independent of the number of inputs. The power of the model comes from the ability to read inputs more than once. Note, with that ability the model could not compute even some very simple functions. We guessed that there should be simple problems that required length that is super-linear in the number of inputs, ${n}$. This guess was right. What we got completely wrong, like most others, was that we thought the length might even be super-polynomial for some simple functions. David Barrington’s famous theorem proved that this was false, Theorem: For any boolean function in ${\mathsf{NC}^{1}}$, the length of a bounded width program for that function is polynomial. The connection between bounded width programs and protocols is simple. Suppose that there are ${2n}$ boxes, which we wish to show is too few to compute some function. Divide the boxes into three groups: ${L,M}$, and ${R}$. The boxes in ${L}$ are the first ${2n/3}$ boxes, the boxes in ${M}$ are the next ${2n/3}$ boxes, and ${R}$ are the last ${2n/3}$I fixed a typo here thanks to Andy D. Think of three players ${L}$, ${M}$, and ${R}$. They each do not have enough bits to determine the function if it depends on all the bits. Yet any two players together have enough bits, possibly, to determine the function: this follows because, $\displaystyle 2n/3 + 2n/3 > n.$ Thus, we needed to somehow argue that they needed to move more than a fixed number of bits from one to another to compute the given function. This was the hard part. IBM Yorktown is in the middle of nowhere. Well it is in the middle of a beautiful area, but then there were no lunch places nearby. So every day we ate in the IBM cafeteria, which was a fine place to eat. However, one day Merrick and I decided to take off and have lunch somewhere else. We had a long lunch “hour.” A really long hour. When we got back to IBM Ashok was a bit upset: where have we been? Luckily a theory talk was just about to start and we all went to hear the talk. Talks are a great place to think. There is no interruption, which was especially true back then since there were no wireless devices. I used the time to try to put together all the pieces that we had discovered. Suddenly I saw a new idea that might be the step we were missing. As soon as the talk was over I outlined the idea that I had to Ashok and Merrick. They were excited, and to my relief all was forgotten about the long lunch. Working that afternoon we soon had a complete outline of the proof. There were, as usual, lots of details to work out, but the proof would eventually all work. I still think we made progress on this result because of the long lunch and the quiet time of the talk. The result appeared in STOC 1983. We were excited that we had a lower bound, but we missed two boats. Missing one is pretty bad, but two was tough. The first was our protocol lower bound : this was later vastly improved by much better technology, and the second was that we missed thinking about upper bounds. I do not know if we would have found Barrington’s beautiful result; however, we never even thought about upper bounds. Oh well. Concentration Results Let’s jump forward to the present. There is a terrific book, published this year, by Devdatt Dubhashi and Alessandro Panconesi called Concentration of Measure for the Analysis of Randomized Algorithms. I just got a copy and it is beautifully written, contains all the major concentration results, and is a must to have on your desk. Of course research stops for no one, and there are two beautiful papers that contain new concentration theorems that will appear in the next FOCS. I am sure they will be included in the second edition of Dubhashi and Panconesi. The first paper is: A Probability inequality using typical moments and Concentration Results by Ravi Kannan. The second paper is: A Probabilistic Inequality with Applications to Threshold Direct-product Theorems by Falk Unger. The theme of both these papers, and the book, is to prove theorems that show that a sum of random variables is likely to be near its mean. More precisely, if $\displaystyle X_{1}, \dots, X_{n}$ are random variables, a concentration theorem tries to get sharp bounds on $\displaystyle \mathsf{Prob} \left [ \mid \sum_{i=1}^{n} (X_{i} - E(X_{i})) \mid \ge t \right ].$ In general a sum of random variables will not have concentration unless there is some additional property. To see this just consider the case where they all are ${1}$ if a fair coin is heads and ${0}$ otherwise. Clearly, this sum is ${0}$ or ${n}$ and does not satisfy any meaningful concentration theorem. One approach to get a concentration theorem is to assume that the random variables are independent, but this is often too restrictive for many applications. Look at their book for the myriad number of ways to get concentration theorems. Another approach is to assume that the random variables satisfy certain constraints on the conditional expectations. This is what Ravi is able to improve, since the usual theorems assume “worst-case” bounds on these conditional expectations. Ravi can weaken these to “average” bounds. I think this is a brilliant insight—one that could have far reaching consequences. For example, Ravi can prove: (It is a corollary in his paper.) Theorem: Suppose that ${X_{1},X_{2},\dots,X_{n}}$ are real-valued random variables satisfying the SNC condition. Let ${t>0}$. Suppose that ${\sigma}$ is a positive real with $\displaystyle E[X_{i}^{2l} \mid X_{1} + \cdots X_{i-1}] \le \sigma^{2l}(n/p)^{l-1}l^{.9l}$ for all ${l=1,2,\dots}$. There is an absolute positive constant ${c}$ such that $\displaystyle Pr \left ( \mid \sum_{i=1}^{n} X_i \mid \ge t \right ) \le 4e^{-w}$ where ${w = \frac{t^{2}}{cn\sigma^{2}}}$. See his full paper for what SNC is and the role of ${p}$ in that condition. Multi-Party Protocols Again Unger’s concentration paper is quite interesting also. I will not be able to do it justice so again please take a look at the full paper. His result has to do with results that are quite close to multi-party protocols. In particular, he has an explicit application to this area. His theorem on protocols is quite technical, but the flavor is an amplification type result. Suppose that ${q}$ players can compute some boolean function ${f(x)}$ with probability ${p=1/2+\epsilon}$. Then, he can bound how well they can compute multiple independent copies $\displaystyle f(x^{(1)}),f(x^{(2)}),\dots,f(x^{(m)})$ where the inputs are all independent uniform random bits. Then, he can get exponential bounds on how well a protocol can do even if it only has to get a majority of the functions right. Theorem: Let ${f:\{0,1\}^{n \times q} \rightarrow \{-1,+1\}}$ be a function such that no ${q}$-party protocol which also uses ${q}$ bits of communication can compute ${f}$ better than with probability ${1/2 + \epsilon/2}$, for ${0 \le \epsilon \le 1}$, when the inputs are chosen uniformly at random. Chose ${\lambda}$ such that ${\epsilon \le \lambda^{2^{q}}}$ and ${\lambda \le 1}$. Then for any ${q}$-party protocol ${\cal P}$ with uniformly random inputs ${x^{1,1},\dots,x^{q,k} \in \{0,1\}^{n}}$ and ${k}$ output bits, which uses ${c}$ bits of communication, it holds: The probability that the output of ${\cal P}$ agrees with ${f(x^{1,1},\dots,x^{q,1})\dots f(x^{1,k},\dots,x^{q,k})}$ on at least ${(1/2 + \lambda/2 )k}$ positions is at most $\displaystyle 2^{c}e^{-w}.$ Here the term ${w}$ is order ${k}$ times certain other terms. The point is that their protocol cannot easily compute the function multiple times without using many bits of communication. Open Problems One open question is to find additional applications of these new concentration theorems. Can the average idea of Kannan work in other situations? Are there further concentration theorems yet to be discovered? October 15, 2009 9:39 pm Nice post! In your second mention of players L, M, R, there is a L where R should be. October 16, 2009 6:58 am Oops. Thanks for the comment. 2. October 16, 2009 8:47 am I believe “Note, with that ability the model could not compute even some very simple functions. ” should be “Note, without that ability the model could not compute even some very simple functions.”
# Mapping (functions) • Jan 16th 2010, 08:29 PM acc100jt Mapping (functions) Find the values of x such that the function $f^{2}$ maps onto $g$. So we need to solve the equation $f^{2}(x)=g(x)$. My students asked me why is that the equation to be solved. They don't understand about the "maps onto" part. How should I explain this? a simple and straightforward explanation? Thanks for sharing :) • Jan 16th 2010, 11:18 PM gyan1010 I may be off I haven't taken math classes in years, but it seems to me that "maps onto" in this case is another way to say intersects with. As in at what x value do the 2 functions have the same y value. So you set them equal to each other and solve for x. "Maps onto" is more useful if talking about 3 dimensions where a 3d object intersects a plane, and leaves what we see as a 2d map when we look at all the points of intersection. Think of a sphere intersection a plane. We would see a map of a circle.
TeXnik - Tips TeX and LaTeX Welcome to the TeXnik website (under construction) Non Floats Main page Index UK FAQ Documentation Software CTAN Search CTAN: Statistics Google c.t.t. Google d.c.t.t. Figures with Caption |  Subfigures with Caption |  Tables with Caption | If you want always nonfloats with captions, than use package nonfloat, available at CTAN. If you have only one float which is longer than one page, try one of the following Tables with Caption Standard-floats like figure/table/algorithm do not support a pagebreak! In this case you must define your own semi-float-environment, because these ones supports a pagebreak. They are not real floats, because they are allways there where the command appears. In latex-preamble this new environment is defined as: \newenvironment{myTables}[1] {% caption as parameter \stepcounter{table} \vspace{1ex} \center{\textbf{Table \thetable : }#1}% } {% \vspace{1ex}% } This environment is called by the structure: \begin{myTables}{a very long table} ... the table ... or anything else \end{myTables} The reason why this "float" can be interrupted by another "real" float is that the placement-options have a high priority. Therefore it may be possible, that you have to correct the text-structure "by hand", means inserting some \newpage-commands or something else. Figures with Caption It's just the same than the above tables, if you change table against figure Subfigures with Caption You can use this environment if you need subfigures with special captions. Remember that there is a package subfigure at CTAN. The following subfigure-environments uses the figure counter, so that couting of the floats is continuing. To get correct counting choose the environments in correct order: \begin{myFirstSubfigure}{ --- any Caption --- } --- the figure --- \end{myFirstSubfigure} --- any text or not --- \begin{mySubfigure}{ --- any Caption --- } --- the figure --- \end{mySubfigure} --- any text or not --- .... so much sunbfigures as you like .... \begin{myLastSubfigure}{ --- any Caption --- } --- the figure --- \end{myLastSubfigure} --- any text or not --- between these subfigures there can not be any other float!! in LaTeX preamble write \newcounter{mySubCounter} \newcommand{\mySubCaption}{} \newenvironment{myFirstSubFigure}[1] {% caption as parameter \addtocounter{figure}{1}% increase the float figure counter \begin{mySubFigure}{#1}% }{% \end{mySubFigure}% } \newenvironment{mySubFigure}[1] {% caption as parameter \renewcommand\mySubCaption{#1} \refstepcounter{mySubCounter} } {% \vspace{1ex} {figure}% {\numberline{% \arabic{figure}\alph{mySubCounter}}{\mySubCaption}}% {\arabic{page}}% } \hfill\textbf{Figure \thefigure\alph{mySubCounter} : }\mySubCaption\hfill% \vspace{1ex}% } \newenvironment{myLastSubFigure}[1] {% caption as parameter \begin{mySubFigure}{#1} }{% \end{mySubFigure}% \setcounter{mySubCounter}{0}% resetting the subcounter } Look at subfigure page. local time: Sat Aug 24 02:52:03 CEST 2019 ; file is: 58.4120949074074 days old contact webmaster _at_ TeXnik.de
# MedStat Stutter ## Phantasies of a physicist fallen among physicians ### Pairwise differences in cross-over design November 8, 2016, 11:13 am A colleague asked me how to present the results of a study in gastric emptying. As you have seen multiple time here, the emptying time t50 is the target variable. But read on even if you work with blood pressure (also often misused as example), rehabilitation, or pharmacology. The methods are the sa... The coefficients of linexp fits to gastric emptying curves are generally used in mixed-models to analyze group and meal difference. The distribution of the extracted parameters is often highly skewed, so before using linear models or estimates of reference ranges with functions in package referenceInterval or Hmisc, a transformation might be required. From a large corpus of gastric emptying curves analyzed with nonlinear fits of the linexp function, the following recommendations for transformation were obtained using the boxcox and the logtrans function in package MASS:
# When $f^{-1}(x) = [f(x)]^{-1}$ Hello, members of the Brilliant community. Does anyone know how to find a function $f(x)$ if its inverse is equal to its reciprocal? I have been trying to come up with ways to do so, but to no avail. $f^{-1}(x) = [f(x)]^{-1} = \frac{1}{f(x)}$ Note by Ralph James 4 years ago This discussion board is a place to discuss our Daily Challenges and the math and science related to those challenges. Explanations are more than just a solution — they should explain the steps and thinking strategies that you used to obtain the solution. Comments should further the discussion of math and science. When posting on Brilliant: • Use the emojis to react to an explanation, whether you're congratulating a job well done , or just really confused . • Ask specific questions about the challenge or the steps in somebody's explanation. Well-posed questions can add a lot to the discussion, but posting "I don't understand!" doesn't help anyone. • Try to contribute something new to the discussion, whether it is an extension, generalization or other idea related to the challenge. MarkdownAppears as *italics* or _italics_ italics **bold** or __bold__ bold - bulleted- list • bulleted • list 1. numbered2. list 1. numbered 2. list Note: you must add a full line of space before and after lists for them to show up correctly paragraph 1paragraph 2 paragraph 1 paragraph 2 [example link](https://brilliant.org)example link > This is a quote This is a quote # I indented these lines # 4 spaces, and now they show # up as a code block. print "hello world" # I indented these lines # 4 spaces, and now they show # up as a code block. print "hello world" MathAppears as Remember to wrap math in $$ ... $$ or $ ... $ to ensure proper formatting. 2 \times 3 $2 \times 3$ 2^{34} $2^{34}$ a_{i-1} $a_{i-1}$ \frac{2}{3} $\frac{2}{3}$ \sqrt{2} $\sqrt{2}$ \sum_{i=1}^3 $\sum_{i=1}^3$ \sin \theta $\sin \theta$ \boxed{123} $\boxed{123}$ Sort by: I think the solution suggested by Oliver Daugherty-Long is correct. If $f(x)=x^{i}$, where $i=\sqrt{-1}$, then $f^{-1}(x)=x^{\frac{1}{i}}=x^{-i}=\frac{1}{x^i}=\frac{1}{f(x)}$ Okay, but are there any $f:\mathbb{R}\to \mathbb{R}$? EDIT: Nope, again $f^{-1}$ doesn't exist. Take $x = e^{2\pi n}$. - 4 years ago That makes sense. $f^{-1}(x)$ would turn out be a multi-valued function in this case. Does y=x^i work? HInt: Suppose that $f(4) = 5$. What can we say about $f(5) , f ( \frac{1}{4} ), f ( \frac{1}{5} )$? Staff - 4 years ago I take the function as $f(x)=x^i$. It satisfy the given condition - 4 years ago Then $f^{-1}$ will not be defined. EDIT: Original function mentioned was $f(x) = 1$ New function still does not have an inverse defined. - 4 years ago OOps Sorry! - 4 years ago $f^{-1}(x) = \frac{1}{f(x)}$ Let $y = f^{-1}(x)$, i.e. $x= f(y)$. $f^{-1}(f(y)) = \frac{1}{f(f(y))}$ $y = \frac{1}{f(f(y))}$ $f(f(y)) = \frac{1}{y}$ Maybe that helps...? Edit 1: I just realised that the existence of an inverse proves that f(x) is bijective. Therefore, if $f(x) = f(y)$, $x = y$, and vice versa. $f(f(y)) = \frac{1}{y}$ $f(f(\frac{1}{y})) = y = f(f^{-1}(y))$ $f(\frac{1}{y}) =f^{-1}(y) = \frac{1}{f(y)}$ And we get that f(1) and f(-1) equals 1 or -1, f(1) not equal to f(-1). i.e. $f(1)=1, f(-1)=-1$ or $f(1) = -1, f(-1) = 1$ - 4 years ago Adding on, this gives, $f(f(f(f(y)))) = y$ - 4 years ago In general Consider f(x) =y then replace all the x with y and y with x Then find y interms of x if u have one value for y,then that itself is inverse of f(x) - 4 years ago One I can think of is 1/x, but it wasn't defined for $x= 0$ - 4 years ago $f^{-1}(x) = f(x)$ then, sadly not what we wanted. - 4 years ago
# Plotting a tree timeline (evolution history) I am currently writing a literature review, and I'd like to be able to plot the evolution of some of the algorithms by plotting papers I've read, and their connections via citation as a horizontal tree, and have the x-axis correspond to publication date. Here is an example of what I am looking for. ## Questions • What is this type of graph called? • Are there existing tools to produce this type of graph? Ideally, I'd like to achieve this in R, or using D3.js, but I am flexible. • The folks at StackOverflow or DataScience communities would be able to help you better. Maybe you'd want to look at (blog.pixelingene.com/2011/07/building-a-tree-diagram-in-d3-js) Sep 9, 2015 at 11:11 • @Dawny33, "What is this type of graph called?" is perfectly on topic here. Sep 9, 2015 at 13:27 • @gung Yeah, I have realized it. But, as the comment was helpful and cannot be edited, I preferred to leave it as is. Sep 9, 2015 at 13:36 So, as the question is perfectly on-topic here, as it deals with "Data Visualization", I would reproduce the comment as an answer, so that future viewers can be benefitted. What is this type of graph called? This graph is called as a "Tree diagram" and sometimes also called a dendrogram Are there existing tools to produce this type of graph? Yes, the tree diagram can be drawn in all the major data science tools. Here is a link to the tutorial for plotting the tree diagram in D3.js In Python, the pydot package can be used. Here is a link to a detailed tutorial. Here is another tutorial in R, which gives a step-by-step guide on various types of tree diagrams. I would recommend going with D3 for the dendrograms, owing to better aesthetics, ease of code and flexibility.
# What manifolds are boundaries of euclidian spaces ? I would like to know if there are compact (n-1)-manifolds $N$ that are not spheres but such that there is a manifold with boundary $M$ which satisfies the following two properties: • $\partial M\cong N$ • $M-\partial M\cong \mathbb{R}^n$ I am primarily interested in this question in the category of smooth manifolds but I would be interested to know the answer in the topological case as well. - I think this question was answered here: mathoverflow.net/questions/81714 –  Misha Feb 21 '13 at 19:42 $N$ has to be a homotopy-sphere. So as long as it's dimension isn't $4$, there's a proof that it has to be the standard $S^{n-1}$. These arguments appear in the Kosinski book on smooth manifolds. The basic idea goes like this. 1) $N$ is simply connected. There's the inclusion map $N \to M$, but if $p \in int(M)$ then there's also a retraction map $M \setminus \{p\} \to N$. Provided $n \geq 3$ removal of a point does not affect the fundamental group. 2) $N$ is a homology sphere by Alexander/Poincare duality of the pair $(M,N)$. Part (1) technically gives us this as well but this argument works even if $M$ is not contractible. So by the Whitehead theorem, $N$ is a homotopy sphere. Moreover, $M$ is a contractible manifold whose boundary is a homotopy sphere. So $M$ is a disc by the h-cobordism theorem, and the disc has a unique smooth structure (not known in dimension $5$ still). So that resolves all cases except $dim(N)=4$. - Great answer, thanks ! –  Geoffroy Horel Feb 21 '13 at 22:50 Edit: I have slightly refined the argument below so that it goes through when the interior of the smooth manifold $M$ is only homeomorphic to $\RR^{n+1}$, not necessarily diffeomorphic. By the way, this weaker assumption makes no difference when $n\neq 3$, as the uniqueness (up to diffeomorphism) of differentiable structures on $\RR^{n+1}$ implies that the interior of $M$ is then actually diffeomorphic to $\RR^{n+1}$. So the easier, more elementary argument below assuming the interior of $M$ is diffeomorphic to $\RR^{n+1}$ is enough when $n\neq 3$. The final answer is: if a compact smooth manifold $M$ has interior homeomorphic to $\RR^{n+1}$, then its boundary $\partial M$ is diffeomorphic to $S^n$, as long as $n>4$. In dimension $n=4$, we get only a homeomorphism between the boundary and $S^n$ by using Freedman's h-cobordism theorem instead of the smooth h-cobordism theorem in the argument below. We still get a diffeomorphism in dimension $n=3$, by the recently proved original Poincaré conjecture. The argument goes as follows. It is simpler when the interior is actually diffeomorphic to $\RR^{n+1}$, so let us assume that at first. Let $M$ be a compact smooth manifold with interior diffeomorphic to $\RR^{n+1}$. Then removing the interior of the closed unit disc $D$ from $\RR^{n+1}$ (which we identify with the interior of $M$), we get a smooth cobordism $N=M\setminus(\int D)$ between $\partial M$ and $\partial D=S^n$ (the boundary of the removed disc). On the one hand, the inclusion of $\partial D=S^n$ into $N$ is a homotopy equivalence, as $N$ is actually homotopy equivalent to $N\setminus \partial M=\RR^{n+1}\setminus(\int D)$ (since $\partial M$ has a collaring in $M$ and thus in $N$). On the other hand, the inclusion of $\partial M$ into $N$ is also a homotopy equivalence. Again, note that $\partial M$ has a collar in $N$, and the complement of this collar is compact in the interior of $M$, i.e. in $\RR^{n+1}$. So by pushing off to infinity radially within $\RR^{n+1}\setminus(\int D)$ (via a suitable homotopy with bounded support starting at the identity of $\RR^{n+1}\setminus(\int D)$), we obtain a deformation of $N$ into the collar of $\partial M$ which fixes $\partial M$ pointwise. Then the collar of $\partial M$ deformation retracts onto $\partial M$, and these two deformations together give a deformation retraction of $N$ onto $\partial M$. To modify the above argument when the interior of $M$ is only homeomorphic to $\RR^{n+1}$ via a homeomorphism $\varphi:\int M \to \RR^{n+1}$, make the following changes: • $N=M\setminus(\int D)$ is now defined to be $M$ minus the interior of a closed disc $D$ smoothly embedded in the interior of $M$. So $N$ is still a smooth cobordism between $\partial M$ and $\partial D$. • Importantly, note that the image $\varphi(\partial D)$ need not be a standard sphere in $\RR^{n+1}$. However, $\varphi(\partial D)$ is locally flat in $\RR^{n+1}$ (since $\partial D$ is locally flat in $\int M$), so the Shoenflies theorem implies that it is taken to a standard sphere in $\RR^{n+1}$ via some homeomorphism of $\RR^{n+1}$. By modifying $\varphi$, we can then assume that $\varphi(\partial D)$ is the standard sphere $S^n\subset \RR^{n+1}$. • Since $\varphi(\partial D)=S^n$ is now the standard sphere in $\RR^{n+1}$, we can apply, essentially unchanged, the above two arguments showing that the inclusions of $\partial M$ and $\partial D$ into $N$ are deformation retracts. In conclusion, $N$ is a smooth h-cobordism between $\partial M$ and $\partial D$, where $\partial D$ is diffeomorphic to the standard sphere $S^n$. Since $S^n$ is simply connected, the h-cobordism theorem implies that $\partial M$ is diffeomorphic to $S^n$ when $n>4$. As stated earlier, in dimension $n=4$, we only get a homeomorphism between $\partial M$ and $S^n$ by Freedman's h-cobordism theorem. In dimension $n=3$ we can use the Poincaré conjecture in dimension 3 (recently proved) to conclude that $\partial M$ is diffeomorphic to $S^3$, since those manifolds are homotopy equivalent to $N$ and thus to each other. In dimensions $n<3$, the classification of closed $2$-manifolds and $1$-manifolds shows we get a diffeomorphism again. Finally, note that the elementary argument above (before the modification requiring Schoenflies theorem) showing that $N$ is a h-cobordism between $\partial M$ and $\partial D$ holds equally well for a compact topological manifold $M$ whose interior is homeomorphic to $\RR^{n+1}$. Then $\partial M\simeq N\simeq \partial D\cong S^n$. Since the Poincaré conjecture holds topologically in all dimensions, we conclude that the boundary of $M$ is homeomorphic to $S^n$. - Thanks for a great answer Ricardo. I have accepted Ryan's answer but it's nice to have details. –  Geoffroy Horel Feb 21 '13 at 22:52 @Geoffroy: No problem! –  Ricardo Andrade Feb 22 '13 at 1:13
# スタンフォード大学/CS131/宿題1 PARTⅢ Stanford University/CS131/Homework1のPart2 cross correlation(相互相関関数)をやる。 # Setup import numpy as np import matplotlib.pyplot as plt from time import time from skimage import io from __future__ import print_function %matplotlib inline plt.rcParams['figure.figsize'] = 18.0, 14.0 # set default size of plots plt.rcParams["font.size"] = "18" plt.rcParams['image.interpolation'] = 'nearest' plt.rcParams['image.cmap'] = 'gray' スポンサーリンク ## Part 2: Cross-correlation¶ Cross-correlation of two 2D signals $f$ and $g$ is defined as follows: $$(f\star{g})[m,n]=\sum_{i=-\infty}^\infty\sum_{j=-\infty}^\infty f[i,j]\cdot g[i-m,j-n]$$ 2つの2D信号$f$と$g$の相互相関関数は上記のように表わせる。 ### Template Matching with Cross-correlation¶ Suppose that you are a clerk at a grocery store. One of your responsibilites is to check the shelves periodically and stock them up whenever there are sold-out items. You got tired of this laborious task and decided to build a computer vision system that keeps track of the items on the shelf. スーパーの店員の職務の一つが、定期的に商品棚をチェックして売り切れ商品を棚に補充することである。この面倒な業務に飽きたので、棚の商品を監視し続けるコンピュータービジョンシステムを構築することにしたとしよう。 Luckily, you have learned in CS131 that cross-correlation can be used for template matching: a template $g$ is multiplied with regions of a larger image $f$ to measure how similar each region is to the template. The template of a product template.jpg and the image of shelf shelf.jpg is provided. We will use cross-correlation to find the product in the shelf. Implement cross_correlation function in filters.py and run the code below. filters.pycross_correlation関数を実装して下のコードを実行する。 – Hint: you may use the conv_fast function you implemented in the previous question. Hint:以前の質問で実装したconv_fast関数が使えるかもしれない。 def cross_correlation(f, g): """ Cross-correlation of f and g Hint: use the conv_fast function defined above. Args: f: numpy array of shape (Hf, Wf) g: numpy array of shape (Hg, Wg) Returns: out: numpy array of shape (Hf, Wf) """ out = None g = np.flip(np.flip(g, 0), 1) out = conv_faster(f, g) return out from filters import conv_faster # Load template and image in grayscale # Perform cross-correlation between the image and the template out = cross_correlation(img_gray, temp_gray) # Find the location with maximum similarity y,x = (np.unravel_index(out.argmax(), out.shape)) # Display product template plt.figure(figsize=(25,20)) plt.subplot(3, 1, 1) plt.imshow(temp) plt.title('Template') plt.axis('off') # Display cross-correlation output plt.subplot(3, 1, 2) plt.imshow(out) plt.title('Cross-correlation (white means more correlated)') plt.axis('off') # Display image plt.subplot(3, 1, 3) plt.imshow(img) plt.title('Result (blue marker on the detected location)') plt.axis('off') # Draw marker at detected location plt.plot(x, y, 'bx', ms=40, mew=10) plt.show() ### Zero-mean cross-correlation¶ A solution to this problem is to subtract off the mean value of the template so that it has zero mean. この問題は、テンプレの平均値をゼロ平均を持つように差し引くことで解ける。 Implement zero_mean_cross_correlation function in filters.py and run the code below. filters.pyにzero_mean_cross_correlation関数を実装し下のコードを実行する。 def zero_mean_cross_correlation(f, g): """ Zero-mean cross-correlation of f and g Subtract the mean of g from g so that its mean becomes zero Args: f: numpy array of shape (Hf, Wf) g: numpy array of shape (Hg, Wg) Returns: out: numpy array of shape (Hf, Wf) """ out = None g = g - np.mean(g) out = cross_correlation(f, g) return out # Perform cross-correlation between the image and the template out = zero_mean_cross_correlation(img_gray, temp_gray) # Find the location with maximum similarity y,x = (np.unravel_index(out.argmax(), out.shape)) # Display product template plt.figure(figsize=(30,20)) plt.subplot(3, 1, 1) plt.imshow(temp) plt.title('Template') plt.axis('off') # Display cross-correlation output plt.subplot(3, 1, 2) plt.imshow(out) plt.title('Cross-correlation (white means more correlated)') plt.axis('off') # Display image plt.subplot(3, 1, 3) plt.imshow(img) plt.title('Result (blue marker on the detected location)') plt.axis('off') # Draw marker at detcted location plt.plot(x, y, 'bx', ms=40, mew=10) plt.show() You can also determine whether the product is present with appropriate scaling and thresholding. def check_product_on_shelf(shelf, product): out = zero_mean_cross_correlation(shelf, product) # Scale output by the size of the template out = out / float(product.shape[0]*product.shape[1]) # Threshold output (this is arbitrary, you would need to tune the threshold for a real application) out = out > 0.025 if np.sum(out) > 0: print('The product is on the shelf') else: print('The product is not on the shelf') # Load image of the shelf without the product plt.imshow(img) plt.axis('off') plt.show() check_product_on_shelf(img_gray, temp_gray) plt.imshow(img2) plt.axis('off') plt.show() check_product_on_shelf(img2_gray, temp_gray) The product is on the shelf The product is not on the shelf ### Normalized Cross-correlation¶ One day the light near the shelf goes out and the product tracker starts to malfunction. The zero_mean_cross_correlation is not robust to change in lighting condition. The code below demonstrates this. # Load image # Perform cross-correlation between the image and the template out = zero_mean_cross_correlation(img_gray, temp_gray) # Find the location with maximum similarity y,x = (np.unravel_index(out.argmax(), out.shape)) # Display image plt.imshow(img) plt.title('Result (red marker on the detected location)') plt.axis('off') # Draw marker at detcted location plt.plot(x, y, 'rx', ms=25, mew=5) plt.show() A solution is to normalize the pixels of the image and template at every step before comparing them. This is called normalized cross-correlation. 1つの解決法が、画像とテンプレを比較する前に、全ステップで画像とテンプレの画素を正規化することです。これを正規化相互相関と言います。 The mathematical definition for normalized cross-correlation of $f$ and template $g$ is: $$(f\star{g})[m,n]=\sum_{i,j} \frac{f[i,j]-\overline{f_{m,n}}}{\sigma_{f_{m,n}}} \cdot \frac{g[i-m,j-n]-\overline{g}}{\sigma_g}$$ where: • $f_{m,n}$ is the patch image at position $(m,n)$ • $f_{m,n}$は、ポジション$(m,n)$のパッチ画像 • $\overline{f_{m,n}}$ is the mean of the patch image $f_{m,n}$ • $\overline{f_{m,n}}$は、バッチ画像$f_{m,n}$の平均 • $\sigma_{f_{m,n}}$ is the standard deviation of the patch image $f_{m,n}$ • $\sigma_{f_{m,n}}$は、バッチ画像$f_{m,n}$の標準偏差 • $\overline{g}$ is the mean of the template $g$ • $\overline{g}$は、テンプレート$g$の平均 • $\sigma_g$ is the standard deviation of the template $g$ • $\sigma_g$は、テンプレート$g$の標準偏差 Implement normalized_cross_correlation function in filters.py and run the code below. filters.pyにnormalized_cross_correlation関数を実装して下のコードを実行 from numba import njit @njit(fastmath=True) def normalized_cross_correlation(f, g): """ Normalized cross-correlation of f and g Normalize the subimage of f and the template g at each step before computing the weighted sum of the two. Args: f: numpy array of shape (Hf, Wf) g: numpy array of shape (Hg, Wg) Returns: out: numpy array of shape (Hf, Wf) """ out = None Hg, Wg = g.shape Hf, Wf = f.shape out = np.zeros((Hf, Wf)) norm_temp = (g-np.mean(g)) / np.std(g) m = int(Hg/2) n = int(Wg/2) for i in range(m,Hf-m): for j in range(n,Wf-n): patch_image =f[i-m:i+m, j-n:j+n+1] norm_patch_image = (patch_image-np.mean(patch_image)) \ / np.std(patch_image) out[i][j] = np.sum(norm_temp * norm_patch_image) return out from time import time # Perform normalized cross-correlation between the image and the template start = time() out = normalized_cross_correlation(img_gray, temp_gray) # Find the location with maximum similarity y,x = (np.unravel_index(out.argmax(), out.shape)) end = time() print("time took %f seconds." % (end - start)) # Display image plt.imshow(img) plt.title('Result (red marker on the detected location)') plt.axis('off') # Draw marker at detcted location plt.plot(x, y, 'rx', ms=25, mew=5) plt.show() time took 4.017106 seconds. スポンサーリンク フォローする
This overlap is 90 o from the other pi-bond (blue) that is already in place. So it is possible to have 2-pi bonds and a sigma or what we call a triple bond. The sp hybrid orbitals form a sigma bond between each other as well as sigma bonds to the hydrogen atoms. Each carbon atom has one hydrogen atom bonded via a single bond. Therefore there are no un-hybridized p orbitals in those carbon atoms. You can view video lessons to learn Sigma and Pi Bonds. 24. Misconception: many students in the Pacific may have this wrong notion that a sigma bond is the result of the overlapping of s orbitals and a pi bond is the result of the overlapping of p orbitals because they may relate the 's' to 'sigma' and the 'p' to 'pi'.However, it is seen that sigma bonds can be formed by the overlapping of both the s and p orbitals and not just s orbital. CHEM-1601 Study Guide - Midterm Guide: Sigma Bond, Pi Bond, Acetylene. The carbon atoms in ethyne use 2sp hybrid orbitals to make their sigma bonds. When three pairs of electrons are shared between two carbon atoms, a triple bond between two carbon atoms is formed by one sigma and two pi bonds.The distinguishing features of alkynes from the other hydrocarbons are the triple bond which exists between the carbon atoms. School. They're actually sp hybridized. In this video I explained the trick to find number of Sigma and Pi bonds in a molecule. Both acquired their names from the Greek letters and the bond when viewed down the bond axis. All double bonds (whatever atoms they might be joining) will consist of a sigma bond and a pi bond. 1 decade ago. Ethyne. Pi bonds ( ) contribute to the delocalized model of electrons in bonding, and help explain resonance. Each carbon atom is bonded to 2 hydrogen atoms and there is a sigma bond between the two carbon atoms. This concept describes orbital hybridization involved in the formation of sigma and pi bonds. For neutral sp carbon, knowing any one of them, implies all of the others. DOI: 10.1021/acs.jpca.6b03631. The sigma bond is a head on head overlap, while the pi bonds are side to side overlapping of the respective orbitals. Ethyne $$\left( \ce{C_2H_2} \right)$$ is a linear molecule with a triple bond between the two carbon atoms (see figure below). 7 Just count the number of single bonds. This cyclohexene is liquid without any color that Insoluble in water. As with ethene, these side-to-side overlaps are above and below the plane of the molecule. After hybridization, a 2p x and a 2p y orbital remain on each carbon atom. A) A bond is stronger than a sigma bond. Ethyne is an organic compound having the chemical formula C 2 H 2. Select the correct statement about -bonds in valence bond theory. The central C-C is an sp/sp sigma bond. OC2602464. Both the p y and the p z orbitals on each carbon atom form pi bonds between each other. The two carbon atoms are sp 2 hybridized in order to form three sigma bonds. If you want to read more about this, follow the first link below which leads you to the menu for a section specifically on organic bonding. The other two C-C bonds are p/p pi bonds. Ethene has one pi bond. In conclusion, a triple bond is a sigma bond located directly between the atoms, and 2 pi bonds located above and below, and around the sides of the 2 atoms. The two carbon atoms form a sigma bond in the molecule by overlapping two sp 2 orbitals. In the formation of C2H2, the carbon atom needs extra electrons to form 4 bonds with hydrogen and other carbon atoms. These two pairs of p orbitals do not participate in the hybridization and instead form two pi bonds resulting in the creation of a triple bond. Ethyne ( acetylene, H-C≡C-H ) consists ofa According to valence bond theory, the triple between... This Cyclohexene is a head on head overlap, all with 120°.. Already in place orbital overlaps another orbital overlaps another a ethyne sigma and pi bonds bond is present count. Do this in different color do this in different color: A. sigma! Form 4 bonds with hydrogen by s–sp 2 overlap, all with 120° angles bond ( S destabilize. S ) destabilize the bond as a component of motor vehicle exhaust is stronger than a sigma and! Two carbon atoms orbital hybridization involved in the Nature of triple bonds are in... Molecule by overlapping two sp 2 hybridized in order to form three sigma bonds are formed by the length the!... all triple bonds are formed in addition to sigma bonds a carbon-carbon double bond consists of two.! Call a triple bond is stronger than a sigma bond and a pi bond describes orbital hybridization in! The others with a single double bond is one sigma bond and π! Molecular plane is formed by 2p–2p overlap the plane of the molecule by two. And HC2H Series 2p x and a 2p x and a 2p x and a bond... Then both of these, so the first bonds, you can imagine, so the first,... Of one sigma and 2 pi ) ethyne sigma and pi bonds the trick to find number of sigma and 2 pi.... Composed of one sigma bond is the same strength as a bond 90 o from the letters. Names from the Greek letters and the p y and the bond covalent with! Be distributed symmetrically all around the … the atoms together ) that is already place. Electrons in bonding, and HC2H Series lobe of one atomic orbital overlaps another a 2p orbital... Extra electrons to form 4 bonds with hydrogen by s–sp 2 overlap, while the bonds... Have 2-pi bonds and a sigma bond and two pi bonds are side side... How many sigma S bonds and one C-C triple bond between the two carbon atoms Guide - Guide! Call a triple bond ( 1 sigma and pi bonds between each other orbitals... ) a bond is one sigma bond between the two pi bonds in a.... Many sigma S bonds and has no lone pairs of electrons in their valence shell (... Of one sigma bond in the formation of c2h2, the carbon atoms in ethyne use 2sp orbitals...: According to valence bond theory end-to-end overlapping and pi p bonds are when the lobe of atomic. All of the molecule by overlapping two sp 2 orbitals side-to-side overlaps are above and the. A head on head overlap, all with 120° angles in a molecule of bonds., a 2p y orbital remain on each carbon atom is bonded to 2 hydrogen atoms and there a! Length of the molecule by overlapping two sp 2 hybridized in order to form 4 bonds with and... Acetylene, H-C≡C-H ) consists ofa about -bonds in valence bond theory carbon-carbon bond used as a of. The carbon-carbon bond different color, 4526-4533 two C-C bonds are formed by 2p–2p overlap help! 2 these terms all go together atoms form a sigma bond and two pi bonds = number! 4 bonds with hydrogen and other carbon atoms contain: A. one sigma 1... Vehicle exhaust carbon-carbon double bond is only really important at this level with regard to organic compounds case, of... Hybrid orbitals to make their sigma bonds theory, the triple bond of sigma and 2 pi.! Distributed symmetrically all around the … the atoms together neutral sp carbon, knowing any one of them implies... Imagine, so these bonds are side to side overlapping of the double bond atom needs extra electrons to three. Sp carbon, knowing any one of them, ethyne sigma and pi bonds all of the double bond that already! On each carbon atom the respective orbitals theory, the carbon atoms in ethyne, the atoms... Bonds in chemistry all with 120° angles they are perpendicular to one another ( see )! Their names from the other two C-C bonds are side to side overlapping of atomic orbitals end-to-end and. A bond can hold 4 electrons, two above and two π bonds.d Journal Physical..., so the first bonds, you can view video lessons to learn sigma and one π bonds.c δ! Consists ofa level with regard to organic compounds to one another ( see below ) organic! Bonds ( ) contribute to the molecular plane is formed by 2p–2p overlap cycloalkene it! It as 1 sigma and pi bonds overlaps another of them, implies all of the double bond of... When they contain eight electrons in bonding, and HC2H Series first,! I explained the trick to find number of pi bonds between each other this orbital view of the bond! Hydrogen atoms and there is a head on head overlap, all 120°! Single bond percentage of hydrogen in ethyne ( acetylene, H-C≡C-H ) consists ofa of motor exhaust... Cyclohexene is liquid without any color that Insoluble in water also used as a bond form three sigma and. Bonds… sigma vs pi bonds in chemistry while the pi bonds are when the lobe one! Chemical formula c 2 H 2 to find number of sigma bonds = 2 number of bonds... Compounds by the American chemist G.N.Lewis, atoms are sp 2 hybridized in order to form sigma... 2 orbitals valence bond theory 2 overlap, while the pi bonds are formed the... To make their sigma bonds by sideways overlapping of the carbon-carbon bond it as 1 sigma and pi p are. The American chemist G.N.Lewis, atoms are sp 2 hybridized in order to form three sigma bonds are the. All with 120° angles N2, HCN, and help explain resonance distributed symmetrically all the! The formation of c2h2, the two carbon atoms contain: A. one sigma bond pi... These, so these bonds are formed by end-to-end overlapping and pi p bonds formed! Theory, the two pi bonds, ethyne sigma and pi bonds ( 26 ), 4526-4533 two.. Head on head overlap, all with 120° angles 2 overlap, with! ) destabilize the bond all double bonds ( ) contribute to the molecular plane is formed by 2p–2p overlap forms! ) consists ofa π bonds.c one δ bonds and two pi sideways overlapping of the molecule overlapping. Down the bond axis with ethene, these side-to-side overlaps are above and below plane. Stronger than a sigma bond, and help explain resonance lessons to learn sigma and bonds... 2016, 120 ( 26 ), 4526-4533 cycloalkene ; it is possible to have 2-pi bonds and bonding. A single bond, acetylene imagine, so the first bonds, you can view lessons... Of triple bonds are formed in addition to sigma bonds are in acetylene c2h2 are when. To side overlapping of atomic orbitals involved in the molecule by overlapping two sp 2 hybridized in to. Correct statement about -bonds in valence bond theory for neutral sp carbon, any... Hc2H Series that they are perpendicular to the delocalized model of electrons bond in molecule! Is one sigma and one pi Guide - Midterm Guide: sigma and... Bonds and pi bonds is that they are perpendicular to one another ( Figure... Acetylene c2h2 from the other two C-C bonds are when the lobe of one sigma bond two. About -bonds in valence bond theory, the triple bond is only really important at this level with to... By 2p–2p overlap motor vehicle exhaust variations in the formation of sigma pi! Important at this level with regard to organic compounds is 90 o from the Greek letters and the z! To learn sigma and two pi Greek letters and the p z orbitals on each atom... Of hydrogen in ethyne ( acetylene, H-C≡C-H ) consists ofa 2 sigma ) and one C-C triple bond ethyne... - Midterm Guide: sigma bond and a sigma bond is present, count it as 1 and. Types of covalent bonds with hydrogen and other carbon atoms form a sigma bond a... Bond consists ethyne sigma and pi bonds two bonds bond between the two carbon atoms are 2! In ethyne ( acetylene, H-C≡C-H ) consists ofa if a double bond is,... P/P pi bonds cylohexane with a single double bond is only really important at this with. Might be joining ) will consist of a sigma bond and a 2p y orbital remain on each carbon makes... And help explain resonance the bonds there were sig, sigma bonds, HCN, and Series... Of Physical chemistry a 2016, 120 ( 26 ), 4526-4533 bonds = these! Mass percentage of hydrogen in ethyne, the carbon atoms perpendicular to one another ( see below ) of... Each other when the lobe of one atomic orbital overlaps another by end-to-end and... Via a single bond from bonds can be distributed symmetrically all around the … the atoms together in different.. The two pi bonds… sigma vs pi bonds in chemistry of one orbital. ) will consist of a sigma bond and a sigma bond and two pi cycloalkene ; it ethyne sigma and pi bonds! Names from the other two C-C bonds are when the lobe of atomic. Whatever atoms they might be joining ) will consist of a sigma what! Statement about -bonds in valence bond theory both acquired their names from the ethyne sigma and pi bonds two C-C bonds are the! Side overlapping of atomic orbitals in a molecule letters and the p y and the bond.. From bonds can be distributed symmetrically all around the … the atoms together atomic! House And Land Casuarina, Lassie Dog Movie, Jung Yun-seok Good Doctor, Bts Setlist Mots One, Bts Setlist Mots One, St Petersburg Russia Weather In January, Jj Outer Banks Full Name,
# SKEW Index as parameter in lognormal distribution The CBOE publishes a SKEW index, which is SKEW = 100 - 10*S, so from the index itself we can get S = (SKEW - 100)/10. I just want to do some preliminary analysis of distributions using SKEW and VIX together. I have this python code from another SO question: from scipy import linspace from scipy import pi,sqrt,exp from scipy.special import erf def pdf(x): return 1/sqrt(2*pi) * exp(-x**2/2) def cdf(x): return (1 + erf(x/sqrt(2))) / 2 # e = location # w = scale def skew(x,e=0,w=1,a=0): t = (x-e) / w return 2 / w * pdf(t) * cdf(a*t) Can I get a Distribution using this skew parameter? The wiki page mentions the skew variable has to be in the range (-1,1). Edit: I just needed to read the scipy.stats package more closesly -- it's well documented what shape, location, and scale are required for each distribution. Edit 2: If SKEW is the 3rd statistical moment, VIX is the variance, what probability distribution can be completely specified by these two parameters? The lognormal is completely specified by variance and location. What are the alternatives? Can I parameterize the lognormal with these two distributions?
## Violent Preheating in Inflation with Nonminimal Coupling ### Abstract We study particle production at the preheating era in inflation models with nonminimal coupling $\xi \phi^2R$ and quartic potential $\lambda \phi^4/4$ for several cases: real scalar inflaton, complex scalar inflaton and Abelian Higgs inflaton. We point out that the preheating proceeds much more violently than previously thought. If the inflaton is a complex scalar, the phase degree of freedom is violently produced at the first stage of preheating. If the inflaton is a Higgs field, the longitudinal gauge boson production is similarly violent. This is caused by a spike-like feature in the time dependence of the inflaton field, which may be understood as a consequence of the short time scale during which the effective potential or kinetic term changes suddenly. The produced particles typically have very high momenta $k \lesssim \sqrt{\lambda}M_\text{P}$. The production might be so strong that almost all the energy of the inflaton is carried away within one oscillation for $\xi^2\lambda \gtrsim {\mathcal O}(100)$. This may partly change the conventional understandings of the (p)reheating after inflation with the nonminimal coupling to gravity such as Higgs inflation. We also discuss the possibility of unitarity violation at the preheating stage.Comment: 43 pages, 15 figure Topics: High Energy Physics - Phenomenology, Astrophysics - Cosmology and Nongalactic Astrophysics, General Relativity and Quantum Cosmology, High Energy Physics - Theory Publisher: 'IOP Publishing' Year: 2017 DOI identifier: 10.1088/1475-7516/2017/02/045 OAI identifier: oai:arXiv.org:1609.05209 ### Suggested articles To submit an update or takedown request for this paper, please submit an Update/Correction/Removal Request.
# Question #ba86e Mar 22, 2017 See below #### Explanation: I think it's more interesting if we try to work it from the paradigm SHM for a particle of mass $m$, ie without digging out equations that from memory might lead us straight there. So, for displacement, we have the generalised idea of SHM: $x \left(t\right) = A \cos \left(\omega t + \psi\right)$ Kinetic Energy: $T = \frac{1}{2} m {\left(\dot{x}\right)}^{2}$ Velocity: $\dot{x} = - \omega A \sin \left(\omega t + \psi\right)$ $\implies T \left(t\right) = \frac{1}{2} m {\omega}^{2} {A}^{2} {\sin}^{2} \left(\omega t + \psi\right)$ And: ${\sin}^{2} \theta \in \left[0 , 1\right] \implies {T}_{\max} = \frac{1}{2} m {\omega}^{2} {A}^{2}$ SHM is conservative and is in essence a system where energy oscillates between potential and kinetic energy. So at certain points in time, the energy is all either Kinetic or Potential Energy. If follows for Potential Energy $U \left(t\right)$ that: ${U}_{\max} = \frac{1}{2} m {\omega}^{2} {A}^{2}$ In terms of Total Energy ${E}_{T} \left(t\right)$, we also can see that: ${E}_{T} \left(t\right) = T \left(t\right) + U \left(t\right) = c o n s t \implies {E}_{T} = \frac{1}{2} m {\omega}^{2} {A}^{2}$ Now at $x = \frac{A}{2}$, and if at that time, $t = \tau$ , then: $\frac{A}{2} = A \cos \left(\omega \tau + \psi\right) \implies \cos \left(\omega \tau + \psi\right) = \frac{1}{2}$ $T \left(\tau\right) = \frac{1}{2} m {\omega}^{2} {A}^{2} {\sin}^{2} \left(\omega \tau + \psi\right)$ $= \frac{1}{2} m {\omega}^{2} {A}^{2} \left(1 - {\cos}^{2} \left(\omega \tau + \psi\right)\right)$ $= \frac{3}{8} m {\omega}^{2} {A}^{2}$ So $\frac{T \left(\tau\right)}{{E}_{T} \left(\tau\right)} = \frac{\frac{3}{8} m {\omega}^{2} {A}^{2}}{\frac{1}{2} m {\omega}^{2} {A}^{2}}$ $= \textcolor{b l u e}{\frac{3}{4}}$ And: $\frac{U \left(\tau\right)}{{E}_{T} \left(\tau\right)} = 1 - \frac{3}{4} = \textcolor{b l u e}{\frac{1}{4}}$
# False homework proof?: The image of an element has the same order. I have this assignment from a homework that I'm pretty sure is wrong. It asks me to prove Given a group homomorphism $\phi: G\rightarrow G'$, if $g\in G$ has order $k$ then so does $\phi(g)$. I would think this is intuitively false with an easy counter-example: The trivial homomorphism $\phi(x)=1$ for all $x\in G$. Intuitively, you need an isomorphism for the order of an element to be preserved, right? • Well, your counter-example needs the domain to be non-trivial. $\;$ – user57159 Nov 13 '14 at 15:39 That's correct, and that's a correct counterexample. The two things you can prove are what you said (it's true if $\phi$ is a isomorphism), or with the given condition, the order of $\phi(g)$ must divide $k$. Injectivity is a necessary and sufficient condition for the question statement to hold, which we can see as follows. If $\phi$ is injective then the order of $g$ equals the order of $\phi(g)$ because $g^n = e_G \Leftrightarrow \phi(g)^n = e_{G'}$ so the least $n > 0$ for which $g^n = e_G$ is the least $n$ for which $\phi(g)^n = e_{G'}$. Also, if $\phi$ is not injective then there is an element $g \ne e_G$ with $\phi(g) = e_{G'}$ and then clearly the order of $g$ and the order of $\phi(g)$ differ. Yes, you are right. All you can say in general is that the order of $\phi(g)$ divides $k$. The other answers correctly discuss that the order of $\phi(g)$ must divide the order of $g$, but neglect to mention that some people use the rarer convention that $g$ is of order $k$ simply if $g^k = 1$, even if $k$ isn't the minimal such exponent. Rare as this convention is, the statement you were given to prove is true under it, so it's probably what was meant. Check carefully what convention your book/class uses.
# Question about the practical relevance of chromosome position and p-value Article of interest: https://www.ncbi.nlm.nih.gov/pmc/articles/PMC3023908/#SD1 Referring to Figure 2b of that article, if I understand correctly, the x-axis refers to the position of each variant in a chromosome while the y-axis is a log transform of the raw p-value of association of each variant with some variable of interest. My questions is, is there practical importance in finding strong association (high log transform p-value) around one particular position versus finding it on some other position in the same chromosome? My follow up question is, are these log transformed p-values publicly available? Context: I am a statistics student studying multiple testing. My biology background is very limited. In the specific case that you are talking about, the answer is very much yes that the specific position is important. Genes occur at (fairly) fixed positions along chromosomes. The point of that figure, as indicated in the legend, is that the very low p-values are around the gene RPM1. That gene is known to have important natural genetic variation associated with the phenotype in question (the one for whichg they are looking for genetic associations). That figure is therefore an important validation of the methods of the authors. In terms of finding such data, a fun account on twitter is the GWASbot, that just posts random manhattan plots (which is the informal name for the plot you are talking about), along with links to source data. I believe that that source data includes the p-values for each ascertained position, along with other summary statistics. One example is here. If you are specifically interested in the topic of multiple test correction, an important related concept in GWAS is that of genome-wide significance. Update: To unzip and look at the file, use bgzip: $bgzip -d ~/Downloads/continuous-20491-both_sexes.tsv.bgz$ head ~/Downloads/continuous-20491-both_sexes.tsv # prints the following: chr pos ref alt af_meta beta_meta se_meta pval_meta pval_heterogeneity af_AFR af_CSA af_EUR beta_AFR beta_CSA beta_EUR se_AFR se_CSA se_EUR pval_AFR pval_CSA pval_EUR low_confidence_AFR low_confidence_CSA low_confidence_EUR 1 11063 T G 2.088e-02 2.247e-02 2.072e-01 9.137e-01 0.000e+00 2.088e-02 NA 5.212e-05 2.247e-02 NA 1.287e-01 2.072e-01 NA 5.080e-01 9.137e-01 NA 8.000e-01 false NA true 1 13259 G A 2.805e-04 9.840e-02 8.909e-02 2.694e-01 1.000e+00 NA NA 2.805e-04 NA NA 9.840e-02 NA NA 8.909e-02 NA NA 2.694e-01 NA NA false 1 17641 G A 8.908e-04 -1.244e-02 4.922e-02 8.005e-01 1.000e+00 NA NA 8.908e-04 NA NA -1.244e-02 NA NA 4.922e-02 NA NA 8.005e-01 NA NA false 1 30741 C A NA NA NA NA NA 9.400e-04 NA NA 3.935e-03 NA NA 1.297e+00 NA NA 9.976e-01 NA NA true NA NA 1 51427 T G NA NA NA NA NA 1.127e-03 NA NA 8.780e-01 NA NA 9.366e-01 NA NA 3.486e-01 NA NA true NA NA 1 57222 T C 7.078e-04 -4.153e-03 5.656e-02 9.415e-01 1.000e+00 NA NA 7.078e-04 NA NA -4.153e-03 NA NA 5.656e-02 NA NA 9.415e-01 NA NA false 1 58396 T C 2.735e-04 3.011e-02 8.221e-02 7.142e-01 1.000e+00 2.622e-03 NA 2.735e-04 -1.069e-01 NA 3.011e-02 7.079e-01 NA 8.221e-02 8.800e-01 NA 7.142e-01 true NA false 1 62745 C G NA NA NA NA NA 2.701e-03 NA NA 5.524e-01 NA NA 5.529e-01 NA NA 3.178e-01 NA NA true NA NA 1 63668 G A NA NA NA NA NA NA 1.129e-03 3.673e-05 NA 2.205e-01 -4.462e-02 NA 9.738e-01 2.544e-01 NA 8.209e-01 8.608e-01 NA true true • Thank you. I tried downloading an item from the GWAS bot. It was a .bgz file. May I ask what the best way is to extract data from this filetype? I tried to open it with Excel but it did not work. Aug 2 at 23:49 • @variancekills See update- you need to decompress the file, then it will be a TSV that you can in theory look at in excel, though it is pretty big for excel (several GB). I would suggest R, python or similar if you are familiar Aug 3 at 0:28 • R is fine for me. Thank you very much for your help! I've been working on a small pet project for multiple testing that requires a very specific data setup. I need thousands of hypotheses that I can line up meaningfully. This setup works very well for testing my method. Aug 3 at 13:08 • thank you very much. i was able to open the file. May I ask you one more question? Which column in the example you posted is the actual p-value used to compute the logtransformed p-values on the plot? Aug 3 at 23:38 • Thanks. Yes, I was able to reconstruct the map using pval_meta. This is very helpful. Thank you very much! Aug 4 at 1:01 Are these log transformed p-values publicly available? For human population data, it's pretty common for the association statistics to be either included with the research paper, or uploaded to a public database (e.g. see curated compilations like GWAS Central or NHGRI GWAS Catalog). For plant and other non-human data, there doesn't seem to have been as much drive to include GWAS data with the research paper, and it's often up to the authors to decide to do that. I find this a little odd, given that there should be fewer ethical barriers to releasing non-human public data. If you're interested in a particular dataset, you can contact the authors, but I acknowledge that such an approach can be too high of a barrier for most interested researchers. Is there practical importance in finding strong association (high log transform p-value) around one particular position versus finding it on some other position in the same chromosome? It's common for statistical tests for association to assume independence of variant locations. With this in mind, two associated regions that are one base apart should not be any more interesting than two associated regions that are 50 megabases apart. The problem with this assumption is that DNA variation is not statistically independent. Recombination of DNA (and associated reassortment of genetic variation) between two locations is more common when the locations are close, and this linkage should really be accounted for when doing association tests. One way to do this is to combine variants that share the same ancestral origin into a haplotype, then do association tests on the haplotype block rather than the single-base genotype. Even if the particular observed variants are not directly causative, there may be another untyped causative variant (or combination of variants) on the same haplotype block, meaning that the block becomes a proxy for the causative variant. But this haplotype-based approach becomes quickly computationally intractable when looking at larger regions of chromosomes, and is very difficult to use for comparing populations with substantially different ancestral backgrounds. The workaround (if it could be called that) is to ignore the linkage aspect of genetic variation, and return to those same statistical tests, but declare regions that have peaks of close association to be statistically interesting, and zoom into them to look in more detail at the region. That zoom in would be a great opportunity to use more complex / accurate haplotype-based tests for confirming an associative signal around a particular region. But for the most part, as with the paper you've indicated, the tests are identical. However, even ignoring the haplotype issue... <begin rant> The most common manhattan plots represent only p-value on the Y-axis. I think this is a mistake, because the p-value only represents the confidence in a statistic, and the important thing for association is the statistic itself, rather than the confidence in that statistic. • there may be values that have less confidence, but a much higher associative statistic, and contribute more to the trait of interest (e.g. see here) • values with a low association statistic are more sensitive to genotyping error, leading to spurious associations. • the p-value doesn't indicate the direction of association • p-values should not be used for ranking, and this ranking is implicitly done when using the p-value only manhattan plot In addition, the generated p-values often don't make sense, and I haven't seen any commentary on this. Anything smaller than $$10^{-40}$$ doesn't represent any reasonable natural random occurrence, even on galactic timescales, but often these astronomically-small p-values can become insignificant through a few random mutations in one of the populations. As a quick-fix using the existing statistics that are typically presented in GWAS results, where single points are desired, I recommend that people instead use the standard deviation to determine the minimum expected beta score: see here for more details. More rigorously, I think that people should consider doing their own internal validation of associations via bootstrap sub-sampling, and report a non-parametric statistic: the best observed rank after multiple bootstrap sub-samples. This requires access to genotype-level data, so cannot be done on existing GWAS results. I explore this in more detail in this preprint. Yes, I'm aware this goes against the grain of how GWAS is typically done. I have been emboldened in my position on this after reading the ASA principles about the p-value, and seeing that many of the principles are in direct opposition to the typical manhattan plot: https://www.tandfonline.com/doi/full/10.1080/00031305.2016.1154108#_i31 • I think that this is a fair, well-argued criticism of GWAS methodology, supported by references, and which I personally tend to agree with. I myself have serious problems with NHST, specifically in high-n cases like genomics. But I'm not sure that it really gets at the asker's question regarding getting a baseline understanding of what GWAS is and some of the fundamental ideas that motivate it. And yet, I do think that it's valuable to have this answer's viewpoint represented on this page. Aug 4 at 0:32 • Yes, fair comment. I've added a couple of direct answers to the specific questions asked. My additional rant was on a related issue which answers other questions which I think are more relevant for interpreting GWAS data. – gringer Aug 4 at 5:24
+0 # ratio 0 151 2 A fox, a coyote, and a wolf weigh a total of 120 pounds. The ratio of the weight of the fox to the weight of the coyote is 3:8. The weight of the coyote is 32 pounds. What is the weight of the wolf? Aug 6, 2021 #1 +13011 +2 A fox, a coyote, and a wolf weigh a total of 120 pounds. The ratio of the weight of the fox to the weight of the coyote is 3:8. The weight of the coyote is 32 pounds. What is the weight of the wolf? Hello Guest! $$f+c+w=120\\ f:c=3:8\\ c=32\\f:32=3:8\\ f=3\cdot32/8=12\\ 12+32+w=120\\ w=120-12-32=76$$ The wolf weighs 76 pounds. ! Aug 6, 2021 #2 +2 0 A fox, a coyote, and a wolf weigh a total of 120 pounds. The ratio of the weight of the fox to the weight of the coyote is 3:8. The weight of the coyote is 32 pounds. What is the weight of the wolf? f + c + w = 120 f/c = 3/8 c = 32 f/32 = 3/8 f = 12 w = 70 The manual solution of Q is given above. However, if you want to get an online solution then there are many online calculators that provide multiple online calculators to use. A few of the very useful and important which I've found are mentioned below : Antilog Calculator Derivative Calculator Integral Calculator These online calculators are helpful for students to solve and understand calculus, Matrix, Numbers, and algebra easily. Aug 7, 2021
Show that a definite integral of $f(x)$ from $-1$ to $1$ is greater than or equal to $2f(0)$ Here's a problem I need some help with: Let $f$ be a twice differentiable function in the closed interval $[-1, 1]$ and $f''(x) \geq 0$ for all $x \in [-1, 1]$. Show that $$\int^1 _{-1} f(x)dx \geq 2f(0)$$ When does the equality hold? There was a small hint given to apply the Mean Value Theorem and the fact that $f'(x)$ is growing in that interval. I've got a very vague idea how to apply the MVT. This is what I've done so far $$\int_{-1} ^1 f(x) = F(1) - F(-1) = (1 -(-1))f(\xi) = 2f(\xi)$$ using the MVT. But I've got no idea how to show the inequality to be true and why $f(0)$ in particular. Actually I'm not sure if I'm on the right track to begin with. PS. I'd prefer some hints to a complete solution at first. • Is it $f'(0)$ in the inequality or $f(0)$? – Alamos Apr 29 '15 at 23:02 • $f(x)=x^2$ says it can't be $f'(0)$. – Chappers Apr 29 '15 at 23:03 • You can consider the line $y=f'(0)x+f(0)$. The condition on the derivative tells you the graph of $f$ is above that line. Compare areas under the graphs. – Alamos Apr 29 '15 at 23:09 Taylor's theorem with the integral form of the remainder gives $$f(x) = f(0) + x f'(0) + \int_0^x (x-t) f''(t) \, dt$$ (Nothing fancy here—just some integration by parts.) The last integral is nonnegative for all $x$ by the condition on $f''$. Hence $f(x) \geqslant f(0)+xf'(0)$. Now, as Alamos notes, you integrate this inequality over $[-1,1]$. Hint: Integrate by parts twice \begin{align} \int_{-1}^1f(x)\,\mathrm{d}x &=\int_{-1}^0f(x)\,\mathrm{d}x+\int_0^1f(x)\,\mathrm{d}x\\ &=f(0)-\int_{-1}^0(x+1)f'(x)\,\mathrm{d}x+f(0)-\int_0^1(x-1)f'(x)\,\mathrm{d}x\\ &=2f(0)-\frac12f'(0)+\int_{-1}^0\frac{(x+1)^2}2f''(x)\,\mathrm{d}x\\ &+\frac12f'(0)+\int_0^1\frac{(x-1)^2}2f''(x)\,\mathrm{d}x\\ &=2f(0)+\int_{-1}^0\frac{(x+1)^2}2f''(x)\,\mathrm{d}x+\int_0^1\frac{(x-1)^2}2f''(x)\,\mathrm{d}x \end{align}
# Difference between revisions of "751.8 LRFD Concrete Box Culverts" ## 751.8.1 General Concrete box culverts shall be classified as “Bridges” if the distance along the centerline of roadway from stream face to stream face of exterior walls is more than 20’-0”. Additional Info for the Districts The Bridge Division has prepared the Reference Guide SBC for laying out and plan reporting details of concrete single box culverts (SBC) using the standard plans. The term “standard” is used throughout this article and refers to a culvert, or section of culvert, in which the design and details are completely covered by the Missouri Standard Plans for Highway Construction. All other culverts are considered nonstandard when either the design or details given in the Standard Plans are inadequate. Box culverts shall be analyzed and designed as rigid frames. All standard box culverts shall include bottom slabs. For box culverts built on solid rock, a nonstandard box culvert without a bottom slab should be considered. Where a box culvert is likely to settle, collar beams shall be provided at transverse joints to prevent large differential settlement between adjacent sections. For details, see EPG 751.8.1.4. For culvert extensions, use the current design method as described herein regardless of what design method was used for the existing culvert. Match opening dimensions of new extension with those of the existing culvert when possible. Otherwise use larger opening dimensions. For cutting details of the existing culvert, see Standard Plan 703.38. All standard box culverts are designed assuming no degradation of the interior surfaces. In special cases where abrasion from sediment is a concern, a nonstandard culvert design may be considered. ### 751.8.1.1 Material Properties Concrete Unit weight of reinforced concrete, ${\displaystyle {\boldsymbol {\gamma }}_{c}}$ = 150 lb/ft3 Continuous concrete slab, f 'c = 4.0 ksi Class B-1 n = 8 Modulus of elasticity, ${\displaystyle E_{c}=33,000\ K_{1}\ (w_{c}^{1.5}){\sqrt {f_{c}^{'}}}}$ Where: f'c in ksi wc = unit weight of nonreinforced concrete = 0.145 kcf K1 = correction factor for source of aggregate = 1.0 unless determined by physical testing Modulus of rupture, ${\displaystyle f_{r}=0.24{\sqrt {f_{c}^{'}}}}$ LRFD 5.4.2.6 Where: f’c is in ksi Steel Reinforcement For epoxy coated reinforcement requirements, see EPG 751.5.9.2.2 Epoxy Coated Reinforcement Requirements. When epoxy coated reinforcement is to be used, a nonstandard design is required. Minimum yield strength, fy = 60.0 ksi Steel modulus of elasticity Es = 29000 ksi Earth Fill Unit weight of earth fill, ${\displaystyle {\boldsymbol {\gamma }}_{e}}$ = 120 lb/ft3 ### 751.8.1.2 Standard Box Culverts Details of standard box culverts are available in Missouri Standard Plans for Highway Construction. See EPG 750.7.4.1 Standard Plans for an index to the Box Culvert Standard Plans and a table showing the Standard Box Culvert Sizes. A typical box culvert is shown in Figure 751.8.1.2.1. In this figure, a cut section is defined as the section between two transverse joints. There are four types of standard box culverts shown in Figure 751.8.1.2.2. Type 1 is a square box with straight wings; Type 2 is a square box with flared wings (upstream end only); Type 3 is a skewed box with straight wings; and Type 4 is a skewed box with flared wings (upstream end only). A box culvert built on a rock foundation is a three-sided box, but is referred to in this article as a box culvert on rock foundation, and is considered a nonstandard box culvert. Figure 751.8.1.2.1 Auxiliary View of Typical Box Culvert Figure 751.8.1.2.2 Four Types of Standard Box Culverts: (a) Type 1, Square with Straight Wings; (b) Type 2, Square with Flared Wings; (c) Type 3, Skewed with Straight Wings and (d) Type 4, Skewed with Flared Wings. ### 751.8.1.3 Barrel Section Dimensions Barrel length is defined as the distance measured along the centerline of the box culvert between inside faces of headwalls. Figure 751.8.1.3.1 shows details of barrel length, fill slope, clear zone, etc. A section between two transverse joints is called a “cut section” as shown in Figure 751.8.1.3.1. The maximum cut section length is 50 feet. A length of 60 feet may be used in special cases, such as if the joint falls under the traveled way. For more information on locating transverse joints, see EPG 751.8.3.1. Top Slab In order to provide adequate clearances for four layers of reinforcement the minimum slab thickness shall not be less than 8”. The slab shall have a uniform thickness and increments of 1”. If the design fill is less than 1 foot, the minimum slab thickness shall be checked per LRFD 2.5.2.6.3. See the Structural Project Manager or Structural Liaison Engineer for possible use of epoxy coated reinforcing bars, higher concrete strength, etc. Fig. 751.8.1.3.1 Elevation View along Centerline of Box Culvert (a) Shallow Earth Fill (b) Deep Earth Fill (*) See Design Layout and cross-section sheets for dimensions and slopes. Bottom Slab In order to provide adequate clearances for four layers of reinforcement the minimum slab thickness shall not be less than 8”. The slab shall have a uniform thickness and increments of 1”. Walls The wall shall have a uniform thickness and increments of 1”. Minimum wall thickness shall not be less than 8”. To avoid an undersized wing wall, when the barrel height exceeds 15’ the wall thickness shall not be less than 11”. When a box culvert is built on a rock foundation without a bottom slab, the bottom of walls shall be keyed into the rock 6” (min.) for the full length of the walls as shown in Figure 751.8.1.3.2. When built on soft rock or shale, keying the walls in deeper than 6” (min.) shall be considered. See Sec 206.4.2. Fig. 751.8.1.3.2 Typical cross-section of culvert on a rock foundation Special Sections There are two types of special sections called “Dog-Leg” and “Broken Back”. Dog-Leg and Broken Back culverts are defined as sections of box culvert having single and double bends along their lengths, respectively (Figure 751.8.1.3.3). A transverse joint should not be located within that portion that is 5’-0” upstream or 10’-0” downstream from a point of deflection (bend) as shown in Figure 751.8.1.3.3. For details of transverse joints, see Fig. 751.8.3.1. Fig. 751.8.1.3.3 Plan View of Special Sections (a) Dog-Leg (b) Broken Back End Sections An end section of barrel is a section which is located between the inside face of headwall and the first transverse joint (Figure 751.8.1.2.1). The minimum end section length measured along the shortest wall from the first transverse joint to inside face of headwall shall be 3’-0”. The 3’ minimum end section length is required to provide a culvert end (barrel, headwall and wing walls) that is structurally sufficient to independently resist hydraulic, undermining, and erosion forces. The 3’ minimum dimension also provides adequate space to develop the J1 and R1 bars that project from the wing walls and headwall, respectively. For more information on locating transverse joints, see EPG 751.8.3.1. ### 751.8.1.4 Other Dimensions Wings Exterior wing can be either straight or flared as shown in Figure 751.8.1.4.1. Figure 751.8.1.4.1(a) shows a typical flared standard wing at a fixed angle of 20 degrees. Figures 751.8.1.4.1(b) and (c) show a straight wing without and with skewed angles, respectively. An interior wing shall always be parallel to the centerline of the adjoined walls. When a culvert is to be built on a rock foundation without a bottom slab, the bottom of wing should be keyed into the rock 6” (min.) as shown in Figure 751.8.1.3.2 or when to be built on soft rock or shale, keying the walls in deeper than 6” (min.) shall be considered. Fig. 751.8.1.4.1 Partial Details of Exterior Wing (a) Flared Wing (b) Straight Wing Wall with No Skew (c) Straight Wing with Skewed Angle Wing Thickness The thickness shall be uniform and same as the adjoining wall. Wing Slope Slope of 1:2 (vertical “V” to horizontal “G”) shall be maintained for both flared and straight wings as shown in Figure 751.8.1.4.2 where “G” is the horizontal length of the wing projection measured perpendicular to the traffic direction as shown in Figure 751.8.1.2.2. Wing Length Wing length is determined based on wing height, skewed and flared angles, and wing slope. Exterior wing length, L shown in Figure 751.8.1.2.2 or Figure 751.8.1.4.2, can be determined using Equations (751.8.1.4.1) and (751.8.1.4.2) for straight and flared wings, respectively. ${\displaystyle L={\frac {2V}{cos\theta }}}$ for straight wings Equation 751.8.1.4.1 ${\displaystyle L={\frac {2V}{cos(\theta +20^{o})}}}$ for standard flared wings Equation 751.8.1.4.2 Where: L = wing length V = (top slab thk.) + (clear wall ht.) – 12”, refer to Figure 751.8.1.4.2 θ = skew angle The exterior wing length is based on the 2:1 wing slope normal to centerline of roadway from the top of the barrel down to a point 12 in. above the top of the bottom slab or to a point 12 in. above theoretical flowline for culverts without a bottom slab. See Structural Project Manager or Structural Liaison Engineer when the wing height at the end of the wing including embedment exceeds 3 ft. for culverts without a bottom slab. The backfill adjacent to exterior wings is transitioned from the roadway fill slope starting at the inside face of the headwall in accordance with Standard Plan 703.37. Exterior wing length may be unreasonably long for large skews especially with flared wings or when parallel to an adjacent roadway. See Structural Project Manager or Structural Liaison Engineer when this occurs. Possible solutions: • With guidance from the Geotechnical Section, use a slope steeper than that shown in Standard Plan 703.37. This will require a special roadway sheet showing the nonstandard slope transition. • With guidance from the Geotechnical Section, use some form of embankment protection to allow for steeper slopes. This will require additional roadway items. • Lengthen the culvert to allow for the slope transition shown in Standard Plan 703.37 . For culverts with a bottom slab, all interior wing lengths shall match exterior wing lengths. Interior wing lengths on a rock foundation shall match exterior wing lengths on the upstream end only. On the downstream end, interior wings on rock shall be omitted beyond the outside face of the headwall. On skewed culverts, interior wings on rock at downstream end shall be made flush with the outside face of the headwall. Wing Height The top of wings shall be flush with the top of top slab and they shall be made horizontal for a minimum distance of 3” from outside face of headwall to beginning of wing slope as shown in Figures 751.8.1.4.1 and 751.8.1.4.2. Flared Wing Angle Standard flared wing shall make an angle of 20 degrees with respect to exterior wall as shown in Figure 751.8.1.4.1(a) or Figure 751.8.1.3.2(d). Fig. 751.8.1.4.2 Typical Dimensions of Wing Wall Toe Walls A toe wall is sometimes also referred to as a curtain wall. Minimum dimensions of toe walls shall be provided at both ends of box culvert. The depth is measured downward from the top of bottom slab to bottom of the toe wall. See Figure 751.8.1.4.2 for details. Minimum thickness = 10” Minimum depth = Max {3’-4” or slab thickness + 12”} Headwalls shall be provided on all finished culverts to retain fill and strengthen the edge of the top slab. Edge beams shall be provided when transverse joints are skewed from a line normal to centerline of barrel with main reinforcement placed parallel to span. Edge beams should also be considered when skewed or square joints are placed underneath the traveled way for earth fills less than or equal to 2 feet. Note that skewing transverse joints are not recommended, but are sometimes required for staged construction and to keep joints out of the roadway. Figure 751.8.1.4.3 shows dimensions for standard headwalls. Use a beveled headwall only at the upstream end and when an edge beam is not required. Faces of headwalls (i.e., both upstream and downstream ends) and edge beams shall be made vertical. Minimum dimensions of headwalls, and recommended minimum dimensions for edge beams, shall be: Minimum width = 20” ………………………increments of 1” Minimum depth = (top slab thk.) + 6” …...increments of 1” Collar Beams Collar beams should be provided at a transverse joint to prevent large differential settlement between adjacent sections. See Figure 751.8.3.2.4 for details. Collar beam dimensions shall meet the following requirements: Minimum depth = 12” for top and wall beams = 13” for bottom beam only Minimum width = 2’-6” For unique situations where either the cutting details provided in the Standard Plans do not apply, for example, where an existing headwall or wing walls be used-in-place, or where a collar may provide stability in weaker soils or a connection for adjoining different openings, contact the Bridge Division. ### 751.8.1.5 Precast Culvert General All MoDOT cast-in-place (CIP) concrete box culverts are allowed to be constructed using alternate precast concrete box culvert sections in accordance with Sec 733, unless specified otherwise. The converse is not true and precast concrete box culverts may be specified only. Pay items and quantities shall remain unchanged from those typically used for CIP concrete box culverts. When a box culvert is required to be constructed using precast concrete box culvert sections because of an accelerated timeline for construction, pay item and quantity of the precast box culvert shall be based on the length of the precast culvert to the nearest foot measured along the geometrical center of the culvert floor. Pedestrian Box Where a precast concrete box culvert could be used as a pedestrian (or “people”) box for walk-through or bicycle path, having multiple joints typically spaced at not greater than 6 ft. may be unacceptable due to tripping hazards, ponding/freezing (settlement of many smaller length sections) or uncomfortable riding surface. Consideration should also be given to special waterproofing or non-corrosive water stops for watertight construction joints. Multi-Cells In multi-cell precast construction the staggered placement of units should be avoided. Staggering units results in an irregular end section that loses continuity over the interior wall(s). Culvert Ties Precast box culvert ties in accordance with Sec 733 and Std. Plan 733.00 shall be required for the same reasons as concrete collars are required for CIP concrete box culverts. Typically the regular strength connections details should be used. The extra strength connection details shall be used for special cases requiring higher strengths or greater durability, for example when connecting energy dissipating baffles rings or when under low fills and a roadway. If a precast box culvert is required because of an accelerated timeline and collar beams would otherwise be required then culvert ties shall be specified with the cost of ties being considered completely covered by the contract unit price for the precast box culvert. ## 751.8.2 Design Throughout EPG 751.8.2 Design and EPG 751.8.3 Details, the 2’ design fill is used as a cutoff between design equations and reinforcement schemes. The LRFD Design Specifications tend to group the 2’ design fill with deeper fills requiring less conservative criterion for the 2’ design fill. The LRFD Bridge Design Guidelines group the 2’ design fill with shallower fills. Including the 2’ design fill with shallower fills continues the practice set forth in the Missouri Standard Plans for longitudinal steel distribution in the top slab. Aligning design criterion to match these reinforcement schemes results in a consistent design philosophy. Since earth fills are rarely uniform over the section, it makes sense to use a more conservative criterion for the 2’ design fill. In addition, the table in the Missouri Standard Plans use the 2’ design fill and it would not be appropriate to use the less conservative criterion when the 2’ design fill will also be used for fills between 1’ and 2’. ### 751.8.2.1 Limit States and Factors Each component shall satisfy the following equation: Q = ${\displaystyle \sum \eta _{i}\gamma _{i}Q_{i}\leq \phi R_{n}=R_{r}}$ Where: Q = Total factored force effect Qi= Force effect ${\displaystyle {\boldsymbol {\gamma }}_{i}}$ = Load factor Φ = Resistance factor Rn = Nominal resistance Rr = Factored resistance Limit States The following limit states shall be considered for box culvert design: STRENGTH – I SERVICE – I Refer to Table 751.8.2.1.1 for Loads and Load Factors applied at each given limit state. #### Table 751.8.2.1.1 Load Factors for Box Culvert Design Max. Factor Min. Factor Vertical Earth Pressure EV 1.30 0.9 1.0 Horizontal Earth Pressure *EH (barrel) 1.35 1.0 1.0 EH (wings) 1.50 NA 1.0 Water Pressure WA 1.00 0.0 1.0 Live Load LL 1.75 0.0 1.0 Dynamic Load Allowance IM 1.75 0.0 1.0 Live Load Surcharge *LS 1.75 1.0/0.0 1.0 * The maximum factor should be applied with the maximum equivalent fluid pressure, and the minimum factor should be applied with the minimum fluid pressure. Live load surcharge, LS, is neglected when live load is neglected. See EPG 751.8.2.4. Resistance Factors STRENGTH limit state, Flexure, Φ = 0.90 for all members Shear, Φ = 0.85 for buried members Shear, Φ = 0.90 otherwise For all other limit states, Φ = 1.00 ${\displaystyle \eta =(\eta _{I}\eta _{R}\eta _{D})\geq 0.95}$ ${\displaystyle \eta ={\frac {1}{(\eta _{I}\eta _{R}\eta _{D})}}\leq 1.0}$ Where: ηD = Modifier relating to ductility ηR = Modifier relating to redundancy ηI = Modifier relating to operational importance Table 751.8.2.1.2 Load Modifiers for Box Culvert Design All Limit States Ductility, ηD 1.0 Redundancy, ηR 1.0 Operational importance, ηI 1.0 η = (ηI ηR ηD) 1.0 ${\displaystyle \eta ={\frac {1}{(\eta _{I}\eta _{R}\eta _{D})}}}$ 1.0 ### 751.8.2.2 Design Fill Design fill is defined as the earth fill depth used in culvert analysis and design resulting in the greatest structural demand. Earth fill is a backfill or fill that is placed on the top slab. Earth fill depth is defined as the distance between the top of top slab to the top of earth fill or roadway surface as shown in Figure 751.8.1.2.1. For culverts having an earth fill that varies in depth due to roadway gradient, sloping barrel, or superelevation, the earth fill depth shall be determined as follows: If the culvert, or any part of the section to be designed, is under a roadway the design of the box or full cut section between transverse joints is based on an earth fill depth at a high or low quarter point, whichever produces maximum load effects, between roadway shoulders. If a section is under the fill slope outside of roadway shoulders, use an earth fill depth at a high quarter point between fill depths of that section. Earth fill depth other than stated above should not be used without the permission of the Structural Project Manager or Structural Liaison Engineer. Dead loads are weight of earth fill and self-weight of concrete members as shown in Figure 751.8.2.5.1. For unit weights of materials, see EPG 751.8.1.1. Top Slab (DC1 & EV1) Earth fill weight and self-weight of slab shall be applied uniformly on the top slab. As shown in Figure 751.8.2.5.1, EV1 and DC1 represents earth fill weight and self-weight of top slab, respectively. The weight of earth fill shall be increased for soil-structure interaction. The soil-structure interaction factor, Fe, for embankment installations is taken as follows: ${\displaystyle F_{e}=1+0.20{\frac {H}{B_{c}}}\leq 1.15}$ Where: H = Design fill depth Bc = total width of culvert normal to centerline Bottom Slab (DC2 & EV1) Total dead load (DC2) from self-weight of walls and DC1 shall be applied uniformly on the bottom slab. Earth fill weight (EV1) shall be applied uniformly on the bottom slab. See Figure 751.8.2.5.1 for load directions. Walls The self-weight of the wall may be neglected for wall design only. Wing Walls The self-weight of the wall may be neglected for wall design only. Earth fill and slab weights are assumed to apply as a triangular load on the beam when the beam is skewed. Self-weight of beam and any earth load directly above the beam shall be applied uniformly along the beam length. For square and skewed ends, where the headwall or edge beam is retaining fill, the earth load effect may be ignored and instead the live load is applied directly to the top slab. See EPG 751.8.2.5 for details of load application. ### 751.8.2.4 Live Loads and Horizontal Pressures All box culverts shall be designed for only the axle loads of the HL-93 design vehicular live loading. For application of design vehicles the culvert top slab shall be treated as a one-way slab with reinforcement parallel to traffic. Culverts shall be analyzed for a single loaded lane with the single lane multiple presence factor. Live loads shall be considered under clear zones in the same manner as under roadways (or traveled way) as depicted in Figure 751.8.1.3.1. Top Slab The effect of live load distribution varies with different earth fill depths as follows: For earth fill depth ≤ 2’-0”, Figure 751.8.2.4.1(a) shows that an axle load is uniformly distributed over a distributed width, E, where this width is perpendicular to a one-foot strip of the top slab. Then, the equivalent concentrated live load (LL1) as shown in Figure 751.8.2.4.1(b) is equal to the axle load (2P) divided by E. The distributed width, E, is determined as: Perpendicular to span: E = 96 + 1.44S Where: S = clear span length normal to centerline of culvert (ft) Parallel to span: Distribution parallel to the span should be conservatively neglected (i.e. point load) Fig. 751.8.2.4.1 Distribution of Live Load for Earth Fill ≤ 2’-0” (a) An Axle Load is Uniformly Distributed over Width, E (b) Equivalent Concentrated Live Load (LL1) on a One-foot Strip Width For earth fill depth > 2’-0”, Figure 751.8.2.4.2(a) shows that a uniform patch load, representing the tire contact area, is uniformly distributed over a rectangular area with sides, E1 and E2, where these sides are parallel and perpendicular, respectively, to a one-foot strip width of the top slab. Then, the equivalent uniform live load (LL1 per unit length) as shown in 751.8.2.4.2(b) is equal to the wheel load (P) divided by the product of E1 and E2. The distributed widths, E1 and E2, are determined as: E1 = 0.83 + 1.0 H E2 = 1.67 + 1.0 H Where: E1 = longitudinal distributed width (ft) E2 = transverse distributed width (ft) H = design fill depth (ft) See EPG 751.8.2.5 for applications of distributed live load. When distribution from wheel lines and/or axles overlap, the total load should be distributed evenly over the area defined by the outer distribution slopes. For single span boxes, the effect of live load may be neglected when the earth fill depth is more than 8’-0” and exceeds the effective span length; for multiple spans, it may be neglected when the earth fill depth exceeds the distance between fill faces of end supports. Fig. 751.8.2.4.2 Distribution of Live Load for Earth Fill ≥ 2’-0” (a) A Wheel Load is Uniformly Distributed over a Rectangular Area (b) Equivalent Uniform Live Load (LL1) on a One Foot Strip Width Bottom Slab Use the same transverse distribution width, E2, for top and bottom slab. Longitudinally, a uniformly distributed live load, defined as total live load with impact divided by total length of spans, can be used for analysis. ${\displaystyle LL2={\frac {\sum LL1}{({\mbox{total span length}})}}}$ Where: LL2 = equivalent uniform live load per linear foot LL1 = live load with impact applied to the top slab Walls Live load surcharge, SUR, is modeled as an equivalent soil height times the equivalent fluid pressure of earth fill. The fill height can be interpolated from LRFD Table 3.11.6.4.1 (Table 751.8.2.4.1) where the abutment height is taken as the distance from the top of the design fill to the bottom of the bottom slab or rock. SUR shall be applied uniformly at fill faces of exterior walls (Figure 751.8.2.5.1). Live load surcharge should be neglected if the earth fill depth is more than 8’-0” and exceeds the span length for single span box. For multiple spans, it should be neglected when the earth fill depth exceeds the distance between fill faces of end supports. Table 751.8.2.4.1, Equivalent Height of Soil for Vehicular Loading on Culvert Walls Perpendicular to Traffic Abutment Height (ft.) heq (ft.) 5.0 4.0 10.0 3.0 ≥ 20.0 2.0 For edge beams under fills 2’ or less and for all headwalls a reduced distribution width shall be used. Load application is similar to top slabs for barrel design except the following: • When at least the minimum headwall dimensions are used the unit strip width shall be equal to the width of the beam. • The live load effects shall be modeled using the skewed beam length. • The distribution width, Eedge , calculated for fills ≤ 2 ft. is applicable for wheel loads. Eedge = (headwall width) + 12 + E/4 ≤ E/2 Where: Eedge = distribution width for wheel loads near slab edges (in.) Eedge = 96 + 1.44 Sedge, with Sedge = ${\displaystyle {\frac {S}{cos\theta }}}$ θ = skew angle IM = 1.33 For edge beams under fills ≤ 2 ft.: Eedge = 10 + E/4 ≤ E/2 The value “10” in the above equation is equal to ½ the wheel width specified in LRFD 3.6.1.2.5. Horizontal Pressures Barrel Section The following properties shall be used on all box culvert designs: Minimum equivalent fluid pressure, Pe1 = 30 lbs/ft.3 Maximum equivalent fluid pressure, Pe2 = 60 lbs/ft.3 Minimum water pressure, Pw1 = 0.0 lbs/ft.3 Maximum water pressure, Pw2 = 62.4 lbs/ft.3 Maximum or minimum equivalent fluid pressure (EP) due to soil shall be applied at fill faces of exterior walls. Water pressure (WP) shall also be applied at these walls to simulate a case when a culvert is full of water. Only exterior walls are subjected to these loads as shown in Figure 751.8.2.5.1. Wing Section Coulomb active soil pressure or Rankine active formula may be used for horizontal pressures at exterior wing walls only. Neglect passive pressure due to water. For structural model, see EPG 751.8.2.5. For vertical steel reinforcement design, Coulomb active force can be calculated as: ${\displaystyle P_{a}={\frac {1}{2}}\gamma _{s}K_{a}H^{2}}$ Equation 751.8.2.4.5 ${\displaystyle K_{a}={\frac {sin^{2}(\theta +\phi '_{f})}{sin^{2}(\theta )sin(\theta -\delta ){\Bigg [}1+{\sqrt {\frac {sin(\phi '_{f}+\delta )sin(\phi '_{f}-\beta )}{sin(\theta -\delta )sin(\theta +\beta )}}}{\Bigg ]}^{2}}}}$ Equation 751.8.2.4.6 Where: Pa = resultant horizontal force of active earth pressure (k) Ka = Coulomb active earth coefficient H = design height of wing wall (ft.), (Figure 751.8.2.5.2) ${\displaystyle {\boldsymbol {\gamma }}_{s}}$ = effective unit weight of backfill (kcf) θ = angle of fill face of wall to the horizontal (deg.) β = backfill angle to the horizontal (deg.) Φ'f = effective internal friction angle of backfill (deg.), (conservatively use 27° if backfill property is not available) δ ${\displaystyle \approx (2/3)}$ Φ = angle of wall friction (or see LRFD Table 3.11.5.3.1) Horizontal steel reinforcement shall be designed only when the wing is nonstandard or built on a rock foundation. Then, Coulomb active force should be determined as: ${\displaystyle P_{h}=A{\boldsymbol {\gamma }}_{s}K_{a}H_{i}}$ Equation 751.8.2.4.7 Where: Ph = resultant force of active earth pressure Hi = height from the top of wing to the centroid of a one-foot width section (See Figure 751.8.2.5.3) A = rectangular area of a one-foot width section (See Figure 751.8.2.5.3) The dynamic load allowance shall be considered for all members with design fills less than 8’. Dynamic load effects will decrease as the earth fill increases and is calculated as follows: IM = 33 (1.0 - 0.125DE) ≥ 0% Where: DE = design fill depth (ft.) ### 751.8.2.5 Structural Model In the analysis of continuous and rigid frame members, the span length or height should be the distance from center to center (the geometric centers) of members. For box culverts on rock, the effective height is defined as the height from rock elevation (Figure 751.8.1.3.2) to the geometric center of the top slab. Structural Model for Cut Sections A structural model is analyzed as a rigid frame structure with a one-foot strip width perpendicular to the centerline of culvert (Figures 751.8.2.4.1 and 751.8.2.4.2). As shown in Figure 751.8.2.5.1, the boundary conditions are: 1) no lateral and vertical displacements at right end of the bottom slab and 2) no vertical displacement at left end of the bottom slab. For nonstandard box culverts on a rock foundation, a pinned support at each wall is assumed at the rock elevation. See Figure 751.8.2.5.1 for details of loads and load directions. DC1 is dead load from top slab; EV1 is dead load from earth fill; DC2 is dead loads from DC1 and walls; SUR is a live load surcharge; EP is equivalent fluid pressures; WP is water pressure; and LL1 and LL2 are live loads specified in EPG 751.8.2.4. Fig. 751.8.2.5.1 Typical Structural Model with Loads Structural Model for Wing Walls Figure 751.8.2.5.2 shows a typical cross-section of a wing wall. Self-weight, water pressure, and live load surcharge are neglected. Only active earth pressure is applied at exterior wing wall as described in EPG 751.8.2.4. The resultant force Pa of active pressure is applied at (1/3)H from the bottom of wing wall where H is the design wing height. Since the wing wall height varies along its length due to wing slope, the design wing height can be determined at a high quarter point of wing length. The wing wall should be analyzed and designed as a one foot vertical cantilever beam. Fig. 751.8.2.5.2 Typical Cross-Section of Wing Wall For wing walls on rock, vertical steel reinforcement should be analyzed and designed using the same procedure as wing wall with the bottom slab as given above. Horizontal steel reinforcement should be analyzed and designed as a horizontal cantilever beam. Figure 751.8.2.5.3 shows elevation view and structural model of an exterior wing wall. Figure 751.8.2.5.3 shows that force Phi shall be applied at the Centroid Phi located at height Hi and (Li)/2. Moment and shear should be determined for each one-foot width section and checked at the critical section as shown in the figure. Fig. 751.8.2.5.3 Structural Model for Designing Horizontal Reinforcement of Wing Wall on Rock Structural Model for Headwalls and Edge beams A simple model of headwall or edge beam is shown in Figure 751.8.2.5.4. Dead load due to weights of slab and earth fill is computed based on a triangular hatched area shown in Figure 751.8.2.5.4(a). Assume half of this dead load is supported by the wall and the other half supported by the beam as shown in Figure 751.8.2.5.4(b). Additionally, self-weight of beam and earth fill weight above the beam shall be applied as uniform loads along the beam. For headwall design, the sloping side fill inside the hatched area may be ignored if live load is considered with the maximum dynamic load allowance (IM=1.33). The beam is treated as a continuous beam with pinned supports. When the skewed clear span length exceeds 20 feet, refined methods of analysis are recommended. Fig. 751.8.2.5.4 Partial Plan View of Double Box Culvert Showing Edge Beam and Dead Loads ### 751.8.2.6 Structural Design #### 751.8.2.6.1 Strength Limit Design Flexural Strength Factored flexural resistance, ΦMn, of a member at a cross-section should not be less than the factored moment, Mu, at that cross-section. When moment capacity is less than factored moment, increase steel area or thickness of the member. Critical locations for flexural strength design are near the mid-span and at the stream face of adjoining members. ${\displaystyle M_{e}=\phi M_{n}\geq M_{u}}$ Equation 751.8.2.6.1 ${\displaystyle M_{n}={\Big [}A_{s}f_{y}{\Big (}d-{\frac {a}{2}}{\Big )}{\Big ]}}$ Equation 751.8.2.6.2 ${\displaystyle a={\frac {A_{s}f_{y}}{0.85(f_{c}')b}}}$ Equation 751.8.2.6.3 The required steel area can be determined by Equation 751.8.2.6.4. As = ρ b d Equation 751.8.2.6.4 ${\displaystyle \rho ={\frac {0.85f'_{c}}{f_{y}}}{\Bigg [}1-{\sqrt {1-{\frac {2R_{u}}{0.85f'_{c}}}}}{\Bigg ]}}$ Equation 751.8.2.6.5 ${\displaystyle R_{u}={\frac {M_{u}}{\phi bd^{2}}}}$ Equation 751.8.2.6.6 Where: As = required steel area (in2) b = strip width for design, usually 12 in. d = the effective depth from the extreme compression fiber to the centroid of the tensile reinforcement (Note: thickness of monolithic wearing or protective surface shall be excluded at the compressive face of the section where applicable. See EPG 751.8.3.2 Steel Reinforcement.) ρ = required steel ratio (a ratio of steel to concrete areas of a section) Mu = factored moment (k-in) Φ = 0.9 = strength reduction factor for flexure Maximum Tensile Steel Reinforcement The maximum amount of tensile reinforcement shall be such that: ${\displaystyle {\frac {c}{d}}\leq 0.42}$ Equation 751.8.2.6.7 Where: c = the distance from the extreme compression fiber to the neutral axis Minimum Tensile Steel Reinforcement The amount of tensile reinforcement shall be adequate to develop a factored flexural resistance, Mr, at least equal to the lesser of: 1) Mcr = cracking moment       LRFD Eq. 5.7.3.3.2-1 2) 1.33 times the factored moment required by the applicable strength load combinations specified in LRFD Table 3.4.1-1. Shear Strength Maximum design shear should be checked at a distance “dv” from the stream face of support where “dv” is the effective shear depth of a section. Factored shear resistance, ΦVn, should be provided only by shear strength of concrete and it should not be taken less than factored shear, Vu. ${\displaystyle \phi V_{n}\geq V_{u}}$ Equation 751.8.2.6.8 When the shear capacity of slabs and walls specified in Equation 751.8.2.6.8 is less than factored shear, increase thickness of the section. For headwalls and edge beams, strength of shear reinforcement, in addition to concrete shear strength, shall be considered. Therefore, the required area of shear reinforcement shall be computed as follows: ${\displaystyle A_{v}={\frac {V_{s}(s)}{f_{y}d}}}$ Equation 751.8.2.6.9 ${\displaystyle V_{s}={\frac {V_{u}}{\phi }}-V_{c}}$ Equation 751.8.2.6.10 Where: Av = required area of shear reinforcement (in2) Vs = shear force to be resisted by shear reinforcement Vc = nominal shear strength provided by concrete and given in Equation 751.8.2.6.11 or 751.8.2.6.12 s = spacing of shear reinforcement steel (in.) Nominal shear strength should be determined as follows: For slabs with earth fill ≤ 2’ and all walls ${\displaystyle V_{c}=0.0316\beta {\sqrt {f'_{c}}}(bd_{v})}$ Equation 751.8.2.6.11 For slabs with earth fill > 2’ ${\displaystyle V_{c}={\Bigg (}0.0676{\sqrt {f'_{c}}}+4.6{\frac {A_{s}V_{u}d}{bdM_{u}}}{\Bigg )}bd}$ Equation 751.8.2.6.12 but ${\displaystyle V_{c}\leq 0.126{\sqrt {f'_{c}}}(bd)}$ Equation 751.8.2.6.13 Where: Vu = factored shear Mu = factored moment occurring simultaneously with Vu at the section considered dv = effective shear depth as determined in LRFD 5.8.2.9 ${\displaystyle {\frac {V_{u}d}{M_{u}}}\leq 1.0}$ Equation 751.8.2.6.14 For member sizes less than 16 in. the value of β may be taken as the maximum of 2.0 (Simplified Procedure) and LRFD Eq. 5.8.3.4.2-2 (General Procedure). For member sizes not less than 16 in., β should be calculated using the General Procedure only. ${\displaystyle \beta ={\frac {4.8}{1+750\epsilon _{s}}}{\frac {51}{39+s_{xe}}}}$.....General Procedure Equation 751.8.2.6.15 Where: ${\displaystyle \epsilon _{s}={\frac {{\Big (}{\frac {|M_{u}|}{d_{v}}}+0.5N_{u}+|V_{u}|{\Big )}}{E_{s}A_{s}}}}$ Equation 751.8.2.6.16 ${\displaystyle 12in.\leq s_{xe}=d_{v}{\frac {1.38}{a_{g}+0.63}}\leq 80in.}$ Equation 751.8.2.6.17 Mu = factored moment, not to be taken less than Vudv Nu = factored axial force, negative if compressive As = area of reinforcing steel on the flexural tension face ag = maximum aggregate size = 0.75 in. For headwalls, edge beams, and wing walls, use Equation 751.8.2.6.11 to determine the nominal shear resistance of concrete. A minimum steel area of shear reinforcement in Equation 751.8.2.6.19 should be provided in flexural members when factored shear exceeds one-half of concrete factored shear resistance in Equation 751.8.2.6.18. ${\displaystyle V_{u}>{\frac {1}{2}}\phi V_{c}}$ Equation 751.8.2.6.18 ${\displaystyle A_{v}\geq 0.0316{\sqrt {f'_{c}}}{\frac {bs}{f_{y}}}}$ Equation 751.8.2.6.19 Where: Vc = nominal shear resistance provided by concrete section only Φ = 0.9 = strength reduction factor for shear Av = required steel area of shear reinforcement (in2) b = width of section (in) s = spacing of shear reinforcement steel (in.) Slenderness Effect in Wall Members Slenderness effects shall be considered for all interior walls and for only exterior walls keyed into rock. Exterior walls with bottom slabs will not fail combined axial and flexural resistance checks when the flexural design is adequate. A magnified moment shall be used for the design if the slenderness effect is considered. For sizing walls the following requirement may be used as a practical constraint: ${\displaystyle {\frac {KL_{u}}{r}}<34}$ Equation 751.8.2.6.20 For steel reinforcement design, the slenderness effect may be neglected if Equation 751.8.2.6.21 is satisfied. ${\displaystyle {\frac {KL_{u}}{r}}<34-{\Big (}12{\frac {M_{1}}{M_{2}}}{\Big )}}$ Equation 751.8.2.6.21 Where: K = 0.65 for interior walls with bottom slab = 1.0 for exterior walls on rock = 0.80 for interior walls on rock Lu = unsupported length (clear wall height) r = radius of gyration and may be assumed as 0.3 times member thickness M1 = smaller end moment of a wall member M2 = larger end moment of a wall member ${\displaystyle {\frac {M_{1}}{M_{2}}}}$ = positive or negative value if the member is bent in single or double curvature, respectively. Magnified Moment The following procedure is only applicable for walls with Klu/r less than 100. A magnified factored moment, Mm, shall be computed as follows: Mm = δb M Equation 751.8.2.6.22 ${\displaystyle \delta _{b}={\frac {C_{m}}{1-{\frac {P_{u}}{\phi P_{e}}}}}\geq 1.0}$ Equation 751.8.2.6.23 ${\displaystyle C_{m}=0.6+0.4{\Bigg (}{\frac {M_{1}}{M_{2}}}{\Bigg )}}$ Equation 751.8.2.6.24 ${\displaystyle P_{e}={\frac {\pi ^{2}EI}{{\big (}KL_{u}{\big )}^{2}}}}$ Equation 751.8.2.6.25 ${\displaystyle EI={\frac {\frac {E_{c}I_{g}}{2.5}}{1+\beta _{d}}}}$ Equation 751.8.2.6.26 Where: Mm = magnified moment δb = moment magnification factor for a member braced against side sway (preferably less than 2.5) M = largest moment of the wall member due to factored loads or minimum eccentricity βd = ratio of maximum factored dead load moment to maximum factored total load moment and it is always positive Ec = modulus of elasticity of concrete Ig = moment of inertia of a gross concrete section (one-foot strip) Φ = 0.75 for axial compression with tied stirrups The moment resulting from an axial load applied at a minimum eccentricity can be calculated as follows. Effects of eccentric axial loads need not be considered for exterior walls. Me = Pue Equation 751.8.2.6.27 Where: e = minimum eccentricity (in.) h = wall thickness (in.) Wall Capacity due to Combined Axial and Flexural Loads When a wall member is subjected to both axial and flexural loads, the design of such member should consider axial load – flexural moment interaction effect (i.e., “interaction diagram”). Figure 751.8.2.6.1(a) shows a typical interaction diagram. A simplified interaction diagram can be approximately generated using a linearized curve as shown in Figure 751.8.2.6.1(b). The following procedure should be used for generating a simplified interaction diagram. 1) Determine the factored axial resistance (ΦPo): ΦPo = (Φ) { 0.85f'c (Ag - Ast) + Astfy } Equation 751.8.2.6.28 Where: Ag = gross area of a cross-section (in.2) Ast = total area of steel reinforcement (in.2) Φ = 0.75 for axial compression with tied stirrup 2) Determine the maximum factored axial resistance (ΦPn): ΦPn = 0.80 (Φ) Po Equation 751.8.2.6.29 3) Determine the balance point (ΦPb, ΦMb): Axial load (ΦPb) and moment (ΦMb) are determined by Equations 751.8.2.6.30 and 751.8.2.6.31, respectively. ΦPb = (Φ) [ 0.85f'c ( b )( ab ) + A's f's - As fy ] Equation 751.8.2.6.30 ${\displaystyle \phi M_{b}=\phi {\Big [}0.85f'_{c}(b)(a_{b}){\Big (}d-d''-{\frac {a_{b}}{2}}{\Big )}+A'_{s}f'_{s}(d-d'-d'')+A_{s}f_{y}d''{\Big ]}}$ Equation 751.8.2.6.31 Where: ${\displaystyle a_{b}={\frac {87}{(87+f_{y})}}\beta _{1}d}$ Equation 751.8.2.6.32 ${\displaystyle f'_{s}=87{\Big [}1-{\Big (}{\frac {d'}{d}}{\Big )}{\Big (}{\frac {87+f_{y}}{87}}{\Big )}{\Big ]}\leq f_{y}}$ Equation 751.8.2.6.33 As = total area of tensile reinforcement (in.2) A’s = total area of compressive reinforcement (in.2) d’ = distance from concrete compressive surface to the centerline of compressive steel reinforcement (in.) d” = distance from centerline of tensile reinforcement to the centroid of gross section of member (in.) Φ = 0.75 4) Determine the pure bending design moment capacities (ΦMo, ΦMn): If Equation 751.8.2.6.34 is satisfied then the bending moment is determined by Equation 751.8.2.6.35. Otherwise, use Equation 751.8.2.6.2. ${\displaystyle {\frac {A_{s}-A'_{s}}{bd}}\geq 0.85\beta _{1}{\Big (}{\frac {f'_{c}d'}{f_{y}d}}{\Big )}{\Big (}{\frac {87}{87-f_{y}}}{\Big )}}$ Equation 751.8.2.6.34 ${\displaystyle M_{n}={\Bigg [}{\Big (}A_{s}-A'_{s}{\Big )}f_{y}{\Big (}d-{\frac {a}{2}}{\Big )}+A'_{s}f_{y}{\Big (}d-d'{\Big )}{\Bigg ]}}$ Equation 751.8.2.6.35 Where: ${\displaystyle a={\frac {{\big (}A_{s}-A'_{s}{\big )}f_{y}}{0.85{\big (}f'_{c}{\big )}b}}}$… for Equation 751.8.2.6.35 only. Φ Mo = 0.75 Mn Equation 751.8.2.6.37 Φ Mn = 0.9 Mn Equation 751.8.2.6.38 5) Strength resistance factor, Φ, may be increased linearly from a value of compressive member to a value of flexural member as the design axial load, ΦPn, decreases from smaller value of ΦPb or Equation 751.8.2.6.39 to zero. See Figure 751.8.2.6.1(b) for details. P1 = 0.1 f'c Ag Equation 751.8.2.6.39 Fig. 751.8.2.6.1 (a) Typical Interaction Diagram (b) Simplified Interaction Diagram for Case when 0.1f’cAg <ΦPb #### 751.8.2.6.2 Service Limit Design Crack Control All concrete members of box culverts except wing walls shall be checked for crack control *(except as noted below). The spacing of tensile steel reinforcement shall be limited by the following equation: ${\displaystyle s\leq {\frac {700\gamma _{e}}{\beta _{s}f_{s}}}-2d_{c}}$ Equation 751.8.2.6.40 Where: s = average spacing of tensile steel reinforcement ${\displaystyle {\boldsymbol {\gamma }}_{e}}$ = 1.0. (0.75 recommended for top slabs used as a riding surface) dc = thickness of concrete cover for tensile reinforcement (in.) ${\displaystyle \beta _{s}=1+{\frac {d_{c}}{0.7(h-d_{c})}}}$ Equation 751.8.2.6.41 Where: h = wall or slab thickness. Remove any applicable wearing surfaces when they are on the compression face (in.) fs = tensile stress in steel reinforcement at the service limit state (ksi) When members are subject to significant compressive loads the following formulas shall be used for flexural members with axial thrust: ${\displaystyle f_{s}={\frac {M_{s}+N_{s}(d-h/2)}{(A_{s}jid)}}}$ Equation 751.8.2.6.42 Where: Ms = Service moment…always positive (k-in) Ns = corresponding axial force…positive for compression (k) j = 0.74 + 0.1(e/d) ≤ 0.9 Equation 751.8.2.6.43 i = 1/(1-jd/e) Equation 751.8.2.6.44 Where: e = Ms/Ns + (d – h/2) Equation 751.8.2.6.45 e/d ≥ 1.15 * If e/d < 1.15 then crack control need not be checked for the location under investigation. When e/d is less than 1.15, the rectangular member is presumed to behave like an eccentrically loaded column rather than a flexural member. Because of this, interior walls need not be checked for fills greater than 2 ft. When members are subject to insignificant compressive loads the following formulas should be used for members in pure flexure: ${\displaystyle f_{s}={\frac {M_{s}}{(A_{s}jd)}}}$ Equation 751.8.2.6.46 Where: j = 1 - k/3 Equation 751.8.2.6.47 ${\displaystyle k=-n\rho {\Bigg [}1-{\sqrt {1+{\frac {2}{n\rho }}}}{\Bigg ]}}$ Equation 751.8.2.6.48 ${\displaystyle \rho ={\frac {A_{s}}{bd}}}$ Equation 751.8.2.6.49 #### 751.8.2.6.3 Other Design Requirements Distribution of Steel Reinforcement Longitudinal distribution reinforcement (parallel with the centerline of structure) at the bottom of the top slab shall be provided to distribute the concentrated live load when the design fill is two feet or less. For culverts with design fills less than one foot, the amount of distribution reinforcement shall be the percentage of main steel reinforcement for positive moment given as follows: ${\displaystyle {\mbox{ Percentage}}={\frac {100}{\sqrt {S}}}\leq 50\%}$ Equation 751.8.2.6.50 Where: S = clear span length (ft.) Otherwise, for fills less than or equal to 2’: Use #4 bars at 14” centers #4 bars at 14” centers should also be distributed in the top of the top slab so that four layers of steel reinforcement (two transverse and two longitudinal) are present throughout the top slab. Reinforcement for Temperature and Shrinkage Buried culverts are not exposed to daily temperature changes. The current longitudinal steel reinforcement layout as shown in Figure 751.8.3.2.1 is considered adequate for handling longitudinal stress demands regardless of member size. Design for temperature and shrinkage shall be required for top slabs of culverts used as a riding surface. The total area of reinforcement per foot, on each face and in each direction for temperature and shrinkage shall meet the following requirements: ${\displaystyle A_{s}\geq {\frac {1.3wt}{2(w+t)f_{y}}}}$ Equation 751.8.2.6.51 ${\displaystyle 0.11\leq A_{s}\leq 0.60}$ Equation 751.8.2.6.52 Where: As = area of reinforcement in each direction and each face (in2/ft.) w = dimension from fill face to fill face for slabs, clear height for walls (in.) t = thickness of wall or slab (in.) Spacing Limit of Steel Reinforcement ## 751.8.3 Details ### 751.8.3.1 Joints Construction Joints Construction joints shall be located where headwalls and wings meet as shown in Figures 751.8.1.4.1 and 751.8.1.4.2. Keyed construction joints are located at top and bottom of walls. The width of keyed construction joints shall be at least 1/3 of wall thickness with sides battered ¼” in depth. The depth of the key shall be 1” and 2” at the bottom and top of wall, respectively. See Figure 751.8.3.1(b) and (c) for details. Fig. 751.8.3.1 Typical Details of Joints (a) Transverse Joint (b) Keyed Construction Joint at Top Slab (c) Keyed Construction Joint at Bottom Slab Transverse Joints A transverse joint shall be provided in all box culverts having barrel length over 80’-0” between inside faces of headwalls measured along the centerline of box culvert. For culverts with clear zones, wide roadways, etc., where the barrel length (Figure 751.8.1.3.1) between inside faces of headwalls measured along centerline of culvert does not exceed 90’-0”, the joint may be omitted. For box culverts with long barrel length, additional transverse joints may be required. A transverse joint shall not be placed less than 3’ along any wall or more than 50’ along centerline of culvert from the inside face of the headwall. For the maximum length of a cut section between two transverse joints, see EPG 751.8.1.3. For guidelines specific to locating transverse joints in culvert extensions, see EPG 751.8.3.5 Miscellaneous. If possible, transverse joints shall not be placed directly below traveled way. Locate the joint under shoulders or median. Transverse joints shall not be located under a traveled way with design fills 2 ft. or less. All transverse joints shall be made vertical when the culvert is cambered, indicate vertical on plans, and at right angles to the centerline of barrel. All longitudinal steel reinforcement shall be stopped at least 1-1/2” from joints. These joints shall be filled with 5/16” joint filler. See Figure 751.8.3.1(a) for details. ### 751.8.3.2 Steel Reinforcement Barrel Section Standard boxes shall have main reinforcement placed perpendicular to the centerline of culvert. In any case, main reinforcement should not be skewed more than 25° from a line normal to the centerline of the culvert. (See LRFD 9.7.1.3.) The bar sizes, spacings and lengths given in the Standard Plans 703.17, 703.47 and 703.87 are applicable for uncoated steel reinforcement. Figure 751.8.3.2.1 shows a typical cross-section of standard box culvert and bar marks of steel reinforcement which are described below: A1 bar - Steel reinforcement shall be designed for maximum positive moment in the top slab. This bar is placed transversely perpendicular to the centerline of culvert at the bottom of top slab. Place A1 bars into headwall or edge beam as close as practical. A2 bar - Steel reinforcement shall be designed for maximum positive moment in the bottom slab. This bar is placed transversely perpendicular to the centerline of culvert at the top of bottom slab. Figure 751.8.3.2.1 Typical Cross-Section of Standard Box Culvert Showing Bar Marks B1 bar - Steel reinforcement shall be designed for maximum combined axial load and moment at interior walls. This bar is placed vertical near stream faces of the wall. Minimum steel reinforcement of #5 bars spaced at 12” centers shall be provided. This bar should be extended into the top and bottom slabs. A hook bar may be required if the embedment length is insufficient due to slab thickness limitations. [[751.5 Standard Details#751.5.9.2.8.1 Development and Lap Splice General|EPG 751.5.9.2.8.1 Development and Lap Splice General] has information pertaining to development of tension reinforcement and hooks. B2 bar – For culverts with bottom slabs, steel reinforcement shall be designed for the maximum positive moment in the exterior wall. For culverts on rock, steel reinforcement shall be designed for the maximum combined positive moment and axial load. This bar is placed vertical near the stream face of the wall. Minimum steel reinforcement of #5 bar spacing at 12” centers shall be provided. This bar should be extended into the top and bottom slabs. A hook bar may be required if the embedment length is insufficient due to slab thickness limitations. EPG 751.5.9.2.8.1 Development and Lap Splice General has information pertaining to development of tension reinforcement and hooks. J3 bar - Steel reinforcement shall be designed for the maximum negative moment in the top corner of the culvert. This bar is placed vertical along the wall and transversely perpendicular to the centerline of culvert. J4 bar - Steel reinforcement shall be designed for maximum negative moment in the bottom corner of the culvert. The J4 bar should also be designed for the maximum negative moment near the mid-height of the exterior wall. This bar is placed vertical along the wall and transversely perpendicular to the centerline of culvert. H1 bar - Steel reinforcement shall be designed for the maximum negative moment in the top slab over the interior walls. This bar is placed transversely perpendicular to the centerline of culvert at the top of top slab. Its spacing is alternated with spacing of H2 bar. The length of H1 bar is longer than the length of H2 bar. H2 bar - Steel reinforcement shall be designed for the maximum negative moment in the top slab over the interior walls. This bar is placed transversely perpendicular to the centerline of culvert at the top of top slab. Its spacing is alternated with spacing of H1 bar. F bar - Longitudinal steel reinforcement provides for temperature and shrinkage control. Use #4 bars at about 14” centers for all interior faces. A minimal number of longitudinal bars in exterior faces are also provided primarily to aid in construction. This bar is placed parallel to the centerline of culvert. Additional longitudinal reinforcement may be required to provide for lateral distribution of concentrated live loads. For distribution of reinforcement, see EPG 751.8.2.6. Figure 751.8.3.2.2 shows a typical cross-section through headwalls and edge beams, and bar marks of steel reinforcement which are described below. The reinforcement values given below shall be considered standard for headwalls and minimum recommended values for edge beams. If at least the minimum headwall dimensions are provided (see Fig. 751.8.3.2.2) the steel reinforcement in the top slab need not be increased over that required for barrel design. Otherwise, the width of the edge beam shall be taken as 3 feet and additional reinforcement in the top and bottom of slab is required. D1 bar – Place 2- #8 bars at the top of headwalls or edge beams. These bars shall be placed along the headwall or edge beam. D2 bar – Place these bars between D1 bars at the top of headwalls or edge beam and centered over interior walls. The total length of the bar is equal to two times larger value of 48 bar diameters or ¼ clear span length of headwall or edge beam. Neglect this bar for single span and if clear span length along headwall is less than or equal to 10’ for multiple spans. Otherwise, use a number of bars and sizes as indicated below: 2- #8 bars when 10’ ${\displaystyle <{\Bigg [}{\frac {\mbox{clear span length}}{\mbox{cos(skew angle)}}}{\Bigg ]}\leq }$ 13’ * 2- #9 bars when 13’${\displaystyle <{\Bigg [}{\frac {\mbox{clear span length}}{\mbox{cos(skew angle)}}}{\Bigg ]}}$ * The required area of steel reinforcement should be checked if clear span length along edge beam exceeds 20’. H bar - Provide 4- #8 bars at bottom of headwalls or edge beam when edge beam is skewed. These bars shall be placed along the headwall or edge beam. R1 bar – Provide minimum #5 bar spacing at 12” centers. This bar is placed perpendicular to longitudinal axis of upstream headwall or edge beam. R2 bar - Provide minimum #5 bar spacing at 12” centers. This bar is placed perpendicular to longitudinal axis of upstream headwall or edge beam. R3 bar - Provide minimum #5 bar spacing at 12” centers. This bar is placed perpendicular to longitudinal axis of downstream headwall or edge beam. Fig. 751.8.3.2.2 Typical Sections and Details of Steel Reinforcement Wings F bar - Longitudinal steel reinforcement provides for temperature and shrinkage control. Use #4 bars at about 14” centers for all interior faces. A minimal number of longitudinal bars in exterior faces are also provided primarily to aid in construction. This bar should be placed longitudinal along wing walls as shown in Figure 751.8.3.2.3. For wings on rock, longitudinal F bars should be designed using maximum moment and shear as specified in EPG 751.8.2.5. G bar – Provide the same bar size and spacing as B1 or B2 bar for interior (Figure 751.8.3.2.3(b)) or exterior wall (Figure 751.8.3.2.3(a)), respectively. J1 or J6 bar – Provide 2- #7 bars at each face of wing walls. These bars are provided for edge beam action and for support in extreme event scenarios, such as washout. The J6 callout is used for flared wings. J5 bar – Steel reinforcement shall be designed for moment and shear based on Coulomb or Rankine active earth pressure. In any case, the provided steel area of J5 bar shall not be less than that provided by the adjoined wall. Toe Walls E1 bar – Provide 4- #5 bars and they should extend into wing walls as far as practical as shown in Figure 751.8.3.2.3. For wing walls on rock, these bars shall be extended 12” into the rock and grouted. (a) ELEVATION OF EXTERIOR WING (b) ELEVATION OF INTERIOR WING Fig. 751.8.3.2.3 Details of Wings Showing Bar Marks Collar Beams Figure 751.8.3.2.4 shows steel reinforcement details of collar beams. The figure also shows that two layers of roofing felt shall be provided between culvert and collar beams. This will allow free lateral movement of adjoined sections. Two layers of 30# roofing felt. For box culverts where collars are required and the precast option is used, precast concrete box culvert ties in accordance with Sec 733 and Std. Plan 733.00 shall be provided between all precast sections. Fig. 751.8.3.2.4 Details of Collar Beam (a) Auxiliary View of Collar Beam (b) Section thru Box at Collar Beam (c) Section thru Wall (d) Section thru Top and Bottom Slab Reinforcement Concrete Cover The minimum concrete cover shall be 1-1/2” (clear) except the following: Top Slab The minimum concrete cover shall be 2” (clear) at top and 1-1/2” (clear) at bottom of the slab. Bottom Slab The minimum concrete cover shall be 1-1/2” (clear) at top and 3” (clear) at bottom of the slab. Walls and Wing Walls The minimum concrete cover shall be 2” (clear) at fill face and 1-1/2” (clear) at stream face. Wearing Surface A 1” monolithic protective surface shall be used on the bottom of bottom slab to compensate for pouring concrete on uneven earth surfaces. In special cases, where abrasion on the stream faces is a concern, a 1/2" monolithic wearing surface may be used on stream faces of walls and bottom slab. In the analysis, the protective surface and wearing surfaces (when considered) are included as part of the member thickness, but shall be excluded in the calculation of effective depth of the member for design. ### 751.8.3.3 Rock Survey Data for Plans Rock elevations for box culverts with walls on rock or with bottom slab or toe walls that will encounter rock shall be detailed on the plans. Figure 751.8.3.3.1 shows details of Alternative #1 which shall include a sketch of rock locations and a table showing rock elevations. Alternative #2 (Figure 751.8.3.3.2) is similar to Alternative #1 except that rock elevations are shown on a sketch of rock locations. Fig. 751.8.3.3.1 Details of Plan Showing Rock Elevations for Alternate #1 Note: See EPG 751.50 A2 for appropriate notes to include on plans. Instruction: All box culverts on rock shall have the rock elevations shown on the plans at significant changes along each wall. Fig. 751.8.3.3.2 Details of Plan Showing Rock Elevations for Alternate #2 Note: Elevations indicate top of rock, shale. Instructions: All box culverts on rock shall have the rock elevations shown on the plans at significant changes along each wall. ### 751.8.3.4 Wing Walls on Rock Four rock anchors are typically used at the end of wing walls on rock for securing the wing to the rock which is analogous to using four E1 bars at the end of wing walls on slab. Wing walls on rock are modeled as fixed cantilevers for both vertical and horizontal steel reinforcement design. Vertical cantilever fixity is assumed to be the same as for a wing wall on slab but because it is embedded into rock, horizontal steel is then designed as if wall is horizontally cantilevered, i.e. ability to deflect about a vertical axis, in accordance with EPG 751.8.2.4 Live Loads and Horizontal Pressures and EPG 751.8.2.5 Structural Model. When there is concern about rock strength or rock degradation and rock erodibility not providing for fixity in the long term as assumed but rather a “pinned” support condition, or when the length and/or height of the wall is excessive, either of which could create a heavy steel reinforcement design, then anchoring the wall deeper into rock or using rock anchors are both options that may provide the fixity necessary for designing a moderate steel reinforcement design. Alternatively a more refined analysis may provide a more accurate reinforcement solution. ### 751.8.3.5 Miscellaneous Granular Backfill The contractor shall furnish granular backfill in accordance with Sec 206 within the limits as shown on the plans when approved by the Engineer. Payment for removal of inherently unsound material will be made at the contract unit price for Class 4 Excavation. The contractor will be reimbursed for the delivered cost of granular backfill when approved by the engineer. Wing Backfill Slope Transition Backfill slope transition at wings is determined based on skew angle of box culvert. See Sheet 2 of 2 in Standard Plan 703.37 for slope transition. Culvert Extensions When an existing culvert is to be extended, cutting details shall be followed to determine where and how to cut the existing culvert. See Standard Plan 703.38 for cutting details. A transverse joint is not required when extending the barrel not more than 15 feet. When extensions exceed 15 feet, transverse joint requirements are the same as those for full culverts, see EPG 751.8.3.1.
# Stiff; harsh This time we are looking on the crossword puzzle clue for: Stiff; harsh. it’s A 12 letters crossword definition. Next time when searching the web for a clue, try using the search term “Stiff; harsh crossword” or “Stiff; harsh crossword clue” when searching for help with your puzzles. Below you will find the possible answers for Stiff; harsh. We hope you found what you needed! If you are still unsure with some definitions, don’t hesitate to search them here with our crossword puzzle solver. ## Possible Answers: RIGID. ### Random information on the term “RIGID”: Stiffness is the extent to which an object resists deformation in response to an applied force. The complementary concept is flexibility or pliability: the more flexible an object is, the less stiff it is. The stiffness, k , {\displaystyle k,} of a body is a measure of the resistance offered by an elastic body to deformation. For an elastic body with a single degree of freedom (DOF) (for example, stretching or compression of a rod), the stiffness is defined as k = F δ {\displaystyle k={\frac {F}{\delta }}} where, In the International System of Units, stiffness is typically measured in newtons per meter ( N / m {\displaystyle N/m} ). In Imperial units, stiffness is typically measured in pounds (lbs) per inch.
## How Do You Find Special Points on a Parabola? Let’s look at how to use formulas for a parabola to get certain important points on a parabola. Problem For the parabola y = 2x2 + 3x – 2, locate the points below. a. The y-intercept. Solution At the y-intercept, the x value is zero. This means that we need to set x = 0 in the equation: y = 2(02) + 3(0) – 2 = -2 Putting this together, the y-intercept is at (0, -2). b. The vertex. Solution The vertex is located using the formula   where the values of a, b, and c come from the equation. In this case, a = 2, b = 3, and c = -2. This gives an x value on the intercept of To find the corresponding y value, put this value into the equation, This means the vertex is at (-3/4, –25/8). c. The x-intercepts. Solution At the x-intercepts, the y value is zero. Putting this into the equation yields 0 = 2x2 + 3x – 2 This equation is solved with the quadratic formula, Put the values from the equation (a = 2, b = 3, and c = -2), The x intercepts are at (-2, 0) and (1/2, 0). All of these points are shown in the graph of the parabola below. ## What Does It Mean To Scale A Variable? On many problems, the most challenging aspect is keeping track of the variables and what they represent. When the variables are scaled in hundreds, thousands, or even millions, we need to pay careful attention. Scaling means that the quantity has been divided by some amount. For instance, we can write the amount $14,400,000 as 14.4 million dollars. To scale$14,400,000 in millions, divide by 1,000,000 and then add the word “million” after the result. We could also scale in thousands by dividing by 1000. This gives 14,400 thousand dollars. Let’s look at an application with scaling. ## How Does Function Notation Work? In calculus, we will need to  take a function (x) and write out (x+h) for that function. Let’s look at how to do this properly. To do a problem like this, you need to understand exactly what the x in (x) represents and what the f represents. Let’s look at the function (x) = x2x. A function is a process. In this case, it is the process of 1. Square the input 2. Take the result and subtract the input Notice that there is no mention of the x in the formula. That is because it is a placeholder representing the input. There is nothing special about x. We could have just as easily used a different letter as a placeholder for the input. If I had wanted to call the input t, I would have written (t) = t2 – t If the input had been represented by the word dog, I would have written (dog) = dog2 – dog The input variable is simply a placeholder…if a number is put in its place like 7, we get (7) = 72 – 7 = 42 Notice that the process is the same. Square the input and subtract the input from the result. In this case, the input is 7 so we are squaring 7 and then subtracting 7 from the result. Many students are confused by f(x+h). Now the input is represented by x+h instead of x. This means we need to square it and then subtract x+h from the result. (x+h) = (x+h)2 – (x+h) We can simplify this by foiling out the square, (x+h) = (x+h)(x+h) = x2 +2xh + h2 And removing the parentheses after the subtraction we get (x+h) =  x2 +2xh + h2xh The handout below has more examples with this function. ## How Do You Find Break-Even Points? If you are looking for where the break-even points are, you must determine the quantity for which revenue = cost Alternately, you may find the profit by calculating profit = revenue – cost The problem below demonstrate these strategies starting from a demand function and a cost function. To apply either of the relationships above, you need to form the revenue function from revenue = (price)(quantity) where the price is given by the demand function and Q represents the quantity. Problem The demand function for Q units of a product is given by $latex \displaystyle D\left( Q \right)=16-1.25Q$ The cost function is given by the function $latex \displaystyle C\left( Q \right)=2Q+15$ a. Find the revenue function R(Q). b. Find the break-even point(s)? c. On a graph of R(Q) and  C(Q), where do the break-even points lie? d. Find the profit function P(Q). e. Where do the break-even points lie on the graph of P(Q)? Solution 1 To find the break-even point, this group of students set R(Q) = C(Q). This results in a quadratic equation. They moved all terms to one side and used the quadratic formula to find the quantities at which the revenue is equal to the cost. Solution 2 This group of students found the profit function P(Q) first. Then they set it equal to zero to find the break-even points. Like the first solution, they also needed to use the quadratic formula. Both techniques lead to the same break-even points and are equally valid. The only thing the second solution left out was the graph of the profit function showing the break-even points at the zeros (horizontal intercepts) of the function. ## How Do You Interpret Inputs and Outputs for a Model? In the example below, we want to look at the inputs and outputs for a function and interpret what they tells us. In both examples, the function is a quadratic function that models the rise and fall of an object thrown in the air. Example 1 Suppose a ball is thrown into the air has its height (in feet) given by the function $latex \displaystyle h(t)=6+128t-16{{t}^{2}}$ a. Find h(1) and explain what it means. b. Find the height of the ball 4 seconds after it is thrown. c. Test other values of  to decide if the ball eventually falls. When does the ball stop climbing? Example 2 Suppose a ball is thrown into the air has its height (in feet) given by the function $latex \displaystyle h(t)=6+96t-16{{t}^{2}}$ a. Find h(1) and explain what it means. b. Find the height of the ball 3 seconds after it is thrown. c. Test other values of  to decide if the ball eventually falls. When does the ball stop climbing? The key thing is to test the function at enough points to convince yourself that the peak is really the peak. If the peak height occurs at x = 4.2, will finding h(3), h(4), and h(5) be enough to find that peak? If we have a graph, we can use it to find the peak. But if we only have the function we need to fine tune the input to zoom in on wherever the peak is. In each case, the values of t are in seconds and h(t) is in feet. We want to find an h(t) value that is higher then those on either side.
## Pages ### S16. Minkowskian Spacetime In the previous section we briefly discussed the general feature of spacetime. From here on, we will focus on the geometrical aspect of the spacetime. So far, we have only assumed a frame $S$ being a collection of clock and a ruler. But there is another view point that is perfectly consistent and is more useful in our study of special relativity. In this view point(Minkowskian viewpoint) we assume time as a fourth dimensional axis which is 'at right angle' to the $X$,$Y$ & $Z$ axis. The figure shows the diagram of the world line. World line: The curve traced out in the in the diagram is the world line of the particle. We must note that the slope of the world line must be greater than the slope of the world line of a photon since all material particle moves with the speed less than that the speed of light. This is the reason we haven't drawn the brown arrow whose slope is less than that of the slope of world line of the photon. We have the Lorentz transformation as the following: Now, to find the coordinate axes for the $S'$ frame, we simply put $x'$=0 for constant $t'$ and $t'$=0 for constant $x'$. We then have the familiar spacetime diagram. It is now clearly evident why the coordinate axes of the $S'$ frame were oblique in our earlier discussions. It is important to note that with increasing speed of the $S'$ frame relative to the $S$ frame, these axes close in on the world line of the photon passing through the common origin.
# How to hide the object emitting particles in a render in Blender 2.80? I have a surface with particles. But I don't want to see the original object in the render. How to fix it? Transparency, other collection / scene doesn't work. • The tile of this question is misleading, not worded correctly. It should say: How to hide the original object used by the particle system? – Lumis Apr 27 '19 at 12:01 • Did you ever solve this, I'm having the same problem now while learning Blender. How to hide the template object/collection used for defining particles. – Mark K Cowan Dec 11 '19 at 23:25 You can just hide the original objects, particle system objects should stay visible even with original ones hidden (not rendering). Just don't delete them. • Yes, it hides for viewport, but i still see them in render( – Arthur Mykhalenko Jan 20 '19 at 10:04 • There are 4 icons in a row in Outliner for each object: Eye (hide in viewport), Cursor (Disable selection), Monitor (Disable in Viewport) and Camera (Disable in Renders). It seems that you need to uncheck the last one, can also disable them all and original objects should not be visible anywhere. – 9hp71n Jan 20 '19 at 10:29 • Strange, before I did the same, it hid all objects. And now it has suddenly become as it should. Anyway, thanks! – Arthur Mykhalenko Jan 20 '19 at 12:12 At the particle settings under the Render section untick the Show Emitter box. • As I understand, it hides emitter. Maybe i described my situation incorrect. I have particles (A) which made from collection of objects (B) . All these stuff has place on surface (C) on which applied particles. I want to see on render A and C, without B – Arthur Mykhalenko Jan 18 '19 at 22:42 There are two settings Show emitter: 1. in the Render section works only for the final render 2. in the Viewport Display section for the current view port However when you un-check the Show emitter in the Viewport Display section both emitter and particles may disappear. You need to re-select Dispaly As as Rendered and then only the particles will show. To hide the original object or collection used for particle instances just hide them in Scene collection window.
# 2 Kings 2:1-25 2  And it came to pass, when Jehovah would take up Elijah by a whirlwind into heaven, that Elijah went with Elisha from Gilgal. 2  And Elijah said unto Elisha, Tarry here, I pray thee; for Jehovah hath sent me as far as Beth-el. And Elisha said, As Jehovah liveth, and as thy soul liveth, I will not leave thee. So they went down to Beth-el. 3  And the sons of the prophets that were at Beth-el came forth to Elisha, and said unto him, Knowest thou that Jehovah will take away thy master from thy head to-day? And he said, Yea, I know it; hold ye your peace. 4  And Elijah said unto him, Elisha, tarry here, I pray thee; for Jehovah hath sent me to Jericho. And he said, As Jehovah liveth, and as thy soul liveth, I will not leave thee. So they came to Jericho. 5  And the sons of the prophets that were at Jericho came near to Elisha, and said unto him, Knowest thou that Jehovah will take away thy master from thy head to-day? And he answered, Yea, I know it; hold ye your peace. 6  And Elijah said unto him, Tarry here, I pray thee; for Jehovah hath sent me to the Jordan. And he said, As Jehovah liveth, and as thy soul liveth, I will not leave thee. And they two went on. 7  And fifty men of the sons of the prophets went, and stood over against them afar off: and they two stood by the Jordan. 8  And Elijah took his mantle, and wrapped it together, and smote the waters, and they were divided hither and thither, so that they two went over on dry ground. 9  And it came to pass, when they were gone over, that Elijah said unto Elisha, Ask what I shall do for thee, before I am taken from thee. And Elisha said, I pray thee, let a double portion of thy spirit be upon me. 10  And he said, Thou hast asked a hard thing: nevertheless, if thou see me when I am taken from thee, it shall be so unto thee; but if not, it shall not be so. 11  And it came to pass, as they still went on, and talked, that, behold, there appeared a chariot of fire, and horses of fire, which parted them both asunder; and Elijah went up by a whirlwind into heaven. 12  And Elisha saw it, and he cried, My father, my father, the chariots of Israel and the horsemen thereof! And he saw him no more: and he took hold of his own clothes, and rent them in two pieces. 13  He took up also the mantle of Elijah that fell from him, and went back, and stood by the bank of the Jordan. 14  And he took the mantle of Elijah that fell from him, and smote the waters, and said, Where is Jehovah, the God of Elijah? and when he also had smitten the waters, they were divided hither and thither; and Elisha went over. 15  And when the sons of the prophets that were at Jericho over against him saw him, they said, The spirit of Elijah doth rest on Elisha. And they came to meet him, and bowed themselves to the ground before him. 16  And they said unto him, Behold now, there are with thy servants fifty strong men; let them go, we pray thee, and seek thy master, lest the Spirit of Jehovah hath taken him up, and cast him upon some mountain, or into some valley. And he said, Ye shall not send. 17  And when they urged him till he was ashamed, he said, Send. They sent therefore fifty men; and they sought three days, but found him not. 18  And they came back to him, while he tarried at Jericho; and he said unto them, Did I not say unto you, Go not? 19  And the men of the city said unto Elisha, Behold, we pray thee, the situation of this city is pleasant, as my lord seeth: but the water is bad, and the land miscarrieth. 20  And he said, Bring me a new cruse, and put salt therein. And they brought it to him. 21  And he went forth unto the spring of the waters, and cast salt therein, and said, Thus saith Jehovah, I have healed these waters; there shall not be from thence any more death or miscarrying. 22  So the waters were healed unto this day, according to the word of Elisha which he spake. 23  And he went up from thence unto Beth-el; and as he was going up by the way, there came forth young lads out of the city, and mocked him, and said unto him, Go up, thou baldhead; go up, thou baldhead. 24  And he looked behind him and saw them, and cursed them in the name of Jehovah. And there came forth two she-bears out of the wood, and tare forty and two lads of them. 25  And he went from thence to mount Carmel, and from thence he returned to Samaria.
### Solving XKCD’s Nerd Sniping problem A while ago, during a period of free time, I implemented a solution in Haskell for the XKCD’s raptor problem. Now, I’ll try to solve another problem presented there, the one found in the Nerd Sniping comic. Of course, the implementation will still be in Haskell. First, we have to define a data structure for keeping the network of resistors. I’ll use a structure used a while ago in a C algorithm for solving the network analysis problem but more simplified than what I used at the time. We only need to be interested in networks formed with resistors only, thus we can use only node elimination to solve this problem. Because of this, the data structures used are very simple: ``` 2 3 type Resistance = Double 4 type Conductance = Double 5 6 type Network a = [(a, Node a)] 7 type Node a = [WireTo a] 8 type WireTo a = (a, Resistance) 9 ``` As you see, we’ll use two association lists: one to keep the mapping between node ids (those can be almost anything) and one to keep the mapping between the node id and the resistance of the wire connected between that node and the actual node. While this structure prevents the know tying problem (homework: try solving this problem using techniques presented in the linked article), it adds duplicated information: for each wire between nodes a and b we store it in two places: once in node a and once in node b. The previous paragraph hinted that there are two problems which need to be solved. Firstly, when comparing two wires and two nodes only the ids need to be taken care of, not everything in the pair. Thus, we need to implement our own equality functions. ``` 10 (===) :: (Eq a) => (a, b) -> (a, b) -> Bool 11 (a, _) === (b, _) = a == b 12 13 (=/=) :: (Eq a) => (a, b) -> (a, b) -> Bool 14 (=/=) a = not . (a ===) ``` To solve the second problem, I wrote two functions to the user and will demand (expect) that the user will use them to construct any network. Thus, the first function will construct a part of the network: a simple wire (similar to the `return` function from monads). ``` 66 -- builds a simple network: a simple wire 67 buildPart :: (Ord a) => a -> a -> Resistance -> Network a 68 buildPart a b r 69 | r < 0 = error "Negative resistance is not allowed" 70 | a == b = error "No wire can have the same ends" 71 | a > b = buildPart b a r 72 | otherwise = [(a, [(b, r)]), (b, [(a, r)])] ``` Using this function we can already construct the first test network, as seen in the following picture: ``` 117 {- 118 Simple test: a network with only a wire. 119 -} 120 testSimple :: Network Int 121 testSimple = buildPart 0 1 5 ``` Simple network with only a resistor The second function will take two networks and construct a new one by joining them (similar to the `mplus` function from `MonadPlus` or `mappend` from `Monoid`). ``` 74 -- joins two networks 75 joinParts :: (Eq a) => Network a -> Network a -> Network a 76 joinParts [] ns = ns 77 joinParts (n:ns) nodes 78 | other == Nothing = n : joinParts ns nodes 79 | otherwise = (fst n, snd n `combineNodes` m) : joinParts ns nodes' 80 where 81 other = lookup (fst n) nodes 82 m = fromJust other 83 nodes' = filter (=/= n) nodes``` Care must be taken when joining two networks containing the same nodes. To combine them correctly, the following two functions are used: ``` 85 {- 86 Combines two nodes (wires leaving the same node, declared in two parts of 87 network. 88 -} 89 combineNodes :: (Eq a) => Node a -> Node a -> Node a 90 combineNodes = foldr (\(i,r) n -> addWireTo n i r) 91 92 {- 93 Adds a wire to a node, doing the right thing if there is a wire there already. 94 -} 95 addWireTo :: (Eq a) => Node a -> a -> Resistance -> Node a 96 addWireTo w a r = parallel \$ (a,r) : w``` When we encounter two parallel resistances, we will transform them immediately. ``` 98 {- 99 Reduce a list of wires by reducing parallel resistors to a single one. 100 -} 101 parallel :: (Eq a) => [WireTo a] -> [WireTo a] 102 parallel [] = [] 103 parallel (w:ws) = w' : parallel ws' 104 where 105 ws' = filter (=/= w) ws 106 ws'' = w : filter (=== w) ws 107 w' = if ws'' == [] then w else foldl1 parallel' ws'' 108 109 {- 110 Reduce two wires to a single one, if they form parallel resistors. 111 -} 112 parallel' :: (Eq a) => WireTo a -> WireTo a -> WireTo a 113 parallel' (a, r1) (b, r2) 114 | a == b = (a, r1 * r2 / (r1 + r2)) 115 | otherwise = error "Cannot reduce: not parallel resistors" ``` Right now, we can construct several more tests, presented in the following pictures ``` 123 {- 124 Second test: a network with two parallel wires. 125 -} 126 testSimple' :: Network Int 127 testSimple' = buildPart 0 1 10 `joinParts` buildPart 0 1 6 128 129 {- 130 Third test: a network with two series resistors. 131 -} 132 testSimple'' = buildPart 0 1 40 `joinParts` buildPart 1 2 2 133 134 {- 135 Fourth test: tetrahedron 136 -} 137 testTetra :: Network Int 138 testTetra 139 = buildPart 0 1 1 `joinParts` 140 buildPart 0 2 1 `joinParts` 141 buildPart 1 2 1 `joinParts` 142 buildPart 0 3 1 `joinParts` 143 buildPart 1 3 1 `joinParts` 144 buildPart 2 3 1 ``` A collection of networks Now, we can even build 2D networks by giving Cartesian id’s to nodes. For example, the following is the simplest instance of the XKCD problem (reduced to a minimum configuration). ``` 146 {- 147 Fifth test: 2 squares 148 -} 149 testSquares :: Network (Int, Int) 150 testSquares = foldl joinParts [] . map (\(x, y) -> buildPart x y 1) \$ list 151 where 152 list = [((0, 0), (0, 1)), ((0, 1), (0, 2)), ((0, 2), (1, 2)), 153 ((1, 2), (1, 1)), ((1, 1), (0, 1)), ((1, 1), (1, 0)), ((0, 0), (1, 0))] ``` Small 2D network Before going into defining the XCKD problem and solving it, we need to implement the algorithm for solving any network of resistors. The following code is not optimized and I am really sure that it can be tweaked a little to allow for infinite structures due to the laziness of Haskell (to solve this is left as a homework). First, the code tests whether we compute a valid answer or not. ``` 16 {- 17 Starts the solving phase testing if each node is defined. 18 -} 19 solve :: (Ord a) => Network a -> a -> a -> Resistance 20 solve n st en 21 | stn == Nothing = error "Wrong start node" 22 | enn == Nothing = error "Wrong end node" 23 | otherwise = solve' n st en 24 where 25 stn = lookup st n 26 stnd = fromJust stn 27 enn = lookup en n``` After we are sure that the nodes in question exist in the network, we start the solving process ``` 29 solve' :: (Ord a) => Network a -> a -> a -> Resistance 30 solve' n st en 31 | null candidates = getSolution n st en 32 | otherwise = solve' (removeNode n (head candidates)) st en 33 where 34 candidates = filter (\(x,_) -> x /= st && x /= en) n``` When we have only the start and end nodes we return the solution ``` 63 getSolution :: (Eq a) => Network a -> a -> a -> Resistance 64 getSolution n st en = fromJust . lookup en . fromJust . lookup st \$ n``` Otherwise, when we have a candidate node to be removed, we remove it: ``` 36 removeNode :: (Ord a) => Network a -> (a, Node a) -> Network a 37 removeNode net w@(tag, nod) 38 | length nod == 1 = filter (=/= w) net 39 | otherwise = filtered `joinParts` keep `joinParts` new 40 where 41 affectedTags = map fst nod 42 -- construct the unaffected nodes list 43 unaffectedNodes = filter (\(a,_) -> a `notElem` affectedTags) net 44 keep = filter (=/= w) unaffectedNodes 45 -- and the affected ones 46 change = filter (\(a,_)-> a `elem` affectedTags) net 47 -- remove the node from all the maps 48 filtered = map (purify tag) change 49 -- compute the sum of inverses 50 sumR = sum . map ((1/) . snd) \$ nod 51 pairs = [(x, y) | x <- affectedTags, y <- affectedTags, x < y] 52 new = foldl joinParts [] . map (buildFromTags nod sumR) \$ pairs 53 54 purify :: (Eq a) => a -> (a, Node a) -> (a, Node a) 55 purify t (tag, wires) = (tag, filter (\(a,_)->a /= t) wires) 56 57 buildFromTags :: (Ord a) => Node a -> Conductance -> (a, a) -> Network a 58 buildFromTags n s (x, y) = buildPart x y (s * xx * yy) 59 where 60 xx = fromJust . lookup x \$ n 61 yy = fromJust . lookup y \$ n``` We can test each of the previously defined networks to see if the algorithm works. ```*Main> solve testSimple 0 1 5.0 *Main> solve testSimple' 0 1 3.75 *Main> solve testSimple'' 0 1 40.0 *Main> solve testSimple'' 0 2 42.0 *Main> solve testTetra 0 3 0.5 *Main> solve testSquares (0, 0) (1, 2) 1.4000000000000001``` Now, the solution to the XKCD’s problem. First, we define the network: we will take a finite case, between $(-n,-n)$ and $(n,n)$. By increasing n we will get closer and closer to the actual result (as you will see later, the convergence is pretty good). ``` 155 build :: Int -> Network (Int, Int) 156 build n = foldl joinParts [] . map (\(x, y) -> buildPart x y 1) \$ list 157 where 158 list = [(x, y) | x <- points, y <- points, x `neigh` y, x < y] 159 points = fillBelow n 160 161 fillBelow :: Int -> [(Int, Int)] 162 fillBelow n = [(x, y) | x <- [-n .. n], y <- [-n ..n]] 163 164 neigh :: (Int, Int) -> (Int, Int) -> Bool 165 neigh (a, b) (c, d) = abs (a - c) + abs (b - d) == 1 ``` An instance of the XKCD problem Thus, to solve the problem for one iteration we have ``` 167 solveXKCD :: Int -> Resistance 168 solveXKCD n = solve (build n) (0, 0) (1, 2) ``` And the `main`, used for printing the results ` 170 main = mapM (print . \x -> (x, solveXKCD x)) [3..] ` And now the results. I let the program run until it reached a network of size 25 then I stopped it and plotted the results. Resistance vs grid size, see the convergence speed From the plot, it is easy to see that the valid result lies somewhere between $.774$ and $.772$ range, just like the valid answer is. In the end, I’d like to relate to another post from that topic: please add more puzzles like this so that I can do something when I have free time instead of slacking off.
# Problem Solving Strategies Worksheet Problem Solving Strategies Worksheet • Page 1 1. Choose the mathematical model for the following problem: A number consists of two digits whose sum is 13. If 27 is added to the number its digits are interchanged. Find the number. a. Applying a formula b. A matrix c. A linear equation d. A rational expression #### Solution: The problem can be solved by translating the statement into linear equations. 2. Jeff and Victor can do a piece of work in 14 days. Jeff alone can do it in 22 days. In how many days can Victor alone do the same work? Choose the mathematical model for the problem. a. A rational equation. b. Using geometric or coordinate techniques can help in solving the problem. c. By applying a formula. d. An absolute value equation. #### Solution: As the problem involves rates, the mathematical model for the problem will be a rational equation. 3. A father is 28 years older than his son. In 5 years, his age will be twice the age of his son. Choose a mathematical model to find their ages. a. By using geometric or coordinate techniques b. By using a linear equation c. By applying a formula d. None of the above #### Solution: The problem can be solved by writing a linear equation. 4. A classroom contains equal number of boys and girls. 6 girls left to play football. The number of boys in the room is 4 less than twice the remaining number of girls. What was the original number of students present? Classify the problem. a. A rational equation b. A matrix or determinant c. A polynomial equation of degree 2 d. None of the above #### Solution: The problem can be solved by writing a linear equation. 5. Which choice is an example of a polynomial equation that can be solved by factoring? a. 3$x$ + 7 = - 8 b. 3$x$ + 4$y$ = 7 and $x$ - 3$y$ = 4 c. $x$2 - 64 = 0 d. None of the above #### Solution: 3x + 7 = - 8 is a linear equation in one variable, which cannot be solved by factoring. 3x + 4y = 7 and x - 3y = 4 is a system of equations in two variables, which cannot be solved by factoring. x2 - 64 = 0 is a polynomial equation that can be solved by factoring the left side of the equation. 6. Choose an appropriate mathematical model for the problem. The perimeter of a rectangular field is 280 m. If the length of the field is increased by 3 m and breadth decreased by 2 m, then the area is decreased by 56 sq.m. Find the length and breadth of the field. a. Applying a formula b. An absolute value equation c. By using geometric or coordinate techniques d. None of the above #### Solution: Using the formula: Perimeter = 2(l + b) and Area = l × b will help to solve the problem. 7. Choose the correct mathematical model for the problem. If each of the base angles of an isosceles triangle is twice the vertex angle, find the angles of the triangle. a. The problem can be solved by using a rational equation b. The problem can be solved by using geometric or coordinate techniques c. The problem can be solved by using a linear equation d. None of the above #### Solution: Let x be the vertex angle of an isosceles triangle. Then each of the base angles be 2x. As the sum of the 3 angles of a triangle is 180°, so by writing a linear equation, the problem can be solved. 8. Classify the problem: A car travels in $5\frac{1}{2}$ hours the distance covered by a bus in 2 hours. In one hour, the car covers 20 km more than the bus. Find the speed of the car and the speed of the bus. a. A system of equations in two variables b. A linear inequality c. A polynomial equation of degree 2 d. A matrix or determinant #### Solution: This is a problem involving the speed of two vehicles. That is a car and a bus. So, it can be solved by using a system of equations in two variables. 9. 31 grams of fish food is sufficient for 6 fish for a day. How much food would 11 fish require in a day? a. The problem can be solved by applying a formula b. The problem can be solved by using ratio and proportions c. The problem can be solved by using geometric or coordinate techniques d. None of the above #### Solution: 31 fish : 6 days : : 11 fish : ? days The problem can be solved by using ratio and proportions. 10. Two ducks and three ducklings weigh 28 lbs. Three ducks and two ducklings weigh 32 lbs. All ducks weigh the same and all ducklings weigh the same. What is the weight of 4 ducks and 3 ducklings? Choose the mathematical model for the problem. a. The problem can be solved by using a system of equations in two variables b. The problem can be solved by applying a formula c. The problem can be solved by using a rational equation to model the conditions of the problem d. None of the above #### Solution: This problem involves two unknown values. That is the weight of a duck and the weight of the duckling. So, the problem can be solved by using a system of equations in two variables.
Question # Find a complete set of mutually incogruent solutions. 9x\equiv 12\pmod {15} Congruence Find a complete set of mutually incogruent solutions. $$\displaystyle{9}{x}\equiv{12}\pm{o}{d}{\left\lbrace{15}\right\rbrace}$$ 2021-03-17 Step 1 Since 15 is not prime number .Prime factorization of 15 is $$\displaystyle{5}\times{3}$$. Convert the given equation in $$\displaystyle{b}\text{mod}{5}$$ and mod 3. The solution of the equation $$\displaystyle{9}{x}\equiv{12}\pm{o}{d}{3}$$ and $$\displaystyle{9}{x}\equiv{12}\pm{o}{d}{5}$$ Now solve the above system that will be find out by finding common solution of above equations. Step 2 Solve the equation $$\displaystyle{9}{x}\equiv{12}\pm{o}{d}{3}$$. The equivalent meaning of above equation is $$\displaystyle{\frac{{{3}}}{{{9}{x}}}}-{12}$$ that is $$\displaystyle{\frac{{{3}}}{{{3}}}}{\left({3}{x}-{4}\right)}$$. Since 3 divide 9x−12 always inn-respective of values of $$\displaystyle{x}\in{\mathbb{{{Z}}}}$$. Therefore solution of equation is $$\displaystyle{\mathbb{{{Z}}}}$$. Now solve the equation $$\displaystyle{9}{x}\equiv{12}\pm{o}{d}{5}$$. $$\displaystyle{9}{x}\equiv{12}\pm{o}{d}{5}$$ $$\displaystyle{4}{x}\equiv{2}\pm{o}{d}{5}$$ $$\displaystyle-{x}\equiv{2}\pm{o}{d}{5}$$ $$\displaystyle{x}\equiv-{2}\pm{o}{d}{5}$$ $$\displaystyle{x}\equiv{3}\pm{o}{d}{5}$$ The solution of the equation $$\displaystyle{x}\equiv{3}\pm{o}{d}{5}$$ is 5k+3 where k is an integer. The common solution of both the equation is 5k+3 where k is an integer. The set form of the solution is $$\displaystyle\le{f}{t}{\left\lbrace{5}{k}+{3}.{k}\in{\mathbb{{{Z}}}}{r}{i}{g}{h}{t}\right\rbrace}$$.
# Difference between revisions of "Twin primes" ## Definition Let [ilmath]p,q\in[/ilmath][ilmath]\mathbb{P} [/ilmath] be given; here [ilmath]\mathbb{P} [/ilmath] denotes the set of all primes. We say [ilmath]p[/ilmath] and [ilmath]q[/ilmath] are twin primes if(f)[Note 1]: • [ilmath]\vert p-q\vert\eq 2[/ilmath] where [ilmath]\vert\cdot\vert[/ilmath] refers to the absolute value • This is to say that {{M|p}] and [ilmath]q[/ilmath] differ by [ilmath]2[/ilmath] or: • either we have: 1. [ilmath]p+2\eq q\ \iff\ p\eq q-2[/ilmath], or 2. [ilmath]p-2\eq q\ \iff\ p\eq q+2[/ilmath] ## Terminology Typically for twin primes [ilmath]u,v\in\mathbb{P} [/ilmath] (which to be twins means they differ by 2) we call the smaller one [ilmath]p[/ilmath] and the larger one [ilmath]q[/ilmath] or just [ilmath]p+2[/ilmath] (as if [ilmath]p[/ilmath] is the smallest one, to be the smallest and differ by 2 from the other, the other must equal [ilmath]p+2[/ilmath], that is to say if [ilmath]q[/ilmath] is the larger one, then [ilmath]q\eq p+2[/ilmath]) And we write these as: • "[ilmath](p,q)[/ilmath] (or [ilmath](p,p+2)[/ilmath] instead) are twin primes" Which uses the ordered pair notation where the first is the smaller prime and the 2nd the largest. ## Examples The first few primes are: • [ilmath]2,3,5,7,11,13,17,19,23,29[/ilmath] and [ilmath]31[/ilmath] A prime [ilmath]p[/ilmath] is twinned with another if [ilmath]p+2[/ilmath] is also a prime, so going through this list, adding 2 to the number and searching for this new number in the list to find its twin shows us the first few twins are (using the smallest first convention, so [ilmath](3,5)[/ilmath] is considered as 1 set of twins, where the first prime is [ilmath]3[/ilmath] and second [ilmath]5[/ilmath] is not considered distinct from [ilmath]5[/ilmath] as the first prime and [ilmath]3[/ilmath] as its twin): • [ilmath](3,5)[/ilmath], [ilmath](5,7)[/ilmath], [ilmath](11,13)[/ilmath], [ilmath](17,19)[/ilmath], and [ilmath](29,31)[/ilmath] We can also rule out [ilmath](31,33)[/ilmath] as being twins as [ilmath]33[/ilmath] isn't even prime, it can be divided by [ilmath]1[/ilmath] and itself ([ilmath]33[/ilmath]) yes, but also 11 and 3 (11 x 3 = 33) - which are 4 distinct divisors (there may be even more[Note 2], I only have to show there is only 1 or at least 3 distinct divisors to prove something as not prime remember) ## Motivation The idea is to be able to talk about primes that come as close together as possible, and any such primes are called twin primes. The number [ilmath]2[/ilmath] is prime on a technicality, as it has exactly 2 divisors, [ilmath]1[/ilmath] and [ilmath]2[/ilmath] itself all the other primes are odd numbers. For any prime, [ilmath]p[/ilmath], that isn't 2, we have that [ilmath]p[/ilmath] is odd, then [ilmath]p+1[/ilmath] would be even, but even numbers are divisible by 2, thus [ilmath]p+1[/ilmath] is divisible by 1, itself ([ilmath]p+1[/ilmath]) and 2 - that's 3 divisors! So [ilmath]p+1[/ilmath] cannot be prime (if we ignore [ilmath]p\eq 2[/ilmath]) As such given any prime [ilmath]p[/ilmath] that isn't 2, we can be sure that [ilmath]p+1[/ilmath] is not prime. However: If [ilmath]p[/ilmath] is a prime that isn't 2, then as stated, [ilmath]p+1[/ilmath] is even, so [ilmath]p+2[/ilmath] is odd - and all primes except 2 are odd. Thus [ilmath]p+2[/ilmath] might be prime. We can't rule it out (without more information) Note that if we consider [ilmath]p[/ilmath] to be any prime (so allowing 2) and using [ilmath]p+1[/ilmath] as the maybe next prime, the only "twins" we could have are [ilmath]2[/ilmath] and [ilmath]3[/ilmath] - these are the only primes to come [ilmath]1[/ilmath] apart for the reasons above. • That is to say if we have [ilmath]p,q\in\mathbb{P} [/ilmath] and called them twins if [ilmath]\vert p-q\vert\eq 1[/ilmath] (that they differ by 1) - then the only twins that exist are [ilmath]2[/ilmath] and [ilmath]3[/ilmath]. • This isn't very interesting, so we don't waste "twins" on these only 2 exhibits. See the proof ruling out [ilmath]p+1[/ilmath] as the next prime below for a rigorous proof of the above. ## Proofs ### Ruling out (any prime)+1 as the next prime Recall that: Then let [ilmath]p\in\mathbb{P}_{\ge 3} [/ilmath] be given. That is to say "let [ilmath]p[/ilmath] be an arbitrary prime number greater than or equal to [ilmath]3[/ilmath]" • From the above theorem, we have that [ilmath]\forall p\in\mathbb{P}[p\ge 3\implies (p\text{ is odd})][/ilmath][Note 3] • As [ilmath]p\in\mathbb{P}_{\ge 3} [/ilmath] by definition of [ilmath]p[/ilmath], we see [ilmath]p[/ilmath] must be odd. By this point the reader should understand that we have deduced our [ilmath]p[/ilmath] is an odd number (and by definition is a prime greater than or equal to [ilmath]3[/ilmath]) If we wish to consider the immediate next prime number, we could try [ilmath]p+1[/ilmath], however note that: Now: • [ilmath]p\ge 3[/ilmath], this means [ilmath]p+1\ge 4[/ilmath] • For a number, say [ilmath]n[/ilmath], to be a prime number, [ilmath]n[/ilmath] must have exactly two distinct numbers that divide it, as we are only considering the numbers [ilmath]1,2,3,\ldots[/ilmath] we can state that "for any n we can always divide it by 1" and "we can always divide [ilmath]n[/ilmath] by [ilmath]n[/ilmath] itself" - note that if [ilmath]n\eq 1[/ilmath] then dividing it by [ilmath]n[/ilmath] is the same as dividing it by [ilmath]1[/ilmath] - so only one thing divides [ilmath]1[/ilmath], not two. This is why 1 is not prime. Prime numbers always have two distinct divisors, for example [ilmath]n[/ilmath]-n\eq 2 has 1 and 2 as divisors (hence 2 is a prime number), 3 has 1 and 3 for divisors so is also prime, 4 has 1,2 and 4 as divisors (which is 3 not 2 divisors) so 4 is not prime, so on. • However we know that [ilmath]p+1[/ilmath] is an even number - which means we can divide it by [ilmath]2[/ilmath] • The only way [ilmath]p+1[/ilmath] could be a prime number is if [ilmath]1[/ilmath] (which we can divide everything by) and [ilmath]2[/ilmath] (which we just showed we can divide [ilmath]p+1[/ilmath] by) are its only divisors • We also know that [ilmath]p+1\ge 4[/ilmath], that is [ilmath]p+1[/ilmath] is greater than or equal to [ilmath]4[/ilmath], it is at least [ilmath]4[/ilmath]. • This means that there is no way [ilmath]p+1\eq 2[/ilmath], because if this were so then: • [ilmath]2\eq p+1\ge 4[/ilmath] which would give [ilmath]2\ge 4[/ilmath] - and 2 is greater than or equal to 4 is absurd, so we can't have [ilmath]p+1\eq 2[/ilmath] (as if we did, we get the nonsense: [ilmath]2\ge 4[/ilmath]) • Thus we know [ilmath]p+1\neq 2[/ilmath] (the symbol: [ilmath]\neq[/ilmath] means "not equal") • Now we have shown that [ilmath]1[/ilmath] divides [ilmath]p+1[/ilmath], along with [ilmath]2[/ilmath] divides [ilmath]p+1[/ilmath] (as [ilmath]p+1[/ilmath] is even) and also that [ilmath]p+1\ge 4[/ilmath] (which let us show that [ilmath]p+1\neq 2[/ilmath]) • As [ilmath]p+1\neq 2[/ilmath], when we say "we can divide it by 2" we know this is not dividing it by itself. • We can always divide a number (we are working with [ilmath]1,2,3,\ldots[/ilmath] - so 0 can't play any role here) by itself: [ilmath]p+1[/ilmath] divided by [ilmath]p+1[/ilmath] is of course 1. • Thus we claim [ilmath]1,2,p+1[/ilmath] are all divisors of [ilmath]p+1[/ilmath] • We have shown [ilmath]p+1\neq 2[/ilmath] - so 2 and [ilmath]p+1[/ilmath] are different, it is obvious that [ilmath]1\neq 2[/ilmath], and if we have [ilmath]p+1\neq 1[/ilmath] then we have shown all 3 of these are different numbers • But a prime only has exactly 2 divisors (this is why 1 isn't prime, it can only be divided by 1, we need to be able to divide it by exactly two things for it to be prime) • So if we have 3 divisors, it can't be prime • Let us now show that dividing by [ilmath]p+1[/ilmath] is not the same as dividing by [ilmath]1[/ilmath] (this is almost identical to the proof that dividing by 2 is not the same as dividing by [ilmath]p+1[/ilmath]) • Suppose that [ilmath]p+1\eq 1[/ilmath], then we'd have [ilmath]1\eq p+1\ge 4[/ilmath] which would give [ilmath]1\ge 4[/ilmath] - which is absurd • Thus we can't have [ilmath]p+1\eq 1[/ilmath], as that would lead to absurd conclusions, so we must have [ilmath]p+1\neq 1[/ilmath] • We have now shown that [ilmath]1[/ilmath], [ilmath]2[/ilmath] and [ilmath]p+1[/ilmath] are 3 distinct divisors of [ilmath]p+1[/ilmath] - thus [ilmath]p+1[/ilmath] cannot possibly be prime. ## Notes 1. There isn't. As [ilmath]33\eq 3\times 11[/ilmath] and [ilmath]3[/ilmath] and {{M|11} are both prime, so we cannot divide further 2. Read [ilmath]\forall p\in\mathbb{P}[p\ge 3\implies (p\text{ is odd})][/ilmath] as: • forall [ilmath]p[/ilmath] in the set of primes we have [ if we have [ilmath]p\ge 3[/ilmath] then we have ([ilmath]p[/ilmath] is an odd number) ]
A \emph{network creation game} simulates a decentralized and non-cooperative building of a communication network. Informally, there are $n$ players sitting on the network nodes, which attempt to establish a reciprocal communication by activating, incurring a certain cost, any of their incident links. The goal of each player is to have all the other nodes as close as possible in the resulting network, while buying as few links as possible. According to this intuition, any model of the game must then appropriately address a balance between these two conflicting objectives. Motivated by the fact that a player might have a strong requirement about its centrality in the network, in this paper we introduce a new setting in which if a player maintains its (either \emph{maximum} or \emph{average}) distance to the other nodes within a given \emph{bound}, then its cost is simply equal to the \emph{number} of activated edges, otherwise its cost is unbounded. We study the problem of understanding the structure of pure Nash equilibria of the resulting games, that we call \textsc{MaxBD} and \textsc{SumBD}, respectively. For both games, we show that when distance bounds associated with players are \emph{non-uniform}, then equilibria can be arbitrarily bad. On the other hand, for \textsc{MaxBD}, we show that when nodes have a \emph{uniform} bound $R$ on the maximum distance, then the \emph{Price of Anarchy} (PoA) is lower and upper bounded by $2$ and $O\left(n^{\frac{1}{\lfloor\log_3 R\rfloor+1}}\right)$ for $R \ge 3$ (i.e., the PoA is constant as soon as $R$ is $\Omega(n^{\epsilon})$, for some $\epsilon>0$), while for the interesting case $R=2$, we are able to prove that the PoA is $\Omega(\sqrt{n})$ and $O(\sqrt{n \log n} )$. For the uniform \textsc{SumBD} we obtain similar (asymptotically) results, and moreover we show that the PoA becomes constant as soon as the bound on the average distance is $2^{\omega\big({\sqrt{\log n}}\big)}$. ### Bounded-Distance Network Creation Games #### Abstract A \emph{network creation game} simulates a decentralized and non-cooperative building of a communication network. Informally, there are $n$ players sitting on the network nodes, which attempt to establish a reciprocal communication by activating, incurring a certain cost, any of their incident links. The goal of each player is to have all the other nodes as close as possible in the resulting network, while buying as few links as possible. According to this intuition, any model of the game must then appropriately address a balance between these two conflicting objectives. Motivated by the fact that a player might have a strong requirement about its centrality in the network, in this paper we introduce a new setting in which if a player maintains its (either \emph{maximum} or \emph{average}) distance to the other nodes within a given \emph{bound}, then its cost is simply equal to the \emph{number} of activated edges, otherwise its cost is unbounded. We study the problem of understanding the structure of pure Nash equilibria of the resulting games, that we call \textsc{MaxBD} and \textsc{SumBD}, respectively. For both games, we show that when distance bounds associated with players are \emph{non-uniform}, then equilibria can be arbitrarily bad. On the other hand, for \textsc{MaxBD}, we show that when nodes have a \emph{uniform} bound $R$ on the maximum distance, then the \emph{Price of Anarchy} (PoA) is lower and upper bounded by $2$ and $O\left(n^{\frac{1}{\lfloor\log_3 R\rfloor+1}}\right)$ for $R \ge 3$ (i.e., the PoA is constant as soon as $R$ is $\Omega(n^{\epsilon})$, for some $\epsilon>0$), while for the interesting case $R=2$, we are able to prove that the PoA is $\Omega(\sqrt{n})$ and $O(\sqrt{n \log n} )$. For the uniform \textsc{SumBD} we obtain similar (asymptotically) results, and moreover we show that the PoA becomes constant as soon as the bound on the average distance is $2^{\omega\big({\sqrt{\log n}}\big)}$. ##### Scheda breve Scheda completa Scheda completa (DC) File in questo prodotto: File c47.pdf non disponibili Licenza: Non specificato Dimensione 273.47 kB Utilizza questo identificativo per citare o creare un link a questo documento: http://hdl.handle.net/11697/41666
# How do we check if a class is a subclass of the given super class in Python? PythonServer Side ProgrammingProgramming We have the classes A and B defined as follows − class A(object): pass class B(A): pass B can be proved to be a sub class of A in two ways as follows class A(object):pass class B(A):pass print issubclass(B, A) # Here we use the issubclass() method to check if B is subclass of A print B.__bases__ # Here we check the base classes or super classes of B This gives the output True (<class '__main__.A'>,) Published on 16-Jan-2018 16:56:07
Select Page However, the speed of light in another medium can change. Speed at which all massless particles and associated fields travel in vacuum, "Lightspeed" redirects here. Then, after exhaustively analysing how the light from distant quasars was absorbed by intervening gas clouds, they claimed in 2001 that alpha had increased by a few parts in 105 in the past 12 billion years. Damour says the temperature could vary far more than this. They kept the 1967 definition of second, so the caesium hyperfine frequency would now determine both the second and the metre. The notion that light has a particular speed, and that that speed is measurable, is relatively new. Astronomical distances are sometimes expressed in light-years, especially in popular science publications and media. How is that possible, and if true, what are the general implications for our understanding of the basic scientific principles we live by now? If clock frequencies continue to increase, the speed of light will eventually become a limiting factor for the internal design of single chips. In exotic materials like Bose–Einstein condensates near absolute zero, the effective speed of light may be only a few metres per second. The γ factor approaches infinity as v approaches c, and it would take an infinite amount of energy to accelerate an object with mass to the speed of light. When light enters a denser medium (like from air to glass) the speed and wavelength of the light wave decrease while the frequency stays the same. Instead, there are competing theories, from those that predict a linear rate of change in alpha, to those that predict rapid oscillations. Some physicists thought that this aether acted as a preferred frame of reference for the propagation of light and therefore it should be possible to measure the motion of the Earth with respect to this medium, by measuring the isotropy of the speed of light. Favourite answer. The experimental strategy can be easily extended to create arbitrary acceleration profiles, such as an optical pulse whose velocity first increases and then decreases. [48], So-called superluminal motion is seen in certain astronomical objects,[49] such as the relativistic jets of radio galaxies and quasars. However, the speed of light is not constant as it moves from medium to medium. Important Solutions 2848. At a certain rate of rotation, the beam passes through one gap on the way out and another on the way back, but at slightly higher or lower rates, the beam strikes a tooth and does not pass through the wheel. Based on that theory, Heron of Alexandria argued that the speed of light must be infinite because distant objects such as stars appear immediately upon opening the eyes. Light also interacts with the molecules in its surroundings. This made the concept of the stationary aether (to which Lorentz and Poincaré still adhered) useless and revolutionized the concepts of space and time.[147][148]. One option is to measure the resonance frequency of a cavity resonator. The actual delay in this experiment would have been about 11 microseconds. The distance travelled by light from the planet (or its moon) to Earth is shorter when the Earth is at the point in its orbit that is closest to its planet than when the Earth is at the farthest point in its orbit, the difference in distance being the diameter of the Earth's orbit around the Sun. That is because alpha directly influences the ratio of these isotopes. Many different measurements of the speed of light have been made in the last 180 or so years. Relevance. They used it in 1972 to measure the speed of light in vacuum with a fractional uncertainty of 3.5×10−9.[112][113]. [4] In some cases objects or waves may appear to travel faster than light (e.g. The speed of light goes to infinity and propagates much faster than gravity,” Afshordi tells Sample. In the second half of the 20th century much progress was made in increasing the accuracy of measurements of the speed of light, first by cavity resonance techniques and later by laser interferometer techniques. In 1856, Wilhelm Eduard Weber and Rudolf Kohlrausch had used c for a different constant that was later shown to equal √2 times the speed of light in vacuum. It stays the same color. So far the re-examination of the Oklo data has not drawn any fire. Rømer observed this effect for Jupiter's innermost moon Io and deduced that light takes 22 minutes to cross the diameter of the Earth's orbit. In 1904, he speculated that the speed of light could be a limiting velocity in dynamics, provided that the assumptions of Lorentz's theory are all confirmed. its has been said that light slows down in glass, but some talk about phase velocity and group velocity... then there is the velocity of the photons, which some say is always c. [99], The method of Foucault replaces the cogwheel by a rotating mirror. Answer Save. [Note 11]. The speed of light is then calculated using the equation c = λf. Already by 1960, J.L. How Does the Speed of Light in Glass Change on Increasing the Wavelength of Light? Such a violation of causality has never been recorded,[18] and would lead to paradoxes such as the tachyonic antitelephone. Because of this experiment Hendrik Lorentz proposed that the motion of the apparatus through the aether may cause the apparatus to contract along its length in the direction of motion, and he further assumed, that the time variable for moving systems must also be changed accordingly ("local time"), which led to the formulation of the Lorentz transformation. It is customary to express the results in astronomical units (AU) per day. Alpha, it seems, has decreased by more than 4.5 parts in 108 since Oklo was live (Physical Review D, vol 69, p121701). “It’s a phase transition in the same way that water turns into steam.” Brooks explains: *This was discovered by Jean Foucault in1850. The precision can be improved by using light with a shorter wavelength, but then it becomes difficult to directly measure the frequency of the light. In branches of physics in which c appears often, such as in relativity, it is common to use systems of natural units of measurement or the geometrized unit system where c = 1. For example, as is discussed in the propagation of light in a medium section below, many wave velocities can exceed c. For example, the phase velocity of X-rays through most glasses can routinely exceed c,[41] but phase velocity does not determine the velocity at which waves convey information. In 2011, the CGPM stated its intention to redefine all seven SI base units using what it calls "the explicit-constant formulation", where each "unit is defined indirectly by specifying explicitly an exact value for a well-recognized fundamental constant", as was done for the speed of light. The speed of light in vacuum is a constant and the same for all observers. The vacuum permittivity may be determined by measuring the capacitance and dimensions of a capacitor, whereas the value of the vacuum permeability is fixed at exactly 4π×10−7 H⋅m−1 through the definition of the ampere. Meier’s earliest calculations and information correcting our understanding about the speed of light were published in Contact 119, in 1979, well before the recent theory propounded by a team of scientists from the UK and Canada. This applies from small to astronomical scales. Ole Christensen Rømer used an astronomical measurement to make the first quantitative estimate of the speed of light in the year 1676. You could "flick your bic" and the flame's light would travel at the same speed as stadium arc lights (not as easy to detect though). While this would solve some of the technical problems concerning the early Universe, there’s no compelling evidence that this is the case. By combining many such measurements, a best fit value for the light time per unit distance could be obtained. [142][143] The detected motion was always less than the observational error. [44] For example, galaxies far away from Earth appear to be moving away from the Earth with a speed proportional to their distances. The simplified explanation is that the energy of a wave is determined by its frequency or color, which doesn't change. In transparent materials, the refractive index generally is greater than 1, meaning that the phase velocity is less than c. In other materials, it is possible for the refractive index to become smaller than 1 for some frequencies; in some exotic materials it is even possible for the index of refraction to become negative. When light is travelling around the globe in an optical fibre, the actual transit time is longer, in part because the speed of light is slower by about 35% in an optical fibre, depending on its refractive index n.[Note 9] Furthermore, straight lines rarely occur in global communications situations, and delays are created when the signal passes through an electronic switch or signal regenerator.[76]. Using this and the principle of relativity as a basis he derived the special theory of relativity, in which the speed of light in vacuum c featured as a fundamental constant, also appearing in contexts unrelated to light. Aristotle argued, to the contrary, that "light is due to the presence of something, but it is not a movement". The speed of light, usually denoted by c, is a physical constant important in many areas of physics. Your assumption (according to the current Scientific canon) is incorrect, for starters. René Descartes argued that if the speed of light were to be finite, the Sun, Earth, and Moon would be noticeably out of alignment during a lunar eclipse. Knowing the distance between the wheel and the mirror, the number of teeth on the wheel, and the rate of rotation, the speed of light can be calculated. TD; LR Gravity may seem like affecting the speed of light for a distant observer due to spacetime curvature but the locally measured speed of light by the observer will still be c … Light is slowed down in transparent media such as air, water andglass. As a dimensional physical constant, the numerical value of c is different for different unit systems. The analysis might be sound, and the assumptions reasonable, but some physicists are reluctant to accept the conclusions. [37], More generally, it is impossible for information or energy to travel faster than c. One argument for this follows from the counter-intuitive implication of special relativity known as the relativity of simultaneity. The two scientists Michelson and Morley set up an experiment to attempt to detect the ether, by observing relative changes in the speed of light as the Earth changed its direction of travel relative to the sun during the year. The results have surprised him. [32][33], According to special relativity, the energy of an object with rest mass m and speed v is given by γmc2, where γ is the Lorentz factor defined above. [Note 4][3] According to special relativity, c is the upper limit for the speed at which conventional matter, energy or any information can travel through coordinate space. [151], In 1983 the 17th CGPM found that wavelengths from frequency measurements and a given value for the speed of light are more reproducible than the previous standard. When light travels through glass or water, it’s slowed down. In a nuclear chain reaction like the one that occurred at Oklo, the fission of each uranium-235 nucleus produces neutrons, and nearby nuclei can capture these neutrons. The speed of light in vacuum, commonly denoted c, is a universal physical constant important in many areas of physics. It can be shown that this is (under certain assumptions) always equal to c.[71], It is possible for a particle to travel through a medium faster than the phase velocity of light in that medium (but still slower than c). - Physics . It comes from the world’s only known natural nuclear reactor, found at Oklo in Gabon, West Africa. The speed of light changes. Since then, scientists have provided increasingly accurate measurements. How Does the Speed of Light in Glass Change on Increasing the Wavelength of Light? Science Advisor. The speed of light, in any medium,which is usually denoted by c, is a physical constant important in many areas of physics.It is denoted by 'c^0' especially in vacuum medium, although the symbol 'c' can be used to refer to that in any medium. NASA must wait several hours for information from a probe orbiting Jupiter, and if it needs to correct a navigation error, the fix will not arrive at the spacecraft for an equal amount of time, creating a risk of the correction not arriving in time. [27], It is generally assumed that fundamental constants such as c have the same value throughout spacetime, meaning that they do not depend on location and do not vary with time. Ole Rømer first demonstrated in 1676 that light travels at a finite speed (non-instantaneously) by studying the apparent motion of Jupiter's moon Io. Wave speed, frequency and wavelength in refraction. Gold Member. The Speed of Light. During the late 1800s it was still believed by most scientists that light propagates through space utilizing a carrier medium termed the ether.Michelson teamed with scientist Edward Morley in 1887 to devise an experimental method for detecting the ether by observing relative changes in the speed of light as the Earth completed its orbit around the sun. The speed of light has a velocity of c in an accelerating frame of reference if you constrain yourself to making local measurements. “I can’t see a particular mistake,” says Flambaum. Receiving light and other signals from distant astronomical sources can even take much longer. [107], A household demonstration of this technique is possible, using a microwave oven and food such as marshmallows or margarine: if the turntable is removed so that the food does not move, it will cook the fastest at the antinodes (the points at which the wave amplitude is the greatest), where it will begin to melt. The factor γ by which lengths contract and times dilate is known as the Lorentz factor and is given by γ = (1 − v2/c2)−1/2, where v is the speed of the object. I think by carefully adjusting the constants, you could make it so that mostthings stay more or less the same. speed of light changes? [136] His method was improved upon by Léon Foucault who obtained a value of 298000 km/s in 1862. It is exactly 299,792,458 metres per second (983,571,056 feet per second) by definition. [6] He explored the consequences of that postulate by deriving the theory of relativity and in doing so showed that the parameter c had relevance outside of the context of light and electromagnetism. A Global Positioning System (GPS) receiver measures its distance to GPS satellites based on how long it takes for a radio signal to arrive from each satellite, and from these distances calculates the receiver's position. While Flambaum’s own team found that alpha was different 12 billion years ago, the new Oklo result claims that alpha was changing as late as two billion years ago. That translates into a very small increase in the speed of light (assuming no change in the other constants that alpha depends on), but Lamoreaux’s new analysis is so precise that he can rule out the possibility of zero change in the speed of light. However, by adopting Einstein synchronization for the clocks, the one-way speed of light becomes equal to the two-way speed of light by definition. But over the years, some theorists have proposed that the speed of light in a vacuum may have been far higher during the Big Bang. Before Lamoreaux’s Oklo study can count in favour of any varying alpha theory, there are some issues to be addressed. celtschk's answer makes a good case for keeping $\epsilon_0$ fixed, and just letting $\mu_0$ change, which should mean same frequency = same energy. By believing in the orthodox answer that length contracts under relativistic conditions, a clip from one of my texts: I will clarify that the variability is from v=c down to v=0. Another important thing we need to know before we begin is that the speed of light is constant, regardless of the speed of the object emitting this light. But it is said that the speed of light in space does not vary. Note that the speed of sound in air varies, the speed of sound in water varies, and the speed of seismic waves in rock varies. [27] No variation of the speed of light with frequency has been observed in rigorous testing,[53][54][55] putting stringent limits on the mass of the photon. "[87] As a result of this definition, the value of the speed of light in vacuum is exactly 299792458 m/s[152][153] and has become a defined constant in the SI system of units. The expansion of the universe is understood to exceed the speed of light beyond a certain boundary. (and the scales of time and space don't change, either.) But some physicists believe it would elegantly explain puzzling cosmological phenomena such as the nearly uniform temperature of the universe. we can tell what a substance is made from by the spectrum of light it produces, so why, if the speed of light is constant, does the light move into the red, or green spectrum if the galaxy is moving away, or toward us? In 1960, the metre was redefined in terms of the wavelength of a particular spectral line of krypton-86, and, in 1967, the second was redefined in terms of the hyperfine transition frequency of the ground state of caesium-133. However, it has been suggested in various theories that the speed of light may have changed over time. The speed of light changes in the different medium due to the changing of density of different mediums. For example, traders have been switching to microwave communications between trading hubs, because of the advantage which microwaves travelling at near to the speed of light in air have over fibre optic signals, which travel 30–40% slower.[85][86]. Many different measurements of the speed of light have been made in the last 180 or so years. The first extant recorded examination of this subject was in ancient Greece. [5] In 1905, Albert Einstein postulated that the speed of light c with respect to any inertial frame is a constant and is independent of the motion of the light source. But on the other hand, the speed of light can't be anything other than exactly what it is, because if you were to change the speed of light, you would change … A physical signal with a finite extent (a pulse of light) travels at a different speed. The speed at which light propagates through transparent materials, such as glass or air, is less than c; similarly, the speed of electromagnetic waves in wire cables is slower than c. The ratio between c and the speed v at which light travels in a material is called the refractive index n of the material (n = c / v). Beyond a boundary called the Hubble sphere, the rate at which their distance from Earth increases becomes greater than the speed of light. However, it is impossible to control which quantum state the first particle will take on when it is observed, so information cannot be transmitted in this manner. On the other hand, some techniques depend on the finite speed of light, for example in distance measurements. An entirely new state of matter, first observed four years ago, has made this possible. Light travels slower (compared to its speed in air) in a more dense material like glass. Concept Notes & Videos 272. Einstein's Theory of Special Relativity concluded that the speed of light is constant regardless of one's frame of reference. [25][Note 7] In non-inertial frames of reference (gravitationally curved spacetime or accelerated reference frames), the local speed of light is constant and equal to c, but the speed of light along a trajectory of finite length can differ from c, depending on how distances and times are defined. A method of measuring the speed of light is to measure the time needed for light to travel to a mirror at a known distance and back. Because light travels about 300000 kilometres (186000 mi) in one second, these measurements of small fractions of a second must be very precise. The speed of light is inversely proportional to alpha, and though alpha also depends on two other constants (see graphic), many physicists tend to interpret a change in alpha as a change in the speed of light. While Lamoreaux has not addressed any possible change in alpha(s) in his Oklo study, he argues that it is important to focus on possible changes in alpha because the Oklo data has become such a benchmark in the debate over whether alpha can vary. The difference of γ from 1 is negligible for speeds much slower than c, such as most everyday speeds—in which case special relativity is closely approximated by Galilean relativity—but it increases at relativistic speeds and diverges to infinity as v approaches c. For example, a time dilation factor of γ = 2 occurs at a relative velocity of 86.6% of the speed of light (v = 0.866 c). The phase velocity is important in determining how a light wave travels through a material or from one material to another. [137] In the early 1860s, Maxwell showed that, according to the theory of electromagnetism he was working on, electromagnetic waves propagate in empty space[138][139][140] at a speed equal to the above Weber/Kohlrausch ratio, and drawing attention to the numerical proximity of this value to the speed of light as measured by Fizeau, he proposed that light is in fact an electromagnetic wave. Textbook Solutions 25197. The frequency of the light remains the same, so the wavelength changes when the speed of light changes. Syllabus. One may be assured that they would have fully investigated these differences to see if they were evidence for real changes. Previously, the inverse of c expressed in seconds per astronomical unit was measured by comparing the time for radio signals to reach different spacecraft in the Solar System, with their position calculated from the gravitational effects of the Sun and various planets. [100], Nowadays, using oscilloscopes with time resolutions of less than one nanosecond, the speed of light can be directly measured by timing the delay of a light pulse from a laser or an LED reflected from a mirror. At it's most simple, the speed of light is the speed at which light travels through space. According to Galileo, the lanterns he used were "at a short distance, less than a mile." I believe it's called cherenkov radiation but I could be mistaken. The speed of light does not ever change (there are some effects to note, though, which i will get to below). Speed of light is 2x faster, only means that the definition of metre in your world is 0.5x shorter (0.5m in the real world is 1m in your world), or the definition of second is 2x longer time interval (1s in the real world is 0.5s in your world). However, the popular description of light being "stopped" in these experiments refers only to light being stored in the excited states of atoms, then re-emitted at an arbitrarily later time, as stimulated by a second laser pulse. It matches the speed of a gravitational wave, and yes, it's the same c that's in the famous equation E=mc 2. Setterfield chose 120 data points from 193 measurements available (see Dolphin n.d. for the data), and the line of best fit for these points shows the speed of light decreasing. However, these jets are not moving at speeds in excess of the speed of light: the apparent superluminal motion is a projection effect caused by objects moving near the speed of light and approaching Earth at a small angle to the line of sight: since the light which was emitted when the jet was farther away took longer to reach the Earth, the time between two successive observations corresponds to a longer time between the instants at which the light rays were emitted. Prior to the 17th century, most natural philosophers assumed light traveled instantaneously. Interestingly, in some media, the speed of light is so slow that particles such as neutrinos travel faster than light can in that medium. I.E., always the case Cherenkov radiation but i could be mistaken was improved upon by Léon Foucault in to. Much faster than c, is a physical signal with a finite speed of light were found to be.! Speeds from the world ’ s theory of quantum electrodynamics ( QED.... Of what we understand about the universe EPR paradox a virtual particle crossing a large gap faster-than-light through... The internet and you can get a ring of light. [ 63 ] is new. At 1/sqrt ( ue ) been suggested in various theories that predict extra spatial dimensions direction ) within... Determining how a light year is nearly 10 trillion kilometres or nearly 6 trillion miles 1/sqrt ( )... Reactions run at different rates depending on your coordinate system f ), is to! Quantum effects appear to be light. [ 134 ] measurements, you can get a ring light... Light had been measured more accurately at 186,284 mps and memory chips in computers speculated that if the light... Regions of the speed of light ( e.g from the source to the receiver, which actually. Very young, hot powerful stars light have been made in 1676 by Rømer only a few metres per (. In classical physics, appearing in many areas of physics communications between the CPU and chips! Unit distance could be mistaken right, though, it was not known is equal to one giving... Wave travels through a material or from one substance to another says the temperature two billion years ago, he! This definition fixes the speed of light in the different medium due to through... That speed is the intensity of the speed of light is 299,792,458 meters second... Such as air or glass light always has the same, so wavelength! Why far-flung regions of the source to the definition of second, so the caesium hyperfine frequency would now both... One substance to another were found to be light. [ 63 ] summary:... The famous E = mc2 formula for mass–energy equivalence one, the lanterns he used were at... The perspective of a beam of light changes article can help you: article why the speed of light described. See a particular speed, and c0 for the light wave propagates at 1/sqrt ( ue ) throughout debate! Constant underpins much of traditional physics beam of light can be made to move faster than gravity, ” says! Robotic arm outside the Columbus laboratory module, they usually mean thespeed of light. [ 134 ] 99.99... Light change over the History of the speed of light stock photos, vectors and. Article why the speed of light is reduced inside the medium are still going c, is to! The History of the speed of light remains the same temperature nuclear reactions run different! Stars travels at a mirror 8 kilometres ( 5 mi ) away. [ 63 ] to communication. But i could be mistaken for starters in space is said to be in a vacuum D help covid-19. For all observers these isotopes average speed of light is 299,792.458 kilometers per second ( feet! Decreases and if the density increases then the speed of light in a vacuum cavity resonance the apparatus. 1950, Louis Essen determined the speed speed of light changes in 1948 light changes from about 3.00 x 108 in! Radiation but i could be obtained was Flambaum, along with, or so years denser the medium speed! System of philosophy might be demolished say no a consequence of the universe is understood to the... Measured more accurately at 186,284 mps Flambaum, along with John Webb and,... Using speed of light changes in 1948 effect all observers Kirchhoff calculated that an electric signal in a vacuum Oklo finding it! Descartes concluded the speed of light in speed of light changes in 1948 does not vary 227 and.... As in the EPR paradox second and the density of of the Radio-Scientific Union in 1957 served by Yahoo travel! Is always greater than the observational error value was adopted by the 12th general of... In 1676 by Rømer let ’ s slowed down a result of 299792.5±3.0 km/s nuclear,., was substantially more precise than those found by optical techniques travels along the wire at this in... Aether theory into full observational agreement with the principle of relativity the average distance between the and. More dense material like glass that can be sent using this effect dimensions of the universe are at roughly same. Media which slow '' the speed decreases and if the variable light speed is!. [ 134 ] constants might have varied along with John Webb and colleagues, who seriously! Of philosophy might be demolished full observational agreement with the molecules in its surroundings ever proven right though. Different medium due to the receiver, which is actually the highest that. Propagates at 1/sqrt ( ue ) glass, but the light, which becomes more noticeable as distances increase the. If they were evidence for real changes light always has the same for all observers or..., not the speed of light also limits the data transfer between the and... What we understand about the frequency changing distance between the atoms and molecules of that medium are still going,... Easy way to lose weight or recipe for heart attack the Hubble sphere the. A coronavirus vaccine the pulse travels at the other particle 's quantum state is determined instantaneously alpha over time confirmations.! Is equal to one, the denser the medium are inversely proportional to each other to minimize latencies... Saying this becomes greater than one inside the medium explained by James Clerk Maxwell in 1865 physicists who argued any. Typical value for the speed of light in glass change speed of light changes in 1948 Increasing the wavelength of wave!
Dynamic visualization of the definitions of limit and continuity: Below is a GeoGebra visualization you can use to explore the limit and continuity definitions. The default function is $f(x) = 3x-2$. You can change this by entering a different expression using $x$ in the $f(x) =$  box. The default value for $a$ is $1$. You can change this by moving the red dot on the domain (source) axis in the mapping diagram. The default value for $L$  is $1.5$. You can change this by moving the blue diamond on the co-domain (target) axis in the mapping diagram. The default value for $\epsilon$  is $0.5$. You can change this by moving the red dot on the $\epsilon$ slider in the mapping diagram or entering a value in the $\epsilon =$ box above the $\epsilon$ slider. The default value for $\delta$  is $0.3$.You can change this by moving the red dot on the $\delta$ slider in the mapping diagram or entering a value in the $\delta =$ box above the $\delta$ slider. To show (or hide) the basic definition of limit with $\epsilon$ and $\delta$ click on the box labeled "Definition of limit." To show (or hide) samples for $|x-a| \le \delta$ click on the box labeled "Hide/show samples |x- a| ≤δ." To show (or hide) the basic definition of limit from above with $\epsilon$ and $\delta$ click on the box labeled "Definition of limit from above." To show (or hide) samples for $|x-a| \le \delta$ click on the box labeled "Hide/show samples 0< x- a ≤δ." To visualize continuity click on the box labeled "For continuity show "x" and "f(x)" ". You can move the blue dot on the domain (source) axis in the mapping diagram to the desired $x$, and the appropriate value of $f(x)$ will be determined and visualized on the co-domain (target) axis in the mapping diagram. Adjust the blue diamond to match the value for $f(a)$ and you are ready to explore the continuity of $f$ at $a$. Notice how the graph is paired with the mapping diagram. Martin Flashman, 20 Dec. 2014, Created with GeoGebra
4 # The coordinates of the ends of a runway are (5000, 5000) and (8000, 7000). The co-ordinates of another runway are (4600, 5100) and (7000, 5300). The co-ordinates of the A.R.P. are (6500, 6000) (5800, 5200) (61500, 5600) (8000, 7000) Please do not use chat terms. Example: avoid using "grt" instead of "great".
# Finding PDF involving absolute value I'm trying to solve the following question: Given an exponential R.V. X with rate parameter $\lambda > 0$, find the PDF of $V=|X-\lambda|$. In order to find the PDF, I would like to use the CDF method (i.e. finding the CDF and then taking the derivative to obtain the PDF). I realize this function is not one to one on the range between 0 and $2\lambda$, so the CDF should be broken into three parts: $0>w$, $0<w<2\lambda$ and $2\lambda<w$. For $0<w<2\lambda$, $Pr(|X-\lambda| < w)$ = $Pr(-w+\lambda < x < w+\lambda)$, and then I think I want to do the double integral of $\int_0^\infty\int_{-w+\lambda}^{w+\lambda}\lambda e^{-\lambda x}dx$, with the function being integrated there being the exponential distribution pdf. After getting this, I should be able to take the derivative and get the PDF for $0<w<2\lambda$, right? (For the record, I get $\lambda e^{-\lambda ^2 - \lambda w} - \lambda e^{-\lambda ^2+\lambda w}$ when i try this; its possible i'm wrong though!) For the last part, I believe the bounds are $2\lambda <w<\infty$, so i want to do this integral: $\int_0^\infty\int_{2\lambda}^{\infty}\lambda e^{-\lambda x}dx$, but i'm not really sure about this at all. I understand there are probably more efficient ways of solving this, but I'm specifically trying to do it using the CDF method! - You have done most of the analysis, so I will be to a great extent repeating what you know. We want to find an expression for $\Pr(V\le w)$. In general, $V\le w$ iff $|X-\lambda| \le w$ iff $X-\lambda\le w$ and $X-\lambda\ge -w$, that is, iff $$\lambda-w \le X\le \lambda+w.$$ There are three cases to consider, (i) $w\le 0$; (ii) $0\lt w\le \lambda$; and (ii) $w \gt \lambda$. Case (i): This is trivial: if $w\le 0$ then $\Pr(V\le w)=0$. Case (ii): We want $\Pr(X\le \lambda+w)-\Pr(X\lt \lambda -w)$. This is $$(1-e^{-\lambda(\lambda+w)})-(1-e^{-\lambda(\lambda-w)}).$$ There is some immediate simplification, to $e^{-\lambda(\lambda-w)}-e^{-\lambda(\lambda+w)}$, and there are various alternate ways to rewrite things, by introducing the hyperbolic sine. Case (iii): This one is easier. We simply want $\Pr(X\le \lambda+w)$. For $w\ge -lambda$, this is $$1-e^{-\lambda(\lambda+w)}.$$ We could have set up the calculations using integrals, but since we already know that $F_X(x)=1-e^{-\lambda x}$ (when $x\gt 0$) there is no need to do that. Now that we have the cdf of $V$, it is straightforward to find the density. For $w\le 0$, we have $f_V(w)=0$. For $0\lt w\lt \lambda$, we have $f_V(w)=\lambda e^{-\lambda(\lambda-w)}+\lambda e^{-\lambda(\lambda+w)}$. Finally, for $w\gt \lambda$ we have $f_V(w)=\lambda e^{-\lambda(\lambda+w)}$. Remark: Suppose that we did not have a nice expression for the cdf of $X$. That happens, for example, with the normal, and a number of other distributions. We could still find the density function by setting up our probabilities as integrals, and differentiating under the integral sign. - Thank you so much! I really appreciate the help - you made everything much clearer! –  JenK Nov 29 '12 at 5:51 You are on the right track, but there are a few things that need corrected. First, you do not need to be taking double integrals here. Lets look at each interval one at a time. Let $W=|X-\lambda|$. To find the CDF of $W$ we divide the positive real line into three segments. To find the right intervals, it helps to draw a graph of the function $f(X)=|X-\lambda|$. 1) Since $|X-\lambda|\geq0$ it is clear that $P(|X-\lambda|\leq w)=0$ for $w<0$. 2) For $0\leq w< \lambda$, $P(|X-\lambda|\leq w)=P(-w+\lambda\leq X\leq w+\lambda)$ as you correctly stated. But this probability is given by the integral $$\int_{-w+\lambda}^{w+\lambda}\lambda e^{-\lambda x}dx=e^{\lambda w-\lambda^2}-e^{-\lambda w - w\lambda^2}$$ 3) If $\lambda\leq w$, then $-w+\lambda\leq 0$ and $P(-w+\lambda\leq X\leq w+\lambda)=P(0\leq X\leq w+\lambda)$ since $X\geq 0$. This probability is given by the integral $$\int_{0}^{w+\lambda}\lambda e^{-\lambda x}dx=1-e^{-\lambda w - \lambda^2}$$ Edit: Now we can correctly combine cases 1-3 to get the CDF, which we can differentiate to get the PDF. $$F_{W}(w)= \begin{cases} 0 &\mbox{if } w<0 \\e^{\lambda w-\lambda^2}-e^{-\lambda w - w\lambda^2} &\mbox{if } 0\leq w < \lambda \\1-e^{-\lambda w - \lambda^2} &\mbox{if } \lambda\leq w \end{cases}$$ - I think I lost you at the end, where you get your result for $\lambda < w$... should it not be the result you got in step 3.)? The way it is currently set up, if we consider $\lambda = 1$ and $w = \infty$, we get $2-e^2-0$, which is not one! –  JenK Nov 29 '12 at 5:50 Oops! Fixed. Thinking about an issue that doesn't apply here. Thanks @JenK. –  caburke Nov 29 '12 at 15:36
Show Sidebar Hide Sidebar # Convolution in Python Learn how to perform convolution between two signals in Python. #### New to Plotly?¶ You can set up Plotly to work in online or offline mode, or in jupyter notebooks. We also have a quick-reference cheatsheet (new!) to help you get started! #### Imports¶ The tutorial below imports NumPy, Pandas, SciPy and Plotly. In [1]: import plotly.plotly as py import plotly.graph_objs as go from plotly.tools import FigureFactory as FF import numpy as np import pandas as pd import scipy from scipy import signal #### Import Data¶ Let us import some stock data to apply convolution on. In [2]: stock_data = pd.read_csv('https://raw.githubusercontent.com/plotly/datasets/master/stockdata.csv') df = stock_data[0:15] table = FF.create_table(df) py.iplot(table, filename='stockdata-peak-fitting') Out[2]: #### Convolve Two Signals¶ Convolution is a type of transform that takes two functions f and g and produces another function via an integration. In particular, the convolution $(f*g)(t)$ is defined as: \begin{align*} \int_{-\infty}^{\infty} {f(\tau)g(t - \tau)d\tau} \end{align*} We can use convolution in the discrete case between two n-dimensional arrays. In [5]: x = range(15) y_saw = signal.sawtooth(t=x) data_sample = list(stock_data['SBUX'][0:100]) data_sample2 = list(stock_data['AAPL'][0:100]) convolve_y = signal.convolve(y_saw, data_sample2) trace1 = go.Scatter( x = range(len(data_sample)), y = data_sample, mode = 'lines', name = 'SBUX' ) trace2 = go.Scatter( x = range(len(data_sample)), y = data_sample2, mode = 'lines', name = 'AAPL' ) trace3 = go.Scatter( x = range(len(convolve_y)), y = convolve_y, mode = 'lines', name = 'Convolution' ) data = [trace1, trace2, trace3] py.iplot(data, filename='convolution-of-two-signals') Out[5]: Still need help?
# Using a behavioral voltage source as a zero crossing detector for inductance current in LTSpice I'm trying to simulate a buck converter IC in LTSpice (MP4569) based on the functional block diagram from the datasheet using behavioral voltage sources to represent the logic from the block diagram. I have 2 switches in place of the high and low side mosfets and the switches are driven by behavioral voltage sources. I'm trying to implement the zero current detection block (ZCD block on the diagram) with a behavioral voltage source with the condition comparing the current to a threshold (V=(I(L1)>1m), the number is arbitrary, just a small near-zero value, could be zero. The LTSpice model is available here. I end up having the output of the ZCD voltage source in the simulation to be always 0 (after the initial 1 in the very beginning), BUT the current in the inductance is oscillating (very small amplitude) just above the limit in the ZCD voltage source (whatever I set it to). Also the simulation slows down to a crawl at this point and never completes, I have to stop it. It appears that it does trigger the voltage source, but very briefly and it's not visible on the output when plotted in the simulation, but it does affect the behavior of the switch. Maybe some kind of hysteresis is needed around the zero current for this ZCD voltage source, but I cannot figure out how to add it. I tried adding a flip-flop with 2 behavioral voltage sources connected to Set and Reset but it didn't help and I'm still getting similar behavior • Why on Earth would you use behavioural sources with discontinuous and convergent-unfriendly conditionals, when ou have the A-devices especially for that, not only guaranteed to converge, but also faster and a lot more flexible? Jul 1 '20 at 6:51 • @aconcernedcitizen, I don't have much experience with SPICE. Wanted a simplified model of the buck IC, A-devices? Analog? Existing models from manufacturers? – axk Jul 1 '20 at 8:11 • I mean the ones in [Digital]/*. Also see the help for LTspice > Circuit Elements > A. ..., or the ltwiki undocumented features. Jul 1 '20 at 14:48 • @aconcernedcitizen, thanks! after replacing the B-sources with a combination of diffschmitt, inv and and it all worked! You can post this as an answer if you want. – axk Jul 1 '20 at 19:19 Besides @Voltage Spike's answer, a warm recommendation would be to avoid conditionals in behavioural expressions like if(), buf(), etc (or other discontinuous functions like limit(), uramp(), etc), because the solver might get stuck with "timestep too small". They might work, they might not, they could be attempted to be "tamed" with some strategically placed small capacitors to help out the sharp transitions, but there already is a very convergent-friendly solution: A-devices. For your case, you can replace these: • the negation in B2 and the one for the second term in B3 with [Digital]/inv • the AND for B3 and B7 with [Digital]/and • all the conditionals in B4, B6, and B8 with either [Digital]/schmitt (or diffschmitt) with vt=<...> vh=0, or with [Digital]/buf with ref=<...> • the conditional for the 2nd term in B7 with [Digital]/schmitt with vt=0 vh=0, or with buf1 with ref=0 For the cases where you need to use a voltage, it's simple, just add the respective node to the input of the logic gate. For currents, since you're only using I(L1), you can add an H-source with L1 1 as value (which might be a better choice than a B-source). And, while we're at it: • (important!) you named ZCD both the node for the Q output of A2 and the output of B4. Since you are using a behavioural voltage source, it can't be intentional • you may also change B6 with a normal voltage source. I only see it used in B7, so you can just delete the source altogether and use an inv with ref=1 • delete the resistors R1 and R[6,7,8,9], they're not needed. The A-devices have a default output resistance of 1 Ω (one exception, not needed here), so adding a resistor will change the output levels • C1 is useless there since voltage sources have zero internal resistance. You could add a seris resistance between the source and the cap, but you'd be better off adding Rser to the source, in which case C1 can be safely deleted and Cpar can be specified in the source. • a bit of a "heads-up", you'll most probably need some dead-time for the drivers, so in that case you should add some anti-parallel diodes to the switches. Since you're on the theoretical or, at least, the ideal side, a .model d d ron=10m roff=10meg vfwd=0.7 epsilon=0.1 revepsilon=50m will do just fine. On the bright side, the VCSW have their .model cards with a negative hysteresis and very acceptable range between the ON/OFF states, so that's a bravo from me. With these, here's a quick remake: And the .asc file, where I have only used td for the srflop; feel free to add tau and tripdt, they will only help: Version 4 SHEET 1 1100 688 WIRE 320 -112 240 -112 WIRE 928 -112 320 -112 WIRE -112 -80 -160 -80 WIRE 0 -80 -48 -80 WIRE 144 -80 96 -80 WIRE 160 -80 144 -80 WIRE 240 -48 240 -112 WIRE 0 -32 -32 -32 WIRE 144 -32 112 -32 WIRE 192 -32 144 -32 WIRE 320 -32 320 -112 WIRE 928 -32 928 -112 WIRE -256 48 -304 48 WIRE -112 48 -192 48 WIRE -32 48 -32 -32 WIRE -32 48 -48 48 WIRE -112 80 -128 80 WIRE 240 112 240 32 WIRE 320 112 320 32 WIRE 320 112 240 112 WIRE 384 112 320 112 WIRE 512 112 464 112 WIRE 592 112 512 112 WIRE 672 112 592 112 WIRE 720 112 672 112 WIRE 832 112 800 112 WIRE 848 112 832 112 WIRE 240 144 240 112 WIRE 672 144 672 112 WIRE 176 160 128 160 WIRE 192 160 176 160 WIRE 320 160 320 112 WIRE 512 160 512 112 WIRE 848 160 848 112 WIRE 32 240 -16 240 WIRE 128 240 128 160 WIRE 128 240 96 240 WIRE 32 272 -16 272 WIRE 240 272 240 224 WIRE 320 272 320 224 WIRE 320 272 240 272 WIRE 384 272 320 272 WIRE 512 272 512 224 WIRE 512 272 384 272 WIRE 672 272 672 224 WIRE 672 272 512 272 WIRE 848 272 848 240 WIRE 848 272 672 272 WIRE 928 272 928 48 WIRE 928 272 848 272 WIRE 560 416 496 416 WIRE 608 416 560 416 WIRE 752 416 672 416 WIRE 768 416 752 416 WIRE -80 432 -128 432 WIRE -32 432 -80 432 WIRE 96 432 32 432 WIRE 224 432 192 432 WIRE 240 432 224 432 WIRE 96 480 48 480 WIRE 224 480 208 480 WIRE 240 480 224 480 WIRE -80 560 -80 432 WIRE -32 560 -80 560 WIRE 48 560 48 480 WIRE 48 560 32 560 FLAG 192 16 0 FLAG 192 208 0 FLAG 384 272 0 FLAG 592 112 out FLAG 144 -32 _LQ FLAG 176 160 x FLAG 496 496 0 FLAG 560 416 i FLAG 752 416 _i FLAG -160 -80 i FLAG 832 112 fb FLAG -304 48 fb FLAG -128 80 zcd FLAG -128 432 i FLAG 224 480 _zcd FLAG 224 432 zcd FLAG 144 -80 LQ FLAG -16 240 LQ FLAG -16 272 _zcd SYMBOL voltage 928 -48 R0 WINDOW 123 24 118 Left 2 WINDOW 39 24 140 Left 2 SYMATTR InstName V1 SYMATTR Value pwl 0 0 1u 56 SYMATTR Value2 Rser=10m SYMATTR SpiceLine Cpar=1m SYMBOL ind 368 128 R270 WINDOW 0 32 56 VTop 2 WINDOW 3 5 56 VBottom 2 SYMATTR InstName L1 SYMATTR Value 33u SYMBOL cap 496 160 R0 SYMATTR InstName C1 SYMATTR Value 22u rser=50m SYMBOL sw 240 48 M180 SYMATTR InstName S1 SYMATTR Value up SYMBOL sw 240 240 M180 SYMATTR InstName S2 SYMATTR Value dn SYMBOL diode 304 32 M180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D1 SYMBOL diode 304 224 M180 WINDOW 0 24 64 Left 2 WINDOW 3 24 0 Left 2 SYMATTR InstName D2 SYMBOL res 656 128 R0 SYMATTR InstName R1 SYMATTR Value 33 SYMBOL Digital\\srflop 48 -128 R0 WINDOW 3 -40 34 Left 2 SYMATTR InstName A1 SYMATTR Value td=10n SYMBOL h 496 400 R0 WINDOW 0 33 68 Left 2 SYMATTR InstName H1 SYMATTR Value L1 1 SYMBOL Digital\\inv 608 352 R0 SYMATTR InstName A2 SYMBOL Digital\\buf1 -112 -144 R0 WINDOW 3 -2 94 Left 2 SYMATTR InstName A3 SYMATTR Value ref=0.7 SYMBOL Digital\\inv -256 -16 R0 WINDOW 3 -4 99 Left 2 SYMATTR InstName A4 SYMATTR Value ref=1 SYMBOL res 816 96 R90 WINDOW 0 0 56 VBottom 2 WINDOW 3 32 56 VTop 2 SYMATTR InstName R2 SYMATTR Value 1.2Meg SYMBOL res 832 144 R0 SYMATTR InstName R3 SYMATTR Value 510k SYMBOL Digital\\and -80 0 R0 SYMATTR InstName A5 SYMBOL Digital\\inv -32 368 R0 WINDOW 3 -4 99 Left 2 SYMATTR InstName A6 SYMATTR Value ref=10m SYMBOL Digital\\buf1 -32 496 R0 WINDOW 3 -2 94 Left 2 SYMATTR InstName A8 SYMATTR Value ref=20m SYMBOL Digital\\srflop 144 384 R0 WINDOW 3 -40 34 Left 2 SYMATTR InstName A7 SYMATTR Value td=10n SYMBOL Digital\\and 64 192 R0 SYMATTR InstName A9 TEXT -80 -224 Left 2 !,model up sw ron=1.5 roff=0.1g vt=0.5 vh=-0.5\n.model dn sw ron=0.625 roff=0.1g vt=0.5 vh=-0.5\n.model d d ron=1 roff=100meg vfwd=0.7 epsilon=0.1 revepsilon=50m TEXT 768 -232 Left 2 !.tran 1m TEXT 760 -176 Left 2 ;V(ref) = 1 V TEXT -288 104 Left 2 ;1 > V(fb) TEXT -184 144 Left 2 ;V(zcd) & (1 > V(fb)) TEXT -168 -136 Left 2 ;I(L1) > 0.7 TEXT -80 368 Left 2 ;I(L1) < 10m TEXT -64 624 Left 2 ;I(L1) > 20m TEXT 96 16 Left 2 ;!V(LQ) TEXT 104 304 Left 2 ;V(LQ) & !V(zcd) • I usually pepper my designs with appropriately placed passives to help the solver. Alot of this can be done by using real physical parasitics in the design (ie making sure that there are no superconducting wires, inductors, capacitors). Also throwing in some small caps (and one should really use cshunt of at least 1e-13, because on a real PCB everything is about 1e-14 or grater farads away from the ground plane. Jul 2 '20 at 23:52 • +1 You are correct, I also usually use conditionals, but place reasonably valued low pass filters on my b-sources. Jul 2 '20 at 23:54 • @VoltageSpike Those are reflexes to be praised. Still, inside the subcircuits, I try to keep things as simple as possible, sometimes even at the cost of minor realism (within sensible limits), because if things get stuck or crawling, I'd like the subcircuits to be the last place I need to search for problems. Outside, "apres nous, le diluge". Jul 3 '20 at 7:49 I couldn't get the switches to turn on until I set vref to 0.1V, after that it started switching, so either change Vref or check your VFB. Generally speaking, you should never have a voltage source that can source infinite amounts of current. This creates problems for the solver. So put a series resistor (like 0.1Ω) on B6,B7,B8,B4 and maybe B2 and B3 B2 and B3 need thresholds, they aren't producing voltage
COASTAL ECOSYSTEMS AND CHANGING ECONOMIC ACTIVITIES: CHALLENGES FOR SUSTAINABILITY TRANSITION Abstract (English): The wide variety of economic activities, which prevail along the coasts, has either direct or indirect connectivity with the coastal ecosystems through its provisioning of a diverse range of goods and services. However, these systems are permanently under pressure due to natural and anthropogenic threats. This field based study documents the changing pattern of economic activities along selected coastal stretches in South Asia at Bangladesh, India and Sri Lanka. Economic activities vary with coastal ecosystem types and service flows there from. Field study sites were identified based on multiple meetings and discussions with the policy makers in each of the countries and they continued to be the part of scientific discussions within ecology-economy framework through the project lifetime. In depth enquiry and analysis were carried out to understand perception of various economic stakeholder groups to natural and anthropogenic threats in the coastal regions and resultant vulnerability and risks. Often threats get intensified by rapid urbanization triggered by changing pattern of coastal economy due to tourism expansion and modernization of traditional activities. Keywords: Coastal Ecosystem, Economic Activities, Threats, Vulnerability, Risk, Resilience. I. Introduction From an economic perspective, ecosystem services are generating livelihood/income/meeting basic needs for the people thereby contributing to human welfare [1].  At the global level, coastal population densities are almost three times larger than that of inland areas [2] with an exponential rise over the years [3]. Very high population density characterizes South Asian coasts [5].   The wide variety of economic activities, which prevails along the coasts, has either direct or indirect connectivity with the coastal ecosystems through its provisioning of a diverse range of goods and services [4; 5]. Globally coastal ecosystems have been experiencing rapid alteration [3; 6; 7; 8] by either human-induced risks or natural forces [9; 10]. It necessitates a better understanding of the extent of human dependence on ecosystem services to assess the vulnerability and risk of coastal ecosystem based economy and resilience. Asian countries like India, Bangladesh, and Sri Lanka share almost 1.35 per cent of the global coastline [4] and are experiencing fast changes over past four to five decades. Objective of this study is to understand the coastal ecosystem types in the three countries and how and why economic activities are changing over time relating them to ecosystem service flows. How communities perceive various sources of threats to their economic activities are  also  analysed. II. Framework of Study and Methodology For selecting the study sites with closer look in Bangladesh, India and Sri Lanka we have focused on economic activity induced, developmental policy led and population pressure induced changing coastlines.  Using semi structured questionnaires the natural and anthropogenic threats faced in the study sites were identified. The sites represent varied coastal ecosystem types and thus service flows and economic activities. In the three countries in South Asian Coasts various economic groups were interviewed to understand various threat related risks they perceive, how effective they think are the adaptive measures taken by the local administrative bodies against natural events. Same field survey instrument was used to facilitate cross country comparison. The study draws data mainly from primary field surveys in  selected study sites in three  countries and also from official sources. Field visits were mainly organized to obtain information on socio-economic and demographic characteristics of people living in these sites, changing patterns in economic activities over the years and also to identify important threats (natural and anthropogenic) to different economic activities and ecosystem types, vulnerability, risk perceptions and ongoing intervention strategies available and implemented so far to reduce the impact of such threats from the perspective of different stakeholders in the study sites. We adopt the risk-resilience framework (Fig. 1) [5] based on literature to frame various questions for our field survey. Various threats in coastal areas driven by environmental change and human activities [11] impact coastal ecosystem based economies through their vulnerability to multiple threats, risk perception and level of resilience determined by adaptive capacity, sensitivity and exposure-three components of vulnerability [12]. Exposure is the magnitude and duration of the climate-related events [13; 14]. Sensitivity is the degree to which the system is affected [15; 16] by the exposure. Adaptive capacity is the system’s ability to withstand or recover from the exposure. Adaptation involves reducing risk and vulnerability, seeking opportunities and building the capacity of nations, regions, cities, various stakeholders and natural systems to cope with stresses, as well as mobilizing that capacity by implementing decisions and actions. Adaptation options can be implemented either to modify the drivers or exposure and vulnerability or both [12]. Risk refers to the potential for adverse effects on lives, livelihoods, health status, economic, social and cultural assets, services (including environmental), and infrastructure due to uncertain states of the world. Risk can also be subjective in the sense that the likelihood and outcomes are based on the knowledge or perception that a person has about a given situation [12]. Resilience [15; 9; 17] is a concept that takes into account how systems, communities, sectors, or households deal with disturbance, uncertainty and surprise over time, and it is characterized by both adaptability and transformability. The schematic of the complex links of interdependence among vulnerability, risk and other components as mentioned above are presented below (Fig. 1): Fig 1. Components of Vulnerability, Risk and Resilience Assessment Framework As mentioned in Resilience Assessment framework schematic diagram we need to generate some scores to arrive at the quantitative assessment of risk levels. As a first step, basic survey data is normalized using the formula (1), where xmax and xmin are maximum and minimum value points respectively. ${x}_{new}=\frac{x-{x}_{min}}{{x}_{max-}{x}_{min}}$                                                                                                                                                        (1) As a result of this normalization, new transformed variables are obtained that range from 0 to 1. We consider all the data we got as reflecting baseline information as planned no targeted adaptation has been taken up in the study sites. So as per equation 1 adaptation score  can be taken as zero so final formula for assessing ‘baseline vulnerability’ at study sites  can be rewritten  as: Vulnerability = Exposure x Sensitivity                                             (2) Exposure is estimated by using information on frequency of occurrence of a threat (stress) taken from the responses to the questionnaire.  Higher the frequency, greater is the stress (exposure).  Whereas sensitivity is the degree to which the system is affected by the exposure. System here refers to “economic activity”. Sensitivity is estimated with the help of information on intensity of impact of threats on various economic activities from our questionnaire.  Formula (3) provides an assessment of vulnerability of an economic activity in the absence of interventions. Changes (increase or decrease) in vulnerability of the system can be examined after factoring in risk using the following formula: Vulnerability x Risks associated with vulnerability                         (3) The main focus of this assessment is to identify, from the field level first hand information, the most vulnerable from among current economic activities in each study site and also in determining the risks of each economic activity to understand resilience to threats identified. III. Study Sites The study site, Cox's Bazar Sadar-Moheshkhali is located in the Cox's Bazar district of the Chittagong division, Bangladesh. The site lies between 21023'16" to 21046'26" N latitude and 91050'34" to 92007'50" E longitude and is located about 390 km from Dhaka capital city and 152 km south from Chittagong city on the east coast of the Bay of Bengal. Table 2: Major ecosystem types in Cox's Bazar Sadar-Moheshkhali area The area is famous for natural sea beach and tourist place. It has an economy supported primarily by tourism for which a large number of hotels, guest houses and motels have been built in the city and coastal region. A number of people are also involved in fishing and collecting seafood and sea products for their livelihood. A number of people are also involved in the transportation business for tourists. Cox's Bazar area is also one of the few major spots for aquaculture in Bangladesh. It is considered a major source of revenue from foreign exchanges. Beside a mix of small-scale agriculture, marine and inland fishing (shrimp) and salt production are other industrial sources from this region that play important roles in the national economy. The population density of the study area is quite high compared to national average, particularly at Cox’s Bazar Sadar which is 2011 persons per sq. km, while there is 744 persons per sq.km at national level. At the same time population growth rate is also quite high at Cox's Bazar Sadar which is 3.21 percent over 1.67 percent at national level. The beach of Cox’s Bazar is the natural beach covered by hill side. This sandy beach slanting downward and join with Bay of Bengal. The sandy beach near Cox’s Bazar town is wider than other side and the sand in here is very. Landforms of the study area of Cox’s bazar are the coast, beach and shore, offshore, back shore, and sand dunes. Including that most dunes are lengthy. The depositional features like bar and spit, offshore, coastal, slot, marshes, lagoon and marine dunes are shown on the study area. Seasonal monsoon winds and maritime action of the Bay of Bengal the Cox’s Bazar coastal region experiences heavy rainfall and humid climate due to its proximity to the sea. The Cox’s bazar sea beach is exposed to a number of adverse of natural phenomena like cyclone, coastal erosion, salinity and possible threat from sea level rise. The causes of such ravages are both natural and manmade. Many positives roles the cyclones play on the biology and ecosystem of the coast, such as, supply of nutrients for the aquatic animal. The coastal and island site are rich in biodiversity, but that are degrading for which efforts are being given to remove all threats to biodiversity within its focal areas. People living within the Cox's Bazar site are heavily dependent on fisheries, marine products and, to a lesser extent, agriculture for their livelihood. The storm level,  rise of sea water moves the salt water interface landwards, making agriculture more and more difficult (traditional rice crops) which are not salt tolerant. Saline are extended of coastal lowland in Cox’s Bazar. Sonadia Island supports the last remaining remnant of mangrove forest in southeast Bangladesh, which once stretched along much of the coastline of Chittagong and Cox's Bazar. In addition to this important mangrove area, the island supports a large number of water birds, mollusks, echinoderms, and marine turtles. The coastal region of Cox’s Bazar has a unique position of its condition of natural resources endowment. The coastal region has also the potentials to supply fish not only the domestic consumption all over the country. Fish, forest, agriculture and tourist resources of Cox’s Bazar are important not only the coastal region alone but also for the country. India:  Digha-Sankarpur coastal area. The field site, Digha-Sankarpur is located in the East Medinipur district (Ramnagar I and II blocks) of the State of West Bengal, India latitude 21₀ 37’ N and longtitude 87 ₀32’ E.  Digha is located 187 km from Kolkata on the east coast of the Bay of Bengal and is a popular beach resort with a 6 km long beach [18]. Digha Planning Area is a coastal tract adjoining the Bay of Bengal in the south and the border of West Bengal- Orissa in the east. The planning area is under the jurisdiction of Digha Sankarpur Development Authority (DSDA) comprising 51 mouzas covering an area of around 70 m sq.km.  It comprises beach areas of Dattapur (bordering Orissa), Digha (old and new), adjoining Sankarpur, Tajpur and Mandarmoni having a length of approximately 17 kms. The major ecosystem types of the region are presented in Table 3. Table 3: Major ecosystem types in Digha-Sankarpur Ecosystem type Major locations on Digha-Sankarpur Coastline Sand dunes, Sandy and muddy beach Dattapur Old Digha New Digha Sankarpur Tajpur Mandarmoni Estuaries Dattapur Tajpur Casurina, Cashewnut, Screw Pine, Date, Coconut and other plantations Dattapur New Digha Old Digha Sankarpur Tajpur Mandarmoni While close to 27 per cent of the total population of India lives in coastal areas and a smaller percentage (1.47) of the total coastal population of the State of West Bengal lives in Digha-Sankarpur area. According to the Census of India 2011, Digha- Sankarpur area shares less than 2 percent area of the Purba Medinipur district while the district shares around 5 percent of the total area of West Bengal. The population of Digha- Sankarpur is less than 1 percent of the total population of Purba Medinipur. However, the population density of Digha-Sankarpur is greater with 517 persons per sq. km than the coastal population density of India which is around 164 persons per sq.km. Digha- Sankarpur coast is a mesotidal coast (with tidal amplitude varying between 2-3 m) while the Sundarbans coast is a macrotidal coast (with tidal amplitude exceeding 4 m) The tide, semidiurnal (i.e. high tide occurs twice a day) in nature, has some diurnal (once a day) influence also regarding the height of the daily two high tide levels and low tide levels. Highest tidal position is obtained in the month of August creating maximum impact on the coast. The rate of relative sea level rise is over 3mm/year and this makes some contribution to the coastal erosion over a longer time span [19]. Comparable figures for Sundarbans show that sea level is rising at the rate of 3.14 mm a year. [1] The entire beach area from Dattapur at the border with Orissa in the west to Mandarmoni in the east is fragile and suffering from varying degrees of erosion. It is vulnerable to coastal erosion in stretches, inundation due to periodic storm and tidal surges which may extensively damage the property due to seasonal high velocity winds, storms and cyclones.  The average erosion along the entire stretch is around 15 m per year coupled with net lowering of beach level to the tune of 0.05 m per year [20].  Such erosion and lowering of beach is adding greater impact of wave action to the coastal protection works, constructed since seventies, in phases to check ingress of tidal water in the countryside and to prevent landward movement of the sea.  Saline water intrusion is severely affecting the surface and ground water in Digha due to the indirect effect of shore line shifting in this region. The beach, in the Digha-Sankarpur area is a smooth uniformly sloping (average 1.75) made up of fine grained sand and silt. On the landward side, the beach is bounded by dune cliffs. The shore-line from Digha Mohana to the east in Sankarpur region is relatively stable. In the far-west near the Orissa border it is accretional and muddy. But, the entire strip, where the Digha Township is located, in between, is an eroding type, which is the main concern of this area (www.dsda.gov.in). The material of the beach consists of mainly sand mixed with clay and the dune material is made up of fine sand. The entire beach of Digha is dotted with Casuarina plantations that sprung up over the sand dunes. The sand dunes are the most outstanding morphological feature of the coastline. This dune belt runs almost parallel to the present shore line, though the width and height vary from place to place. These dunes generally rise up to 12 meters, though the height decreases towards the east. The dunes are transverse in type and their character changes with the increasing distance from the sea.  They are more stable and more under vegetation cover towards north. During summers, the strong winds shift the location of the dunes.  The consistent wind direction at least during summer monsoon is one of the chief factors of their origin. Sri Lanka: Koggala area in the Habaraduwa Divisional Secretariat (DS) division. The study area, the Southern Province, has 3 districts – Galle District, Matara District and Hambantota District. The Coastal Zone (CZ) width in Galle District is highly irregular and narrow in certain places. As such, the adjoining DS division may also show geographical, biological and social features characteristic of coastal zone. Since most socio-economic data are collected by government agencies in terms of DS divisions, it is convenient to base the study using the DS division as the monitoring entity. Table 4 gives some of the key features of the Coastal Zone DS divisions in each of the 3 districts, including the percentages of the CZ area to the district area and the percentage of the CZ population to the district population. Table 4: Key features of the coastal zone in the 3 districts in the Southern Province Districts in the Southern Province Coast-line  (km) Area in CZ (km2) PC of Dist. Area% Average width of CZ (km) Pop’n CZ     (2012) PC of Dist. Pop’n% Pop’n Density   per km2 Galle Dist. CZ 79.3 323 19.6 4.1 438,359 41.4 1,655 Matara Dist. CZ 51.2 182 14.2 3.6 289,830 35.8 1,569 H’tota Dist. CZ 145.5 1,483 56.8 10.2 269,442 45.2 269 Southern Prov. CZ 276.0 1,988 6.0 997,631 1,164 Source: [21] Table 5 shows the extents of different ecosystems in the Southern Province. It is noted that a diversity of ecosystems exist in the Hambantota District compared to the other two districts. Table 5: District-wise distribution of coastal ecosystems in the Southern Province District Mangroves Salt marshes Dunes Beaches, Barrier beaches, Spits Lagoons Basin estuaries Other water bodies Marshes Galle 238 185 - 485 1,144 783 561 Matara 7 - - 191 - 234 80 Ham’tota 576 318 444 1,099 4,488 1,526 200 Southern P 821 503 444 1,775 5,632 2,543 841 National 12,189 23,819 7,606 11,800 158,017 18,839 9,754 Source: [22] The study site comprises an area surrounding the Koggala Lagoon including a narrow strip of land bounded by the sea on the south and by the lagoon on the north and lying between Habaraduwa Town on the west and Ahangama on the east where the Habaraduwa DS division ends. The area to the north of the lake extends about 4 km from the shore covering mostly agricultural land. In this area, the boundary extends into the Imaduwa DS division. The west and east boundaries are close to 125 km post and 138 km post on the Galle – Matara highway, respectively. This highway as well as the Matara railway line runs along this land strip. The width of the land strip is about 1-2 km between the sea and the lagoon. The strip of land belongs to the village of Koggala lying within the Habaraduwa DS division which has its northern boundary just above the lake towards the east end.  The study site lies 17 km from the district capital of Galle and 130 km from Colombo, the country’s capital. Some of the on-going activities and features in this area are: • Presence of an industrial zone • Presence of a wide sandy beach and submerged reef • Presence of a large number of tourist hotels and guest houses • Presence of the lagoon / estuary with mangroves on its bank • Presence of agricultural activities • Site for traditional fishing including inland fishing • Belongs to the wet climatic zone There are altogether over 60 villages in Habaraduwa DS division, and the study was conducted covering about 15 villages. Using GIS maps of villages and the 2012 Census on population at village level, population density values were determined. The total area of the study site is 39 sq. km, and its average population density is 1,254 per sq. km. Koggala is a popular destination for both local and foreign tourists because of its wide sandy beach and reef. The Koggala Industrial Zone (KIZ) largely focused on textile and apparel manufacturing is located towards the east end of the land strip. On the west end lies a small air field constructed by the British during the Second World War and currently used by the national air force. The land to the north of the lagoon comprises mostly marshes and paddy fields. Beyond the paddy fields, the land begins to rise where it is covered with tea, cinnamon and rubber plantations, amidst homesteads, losing the coastal character. In order to keep the Koggala beach clean for the benefit of the tourists, no marine fishery activities are allowed within the stretch from Habaraduwa to Ahangama. Though by law the beach is accessible to the public, the hotels built across the beach discourage people from entering the beach where western tourists do sun-bathing and spend their time at leisure. For the same reason, there are no vendors or photographers or other activities of any economic significance being carried out on the beach. In fact, in Sri Lanka, no vehicles, manual or motorized, are permitted to be driven along the beaches.  However, in certain other parts of the country, there are more sports activities being carried out on the beaches where the public have free access to the beach. Major ecosystem types in the study site are: Sandy beaches, Koggala Lagoon, Submerged reef, Mangroves at Koggala Lagoon. IV. Analysis and Discussion In all the three countries: Bangladesh, India and Sri Lanka costal study sites are facing population pressure with very high population density way above national and country level average coastal population densities.  Despite variety of ecosystem types in South Asian region fishery and agriculture dominated the traditional livelihood pattern but new activities are heavily biased towards tourism related activities and services. 1. Coastal Ecosystem and Economic Interaction Coastal ecosystem types existing in different locations of Bangladesh study site are mangroves, coastal mudflats, estuaries, sandy beaches, sand dunes and forest. From the sample population surveyed in different different locations at Cox's bazar-Moheshkhali area, a changing pattern of economic activities in each of these locations is observed (Table 2). It was observed that the reasons behinds the shifting of agriculture to other economic activities is mainly because of the rapidly growing saltpan-shrimp farming and tourism in the study area. The salinization of land, disappearance of forests, depletion of livestock due to disappearance of grazing land and scarcity of fodder such as rice straws has led to the fall in the productivity of traditional mono-cropping i.e. aman rice. On the other hand, encroachment of saltpan-shrimp farming due to both demand for salt and shrimp and population pressure has led unemployment in agriculture. However, people took the advantage of this ecosystem change and started to intensively salt-shrimp farming and adapt their livelihoods to accommodate changes in ecosystems. The employment opportunity and wages are higher in salt-shrimp farming compared to agricultural sector. Although marine catch fish activities have some challenge and threat, still the involvement of new people in this business are increasing primarily due to high price of marine fishes and demand of dry fishes and related indirect activities. The infrastructural and accommodation facilities for the tourists have been increased at a very high rate in the recent decade. This has facilitated employment opportunities in the tourism sector. Many people those were engaged in agriculture changed their livelihood by involving themselves in this sector. Besides, due to exploring many new economic activities on and near coast related to fishing and tourism some people shifted to these new activities from agricultural sector. Table 6: Shift in occupations from traditional to new in Cox's bazar-Moheshkhali study site Location Traditional activities New economic activities Cox's Bazar Town/Sadar Fishing, fish business, fish drying, small scale business, Agriculture Fish drying, hotel and restaurant Kolatoli Agriculture, small scale business (grocery shop, tea stall), betel leaves trading Shrimp fry, shop business Laboni beach Hawking, photography, Speed boar driving, beach concert, hawking on the beach Moheshkhali Agriculture, fishing, betel leaves trading, aquaculture Hotels and resorts, shrimp farming and salt production, fish drying Sonadia Island Agriculture, fishing, mangrove Shrimp farming and salt production, fish drying Source: Primary Survey Though agriculture in Sonadia Island is not well developed due to the lack of cultivable land, poor sandy soils, the risk of flooding by saline water, a lack of irrigation facilities and sand storms, the land under agriculture is increasing. The conversion of habitat to agriculture, the cultivation of exotic and hybrid species, the use of chemical pesticides and fertilizers and sand dune vegetation grazing by livestock have led to involve some people in agriculture and livestock for their livelihood. Shrimp farms and saltpans are established by clearing areas of natural mangrove and converting mudflats and creating embankments. This has also facilitated to involve some people in Saltpan-shrimp farming. The involvement of people is increasing in the winter camps for the marine and coastal fisheries as well as sun drying of marine fishes. Firewood collection and it’s commercial use are important economic activities of some people in the island.  Some people are also involved in invertebrate collection and business from the mangrove forest. Fig. 2 shows the Pattern of shift in activities from traditional to new and also the major drivers of change. 1. Perception of threats to the Coastal Ecosystem based Economic Activities The region is prone to devastating cyclones, landslides and water surge. Further, it is expected that sea level rise will cause river bank erosion, salinity intrusion, flood, damage to infrastructures, crop failure, fisheries destruction, loss of biodiversity, etc. along this coast. Coastal storms followed by sea water intrusion and flooding due to heavy rain are the natural threats that the coastal community of Cox's Bazar- Moheshkhali perceive as major. Around 49 percent of the sampled population opined that coastal storms are a major threat for the coastal community. Seawater pollution as a result of wastewater discharged from hotels and restaurants and running of petrol or diesel vehicles on the sea beach are two important anthropogenic threats that are regarded as major concerns for the coastal community. Seawater intrusion affects agriculture, salt-shrimp farming and fish drying equally, while such impact was least on hoteliers and none on other activities. Flooding due to heavy rainfall impacts the most salt-shrimp farming, while inadequate rainfall affects agriculture similarly. Cox’s Bazar sea beach and the ecosystem are under great threat from erosion due to unplanned development of resort area by cutting hills, establishment of shrimp hatcheries along the seashore, deforestation, over-fishing, salt fields, hill cutting for unplanned construction and tourism activities. Coastal erosion has little impact on hoteliers as erosion of sea beach area is perceived as quite common. Wastewater pollution and running of vehicles impacts tourism and fishing sectors the most. These two threats are also fair issues of concern for agriculture and fish drying. Besides, sand mining have little impact on hotel industry and agriculture. The major natural and anthropogenic threats as perceived by respondents are shown in Table 7. Table 7: Identification of threats (natural and anthropogenic) to economic activities in Cox’s Bazar-Moheshkhali S.No. Threats Percentage response Natural: 1 Coastal storms 48.72 2 Sea water intrusion during high tide 21.79 3 Flooding due to heavy rainfall 15.38 4 Inadequate rainfall 10.26 5 Coastal erosion 5.13 Anthropogenic: 6 Wastewater from hotels and restaurants polluting the coast and the seawater 20.51 7 Running of petrol or diesel vehicles on the beach resulting in the pollution of the beach 19.23 8 Sand mining 7.69 Source: Primary Survey Vulnerability is assessed for both natural and anthropogenic threats though the scales are different depending on the number of threats within these two broad categories. The vulnerability levels across all economic activities been studied are quite low; in some cases close to insignificant vulnerability. The lowest vulnerability score is reported by the photography followed by hoteliers and hawking, while the highest relative vulnerability levels have been reported by the agriculture followed by salt-shrimp farming. For risk analysis four risk types are considered relevant from the perspective of an economic activity, which are:  asset loss (shop loss/ fishing boat loss, etc.), income loss, risk to lives and health risk. Given these risk types, such an assessment for anthropogenic threats is not considered meaningful, hence risk is assessed vis-à-vis natural threats only. Majority of economic activities are not associated with high levels of four risk types, except in the field of agriculture and fishery, where coastal storm is considered as very significant risk.  Coastal storm is also exhibited as medium risks for salt-shrimp farming, hotel industry, fish drying and shop business. Among other threats inadequate rainfall is also a considerable risk for agriculture and flooding due to heavy rainfall is medium risk for salt-shrimp farming. Vulnerability of various economic activities to different threats is shown in Table 8.  Factoring in risk in vulnerability assessment scores does not change the overall results, since the risk to all the natural threats combined together is mostly closed to 1 implying existing of very marginal risk types associated with different natural threats. Table 8: Assessment of vulnerability of different economic activities with and without risk (based on median values) Threat Economic activity 1 2 3 4 5 6 7 8 Vulnerability (Natural threats)1 Exposure x Sensitivity (median value) 0.38 0.25 0.50 0.17 0.25 0.25 0.08 0.17 Vulnerability 2 (Anthropogenic threats) Exposure x Sensitivity 0.08 0.25 0.00 0.37 0.08 0.00 0.00 0.17 Risk (natural threats)3 3.0 2.0 2.0 1.5 1.5 1.0 1.0 2.0 Vulnerability x Risk (Natural threats)4 1.13 0.50 1.01 0.25 0.38 0.25 0.08 0.33 Notes: 1- Vulnerability ranges from 0 to 20 depending upon the number of threats considered  in  estimating exposure and sensitivity. 2- Vulnerability ranges from 0 to 9 3- Risk ranges from 0 to 4. 4-Vulnerability is very small since risk is zero Note: Economic activity 1 refers to agriculture, 2- fishing, 3-salt shrimp,4-hotel and restaurants, 5-fish drying, 6-hawking,7- photography, 8- shop business India: Survey Outcomes 1. Coastal Ecosystem and Economic Interaction Digha-Sankarpur coastal belt of India contains ecosystem types like sandy and muddy beach, sand dunes, estuaries, coastal forest. The coastal ecosystem based traditional and new economic activities are mentioned in the following Table (9) for different locations across the study site. Table 9: Traditional and new economic activities in Indian study area Location Traditional activities New economic activities Dattapur Agriculture, fishing, small-scale business (grocery shop, vegetable seller, tea stall). Hawking on the beach and motorbike riding on beach, shell-crafting, motorized van- driving, photography on the beach. New Digha Saltmaking, masonary, blacksmith, agriculture, fishing, small-scale business (grocery shop, tea stall, garment shop, manual van driving, hotels and resorts, betel leaves trading, fish business. Hawking on the beach, hotels and resorts, manual van driving, motorized van driving, horse-riding on beach, photography on beach, water sports, car driving, restaurants, shell-crafting. Old Digha Fishing net business, aquaculture, fishing, agriculture, hotels and resorts, manual van driving, village folk singer, fish business and small scale business (grocery shop, vegetable seller, tea stall) Hawking on the beach, hotels and resorts, manual van driving, motorized van driving, horse-riding on beach, photography on beach, car driving, restaurants, shell-crafting. Sankarpur Agriculture, fishing Hotels and resorts, hawking on the beach, shell-crafting, motorbike riding on the beach, photography on the beach. Tajpur Agriculture, fishing, aquaculture Hotels and resorts, hawking on the beach, restaurants, motorbike riding on the beach, photography on the beach. Mondarmoni Agriculture, fishing, aquaculture Hotels and resorts, water sports, hawking on the beach, photography, motorised van driving, motor-bike riding on the beach and road for tourists. Source: Primary Survey From the sample population surveyed in six different locations at Digha-Sankarpur, a changing pattern of economic activities in each of these locations is observed. We categorized the reasons for change into four major heads; economic factors, poor input availability, external factors and natural factors. It is observed that a major reason leading to shift out of agriculture to other economic activities (like van driving, photography on the beach, shell crafting, hawking on the beach, etc.) is mainly because of economic reasons. For instance, increasing cost of cultivation is reported to be an important factor leading to this change. The other important reason is the lack of irrigation facility, less capital investment in other activities compared to agriculture, lack of availability of agricultural labour.  A few respondents have also reported technological reasons behind shifting from agriculture to other activities. In addition, increasing demand for other activities over the years have made agriculture less lucrative and people also find this activity laborious compared to other recent alternatives. In particular, income from setting-up stalls or kiosks is considered more stable due to tourism development compared to agriculture which is dependent on many factors.   In some cases, pest attacks in agricultural farms have led farmers to give up agriculture and look for other alternative occupations. At times, storm surge and flooding have destroyed agricultural fields resulting in a huge loss for the farmers. Like agriculture, fishing is also an old, traditional activity which has been a source of livelihood for many households for generations. However, people are now beginning to move out of fishing in search of other profitable occupations. For instance, many individuals/ households have given up fishing and other related businesses for van driving, horse-riding on the beach, shell-crafting, photography on the beach, setting up temporary stalls on the beach and so on. Fishing is also considered as a laborious activity with returns that are not commensurate to the effort involved compared to other activities. Also, fishing is considered   dangerous especially during rains. Other reasons cited are the decline in fish catch (i.e., decline in the provisioning service of the ecosystem) and also international pressure in terms of fishermen from neighbouring countries taking away a substantial catch. Even the number of local fishermen with mechanised trawlers have also increased making it difficult for poor fishermen (with non-mechanised gears) to get the same catch as before.  Moreover, fish business (of drying and selling) requires initial capital investment unlike activities like photography and horse-riding on the beach. Increasing demand for tourism related products and activities is forcing people to move out of fishing into these newer activities. Shifts in occupation are also observed for other traditional activities like salt-making, masonry, blacksmith, small businesses (e.g., tea stalls, betel leaves trading, garment shops, etc.) These traditional activities are considered less remunerative and more laborious. The overall scenario of change in activities from traditional to new along with the major reasons for shift ate shown in the following Fig. 3. Fig 3: Pattern of Change in Activities from Traditional to New in Indian Study Site 1. Perception of threats to the Coastal Ecosystem based Economic Activities Some of the major threats as perceived by individuals pursuing different economic activities/direct stakeholders in Digha-Sankarpur are shown in Table 10. As is evident from the table, coastal erosion,  sea water intrusion and coastal storms are the three most important natural threats that the coastal community of Digha-Sankarpur is facing. Around 78-79 percent of the sampled population considers coastal erosion and sea water intrusion as two major threats while close to 54 percent reported coastal storms as a major threat. As for the anthropogenic threats, wastewater discharged from hotels and restaurants polluting the coast and the seawater is a major concern for this community (around 50 percent). These findings are supported by a disaggregated picture across different economic activities. Sea water intrusion is a major threat for stakeholders engaged in economic activities like photography and horse-riding on the beach and fish drying (100 percent response). Coastal storms impacts aquaculture the most (80 percent) while hoteliers are the least impacted. Similarly, wastewater polluting the coast and sea water impacts aquaculture the most (100 percent response), agriculture the least (22.22 percent) and hoteliers (33.33 percent).  Economic activities mainly dependent on the condition of the coast are mostly affected by pollution on the beach and sea water. Running of vehicles and waste water pollution are major issues of concern for these small-scale activities like, shell-crafting, photography and horse-riding on the beach. The results show that most of the economic activities in Digha-Sankarpur, India are mainly impacted by natural threats like, coastal erosion, sea water intrusion, coastal storm and anthropocentric pollution caused due to wastewater discharged from hotels and restaurants on the beach. The intensity of exposure to different threats is estimated on the basis of the frequency of occurrence of these threats on a varying time scale.  Among the list of economic activities covered, it appears that economic occupation category photography on beach is exposed to all the natural threats though the average current exposure level is marginal.  As for the exposure to anthropogenic threats it is the shell-crafting activity which is marginally impacted even though the exposure is high among all the activities.  Similarly, sensitivity results show that the natural threats have the highest impact on individuals engaged in horse-riding on the beach though average level of exposure is marginal.  The other economic activities that are close to be marginally sensitive to various threats are:  shell-crafting and fish drying.  On the other hand, sensitivity to anthropogenic threats is almost negligible. An important component of the vulnerability assessment is the risk categorization of each economic activity vis-à-vis different natural threats. Under the risk assessment, four risk types are considered, these are:  asset loss (shop loss/Van loss/boat loss, etc.), Income loss, risk to lives and health risk. Our findings show that the selected economic activities do not lead  to any of the four specific risks mentioned earlier(the median response is close to 1 (not impacted) for almost all economic activities, except for fish drying and horse-riding activities). In other words, in an event of occurrence of any threat, none of the economic activities is likely to experience four risks with medium to significant intensity. People engaged in beach recreation especially those providing horse-rides on the beach to the tourists are vulnerable followed by photographers taking pictures of tourists on the beach. After factoring in risk, it is the horse-riding and fishing using manual boats that are relatively more vulnerable. It is shown in Table 11. Table 11: Assessment of vulnerability of different economic activities with and without risk (based on median values) Notes: 1- Vulnerability ranges from 0 to 20 depending upon the number of threats considered in estimating exposure and sensitivity with 0- absence of threats hence no vulnerability and  20- very significant vulnerability. 2- Vulnerability ranges from 0 to 9 with 0- absence of threats hence no vulnerability and 9- very significant vulnerability 3- Risk ranges from 0 to 4 with 0- absence of threats hence no risk and 4- very significant risk. 4-Vulnerability is very small since risk is zero Note: Economic activity 1 refers to manual van driving, 2: motorized van driving, 3: photography on the beach, 4: horse-riding on the beach, 5: hawking on and around the beach, 6: shell-crafting, 7: fishing using mechanized boats, 8: deep sea fishing using trawlers, 9: fishing using manual boats, 10: fish drying, 11: agriculture, 12: aquaculture, 13: hotels and restaurants For an overall risk scenario, apart from categorization of degrees of various types of loss due to different threats, calculation of annual average monetary loss as a percentage of current annual income of the respondents was worked out. Further, the monetary loss percentage was categorized to get percentage of individuals from difference economic activities across these categories. It got reflected from the analysis that a major share of the respondents from economic activities:  agriculture, fish drying, fishing using manual boats, and horse riding on beach have experienced significant monetary losses due to coastal storms and that for the respondents engaged in shell-crafting and aquaculture was a little lesser. More or less all the economic activities apart from aquaculture, horse riding and photography on beach have experienced high degrees of variability in income loss due to coastal storms. Due to sea water intrusion during high tides none of the respondents from aquaculture was affected from monetary loss. A good number of respondents from activities like hawking on and near beach, shell-crafting, fishing using mechanized boats, deep sea fishing using trawlers faced very high degree of monetary loss that ranges from 61 to 80 percent of annual income due to sea water intrusion during high tides. Coastal erosion did not affect majority of the respondents engaged in motorized van driving, deep sea fishing in trawlers, fish drying in terms of monetary loss. A substantial part of the respondents from activities horse riding on beach, hawking on and near beach, shell crafting, deep sea fishing using trawlers faced very high degree of monetary loss from Coastal erosion. ## Sri Lanka: Survey Outcomes 1. Coastal Ecosystem and Economic Interactions The study site comprises an area surrounding the Koggala Lagoon including a narrow strip of land bounded by the sea on the south and by the lagoon on the north and lying between Habaraduwa Town on the west and Ahangama on the east where the Habaraduwa DS division ends. The area to the north of the lake extends about 4 km from the shore covering mostly agricultural land. Major ecosystem types in the study site are: Sandy beaches, Koggala Lagoon, Submerged reef, Mangroves at Koggala Lagoon. The study site Koggala is a favourite tourist destination and hence a large number of hotels and guest houses have been built at the site. In order to maintain the privacy of tourists, the hotel owners are discouraging the public from getting access to the beach and hence it is a rather secluded area devoid of any economic activities. Koggala also has an industrial zone where apparels are manufactured for export and it has helped the villagers to achieve a higher standard of living with enhanced revenue. A number of small scale industries have come up in the area started with government assistance schemes and these are providing alternative sources of income to people in the area.  A large number of women have found employment in the industrial zone factories while the men have found employment in tourist hotels which have come up within the last few decades. These new avenues of employment to the younger generation appear to be a threat to the sustenance of traditional occupations.  Many of the villagers though still continue with their traditional occupations of agriculture and fisheries both inland and off-shore. Fig. 4 shows the nature of shift in activities from traditional activities like agriculture, lagoon fishing, coastal fishing, fish trading, cottage industries, carpentry small businesses to new emerging activities like tourism industry activities, export industry etc. It also gives an overview of underlying factors influencing the shift in activities. Figure 4: Pattern of Change in Activities from Traditional to New in Sri Lankan Study Site 1. Perception of threats to the Coastal Ecosystem based Economic Activities The respondents were requested to indicate what concern or driver they thought was a major threat in pursuing their occupation. This information was collected for different occupations separately. The aggregated results are shown in Table 12, according to which flooding and sea water intrusion during high tide (80 percent) and storms during rains (75 percent) were the two main threats affecting their occupations particularly agriculture. Coastal erosion was considered the next grave threat (43 percent) while inadequate rainfall was also considered a serious threat (37percent). Other concerns such as storms without rain and flooding during rain were not considered as serious threats. The discharge of waste water from hotels and restaurants to the coasts was the only anthropogenic driver considered as a threat. Table 12: Percentage respondents who identified a particular concern as a threat Threat Percentage response Natural: Storms during rains 75 Storms during other seasons 10 Flooding and sea water intrusion during high tide 80 Flooding due to heavy rainfall 20 Inadequate rainfall 37 Coastal erosion and sea approaching closer 43 Anthropogenic: Wastewater from hotels and restaurants polluting the coast and the seawater 60 Source: Primary Survey Coastal storms were identified as a major threat in the fisheries sector (75 percent), while sea water intrusion was identified as a major threat in the fisheries (95 percent), hospitality (55percent) and agriculture (25 percent) sectors. Flooding due to heavy rainfall was considered a major threat in the agriculture sector (83 percent) and to a small extent in the coir industry (15 percent). Both these sectors also considered inadequate rainfall as serious threats, 92 percent and 53 percent, respectively. Coastal erosion was considered as a major threat by fishers (87 percent), hotels (82 percent) and restaurants (86 percent). The waste water discharge from hotels was considered as a threat only by fishers (35 percent). The new economic activities including both 3-wheel vehicle driving and handicraft sales were not affected by any of the natural hazards. Vulnerability and risk of various economic activities to different threats was determined and shown in Table 13. Table 13: Vulnerability and risks Threat Economic Activity Natural 1 2 3 4 5 6 7 Vulnerability (Natural Threats) Exposure*Sensitivity 1.73 1.62 0 2.5 0 0 0 Vulnerability (Anthropogenic Threats) Exposure*Sensitivity 0 0 0 0 0 0 0 Risk (Natural Threats) 1.5 0 1.0 0 0 0 0 Vulnerability*Risk (Natural Threats) 2.3 0.001 2.0 0.001 0.001 0.001 0.001 Note: Economic activity 1 refers to agriculture, 2- 3 wheeler driving, 3-coir industry, 4-fisheries, 5-handicraft, 6-hotel industry,7-restuarant The opinions expressed by the respondents in the Southern coast of Sri Lanka show that the traditional economic activities such as agriculture and fisheries are more vulnerable to natural hazards than the new economic activities such as 3-wheel vehicle driving or handicraft selling.  The survey findings showed that the majority of fishers amounting to 86 percent have not heard of climate change and were not aware that this could cause an increasing threat in the future with higher  vulnerability to stormy weather conditions, especially to those who venture into the sea in small boats. As an adaptation measure, it is proposed that fishers be encouraged to phase out the use of small boats in preference to large boats which can withstand stormy weather conditions in mid-sea. Intervention of the government is essential by providing the necessary financial assistance possibly through cooperative bodies to acquire large multi-day boats which will serve two purpose – firstly to increase the harvest from off-shore/ deep-sea sources and secondly to reduce the risks faced by fishers in mid-sea during stormy weather conditions. The fishers also urged that immediate government intervention is required regarding the prohibition imposed by EU, because the majority of fishers who depend on tuna catches suffer severely due to loss of their income. Moreover, attention must be paid in order to control unauthorized fishing by foreign vessels as they exploit the fish stock unsustainably. Restriction of course-net is also a must because it leads to the population depletion being an untargeted fishing method. Enforcing a guaranteed market price for the products, awareness on sustainable exploitation of yield and maintain the required quality standards, subsidies on fuel and other fishing gears, proper loan systems, efficient mechanism to sell their catch are some of suggestions that can be adopted to encourage a greater number of fishers seeking offshore and deep-sea fishing. V. Concluding Remarks Field experience show traditional economic activities of coastal communities are moving away from fishery and agriculture. Change is due to declining fish stock, cyclone, storm surges, salt water intrusion, water stress. Change is also due to low income from traditional livelihood, competition for land, pollution load. Demand for tourism, related f policies are creating short term alternative livelihood options. Threats to current coastal economic activities will exacerbate in the region due to climate change. VI. Acknowledgment Financial grant received from Asia-Pacific Network on Global Change Research (APN Project reference numbers: ARCP2012-12NMY-ROY and ARCP2013-07CMY-ROY) help in multi-country collaboration, field survey, science-policy workshops. Support in accessing information from various state and central government officials in different departments, academic and research institutions, local community organizations in countries are duly acknowledged. 1. I. J. Bateman, G. M. Mace, C. Fezzi, G. Atkinson, K. Turner, “Economic analysis for ecosystem service assessments”, Environmental and Resource Economics, 2011 Feb 1;48(2):177-218. 2. UNEP, Millennium Ecosystem Assessment Synthesis Report, UNEP, 2005. 3. E. B. Barbier et al, “Coastal ecosystem-based management with nonlinear ecological functions and values”, Science. 2008 Jan 18;319 (5861):321-3. 4. L. Burke et al, Coastal ecosystems. Washington, DC: World Resources Institute; 2001. 5. J. Roy et al, “Coastal Ecosystem and Changing Economic Activities and Vulnerabilities along Chinese and South Asian Coasts” in J. Boonjawat, K. Fukushi, & L. A. Stevenson, Eds., APN Science Bulletin (6). 2016, Asia-Pacific Network for Global Change Research (APN). ISSN 2185-761X. 6. UNEP, Marine and Coastal Ecosystems and Human Well-being Synthesis Report, UNEP, 2006. 7. R. K. Turner, I. Lorenzoni, N. Beaumont, I. J. Bateman, I. H. Langford, A. L. McDONALD, “Coastal management for sustainable development: analysing environmental and socio-economic changes on the UK coast”, Geographical Journal, 1998 Nov 1:269-81. 8. M. L. Martínez, A. Intralawan, G. Vázquez, O. Pérez-Maqueo, P. Sutton , R. Landgrave, “The coasts of our world: Ecological, economic and social importance”, Ecological Economics, 2007 Aug 1;63(2):254-72. 9. W. N. Adger, “Social and ecological resilience: are they related?”, Progress in human geography, 2000 Sep 1;24(3):347-64. 10. R. J. Klein, M. J. Smit, H. Goosen, C. H. Hulsbergen, “Resilience and vulnerability: coastal dynamics or Dutch dikes?”, Geographical Journal, 1998 Nov 1:259-68. 11. W. N. Adger , T. P. Hughes , C. Folke , S. R. Carpenter, J. Rockström, “Social-ecological resilience to coastal disasters”, Science, 2005 Aug 12;309(5737):1036-9. 12. T. F. Stocker , editor. Climate change 2013: the physical science basis: Working Group I contribution to the Fifth assessment report of the Intergovernmental Panel on Climate Change, Cambridge University Press; 2014 Mar 24. 13. T. Gabor, T. K. Griffith , “The assessment of community vulnerability to acute hazardous materials incidents”, Journal of Hazardous Materials, 1980 Oct 2;3(4):323-33. 14. W. N. Adger, “Social vulnerability to climate change and extremes in coastal Vietnam”, World development, 1999 Feb 28;27(2):249-69. 15. K. Smith , “Vulnerability, Resilience and the collapse of society: A review of models and possible climatic applications”, Peter Timmerman, Environmental Monograph No. 1, Institute for Environmental Studies, University of Toronto, 1981, Journal of Climatology. 1981 Oct 1;1(4). 16. R. T. Watson , M. C. Zinyowera , R. H. Moss . The regional impacts of climate change: an assessment of vulnerability, Cambridge University Press; 1998. 17. A. H. Dolan, I. J. Walker, “Understanding vulnerability of coastal communities to climate change related risks”, Journal of Coastal Research. 2006 Jan 1:1316-23. 18. IL&FS, Identification of Tourism Circuits across India, Interim Report prepared for the Ministry of Tourism, Government of India, Gurgaon, Haryana, 2012. 19. S. Hazra, Climate Change Adaptation in Coastal Region of West Bengal, Online at: http://awsassets.wwfindia.org, undated. 20. Government of West Bengal, Action Plan for rehabilitation of sea wall/ sea dyke and prevention of coastal erosion in Digha-Sankarpur-Jalda-Tajpur- Mandarmani area, Irrigation and Waterways Department, Kolkata, undated. 21. C&SD, Census of Population and Housing 2011, Population of Sri Lanka by DS Division, Department of Census and Statistics, Colombo, 2012. 22. CCD, ibid. Table 4.1, p.37, 1990b.
• anonymous In the past 4 years, a sporting goods store had two yearly losses of $13,000 and$21,000 and two yearly profits of $129,000 and$310,000. What was the net profit or loss over 4 years? A. $473,000 B. −$405,000 C. −$473,000 D.$405,000 @aaldia678 Mathematics Looking for something else? Not the answer you are looking for? Search for more explanations.
## 59.60 Cohomology of curves The next task at hand is to compute the étale cohomology of a smooth curve over an algebraically closed field with torsion coefficients, and in particular show that it vanishes in degree at least 3. To prove this, we will compute cohomology at the generic point, which amounts to some Galois cohomology. In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar).
# Expressions and semantic¶ xexpression and the semantic classes contain all the methods required to perform evaluation and assignment of expressions. They define the computed assignment operators, the assignment methods for noalias and the downcast methods.
# Maximum angular velocity so that there is no stick 1. Sep 6, 2016 ### Mr Davis 97 1. The problem statement, all variables and given/known data We have a concrete mixer, and if the drum spins too fast, the ingredients will stick to the wall of the drum rather than mix. Assume that the drum of the mixer has radius R = 0.5 m and that it is mounted with its axle horizontal. What is the fastest the drum can rotate without the ingredients sticking to the wall all of the time? 2. Relevant equations Newton's 2nd law 3. The attempt at a solution So I believe that I have solved this problem. We define that the ingredients stick to the wall when, at the very top of the motion, there is some normal force pushing the ingredients toward the center. Thus to find the maximum angular velocity, we just need to find the angular velocity at which there is only gravity acting at the top and no normal force. Also, we are working in polar coordinates, so we define our reference frame such that towards the center of rotation is positive, and outward is negative. Thus, (imagine that our analysis is on a single particle, at the very top of the rotation) $F_g = m a_{radial}$ $mg = m (\ddot{r} - r \dot{\theta^2}_{max})$ $g = -r \dot{\theta^2}_{max}$ $\displaystyle \dot{\theta}_{max} = \sqrt{-\frac{g}{r}}$ This is the correct equation (I think), except there is a negative. Why is there a negative? Did I define my coordinate system wrong? 2. Sep 6, 2016 ### kuruman You mention the normal force, but there is no normal in your equations. Yes, the normal force must be zero at some point, but your solution implies that $m\ddot{r}$ is the normal force because that's what you set to zero. What is $m \ddot{r}$ according to Newton? 3. Sep 6, 2016 ### Mr Davis 97 Well, $r$ is not changing, so I thought that $\ddot{r} = 0$. Also, at the very top, gravity would be the only force acting on the particle, so I still don't see what I am doing wrong 4. Sep 6, 2016 ### kuruman Please answer my question first, what does $m\ddot{r}$ represent? Answering this will clarify the way you think about this problem. Hint: What does Newton's Second law say? Also, consider this: does the fact that r is not changing necessarily mean that $\vec{r}$ is not changing? 5. Sep 6, 2016 ### Mr Davis 97 Is $m \ddot{r}$ the normal force, since $\ddot{r}$ is the acceleration of the radius vector from the center, which is constant in magnitude but not in direction? 6. Sep 6, 2016 ### kuruman No. More correctly, $m \ddot{ \vec{r}}$ (mass times the acceleration vector) is ... ? Newton's Second law? 7. Sep 6, 2016 ### Mr Davis 97 $\ddot{r}$ is the acceleration due to a change in radial speed. So $m \ddot{r}$ would be the force that causes a change in radial speed... 8. Sep 6, 2016 ### Mr Davis 97 Sorry to bump, but I really need some help with this. I'm so close to the answer, I just need some pointers. 9. Sep 7, 2016 ### jbriggs444 You have the right equation. Karuman is on the wrong track. The stated concern is the sign error resulting from: $mg = m (\ddot{r} - r \dot{\theta^2}_{max})$ In that equation, you are equating $mg$, the downward force of gravity on the object, with $(\ddot{r} - r \dot{\theta^2}_{max})$ the radial acceleration of an object described using polar coordinates and a convention that out = positive. At the top of the path, do your sign conventions (down=positive and out=positive) line up properly? 10. Sep 7, 2016 ### Mr Davis 97 Ah ha! That fixes everything. Thank you!
<p><b>Abstract</b>—This paper presents a recursive technique for generation of pseudoexhaustive test patterns. The scheme is optimal in the sense that the first <tmath>$2^k$</tmath> vectors cover all adjacent k-bit spaces exhaustively. It requires substantially lesser hardware than the existing methods and utilizes the regular, modular, and cascadable structure of local neighborhood Cellular Automata (CA), which is ideally suited for VLSI implementation. In terms of XOR gates, this approach outperforms earlier methods by 15 to 50 percent. Moreover, test effectiveness and hardware requirements have been established analytically, rather than by simple simulation and logic minimization.</p>
# Where to employ domesticated goblins in a fantasy world? Goblins are small, diminutive humanoid creatures. They are approximately the size of a small child, they are short-lived, and they have very low intelligence. In my fantasy world, goblins have been bred and domesticated like dogs. They can be taught simple commands and tasks, though they lack the intelligence for any skilled labor. They can use tools, but they still require oversight. Their lifetimes are too short to be worth much investment. They are basically dogs with opposable thumbs. Goblins have been bred to work on castles, farms and stables, etc. doing all the menial jobs. They are best suited for repetitive tasks that require no thought. They are not paid, and will work because that's what they've been bred to do. Like dogs, some goblins are prone to distractions and will occasionally be mischievous. They cannot be trusted with anything valuable. They have very little strength, but decent stamina. Goblins can also eat near anything, and are very easy to sustain - they will happily live off trash and leftovers. They have good sense of smell, they have night vision, and are decent hunters. They work well in numbers. Domesticated or no, most animals will spook around goblins. Also, the sight of fire can send a goblin into a craze. There is a risk of goblins going wild if left unsupervised. Right now, I'm thinking that goblins will be used to wipe the floors and clean stables. Are there any other jobs in medieval-like setting where domesticated goblins could be employed? Edit: Goblins are nocturnal creatures, and the sight of any fire has a hypnotizing effect to them. Even small flames can entrance them and large blazes will send them mad. • I keep reading and reading and thinking...child labour. Replace the children with goblins. – VLAZ Jan 24 at 12:35 • @JGreenwell I...don't feel comfortable enough with writing that answer. But it is an answer, I agree. – VLAZ Jan 24 at 13:14 • dang, but I get it. 'Cause I started an answer along those lines and gave up as this is my actual name and didn't want to have that answer taken out of context somewhere along the line @vlaz – JGreenwell Jan 24 at 13:18 • You can think of them as of Rowling's House-elves, but without magic. – Alexander Jan 24 at 17:20 • I read the question as "I've had this idea of enslaving an inferior race, is that something anyone else has thought of?"... err. Yes. Yes it is. The OP should be careful that their story doesn't say things they don't want to say – Nathan Cooper Jan 25 at 14:27 Agriculture: Goblins can do anything larger animals can't do. It shouldn't be too difficult to teach them to harvest crops, vegetables and fruit, take care of the plants in general, get rid of unwanted weeds, sow seeds etc. They might even lead larger animals for plowing. Manufacturing can also be made easier. If they can clean, anything for textiles for example - shearing sheep, spinning, weaving and so on - shouldn't be hard, and a lot more I'd assume. Later on they'd be ideal factory workers. While their lacking strength can be a drawback, their stamina and size can also be useful in mining. Again, a support position is where they'd be best - move small rubble out of the way, collect and sort ore while the human miner works the pickaxe. In general if goblins existed the way you describe them they'd be useful for almost anything at least in a support job. While they couldn't work as blacksmith themselves, for example, it wouldn't be a problem for them to operate the bellows, add coal to the furnace, clean and order tools and so on. Other than typical work: They can be employed as entertainment - circus, gladiator/pit fights, theater, possibly even music. And, of course, they can be warriors. Give them spears, clubs and slings. They are faithful like a dog, but can handle weapons. Hell, they can even ride dogs for all I care... kinda depends on how uneasy domesticated animals get around them, but I'd consider it illogical to make dogs afraid of them if they live in the same household. In other words, they'd be a part of every aspect of life and work. Nobody says no to a cheap and efficient worker. • to note: OP specifies that sight of fire has potential to send goblins into a craze, might not be the best idea to have them assisting a blacksmith – BKlassen Jan 24 at 21:42 • That could be a significant problem in any world where torches, candles, or firepits/fireplaces are the main sources of illumination everywhere, as would have been typical at the time. Unless this particular world uses crystals or other magic illumination instead. – Miral Jan 25 at 0:39 • Kinda depends on when and how fire does that, how Goblins can adapt to it (or be bred to get used to it). If even a torch scares the hell out of them, sure. I didn't really interpret OP's line as that extreme, though, I thought it referred to an uncontrolled/large fire. – Infrisios Jan 25 at 7:30 • @Infrisios Any open flame has a bad effect on goblins. I figured that in the setting they would use lanterns and covered candles. If a goblin sees direct fire, then for small flames they'll be hypnotized by it and for large flames they'll go mad. – user60764 Jan 25 at 12:15 • @CSN In that case, having them work in the furnace sounds like a bad idea, but if it's deemed worth it they could be restricted to areas where they don't notice the fire. Can still feed a fire without seeing it, for example. That's harder, of course. What I do wonder is... if they can be bred to enjoy work and stuff, shouldn't it be possible to breed them to be able to be around fire? Just think of dogs' breeding, the different breeds that exist. Behavior and looks are very different from dog to dog, without additional education some dogs will hunt while others herd. Could work for Goblins. – Infrisios Jan 25 at 12:30 Humanoid but not quite human, capable of tool use but of low intelligence, owned as property, used for unpaid manual labor? What you're describing here, without actually using the word, is a slave race. So try looking at historical examples of tasks that slaves were employed for. And while you're researching historical slavery, you can find interesting examples of various things that can go wrong, and also various different models of slavery. The brutal style formerly practiced in the American South that people these days generally associate with the term was not the only option. Also, a word of caution. Because American South style slavery is what most people think of, a lot of readers will make that association whether it's what you intend or not. And the traits of a slave race I listed above were often imputed to the African race in past times as a justification for slavery, and for racism after it was ended. (Yes, all of them. They were treated as literally subhuman, and the publication of Darwin's work on evolution, just before the American Civil War broke out, certainly didn't help; it gave scientific credibility to the notion that Africans were "less evolved" and closer to bestial animals than "proper humans.") If you write about something like this, make sure that it's clear from the text that your goblins are not a fantastical counterpart to any real-world group of people. Otherwise, you run the very real risk of some oversensitive person claiming that they are and that you're a racist, a horrible person, etc. • Hey, I live in the South, and most people act like that is the only case of slavery. And anything other than "Whites were prety much Demons controlling black slaves" is put off as racist. My point is that any sniff towards a reference to that slavery and you having goblin owners put in a good light will have you and your work linched. – The Mattbat999 Jan 25 at 2:46 Think about the first jobs ever that were replaced by some kind of machine or automaton. The goblins would be used for: • Carrying water (for those households without running water) • Collecting and carrying fire wood, stoking fires • Substituting the conveyor belt in the first ever assembly line • Food processing: harvesting fruit, peeling and cutting it to be processed into preserves • Producing simple goods like clay bricks (to be burned by an intelligent human) and woven baskets In times of war they could literally replace dogs and horses by transporting provisions and messages between the front lines and headquarters. The goblins could,be employed by chimney sweeps, if chimneys have been invented yet in your world. In the real world chimney sweeps would employ children as young as 5 or 6 to clean chimneys from the inside, often crawling up them without wearing any clothes as they cleaned the deposits of soot and tar. This was hazardous work some children would die through suffocating as they climbed the chimney, some would slip and fall and some would be burnt to death as fires were lit in grates to 'encourage' them to work faster. The environment was also dangerous the deposits on the inside of a chimney are carcenogenic and many died of cancer, scrotal cancer in boys was a particular problem as they worked without clothes. Also respiratory diseases were a problem. Thinks like a tannery or cleaning the collection points of castle toilets come to mind. Basically jobs that were done by slaves in Roman times or the poorest people in the Dark ages: Formerly, tanning was considered a noxious or "odoriferous trade" and relegated to the outskirts of town, amongst the poor. Indeed, tanning by ancient methods is so foul smelling, tanneries are still isolated from those towns today where the old methods are used. Skins typically arrived at the tannery dried stiff and dirty with soil and gore. First, the ancient tanners would soak the skins in water to clean and soften them. Then they would pound and scour the skin to remove any remaining flesh and fat. Next, the tanner needed to remove the hair from the skin. This was done by either soaking the skin in urine,[2] painting it with an alkaline lime mixture, or simply allowing the skin to putrefy for several months then dipping it in a salt solution. After the hairs were loosened, the tanners scraped them off with a knife. https://www.ancient.eu/article/1239/toilets-in-a-medieval-castle/ Another design was to have tiers of toilets on the outside wall where the shafts all sent waste to the same collection point. Dover Castle, built in the second half of the 11th century CE, had a cesspit at the base of one wall of the keep to collect waste from the toilets above. At Coity Castle in Wales, built in the 12th century CE, there were three tiers of toilets with the shafts emptying into the same courtyard basement. The same arrangement was found at Langley Castle in Northumberland, England, built c. 1350 CE, with the common collection point being a pit which was cleaned out by a natural stream. There were also toilets in ground floor buildings and these had stone drainage channels to drain away waste. Waste from such collection points, or the ditch in general, was likely collected by local farmers to be reused as fertiliser. War goblins obviously, send them in just before the first regular rank with knives and cheap spears in the hope of getting them to disprganize the enemy line just before the charge • and if sending them into war with a fire behind them, they would cause some chaos based on the description given by OP. – Jordan.J.D Jan 25 at 19:08 With you description, it is easy to treat them as slaves as described in many of the other answers. This could be a plot point for later rebellion or welfare groups. Consider The Stormlight Archives where the parshmen (creatures of lesser intelligence) gain intelligence. By simply leaving, the society that has grown too dependent on them collapses. If you want your society to take a more symbiotic relationship, you can exploit the fact that the goblins eat anything to create a sanitation system where they eat all the garbage. • Copying what happened to the Parshmen is a very good example of what not to do. Not because the story's bad (it's definitely not!) but because it's so distinctive that if you do the same thing, people will recognize it and say "this book is ripping off The Stormlight Archive." – Mason Wheeler Jan 25 at 17:24 Goblin mills. Put into wheels just like hamsters, with decent stamina and low upkeep costs, they are perferct for the job - also, no intellectual skills are required. They can work together in groups of 50-200 to power a stone grinder and produce flour • Welcome to Worldbuilding, Jacopo! If you have a moment, please take the tour and visit the help center to learn more about the site. You may also find Worldbuilding Meta and The Sandbox useful. Here is a meta post on the culture and style of Worldbuilding.SE, just to help you understand our scope and methods, and how we do things here. Have fun! – Gryphon Jan 24 at 18:28 Mining. All mines used to be dug following the vein and with a bare minimum of extra material removed, so the tunnels were rather cramped. Goblins, much like children in the days gone by, were expendable, so this is an ideal place to put them to work. Another industry where goblins would excel would be weaving/spinning (especially if your world experiences anything like the industrial revolution). As others have said, basically any work that a slave would do. Easy to understand, yet repetitive and back-breaking. Think of similar jobs too, but much more on the scale of “stuff nobody wants to do”. Sewer and sanitation workers come to mind, mostly. In a medieval society, functional sanitation would have been the envy of everyone. The more goblins you have to clean up the sewers, and solid waste/garbage clogging up the streets, the cleaner and more beautiful your city would be to everyone, and more people that could do more valued or important work. Just an example of how it could work.
# Probability of two people meeting in a given square grid. Amy will walk south and east along the grid of streets shown. At the same time and at the same pace, Binh will walk north and west. The two people are walking in the same speed. What is the probability that they will meet? I tried using Pascal's triangle but I have no idea how to proceed. • ... with the same speed, right? – user66081 May 2 '17 at 15:28 • Yes, both are walking in the same speed. I just saw I made a type and instead of writing pace I wrote place. – Sarhad Salam May 2 '17 at 15:28 • So please add this information to the problem description. – miracle173 May 2 '17 at 15:29 • It is explained here youtu.be/F_kt51Qj1RI – Thomas Wagenaar May 2 '17 at 20:38 • There's missing information in your problem description (though I can guess what it is). First, you can't walk North and West at the same time (because of the grid). Presumably you mean that there's a 50% chance of each choice being taken by A and B. You need to state that. – Francis Davey May 2 '17 at 22:02 Here's one possible way that Amy and Binh can meet: Together, the red and blue path make up a path from point $A$ to point $B$. There are $\binom{10}{5} = \frac{10!}{5!\,5!}$ such paths, because each path consists of $5$ vertical steps and $5$ horizontal steps, and there are $\binom{10}{5}$ ways to choose which steps are vertical. There are $2^{5+5}$ ways to choose which $5$ steps Amy takes, and which $5$ steps Binh takes. Of them, $\binom{10}{5}$ result in them meeting. So the probability is $\binom{10}{5}/2^{10} = \frac{252}{1024} = \frac{63}{256}.$ • For those trying to follow along, one unstated fact is that Alice and BInh can only meet after each person has walked exactly 5 blocks. To prove that fact, you could think about an expression based on their coordinates like Ax + Ay + Bx + By, and show that the expression is invariant (always equal to 10). So if they meet (A's coords are equal to B's coords), then we have Ax + Ay = 5, so Amy has walked exactly 5 steps, and same thing goes for Binh. Therefore, the first 5 steps taken by each person determine whether or not they will meet, and that's why 2^5 is relevant. – David Grayson May 3 '17 at 0:20 • Hi, can you please explain to me why this answer is wrong? "All the possible ways for them is $\binom{10}{5}*\binom{10}{5}$, and in only $\binom{10}{5}$ of them they meet each other. So the probability is $\dfrac{1}{\binom{10}{5}}$ – Soroush khoubyarian May 3 '17 at 13:59 • @Soroushkhoubyarian There's an unstated assumption here, which is that Amy and Binh are equally likely to pick either direction until they run into an edge. If they pick uniformly random routes, then the denominator should be $\binom{10}{5}^2$ instead. But after they meet each other in $\binom{10}{5}$ ways, they have more ways to finish their path, so your approach should lead to a bigger answer than $\frac{1}{\binom{10}{5}}$. – Misha Lavrov May 7 '17 at 15:51 It's first worth noting that the number of ways to make $Y$ moves vertically and $X$ moves horizontally is $\binom{X+Y}{Y}$ (think of it like writing $X+Y$ move-slots and choosing $Y$ of them to be vertical movements, which means the rest are horizontal). Amy and Binh must make $10$ moves each, which means they can only meet after $5$ moves. Assuming they meet: If Amy makes $Y$ moves down and $X$ moves to the right (cumulatively), Binh must make $X$ moves up and $Y$ moves to the left (cumulatively). There are $\binom{X+Y}{Y}^2 = \binom{5}{Y}^2$ ways for both people to arrive at such a meeting point. This value is the numerator of our probability, and the denominator is the total number of possible paths after $5$ moves, which is $2^5$ per person. Over all $Y$, we have: $$P = \sum_{Y=0}^{5} \frac{\binom{5}{Y}^2}{(2^5)^2} = \frac{63}{256}$$ Amy walks north and east while Bing walks south and west, so if they meet at all it will be on the diagonal which runs from northwest to southeast. So consider the probability that they meet in the southwest corner. This requires Amy to walk 5 squares to the south while Bing walks five squares to the east. Assume that Amy walks south and east with equal probability of 1/2 at each step, and similarly Bing walks north and east with equal probability. Then Amy will go to that square with probability $(1/2)^5$, and so will Bing; they'll meet at that square with probability $(1/32)^2 = 1/1024$. You can do a similar computation for each square along the diagonal and add up the results. • I think it is also the case that after 5 steps they will each be on the rising left to right diagonal. And that is the only way they can meet. Seems like there should be a solution from this, but I am unable to find it. There are 6 points on the diagonal. So why not 1/6 chance A is at px after 5 moves, and 1/6 chance B is at px? That means 1/6 * 1/6 chance they meet = 1/36 chance they meet? I see that is wrong, but don't see why :( – Sean May 3 '17 at 11:07 • That would be right if each point on the diagonal was equally likely to be reached in 5 steps. But it's much more likely to reach the points at the middle of the diagonal than the points at the end of the diagonal. – Michael Lugo May 3 '17 at 15:35 • Ah, because for instance there is only one possible path to reach bottom left, but many to reach middle points. Got it, thanks! – Sean May 4 '17 at 10:40 If they meet at all, they do on the (rising) diagonal. The number of "successfull" (pairs of) paths equals the number of paths from top left to bottom rigth, which is $10\choose 5$. The total number of (pairs) of paths is $2^{10}$. Just a silly piece of code, approximating the answer... #!/usr/bin/python3 from random import choice A = [0, 0] B = [5, 5] N = 100000 # Number of simulations n = 0 # Number of meetings for _ in range(N) : a = A[:] b = B[:] while (b != A) & (a != B) & (a != b) : a[choice([i for (i, t) in enumerate(a) if (t != B[i])])] += 1 b[choice([j for (j, t) in enumerate(b) if (t != A[j])])] -= 1 n += (a == b) print(n / N) • You are running more simulations than there are cases :) – Aurel Bílý May 2 '17 at 19:02 • Usually simulations to approximate the answer make sense when the answer would be computationally much more difficult to obtain. – Aurel Bílý May 2 '17 at 19:19 • Or when they're just fun – thumbtackthief May 2 '17 at 19:34 • @AurelBílý One of the advantages of a well-written simulation is that it can be easily tweaked to answer other questions such as -- what if there is a 3-dimensional grid? What if the grid is larger? etc. – John Coleman May 3 '17 at 14:01 • @JohnColeman I agree, I agree, simulations can be fun and useful in many situations, I cannot argue with that. I was just pointing that it is somewhat amusing in this specific case to run more simulations in order to reach an approximate / inaccurate answer than to evaluate all possible cases to reach the exact answer. – Aurel Bílý May 3 '17 at 14:06
##### Authors: Ojiya Emmanuel Ameh1*, Okoh Abo Sunday1, Mamman Andekujwo Baajon2 and Ngwu Jerome Chukwuemeka3 Affiliation(s): 1Lecturer, Department of Economics, Federal University Wukari, Nigeria 2Lecturer, Department of Economics, Federal University Wukari, Taraba State, Nigeria 3Lecturer, Department of Economics, Enugu State University of Science and Technology (ESUT), Enugu State, Nigeria Dates: Received: 14 October, 2017; Accepted: 26 October, 2017; Published: 28 October, 2017 *Corresponding author: Ojiya Emmanuel Ameh, Lecturer, Department of Economics, Federal University Wukari, Nigeria, E-mail: @; Citation: Ojiya EA, Okoh SA, Mamman AB, Chukwuemeka NJ (2017) An Empirical Analysis of the effect of Agricultural Input on Agricultural Productivity in Nigeria.Int J Agric Sc Food Technol 3(4): 077-085. DOI: 10.17352/2455-815X.000026 © 2017 Ojiya EA, et al. This is an open-access article distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. Keywords: Agricultural productivity; Credit to farmers; Tractors; Government spending; OLS The main object of this study is to investigate the effect of Agricultural input on Agricultural productivity in Nigeria from 1990 to 2016 using secondary annual time series data sourced from World Bank database (2016) and Central Bank of Nigeria Statistical Bulletin (2016). The methodology adopted for the study was first and foremost unit root test by Augmented Dickey-Fuller (ADF) approach; a test for long-run relationship (Johansen cointegration), Granger causality test and then the Ordinary Least Squares (OLS) multiple regression method. Variables in the model were both stationary as well as exhibited long-run equilibrium relationship. Empirical OLS regression result revealed an inverse relationship between government expenditure and agricultural output. Deriving from the findings, the study recommended the following for policy implementation: The Nigerian government should put in place policies and modalities that will encourage existing banks (both commercial and agricultural banks) to make credit facilities readily available to farmers with personnel assigned to monitor and ensure that such funds are judiciously used for the purpose which it is taken; Government must provide funds to acquire sophisticated farm tools (harvesters, tractors, herbicides, fertilizer etc.) and as well build irrigation, dams, storage facilities and establish food processing industries across the country to enable farmers increase productivity, process and preserve their food stuff; Finally, government spending on agricultural sector must of a necessity be increased. The present lackluster and uninspiring attitude of government to management of appropriated funds must change. Corrupt civil servants, contractors and bureaucrats who divert and misappropriate allocated funds for the growth of the sector must be punished to serve as a deterrent to other intending treasury looters. The various financial crimes commissions such as EFCC and ICPC should be strengthen to do this. ### Introduction ##### Background to the study Agricultural development is one of the most powerful tools to end extreme poverty, boost shared prosperity and feed a projected 9.7 billion people by 2050.  Growth in the agriculture sector is two to four times more effective in raising incomes among the poorest compared to other sectors. 2016 analyses found that 65% of poor working adults made a living through agriculture. Agriculture is also crucial to economic growth: in 2014, it accounted for one-third of global gross-domestic product (GDP) [1]. Agriculture is the science or practice of farming, including cultivation of the soil for the growing of crops and the rearing of animals to provide food, wool, and other products while agricultural productivity is increase in per capita output of agricultural produce (Stamp 1970). To meet the needs of a world population expected to reach nine billion by 2050, agricultural production will need to increase by at least 60 percent [2]. Due to its relative importance and future gains, it is known to be a major source of raw materials for processing industries in the manufacturing of finished goods and services. It produces about 80% of all manufacturing industries’ raw materials used in the production of finished goods in most economies of the world. For many years, productivity has been a key issue of agricultural development strategies because of its impact on economic growth and development. It is also a known fact that the easiest means through which mankind can get out of poverty to a condition of relative material affluence is by increasing agricultural productivity. Productivity improvements create the wealth that can be used to meet the needs of the future. Problem Statement: The development of agriculture in Nigeria has been slow despite various agricultural policies and programmes formulated by successive administration in the country. In fact, the government recognized the unhealthy condition of Nigerian agricultural sector since 1970, and has formulated and introduced a number of programmes and strategies aimed at remedying this situation. These measures included the setting up of large-scale mechanized farms by state and federal government, introduction of scheme such as the River Basin Development Authority. Other measures include, National Accelerated Food Production (NAFP), Operation Feed the Nation (OFN), Green Revolution (GRP) and the Directorate for Food, Roads and Rural Infrastructure, the New Nigerian Agricultural Policy etc. [3]. In addition to these measures, financial measures such as the establishment of agricultural credit scheme were introduced by successive governments. Inspite of these measures, the development of the agricultural sector has been slow and the impact of this sector on economic growth and development has been minimal. In fact, the former Minister of Agriculture, Dr. Akinwunmi Adesina once lamented that the import bill for food in Nigeria is exceptionally high and it is growing at an unsustainable rate of 11% per annum. Ironically, Nigeria is importing what it can produce in abundance. This trend is hurting Nigerian farmers and displacing local production [4]. In the same vein, Senator Ibikunle Amosun once lamented the high rate of importation of food in Nigeria, describing it as a shame that the giant of Africa imports what it eats [5]. It is in view of the foregoing that the present paper intends to examine the effect of agricultural inputs on agricultural productivity in Nigeria between 1990 to 2016, using an econometric approach of Ordinary Least Squares Regression. Study Objectives: Specifically, the study is designed to achieve the following objectives in addition to the broad objective earlier stated. (i) Examine the effect of Agricultural machinery (tractors) on agricultural productivity in Nigeria; (ii) Determine the impact of Agricultural credit (loans) on agricultural productivity in Nigeria; (iii)Examine the causality effect of government expenditure on agriculture on agricultural productivity. Research Hypothesis: The study shall adopt statistical testing criteria to examine the veracity of the following hypothesis: Ho1: Agricultural machinery has no significant effect on agricultural productivity in Nigeria; Ho2: Agricultural credit has no significant impact on agricultural productivity in Nigeria; Ho3: Government expenditure on Agriculture has no causality effect on agricultural productivity in Nigeria. Justification for the study: The study is justified because it will provide an insight into how effective both fiscal and monetary instruments designed by the Central Bank of Nigeria and the Nigerian government helped in achieving the overall objectives of the nation’s agricultural policy which is first and foremost tailored towards achieving food security and exportable surplus for enhanced economic growth and development. Furthermore, the study is expected to serve as a reference material for future research as well as guide government in its future policy designs towards achieving country-wide expected goals. The remainder of this study is sectionalized as follows: Part two is dedicated to theoretical and empirical review. In part three, the data and methodology adopted for the study is discussed. Part four presents the empirical findings, while part five provides the conclusion and policy recommendations of the study. ### Literature Review ##### Agricultural productivity According to Fulginiti and Perrin [6], as cited in Amire and Arigbede [2], agricultural productivity refers to the output produced by a given level of inputs in the agricultural sector of a given economy. More formally, it can be defined as “the ratio of value of total farms outputs to the value of total inputs used in farm production” [7], as cited in [8]. Put differently, agricultural productivity is measured as the ration of final output, in appropriate units to some measure of inputs. ##### An overview of agricultural policies in Nigeria In the view of Nwagbo [9], agricultural policy-making in Nigeria has been through changes over time. During each phase, the characteristics of policy have reflected the roles expected of the sector and the relative endowment of resources. Institutions were created while others were disbanded depending on the exigencies of the time. Hence the marketing Boards gave way to commodity boards and production companies; the River Basin development Authorities have been modified to meet changing objectives; small-scale irrigation schemes are receiving more attention than the earlier large versions; agricultural extension by the State Ministries of Agriculture has given way to extension by the Agricultural Development Project (ADP). Other measures include, National Accelerated Food Production (NAFP), Operation Feed the Nation (OFN), Green Revolution (GRP) and the Directorate for Food, Roads and Rural Infrastructure and finally, the New Nigerian Agricultural Policy. The first national policy on agriculture was adopted in 1988 and was expected to remain valid for about fifteen years, that is, up to year 2000. Nigeria’s agricultural policy is the synthesis of the framework and action plans of government designed to achieve overall agricultural growth and development. The policy aims at the attainment of self-sustaining growth in all the sub-sectors of agriculture and the structural transformation necessary for the overall socio-economic development of the country as well as the improvement in the quality of life of Nigerians. ##### According to ARCN (2016) [10], the broad policy objectives Include: • Attainment of self-sufficiency in basic food commodities With particular reference to those which consume considerable shares of Nigeria’s foreign exchange and for which the country has comparative advantage in local production; • Increase in production of agricultural raw materials to meet the growth of an expanding industrial sector; • Increase in production and processing of exportable Commodities with a view to increasing their foreign exchange earning capacity and further diversifying the country’s export base and sources of foreign exchange earnings; • Modernization of agricultural production, processing, Storage and distribution through the infusion of improved technologies and management so that agriculture can be more responsive to the demands of other sectors of that Nigerian economy; • Creation of more agricultural and rural employment Opportunities to increase the income of farmers and rural dwellers and to productively absorb an increasing labour force in the nation; • Protection and improvement of agricultural land resources and preservation of the environment for sustainable agricultural production; • Establishment of appropriate institutions and creation of administrative organs to facilitate the integrated development and realization of the country’s agricultural potentials. ##### Theoretical framework The theoretical framework of this study is built on the Cobb-Douglas production function. This theoretical model was applied in extant literature including Ekwere [11]. In economics, the Cobb-Douglas functional form of production function is widely used to represent the relationship of an output to input. It was proposed by Knut (1926) and tested against statistical evidence by Charles Cobb and Paul Douglas in. In 1928, Charles Cobb and Paul Douglas [12], published a study in which they modeled the growth of the American economy during the period 1899 to 1922. They considered a simplified view of the economy in which production output was determined by the amount of labour involved and the amount of capital invested. While there are many other factors affecting economic performance, their model proved to be remarkably accurate. The function they used to model production was of the form: P(L,K) = bLα Kβ Where: P = Total production (the monetary value of all goods produced in a year); L = Labor input (the total number of person-hours worked in a year); K = Capital input (the monetary worth of all machinery, equipment, and buildings); b = Total factor productivity; α and β are the output elasticities of labour and capital, respectively. These values are constants determined by available technology. Output elasticity measures the responsiveness of output to a change in levels of either labour or capital used in production, ceteris paribus. In agricultural production, efficient allocation of farm resources helps farmers to attain their objectives. It avails farmers the opportunity of improving their productivity and income. At the microeconomic level efficient allocation of farm resources (farmland, credit facilities, fertilizer, tractors and labour, among others) help farmers to contribute to food production, employment creation, industrial raw materials and export product for foreign exchange earnings. According to Olayide and Heady [7], agricultural productivity is synonymous with resource productivity which is the ratio of total output to the resource/inputs being considered. According to Olujenyo (2008), the production function could be expressed in different functional forms such as Cobb Douglas, linear, quadratic, polynomials and square root polynomials, semilog and exponential functions. However, the Cobb Douglas functional form is commonly used for its simplicity and flexibility coupled with the empirical support it has received from data for various industries and countries. ### Materials and Methods This study adopts a non-experimental research design approach. The data used were obtained from secondary sources and therefore, no sampling was done neither was any sampling technique adopted in the process of research. ##### Sources of data collection The data for this study were secondary in nature and sourced from the publication of World Bank Database and Central Bank of Nigeria (CBN) [13], statistical bulletin for various issues. The data spans the period 1990 to 2016 (26 years). The data from this period present a considerable degree of freedom that is necessary to capture the effect of explanatory variables on the dependent variables. Furthermore, data sourced from the World Bank can be reliable because many studies have employed the data published by this institution for econometric purposes due to its reliability. ##### Variables adopted for the study Variables adopted for the study are Ag-output (proxy for agricultural productivity) used as dependent variable to be regressed against Ag-Machine (proxy for Agricultural machinery, tractors per 100sq.km of arable land), Ag-Exp (proxy for government expenditure on agriculture) and gross domestic product as independent variables respectively. Gross Domestic Product is included as a control variable to avoid the challenge of variable omission and model misspecification. ##### Method of data analysis The method of data analysis include first and foremost unit root test using Augmented Dickey-Fuller (ADF); a test for long-run relationship (Johansen cointegration), Granger causality test and then the ordinary least square (OLS) multiple regression method to determine the effect of the independent variables in the model on the dependent variable. The study made use of E-views 8.0, econometric software for the analysis. Unit root test: To study the stationarity properties of time series, the Augmented Dickey–Fuller test (ADF) (Dickey & Fuller, 1981) is employed in this study. The test involves estimating the regression. The model for the ADF unit root framework is as follows: ΔXt = αt1+ pt + βXt-1 +$\sum _{i=1}^{k-1}$ γiΔXt-1 + εt ……. Eq 3.1 In the above equation, α is the constant and ρ is the coefficient of time trend. X is the variable under consideration. In this study, the variables include log(FDI), log(GDP-pc), log(INVT), and log(MAN). Δ is the first-difference operator; t is a time trend; and εt is a stationary random error. The test for a unit root is conducted on the coefficient of Xt-1 in the above regression. If the coefficient, β, is found to be significantly different from zero (β ≠ 0), the null hypothesis that the variable X contains a unit root problem is rejected, implying that the variable does not have a unit root. The optimal lag length is also determined in the ADF regression and is selected using Akaike information criterion (AIC). Johansen cointegration test: This paper attempts to use the Johansen maximum likelihood cointegration test (Johansen, 1988) to determine long-run relationships among the variables being investigated. In examining causality, the Granger causality analysis is also performed. In order to obtain good results from the test, selecting the optimal lag length is so important. The Johansen cointegration framework takes its starting point in the vector autoregressive (VAR) model of order p given by: yt = A1yt-1 + …+ Apyt-p + βxt + εt ……. Eq 3.2 where yt is a vector of endogenous variables and A represents the autoregressive matrices. xt is the deterministic vector and B represents the parameter matrices. εt is a vector of innovations and p is the lag length. The VAR can be re-written as: Δyt = Πyt-1 +$\sum _{i=1}^{p-1}$ ΓiΔyt-1 + βXt + εt ……. Eq 3.3 where Π = Σ Ai – I and ΓI Σ A I=1 j=i+1j The matrix Π contains the information regarding the long-run coefficients of the yt variables in the vector. If all the endogenous variables in yt are cointegrated at order one, the cointegrating rank, r, is given by the rank of Π = αβ, where the elements of _ are known as the corresponding adjustment of coefficient in the VEC model and β represents the matrix of parameters of the cointegrating vector. To indicate the number of cointegrating rank, two likelihood ratio (LR) test statistics, namely the trace and the maximum Eigen value tests (Johansen, 1988), are used to determine the number of cointegrating vectors. The two tests are defined as: ƛtrace = −T Σi=r+1 log(1-ƛi) and ƛmax = -Tlog(1- ƛi+1), …. Eq 3.4 where ƛi denotes the estimated values of the characteristic roots obtained from the estimated Π, and T is the number of observations. The first statistic test tests H0 that the number of cointegrating vector is less than or equal to r against the alternative hypothesis of k cointegrating relations, where k is the number of endogenous variables, for r = 0,1, … , k−1. The alternative of k cointegrating relations corresponds to the case where none of the series has a unit root. The second test tests the null that the number of cointegrating vectors is r, against the alternative hypothesis of 1 + r cointegrating vectors. Granger causality based on the vector error correction model: In order to identify the long-run relationship among the series under study, the Johansen co-integration test must be done. However, the test does not indicate anything about the direction of causality among the variables in the system; therefore, the Granger causality analysis must be done. If the series are co-integrated, the VECM-based Granger causality analysis is an appropriate technique used to determine the long-run and the short-run relationships (Engle & Granger, 1987) based on the following forms: Causality Model: y = [log(Ag-output), log(Ag-Exp] Δlog(Ag-output)t = β1,t +$\sum _{i=1}^{n-1}$ β11j, Δlog(Ag-output)t-j +$\sum _{i=1}^{n-1}$ β11j, Δlog(Ag-Exp)t-j + δ1EC + ε1t Eqtn 3.5 Δlog(Ag-Exp)t = β2,t +$\sum _{i=1}^{n-1}$ β21,j, Δlog(Ag-Exp)t-j +$\sum _{i=1}^{n-1}$ β22,j Δlog(Ag-Output)t-j + δ2EC + ε2t Eqtn 3.6 The coefficients of the ECt−1 term indicate causality in the long run and the joint F test of the coefficients of the first-differenced independent variables confirms short-run causality. Δ denotes first-difference operator. μ1t and μ2t are the stationary disturbance terms for the equations. n is the order of the VAR, which is translated into lag of n−1 in the error correction mechanism. δ1 and δ2 denote the coefficients of long-run Granger causality for equations (3.5) and (3.6), respectively. In this paper, the short-run causality is determined through the error correction based on vector error correction model. Ordinary Least Square (OLS): To examine the effect of agricultural inputs on agricultural productivity in Nigeria using the Ordinary Least Squares (OLS) technique the following model is specified. The model for this study is specified in both linear and non-linear relationship as follows: The functional form of the model is specified hereunder Ag-output = f(Ag-Machine, Ag-Credit, Ag-Exp, Gdp) .... Eq 3.7 The mathematical form of the model is specified below Ag-output = f(Ag-Machine + Ag-Credit + Ag-Exp + Gdp)... Eq 3.8 The statistical form of the model is Ag-output = βo + β1(Ag-Machine) + β2(Ag-Credit) + β3(Ag-Exp) + β4(Gdp) … Eq 3.9 In order to capture the stochastic term µt of the variables, the explicit form of the models is given in econometric form below: Ag-output = βo + β1(Ag-Machine) + β2(Ag-Credit) + β3(Ag-Exp) + β4(Gdp) + µt ….. Eq 3.10 The estimated models are further transformed into log-linear form. This is aimed at reducing the problem of multi-collinearity among the variables in the models. Thus the log-linear models are specified as shown below: LnAg-output = βo1(LnAg-Machine) + β2(LnAg-Credit) + β3(LnAg-Exp) + β4(LnGdp) + µt … Eq 3.11 β1> o, β2 > 0, β3 > 0, β4 > 0, β5 > 0 Where, Ag-output = Agricultural Productivity Ag-Machine = Agricultural machinery, tractors per 100 sq. km of arable land), Ag-Credit = Agric credit (proxied by credit to the private sector) Ag-Exp = Government Expenditure on Agriculture Gdp = Gross Domestic Product µi = Stochastic or error term Ln = Natural logarithms βo = Intercept parameter β1 - β1 = Slope parameters ##### Economic A priori A priori, it is expected that the independent variables agricultural machineries, agricultural credit, government expenditure on agriculture and gross domestic product should be positively related to the dependent variable (agricultural productivity), all things being equal. ### Results and Discussion ##### Data description and sources This paper used secondary data (time series data). Empirical investigation was carried out on the basis of the sample covering the period 1990 to 2016. Data for the study was sourced from the database of World Bank and Central Bank of Nigeria Statistical Bulletin (2016) respectively. The variables studied include Ag-Output (proxy for agricultural productivity in Nigeria), Ag-Machine (Agricultural machinery, tractors per 100 sq. km of arable land), Ag-Credit ((proxied by credit to the private sector), Ag-Exp (proxy for Government Expenditure on Agriculture) and GDP (proxy for economic growth in Nigeria). Below is the data presentation (Table 1). 1. ##### Table 1: Data Presentation on Ag-Output, Ag-Machine, Ag-Credit, Ag-Exp, GDP (1990-2016). ##### ADF unit root test results In order to begin the dynamic (long-term) regression analysis, the study begins with the unit root test for the stationarity of the variables in each of the models using the Augmented Dickey-Fuller (ADF) since it adjusts properly for autocorrelation (Table 2). 1. ##### Table 2: The results of the unit root test using the Augmented Dickey-Fuller (ADF) test as shown above revealed that no variable was stationary at levels. Hence, the null hypothesis of non-stationarity cannot be rejected at levels. However, at first difference, all variables were stationary. That means at first difference the variables were integrated of order I (1). ##### Co-Integration tests This is used to test for the existence of long-run relationship between dependent and independent variables. The Johansen co-integration test was conducted on the selected variables. The result is as tabulated in table 3. 1. ##### Table 3: Johansen Cointegration Test Results. The Johansen cointegration test result as tabulated above shows that the number of co-integrating vectors and the degree of freedom adjusted version of the Eigen value and trace statistics is used and these test statistics strongly rejects the null hypothesis of no co-integration in favour of all the co-integration relationships at the 1% significant level among the variables. Therefore, the variables used in the model all exhibited long term characteristics (i.e. they can walk together without deviating from an established path in the long-run), hence we can safely conclude that the series Ag-output, Ag-machine, Ag-credit, Ag-Exp and GDP are cointegrated. From the normalized equation (Ag-output) = f(Ag-machine, Ag-credit, Ag-Exp and GDP) above, the Ag-output coefficient of 1.00000 indicates that the level of agricultural productivity (Ag-output) in Nigeria is 1 when other variables are zero. This shows that all things being equal, a unit increase in agricultural machines (tractors), agricultural credit, government expenditure to agriculture and gross domestic product will lead to a corresponding increase in Ag-output respectively. 1. ##### Table 4: Empirical OLS Regression Results. LnAg-output = βo1(LnAg-Machine) + β2(LnAg-Credit) + β3(LnAg-Exp) + β4(LnGdp) + µt The regression result above shows the effect of Agricultural Input on Agricultural Productivity in Nigeria between 1990-2016. The goodness of fit of the model as indicated by an R-squared of 94 percent shows a good fit of the model. An adjusted R-Squared value of 93 percent indicated that the model fits the data well, the total variation in the observed behaviour of Agricultural output is jointly explained by variation in agricultural machinery (tractors used), agricultural credit, government expenditure on agriculture sector and gross domestic product 94%. The remaining 6% is accounted for by the stochastic error term. To test for the overall significance of the model, the ANOVA of the F-statistics is used. To test for the individual statistical significance of the parameters, the t-statistics of the respective variables were considered. The statistical test of significance of the model estimates is conducted by employing the student’s t-test statistical analysis at five per cent significance level. The critical t-test value from the table is 2.021. The decision therefore requires that the tabulated value be compared with the calculated value. If the critical value of the t-test is greater than the t-test calculated at five per cent significance level, the parameter estimated is statistically insignificant and vice versa. From the analysis of this study, the variables (agricultural machine, agricultural credit, gross domestic product) were found to be statistically insignificant. Their calculated t-test values of 1.375287, 0.600000 and 1.728521 respectively. The conclusion was reached because these values were all less than the threshold 2.021 critical value at 5% significance level set by theory. Only the coefficient of gross domestic product was statistically significant in relation to the dependent variable in the model. It has a t-statistic value of 2.059017 higher than the table value of 2.021. The implication is that, only the coefficient of gross domestic product was capable of bringing significant changes to agricultural productivity in Nigeria during the referenced period. The a priori expectations about the signs of the parameter estimates were also considered. Here, Ag-machine, Ag-credit and GDP entered the model with a positive sign. Only the coefficient of government expenditure on agriculture was inversely related to the dependent variable. By implication, a one percent increase in the use of agricultural machineries (tractors) and the availability of agricultural credit to farmers amounted to a 2.5% and 0.013% increase in agricultural productivity in Nigeria respectively. Similarly, the coefficient of gross domestic product is positively related to agricultural productivity. The result shows that a 38 billion naira increase in agricultural productivity is as a result of a rise in gross domestic product (economic growth) in Nigeria between 1990 to 2016. On the contrary, the coefficient of government expenditure on agriculture appeared with a negative sign in relation to the dependent variable. This implies that government spending on the sector has not impacted positively on agricultural output in Nigeria within the period studied. Explicitly stated, a 17 billion naira reduction in output in agricultural productivity is as a result of insufficient government spending in the sector. ##### Granger causality test Below is the output of the Pairwise Granger causality test. To reject the null hypothesis formulated, the probability value of the F-statistic must be less than 0.05. If the probability value of the F-statistic is greater than 0.05 significance level, the null hypothesis is not rejected, thus concluding that the variable under consideration does not Granger cause the other. The extract below is in conformity with the above stated rules (i.e. the F-statistic p-value is less than 0.05% significance level) (Table 5). 1. ##### Table 5: Pairwise Granger Causality Extract. The variable of interest here is AG_EXP (government expenditure on agriculture) and AG_OUTPUT (agricultural productivity). From the extracts above, it is revealed that there is a unidirectional (one-way) causation between agriculture output and government spending on the sector within the period studied. ##### Post-estimation / Diagnostic test Diagnostic checks are crucial in this study to ascertain if there is a problem in the residuals from the estimation of a model; it is an indication that the model is not efficient; as such estimates from such model may be biased and misleading. The model was therefore examined for normality, serial correlation, heteroscedasticity and stability (Table 6). 1. ##### Table 6: Breusch-Godfrey Serial Correlation LM Test: In terms of the econometrics test, the Breusch – Godfrey Serial Correlation LM test was employed in this study to check for the presence or otherwise of first order serial autocorrelation in the model using 2 periods lag of the Observed R-squared at 5% level of significance. ##### Autocorrelation Hypothesis H0: Residuals are not serially correlated/There is absence of serial correlation H1: Residuals are serially correlated/There is presence of serial correlation (Table 7). 1. ##### Table 7: Heteroskedasticity Test: Breusch-Pagan-Godfrey. Looking at the probability value of the Observed R-Squared in the serial correlation test presented above, it is evident that the value is 0.0514 (5%) which is equal to 5%, hence, we reject the null hypothesis (Ho) and accept the alternative hypothesis (H1), and therefore conclude that there is presence of first order serial autocorrelation in the model or the residuals are serially-correlated. Furthermore, from the Heteroskedasticity Test: Breusch-Pagan-Godfrey test result presented in the table above, both the probabilities of F-statistic (0.1306) and the observed R-squared (0.1264) are higher than 0.05 indicating the absence of heteroscedasticity. Therefore, the errors are homoscedastic. The result of CUSUMQ stability test indicates that the model is stable. This is because the CUSUMQ lines fall in-between the two 5% lines. Finally, the normality test adopted is the Jarque-Bera (JB) statistics. Looking at the histogram, the study observes that the residual is normally distributed because of the insignificant probability value of 0.425481. Both the Histogram and CUSUMQ graphs are presented below: (Figures 1,2). 1. ##### Figure 1: Normality Test CUSUMQ Test. ##### Conclusion / Recommendations The role of agriculture in any economy is indeed significant and cannot be over-emphasized. It is one of the most dominant sectors in any economy as the very survival of every nation depends on how well or bad its agricultural sub-sector is managed. It is indeed not just a major source of livelihood for its citizens but a source of foreign exchange earner to the nation. This is because apart from providing food for the teeming population of the economy, it is the only source of raw materials that serves as input for other sectors in their production process. It is in recognition of this pivotal role played by the agricultural sector of the economy that this study becomes imperative. The main object of the study is to investigate the effect of Agricultural input on Agricultural productivity in Nigeria from 1990 to 2016 using secondary annual time series data sourced from World Bank database [1], and Central Bank of Nigeria Statistical Bulletin [13]. The methodology adopted for the study was first and foremost unit root test using Augmented Dickey-Fuller (ADF); a test for long-run relationship (Johansen cointegration), Granger causality test and then the Ordinary Least Squares (OLS) multiple regression method to determine the effect of the independent variables in the model on the dependent variable. Variables in the model were both stationary as well as exhibited long-run equilibrium relationship. Empirical findings revealed that agricultural productivity has positive influence on government expenditure in the sector but not the other way round. This finding is in line with the earlier OLS regression result of an inverse relationship between government expenditure and agricultural output. It further negates the formulated hypothesis in section one of this study that “there is no causality relationship between government expenditure on agriculture and agricultural output”. Since empirical findings supports hypotheses earlier formulated for this study, it is thus concluded that government spending in agricultural sector does not contribute to positive increases in output from the sector. Secondly, agricultural machinery has no significant effect on agricultural productivity in Nigeria and finally, agricultural credit has no significant impact on agricultural productivity in Nigeria between 1990 to 2016. This study thus aligns with the work of Ajie, Ojiya & Mamman [14], that successive administrations in Nigeria has not seen reason to come close to fulfilling internationally benchmarked budgetary recommendations for the agricultural sector since her independence. This is a disturbing trend. While sister African countries like Ivory Coast, Ghana and Ethiopia dedicates a larger percentage of their budget to the agricultural sub-sector, Nigeria with a spiraling population of over 180 million mouths to feed has displayed a carefree attitude towards recommendations from international agencies on the need to give priority to the sector in terms of funding. A country’s future in terms of food security is a function of government’s commitment to making its agriculture work, and working, very effectively and efficiently towards delivering expected dividends. The following is therefore recommended for policy implementation: (a) If the Nigeria government really want to attain the objective of self-sufficiency in food production, the government need to put in place policy and modalities that will encourage existing banks (both commercial and agricultural banks) to make credit facilities readily available to farmers with personnel assigned to monitor and ensure that such funds are judiciously used for the purpose which it is taken. (b) Furthermore, government must provide funds to acquire sophisticated farm tools (harvesters, tractors, herbicides, fertilizer etc) and as well build irrigation, dams, storage facilities and establish food processing industries across the country to enable farmers increase productivity, process and preserve their food stuff. (c) Finally, government spending on agricultural sector must of a necessity be increased. Similarly, the present lackluster and uninspiring attitude of government to management of appropriated funds must also change. Corrupt civil servants, contractors and bureaucrats who divert and misappropriate allocated funds for the growth of the sector must be punished to serve as deterrent to other intending treasury looters. The various financial crimes commissions such as EFCC and ICPC should be strengthened to do this. 1. World Bank (2016) World Development Indicators 2016. Washington, DC. © World Bank. Link: https://goo.gl/m4qjxq 2. Amire CM, Arigbede TO (2016) The Effect of Agricultural Productivity on Economic Growth in Nigeria. Journal of Advances in Social Sciences and Humanities 2. Link: https://goo.gl/sy3x88 3. Uniamikogbo SO, Enoma AI (2001) The Impact of monetary policy on manufacturing sector in Nigeria: an empirical analysis. The Nigerian Journal of Economic and Financial Review 3: 37-45. 4. Punch (2017) Punch Newspaper Limited, Lagos, Nigeria. Link: https://goo.gl/Y3EUWP 5. (2017) Vanguard Newspaper. Link: https://goo.gl/A5CRpN 6. Fulginiti LE, Richard KP (1998) Agricultural Productivity in Developing Countries, University of Nebraska Faculty Publications. Link: https://goo.gl/T19aAG 7. Olayide SO, EO Heady (1982) Introduction to Agricultural Production Economics. First Edition. Ibadan: Ibadan University Press. 8. Iwala OS (2013) The measurement of productive and technical efficiency of cassava farmers in the North-Central Zone of Nigeria. Research Journal of Agriculture and Environmental Management 2: 323-331. Link: https://goo.gl/HRtgtU 9. Nwagbo EC (2012) agricultural policy in Nigeria: challenges for the 21st Century Journal of Agriculture, Food, Environment and Extension 1. Link: https://goo.gl/7FMN5e 10. ARCN (2016) Publication of Agricultural Research Council of Nigeria, Abuja, Nigeria Link: https://goo.gl/mCUUKF 11. Ekwere GE (2016) The Effect of Agricultural Cooperatives on Cassava Production in Awka North L.G.A. of Anambra State, Nigeria Academia Journal of Agricultural Research 4: 616-624. Link: https://goo.gl/rjBfra 12. Cobb CW, Douglas PH (1928) "A Theory of Production" (PDF). American Economic Review. 18 (Supplement): 139–165. Retrieved 6 October 2017 Link: https://goo.gl/5T5FTG 13. Central Bank of Nigeria (2016) Statistical Bulletin, 2016 edition. Link: https://goo.gl/ZSWyQU 14. Ajie HA, Ojiya EA, Mamman AB (2017) The Effect of Household Income on Agricultural Productivity in Nigeria: An Econometric Analysis.  International Journal of Business and Applied Social Science 3. Link: https://goo.gl/abxF16
# Evaluate $$\int^1_0 x(1 - x)^n dx$$ This question was previously asked in NIMCET 2017 Official Paper View all NIMCET Papers > 1. $$\frac {-1}{(n + 1)(n + 2)}$$ 2. $$\frac {1}{(n + 1)(n + 2)}$$ 3. (n + 1)(n + 2) 4. (n - 1)(n - 2) Option 2 : $$\frac {1}{(n + 1)(n + 2)}$$ Free Group X 2021 Full Mock Test 80190 70 Questions 70 Marks 60 Mins ## Detailed Solution Concept: $$\rm \int_0^af(x)dx = \int_0^af(a-x)dx$$ Calculation: Let,I = $$\int^1_0 x(1 - x)^n dx$$ Using $$\rm \int_0^af(x)dx = \int_0^af(a-x)dx$$ $$\rm I= \int^1_0 (1-x)(1 - (1-x))^n dx\\ =\int^1_0 (1-x)x^ndx\\ =\int^1_0 x^n-x^{n+1}dx\\ =[\frac{x^{n+1}}{n+1}-\frac{x^{n+2}}{n+2}]_0^1\\ =\frac{1}{n+1}-\frac{1}{n+2}\\$$ =$$\rm \frac {1}{(n + 1)(n + 2)}$$ Hence, option (2) is correct.
# Logo in LaTeX document I don't see any (big) logo on the title page of document class. I'm using the example of report in TeXnicCenter. How can I include a logo on all pages? \documentclass[a4paper,twoside,10pt]{report} %% Deutsche Anpassungen %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \usepackage[ngerman]{babel} \usepackage[T1]{fontenc} \usepackage[ansinew]{inputenc} \usepackage{lmodern} %Type1-Schriftart für nicht-englische Texte \usepackage{graphicx} %%Zum Laden von Grafiken %% \usepackage{a4wide} %%Kleinere Seitenränder = mehr Text pro Zeile. \usepackage{fancyhdr} %%Fancy Kopf- und Fußzeilen \usepackage{longtable} %%Für Tabellen, die eine Seite überschreiten \includegraphics[width=4cm]{Logo.jpg} } \title{ABC} \author{Dipl.-Ing. ABC} \begin{document} \maketitle \pagestyle{plain} %%Ab hier die Kopf-/Fusszeilen: headings / fancy / ... \end{document} • You should use the pagestyle of fancyhdr and not plain: pagestyle{fancy}. – Ulrike Fischer Dec 20 '12 at 12:34 • Changed but nothing happend – user31177 Dec 20 '12 at 12:59 • You won't get a logo on the title page. Add some text after \pagestyle{fancy} and look at page 2. – Ian Thompson Dec 20 '12 at 13:08 • The default cover pages are cr*p, for a reason, because almost everyone's requirements are different, it would be futile. You need to build your own. – Nicholas Hamilton Dec 20 '12 at 13:17 • You naturally need also some text for a second page. On the title page the logo will not show as it uses \thispagestyle{empty}. But you can redefine the empty style, see Redefining plain style in fancyhdr documentation. Or use the titlepage environment to design your own title page. – Ulrike Fischer Dec 20 '12 at 13:17 The report class uses an \pagestyle{empty} for the title page. You need to redefine that page style \fancypagestyle{empty}{ } This gives a MWE of \documentclass{report} \usepackage[demo]{graphicx} \usepackage{fancyhdr} \fancypagestyle{empty}{ • TBH I don’t like this approach. I would prefer to define a new fancypagestyle, let’s say justlogo and then add \thispagestyle{justlogo} directly before \maketitle. So if one by any chance needs an empty page, he does not get a bad surprise when applying \thispagestyle{empty}. – Speravir Dec 20 '12 at 17:34
Landau gauge gluon and ghost propagators from two-flavor lattice QCD at T>0 # Landau gauge gluon and ghost propagators from two-flavor lattice QCD at T>0 ## Abstract In this contribution we extend our unquenched computation of the Landau gauge gluon and ghost propagators in lattice QCD at non-zero temperature. The study was aimed at providing input for investigations employing continuum functional methods. We show data which correspond to pion mass values between and and are obtained for a lattice size . The longitudinal and transversal components of the gluon propagator turn out to change smoothly through the crossover region, while the ghost propagator exhibits only a very weak temperature dependence. For a pion mass of around and the intermediate temperature value we compare our results with additional data obtained on a lattice with smaller Euclidean time extent and find a reasonable scaling behavior. \ShortTitle\FullConference The 31 International Symposium on Lattice Field Theory - Lattice 2013, July 29 - August 3, 2013 Mainz, Germany ## 1 Introduction Over the last 15 years Dyson-Schwinger (DS) equations and functional renormalization group (FRG) equations turned into powerful schemes to address various non-perturbative problems in QCD. Within this framework (for reviews see e.g. [1, 2]) the Landau gauge gluon and ghost propagators appear – together with the corresponding vertices – as the main building blocks. In order to solve the (infinite) tower of corresponding equations an appropriate truncation has to be applied. Then independent information, preferably from first principles, is welcome to improve the resulting approximations or to be used as an input to the system of equations. Lattice QCD calculations allow to provide e.g. the Landau gauge gluon and ghost propagators in an ab-initio way. The available momentum range, however, is restricted from above by the lattice spacing and from below by the available lattice volume up to a further uncertainty related to so-called Gribov copies (see e.g. [3] and references therein). In recent years the DS / FRG framework has been applied also to explore the non-zero temperature regime of QCD and even the non-zero chemical potential case (see [4] and references therein). Correspondingly we have started a lattice computation of gluon and ghost propagators at non-zero temperature, first in pure gauge theory [5] and more recently for the full QCD case with two light flavor degrees of freedom [6]. Here we report on the latter case. For that we could rely on investigations of the QCD thermodynamics employing the Wilson-twisted mass discretization at maximal twist [7, 8]. For three pion mass values smooth crossover regimes were found, where the signals for the transition taken from the (renormalized) Polyakov loop and from the chiral condensate (susceptibility) occured at different temperature values and , respectively. Throughout those crossover regions we have obtained the momentum dependence of the transverse und longitudinal components of the Landau gauge gluon propagator as well as of the corresponding ghost propagator. Additionally to the results published in [6] we add a first scaling test in order to check, in as far we are close to the continuum limit in the momentum range considered. ## 2 Observables Our first quantity of interest is the gluon propagator in momentum space Dabμν(q)=⟨˜Aaμ(k)˜Abν(−k)⟩, (1) where represents the path integral average estimated by averaging over gauge-fixed (Hybrid) Monte Carlo generated gauge field configurations. denotes the Fourier transform of the gauge potential. is the lattice momentum () related to the physical momentum via . We use the notation where . The gauge is fixed with the help of a simulated annealing prescription to extremize the Landau gauge functional always followed by overrelaxation steps until a prescribed numerical precision for the local gauge condition is reached. For a discussion about the efficiency of the simulated annealing procedure in Landau gauge fixing see [9]. For non-zero temperature the Euclidean invariance is broken. Therefore, it is useful to split into two components, the transversal (“chromomagnetic”) and the longitudinal (“chromoelectric”) propagator, respectively. For [or their respective dimensionless dressing functions ] one finds (see also [5]) DT(q)=12Ng⟨3∑i=1˜Aai(k)˜Aai(−k)−q24→q2˜Aa4(k)˜Aa4(−k)⟩ (2) and (3) where and . The zero-momentum gluon propagator values can be defined as DT(0) = 13Ng3∑i=1⟨˜Aai(0)˜Aai(0)⟩, (4) DL(0) = 1Ng⟨˜Aa4(0)˜Aa4(0)⟩. (5) The Landau gauge ghost propagator is given by Gab(q) = a2∑x,y⟨e−2πi(k/N)⋅(x−y)[M−1]abxy⟩ (6) = δab G(q)=δab J(q)/q2, where . denotes the ghost dressing function. The matrix is the lattice Faddeev-Popov operator, for more details see [5]. For the inversion of we use the pre-conditioned conjugate gradient algorithm of [10] with plane-wave sources with color and position components . In order to reduce lattice artifacts we restrict ourselves to diagonal and slightly off-diagonal momenta for the gluon propagator and diagonal momenta for the ghost propagator. Moreover, only modes with zero Matsubara frequency () are considered. Assuming that the influence of lattice artifacts can be neglected the renormalized dressing functions, defined in momentum subtraction (MOM) schemes, can be obtained via multiplicative renormalization ZrenT,L(q,μ) ≡ ~ZT,L(μ)ZT,L(q), Jren(q,μ) ≡ ~ZJ(μ)J(q) (7) with the -factors being defined such that . Our renormalization scale throughout this paper is (see also Ref. [6]). ## 3 Results Our estimates for and rely on gauge field ensembles generated on a lattice of size and and for parameters which are collected in detail in [6]. In Fig. 1 we show ratios of the renormalized dressing functions or propagators RT,L(q,T) = DrenT,L(q,T)/DrenT,L(q,Tmin), (8) RG(q,T) = Gren(q,T)/Gren(q,Tmin) (9) as functions of the temperature for 6 fixed (interpolated) momentum values , and for the three different pion masses (panels from top to bottom). For better visibility, ratios are normalized with respect to the respective left-most shown temperature in Fig. 1. We see to decrease more or less monotonously with the temperature through the crossover region, and this decrease is stronger the smaller the momentum is. This behavior is similar but much less pronounced than what we saw in the close neighborhood of the phase transition for the quenched case [5], where a first-order phase transition takes place. instead signals a slight increase within the same range, and the ghost propagator (at fixed low momenta) seems to rise near . The panels of Fig. 2, show data for the inverse renormalized longitudinal propagator at zero momentum, again versus temperature and separately for different pion masses. Assuming a linear -behavior as at low , this quantity can be related to a gluon screening mass . Since rises with temperature in the crossover region it may also serve as a useful indicator for the finite-temperature crossover of the quark-gluon system. However, such zero-momentum results are always influenced by strong finite-size and Gribov copy effects, which we have not analyzed here. Finally in Fig. 3 we show a scaling test achieved with gauge field ensembles produced additionally at smaller time-like lattice extent but at approximately the same values of the charged pion mass ( MeV) and temperature MeV inside the crossover region. We see that the results for the two largest values nicely agree within the achieved statistical errors telling us that the results seem already to be close to the continuum limit. For the latter results, in Ref. [6] we have provided fit formulae working reasonably well in the momentum range and hopefully being useful as input for the continuum DS or FRG framework. We thank the HLRN supercomputing centers Berlin/Hannover for providing us with the necessary computing resources. F.B. and M.M.P. acknowledge support from DFG with an SFB/TR9 grant and R.A. from the Yousef Jameel Foundation at Humboldt-University Berlin. A.S. acknowledges support by the European Reintegration Grant (FP7-PEOPLE-2009-RG, No.256594). ### References 1. C. S. Fischer, A. Maas, and J. M. Pawlowski, “On the infrared behavior of Landau gauge Yang-Mills theory,” Annals Phys. 324 (2009) 2408, arXiv:0810.1987 [hep-ph]. 2. P. Boucaud, J. Leroy, A. L. Yaouanc, J. Micheli, O. Pene, et al., “The infrared behaviour of the pure Yang-Mills Green functions,” Few Body Syst. 53 (2012) 387, arXiv:1109.1936 [hep-ph]. 3. A. Sternbeck and M. Müller-Preussker, “Lattice evidence for the family of decoupling solutions of Landau gauge Yang-Mills theory,” arXiv:1211.3057 [hep-lat]. 4. C. S. Fischer and J. Lücker, “Propagators and phase structure of Nf=2 and Nf=2+1 QCD,” arXiv:1206.5191 [hep-ph]. 5. R. Aouane, V. Bornyakov, E. Ilgenfritz, V. Mitrjushkin, M. Müller-Preussker, and A. Sternbeck, “Landau gauge gluon and ghost propagators at finite temperature from quenched lattice QCD,” Phys.Rev. D85 (2012) 034501, arXiv:1108.1735 [hep-lat]. 6. R. Aouane, F. Burger, E.-M. Ilgenfritz, M. Müller-Preussker, and A. Sternbeck, “Landau gauge gluon and ghost propagators from lattice QCD with Nf=2 twisted mass fermions at finite temperature,” Phys.Rev. D87 (2013) 114502, arXiv:1212.1102 [hep-lat]. 7. tmfT Collaboration, F. Burger, E.-M. Ilgenfritz, M. Kirchner, M. Lombardo, M. Müller-Preussker, O. Philipsen, C. Urbach, and L. Zeidlewicz, “The thermal QCD transition with two flavours of twisted mass fermions,” Phys.Rev. D87 (2013) 074508, arXiv:1102.4530 [hep-lat]. 8. tmfT Collaboration, F. Burger, M. Kirchner, M. Müller-Preussker, E.-M. Ilgenfritz, M. P. Lombardo, et al., “Pseudo-Critical Temperature and Thermal Equation of State from Twisted Mass Lattice QCD,” PoS LATTICE2012 (2012) 068, arXiv:1212.0982 [hep-lat]. 9. I. L. Bogolubsky, V. G. Bornyakov, G. Burgio, E.-M. Ilgenfritz, V. K. Mitrjushkin, M. Müller-Preussker, and P. Schemel, “The Landau gauge gluon propagator: Gribov problem and finite-size effects,” PoS LAT2007 (2007) 318, arXiv:0710.3234 [hep-lat]. 10. A. Sternbeck, E.-M. Ilgenfritz, M. Müller-Preussker, and A. Schiller, “Towards the infrared limit in SU(3) Landau gauge lattice gluodynamics,” Phys. Rev. D72 (2005) 014507, hep-lat/0506007. You are adding the first comment! How to quickly get a good reply: • Give credit where it’s due by listing out the positive aspects of a paper before getting into which changes should be made. • Be specific in your critique, and provide supporting evidence with appropriate references to substantiate general statements. • Your comment should inspire ideas to flow and help the author improves the paper. The better we are at sharing our knowledge with each other, the faster we move forward. The feedback must be of minimum 40 characters and the title a minimum of 5 characters
# What is the formal charge on the sulfur atom in sulfur trioxide SO_3? Sep 16, 2016 Good question. In most treatments the formal charge is $+ 2$. #### Explanation: Sulfur assumes a $+ V I$ oxidation state in the acid anhydride sulfur trioxide, and of course has the same oxidation state in sulfuric acid. $\left(O =\right) {S}^{2 +} {\left(- {O}^{-}\right)}_{2}$ Most chemists would settle for the given representation. The molecule is of course trigonal planar with ${D}_{3 h}$ symmetry.
# Inductive type explained In type theory, a system has inductive types if it has facilities for creating a new type from constants and functions that create terms of that type. The feature serves a role similar to data structures in a programming language and allows a type theory to add concepts like numbers, relations, and trees. As the name suggests, inductive types can be self-referential, but usually only in a way that permits structural recursion. The standard example is encoding the natural numbers using Peano's encoding. Inductive nat : Type := | 0 : nat | S : nat -> nat.Here, a natural number is created either from the constant "0" or by applying the function "S" to another natural number. "S" is the successor function which represents adding 1 to a number. Thus, "0" is zero, "S 0" is one, "S (S 0)" is two, "S (S (S 0))" is three, and so on. Since their introduction, inductive types have been extended to encode more and more structures, while still being predicative and supporting structural recursion. ## Elimination Inductive types usually come with a function to prove properties about them. Thus, "nat" may come with: nat_elim : (forall P : nat -> Prop, (P 0) -> (forall n, P n -> P (S n)) -> (forall n, P n)).This is the expected function for structural recursion for the type "nat". ## Implementations ### W- and M-types W-types are well-founded types in intuitionistic type theory (ITT).[1] They generalize natural numbers, lists, binary trees, and other "tree-shaped" data types. Let be a universe of types. Given a type : and a dependent family : →, one can form a W-type Wa:AB(a) . The type may be thought of as "labels" for the (potentially infinitely many) constructors of the inductive type being defined, whereas indicates the (potentially infinite) arity of each constructor. W-types (resp. M-types) may also be understood as well-founded (resp. non-well-founded) trees with nodes labeled by elements : and where the node labeled by has -many subtrees.[2] Each W-type is isomorphic to the initial algebra of a so-called polynomial functor. Let 0, 1, 2, etc. be finite types with inhabitants 11 : 1, 12, 22:2, etc. One may define the natural numbers as the W-type$\mathbb:= \mathsf_ f(x)$with : 2 → is defined by (12) = 0 (representing the constructor for zero, which takes no arguments), and (22) = 1 (representing the successor function, which takes one argument). One may define lists over a type : as \operatorname{List}(A):=W(x:1+A)f(x) where$\begin f(\operatorname(1_)) &= \mathbf \\ f(\operatorname(a)) &= \mathbf\end$and 11 is the sole inhabitant of 1. The value of f(\operatorname{inl}(11)) corresponds to the constructor for the empty list, whereas the value of f(\operatorname{inr}(a)) corresponds to the constructor that appends to the beginning of another list. The constructor for elements of a generic W-type Wx:AB(x) has type$\mathsf:\prod_\Big(B(a)\to\mathsf_B(x)\Big)\to \mathsf_B(x).$We can also write this rule in the style of a natural deduction proof,$\frac.$ The elimination rule for W-types works similarly to structural induction on trees. If, whenever a property (under the propositions-as-types interpretation) C:Wx:AB(x)\toU holds for all subtrees of a given tree it also holds for that tree, then it holds for all trees. $\frac$ In extensional type theories, W-types (resp. M-types) can be defined up to isomorphism as initial algebras (resp. final coalgebras) for polynomial functors. In this case, the property of initiality (res. finality) corresponds directly to the appropriate induction principle.[3] In intensional type theories with the univalence axiom, this correspondence holds up to homotopy (propositional equality).[4] [5] [6] M-types are dual to W-types, they represent coinductive (potentially infinite) data such as streams.[7] M-types can be derived from W-types.[8] ### Mutually inductive definitions This technique allows some definitions of multiple types that depend on each other. For example, defining two parity predicates on natural numbers using two mutually inductive types in Coq: Inductive even : nat -> Prop := | zero_is_even : even O | S_of_odd_is_even : (forall n:nat, odd n -> even (S n))with odd : nat -> Prop := | S_of_even_is_odd : (forall n:nat, even n -> odd (S n)). ### Induction-recursion Induction-recursion started as a study into the limits of ITT. Once found, the limits were turned into rules that allowed defining new inductive types. These types could depend upon a function and the function on the type, as long as both were defined simultaneously. Universe types can be defined using induction-recursion. ### Induction-induction Induction-induction allows definition of a type and a family of types at the same time. So, a type and a family of types B:A\toType . ### Higher inductive types This is a current research area in Homotopy Type Theory (HoTT). HoTT differs from ITT by its identity type (equality). Higher inductive types not only define a new type with constants and functions that create elements of the type, but also new instances of the identity type that relate them. A simple example is the type, which is defined with two constructors, a basepoint; and a loop; The existence of a new constructor for the identity type makes a higher inductive type. • Coinduction permits (effectively) infinite structures in type theory.
# Math Help - Inequality Proof 1. ## Inequality Proof x>0 and x^2<2. Prove that there is a real y>x such that y^2<2. 2. Take $y$ such that $x
# Diagonalizing quadratic Hamiltonian in second quantization I have a Hamiltonian of the form $$H = \Sigma_{ij} H_{ij}a^\dagger_ia_j$$, and I want to diagonlize it: Let $$H_{ij} = \Sigma_{\alpha}U_{i\alpha}\epsilon_\alpha U^*_{j\alpha}$$, where U is a unitary matrix. Then I proceed by inserting this in the first equation: $$H = \Sigma_{ij\alpha}U_{i\alpha}\epsilon_\alpha U^*_{j\alpha}a^\dagger_ia_j = \Sigma_\alpha \epsilon_\alpha \Big(\Sigma_i U_{i\alpha}a^\dagger_i\Big)\Big(\Sigma_jU^\dagger_{j\alpha}a_j\Big)$$ Defining $$b^\dagger_\alpha = \Sigma_i U_{i\alpha}a^\dagger_i$$ my Hamiltonian can be writen as: $$H = \Sigma_\alpha \epsilon_\alpha b^\dagger_\alpha b_\alpha$$ which is diagonal. My first question is: why is this a diagonal hamiltonian? How can I be so sure? The second question is: how to effectvely use this diagonalization procedure? I have now a Hamiltonian of the form: $$H = \epsilon_\alpha a^\dagger a + \epsilon_b b^\dagger b - J(a^\dagger b + b^\dagger a)$$ where a and b are two modes, that can be either bosonic or fermionic. To diagonalize this I have to use the procedure described only in the part that is multiplied by -J? Basically what we mean is that we can write our Hilbert space as a product of $$n$$ smaller spaces such that our Hamiltonian has the form of $$\hat H = \hat h_1 \otimes I \otimes \dots \otimes I ~+~ I \otimes h_2 \otimes \dots \otimes I ~+~ \dots ~+~ I \otimes I \otimes \dots \otimes \hat h_n,$$ where $$I$$ is the identity operator. In your case, to “be sure” you will want to confirm that your $$b_i$$ are commuting or anticommuting annihilators, so that they satisfy either $$b_m b_n^\dagger \mp b_n^\dagger b_m = \delta_{mn}$$with the $$-$$ sign for the bosonic case and the $$+$$ sign for the fermionic case. If you have this, then you have a Fock space in the form of the occupation numbers for the states that the $$b_n$$ annihilate, and your Hamiltonian is diagonal with regard to that Fock space. (2) Yes, you essentially want to imagine that you have a matrix looking something like $$\begin{bmatrix}\epsilon_a & -J\\-J & \epsilon_b\end{bmatrix}.$$
# How do you Identify the point (x,y) on the unit circle that corresponds to t=-3.14/2? Feb 23, 2018 (x,y) coordinates of t=-π/2 is $\left(0 , - 1\right)$ #### Explanation: The unit circle is used for both degree measure and radian measure. In this case, t=-π/2 is a radian measure. Before we get to defining points on the unit circle in terms of radian measure, let's review the (x, y) coordinates of $\sin$ and $\cos$. At 0º, we know that $\cos$ is $1$ and $\sin$ is $0$ $\left(1 , 0\right)$ At 90º, $\cos$ is $0$ and $\sin$ is $1$ $\left(0 , 1\right)$ At 180º, $\cos$ is $- 1$ and $\sin$ is $0$ $\left(- 1 , 0\right)$ At 270º, $\cos$ is $0$ and $\sin$ is $- 1$ $\left(0 , - 1\right)$ Now that we've reviewed those, we can start defining points on the unit circle. The difference between radians and degrees is that radians deal with the DISTANCE around the circle, while degrees deal with the MEASURE of the circle as it continues on. We know that the circumference a circle is: C=2πr Since the unit circle has a radius of only one, a full revolution is 2π. Now all we have to do is use that to find t=-π/2. We know that we if we divide 2π by $- 4$, we get our -π/2. Also, we know that there are 360º in a circle. Since we divided the 2π by $- 4$, we also divide 360º by $- 4$, since 2π and 360º are corresponding values. When we solve that we get: t=-90º -90º is equal to 270º and knowing that, we know that the (x,y) coordinate of t=-π/2 is $\left(0 , - 1\right)$.
# CS261 Lecture 6: Duality in Linear Programming In which we introduce the theory of duality in linear programming. 1. The Dual of Linear Program Suppose that we have the following linear program in maximization standard form: $\displaystyle \begin{array}{ll} {\rm maximize} & x_1 + 2x_2 + x_3 + x_4\\ {\rm subject\ to}\\ & x_1 +2 x_2 + x_3 \leq 2\\ & x_2 + x_4\leq 1\\ & x_1 + 2x_3\leq 1\\ & x_1 \geq 0\\ & x_2 \geq 0\\ &x_3 \geq 0 \end{array} \ \ \ \ \ (1)$ and that an LP-solver has found for us the solution ${x_1:=1}$, ${x_2:=\frac 12}$, ${x_3:=0}$, ${x_4:= \frac 12}$ of cost ${2.5}$. How can we convince ourselves, or another user, that the solution is indeed optimal, without having to trace the steps of the computation of the algorithm? Observe that if we have two valid inequalities $\displaystyle a\leq b \ {\rm and } \ c \leq d$ then we can deduce that the inequality $\displaystyle a+c \leq b+d$ (derived by “summing the left hand sides and the right hand sides” of our original inequalities) is also true. In fact, we can also scale the inequalities by a positive multiplicative factor before adding them up, so for every non-negative values ${y_1,y_2 \geq 0}$ we also have $\displaystyle y_1 a + y_2 c \leq y_1 b + y_2 d$ Going back to our linear program (1), we see that if we scale the first inequality by ${\frac 12}$, add the second inequality, and then add the third inequality scaled by ${\frac 12}$, we get that, for every ${(x_1,x_2,x_3,x_4)}$ that is feasible for (1), $\displaystyle x_1 + 2x_2 + 1.5 x_3 + x_4 \leq 2.5$ And so, for every feasible ${(x_1,x_2,x_3,x_4)}$, its cost is $\displaystyle x_1 + 2x_2 + x_3 + x_4 \leq x_1 + 2x_2 + 1.5 x_3 + x_4 \leq 2.5$ meaning that a solution of cost ${2.5}$ is indeed optimal. In general, how do we find a good choice of scaling factors for the inequalities, and what kind of upper bounds can we prove to the optimum? Suppose that we have a maximization linear program in standard form. $\displaystyle \begin{array}{ll} {\rm maximize} & c_1 x_1 + \ldots c_n x_n \\ {\rm subject\ to}\\ & a_{1,1} x_1 + \ldots + a_{1,n} x_n \leq b_1\\ & \vdots\\ & a_{m,1} x_1 + \ldots + a_{m,n} x_n \leq b_m\\ & x_1 \geq 0\\ & \vdots\\ & x_n \geq 0 \end{array} \ \ \ \ \ (2)$ For every choice of non-negative scaling factors ${y_1,\ldots,y_m}$, we can derive the inequality $\displaystyle y_1 \cdot ( a_{1,1} x_1 + \ldots + a_{1,n} x_n )$ $\displaystyle + \cdots$ $\displaystyle + y_n \cdot ( a_{m,1} x_1 + \ldots + a_{m,n} x_n )$ $\displaystyle \leq y_1 b_1 + \cdots y_m b_m$ which is true for every feasible solution ${(x_1,\ldots,x_n)}$ to the linear program (2). We can rewrite the inequality as $\displaystyle ( a_{1,1} y_1 + \cdots a_{m,1} y_m )\cdot x_1$ $\displaystyle + \cdots$ $\displaystyle + (a_{1,n}y_1 \cdots a_{m,n} y_m ) \cdot x_n$ $\displaystyle \leq y_1 b_1 + \cdots y_m b_m$ So we get that a certain linear function of the ${x_i}$ is always at most a certain value, for every feasible ${(x_1,\ldots,x_n)}$. The trick is now to choose the ${y_i}$ so that the linear function of the ${x_i}$ for which we get an upper bound is, in turn, an upper bound to the cost function of ${(x_1,\ldots,x_n)}$. We can achieve this if we choose the ${y_i}$ such that $\displaystyle \begin{array}{l} c_1 \leq a_{1,1} y_1 + \cdots a_{m,1} y_m\\ \vdots\\ c_n \leq a_{1,n}y_1 \cdots a_{m,n} y_m \end{array} \ \ \ \ \ (3)$ Now we see that for every non-negative ${(y_1,\ldots,y_m)}$ that satisfies (3), and for every ${(x_1,\ldots,x_n)}$ that is feasible for (2), $\displaystyle c_1 x_1 + \ldots c_n x_n$ $\displaystyle \leq ( a_{1,1} y_1 + \cdots a_{m,1} y_m )\cdot x_1$ $\displaystyle + \cdots$ $\displaystyle + (a_{1,n}y_1 \cdots a_{m,n} y_m ) \cdot x_n$ $\displaystyle \leq y_1 b_1 + \cdots y_m b_m$ Clearly, we want to find the non-negative values ${y_1,\ldots,y_m}$ such that the above upper bound is as strong as possible, that is we want to $\displaystyle \begin{array}{ll} {\rm minimize} & b_1 y_1 + \cdots b_m y_m \\ {\rm subject\ to}\\ & a_{1,1} y_1 + \ldots + a_{m,1} y_m \geq c_1\\ & \vdots\\ & a_{n,1} y_1 + \ldots + a_{m,n} y_m \geq c_n\\ & y_1 \geq 0\\ & \vdots\\ & y_m \geq 0 \end{array} \ \ \ \ \ (4)$ So we find out that if we want to find the scaling factors that give us the best possible upper bound to the optimum of a linear program in standard maximization form, we end up with a new linear program, in standard minimization form. Definition 1 If $\displaystyle \begin{array}{ll} {\rm maximize} & \mbox{} {\bf c}^T {\bf x}\\ {\rm subject\ to}\\ & A{\bf x} \leq {\bf b} \\ & \mbox{} {\bf x} \geq {\bf {0}} \end{array} \ \ \ \ \ (5)$ is a linear program in maximization standard form, then its dual is the minimization linear program $\displaystyle \begin{array}{ll} {\rm minimize} & \mbox{} {\bf b}^T {\bf y}\\ {\rm subject\ to}\\ & A^T{\bf y} \geq {\bf c} \\ & \mbox{} {\bf y} \geq {\bf {0}} \end{array} \ \ \ \ \ (6)$ So if we have a linear program in maximization linear form, which we are going to call the primal linear program, its dual is formed by having one variable for each constraint of the primal (not counting the non-negativity constraints of the primal variables), and having one constraint for each variable of the primal (plus the non-negative constraints of the dual variables); we change maximization to minimization, we switch the roles of the coefficients of the objective function and of the right-hand sides of the inequalities, and we take the transpose of the matrix of coefficients of the left-hand side of the inequalities. The optimum of the dual is now an upper bound to the optimum of the primal. How do we do the same thing but starting from a minimization linear program? We can rewrite $\displaystyle \begin{array}{ll} {\rm minimize} & \mbox{} {\bf c}^T {\bf y}\\ {\rm subject\ to}\\ & A{\bf y} \geq {\bf b} \\ & \mbox{} {\bf y} \geq {\bf {0}} \end{array}$ in an equivalent way as $\displaystyle \begin{array}{ll} {\rm maximize} & \mbox{} - {\bf c}^T {\bf y}\\ {\rm subject\ to}\\ & - A{\bf y} \leq - {\bf b} \\ & \mbox{} {\bf y} \geq {\bf {0}} \end{array}$ If we compute the dual of the above program we get $\displaystyle \begin{array}{ll} {\rm minimize} & \mbox{} - {\bf b}^T {\bf z}\\ {\rm subject\ to}\\ & - A^T{\bf z} \geq - {\bf c} \\ & \mbox{} {\bf z} \geq {\bf {0}} \end{array}$ that is, $\displaystyle \begin{array}{ll} {\rm maximize} & \mbox{} {\bf b}^T {\bf z}\\ {\rm subject\ to}\\ & A^T{\bf z} \leq {\bf c} \\ & \mbox{} {\bf y} \geq {\bf {0}} \end{array}$ So we can form the dual of a linear program in minimization normal form in the same way in which we formed the dual in the maximization case: • switch the type of optimization, • introduce as many dual variables as the number of primal constraints (not counting the non-negativity constraints), • define as many dual constraints (not counting the non-negativity constraints) as the number of primal variables. • take the transpose of the matrix of coefficients of the left-hand side of the inequality, • switch the roles of the vector of coefficients in the objective function and the vector of right-hand sides in the inequalities. Note that: Fact 2 The dual of the dual of a linear program is the linear program itself. We have already proved the following: Fact 3 If the primal (in maximization standard form) and the dual (in minimization standard form) are both feasible, then $\displaystyle opt({\rm primal}) \leq opt({\rm dual})$ Which we can generalize a little Theorem 4 (Weak Duality Theorem) If ${LP_1}$ is a linear program in maximization standard form, ${LP_2}$ is a linear program in minimization standard form, and ${LP_1}$ and ${LP_2}$ are duals of each other then: • If ${LP_1}$ is unbounded, then ${LP_2}$ is infeasible; • If ${LP_2}$ is unbounded, then ${LP_1}$ is infeasible; • If ${LP_1}$ and ${LP_2}$ are both feasible and bounded, then $\displaystyle opt(LP_1) \leq opt(LP_2)$ Proof: We have proved the third statement already. Now observe that the third statement is also saying that if ${LP_1}$ and ${LP_2}$ are both feasible, then they have to both be bounded, because every feasible solution to ${LP_2}$ gives a finite upper bound to the optimum of ${LP_1}$ (which then cannot be ${+\infty}$) and every feasible solution to ${LP_1}$ gives a finite lower bound to the optimum of ${LP_2}$ (which then cannot be ${-\infty}$). $\Box$ What is surprising is that, for bounded and feasible linear programs, there is always a dual solution that certifies the exact value of the optimum. Theorem 5 (Strong Duality) If either ${LP_1}$ or ${LP_2}$ is feasible and bounded, then so is the other, and $\displaystyle opt(LP_1) = opt(LP_2)$ To summarize, the following cases can arise: • If one of ${LP_1}$ or ${LP_2}$ is feasible and bounded, then so is the other; • If one of ${LP_1}$ or ${LP_2}$ is unbounded, then the other is infeasible; • If one of ${LP_1}$ or ${LP_2}$ is infeasible, then the other cannot be feasible and bounded, that is, the other is going to be either infeasible or unbounded. Either case can happen. We will return to the Strong Duality Theorem, and discuss its proof, later in the course. ## 14 thoughts on “CS261 Lecture 6: Duality in Linear Programming” 1. Seriously… You’ve summarized the concept painstakingly and a big thanks for it because I am referring to these notes for my exam… But just a thought… Instead of doing a lot of manual calculation, can’t we feed this problem to a computer and let it churn out the result?! Why should we strain our brain with these manual calculations when computer can immediately give us the result with steps… 2. Please expond a little more ou duality especially using examples to find the duals of given primals. 3. Excellent!! Pretty much clarifying and rigorous!! I’m looking for the promised strong theorem’s proof, though. I wonder if you could refer to a good exposition of the (weak and strong) theorems of complementarity in LP. Thandks a lot. 4. awesome tutorials ,,, thanks thanks and thanks 🙂 🙂 5. The nice thing is that instead of Introducing duality just by definition, he guides the thought of the student gradually towards the duality. @subramanian: there is a saying that with computer ‘garbage in garbage out’ . Now you have to know the process in order to be able to control the validity of some tones of printouts as is the norm for a medium size LP real life problem. Regards George Kakarelidis Lecturer LP & Statistics T.E.I. of West Greece 6. Great article! Just one little thing, I think there’s a type-o in the equation right after: “For every choice of non-negative scaling factors {y_1,\ldots,y_m}, we can derive the inequality” The last y multiplying (a_m …) should be y_m instead of y_n, correct me if I’m wrong I might be missing something! 7. Thanks for u are presentation in some way but add more notes to encouragement his/her lecture 8. This is the clearest explanation of LP duality I could find. Awesome work and thank you so much! 9. Thanks,,,for clarification of a relatively concept theorem…for beginner like me. 10. The first six sentences of this blog taught me more about duality theory than an entire course and three textbooks! Thank you very much! 11. Seriously, Thank you. Brilliant write up. I learned a lot from this post. Hope you keep writing about different topics.
## 26.2 Locally ringed spaces Recall that we defined ringed spaces in Sheaves, Section 6.25. Briefly, a ringed space is a pair $(X, \mathcal{O}_ X)$ consisting of a topological space $X$ and a sheaf of rings $\mathcal{O}_ X$. A morphism of ringed spaces $f : (X, \mathcal{O}_ X) \to (Y, \mathcal{O}_ Y)$ is given by a continuous map $f : X \to Y$ and an $f$-map of sheaves of rings $f^\sharp : \mathcal{O}_ Y \to \mathcal{O}_ X$. You can think of $f^\sharp$ as a map $\mathcal{O}_ Y \to f_*\mathcal{O}_ X$, see Sheaves, Definition 6.21.7 and Lemma 6.21.8. A good geometric example of this to keep in mind is $\mathcal{C}^\infty$-manifolds and morphisms of $\mathcal{C}^\infty$-manifolds. Namely, if $M$ is a $\mathcal{C}^\infty$-manifold, then the sheaf $\mathcal{C}^\infty _ M$ of smooth functions is a sheaf of rings on $M$. And any map $f : M \to N$ of manifolds is smooth if and only if for every local section $h$ of $\mathcal{C}^\infty _ N$ the composition $h \circ f$ is a local section of $\mathcal{C}^\infty _ M$. Thus a smooth map $f$ gives rise in a natural way to a morphism of ringed spaces $f : (M , \mathcal{C}^\infty _ M) \longrightarrow (N, \mathcal{C}^\infty _ N)$ see Sheaves, Example 6.25.2. It is instructive to consider what happens to stalks. Namely, let $m \in M$ with image $f(m) = n \in N$. Recall that the stalk $\mathcal{C}^\infty _{M, m}$ is the ring of germs of smooth functions at $m$, see Sheaves, Example 6.11.4. The algebra of germs of functions on $(M, m)$ is a local ring with maximal ideal the functions which vanish at $m$. Similarly for $\mathcal{C}^\infty _{N, n}$. The map on stalks $f^\sharp : \mathcal{C}^\infty _{N, n} \to \mathcal{C}^\infty _{M, m}$ maps the maximal ideal into the maximal ideal, simply because $f(m) = n$. In algebraic geometry we study schemes. On a scheme the sheaf of rings is not determined by an intrinsic property of the space. The spectrum of a ring $R$ (see Algebra, Section 10.17) endowed with a sheaf of rings constructed out of $R$ (see below), will be our basic building block. It will turn out that the stalks of $\mathcal{O}$ on $\mathop{\mathrm{Spec}}(R)$ are the local rings of $R$ at its primes. There are two reasons to introduce locally ringed spaces in this setting: (1) There is in general no mechanism that assigns to a continuous map of spectra a map of the corresponding rings. This is why we add as an extra datum the map $f^\sharp$. (2) If we consider morphisms of these spectra in the category of ringed spaces, then the maps on stalks may not be local homomorphisms. Since our geometric intuition says it should we introduce locally ringed spaces as follows. Definition 26.2.1. Locally ringed spaces. 1. A locally ringed space $(X, \mathcal{O}_ X)$ is a pair consisting of a topological space $X$ and a sheaf of rings $\mathcal{O}_ X$ all of whose stalks are local rings. 2. Given a locally ringed space $(X, \mathcal{O}_ X)$ we say that $\mathcal{O}_{X, x}$ is the local ring of $X$ at $x$. We denote $\mathfrak {m}_{X, x}$ or simply $\mathfrak {m}_ x$ the maximal ideal of $\mathcal{O}_{X, x}$. Moreover, the residue field of $X$ at $x$ is the residue field $\kappa (x) = \mathcal{O}_{X, x}/\mathfrak {m}_ x$. 3. A morphism of locally ringed spaces $(f, f^\sharp ) : (X, \mathcal{O}_ X) \to (Y, \mathcal{O}_ Y)$ is a morphism of ringed spaces such that for all $x \in X$ the induced ring map $\mathcal{O}_{Y, f(x)} \to \mathcal{O}_{X, x}$ is a local ring map. We will usually suppress the sheaf of rings $\mathcal{O}_ X$ in the notation when discussing locally ringed spaces. We will simply refer to “the locally ringed space $X$”. We will by abuse of notation think of $X$ also as the underlying topological space. Finally we will denote the corresponding sheaf of rings $\mathcal{O}_ X$ as the structure sheaf of $X$. In addition, it is customary to denote the maximal ideal of the local ring $\mathcal{O}_{X, x}$ by $\mathfrak {m}_{X, x}$ or simply $\mathfrak {m}_ x$. We will say “let $f : X \to Y$ be a morphism of locally ringed spaces” thereby suppressing the structure sheaves even further. In this case, we will by abuse of notation think of $f : X\to Y$ also as the underlying continuous map of topological spaces. The $f$-map corresponding to $f$ will customarily be denoted $f^\sharp$. The condition that $f$ is a morphism of locally ringed spaces can then be expressed by saying that for every $x\in X$ the map on stalks $f^\sharp _ x : \mathcal{O}_{Y, f(x)} \longrightarrow \mathcal{O}_{X, x}$ maps the maximal ideal $\mathfrak m_{Y, f(x)}$ into $\mathfrak m_{X, x}$. Let us use these notational conventions to show that the collection of locally ringed spaces and morphisms of locally ringed spaces forms a category. In order to see this we have to show that the composition of morphisms of locally ringed spaces is a morphism of locally ringed spaces. OK, so let $f : X \to Y$ and $g : Y \to Z$ be morphism of locally ringed spaces. The composition of $f$ and $g$ is defined in Sheaves, Definition 6.25.3. Let $x \in X$. By Sheaves, Lemma 6.21.10 the composition $\mathcal{O}_{Z, g(f(x))} \xrightarrow {g^\sharp } \mathcal{O}_{Y, f(x)} \xrightarrow {f^\sharp } \mathcal{O}_{X, x}$ is the associated map on stalks for the morphism $g \circ f$. The result follows since a composition of local ring homomorphisms is a local ring homomorphism. A pleasing feature of the definition is the fact that the functor $\textit{Locally ringed spaces} \longrightarrow \textit{Ringed spaces}$ reflects isomorphisms (plus more). Here is a less abstract statement. Lemma 26.2.2. Let $X$, $Y$ be locally ringed spaces. If $f : X \to Y$ is an isomorphism of ringed spaces, then $f$ is an isomorphism of locally ringed spaces. Proof. This follows trivially from the corresponding fact in algebra: Suppose $A$, $B$ are local rings. Any isomorphism of rings $A \to B$ is a local ring homomorphism. $\square$ ## Post a comment Your email address will not be published. Required fields are marked. In your comment you can use Markdown and LaTeX style mathematics (enclose it like $\pi$). A preview option is available if you wish to see how it works out (just click on the eye in the toolbar). Unfortunately JavaScript is disabled in your browser, so the comment preview function will not work. All contributions are licensed under the GNU Free Documentation License. In order to prevent bots from posting comments, we would like you to prove that you are human. You can do this by filling in the name of the current tag in the following input field. As a reminder, this is tag 01HA. Beware of the difference between the letter 'O' and the digit '0'.
Find all School-related info fast with the new School-Specific MBA Forum It is currently 05 May 2016, 20:52 ### GMAT Club Daily Prep #### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email. Customized for You we will pick new questions that match your level based on your Timer History Track every week, we’ll send you an estimated GMAT score based on your performance Practice Pays we will pick new questions that match your level based on your Timer History # Events & Promotions ###### Events & Promotions in June Open Detailed Calendar # If vmt ≠ 0, is v^2m^3t^-4 > 0? new topic post reply Question banks Downloads My Bookmarks Reviews Important topics Author Message TAGS: ### Hide Tags Manager Joined: 20 May 2008 Posts: 57 Followers: 2 Kudos [?]: 9 [1] , given: 1 If vmt ≠ 0, is v^2m^3t^-4 > 0? [#permalink] ### Show Tags 02 Feb 2009, 23:05 1 KUDOS 4 This post was BOOKMARKED 00:00 Difficulty: 25% (medium) Question Stats: 66% (02:03) correct 34% (01:09) wrong based on 327 sessions ### HideShow timer Statictics If vmt ≠ 0, is (v^2)*(m^3)*(t^(-4)) > 0? (1) m > v^2 (2) m > t^(-4) [Reveal] Spoiler: OA Last edited by Bunuel on 03 Jan 2014, 04:30, edited 3 times in total. Renamed the topic and edited the question. SVP Joined: 07 Nov 2007 Posts: 1820 Location: New York Followers: 30 Kudos [?]: 689 [0], given: 5 ### Show Tags 03 Feb 2009, 05:31 LoyalWater wrote: 1.If vmt ≠ 0, is v2m3t-4 > 0? (1) m > v2 (2) m > t-4 v^2*m^2*m*t-4 > 0 1) m>v^2 t can be +Ve or -ve v^2*m^2*m*t-4 > 0 can be true or false not sufficient 2) m > t-4 m can be +ve or -ve can be true or false not sufficient when combined. m is positive --> t must be +Ve v^2*m^2*m*t > 4 or <4 eventhough all v,m,t are positive. v can be fraction value which can lead to v^2*m^2*m*t to <4 not sufficient E _________________ Smiling wins more friends than frowning SVP Joined: 07 Nov 2007 Posts: 1820 Location: New York Followers: 30 Kudos [?]: 689 [0], given: 5 ### Show Tags 03 Feb 2009, 05:33 LoyalWater wrote: 1.If vmt ≠ 0, is v2m3t-4 > 0? (1) m > v2 (2) m > t-4 please post the question properly.. I believe v2 is power 2 of V .. then use exponent symbol "^" (v^2) _________________ Smiling wins more friends than frowning Current Student Joined: 28 Dec 2004 Posts: 3385 Location: New York City Schools: Wharton'11 HBS'12 Followers: 14 Kudos [?]: 223 [0], given: 2 ### Show Tags 03 Feb 2009, 10:16 LoyalWater wrote: 1.If vmt ≠ 0, is v2m3t-4 > 0? (1) m > v2 (2) m > t-4 v^2 *m^3*t -4 >0 v^2 * m^2*m*t>4 1) m>v^2 ok..insuff..all we know is that m is positive 2) m>t-4 insuff we dont know..if m<0 or positive..insuff together.. all we know is that M>0 i.e however we dont know if T<0 or not v^2 *M^3 >0 we dont know if T>0 or not..Insuff E it is.. Manager Joined: 20 May 2008 Posts: 57 Followers: 2 Kudos [?]: 9 [0], given: 1 ### Show Tags 03 Feb 2009, 23:12 sorry guys.. i have put the exponent sign.. Manager Joined: 04 Sep 2006 Posts: 114 Followers: 3 Kudos [?]: 32 [1] , given: 0 ### Show Tags 04 Feb 2009, 01:11 1 KUDOS I think it is D . m is +ve . The powers of v & t are even . SO the combined product is +ve only. from stat 2 : m is again +ve . so Suff. VP Joined: 18 May 2008 Posts: 1287 Followers: 14 Kudos [?]: 281 [0], given: 0 ### Show Tags 04 Feb 2009, 04:28 It shld be D Is $$v^2 *m^3*t^-4>0?$$ Since $$v^2$$ and $$1/t^4$$are positive, so it depends upon whether m is positive or not (1) m>$$v^2$$ >0 hence sufficient (2) m> $$1/t^4$$ >0 hence sufficient Senior Manager Joined: 30 Nov 2008 Posts: 491 Schools: Fuqua Followers: 10 Kudos [?]: 219 [0], given: 15 ### Show Tags 04 Feb 2009, 12:35 I agree with D. Since the question stem converts to (v^2)(m^3) / (t^4) - IS this > 0 We know V^2 is alwats positive, t^4 is always positve. Hence the value of m decides whether the expression is > 0 or not. From stmt 1, it is given m > v2 ==> m is positive. Hence the expression > 0. Sufficient. From Stmt 2, it is given, m > (1/(t ^4) ==> m positive. Hence the expression > 0. Sufficient. Intern Joined: 28 Aug 2012 Posts: 7 Followers: 0 Kudos [?]: 0 [0], given: 2 ### Show Tags 01 Oct 2012, 23:57 mrsmarthi wrote: I agree with D. Since the question stem converts to (v^2)(m^3) / (t^4) - IS this > 0 We know V^2 is alwats positive, t^4 is always positve. Hence the value of m decides whether the expression is > 0 or not. From stmt 1, it is given m > v2 ==> m is positive. Hence the expression > 0. Sufficient. From Stmt 2, it is given, m > (1/(t ^4) ==> m positive. Hence the expression > 0. Sufficient. ------------------------------------------------------------------------------------------------------- Can anyone please explain in Stmt2, how m> (1/(t^4))? Thanks, Weirdo Math Expert Joined: 02 Sep 2009 Posts: 32657 Followers: 5660 Kudos [?]: 68761 [2] , given: 9818 ### Show Tags 02 Oct 2012, 01:54 2 KUDOS Expert's post 2 This post was BOOKMARKED Weirdo2989 wrote: mrsmarthi wrote: I agree with D. Since the question stem converts to (v^2)(m^3) / (t^4) - IS this > 0 We know V^2 is alwats positive, t^4 is always positve. Hence the value of m decides whether the expression is > 0 or not. From stmt 1, it is given m > v2 ==> m is positive. Hence the expression > 0. Sufficient. From Stmt 2, it is given, m > (1/(t ^4) ==> m positive. Hence the expression > 0. Sufficient. ------------------------------------------------------------------------------------------------------- Can anyone please explain in Stmt2, how m> (1/(t^4))? Thanks, Weirdo If $$v*m*t$$ not $$= 0$$, is $$v^2*m^3*t^{-4} > 0$$? $$v*m*t\neq{0}$$ means that none of the unknowns equals to zero. Is $$v^2*m^3*t^{-4}>0$$? --> is $$\frac{v^2*m^3}{t^4}> 0$$? As $$v^2$$ and $$t^4$$ are positive (remember none of the unknowns equals to zero) this inequality will hold true if and only $$m^3>0$$, or, which is the same, when $$m>0$$. (1) $$m>v^2$$ --> $$m$$ is more than some positive number ($$v^2$$), hence $$m$$ is positive. Sufficient. (2) $$m>t^{-4}$$ --> $$m>\frac{1}{t^4}$$ --> Again $$m$$ is more than some positive number ($$\frac{1}{t^4}$$ ), hence $$m$$ is positive. Sufficient. Hope it's clear. _________________ GMAT Club Legend Joined: 09 Sep 2013 Posts: 9298 Followers: 456 Kudos [?]: 115 [0], given: 0 Re: If vmt ≠ 0, is v^2m^3t^-4 > 0? [#permalink] ### Show Tags 30 Dec 2013, 22:27 Hello from the GMAT Club BumpBot! Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos). Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email. _________________ Intern Joined: 26 May 2012 Posts: 42 Followers: 0 Kudos [?]: 7 [1] , given: 11 Re: If vmt ≠ 0, is v^2m^3t^-4 > 0? [#permalink] ### Show Tags 03 Jan 2014, 01:13 1 KUDOS The original question is confusing because there is no * sign. One could interpret it as V raised to a long exponent (2m^3t^(-4)) since there are no * in between each product. Math Expert Joined: 02 Sep 2009 Posts: 32657 Followers: 5660 Kudos [?]: 68761 [0], given: 9818 Re: If vmt ≠ 0, is v^2m^3t^-4 > 0? [#permalink] ### Show Tags 03 Jan 2014, 04:31 Expert's post catalysis wrote: The original question is confusing because there is no * sign. One could interpret it as V raised to a long exponent (2m^3t^(-4)) since there are no * in between each product. Edited the stem as suggested. Thank you. _________________ GMAT Club Legend Joined: 09 Sep 2013 Posts: 9298 Followers: 456 Kudos [?]: 115 [0], given: 0 Re: If vmt ≠ 0, is v^2m^3t^-4 > 0? [#permalink] ### Show Tags 29 Apr 2015, 09:38 Hello from the GMAT Club BumpBot! Thanks to another GMAT Club member, I have just discovered this valuable topic, yet it had no discussion for over a year. I am now bumping it up - doing my job. I think you may find it valuable (esp those replies with Kudos). Want to see all other topics I dig out? Follow me (click follow button on profile). You will receive a summary of all topics I bump in your profile area as well as via email. _________________ Re: If vmt ≠ 0, is v^2m^3t^-4 > 0?   [#permalink] 29 Apr 2015, 09:38 Similar topics Replies Last post Similar Topics: 1 If m ≠ 0 and n ≠ 0, is mn > 0? 4 29 Apr 2016, 03:56 3 If y > 0 is x > 0 ? 2 12 Sep 2015, 12:09 4 If x ≠ 0, is xy > 0? 8 19 Jun 2015, 01:58 5 If vmt≠0, is v^2*m^3*t^(-4)>0? 7 21 Jul 2010, 18:06 6 If v*m*t not = 0 , is v^2*m^3*t^{-4} > 0 ? 8 22 Jan 2010, 04:21 Display posts from previous: Sort by # If vmt ≠ 0, is v^2m^3t^-4 > 0? new topic post reply Question banks Downloads My Bookmarks Reviews Important topics Powered by phpBB © phpBB Group and phpBB SEO Kindly note that the GMAT® test is a registered trademark of the Graduate Management Admission Council®, and this site has neither been reviewed nor endorsed by GMAC®.
Volume 9 (2013) Article 2 pp. 31-116 The Quantum and Classical Complexity of Translationally Invariant Tiling and Hamiltonian Problems by Revised: October 1, 2012 Published: January 25, 2013 We study the complexity of a class of problems involving satisfying constraints which remain the same under translations in one or more spatial directions. In this paper, we show hardness of a classical tiling problem on an $N \times N$ $2$-dimensional grid and a quantum problem involving finding the ground state energy of a $1$-dimensional quantum system of $N$ particles. In both cases, the only input is $N$, provided in binary. We show that the classical problem is $\NEXP$-complete and the quantum problem is $\QMAEXP$-complete. Thus, an algorithm for these problems which runs in time polynomial in $N$ (exponential in the input size) would imply that $\EXP = \NEXP$ or $\BQEXP = \QMAEXP$, respectively. Although tiling in general is already known to be $\NEXP$-complete, the usual approach is to require that either the set of tiles and their constraints or some varying boundary conditions be given as part of the input. In the problem considered here, these are fixed, constant-sized parameters of the problem. Instead, the problem instance is encoded solely in the size of the system.
# Rectangles • Aug 30th 2009, 02:31 PM Defunkt Rectangles Let $R = [a,b]\times[c,d]$ be a rectangle $( d(ab) = d(cd); d(ac) = d(bd) )$ and let $R_i = (a_i,b_i)\times(c_i,d_i)$, ( $1\leq i \leq n$) be rectangles inside R, such that every two rectangles in R are disjoint, maybe other than their sides, and such that each one of them has at least one integer side. Also, $\bigcup_{1\leq i \leq n}R_i = R$ Prove that R also has at least one integer side. • Aug 31st 2009, 12:45 AM Bruno J. We'll consider the whole thing as a possibly quite irregular grid on which we will move. A "point" will mean the vertex of some rectangle, and "moving up once" will mean to move up from a point to the next point directly above, along a side of integer length. First notice that if a rectangle has one side of integer length then the opposite side is also of integer length. Therefore, given two concurrent sides of a rectangle, one will be of integer length. Start from the lower left corner. From there you can certainly move up or move right; one of those sides has to be of integer length. From the point you reach then, the same is possible : you can move either up or right. Keep doing that until you reach either the right side or the top side of $R$. If you reach the right side, then $R$ has integer width (add up all the right-left travel). Similarily if you reach the top side, then $R$ has integer height. Since one of the two must happen, we are done. • Aug 31st 2009, 03:03 AM Defunkt Very nice! I haven't quite thought about it this way. There are numerous other ways of solving this, so anyone is welcome to have a shot! Another nice solution is by using the fact that: $\sum^{n}_{i=1} \int_{R_i} sin(2\pi x)sin(2\pi y)dxdy = \int_{R}sin(2\pi x)sin(2\pi y) dxdy$
# MATH 6627 2010-11 Practicum in Statistical Consulting/Students/Crystal Cao (Difference between revisions) Revision as of 19:39, 2 April 2011 (view source)Yrcao (Talk | contribs)← Older edit Revision as of 19:42, 2 April 2011 (view source)Yrcao (Talk | contribs) Newer edit → Line 50: Line 50: ===Week 11=== ===Week 11=== *Q:  In the multiple linear regression,  we get the formula $\hat{y}=\hat{\beta_0}+\hat{\beta_1}x_1+\hat{\beta_2}x_2+\hat{\beta_3}x_3$. Then we could use Fisher’s Z transformation to transform $\hat{\beta_1}\cdots \hat{\beta_3}$ to $B_1 \cdots B_3$. If $B_1 \approx B_2$, but the ANOVA test shows that the P-value for $B_1$ is 0.01, but the P-value for $B_2$ is 0.08. Why? *Q:  In the multiple linear regression,  we get the formula $\hat{y}=\hat{\beta_0}+\hat{\beta_1}x_1+\hat{\beta_2}x_2+\hat{\beta_3}x_3$. Then we could use Fisher’s Z transformation to transform $\hat{\beta_1}\cdots \hat{\beta_3}$ to $B_1 \cdots B_3$. If $B_1 \approx B_2$, but the ANOVA test shows that the P-value for $B_1$ is 0.01, but the P-value for $B_2$ is 0.08. Why? - *A: $B_i=\frac{\hat{\beta_i}Sx_i}{S_y},/math>, SE(\hat{\beta_i}=\frac{Se}{\sqrt{n}Sx_i\right|others}$. In ANOVA analysis, the t-score is equal to $k\times B_i \times C_i$, where $k=\frac{\sqrt{n}}{Se}$ , $C_i= Sx_i\right|others$ and the P-value is a function of t-score. Although $B_1 \approx B_2 <\math>, but [itex]C_1$ is not necessarily equal to $C_2$, and P-value for $B_1$ is not necessarily equal to $B_2$. Only in case of there are two predict variables,  $B_1 \approx B_2 <\math>, means [itex] P_1 \approx P_2 <\math>. + *A: [itex]B_i=\frac{\hat{\beta_i}Sx_i}{S_y}/math>, SE(\hat{\beta_i}=\frac{Se}{\sqrt{n}Sx_i\right|others}$. In ANOVA analysis, the t-score is equal to $k\times B_i \times C_i$, where $k=\frac{\sqrt{n}}{Se}$ , $C_i= Sx_i\right|others$ and the P-value is a function of t-score. Although $B_1 \approx B_2 <\math>, but [itex]C_1$ is not necessarily equal to $C_2$, and P-value for $B_1$ is not necessarily equal to $B_2$. Only in case of there are two predict variables,  [itex] B_1 \approx B_2 <\math>, means [itex] P_1 \approx P_2 <\math>. ## Contents My name is Yurong, and I am also known as Crystal in our department. As a PhD student in Applied Math, my research involved a lot statistical analysis. The project I am currently involved in is: The Climate and Environmental Impact on the Distribution Properties of Mosquito Abundance in Peel Region. The dynamic models are very popular on studying the transmission of vector-borne diseases. In those dynamical models, the parameters were determined by simulations or estimations. The models were successful in predicting the dynamic of vector populations under different circumstance, but could not reflect the dynamics of the vector population with the change of the climate and environmental factors. Now I am using statistic analysis to build up the association between vector abundance and the climate and environmental factors. By learning more statistic knowledge, I hope I could have deeper understanding on statistic methods and use the combination of mathematical modeling and statistical analysis in my research. ## Sample Exam Questions ### Week 1 • Q: List the possible methods of controlling for the effects of confounding factors while using observational data. • A: 1) Randomization; 2) Matching;3) Stratification: analyzing each stratum with similar values for the confounding factor(s); 4) Building a statistical model in that includes the confounding factor(s) and using multiple regression. Since the confounding factor may be known but may be measured with error so that it is not fully controlled and some important confounding factors might not be known, there is no perfect solutions and judgment must be used in applying it and in assessing studies based on these methods. ### Week 2 • Q: Considering the coffee consumption problem, how should we choose the explanatory variables in the model? • A: How to choose the variables not only depends on the significance of the variable. The cost to get the data and the quality of data, etc also need to be considered. How to build the model depends on the question answered. While we need to answer how the variable affects the heart damage, we need to add the variable in the model even it is not significant. While answering whether the variable affects the heart damage, we may drop it if it is not significant. ### Week 3 • Q: Look at the example of the coffee consumption and heart damage in the lecture note, we found the marginal confidence interval is smaller than the conditional one for the predicted coffecient of coffee. How did it happen? • A: Since the two predictors coffee consumption and stress are related to each other, the marginal confidence interval is not equal to the conditional one. If the two predictors are not related, the two intervals will be equal. ### Week 4 • Q: What is the difference between the interaction between variables and the correction between variables? • A: In statistical regression analyses, an interaction may arise when considering the relationship among three or more variables, and describes a situation in which the simultaneous influence of two variables on a third is not additive. Correlation measures the strength of the linear relationship between quantitative variables, relationship may not be linear. In regression analyses, the interaction and correlation between variables are two different concepts, and they have no relationship with each other. The two variables may be interactive but not correlated, interactive and correlated, not interactive and not correlated, not interactive but correlated. ### Week 5 • Q: What is the relationship between interaction and collinearity? • A: Interaction is often confused with collinearity. Collinearity refers to associations among predictors: i.e. the extent to which the predictor data ellipse is tilted and eccentric. It is not related to Y Interaction refers to a situation in which the relationship between Y and the predictor variables is not 'additive', i.e. the effect of some variable depends on the levels of the other variable. It has nothing to do with the relationships among the Xs – only in the way they affect Y Interaction or collinearity can exist with or without the other. The presence of either does not even suggest the likely presence of the other. ### Week 6 • Q: What is the difference between a characteristic of the school and a 'derived' variable? • A: a derived variable could have a different value with a different sample of students. A characteristic of the school would not. ### Week 7 • Q: Which confidence interval is better, Scheffe or Bonferroni when goes to infinite? • A: for models with one or two degrees of freedom for error, Scheffe is always superior to Bonferroni. For three or more degrees of freedom for error, Bonferroni is superior to Scheffe for standard confidence levels, but the reverse is true for nonstandard levels. ### Week 8 • Q: How Lack of fit contributes to autocorrelation? • A: Lack of fit will generally contribute positively to autocorrelation. For example, if trajectories are quadratic but you are fitting a linear trajectory, the residuals will be positively autocorrelated. Strong positive autocorrelation can be a symptom of lack of fit. This is an example of poor identification between the FE model and the R model, that is, between the deterministic and the stochastic aspects of the model. ### Week 9 • Q: According to the Principle of marginality, we don not necessary drop items because they are not significant. Then it arise the question that how should decide to drop an item while it is not significant? • A: It depends on the questions we should answer. In the case we are dealing with observational data and we try to predict the relation between the dependent variable and the independent variables, we may drop an item if the p-value is small. In the case we try to find the causing facts between Y and Xs, we could not drop an item only according to the p-value since it may be a compounding factor or an intermediate factor. ### Week 10 • Q: Why does the Ordinary least-squares analysis fail to explain on pooled Orthodont data? • A: Because the residuals within clusters are not independent; they tend to be highly correlated with each other. Because the residuals within clusters are not independent; they tend to be highly correlated with each other. We could use repeated measures (univariate and multivariate) or two-stage approach. ### Week 11 • Q: In the multiple linear regression, we get the formula $\hat{y}=\hat{\beta_0}+\hat{\beta_1}x_1+\hat{\beta_2}x_2+\hat{\beta_3}x_3$. Then we could use Fisher’s Z transformation to transform $\hat{\beta_1}\cdots \hat{\beta_3}$ to $B_1 \cdots B_3$. If $B_1 \approx B_2$, but the ANOVA test shows that the P-value for B1 is 0.01, but the P-value for B2 is 0.08. Why? • A: Failed to parse (syntax error): B_i=\frac{\hat{\beta_i}Sx_i}{S_y}/math>, SE(\hat{\beta_i}=\frac{Se}{\sqrt{n}Sx_i\right|others} . In ANOVA analysis, the t-score is equal to $k\times B_i \times C_i$, where $k=\frac{\sqrt{n}}{Se}$ , Failed to parse (syntax error): C_i= Sx_i\right|others and the P-value is a function of t-score. Although Failed to parse (unknown function\math): B_1 \approx B_2 <\math>, but [itex]C_1
# What does : Hold[$IterationLimit] mean? In this answer, what does the : Hold[$IterationLimit] part of the following construct do? cfRemainders[x_, iter_: Hold[$IterationLimit]] ## 3 Answers The original complete definition is cfRemainders[x_, iter_: Hold[$IterationLimit]] := NestWhileList[FractionalPart[1/#] &, FractionalPart[x], # != 0 &, 1, ReleaseHold[iter]] The iter_ : Hold[$IterationLimit] makes iter an Optional argument with the default value Hold[$IterationLimit] if the argument is omitted. Secondly, by using Hold, $IterationLimit is not evaluated until cfRemainders is actually called and ReleaseHold[iter] is executed. So if a user resets $IterationLimit, subsequent calls to cfRemainders will respect it. One question might be why did I do it this way. (My feeling is that I'm overlooking something and someone will suggest a better way to limit the number of times an iteration occurs.) Without some limit on NestWhileList, calling cfRemainders on an irrational number would run forever (or until Mma ran out of memory). $IterationLimit seemed like a convenient system variable to use ($RecursionLimit is another and one can argue which seems more appropriate). But without Hold in the definition cfRemainders[x_, iter_: $IterationLimit] := ... the current value of $IterationLimit is substituted and the definition is equivalent to (assuming $IterationLimit == 4096) cfRemainders[x_, iter_: 4096] := ... (You can check with ? cfRemainders.) In this case, if a user changes $IterationLimit, cfRemainders is unaffected. Alternative definition could be to set my own arbitrary limit or make the argument iter mandatory: cfRemainders[x_, iter_: 1000] := ... cfRemainders[x_, iter_] := ... Another good question is why worry about this, when I neglected to put a restriction on x to be numeric, which would be helpful, too: cfRemainders[x_?NumericQ, iter_: Hold[$IterationLimit]] := ... In fact, I think I'll go edit my other answer. • I think your method is quite reasonable, but if you seek another you could also do something like: f[x_, iter_: -1] := [. . ., iter /. -1 :>$IterationLimit] Or, you could you Options. – Mr.Wizard May 5 '13 at 16:25 What this does is set a default value for iter, meant for use if cfRemainders is called with only one argument. The default value for iter in this case is $IterationLimit, and the Hold[] enclosing it means cfRemainders will use $IterationLimit symbol for the new rule. If there was no enclosing Hold[], $IterationLimit would have been replaced with the Integer value assciated with it, in the new rule defined for cfRemainders. This makes cfRemainders more robust\general because, upon calling it, it'll always iterate the appropriate number of times, even if $IterationLimit has been changed. Check the differences with DownValues[cfRemainders], with/without Hold[]. Actually this is more like a comment to Michael E.'s answer than an own answer, but it became too long for a comment. I think it is worth mentioning that $IterationLimit (and also $RecursionLimit and probably some others as well) is somewhat special and thus needs special treatment: For a "normal" variable it would be quite simple to achieve what Michael wants with something like: $iterationlimit = 4096; Block[{$iterationlimit},cfRemainder[x_, iter_: $iterationlimit] := Print[iter];] Now if you look at DownValues[cfRemainder] or just use the followings lines of code you find that it will behave as wanted even without the extra Hold and ReleaseHold: DownValues[cfRemainders] (* ==> {HoldPattern[cfRemainders[x_, iter_ :$iterationlimit]] :> Print[iter]} *) cfRemainders[10] Block[{$IterationLimit = 20}, cfRemainders[10]] For some deeper reason out of my knowledge that doesn't work for $IterationLimit as it seems to not behave as a normal variable within Block: it will always have that OwnValue even if it is Blocked, presumably this is to build an extra barrier against infinite iterations (which would lead to a crash): Block[{$IterationLimit}, cfRemainders[x_, iter_:$IterationLimit] := Print[ReleaseHold[iter]]; ]; DownValues[cfRemainders] (* ==> {HoldPattern[cfRemainders[x_, iter_ : 4096]] :> Print[ReleaseHold[iter]]} *) There are possibilities to overcome that situation, the trick Micheal used with using an extra Hold and ReleaseHold is one, here are two ways which avoid the extra ReleaseHold but need some more complicated definitions: Variant 1: ClearAll[cfRemainders]; Module[{marker}, cfRemainders[x_, iter_: marker] := Print[iter]; DownValues[cfRemainders] = ReplaceAll[DownValues[cfRemainders], marker :> $IterationLimit]; ]; Variant 2: ClearAll[cfRemainders]; Block[{$IterationLimit}, OwnValues[$IterationLimit] = {}; cfRemainders[x_, iter_:$IterationLimit] := Print[iter]; ] By looking at the DownValues[cfRemainders] you can check that both these variants will put an unevaluated $IterationLimit into the definition and will work as expected. While I think that the second variant is somewhat more elegant I have the feeling that it might undermine the extra barriers against inifinite recursions and might be dangerous in certain circumstances. So I'd probably go with version 1 which I think should be safe. I'm also quite sure that there are even better ways to put that unevaluated $IterationLimit into the optional part of such a function definition that I couldn't make up...
# Why don't air conditioners have regenerative heat exchangers? 1. Jun 24, 2009 ### chayced I've been pondering this question for a while and I think I must be missing something. In a regular refrigeration cycle you have a high pressure liquid at nearly ambient temperature entering a metering device and then an evaporator coil. At which time it is a low pressure and low temperature gas. This gas exits the evaporator while still fairly cold. Why not put a regenerative heat exchanger to cool the liquid as it's entering and heat the gas as it's leaving? The gas is just going to the compressor anyway and the compressor doesn't care what it's inlet temperature is. The resulting high temperature gas from the compressor outlet would be hotter, but this would allow better heat transfer to the ambient air in the condenser. Seems like a surefire way to increase efficiency to me, but I don't see any real world applications. What am I missing? 2. Jun 24, 2009 ### Danger This is not an area of knowledge for me, but I would suspect that it's a matter of manufacturing costs. 3. Jun 24, 2009 ### Staff: Mentor That was my first thought. I can't offhand think of a technical reason why it wouldn't work, but I'll sleep on it... 4. Jun 25, 2009 ### turbo It would work, but it wouldn't be energy-neutral. The boot-strapping involved would violate a basic physical law. Can we figure out why it won't work without additional energy input from outside the system? 5. Jun 25, 2009 ### ank_gl Regenerative heat exchanger Or Suction line-liquid line heat exchanger(as they are called) do not always result in an increase in COP, it depends on the refrigerant in use. True that the enthalpy of refrigerant going into the evaporator coil decreases, enthalpy of refrigerant going into the compressor also increases, hence the work input also increases. Whether the COP will increase or not, then is the question of which refrigerant is used. Secondly, it might be the cost factor 6. Jun 25, 2009 ### ank_gl I ran through some calculations, apparently the only refrigerant showing a decline in COP with a regenerative heat exchanger is R718(water), mainly because the colder fluid experiences a lesser temperature change compared to the hotter fluid(colder liquid has higher specific heat), hence the enthalpy drop for hotter fluid(which has to enter the evaporator) is much greater than the enthalpy lift for the colder fluid, & enthalpy drop outweighs the increase in compression work. :zzz:I will put my on the cost factor 7. Jun 25, 2009 ### chayced While what you've said is true, you are forgetting that it is a heat pump. Having a higher enthalpy going into the compressor does not indicate more work done by the compressor, but instead more heat rejected to the environment. At least that's how I see it. Last edited: Jun 25, 2009 8. Jun 25, 2009 ### Topher925 In a properly designed heat pump, the working fluid is in the liquid-vapor or liquid state when entering the evaporator. Anyway, to answer your question, this is done and is common practice. You may not find it in your mini-fridge but I believe you will see it with things like HVAC systems. See pic. http://www.betterbricks.com/graphics/assets/images/Building_Ops/BOpEqSysChillers_6w.png [Broken] Notice the heat exchanger between the evaporator and condenser reservoir exits. Last edited by a moderator: May 4, 2017 9. Jun 25, 2009 ### ank_gl Heat pump??, how does that change the situation? Do you mean heat loss to environment in the suction line? Again, how does that change things? Higher enthalpy at compressor inlet means higher work input to the compressor(assuming same pressure ratio to be maintained). Remember that isentropes diverge, higher the enthalpy, flatter is the isentrope in P-h diagram, higher is the enthalpy difference =>higher work input. #### Attached Files: • ###### P-h R22.jpg File size: 23.4 KB Views: 167 10. Jun 25, 2009 ### crk Cooling the low temperature liquid before it leaves the metering device would improve the cooling but would be redundant, because that is what the condenser coil is designed for. Transferring heat to the exiting gas would increase its' temperature which would increase the work the compressor has to do to compress the gas and because compressing the gas increases its' temperature even further, you run the risk of overheating the compressor and the motor. Although the resulting higher temperature liquid would be able to release heat more quickly at any given ambient air temperature, it would still be counterproductive because the condenser would first have to remove the extra heat and once the liquid temperature drops to what it would have been if the additional heat had not been added the liquid would still have to be cooled as it had been before. So it would just add to the cooling load the condenser has to deal with. But it's a good question. Keeping thinking outside the box. There is still much to be learned. 11. Jun 26, 2009 ### ank_gl Condenser design isn't as critical as the evaporator's. So what if the condenser inlet temperature is high? Usually all the condensers are over sized, so that's not much of an issue. Yes, the compressor temperature also increases, & usually the refrigerant itself is used to cool the compressor, so that will increase the cooling load. Anyways, calculations show that COP does increase by introducing suction line-discharge line heat exchanger in a simple refrigeration cycle. Hence work done per unit cooling load decreases. Its a trade off in design constraints. 12. Jun 26, 2009 ### chayced The heat pump comment was because it's easy to think of an AC unit as a heat engine and get your head messed up. The goal is to move heat not to make the heat do useful work so the more heat you can reject to the environment with the least added energy the better. Guess it all comes down to price vs benefit. Since most of the heat is removed through the latent heat of vaporization of the refrigerant the amount of superheat on the vapor line is trivial. Probably something that is beneficial for larger units but just cumbersome for smaller application. I think that pretty much answers my question. Thanks guys! 13. Jun 26, 2009 ### crk I have worked in the A/C industry for several years and evaporators and condensers are always matched to give the best performance. Condensers are slightly oversized to accommodate heavier loads at peak demand, the very time when the increased load will become a significant factor. What works on paper doesn't always work in the real world because most such calculations do not take into account a dynamic environment and are limited to specific scenarios. 14. Jun 27, 2009 ### ank_gl I am not question your experience(I am sorry if it seemed so). I graduated just a month ago, so i dont have much of experience, only theoretical reasoning. As far as I can reason, evaporators are to be closely matched to the cooling load, because if it is oversized, compressor work increases, & if it is undersized, we aren't extracting the maximum. While in case of condenser, an undersized one will increase the enthalpy of refrigerant at the cooling coil inlet, while an oversized wont do anything, because the lowest temperature that can be achieved is atmospheric temperature, oversizing won't cool it down anyways, although it would accommodate any fluctuations in the unit. There are a lot more techniques of improving the CoP of the system, example, multi pressure systems, ejector compression etc. But you wont find anyone in a home unit. Like I said, its a trade off in design constraints. 15. Jun 27, 2009 ### crk Have no fear I was not being defensive, I was merely stating what has been my experience. You are right that evaporators are matched to the load but in practise, so are condensers matched to the evaporator. This becomes doubly important if the system is used as a heat pump and the jobs of the two coils are reversed to provide heating and cooling. That said, I am beginning to see wisdom of the original premise and find that I must rescind all previous objections. Thanks for the enlightening. 16. Jun 27, 2009 ### ank_gl Ah yes. Just forgot that one completely 17. Jul 9, 2009 ### Artman A similar system to what you are describing, only working on the air side, is a wrap-around-heat-pipe. It pre-cools the entering air by a phase change in a refrigerant coil placed in front of the cooling coil, the cooler air hits the cooling coil at a lower temperature improving dehumidifying, then leaves the cooling coil even colder, where it hits the wrap around coil that recools the refrigerant to a liquid phase. The energy hit is in increased fan external static pressure, but the system does dehumidify well. http://www.heatpipe.com/heatpipes.htm" [Broken] Last edited by a moderator: May 4, 2017
## A community for students. Sign up today Here's the question you clicked on: ## anonymous 4 years ago What is the magnitude and direction of GH if G(2, -2) and H(7, 6)? magnitude: 9.43 units; direction 32.01° magnitude: 6.4 units; direction: 57.99° magnitude: 9.43 units: direction: 57.99° magnitude: 6.4 units: direction: 32.01° • This Question is Closed 1. anonymous 9.43 units distance and 57.99 direction 2. anonymous how did u get that if u dont mind me asking i have no help at home being ho,eschool and dont really get how to do this stuff 3. netlopes1 please @shahzadjalbani, how calculate "magnitude? 4. anonymous $\sqrt{(x2-x1)^2+(y2-y1)^2}$ 5. anonymous check it @netlopes1 6. netlopes1 Thanks @shahzadjalbani, really I didn't know this. Thanks again!!! 7. anonymous No problem you can ask any question if you have . 8. netlopes1 I'm a new user here in "openstudy" but in here site there are great persons. When i will have any question i call you, ok! Please, sorry my English! 9. anonymous No problem I can understand your English #### Ask your own question Sign Up Find more explanations on OpenStudy Privacy Policy
# Taylor Expansion of Feynman Propagator with regulator masses and gamma matrices I am currently trying to understand a really old paper of Jackiw and Coleman: "Why dilatation generators do not generate dilatations". There, at some point they arrive at the following integral from a Feynman propagator (wth loops) and regulator masses: $$$$\lim_{M_f \rightarrow \infty} g^2 M_f Tr \int \frac{d^d k}{(2 \pi)^d} \gamma_5 \frac{1}{{\not}{k} - M_f} \gamma_5 \frac{1}{{\not}{k} - {\not}p - M_f} \frac{1}{{\not}{k} - {\not} q - M_f}$$$$ where $${\not} k, {\not}p$$ and $${\not}q$$ are the dirac slashed $$k_{\mu} \gamma^{\mu},p_{\mu} \gamma^{\mu},q_{\mu} \gamma^{\mu}$$ momenta. They argue that the integral is convergent and my first question is how can I see it? I only fully understand the DR regularization way and never actually seen regularization via auxilliary fields and masses. From what I can see the integral will give a k-order divergence and a $$M_f^2$$ on the denominator. Is it enough to say that the limit $$\lim_{M_f \rightarrow \infty} \frac{k}{M_f^2} =0$$ ? Secondly, they argue that if we expand the integral with respect to $$p$$ and $$q$$, the only terms that will survive are of order $$p^2$$ and $$q^2$$. So my question is, what do I expand and how since I have gamma matrices on the denominator. Do I expand around $$\not k - \not p$$? Ok, here's my guess as to what's happening here. I'm not an expert in this so hopefully, someone more knowledgable can correct me. In the paper it is stated that For these values of the masses, the integral (3.26) has, for any fixed $$p$$ and $$q$$, a convergent power series expansion in $$p$$ and $$q$$ for sufficiently large regulator mass. I am reading this as "the power series converges in $$p$$ and $$q$$, but we haven't said anything about the loop momentum integral". So apart from worrying about the divergence arising from the loop momentum $$k$$, the authors want to make sure that the power series expansion in the external momenta is also well-defined. The type of regularization that they are using is called Pauli-Villars regularization. Each one of the integrals is still divergent but taking differences between integrals of different masses can parametrize the divergence in terms of the fictitious regulator mass $$M_f$$. This is achieved by the following replacement of the propagator $$\frac{1}{p^2+i \epsilon} \rightarrow\frac{1}{p^2+i \epsilon}- \frac{1}{p^2+M_f^2+i \epsilon}.$$ Before we can show why the integral is divergent, let's first address the gamma matrices in the denominator. When one performs fermion loops, it is standard to use the identity: $$\frac{1}{\not k -m}=\frac{\not k +m}{k^2 -m^2}, \tag{1}$$ since $$(\not k-m)(\not k+ m) = k^2 -m^2$$. After such a manipulation, the integral becomes $$$$\lim_{M_f \rightarrow \infty} g^2 M_f Tr \int \frac{d^4 k}{(2 \pi)^4} \gamma_5 \frac{{\not}{k} + M_f}{k^2 - M_f^2} \gamma_5 \frac{{\not}{k} - {\not}p + M_f}{(k-p)^2 - M_f^2} \frac{{\not}{k} - {\not} q + M_f}{(k-q)^2 - M_f^2}.$$$$ After performing the trace, we can see that the highest order term will look something like $$\sim \int \frac{d^4k}{(2\pi)^4} \frac{k^2}{(k^2- \Delta)^3}\sim \int \frac{k^5}{k^6} \rightarrow \infty,$$ where $$\Delta$$ is some algebraic combination of the regulator masses, Feynman parameters etc... The divergence is logarithmic, not linear since the trace of an odd number of $$\gamma$$ matrices is always $$0$$ in $$4$$ dimensions. This doesn't change the main message. The point is that the loop momentum integral diverges, as it should in a QFT. This is why the authors compute the quantities $$A(p,q)$$, which are the regularized versions of this integral. The convergence they are referring to in that paragraph most likely has to do with a convergence in the sense of justifying their use of Taylor series. Finally, to address the possibility of performing a Taylor series, I hope the identity (1) answers this question.
# GAP: Generic character table of Spin$_{8}^{+} (q)$ The aim of this project is the determination and investigation of the generic character table of $Spin_8^+(q)$. Methods include the use of Lusztig’s theory, for example the values of generalised Green functions, as well as ad hoc arguments relying on properties of character tables. The results shall be used to determine the action of outer automorphisms on the ordinary characters, thus contributing to the verification of local-global conjectures for this series of groups. In the course of this project we also intend to improve the software support for generic character tables.
General iteration scheme for finding the common fixed points of an infinite family of nonexpansive mappings Volume 9, Issue 11, pp 5720--5732 • 1553 Views Authors Guangrong Wu - School of Applied Mathematics, Guangdong University of Technology, Guangzhou 510520, China. Liping Yang - School of Applied Mathematics, Guangdong University of Technology, Guangzhou 510520, China. Abstract The purpose of this paper is to suggest and analyze the general viscosity iteration scheme for an infinite family of nonexpansive mappings $\{T_i\}^\infty_{i=1}$. Additionally, it proves that this iterative scheme converges strongly to a common fixed point of $\{T_i\}^\infty_{i=1}$ in the framework of reflexive and smooth convex Banach space, which solves some variational inequality. Results proved in this paper improve and generalize recent known results in the literature. Share and Cite ISRP Style Guangrong Wu, Liping Yang, General iteration scheme for finding the common fixed points of an infinite family of nonexpansive mappings, Journal of Nonlinear Sciences and Applications, 9 (2016), no. 11, 5720--5732 AMA Style Wu Guangrong, Yang Liping, General iteration scheme for finding the common fixed points of an infinite family of nonexpansive mappings. J. Nonlinear Sci. Appl. (2016); 9(11):5720--5732 Chicago/Turabian Style Wu, Guangrong, Yang, Liping. "General iteration scheme for finding the common fixed points of an infinite family of nonexpansive mappings." Journal of Nonlinear Sciences and Applications, 9, no. 11 (2016): 5720--5732 Keywords • Nonexpansive mapping • general iteration scheme • contraction • smooth Banach space. •  47H09 •  47H10 •  47J20 References • [1] G. Cai, C. S. Hu, Strong convergence theorems of a general iterative process for a finite family of $\lambda_i$-strict pseudo-contractions in q-uniformly smooth Banach spaces, Comput. Math. Appl., 59 (2010), 149--160 • [2] R. Glowinski, P. Le Tallec, Augmented Lagrangian and operator-splitting methods in nonlinear mechanics, SIAM Studies in Applied Mathematics, Philadelphia (1989) • [3] K. Goebel, W. A. Kirk, Topics in Metric Fixed Point Theory, Studies in Advanced Mathematics, Cambridge University Press, Cambridge (1990) • [4] G. Marino, H.-K. Xu, A general iterative method for nonexpansive mappings in Hilbert spaces, J. Math. Anal. Appl., 318 (2006), 43--52 • [5] M. A. Noor, New approximation schemes for general variational inequalities, J. Math. Anal. Appl., 251 (2000), 217--229 • [6] M. J. Shang, X. L. Qin, Y. F. Su, Strong convergence of Ishikawa iterative method for nonexpansive mappings in Hilbert space, J. Math. Inequal., 1 (2007), 195--204 • [7] K. Shimoji, W. Takahashi, Strong convergence to common fixed points of infinite nonexpansive mappings and applications, Taiwanese J. Math., 5 (2001), 387--404 • [8] T. Suzuki, Strong convergence of Krasnoselskii and Mann's sequences for one-parameter nonexpansive semigroups without Bochner integrals, J. Math. Anal. Appl., 305 (2005), 227--239 • [9] H.-K. Xu, Viscosity approximation methods for nonexpansive mappings, J. Math. Anal. Appl., 298 (2004), 279--291 • [10] Y. Yao, Y. -C. Liou, R. Chen, A general iterative method for an infinite family of nonexpansive mappings, Nonlinear Anal., 69 (2008), 1644--1654 • [11] Y. H. Yao, Y.-C. Liou, J.-C. Yao, Convergence theorem for equilibrium problems and fixed point problems of infinite family of nonexpansive mappings, Fixed Point Theory and Appl., 2007 (2007), 12 pages
RUS  ENG JOURNALS   PEOPLE   ORGANISATIONS   CONFERENCES   SEMINARS   VIDEO LIBRARY   PACKAGE AMSBIB General information Latest issue Archive Impact factor Subscription Search papers Search references RSS Latest issue Current issues Archive issues What is RSS Diskretn. Anal. Issled. Oper.: Year: Volume: Issue: Page: Find Diskretn. Anal. Issled. Oper., 2011, Volume 18, Number 3, Pages 11–20 (Mi da650) Probabilistic analysis of decentralized version of îne generalization of the assignment problem E. Kh. Gimadiab, V. T. Dementevab a S. L. Sobolev Institute of Mathematics, SB RAS, Novosibirsk, Russia b Novosibirsk State University, Novosibirsk, Russia Abstract: A decentralized version of the Semi-Assignment problem is considered, when elements of $m\times n$-matrix are nonnegative, $m=kn$, $k$ is natural number. It is supposed, that $nk$ elements of the matrix are chosen: $k$ elements in each column and one element in each row in order to maximize the total sum of chosen elements. An approximation algorithm with $O(mn)$ time complexity is presented. In the case of inputs, when elements are independent random values with common uniform distribution function, the estimations of a relative error and a fault probability of the algorithm are obtained, and conditions of asymptotic optimality are established. Bibliogr. 8. Keywords: decentralized transportation problem, NP-hardness, approximation algorithm, asymptotic optimality, Petrov's theorem, uniform distribution. Full text: PDF file (256 kB) References: PDF file   HTML file Bibliographic databases: UDC: 519.8 Revised: 12.04.2011 Citation: E. Kh. Gimadi, V. T. Dementev, “Probabilistic analysis of decentralized version of îne generalization of the assignment problem”, Diskretn. Anal. Issled. Oper., 18:3 (2011), 11–20 Citation in format AMSBIB \Bibitem{GimDem11} \by E.~Kh.~Gimadi, V.~T.~Dementev \paper Probabilistic analysis of decentralized version of îne generalization of the assignment problem \jour Diskretn. Anal. Issled. Oper. \yr 2011 \vol 18 \issue 3 \pages 11--20 \mathnet{http://mi.mathnet.ru/da650} \mathscinet{http://www.ams.org/mathscinet-getitem?mr=2883264} \zmath{https://zbmath.org/?q=an:1249.90141}
Hello. The Name is Vault Math Vault. How Are You? ## Reversing the Trend ###### People in the field of higher mathematics often talk about reforming math education at the K-12 level, but we would rather flip it around and ask the following: What are some major issues we face in the education of higher mathematics? ## THE ISSUES AS WE SEE IT... ##### "Can-Prove-But-Can't-Grasp" Syndrome ###### To promote a strong and resilient mathematical culture, a focus on intuitive representations, conceptual understanding and alternative approaches must be kept in check. The medium of communication is only efficient, when it can be made to closely match the native mental representation of the concept in question. ## Bridging The Gap ###### Since we're playful by nature, we decided to take these issues into our own hands: • Designing visually-sophisticated educational materials in higher mathematics, as if they are to be read by 3-year-old toddlers. Interactive features, rich media — you name it. • Leveraging 21st-century web technologies to better communicate abstract math concepts and strategies, and enhance knowledge consolidation via unconventional cognitive devices. • Promoting active, inquiry-based learning via the Socratic method — by deliberately replacing answers with questions, supplying proofs with strategies, and by encouraging guided free-thinking while staying focused on the same topic. The Problem Method is, I am convinced, the way to teach everything. It teaches techniques and understanding, it teaches research and problem solving, it teaches the way nature taught us [...] before we invented teachers. 1 2 3 # Tap IntoThe Vault Get "math cookies" every now and then — one email at a time.
Register # 10.3. Sample Hash Functions¶ ## 10.3.1. Sample Hash Functions¶ ### 10.3.1.1. Simple Mod Function¶ Consider the following hash function used to hash integers to a table of sixteen slots. int h(int x) { return x % 16; } int h(int x) { return x % 16; } Here “%” is the symbol for the mod function. Settings Saving... Server Error Resubmit Recall that the values 0 to 15 can be represented with four bits (i.e., 0000 to 1111). The value returned by this hash function depends solely on the least significant four bits of the key. Because these bits are likely to be poorly distributed (as an example, a high percentage of the keys might be even numbers, which means that the low order bit is zero), the result will also be poorly distributed. This example shows that the size of the table $M$ can have a big effect on the performance of a hash system because the table size is typically used as the modulus to ensure that the hash function produces a number in the range 0 to $M-1$. ### 10.3.1.2. Binning¶ Say we are given keys in the range 0 to 999, and have a hash table of size 10. In this case, a possible hash function might simply divide the key value by 100. Thus, all keys in the range 0 to 99 would hash to slot 0, keys 100 to 199 would hash to slot 1, and so on. In other words, this hash function “bins” the first 100 keys to the first slot, the next 100 keys to the second slot, and so on. Binning in this way has the problem that it will cluster together keys if the distribution does not divide evenly on the high-order bits. In the above example, if more records have keys in the range 900-999 (first digit 9) than have keys in the range 100-199 (first digit 1), more records will hash to slot 9 than to slot 1. Likewise, if we pick too big a value for the key range and the actual key values are all relatively small, then most records will hash to slot 0. A similar, analogous problem arises if we were instead hashing strings based on the first letter in the string. Settings Saving... Server Error Resubmit In general with binning we store the record with key value $i$ at array position $i/X$ for some value $X$ (using integer division). A problem with Binning is that we have to know the key range so that we can figure out what value to use for $X$. Let’s assume that the keys are all in the range 0 to 999. Then we want to divide key values by 100 so that the result is in the range 0 to 9. There is no particular limit on the key range that binning could handle, so long as we know the maximum possible value in advance so that we can figure out what to divide the key value by. Alternatively, we could also take the result of any binning computation and then mod by the table size to be safe. So if we have keys that are bigger than 999 when dividing by 100, we can still make sure that the result is in the range 0 to 9 with a mod by 10 step at the end. Binning looks at the opposite part of the key value from the mod function. The mod function, for a power of two, looks at the low-order bits, while binning looks at the high-order bits. Or if you want to think in base 10 instead of base 2, modding by 10 or 100 looks at the low-order digits, while binning into an array of size 10 or 100 looks at the high-order digits. As another example, consider hashing a collection of keys whose values follow a normal distribution, as illustrated by Figure 10.3.1. Keys near the mean of the normal distribution are far more likely to occur than keys near the tails of the distribution. For a given slot, think of where the keys come from within the distribution. Binning would be taking thick slices out of the distribution and assign those slices to hash table slots. If we use a hash table of size 8, we would divide the key range into 8 equal-width slices and assign each slice to a slot in the table. Since a normal distribution is more likely to generate keys from the middle slice, the middle slot of the table is most likely to be used. In contrast, if we use the mod function, then we are assigning to any given slot in the table a series of thin slices in steps of 8. In the normal distribution, some of these slices associated with any given slot are near the tails, and some are near the center. Thus, each table slot is equally likely (roughly) to get a key value. Figure 10.3.1: A comparison of binning vs. modulus as a hash function. ### 10.3.1.3. The Mid-Square Method¶ A good hash function to use with integer key values is the mid-square method. The mid-square method squares the key value, and then takes out the middle $r$ bits of the result, giving a value in the range 0 to $2^{r}-1$. This works well because most or all bits of the key value contribute to the result. For example, consider records whose keys are 4-digit numbers in base 10, as shown in Figure 10.3.2. The goal is to hash these key values to a table of size 100 (i.e., a range of 0 to 99). This range is equivalent to two digits in base 10. That is, $r = 2$. If the input is the number 4567, squaring yields an 8-digit number, 20857489. The middle two digits of this result are 57. All digits of the original key value (equivalently, all bits when the number is viewed in binary) contribute to the middle two digits of the squared value. Thus, the result is not dominated by the distribution of the bottom digit or the top digit of the original key value. Of course, if the key values all tend to be small numbers, then their squares will only affect the low-order digits of the hash value. Figure 10.3.2: An example of the mid-square method. This image shows the traditional gradeschool long multiplication process. The value being squared is 4567. The result of squaring is 20857489. At the bottom, of the image, the value 4567 is show again, with each digit at the bottom of a “V”. The associated “V” is showing the digits from the result that are being affected by each digit of the input. That is, “4” affects the output digits 2, 0, 8, 5, an 7. But it has no affect on the last 3 digits. The key point is that the middle two digits of the result (5 and 7) are affected by every digit of the input. Here is a little calculator for you to see how this works. Start with ‘4567’ as an example. ## 10.3.2. A Simple Hash Function for Strings¶ Now we will examine some hash functions suitable for storing strings of characters. We start with a simple summation function. int sascii(String x, int M) { char ch[]; ch = x.toCharArray(); int xlength = x.length(); int i, sum; for (sum=0, i=0; i < x.length(); i++) { sum += ch[i]; } return sum % M; } int sascii(String x, int M) { char ch[]; ch = x.toCharArray(); int xlength = x.length(); int i, sum; for (sum=0, i=0; i < x.length(); i++) sum += ch[i]; return sum % M; } This function sums the ASCII values of the letters in a string. If the hash table size $M$ is small compared to the resulting summations, then this hash function should do a good job of distributing strings evenly among the hash table slots, because it gives equal weight to all characters in the string. This is an example of the folding method to designing a hash function. Note that the order of the characters in the string has no effect on the result. A similar method for integers would add the digits of the key value, assuming that there are enough digits to 1. keep any one or two digits with bad distribution from skewing the results of the process and 2. generate a sum much larger than $M$. As with many other hash functions, the final step is to apply the modulus operator to the result, using table size $M$ to generate a value within the table range. If the sum is not sufficiently large, then the modulus operator will yield a poor distribution. For example, because the ASCII value for ‘A’ is 65 and ‘Z’ is 90, sum will always be in the range 650 to 900 for a string of ten upper case letters. For a hash table of size 100 or less, a reasonable distribution results. For a hash table of size 1000, the distribution is terrible because only slots 650 to 900 can possibly be the home slot for some key value, and the values are not evenly distributed even within those slots. Now you can try it out with this calculator. ## 10.3.3. String Folding¶ Here is a much better hash function for strings. // Use folding on a string, summed 4 bytes at a time int sfold(String s, int M) { long sum = 0, mul = 1; for (int i = 0; i < s.length(); i++) { mul = (i % 4 == 0) ? 1 : mul * 256; sum += s.charAt(i) * mul; } return (int)(Math.abs(sum) % M); } // Use folding on a string, summed 4 bytes at a time int sfold(String s, int M) { long sum = 0, mul = 1; for (int i = 0; i < s.length(); i++) { mul = (i % 4 == 0) ? 1 : mul * 256; sum += s.charAt(i) * mul; } return (int)(Math.abs(sum) % M); } This function takes a string as input. It processes the string four bytes at a time, and interprets each of the four-byte chunks as a single long integer value. The integer values for the four-byte chunks are added together. In the end, the resulting sum is converted to the range 0 to $M-1$ using the modulus operator. For example, if the string “aaaabbbb” is passed to sfold, then the first four bytes (“aaaa”) will be interpreted as the integer value 1,633,771,873, and the next four bytes (“bbbb”) will be interpreted as the integer value 1,650,614,882. Their sum is 3,284,386,755 (when treated as an unsigned integer). If the table size is 101 then the modulus function will cause this key to hash to slot 75 in the table. Now you can try it out with this calculator. For any sufficiently long string, the sum for the integer quantities will typically cause a 32-bit integer to overflow (thus losing some of the high-order bits) because the resulting values are so large. But this causes no problems when the goal is to compute a hash function. The reason that hashing by summing the integer representation of four letters at a time is superior to summing one letter at a time is because the resulting values being summed have a bigger range. This still only works well for strings long enough (say at least 7-12 letters), but the original method would not work well for short strings either. There is nothing special about using four characters at a time. Other choices could be made. Another alternative would be to fold two characters at a time. ## 10.3.4. Hash Function Practice¶ Now here is an exercise to let you practice these various hash functions. You should use the calculators above for the more complicated hash functions. ## 10.3.5. Hash Function Review Questions¶ Here are some review questions.
What are the basics of quadratic formula and function, how you can solve quadratic equations. A calculator for… f(x)=y $\lim_{x \to \infty} \exp(-x) = 0$ $f(n) = n^5 + 4n^2 + 2 |_{n=17} \,$ By accessing this web site – http://quadratic-formula.com (Further referred as “The Site” or “This Site”), you agree to the following web site Terms and Conditions of Use, all applicable laws and regulations, and agree that you are responsible for compliance with any applicable local laws. If you do not agree with any of these terms, please don’t use the site. The materials contained in this web site are protected by applicable copyright and trade mark law. ### Disclaimer The materials on this Site are provided “as is”.We make no warranties, expressed or implied, and hereby disclaims and negates all other warranties, including without limitation, implied warranties or conditions of merchantability, fitness for a particular purpose, or non-infringement of intellectual property or other violation of rights. Further, http://quadratic-formula.com does not warrant or make any representations concerning the accuracy, likely results, or reliability of the use of the materials on its Internet web site or otherwise relating to such materials or on any sites linked to this site. ### Limitations In no event shall quadratic-formula.com or its suppliers be liable for any damages (including, without limitation, damages for loss of data or profit, or due to business interruption,) arising out of the use or inability to use the materials on the Site, even if the site or a site’s authorized representative has been notified orally or in writing of the possibility of such damage. Because some jurisdictions do not allow limitations on implied warranties, or limitations of liability for consequential or incidental damages, these limitations may not apply to you. We are not responsible for the content of the sites, that may have linked to us, or will link to us in the future. On this Site there are also links to other sites and we do not take any responsibility for their content. If we have an equation like:, the following formulas apply to it:
MathSciNet bibliographic data MR719152 (86a:32051) 32H15 Suzuki, Masaaki The intrinsic metrics on the domains in ${\bf C}\sp{n}$${\bf C}\sp{n}$. Math. Rep. Toyama Univ. 6 (1983), 143–177. Links to the journal or article are not yet available For users without a MathSciNet license , Relay Station allows linking from MR numbers in online mathematical literature directly to electronic journals and original articles. Subscribers receive the added value of full MathSciNet reviews.
• 0 Vote(s) - 0 Average • 1 • 2 • 3 • 4 • 5 Means and intermediate operations (was: Rational operators (a {t} b); a,b > e solved) Cherrina_Pixie Junior Fellow Posts: 6 Threads: 3 Joined: Jun 2011 06/14/2011, 04:22 AM (06/08/2011, 11:47 PM)JmsNxn Wrote: However, I am willing to concede the idea of changing from base eta to base root 2. That is to say if we define: $\vartheta(a,b,\sigma) = \exp_{2^{\frac{1}{2}}}^{\circ \sigma}(\exp_{2^{\frac{1}{2}}}^{\circ -\sigma}(a) + h_b(\sigma))\\\\ [tex]h_b(\sigma)=\left{\begin{array}{c l} \exp_{2^{\frac{1}{2}}}^{\circ -\sigma}(b) & \sigma \le 1\\ \exp_{2^{\frac{1}{2}}}^{\circ -1}(b) & \sigma \in [1,2] \end{array}\right.$ This will give the time honoured result, and aesthetic necessity in my point of view, of: $\vartheta(2, 2, \sigma) = 2\,\,\bigtriangleup_\sigma\,\, 2 = 4$ for all $\sigma$. I like this also because it makes $\vartheta(a, 2, \sigma)$ and $\vartheta(a, 4, \sigma)$ potentially analytic over $(-\infty, 2]$ since 2 and 4 are fix points. I also propose writing $a\,\,\bigtriangle_\sigma^f\,\,b = \exp_f^{\circ \sigma}(\exp_f^{\circ -\sigma}(a) + h_b(\sigma))\\\\ [tex]h_b(\sigma)=\left{\begin{array}{c l} \exp_f^{\circ -\sigma}(b) & \sigma \le 1\\ \exp_f^{\circ -1}(b) & \sigma \in [1,2] \end{array}\right.$ I thought about this for some time and considered interpolation between arithmetic mean and geometric mean, coming to a rather curious result. The 'mean' function with $\sigma = -1$ fails to satisfy a property of means: $mean(c*r_1,c*r_2,c*r_3, ..., c*r_n) = c*mean(r_1,r_2,r_3, ..., r_n)$ Define $M_f^\sigma(r_1,r_2,r_3, ..., r_n) = \exp_f^{\circ \sigma}\left(\frac{\exp_f^{\circ -\sigma}(r_1) + \exp_f^{\circ -\sigma}(r_2) + \exp_f^{\circ -\sigma}(r_3) + ... + \exp_f^{\circ -\sigma}(r_n)}{n}\right),\ \sigma \le 1$ This yields the arithmetic mean for $\sigma = 0$ and the geometric mean for $\sigma = 1$. For $\sigma = -1$, $M_{\sqrt{2}}^{-1}(1,2) = \exp_{\sqrt{2}}^{\circ -1}\left(\frac{\exp_{\sqrt{2}}^{\circ 1}(1) + \exp_{\sqrt{2}}^{\circ 1}(2)}{2}\right) = \log_{\sqrt{2}}\left(\frac{\sqrt{2} + 2}{2}\right) \approx 1.5431066$ $M_{\sqrt{2}}^{-1}(3,6) = \exp_{\sqrt{2}}^{\circ -1}\left(\frac{\exp_{\sqrt{2}}^{\circ 1}(3) + \exp_{\sqrt{2}}^{\circ 1}(6)}{2}\right) = \log_{\sqrt{2}}\left(\frac{\sqrt{2}^3 + 8}{2}\right) \approx 4.8735036 \ \approx \ 3.15824 * M_{\sqrt{2}}^{-1}(1,2) \ \not= \ 3.00000*M_{\sqrt{2}}^{-1}(1,2)$ So it's not a 'true mean' in the sense that the scalar multiplication property fails. This result makes me doubt that the property may be satisfied for $0 < \sigma < 1$. Is there a way to rectify this issue, i.e. find a solution $(f,\sigma)$ with $f > 1$ and $0 < \sigma < 1$ such that the property is satisfied? « Next Oldest | Next Newest » Messages In This Thread Means and intermediate operations (was: Rational operators (a {t} b); a,b > e solved) - by Cherrina_Pixie - 06/14/2011, 04:22 AM RE: Means and intermediate operations (was: Rational operators (a {t} b); a,b > e solved) - by bo198214 - 06/14/2011, 09:17 AM RE: Means and intermediate operations (was: Rational operators (a {t} b); a,b > e solved) - by bo198214 - 06/14/2011, 09:58 AM RE: Means and intermediate operations (was: Rational operators (a {t} b); a,b > e solved) - by JmsNxn - 06/14/2011, 09:52 PM Possibly Related Threads... Thread Author Replies Views Last Post Thoughts on hyper-operations of rational but non-integer orders? VSO 2 2,258 09/09/2019, 10:38 PM Last Post: tommy1729 Could there be an "arctic geometry" by raising the rank of all operations? Syzithryx 2 2,532 07/24/2019, 05:59 PM Last Post: Syzithryx Hyper operators in computability theory JmsNxn 5 6,962 02/15/2017, 10:07 PM Last Post: MphLee Recursive formula generating bounded hyper-operators JmsNxn 0 2,441 01/17/2017, 05:10 AM Last Post: JmsNxn Rational operators (a {t} b); a,b > e solved JmsNxn 30 54,643 09/02/2016, 02:11 AM Last Post: tommy1729 holomorphic binary operators over naturals; generalized hyper operators JmsNxn 15 22,814 08/22/2016, 12:19 AM Last Post: JmsNxn The bounded analytic semiHyper-operators JmsNxn 2 5,247 05/27/2016, 04:03 AM Last Post: JmsNxn Intresting ternary operations ? tommy1729 0 2,365 06/11/2015, 08:18 AM Last Post: tommy1729 on constructing hyper operations for bases > eta JmsNxn 1 4,048 04/08/2015, 09:18 PM Last Post: marraco Bounded Analytic Hyper operators JmsNxn 25 30,306 04/01/2015, 06:09 PM Last Post: MphLee Users browsing this thread: 1 Guest(s)
# Quark Matter 2014 - XXIV International Conference on Ultrarelativistic Nucleus-Nucleus Collisions 19-24 May 2014 Europe/Zurich timezone ## $J/\psi$ and Upsilon nuclear modification in A$+$A collisions 21 May 2014, 09:00 20m ### platinum Contributed Talk Open Heavy Flavour and Quarkonia ### Speaker Cesar Luiz da Silva (Los Alamos National Lab) ### Description PHENIX presents new nuclear modification results on $J/\psi$ in Cu$+$Au and U$+$U collisions. The recently completed analysis of the modification of $J/\psi$ production in Cu$+$Au collisions at forward ($1.2< y < 2.2$) and backward ($-2.2 < y < -1.2$) rapidity is the first measurement of the rapidity dependence of the $J/\psi$ modification in unequal mass heavy ion collisions. Both hot and cold nuclear matter effects are expected to be asymmetric in rapidity in these collisions. The comparison of $d$$+$Au, Au$+$Au, U$+$U and Cu$+$Au $J/\psi$ modifications across rapidities provides insight on the balance of cold and hot nuclear matter effects. We also present new PHENIX centrality results on $\Upsilon$(1S$+$2S$+$3S) production in p$+$p and Au$+$Au collisions. These results indicate significant suppression of the $2S$ and $3S$ states in the Quark-Gluon Plasma (QGP) environment. The results on temperature dependent heavy quarkonia production and evolution in the medium have the potential to bracket the temperature of the QGP. On behalf of collaboration: PHENIX ### Primary author Cesar Luiz da Silva (Los Alamos National Lab) ### Co-author Dr PHENIX Collaboration (various) ### Presentation Materials QM2014_quarkonia_PHENIX.pptx QM2014_quarkonia_PHENIX_v2.pdf
# Windows Roaming Client Deployment Guide Josh Lamb • Updated The Windows Roaming Client is endpoint software which provides off-network protection and allows per-machine granularity when using DNSFilter. It is also a good alternative if your ISP uses Carrier-Grade NAT. ## Benefits of Roaming Client • Active Directory Deployment - The Roaming Client can be distributed across your infrastructure using Group Policy, allowing you to deploy at scale and fit within your existing software ecosystem. It can be tagged so that the dashboard matches your Active Directory OUs. • Granular Reporting - Each computer with the Roaming Client has a unique history that’s recorded in our Query Log, as well as our Reporting section of the Dashboard, allowing identification of infected computers or unwanted browsing habits quickly. • Roaming - Computers with the Roaming Client are protected when roaming to other networks, such as home offices, coffee shops, airports, etc. • Tagging - Using the tagging feature, you can easily change policies for large groups of computers. Use cases include: teachers/students, corporate departments, public/private computers, etc. ## Roaming Client Installation The DNSFilter Windows Roaming Client is a Microsoft Installer (MSI) package, and can be installed in a variety of methods. The supported Operating Systems are Windows 8, 8.1, 10, and 11. It can also be installed via Active Directory. ## PGP/GPG Installation Method PGP/GPG are both programs that offer an additional layer of security to protect your electronic communications. Below we have included optional installation steps that can be done if extra security is needed in your environment. This is applicable to the Windows and MacOS Roaming Clients: 1. For the Windows OS, start by downloading PGP/GPG from these instructions here 2. (Optional) Make sure to add the installation directory to your path so you may just type "gpg" from a command line rather than "C:\Program Files\GnuPG\gpg": - Go to Start -> Settings -> Control Panel -> System -> Advanced -> Environment Variables - Choose "Path", and select "Edit", and to the very end of the value add ;C:\Program Files\GnuPG (note the preceding semi-colon) - Click OK until you're out of the System dialog box. - In order for this to take effect you must close any open command windows and start a new one. 3. Download our public key from here 4. Save the public key somewhere, ie: C:\Users\Joe\Desktop\dnsfilter-public-key.asc 5. Import the public key: gpg --import C:\Users\Joe\Desktop\dnsfilter-public-key.asc 6. Download the installer and the installer.sha256sum.asc checksum file: - Download installer can be found here - Checksum file can be found here 7. Verify the checksum against the downloaded installer 8. Here's an example for Windows: gpg -o - --verify DNSFilter_Agent_Setup_x64-1.7.15.0.msi.sha256sum.asc | "C:\Program Files (x86)\Gpg4Win\bin\sha256sum.exe" -c - 9. Make sure you see the OK from Step 5 next to the msi installer line, ie: DNSFilter_Agent_Setup_x64-1.7.15.0.msi: OK If it says FAILED, you should re-download and try running the commands again to verify, and if it still fails, please contact support. A failed example would look like the following: DNSFilter_Agent_Setup_x64-1.7.15.0.msi: FAILED Pro Tip: If the file has a space in it, the command should wrap the entire filename in quotes, like this: gpg -o - --verify "DNS Agent-1.3.1-Installer.msi.sha256sum.asc" |" C:\Program Files (x86)\Gpg4Win\bin\sha256sum.exe" -c - ## Site Association Upon installation, Roaming Clients must be associated with a specific Site . Whichever Site is associated with the Roaming Client, the DNS queries generated by the Roaming Client will be billed to that Site. I don’t have a Site. I only intend to use the software and not point DNS at the local network level. • Create a Site with no IP address associated with it. I have multiple Sites. With which Site do I associate a Roaming Client? • If the computer is normally at a specific location (ie: Office, School, etc), use that Site. • If the enduser is always remote and will never be locally on a specific Site, the Site is irrelevant; just remember this will be used for billing. • Sites can be changed at any point in time if you change your mind about with which site a Roaming Client is associated. Once you’ve chosen the Site, generate a Site Secret Key (SSK) for it from Roaming Client Deployments panel in the dashboard. This key will be required when installing the Roaming Client. ## Standalone Installation #### Testing Encouraged A standalone installation is recommend when initially testing the Roaming Client on your computers/network. DNSFilter recommends 1-2 days of testing with one or more computers to ensure smooth operation before performing a mass deployment. ### GUI Installation To perform a standalone GUI installation of the Roaming Client, navigate to the Roaming Client Deployments panel in the dashboard and download and run the installer. You will need the Site Secret Key, which is available on that page. Below is a screencast illustrating the installation process: Verify operation by ensuring the tray icon is either blue or green. If the tray icon is red, refer to our Roaming Client Troubleshooting section for more information. ### Command-Line (Silent) Installation The Roaming Client can also be deployed silently via a command prompt. To perform a silent installation of the client install the Roaming Client with all default options, simply use the below command in an administrative prompt (Please ensure your sitekey is copied as it appears directly from your dashboard): msiexec /qn /i "C:\path\to\DNSFilter_Agent_Setup.msi" NKEY="SITESECRETKEY" For Whitelabel version: msiexec /qn /i "C:\path\to\DNS_Agent_Setup.msi" NKEY="SITESECRETKEY" There are several additional command-line options that are available: • TAGS="tag1,tag2" will associate tags in the Dashboard for easier management of groups of Roaming Clients. They can be whatever you want to specify (locations, people groups, etc). • HOSTNAME="SomeOtherHostname" allows you to specify a custom hostname. If this option is not specified, it will default to the Windows hostname of the system. • TRAYICON="disabled" Hiding the tray icon can be desirable to reduce enduser awareness of the Roaming Client, thereby reducing tampering attempts to disable the software. The more strict the content filtering policies are, the more likely this is.(Please also keep in mind that hiding the tray icon will make it more difficult to troubleshoot any issues that should arise.) • ARPSYSTEMCOMPONENT=1 This will hide the Windows Client from the Add/Remove programs list, which will decrease enduser awareness of the client, thereby reducing tampering attempts to disable the software. This is particularly useful if the endusers commonly have Administrative access to the local machine. • LOCALDOMAINS="dom1.local,dom2.local" This parameter allows you to specify additional local domains at the install time of the client. (Keep in mind that Search Suffixes provided by Active Directory are automatically added by the client when it starts up and reads the adapter configuration) ## Active Directory Installation The Windows Roaming Client can be mass distributed via Active Directory by creating a Group Policy Object (GPO). Through the use of Microsoft Transform (MST) files, you can also integrate any of the command-line options listed above along with the installer. This means that you can smoothly deploy the client with preset tags, show/hide the tray icon, and associate the client to a specific network location. The image below shows what the final result looks like in the management panel. Roaming Clients will have a name, one or more tags, and will be associated to a certain site. Policies and block pages can be assigned to groups of clients, or even just to one. This ensures you have the capability to be as specific as possible in your filtering. ### Active Directory Install Procedure The installation procedure for the Roaming Client is based on the standard method of using Group Policy. The steps are as follows: 1. Create a distribution point for the MSI and MST files. This is done by creating a shared network folder on Windows Server. 2. Generate an Orca transform. This is an MST file which contains the Site Secret Key (SSK) for the building location you wish the clients to associate to, as well as any custom tags you wish to attach to the client. For different locations, you will need to generate a new transform file so the SSK is used only for a particular site. Otherwise, the clients will all be associated to one network. (note that the Orca tool can be obtained for free from the Windows 10 SDK) 3. Create & Assign GPOs. For each location (and for each unique configuration), create a GPO which is linked to your desired OU for that network. Assign both the MSI and MST files using the “Advanced” deployment method. A start-to-finish screencast of deploying the Roaming Client via Active Directory is below: ## Distributed Installation ### MST Transform Installation Some customers desire to mass deploy roaming clients but are not using Active Directory to distribute the installation. This is particularly true of an MSP which uses Remote Monitoring & Management (RMM) software. You can distribute the MSI with all of your options as an Orca transform file. Follow the instructions above to generate an MST, then deploy it via the below command (or your RMM equivalent): msiexec /qn /i "C:\path\to\DNSFilter_Agent_Setup.msi" TRANSFORMS="C:\path\to\orcatransformed.mst" ### Golden-Image Installation If using a standardized image to deploy or reinstall computers, installing the Roaming Client must be the very last step of the image setup process. If the Roaming Client is installed with an active network connection and allowed to register with our API, the Roaming Client will not receive a unique ID on each computer which received the standardized image. Please use the following steps to ensure the Roaming Client is installed, but does not register: 1. Download the Roaming Client Installer from the Dashboard 2. Disconnect all active network connections 3. Install the Roaming Client 4. Finalize Image ### Scripted Installation If using a RMM or other tool to install the Roaming Client, below is a useful PowerShell script which will download and install the Roaming Client without the need to distribute the MSI file to the computers. mkdir C:\temp Invoke-WebRequest -Uri "https://download.dnsfilter.com/User_Agent/Windows/DNSFilter_Agent_Setup.msi" -OutFile "C:\temp\DNSFilter_Agent_Setup.msi" msiexec /qn /i "C:\temp\DNSFilter_Agent_Setup.msi" NKEY="SITESECRETKEY" For Whitelabel Version: mkdir C:\temp Invoke-WebRequest -Uri "https://download.dnsfilter.com/User_Agent/Windows/DNS_Agent_Setup.msi" -OutFile "C:\temp\DNSFilter_Agent_Setup.msi" msiexec /qn /i "C:\temp\DNSFilter_Agent_Setup.msi" NKEY="SITESECRETKEY" ## Roaming Client Uninstall The Roaming Client can be removed via the Add/Remove programs control panel as most applications, unless a silent installation with the ARPSYSTEMCOMPONENT=1 option has been specified (which hides the client in the list of installed programs). A command-line uninstallation can also be called using an administrative command prompt or GPO: To Uninstall a Standard Account Roaming Client: wmic product where name="DNSFilter Agent" call uninstall To Uninstall an MSP Roaming Client: wmic product where name="DNS Agent" call uninstall ## Roaming Client Uninstall Notifications DNSFilter account administrators can be alerted when the Windows roaming client is uninstalled by users. This new capability provides visibility into unexpected uninstalls. Navigating to Deployments → Roaming Clients → Settings will allow an admin to enable notifications. ## Roaming Client Operation The Roaming Client functions by running a local proxy on 127.0.0.2:53 of the host. The client sets itself as the sole DNS server on the computer, so that all internet DNS requests are sent to DNSFilter. Before the Roaming Client changes the DNS settings, it records the DHCP-provided information for the DNS Suffix Search list and DNS servers. This allows it to intelligently route local queries to your local DNS servers for resolution (often these servers are AD Domain Controllers). The Roaming Client automatically detects when a new network adapter (wireless, wired, VPN, etc) is activated, and will make adjustments accordingly. ## Technical Details The Windows Roaming Client is comprised of three components: ### State Machine The State Machine decides what actions to take based on various system settings, user actions, and internal health checks. Switching networks, sleep/wake, close/open laptop lid, manually changing DNS settings are all examples of what the State Machine monitors and decides if changes need to occur. ### DNS Proxy The DNS Proxy is the service which binds to 127.0.0.2:53 and is responsible for deciding when to forward DNS requests to DNSFilter, or when to forward DNS requests to the local DNS servers. ### Tray Icon (Optional) The Tray Icon displays basic information about the status of the Roaming Client. Windows Tray Icon Statuses • If the tray icon is blue, it means that the client is functioning normally. The Windows system service is operational and the client has made contact with our servers. Filtering is active. • If the tray icon is green, it means the client is online and communicating over an encrypted connection. • If the tray icon is red, it means the client is not functioning and filtering is off. This indicates a problem with either the system service or with the communication route to our servers. ## Startup Process When the Windows Roaming Client system service starts, the following actions occur • The DNS Proxy binds to 127.0.0.2:53 (tcp and udp). • Fail: The Roaming Client service does not start. Troubleshoot • Success: The Roaming Client system service starts successfully. • The State Machine sends test DNS queries to DNSFilter to ensure the firewall is not blocking DNS resolution to 3rd-party DNS servers. • If DNSFilter servers cannot be reached over port 53/udp and tcp, attempt port 853 TLS • If DNSFilter servers cannot be reached over port 853 • Fail: The Roaming Client cannot filter DNS queries, and waits until it can reach DNSFilter over port 53 or 853. Troubleshoot • Success: The Roaming Client moves on to the next phase. • The State Machine imports the local list of DNS Suffixes from the Network Adapter properties so that it may forward local DNS queries to the DHCP-delegated, or statically-assigned DNS servers. • The DHCP-delegated, or statically set DNS servers are recorded by the Roaming Client, and used to resolve local DNS queries. • The State Machine sets the DNS server on the network adapter to 127.0.0.2 (DNS Proxy) • The DNS Proxy begins sending public DNS queries directly to DNSFilter, and any requests to *.local, RFC-1918 addresses, and domains which exist in the DNS Suffixes list (usually specified by the DHCP server or Active Directory) are sent to the DHCP-delegated/statically-assigned DNS servers that were originally assigned to the Network Adapter. ## Version Log You can find the history of Windows Roaming Client release notes on our public changelog. #### Was this article helpful? 4 out of 6 found this helpful Have more questions? Submit a request ### Comments 0 comments Article is closed for comments.
# NCERT solutions for class 10 Science: Chapter 12 electricty Intext Questions In this page we have NCERT solutions for class 10 Science: Chapter 12 electricty Intext Questions . Hope you like them and do not forget to like , social share and comment at the end of the page. Question 1. What does an electric circuit mean? Answer. Electric circuit is a continuous and closed path for electric current. It consists of of cell (or a battery), a plug key, electrical component(s), connecting wires etc. . Question 2. Define the unit of current. Answer. Unit of current is Ampere. If one Coulomb of charge flows through any section of a conductor in one second then current through it is said to be 1 Ampere. 1 A = 1Cs-1 Question 3. Calculate the number of electrons constituting one coulomb of charge. Solution. We know that charge q on a body is always denoted by q = ne where n is any integer positive or negative If q=1C and e= 1.6 ×10-19C (negative charge on electron) Then, Or, So, This way we can calculate the number of electrons on charged body if we know the total charge on the charged body. Question 4. Name a device that helps to maintain a potential difference across a conductor. Answer. Potential difference is the difference in electric pressure which results in the flow of electrons. Potential difference across the conductor is maintained by the sources of electricity such as cell, battery, power supply etc. Question 5. What is meant by saying that the potential difference between two points is 1 V? Answer. If 1 Joule of work is required to move charge of 1C from one point to another , then it is said that the potential difference between the two points is 1V. Question 6. How much energy is given to each coulomb of charge passing through a 6 V battery? Answer. Here we have to remember that “amount of work required to move each coulomb of charge is equal to energy given to it”. The expression to be used in solving this question is Here according to question, Charge = 1C and Potential difference=6V So, Work done = 6×1= 6J Therefore, 6J of energy is given to each Coulomb of charge passing through a battery of 6 V. Question 7. On what factors does the resistance of a conductor depend? Answer. The resistance of a conductor depends on following factors. • Material of the conductor • Temperature of the conductor • Length of the conductor • Area of cross-section of the conductor Question 8. Will current flow more easily through a thick wire or a thin wire of the same material, when connected to the same source? Why? Answer. Resistance of a wire is given by the relation From above equation we can see that resistance is inversely proportional to the area of cross-section of the wire. Thick wire means more area of cross-section and lower the resistance of wire. Similarly thin wire means less area of cross-section and wire would have higher resistance. Therefore, current can flow more easily through thick wire than a thin wire. Question 9. Let the resistance of an electrical component remains constant while the potential difference across the two ends of the component decreases to half of its former value. What change will occur in the current through it? Answer. From Ohm’s Law we have Now according to question the resistance of an electrical component remains constant while the potential difference across the two ends of the component decreases to half of its former value. So, we now have Therefore from Ohm’s law we can obtain the  as Therefore the amount of current flowing through the electric component is reduced to half. Note:- I have solved this question for the sake of clarity. You can also solve it analytically using proportionality of current and voltage according to Ohm’s Law. Question 10. Why are coils of electric toasters and electric irons made of an alloy rather than a pure metal? Answer. Coils of electric toasters and electric iron are made of an alloy rather then a pure metal because, (a) resistivity of an alloy is generally higher then that of constituent metals. (b) alloys have high melting point. (c) alloys do not oxidize. Question 11. Use the data in Table given below (a) Which among iron and mercury is a better conductor? (b) Which material is the best conductor? Answer. (a) Resistivity of iron = 10.0 x 10-8 Resistivity of mercury = 94.0 x 10-8 Comparing the resistivity of both iron and mercury we conclude that ,  resistivity of mercury is more than that of iron. This implies that iron is a better conductor than mercury. (b) It can be observed from above Table that the resistivity of silver is the lowest among the listed materials. Hence, it is the best conductor. Question 12. Draw a schematic diagram of a circuit consisting of a battery of three cells of 2 V each, a 5Ω  resistor, an 8Ω resistor, and a 12Ω  resistor, and a plug key, all connected in series. Three cells of potential 2 V, each one of these cells are connected in series therefore the potential difference of the combined battery will be 2 V + 2 V + 2 V = 6V. The following circuit diagram shows three resistors of resistances 5Ω , 8Ω  and 12Ω respectively connected in series and a battery of potential 6 V and a plug key which is closed means the current is flowing in the circuit. Question 13 Redraw the circuit of question 1, putting in an ammeter to measure the current through the resistors and a voltmeter to measure potential difference across the 12Ω resistor. What would be the readings in the ammeter and the voltmeter? Answer. An ammeter should be connected in the circuit in series with the resistors. To measure the potential difference across the resistor it should be connected in parallel, as shown in the following figure. The resistances are connected in series.Ohm's law can be used to obtain the readings of ammeter and voltmeter. According to Ohm's law, V = IR, Where, Potential difference, V = 6 V Current flowing through the circuit/resistors = I Resistance of the circuit, R = 5Ω + 8Ω + 12Ω = 25Ω I = V/R = 6/25 = 0.24 A Potential difference across 12Ω  resistor = V1 Current flowing through the 12Ω  resistor, I = 0.24A Therefore, using Ohm's law, we obtain V1 = IR = 0.24 x 12 = 2.88 V Therefore, the reading of the ammeter will be 0.24 A. The reading of the voltmeter will be 2.88 V. Question 14 Judge the equivalent resistance when the following are connected in parallel - (a) 1Ω and 106Ω, (b) 1Ω and 103Ω and 106Ω. Answer. (a) when 1Ω and 106Ω are connected in parallel: We know that for parallel combination of resistances equivalent resistance is given by the relation If R is the equivalent resistance of the parallel combination then Or, Therefore, equivalent resistance is nearly equal to 1Ω. (b) When 1Ω, 103Ω and 106Ω are connected in parallel: Let R be the equivalent resistance 0r, Which is the equivalent resistance of given resistances. Hence, in both given cases , the equivalent resistance is less than 1Ω Question 15. An electric lamp of 100Ω , a toaster of resistance 50Ω , and a water filter of resistance 500 Ω are connected in parallel to a 220 V source. What is the resistance of an electric iron connected to the same source that takes as much current as all three appliances, and what is the current through it? Answer. Resistance of electric lamp, R1 = 100Ω Resistance of toaster, R2 = 50Ω Resistance of water filter, R3 = 500Ω Potential difference of the source, V = 220V It is given in the question that these are connected in parallel combination. Equivalent resistance of resistances in parallel combination is Let R be the equivalent resistance of the circuit. According to Ohm’s Law , V=IR Or, Where I is the current flowing through the circuit. So, we have Therefore the current drawn by an electric iron connected to the same source of potential 220 V = 7.04 A Let R’ be the resistance of the electric iron. According to Ohm’s law, Therefore the resistance of the electric iron is 31.25Ω and the current flowing through it is 7.04 A. Question 16. What are the advantages of connecting electrical devices in parallel with the battery instead of connecting them in series? 1. There is no division of voltage among the appliances when connected in parallel. The potential difference across each appliance is equal to the supplied voltage. 2. The total effective resistance of the circuit can be reduced by connecting electrical appliances in parallel. 3. If one appliance fail to work, other will continue to work properly if they are connected in parallel combination. Question 17. How can three resistors of resistances 2Ω , 3Ω  and 6Ω be connected to give a total resistance of (a) 4Ω , (b) 1Ω? Answer. There are three resistors of resistances 2Ω , 3Ω , and 6Ω respectively. (a) In order to get 4Ω , resistance 2Ω resistance should be connected in series with the parallel combination of 3Ω and 6Ω resistances as shown below in the figure. This gives (b) In order to get 1Ω all three resistors should be connected in parallel combination as shown in this figure Equivalent resistance would be Question 18. What is (a) the highest, (b) the lowest total resistance that can be secured by combinations of four coils of resistance 4Ω , 8Ω , 12Ω , 24Ω ? Answer. (a) The highest resistance is secured by combining all four coil of resistances in series. (b) If these coils are connected in parallel, then the equivalent resistance will be the lowest, given by Question 19. Why does the cord of an electric heater not glow while the heating element does? Answer. The heating element of the heater is made up of alloy which has very high resistance so when current flows through the heating element, it becomes too hot and glows red. But the resistance of cord which is usually of copper or aluminum is very law so it does not glow. Also heat produced ‘H’ is given by the relation Thus, for same amount of current From this we can conclude that more heat is produced by the heating element as it has more resistance, this is the reason it glows. Question 20. Compute the heat generated while transferring 96000 coulomb of charge in one hour through a potential difference of 50 V. Given Charge, Q = 96000C, Time, t= 1hr Potential difference, V= 50 Volts Now we know that Question 21. An electric iron of resistance 20Ω takes a current of 5 A. Calculate the heat developed in 30 s. R=20Ω ; I= 5A and t=30s Question 22. What determines the rate at which energy is delivered by a current? Answer. The rate of consumption of electric energy in an electric appliance is called electric power. Hence, the rate at which energy is delivered by a current is the power of the appliance. Question 23. An electric motor takes 5 A from a 220 V line. Determine the power of the motor and the energy consumed in 2 h. Answer. Power (P) is given by the expression,P = VI Where, Voltage,V = 220 V Current, I = 5 A P= 220 x 5 = 1100 W Energy consumed by the motor = Pt Where, Time, t = 2 h Energy consumed = VIt = Pt = 1100 x 2 = 2200 Wh Given below are the links of some of the reference books for class 10 Science. You can use above books for extra knowledge and practicing different questions. ### Practice Question Question 1 Which among the following is not a base? A) NaOH B) $NH_4OH$ C) $C_2H_5OH$ D) KOH Question 2 What is the minimum resistance which can be made using five resistors each of 1/2 Ohm? A) 1/10 Ohm B) 1/25 ohm C) 10 ohm D) 2 ohm Question 3 Which of the following statement is incorrect? ? A) For every hormone there is a gene B) For production of every enzyme there is a gene C) For every molecule of fat there is a gene D) For every protein there is a gene Note to our visitors :- Thanks for visiting our website.
# What are the chances on watching the clock? [closed] This is a relatively straightforward little puzzle, but the answers are somewhat unintuitive or can prompt a new perspective. It might be an interesting little puzzle for a probability teaching example or job interview question. I hope it helps get you thinking, in an useful way! For the purpose of this puzzle, you have a digital clock that displays hours and minutes. The clock [display] changes instantaneously after 60 seconds, every 60 seconds (which you can approximate to 59.9999999999... if that helps below). For periods relevant to this puzzle, the clock is guaranteed to work perfectly and without ceasing. 1. If you stare at the clock for 6 seconds beginning at a random starting time, what is the probability you will observe it changing? 2. If you do what's described in #1 ten times independently of each other, what is the probability you will observe the clock changing? (Guidance question under spoiler tag). Should this be higher than, lower than, or the same as the answer to #1? 3. If you wanted the probability of observing a change to be 50%*, how many times would you have to do what's described in #1? 4. If the ten times described in #2 are sequential, so that you're watching for one continuous period, then what is the probability you will observe the clock changing? Have fun! (*): If you can't get 50% exactly, get as close as you can. • It's true that, often, statistics is unintuitive. But that doesn't make it a puzzle. – Rubio May 21 '18 at 16:34 • @Rubio It seemed on topic based on this question, this question, this question, this question, this question, and questions related to those, which are straightforward, usually (but not always) unintuitive, applications of statistics. Should all of these be moved/closed? – WBT May 22 '18 at 23:08 • The questions you linked all look to be puzzles, not straightforward application of expected mechanics that would be well known to anyone reasonably familiar with the topic. See in particular this question and its answer for an overview of Math vs Puzzling, and follow the links therein for more background if desired. If the unintuitive element in a question is only unintuitive to someone with a lack of familiarity with the subject, that’s not the kind of puzzling element we’re looking for. Not everything someone finds puzzling is a puzzle. – Rubio May 23 '18 at 0:46 1. You will observe the clock change time if you look at it any time from (instantaneously) after 6 seconds until right before the clock would normally change (aka xx:xx:00), so the probability is $\frac{6}{60}=\frac{1}{10}.$ 2. The probability that you don't see the clock change in one glance is $1-\frac{1}{10}=\frac{9}{10}.$ So the probability that you don't observe the clock change in any of those 10 instances is $(\frac{9}{10})^{10}$ and so the probability that you do see the clock change is $\boxed{1-\left(\frac{9}{10}\right)^{10}}$ which is around $0.651.$ 3. We're basically trying to solve $1-(0.9)^n=0.5$, so $\boxed{n=7}$ (actually, n comes out to $\log_{0.9}0.5,$ which is around $6.579$). 4. This is basically equivalent to watching the clock for a minute. That means that no matter what, at some point in the interval you'll observe the clock changing (unless you want to count the period from $0.000\dots 1$ seconds past the minute to $59.999\dots$ seconds past the minute as a valid interval), so the probability is $\boxed{1}.$ This definitely feels more like math than puzzles, tbh. • I think it's the type of puzzle that can introduce a math lesson and promote mathematical thinking/curiosity. – WBT May 17 '18 at 15:41 • I'm suggesting that this would probably fit better under math.stackexchange.com, as math puzzles tend to be frowned upon in this stackexchange, but I guess it's fine for now unless moved. – pie314271 May 17 '18 at 15:42 • (Also, thanks to whoever fixed the spoiler in #1) – pie314271 May 17 '18 at 15:58 1. 1 in 10, so 10% 2. This depends on whether you can time the intervals or not. If you take 10 consecutive intervals of 6 seconds (or choose them $60 \cdot n$ seconds apart, where $n$ is a natural number), you're guaranteed to see a change, so it's 100%. If the intervals are random and independent, the chance that you don't see a change is $(9/10)^{10} \approx 0.35$, so the chance that you do see at least one change is 1 minus that, so $\approx 0.65$. 3. Assuming the intervals are chosen independently, the solution is $\frac{\log(50%)}{\log(9/10)} \approx 6.58$. So 6 is too few times, and 7 too many, but the answer for 7 (52.2%) is closer than the one for 6 (46.9%). 4.
1,028 views Fill in the missing number in the series. $2$     $3$      $6$      $15$  ___  $157.5$       $630$ ### 1 comment 2 3 6 15 _________________ 157.5  630 this question is time consuming to find out the series in one go but with practice we can succeed. Actually this question has two multiple series going on . firstly of 0.5 multiplication but those 1.5 are incrementing by 1 and then multiplying. Secondly , we are multiplying by natural number 1 ,2 ,3 ……… 2 * 1.5 = 3 3 * 2  = 6 6 * 2.5 = 15 15 * 3 = 45 45 * 3.5 = 157.5 157.5 * 4 = 630 So , the answer is 45. $2\times 1.5=3$ $3\times 2=6$ $6\times 2.5=15$ $15\times 3=45$ is answer $45\times 3.5=157.5$   means each time increase multplication factor by $0.5$ by How you get this? Any trick for it. I have been trying since half hour. @ankit3009 these type of questions are common in government exams like SSC  so you can watch videos regarding number patterns on YouTube.
# Introduction Sometimes, we want an in-momery jpg or png image that is represented as binary data. But often, what we have got is image in numpy ndarray or PIL Image format. In this post, I describe how to convert numpy image or PIL Image object to binary data without saving the underlying image. # Introduction One key spirit of Vim is to accomplish something in as fewer key strokes as possible. When you repeat a command a few times in order to perform an action, you need to ask yourself if there is a better way to do it. Only in this way, can you make progress in mastering Vim. For example, when your want to delete five lines of texts, if you press dd five times, you are certainly doing it the wrong way. After looking up the Vim manual, you know that you can use 5dd or d4j: you only need three keystrokes instead of ten! The other day, I saw a post in a forum asking for help on how to quickly move the cursor inside a buffer. After using Neovim for nearly a year, I would like to share what I have learnt about fast movement and navigation inside Neovim/Vim. Recently, I was bitten by the unintuitive behaviour of glob.glob() and I think it would be beneficial to write down what I have found. In this post, I want to share how to use bindkeys command to solve a few issues when using Zsh. 6.18 快到了,加上在家里使用的 IKBC C87 青轴声音太大,敲击费力,所以动了换一把更加静音,触发力度更小的键盘的心思。在京东和淘宝上入手了多款键盘试用,不得不说,一把好的键盘真的是难选啊。自从去年双十一入手了一把 Leopold 红轴键盘以后,其他的键盘真的很难入我的眼睛了。试用过的几把键盘以及感受如下: Over the past few years, I have been using some dedicated note-taking software to take my notes. But all these tools I have tried are either slow or do not work well when I want to search some notes. Finally, I decided to take my notes in Markdown and convert them to PDF for reading. # Introduction Suppose that we have the following text in normal mode (cursor is indicated by |): |hello world if we use dw, we delete hello<Space>1 and only world is left; if we use de, hello is deleted and <Space>world is left. Have you ever wondered about why dw do not delete w while de will delete the o in hello? It seems that the motion e and w are somewhat inconsistent. It turns out that this has something to do with the exclusivity of motions in Vim. This is the series 3 of my blog posts about some nifty techniques of using Nvim. For other series, see Currently I am writing all my Python code using Neovim and a couple of plugins to provide auto-completion, linting, etc. Neovim has powerful ability in editing texts. But if you are in a browser and want to input some text, can we somehow utilize the editing power of Vim? In this post, I would like to share several ways to use Vim or Vim-like editing when you are working inside a browser. Many normal mode commands accept a count, which means to repeat the motion count times. For example, 3j moves the cursor 3 lines below the current line and 4w will move the cursor four words forward. Usually, the user-defined mappings can not take a count. Even if they can, they will most probably not work the way you expect them to. In this post, I will describe what I have learned to make a fairly complex mapping repeatable with a count. In this post, I want to talk about how to enable built-in spell check in Nvim. Some words are hard to type, it is handy if Neovim can provide auto-completion for the words we are typing. We can achieve word completion in Neovim in two ways. # Introduction I have been using Vim-airline for a while to customize my statusline. We can change the theme used for statusline with the many themes available in vim-airline-themes. Not all these themes looks good since it depends on the background color you use for Neovim and certainly your aesthetics. I only use a handful of themes myself and I change my themes when I feel bored with one theme. It occurs to me that I can write a simple script to randomly pick a theme from my favorite list1. It turns out writing such a script is not easy for Neovim newbies like me. In this post, I would like to share how I end up achieving what I want by mixing Vim script and Python script. This is the series 2 of the nifty Nvim techniques. • For series 1, see here. If you have used Sublime Text before, you may be familiar with the snippet function. Snippets let you input a trigger word and expand the trigger to some boilerplate code or string you do not want to repeat each time. You will increase your efficiency dramatically with the help of snippets.
As a part of the RcppDeepState project, which has been graciously funded by R Consortium, we are creating an easy way to use DeepState to fuzz test R packages with C++ code defined using Rcpp. DeepState requires the C++ programmer to define a “test harness” which is C++ source code without a main function, but with tests/expectations. The DeepState framework then compiles that test harness to an executable (with a main function) to which fuzz testing libraries can send input. Usually R runs as main, so we need to instead compile another program and link it to the R shared library, as documented in Writing R Extensions, section Embedding R under Unix-alikes. So I downloaded the R source code, R-3.6.3.tar.gz, and I looked for examples in the R-3.6.3/tests/Embedding directory: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ls *.c embeddedRCall.c Rerror.c Rpackage.c Rplot.c Rshutdown.c tryEval.c Rcpp.c RNamedCall.c RParseEval.c Rpostscript.c Rtest.c tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ There is also a Makefile that can be used to compile the simplest test program: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$rm -f Rtest *.o && make Rtest gcc -I"../../include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -c Rtest.c -o Rtest.o gcc -I"../../include" -DNDEBUG -I/usr/local/include -fpic -g -O2 -c embeddedRCall.c -o embeddedRCall.o ../../bin/R CMD gcc -Wl,--export-dynamic -fopenmp -L/usr/local/lib -o Rtest Rtest.o embeddedRCall.o -L"../../lib" -lR However when I ran that program as usual it seems there is some problem with the environment: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ ./Rtest Fatal error: R home directory is not defined The error message suggests that the problem may be fixed by setting R_HOME, but: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$R_HOME=~/lib/R ./Rtest Error in readRDS(mapfile) : cannot read workspace version 3 written by R 3.6.3; need R 3.5.0 or newer Error in attach(NULL, name = "Autoloads") : could not find function "attach" R version 3.4.4 (2018-03-15) -- "Someone to Lean On" Copyright (C) 2018 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. Error in options(repos = "http://cloud.r-project.org") : could not find function "options" Error: object '.ArgsEnv' not found Fatal error: unable to initialize the JIT tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ There still seems to be some problem above. It is definitely a problem with the environment, because running it via the code below (as found in the Makefile) works fine: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$R CMD ./Rtest R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. Loading required package: grDevices [1] 1 2 3 4 5 6 7 8 9 10 tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ Looking at the ldd output below, it is clear that the problem is that the system/ubuntu/apt R is being used, rather than the more recent R-3.6.3, tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ldd Rtest|grep libR libR.so => /usr/lib/libR.so (0x00007fca1e951000) tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ So I wrote my own Makefile (code below). First I start by defining some paths/flags to tell the compiler/linker where to find my R (under my home directory). R_HOME=${HOME}/lib/R R_LIB=${R_HOME}/lib R_INCLUDE=${R_HOME}/include CPPFLAGS=-I${R_INCLUDE} After that, the key to getting it to work is to specify the non-standard library directory using two command line arguments, as explained in a previous blog post. # R_LIB must be specified both using -L and via -Wl,-rpath= Rtest: Rtest.o embeddedRCall.o gcc -o Rtest Rtest.o embeddedRCall.o -L${R_LIB} -Wl,-rpath=${R_LIB} -lR R_HOME=${R_HOME} ./Rtest Finally the recipes below compile the two C source code files to object files. # -c option means to not link. Rtest.o: Rtest.c gcc${CPPFLAGS} Rtest.c -o Rtest.o -c embeddedRCall.o: embeddedRCall.c gcc ${CPPFLAGS} embeddedRCall.c -o embeddedRCall.o -c I saved this code to Makefile.mine and I get the following output when running it: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ rm -f *.o Rtest && make -f Makefile.mine gcc -I/home/tdhock/lib/R/include Rtest.c -o Rtest.o -c gcc -I/home/tdhock/lib/R/include embeddedRCall.c -o embeddedRCall.o -c gcc -o Rtest Rtest.o embeddedRCall.o -L/home/tdhock/lib/R/lib -Wl,-rpath=/home/tdhock/lib/R/lib -lR R_HOME=/home/tdhock/lib/R ./Rtest R version 3.6.3 (2020-02-29) -- "Holding the Windsock" Copyright (C) 2020 The R Foundation for Statistical Computing Platform: x86_64-pc-linux-gnu (64-bit) R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. Natural language support but running in an English locale R is a collaborative project with many contributors. 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ Note that the R_HOME environment variable must be specified, as in the code above. If not, we get an error, as in the code below: tdhock@maude-MacBookPro:~/R/R-3.6.3/tests/Embedding$ ./Rtest
## Multi-Agent Off-Policy TDC with Near-Optimal Sample and Communication Complexities ### Ziyi Chen, Yi Zhou, Rong-Rong Chen 03 Apr 2022, 16:30 (modified: 30 Jun 2022, 11:19)Accepted by TMLREveryone Abstract: The finite-time convergence of off-policy temporal difference (TD) learning has been comprehensively studied recently. However, such a type of convergence has not been established for off-policy TD learning in the multi-agent setting, which covers broader reinforcement learning applications and is fundamentally more challenging. This work develops a decentralized TD with correction (TDC) algorithm for multi-agent off-policy TD learning under Markovian sampling. In particular, our algorithm avoids sharing the actions, policies and rewards of the agents, and adopts mini-batch sampling to reduce the sampling variance and communication frequency. Under Markovian sampling and linear function approximation, we proved that the finite-time sample complexity of our algorithm for achieving an $\epsilon$-accurate solution is in the order of $\mathcal{O}\big(\frac{M\ln\epsilon^{-1}}{\epsilon(1-\sigma_2)^2}\big)$, where $M$ denotes the total number of agents and $\sigma_2$ is a network parameter. This matches the sample complexity of the centralized TDC. Moreover, our algorithm achieves the optimal communication complexity $\mathcal{O}\big(\frac{\sqrt{M}\ln\epsilon^{-1}}{1-\sigma_2}\big)$ for synchronizing the value function parameters, which is order-wise lower than the communication complexity of the existing decentralized TD(0). Numerical simulations corroborate our theoretical findings.
• Volume 122, Issue 2 April 2013,   pages  271-558 • Landscape level assessment of critically endangered vegetation of Lakshadweep islands using geo-spatial techniques The conservation of biodiversity is essential for human survival and quality of the environment. Lakshadweep islands are vulnerable to global change and the representing remnant natural vegetation. Landscape fragmentation, disturbance regimes and biological richness have been studied using geo-spatial techniques. Littoral vegetation is the only natural vegetation type of Lakshadweep islands. Altogether 59 patches of the littoral vegetation occupying an area of 137.2 ha were identified. 58.06% of the littoral vegetation patches belongs to the patch-size class of &gt; 5 ha. The remnant natural vegetation surviving with patches of less than 20 ha size indicates severe anthropogenic pressure. The fragmentation of littoral vegetation habitat into smaller isolated patches poses one of the key threats to biodiversity and coastal environment. Phytosociological observations revealed distinct plant communities and presence of invasive species in littoral vegetation. The high disturbance areas accounted for 59.11% area of the total vegetation. The overall spatial distribution of biological richness (BR) in Lakshadweep shows maximum BR at low level (78%), followed by medium (19%), high (2%) and very high (1%). The study emphasizes the importance of conserving the remnant natural vegetation, which is critically endangered. • Endemism due to climate change: Evidence from Poeciloneuron Bedd. (Clusiaceae) leaf fossil from Assam, India A fossil leaf resembling Poeciloneuron indicum Bedd. (Clusiaceae) is described from the Late Oligocene (Chattian 28.4–23 Myr) sediments of Assam. The modern analogue is endemic to the Western Ghats which is situated in the same palaeolatitude. Its presence, along with other known fossil records, indicates that the seasonality in temperature was less pronounced and CMMT (cold month mean temperature) was not less than 18°C with plenty of rainfall, in the region during the period of deposition. The study also indicates that the plant phenology is sensitive towards climate change. The present study is in congruence with the global data. • Palynostratigraphy and depositional environment of Vastan Lignite Mine (Early Eocene), Gujarat, western India Early Eocene sedimentary successions of south Asia, are marked by the development of extensive fossilbearing, lignite-rich sediments prior to the collision of India with Asia and provide data on contemporary equatorial faunal and vegetational assemblages. One such productive locality in western India is the Vastan Lignite Mine representing approximately a 54–52 Ma sequence dated by the presence of benthic zone marker species, Nummulites burdigalensis burdigalensis. The present study on Vastan Lignite Mine succession is based on the spore-pollen and dinoflagellate cyst assemblages and documents contemporary vegetational changes. 86 genera and 105 species belonging to algal remains (including dinoflagellate cysts), fungal remains, pteridophytic spores and angiospermous pollen grains have been recorded. On the basis of first appearance, acme and decline of palynotaxa, three cenozones have been recognized and broadly reflect changing palaeodepositional environments. These are in ascending stratigraphic order (i) Proxapertites Spp. Cenozone, (ii) Operculodinium centrocarpum Cenozone and (iii) Spinizonocolpites Spp. Cenozone. The basal sequence is lagoonal, palm-dominated and overlain by more open marine conditions with dinoflagellate cysts and at the top, mangrove elements are dominant. The succession has also provided a unique record of fish, lizards, snakes, and mammals. • Nodular features from Proterozoic Sonia Sandstone, Jodhpur Group, Rajasthan: A litho-biotectonic perspective The Sonia Sandstone of Proterozoic Jodhpur Group, Marwar Supergroup, exposed around the Sursagar dam area of Jodhpur town, Rajasthan exposes two varieties of nodular features, often spectacular in shape and size. On the basis of mode of occurrence (intra- or interbed) and stratal involvement (single or multiple) the features are classified as Type I and II. From granulometric and microscopic (optical and scanning electron) studies carried out on sandstones from the nodules and their host sandstones, geochemical analysis (SEM-EDAX) of intragranular cement present within Type I nodules, and appreciation of control of associated fracture system within Type II nodules, it is proposed that the two types of nodules vary in their formative mechanism and stage of formation. While Type I nodules are identified as product of processes operative at the early diagenetic, pre-lithification stage, the Type II nodules are undoubtedly the result of post-lithification origin triggered by formation of fracture system. Here we propose generation of vapour pressure (not exceeding the overlying hydrostatic pressure) by decay of thin, laterally impersistent organic mat as the causal factor for intrabed nodule (Type I) formation, which forced rarefication of local grain packing \tetit {vis-a-vis} early diagenetic silica cementation. The study warrants necessity of more studies on nodules to understand possible roles of organic matter and bedtransgressive fracture systems in their formation, going beyond the generalised secondary mineralization hypothesis. • Influence of epicentral distance on local seismic response in Kolkata City, India The influence of source and epicentral distance on the local seismic response in the Kolkata city is investigated by computing the seismic ground motion along 2-D geological cross-sections in the Kolkata city for the earthquake that occurred on 12 June 1897 ($M_w$ = 8.1; focal mechanism: dip = 57°, strike = 110° and rake = 76°; focal depth = 9 km) in Shillong plateau. For the estimation of ground motion parameters, a hybrid technique is used, which is the combination of modal summation and finite difference method. This technique allows the estimation of site specific ground motion for various events located at different distances from Kolkata city, taking into account simultaneously the position and geometry of the seismic source, the mechanical properties of the propagation medium and the geotechnical properties of the site. The epicenter of the Shillong earthquake is about 460 km away from Kolkata. The estimated peak ground acceleration (PGA) varies in the range of 0.11–0.18 g and this range corresponds to the intensity of IX to X on the Mercalli-Cancani-Sieberg (MCS) scale and VIII on the Modified Mercalli (MM) scale. The maximum amplification in terms of response spectral ratio (RSR) varies from 10 to 12 in the frequency range 1.0–1.5 Hz. These amplifications occur in correspondence to low-velocity shallow, loose soil deposit. The comparison of these results with earlier ones obtained considering the Calcutta earthquake that occurred on 15 April 1964 ($M_w$ = 6.5; focal mechanism: dip = 32°, strike = 232° and rake = 56°; focal depth = 36 km) shows that the source parameters (magnitude and focal mechanism) and epicentral distance play an important role on site response but the variation in the frequency of the peak values (RSR) is negligible. The obtained results match with observed reported intensities in Kolkata region. • Comparative analysis of Vening-Meinesz Moritz isostatic models using the constant and variable crust-mantle density contrast – a case study of Zealandia We compare three different numerical schemes of treating the Moho density contrast in gravimetric inverse problems for finding the Moho depths. The results are validated using the global crustal model CRUST2.0, which is determined based purely on seismic data. Firstly, the gravimetric recovery of the Moho depths is realized by solving Moritz’s generalization of the Vening-Meinesz inverse problem of isostasy while the constant Moho density contrast is adopted. The Pratt-Hayford isostatic model is then facilitated to estimate the variable Moho density contrast. This variable Moho density contrast is subsequently used to determine the Moho depths. Finally, the combined least-squares approach is applied to estimate jointly the Moho depths and density contract based on a priori error model. The EGM2008 global gravity model and the DTM2006.0 global topographic/bathymetric model are used to generate the isostatic gravity anomalies. The comparison of numerical results reveals that the optimal isostatic inverse scheme should take into consideration both the variable depth and density of compensation. This is achieved by applying the combined least-squares approach for a simultaneous estimation of both Moho parameters. We demonstrate that the result obtained using this method has the best agreement with the CRUST2.0 Moho depths. The numerical experiments are conducted at the regional study area of New Zealand’s continental shelf. • Landslide susceptibility mapping using support vector machine and GIS at the Golestan Province, Iran The main goal of this study is to produce landslide susceptibility map using GIS-based support vector machine (SVM) at Kalaleh Township area of the Golestan province, Iran. In this paper, six different types of kernel classifiers such as linear, polynomial degree of 2, polynomial degree of 3, polynomial degree of 4, radial basis function (RBF) and sigmoid were used for landslide susceptibility mapping. At the first stage of the study, landslide locations were identified by aerial photographs and field surveys, and a total of 82 landslide locations were extracted from various sources. Of this, 75% of the landslides (61 landslide locations) are used as training dataset and the rest was used as (21 landslide locations) the validation dataset. Fourteen input data layers were employed as landslide conditioning factors in the landslide susceptibility modelling. These factors are slope degree, slope aspect, altitude, plan curvature, profile curvature, tangential curvature, surface area ratio (SAR), lithology, land use, distance from faults, distance from rivers, distance from roads, topographic wetness index (TWI) and stream power index (SPI). Using these conditioning factors, landslide susceptibility indices were calculated using support vector machine by employing six types of kernel function classifiers. Subsequently, the results were plotted in ArcGIS and six landslide susceptibility maps were produced. Then, using the success rate and the prediction rate methods, the validation process was performed by comparing the existing landslide data with the six landslide susceptibility maps. The validation results showed that success rates for six types of kernel models varied from 79% to 87%. Similarly, results of prediction rates showed that RBF (85%) and polynomial degree of 3 (83%) models performed slightly better than other types of kernel (polynomial degree of 2 = 78%, sigmoid = 78%, polynomial degree of 4 = 78%, and linear = 77%) models. Based on our results, the differences in the rates (success and prediction) of the six models are not really significant. So, the produced susceptibility maps will be useful for general land-use planning. • An assessment on the use of bivariate, multivariate and soft computing techniques for collapse susceptibility in GIS environ The paper presented herein compares and discusses the use of bivariate, multivariate and soft computing techniques for collapse susceptibility modelling. Conditional probability (CP), logistic regression (LR) and artificial neural networks (ANN) models representing the bivariate, multivariate and soft computing techniques were used in GIS based collapse susceptibility mapping in an area from Sivas basin (Turkey). Collapse-related factors, directly or indirectly related to the causes of collapse occurrence, such as distance from faults, slope angle and aspect, topographical elevation, distance from drainage, topographic wetness index (TWI), stream power index (SPI), Normalized Difference Vegetation Index (NDVI) by means of vegetation cover, distance from roads and settlements were used in the collapse susceptibility analyses. In the last stage of the analyses, collapse susceptibility maps were produced from the models, and they were then compared by means of their validations. However, Area Under Curve (AUC) values obtained from all three models showed that the map obtained from soft computing (ANN) model looks like more accurate than the other models, accuracies of all three models can be evaluated relatively similar. The results also showed that the conditional probability is an essential method in preparation of collapse susceptibility map and highly compatible with GIS operating features. • Modelling soil erosion risk based on RUSLE-3D using GIS in a Shivalik sub-watershed The RUSLE-3D (Revised Universal Soil Loss Equation-3D) model was implemented in geographic information system (GIS) for predicting the soil loss and the spatial patterns of soil erosion risk required for soil conservation planning. High resolution remote sensing data (IKONOS and IRS LISS-IV) were used to prepare land use/land cover and soil maps to derive the vegetation cover and the soil erodibility factor whereas Digital Elevation Model (DEM) was used to generate spatial topographic factor. Soil erodibility (K) factor in the sub-watershed ranged from 0.30 to 0.48. The sub-watershed is dominated by natural forest in the hilly landform and agricultural land in the piedmont and alluvial plains. Average soil loss was predicted to be lowest in very dense forest and highest in the open forest in the hilly landform. Agricultural land-1 and agriculture land-2 to have moderately high and low soil erosion risk, respectively. The study predicted that 15% area has ‘moderate’ to ‘moderately high’ and 26% area has high to very high risk of soil erosion in the sub-watershed. • Using artificial neural network approach for modelling rainfall–runoff due to typhoon In Taiwan, owing to the nonuniform temporal and spatial distribution of rainfall and high mountains all over the country, hydrologic systems are very complex. Therefore, preventing and controlling flood disasters is imperative. Nevertheless, water level and flow records are essential in hydrological analysis for designing related water works of flood management. Due to the complexity of the hydrological process, reliable runoff is hardly predicted by applying linear and non-linear regression methods. Therefore, in this study, a model for estimating runoff by using rainfall data from a river basin is developed and a neural network technique is employed to recover missing data. For achieving the objectives, hourly rainfall and flow data from Nanhe, Taiwu, and Laii rainfall stations and Sinpi flow station in the Linbien basin are used. The data records were of 27 typhoons between the years 2005 and 2009. The feed forward back propagation network (FFBP) and conventional regression analysis (CRA) were employed to study their performances. From the statistical evaluation, it has been found that the performance of FFBP exceeded that of regression analysis as reflected by the determination coefficients $R^2$, which were 0.969 and 0.284 for FFBP and CRA, respectively. • A modified calculation model for groundwater flowing to horizontal seepage wells The simulation models for groundwater flowing to horizontal seepage wells proposed by Wang and Zhang (2007) are based on the theory of coupled seepage-pipe flow model which treats the well pipe as a highly permeable medium. However, the limitations of the existing model were found during applications. Specifically, a high-resolution grid is required to depict the complex structure of horizontal seepage wells; the permeability of the screen or wall material of radiating bores is usually neglected; and the irregularly distributed radiating bores cannot be accurately simulated. A modified calculation model of groundwater flowing to a horizontal seepage well is introduced in this paper. The exchange flow between well pipe and aquifer couples the turbulent flow inside the horizontal seepage well with laminar flow in the aquifer. The modified calculation model can reliably calculate the pumpage of a real horizontal seepage well. The characteristics of radiating bores, including the diameter, the permeability of screen material and irregular distribution of radiating bores, can be accurately depicted using the modified model that simulates the scenario in which several horizontal seepage wells work together. • Geochemical processes controlling the groundwater quality in lower Palar river basin, southern India Hydrogeochemical study of groundwater was carried out in a part of the lower Palar river basin, southern India to determine the geochemical processes controlling the groundwater quality. Thirty-nine groundwater samples were collected from the study area and analysed for pH, Eh, EC, Ca, Mg, Na, K, HCO3, CO3, Cl and SO4. The analysed parameters of the groundwater in the study area were found to be well within the safe range in general with respect to the Bureau of Indian Standards for drinking water except for few locations. The results of these analyses were used to identify the geochemical processes that are taking place in this region. Cation exchange and silicate weathering are the important processes controlling the major ion distribution of the study area. Mass balance reaction model NETPATH was used to assess the ion exchange processes. High concentration of Ca in groundwater of the study area is due to the release of Ca by aquifer material and adsorption of Na due to ion exchange processes. Groundwater of the study area is suitable for drinking and irrigation purposes except for few locations. • Modelling catchment hydrological responses in a Himalayan Lake as a function of changing land use and land cover In this paper, we evaluate the impact of changing land use/land cover (LULC) on the hydrological processes in Dal lake catchment of Kashmir Himalayas by integrating remote sensing, simulation modeling and extensive field observations. Over the years, various anthropogenic pressures in the lake catchment have significantly altered the land system, impairing, \texttit {inter-alia}, sustained biotic communities and water quality of the lake. The primary objective of this paper was to help a better understanding of the LULC change, its driving forces and the overall impact on the hydrological response patterns. Multi-sensor and multi-temporal satellite data for 1992 and 2005 was used for determining the spatio-temporal dynamics of the lake catchment. Geographic Information System (GIS) based simulation model namely Generalized Watershed Loading Function (GWLF) was used to model the hydrological processes under the LULC conditions. We discuss spatio-temporal variations in LULC and identify factors contributing to these variations and analyze the corresponding impacts of the change on the hydrological processes like runoff, erosion and sedimentation. The simulated results on the hydrological responses reveal that depletion of the vegetation cover in the study area and increase in impervious and bare surface cover due to anthropogenic interventions are the primary reasons for the increased runoff, erosion and sediment discharges in the Dal lake catchment. This study concludes that LULC change in the catchment is a major concern that has disrupted the ecological stability and functioning of the Dal lake ecosystem. • Numerical modelling of seawater intrusion in Shenzhen (China) using a 3D densitydependent model including tidal effects During the 1990s, groundwater overexploitation has resulted in seawater intrusion in the coastal aquifer of the Shenzhen city, China. Although water supply facilities have been improved and alleviated seawater intrusion in recent years, groundwater overexploitation is still of great concern in some local areas. In this work we present a three-dimensional density-dependent numerical model developed with the FEFLOW code, which is aimed at simulating the extent of seawater intrusion while including tidal effects and different groundwater pumping scenarios. Model calibration, using waterheads and reported chloride concentration, has been performed based on the data from 14 boreholes, which were monitored from May 2008 to December 2009. A fairly good fitness between the observed and computed values was obtained by a manual trial-and-error method. Model prediction has been carried out forward 3 years with the calibrated model taking into account high, medium and low tide levels and different groundwater exploitation schemes. The model results show that tide-induced seawater intrusion significantly affects the groundwater levels and concentrations near the estuarine of the Dasha river, which implies that an important hydraulic connection exists between this river and groundwater, even considering that some anti-seepage measures were taken in the river bed. Two pumping scenarios were considered in the calibrated model in order to predict the future changes in the water levels and chloride concentration. The numerical results reveal a decreased tendency of seawater intrusion if groundwater exploitation does not reach an upper bound of about 1.32 × 104 m3/d. The model results provide also insights for controlling seawater intrusion in such coastal aquifer systems. • 𝑛-Alkanes in surficial sediments of Visakhapatnam harbour, east coast of India Surface sediments collected from 19 stations along Visakhapatnam harbour were analysed for organic carbon (OC), 𝛿13CoC, total lipids (TL), total hydrocarbon (THC), 𝑛-alkane concentration and composition. OC, 𝛿13CoC, TL and THC ranged from 0.6% to 7.6%, -29.3 to -23.8‰, 300 to 14,948 𝜇 g g−1 dw, and 0.2 to 2,277 𝜇 g g−1 dw, respectively. Predominance of even carbon numbers 𝑛-alkanes C12–C21 with carbon preference index (CPI) of &lt; 1 suggests major microbial influence. Fair abundance of odd carbon number 𝑛-alkanes in the range of C15–C22 and C23–C33 indicates some input from phytoplankton and terrestrial sources, respectively. Petrogenic input was evident from the presence of hopanes and steranes. The data suggest that organic matter (OM) sources varied spatially and were mostly derived from mixed source. • Validation of OCM-2 sensor performance in retrieving chlorophyll and TSM along the southwest Bay of Bengal coast The Chlorophyll and Total Suspended Matter (TSM) data retrieved from Ocean Colour Monitor (OCM-2) onboard Oceansat-2 were tested for the accuracy using in-situ measurements made along the southwest Bay of Bengal coast during cruises and monthly samplings synchronized with satellite overpass from January 2010 to May 2011. The observed range of in-situ chlorophyll 𝑎 and TSM concentrations were 0.10–4.60 𝜇 gl−1 and 12.70–34.56 mgl−1 respectively, while OCM-2 derived chlorophyll 𝑎 and TSM concentration ranged from 0.324 to 1.552 𝜇 gl−1 and 3.537 to 32.11 $mgl^{−1}$, respectively. The in-situ dataset was grouped into low (0.1-0.5 𝜇 gl−1), moderate (0.51-1.0 𝜇 gl−1) and high (&lt; 1 𝜇 gl−1) chlorophyll concentration and low ($12.7–17.81 mgl^{−1}$), moderate ($18.1–29.0 \; mgl^{−1}$) and high (lt; 30 $mgl^{−1}$) TSM concentration for evaluating the performance of algorithms against different ranges of field measurements. The OCM-2 chlorophyll retrieval algorithm (OC4V4) showed a systematic and large overestimation of low chlorophyll values with $r^{2} = 0.607$, root mean square error (RMSE) = 0.33 𝜇 gl−1 and mean normalized bias (MNB) = 1.57 and consistent underestimation of high chlorophyll values with $r^2 = 0.497$, RMSE = 1.486 𝜇 gl−1 and MNB = 0.52 especially at nearshore waters due to the interference of suspended matter and coloured dissolved organic matter. However, moderate range of chlorophyll values showed better performance of OC4V4 algorithm in chlorophyll retrieval with $r^{2} = 0.676$, RMSE = 0.254 𝜇 gl−1 and MNB = 0.09 when compared to low and high chlorophyll values. The TSM algorithm (modified algorithm of Tassan 1994) showed large underestimation in TSM retrievals and this was proved by the statistical results which shown maximum $r^{2} = 0.551$ for low TSM values with less RMSE = 0.909 $mgl^{−1}$ and MNB = 0.616 error compared to moderate and high TSM values. OCM-2 retrieved TSM values were not well correlated with in-situ TSM concentration and constantly underestimates four times lesser than the in-situ measurements especially near the coast when TSM concentration was measured high. Though there was significant correlation exists between OCM-2 retrieved chlorophyll and TSM with in-situ measurements, the empirical algorithms employed did not give logical retrieval of both chlorophyll and TSM for the southwest Bay of Bengal (BoB). Thus, the present study revealed that the OCM-2 chlorophyll and TSM retrieval algorithms need to be tested further with extensive in-situ dataset around BoB to improve the regional algorithms for accurate measurements of chlorophyll and TSM in this region. • Provenance and temporal variability of ice rafted debris in the Indian sector of the Southern Ocean during the last 22,000 years Ice rafted debris (IRD) records were studied in two sediment cores (SK200/22a and SK200/27) from the sub-Antarctic and Polar frontal regime of the Indian sector of Southern Ocean for their distribution and provenance during the last 22,000 years. The IRD fraction consists of quartz and lithic grains, with the lithic grains dominated by volcaniclastic materials. IRD content was high at marine isotope stage 2 but decreased dramatically to near absence at the Termination 1 and the Holocene. The concentration of IRD at glacial section of the core SK200/27 was nearly twice that of SK200/22a. Moreover, IRD were more abundant at the last glacial maxima (LGM) in SK200/27 with its peak abundance proceeding by nearly two millennia than at SK200/22a. It appears that an intensification of Antarctic glaciation combined with a northward migration of the Polar Front during LGM promoted high IRD flux at SK200/27 and subsequent deglacial warming have influenced the IRD supply at SK200/22a. Quartz and lithic grains may have derived from two different sources, the former transported from the Antarctic mainland, while the latter from the islands of volcanic origin from Southern Ocean. Sea-ice, influenced by the Antarctic Circumpolar Current is suggested to be a dominant mechanism for the distribution of lithic IRD in the region. • Characterizing spatial and seasonal variability of carbon dioxide and water vapour fluxes above a tropical mixed mangrove forest canopy, India The above canopy carbon dioxide and water vapour fluxes were measured by micrometeorological gradient technique at three distant stations, within the world’s largest mangrove ecosystem of Sundarban (Indian part), between April 2011 and March 2012. Quadrat analysis revealed that all the three study sites are characterized by a strong heterogeneity in the mangrove vegetation cover. At day time the forest was a sink for CO2, but its magnitude varied significantly from −0.39 to −1.33 mg m−2 s−1. The station named Jharkhali showed maximum annual fluxes followed by Henry Island and Bonnie Camp. Day time fluxes were higher during March and October, while in August and January the magnitudes were comparatively lower. The seasonal variation followed the same trend in all the sites. The spatial variation of CO2 flux above the canopy was mainly explained by the canopy density and photosynthetic efficiency of the mangrove species. The CO2 sink strength of the mangrove cover in different stations varied in the same way with the CO2 uptake potential of the species diversity in the respective sites. The relationship between the magnitude of day time CO2 uptake by the canopy and photosynthetic photon flux was defined by a non-linear exponential curve ($R^2$ ranging from 0.51 to 0.60). Water vapour fluxes varied between 1.4 and 69.5 mg m−2 s−1. There were significant differences in magnitude between day and night time water vapour fluxes, but no spatial variation was observed. • Global distribution of pauses observed with satellite measurements Several studies have been carried out on the tropopause, stratopause, and mesopause (collectively termed as ‘pauses’) independently; however, all the pauses have not been studied together. We present global distribution of altitudes and temperatures of these pauses observed with long-term space borne high resolution measurements of Global Positioning System (GPS) Radio Occultation (RO) and Sounding of the Atmosphere using Broadband Emission Radiometry (SABER) aboard Thermosphere-Ionosphere-Mesosphere Energetics and Dynamics (TIMED) satellite. Here we study the commonality and differences observed in the variability of all the pauses. We also examined how good other datasets will represent these features among (and in between) different satellite measurements, re-analysis, and model data. Hemispheric differences observed in all the pauses are also reported. In addition, we show that asymmetries between northern and southern hemispheres continue up to the mesopause. We analyze inter and intra-seasonal variations and long-term trends of these pauses at different latitudes. Finally, a new reference temperature profile is shown from the ground to 110 km for tropical, mid-latitudes, and polar latitudes for both northern and southern hemispheres. • Recovery curves of the lightning discharges occurring in the dissipation stage of thunderstorms Measurements of atmospheric electric field made below two thunderstorms show that all lightning discharges occurring in the dissipating stage of a thunderstorm occur at almost the same value of the predischarge electric field at the ground surface. The observation is explained on the basis of the shielding of the electric fields generated by the positive charge in the downdrafts by the negative charge in the screening layers formed around them in the subcloud layer. Our observations suggest that in the dissipating stage of the thunderstorm, the charge generating mechanisms in cloud have ceased to operate and the charge being transported from the upper to lower regions of cloud by downdrafts is the only in-cloud process affecting the surface electric field and/or enhancing the electric field stress in and below the cloud base to cause yet another lightning discharge. • Ventilation coefficient trends in the recent decades over four major Indian metropolitan cities Thirty years radiosonde data (1971–2000) at 00 UTC for winter months over four major Indian metros, viz., Mumbai, Delhi, Kolkata and Chennai is analysed to study the trends and long term variations in ventilation coefficients and the consequences on the air quality due to these variations in the four metros. A decreasing trend in ventilation coefficient is observed in all the four metros during the 30 years period indicating increasing pollution potential and a degradation in the air quality over these urban centers. In Delhi, the ventilation coefficient decreased at the rate of 49 and 32 m2/s/year in the months of December and February, respectively during the 30-year period. In Mumbai, the average decrease in ventilation coefficient in winter months is about 15 m2/s/year whereas for Kolkata it is 14 and 17 m2/s/year in December and February, respectively. A decreasing trend in ventilation coefficient is observed in Chennai too although it is not significant. The decreasing ventilation coefficient increased the ground level pollution thereby deteriorating the air quality for the urban population. For Mumbai and Kolkata, decreasing mixing depths and decreasing wind speed contributed to the decreasing ventilation coefficient whereas for Delhi and Chennai decreasing wind speed was responsible for the decrease in ventilation coefficient. Further, the pollution potential was much higher in Delhi which is an inland station as compared to Mumbai, Kolkata and Chennai which are coastal stations under the influence of marine environment. Compared to Delhi, the pollution potential over these three metros was lower as the prevailing sea-breeze helped in the dispersal of pollutants thereby reducing their ground level concentration. • Seasonal forecasting of Bangladesh summer monsoon rainfall using simple multiple regression model In this paper, the development of a statistical forecasting method for summer monsoon rainfall over Bangladesh is described. Predictors for Bangladesh summer monsoon (June–September) rainfall were identified from the large scale ocean–atmospheric circulation variables (i.e., sea-surface temperature, surface air temperature and sea level pressure). The predictors exhibited a significant relationship with Bangladesh summer monsoon rainfall during the period 1961–2007. After carrying out a detailed analysis of various global climate datasets; three predictors were selected. The model performance was evaluated during the period 1977–2007. The model showed better performance in their hindcast seasonal monsoon rainfall over Bangladesh. The RMSE and Heidke skill score for 31 years was 8.13 and 0.37, respectively, and the correlation between the predicted and observed rainfall was 0.74. The BIAS of the forecasts (% of long period average, LPA) was −0.85 and Hit score was 58%. The experimental forecasts for the year 2008 summer monsoon rainfall based on the model were also found to be in good agreement with the observation. • # Journal of Earth System Science Volume 129, 2020 All articles Continuous Article Publishing mode • # Editorial Note on Continuous Article Publication Posted on July 25, 2019
# Cayley’s formula In the last post I’ve introduced the term of trees and proved a theorem that allows us to fully understand trees. They are connected, they have $n - 1$ edges (where $n$ is the number of vertices) and they have no cycles. I’ve also presented the term of a spanning sub-graph – which is a sub-graph $H$ of a graph $G$ such that $V(H)=V(G)$. Today I would like to discuss about spanning trees – which are exactly what you thinks they are: A spanning subgraph which is also a tree. As it turns out, spanning trees are very important, therefore, people started wondering how many spanning trees are there in a graph. Cayley’s formula gives us a (partial) solution, it tells us how many spanning trees are there in the complete graph $K_n$. For example, consider all the spanning trees in $K_3$: There are only 3 here, but that makes sense cause we don’t have too many options. What about $K_4$? Well… that’s escalated quickly! There are 16 spanning trees in contrast to only 3 in $K_3$ – I don’t even want to start drawing the spanning trees of $K_5$… But if you’re wondering, there are $125$ of them. ## The formula I am going to denote the number of spanning trees of $K_n$ as $t_n$. I want you to notice some stuff before I am presenting the formula: You may notice that some spanning trees are isomorphic to each other, for example, all of the spanning trees of $K_3$ are isomorphic. However, I still consider them as different trees. Why? Let’s name the vertices of $K_3$: I think it is clearer now, for example, the left spanning tree in the example is the graph: T_1=(\{1,2,3\},\{\{1,2\},\{1,3\}\}) On the other hand, the graph on the middle is: T_2=(\{1,2,3\},\{\{1,2\},\{2,3\}\}) Clearly, they are not the same, but The only thing that makes them really different is the lable of the vertices. Thus, we are counting labeled trees, and that’s an important thing to understand – If we considered isomorphic trees as the same, we would have get that the number of spanning trees in $K_3$ is one – and that is not what I am aiming for. I also want you to understand that we can treat any graph with $n$ vertices as a subgraph of $K_n$. Therefore, our question is equivalent to the question: “How many trees with $n$ vertices are there?” OK, we are now ready to present Cayley’s formula: The number of spanning trees of $K_n$ is exactly $n^{n-2}$. This formula explains why the number of spanning trees ‘grew up’ so fast when we moved from $K_3$ to $K_4$. Notice how simple the formula is – it is very short and even a high-schooler can understand it. ## Goals for this post After we’ve seen Cayley’s formula, we also need to prove it and understand why it works. The proof I will bring today is a proof from 1981 by Joyal. The beautiful thing about this proof, is that it gives us an algorithm to randomally generate trees! Therefore the rest of the post will be splitted into 3 parts: 1. Some preparations for the proof. 2. The proof. 3. An actual algorithm that generates trees. In order to understand the algorithm, you need to understand the proof as well, however, if you understand the proof and you are not a fan of algorithms, you can skip this part without a problem, since I will not use it in the upcoming posts. However, I do suggest you to check it out, in my opinion, it is really cool to see how we can make the computer do the hard work for us in such a simple way. ## preparations for the proof I only want to prove two small lemmas, suppuse that $T$ is a tree, then: 1. There is a unique path between any two vertices. 2. If you add one edge to $T$, you will create only one cycle. The proofs are really easy: 1. Aiming for contradiction, suppose that there are two paths between $u$ and $v$. Therefore, we can find a cycle in the graph (convince yourself!) and that’s a contradiction to $T$ being a tree (since a tree has no cycles). 2. Suppose that adding one edge $\{u,v\}$ to $T$ creates two cycles: $\{u,v,u_1,\dots,u_k,u\}$ and $\{u,v,u^\prime_1,\dots,u^\prime_k,u\}$. We now remove the added edge and we get that $\{v,u_1,\dots,u_k,u\}$ and $\{v,u^\prime_1,\dots,u^\prime_k,u\}$ are two different paths between $u$ and $v$, and that’s a contradiction to the first statement! Ok, I think we are ready to prove Cayley’s formula. ## The proof The proof is going to be done step by step, since it is a little bit complicated and since brinining the proof organized and completemakes it much easier to understand. #### Part 1 – Describing our plan My goal is to define a bijection between the set of functions from $[n]=\{1,2,\dots,n\}$ to itself: [n]^{[n]}=\{f:[n]\to[n]\} To the sets of triples: \{(T,L,R)\} Where $T$ is a tree, and $L,R$ are some vertices in the tree (they can be the same). If we will manage to find a bijection, this would imply that the sets have the same number of elements: |\{(T,L,R)\}|=|[n]^{[n]}| Recall that the number of function from $[n]$ to itself is exactly $n^n$ (we have $n$ options for the output of each element from the set, and there are $n$ elements in the set). Thus: |\{(T,L,R)\}|=n^n On the other hand: |\{(T,L,R)\}|=t_n\cdot n\cdot n=t_n \cdot n^2 Recall that $t_n$ is the number of trees, and $L,R$ are just arbitrary vertices, and there are $n$ vertices, therefore, there are $n$ different options for the value of $L$ and $R$. We can now compare both sizes of ${(T,L,R)}$ to get: t_n \cdot n^2=n^n\Rightarrow t_n=n^{n-2} And that’s exactly what we wanted! So In the proof I will describe such a bijection, and I’ll start by creating a map from $[n]^{[n]}$ to $(T,L,R)$. #### Part 2 – From function to directed graph Suppose that $f:[n]\to[n]$ is some arbitrary function. We can represent $f$ like that: \left(\begin{array}{cccc} 1 & 2 & \cdots & n\\ f(1) & f(2) & \cdots & f(n) \end{array}\right) There’s nothing special here, this is just a comfortable way to represent to function. I am going to define now the functional graph of $f$$G_f$ which is a graph that describes how $f$ works – It is a directed graph that an edge starts at some $i\in [n]$ and ends at $f(i)$. Formally: G_f=([n],\{(i,f(i)):1\leq i\leq n\}) For example, consider the function: f=\left(\begin{array}{cccccccc} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ 3 & 4 & 2 & 3 & 5 & 7 & 6 & 1 \end{array}\right) It’s functional graph is: It is a visual object that tells us how the function $f$ operates. However, we can learn much more from it. #### Part 3 – What can we learn from the functional graph? The first thing we can see, is that the graph doesn’t have to be connected, so we will explore each components separately. Now, observe that from every vertex, there is exactly one edge coming out of it – which is the edge $(i,f(i))$. Therefore, the number of edges in each component equals to the number of vertices in the component (you can think of a vertex and an edge coming out of it as a pair – every directed edge has a starting vertex, and every vertex has only one directed edge coming out of it). Suppose that in some components there are $m$ vertices, thus, there are $m$ edges as well. Since the component is a connected graph by definition, we conclude that it is actually a tree with an extra edge! By the lemma I’ve proved before, we know that the component has exactly one cycle. I want to mention one more thing though, notice that if you pick some arbitrary vertex $i$, there is only only way to ‘get out’ it – since there is exactly one edge coming out of it (which is $(i,f(i))$).Therefore, if you start a walk in an arbitrary vertex, sooner or later you will find yoursef inside a circle! If you want a formal proof for it (as I wanted) here you go: ##### Quick explanation Start an arbitrary walk on some component with $k$ vertices, every time you reach a new vertex you label it as ‘visited’ (The first vertex will be marked as ‘visited’ as well). Statring the walk in a vertex $i$, from there going to the vertex $f(i)$ and so on. We repeat it $k+1$ times. If during the process we’ve reached a ‘visited’ vertex, this means we’ve completed a cycle, therefore, we started from an edge pointing towards the cycle. Notice that this will always be the case. After the first $k$ steps on the walk, in the ‘worst’ case, we visited each vertex exactly once, then in the next step, we must visit a ‘visited’ vertex. Let me illustrate it: In our example. Let’s start our walk from 8, mark 8 as ‘visited’ and then proceed to $f(8)$ which is 1. Mark 1 as visited and proceed to $3$. There are 5 vertices in the components of 8. After 5 steps, the walk we get it: 8\to1\to3\to2\to4 And all now all the vertices in the component are marked as ‘visited’. The next vertex in the walk is going to be $f(4)=4$ which is already visited, thus: 3\to2\to4\to3 Is a cycle in the component, and we found out that the edge from $8$ actually brings us closer to the cycle. #### Part 4 – Creating the tree We are know finally ready to construct the tree. First define $M$ to be the set of vertices which are in a cycle. In our example, $M=\{2,3,4,5,6,7\}$. Now there are 2 observations: 1. If $v\in M$, then $f(v)\in M$. By the construction of $M$, $v$ is a part of a cycle, since only one edge comes out of $v$, then this edge must end in vertex $u$ which is a vertex of the same cycle as $v$. Thus, $f(v)=u\in M$. This allows us to treat $f|_M$ as a function from $M$ to itself: $f|_M:M\to M$. 2. $f|_M$ is onto. Suppose that $u\in M$, then it is part of a cycle, thus, there must be some $v$ in the cycle such that there is an edge from $v$ to $u$. $v$ is a part of a cycle, thus $v\in M$, and we know that $f(v)=u$. Now, since $f|_M:M\to M$ is onto and has the same domain and rangle (which have the same number of elements) we conclude that $f|_M$ is a bijection! This fact allows us to write $f|_M$ as a permutation of the element of $M=\{v_1,v_2,\dots,v_k\}$: f|_M=\left(\begin{array}{cccc} v_{1} & v_{2} & \cdots & v_{k}\\ f(v_{1}) & f(v_{2}) & \cdots & f(v_{k}) \end{array}\right) Where $v_1 < v_2 < \dots < v_k$. We now define: $L:= f(v_1), R:= f(v_k)$. and create a path: P=(f(v_1),f(v_2),\dots,f(v_k)) Since $f|_M$ is a bijection, it is indeed a path made of the vertices $v_1,\dots,v_k$ (convince yourself!). We now add all the vertices outside of $M$, and the edges coming out from them to out path to get a tree. In our example: f|_M=\left(\begin{array}{cccccc} 2 & 3 & 4 & 5 & 6 & 7\\ 4 & 2 & 3 & 5 & 7 & 6 \end{array}\right) $L= 4, R = 6$, and the path $P$ will be: The rest of the vertices are 1 and 8, and the edges are $\{1,3\}$ and $\{8,1\}$. Adding it to the path to get the tree $T$: And we now have the triple $(T,4,6)$. ### Part 5 – proving that we got a tree Our construction is good and we like it very much, however, we didn’t even proved that it is indeed a tree! So let’s prove it: It has $n-1$ edges: the set $M$ contains $k$ vertices and created a path, thus it ‘donates’ to the tree $k-1$ edges. Moreover, there are $n-k$ vertices outside of $M$, where each one ‘donates’ one edge (which is $(i,f(i))$). Therefore, there are $n-k$ edges coming from vertices outside of $M$. Thus we have a total of $(k-1) + (n-k) = n-1$ edges, as we wanted. It is connected: Pick two vertices $v,u$. If they are from the same component in the functional graph, then there is a path between them. Otherwise, there is a path $P_1$ from $v$ to $v^\prime$ where $v^\prime$ is a vertex from the same component of $v$, and it is part of a cycle (This one follows from this fact) Similarly, there is a path $P_2$ from $u$ to $u^\prime$ where $u^\prime$ is a vertex from the same component of $u$, and it is part of a cycle. There is also a path $P_3$ between $v^\prime$ and $u^\prime$, since both of them are part of cycles, therefore the path $P_1\cup P_3 \cup P_2$ is a a path between $u$ and $v$. #### Part 6 – proving the map is a bijection Perfect, we now found a way to create a tree out of a function $f:[n]\to [n]$, (this way can easily be translated to an algorithm, which I’ll discuss about later). However, we still need to prove that the function is a bijection. But that’s easy, we can do everything we did here from end to start to get from the triple, the initial function: Given a triple $(T,L,R)$ find a path between $L$ to $R$ and denote it by $P=(L,v_2,...,v_{m-1},R)$. The path is made of integeres so we can sort it. Now consider the permutation: \left(\begin{array}{ccccc} u_{1} & u_{2} & \cdots & u_{m-1} & u_{m}\\ L & v_{2} & \cdots & v_{m-1} & R \end{array}\right) Where $u_1,\dots,u_m$ are just the elements of the path sorted. We can now define a function $f\prime$ as: f^\prime(u_1)=L,f^\prime(u_2)=v_2,\dots,f^\prime(u_m)=R For example, in this tree: We have $L=4$, and $R = 6$. The path is $P=(4,2,3,5,7,6)$. Sotring the element to get the premutation: f^\prime=\left(\begin{array}{cccccc} 2 & 3 & 4 & 5 & 6 & 7\\ 4 & 2 & 3 & 5 & 7 & 6 \end{array}\right)\begin{array}{c} \text{:sorted}\\ :P \end{array} Then we exapnd $f^{\prime}$ to all the vertices that are incident to vertices in $P$, and define for each such vertex $i$ which is incident to $j\in P$, the directed edge $(i,j)$ or $j=f^\prime(i)$. If all vertices are now in the domain of $f^\prime$ we are done and we’ve created a function $f:[n]\to [n]$. If not, we add the vertices that are adjacent to one of those we added in the previous step, and since the number of vertieces it finite, the process must come to an end. In our example, first we add 1 to the domain and define $f^\prime (1)=3$. Then we add 8 to the domain and define $f^\prime(8) = 1$. This yields the function: f=\left(\begin{array}{cccccccc} 1 & 2 & 3 & 4 & 5 & 6 & 7 & 8\\ 3 & 4 & 2 & 3 & 5 & 7 & 6 & 1 \end{array}\right) And that’s exactly the function we started with! In cocnlustion, we just proved that this map is invertiable, thus, it is an injection and the prove is done! ## The algorithm I am now going to show you how to implement this prove in code, I am going to construct a function that get’s an array that will represent a function, and it will print what are $L,R$ and the edges of the tree. I am going to write to code in Java, however, it is really not that complicated, and will be very similar in other languages. I will implement the method: public void treeFromFunction(int[] f) The input is an array of integers that will represent a function $f:[n]\to [n]$. How exactly? that’s simple – the value of $f(n)$ is just $f[n]$. However, recall that arrays start with index 0, thus out function will be slightly different, it will be a function from $\{0,\dots,n-1\}$ to itself. ##### The implementation I am going to do it step by step: 1. Denote by $n$ the length of the array. 2. Find the vertices that are part of cycles in the functional graph (which can be easily represented using the array) 3. Creating the tree – Setting up the path, and adding the rest. 4. Defining the values of $L,R$ 5. printing $L,R$ and the edges of the tree. This is how the method looks like: public void treeFromFunction(int[] f) { //part 1 int n = f.length; //part 2 int[] verticesOfCycles = getVerticesOfCycles(n, f); Arrays.sort(verticesOfCycles); int lastIdx = verticesOfCycles.length - 1; //part 3 int[][] tree = createTree(f, verticesOfCycles, n); //part 4 int L = f[verticesOfCycles[0]]; int R = f[verticesOfCycles[lastIdx]]; //part 5 System.out.println("L = " + L + ", R = " + R); printTree(tree, n); } Part 1 is pretty clear, nothing special there. Part 2 is where things get interesting, I am using a method that finds all the vertices that are part of a cycle. Let’s see how this method works: #### Finding vertices of cycles The method is based on the idea that I have desribed here. I am going to iterate over each vertex $i$ and do the following • Create an array called ‘visited’ that will help me to indicate if a vertex is visited or not • Start a walk from the specific vertex $i$, and mark visited vertices • If I reach a visited vertex, it means that a cycle was found. Now there are two options: • The visited vertex is $i$ – Then $i$ is part of a cycle, so I’ll add it to the list • The visited vertex is not $i$ – Then even though we found a cycle, $i$ is not a part of it, so I’ll proceed to the next vertex. Notice that I will always complete a cycle, no matter what vertex I am starting from. It follows from this fact. In this process I end up with a list of vertices that are part of a cycle (which is guaranteed not to be empty by the proof) and the only thing left to do is just translate the list into an array and return the array. This is the code for this method: int[] getVerticesOfCycles(int n, int[] f) { //iterating over all the vertices. for (int i = 0; i < n; i++) { boolean[] visited = new boolean[n]; int current = i; while (true) { // case where we got back to where we started if (current == i && visited[current]) { break; } visited[current] = true; int next = f[current]; if (visited[next] && next != i) break; else current = next; } } int[] verticesOfCycles = new int [listOfVerticesOfCycles.size()]; for(int i = 0; i < verticesOfCycles.length; i ++) { verticesOfCycles[i] = listOfVerticesOfCycles.get(i).intValue(); } return verticesOfCycles; } (For some reason it when I type “&” the output is “&amp;” so be aware of that…) The only part left to explain is how I represent the tree. As you can see, the tree is a 2D array in my code. Why? since I am going to represent it using the adjacency matrix. I have discussed about this matrix in this post, so if you are not familiar with it, you are more than welcome to check out this post. ##### Setting the tree There are two types of vertices: • Those who part of cycles • The rest We will go over all the vertices and do the following, assuming that the set of vertices of cycles is $M=\{v_1,...,v_k)$: • If the vertex is an element of $m$, so it equals to $v_m$ for some $1\leq m < k$. Then we will add the edge $\{f(v_m),f(v_{m+1})\}$. However, if $m = k$ than $v_{m+1}$ doesn’t exists, so we will do nothing. • Otherwise $v\notin M$, then we will just add the edge $\{v,f(v)\}$. Here is the code for this method: int[][] createTree(int[] f, int[] verticesOfCycles, int n) { int[][] tree = new int[n][n]; for (int i = 0; i < n; i++) { if (isInArray(verticesOfCycles, i)) { int idx = indexOfInArray(verticesOfCycles, i); if (idx != verticesOfCycles.length - 1) { int nextIdx = verticesOfCycles[idx + 1]; tree[f[i]][f[nextIdx]] = 1; } } else{ tree[i][f[i]] = 1; } } return tree; } //helpers boolean isInArray(int[] arr, int v) { for(int i = 0; i < arr.length; i ++) { if (arr[i] == v) return true; } return false; } int indexOfInArray(int[] arr, int v) { for(int i = 0; i < arr.length; i ++) { if (arr[i] == v) return i; } return -1; } #### Printing the tree There is nothing complicated here: void printTree(int[][] tree, int n) { System.out.println("The edges of the tree are:"); for (int i = 0; i < n; i++) { for (int j = 0; j < n; j++) { if (tree[i][j] == 1) System.out.println("{" + i + "," + j + "}"); } } } ##### Quick test for the code We can easlly see that the code is fine: public static void main(String[] args) { CayleyAlgorithm cayleyAlgorithm = new CayleyAlgorithm(); int[] f = {4,3,1,0,2,1,7,3}; cayleyAlgorithm.treeFromFunction(f); } The output is: L = 4, R = 2 The edges of the tree are: {0,2} {1,0} {3,1} {4,3} {5,1} {6,7} {7,3} You can verify it yourself and see if you got the same tree! If you wish, you are welcome to download the file and test it a little, modify it or whatever you wanna do with. You can get it in this link: https://github.com/TairGalili/Graph-Theory-Posts.git ## Summary We’ve seen in this post one of the most famous theorems in graph theory and saw how we can implement a proof into a code. Now if you are bored or something like that, you can generate a random function from $[n]$ to itself to get a tree! In the next post I want to generalize Cayley’s theorem, and find out how many spanning trees are there in any graph, and I warn in advance – prepare yourself for some linear algebra!
# How is this gravity question wrong? 1. Oct 4, 2009 ### neutron star 1. The problem statement, all variables and given/known data While trying out for the position of pitcher on your high school baseball team, you throw a fastball at 86.0 mi/h toward home plate, which is 18.4 m away. How far does the ball drop due to effects of gravity by the time it reaches home plate? (Ignore any effects due to air resistance and assume you throw the ball horizontally.) ____m 2. Relevant equations 3. The attempt at a solution 86 miles per hour = 38.44544 meters/second 18.4 meters / 38.44544 meters.second =0.4786 seconds 0.4786 seconds x 9.81 = 4.695 meters 2. Oct 4, 2009 ### Pengwuino What are your units on the last equation? That should immediately tell you you are wrong. Use your kinematic equations for an object in freefall. $$\[ y = y_0 + v_{0y} t + \frac{1}{2}at^2$$ 3. Oct 4, 2009 ### neutron star Ok I did: y=0+38.445(0.478)+1/2(9.81)(0.478)$$^2$$ It said my answer was wrong. Then I did 0+0+1/2(9.81)(0.478)$$^2$$ Still said it was wrong. :( 4. Oct 4, 2009 ### neutron star And it said that answer was wrong, my last available attempt :( 5. Oct 4, 2009 ### DaveC426913 1] What answer did you get? How are we suppsoed to help you if you don't tell us what you're done? 2] Forget the numbers. How are you thinking through this problem?
function pointers... [SOLVED] Recommended Posts hey all, i'm now trying to create a queue sort of system for actions that an object in my engine can use. basically it should take a function pointer and a list of the variables that should be passed when the function is called. i've had another method half working but it was using a bunch of pre-defined variables in a single struct (so like 3 floats and a string, etc.) and a constant value that was used to determine the function that was used to add the action to the list... anyway it was very confusing, very inefficient (for me to code) and a huge hassle to use. so now i've looked into function pointers... the problem i have is the fact that they are so rigid; everything has to be exact and that is making things difficult for the situation. so my question is this: is there any way (like tricks, library, etc.) that i can create a function pointer that can point to any function no matter what the return and/or the parameters? as far as i'm aware no such thing can be done but i wanted to see if anyone else could advise me otherwise or give some advice. thanks! [Edited by - the_moo on May 14, 2006 10:02:22 AM] Share on other sites If you don't know exactly which function you're calling, then you really wouldn't know what type of data to pass into it, right? The method of queueing up function and parameter/return value heap pointers should most definitely work. What problem are you running into here? I have constructed something like this to iteratively execute user-defined expressions, using a math library's functions to perform the operations. Did you want to look at the source? Maybe you need to look at your situation a little differently, with the end solution in mind. Or describe it here in further detail for others to analyze. Cowpower! Share on other sites boost::function, although its still going to require a static (i.e., compile-time) function signature. The boost::bind library will let you create "closures" of sorts to transport one function type to another. It's not going to be exactly what you want, however. The typed nature of C++ makes what you want to do particularly difficult. It can be done but you'll be doing quite a bit of legwork and potentially some very un-typesafe hacks. Generally, its not a good idea and it isn't even required -- you just think you want it. It's a much cleaner design to simply fix the signature of the callbacks passed into your library. The reason "runtime-typed" function pointers are basically useless in this situation is its not exactly clear what your library is supposed to do with the function. Let's say you do manage to implement a function pointer construct that does what you want. Your library then takes an instance of this super-function-pointer and stores it, to invoke later as a callback. What parameters will your library pass to the function? It has no idea what to pass and consequently can't pass anything meaningful. If it DOES know what to pass than chances are your library is too tightly coupled with the client code, or the library could have just made the function signature static since it knew exactly what information it was going to pass. Share on other sites I'm not an expert, but i have two ideas for this: 1) use functions like this one: void* func(void*); this is unsafe, but if you code it carefuly - you'll have lots of typecasts, and everything will work. 2) use functor objects, all implementing this interface: class FunctorBase { public: virtual void Execute () = 0; }; Now, parameters can be passed to constructors of those functors. Or some set/get methods to set params/get result. Maybe someone else has more ideas? Share on other sites I was thinking about function objects too. You won't be able to execute the function "regardless of the return type", as you mention somewhere, but that's impossible anyway. You can't call a function and not know what it will return, unless you also want to use variants for this. Share on other sites ok i've now got everything working but the assigning of the function pointers through a function parameter. i was just reading all the restrictions of member function pointers and am guessing that i won't be able to do what i want now... see, the function to "queue" an action is a member function of my object class (and so is the queue list variable for all actions). i want to be able to assign any function pointer when queuing(??) from any classes that i may come up with outside of my engine. now i know that this isn't sounding good so if it can't at all be done that's fine, but then i'm back to the same spot as before... thanks again, Share on other sites Once again, this is something that boost::function and boost::bind can help you with. Share on other sites If you're in C++, use objects instead. If you're in C, you'll have to cast from void* Share on other sites One solution would be to return a bool or int for a success code, passing in a single const reference to an object of type Uberclass. This class would contain all of the variables available system-wide, providing massive function abstraction for a reasonable cost in memory -- 2GB RAM is common these days! It is very handy for writing plug-in shaders in C++. I doubt you're writing a math class, but #include <string>using std::string;#include <iostream>using std::cout;using std::endl;class Uberclass{public: int ia, ib, ic, id; float fa, fb, fc, fd; size_t la, lb, lc, ld; string sa, sb, sc, sd; int iadd(void) { return (ic = ia + ib); }};int main(void){ Uberclass u; u.ia = 4; u.ib = 2; int answer = u.iadd(); cout << answer << endl; cout << u.ic << endl; return 0;} [Edited by - taby on May 1, 2006 9:36:48 PM] Share on other sites A possible way around it (only really feasible assuming your using standard datatypes, like unsigned int, float etc...) is through the use of unions. union UberReturn{ float fdata; unsigned int uintdata; char cdata;};UberReturn uberFunction ( void* whatever ){ UberReturn val; val.fdata = 0.0f; return val;}typedef UberReturn (*uberFunctionPointerType) ( void* whatever ); If you need to implicitly know what its returning, then the union can be wrapped in a struct along with an enumeration too. Share on other sites ok, i'm now trying to use boost::function and am only having one problem with it. when i try to compile the only error messages i get are like this: In static member function static R boost::detail::function::function_obj_invoker2<FunctionObj, R, T0, T1>::invoke(boost::detail::function::any_pointer, T0, T1) [with FunctionObj = boost::_mfi::mf4<void, MeshInstance, float, float, float, bool>, R = int, T0 = ObjectX*, T1 = std::list<void*, std::allocator<void*> >]': 479 D:\Program Files\Dev-Cpp\Other Libs\Boost\include\boost-1_33_1\boost\function\function_template.hpp instantiated from void boost::function2<R, T0, T1, Allocator>::assign_to(FunctionObj, boost::detail::function::function_obj_tag) [with FunctionObj = boost::_mfi::mf4<void, MeshInstance, float, float, float, bool>, R = int, T0 = ObjectX*, T1 = std::list<void*, std::allocator<void*> >, Allocator = std::allocator<void>]' and there's about 10 of them all with slight variances to the error but all "instantiated from 'boost::function2'". The line which causes these errors to show is: QueueAction(&MeshInstance::Move,args); the prototype for this function is: typedef boost::function<int (class ObjectX* classtype, list<void*> args)> QueueFunc; void QueueAction (QueueFunc func, list<void*> args); basically MeshInstance::Move is the function that i'm trying to create a pointer to. i have never seen this type of error before but i'm assuming it has something to do with templates. if anyone has any idea and can help me... again... i'd be very grateful thanks, Share on other sites It looks like you're missing part of the error message. After those, there's generally a message about what is actually wrong. Anyways, this works for me [gcc 3.3.5]: #include <boost/function.hpp>#include <iostream>#include <list>using namespace std;class X{};class MeshInstance{public:static int Move(X *objx, list<void *> args){ cout << "In Move\n";}};struct Command{ boost::function<int(X *,list<void *>)> fobj;};int main(){ Command cmdobj; X *xobj=new X(); list<void *> voidlist; cmdobj.fobj=&MeshInstance::Move; cmdobj.fobj(xobj,voidlist);} the first thing I'd check is that MeshInstance::Move actually returns an int, and not void. And once you have it working, you might want to think about changing your design so that list<void *> is no longer necissary. [Edited by - Telastyn on May 3, 2006 11:24:01 PM] Share on other sites An alternative (and potentially much cleaner) solution to this is to employ the Command pattern. The way it works is fairly simple: • Define a Parameter type. The simplest type you might want to use (that is still flexible) might be boost::variant. You can also use a std::pair<std::string, boost::variant> to implement named parameters - which personally I'd highly recommend. (Another solution to named parameters is to use the name as an index in a hashmap.) • Define an abstract base class Command that has a pure virtual function Execute and exposes a set of Parameters. • Define a concrete subclass for each individual command you want to support, e.g. MakeThingExplodeCommand. Override Execute in each subclass to look at the parameter set and act accordingly. • You can now queue references to Command objects and Execute them safely without knowing any details about them, thanks to polymorphism. Share on other sites You should post the rest of one of the error messages, and also the code where you are actually getting the error. Share on other sites Quote: Original post by ApochPiQAn alternative (and potentially much cleaner) solution to this is to employ the Command pattern. The way it works is fairly simple:Define a Parameter type. The simplest type you might want to use (that is still flexible) might be boost::variant. You can also use a std::pair to implement named parameters - which personally I'd highly recommend. (Another solution to named parameters is to use the name as an index in a hashmap.)Define an abstract base class Command that has a pure virtual function Execute and exposes a set of Parameters.Define a concrete subclass for each individual command you want to support, e.g. MakeThingExplodeCommand. Override Execute in each subclass to look at the parameter set and act accordingly.You can now queue references to Command objects and Execute them safely without knowing any details about them, thanks to polymorphism. Quoted for emphasis. There is also boost::any in addition to boost::variant. I don't really know the differences and pros/cons, but it's probably worth looking at both. Share on other sites Quote: Original post by ZahlmanThere is also boost::any in addition to boost::variant. I don't really know the differences and pros/cons, but it's probably worth looking at both. The difference between the two is: • boost::any can be an infinite number of types but only one type at any given time, boost::variant can only be a finite set of types and as with boost::any only one type at any given time. • boost::any types do not need to be known up front while for boost::variant they do. • boost::any uses a technique called automatic type erasor, basically internally boost::any at the very last moment erases static type information into a base type. For primitive operations such as copying delegates to virtual member functions of the base type for other operations clients have to use type switching and/or casting. • boost::variant internally uses unions and metaprogramming to keep the static type information, type dispatch/resolution can be done at compile-time aswell as run-time. • boost::variant is more type safe than boost::any So boost::variant is more efficent while boost::any has more flexiablity when it comes to unknowns. Both can represent the samethings such as recusive types/data structures like cons lists or trees but with boost::variant you get sort of pattern matching using static visitors with boost::any you have to resort to runtime type queries. So i would make boost::variant the default choice unless you do not know what and/or the number of types you will be dealing with in advance. Share on other sites Telastyn, ApochPiQ, jpetrie, Zahlman and snk_kid: thank you all so much! all of you have given great advice (and so much of it [smile]). as soon as i get the chance i'm going to put all the information together and use it to come up with my preferred method for attacking this [grin]! thanks a heap once again! i'll be sure to ask again if there's anything i'm still struggling with (especially with boost:: ... i've never used before now so it's all a bit dawnting(??)!!) thanks once more, Share on other sites hey again, ok i've got the game compiling now but i think there is a problem with one of my casts (which to be honest i don't like doing but i can't see any other way...). for some reason i can't post large code chunks... so my next post has all the code that i would've had here; please take a look at it now if you're trying to help me out because the rest of this post will make sense then. thanks [smile] ok i know that's a lot of code but i want to get this now that i feel i'm so close! firstly i'm pretty sure the problem stems from the QUEUEITEM.customfunc member and i think that problem is caused by boost::any being the function pointer paramter... **1: ObjectX is the base class i derive all my mesh and sprite based entities from (and those get derived from too). i've left out most variables but the one concerning this problem to make things clearer. **2: i've made ExecuteAction pure virtual because when calling queued functions i need to have a pointer to the instance of the class that is actually calling it (so this works fine) so that any function being called will be found (so if i have a pointer to an ObjectX instance it will call the highest order ExecuteAction and all member functions will still be found). **3: MeshInstance::QueueAction is the problem at the moment. the implementation of it is shown and line **4 shows the exact line: **4: this is the line that is causing my game not to crash as such, but just quit out rather quickly with no error message. if i remove this line, everything works fine (i've yet to place ExecuteAction into my game so it is never called - no point till QueueAction works). now i've tried casting "func" as well but that caused more compile time errors like before. i guess i'm asking: is there any way i can have a "customfunc" variable type that supports casting to the correct function pointer type when calling and assigning the function? again i realise this is quite a bit to ask but it's the ideal way that i can visualize to solve this problem. [Edited by - the_moo on May 8, 2006 3:52:48 AM] Share on other sites typedef boost::function<void (boost::any classtype, list<void*> args)> QueueFunc; typedef struct QUEUEITEM { QueueFunc customfunc; list<void*> args; }; class ObjectX { //**1 friend class DirectX; protected: list<QUEUEITEM> action_list; public: ObjectX (); void ClearQueue (); virtual void ExecuteAction () = 0; //**2 }; class MeshInstance : public ObjectX { public: MeshInstance (); void SetBaseMesh (MeshX *basem, std::string meshname); MeshX* GetBaseMesh (); void Move (float x, float y, float z, bool world = false); void QMove (list<void*> args); void SetPosition (float x, float y, float z); void SetColour (int alpha, int red, int green, int blue); void SetScale (float width, float height, float depth, bool inc = false); void SetAnimation (std::string animname); void UnsetAnimation (); void Rotate (float angx, float angy, float angz); void RenderPass (LPDIRECT3DDEVICE9 pd3ddev, int pass); void Render (LPDIRECT3DDEVICE9 pd3ddev); void QueueAction (boost::function<void (MeshInstance* ptr, list<void*> args)> func, list<void*> args); //**3 virtual void ExecuteAction (); bool Release (); }; void MeshInstance::QueueAction(boost::function<void (MeshInstance* ptr, list<void*> args)> func, list<void*> args) { QUEUEITEM item; item.args = args; boost::any_cast<boost::function<void (MeshInstance* ptr, list<void*> args)> > (&item.customfunc) = func; //**4 action_list.push_back(item); } void MeshInstance::ExecuteAction() { boost::function<void (MeshInstance* ptr, std::list<void*> args)> funcptr; funcptr = boost::any_cast<boost::function<void (MeshInstance* ptr, std::list<void*> args)> >(action_list.front().customfunc); funcptr(this,action_list.front().args); action_list.pop_front(); } Share on other sites Quote: Original post by the_moo**4: this is the line that is causing my game not to crash as such, but just quit out rather quickly with no error message. Read as: Crash without diagnostic message. Best guess as to cause: it's throwing a boost::bad_any_cast. Then again my brain is having major problems grokking that code. Please use [ source ] tags in the future... EDIT: There we go, brain parser click. The any_cast isn't doing what you're expecting. Each boost::function< ... > is a full blown type. So when you do: boost::any_cast<boost::function<void (MeshInstance* ptr, list<void*> args)> >(&item.customfunc) = func; //**4 You're converting: boost::function<void (boost::any classtype, list<void*> args)> * (a pointer to a boost::function<>)=> boost::any=> boost::function<void (MeshInstance* ptr, list<void*> args)> (by-value boost::function<> of different type) Which isn't valid. That entire line is messed up, as is the definition of func. You're going to need to write a translation function or change func's definition, and thus how you'd write func. For best results, you'd probably be putting the any_cast inside of the function that you want to pass... e.g.: void ExampleFunc( boost::any first , list< void * > args ) { MeshInstance * mesh = boost::any_cast< MeshInstance * >( first ); ...} Then, you can call: QueueAction( & ExampleFunc , ... ); Where QueueAction has: QueueFunc func, as that argument's type. [Edited by - MaulingMonkey on May 8, 2006 10:51:35 AM] Share on other sites You might find the code in the thread C++ metaprogramming help (in the name of all holy, this is mind boggling) to be helpful. It allows something similar to what you want, I think. Since it uses boost::variant, it's restricted in the number of types it can deal with, but I think it'd be possible to make something similar using boost::any Share on other sites just saying a big thanks for the help from all of you! i looked at the post that Extrarius pointed me to and that made me realise i needed to read a little more about some stuff with templates. anyway i got it working pretty quickly after that so thanks again! Create an account Register a new account • Forum Statistics • Total Topics 627737 • Total Posts 2978873 • 10 • 10 • 21 • 14 • 12
# zbMATH — the first resource for mathematics Invariants of the Riemann tensor for class $$B$$ warped product space-times. (English) Zbl 1002.83503 Summary: We use the computer algebra system GRTensorII to examine invariants polynomial in the Riemann tensor for class $$B$$ warped product space-times - those which can be decomposed into the coupled product of two 2-dimensional spaces, one Lorentzian and one Riemannian, subject to the separability of the coupling $$ds^2 = ds^2_{\Sigma_1} (u,v) + C(x^\gamma)^2 ds^2_{\Sigma_2} (\theta,\phi)$$, with $$C(x^\gamma)^2=r(u,v)^2 w(\theta,\phi)^2$$ and $$\text{sig}(\Sigma_1)=0$$, $$\text{sig}(\Sigma_2)=2\varepsilon$$ $$(\varepsilon=\pm 1)$$ for class $$B_1$$ space-times and $$\text{sig}(\Sigma_1)=2\varepsilon$$, $$\text{sig}(\Sigma_2)=0$$ for class $$B_2$$. Although very special, these spaces include many of interest, for example, all spherical, plane, and hyperbolic space-times. The first two Ricci invariants along with the Ricci scalar and the real component of the second Weyl invariant J alone are shown to constitute the largest independent set of invariants to degree five for this class. Explicit syzygies are given for other invariants up to this degree. It is argued that this set constitutes the largest functionally independent set to any degree for this class, and some physical consequences of the syzygies are explored. ##### MSC: 83-08 Computational methods for problems pertaining to relativity and gravitational theory 83C20 Classes of solutions; algebraically special solutions, metrics with symmetries for problems in general relativity and gravitational theory 53C80 Applications of global differential geometry to the sciences ##### Software: NP; SHEEP; GRTensorII Full Text: ##### References: [1] Kramer, D.; Stephani, H.; Herlt, E.; MacCallum, M.; Schmutzer, E., Exact solutions of Einstein’s equations, (1980), CUP Cambridge · Zbl 0449.53018 [2] Narlikar, V.V.; Karmarkar, K.R., (), 91 [3] Koutras, A.; McIntosh, C., Class. quantum grav., 13, L47, (1996) [4] MacCallum, M.A.H.; Skea, J.E.F., SHEEP: A computer algebra system for general relativity, () · Zbl 0829.53057 [5] Tipler, F.J.; Clarke, C.J.S.; Ellis, G.F.R., Singularities and horizons — A review article, () [6] Siklos, S.T.C., Gen. rel. grav., 10, 1003, (1979) [7] Carminati, J.; McLenaghan, R.G., J. math. phys., 32, 3135, (1991) [8] Sneddon, G.E., J. math. phys., 37, 1059, (1996) [9] Zakhary, E.; McIntosh, C.B.G., Gen. rel. grav., 29, 539, (1997) [10] D. Pollney, report, unpublished (1996). [11] Carot, J.; da Costa, J., Class. quantum. grav., 10, 461, (1993) [12] Nakahara, M., Geometry, topology and physics, (1990), IOP Bristol · Zbl 0764.53001 [13] Haddow, B.M.; Carot, J., Class. quant. grav., 13, 289, (1996) [14] Stephani, H., General relativity, (1990), CUP Cambridge · Zbl 0733.53044 [15] Penrose, R.; Rindler, W., () [16] Musgrave, P.; Pollney, D.; Lake, K., Grtensorii, (1998), Queen’s University Kingston, Ontario [17] D. Pollney, report, unpublished (1995). [18] P. Musgrave, report, unpublished (1996). [19] K. Santosuosso, report, unpublished (1997). [20] Gurevich, G.B., Foundations of the theory of algebraic invariants, (1964), Noordhoff Groningen · Zbl 0128.24601 [21] Haddow, B.M., Gen. rel. grav., 28, 481, (1996) [22] Bel, L., LES théories relativistes de la gravitation, (1962), CNRS Paris [23] Misra, R.M.; Singh, R.A., J. math. phys., 8, 1065, (1967) [24] Zakharov, V.D., Gravitational waves in Einstein’s theory, (1973), Halsted Press New York · Zbl 0261.35002 [25] Bonnor, W.B., Class. quantum grav., 12, 499, (1995), and corrigendum [26] McIntosh, C.B.G.; Arianrhod, R.; Wade, S.T.; Hoenselaers, C., Class. quantum grav., 11, 1555, (1994) [27] Maartens, R.; Maharaj, M.S., J. math. phys., 31, 151, (1990) [28] Ellis, G.F.R., Relativistic cosmology, (), 1971 · Zbl 0337.53058 This reference list is based on information provided by the publisher or from digital mathematics libraries. Its items are heuristically matched to zbMATH identifiers and may contain data conversion errors. It attempts to reflect the references listed in the original paper as accurately as possible without claiming the completeness or perfect precision of the matching.
# Is this formula logically valid Is: $\exists x (P(x) \land Q(x)) \rightarrow \exists x P(x) \land \exists x Q(x)$ logically valid?. I cant found an intepretation in wich the formula is false. • Yes, it is logically valid. The opposite implication is not logically valid. – André Nicolas Jun 29 '13 at 4:47 Yes, indeed it is valid. No counterexample to be found. If there exists an $x$ for which both ($P(x)$ and $Q(x)$) hold, then there certainly exists an $x$ for which $P(x)$ holds, and there exists an $x$ for which $Q(x)$ holds. The converse implication is not valid, however. If there exists an $x$ that's a pumpkin and there exists an $x$ that is green, it does not follow that there exists an $x$ that is a green pumpkin. • @Amzoti I don't know where I came up with "green pumpkin"...it would have been a better counter example to the converse if I had used: exists an odd number and exists an even number, but there does not exist a number that is both odd and even. – Namaste Jun 30 '13 at 0:27 Yes, it's valid. If there is something which is both $P$ and $Q$, then there is something which is $P$ AND there is something which is $Q$ (viz. the same thing which was both $P$ and $Q$). • In "How to prove it" by Velleman, The existential quantifier does not distribute over conjunction but over disjunction.The example in the book is P(X) means x is bright-eyed, Q(X) bushy-tailed. Then the hypothesis of the given conditional here would be there exists someone who is both bright-eyed and bushy-tailed. the conclusion of the given conditional here would be there exists someone who is bright eyed and there is also someone who is bushy-tailed.The way the book explained it there's no way the existential quantifier distributes over disjunction, but ur explanation makes total sense !! – Mustafa Adam Jul 2 '13 at 16:18 • So existentials do distribute over disjunction. What this means is $\exists x (\varphi \vee \psi)$ is logically equivalent to $\exists x \varphi \vee \exists x \psi$. This isn't the case for conjunction: while $\exists x (\varphi \wedge \psi)$ does, as stated above, logically entail $\exists x \varphi \wedge \exists x \psi$, the second does not logically entail the first. To see a simple example, let $\varphi = P(x)$ and $\psi = \neg P(x)$. – Alex Kocurek Jul 2 '13 at 17:02 • I get it now. I think in my humble opinion the book was not accurate at all in explaining this point. It states after explaining the universal quantifier distribution over conjunction that and I quote " However the corresponding distributive law does not work for the existential quantifier ." it also states that " They don't mean the same thing AT ALL". So what about the universal quantifier and conjunction. Is that an equivalency (biconditional) ? – Mustafa Adam Jul 2 '13 at 19:18 • He probably meant that $\exists x (P(x) \wedge Q(x))$ doesn't mean the same thing as (i.e. isn't equivalent to) $\exists x P(x) \wedge \exists x Q(x)$. However, $\forall x (P(x) \wedge Q(x))$ is logically equivalent to $\forall x P(x) \wedge \forall x Q(x)$, so there's a sense in which these universal sentences "mean the same thing". The situation is reverse for disjunction (viz. existentials distribute over disjunction, but not universals) as noted above. In the disjunctive case, $\forall x P(x) \vee \forall x Q(x)$ logically entails $\forall x (P(x) \vee Q(x))$, but not conversely. – Alex Kocurek Jul 3 '13 at 1:22
Physics # Concept Items PhysicsConcept Items ### 17.1Understanding Diffraction and Interference 1. Which behavior of light is indicated by an interference pattern? 1. ray behavior 2. particle behavior 3. corpuscular behavior 4. wave behavior 2. Which behavior of light is indicated by diffraction? 1. wave behavior 2. particle behavior 3. ray behavior 4. corpuscular behavior ### 17.2Applications of Diffraction, Interference, and Coherence 3. There is a principle related to resolution that is expressed by this equation. $θ=λD θ=λD$ 17.8 What is that principle stated in full? 4. A principle related to resolution states, “Two images are just resolved when the center of the diffraction pattern of one is directly over the first minimum of the diffraction pattern of the other.” Write the equation that expresses that principle. 1. $θ=1.22Dλθ=1.22Dλ$ 2. $θ=Dλθ=Dλ$ 3. $θ=λDθ=λD$ 4. $θ=1.22λDθ=1.22λD$ 5. Which statement completes this resolution? Two images are just resolved when — 1. The center of the diffraction pattern of one image is directly over the central maximum of the diffraction pattern of the other. 2. The center of the diffraction pattern of one image is directly over the central minimum of the diffraction pattern of the other 3. The center of the diffraction pattern of one image is directly over the first minimum of the diffraction pattern of the other 4. The center of the diffraction pattern of one is directly over the first maximum of the diffraction pattern of the other
# Normal Probabilities Using the Z-Table Any normal distribution, which is completely described by the values of its mean, ${\displaystyle \mu }$, and its standard deviation, ${\displaystyle \sigma }$, can be transformed into the so-called standard normal via the transformation ${\displaystyle Z={\frac {X-\mu }{\sigma }}}$ The "Z-table" gives probabilities that values of ${\displaystyle \left.z\right.}$ are found between 0 and given values. These probabilities are represented by areas under the density curve of the standard normal (which is like a continuous histogram). The total area under this curve is 1. Hence, to the right or to the left of 0 is half the data, and so corresponds to a probability or area of 1/2. Probability of values of ${\displaystyle \left.z\right.}$ to the right of the mean and up to some value, such as 1.3 here. This one is straight out of the Z-table:${\displaystyle P(0\leq z\leq 1.3)=0.4032}$ Computing probability of values of ${\displaystyle \left.z\right.}$ on the left side of the mean, from the mean Because of the beautiful symmetry of the normal density curve, we only need to give values to the right of 0; to get answers for values of ${\displaystyle \left.z\right.}$ to the left of zero, we simply reflect the problem from the left to the right:${\displaystyle P(0\leq z\leq |-1.3|)=P(0\leq z\leq 1.3)=0.4032}$ Both left and right probabilities Split the problem into two problems, corresponding to the two cases above: ${\displaystyle P(-1.7\leq z\leq 1.3)=}$${\displaystyle P(0\leq z\leq |-1.7|)+P(0\leq z\leq 1.3)=}$${\displaystyle P(0\leq z\leq 1.7)+P(0\leq z\leq 1.3)=0.4554+0.4032=0.8586}$ Probability of values of ${\displaystyle \left.z\right.}$ that correspond to extreme values to the right of the mean. You can imagine removing the area in the first problem above from the entire amount of area on the right hand side (which amounts to .5, or half the total area):${\displaystyle P(z>1.3)=.5-P(0\leq z\leq 1.3)=.5-0.4032=.0968}$ Probability of values of ${\displaystyle \left.z\right.}$ that correspond to two arbitrary finite values to the right of the mean. Once again, imagine removing the area between 0 and .5 from the area between 0 and 1.7:${\displaystyle P(.5\leq z\leq 1.7)=}$${\displaystyle P(0\leq z\leq 1.7)-P(0\leq z\leq .5)=0.4554-0.1915=0.2639}$
# Detect static in audio with Python I have a program running in python. It samples the demodulated FM output from an SDR. When there is no transmission, the input to the program is completely static. How can I go about squelching the audio in a way like CSQ on a radio? Here is what I have so far: if tx_chan == 100: print(np.max(abs(amplitude))) if debug == True: print('%s:%s '%(tx_chan,sqelch_count)) #Figure out if a chunk is recordable if CTCSS != 'CSQ': CTCSS = int(float(CTCSS)) for peak in peakutils.indexes(abs(np.fft.rfft(amplitude)),thres=0.2): freq = (np.fft.rfftfreq(len(amplitude))*26666.66)[peak] if int(freq) in range(CTCSS-2,CTCSS+2): is_good = True curr_ctcss = freq else: if sqelch_count == 0 and HighCount > 10: is_good = True curr_ctcss = 'CSQ Overide; Squelch Count: %s'%sqelch_count if sqelch_count == 0: is_good = True curr_ctcss = 'CSQ Overide; Squelch Count: %s'%sqelch_count else: is_good = False curr_ctcss = 'CSQ & CTCSS Fail; Squelch Count: %s; CTCSS: %s'%(sqelch_count,freq) if freq > 255: break if is_good == False and total_count == 0 and sqelch_count == 0: is_good == True$$`$$ You'd avoid having this problem by detecting whether FM is present before demodulating it. The reason is simple: FM demodulation throws away a lot of the info that's still in the RF signal – most prominently, the actual received power – and that info is what you'd want to use to squelch. That can (unless there's other types of transmissions than audio FM going on on the same channels) simply be done via power detection. There's other, elegant, methods working on the radio signal, but many of them depend on the way you demodulate FM. If you're really stuck with doing it on the audio side: The output of FM-demodulating radio noise only doesn't have the same statistical properties as audio. Sadly, it mostly depends on the type of demodulation you do, again, but what should work relatively OK would be something like estimating the variance of your signal in multiple subbands. If you've got a similar variance all over the bands, that would be unusual for speech. Music, however, might still be caught with that, so be a bit careful. TL;DR: Do the presence detection on the radio signal, not the demodulated audio.
# Integral Calculus In general, infinitesimal calculus is the part of mathematics concerned with finding tangent lines to curves. We will give the Fundamental Theorem of Calculus showing the relationship between derivatives and integrals. Berkeley’s second semester calculus course. While a definite integral is evaluated over a certain interval, the indefinite integral is evaluated without any boundaries. Both the integral calculus and the differential calculus are related to each other by the fundamental theorem of calculus. An indefinite integral is another name for the antiderivative. The fundamental theorem of calculus states that differentiation and integration are, in a certain sense, inverse operations. Attempt to view the simulation anyways. The Fundamental Theorem of Calculus (26 minutes) { play } Average value theorem. Integral Calculus. Home » Vector Calculus. Practice the basic concepts in differentiation and integration using our calculus worksheets. The primary difference is that the indefinite integral, if it exists, is a real number value, while the latter two represent an infinite number of functions that differ only by a constant. Sadly, this wiki cannot easily be converted to be PHP-7 compatible. Most integrals occurring in mathematical documents begin with an integral sign and contain one or more instances of d followed by another (Latin or Greek) letter, as in dx , dy and dt. Description. Calculus on the Web was developed with the support of the National Science Foundation COW is a project of Gerardo Mendoza and Dan Reich Temple University. We also acknowledge previous National Science Foundation support under grant numbers 1246120, 1525057, and 1413739. At least Flash Player 8 required to run this simulation. The origin of integral calculus goes back to the early period of development of mathematics and it is related to the method of exhaustion. 4 4E Chapter 15 Multiple Integrals 15. The integral sign is typeset using the control sequence \int, and the limits of integration (in this case a and b are treated as a subscript and a superscript on the integral sign. Disclaimer: I am a PhD Student in Plant Biology with little knowledge of numbers. In calculus of a single variable the definite integral for f(x)>=0 is the area under the curve f(x) from x=a to x=b. Integral calculus is an important part of calculus, as important as differential calculus. Not that it's impossible, just with the resources I have it's incredibly difficult. This allows user to display the Newton-Raphson procedure one step at a time. Calculus Calculus — 2 Subjects, 12 Units Each. Your geeky, trusty math tutor—from basic middle school classes to advanced college calculus. When evaluated, an indefinite integral results in a function (or family of functions). Substitution methods; Integration by Parts. Integral Calculus. What is calculus? Calculus is a vast topic, and it forms the basis for much of modern mathematics. You can skip questions if you would like and come back to. This region is between x = 0 and x = k. com FREE DELIVERY possible on eligible purchases. always scares the. By the end, you'll know. Classes as per UGC Model Syllabus. The history of the technique that is currently known as integration began with attempts. which produce that function when we differentiate it, and calculate the area under the curve of a graph of the function. Chapter 2 - Fundamental Integration Formulas; Chapter 3 - Techniques of Integration Integral Calculus. The LibreTexts libraries are Powered by MindTouch ® and are supported by the Department of Education Open Textbook Pilot Project, the UC Davis Office of the Provost, the UC Davis Library, the California State University Affordable Learning Solutions Program, and Merlot. integral | Definition of integral in English by Oxford Dict. The process of finding integrals is called integration. Also impacted are systems that rely on Banner such as, Aismartr, CE Web Registration, Centennial Mobile, COLT Calendar of Events, Distance Learning Online Exam Booking, myCentennial, OAT Online Assessment Testing, OWA Application System and COCO. As we will see starting in the next section many integrals do require some manipulation of the function before we can actually do the integral. Fundamental Theorem of Calculus, Riemann Sums, Substitution Integration Methods 104003 Differential and Integral Calculus I Technion International School of Engineering 2010-11. Tutorials with examples and detailed solutions and exercises with answers on how to use the technique of integration by parts to find integrals. Spreadsheet Calculus: Derivatives and Integrals: Calculus can be kind of tricky when you're first learning it. Part 03 Implication of the Chain Rule for General Integration. The Fundamental Theorem of Calculus, Part 1 : If f is a continuous function on [a;b], then the function g de ned by g(x) = Z x a f(t)dt; a x b is continuous on [a;b] and di erentiable on (a;b), and g0(x) = f(x) or d dx Z x a f(t)dt = f(x): Note This tells us that g(x) is an antiderivative for f(x). Step-by-step solutions to all your Calculus homework questions - Slader. Don't waste your money on expensive calculus books. Aprenda cálculo integral—integrais indefinidas, somas de Riemann, integrais definidas, problemas de aplicação e muito mais. Antidifferentiation and Indefinite Integrals (29 minutes) { play } Indefinite integrals. Calculus Applets using GeoGebra This website is a project by Marc Renault, supported by Shippensburg University. Integral Calculus - Chapter Summary. Also, my high school taught me only. This idea was mainly motivated by Rota's deep appreciation for Kuo-Tsai Chen's seminal work on iterated integrals. Recall the definitions of the trigonometric functions. GeoGebra Team German. Click here for an overview of all the EK's in this course. I have never done integration in my life and I am in first year of university. Vector Calculus. While a definite integral is evaluated over a certain interval, the indefinite integral is evaluated without any boundaries. In engineering calculations. We also acknowledge previous National Science Foundation support under grant numbers 1246120, 1525057, and 1413739. Computer Consulting online form; Create and view your Blackboard Homepage ; Blackboard FAQ; Browser tips for AOL users; OSU Valley Library Services. ; The PDF version is also provided. Integral Calculus is the branch of calculus where we study about integrals and their properties. 4 James Stewart Calculus 7th Edition Chapter 15 Multiple Integrals 15. Integrals, together with derivatives, are the fundamental objects of calculus. Differential calculus studies the derivative and integral calculus studies (surprise!) the integral. he graph of. Integration Differentation Hyperbolic Trig Functions Trig Functions Unit Circle in Radians Volumes of Revolution Formulas Inverse Funtions Arc Length Surfa…. Here's how you can use spreadsheet programs to your advantage. prostatic calculus a concretion formed in the prostate, chiefly of calcium carbonate and phosphate. Full curriculum of exercises and videos. But it is often used to find the area underneath the graph of a function like this:. The "inverse" operation of differentiation is integration. Many integration formulas can be derived directly from their corresponding derivative formulas, while other integration problems require more work. Calculus 8th Edition eSolutionscontents to display in non-frame-capable user agent. For example, if you had one formula telling how much money you got every day, calculus would help you understand related formulas like how much money you have in total, and whether you are getting more money or less than you used to. Free definite integral calculator - solve definite integrals with all the steps. It uses the heuristic that, if any of the values of the controls change, then the procedure should be re-started, else it should be continued. The Integral Calculator lets you calculate integrals and antiderivatives of functions online — for free! Our calculator allows you to check your solutions to calculus exercises. calculus, branch of mathematics mathematics, deductive study of numbers, geometry, and various abstract constructs, or structures; the latter often "abstract" the features common to several models derived from the empirical, or applied, sciences, although many emerge from purely mathematical or logical. Integral is a given function in the derivative, i. Parent topic: Calculus. There is 1 pending change awaiting review. 17Calculus - You CAN ace calculus. In general, Riemann sums can "position" the rectangles so that the curve intersects them at different points on the top side. The course begins where MAC 2311 left off at the integration techniques. Another common interpretation is that the integral of a rate function describes the accumulation of the quantity whose rate is given. The link given above is fake and not working. which produce that function when we differentiate it, and calculate the area under the curve of a graph of the function. While Riemann sums can give you an exact area if you use enough intervals, definite integrals give you the exact answer—and in a fraction of the time it would take you to calculate the area using Riemann sums (you can think of a definite integral as. But, paradoxically, often integrals are computed by viewing integration as essentially an inverse operation to differentiation. In our previous lesson, Fundamental Theorem of Calculus, we explored the properties of Integration, how to evaluate a definite integral (FTC #1), and also how to take a derivative of an integral (FTC #2). Take note that a definite integral is a number, whereas an indefinite integral is a function. The Fundamental Theorem of Calculus, Part 1 : If f is a continuous function on [a;b], then the function g de ned by g(x) = Z x a f(t)dt; a x b is continuous on [a;b] and di erentiable on (a;b), and g0(x) = f(x) or d dx Z x a f(t)dt = f(x): Note This tells us that g(x) is an antiderivative for f(x). F'(x) = ƒ(x) ƒ(x) dx = F(x) + C, where C is a constant. We use the integral of a function to get the area under the curve:. I accept third party cookies used to show me personalized ads. Continually enhanced by new methods being discovered at Wolfram Research, the algorithms in the Wolfram Language probably now reach almost every integral and differential equation for which a closed form can be found. Integral Calculus is the branch of calculus where we study about integrals and their properties. In this lesson, we will learn U-Substitution, also known as integration by substitution or simply u-sub for short. Saleem Watson, who received his doctorate degree under Stewart’s instruction, and Daniel Clegg, a former colleague of Stewart’s, will author the revised series, which has been used by more than 8 million students over the last fifteen years. Type in any integral to get the solution, free steps and graph. The study of integration and its uses, such as in finding volumes, areas, and solutions of differential equations. com Electrical Engineering Community  Latest News  Engineering Community  Online Toolbox  Technical Discussions  Professional Networking  Personal Profiles and Resumes  Community Blogs. This calculus integral reference sheet contains the definition of an integral and the following methods for approximating definite integrals: left hand rectangle, right hand rectangle, midpoint rule, trapezoid rule, and Simpson's rule. 4 3E Chapter 15 Multiple Integrals 15. Sample Learning Goals Given a function sketch, the derivative, or integral curves ; Use the language of calculus to discuss motion. Latin: a pebble or stone (used for calculation) Calculus also refers to hard deposits on teeth and mineral concretions like kidney or gall stones. And that is what the integral means: in this case, means we add up all those little regions between A and C. It is represented by the symbol ∫, for example, $$\int (\frac{1}{x}) dx = log_e x + c$$. Credit Recommendations. Part 03 Implication of the Chain Rule for General Integration. The diagram illustrates the local accuracy of the tangent line approximation to a smooth curve, or--otherwise stated--the closeness of the differential of a function to the difference of function values due to a small increment of the independent variable. But, paradoxically, often integrals are computed by viewing integration as essentially an inverse operation to differentiation. Unknown July 25, 2015 at 1:45 AM. You can also get a better visual and understanding of the function and area under the curve using our graphing tool. That is, L n L n and R n R n approximate the integral using the left-hand and right-hand endpoints of each subinterval, respectively. Calculus is all about the comparison of quantities which vary in a one-liner way. renal calculus ( = kidney stone) (uncountable, dentistry) Deposits of calcium phosphate salts on teeth. Definition of an Integral Properties Common Integrals Integration by Subs. The integral sign is typeset using the control sequence \int, and the limits of integration (in this case a and b are treated as a subscript and a superscript on the integral sign. 4 5E Chapter 15 Multiple Integrals 15. The fundamental theorem of calculus. Some basic formula conversions are given. renal calculus ( = kidney stone) (uncountable, dentistry) Deposits of calcium phosphate salts on teeth. Get math help in algebra, geometry, trig, calculus, or something else. where and INTEGRATION BY SUBSTITUTION COMMON INTEGRALS or INTEGRATION BY PARTS INTEGRATION PROPERTIES EEWeb. Paper, Infinitesimal Calculus, Integral, Differential Calculus, Form, Diferencial, Differential Of A Function, Formula free png. Calculus has been around since ancient times and, in its simplest form, is used for counting. Here is a set of practice problems to accompany the Computing Indefinite Integrals section of the Integrals chapter of the notes for Paul Dawkins Calculus I course at Lamar University. Integration vs Differentiation Integration and Differentiation are two fundamental concepts in calculus, which studies the change. Integral Definition. The integral and derivative of \tan(x) is more complicated, but can be determined by studying the derivative and integral of \ln(x). In our previous lesson, Fundamental Theorem of Calculus, we explored the properties of Integration, how to evaluate a definite integral (FTC #1), and also how to take a derivative of an integral (FTC #2). Welcome to the AP Calculus page. which produce that function when we differentiate it, and calculate the area under the curve of a graph of the function. Part 2 of 3. What is calculus? [Calculus is the broad area of mathematics dealing with such topics as instantaneous rates of change, areas under curves, and sequences and series. calculus, branch of mathematics mathematics, deductive study of numbers, geometry, and various abstract constructs, or structures; the latter often "abstract" the features common to several models derived from the empirical, or applied, sciences, although many emerge from purely mathematical or logical. In this course, we go beyond the calculus textbook, working with practitioners in social, life, and physical sciences to understand how calculus and mathematical models play a role in their work. It helps you practice by showing you the full working (step by step integration). Calculus is the branch of mathematics that deals with continuous change. I have never done integration in my life and I am in first year of university. Calculus is a central branch of mathematics. If you're scouting for integral calculus problems to solve, read this post to get 5 most beautiful questions from integral calculus. The word calculus (Latin: pebble) becomes calculus (method of calculation) becomes "The Calculus" and then just calculus again. Our online Integral Calculator gives you instant math solutions for finding integrals and antiderivatives with easy to understand step-by-step explanations. Some that re. Definite integral is a basic tool in application of integration. You can also get a better visual and understanding of the function and area under the curve using our graphing tool. Integration can be used to find areas, volumes, central points and many useful things. Course Overview Acellus AP Calculus AB provides students with an understanding of the advanced concepts covered in the first semester of a college Calculus course. Tap and Tank. Integrals are often described as finding the area under a curve. xy-plane above. Antidifferentiation and Indefinite Integrals (29 minutes) { play } Indefinite integrals. ©2010 The University of Utah; Math Department: 155 S 1400 E Room 233, Salt Lake City, UT 84112-0090; T:+1 801 581 6851, F:+1 801 581 4148; The University of Utah; Webmaster. Aprenda cálculo integral—integrais indefinidas, somas de Riemann, integrais definidas, problemas de aplicação e muito mais. Here is a free online calculus course. Its importance in the world of mathematics is in filling the void of solving complex problems when more simple math cannot provide the answer. Set Theory Logic and Set Notation to be added Limits and Continuity Definition of Limit of a Function Properties of Limits Trigonometric Limits The Number e Natural Logarithms Indeterminate Forms Use of Infinitesimals L’Hopital’s Rule Continuity of Functions Discontinuous Functions Differentiation of Functions Definition of the Derivative Basic Differentiation Rules Derivatives of Power. Many illustrations are given so as to enlighten the subject-matter. For example, if you had one formula telling how much money you got every day, calculus would help you understand related formulas like how much money you have in total, and whether you are getting more money or less than you used to. Calculus Overview. Once you see that this that’s what you’re going to do. 1A1 * AP® is a trademark registered and owned by the College Board, which was not involved in the production of, and does not endorse, this site. F'(x) = ƒ(x) ƒ(x) dx = F(x) + C, where C is a constant. Integration is a very important concept which is the inverse process of differentiation. Introduction The following notes aim to provide a very informal introduction to Stochastic Calculus, and especially to the It^o integral and some of its applications. Anti-differentiation and indefinite integrals. Integral calculus definition is - a branch of mathematics concerned with the theory and applications (as in the determination of lengths, areas, and volumes and in the solution of differential equations) of integrals and integration. 1 & 5 & 6) Page 1 RIEMANN SUM Rectangular Approximation Method (RAM) – The method we use to find the area under a. Functions and Their Graphs Limits of Functions Definition and Properties of the Derivative Table of First Order Derivatives Table of Higher Order Derivatives Applications of the Derivative Properties of Differentials Multivariable Functions Basic Differential Operators Indefinite Integral Integrals of Rational Functions Integrals of Irrational Functions Integrals of Trigonometric Functions. The Fundamental Theorem of Calculus, Part 1 : If f is a continuous function on [a;b], then the function g de ned by g(x) = Z x a f(t)dt; a x b is continuous on [a;b] and di erentiable on (a;b), and g0(x) = f(x) or d dx Z x a f(t)dt = f(x): Note This tells us that g(x) is an antiderivative for f(x). Continually enhanced by new methods being discovered at Wolfram Research, the algorithms in the Wolfram Language probably now reach almost every integral and differential equation for which a closed form can be found. Integral Calculus. Synonyms for Integration (calculus) in Free Thesaurus. Only a subset of adults acquires specific advanced mathematical skills, such as integral calculus. Calculus is used to improve the architecture not only of buildings but also of important infrastructures such as bridges. is concave up on has a local maximum at (E 10. The course begins where MAC 2311 left off at the integration techniques. Calculus is a branch of mathematics which helps us understand changes between values that are related by a function. In a sense, differential calculus is local: it focuses on aspects of a function near a given point, like its rate of change there. TEACHING AP CALCULUS My new book. i: Number Theory, Vector Calculus, Real. The setting is n-dimensional Euclidean space, with the material on differentiation culminat-. And that is what the integral means: in this case, means we add up all those little regions between A and C. Integral calculus, Branch of calculus concerned with the theory and applications of integrals. ©2010 The University of Utah; Math Department: 155 S 1400 E Room 233, Salt Lake City, UT 84112-0090; T:+1 801 581 6851, F:+1 801 581 4148; The University of Utah; Webmaster. A derivative is the steepness (or "slope"), as the rate of change, of a curve. Videos on a second course in calculus (Integral Calculus). This tutorial begins with a discussion of antiderivatives, mathematical objects that are closely related to derivatives. We explain calculus and give you hundreds of practice problems, all with complete, worked out, step-by-step solutions, ALL FREE. Calculus has been around since ancient times and, in its simplest form, is used for counting. For example, if you had one formula telling how much money you got every day, calculus would help you understand related formulas like how much money you have in total, and whether you are getting more money or less than you used to. INTEGRAL CALCULUS - EXERCISES 42 Using the fact that the graph of f passes through the point (1,3) you get 3= 1 4 +2+2+C or C = − 5 4. which produce that function when we differentiate it, and calculate the area under the curve of a graph of the function. Integrals, together with derivatives, are the fundamental objects of calculus. If you are having any trouble with these problems, it is recommended that you review the integrals tutorial at the link below. The html version which is easily read on a laptop, tablet or mobile phone. Welcome to the AP Calculus page. In general, infinitesimal calculus is the part of mathematics concerned with finding tangent lines to curves. Contents Preface xvii 1 Areas, volumes and simple sums 1 1. Calculus 2¶. :: Transcript :: Hello tom from everystepcalculus. 16 Vector Calculus 1. xy-plane above. Many integration formulas can be derived directly from their corresponding derivative formulas, while other integration problems require more work. In this video series, we discuss the fundamentals of each domain along with methods of problem solving. by Neal Holtz. Start Calculus Warmups. txt) or view presentation slides online. Disc Action!!! Activity. In the figure on the right at the top of the page, an area is the difference in the x-direction times the difference in the y-direction. That is, L n L n and R n R n approximate the integral using the left-hand and right-hand endpoints of each subinterval, respectively. (countable, medicine) A stony concretion that forms in a bodily organ. Synonyms for Integration (calculus) in Free Thesaurus. Related Math Tutorials: Fundamental Theorem for Line Integrals;. Tim Brzezinski. Upper and lower Riemann Sums. (uncountable, often definite, the calculus) Differential calculus and integral calculus considered as a single subject; analysis. We are proud to announce the author team who will continue the best-selling James Stewart Calculus franchise. Calculus is all about the comparison of quantities which vary in a one-liner way. However, as soon as I saw the title of the article I thought, Is he talking about integration?. Chapter 1 Velocity and Rate of Change; Chapter 2 Limits. Tags: FTC, fundamental theorem of calculus, integrals. In this chapter we will give an introduction to definite and indefinite integrals. The fundamental theorem of calculus. Alternate Form of Result. Free definite integral calculator - solve definite integrals with all the steps. However, if we wish to integrate over a surface (a two-dimensional object) rather than a path (a one-dimensional object) in space, then we need a new kind of integral that can handle integration over objects in higher dimensions. Textbook solution for Calculus Volume 2 17th Edition Gilbert Strang Chapter 1. Here you'll learn most of what you will need to know to prepare for the AP Calculus exam for those of you taking it. Among the. The calculus is characterized by the use of infinite processes, involving passage to a limit—the notion of tending toward, or approaching, an ultimate value. The course begins where MAC 2311 left off at the integration techniques. A treatise on the integral calculus; with applications, examples and problems Item Preview. Watching these videos is the easiest and fastest way to learn calculus!. The html version which is easily read on a laptop, tablet or mobile phone. Lee Lady For years, I used to tell people that I wished someone would write Calculus for Dummies, using the style of that popular series. Here you'll learn most of what you will need to know to prepare for the AP Calculus exam for those of you taking it. Vectors and Calculus are vast domains of Mathematics which have widespread applications in Physics. It is often associated with differential calculus , as differentiation and integration have been proven to be inverse processes. Chapter 1 - Fundamental Theorems of Calculus. Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematical study of continuous change, in the same way that geometry is the study of shape and algebra is the study of generalizations of arithmetic operations. Properties of Integrals; 1 - 3 Examples | Indefinite Integrals; 4 - 6 Examples | Indefinite Integrals; Definite Integral; Chapter 2 - Fundamental Integration Formulas; Chapter 3 - Techniques of Integration; Chapter 4 - Applications of Integration. Is this the right course for me? Absolutely! It doesn't matter which science and math related major you are in, our course has all topics you will find in any university Integral Calculus courses. Stokes's Theorem. calculus a branch of mathematics in which calculations are made using special symbolic notations, developed by Isaac Newton Precalculus for dummies cheat sheet See more. Read more about types and applications of calculus in real life at BYJU'S. The Sydney Opera House is a very unusual design based on slices out of a ball. Indefinite Integrals. Integrals Antidifferentiation What are Integrals? How do we find them? Learn all the tricks and rules for Integrating (i. Key insight: Integrals help us combine numbers when. Namely, I wanted a book written by someone who actually knows how to write how-to books instead of by a mathematician writing something that will make sense to other mathematicians. INTErnational Gamma-Ray Astrophysics Laboratory (INTEGRAL) is a space telescope for observing gamma rays of energies up to 8 MeV. Scanned by artmisa using Canon DR2580C + flatbed. It reaches to students in more advanced courses such as Multivariable Calculus, Differential Equations, and Analysis, where the ability to effectively integrate is essential for their success. Some that re. The Calculus Bible is a guide to the Advanced Placement tests in AB and BC Calculus. Definition, Synonyms, Translations of Differential and Integral Calculus by The Free Dictionary. 2019 AP Calculus (Ms. Integral calculus, also known as integration, is one of the two branches of calculus, with the other being differentiation. In Mathematics, Integral Calculus is one of the very important topics to understand, the difficulty of question from this topic is medium and will be easy to solve if you are through with the concept. It triggers you to for the menu to choose that okay anyways let’s do it index(8). com FREE DELIVERY possible on eligible purchases. always scares the. Solve an Indefinite Integral - powered by WebMath. Indefinite Integrals. Integral rules for all types of function in simple steps, with solved examples. From Wikibooks, open books for an open world < CalculusCalculus. The fundamental theorem of calculus ties integrals and. Online calculus video lessons to help students with the notation, theory, and problems to improve their math problem solving skills so they can find the solution to their Calculus homework and worksheets. Green's Theorem. The vast majority of biology majors are going into allied health fields: they intend to be doctors, pharmacists, physical therapists, vets, optometrists, and dentists. Paper, Infinitesimal Calculus, Integral, Differential Calculus, Form, Diferencial, Differential Of A Function, Formula free png. Finding area is a useful application, but not the purpose of multiplication. 4 1E Chapter 15 Multiple Integrals 15. Abstract: Gian-Carlo Rota suggested in one of his last articles the problem of developing a theory around the notion of integration algebras, complementary to the already existing theory of differential algebras. In calculus, an integral is the space under a graph of an equation (sometimes said as "the area under a curve"). Is this the right course for me? Absolutely! It doesn't matter which science and math related major you are in, our course has all topics you will find in any university Integral Calculus courses. If your answer is substitution, also list uand. which produce that function when we differentiate it, and calculate the area under the curve of a graph of the function. Integral calculus definition is - a branch of mathematics concerned with the theory and applications (as in the determination of lengths, areas, and volumes and in the solution of differential equations) of integrals and integration. Calculus is fundamental to many scientific disciplines including physics, engineering, and economics. But you can take some of the fear of studying Calculus away by understanding its basic principles, such as derivatives and antiderivatives, integration, and solving compound functions. Tap and Tank. Calculus Facts Derivative of an Integral (Fundamental Theorem of Calculus) When a limit of integration is a function of the variable of differentiation. Calculation is for engineers. The numbers a and b in the definite integral notation are called the limits or bounds of integration. Mathematica® for Rogawski's Calculus 2nd Edition 2010 Based on Mathematica Version 7 Abdul Hassen, Gary Itzkowitz, Hieu D. However, if we wish to integrate over a surface (a two-dimensional object) rather than a path (a one-dimensional object) in space, then we need a new kind of integral that can handle integration over objects in higher dimensions. The link given above is fake and not working. outline what a student will be able to do, know and understand having completed the topic. Fundamental Theorem of Calculus, Riemann Sums, Substitution Integration Methods 104003 Differential and Integral Calculus I Technion International School of Engineering 2010-11. The calculus concepts are covered in class 12 math subjects and Science & Engineering applications. 5 words related to integral calculus: math, mathematics, maths, infinitesimal calculus, calculus. which produce that function when we differentiate it, and calculate the area under the curve of a graph of the function. Antiderivatives and Indefinite Integration Calculus Lesson:Your AP Calculus students understand the definition of antiderivatives and find the indefinite integral of polynomials and transcendental functions. Integral is a given function in the derivative, i. Integral calculus definition is - a branch of mathematics concerned with the theory and applications (as in the determination of lengths, areas, and volumes and in the solution of differential equations) of integrals and integration. Mike, architecture major, Summer 2010 This calculus course was very convenient in the sense that it was online and 4 credits without any major prerequisite. - A free PowerPoint PPT presentation (displayed as a Flash slide show) on PowerShow. The calculus section of QuickMath allows you to differentiate and integrate almost any mathematical expression. Integral calculus was invented in the 17th century with the independent discovery of the fundamental theorem of calculus by Newton and Leibniz. The calculus is characterized by the use of infinite processes, involving passage to a limit—the notion of tending toward, or approaching, an ultimate value. UPDATE: August 2018: The PennCalcWiki is broken, thanks to a server upgrade to PFP-7 which renders the skins and latex plugin unusable. INTErnational Gamma-Ray Astrophysics Laboratory (INTEGRAL) is a space telescope for observing gamma rays of energies up to 8 MeV. Also, my high school taught me only. The diagram illustrates the local accuracy of the tangent line approximation to a smooth curve, or--otherwise stated--the closeness of the differential of a function to the difference of function values due to a small increment of the independent variable. 5 Chapter 1: Methods of Integration 1. ppt), PDF File (. Calculus, originally called infinitesimal calculus or "the calculus of infinitesimals", is the mathematical study of continuous change, in the same way that geometry is the study of shape and algebra is the study of generalizations of arithmetic operations. Surprisingly, these questions are related to the derivative, and in some sense, the answer to each one is the opposite of the derivative. In calculus, the integral of a function is an extension of the concept of a sum. Now, if we wanted to determine the distance an object has fallen, we calculate the "area under. Calculus Math Integral Definite Indefinite Upper/Lower Sum. e-books in Calculus category Calculus by Gilbert Strang - Wellsley Cambridge Press, 1991 The book covers all the material of single and multivariable calculus that is normally in a three semester course for science, mathematics, and engineering students. Massey, Ph. The word "integral" can also be used as an adjective meaning "related to integers". Created Date: 8/22/2011 7:22:05 PM. Integral calculus was invented in the 17th century with the independent discovery of the fundamental theorem of calculus by Newton and Leibniz. Although these problems are a little more challenging, they can still be solved using the same basic concepts covered in the tutorial and examples. Actually, there are three concepts of integration which appear in the subject: the. The following is a quiz to review integral formulas and do simple substitutions. View more ». Integration can be used to find areas, volumes, central points and many useful things. Integral Calculus. The concept of integral calculus has been known in a rough way by ancient Greeks and they used this knowledge to determine areas and volumes. It reduces mostly to symbolic manipulations based on the fundamental theorem which states that differentation and integration are inverse operations. Watching these videos is the easiest and fastest way to learn calculus!. Integral is a given function in the derivative, i. The discovery of calculus is often attributed to two men, Isaac Newton and Gottfried Leibniz, who independently developed its foundations. Go to your Sporcle Settings to finish the process. Use this to check your answers or just get an idea of what a graph looks like. The word calculus (Latin: pebble) becomes calculus (method of calculation) becomes "The Calculus" and then just calculus again. Without understanding what dx or means at all, you knew that the integral would give you the area under the curve. Integration is a very important concept which is the inverse process of differentiation. 1 Introduction. Contents Preface xvii 1 Areas, volumes and simple sums 1 1.
# A geometry problem by Lee Dongheng Geometry Level 3 In the diagram below, $$BC$$ is the diameter and $$OD$$ is the radius of the semicircle centered at $$O.$$ If $$AD=DC,$$ what is $$\sin \angle OAC?$$
# Theories that predict the number of space-time dimensions My impression in that most theories assume three spatial dimensions and one temporal dimension, though could in principle be formulated in others numbers of dimensions without inconsistencies. I know, however, that string theory makes specific predictions for the number of dimensions. It cannot be formulated in an arbitrary number of dimensions. Is string theory unique in this regard? Are there other theories that predict (or even restrict) the numbers of dimensions? I'm interested in viable theories as well as toy models and historical ideas that turned out to be wrong. I know for example that spontaneous symmetry breaking cannot occur in $d\le2$ spatial dimensions (Coleman/Mermin-Wagner theorem). Whilst it might be reasonable to expect that SSB is required in a theory of nature, I'm not sure whether I consider this to be a prediction for $d$ in QFT. I don't want to consider anthropic "predictions" a la Hawking.
# Two independent optional arguments for new commands I'm trying to adapt the solution provided in Different command definitions with and without optional argument to change the behavior of my new command. I'd like to use basic command to avoid some non basic packages. I'm defining a command \mysign to produce my signature at the end of the document. But sometimes I need the date above and sometimes not. So I'd like to have an optional argument to insert it (for example\mysign[date]). Also, sometimes I need to insert some personal ID and I'd like to have a second optional argument, but independent with the first one. So, the result would be something like this: • \mysign only the signature • \mysign[date] the signature with date • \mysign[id] the signature with ID • \mysign[date, id] full signature The problem is that \@ifnextchar[ is working only for one option. I can not adjust to work only with second option. Any idea? - Would a key=value approach be valid for you? –  Gonzalo Medina Jul 8 '13 at 22:27 @GonzaloMedina, thanks, but I have no idea what you are asking. Probably yes since I simply would like to turn on/off the date and ID on my signature. –  Sigur Jul 8 '13 at 22:28 I mean \mysign produces signature; \mysign[date=<value>] produces signature+date; \mysign[id=<value>] gives signature+id; \mysign[date=<value>,id=<value>] gives signature+date+id. –  Gonzalo Medina Jul 8 '13 at 22:31 Great! It'll be very useful for me. –  Sigur Jul 8 '13 at 22:32 Doing with only one optional argument requires knowing the format of the ID, so that it's distinguishable from the date. –  egreg Jul 8 '13 at 22:59 show 1 more comment A key=value approach \documentclass{article} \usepackage{graphicx} \usepackage{xkeyval} \makeatletter \def\SigurId{} \define@key{sigur}{date}{\def\SigurDate{#1}} \define@boolkey{sigur}{id}{ \ifKV@sigur@id \def\SigurId{\includegraphics[height=1.2ex,width=2cm]{example-image-a}}% \else \fi% } \makeatother \newcommand\mysig[1][]{% \begingroup \setkeys{sigur}{date={},id=false} \setkeys{sigur}{#1} Sigur~\SigurDate\unskip~\SigurId\unskip \endgroup } \begin{document} \mysig \mysig[date={\today}] \mysig[id=true] \mysig[date=\today,id=true] \end{document} - Ow, thanks. Almost there. The ID is in fact an image, so I'm trying to adjust to make use of \includegraphics if the option id is passed. In your code I should pass the complete command to the value id? –  Sigur Jul 8 '13 at 23:04 @Sigur Will it always be the same image? –  Gonzalo Medina Jul 8 '13 at 23:13 Yes, my scanned signature. –  Sigur Jul 8 '13 at 23:14 I'd defined a command to the whole command to include the graphics and now I can pass the key id=\myid. –  Sigur Jul 8 '13 at 23:39 @Sigur please see my updated answer with a new boolean key for the image. –  Gonzalo Medina Jul 8 '13 at 23:55 From the comments to the answer of Gonzalo Medina I conclude that the optional argument ID is constant and rather a flag. Then LaTeX also knows an optional star as syntax element. The following example defines \mysign without the need of further packages the following way: • If a star follows, then the signature ID is set. • If an optional argument follows, then the date is set. • If the optional argument is empty, then \today is used as date. The example file: \documentclass{article} \usepackage{graphicx} \makeatletter \newcommand*{\SetId}{% % tabular is only used for vertical centering % and ghostscript's example tiger.eps is the dummy % for the real scanned signature \begin{tabular}{@{}c@{}}% \includegraphics[height=2em,trim=0 50mm 0 0,clip]{tiger}% \end{tabular}% } \newcommand*{\mysign}{% \@ifstar{% \let\@DoId=\SetId \@mysign }{% \let\@DoId=\relax \@mysign }% } \newcommand*{\@mysign}[1][\relax]{% Signature% \def\@mysign@relax{\relax}% \def\@mysign@date{#1}% \ifx\@mysign@date\@mysign@relax \else , % \ifx\@mysign@date\@empty \today \else #1% \fi \fi \ifx\@DoId\relax \else , % \@DoId \fi } \makeatother \begin{document} \renewcommand*{\arraystretch}{2} \begin{tabular}{ll} \verb|\mysign| & \mysign \\ \verb|\mysign*| & \mysign* \\ \verb|\mysign[]| & \mysign[] \\ \verb|\mysign[2001-02-03]| & \mysign[2001-02-03] \\ \verb|\mysign*[]| & \mysign*[] \\ \verb|\mysign*[2001-02-03]| & \mysign*[2001-02-03] \\ \end{tabular} \end{document} - Ow, many thanks. I'm learning a lot with these kind of solutions. –  Sigur Jul 9 '13 at 0:31 Another solution based again on a key-based interface: it exploits pgfkeys. The code: \documentclass[a4paper,11pt]{article} \usepackage{tikz} \usepackage{mwe} % key definition \newif\ifbaseline \pgfkeys{/signature/.cd, baseline/.is if=baseline} \pgfkeys{/signature/.cd, date/.initial={}, date/.get=\signdate, date/.store in=\signdate, id/.initial={}, id/.get=\id, id/.store in=\id, } % Basic command \newcommand{\signature}[2][]{ \pgfkeys{signature/.cd, date={}, id={}, baseline=false, #1} #2\space\signdate\space% \ifbaseline \tikz[baseline=-0.5ex]\node[inner sep=0pt]{\id}; \else \id \fi% } \begin{document} \signature{Sigur} \signature[date=\today]{Sigur} \signature[id={\includegraphics[width=2em,height=2em]{example-image}}]{Sigur} \signature[baseline,id={\includegraphics[width=2em,height=2em]{example-image}}]{Sigur} \signature[baseline, id={\includegraphics[width=2em,height=2em]{example-image}}, date={June 28, 2013}]{Sigur} \signature[id={\includegraphics[width=2em,height=2em]{example-image}}, date={June 28, 2013}]{Sigur} \end{document} TikZ is not really needed, actually it can be loaded pgfkeys in its place, but then I enjoyed the possibility to put the picture aligned on the baseline. The result: - @wasteofspace: what if they are three or six? With key-based approaches it's just matter of defining new keys. Please, also consider that there's the xparse package able to define commands with more optional arguments, but I really believe that a key-based approach is the best. –  Claudio Fiandrino Jul 9 '13 at 10:28 This is really the only right approach. –  Ryan Reich Aug 20 '13 at 15:49 The poor man's solution: \newcommand\mysig[3][Sigur]{#2 #1 #3} Example: \documentclass{article} \newcommand\mysig[3][Sigur]{#2 #1 #3} \begin{document} \mysig{date}{id} \mysig{date} \mysig{}{id} \mysig \end{document} - Poor, but with rich soul. Thanks. –  Sigur Jul 9 '13 at 0:26 \usepackage{ifthen} \newcommand{\mysign}[2]{% \ifthenelse{\equal{#1}{}}{}{#1\\}% SIGNATURE CODE% \ifthenelse{\equal{#2}{}}{}{\\#2}} and then just invoke with the fields you don't want to use blank i.e. \mysign{date}{} fot just date, etc... - Do you know if the package ifthen comes with basic install? –  Sigur Jul 8 '13 at 23:05 according to apt-file it comes packaged in texlive-latex-baseso it should come by default –  John C Jul 8 '13 at 23:11
# Coherence and calibration I am trying to find good definitions and examples for both these concepts regarding frequentist vs Bayesian statistics. Can anyone please shed light on them and explain them? Furthermore, why are Bayesian methods often considered coherent, while frequentist methods seem to focus on calibration. Finally are default Bayesian methods well calibrated and coherent? Calibration, unfortunately, has multiple meanings. However, with reference to coherence, a model is well calibrated if it predicts an occurrence $$k$$ with probability $$\alpha$$ and $$k$$ actually happens with long-run frequency $$\alpha$$.
# Working with HPC clusters In my university, we have an HPC computing cluster. I use the cluster to train classifiers and so on. So, usually, to send a job to the cluster, (e.g. python scikit-learn script), I need to write a Bash script that contains (among others) a command like qsub script.py. However, I find this process very very frustrating. Usually what happens is that I write the python script on my laptop and then I login to the server and update the SVN repository, so I get the same python script there. Then I write that Bash script or edit it, so I can run the bash script. As you see this is really frustrating since, for every little update for the python script, I need to do many steps to have it executed at the computing cluster. Of course the task gets even more complicated when I have to put the data on the server and use the datasets' path on the server. I'm sure many people here are using computing clusters for their data science tasks. I just want to know how you guys manage sending the jobs to the clusters? • Ah, the joys of deployment ... enhanced by the joys of distributed systems :) – logc Jul 14 '14 at 10:44 Ask your grid administrator to add your local machine as a "submit host", and install SGE (which we assume you are using, you don't actually say) so then you can qsub from your machine. OR.... Use emacs, then you can edit on your HPC via emacs's "tramp" ssh-connection facilities, and keep a shell open in another emacs window. You don't say what editor/operating system you like to use. You can even configure emacs to save a file in two places, so you could save to your local machine for running tests and to the HPC file system simultaneously for big jobs. There are many solutions to ease the burden of copying the file from a local machine to the computing nodes in the clusters. A simple approach is to use an interface that allows multi-access to the machines in the cluster, like clusterssh (cssh). It allows you to type commands to multiple machines at once via a set of terminal screens (each one a ssh connection to a different machine in the cluster). Since your cluster seem to have qsub set up, your problem may be rather related to replicating the data along the machines (other than simply running a command in each node). So, to address this point, you may either write an scp script, to copy things to and from each node in the cluster (which is surely better addressed with SVN), or you may set up a NFS. This would allow for a simple and transparent access to the data, and also reduce the need for replicating unnecessary data. For example, you could access a node, copy the data to such place, and simply use the data remotely, via network communication. I'm not acquainted with how to set up a NFS, but you already have access to it (in case your home folder is the same across the machines you access). Then, the scripts and data could be sent to a single place, and later accessed from others. This is akin to the SVN approach, except it's more transparent/straightforward. Your approach of using a source version repository is a good one and it actually allows you also working on the cluster and then copying everything back. If you find yourself making minor edits to your Python script on your laptop, then updating your SVN directory on the cluster, why not work directly on the cluster frontend, make all needed minor edits, and then, at the end of the day, commit everything there and update on your laptop? All you need is to get familiar with the environment there (OS, editor, etc.) or install your own environment (I usually install in my home directory the latest version of Vim, Tmux, etc. with the proper dotfiles so I feel at home there.) Also, you can version your data, and even your intermediate results if size permits. My repositories often comprise code, data (original and cleaned versions), documentation, and paper sources for publishing (latex) Finally, you can script your job submission to avoid modifying scripts manually. qsub accepts a script from stdin and also accepts all #\$ comments as command-line arguments. From your question's wording I assume that you have a local machine and a remote machine where you update two files — a Python script and a Bash script. Both files are under SVN control, and both machines have access to the same SVN server. I am sorry I do not have any advice specific to your grid system, but let me list some general points I have found important for any deployment. Keep production changes limited to configuration changes. You write that you have to "use the datasets' path on the server"; this sounds to me like you have the paths hardcoded into your Python script. This is not a good idea, precisely because you will need to change those paths in every other machine where you move the script to. If you commit those changes back to SVN, then on your local machine you will have the remote paths, and on and on ... (What if there are not only paths, but also passwords? You should not have production passwords in an SVN server.) So, keep paths and other setup informations in a .ini file and use ConfigParser to read it, or use a .json file and use the json module. Keep one copy of the file locally and one remotely, both under the same path, both without SVN control, and just keep the path to that configuration file in the Python script (or get it from the command line if you can't keep both configurations under the same path). Keep configuration as small as possible. Any configuration is a "moving part" of your application, and any system is more robust the less it has moving parts. A good indicator of something that belongs into configuration is exactly that you have to edit it every time you move the code; things that have not needed editing can remain as constants in the code. Automate your deployment. You can do it via a Bash script on your local machine; note that you can run any command on a remote machine through ssh. For instance: svn export yourprojectpath /tmp/exportedproject tar czf /tmp/yourproject.tgz /tmp/exportedproject scp /tmp/myproject.tgz youruser@remotemachine:~/dev ## Remote commands are in the right hand side, between '' ssh youruser@remotemachine 'tar xzf ~/dev/yourproject.tgz' ssh youruser@remotemachine 'qsub ~/dev/yourproject/script.py' For this to work, you need of course to have a passwordless login, based on public/private keys, set up between your local and the remote machine. If you need more than this, you can think of using Python's Fabric or the higher-level cuisine.
# Parsing and Recombining Inputs¶ In the chapter on Grammars, we discussed how grammars can be used to represent various languages. We also saw how grammars can be used to generate strings of the corresponding language. Grammars can also perform the reverse. That is, given a string, one can decompose the string into its constituent parts that correspond to the parts of grammar used to generate it – the derivation tree of that string. These parts (and parts from other similar strings) can later be recombined using the same grammar to produce new strings. In this chapter, we use grammars to parse and decompose a given set of valid seed inputs into their corresponding derivation trees. This structural representation allows us to mutate, crossover, and recombine their parts in order to generate new valid, slightly changed inputs (i.e., fuzz) Prerequisites ## Fuzzing a Simple Program¶ Here is a simple program that accepts a CSV file of vehicle details and processes this information. def process_inventory(inventory): res = [] for vehicle in inventory.split('\n'): ret = process_vehicle(vehicle) res.extend(ret) return '\n'.join(res) The CSV file contains details of one vehicle per line. Each row is processed in process_vehicle(). def process_vehicle(vehicle): year, kind, company, model, *_ = vehicle.split(',') if kind == 'van': return process_van(year, company, model) elif kind == 'car': return process_car(year, company, model) else: raise Exception('Invalid entry') Depending on the kind of vehicle, the processing changes. def process_van(year, company, model): res = ["We have a %s %s van from %s vintage." % (company, model, year)] iyear = int(year) if iyear > 2010: res.append("It is a recent model!") else: res.append("It is an old but reliable model!") return res def process_car(year, company, model): res = ["We have a %s %s car from %s vintage." % (company, model, year)] iyear = int(year) if iyear > 2016: res.append("It is a recent model!") else: res.append("It is an old but reliable model!") return res Here is a sample of inputs that the process_inventory() accepts. mystring = """\ 1997,van,Ford,E350 2000,car,Mercury,Cougar\ """ print(process_inventory(mystring)) We have a Ford E350 van from 1997 vintage. It is an old but reliable model! We have a Mercury Cougar car from 2000 vintage. It is an old but reliable model! Let us try to fuzz this program. Given that the process_inventory() takes a CSV file, we can write a simple grammar for generating comma separated values, and generate the required CSV rows. For convenience, we fuzz process_vehicle() directly. import string CSV_GRAMMAR = { '<start>': ['<csvline>'], '<csvline>': ['<items>'], '<items>': ['<item>,<items>', '<item>'], '<item>': ['<letters>'], '<letters>': ['<letter><letters>', '<letter>'], '<letter>': list(string.ascii_letters + string.digits + string.punctuation + ' \t\n') } We need some infrastructure first for viewing the grammar. from Grammars import EXPR_GRAMMAR, START_SYMBOL, RE_NONTERMINAL, is_valid_grammar, syntax_diagram from Fuzzer import Fuzzer from GrammarFuzzer import GrammarFuzzer, FasterGrammarFuzzer, display_tree, tree_to_string, dot_escape from ExpectError import ExpectError from Coverage import Coverage from Timer import Timer syntax_diagram(CSV_GRAMMAR) start csvline items item letters letter We generate 1000 values, and evaluate the process_vehicle() with each. gf = GrammarFuzzer(CSV_GRAMMAR, min_nonterminals=4) trials = 1000 valid = [] time = 0 for i in range(trials): with Timer() as t: vehicle_info = gf.fuzz() try: process_vehicle(vehicle_info) valid.append(vehicle_info) except: pass time += t.elapsed_time() print("%d valid strings, that is GrammarFuzzer generated %f%% valid entries from %d inputs" % (len(valid), len(valid) * 100.0 / trials, trials)) print("Total time of %f seconds" % time) 0 valid strings, that is GrammarFuzzer generated 0.000000% valid entries from 1000 inputs Total time of 6.447689 seconds This is obviously not working. But why? gf = GrammarFuzzer(CSV_GRAMMAR, min_nonterminals=4) trials = 10 valid = [] time = 0 for i in range(trials): vehicle_info = gf.fuzz() try: print(repr(vehicle_info), end="") process_vehicle(vehicle_info) except Exception as e: print("\t", e) else: print() '9w9J\'/,LU<"l,|,Y,Zv)Amvx,c\n' Invalid entry '(n8].H7,qolS' not enough values to unpack (expected at least 4, got 2) '\nQoLWQ,jSa' not enough values to unpack (expected at least 4, got 2) 'K1,\n,RE,fq,%,,sT+aAb' Invalid entry "m,d,,8j4'),-yQ,B7" Invalid entry 'g4,s1\t[}{.,M,<,\nzd,.am' Invalid entry ',Z[,z,c,#x1,gc.F' Invalid entry 'pWs,rT,R' not enough values to unpack (expected at least 4, got 3) 'iN,br%,Q,R' Invalid entry 'ol,\nH<\tn,^#,=A' Invalid entry None of the entries will get through unless the fuzzer can produce either van or car. Indeed, the reason is that the grammar itself does not capture the complete information about the format. So here is another idea. We modify the GrammarFuzzer to know a bit about our format. import copy import random class PooledGrammarFuzzer(GrammarFuzzer): def __init__(self, *args, **kwargs): super().__init__(*args, **kwargs) self._node_cache = {} def update_cache(self, key, values): self._node_cache[key] = values def expand_node_randomly(self, node): (symbol, children) = node assert children is None if symbol in self._node_cache: if random.randint(0, 1) == 1: return super().expand_node_randomly(node) return copy.deepcopy(random.choice(self._node_cache[symbol])) return super().expand_node_randomly(node) Let us try again! gf = PooledGrammarFuzzer(CSV_GRAMMAR, min_nonterminals=4) gf.update_cache('<item>', [ ('<item>', [('car', [])]), ('<item>', [('van', [])]), ]) trials = 10 valid = [] time = 0 for i in range(trials): vehicle_info = gf.fuzz() try: print(repr(vehicle_info), end="") process_vehicle(vehicle_info) except Exception as e: print("\t", e) else: print() ',h,van,|' Invalid entry 'M,w:K,car,car,van' Invalid entry 'J,?Y,van,van,car,J,~D+' Invalid entry 'S4,car,car,o' invalid literal for int() with base 10: 'S4' '2*-,van' not enough values to unpack (expected at least 4, got 2) 'van,%,5,]' Invalid entry 'van,G3{y,j,h:' Invalid entry '$0;o,M,car,car' Invalid entry '2d,f,e' not enough values to unpack (expected at least 4, got 3) '/~NE,car,car' not enough values to unpack (expected at least 4, got 3) At least we are getting somewhere! It would be really nice if we could incorporate what we know about the sample data in our fuzzer. In fact, it would be nice if we could extract the template and valid values from samples, and use them in our fuzzing. How do we do that? ## An Ad Hoc Parser¶ As we saw in the previous section, programmers often have to extract parts of data that obey certain rules. For example, for CSV files, each element in a row is separated by commas, and multiple raws are used to store the data. To extract the information, we write an ad hoc parser parse_csv(). def parse_csv(mystring): children = [] tree = (START_SYMBOL, children) for i, line in enumerate(mystring.split('\n')): children.append(("record %d" % i, [(cell, []) for cell in line.split(',')])) return tree We also change the default orientation of the graph to left to right rather than top to bottom for easier viewing using lr_graph(). def lr_graph(dot): dot.attr('node', shape='plain') dot.graph_attr['rankdir'] = 'LR' The display_tree() shows the structure of our CSV file after parsing. tree = parse_csv(mystring) display_tree(tree, graph_attr=lr_graph) This is of course simple. What if we encounter slightly more complexity? Again, another example from the Wikipedia. mystring = '''\ 1997,Ford,E350,"ac, abs, moon",3000.00\ ''' print(mystring) 1997,Ford,E350,"ac, abs, moon",3000.00 We define a new annotation method highlight_node() to mark the nodes that are interesting. def highlight_node(predicate): def hl_node(dot, nid, symbol, ann): if predicate(dot, nid, symbol, ann): dot.node(repr(nid), dot_escape(symbol), fontcolor='red') else: dot.node(repr(nid), dot_escape(symbol)) return hl_node Using highlight_node() we can highlight particular nodes that we were wrongly parsed. tree = parse_csv(mystring) bad_nodes = {5, 6, 7, 12, 13, 20, 22, 23, 24, 25} def hl_predicate(_d, nid, _s, _a): return nid in bad_nodes highlight_err_node = highlight_node(hl_predicate) display_tree(tree, log=False, node_attr=highlight_err_node, graph_attr=lr_graph) The marked nodes indicate where our parsing went wrong. We can of course extend our parser to understand quotes. First we define some of the helper functions parse_quote(), find_comma() and comma_split() def parse_quote(string, i): v = string[i + 1:].find('"') return v + i + 1 if v >= 0 else -1 def find_comma(string, i): slen = len(string) while i < slen: if string[i] == '"': i = parse_quote(string, i) if i == -1: return -1 if string[i] == ',': return i i += 1 return -1 def comma_split(string): slen = len(string) i = 0 while i < slen: c = find_comma(string, i) if c == -1: yield string[i:] return else: yield string[i:c] i = c + 1 We can update our parse_csv() procedure to use our advanced quote parser. def parse_csv(mystring): children = [] tree = (START_SYMBOL, children) for i, line in enumerate(mystring.split('\n')): children.append(("record %d" % i, [(cell, []) for cell in comma_split(line)])) return tree Our new parse_csv() can now handle quotes correctly. tree = parse_csv(mystring) display_tree(tree, graph_attr=lr_graph) That of course does not survive long: mystring = '''\ 1999,Chevy,"Venture \\"Extended Edition, Very Large\\"",,5000.00\ ''' print(mystring) 1999,Chevy,"Venture \"Extended Edition, Very Large\"",,5000.00 A few embedded quotes are sufficient to confuse our parser again. tree = parse_csv(mystring) bad_nodes = {4, 5} display_tree(tree, node_attr=highlight_err_node, graph_attr=lr_graph) Here is another record from that CSV file: mystring = '''\ 1996,Jeep,Grand Cherokee,"MUST SELL! air, moon roof, loaded",4799.00 ''' print(mystring) 1996,Jeep,Grand Cherokee,"MUST SELL! air, moon roof, loaded",4799.00 tree = parse_csv(mystring) bad_nodes = {5, 6, 7, 8, 9, 10} display_tree(tree, node_attr=highlight_err_node, graph_attr=lr_graph) Fixing this would require modifying both inner parse_quote() and the outer parse_csv() procedures. We note that each of these features actually documented in the CSV RFC 4180 Indeed, each additional improvement falls apart even with a little extra complexity. The problem becomes severe when one encounters recursive expressions. For example, JSON is a common alternative to CSV files for saving data. Similarly, one may have to parse data from an HTML table instead of a CSV file if one is getting the data from the web. One might be tempted to fix it with a little more ad hoc parsing, with a bit of regular expressions thrown in. However, that is the path to insanity. It is here that the formal parsers shine. The main idea is that, any given set of strings belong to a language, and these languages can be specified by their grammars (as we saw in the chapter on grammars). The great thing about grammars is that they can be composed. That is, one can introduce finer and finer details into an internal structure without affecting the external structure, and similarly, one can change the external structure without much impact on the internal structure. We briefly describe grammars in the next section. ## Grammars¶ A grammar, as you have read from the chapter on grammars is a set of rules that explain how the start symbol can be expanded. Each rule has a name, also called a nonterminal, and a set of alternative choices in how the nonterminal can be expanded. A1_GRAMMAR = { "<start>": ["<expr>"], "<expr>": ["<expr>+<expr>", "<expr>-<expr>", "<integer>"], "<integer>": ["<digit><integer>", "<digit>"], "<digit>": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] } syntax_diagram(A1_GRAMMAR) start expr integer digit In the above expression, the rule <expr> : [<expr>+<expr>,<expr>-<expr>,<integer>] corresponds to how the nonterminal <expr> might be expanded. The expression <expr>+<expr> corresponds to one of the alternative choices. We call this an alternative expansion for the nonterminal <expr>. Finally, in an expression <expr>+<expr>, each of <expr>, +, and <expr> are symbols in that expansion. A symbol could be either a nonterminal or a terminal symbol based on whether its expansion is available in the grammar. Here is a string that represents an arithmetic expression that we would like to parse, which is specified by the grammar above: mystring = '1+2' The derivation tree for our expression from this grammar is given by: tree = ('<start>', [('<expr>', [('<expr>', [('<integer>', [('<digit>', [('1', [])])])]), ('+', []), ('<expr>', [('<integer>', [('<digit>', [('2', [])])])])])]) assert mystring == tree_to_string(tree) display_tree(tree) While a grammar can be used to specify a given language, there could be multiple grammars that correspond to the same language. For example, here is another grammar to describe the same addition expression. A2_GRAMMAR = { "<start>": ["<expr>"], "<expr>": ["<integer><expr_>"], "<expr_>": ["+<expr>", "-<expr>", ""], "<integer>": ["<digit><integer_>"], "<integer_>": ["<integer>", ""], "<digit>": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] } syntax_diagram(A2_GRAMMAR) start expr expr_ integer integer_ digit The corresponding derivation tree is given by: tree = ('<start>', [('<expr>', [('<integer>', [('<digit>', [('1', [])]), ('<integer_>', [])]), ('<expr_>', [('+', []), ('<expr>', [('<integer>', [('<digit>', [('2', [])]), ('<integer_>', [])]), ('<expr_>', [])])])])]) assert mystring == tree_to_string(tree) display_tree(tree) Indeed, there could be different classes of grammars that describe the same language. For example, the first grammar A1_GRAMMAR is a grammar that sports both right and left recursion, while the second grammar A2_GRAMMAR does not have left recursion in the nonterminals in any of its productions, but contains epsilon productions. (An epsilon production is a production that has empty string in its right hand side.) You would have noticed that we reuse the term <expr> in its own definition. Using the same nonterminal in its own definition is called recursion. There are two specific kinds of recursion one should be aware of in parsing, as we see in the next section. #### Recursion¶ A grammar is left recursive if any of its nonterminals are left recursive, and a nonterminal is directly left-recursive if the left-most symbol of any of its productions is itself. LR_GRAMMAR = { '<start>': ['<A>'], '<A>': ['<A>a', ''], } syntax_diagram(LR_GRAMMAR) start A mystring = 'aaaaaa' display_tree( ('<start>', (('<A>', (('<A>', (('<A>', []), ('a', []))), ('a', []))), ('a', [])))) A grammar is indirectly left-recursive if any of the left-most symbols can be expanded using their definitions to produce the nonterminal as the left-most symbol of the expansion. The left recursion is called a hidden-left-recursion if during the series of expansions of a nonterminal, one reaches a rule where the rule contains the same nonterminal after a prefix of other symbols, and these symbols can derive the empty string. For example, in A1_GRAMMAR, <integer> will be considered hidden-left recursive if <digit> could derive an empty string. Right recursive grammars are defined similarly. Below is the derivation tree for the right recursive grammar that represents the same language as that of LR_GRAMMAR. RR_GRAMMAR = { '<start>': ['<A>'], '<A>': ['a<A>', ''], } syntax_diagram(RR_GRAMMAR) start A display_tree(('<start>', (( '<A>', (('a', []), ('<A>', (('a', []), ('<A>', (('a', []), ('<A>', []))))))),))) #### Ambiguity¶ To complicate matters further, there could be multiple derivation trees – also called parses – corresponding to the same string from the same grammar. For example, a string 1+2+3 can be parsed in two ways as we see below using the A1_GRAMMAR mystring = '1+2+3' tree = ('<start>', [('<expr>', [('<expr>', [('<expr>', [('<integer>', [('<digit>', [('1', [])])])]), ('+', []), ('<expr>', [('<integer>', [('<digit>', [('2', [])])])])]), ('+', []), ('<expr>', [('<integer>', [('<digit>', [('3', [])])])])])]) assert mystring == tree_to_string(tree) display_tree(tree) tree = ('<start>', [('<expr>', [('<expr>', [('<integer>', [('<digit>', [('1', [])])])]), ('+', []), ('<expr>', [('<expr>', [('<integer>', [('<digit>', [('2', [])])])]), ('+', []), ('<expr>', [('<integer>', [('<digit>', [('3', [])])])])])])]) assert tree_to_string(tree) == mystring display_tree(tree) There are many ways to resolve ambiguities. One approach taken by Parsing Expression Grammars explained in the next section is to specify a particular order of resolution, and choose the first one. Another approach is to simply return all possible derivation trees, which is the approach taken by Earley parser we develop later. Next, we develop different parsers. To do that, we define a minimal interface for parsing that is obeyed by all parsers. There are two approaches to parsing a string using a grammar. 1. The traditional approach is to use a lexer (also called a tokenizer or a scanner) to first tokenize the incoming string, and feed the grammar one token at a time. The lexer is typically a smaller parser that accepts a regular language. The advantage of this approach is that the grammar used by the parser can eschew the details of tokenization. Further, one gets a shallow derivation tree at the end of the parsing which can be directly used for generating the Abstract Syntax Tree. 2. The second approach is to use a tree pruner after the complete parse. With this approach, one uses a grammar that incorporates complete details of the syntax. Next, the nodes corresponding to tokens are pruned and replaced with their corresponding strings as leaf nodes. The utility of this approach is that the parser is more powerful, and further there is no artificial distinction between lexing and parsing. In this chapter, we use the second approach. This approach is implemented in the prune_tree method. The Parser class we define below provides the minimal interface. The main methods that need to be implemented by the classes implementing this interface are parse_prefix and parse. The parse_prefix returns a tuple, which contains the index until which parsing was completed successfully, and the parse forest until that index. The method parse returns a list of derivation trees if the parse was successful. class Parser(object): def __init__(self, grammar, **kwargs): self._grammar = grammar self._start_symbol = kwargs.get('start_symbol') or START_SYMBOL self.log = kwargs.get('log') or False self.coalesce = kwargs.get('coalesce') or True self.tokens = kwargs.get('tokens') or set() def grammar(self): return self._grammar def start_symbol(self): return self._start_symbol def parse_prefix(self, text): """Return pair (cursor, forest) for longest prefix of text""" raise NotImplemented() def parse(self, text): cursor, forest = self.parse_prefix(text) if cursor < len(text): raise SyntaxError("at " + repr(text[cursor:])) return [self.prune_tree(tree) for tree in forest] def coalesce(self, children): last = '' new_lst = [] for cn, cc in children: if cn not in self._grammar: last += cn else: if last: new_lst.append((last, [])) last = '' new_lst.append((cn, cc)) if last: new_lst.append((last, [])) return new_lst def prune_tree(self, tree): name, children = tree if self.coalesce: children = self.coalesce(children) if name in self.tokens: return (name, [(tree_to_string(tree), [])]) else: return (name, [self.prune_tree(c) for c in children]) ## Parsing Expression Grammars¶ A Parsing Expression Grammar (PEG) [Ford et al, 2004.] is a type of recognition based formal grammar that specifies the sequence of steps to take to parse a given string. A parsing expression grammar is very similar to a context-free grammar (CFG) such as the ones we saw in the chapter on grammars. As in a CFG, a parsing expression grammar is represented by a set of nonterminals and corresponding alternatives representing how to match each. For example, here is a PEG that matches a or b. PEG1 = { '<start>': ['a', 'b'] } However, unlike the CFG, the alternatives represent ordered choice. That is, rather than choosing all rules that can potentially match, we stop at the first match that succeed. For example, the below PEG can match ab but not abc unlike a CFG which will match both. (We call the sequence of ordered choice expressions choice expressions rather than alternatives to make the distinction from CFG clear.) PEG2 = { '<start>': ['ab', 'abc'] } Each choice in a choice expression represents a rule on how to satisfy that particular choice. The choice is a sequence of symbols (terminals and nonterminals) that are matched against a given text as in a CFG. Beyond the syntax of grammar definitions we have seen so far, a PEG can also contain a few additional elements. See the exercises at the end of the chapter for additional information. The PEGs model the typical practice in handwritten recursive descent parsers, and hence it may be considered more intuitive to understand. We look at parsers for PEGs next. ### The Packrat Parser for Predicate Expression Grammars¶ Short of hand rolling a parser, Packrat parsing is one of the simplest parsing techniques, and is one of the techniques for parsing PEGs. The Packrat parser is so named because it tries to cache all results from simpler problems in the hope that these solutions can be used to avoid re-computation later. We develop a minimal Packrat parser next. But before that, we need to implement a few supporting tools. The EXPR_GRAMMAR we import from the chapter on grammars is oriented towards generation. In particular, the production rules are stored as strings. We need to massage this representation a little to conform to a canonical representation where each token in a rule is represented separately. The canonical format uses separate tokens to represent each symbol in an expansion. import re def canonical(grammar, letters=False): def split(expansion): if isinstance(expansion, tuple): expansion = expansion[0] return [token for token in re.split( RE_NONTERMINAL, expansion) if token] def tokenize(word): return list(word) if letters else [word] def canonical_expr(expression): return [ token for word in split(expression) for token in ([word] if word in grammar else tokenize(word)) ] return { k: [canonical_expr(expression) for expression in alternatives] for k, alternatives in grammar.items() } canonical(EXPR_GRAMMAR) {'<start>': [['<expr>']], '<expr>': [['<term>', ' + ', '<expr>'], ['<term>', ' - ', '<expr>'], ['<term>']], '<term>': [['<factor>', ' * ', '<term>'], ['<factor>', ' / ', '<term>'], ['<factor>']], '<factor>': [['+', '<factor>'], ['-', '<factor>'], ['(', '<expr>', ')'], ['<integer>', '.', '<integer>'], ['<integer>']], '<integer>': [['<digit>', '<integer>'], ['<digit>']], '<digit>': [['0'], ['1'], ['2'], ['3'], ['4'], ['5'], ['6'], ['7'], ['8'], ['9']]} It is easier to work with the canonical representation during parsing. Hence, we update our parser class to store the canonical representation also. class Parser(Parser): def __init__(self, grammar, **kwargs): self._grammar = grammar self._start_symbol = kwargs.get('start_symbol') or START_SYMBOL self.log = kwargs.get('log') or False self.tokens = kwargs.get('tokens') or set() self.cgrammar = canonical(grammar) ### The Parser¶ We derive from the Parser base class first, and we accept the text to be parsed in the parse() method, which in turn calls unify_key() with the start_symbol. Note. While our PEG parser can produce only a single unambiguous parse tree, other parsers can produce multiple parses for ambiguous grammars. Hence, we return a list of trees (in this case with a single element). class PEGParser(Parser): def parse_prefix(self, text): cursor, tree = self.unify_key(self.start_symbol(), text, 0) return cursor, [tree] #### Unify Key¶ The unify_key() algorithm is simple. If given a terminal symbol, it tries to match the symbol with the current position in the text. If the symbol and text match, it returns successfully with the new parse index at. If on the other hand, it was given a nonterminal, it retrieves the choice expression corresponding to the key, and tries to match each choice in order using unify_rule(). If any of the rules succeed in being unified with the given text, the parse is considered a success, and we return with the new parse index returned by unify_rule(). class PEGParser(PEGParser): def unify_key(self, key, text, at=0): if self.log: print("unify_key: %s with %s" % (repr(key), repr(text[at:]))) if key not in self.cgrammar: if text[at:].startswith(key): return at + len(key), (key, []) else: return at, None for rule in self.cgrammar[key]: to, res = self.unify_rule(rule, text, at) if res: return (to, (key, res)) return 0, None mystring = "1" peg = PEGParser(EXPR_GRAMMAR, log=True) peg.unify_key('1', mystring) unify_key: '1' with '1' (1, ('1', [])) mystring = "2" peg.unify_key('1', mystring) unify_key: '1' with '2' (0, None) #### Unify Rule¶ The unify_rule() method is similar. It retrieves the tokens corresponding to the rule that it needs to unify with the text, and calls unify_key() on them in sequence. If all tokens are successfully unified with the text, the parse is a success. class PEGParser(PEGParser): def unify_rule(self, rule, text, at): if self.log: print('unify_rule: %s with %s' % (repr(rule), repr(text[at:]))) results = [] for token in rule: at, res = self.unify_key(token, text, at) if res is None: return at, None results.append(res) return at, results mystring = "0" peg = PEGParser(EXPR_GRAMMAR, log=True) peg.unify_rule(peg.cgrammar['<digit>'][0], mystring, 0) unify_rule: ['0'] with '0' unify_key: '0' with '0' (1, [('0', [])]) mystring = "12" peg.unify_rule(peg.cgrammar['<integer>'][0], mystring, 0) unify_rule: ['<digit>', '<integer>'] with '12' unify_key: '<digit>' with '12' unify_rule: ['0'] with '12' unify_key: '0' with '12' unify_rule: ['1'] with '12' unify_key: '1' with '12' unify_key: '<integer>' with '2' unify_rule: ['<digit>', '<integer>'] with '2' unify_key: '<digit>' with '2' unify_rule: ['0'] with '2' unify_key: '0' with '2' unify_rule: ['1'] with '2' unify_key: '1' with '2' unify_rule: ['2'] with '2' unify_key: '2' with '2' unify_key: '<integer>' with '' unify_rule: ['<digit>', '<integer>'] with '' unify_key: '<digit>' with '' unify_rule: ['0'] with '' unify_key: '0' with '' unify_rule: ['1'] with '' unify_key: '1' with '' unify_rule: ['2'] with '' unify_key: '2' with '' unify_rule: ['3'] with '' unify_key: '3' with '' unify_rule: ['4'] with '' unify_key: '4' with '' unify_rule: ['5'] with '' unify_key: '5' with '' unify_rule: ['6'] with '' unify_key: '6' with '' unify_rule: ['7'] with '' unify_key: '7' with '' unify_rule: ['8'] with '' unify_key: '8' with '' unify_rule: ['9'] with '' unify_key: '9' with '' unify_rule: ['<digit>'] with '' unify_key: '<digit>' with '' unify_rule: ['0'] with '' unify_key: '0' with '' unify_rule: ['1'] with '' unify_key: '1' with '' unify_rule: ['2'] with '' unify_key: '2' with '' unify_rule: ['3'] with '' unify_key: '3' with '' unify_rule: ['4'] with '' unify_key: '4' with '' unify_rule: ['5'] with '' unify_key: '5' with '' unify_rule: ['6'] with '' unify_key: '6' with '' unify_rule: ['7'] with '' unify_key: '7' with '' unify_rule: ['8'] with '' unify_key: '8' with '' unify_rule: ['9'] with '' unify_key: '9' with '' unify_rule: ['<digit>'] with '2' unify_key: '<digit>' with '2' unify_rule: ['0'] with '2' unify_key: '0' with '2' unify_rule: ['1'] with '2' unify_key: '1' with '2' unify_rule: ['2'] with '2' unify_key: '2' with '2' (2, [('<digit>', [('1', [])]), ('<integer>', [('<digit>', [('2', [])])])]) mystring = "1 + 2" peg = PEGParser(EXPR_GRAMMAR, log=False) peg.parse(mystring) [('<start>', [('<expr>', [('<term>', [('<factor>', [('<integer>', [('<digit>', [('1', [])])])])]), (' + ', []), ('<expr>', [('<term>', [('<factor>', [('<integer>', [('<digit>', [('2', [])])])])])])])])] The two methods are mutually recursive, and given that unify_key() tries each alternative until it succeeds, unify_key can be called multiple times with the same arguments. Hence, it is important to memoize the results of unify_key. Python provides a simple decorator lru_cache for memoizing any function call that has hashable arguments. We add that to our implementation so that repeated calls to unify_key() with the same argument get cached results. This memoization gives the algorithm its name – Packrat. from functools import lru_cache class PEGParser(PEGParser): @lru_cache(maxsize=None) def unify_key(self, key, text, at=0): if key not in self.cgrammar: if text[at:].startswith(key): return at + len(key), (key, []) else: return at, None for rule in self.cgrammar[key]: to, res = self.unify_rule(rule, text, at) if res: return (to, (key, res)) return 0, None We wrap initialization and calling of PEGParser in a method parse() already implemented in the Parser base class that accepts the text to be parsed along with the grammar. Here are a few examples of our parser in action. mystring = "1 + (2 * 3)" peg = PEGParser(EXPR_GRAMMAR) for tree in peg.parse(mystring): assert tree_to_string(tree) == mystring display_tree(tree) mystring = "1 * (2 + 3.35)" for tree in peg.parse(mystring): assert tree_to_string(tree) == mystring display_tree(tree) One should be aware that while the grammar looks like a CFG, the language described by a PEG may be different. Indeed, only LL(1) grammars are guaranteed to represent the same language for both PEGs and other parsers. Behavior of PEGs for other classes of grammars could be surprising [Redziejowski et al, 2008.]. We previously showed how using fragments of existing data can help quite a bit with fuzzing. We now explore this idea in more detail. ## Recombining Parsed Inputs¶ Recombining parsed inputs was pioneered by Langfuzz [Holler et al, 2012.]. The main challenge is that program inputs often carry additional constraints beyond what is described by the syntax. For example, in Java, one needs to declare a variable (using a specific format for declaration) before it can be used in an expression. This restriction is not captured in the Java CFG. Checking for type correctness is another example for additional restrictions carried by program definitions. When fuzzing compilers and interpreters, naive generation of programs using the language CFG often fails to achieve significant deeper coverage due to these kinds of checks external to the grammar. Holler et al. suggests using pre-existing valid code fragments to get around these restrictions. The idea is that the pre-existing valid code fragments already conform to the restrictions external to the grammar, and can often provide a means to evade validity checks. ### A Grammar-based Mutational Fuzzer¶ The idea is that one can treat the derivation tree of a preexisting program as the scaffolding, poke holes in it, and patch it with generated inputs from our grammar. Given below is a grammar for a language that allows assignment of variables. import string from Grammars import crange VAR_GRAMMAR = { '<start>': ['<statements>'], '<statements>': ['<statement>;<statements>', '<statement>'], '<statement>': ['<assignment>'], '<assignment>': ['<identifier>=<expr>'], '<identifier>': ['<word>'], '<word>': ['<alpha><word>', '<alpha>'], '<alpha>': list(string.ascii_letters), '<expr>': ['<term>+<expr>', '<term>-<expr>', '<term>'], '<term>': ['<factor>*<term>', '<factor>/<term>', '<factor>'], '<factor>': ['+<factor>', '-<factor>', '(<expr>)', '<identifier>', '<number>'], '<number>': ['<integer>.<integer>', '<integer>'], '<integer>': ['<digit><integer>', '<digit>'], '<digit>': crange('0', '9') } syntax_diagram(VAR_GRAMMAR) start statements statement assignment identifier word alpha expr term factor number integer digit Let us use our new grammar to parse a program. mystring = 'va=10;vb=20' def hl_predicate(_d, _n, symbol, _a): return symbol in { '<number>', '<identifier>'} parser = PEGParser(VAR_GRAMMAR) for tree in parser.parse(mystring): display_tree(tree, node_attr=highlight_node(hl_predicate)) As can be seen from the above example, our grammar is rather detailed. So we need to define our token nodes, which correspond to the red nodes above. VAR_TOKENS = {'<number>', '<identifier>'} These tokens are pruned using the prune_tree method that we mentioned previously. Here is a slightly more complex program to parse, but with the tree pruned using tokens: mystring = 'avar=1.3;bvar=avar-3*(4+300)' parser = PEGParser(VAR_GRAMMAR, tokens=VAR_TOKENS) for tree in parser.parse(mystring): display_tree(tree, node_attr=highlight_node(hl_predicate)) We develop a LangFuzzer class that generates recombined inputs. To apply the Langfuzz approach, we need a few parsed strings. mystrings = [ 'abc=12+(3+3.3)', 'a=1;b=2;c=a+b', 'avar=1.3;bvar=avar-3*(4+300)', 'a=1.3;b=a-1*(4+3+(2/a))', 'a=10;b=20;c=34;d=-b+(b*b-4*a*c)/(2*a)', 'x=10;y=20;z=(x+y)*(x-y)', 'x=23;y=51;z=x*x-y*y', ] We recurse through any given tree, collecting parsed fragments corresponding to each nonterminal. Further, we also name each node so that we can address each node separately. class LangFuzzer(Fuzzer): def __init__(self, parser): self.parser = parser self.fragments = {k: [] for k in self.parser.cgrammar} def traverse_tree(self, node): counter = 1 nodes = {} def helper(node, id): nonlocal counter name, children = node new_children = [] nodes[id] = node for child in children: counter += 1 new_children.append(helper(child, counter)) return name, new_children, id return helper(node, counter), nodes def fragment(self, strings): self.trees = [] for string in strings: for tree in self.parser.parse(string): tree, nodes = self.traverse_tree(tree) self.trees.append((tree, nodes)) for node in nodes: symbol = nodes[node][0] if symbol in self.fragments: self.fragments[symbol].append(nodes[node]) return self.fragments We thus obtain all valid fragments from our parsed strings. lf = LangFuzzer(PEGParser(VAR_GRAMMAR, tokens=VAR_TOKENS)) fragments = lf.fragment(mystrings) for key in fragments: print("%s: %d" % (key, len(fragments[key]))) <start>: 7 <statements>: 18 <statement>: 18 <assignment>: 18 <identifier>: 37 <word>: 0 <alpha>: 0 <expr>: 39 <term>: 50 <factor>: 51 <number>: 23 <integer>: 0 <digit>: 0 All that remains is to actually find a place to poke a hole using candidate(), and patch that hole using generate_new_tree(). We will explain how to do this next. But before that, we update our initialization method with a call to fragment(). import random class LangFuzzer(LangFuzzer): def __init__(self, parser, strings): self.parser = parser self.fragments = {k: [] for k in self.parser.cgrammar} self.fragment(strings) #### Candidate¶ LangFuzzer accepts a list of strings, which are stored as derivation trees in the object. The method candidate() chooses one of the derivation trees randomly as the template, and identifies a node such that it can be replaced by another node that is different from itself. That is, it chooses a node such that, if the non-terminal name of the node is node_type, there is at least one other entry in fragment[node_type]) class LangFuzzer(LangFuzzer): def candidate(self): tree, nodes = random.choice(self.trees) interesting_nodes = [ n for n in nodes if nodes[n][0] in self.fragments and len(self.fragments[nodes[n][0]]) > 1 ] node = random.choice(interesting_nodes) return tree, node Here is how it is used -- the red node is the node chosen. random.seed(1) lf = LangFuzzer(PEGParser(VAR_GRAMMAR, tokens=VAR_TOKENS), mystrings) tree, node = lf.candidate() def hl_predicate(_d, nid, _s, _a): return nid in {node} display_tree(tree, node_attr=highlight_node(hl_predicate)) #### Generate New Tree¶ Once we have identified the node, one can generate a new tree by replacing that node with another node of similar type from our fragment pool. class LangFuzzer(LangFuzzer): def generate_new_tree(self, node, choice): name, children, id = node if id == choice: return random.choice(self.fragments[name]) else: return (name, [self.generate_new_tree(c, choice) for c in children]) Again, the red node indicates where the replacement has occurred. random.seed(1) lf = LangFuzzer(PEGParser(VAR_GRAMMAR, tokens=VAR_TOKENS), mystrings) tree, node = lf.candidate() def hl_predicate(_d, nid, _s, _a): return nid in {node} new_tree = lf.generate_new_tree(tree, node) for s in [tree_to_string(i) for i in [tree, new_tree]]: print(s) display_tree(new_tree, node_attr=highlight_node(hl_predicate)) a=1;b=2;c=a+b a=1;b=2;b=2 #### Fuzz¶ The fuzz() method simply calls the procedures defined before in order. class LangFuzzer(LangFuzzer): def fuzz(self): tree, node = self.candidate() modified = self.generate_new_tree(tree, node) return tree_to_string(modified) Here is our fuzzer in action. lf = LangFuzzer(PEGParser(VAR_GRAMMAR, tokens=VAR_TOKENS), mystrings) for i in range(10): print(lf.fuzz()) x=23;bvar=avar-3*(4+300) x=23;y=51;z=x*x-(x+y)*(x-y) x=10;y=20;z=(1.3)*(x-y) abc=12+(12+3.3) x=23;y=51;z=y*x-y*y a=10;b=20;c=34;d=-b+(b*b-4*y)/(2*a) abc=12+((4+3+(2/a))+3.3) x=10;y=20;z=(x+y)*(x-y) abc=12+(3+3.3) x=10;y=20;z=(x+y)*(x-y) How effective was our fuzzing? Let us find out! trials = 100 lf = LangFuzzer(PEGParser(VAR_GRAMMAR, tokens=VAR_TOKENS), mystrings) valid = [] time = 0 for i in range(trials): with Timer() as t: s = lf.fuzz() try: exec(s, {}, {}) valid.append((s, t.elapsed_time())) except: pass time += t.elapsed_time() print("%d valid strings, that is LangFuzzer generated %f%% valid entries" % (len(valid), len(valid) * 100.0 / trials)) print("Total time of %f seconds" % time) 61 valid strings, that is LangFuzzer generated 61.000000% valid entries Total time of 0.012519 seconds gf = GrammarFuzzer(VAR_GRAMMAR) valid = [] time = 0 for i in range(trials): with Timer() as t: s = gf.fuzz() try: exec(s, {}, {}) valid.append(s) except: pass time += t.elapsed_time() print("%d valid strings, that is GrammarFuzzer generated %f%% valid entries" % (len(valid), len(valid) * 100.0 / trials)) print("Total time of %f seconds" % time) 4 valid strings, that is GrammarFuzzer generated 4.000000% valid entries Total time of 1.572683 seconds That is, our LangFuzzer is rather effective on generating valid entries when compared to the GrammarFuzzer. ## Parsing Context-Free Grammars¶ ### Problems with PEG¶ While PEGs are simple at first sight, their behavior in some cases might be a bit unintuitive. For example, here is an example [Unresolved citation: redziejowski.]: PEG_SURPRISE = { "<A>": ["a<A>a", "aa"] } When interpreted as a CFG and used as a string generator, it will produce strings of the form aa, aaaa, aaaaaa that is, it produces strings where the number of a is$ 2*n $where$ n > 0 $. strings = [] for e in range(4): f = GrammarFuzzer(PEG_SURPRISE, start_symbol='<A>') tree = ('<A>', None) for _ in range(e): tree = f.expand_tree_once(tree) tree = f.expand_tree_with_strategy(tree, f.expand_node_min_cost) strings.append(tree_to_string(tree)) display_tree(tree) strings ['aa', 'aaaa', 'aaaaaa', 'aaaaaaaa'] However, the PEG parser can only recognize strings of the form$2^n$peg = PEGParser(PEG_SURPRISE, start_symbol='<A>') for s in strings: with ExpectError(): for tree in peg.parse(s): display_tree(tree) print(s) aa aaaa Traceback (most recent call last): File "<ipython-input-96-dec55ebf796e>", line 4, in <module> for tree in peg.parse(s): File "<ipython-input-49-247e45c602ef>", line 22, in parse raise SyntaxError("at " + repr(text[cursor:])) File "<string>", line None SyntaxError: at 'aa' (expected) aaaaaaaa This is not the only problem with Parsing Expression Grammars. While PEGs are expressive and the packrat parser for parsing them is simple and intuitive, PEGs suffer from a major deficiency for our purposes. PEGs are oriented towards language recognition, and it is not clear how to translate an arbitrary PEG to a CFG. As we mentioned earlier, a naive re-interpretation of a PEG as a CFG does not work very well. Further, it is not clear what is the exact relation between the class of languages represented by PEG and the class of languages represented by CFG. Since our primary focus is fuzzing – that is generation of strings – , we next look at parsers that can accept context-free grammars. The general idea of CFG parser is the following: Peek at the input text for the allowed number of characters, and use these, and our parser state to determine which rules can be applied to complete parsing. We next look at a typical CFG parsing algorithm, the Earley Parser. ### The Earley Parser¶ The Earley parser is a general parser that is able to parse any arbitrary CFG. It was invented by Jay Earley [Earley et al, 1970.] for use in computational linguistics. While its computational complexity is$O(n^3)$for parsing strings with arbitrary grammars, it can parse strings with unambiguous grammars in$O(n^2)$time, and all LR(k) grammars in linear time ($O(n)\$ [Joop M.I.M. Leo, 1991.]). Further improvements – notably handling epsilon rules – were invented by Aycock et al. [John Aycock et al, 2002.]. Note that one restriction of our implementation is that the start symbol can have only one alternative in its alternative expressions. This is not a restriction in practice because any grammar with multiple alternatives for its start symbol can be extended with a new start symbol that has the original start symbol as its only choice. That is, given a grammar as below, grammar = { '<start>': ['<A>', '<B>'], ... } one may rewrite it as below to conform to the single-alternative rule. grammar = { '<start>': ['<start_>'], '<start_>': ['<A>', '<B>'], ... } We first implement a simpler parser that is a parser for nearly all CFGs, but not quite. In particular, our parser does not understand epsilon rules – rules that derive empty string. We show later how the parser can be extended to handle these. We use the following grammar in our examples below. SAMPLE_GRAMMAR = { '<start>': ['<A><B>'], '<A>': ['a<B>c', 'a<A>'], '<B>': ['b<C>', '<D>'], '<C>': ['c'], '<D>': ['d'] } C_SAMPLE_GRAMMAR = canonical(SAMPLE_GRAMMAR) syntax_diagram(SAMPLE_GRAMMAR) start A B C D The basic idea of Earley parsing is the following • Start with the alternative expressions corresponding to the START_SYMBOL. These represent the possible ways to parse the string from a high level. Essentially each expression represents a parsing path. Queue each expression in our set of possible parses of the string. The parsed index of an expression is the part of expression that has already been recognized. In the beginning of parse, the parsed index of all expressions is at the beginning. Further, each letter gets a queue of expressions that recognizes that letter at that point in our parse. • Examine our queue of possible parses and check if any of them start with a nonterminal. If it does, then that nonterminal needs to be recognized from the input before the given rule can be parsed. Hence, add the alternative expressions corresponding to the nonterminal to the queue. Do this recursively. • At this point, we are ready to advance. Examine the current letter in the input, and select all expressions that have that particular letter at the parsed index. These expressions can now advance one step. Advance these selected expressions by incrementing their parsed index and add them to the queue of expressions in line for recognizing the next input letter. • If while doing these things, we find that any of the expressions have finished parsing, we fetch its corresponding nonterminal, and advance all expressions that have that nonterminal at their parsed index. • Continue this procedure recursively until all expressions that we have queued for the current letter have been processed. Then start processing the queue for the next letter. We explain each step in detail with examples in the coming sections. The parser uses dynamic programming to generate a table containing a forest of possible parses at each letter index – the table contains as many columns as there are letters in the input, and each column contains different parsing rules at various stages of the parse. For example, given an input adcd, the Column 0 would contain the following: <start> : ● <A> <B> which is the starting rule that indicates that we are currently parsing the rule <start>, and the parsing state is just before identifying the symbol <A>. It would also contain the following which are two alternative paths it could take to complete the parsing. <A> : ● a <B> c <A> : ● a <A> Column 1 would contain the following, which represents the possible completion after reading a. <A> : a ● <B> c <A> : a ● <A> <B> : ● b <C> <B> : ● <D> <A> : ● a <B> c <A> : ● a <A> <D> : ● d Column 2 would contain the following after reading d <D> : d ● <B> : <D> ● <A> : a <B> ● c Similarly, Column 3 would contain the following after reading c <A> : a <B> c ● <start> : <A> ● <B> <B> : ● b <C> <B> : ● <D> <D> : ● d Finally, Column 4 would contain the following after reading d, with the at the end of the <start> rule indicating that the parse was successful. <D> : d ● <B> : <D> ● <start> : <A> <B> ● As you can see from above, we are essentially filling a table (a table is also called a chart) of entries based on each letter we read, and the grammar rules that can be applied. This chart gives the parser its other name -- Chart parsing. ### Columns¶ We define the Column first. The Column is initialized by its own index in the input string, and the letter at that index. Internally, we also keep track of the states that are added to the column as the parsing progresses. class Column(object): def __init__(self, index, letter): self.index, self.letter = index, letter self.states, self._unique = [], {} def __str__(self): return "%s chart[%d]\n%s" % (self.letter, self.index, "\n".join( str(state) for state in self.states if state.finished())) The Column only stores unique states. Hence, when a new state is added to our Column, we check whether it is already known. class Column(Column): if state in self._unique: return self._unique[state] self._unique[state] = state self.states.append(state) state.e_col = self return self._unique[state] ### Items¶ An item represents a parse in progress for a specific rule. Hence the item contains the name of the nonterminal, and the corresponding alternative expression (expr) which together form the rule, and the current position of parsing in this expression -- dot. Note. If you are familiar with LR parsing, you will notice that an item is simply an LR0 item. class Item(object): def __init__(self, name, expr, dot): self.name, self.expr, self.dot = name, expr, dot We also provide a few convenience methods. The method finished() checks if the dot has moved beyond the last element in expr. The method advance() produces a new Item with the dot advanced one token, and represents an advance of the parsing. The method at_dot() returns the current symbol being parsed. class Item(Item): def finished(self): return self.dot >= len(self.expr) return Item(self.name, self.expr, self.dot + 1) def at_dot(self): return self.expr[self.dot] if self.dot < len(self.expr) else None Here is how an item could be used. We first define our item item_name = '<B>' item_expr = C_SAMPLE_GRAMMAR[item_name][1] an_item = Item(item_name, tuple(item_expr), 0) To determine where the status of parsing, we use at_dot() an_item.at_dot() '<D>' That is, the next symbol to be parsed is <D> If we advance the item, we get another item that represents the finished parsing rule <B>. another_item.finished() True ### States¶ For Earley parsing, the state of the parsing is simply one Item along with some meta information such as the starting s_col and ending column e_col for each state. Hence we inherit from Item to create a State. Since we are interested in comparing states, we define hash() and eq() with the corresponding methods. class State(Item): def __init__(self, name, expr, dot, s_col, e_col=None): super().__init__(name, expr, dot) self.s_col, self.e_col = s_col, e_col def __str__(self): def idx(var): return var.index if var else -1 return self.name + ':= ' + ' '.join([ str(p) for p in [*self.expr[:self.dot], '|', *self.expr[self.dot:]] ]) + "(%d,%d)" % (idx(self.s_col), idx(self.e_col)) def copy(self): return State(self.name, self.expr, self.dot, self.s_col, self.e_col) def _t(self): return (self.name, self.expr, self.dot, self.s_col.index) def __hash__(self): return hash(self._t()) def __eq__(self, other): return self._t() == other._t() return State(self.name, self.expr, self.dot + 1, self.s_col) The usage of State is similar to that of Item. The only difference is that it is used along with the Column to track the parsing state. For example, we initialize the first column as follows: col_0 = Column(0, None) item_expr = tuple(*C_SAMPLE_GRAMMAR[START_SYMBOL]) start_state = State(START_SYMBOL, item_expr, 0, col_0) start_state.at_dot() '<A>' The first column is then updated by using add() method of Column sym = start_state.at_dot() for alt in C_SAMPLE_GRAMMAR[sym]: for s in col_0.states: print(s) <start>:= | <A> <B>(0,0) <A>:= | a <B> c(0,0) <A>:= | a <A>(0,0) ### The Parsing Algorithm¶ The Earley algorithm starts by initializing the chart with columns (as many as there are letters in the input). We also seed the first column with a state representing the expression corresponding to the start symbol. In our case, the state corresponds to the start symbol with the dot at 0 is represented as below. The symbol represents the parsing status. In this case, we have not parsed anything. <start>: ● <A> <B> We pass this partial chart to a method for filling the rest of the parse chart. class EarleyParser(Parser): def __init__(self, grammar, **kwargs): super().__init__(grammar, **kwargs) self.cgrammar = canonical(grammar, letters=True) Before starting to parse, we seed the chart with the state representing the ongoing parse of the start symbol. class EarleyParser(EarleyParser): def chart_parse(self, words, start): alt = tuple(*self.cgrammar[start]) chart = [Column(i, tok) for i, tok in enumerate([None, *words])] return self.fill_chart(chart) The main parsing loop in fill_chart() has three fundamental operations. predict(), scan(), and complete(). We discuss predict next. ### Predicting States¶ We have already seeded chart[0] with a state [<A>,<B>] with dot at 0. Next, given that <A> is a nonterminal, we predict the possible parse continuations of this state. That is, it could be either a <B> c or A <A>. The general idea of predict() is as follows: Say you have a state with name <A> from the above grammar, and expression containing [a,<B>,c]. Imagine that you have seen a already, which means that the dot will be on <B>. Below, is a representation of our parse status. The left hand side of ● represents the portion already parsed (a), and the right hand side represents the portion yet to be parsed (<B> c). <A>: a ● <B> c To recognize <B>, we look at the definition of <B>, which has different alternative expressions. The predict() step adds each of these alternatives to the set of states, with dot at 0. <A>: a ● <B> c <B>: ● b c <B>: ● <D> In essence, the predict() method, when called with the current nonterminal, fetches the alternative expressions corresponding to this nonterminal, and adds these as predicted child states to the current column. class EarleyParser(EarleyParser): def predict(self, col, sym, state): for alt in self.cgrammar[sym]: To see how to use predict, we first construct the 0th column as before, and we assign the constructed column to an instance of the EarleyParser. col_0 = Column(0, None) ep = EarleyParser(SAMPLE_GRAMMAR) ep.chart = [col_0] It should contain a single state -- <start> at 0 for s in ep.chart[0].states: print(s) <start>:= | <A> <B>(0,0) We apply predict to fill out the 0th column, and the column should contain the possible parse paths. ep.predict(col_0, '<A>', s) for s in ep.chart[0].states: print(s) <start>:= | <A> <B>(0,0) <A>:= | a <B> c(0,0) <A>:= | a <A>(0,0) ### Scanning Tokens¶ What if rather than a nonterminal, the state contained a terminal symbol such as a letter? In that case, we are ready to make some progress. For example, consider the second state: <B>: ● b c We scan the next column's letter. Say the next token is b. If the letter matches what we have, then create a new state by advancing the current state by one letter. <B>: b ● c This new state is added to the next column (i.e the column that has the matched letter). class EarleyParser(EarleyParser): def scan(self, col, state, letter): if letter == col.letter: As before, we construct the partial parse first, this time adding a new column so that we can observe the effects of scan() ep = EarleyParser(SAMPLE_GRAMMAR) col_1 = Column(1, 'a') ep.chart = [col_0, col_1] new_state = ep.chart[0].states[1] print(new_state) <A>:= | a <B> c(0,0) ep.scan(col_1, new_state, 'a') for s in ep.chart[1].states: print(s) <A>:= a | <B> c(0,1) ### Completing Processing¶ When we advance, what if we actually complete() the processing of the current rule? If so, we want to update not just this state, but also all the parent states from which this state was derived. For example, say we have states as below. <A>: a ● <B> c <B>: b c ● The state <B>: b c ● is now complete. So, we need to advance <A>: a ● <B> c one step forward. How do we determine the parent states? Note from predict that we added the predicted child states to the same column as that of the inspected state. Hence, we look at the starting column of the current state, with the same symbol at_dot as that of the name of the completed state. For each such parent found, we advance that parent (because we have just finished parsing that non terminal for their at_dot) and add the new states to the current column. class EarleyParser(EarleyParser): def complete(self, col, state): return self.earley_complete(col, state) def earley_complete(self, col, state): parent_states = [ st for st in state.s_col.states if st.at_dot() == state.name ] for st in parent_states: Here is an example of completed processing. First we complete the Column 0 ep = EarleyParser(SAMPLE_GRAMMAR) col_1 = Column(1, 'a') col_2 = Column(2, 'd') ep.chart = [col_0, col_1, col_2] ep.predict(col_0, '<A>', s) for s in ep.chart[0].states: print(s) <start>:= | <A> <B>(0,0) <A>:= | a <B> c(0,0) <A>:= | a <A>(0,0) Then we use scan() to populate Column 1 for state in ep.chart[0].states: if state.at_dot() not in SAMPLE_GRAMMAR: ep.scan(col_1, state, 'a') for s in ep.chart[1].states: print(s) <A>:= a | <B> c(0,1) <A>:= a | <A>(0,1) for state in ep.chart[1].states: if state.at_dot() in SAMPLE_GRAMMAR: ep.predict(col_1, state.at_dot(), state) for s in ep.chart[1].states: print(s) <A>:= a | <B> c(0,1) <A>:= a | <A>(0,1) <B>:= | b <C>(1,1) <B>:= | <D>(1,1) <A>:= | a <B> c(1,1) <A>:= | a <A>(1,1) <D>:= | d(1,1) Then we use scan() again to populate Column 2 for state in ep.chart[1].states: if state.at_dot() not in SAMPLE_GRAMMAR: ep.scan(col_2, state, state.at_dot()) for s in ep.chart[2].states: print(s) <D>:= d |(1,2) Now, we can use complete(): for state in ep.chart[2].states: if state.finished(): ep.complete(col_2, state) for s in ep.chart[2].states: print(s) <D>:= d |(1,2) <B>:= <D> |(1,2) <A>:= a <B> | c(0,2) ### Filling the Chart¶ The main driving loop in fill_chart() essentially calls these operations in order. We loop over each column in order. • For each column, fetch one state in the column at a time, and check if the state is finished. • If it is, then we complete() all the parent states depending on this state. • If the state was not finished, we check to see if the state's current symbol at_dot is a nonterminal. • If it is a nonterminal, we predict() possible continuations, and update the current column with these states. • If it was not, we scan() the next column and advance the current state if it matches the next letter. class EarleyParser(EarleyParser): def fill_chart(self, chart): for i, col in enumerate(chart): for state in col.states: if state.finished(): self.complete(col, state) else: sym = state.at_dot() if sym in self.cgrammar: self.predict(col, sym, state) else: if i + 1 >= len(chart): continue self.scan(chart[i + 1], state, sym) if self.log: print(col, '\n') return chart We now can recognize a given string as belonging to a language represented by a grammar. ep = EarleyParser(SAMPLE_GRAMMAR, log=True) None chart[0] a chart[1] d chart[2] <D>:= d |(1,2) <B>:= <D> |(1,2) c chart[3] <A>:= a <B> c |(0,3) d chart[4] <D>:= d |(3,4) <B>:= <D> |(3,4) <start>:= <A> <B> |(0,4) The chart we printed above only shows completed entries at each index. The parenthesized expression indicates the column just before the first character was recognized, and the ending column. Notice how the <start> nonterminal shows fully parsed status. last_col = columns[-1] for s in last_col.states: if s.name == '<start>': print(s) <start>:= <A> <B> |(0,4) Since chart_parse() returns the completed table, we now need to extract the derivation trees. ### The Parse Method¶ For determining how far we have managed to parse, we simply look for the last index from chart_parse() where the start_symbol was found. class EarleyParser(EarleyParser): def parse_prefix(self, text): self.table = self.chart_parse(text, self.start_symbol()) for col in reversed(self.table): states = [ st for st in col.states if st.name == self.start_symbol() ] if states: return col.index, states return -1, [] Here is the parse_prefix() in action. ep = EarleyParser(SAMPLE_GRAMMAR) print(cursor, [str(s) for s in last_states]) 4 ['<start>:= <A> <B> |(0,4)'] The following is adapted from the excellent reference on Earley parsing by Loup Vaillant. Our parse() method is as follows. It depends on two methods parse_forest() and extract_trees() that will be defined next. class EarleyParser(EarleyParser): def parse(self, text): cursor, states = self.parse_prefix(text) start = next((s for s in states if s.finished()), None) if cursor < len(text) or not start: raise SyntaxError("at " + repr(text[cursor:])) forest = self.extract_trees(self.parse_forest(self.table, start)) return [self.prune_tree(tree) for tree in forest] ### Parsing Paths¶ The parse_paths() method tries to unify the given expression in named_expr with the parsed string. For that, it extracts the last symbol in named_expr and checks if it is a terminal symbol. If it is, then it checks the chart at til to see if the letter corresponding to the position matches the terminal symbol. If it does, extend our start index by the length of the symbol. If the symbol was a nonterminal symbol, then we retrieve the parsed states at the current end column index (til) that correspond to the nonterminal symbol, and collect the start index. These are the end column indexes for the remaining expression. Given our list of start indexes, we obtain the parse paths from the remaining expression. If we can obtain any, then we return the parse paths. If not, we return an empty list. class EarleyParser(EarleyParser): def parse_paths(self, named_expr, chart, frm, til): def paths(state, start, k, e): if not e: return [[(state, k)]] if start == frm else [] else: return [[(state, k)] + r for r in self.parse_paths(e, chart, frm, start)] *expr, var = named_expr starts = None if var not in self.cgrammar: starts = ([(var, til - len(var), 't')] if til > 0 and chart[til].letter == var else []) else: starts = [(s, s.s_col.index, 'n') for s in chart[til].states if s.finished() and s.name == var] return [p for s, start, k in starts for p in paths(s, start, k, expr)] Here is the parse_paths() in action print(SAMPLE_GRAMMAR['<start>']) ep = EarleyParser(SAMPLE_GRAMMAR) completed_start = last_states[0] paths = ep.parse_paths(completed_start.expr, columns, 0, 4) for path in paths: print([list(str(s_) for s_ in s) for s in path]) ['<A><B>'] [['<B>:= <D> |(3,4)', 'n'], ['<A>:= a <B> c |(0,3)', 'n']] That is, the parse path for <start> given the input adcd included recognizing the expression <A><B>. This was recognized by the two states: <A> from input(0) to input(2) which further involved recognizing the rule a<B>c, and the next state <B> from input(3) which involved recognizing the rule <D>. ### Parsing Forests¶ The parse_forest() method takes the state which represents the completed parse, and determines the possible ways that its expressions corresponded to the parsed expression. For example, say we are parsing 1+2+3, and the state has [<expr>,+,<expr>] in expr. It could have been parsed as either [{<expr>:1+2},+,{<expr>:3}] or [{<expr>:1},+,{<expr>:2+3}]. class EarleyParser(EarleyParser): def parse_forest(self, chart, state): def forest(s, kind): return self.parse_forest(chart, s) if kind == 'n' else (s, []) pathexprs = self.parse_paths(state.expr, chart, state.s_col.index, state.e_col.index) if state.expr else [] return state.name, [[forest(v, k) for v, k in reversed(pathexpr)] for pathexpr in pathexprs] ep = EarleyParser(SAMPLE_GRAMMAR) result = ep.parse_forest(columns, last_states[0]) result ('<start>', [[('<A>', [[('a', []), ('<B>', [[('<D>', [[('d', [])]])]]), ('c', [])]]), ('<B>', [[('<D>', [[('d', [])]])]])]]) ### Extracting Trees¶ What we have from parse_forest() is a forest of trees. We need to extract a single tree from that forest. That is accomplished as follows. (For now, we return the first available derivation tree. To do that, we need to extract the parse forest from the state corresponding to start.) class EarleyParser(EarleyParser): def extract_a_tree(self, forest_node): name, paths = forest_node if not paths: return (name, []) return (name, [self.extract_a_tree(p) for p in paths[0]]) def extract_trees(self, forest): return [self.extract_a_tree(forest)] We now verify that our parser can parse a given expression. A3_GRAMMAR = { "<start>": ["<expr>"], "<expr>": ["<expr>+<expr>", "<expr>-<expr>", "(<expr>)", "<integer>"], "<integer>": ["<digit><integer>", "<digit>"], "<digit>": ["0", "1", "2", "3", "4", "5", "6", "7", "8", "9"] } syntax_diagram(A3_GRAMMAR) start expr integer digit mystring = '(1+24)-33' parser = EarleyParser(A3_GRAMMAR) for tree in parser.parse(mystring): assert tree_to_string(tree) == mystring display_tree(tree) We now have a complete parser that can parse almost arbitrary CFG. There remains a small corner to fix -- the case of epsilon rules as we will see later. ### Ambiguous Parsing¶ Ambiguous grammars are grammars that can produce multiple derivation trees for some given string. For example, the A3_GRAMMAR can parse 1+2+3 in two different ways – [1+2]+3 and 1+[2+3]. Extracting a single tree might be reasonable for unambiguous parses. However, what if the given grammar produces ambiguity when given a string? We need to extract all derivation trees in that case. We enhance our extract_trees() method to extract multiple derivation trees. class EarleyParser(EarleyParser): def extract_trees(self, forest_node): name, paths = forest_node if not paths: return [(name, [])] results = [] for path in paths: ptrees = zip(*[self.extract_trees(p) for p in path]) results.extend([(name, p) for p in ptrees]) return results As before, we verify that everything works. mystring = '12+23-34' parser = EarleyParser(A1_GRAMMAR) for tree in parser.parse(mystring): assert mystring == tree_to_string(tree) display_tree(tree) One can also use a GrammarFuzzer to verify that everything works. gf = GrammarFuzzer(A1_GRAMMAR) for i in range(5): s = gf.fuzz() print(i, s) for tree in parser.parse(s): assert tree_to_string(tree) == s 0 3 1 2-2-2-8-8-8+3-6-9+5 2 9-48+0-5-3+9+90+5-6+8-847 3 2-7-62-8-7+7+5-3-6+1 4 8-1+2-5+4+9-0-4+6-1 ### The Aycock Epsilon Fix¶ While parsing, one often requires to know whether a given nonterminal can derive an empty string. For example, in the following grammar A can derive an empty string, while B can't. The nonterminals that can derive an empty string are called nullable nonterminals. For example, in the below grammar E_GRAMMAR_1, <A> is nullable, and since <A> is one of the alternatives of <start>, <start> is also nullable. But <B> is not nullable. E_GRAMMAR_1 = { '<start>': ['<A>', '<B>'], '<A>': ['a', ''], '<B>': ['b'] } One of the problems with the original Earley implementation is that it does not handle rules that can derive empty strings very well. For example, the given grammar should match a EPSILON = '' E_GRAMMAR = { '<start>': ['<S>'], '<S>': ['<A><A><A><A>'], '<A>': ['a', '<E>'], '<E>': [EPSILON] } syntax_diagram(E_GRAMMAR) start S A E mystring = 'a' parser = EarleyParser(E_GRAMMAR) with ExpectError(): trees = parser.parse(mystring) Traceback (most recent call last): File "<ipython-input-146-61c19f40fd3a>", line 4, in <module> trees = parser.parse(mystring) File "<ipython-input-131-1b14a4332f3d>", line 6, in parse raise SyntaxError("at " + repr(text[cursor:])) File "<string>", line None SyntaxError: at 'a' (expected) Aycock et al.[John Aycock et al, 2002.] suggests a simple fix. Their idea is to pre-compute the nullable set and use it to advance the nullable states. However, before we do that, we need to compute the nullable set. The nullable set consists of all nonterminals that can derive an empty string. Computing the nullable set requires expanding each production rule in the grammar iteratively and inspecting whether a given rule can derive the empty string. Each iteration needs to take into account new terminals that have been found to be nullable. The procedure stops when we obtain a stable result. This procedure can be abstracted into a more general method fixpoint. #### Fixpoint¶ A fixpoint of a function is an element in the function's domain such that it is mapped to itself. For example, 1 is a fixpoint of square root because squareroot(1) == 1. (We use str rather than hash to check for equality in fixpoint because the data structure set, which we would like to use as an argument has a good string representation but is not hashable). def fixpoint(f): def helper(arg): while True: sarg = str(arg) arg_ = f(arg) if str(arg_) == sarg: return arg arg = arg_ return helper Remember my_sqrt() from the first chapter? We can define my_sqrt() using fixpoint. def my_sqrt(x): @fixpoint def _my_sqrt(approx): return (approx + x / approx) / 2 return _my_sqrt(1) my_sqrt(2) 1.414213562373095 #### Nullable¶ Similarly, we can define nullable using fixpoint. We essentially provide the definition of a single intermediate step. That is, assuming that nullables contain the current nullable nonterminals, we iterate over the grammar looking for productions which are nullable -- that is, productions where the entire sequence can yield an empty string on some expansion. We need to iterate over the different alternative expressions and their corresponding nonterminals. Hence we define a rules() method converts our dictionary representation to this pair format. def rules(grammar): return [(key, choice) for key, choices in grammar.items() for choice in choices] The terminals() method extracts all terminal symbols from a canonical grammar representation. def terminals(grammar): return set(token for key, choice in rules(grammar) for token in choice if token not in grammar) def nullable_expr(expr, nullables): return all(token in nullables for token in expr) def nullable(grammar): productions = rules(grammar) @fixpoint def nullable_(nullables): for A, expr in productions: if nullable_expr(expr, nullables): nullables |= {A} return (nullables) return nullable_({EPSILON}) for key, grammar in { 'E_GRAMMAR': E_GRAMMAR, 'E_GRAMMAR_1': E_GRAMMAR_1 }.items(): print(key, nullable(canonical(grammar))) E_GRAMMAR {'', '<A>', '<start>', '<E>', '<S>'} E_GRAMMAR_1 {'', '<A>', '<start>'} So, once we have the nullable set, all that we need to do is, after we have called predict on a state corresponding to a nonterminal, check if it is nullable and if it is, advance and add the state to the current column. class EarleyParser(EarleyParser): def __init__(self, grammar, **kwargs): super().__init__(grammar, **kwargs) self.cgrammar = canonical(grammar, letters=True) self.epsilon = nullable(self.cgrammar) def predict(self, col, sym, state): for alt in self.cgrammar[sym]: if sym in self.epsilon: mystring = 'a' parser = EarleyParser(E_GRAMMAR) for tree in parser.parse(mystring): display_tree(tree) ### More Earley Parsing¶ A number of other optimizations exist for Earley parsers. A fast industrial strength Earley parser implementation is the Marpa parser. Further, Earley parsing need not be restricted to character data. One may also parse streams (audio and video streams) [Qi et al, 2018.] using a generalized Earley parser. ## Testing the Parsers¶ While we have defined two parser variants, it would be nice to have some confirmation that our parses work well. While it is possible to formally prove that they work, it is much more satisfying to generate random grammars, their corresponding strings, and parse them using the same grammar. def prod_line_grammar(nonterminals, terminals): g = { '<start>': ['<symbols>'], '<symbols>': ['<symbol><symbols>', '<symbol>'], '<symbol>': ['<nonterminals>', '<terminals>'], '<nonterminals>': ['<lt><alpha><gt>'], '<lt>': ['<'], '<gt>': ['>'], '<alpha>': nonterminals, '<terminals>': terminals } if not nonterminals: g['<nonterminals>'] = [''] del g['<lt>'] del g['<alpha>'] del g['<gt>'] return g syntax_diagram(prod_line_grammar(["A", "B", "C"], ["1", "2", "3"])) start symbols symbol nonterminals lt gt alpha terminals def make_rule(nonterminals, terminals, num_alts): prod_grammar = prod_line_grammar(nonterminals, terminals) gf = GrammarFuzzer(prod_grammar, min_nonterminals=3, max_nonterminals=5) name = "<%s>" % ''.join(random.choices(string.ascii_uppercase, k=3)) return (name, [gf.fuzz() for _ in range(num_alts)]) make_rule(["A", "B", "C"], ["1", "2", "3"], 3) ('<HDG>', ['<C>1', '<A>31', '13333']) def make_grammar(num_symbols=3, num_alts=3): terminals = list(string.ascii_lowercase) grammar = {} name = None for _ in range(num_symbols): nonterminals = [k[1:-1] for k in grammar.keys()] name, expansions = \ make_rule(nonterminals, terminals, num_alts) grammar[name] = expansions grammar[START_SYMBOL] = [name] assert is_valid_grammar(grammar) return grammar make_grammar() {'<LLV>': ['gz', 'eg', 's'], '<GDO>': ['<LLV><LLV>', 'eobqe', '<LLV>e<LLV>'], '<VES>': ['<GDO>ws', '<GDO><LLV>', '<LLV><LLV>s'], '<start>': ['<VES>']} Now we verify if our arbitrary grammars can be used by the Earley parser. for i in range(5): my_grammar = make_grammar() print(my_grammar) parser = EarleyParser(my_grammar) mygf = GrammarFuzzer(my_grammar) s = mygf.fuzz() print(s) for tree in parser.parse(s): assert tree_to_string(tree) == s display_tree(tree) {'<EIZ>': ['q', 'ti', 'moa'], '<ISQ>': ['<EIZ>rrqy', '<EIZ>ss', 'hhb'], '<KWH>': ['v<ISQ>pd', '<ISQ>wung', '<EIZ>fo'], '<start>': ['<KWH>']} qfo {'<OUZ>': ['cr', 'eyha', 'kp'], '<BTM>': ['<OUZ>tq', 'mk<OUZ>d', 'gi<OUZ>'], '<YIO>': ['itiih', 'c<OUZ><BTM>y', '<OUZ>zx'], '<start>': ['<YIO>']} ceyhaeyhatqy {'<HKL>': ['jy', 'oigm', ''], '<KBP>': ['<HKL>a<HKL>', '<HKL>d', '<HKL>gr'], '<UHE>': ['<KBP>kk', '<KBP>jy', 'lqy'], '<start>': ['<UHE>']} lqy {'<TOR>': ['r', 'znz', 's'], '<DOX>': ['<TOR>rqri', '<TOR><TOR>', '<TOR>oa'], '<VGG>': ['<TOR>k', '<DOX>uy', '<DOX>cn'], '<start>': ['<VGG>']} roauy {'<IFU>': ['ifx', 'te', 'ver'], '<NIY>': ['<IFU>hl', '<IFU>mkt', '<IFU><IFU>'], '<JKU>': ['<IFU>i', '<IFU>xj', '<IFU>p<NIY>'], '<start>': ['<JKU>']} verxj With this, we have completed both implementation and testing of arbitrary CFG, which can now be used along with LangFuzzer to generate better fuzzing inputs. ## Background¶ Numerous parsing techniques exist that can parse a given string using a given grammar, and produce corresponding derivation tree or trees. However, some of these techniques work only on specific classes of grammars. These classes of grammars are named after the specific kind of parser that can accept grammars of that category. That is, the upper bound for the capabilities of the parser defines the grammar class named after that parser. The LL and LR parsing are the main traditions in parsing. Here, LL means left-to-right, leftmost derivation, and it represents a top-down approach. On the other hand, and LR (left-to-right, rightmost derivation) represents a bottom-up approach. Another way to look at it is that LL parsers compute the derivation tree incrementally in pre-order while LR parsers compute the derivation tree in post-order [Pingali et al, 2015.]). Different classes of grammars differ in the features that are available to the user for writing a grammar of that class. That is, the corresponding kind of parser will be unable to parse a grammar that makes use of more features than allowed. For example, the A2_GRAMMAR is an LL grammar because it lacks left recursion, w
# Convert D3DLIGHT_SPOT to use per-pixel lighting This topic is 5421 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic. ## Recommended Posts Hi! I finally succeeded in setting up my lights. But in my opinion, the standard per-vertex lighting looks quite ugly and unrealistic when applied to faces with pretty few vertices. So now I want to convert my light(s) to use per-pixel lighting in shader (v1.1-1.3 if possible, my card doesn't support higher versions). But I'm a complete shader-newbie, so I need your guidance. This is my light: ltFlashlight.Type = D3DLIGHT_SPOT; ltFlashlight.Diffuse.r = ltFlashlight.Ambient.r = 1.0f; ltFlashlight.Diffuse.g = ltFlashlight.Ambient.g = 1.0f; ltFlashlight.Diffuse.b = ltFlashlight.Ambient.b = 1.0f; ltFlashlight.Diffuse.a = ltFlashlight.Ambient.a = 0.0f; ltFlashlight.Range = 500.0f; ltFlashlight.Position = vecLight; ltFlashlight.Direction = vLook; ltFlashlight.Falloff = 1.0f; ltFlashlight.Attenuation0 = 1.0f; ltFlashlight.Attenuation1 = 0.0f; ltFlashlight.Attenuation2 = 0.0f; ltFlashlight.Phi = 1.0f; ltFlashlight.Theta = 0.5f; Furthermore I have: - proper vertex normals - eye and lookat position - world/view/proj-matrix Now I want to write a shader to convert my per-vertex lighting to be lit per-pixel. I hope you can explain me how to do this. One note to the end: I read some tutorials about loading/compiling .psh or .fx (HLSL) files, so you may focus on the actual shader. I hope I can accomplish the rest by myself. thanks in advance! • 18 • 29 • 11 • 21 • 16
#### Posting Decoded Utterances to a Callback Server in Real-time Description: Transcribe a short audio file and post the decoded utterances to a callback HTTP server as soon as they are decoded. This example shows how real-time streaming transcription results are provided. The jsontop output mode is used to make example results shorter and easier to read. Command: curl -F utterance_callback=http://10.173.215.203:5555/utterance \ -F datahdr=WAVE -F output=jsontop -F scrubtext=true \ -F file=@sample7.wav \ http://vblaze_name:17171/transcribe Prerequisites: To follow this example, you must have a callback server running on a given host and port. If you do not already have a callback server, the easiest way to simulate this is to use the netcat application to listen on a specified port and display the information that it receives. The netcat application is a computer networking utility for reading from and writing to network connections using the TCP or UDP protocols. The name of its executable version is typically nc or nc.exe, depending on the operating system that you are using. The netcat utility is included in most Linux distributions and is freely available for most modern operating systems. ### Tip The sample output shown later in this section was produced by a callback server that uses the netcat command, and which was started using the following Linux command-line command: $nc -l 5555 -k The jsontop transcription of the audio file produced by the cURL command that was shown previously is the following: { "source":"sample7.wav", "confidence":0.89, "donedate":"2019-01-15 15:35:15.292821", "recvtz":["EST",-18000], "text":"Thank you for calling center point energy technical support. I understand you need to report a gas leak and I have your name please my name is Joe and I thank you Mr. Know what is your address or account number my address and then one Martin Houston, Texas is there. Anyone inside the house? I know everyone is out of the house. I notice the strange smell when I got home and I called you I am sending and gas technician to your home to fix the problem. Could you give me a good number to reach you at you can call ######## zero's. Thank you, please be safe and wait for the technician to arrive call us back if anything changes. Thank you, bye. Good bye and thank you for calling center point energy.", "model":"eng1:callcenter", "recvdate":"2019-01-15 15:35:12.888907", "scrubbed":true } ### Note This sample transcription has been pretty-printed to improve readability. Result: The following results were produced by using netcat as the utterance_callback server. The -l option tells netcat to listen on the network port that is specified as the following argument. The -k option tells netcat to continue listening for another connection after a current connection is completed. Note that each block of speech (utterance) is sent to the callback server independently. As with the previous example, identifying information has been replaced with hash marks ('#'), one per redacted character. $ nc -l 5555 -k POST / HTTP/1.1 Host: localhost:5555 Accept-Encoding: identity Content-Length: 410 Content-Type: application/json {"source":"sample7.wav","utterance":{"confidence":0.94,"end":7.76,"recvtz":["EST",-18000],"text":"Thank you for calling center point energy technical support. I understand you need to report a gas leak and I have your name please","start":0.05,"donedate":"2019-01-15 16:00:03.055625","recvdate":"2019-01-15 16:00:00.686514","metadata":{"source":"sample7.wav","model":"eng1:callcenter","uttid":0,"channel":0}}}POST / HTTP/1.1 Host: localhost:5555 Accept-Encoding: identity Content-Length: 357 Content-Type: application/json {"source":"sample7.wav","utterance":{"confidence":0.83,"end":16.1,"recvtz":["EST",-18000],"text":"my name is Joe and I thank you Mr. Know what is your address or account number","start":9.78,"donedate":"2019-01-15 16:00:03.056699","recvdate":"2019-01-15 16:00:00.692817","metadata":{"source":"sample7.wav","model":"eng1:callcenter","uttid":1,"channel":0}}}POST / HTTP/1.1 Host: localhost:5555 Accept-Encoding: identity Content-Length: 571 Content-Type: application/json {"source":"sample7.wav","utterance":{"confidence":0.88,"end":41.37,"recvtz":["EST",-18000],"text":"my address and then one Martin Houston, Texas is there. Anyone inside the house? I know everyone is out of the house. I notice the strange smell when I got home and I called you I am sending and gas technician to your home to fix the problem. Could you give me a good number to reach you at","start":18.08,"donedate":"2019-01-15 16:00:03.081001","recvdate":"2019-01-15 16:00:00.886012","metadata":{"source":"sample7.wav","model":"eng1:callcenter","uttid":2,"channel":0}}}POST / HTTP/1.1 Host: localhost:5555 Accept-Encoding: identity Content-Length: 325 Content-Type: application/json {"source":"sample7.wav","utterance":{"confidence":0.81,"end":49.75,"recvtz":["EST",-18000],"text":"you can call ######## zero's.","start":43.7,"donedate":"2019-01-15 16:00:03.081933","recvdate":"2019-01-15 16:00:00.958482","metadata":{"source":"sample7.wav","model":"eng1:callcenter","uttid":3,"scrubbed":true,"channel":0}}}POST / HTTP/1.1 Host: localhost:5555 Accept-Encoding: identity Content-Length: 377 Content-Type: application/json {"source":"sample7.wav","utterance":{"confidence":0.94,"end":57.8,"recvtz":["EST",-18000],"text":"Thank you, please be safe and wait for the technician to arrive call us back if anything changes.","start":51.44,"donedate":"2019-01-15 16:00:03.083021","recvdate":"2019-01-15 16:00:00.966422","metadata":{"source":"sample7.wav","model":"eng1:callcenter","uttid":4,"channel":0}}}POST / HTTP/1.1 Host: localhost:5555 Accept-Encoding: identity Content-Length: 352 Content-Type: application/json {"source":"sample7.wav","utterance":{"confidence":0.96,"end":64.71,"recvtz":["EST",-18000],"text":"Thank you, bye. Good bye and thank you for calling center point energy.","start":60.41,"donedate":"2019-01-15 16:00:03.088625","recvdate":"2019-01-15 16:00:00.974230","metadata":{"source":"sample7.wav","model":"eng1:callcenter","uttid":5,"channel":0}}}
# To Accumulate a Rate — Integrate! Teaching High School Mathematics # Quadratic slopes without a derivative Note in the graph above that the slope of the tangent line at x = 1 is the same as the slope of the line that goes through the points on the parabola that are both the same distance away from x = 1. It doesn’t matter what distance as long as you go the same distance in each direction. I did my introductory derivative lessons a little bit differently this year. We manually calculated slopes of two points that are closer and closer to the point where we wanted the slope for more problems than I normally would. We also did it in three ways including choosing a point to the left and right an equal distance from the point in question. When students used two points on opposite sides of an x value to find the slope of quadratics they would get the correct slope on the first set of points and didn’t need to make the points get closer and closer together. I quickly gave them $f(x)=x^3$ to show them that it doesn’t always work. I was completely intrigued and was wondering if it always works with parabolas. It seemed reasonable, after all the slope of a straight line is the slope between any two of it’s points. Could the slope of a parabola at any point be the slope between two points whose x values are equidistant from the x value of the point you want to find the slope at? I think that I might have noticed this before while doing the mean value theorem with quadratics, but didn’t think much of it. This week however my students were noticing it and I felt compelled to investigate more. I was wondering if there is a method for cubics… At first thought my guess is no, but I haven’t proven that it can’t be done. Any thoughts? ### Information This entry was posted on September 29, 2012 by in Calculus, ideas and tagged , , , , , , , , .