text:
# Given the linear equation 2x + 3y – 8 = 0, write another linear equation in two variables such that the geometrical representation of pair formed is:

+1 vote
820 views

Given the linear equation 2x + 3y – 8 = 0, write another linear equation in two variables such that the geometrical representation of the pair so formed is:
(i) intersecting lines (ii) parallel lines
(iii) coincident lines

by (28.5k points)

Solution: (i) intersecting lines
2x + 3y – 8 = 0
The condition for intersecting lines is
So we multiply any value with a1  and not with b1
If we multiply by 2  second such equation  will
4x + 3y – 8 = 0

(ii)parallel lines

the condition for parallel lines is

So multiply with a1 , b1 with any number and not multiply with c
if we multiply by 2 then second equation will
4x + 6y – 8 = 0

(iii) coincident lines

the condition for coincident lines are

So multiply by any number with whole equation
If we multiply by 2 we get
4x +  6y – 16 = 0


text:
You can have different configurations for production and development environments.

Node assumes it’s always running in a development environment. You can signal Node.js that you are running in production by setting the NODE_ENV=production environment variable.

This is usually done by executing the command

export NODE_ENV=production

in the shell, but it’s better to put it in your shell configuration file (e.g. .bash_profile with the Bash shell) because otherwise the setting does not persist in case of a system restart.

You can also apply the environment variable by prepending it to your application initialization command:

NODE_ENV=production node app.js

This environment variable is a convention that is widely used in external libraries as well.

Setting the environment to production generally ensures that

• logging is kept to a minimum, essential level
• more caching levels take place to optimize performance

For example Pug, the templating library used by Express, compiles in debug mode if NODE_ENV is not set to production. Express views are compiled in every request in development mode, while in production they are cached. There are many more examples.

Express provides configuration hooks specific to the environment, which are automatically called based on the NODE_ENV variable value:

app.configure('development', () => {
//...
})
app.configure('production', () => {
//...
})
app.configure('production', 'staging', () => {
//...
})

For example you can use this to set different error handlers for different mode:

app.configure('development', () => {
app.use(express.errorHandler({ dumpExceptions: true, showStack: true }));
})

app.configure('production', () => {
app.use(express.errorHandler())
})

format: plain


text:
## CSC 579 Spring 2023(R 9:40am to 10:55 Lechase 103)

### Syllabus

• The Need for Training Thought: The Values of Thought. Tendencies Needing Constant Regulation.  Regulation Transforms Inference into Proof.
• Type Systems.  Operational Semantics. Progress. Type Preservation. Type Soundness.
• Functional Programming in Coq: Data and Functions.  Proof by Simplification, Rewriting and Case Analysis.
• Proof by Induction. Proofs Within Proofs.  Formal vs. Informal Proof.
• Lists, Options, Partial Maps.
• Basic Tactics: apply, apply with, injection, discriminate, unfold, destruct.
• Logic in Coq. Logical Connectives: Conjunction, Disjunction, Falsehood and Negation, Truth, Logical Equivalence, Logical Equivalence, Existential Quantification.  Programming with Propositions. Applying Theorems to Arguments. Coq vs. Set Theory: Functional Extensionality, Propositions vs. Booleans, Classical vs. Constructive Logic.
• Inductively Defined Propositions. Induction Principles for Propositions.  Induction Over an Inductively Defined Set and an Inductively Defined Proposition.
• The Curry-Howard Correspondence. Natural Deduction. Typed Lambda Calculus. Proof Scripts. Quantifiers, Implications, Functions. Logical Connectives as Inductive Types.

Leasing by Learning Access Modes and Architectures (LLAMA)
Jonathan Waxman

November 2022

Lease caching and similar technologies yield high performance in both theoretical and practical caching spaces. This thesis proposes a method of lease caching in fixed-size caches that is robust against thrashing, implemented and evaluated in Rust.

## Collaborative Programming and Software Design

Prerequisites: CSC 172 or equivalent for CSC 253.  CSC 172 and CSC 252 or equivalent for CSC 453 and TCS 453.

Modern software is complex and more than a single person can fully comprehend. This course teaches collaborative programming which is multi-person construction of software where each person’s contribution is non-trivial and clearly defined and documented.  The material to study includes design principles, safe and modular programming in modern programming languages including Rust, software teams and development processes, design patterns, and productivity tools.  The assignments include collaborative programming and software design and development in teams.  Students in CSC 453 and TCS 453 have additional reading and requirements.

## Syllabus

• SOFTWARE DESIGN
• Essential Difficulties
• Complexity, conformity, changeability, invisibility. Their definitions, causes, and examples. Social and societal impacts of computing.
• Module Design Concepts
• Thinking like a computer and its problems. Four criteria for a module. Modularization by flowcharts vs information hiding. The module structure of a complex system. Module specification.
• Software Design Principles
• Multi-version software design, i.e. program families. Stepwise refinement vs. module specification. Design for prototyping and extension. USE relation.
• Software Engineering Practice
• Unified software development process, and its five workflows and four phases. CMM Maturity.
• Teamwork
• Types of teams: democratic, chief programmer, hybrids. Independence, diversity, and principles of liberty. Ethics and code of conducts.
• PROGRAM DESIGN USING RUST
• Safe Programming
• Variant types and pattern matching. Slices. Mutability. Ownership, borrow, and lifetime annotations. Smart pointers.
• Abstraction and Code Reuse
• Iterators. Error processing. Generic types and traits. Writing tests. Modules, crates, and packages. Design patterns: iterators, builders, decorators, newtype, strategy, rail, state. Meta-programming.
• Meta-programming (453 Only)
• Declarative and procedural macros. Derived traits.
• Software Tools
• Distributed version control. Logging. Serialization.

The full course information and material are released through learn.rochester.edu.

A summary of the student evaluation for the 2021 course.

University of Rochester Computer Science

CSC 253/453 and TCS 453 Collaborative Programming and Software Design

Modern software is complex and more than a single person can fully comprehend. This course teaches collaborative programming which is multi-person construction of software where each person’s contribution is non-trivial and clearly defined and documented.  The material to study includes design principles, safe and modular programming in modern programming languages, software teams and development processes, design patterns, and productivity tools.  The assignments include collaborative programming and software design and development in teams.  The primary programming language taught and used in the assignments is Rust. Students in CSC 453 have additional reading and requirements.

Prerequisites: CSC 172 or equivalent for CSC 253 and TCS 453.  CSC 172 and CSC 252 or equivalent for CSC 453.

Fall 2020 Student Evaluation

Anonymous inputs were collected by the university before the final exam. 14 out of 33 students (44%) submitted the evaluation.

The overall Instructor Rating is 4.21 and Course Rating 4.00.

Among the individual questions, the highest are 4.79 (The instructor was willing to listen to student questions and/or opinions), 4.71 (The instructor demonstrated sincere respect for students), and two COVID related questions both are 4.54 (the instructor clearly articulated course expectations to students, and the instructor noticed when students did not understand course material and adjusted accordingly). The lowest are 3.71 (The exams/assignments were clearly worded) and 3.93 (The instructor used examples that helped with understanding the material).

PPoPP Workshop on Principles of Memory Hierarchy Optimization (PMHO)

Video recordings of this year’s talks:

CARL: Compiler Assigned Reference Leasing. Chen Ding.

Caching With Delayed Hits. Nirav Atre.

Delayed Hits in Multi-Level Caches. Benjamin Carleton.

LHD: Improving Cache Hit Rate by Maximizing Hit Density. Nathan Beckmann.

On the Impact of Network Delays on Time-to-live Caching. Karim Elsayed.

Saturday 4/2/2022 1pm to 5pm US EDT (GMT -4), 6pm to 10pm Germany, 10:30pm to 2:30am India, 1am to 5am China, 2am to 6am Korea

Meeting ID/Passcode: 920 4275 6839 / PPoPP@2022

KEYNOTE

Recent Advances in the Modeling and Optimization of Caches

Donald F. Towsley, Distinguished Professor, University of Massachusetts Amherst

The keynote lecture covers the following results.

1. An optimization-based approach to caching
2. A simple, very accurate model of LRU and variants
3. A new approach to bounding performance of caching policies based on a very simple ordering of failure rates of request distribution along with an application to on-line caching.

The material is based on the following publications: Deghgan et al. “A Utility Optimization Approach to Network Cache Design,” IEEE/ACM Transactions on Networking, 27(3), 1013-1027, June 2019; “Sharing Cache Resources among Content Providers: A Utility-Based Approach,” IEEE/ACM Transactions on Networking27(2), 477-490, April 2019; Jiang et al. “On the Convergence of the TTL Approximation for an LRU Cache under Independent Stationary Request Processes”, ACM TOMPECS, 3(4), 20:1-20:31, September 2018; Panigrahy et al. “A new upper bound on cache hit probability for non-anticipative caching polices,” IFIP WG 7.3 Performance 2020; and Yan et al. “Learning from Optimal Caching for Content Delivery,” Proc. CoNEXT 2021, December 2021.

Workshop Program

For people who cannot attend, we plan to make the talk videos available as we have done in the 2021 workshop.

Organizers

Faculty:

• Chen Ding, University of Rochester
• Nathan Tallent, Pacific Northwest National Laboratory

Student:

• Wesley Smith, University of Rochester

Call for Presentations

Data movement is now often the most significant constraint on speed, throughput, and power consumption for applications in a wide range of domains. Unfortunately, modern memory systems are almost always hierarchical, parallel, dynamically allocated and shared, making them hard to model and analyze. In addition, the complexity of these systems is rapidly increasing due to the advent of new technologies such as Intel Optane and high-bandwidth memory (HBM).

Conventional solutions to memory hierarchy optimization problems are often compartmentalized and heuristic-driven; in the modern era of complex memory systems these lack the rigor and robustness to be fully effective. Going forward, research on performance in the memory hierarchy must adapt, ideally creating theories of memory that aim at formal, rigorous performance and correctness models, as well as optimizations that are based on mathematics, ensure reproducible results, and have provable guarantees.

Format and Topics

PMHO is an annual specialized and topic-driven workshop to present ongoing, under review, or previously published work related to the following non-exhaustive topic list:

• Mathematical and theoretical models of memory hierarchies including CPU/GPU/accelerator caches, software caching systems, key-value stores, network caches and storage system caches
• Algorithmic and formal aspects of cache management including virtual memory
• Programming models and compiler optimization of hierarchical complex memory systems

There will be no formal peer review process or publication, and presentations will be a mix of selections from submissions and invited presentations.

The 2022 workshop will take place online during the weekend of April 2 (Exact date TBD). It is hosted by the PPoPP 2022 conference.

Submission

Submit your presentation proposal to save-DyfTNd4RHy3y@3.basecamp.com. Submissions should consist of an one-page abstract of the topic you intend to present alongside any (optional) pertinent publications or preprints.

The submission deadline is Monday March 7, 2022 AOE.

Workshop Program

Call for Presentations

Data movement is now often the most significant constraint on speed, throughput, and power consumption for applications in a wide range of domains. Unfortunately, modern memory systems are almost always hierarchical, parallel, dynamically allocated and shared, making them hard to model and analyze. In addition, the complexity of these systems is rapidly increasing due to the advent of new technologies such as Intel Optane and high-bandwidth memory (HBM).

Conventional solutions to memory hierarchy optimization problems are often compartmentalized and heuristic-driven; in the modern era of complex memory systems these lack the rigor and robustness to be fully effective. Going forward, research on performance in the memory hierarchy must adapt, ideally creating theories of memory that aim at formal, rigorous performance and correctness models, as well as optimizations that are based on mathematics, ensure reproducible results, and have provable guarantees.

PMHO 2021 is a forum dedicated to the theoretical aspect of memory hierarchies as well as their programming models and optimization.

Format and Topics

PMHO 2021 will be a specialized and topic-driven workshop to present ongoing, under review, or previously published work related to the following non-exhaustive topic list:

• Mathematical and theoretical models of memory hierarchies including CPU/GPU/accelerator caches, software caching systems, key-value stores, network caches and storage system caches
• Algorithmic and formal aspects of cache management including virtual memory
• Programming models and compiler optimization of hierarchical complex memory systems

There will be no formal peer review process or publication, and presentations will be a mix of selections from submissions and invited presentations.

The workshop will take place online Sunday February 28, 2021.

Submission

Submit your presentation proposal to save-g4jFdqmK9rqH@3.basecamp.com. Submissions should consist of an one-page abstract of the topic you intend to present alongside any (optional) pertinent publications or preprints.

The submission deadline is Friday January 22, 2021 AOE.

Organizers

Faculty:

• Chen Ding, University of Rochester
• Xipeng Shen, North Carolina State University

Student:

• Wesley Smith, University of Rochester

Elias Neuman-Donihue, University of Rochester, May 2020

A small correction to Li et. al.’s paper: in section 3.2, the length of a time window is defined as “its end time minus its start time plus one.” However, in section 3.2.1, there is a reference to “windows of length k from 0 $\leq$ k $\leq$ n,” the lower bound of which refers to windows with their end index before their start. This also leads to some mathematical inconsistencies in sections 3.2.1 and 3.2.2.

One such error is the calculation of reuse(1): by the stated definition, an interval of length k=1 has only one allocation, so the reuse should be one if the window also contains a matching free operation and 0 otherwise. Therefore, since there are a total of n windows of length 1, the average reuse of all such windows should be:

$reuse(1)$ $=\frac{\sum_{i=1}^{m}I(e_i-s_i=0)}{n}$

However, by the formulae stated in 3.2.2:

$reuse(1)$ $=\frac{\sum_{i=1}^{m}I(e_i-s_i=1)s_i - \sum_{i=1}^{m}I(e_i-s_i=1)(s_i + 1) + 2\sum_{i=1}^{m}I(e_i-s_i=1)}{n}$

$reuse(1)$ $=\frac{\sum_{i=1}^{m}I(e_i-s_i=1)}{n}$ $\neq$ $\frac{\sum_{i=1}^{m}I(e_i-s_i=0)}{n}$

In order to standardize the equations with the provided definition of window length, a few changes must be made:

In Eq. 1 and Eq. 2, every instance of $e_i - s_i \le k$ should instead read $e_i - s_i < k$

Then in Eq. 2,
$Z(k)=$ $\frac{\sum_{i=1}^{m}I(e_i - s_i < k) \cdot k}{n-k+1}$

The recursive equations should then read

$X(1) = \sum_{i=1}^{m}I(e_i - s_i = 0)s_i$

$X(k) = X(k-1) + \sum_{i=1}^{m}I(s_i\ge n-(k-1)) + \sum_{i=1}^{m}I(e_i-s_i+1=k)min(n-k, s_i)$

$Y(1) = \sum_{i=1}^{m}I(e_i - s_i = 0)e_i$

$Y(k) = Y(k-1) + \sum_{i=1}^{m}I(e_i\le k-1) + \sum_{i=1}^{m}I(e_i-s_i+1=k)max(k, e_i)$

$Z(1) = \sum_{i=1}^{m}I(e_i - s_i = 0)$

$Z(k) = Z(k-1) + \sum_{i=1}^{m}I(e_i-s_i < k) + \sum_{i=1}^{m}I(e_i-s_i+1=k) \cdot k$

(Sent to my class on the exam day)

NY Times collects and publishes New York city stories submitted by its readers at https://www.nytimes.com/column/metropolitan-diary.  The May 3 entry was Christopher Fryer who remembered “joys of city life walking every day from our apartment on the Upper West Side through Central Park, and then down Sixth Avenue to my office at 46th Street”, found “a shining Lincoln head on the penultimate step”, “paused to pick it up, being careful not to impede either the people coming up behind me or those who were heading down into the station”, and “a man on his way down the stairs spoke without breaking stride.

“Hey,” he said. “ I saw one of those at 125th Street. If you hurry you can probably get that one, too.”

Re finding pennies and other coins, I was always told that they had to be face up to be “good luck.”  I read somewhere a long time ago about a kind soul who would turn coins over when found face down so the next person to see them would have good luck, so I do that. It’s a little like being Santa Claus.

This is yet another proof of the CSC 200H theme: even good luck requires collaboration.

This slideshow requires JavaScript.

On Friday I received the Frederick D. and Susan Rice Lewis College Award for Undergraduate Teaching and Research Mentorship.  It was delightful to see everyone including many of my current and former students.  I prepared and delivered the following speech:

Thanks to Fred and Susan Lewis for creating this award and for being here, to Dean Runner, Mike, Cesar, and Chris for your generous words, to Department Chair Dr. Dwarkadas for the nomination, and Ms. Logory for organizing today’s event.

Thanks to the terrific computer science department, to our staff, especially the tireless work of Eileen Pullara.  Countless times I have asked her: can I hire another undergrad.  It is a community of support. I’m standing on the shoulder of not just the department, but also the university community and the scientific community.

Let me first state my teaching philosophy by quoting the Chinese philosopher Confucious from 2000 years ago, who he himself was a teacher. He said, and I translate: Achieve independence by making others independent. Achieve prosperity by making others prosperous.

As university faculty, we are Stewards of Knowledge.  My colleague Randal Nelson once compared education and business, he said, I quote: “The fundamental currency of a university is knowledge; while that of a corporation is capital. Both traffic information, money, and talented human beings, … but the bottom-line metric differs. ” Money, resource and capital have limits. It is often called a zero sum game. Knowledge knows no limits.

In teaching, I specialize in programming languages and systems. I show students a cartoon. This is an interview room at Ikea. The text in black instructs the nervous interviewee: “make a chair and take a seat”, the text in red is for my class “invent a language and talk.”

Interesting problems are abound: How do we describe a language when we do not yet have a language? Similar circular problems in Cesar’s research then and Mike’s research now in memory allocation. Similarly in my Confucious motto: independence and prosperity are problems that cannot be solved in isolation.

In most courses I teach, students learn by doing. Alan Perlis, the first recipient of Turing award in 1966, said “You think you know when you can learn, are more sure when you can write, even more when you can teach, but certain when you can program.” To understand a programming language, you must not just learn it but to build it.

How do we create knowledge?

We discover it through science, first by measuring. We are in the dark and remain so until we measure. The Unite State’s response to the coronavirus is hampered by a president who communicates by tweets, by politicizing the response to the crisis, and most damaging by anti-science arrogance and idiocy.

The first step it missed and still missing is testing. Without testing there is no science, and there is no knowledge.  This ignorance puts medical personnels and emergency responders and their family in danger and we begin to see disproportional fatalities in poor city neighborhoods, indigent population and people with disabilities.

This Wednesday I was most proud to see our University News photo: our medical school colleagues return from helping in NYC.  In teaching, as in medicine, we work with knowledge and skill.

Like our medical colleagues, we work together. We collaborate.

The best teacher-student relation is symbiotic. I confess when I first taught computer organization, the evaluation wasn’t good. A common criticism, believe it or not, was that the professor gave too many extensions. The next year, I set a schedule and followed it. Then the department machines had to be shut down for days due to the cooling water system repair in the building. I held the line and told my students that we don’t need extensions for lack of cooling, not in the middle of the winter, not in Rochester. I received high scores for that course.

At a research university like ours, teaching keeps a close pace with technology.
This semester I am teaching new material of machine-checked proofs.
Knowledge is not just the truth but more importantly the proof.  Proof is knowledge about knowledge — how do we know we know.

This is unprecedented material which combines the programming language and the language of logic. (1) Programming encodes reasoning, (2) reasoning verifies programming. (3) With computers, programming automates reasoning. (4) Even more exciting is the new way to collaborate — our reasoning can be combined as our programs can.  (5) Most exciting is where our students will go taking the knowledge. Three undergrads and their TA are “programming” a proof for a joint paper with my colleagues and may introduce machine-checked proofs to the database community.

We teach technology. We collaborate to develop technology. We also teach and develop technology to amplify collaborative work.

University of Rochester, its size, not too big and not too small, and its combination of research and liberal arts education, make it a best place to collaborate.

The best collaboration is to inspire and be inspired. Let me take just one minute to give two examples.

Lane Hemaspaandra created the honor course I’m teaching now and he continues to help and model for me in teaching collaborative problem solving.

Chris Tice when he was a student solved an extra credit problem after the assignment was due. So why doing extra work for no credit. He said that he didn’t have time to work on it, but he was interested so he went back once he had time. When a student is not there just for the grade, a teacher is not here just for grading. It is what Hajim said at every commencement, if you love your work, you never have to work.

To summarize, I have started with my motto of independence and prosperity and highlighted three ingredients of a happy life: to collaborate, discover, and inspire. To help you remember, the initials CDI are the first three letters of my university NetId.

I want to thank people who inspired me the most: my longest time colleagues, mentors and supporters Michael Scott and Sandhya Dwarkadas, my graduate advisors late Dr. Ken Kennedy and Philip Sweany, my mother Ruizhe Liu who’s currently battling cancer, for her unyielding courage and support, my father Shengyao, my brother Rui, my dear wife and Rochester graduate Dr. Linlin Chen and our two children Yawen and Shuwen who were both born in Rochester.

Last, let me share a few road trip photos.   In 2016, we went to conference in DC, we zoomed by at 90 miles an hour in Pennsylvania but then sit still in traffic the minute we got to Baltimore, but had fun counting the many Rs. Once arrived, undergrads had homework. The book on the table was Michael’s popular textbook, in its fourth edition. At the award banquet, we were the Rochester 9, the following year we had a smaller group and Google flew one of the undergrads out for interview, but in this photo we were the largest group and was so recognized.

This slideshow requires JavaScript.

I received an award for that exact reason — the award for being the largest group attending the conference.  Inspired, I told my students: you see — 100% of success is just showing up.

Then it was literally true for that award. Today I feel the same for this award. It is most humbling. Thank you all.

Other than the people I thanked above, I am also grateful for the many who joined the meeting and for the spontaneous comments following the event by my colleagues Michael Scott and Sandhya Dwarkadas and my former doctoral graduates Xiaoming Gu, Chengliang (Cheng) Zhang, Pengcheng Li, and Xipeng Shen.  Quoting Dr. Cheng Zhang who was attending from home in Seattle and said that through his work in Microsoft, Amazon and now Google, he collaborate in a team and he work to lift others.

It was most fun, heart warming, and well organized.  There wasn’t even problems with the network.


text:
# State whether the following is True or False : The p.m.f. of a r.v. X is P(x) = 2xn(n+1) , x = 1, 2, ……. n = 0 ,otherwise Then E(x) = 2n+13 - Mathematics and Statistics

MCQ
True or False

State whether the following is True or False :

The p.m.f. of a r.v. X is P(x) = (2x)/("n"("n" + 1)) , x = 1, 2, ……. n
= 0                  ,otherwise
Then E(x) = (2"n" + 1)/(3)

• True

• False

#### Solution

 X 1 2 3 .... n P(X) (2)/("n"("n" + 1) (4)/("n"("n" + 1) (6)/("n"("n" + 1) .... (2"n")/("n"("n" + 1)

E(X) = sumx_1*"p"(x_"i")

= 1.(2)/("n"("n" + 1)) + 2.(4)/("n"("n" + 1)) + 3.(6)/("n"("n" + 1)) + .... + "n". (2"n")/("n"("n" + 1)

= (2"n")/("n"("n" + 1))(1 + 4 + 9 + ... + "n"^2)

= (2"n")/("n"("n" + 1))(1^2 + 2^2 + 3^2 + ... +  "n"^2)

= (2"n")/("n"("n" + 1))("n"("n" + 1)(2"n" + 1))/(6)

= (2"n" + 1)/(3) is True.

Concept: Variance of Binomial Distribution (P.M.F.)
Is there an error in this question or solution?

#### APPEARS IN

Balbharati Mathematics and Statistics 2 (Commerce) 12th Standard HSC Maharashtra State Board
Chapter 8 Probability Distributions
Miscellaneous Exercise 8 | Q 3.05 | Page 154
Share


text:
# interest

This entry mostly concerns the mathematical aspects of interest. Also, we assume that the value of a unit amount of money does not change with time (so there is no consideration regarding inflation, etc…)

Let’s first look at two common examples in real life:

1. 1.

An individual deposits a certain amount of money into an entity (a bank, for example) for a period of time, interest is accrued at the end of the time period payable to the individual by the entity.

2. 2.

One borrows a certain amount of money from an entity (a loan company, for example) for a period of time, interest is accrued at the end of the time period payable to the entity by the borrower.

In both examples, two parties, or entities are involved. Let’s call one the lender $L$ and the other the borrower $B$. Between $L$ and $B$, there is an initial transaction where a certain amount of money $M$, called the principal, is transferred from one to another. $M$ can be seen as a function of $L$ and $B$: $M=M(L,B)$ and has the property that $M(L,B)+M(B,L)=0$. This property basically says that $B$ borrowing $M$ from $L$ is equivalent to $L$ borrowing $-M$ from $B$. Let us agree that $M(L,B)\geq 0$.

At a later time $t$, an interest is accrued. Put it another way, $M$ has “grown” to $M(t)$. Set the initial transaction at time $0$, then $M=M(0)$. From this point of view, interest $i$, is the “additional” amount of money earned, or accrued, between $0$ and $t$, or $i=M(t)-M(0)$. If we want to emphasize $L$ and $B$ as the additional variables, then the definition, fully stated, becomes

 $i(L,B,t):=M(L,B,t)-M(L,B,0).$

We can calculate interest between any two time periods. For example, if we know $i(L,B,t)$ and $i(L,B,s)$, then the interest earned from $t$ to $s$ is simply the difference of the two:

 $i(L,B,t,s):=i(L,B,s)-i(L,B,t)=M(L,B,s)-M(L,B,t).$

Keep in mind is that in this definition, only one transaction has taken place: the initial one at $0$ (we assume that at time $t$, an interest has been merely been accrued but no actual transfer of money is taking place). Interests resulting from additional transactions that happened between $0$ and $t$ need to be evaluated separately.

The last paragraph merely says that $i$ is additive with respect to transactions: if $L_{1}$ loans $M_{1}$ to $B_{1}$ at $t_{1}$, and $L_{2}$ loans $M_{2}$ to $B_{2}$ at $t_{2}$, then the total interest earned by the lenders from the borrowers at time $t$ is

 $i(L,B,t)=i_{1}(L_{1},B_{1},t)+i_{2}(L_{2},B_{2},t),$

where $L$ is $L_{1}$ and $L_{2}$ considered as a single lending entity, and $B$ is $B_{1}$ and $B_{2}$ considered as a single borrowing entity.

Remarks.

• Note that $t$ does not always have to be positive. It is possible that we are interested in finding what $i$ is at time $t\leq 0$. For example, one may want to know the amount of interest lost had he saved his money in a bank and earned interest 30 years earlier, well before his current retirement age.

• Another point worth stressing is that the defintion only works if we stick to the same units. If $M$ is expressed as U.S. Dollars, then that needs to be the unit of choice for money throughout. Any other denominations or currencies need to be converted. The same goes with time $t$.

## References

• 1 S. G. Kellison, Theory of Interest, McGraw-Hill/Irwin, 2nd Edition, (1991).
Title interest Interest 2013-03-22 16:39:51 2013-03-22 16:39:51 CWoo (3771) CWoo (3771) 6 CWoo (3771) Definition msc 00A69 msc 00A06 msc 91B28


text:
# Transactions of the Geological Society, 1st series, vol. 1/On the Cheshire Rock-salt District

III. A Sketch of the natural History of the Cheshire Rock-Salt District.
By Henry Holland, Esq. Honorary Member of the Geological Society.

The vast beds of fossil or rock-salt, which are found in different parts of the County of Chester, form undoubtedly the most important and peculiar feature in the mineralogy of this district. In offering to the notice of the Geological Society some remarks upon these mines, it may be proper to premise, that in a Survey of Cheshire, which I had the honour of drawing up for the Board of Agriculture, I entered at considerable length upon the subject of their natural history, and upon the manufacture of white salt from the brine springs to which they give rise. It will be my present object to consider more especially the mineralogical situation and characters of the Cheshire rock-salt; and though the repetition of some statements must necessarily occur; this, in the case of a work only partially known, can, I conceive, be attended with little disadvantage.

Character of the country surrounding the salt mines.

In speaking of the general situation of the Cheshire salt mines, it will be proper to state some facts with respect to the nature of the surrounding country, that their mineralogical relations may more clearly be understood, and an opportunity given to speculate upon the probable origin of these important strata. The southern parts of Lancashire, the northern extremity of Shropshire, and the whole of the intervening County of Cheshire, form in conjunction one vast tract of plain country, interrupted by few elevations, and these inconsiderable in size and extent. The area of this plain may be regarded as extending nearly fifty miles from north to south, and as having an average breadth of twenty-five or thirty miles. Its eastern boundary, as more immediately regards the County of Chester, is a high range of sandstone hills, stretching from north to south along the borders of Derbyshire and Staffordshire; connected on the north with the hills in the West Riding of York, and on their eastern side passing into the limestone hills of Derbyshire. The sandstone, in a considerable part of this range, is slaty in its structure, and would seem to belong to the Independent Coal-formation of Werner, some pretty extensive beds of coal being found and worked under it. The southern boundary of the plain, which is the one approaching most nearly to the rock-salt, is irregularly formed by ridges of limestone and calcareous sandstone, leaving open some communications with the level country in the middle of Shropshire. To the west its limits are marked by the sandstone and limestone hills in the adjoining part of Wales, and by the sandy estuaries of the Mersey and Dee. The only ridge of hills, properly speaking, within the Cheshire plain, is one on the western side of the county, extending with a few interruptions from Frodsham to Malpas, and including in its progress from north to south, the high grounds of Delamere Forest, the Hill of Beeston, and the Peckforton, Hills. This range, which no where attains an elevation of more than four or five hundred feet, is composed entirely of sandstone. A small quantity of copper ore has been found in the Peckforton Hills, which form its southern extremity. Another ridge of land, possessing a small and irregular elevation above the adjoining plain, may be traced from the hills on the eastern border of Cheshire, in a westerly or north-westerly direction to Halton and Runcorn. At this point, where it attains its greatest height, it is separated from the northern extremity of the former ridge, only by the intervention of the valley of the Weaver, which valley is here about two miles in width. Towards the eastern extremity of this range, we meet with a singular sandstone hill, called Alderley Edge, in which have been found ores of lead, copper and cobalt, and masses of sulphate of barytes.

This distribution of the high grounds in the Cheshire plain is traced out in the annexed map, and it will be seen, by a reference to this, that they form three distinct divisions of its area: one to the west of the higher sandstone range; another to the east of this, and south of the lower range ; and a third lying north of the latter, and including the southern parts of Lancashire. With the exception of in very few instances only, the existence of the rock-salt appears to be exclusively confined to the southern or central plain.

The marl beds form the most peculiar feature in the alluvial strata of the Cheshire plain. These occur in great abundance in every part of the district; being found not only under the common soil, but occasionally, as on the borders of Delamere Forest, interposed between layers of sandstone rock. The Cheshire marls are also very frequently met with in large detached masses, twenty or thirty feet in thickness, in the working out of which, it is not unusual to find large assemblages of fragments of the older rocks. Portions of granite, often of large size, and shewing on their surface evident marks of attrition, are among the most common appearances in these collections: no granitic rocks are found within fifty or sixty miles of this district.

The divisions which I have pointed out in the Cheshire plain are still further marked by the course of the streams in this tract of country. The Dee is the great river of the western plain; the Weaver and its subordinate streams receive all the waters of the southern division; while the Mersey and its tributaries do the same in the northern portion. From their local relation to the great beds of rock—salt, the streams of the southern or central plain possess a peculiar importance.

The Weaver rises in the Peckforton Hills, near the Shropshire border, runs for some miles towards the south-east, then making a sudden flexion to the north, continues in this direction, by Nantwich and Winsford, to Northwich, about thirty miles further. Here it takes a north-westerly course to Frodsham, where it expands into a sandy æstuary, connected with the channel of the Mersey. It receives its principal accessions at Northwich, where it is joined by the united streams of the Dane and Wheelock from the south-east, and by a stream called Witton-Brook from the east. At Anderton, a little below Northwich, the valley which has hitherto been comparatively wide and flat, is suddenly contracted by the approach of two ranges of high ground; that on the western side of the river connecting itself by a gradual rise with the heights of Delamere Forest; the opposite one passing by a series of irregular elevations into the range of high land, which separates the southern from the northern plain. At Frodsham the river flows, as I before mentioned, between the termination of this high ground and that of the ridge which crosses the county from north to south, the hills thus opposed corresponding perfectly in appearance and structure. We have thus two distinct contractions in the valley of the Weaver below Northwich; a circumstance in some degree worthy of notice.

Situation of the brine springs, rock-salt mines, &c.

I have dwelt thus minutely upon local facts from their connection with the situation of the rock-salt, which, with few exceptions, has yet been ascertained to exist only in the vallies of the Weaver and its tributary streams; in some places manifesting its presence by springs impregnated with salt; in other places being known by mines actually carried down into the substance of the strata. A reference to the map will shew the several situations where brine springs occur, or where mines have been sunk, in the course of these vallies. Between the source of the Weaver and Nantwich, it will be seen that many brine springs make their appearance; and in the latter part of this course, it would seem that brine might be obtained by sinking to some depth in any place near the banks of the Weaver. Proceeding down the stream, salt-springs occur again at Winsford, and in several situations between Winsford and Northwich. At Moulton, between these two places, a mine has been sunk into the body of rock-salt, and another also between Winsford and Middlewich. At Northwich the brine springs are very abundant, and here also many mines have been sunk for the purpose of working out the fossil salt. The springs occur again in several places further down the river, but none have been met with below Saltersford, about two miles from Northwich. At Whitley, however, two miles north of the Weaver, and six miles from Northwich, a body of rock-salt is stated to have been met with in boring for coal.

On the course of the river Wheelock, brine springs have been found at Lawton, Roughwood, Wheelock, and again at Middlewich, where this stream unites itself with the Dane. At Lawton a mine has been sunk into the rock-salt. In the valley of the Dane, no salt springs actually appear, but several circumstances indicate that brine has at some former period been discovered there, and this as high up the stream as the neighbourhood of Congleton. No springs have been found in the valley of Witton Brook, except at the part of it immediately adjoining the Weaver at Northwich.

The evidences of the presence of rock-salt occur, as I before stated, in very few places out of these vallies, and even some of the excepted instances appear to have a local relation to the southern or central plain. This is the case with the salt springs of Dirtwich, in the south-western angle of Cheshire; with a spring of very weak brine lately found at Adderley, in the northern extremity of Shropshire; and probably also with other saline springs which occur in the contiguous parts of Flint and Denbighshire. At Dunham, however, in the north of Cheshire, we find a weak spring, which cannot strictly be considered as connected with the formations of the southern plain. At Barton and Adlington, in the southern parts of Lancashire, brine springs likewise appear; and it is not improbable that other instances of the same kind may occur in the northern portion of the great plain. It appears possible, however, that these weak springs may derive their saline contents, not from distinct subjacent beds of the fossil salt, but merely from beds of clay or argillaceous stone, strongly impregnated with particles of the muriate of soda.

Manufacture of white salt.

It would be foreign to the object of this paper to enter with minuteness into the natural history of the salt springs, or into the processes employed in the manufacture of white salt. Those members of the Society, who may wish for further information on these subjects, I beg leave to refer to the Survey of Cheshire before noticed. It may be sufficient here to state a few of the most general and important facts.

The brines met with in this district are very generally formed by the penetration of spring or rain waters to the upper surface of the rock-salt, in passing over which they acquire a degree of strength, modified by several circumstances, which it would be needless to detail. Their average strength, however, appears to be much greater than that of the springs met with in Hungary, Germany, or France. At Winsford, Northwich, Anderton, Lawton, Roughwood, Wheelock, and Middlewich, where all the principal salt works are situated, the brine springs contain between 25 and 26 per cent. of the pure muriate of soda; and in some of the springs at Anderton, the proportion stands as high as 26.566 per cent. a very near approach to the perfect saturation of the brine. The earthy salts held in solution together with the muriate of soda are principally muriate of magnesia and sulphate of lime; the quantity of these varying from ${\displaystyle \scriptstyle {\frac {6}{10}}}$ per cent. to ${\displaystyle \scriptstyle 2{\frac {1}{2}}}$ per cent. in different springs. The brine being pumped out of the pits, is first conveyed into large reservoirs, and afterwards drawn off as it is wanted, into evaporating pans, made of wrought iron. Here heat is applied in a degree determined by the nature of the salt intended to be manufactured, and various additions are made to the brine, with a view either to assist the crystallization of the muriate of soda, or to promote the separation of the earthy salts. The latter exist in a very small proportion in the manufactured salt, and cannot be supposed in any degree to affect the uses to which it is applied. [1] The importance of the Cheshire salt manufacture will be sufficiently obvious from the statement, that besides the salt made for home consumption, which annually amounts to more than 16,000 tons, the average of the quantity sent to Liverpool for exportation has not been less than 140,000 tons.

General situation, thickness, &c. of the beds of rock-salt.

Though springs impregnated with salt occur in several parts of the Cheshire plain, it may be remarked that the rock-salt itself has only been worked into near the banks of the Weaver and its tributary streams. It was first discovered at Marbury near Northwich, about one hundred and forty years ago, in searching for coal. This bed of rock was the only one worked for more than a century, when, in the same neighbourhood, a second and inferior stratum was met with, separated by a bed of indurated clay from the one previously known. This lower stratum was ascertained to possess at a certain depth a great degree of purity and freedom from earthy admixture; on which account, and from the local advantages of Northwich for exportation, the fossil salt is now worked only in the vicinity of this place.

This local limitation of the mines precludes the possibility of many comparative remarks which might be interesting to the geologist; and in giving a particular description of the rock-salt formation, I must confine myself in great measure to the facts which present themselves in the neighbourhood of Northwich, explaining first the circumstances of general position, &c. and then entering into the more minute particulars of the mines which have been sunk into these important strata.

The rock-salt of Northwich occurs, as I have just mentioned, in two great strata or beds, lying nearly horizontally, but on different levels, and separated, the superincumbent from the subjacent stratum, by several layers of indurated clay or argillaceous stone. These intervening beds possess in conjunction a very uniform thickness of ten or eleven yards, and are irregularly penetrated by veins of the fossil salt. Though the evidence on the subject is not entirely of a positive nature, there seem strong grounds for believing that the beds of rock-salt at Northwich are perfectly distinct from any others in the salt district, forming what the Germans would call ligende stocke, lying bodies or masses of the mineral. It will readily be conceived that there is much difficulty in acquiring precise information with respect to the extent and limitation of these great masses, and that there are many sources of error to which such an inquiry is liable. There are, however, a few leading facts upon which dependence may be placed, and which will be admitted to furnish fair grounds for deduction.

It would appear that the great beds of rock-salt at Northwich assume a general longitudinal direction from north-east to south-west, the line which has been traced upon them in this direction being a mile and a half in length, and no direct evidence existing that they may not extend further in these points; while their transverse extent, as measured by a line at right angles to the former, is much more limited, probably not exceeding in any place one thousand three hundred or one thousand four hundred yards. Several circumstances concur in giving probability to this statement. Let two parallel lines, drawn from NE to SW, with an intervening distance equal to about half their length, be employed to designate the supposed extent of the subjacent rock-salt. In a mine which approaches very nearly to the eastern limit of the area thus formed, the upper bed of rock-salt was actually worked through in an horizontal direction on this side, and discovered to be going of with a very rapid declivity. A similar fact has been stated with respect to another pit further to the south on the same line of boundary, but as the mine was destroyed many years ago by the ingress of fresh water, this statement is considerably more doubtful than the former. It may be remarked too, that in sinking for brine a little beyond, or out of the area, on this side, the brine met with is of a very weak and inferior kind, and at a short distance altogether disappears. Appearances leading to the same conclusion of the sudden termination of the body of rock-salt occur on the opposite side of the area marking its extent. In a mine at the northern extremity of the western line of boundary, a shaft situated nearer to this line is fifteen yards deeper than another shaft immediately contiguous, apparently in consequence of the rapid sinking of the rock-salt at this point. In most of the pits on this side, the upper bed of rock is met with at a depth of from thirty to forty yards; yet at Barnton, a mile further to the west, and on the same or a lower level, none was met with in a sinking of one hundred and fifteen yards.

Corresponding appearances have been observed in the body of rock-salt which occurs at Moulton, between Winsford and Northwich, where in two sinkings on the same level, and at the distance of one hundred yards from each other, the difference in the depth at which the rock was found, was nearly twenty yards, a circumstance from which the limitation or going off of the bed at this particular point may reasonably be inferred. As nothing further, however, is ascertained with respect to the extent and direction of this particular body of rock-salt, I merely mention the fact to corroborate the statement given of the limitation of the great beds at Northwich.

Another important observation with respect to the Northwich rock-salt, is, that there seems to be a progressive thinning of the upper bed of salt from NW to SE, or in a direction nearly at right angles to the longitudinal extent of the stratum. Though much uncertainty exists with respect to the rate and progression of this decrease, the general fact seems to be sufficiently confirmed by observations taken from different mines. In those which have been sunk near to the western or north-western side of the area before described, the thickness of the upper bed has been very generally twenty-eight, twenty-nine, or thirty yards. Proceeding towards the east or south-east, we find this thickness decreasing to twenty-five yards, and in the mines near the eastern boundary, the bed of rock-salt comes down to twenty, eighteen, and even seventeen yards in thickness. It will be observed that this thinning takes place in a general direction from the nearest sea coast; the thickest part of the body of rock being situated furthest down the Weaver, and just above the contraction which takes place in the valley of the river at Anderton.

Besides this general variation of surface in the superior stratum of rock-salt, it has been found that there is a considerable irregularity of level on its upper surface. In one of the mines, in which a tunnel was carried one hundred yards along this surface, many small risings and depressions were met with; and similar appearances have been observed in the other mines near Northwich.

The depth at which the upper bed of rock-salt is found, though varied by several of these circumstances, depends principally, of course, upon the surface of the ground above, which at Northwich, from the confluence of streams there, is somewhat irregular. In the greater number of the mines, it is met with at a depth varying from thirty-five to forty yards. The smallest depth, at which it has been found, is in a mine situated close to Witton Brook, about half a mile above the entrance of this stream into the Weaver. Here it appears at twenty-nine yards from the surface; and a general estimate of level from this mine shews that the upper surface of the salt is at least twelve or thirteen yards below the low-water mark of the sea at Liverpool; a fact perhaps not wholly unimportant as regards our ideas of the formation of this mineral.

The thickness of the upper bed of salt at Northwich has been already stated to vary from twenty to thirty yards: that of the lower bed has never yet been ascertained in any one of the mines in this district. The workings in this lower stratum are usually begun at the depth of from twenty to twenty-five yards, and are carried down for five or six yards, through what forms, as will afterwards be mentioned, the purest portion of the bed. In one of the mines a shalt has been sunk to a level of fourteen yards still lower, without passing through the body of rock-salt. We have thus an ascertained thickness of this bed, of about forty yards, and no direct evidence that it may not extend to a considerably greater depth.

Though only two distinct beds of the fossil salt have been met with at Northwich, it has been ascertained that the same limitations do not exist throughout the whole of the salt district. At Lawton, near the source of the river Wheelock, three distinct beds were found, separated by strata of indurated clay; one, at the depth of forty-two yards, four feet in thickness; a second, ten yards lower, and twelve feet thick ; and a third, fifteen yards still further down, which was sunk into twenty-four yards, without passing through its substance. Coal is found and worked within two or three miles of this place, and the only limestone known in the County of Chester, is got from the hills which here form the southern boundary of the plain. In no other parts of the salt district, than at Northwich and Lawton, has the upper bed of rock been worked through.

The strata passed through in going down to the upper bed of rock, are nearly horizontal in position, and very uniform in their structure, consisting in every instance of beds of clay and marl; and these, with the exception of a few of the most superficial, appearing in similar progression in each mine. The clays, or argillaceous stone, of which these beds are composed, are indurated in different degrees, tinged with various shades of red, blue, brown, &c. and usually contain a portion of sulphate of lime. They are known to the miners by the general name of metals; a distinctive appellation being given to each from the shade of colour which it assumes. In the section of strata, annexed to this paper, these appearances are noted with some degree of minuteness; and that they may more accurately be known, I have sent a few specimens, illustrative particularly of the induration of the clay strata, and of their admixture with the sulphate of lime. It will be observed that, though these clays in general possess a considerable degree of in duration, there are some of them sufficiently porous to admit the passage of water through their substance. Where this structure of the clay occurs it goes by the name of the shaggy metal, and the fresh water which makes its way through the pores has the expressive appellation of Roaring Meg. This term will not appear too strong, when it is mentioned that in the mine from which the section of strata was taken, and where the shaggy metal was found at the depth of twenty-six yards, the quantity of water, ascertained to issue from its pores in one minute, was not less than three hundred and sixty gallons; a circumstance greatly enhancing the difficulties of passing a shaft down to the body of rock-salt.

A portion of salt, sufficient strongly to affect the taste, is found to exist in many of these beds of argillaceous stone: and this saltness increases, as might be expected, as we approach the body of the rock-salt. In the strata or layers immediately above the rock, which in all the mines are perfectly uniform in their appearance and structure, it is particularly remarkable. It may be observed, however, that there are not in these strata any veins of rock-salt, connected with the great mass below: on the contrary, the line of division between the clay and rock-salt is drawn with great distinctness in every instance, and presents none of those inequalities which would arise from a mutual penetration of the strata.

It may, I believe, be considered as a decided fact that no marine exuviæ or organic remains are found in the strata situated over the rock-salt. I have indeed heard it asserted that there are a few instances in opposition to this statement; but upon minute inquiry, I do not find that the accuracy of these alleged exceptions is in any degree to be depended upon.

The general, I believe universal, occurrence of gypsum, in connexion with beds of fossil salt, is a fact worthy of observation. This connexion appears in the salt mines of Hungary, Transylvania, and Poland, as well as in those of Cheshire, and it has led Werner to assign to the rock-salt and flœtz gypsum a conjunct situation in his Geognostic System. The gypsum, contained in the clays over the Cheshire rock-salt, occurs in varying proportions, and under different appearances in the several beds passed through. It is found both in large masses and in small granular concretions. The compact, foliated, and fibrous varieties are all met with; the last of these occurring in very considerable proportion. According to Werner, the first or oldest flœtz gypsum is that which has the most immediate relation to rock-salt. I am not enabled to say whether the gypsum appearing above the Cheshire salt would be considered as belonging to this particular formation. The presence of the fibrous variety of the mineral would rather seem to place it with the second flœtz gypsum where this species is particularly abundant; but no positive distinction can be derived from this circumstance. I may remark that gypsum has been met with in several other parts of the Cheshire plain, in situations and with appearances. very similar to those in which it occurs above the rock-salt.

Interior character of the beds of rock-salt.

Having stated the several facts which regard the extent, thickness, and other general. characters of the beds of rock-salt at Northwich; I shall now mention more particularly the appearances exhibited in their internal structure, in relation to which some interesting observations occur.

The fineness or purity of the rock is a circumstance very important to the interests of the mining proprietor, and in this point considerable varieties appear in different parts of the strata. The great body of the rock-salt, both in the upper and lower stratum, is composed of crystals of muriate of soda, intimately mixed with certain proportions of clay and oxide of iron, giving to the mass a red or reddish-brown tinge; and in addition to these constituent parts, contains likewise certain earthy salts, the sulphate of lime, and the muriates of lime and magnesia, but these in small proportion. In every part, however, of this compound rock, we find separate crystalline concretions of muriate of soda, variously disposed, sometimes occurring distinctly in the cubical form; in other places in masses of larger size, and irregularly shaped. The colour of these concretions, which are of the foliated species of fossil salt, is usually a greyish or milk-white; they are always translucent, and often attain a considerable degree of transparency. It would appear that they contain the muriate of soda in its purest form; the sulphate of lime in specimens of this kind being scarcely distinguishable by the delicate tests applied to its discovery.

This finer rock-salt occurs not only in separate concretions, but also in veins intersecting the coarser mass, and in the rims or borders of the polyhedral figures which will afterwards be mentioned. Its proportion varies both in the two great beds of rock, and likewise in different parts of the same bed; and it is a regard to this circumstance which determines the situation and extent of the workings in the several mines. In the upper bed this variety is less considerable than in the lower: but here the substance of the rock-salt is evidently purer three or four yards above the lower surface than in other parts of the same stratum, and continues so for about four feet. In the lower bed, the first twenty or twenty-five yards passed through contain a proportion of earth as large as in the upper stratum: at this depth, however, a greatly increased degree of purity appears, which is continued for five or six yards further down, when the proportion of earthy admixture again becomes as large as before.

It is invariably this purer portion of the lower bed which is at present worked in the Northwich mines, and the rock—salt obtained from it, being principally exported to the Baltic, obtains the name of Prussia Rock. The extent of the cavity formed by the workings varies in different mines; the average depth may probably be taken at about sixteen feet. In some of the pits, where pillars six or eight yards square form the supports of the mine, the appearance of the cavity is singularly striking, and the brilliancy of the effect is greatly increased, if the mine be illuminated by candles fixed to the side of the rock. The scene so formed, would almost appear to realize the magic palaces of the eastern poets. Some of the pits are worked in aisles or streets, but the choice here is wholly arbitrary. The methods employed in working out the rock-salt offer nothing worthy of notice. The operation of blasting is applied to the separation of large masses from the body of the rock, and these are afterwards broken down by the mechanical implements in common use. The present number of mines is eleven or twelve, from which there are raised, on an annual average, fifty or sixty thousand tons of rock-salt. The greater part of this quantity is exported to Ireland and the Baltic: the remainder is employed in the Cheshire district in the manufacture of white salt by solution and subsequent evaporation.

It is very doubtful whether in any instance the body of rock-salt can be considered as stratified, or disposed in distinct layers. A perpendicular section does sometimes indeed present irregular appearances of this kind, and more especially in the purer part of the lower bed, but the great body of the rock offers to the eye merely a confused red mass, varied here and there by the occurrence of the crystalline portions of salt.

One of the most striking facts connected with the internal structure of the Northwich rock-salt, is the appearance observable on the surface of an horizontal section of the rock, as viewed in any of the mines. On this surface may be traced various figures, more or less distinctly marked, and differing considerably in the forms which they assume; some appearing nearly circular, others perfectly pentagonal, and others again having an irregular polyhedral form. The lines which form the boundary of these figures are composed of extremely pure white salt, forming a division between the coarse red rock exterior to the figure, and the equally coarse rock included within its area. These bordering lines or rims vary from two to six inches in width. The figures themselves differ greatly in size; some of them being less than a yard in diameter, others as much as three or four yards ; and they very frequently are observed, one within another, gradually diminishing in size to a centre. Professor Playfair, in his Illustrations of the Huttonian Theory, has stated, that the compression of these figures is always mutual; the flat side of one being turned to the flat side of another, and never an angle to an angle, nor an angle to a side. This remark, as far as my observations have gone, is perfectly founded in fact. From the mode of working the mines, it is difficult to ascertain the progressive appearance of these figures in a perpendicular plane. It has been stated to me that their form is a pyramidal one, the area enlarging by a determinate ratio of increase as they are traced downwards; but several circumstances induce me to consider this statement as a very doubtful one, and certainly founded upon insufficient evidence.

One very important negative fact remains to be mentioned with respect to the internal structure of the Cheshire rock-salt, viz. that no organic impressions or remains have ever been met with in any of the beds of the mineral, which have been worked in this district. This fact rests on evidence of a satisfactory kind, and I am not aware of more than a single instance adduced in opposition to it, and that of a very dubious nature. The same remark may be applied to the strata of argillaceous stone between the two beds of rock-salt. The veins of rock-salt intersecting these intermediate strata contain principally the fibrous variety of the fossil. It may be remarked too of these strata, that at their junction with the upper and lower beds of rock-salt, the lines of division are nearly as distinct, as that between the upper bed of rock, and the superincumbent layers of argillaceous stone.

Comparative view of the Cheshire and Continental Salt Mines.

The want of sufficient materials with respect to the history of the continental salt-mines prevents me from entering into circumstances of comparison so minutely as I could have wished; considering such comparison to afford the best foundation for inquiries into the origin of the fossil-salt. The best, or rather the only memoir on this subject which I have had the opportunity of seeing, is one by M. Hassenfratz, contained in the eleventh volume of the Annales de Chimie. From this memoir it would appear that the general situation of the Rock-salt in Transylvania and Poland is very similar to that which it occupies in Cheshire; the beds of this mineral being disposed in small plains, bounded by hills of inconsiderable height, forming a kind of basin or hollow, from which there is usually only a narrow egress for the waters. The situation of the Austrian salt mines near Salzburgh is however very different. The mineral here appears to be disposed in beds of great thickness, which occur near the summit of limestone hills, at a great elevation above the adjoining country.[2] This fact is a singular one; and if we admit the idea that rock-salt is formed from the waters of the sea, makes it necessary to suppose the occurrence on this spot of the most vast and wonderful changes. M. Hassenfratz states it as a general fact, that in countries where salt-mines occur, fragments of primitive rocks appear in great abundance over these beds. It does not seem, however, that any deduction of importance can be connected with this fact.

The disposition of the beds of salt in the continental mines seems to be very generally a horizontal one, and as in the English mines, they are separated by strata of clay of a varying thickness. It would appear, however, with respect to extent of dimensions, that they are in general, greatly inferior to the bodies of rock-salt met with in our own island. In Hungary and Poland these beds do not present a thickness of more than one or two feet, and are separated by layers of clay a few inches in thickness. Much, however, it is evident, must depend upon the number of the beds thus disposed, but this I do not find any where noticed. The earthy saline contents of the foreign rock-salt very exactly resemble those of the Cheshire; the gypsum existing in much larger proportion than the other earthy salts, and appearing in considerable masses, both distinctly, and in mixture with the beds of clay. It is an important fact, however, that sea-shells and other marine exuviæ are found in these beds of clay and gypsum; a circumstance which, as I before stated, never occurs in the Cheshire mines. It would seem that the portion of oxide of iron combined with the clay in the substance of the English rock-salt does not exist in the mineral as found abroad, or at least in a proportion not so considerable.

The comparative commercial value of the English and Polish mines is best ascertained by the fact that many thousand tons of rock-salt are annually sent from Cheshire to the parts of the Prussian coast most nearly adjacent to the salt-mines; independently of the large supplies of the English manufactured white salt which are exported to the same country.

Considerations on the Origin of the Cheshire Rock-salt.

With respect to the theory of the formation of rock-salt, as applicable particularly to that of Cheshire, I shall not venture to say much, and that little will be of a general nature. Though it must be acknowledged that there are some difficulties connected with the supposition, little doubt can exist of the general fact, that the beds of this mineral have been formed by deposition from the waters of the sea. Such an opinion acquires much probability from the situation in which these beds usually occur; occupying the vallies and lower parts of plains which are so surrounded by hills of secondary formation, as to leave only a narrow egress for the waters collected on their surface. This structure of the plain constituting the salt district of Cheshire, I have particularly described; and, regarded in its general character, it leads strongly to the conclusion that the waters of the Sea must, at some former period, have occupied the lower parts at least of the basin thus formed, which at that time had a level eighty or one hundred yards lower than the one now appearing.[3] To account for the great depositions of salt in the lower parts of this basin, it is necessary to suppose that some barrier must have been afterwards interposed to prevent the free communication of the waters of the sea with these those collected, and the general course of the streams, the position of the beds of rock-salt, and the contractions in the valley of the Weaver, which appear below Northwich at Anderton and Frodsham, point out with some distinctness the place where these obstructions may probably have occurred.

To explain the appearance of the strata of indurated clay, intermediate between the beds of salt, we must suppose that the obstruction still continued, when the deposition of salt from the waters first confined, had nearly ceased; and that at this period, the deposition of clay, which had hitherto been going on in conjunction with that of the salt, proceeded in a great measure alone; the salt which remained in the water being merely sufficient to form small veins in its substance. When these strata had been deposited to a thickness often or eleven yards, it would appear that the barrier preventing the access of the sea to the basin or plain, was again so far removed as to allow the entrance of a fresh body of sea water; from the gradual evaporation of which, the formation of the upper bed of rock-salt took place; and there being then no further admission of sea water to the plain, the superincumbent strata of clay and marl were successively deposited in the order in which they at present appear.

This in s general sketch of the probable mode of formation of the Cheshire sock-salt; but as it would seem very doubtful whether any single accumulation of sea water could contain the materials of depositions possessing so great a thickness, the theory might perhaps he successfully modified, by supposing the barrier before noticed, to have had such an elevation in the progressive stages of the deposition of the salt, as to allow the very frequent ingress of sea water into the basin. Admitting this idea, we must suppose that the formation of the strata of indurated clay between the beds of rock-salt took place, either during some intermission of these overflowings, or when there was a great predominance of this earth in the water, from which the depositions were made. It seems probable too that the veins of salt intersecting these strata were formed rather by the penetration of water holding salt in solution, from the upper bed of rock-salt, than by a direct deposition from the waters of the sea, With respect to the sources of the clay, combined with the substance of the rock-salt, or found in intermediate and superincumbent beds, little doubt can exist that it has been derived from the decomposition of more ancient rocks, of the situation and precise characters of which no vestiges now remain.

This general idea of the formation of the Cheshire rock-salt derives confirmation from the fact that, with the exception of the sulphate of magnesia, the same earthy salts occur together with the muriate of soda in these strata, as are met with in the waters of the sea. The circumstance of the beds decreasing in thickness as they recede from the sea, may perhaps be admitted as another argument in behalf of the opinion.

The principal objection to the theory undoubtedly is, the non-existence of marine exuviæ either in the rock-salt, or in the adjacent strata of clay; a fact very difficult to connect with the idea of a deposition from the waters of the sea. Other objections, though perhaps of less moment, arise from the appearance of the earthy salts in smaller proportion in the rock-salt than in sea water; from the apparently partial deposition of the beds, and from the difficulty of explaining the formation of the figured appearances which occur in the substance of the rock. These circumstances, however, will by no means authorize us to reject the general idea which has been given of the origin of this mineral, strengthened as it is by the situation and appearances observed in the foreign salt mines, where the proofs of marine deposition are still stronger than those presented in the Cheshire district.

I confess I see no sufficient reason for supposing the action of subterraneous or internal heat in the formation of the beds of fossil salt. It appears probable that a deposition of muriate of soda from the confined waters of the sea might have taken place without the intervention of this agency, and there are no appearances either in the beds of salt, or in the clays accompanying them, which render it necessary to have recourse to the supposition in question. It must be acknowledged, however, that it is difficult to give a satisfactory account of the consolidation of the beds of salt; nor do I know any opinion on this subject, which can be considered altogether free from objection. A more enlarged discussion of these theoretical points may be found in the Appendix to the Report of Cheshire, before alluded to.

In dwelling thus minutely upon the natural history of the Cheshire rock-salt district, I am not aware that I have gone further than was requisite to a complete view of the subject. The prosecution of such enquiries is much assisted by the comparison of facts observed in different situations; and as the neighbourhood of Droitwich, in Worcestershire, is with the exception of the Cheshire salt district, the most considerable source of brine springs in this kingdom, some information with respect to the situation and natural history of these springs, as connected with a subjacent body of rock-salt, may be considered a desirable and important object. Such information I have not the means of giving, but it is more than probable that the Geological Society will be enabled to procure it, by the assistance of some of its corresponding members.

 Section of the Strata sunk through to the second Bed of Rock-Salt, at Wiston, near Northwich. No. Nature of the Strata. yards feet inch. 1 Calcareous Marl. 5 ─ ─ 2 Indurated red Clay 1 1 6 3 Indurated blue Clay with Sand 2 1 ─ 4 Argillaceous Marl 1 2 ─ 5 Indurated blue Clay 1 ─ 6 Red Clay, with Sulphate of Lime irregularly intersecting it 1 1 ─ 7 Indurated blue and brown Clay, with grains of Sulphate of Lime interspersed 1 1 ─ 8 Indurated brown Clay, with Sulphate of Lime crystallized in regularity masses, and in large proportion 4 ─ ─ 9 Indurated blue Clay, laminated with Sulphate of Lime 1 1 6 10 Argillaceous Marl 1 1 ─ 11 Indurated brown Clay, laminated with with Suplhate of Lime 1 ─ ─ 12 Indurated blue Clay, with laminæ of Sulphate of Lime 1 ─ ─ 13 Indurated red and blue Clay 4 ─ ─ 14 Indurated brown Clay, with Sand and Sulphate of Lime irregularly interspersed through it. The fresh water (360 gallons per minute) finds its way through holes in the stratum, and has its level at sixteen yards from the surface 4 1 ─ 15 Argillaceous Marl 1 2 ─ 16 Indurated blue Clay with Sand, and grains of Sulphate of Lime 1 ─ 9 17 Indurated brown Clay, with a little Sulphate of Lime 5 ─ ─ 18 Indurated blue Clay, with grains of Sulphate of Lime 1 6 19 Indurated brown Clay, with Sulphate of Lime 2 1 ─ 20 The first Bed of Rock-salt 25 ─ ─ 21 Layers of indurated Clay, with veins of Rock Salt running through them 10 1 6 ─── ─── ─── 22 The second Bed of Rock Salt, which has been sunk into thirty-five or thirty-six yards. 76 2 9

1. In reference to the chemical character of the different varieties of salt, an excellent paper by my friend Dr. Henry will be found in the Philosophical Transactions for the year 1810. Part I.
2. I am informed by Mr. Greenough that the lapelsgraben, which is the highest gallery, of the salt mine at Halstadt, is stated in Von Buch's Travels through Germany and Italy to be two thousand nine hundred and seventy-five feet above the sea, and that the salt mines at Hall in the Tyrol are at a much more considerable elevation.
3. This general character of the Cheshire salt district was remarked to me by my friend Sir John Stanley, in reference to the formation of the rock-salt; on which subject he obliged me by some very interesting observations, which are inserted in the Cheshire Report.


text:
# How do I calculate my BAB, CMB and CMD

I'm a new player and I don't know how to calculate some values on my character sheet, namely BAB, CMB and CMD.

They are a level 2 elven feral hunter with the following ability scores: Str 9, Dex 18, Con 11, Int 14, Wis 12, Cha 16.

They are wearing light armor and they carry either a compound longbow or just a longbow.

• Have you tried looking up the definitions for those things? They include formulas that explain how they are calculated. Do you have questions about those formulas or definitions? The more specific you are, the more helpful an answer is likely to be. – KRyan Feb 11 '18 at 20:58
• And, for that matter, we need more details to even just calculate this for you, for example the feats you have. – KRyan Feb 11 '18 at 21:14

First of all, you need to understand that BAB (base attack bonus) is just a component of your attack bonus and that it will almost never be used alone.

BAB depends entirely on your level and class. Go look at the hunter class table and see what it tells you. It's +1.

Elves are medium size and get no size modifier

An ability modifier is the value you get by subtracting 10 from your ability value, halving and rounding down. For strength 9 it's -1.

So, your CMB is +1 -1 +0 = +0

To get your CMD you need to add up your BAB, your Str modifier, your Dex modifier, a modifier based on your size. Several modifiers to your armor class (AC) are also comupted, but the Armor bonus (which depends on your actual, physical suit of armor) is not among them.

So, your CMD is +1 -1 +3 +0 = +3

It drops to +0 while you're flat footed, because you lose your Dex bonus to CMD if that condition applies.

Feats and other different things might add some bonuses to CMB or CMD (never to BAB) but they're usually very clear about it when they do. Read their descriptions carefully.

For a single-classed character, BAB is just what it says at your level on the table for your class. Since feral hunter is a hunter archetype, you just look BAB up in Table: Hunter, where you’ll see an entry of +1. Your BAB is thus +1. Almost nothing in the game changes your BAB for any reason.1

The rules for combat maneuvers explain how to calculate your combat maneuver bonus as well as combat maneuver defense. Unless a feat or class feature or something changes things (and some do), the formulas are

\begin{align} CMB &= BAB + Str + m_{size} \\ CMD &= 10 + BAB + Str + Dex + m_{size} + m_{misc} \end{align}

where $BAB$ is your base attack bonus, $Str$ and $Dex$ are your Strength and Dexterity modifiers, respectively, and $m_{size}$ is the special size modifier that doesn’t matter ($m_{size} = +0$) for a Medium-sized creature like an elf. $m_{misc}$ is a any other modifiers you may have; I don’t know why they mention it for CMD and not for CMB, but you can have other modifiers to either. You haven’t mentioned anything that would give you such a modifier, though. Your animal focus class feature, though, could increase your Strength or Dexterity, increasing those parts of the calculation.

So for you, we have

\begin{align} BAB &= +1 \\ {Str}^2 &= -1 \\ {Dex}^3 &= +4 \\ m_{size} &= +0 \\ m_{misc} &= +0 \\ CMB &= +1 -1 +0 &= +0 \\ CMD &= 10 +1 -1 +4 +0 + 0 &= 14 \end{align}

Note that your choice of armor or weapon has absolutely no effect whatsoever on any of these calculations. Even your armor’s maximum Dexterity bonus only limits how much Dex you can put towards AC; it does not affect your Dex for the purposes of CMD.

1. To my knowledge, the divine power spell is literally the only exception. Hunters don’t get that spell, and no one gets it at 2nd level.

2. Assuming that you are not using the bull animal focus at the time.

3. Assuming that you are not using the tiger animal focus at the time.


text:
Functional programming has gained a lot of traction over the years, along with the growing trend of functional/hybrid programming languages including F#, Scala, Clojure and Haskell to name a few. I wanted to re-explore functional programming – Can it really reduce bug count? Is it here to stay, or is it just one of those things that becomes a trend and die out after a few years?

## What is Functional Programming?

Before I start, let’s first try to understand what functional programming is.

Functional Programming is a programming paradigm that avoids side effects by computing for results rather than performing actions.

Functional Programming and Object Oriented Programming try to solve the same problem using a completely different approach – they both try to reduce code complexity, on one hand, Object Oriented Programming tries to reduce complexity by encapsulating side-effects, Functional Programming, on the other hand, does this by getting rid of side effects altogether.

If you use C#, chances are, you already write some of your code in a functional style – that chained LINQ methods that you’ve used to transform your dataset – that’s been written in a functional way, there are no mutations happening, and the technique via method chaining is very similar to that of piping in FP. You are essentially passing functions over your dataset.

This is how we usually use LINQ.

(new int[] {0, 1, 2, 3, 4})
.Where(x => x > 2)
.Select(x => x * 2)

We are iterating over our dataset, passing in functions to compute a new result and we’re chaining functions to iterate over the last result. In no way did we mutate our initial data.

## Higher Order Functions with Generic Delegate and Lambda

The introduction generic delegate and lambda in C# is what really allows writing in functional style code. This allows you as a developer to write code that no longer requires writing method or interface to handle an event, you can pass and return functions as you would in a functional language. When you pass or return functions, this is known as a Higher Order Function.

## Expressions over statements

When writing in a functional way, expressions should be favoured over statements.

What is a statement? statements are usually controlled by logical if and loops such as foreach or for statements, whilst in expressions, this tends to be done with ternary operator, null coalescing operator and passing functions over our data such as filtering and mapping.

Why does this matter? Simple, it’s more expressive, you are saying ‘I want to transform this to something else’ instead of ‘I want to do some operations to what I’m passing’ – you are wanting to do calculations rather than operations, you are wanting new data to be returned, not an action that can potentially try to mutate data.

## Closure

“A closure is a persistent scope which holds on to local variables even after the code execution has moved out of that block.”
stackoverflow

You create a closure when you create a function that persists the state of a variable even after the parent block has already been executed.

How NOT to create a closure:

void Main()
{
var funcs = new List<Func<int>>();
for(var i=0; i < 10; i++) {
}

foreach(var func in funcs) {
Console.WriteLine(func()); // writes 10, ten times
}
}

As you go through the for loop, i is passed as a reference to our lambda causing it to use the final value of i.

Here is a simple example of Closure in action:

void Main()
{
var funcs = new List<Func<int>>();
for(var i=0; i < 10; i++) {
var j = i; // copy
}

foreach(var func in funcs) {
Console.WriteLine(func()); // writes 0 to 9
}
}

We have created multiple functions that persist its own state – from 0 to 9.

So why is this concept important in functional programming?

Well, this allows for functions to be much more transferable – this allows functions to be passed around and act like an object persisting a state. You will see this effect used in the Currying example.

## Currying

What is Currying?

“A curried function is a function of several arguments rewritten such that it accepts the first argument and returns a function that accepts the second argument and so on. This allows functions of several arguments to have some of their initial arguments partially applied.”
stackoverflow

In OOP, if you were to write a static method that has three parameters, you would write it in such a way that you would just accept all the arguments.

public static int myStaticMethod(int x, int y, int z)
{
return x + y + z
}

In most functionally languages, you could do it in the same way same way:

f (x, y, z) => x + y + z

In a curried function, this would look something like this:

public static Func<int, Func<int, int>> myFunc(int x)
=> (y)
=> (z)
=> x + y + z;

Notice that the result an actual result is not returned until f(z) is called. This function would be called and chained like so myFunc(2)(3)(4).

So how does this make it any better than just passing three arguments directly? Well, now we’re creating a Closure for each argument needed for this calculation, so we can actually start making use of this along with Higher Order function to do multiple calculations.

void Main()
{
var partial = myFunc(4)(4);
var sum1 = partial(1).Dump();
var sum2 = partial(2).Dump();
var sum3 = partial(3).Dump();
var sum4 = partial(4).Dump();
}

public static Func<int, Func<int, int>> myFunc(int x)
=> (y)
=> (z)
=> x + y + z;

If you run this in LINQPad, you will get a result of 9 10 11 12.

## Further thoughts

I believe that hybrid Imperative/Functional Programming is the next step and will probably be the standard solution in the IT industry for years to come based on the languages currently gaining popularity such as Scala and Haskell along with the recent introduction of Lambda’s in Java. I am glad that FP being popularised and is given a serious consideration as an alternative approach to writing maintainable code that is quicker to both read and write.

I highly recommend watching Functional Programming with C# Pluralsight course by Dave Fancher if you want to see FP with C# in action.


text:
# Patching tikzscale

I'm trying to patch the package tikzscale. Specifically, I want to remove the following lines from the package, as it does not constitute a useful error in my usecase[1].

\tikzscale@ifSizeDifference{\measuredFirst - \measuredSecond}{%
}{%
\PackageError{tikzscale}{Requested to scale unscalable graphic}{Do not set width or height for graphic in\MessageBreak #3}%
}%

I am additionally attempting to do this without editing the package itself, as I expect to share this document with other people (and on Overleaf) in such a situation that I cannot request others to edit their installs on the package, so I'm trying to do this with regexpatch, or xpatch.

xpatch fails with:

File: etoolbox.def 2018/02/11 v2.5e etoolbox debug messages (JAW)
)
[debug] tracing \patchcmd on input line 19
[debug] analyzing '\tikzscale@scaleTikzpictureTo'
[debug] ++ control sequence is defined
[debug] ++ control sequence is a macro
[debug] -- macro cannot be retokenized cleanly
[debug] -> the macro may have been defined under a category
[debug]    code regime different from the current one
[debug] -> the replacement text may contain special control
[debug]    sequence tokens formed with \csname...\endcsname;
[debug] -> the replacement text may contain carriage return,
[debug]    newline, or similar characters

regexpatch fails with:

File: etoolbox.def 2018/02/11 v2.5e etoolbox debug messages (JAW)
)
*************************************************
* xpatch message
* \tikzscale@scaleTikzpictureTo' is not especially defined
*************************************************
*************************************************
* xpatch message
* Macro\tikzscale@scaleTikzpictureTo' is NOT patchable
* (Check if it contains `@' commands)
*************************************************

Is there a way in which this can work? Here is an MWE (while this will compile with no issues, inspecting the log will reveal the failure to patch).

\documentclass[twocolumn,twoside]{article}

\usepackage{regexpatch}
\usepackage{tikzscale}
\usepackage{lipsum}
\usepackage{tikz}

\usetikzlibrary{calc}
\usetikzlibrary{intersections}
\tracingpatches
\tracingxpatches
\makeatletter
\regexpatchcmd{\tikzscale@scaleTikzpictureTo} % Command to patch
{\PackageError{tikzscale}{Requested to scale unscalable graphic}.*} % Content to be replaced
{\relax} % Replacement content
{\message{Succesfully patched tikzscale!}} % Success message
{\message{Failed to patch tikzscale!}} % Failure message
\makeatother

\begin{document}
\lipsum
\end{document}

[1] My usecase is this, if it matters: I am writing .tikz files which themselves have \includegraphics, annotated in tikz. When I attempt to include them in my main document, they throw me the error Requested to scale unscalable graphic, however, the document compiles correctly, however, it fails on Overleaf.

An example of the .tikz I'm trying to include:

\begin{tikzpicture}
\node[anchor=south west,inner sep=0] (image) at (0,0){
\includegraphics[width=0.95\linewidth]{figure2.pdf}
};
\begin{scope}[x={(image.south east)},y={(image.north west)}]
% (a) (b) (c) (d) labels
\node at (0.02,0.97){\textbf{(a)}};
\node at (0.40,0.97){\textbf{(b)}};
\node at (0.67,0.97){\textbf{(c)}};
\node at (0.21,0.66){\textbf{(d)}};
\node at (0.02,0.39){\textbf{(e)}};

% Inset label
\fill [white] (0.23,0.53) rectangle (0.30,0.62);
\fill [white] (0.65,0.53) rectangle (0.75,0.62);
\node at (0.67,0.41) {Diffraction losses};
\node[anchor=south west] at (0.23,0.53) {$\bm{|\psi\rangle}$};
\node[anchor=south west] at (0.65,0.53) {$\bm{T|\psi\rangle}$};

% Optical component labels
\node at (0.14,0.35){\small Laser};
% \node at (0.07,0.32){\small Fiber};
\node at (0.14,0.01){\small Pol$_1$};
\node at (0.23,0.01){\small HWP};
\node at (0.31,0.01){\small BS};
\node at (0.30,0.32){\small Det$_B$};
% \node at (0.40,0.01){\small Lens};
% \node at (0.46,0.35){\small Metasurface};
% \node at (0.53,0.01){\small Lens};
\node at (0.46,-0.02){\small Metasurface};
\node at (0.70,0.01){\small Fourier lens};
\node at (0.74,0.20){\small QWP};
\node at (0.83,0.20){\small Pol$_2$};
\node at (0.95,0.03){\small Det$_A$};

%\draw[red,ultra thick,rounded corners] (0.62,0.65) rectangle (0.78,0.75);
\end{scope}
\end{tikzpicture}
• Welcome to TeX.SE! I'd recommend to also present a real world example that shows how you want to use the patch, perhaps there is a simpler possibility. – marmot Jun 8 '18 at 5:48
• First of all, \regexpatchcmd requires a very different syntax; but that's not the problem: the macro \tikzscale@scaleTikzpictureTo does not contain the tokens you'd like to replace, because it's defined with \NewDocumentCommand (and so patching it is not covered by regexpatch). – egreg Jun 8 '18 at 6:26
• I would try to avoid to nest tikzpictures. It can work, but they can be also side effects. See e.g. tex.stackexchange.com/a/66037/2388. Beside this: before getting rid of an error, you should try to understand why the author added the test and the error message. – Ulrike Fischer Jun 8 '18 at 8:36
• It cannot 'compile correctly' if you get an error. Really, nesting tikzpictures ought not be done and can always (?) be avoided. – cfr Jun 9 '18 at 3:05
• It compiles correctly insofar as the document is actually rendered as expected, despite the error coming up! I have no idea why, either. Also, I'm not trying to nest tikz pictures - my main document uses \includegraphics to include a .tikz file, which has an \includegraphics of a .pdf file. I've edited my post with an example. – Firnagzen Jun 12 '18 at 2:48

## 1 Answer

The command \tikzscale@scaleTikzpictureTo is defined with \NewDocumentCommand and neither xpatch nor regexpatch support patching such commands directly.

If you do \xshowcmd\tikzscale@scaleTikzpictureTo before trying the patch, you'll see

> \tikzscale@scaleTikzpictureTo=\protected
macro:->\__xparse_start_expandable:nNNNNn {mmm}\tikzscale@scaleTikzpictureTo
\tikzscale@scaleTikzpictureTo  \tikzscale@scaleTikzpictureTo code
?{\__xparse_expandable_grab_m:w \__xparse_expandable_grab_m:w
\__xparse_expandable_grab_m:w }.

on the console and this clearly explains why the patch doesn't work: the text you'd like to replace isn't there to begin with.

A little knowledge of xparse will tell you what is the real macro to patch. Hint: it has a space in its name; a standard \expandafter trick can be used for passing it as argument to \xpatchcmd.

Beware also that \regexpatchcmd requires l3regex syntax (part XXVI in interface3.pdf); you used a syntax proper to \xpatchcmd.


text:
# What exactly are “primordial fluctuations”?

Are "primordial fluctuations" essentially the same as "virtual particles" and "quantum fluctuations" that created the universe from nothing like what is featured in the Lawrence Krauss book, A Universe from Nothing?

I haven't read Krauss' book, but it seems the "quantum fluctuations" referred to is something invoked to explain the origin of the Universe itself; i.e. why is there something rather than nothing.

This is not what the term "primordial fluctuations" refers to. Although this is also quantum fluctuations, in the sense that their origin is described by quantum mechanics, their existence assumes the existence of a Universe in the first place. Quantum mechanics' uncertainty principle implies that the Universe — however it came into existence and not really considering the cause — was clumpy on very small scales. When the Universe was $10^{-36}$–$10^{-33}$ seconds old, during the epoch called inflation, these clumps grew in size to cosmological sizes, later collapsing under the force of gravity to the structures we see today as clusters, galaxies, and stars.

• You changed your question now to include virtual particles. I don't have the time to edit my answer right now, but the answer is still no. – pela Aug 24 '16 at 6:20
• Is it primordial fluctuations that are being referred to in this statement? "Inflation is today a part of the Standard Model of the Universe supported by the cosmic microwave background (CMB) and large scale structure (LSS) datasets. Inflation solves the horizon and flatness problems and naturally generates density fluctuations that seed LSS and CMB anisotropies, and tensor perturbations (primordial gravitational waves)." – user127946 Aug 24 '16 at 6:25
• @user127946: Yes, that's correct. Those fluctuations have nothing to do with the origin of the Universe itself, which (I guess) is what Krauss discusses. Inflation (there are various models) predicts a homogeneous and isotropic field (in accord with the Cosmological Principle) with random Gaussian (or close-to-Gaussian) fluctuations which agree well with CMB and LSS observations. – pela Aug 24 '16 at 14:09

It's well-known, that the large-scale structure is incredibly rich. Although on the largest cosmological scales the Universe looks boring (isotropic and homogeneous), at slightly smaller scales that are still very large (we're talking about considering clusters of galaxies as a single entity), we see incredibly rich structure, of filaments, walls and voids, like a sponge, e.g. https://kicp.uchicago.edu/research/highlights/images/highlight-060611-3.jpg.

In the early universe, there was no structure, only a hot plasma. The radiation pressure from photons etc. prevents gravity from condensing other non-relativistic particles. This washing out' of structure means that if we assume only normal matter contributes to gravity, we cannot dynamically generate the observed rich sponge-like structure we see at the large-scale today.

In order to see the amount of structure in the Universe, we need dark matter. But even that is not enough. In addition to the dark matter, we need seeds' of gravitational potential wells to speed up the gravitational condensation of dark matter.

The seeds are called $$`$$primordial fluctuations' and occur before the existence of a hot thermal plasma, in the very early universe. In inflationary cosmology, it's proposed that the quantum fluctuations provide the seeds for structure. Inflation enlarges to the quantum fluctuations, causing them to become classical and form the seeds necessary for large-scale structure.


text:
Browse Questions

# Find the angle between the lines $\overrightarrow{r}=\overrightarrow{5i}-\overrightarrow{7j}+\mu (-\overrightarrow{i}+\overrightarrow{4j}+\overrightarrow{2k}) \overrightarrow{r}=-\overrightarrow{2i}+\overrightarrow{k}+\lambda (\overrightarrow{3i}+\overrightarrow{4k})$

Toolbox:
•
The line $\overrightarrow r=5\overrightarrow i-7\overrightarrow j+ \mu (-\overrightarrow i+4\overrightarrow j+2\overrightarrow k)$ is parallel to $\overrightarrow u = -\overrightarrow i+4\overrightarrow j+2\overrightarrow k$
The line $\overrightarrow r = -2\overrightarrow i+\overrightarrow k+ \lambda (3\overrightarrow i+4\overrightarrow k)$ is parallel to $\overrightarrow v = 3\overrightarrow i+4\overrightarrow k$
The angle between them is $\theta = \cos^{-1} \large\frac{\overrightarrow u.\overrightarrow v}{|\overrightarrow u||\overrightarrow v|}$
$= \cos^{-1} \large\frac{(-1)(3) + 0 +(2)(4)}{\sqrt{1+16+4}\sqrt{9+16}}$
$= \cos^{-1} \large\frac{5}{\sqrt{21}\: 5} = \cos^{-1} \large\frac{1}{\sqrt{21}}$

edited Jun 24, 2013

–1 vote