text:
# QIP 2015 zombie-blogging, Day 5

Today’s highlight: an algorithm running in time $O(n^{59})$, also known as “polynomial time” or “efficient”.

### Joseph Fitzsimons and Thomas Vidick.A multiprover interactive proof system for the local Hamiltonian problem(Plenary Talk)abstractarXiv:1409.0260

Thomas begins by reminding everyone about what NP is and mentions that Super Mario is NP-complete. However, I solved it as a child and saved the princess from Bowser. I’m not sure what the implications of this are for P vs. NP. Knowing that Super Mario is in NP saves me from having to learn it. I just reduce it to 3-SAT.

All problems in NP have a local verification procedure because of the NP-completeness of 3-SAT. But we still need to know the whole proof, right?

There is a nice way to make proof verification completely local, and that is to introduce more than one prover. We introduce a familiar cast of characters: Merlin and Arthur. Arthur is the referee and is allowed to ask two non-communicating Merlins to prove something to him. The value is defined to be $\omega(G) = \sup_{\textrm{Merlins}} \textrm{Pr}[\text{Arthur accepts}]$. We need to ensure that this scheme is both sound and complete. A stronger version known as the PCP theorem has the following interesting property. Arthur can do some pre-processing and then just check a constant number of clauses to get a high probability of soundness.

The 3-local Hamiltonian problem is a well-known complete problem for QMA. Here one is given a local Hamiltonian on $n$ qubits with a promise that the ground state energy is either less than $a$ or greater than $b$, with $a-b \ge 1/\mathrm{poly}(n)$ (the “promise gap”), and one must decide which is the case.

In the quantum setting, we allow the Merlins to share initial entanglement, but they can’t communicate after that. Now the value is denoted by $\omega^*(G) = \sup_{\textrm{Merlins}} \textrm{Pr}[\text{Arthur accepts}]$. The star denotes this additional quantum entanglement shared by the Merlins.

Can Arthur use the entangled Merlins to his advantage, to recognize languages beyond NP? The Peres-Mermin “magic square” game makes this unclear since at least in some cases the Merlins can “cheat” and use entanglement to increase the acceptance probability. But it was shown [KKMTV 08, IKM 09] that Arthur can still use entangled Merlins to at least recognize languages in NP. An aside: this, like most previous work, viewed the entanglement between the Merlins mostly as a drawback to be mitigated using techniques like monogamy relations that force the provers to use strategies that resemble unentangled strategies.

To illustrate the difficulties, suppose we have a 1D Hamiltonian with nearest-neighbor interactions. Suppose that these are anti-ferromagnetic so that the unique ground state of each two-qubit term is the singlet, which we say has zero energy. This is of course highly frustrated and the ground-state energy will be proportional to the number of qubits. But a naive two-prover proof system would allow us to be convinced that the ground-state energy is zero. Suppose we can split the qubits into even and odd layers that are mutually commuting. We can have Merlin-1 take the odd qubits and Merlin-2 take the even qubits. We choose a random interaction, say on sites j and j+1, and ask Merlin-1 for one of them and Merlin-2 for the other. But this doesn’t work. The Merlins need only share a singlet state which they just return regardless of which question we ask.

The main result is a five-player game for the 3-local Hamiltonian problem. The messages from the Merlins to Arthur are quantum, but very short. The value of the game with $n$ classical questions, 3 answer qubits, and with 5 players is QMA-hard to compute to within a $1/\mathrm{poly}(n)$ factor. Consider the ground state of the Hamiltonian encoded in the 5-qubit code. We will require the five Merlins to each have one share of these encoded qubits, so each Merlin has $n$ qubits.

The protocol is as follows. Pick a random clause $H_l$ on qubits $i,j,k$ and either:

1. energy check
1. ask each Merlin for his share of i,j,k
2. decode
3. measure $H_l$
2. code check
1. ask one Merlin for his share of i,j,k
2. ask other Merlins for their share of i
3. verify that qubits lie in code subspace.

The intuition is that the Merlins are forced to be in a code space, with the states of 4 Merlin constraining the fifth. How is this proven?

The most general Merlin strategy is to share a state $|\psi\rangle$ and to respond to a request for qubit $i$ by applying a unitary $U_i$, or to a request for $i,j,k$ with the unitary $V_{i,j,k}$. We would like to argue that any such strategy can be turned into a method for extracting all $n$ qubits from the state $|\psi\rangle$.

This will be done using a method similar to a mosquito drinking blood: as it extracts blood it replaces the volume of liquid with its saliva. Here we extract a qubit $i$ using $U_i$ (actually $U_i^{(1)}, \ldots, U_i^{(5)}$), and then replace those qubits with halves of EPR pairs and then each prover applies $U_i^\dagger$. Actually, the other halves of the EPR pairs are never used so even a maximally mixed state would work. The point is just to put something there, effectively performing a logical SWAP.

This work also leads to a natural reformulation of the quantum PCP conjecture: Constant-factor approximations to the entangled value of a quantum game with entangled provers $\omega^*(G)$ are QMA hard. The result is a first step in this direction by solving the case of a $1/\mathrm{poly}(n)$ factor.

Another consequence is for MIP and related complexity classes. $MIP(c,s)$ refers to the class of problems with a multi-prover interactive proof with completeness c and soundness s. In this language the PCP theorem implies that $NEXP=MIP(1,1/2)$.

In the quantum case Thomas proved that $NEXP \subseteq (Q)MIP^*(1,1/2)$ in an earlier breakthrough. This work shows now that $QMA_{EXP}$ is contained in $MIP*(1-2^{-p}, 1-2^{-2p})$, proving for the first time that entanglement increases the power of quantum proof systems. Here “proving” is in the usual complexity-theory sense, where we have to make some plausible assumption: in this case, that $\text{QMA}_{\text{EXP}} \not\subseteq \text{NEXP}$.

During the questions, Ronald de Wolf and Daniel Gottesman pointed out that you might be able to reduce it from 5 Merlins to 4 by using error-detecting codes, or even 3 by using qutrit quantum error-detecting codes. Or what about 2 using approximate QECC? (This last probably won’t work.)

### Sergey Bravyi and Matthew Hastings. On complexity of the quantum Ising modelabstractarXiv:1410.0703

(This talk was presented by the heroic David Gosset because Sergey didn’t get a visa in time.)

The transverse Ising model (TIM) is important for several reasons. For one thing, this model is ubiquitous in the theory of phase transitions. It’s a good model of certain non-universal quantum devices like the D-wave machine. And the recent breakthrough of Cubitt and Montenaro shows that the TIM appears naturally as a possible intermediate complexity class.

We would love to understand the quantum annealing (QA) algorithm of Farhi et al., and unfortunately we won’t be able to do that here. But we can use it to help us understand a target-simulator model that lets us do reductions of various Hamiltonian complexity problems. An example, if we have a simulator QA machine that has TIM Hamiltonians, then it is unlikely that we can simulate a target QA machine that has access to 2-local Hamiltonians (which are BQP complete). The simulator TIM machine is contained in BQP $\cap$ postBPP, which is unlikely to equal BQP.

Recall the class of “stoquastic” local Hamiltonians. These are local Hamiltonians with “no sign problem”, meaning that all off-diagonal matrix elements in the computational basis are real and non-positive. There is a natural complexity class, StoqMA, that captures the complexity of these Hamiltonians.

StoqQMA is like QMA but Arthur can only apply reversible classical gates (CNOT, Toffoli) and measure some fixed qubit in the X basis. He accepts iff the measurement outcome is +. He can use 0 and + ancillas.

StoqMA’s relation to other complexity classes:

• $P \subseteq NP \subseteq MA \subseteq StoqMA \subseteq QMA \subseteq A_0PP$
• $StoqMA \subseteq SBP \subseteq PostBPP$
• $SBP \subseteq AM \subseteq \Pi_2$

($A_0PP$ and SBP are approximate counting classes.)

Main result: The local Hamiltonian problem for TIM on degree-3 graphs is StoqMA-complete. This sharpens the Cubitt and Montenaro classification by linking the TIM directly to StoqMA.

In the ferromagnetic TIM, the coupling terms are all positive and the Z-field is uniform. Another result is a polynomial-time approximation algorithm for the partition function of the ferromagnetic TIM. This generalizes and in fact makes use of a result of Jerrum & Sinclair from 1993. The run time is polynomial: $O(n^{59})$. Awesome. Taking the log of the partition function, one gets the free energy within an additive constant, and at low temperature, this approximates the ground state.

### Rafael Chaves, Christian Majenz, Lukas Luft, Thiago O. Maciel, Dominik Janzing, Bernhard Schölkopf and David Gross.Information-Theoretic Implications of Classical and Quantum Causal StructuresabstractarXiv:1407.3800

Given some empirically observable variables, which correlations between these are compatible with a presumed causal structure? This is a fundamental problem in science, as illustrated by the following situation. You would like to claim that smoking causes cancer. But all you have is correlation data… and correlation doesn’t imply causation. So when can we make that inference?

One of the main ideas of this work is to use entropies rather than probabilities in order to avoid headaches associated with nonconvex structure that appears in previous approaches to answering these types of questions.

Classically, Directed Acyclic Graphs (DAG) have edges encoding a causal relationship between the nodes that they connect. Conditional Independences (CIs) are encoded by a DAG; this is the causal structure. A given probability distribution is compatible with a given causal structure if it fulfills all of the CI constraints implied by a given DAG.

Marginal Scenarios: Usually, for a variety of reasons, not all variables in a DAG are observable.

Probabilities compatible with a causal structure are expressible by a polytope, within which they must fall, e.g. Bell’s theorem. However, in an example due to Geiger and Meek, which is symmetric and consisting of three unseen variables each causing two of the three observable events, A, B, and C, we have a geometry that is non-convex.

Classically, going to the entropic description, we get a description of marginal causal entropic cones in terms of the entropic Bell inequalities framework pioneered by Braunstein & Caves in 1988.

A variant of this is the common ancestor problem.

Quantumly, there is not a unique definition of what the causal structure is. What should we use? Informally it should specify the dependencies between a collection of quantum states and classical variables. We use 3 kinds of nodes,

• Classical
• Quantum states
• Quantum operations, i.e. CPTP maps

Because measurement affects a quantum system, some CIs that are classically valid cannot be defined in the quantum case. But independencies still hold and we can use data processing inequality. One consequence is a strengthening of the IC inequality, and allows it to be generalized eg to quantum messages. (see also 1210.1943).

### Nicolas Delfosse, Jacob Bian, Philippe Guerin and Robert Raussendorf.Wigner function negativity and contextuality in quantum computation on rebitsabstractarXiv:1409.5170

What makes quantum computing work? Many explanations have been proffered in the past: entanglement, contextuality, superposition and interference, and even quantum discord. While it seems fair to say that we really have no idea what makes a quantum computer “work” so well, we do have some ideas for some specific models.

The main result of this talk is that contextuality is a necessary resource for universal quantum computation with magic states on rebits. Pro: these are two-level systems; Con: these are not qubits, only “rebits”.

Mermin’s square and Mermin’s star are state-independent proofs of contextuality. They look as if they will spoil the party. But in fact they help.

Previous work by Anders and Browne ’09 showed that contextuality powers measurement based quantum computation, and in 2014 Howard et al. showed that contextuality powers quantum computation with magic states.

In the setting of quantum computation by state injection, we have a restricted family of gates (e.g. Clifford gates) and we have some noisy version of a state that cannot be prepared from that gate set and starting with computational basis states. Which properties must a fiducial state possess in order to “promote” a restricted model of Clifford gates to a universal quantum computer? In work by Joe Emerson’s group, this was answered for odd-prime dimensional qudits that we need:

• Wigner function negativity
• Contextuality

Hudson’s theorem characterizes the set of pure states with non-negative Wigner functions: it is precisely the set of state that are Gaussian, aka stabilizer states in the discrete setting. Clifford operations cannot introduce (Wigner) negativity through gate operations, and so that makes negativity a resource for initial magic states. All of this works out very cleanly in the case of odd-prime dimensions.

Mermin’s magic square implies that not all contextuality can be attributed to states. This seems to ruin our “resource” perspective. Not all contextuality that’s present can be attributed to states. What’s worse, Mermin’s square yields a contextuality witness that classifies all 2-qubit quantum states as contextual.

To deal with this, we move to rebits, so that the density matrix $\rho$ is restricted to be real with respect to the computational basis for all times. We also have to use a restricted gate set that is CSS-preserving, and purely Clifford. This also affects the state preparations and measurements that are allowed, but let’s skip the details.

Now there is a $d=2$ Hudson’s theorem: A pure n-rebit state has a non-negative Wigner function if and only if it is a CSS stabilizer state.

Wigner non-negativity then implies that Pauli measurements on $\rho$ are described by a non-contextual hidden variable model. Equivalently contextuality implies negativity of the Wigner function, in our rebit/CSS setting.

There is no contradiction with the Mermin magic square because of the rebit property and the CSS restriction: we cannot measure ZX and XZ simultaneously. Only all-X and all-Z Pauli operators can be measured simultaneously.

### Ramis Movassagh and Peter Shor.Power law violation of the area law in quantum spin chainsabstractarXiv:1408.1657

We’ve already discussed the area law and its important implications for the efficient simulation of gapped 1-dimensional spin systems. We believe that an area law holds for higher-dimensional spin systems if the Hamiltonian is gapped. We also know that 1-dimensional spin-chains can in general be QMA-complete, but the spectral gap shrinks in the hard cases.

These authors have a series of papers on this larger project.
On a spin chain with qudits and random interactions that are projectors of rank r, they showed that

• The ground state is frustration free but entangled when $d \leq r \leq d^2/4$.
• Schmidt ranks were known, but gap/entropy weren’t known.

Then Irani and Gottesman-Hastings used the type of Hamiltonians from 1-d QMA-hardness constructions to obtain Hamiltionians with 1/poly(n) gap and O(n) entropy. The local dimension is “O(1)” but in a CS rather than physics sense (i.e. the constants are big). Some condensed matter theorists have dismissed these Hamiltonians as “fine-tuned.”

Previous work by these authors had frustration-free, 1/poly(n) gap and O(log n) entanglement, but this could still be explained away as being “critical” since this entropy scaling matched what one expected from conformal field theory.

The latest results, with entanglement entropy $O(\sqrt{n})$ and the same guarantees on the spectral gap, do not match any of the condensed matter theorists’ explanations. They only require spins of dimension 5, so they are much closer to a natural model.

The “Motzkin state” is the ground state in question here that they construct, as they use something called Motzkin paths to construct this Hamiltonian. The ground state of the original construction was a superposition of all Motzkin walks on a chain of length $2n$.

We say a Motzkin state is the superposition of all Motzkin walks. A Motzkin walk is a walk that starts at 0, ends at 0, remains nonnegative, and goes up or down or remains level at each intervening step. Our Mozkin walks can have two kinds of up step and two kinds of down step. Our Hamiltonian introduces a penalty for violating the Motzkin rule.

The reason that these states can lead to entanglement is that the amount that it goes “up” on the left half of a cut must equal the amount that it goes “down” in the right half.

Combinatorially we know how many Motzkin walks there are of height m, number of kinds of step s, and length n. Turning the sum into an integral and doing saddle point integration we get the entanglement.

One can implement the constraints of a colored Motzkin walk with local constraints, and these become the terms in the local Hamiltonian. You can get an upper bound on the spectral gap using the variational principle. The lower bound can be obtained using similar techniques as the previous results by the authors and others.

Is there a continuum limit for these models? Can we rigorously prove these results with an external magnetic field that can eliminate the need for boundary conditions? Are there frustration-free Hamiltonians with unique ground states and no boundary conditions that violate the area law by large factors?

### Hector Bombin.Gauge color codes and Single-shot fault-tolerant quantum error correction (Plenary Talk)abstract-89arXiv:1311.0879abstract-90arXiv:1404.5504

Fault-tolerant gates are great, but they can’t be done in a transversal way and still be universal. This is the celebrated Eastin-Knill theorem. In the context of topological quantum error-correcting codes, there is a natural relaxation of the notion of transversal gates to finite-depth quantum circuits [Bravyi-Koenig’09].

Color codes are an interesting class of topological stabilizer codes that allows for a transversal implementation of a T gate in three dimensions. It generally saturates the Bravyi-Koenig bound on the Clifford hierarchy for transversality. Hector has generalized his color codes to a subsystem code version. The recent important paper by Paetznick and Reichardt introduced the notion of gauge fixing that lets us jump between different codes with different transversality restrictions, and this let’s us sidestep the Eastin-Knill theorem. The new gauge color codes can be combined with this gauge-fixing idea to move between conventional color codes and gauge color codes. In these two codes, there are two different sets of operations that together are universal.

In typical fault-tolerant methods, we make noisy syndrome measurements and we repeat them several times to avoid errors. The decoding step is a global classical calculation and the correction is a transversal quantum operation. Hector’s new paradigm of single-shot fault tolerance is a way to avoid the multiple rounds requirement in the old method.

3D color codes turn out to be single-shot fault tolerant (SSFT). This is because the gauge degrees of freedom have some redundancy and this can be used to make inferences about which stabilizer measurements might have been faulty. The notion of SSFT is closely linked to the notion of self-correction via the physical mechanism of confinement. As a simple example, consider the ferromagnetic Ising model in a symmetry-broken state below the critical temperature. Anti-aligned magnetic domains are confined in this phase. The following week Poulin gave a talk at Coogee that was skeptical about the possibility of single-shot fault tolerance. Definitely this notion needs to be made more precise.

Suppose we want to do fault-tolerant error correction in a gauge color code. A faulty gauge syndrome will be one with endpoints, and we can repair the gauge syndrome, with the branching points of the result giving the new syndrome. Importantly, the gauge syndrome is unconfined; it is random except for the fixed branching points. The effective wrong part of the gauge syndrome, however, is confined. Each connected component has branch points with neutral charge. Therefore the branching points exhibit charge confinement. This sounds intriguing, but none of the Pontiffs really understand the details.

Gauge fixing to either Z or X with give you either a transversal implementation of either T or HTH, and this lets you perform arbitrary gates on the encoded logical qubit.

Bonus Result: 3d quantum computation, with local operations and constant time overhead, but global classical computation. This uses the 3d color code for computation with a stack of 2d codes for memory; see arXiv:1412.5079 for details.

### Courtney Brell.Self-correcting stabilizer quantum memories in 3 dimensions or (slightly) lessabstractarXiv:1411.7046

We’ve previously blogged about this very interesting result here. But now there’s a problem! The thermodynamic considerations all still seem to hold, and the Hausdorff dimension of the code is still 3 or less, but the specific embedding theorem that Courtney had used previously doesn’t not apply. Therefore, it is still open if this code can be embedded in 3 dimensions with constant density. Courtney is currently working to fix the proof, but for now the embeddability of these codes is downgraded to a conjecture.

Courtney also gave a heuristic argument for why this embeddability conjecture might be true. In the limit of low lacunarity (which is basically a measure of how much a fractal violates translation invariance) there is a simple condition that says that the density of a projection stays bounded.

Two interesting tools that Courtney uses for the thermodynamic arguments that might have broader interest are the GKS inequality, which says that adding ferromagnetic interactions cannot reduce ferromagnetic order, and Merlini-Gruber duality, which is a duality similar to the Kramers-Wannier duality used to prove the phase transition in the Ising model.

### Henrik Wilming, Rodrigo Gallego and Jens Eisert.Universal operations in resource theories and local thermodynamicsabstractarXiv:1411.3754

This talk takes a resource-theory approach to thermodynamics. The goal is to extract work from a state, given various types of permitted free operations and a possibly limited ability to change the Hamiltonian by investing work. For each class of operations, the Gibbs state is a “free” state, analogous to product states in entanglement theory. The options are

• weak thermal contact: Bringing the system in contact with the heat bath puts it into thermal equilibrium.
• thermal operations: More generally are any energy-conserving unitary operations on the heat bath and the system. A much larger set of operations than weak thermal contact.
• A still larger class of maps comprises all quantum channels that have the Gibbs state as a fixed point: call these Gibbs-preserving (GP) maps. GP maps can sometimes take a point below the thermal curve to a little bit above, without violating the 2nd law.

How effective these different models are at extracting work depends on the class of Hamiltonians allowed. If any Hamiltonians are allowed then there is a collapse and weak thermal contact can do as well as GP maps (and of course also thermal operations), essentially extracting all surplus free energy of a state. If we restrict the class of possible Hamiltonians then separations between these models are possible, in part because it’s harder to deal efficiently with off-diagonal terms in the density matrix.

This entry was posted in Conferences, Liveblogging. Bookmark the permalink.

### 2 Responses to QIP 2015 zombie-blogging, Day 5

1. Cécilia says:

Thanks a lot, Aram and Steve, for the QIP blogging! I attented the conference, but still, found it extremely nice: now, I have the impression at least, that I retrieved something from every talk, even the ones that seemed completely out of reach to me on the spot 😉

2. John Sidles says:

Please let me join with Cécilia in appreciating this wonderful live-blogging, and thanking all concerned (Pontiffs especially) for the effort in making it accessible to everyone.

For me, it has been a wonderful (and continuing) enterprise to c0llate all presentation/posters relating to “entropy” and “area laws”, with a view toward grasping shared ideas and methods relating to quantum descriptions of transport processes.

QIP live-blogging makes surveys like this feasible, thereby greatly extending the influence of QIP conferences, for which many folks (including me) are very grateful.


text:
# How to use ContourPlot to omit part of a contour and colour two remaining parts differently from each other?

I'm using Mathematica v7, in which the following code plots an ellipse (many thanks to @Kirma ):

With[{foci = {{3, 2}, {5, 1}},
semimajoraxis = 1.7},
Show[
ContourPlot[
Sum[EuclideanDistance[{x, y}, p], {p, foci}] == 2 semimajoraxis,
Evaluate[
Sequence @@
MapThread[{#1, #2 - semimajoraxis, #2 + semimajoraxis} &, {{x,
y}, Mean[foci]}]], AspectRatio -> Automatic,
ContourStyle -> {Blue}]]]

How can I use ContourPlot to omit one part of this contour and colour a second part red and a third part blue?

For example, how can I omit the part for which $x+y-4<0$ and, of what remains, colour the part for which $x+2y-8>0$ red and the other part blue?

• for the first part of your question, you can use RegionFunction -> (# + #2 - 3.5< 0 &) (but this does not remove any part of the contour). – kglr Aug 27 '18 at 22:19
• Thanks for this. I made a mistake with the linear inequalities, which I have now corrected. – ruffle Aug 27 '18 at 22:26

You can use RegionFunction to remove some parts of the graphics. To color different portions of the remaining part, you can produce two different plots using ConditionalExpression in the first argument. The two plots correspond to whether or not the condition #[[1]] + 2 #[[2]] - 5 >= 0 is satisfied:

sel = #[[1]] + 2 #[[2]] - 5 >= 0 &;
regf = (# + #2 - 6 < 0 &);
With[{foci = {{3, 2}, {5, 1}}, semimajoraxis = 1.7},
Show[ContourPlot[ConditionalExpression[Sum[EuclideanDistance[{x, y}, p], {p, foci}],
#[{x, y}]] == 2 semimajoraxis,
Evaluate[Sequence @@ MapThread[{#1, #2 - semimajoraxis, #2 + semimajoraxis} &,
{{x, y}, Mean[foci]}]], AspectRatio -> Automatic,
ContourStyle -> Directive[#2, Thick],
RegionFunction -> regf] & @@@ {{sel, Red}, {Not[sel@#] &, Blue}}]]

Alternatively, you can post-process ContourPlot output to (1) extract contour line coordinates, (2) create a BSplineFunction from extracted coordinates, and (3) use it with ParametricPlot with a combination of Mesh* options and RegionFunction:

cp = With[{foci = {{3, 2}, {5, 1}}, semimajoraxis = 1.7},
ContourPlot[Sum[EuclideanDistance[{x, y}, p], {p, foci}] == 2 semimajoraxis,
Evaluate[Sequence @@ MapThread[{#1, #2 - semimajoraxis, #2 + semimajoraxis} &,
{{x, y}, Mean[foci]}]],
AspectRatio -> Automatic, ContourStyle -> Directive[Blue, Thick]]];

meshf = # + 2 #2 - 5 &;
bsF = BSplineFunction[Join @@ Cases[Normal@cp, Line[x_] :> x, Infinity]];
ParametricPlot[bsF[t], {t, 0, 1}, PlotStyle -> Directive[Red, Thick],
MeshFunctions -> {meshf}, Mesh -> {{0}}, MeshStyle -> PointSize[0],

format: plain


text:
Click to Chat

1800-1023-196

+91-120-4616500

CART 0

• 0

MY CART (5)

Use Coupon: CART20 and get 20% off on all online Study Material

ITEM
DETAILS
MRP
DISCOUNT
FINAL PRICE
Total Price: Rs.

There are no items in this cart.
Continue Shopping
        Ques no.14.Plzz ans urgentIMAGE IS ATTACHEDIt is an example with solution but I can't understand the solution.plzz explain
8 months ago

Kapil Khare
80 Points
							Let us assume that the disc lies in x-y plane                      Ix + Iy = IzWe will calculate I about COM and perpendicular to plane of disc, i.e., Iz$\sigma$(Mass/Area) = M/[$\pi$(R22 _ R12)]So            dm = $\sigma$ * 2$\pi$r*dr$\implies$         Iz = ∫2$\pi$r*dr*r2]On integrating above function from r=R1 to r=R2, we will get                 Iz = M(R12 + R22)/2Ix = Iy because the distribution of mass is same for all the axis passing through centre and lies in the plane of paperSo,           2Ix =  Iz = M(R12 + R22)/2$\implies$          Ix = M(R12 + R22)/4This is the moment of inertia about axis passing through COM and in the plane of paper a)  For axis tangent to inner circle = [M(R12 + R22)/4] + [MR12]b)  For axis tangent to outer circle = [M(R12 + R22)/4] + [MR22]

8 months ago
Think You Can Provide A Better Answer ?

Other Related Questions on Mechanics

View all Questions »

Course Features

• 101 Video Lectures
• Revision Notes
• Previous Year Papers
• Mind Map
• Study Planner
• NCERT Solutions
• Discussion Forum
• Test paper with Video Solution

Course Features

• 110 Video Lectures
• Revision Notes
• Test paper with Video Solution
• Mind Map
• Study Planner
• NCERT Solutions
• Discussion Forum
• Previous Year Exam Questions


text:
Keywords = Fixed point theorem, $(p_1,p_2,ldots,p_n)$-Laplacian
Number of Articles: 1
##### 1. Positive solutions for nonlinear systems of third-order generalized sturm-liouville boundary value problems with $(p_1,p_2,ldots,p_n)$-laplacian

Volume 2, Issue 1, Winter and Spring 2013, Pages 11-21


text:
#### Archived

This topic is now archived and is closed to further replies.

# Linker errors with namespaces?

This topic is 5987 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

## Recommended Posts

Hello. I am having some desperate problems with namespaces. Lets say that I have one file, file1.h. In that file, I define something like this:

namespace A
{
int variable;

class C
{
C(int var) {}
...
};
};

File1.cpp:

...

Now I have another file, file2.cpp:

#include "file1.h"

void SomeFunc()
{
C mynewclass(A::variable);
}
This generates a linker error: file1.obj : error LNK2005: "int A::variable" (?...) already defined in file2.obj. I have inclusion guards set up and everything. What is going on? Thanks.

##### Share on other sites
Whats happening is that you've declared the variable in a header file. When this file is included in more than one source file, (remember that all the text is copied to the start of the file you include it in) the variable is declared a number of times.

You need to declare the variable in the header file as extern and then declare it once in the cpp file, ie :

      namespace A{  extern int variable;  class C  {    C(int var) {}    ...  };};

file1.cpp

         #include "file1.h"namespace A {  int variable;};

[edited by - RobTheBloke on July 24, 2002 8:06:20 AM]

##### Share on other sites
Ahhh...OK. I didn''t think that I needed to use extern because the variables were inside of a namespace.

1. 1
2. 2
Rutin
16
3. 3
4. 4
5. 5

• 26
• 11
• 9
• 9
• 11
• ### Forum Statistics

• Total Topics
633706
• Total Posts
3013465
×


text:
## Speeds for 1D spaceships

For discussion of other cellular automata.

### Speeds for 1D spaceships

c/3:
x = 4, y = 1, rule = B2cek3ai4t/S02cob2o!

c/4:
x = 4, y = 1, rule = B2cei3e4a/S01e2-c3-iyob2o!

c/7:
x = 4, y = 1, rule = B2-an4a/S1e2a3aey4at5iob2o!
c/7d:
x = 4, y = 4, rule = B2-ai3ak4q/S02k3n3bo2$bo$o!

c/8:
x = 7, y = 1, rule = B2ce3ein5iy/S1e2k3eky4ek5obo!
x = 6, y = 1, rule = B2ce3y4c5ceiry6e7c8/S12c3r4eijknw5aky6e8obob2o!
2c/8(no survival conditions!):
x = 9, y = 1, rule = B2-ei3qy4iyz5r6i/Sob2o2b3o!
x = 5, y = 1, rule = B2ci3-ckn4-intyz5knqry6ci8/S03e5a7eob3o!
3c/8:
x = 6, y = 1, rule = B2ce3cry4aejn5nr6ci7e/S01c2aek3n4-aijny5kr6en82obobo!

c/9:
x = 6, y = 1, rule = B2cei3iq4aeiw5i6i/S01e2c3aey4ew5aijn6cik83o2bo!
2c/9:
x = 4, y = 1, rule = B2ce3a4t5iy7e/S01c2ak3ejrob2o!
3c/9:
x = 4, y = 1, rule = B2acn3nry/S02iob2o!

c/10:
x = 4, y = 1, rule = B2ci3aei4w/S02i4etob2o!

2c/11:
x = 8, y = 1, rule = B2cik3-ik4ckqrt5ek6-k7c8/S01c2e3-acky4aekw5ckr6ikn7cob2obobo!

2c/29!:
x = 6, y = 1, rule = B2-ai3ceinr4aejntwz5ik6c7e/S02ek3ckobo2bo!

3c/30d:
x = 4, y = 4, rule = B2-ai3ceijy4aqw5cjk6n/S03j5q3bo2$bo$o!

5c/63(!):
x = 7, y = 1, rule = B2ein3-cy4ajknq5-enq6ci/S01c2i3k4y5er6n3obobo!
Last edited by Rhombic on August 21st, 2017, 4:53 am, edited 3 times in total.

Rhombic

Posts: 857
Joined: June 1st, 2013, 5:41 pm

### Re: Speeds for 1D spaceships

You might want to look on my posts in MDIOCA (Misc Disc. In OCA)
Smaller c/8
x = 6, y = 1, rule = B2ce3y4c5ceiry6e7c8/S12c3r4eijknw5aky6e8obob2o!

3c/8
x = 6, y = 1, rule = B2ce3cry4aejn5nr6ci7e/S01c2aek3n4-aijny5kr6en82obobo!

2c/11
x = 8, y = 1, rule = B2cik3-ik4ckqrt5ek6-k7c8/S01c2e3-acky4aekw5ckr6ikn7cob2obobo!
x = 17, y = 10, rule = B3/S23b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5bo2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo! (Check gen 2) Saka Posts: 2316 Joined: June 19th, 2015, 8:50 pm Location: In the kingdom of Sultan Hamengkubuwono X ### Re: Speeds for 1D spaceships Saka wrote:You might want to look on my posts in MDIOCA (Misc Disc. In OCA) I had already included those. Sounds like a daylight-saving time change with the time zone you might be in that has not synchronised with the forum value. I think you can edit it in settings, maybe. Last edited by Rhombic on August 20th, 2017, 8:30 am, edited 1 time in total. Rhombic Posts: 857 Joined: June 1st, 2013, 5:41 pm ### Re: Speeds for 1D spaceships Rhombic wrote:I had already included those. Wait wait how could you edit on 8:22 PM when it's still 7:24 PM? Is something wrong with the forums? Everyone, please stop posting B/S about CA x = 17, y = 10, rule = B3/S23b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5bo2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo!

(Check gen 2)

Saka

Posts: 2316
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X

### Re: Speeds for 1D spaceships

c/7
x = 6, y = 1, rule = B2cik3aj4-ajqrz5aknq6e78/S1e2ek4atw5ai2ob3o!

2c/8
x = 5, y = 1, rule = B2ci3-ckn4-intyz5knqry6ci8/S03e5a7eob3o!

2c/29!
x = 6, y = 1, rule = B2-ai3ceinr4-ciky5-jqy6ac7e8/S02ek3ckn5y7cobo2bo!

c/9
x = 6, y = 1, rule = B2-ak3-aek4aceikw5ceijr6ei7e/S012ce3aeqy4eintwy5-eqy6-an83o2bo!
x = 17, y = 10, rule = B3/S23b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5bo2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo! (Check gen 2) Saka Posts: 2316 Joined: June 19th, 2015, 8:50 pm Location: In the kingdom of Sultan Hamengkubuwono X ### Re: Speeds for 1D spaceships c/3 and c/4: x = 6, y = 8, rule = B2cek3ai4t/S02cob2o7$obob2o!

c/6:
x = 4, y = 1, rule = B2ci3aijny5y/S01c2c3-eyob2o!

c/5:
x = 4, y = 1, rule = B2ci3aijn5y/S02-ak3-eyob2o!

Smaller c/4:
x = 4, y = 1, rule = B2cei3e4a/S01e2-c3-iyob2o!
I have the best signature ever.

toroidalet

Posts: 827
Joined: August 7th, 2016, 1:48 pm
Location: Somewhere on a planet called "Earth"

### Re: Speeds for 1D spaceships

C/7:
x = 4, y = 1, rule = B2-an3kr4acr5acj6aik7e8/S1e2-ce3aey4akntz5airy6ak7e8ob2o!

C/8:
x = 4, y = 1, rule = B2-a3-acjn4-cjqwz5eknqy6c78/S1e3cnr4aikz5cqy6ackob2o!

C/9:
x = 4, y = 1, rule = B2ci3anr4-jqwyz5cnr78/S01e3eqry4acejqw5-airy6ekn2obo!

2c/8:
x = 4, y = 1, rule = B2-ai3iqry4cjknz5jnq6aik78/S01c2cin3aejr4aknyz5ceqr6ac72obo!

2c/9:
x = 4, y = 1, rule = B2ce3a4t5iy7e/S01c2ak3ejrob2o!

2c/10:
x = 4, y = 1, rule = B2ci3ain4r5i7e/S01e3ei4izob2o!

C/10:
x = 4, y = 1, rule = B2ci3aei4w/S02i4etob2o!

3c/9:
x = 4, y = 1, rule = B2acn3nry/S02iob2o!
Things to work on:
- An Isotropic version of All_Speeds
- Find more ships in B2ek3-ajny4ajqr5a/S02ack3ackny4aq5y
- Find a (3,1)c/5 ship in a Non-totalistic rule (someone please search the rules)
AforAmpere

Posts: 343
Joined: July 1st, 2016, 3:58 pm

### Re: Speeds for 1D spaceships

4c/8:
x = 7, y = 1, rule = B2ac3nr4ci5y/S0o2bob2o!
I have the best signature ever.

toroidalet

Posts: 827
Joined: August 7th, 2016, 1:48 pm
Location: Somewhere on a planet called "Earth"

### Re: Speeds for 1D spaceships

There was a thread on B026/S1 a while ago where it was found out that the rule was able to simulate a 1D rule that had spaceships.

I can't seem to find it, but here are all the spaceships discovered on that thread plus a few more that I found:
x = 616, y = 33, rule = B026/S1566bo3b3o3bo2bobo2bo3bo2b11o2bo2b3o4b2o4$41bobobobobo2b3o2bo2bo2bobobo2bo2bobo2bo2bo2bo2bobobobobo2b3o3b3o2bo2b7o2bobobobo2bo3bo3bo2bo2bo4bo3bo3b5o2bobo2bo2bobo2b3o3bo3bo2bobobo2bo2bo2bo2bobobo2bo3b3o3bo3b3o2bobo2b3o3b5o2bo2b11o3bo3bo3b7o2bobo2bo3b3o2bo2bo3bo3b5o2bo2bo2bobo2bo3bo2bo2b7o3bo3bo2bo2bo3bo2bo2bo2bo2b3o3b3o3b7o3b5o3b3o2bo2bo2bo2bo3bo3b2o3bo3b5o3b3o2bobobo2bo3bo3bo2bobobo2b3o3bo2bo2bo3b6o3bo2bo2bo4b7o3bo2bobo2b5o3b3o2bo2bo3bo2bobo2b9o2bo2bo2bobo2b3o2bobobo2b3o2bobo2b5o3bo3bo3b2o4$598bo3bo2bobo2b3o2bo4$55bobobo2bo3b5o2bo2bo3bo4b3o2bobo2b7o2bobo2bo2bobo2bo3bo2bobobo2bo3bo3bo3b3o3bo3b3o2bobo2b3o2bobobo2bo3bo3bo3b3o2bo2bo3bo3b5o2bo2bo2bo2bo2bobo2bo2bo2b5o2bo2b9o3b3o2bobo2bo2bo2bo2bobobobobobobobo2bo2bo2b13o2bobobobobobo2bo2bo2b7o2bobo2bo3bo3b3o3b3o3bo2bobo2b5o2bo2bo2bobo2b3o2bobobobo2b3o3bo3b7o2bo2bo2bo2bo2bo2b11o3bo2bo2b7o2bo2bo2bo2bo3b3o3b5o2bo2b3o2bobo2b5o2bo2bo3b3o3bo2bobo2b3o2bobobo2b3o2bo2bo2bo2bo3bo2bobo2bo3bo2bobobobo2bo3b7o2bo2bo3bo2bo2bo4$obo2b5o2bo2b3o2bo2b9o3b3o2bo2bo2bobo2b3o3b3o4b3o3bo2bobo2b3o2bo2b3o3bo3bo2bobobobobobobobobobo2bo4bo2bo2b3o3b5o3b5o2bobo2b6o2bo2b2o3bo2bobo2bo3bo3b3o2bobo2bo3b15o3bo2bobobo2b3o3b5o2bo2b3o2bobobobobobo2b3o2bo2bo2bobo2bo3bo2bo2bo2bobo2b3o2bobo2bo3bo3b6o3bo3bo3bo2b5o2bobo2bo3bo2b7o2bo2bo3b5o2bo2bo2bo2b7o2bobo2bo2bobo2bo2bobo2bo3b3o3bo2bobobobo2b3o2bobobobobo2bo2bo2b3o2bo2bo2b3o3bo2bobo2b7o2bo2bo2bobobo2b3o2bo2b3o2bo2bo3b2o3bo3b3o2bo2bo2bo2b5o3b2o3bo3b7o3b3o3bo2bobobo2bo2bo2b5o3bo2bo2bo4$181bo3bo3bo2bobobo2bo3bo3bo2bo2bo2bo2bo3b5o2bo2b2o3bo3b3o2bobo2bo2bo2b5o3bo2b3o2bobo2bo3bo2bo2bo2bo2b2o2bobo2b9o3b3o3b7o3b5o2bo2b3o2bobobo2bo3bo2bobo2b3o3bo2bo2bo2bo2b5o3bo3bo3b5o3bo3b3o2bo2bo2bo2bo3b3o3b3o2bobobo2bo2bo2bo2bobo2b5o3b5o2bobobobobo2bo2bobo2b3o3b3o3bo2bo2bo3bo2bo2b3o3b3o2bo2b5o2bo2b5o2bo2bo2bo2b3o3bo3b7o3b5o3bo3b5o2bo2bo2bobo2b2o4$544bobo2b3o3bo2bo2bo2bo2bo2bobobo2b5o3b3o2bobobobobo2bo3bo3b2o4bo4$555bo2b3o3b3o2bo2b5o2bobo2bo3bo3bo3b2o3bo3bo3b2o4bo4$579b2o2bobo2bo3b5o3bo3bo3bo3bo2bo!

From top to bottom: 2c/8, 4c/18, 2c/10, 4c/22, 2c/12, 2c/14, 2c/16, 2c/18, and 2c/24.

It takes two steps for B026/S1 to simulate one step from the 1D rule, however, so all of the corresponding ships in the 1D rule are twice as fast.
Rocknlol

Posts: 83
Joined: April 15th, 2012, 9:06 am

### Re: Speeds for 1D spaceships

How were these searched for with gfind? I tried searching B026/S1 and it said that
gfind wrote:"With B0 or B1, no such patterns exist."

Things to work on:
- An Isotropic version of All_Speeds
- Find more ships in B2ek3-ajny4ajqr5a/S02ack3ackny4aq5y
- Find a (3,1)c/5 ship in a Non-totalistic rule (someone please search the rules)
AforAmpere

Posts: 343
Joined: July 1st, 2016, 3:58 pm

### Re: Speeds for 1D spaceships

Rocknlol wrote:There was a thread on B026/S1 a while ago where it was found out that the rule was able to simulate a 1D rule that had spaceships.

I can't seem to find it, but here are all the spaceships discovered on that thread plus a few more that I found:
lots of ships.

From top to bottom: 2c/8, 4c/18, 2c/10, 4c/22, 2c/12, 2c/14, 2c/16, 2c/18, and 2c/24.

It takes two steps for B026/S1 to simulate one step from the 1D rule, however, so all of the corresponding ships in the 1D rule are twice as fast.

currently searching this on 1x256.
2c/n spaceships project

Current priorities: see here
muzik

Posts: 2651
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Speeds for 1D spaceships

2c/6:
x = 4, y = 1, rule = B2ac3cy4krtz6n7/S02ein3-cq4-qtwy5-cjqr6-ac7eob2o!
x₁=ηx
V ⃰_η=c²√(Λη)
K=(Λu²)/2
Pₐ=1−1/(∫^∞_t₀(p(t)ˡ⁽ᵗ⁾)dt)

$$x_1=\eta x$$
$$V^*_\eta=c^2\sqrt{\Lambda\eta}$$
$$K=\frac{\Lambda u^2}2$$
$$P_a=1-\frac1{\int^\infty_{t_0}p(t)^{l(t)}dt}$$

http://conwaylife.com/wiki/A_for_all

Aidan F. Pierce

A for awesome

Posts: 1506
Joined: September 13th, 2014, 5:36 pm
Location: 0x-1

### Re: Speeds for 1D spaceships

c/39d found in about 4 seconds with the new script by using 3-gen rule constraints with B2en3a/S01c2n3a6n
x = 6, y = 6, rule = B2ekn3aiknr4ijtwy5eikry6k/S01c2kn3a4jw5er6an85bo2$3bo$2bo$bo$o!

x = 9, y = 1, rule = B2cek3-ajn4cjntyz5acijy6aik7/S01e2c4ek5ac6aik7e2obo2bobo!

Rhombic

Posts: 857
Joined: June 1st, 2013, 5:41 pm

### Re: Speeds for 1D spaceships

Turns out that B026/S1 actually has another (natural) xp10:
x = 247, y = 1, rule = B026/S13ob2obobo2b4o2b3o4bo2b2o2b2ob2obo2bob4o5b2o2b4o2bob2o3bo3b2o3b2o2b2obobobobob2o3bobobo4b3ob4obo2bob2o2bo2b5o3b2obo3bo2bob3o2bobobobo3b2o3bob2o2b4obo2bobo3b2o3bobob2ob8o2b2ob9obo2b3o2b3obobobob6o!

EDIT: actually this is infinitely extensible:
x = 69, y = 15, rule = B026/S13o2bo2bo3bo2bo2bo3bo3bo3b3o3bo2bo2b5o2bobo2b5o3b7o7$26bo3b3o3bo2bo2b5o2bobo2b5o3b7o7$49bobo2b5o3b7o!
2c/n spaceships project

Current priorities: see here
muzik

Posts: 2651
Joined: January 28th, 2016, 2:47 pm
Location: Scotland

### Re: Speeds for 1D spaceships

3c/55
x = 8, y = 8, rule = B2en3-aer4cqtw5ace6-a7e/S02ce3ary4ijz5ejnq7e8o$bo$2bo$3bo$4bo2$6bo$7bo!

3c/13
x = 5, y = 1, rule = B2ei3aiq4aeir5q6ai/S12-a3ej4w3obo!

5c/17
x = 5, y = 1, rule = B2ei3-enry4anqr5knr6-ck7c8/S12-an4y5inr3obo!

4c/21
x = 5, y = 1, rule = B2ei3aij4aet6ek7c/S12-an3k4k5-cky6ikn7e3obo!

6c/21
x = 5, y = 1, rule = B2ei3acij4a5q/S12-an3eky4kqr5ain6en783obo!

4c/16
x = 5, y = 1, rule = B2ei3aij4a5kq6e/S12-an3c4cr5ainq3obo!

2c/20
x = 5, y = 1, rule = B2ein3aij4ar5q6n/S12-an3ck4jqyz5aijnr6en783obo!

4c/36
x = 5, y = 1, rule = B2ei3acijy4ae5anq6a/S12-an3j4cjqw5ijknr6ek7e3obo!

c/29
x = 5, y = 1, rule = B2ein3aijk4akt5nqr6c/S12-an3c4c5ijnr6n83obo!

2c/26
x = 5, y = 1, rule = B2ein3aijky4aez5ckq6kn/S12-an4z5ijnr6ek7c3obo!

5c/25
x = 5, y = 1, rule = B2ein3-enqr4akt5cq6n8/S12-an3e4c5-ceky6eik7c83obo!

Rhombic

Posts: 857
Joined: June 1st, 2013, 5:41 pm

### Re: Speeds for 1D spaceships

1 configuration
c/6
x = 6, y = 1, rule = B2-an3-ciny4aceqryz5aeinr6akn7c8/S02-en3acjk4eknrtwy5ein6-ko2bobo!

x = 6, y = 1, rule = B2cin3aijry4jqrt5-aknq6cin7e/S02aek3-acek4aew5-iknq6cn7e8obo2bo!

c/10
x = 6, y = 1, rule = B2-ae3aiqry4cknqrwz5einy6an7/S02ac3ejnqy4-ciqw5acey6a7eobo2bo!

c/7
x = 6, y = 1, rule = B2-ae3aiq4ceijkry5acijn6en78/S02k3ny4eik5aeq6no2bobo!
x = 17, y = 10, rule = B3/S23b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5bo2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo! (Check gen 2) Saka Posts: 2316 Joined: June 19th, 2015, 8:50 pm Location: In the kingdom of Sultan Hamengkubuwono X ### Re: Speeds for 1D spaceships c/112 found by using progRulesrc x = 8, y = 8, rule = B2en3aceiy4acir5eijk6ak7c/S2-ai3-ceky4z5ejnq6n78o$bo$2bo$3bo2$5bo$6bo$7bo! Rhombic Posts: 857 Joined: June 1st, 2013, 5:41 pm ### Re: Speeds for 1D spaceships Back on this, c/21o x = 9, y = 1, rule = B2cen3eiy4kqwz5ekr6ck7c8/S12c3-ijkr4iqrtz5-ary6cek7cobob2ob2o! Everyone, please stop posting B/S about CA x = 17, y = 10, rule = B3/S23b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5bo2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo!

(Check gen 2)

Saka

Posts: 2316
Joined: June 19th, 2015, 8:50 pm
Location: In the kingdom of Sultan Hamengkubuwono X

### Re: Speeds for 1D spaceships

4c/18o
x = 7, y = 1, rule = B2-a3inqy4ekrwy5an6aen8/S02-i3ckq4cw5-cry6aen8ob2o2bo!

3c/9o
x = 6, y = 1, rule = B2cei3acikr4aijqty5aekry6-ek7/S1e2cin3aejq4ik5cjnry7c82ob3o!

6c/67o
x = 8, y = 1, rule = B2-a3-anqy4ceiqrz5aiknq6acn7/S03i8obobob2o!
x = 17, y = 10, rule = B3/S23b2ob2obo5b2o$11b4obo$2bob3o2bo2b3o$bo3b2o4b2o$o2bo2bob2o3b4o$bob2obo5bo2b2o$2b2o4bobo2b3o$bo3b5ob2obobo$2bo5bob2o$4bob2o2bobobo! (Check gen 2) Saka Posts: 2316 Joined: June 19th, 2015, 8:50 pm Location: In the kingdom of Sultan Hamengkubuwono X ### Re: Speeds for 1D spaceships Trying to begin a search for progRulesrc, I found this entirely by accident and by hand: x = 5, y = 5, rule = B2en3aij6n/S1c2en3n4a5ao$bo$2bo2$4bo!

Actual 1D result (c/11)
x = 5, y = 5, rule = B2en3-ekqy4ejty5ajkn6ckn/S1c2cen3ckny4-enqry5-acjr6ce8o$bo$2bo2\$4bo!

Rhombic

Posts: 857
Joined: June 1st, 2013, 5:41 pm


text:
# Math Help - vectors help.

1. ## vectors help.

Given that;

$XY = \begin{pmatrix} 2\\ 4 \\ 6 \end{pmatrix}$

$ZX = \begin{pmatrix} -10 \\ -8 \\ 6 \end{pmatrix}$

find YZ.

I am not sure how to work this out, and my textbook does not show me an example, can someone please show me?

Thanks.

2. Originally Posted by Tweety
Given that;

$XY = \begin{pmatrix} 2\\ 4 \\ 6 \end{pmatrix}$

$ZX = \begin{pmatrix} -10 \\ -8 \\ 6 \end{pmatrix}$

find YZ.

I am not sure how to work this out, and my textbook does not show me an example, can someone please show me?

Thanks.
Make a drawing that shows the points X, Y, and Z. Then try to traverse that triangle from Y to Z along edges that you know how to express in terms of the given vectors:

$\vec{YZ} = \vec{YX}+\vec{XZ}=-\vec{XY}-\vec{ZX}=-\begin{pmatrix}2\\4\\6\end{pmatrix}-\begin{pmatrix}-10\\-8\\6\end{pmatrix}=\ldots$


text:
# Advanced Related Rates and the Mean Value Theorem (Part 1 of 4)

1 teachers like this lesson
Print Lesson

## Objective

SWBAT model and solve related rates problems with variable angles and involving non-right triangles.

#### Big Idea

What about related rates involving angles? Although the math involves trig, students realize that the calculus process remains the same.

25 minutes

5 minutes

27 minutes

## Closure + Homework

3 minutes

Illuminations - Proving the Law of Sines activity sheet

illuminations.nctm.org/Lesson.aspx?id=2433

Illuminations - Proving the Law of Cosines activity sheet

illuminations.nctm.org/Lesson.aspx?id=2441


text:
# Homework Help: Couple Trig Problems

1. May 5, 2005

### Jacob87411

A few trig problems that require the same thing or concept. As always I appreciate the help.

1) If Tan A=1/3 and Tan B=1/2 show that Tan(1/3 + 1/2) = 1

(Tan1/2 + Tan1/3) / 1-tan(1/2)tan(1/3)

I am a little confused with this because I cant use a calculator and am confused on what exactly to do here. I dont know Tan1/2 or Tan 1/3..I know it of pie/2 and pie/3 but its not the same?

2) Tan(7Pie/4 - 1/3)

Sort of the same thing, if I figure out what to do with the 1/3 i should be good. The 7Pie/4 = 315 = -1..so is it just Tangent of -4/3?

Thanks again for taking the time

2. May 5, 2005

### whozum

$$Tan(A+B) = \frac{\tan A + \tan B}{1-\tan(A)\tan(B)}$$

You mistook Tan(A) = 1/2 for tan(1/2) = A

Use the above equation for #2 with [itex] A =\frac{7\pi}{4} \ and \ B = (-1/3)[/tex]

3. May 5, 2005

### what

1. Are you sure it's not $$Tan(a+b)$$.
2. Combine the fraction
* Edit sorry posted before i saw whozum's


text:
# SAT II Math II : Real and Complex Numbers

## Example Questions

2 Next →

### Example Question #11 : Real And Complex Numbers

Evaluate:

Explanation:

Use the square of a sum pattern

where :

### Example Question #11 : Real And Complex Numbers

is a complex number;  denotes the complex conjugate of .

Which of the following could be the value of ?

Any of the numbers in the other four choices could be equal to .

Any of the numbers in the other four choices could be equal to .

Explanation:

The product of a complex number  and its complex conjugate  is

Setting  and  accordingly for each of the four choices, we want to find the choice for which :

For each given value of .

### Example Question #12 : Real And Complex Numbers

denotes the complex conjugate of .

If , then evaluate .

Explanation:

Applying the Power of a Product Rule:

The complex conjugate of an imaginary number  is ; the product of the two is

, so, setting  in the above pattern:

Consequently,

### Example Question #11 : Real And Complex Numbers

Let  and  be complex numbers.  and  denote their complex conjugates.

Evaluate .

Explanation:

Knowing the actual values of  and   is not necessary to solve this problem. The product of the complex conjugates of two numbers is equal to the complex conjugate of the product of the numbers; that is,

We are given that  is therefore the conjugate of , or .

### Example Question #13 : Real And Complex Numbers

denotes the complex conjugate of .

If , then evaluate .

Explanation:

By the difference of squares pattern,

If , then .

Consequently:

Therefore,

### Example Question #13 : Real And Complex Numbers

The fraction  is equivalent to which of the following?

Undefined

Explanation:

Start by multiplying the fraction by .

Since , we can then simplify the fraction:

Thus, the fraction is equivalent to .

### Example Question #14 : Real And Complex Numbers

The fraction  is equivalent to which of the following?

Explanation:

Start by multiplying both the denominator and the numerator by the conjugate of , which is .

Next, recall , and combine like terms.

Finally, simplify the fraction.

### Example Question #11 : Real And Complex Numbers

Evaluate

Explanation:

To evaluate a power of , divide the exponent by 4 and note the remainder.

The remainder is 3, so

Consequently, using the Product of Powers Rule:

### Example Question #12 : Real And Complex Numbers

Let  be a complex number.  denotes the complex conjugate of

and .

How many of the following expressions could be equal to ?

(a)

(b)

(c)

(d)

None

Three

Two

One

Four

Two

Explanation:

is a complex number, so  for some real ; also, .

Therefore,

Substituting:

Therefore, we can eliminate choices (c) and (d).

Also, the product

Setting  and substituting 10 for , we get

Therefore, either  or  - making two the correct response.

2 Next →


text:
# An apha particle is projected from infinity with the velocity Vo towards the nucleus of an atom having atomic number equal to Z then find out (i)closest distance of approach (R). (ii) what is the velocity of the alpha particle at the distance R1 (R1>R) from the nucleus

Dear student

Distance of closest approach:
When alpha particle moves towards the nucleus, its kinetic energy keeps on decreasing because kinetic energy is being consumed in doing work against the force of repulsion of the nucleus, the distance from the nucleus at which velocity of the alpha particle becomes zero,is known as the closest approach.
The distance of closest approach' d' is the distance at which kinetic energy is equal to the coulomb energy.

Here d = R
so R = $\frac{q\alpha }{4{\mathrm{\pi \epsilon }}_{\mathrm{o}}\mathrm{E}}$

Kindly post remaining queries in separate threads.
Hope this information will clear your doubts regarding the topic.
If you have any other doubts please ask here on the forum and our experts will try to solve them as soon as possible.

Regards

• -11


text:
# What is energy and work in electricity?

1. Jul 22, 2009

### user111_23

I read an article about voltage. It's says it's the energy drop (work) per unit of charge. In mechanics, work is a force applied over a distance. Energy is the amount of force you can apply over a distance.

But what about in electricity? The definition of energy in mechanics doesn't seem to *click* with electricity.

Basically, what is work and energy in the context of electrical circuits?

2. Jul 22, 2009

### Staff: Mentor

The definition of work is the same in electricity as anywhere else: f.d

The definition of energy is the same also: the capacity to do work.

3. Jul 22, 2009

### user111_23

But if electrons are doing work on a light bulb, what is really going on?

4. Jul 22, 2009

### Staff: Mentor

At an atomic level a force is applied to the electrons which gain a little KE, quickly collide with atoms in the filament, and convert the KE to thermal energy. When the filament gets hot enough it glows due to normal blackbody radiation.

5. Jul 22, 2009

### user111_23

Thanks. Finally, I read another article stating that voltage is the amount of energy stored in an imbalance of charge. Is this correct? If so, what is this energy?

6. Jul 22, 2009

### Staff: Mentor

Could you post a link to these articles, please? Because that isn't correct. Voltage is not energy, it is analogous to force.

7. Jul 22, 2009

### user111_23

8. Jul 22, 2009

### Phrak

Absolutely not; voltage multiplied by the imbalance of charge is the energy available.

9. Jul 22, 2009

### Staff: Mentor

Boy, I guess I could be wrong, but that seems an awfully cumbersome way of looking at it. I guess that makes force an energy per unit distance...

 Oh wait, that's not exactly the same as what you said in the previous post. Phrak has it...

10. Jul 23, 2009

### Phrak

It is combersome. Rather than the ususal W = E q d = V q, somehow user111_23 has been presented with things like V = W/q as a touch stone.

Last edited: Jul 23, 2009
11. Jul 23, 2009

### user111_23

So wait, if voltage (electric potential difference, that is) isn't W/q or $$\Delta$$PE/q, then what is it?

Maybe I should just stop caring about physics.

12. Jul 23, 2009

### Phrak

But it is. W = q V, and V = W/q. You've just learned about voltage in a manner that gives pause. When the rest of us hear "voltage is energy over charge", we have to take a moment to re-arrange terms to decide if it's true. That was my point, above.

And besides that, you left out a spatial displacement (where you asked about voltage = work per unit of charge) in your original question, and confused everybody from the start, as we tried to read between the lines.

Any ways, it seems you've got it now and you can continue on, without forgetting all about physics .

Last edited: Jul 23, 2009
13. Jul 23, 2009

### mikelepore

I have seen textbooks that start the chapter on electrical energy with V=W/q or something like it. For example Halliday's _Fundamentals of Physics_ begins with a picture of a battery across a resistor, the battery is labeled with a curly letter E for "emf", there's a color-highlighted box that says that the curly E is defined as the derivative dW/dQ, then there's a cartoon of a man lifting up bowling balls and putting them on a platform, where they roll down a chute, and the analogy to gravity is presented.

Last edited: Jul 23, 2009


text:
## Furthest Distance of a Point on a Circle From the Origin

Suppose we have a circle and we want to find the greatest distance of any point on the circle from the origin. This point must lie on the straight line from the origin, through the centre of the circle, to the point, which is on the opposite side of the centre of the circle from the origin.

For the circle
$(x-2)^2+(y-3)^2=5^2$
with centre
$(2,3)$
and radius 5, the furthest distance is
$\sqrt{2^2+3^2}+5=\sqrt{13}+5$
.


text:
# Backend programming¶

It has to be said that translation is complex, but the backend is truly complicated – especially when it comes to purity. You should take a cup of tea before reading this section.

The backend is the process of positioning and drawing graphical objects. This includes determining line and page breaks.

The backend relies heavily on the links between grobs created during translation.

## Grob interfaces¶

Interfaces group several grob types based on common characteristics. This is similar to how music types have music classes. All interfaces, with the grob types supporting them, are listed in the Internals Reference under Graphical Object Interfaces.

Recognition on interfaces should be preferred over recognition on name.

(grob::has-interface grob interface)

Check whether grob has interface (given as symbol).

## Properties and callbacks¶

### Understanding callbacks¶

Grobs are structured around properties. The primary functions for dealing with them are similar to those for Probs: ly:grob-property and ly:grob-set-property!. Grob types are listed in the Internals Reference with their associated properties and default values, under All layout objects.

However, grobs are not Probs. They are more feature-rich than those.

A grob property may be simply set to a sensible default. The width of a stem, for example, does usually not depend on the spacing on the page or other parameters.

By constrast, many properties are not set in advance but calculated in the backend. This holds for extents. Bar lines made with \bar ":|.|:" are substantially wider than regular bar lines. Thus, the X-extent of a BarLine grob does not have a bare number pair as a default.

There are numerous examples of properties that depend on other properties. LilyPond has no pre-conceived order for computing them – that would not be flexible enough. Instead, the approach taken is to enable any grob property to be computed on-the-fly at the moment it is read.

Any grob property may be set to callback: a function taking the grob as parameter and returning the value for the property.

Here is a simple callback example. It changes the color of a note head depending on the position of this note on the staff lines.

\layout {
\context {
\Voice
#(lambda (grob)
(case (ly:grob-property grob 'staff-position)
((-8) "red")
((-7) "blue")
((-6) "green")
((-5) "orange")
((-4) "purple")
((-3) "grey")
(else "black")))
}
}

\relative {
\time 3/4
a8 b cis b a4
b fis' b,
c8 d e d c4
d2.
}

When the NoteHead object is finally printed, or in case another callback requests its color property with ly:grob-property, the callback the property was set to is executed.

All grob properties are cached. Once the callback has run, it is never run again. Instead, the property is considered to have been resolved to the return value of the callback.

The function ly:grob-property-data returns a property of the grob without processing callbacks. It may thus return the actual value, or a callback function.

Because of this flow, it is untypical to set grob properties directly with ly:grob-set-property!. Do this with care: it can introduce dependencies in the resolution order of callbacks. If callback A reads property B, and callback C sets property B, then if A comes before C, it is too early to see the new value of B, and the property A is cached, calculated from the wrong value of B. This is why writing callbacks for every property that should vary is preferable over using a single callback to set various properties.

Many callbacks are associated to interfaces. This is reflected in their name, for example: ly:side-position-interface::y-aligned-side. Callbacks specific to one grob type are rather prefixed with that type, e.g., ly:note-head::calc-stem-attachment.

### Important properties¶

The stencil property holds the object’s inking – see Stencils for details.

The X-offset and Y-offset properties control the placement of an object relative to its parents.

X-extent and Y-extent represent the span of the object on each axis, relative to itself.

The style property is supported by many stencil callbacks. It is a symbol, controlling how a grob is displayed.

### The grob-transformer¶

Using the grob-transformer function, a callback can be added “on top” of the preexisting value or callback of a property. Its signature is (grob-transformer property transformer), where property is the property to take the original value from, and transformer is a procedure taking two arguments, the grob and the original value.

sharpenBeams =
\override Beam.positions =
#(grob-transformer 'positions
(lambda (grob original)
(let ((left-Y (car original))
(right-Y (cdr original)))
(cons
(+ left-Y (* 2.0 (- left-Y right-Y)))
(+ right-Y (* 2.0 (- right-Y left-Y)))))))

\relative {
c'8[ d] e[ c] c[ g'] c'[ c,]
\sharpenBeams
c,8[ d] e[ c] c[ g'] c'[ c,]
}

### Grob pointers¶

There is a second kind of properties for grobs, using the accessor ly:grob-object instead of ly:grob-property. These “object properties” (not to be confused with Guile’s own concept of “object properties”) serve to store all links between grobs. For example, NoteHead grobs have a stem internal property, which contains a Stem grob. Conversely, Stem grobs contain a note-heads array of NoteHead grobs belonging to them, and uses the grobs from this array in order to compute its length. These links are put in place by engravers, using ly:grob-set-object!.

As explained in Broken grobs, the line breaking process includes breaking numerous grobs into pieces for the individual systems. After this is done, the grobs from each system need to be made independent from the other systems. This is the reason for having a separate area of properties for storing grobs and grob arrays. The process of making the systems independent is called break substitution. Concretely, if you access an object’s staff-symbol after line breaking, you will get a staff symbol spanning just the system, whereas if you do it before line breaking, you get a long staff symbol spanning the whole piece, which is to be broken into pieces after line breaking.

In the Internals Reference, such “object properties” are in the Internal backend properties section. This does also contain properties of the regular kind, however.

(ly:grob-object grob property [default])
(ly:grob-set-object! grob property value)

Return or set the value of pointer named property (a symbol) in grob.

ly:grob-object falls back to default if the pointer does not exist, or the empty list if *default is not specified. The default parameter was added in version 2.23.4.

Grob pointers never have defaults. This is why, in the Internals manual, they can only appear in interfaces, not on a grob’s page.

Many of these object properties hold arrays of grobs. For technical reasons on the C++ side, these are not implemented with Guile arrays of grobs, but using a dedicated grob array type. Even though Scheme interfaces to some operations on grob arrays exist, first converting the array to a list and eventually converting back to an array is preferable in a majority of cases, to suit the nature of the Scheme language. (The difference between an array and a list in computer science can be read about in numerous web articles.)

(ly:grob-array-length grob-array)

Return the length of a grob array.

(ly:grob-array-ref grob-array index)

Retrieve the element located at index (starting from 0) in grob-array.

(ly:grob-array->list grob-array)

Turn grob-array into a Scheme list.

(ly:grob-list->grob-array lst)

Convert the Scheme list of grobs lst into a grob array. Available since version 2.23.4.

## The causation chain¶

The cause property of a grob holds an event, or another grob, or the empty list, as set by the engraver with ly:engraver-make-grob.

(event-cause grob)

Find the cause of grob in stream events.

If the cause of grob is an event, it is returned. If the cause is a grob, its own cause is retrieved, or the cause of its cause, etc., until an event is found.

## Grob suicide¶

As seen in Killing grobs, engravers occasionally need to remove an already created grob. This need can also arise in callbacks. Here are a few examples:

• When the last note of a hairpin is on the beginning of a system, removing the part of the hairpin on that system (see also Dummy properties),

• Removing system start delimiters when they are smaller than their collapse-height threshold,

• In general, removing a grob if you detect an abnormal condition (after having issued a programming error) because you can’t do anything useful.

In all of these cases, you would use ly:grob-suicide! on the grob in some callback.

## Grob flavors and line breaks¶

### Items and spanners¶

Grobs come in several fashions. They are distinguished by the role they play in spacing, and how they are broken. In C++, this is reflected by two main subclasses of Grob.

Items are horizontally located on one column, like note heads, stems or bar lines. Some items are breakable, for example, clefs. When the system is broken on their column, they are duplicated.

Spanners extend horizontally between two locations in the score. They have no single parent on the X axis, but two bounds. They include beams, hairpins, slurs. When they are broken, they are split in several versions, one for every system where they have a part.

The item-interface and the spanner-interface characterize the type of a grob.

### Paper columns¶

Columns form a subtype of items. They are abstract, invisible grobs. They group several objects on the same horizontal position. Columns are subdivided into musical and non-musical columns (PaperColumn and NonMusicalPaperColumn). The musical ones hold musical items, like note columns, dot columns, etc. Non-musical columns are used for non-musical items such as clefs and time signatures. Only non-musical columns can be broken.

### Spanner bounds¶

The bounds of a spanner are two items.

(ly:spanner-bound spanner direction)
(ly:spanner-set-bound! spanner direction item)

Retrieve or set the bound of spanner in direction (LEFT or RIGHT).

### Broken grobs¶

The functions dealing with broken pieces depend on the type of grob (item or spanner). A breakable item is broken into three pieces before line breaking. They are characterized by a break status direction, which is LEFT at end of line, CENTER in the middle of a line and RIGHT at the beginning of a line. One can imagine the original item on the center of the breakable column and two siblings, one at the left and one at the right, which replace the original at the end of a system and the beginning of the next system in case the column is the place of a line break. Spanners are broken into as many pieces as needed to have one piece per system crossed by the range of columns. Each piece has its bounds adjusted: a line break in the middle of a spanner causes the bounds of the two broken pieces to become the NonMusicalPaperColumn grob the break was made onto. Because there are many possible configurations, breaking spanners is only done after line breaking.

(ly:grob-original grob)

Return the unbroken original version of grob. For an item, this is the corresponding sibling whose break status direction is CENTER. For a spanner, it is the unbroken spanner common to all broken pieces.

(ly:item-break-dir item)

Return the break status direction of this item.

(ly:spanner-broken-into spanner)

Return the list of all children of this spanner, if it is broken. To get the siblings of a broken spanner, call this function on the original.

Note that for items, there is no direct way to get the siblings.

## Spacing topics¶

### Directions and axes¶

Some functions expect an axis. By convention, 0 denotes the X axis, and 1 the Y axis. For code understandability, the global constants X and Y are defined as 0 and 1, respectively.

Many properties can be up or down, left or right, sometimes center. Directions are to be understood as axis-agnostic directions. They have only three possible values: -1, 0, and 1.

• -1: left, down, begin;

• 0: center;

• 1: right, up, end;

The type predicate ly:dir? checks that its argument is one of these three values.

The constants for directions are LEFT, RIGHT, DOWN, UP and CENTER.

Many properties that are primarily intended as directions are not restricted to these three values, but interpolate when they receive intermediary values. This is the case of self-alignment-X for example.

### Intervals¶

An interval is any kind of numeric span. Grob extents, for example, are intervals. In Scheme, an interval is a pair of numbers.

The empty interval is defined as (+inf.0 . -inf.0), and available under the convenient name empty-interval. This is not equivalent to a single-point interval like (0 . 0)!

The following helpers analyze intervals:

(interval-start interval)
(interval-end interval)

Human-friendly aliases for car and cdr.

(interval-bound interval direction)

Either the left or right bound of interval, depending on direction.

(interval-empty? interval)

True if interval is empty. The empty interval and the interval (1 . -1) are both empty in the sense of this function.

(interval-length interval)

The length that this interval spans.

(interval-center interval)

The middle of this interval.

(interval-index interval position)

Interpolate between the left and right bound of interval, according to position: -1 for the left bound, 1 for the right bound, 0 for the center, and any number for intermediate values.

(interval-sane? interval)

Test if this interval contains no infinities or NaNs, and has bounds in the right order.

The following helpers construct new intervals:

(interval-scale interval factor)

Scale interval by factor on both sides.

(interval-widen interval amount)

(interval-union interval1 interval2)

Unite two intervals.

(interval-intersection interval1 interval2)

The part common to these intervals.

(reverse-interval interval)

Invert the bounds of interval.

Enlarge interval as necessary on one side to include point.

(symmetric-interval x)

The interval from -x to x.

(ordered-cons a b)

An interval with bounds a and b. The smallest one is the left bound.

### Coordinates, extents and reference points¶

The X-offset and Y-offset properties of any grob hold its two coordinates relative to its parent on each axis. X-extent and Y-extent are its extents relative to itself.

Because all coordinates are relative, the offset between any two grobs is not directly accessible through their basic coordinates. This is why functions exist to search common parents and compute coordinates relative to these parents.

(ly:grob-common-refpoint grob1 grob2 axis)

Search and return a common reference point for grob1 and grob2 on axis (empty list if not found).

A common reference point is a grob that is a direct or indirect parent of both grobs.

(ly:grob-relative-coordinate grob refpoint axis)
(ly:grob-extent grob refpoint axis)

Compute the coordinate or extent of grob along axis relative to refpoint, which must be a direct or indirect parent of grob along axis.

In general, care must be taken with coordinates on the Y axis. They are computed fairly lately, and retrieving them without caution can lead to cyclic dependencies. The delicate topic of Y positioning is tackled in the section about unpure-pure containers.

Conversely, things are simple on the X axis, where it is almost always safe to ask for the extent of an item, or the extent of a spanner after line breaking (but most spanners naturally can’t compute their X extent before line breaking).

### Units¶

The two main parameters related to the font size are the staff space and the line thickness. Many distances are expressed in staff space so they can have unified numeric defaults for all staff sizes. All thicknesses are expressed as multiples of the line thickness. Both staff space and line thickness are properties of the StaffSymbol. The idea is that you can tweak them independently.

The staff symbol a grob resides on (when this makes sense) is found in its staff-symbol pointer.

(ly:staff-symbol-staff-space staff-symbol)
(ly:staff-symbol-line-thickness staff-symbol)

These give the units you should scale by when manipulating properties of a grob that are expressed in staff-space or in line-thickness. These functions access the staff symbol, and retrieve its staff-space or line-thickness property, then multiply by the value found in the output definition.

## Drawing objects¶

Stencils are inkings of objects. Markups are pieces of code ready to be turned into stencils.

### Stencils¶

The stencil of every object is determined by its stencil property. Internally, the representation of stencils is close to what is output as vector commands in PostScript or SVG.

There are two special stencils: empty-stencil and point-stencil. The former is, as its name suggests, completely empty. Its extents are equal to empty-interval. It does typically not trigger additional spacing. By contrast, point-stencil is a stencil with extents reduced to the single-point interval (0.0 . 0.0).

empty-stencil and point-stencil have different use cases. The empty stencil is the only way to suppress any space taken by a stencil in alignment. This is often desirable, but not always. For instance, ties on omitted NoteHead objects do not work (and lead to a crash, issue 6040).

{
e'1~ e'1
}

Instead of #f (which \omit sets the stencil to under the hood, equivalently to empty-stencil), the head should have point-stencil in order to provide an attachment point for the tie.

{
e'1~ e'1
}

There are many functions related to stencils, mostly for use in stencil callbacks. The C++-defined ones are documented in the Internals Reference under Scheme functions (all functions named ly:stencil-...). The most important ones follow.

Combine any number of stencils.

(ly:stencil-translate-axis stencil amount axis)

A copy of stencil, translated by amount on axis.

(ly:stencil-extent stencil axis)

The dimensions of stencil on axis.

(ly:stencil-aligned-to stencil axis side)

Translate stencil on axis to align it on side using its own extents.

For example, when axis is X and side is LEFT, for a stencil having X extent '(-2 . 3), this yields a stencil having X extent (0 . 5).

side is not necessarily -1 or 1. Interpolation is performed, so 0 centers the stencil for example.

(ly:stencil-outline stencil outline)

Return stencil with dimensions and outline from outline.

The dimensions are used in many grob extents. The outline is used for skylines in the process of collision avoidance. The main vertical skylines can be viewed by switching an option:

#(ly:set-option 'debug-skylines)

{ c'^"Hi!" }

Since 2.23.6, you can also \override the show-horizontal-skylines and show-vertical-skylines of an object to visualize specific skylines 1.

{
\override Score.PaperColumn.show-horizontal-skylines = ##t
c'^"Hi"
}

(make-line-stencil width start-X start-Y end-X end-Y)

Draw a line between the points (start-X, start-Y) and (end-X, end-Y) with given width.

(make-filled-box-stencil X-extent Y-extent)

Make a filled box with the specified extents.

Make a circle with radius and thickness, optionally filled.

There are many more functions to draw various kinds of stencils. They are coded in the source file scm/stencil.scm.

### Markups¶

Markups are commonly constructed by hand with the dedicated \markup syntax:

\markup \bold \center-column { Arranged by }

They may also be built in Scheme using the markup macro.

\markup #(markup #:bold #:center-column ("Arranged" "by"))

Markup commands are implemented as procedures. Every something command corresponds to make-something-markup. Thus, a third way to write the example above is

\markup #(make-bold-markup (make-center-column-markup '("Arranged" "by")))

The type predicate for markups is markup?. It also returns true on strings, which are one of the simplest forms markups can take.

The \stencil markup function makes a constant stencil markup.

\markup \stencil #(make-oval-stencil 4 3 0.1 #t)

The empty-markup always evaluates to the empty-stencil. There is no point-markup: use "" (empty string) or (make-null-markup).

A markup is not a stencil. It is the code for a stencil. The operation of turning the markup into stencil is called interpreting the markup. This requires two ingredients:

• an output definition (\layout block),

• properties.

The interpret-markup function takes layout, properties, and markup,

New markup commands may be defined with the define-markup-command macro. This is similar to defining music functions, except that the name of the function is included just before the arguments (no LilyPond assignment), and two extra parameters are passed, layout and props. Markup functions must return stencils.

#(define-markup-command (strong-emphasis layout props arg) (markup?)
(interpret-markup layout props
(make-bold-markup
(make-italic-markup
(make-underline-markup
arg)))))

\markup \strong-emphasis "Very important!"

The #:properties keyword is a convenient way to retrieve properties from the props argument. A good example is found in the official documentation:

#(define-markup-command (double-box layout props text) (markup?)
"Draw a double box around text."
(interpret-markup layout props
#:override (box-padding . ,box-padding) #:box text)))

\markup \override #'(inter-box-padding . 0.2) \double-box "Erik Satie"

The grob-interpret-markup function takes a grob and a markup. It interprets the markup using layout and properties from the grob. This is where the notion of markups as code makes sense. The same markup, interpreted by two different grobs, can produce stencils varying in appearance. This is the reason why this works:

{
\override TextScript.thickness = 10
c'^\markup \draw-line #'(10 . 10)
}

This might seem surprising, since TextScript has no interface for the thickness property. Yet, its properties are used during markup interpretation, and the \draw-line markup command does read thickness.

Here is an example using grob-interpret-markup from a stencil callback to print a time signature with a slash:

#(define (slashed-time-signature-stencil grob)
(let* ((fraction (ly:grob-property grob 'fraction))
(num (number->string (car fraction)))
(den (number->string (cdr fraction))))
(ly:stencil-aligned-to
(grob-interpret-markup grob
(markup num "/" den))
Y
CENTER)))

\layout {
\context {
\Staff
\override TimeSignature.stencil = #slashed-time-signature-stencil
}
}

{ c'1 }

Interpreting a certain markup is frequent for stencil callbacks. The predefined function ly:text-interface::print interprets the markup in the text property of an object. Many grobs use it as stencil callback. It is a practical way to change the drawing of a grob to any markup.

{
\tweak stencil #ly:text-interface::print
\tweak text \markup \circle G
\tweak thickness 2
g'1
}

In the above example, note in particular how the tweak for thickness affects the note head, even though NoteHead objects are not supposed a priori to respond to the thickness property as per the Internals Reference.

## Dummy properties¶

A few properties have no interesting value. They are only used to trigger a callback at a specific point of the positioning. They are only meaningfully set to a callback with side effects. These are:

• before-line-breaking and after-line-breaking, computed at the moment their respective names suggest. A frequent callback for after-line-breaking is ly:spanner::kill-zero-spanned-time, which removes, for example, a hairpin, when it is a broken part that does not extend farther than one note.

{
\override Hairpin.to-barline = ##f
c'1\< \break c'1\! \break
\once \override Hairpin.after-line-breaking = #'()
c'1\< \break c'1\!
}

• positioning-done is called to space certain objects. For instance, ly:stem::calc-positioning-done shifts certain note heads when a chord has seconds in order to avoid collisions. Every note head calls its stem’s positioning-done at some point. Since grob properties are cached, this ensures that the positioning is only done once.

• springs-and-rods is triggered just after before-line-breaking. Its purpose is to add spacing springs (flexible distances) and rods (minimum distances) to columns, setting up the horizontal spacing problem.

## Unpure-pure containers¶

XXX to be rewritten when I have done my wholesale restructuring of purity.

Please write me if you find errors in this section – I am not a specialist of this topic and it is tricky. This reflects my current understanding of pure/unpure.

### The problem¶

Unpure-pure containers are meant to address a thorny issue. Observe this input, with kneed beams between staves:

<<
\new Staff = "up" \relative c'' {
a8 g f e d c \change Staff = "down" b a
\change Staff = "up" c' b a g c c \change Staff = "down" c,, c
}
\new Staff = "down" {
\clef bass
s1
s1
}
>>

To determine how many systems can be placed on the page, the page breaker would like to know how tall the system is. This depends on whether the beams are kneed or not – if they are, more space should be allocated for the beam.

On the other hand, the page breaker may go for a tightly packed configuration, perhaps because a small number of systems was requested by the user through systems-per-page. In this case, beams should rather not be kneed, because kneed beams take up more space.

Similar trouble is run into with text scripts.

filler = \relative c' { c8 e g c g c g e }

\relative c' {
\repeat unfold 4 \filler
c4^\markup "Crescendo poco a poco" d e f
\mark "Tempo primo"
g^"Rallentando ma non troppo" f e d
\repeat unfold 20 \filler
}

In this example, observe how the musical indications avoid each other on the second system, which is tall.

The page breaker could have chosen this configuration instead:

filler = \relative c' { c8 e g c g c g e }

\relative c' {
\repeat unfold 4 \filler
c4^\markup "Crescendo poco a poco" d e f
\break
\mark "Tempo primo"
g^"Rallentando ma non troppo" f e d
\repeat unfold 20 \filler
}

Because the break separates the two measures with colliding text scripts, the second system is now smaller, while the first system got slightly taller. This may in turn influence page breaking decisions: a page break could be inserted between the first and the second system (assuming more music before) to space pages more evenly.

Both of these examples show how a cyclic dependency can occur between calculating the spacing inside a system and choosing breaks.

Page and line breaking rely on scoring different configurations, attributing them penalties on criteria such as cramped spacing. It is infeasible, however, to score all possible configurations – that would make the compilation gigantically slower. Other classic constraint optimization techniques are not workable, either. There simply are too many parameters to take into account.

This is why LilyPond has heuristic algorithms instead. The goal of pure properties is to provide estimates of certain spacing parameters before line breaking in order to help the breaking algorithms make informed decisions. Afterwards, when one configuration is finally settled on, the properties are computed for real.

The art of writing pure callbacks is to make the best estimates possible while ensuring no cyclic dependencies, including corner cases. This is very difficult.

It has to be noted that purity is concerned with all Y axis positioning. There is no concept of pure X-offset or X-extent because, by design, positioning constraints on the X axis are determined in advance (springs and rods). The operation of page breakers is to try a spacing that seems sensible on the X axis and see how it looks like on the Y axis using pure properties.

### Writing an unpure-pure container¶

To begin with, an unpure-pure container is only needed if the callback needs different code paths for pure and unpure positioning. For instance, many stencil callbacks do not depend on line breaking, such as the one for NoteHead. Consequently, there is no unpure-pure container involved even though the callback is triggered before line breaking. When this differentiation is required, the callback is replaced with an unpure-pure container containing two callbacks.

(ly:make-unpure-pure-container unpure-function pure-function)

Construct an unpure-pure container.

unpure-function is a regular callback.

pure-function takes three arguments: the grob, a start column, and an end column. It is meant to estimate the property for a potential broken part of the grob between start and end. For items, these parameters are mandatory, but they are not meaningful: an item should only check that it is between these columns. A spanner should try to make use of the start and end parameters for better estimates.

In a more advanced form, unpure-function can take n + 1 arguments, the grob and other arguments. In this case, pure-function takes n + 3 arguments, the grob, start and end column, and the other arguments. The property can then be read using ly:unpure-call or ly:pure-call, passing these arguments. They may be used for estimates as well.

(ly:unpure-pure-container-unpure-part container)
(ly:unpure-pure-container-pure-part container)

Extract either part of container.

(ly:unpure-call data grob . rest)
(ly:pure-call data grob start end . rest)

Call a procedure with arguments. If the data is an unpure-pure container, extract its unpure or pure part to get the procedure. If data is already a procedure, use it directly.

### The purity contract¶

Pure functions must not have side-effects. They must avoid calls to the following functions or their C++ equivalents:

• ly:grob-set-property!,

• ly:grob-set-object!,

• ly:grob-suicide!.

This means that they should not only avoid using these functions, but also calling other functions that use them.

### TODOs¶

• Totally unclear in what situation the extra arguments to pure and unpure callbacks may be used.

It is not obvious that they are actually used somewhere, either.

• What the hell happens for Y-extents and skylines when no callback is given?

• What is the point of the purity contract? Caching?

• Why should pure callbacks for items return 0 when the item does not fall in the start-end range if pure properties for items are cached?

• Investigate caching.

• For pure-by-design functions like NoteHead.stencil, extra-spacing-height, X-extent et al, is there a purity contract?

• Find meaningful example of pure functions written in Scheme.

The given example actually requires 2.23.8 because it uses \override. Previously, you needed \overrideProperty for an override to a paper column to have immediate effect.


text:
# series rc circuit

I have a system of a series RC circuit. The input is DC source power, The output signal is the voltage on the capacitor. My question Is this system is a closed loop or open loop? What is the control block diagram that represent this system?

Well thinking of a circuit as feedback ruled or not is just a matter of "How would you like to see it".

For sure most of us will note use feedback theory to analize that circuit but none the less it can be done and I believe it is also quite educative.

First start from equations governing the circuit.

simulate this circuit – Schematic created using CircuitLab

First you can write capacitor CV law $$v_\text{out}=\frac{1}{C}\int i\,\text{d}t$$

and then one simple Ohm's law

$$i=\frac{1}{R}\left(v_\text{in}-v_\text{out}\right)$$

which combined give us

$$v_\text{out}=\frac{1}{RC}\int \left(v_\text{in}-v_\text{out}\right)\,\text{d}t$$

This is plain sailing and nothing new nor exciting but this relation can be read to introduce feed back in the analisys.

$$v_\text{out}=\underbrace{\frac{1}{RC}\int }_\text{forward gain} \; \underbrace{\left(v_\text{in}-\underbrace{v_\text{out}}_\text{unit feedback}\right)}_\text{summing node}\,\text{d}t$$

So we have:

• $\left(v_\text{in}-v_\text{out}\right)$ Vin voltage is compared against feedback in summing node, i.e we have a voltage feedback series compared.
• We also note that Vout has unity coeffcient, i.e. $\beta=1$ unit feedback
• Finally we have type 1 forward chain $v_\text{out}=\frac{1}{RC}\int [\cdot]\text{d}t$ or in Lapalce's domain $A=1/sRC$

in a simple diagram

simulate this circuit

In Laplace's domain you can easily calculate closed loop gain

$$\frac{V_\text{out}}{V_\text{in}}=\frac{A}{1+\beta A}=\frac{1/sRC}{1+1/sRC}= \frac{1}{1+sRC}$$

as expected from "classic" circuit theory


text:
Source code for weylchamber.cartan_decomposition

import numpy as np
import qutip
from qutip import Qobj

from .coordinates import to_magic, from_magic, c1c2c3, canonical_gate
from ._types import Gate, Tuple

__all__ = ['cartan_decomposition']

[docs]def cartan_decomposition(U: Gate) -> Tuple[Qobj, Qobj, Qobj]: r"""Calculate the Cartan Decomposition of the given U in U(4) .. math:: \Op{U} = \Op{k}_1 \Op{A} \Op{k}_2 up to a global phase factor $(\det \Op{U})^{\frac{1}{4}}$. Args: U: Two-qubit quantum gate. Must be unitary. Returns: tuple $(\Op{k}_1, \Op{A}, \Op{k}_2)$ where $\Op{k}_1$ is the left local operations in SU(2) x SU(2), $\Op{A}$ is non-local operations, in SU(4), and $\Op{k}_2$ is the right local operations in SU(2) x SU(2). Notes: If you are working with a logical subspace, you should unitarize U before calculating the Cartan decomposition References: * D. Reich. Optimising the nonlocal content of a two-qubit gate. Diploma Thesis. FU Berlin, 2010. Appendix E * Zhang et al. PRA 67, 042313 (2003) """ if isinstance(U, qutip.Qobj): U = U.full() U = np.array(U) # in U(4) Utilde = U / np.linalg.det(U)**0.25 # U in SU(4) found_branch = False # The fourth root has four branches; the correct solution could be in # any one of them for branch in range(4): UB = to_magic(Utilde).full() # in Bell basis m = UB.T @ UB # The F-matrix can be calculated according to Eq (21) in PRA 67, 042313 # It is a diagonal matrix containing the squares of the eigenvalues of # m c1, c2, c3 = c1c2c3(Utilde) F1 = np.exp(np.pi * 0.5j * (+c1 - c2 + c3)) F2 = np.exp(np.pi * 0.5j * (+c1 + c2 - c3)) F3 = np.exp(np.pi * 0.5j * (-c1 - c2 - c3)) F4 = np.exp(np.pi * 0.5j * (-c1 + c2 + c3)) Fd = np.array([F1, F2, F3, F4]) F = np.array(np.diag(Fd)) # Furthermore, we have Eq (22), giving the eigen-decomposition of the # matrix m. This gives us the matrix O_2.T of the eigenvectors of m Fsq, O_2_transposed = np.linalg.eig(m) ord1 = np.argsort(np.angle(Fd**2)) # sort according to complex phase ord2 = np.argsort(np.angle(Fsq)) # ... (absolute value is 1) diff = np.sum(np.abs((Fd**2)[ord1] - Fsq[ord2])) # Do Fd**2 and Fsq contain the same values (irrespective of order)? if diff < 1.0e-12: found_branch = True break else: Utilde *= 1.0j # double check that we managed to find a branch (just to be 100% safe) assert(found_branch), \ "Couldn't find correct branch of fourth root in mapping U(4) -> SU(4)" # Getting the entries of F from Eq (21) instead of by taking the square # root of Fsq has the benefit that we don't have to worry about whether we # need to take the positive or negative root. # However, we do need to make sure that the eigenstates are ordered to # correspond to F1, F2, F3, F4 # After reordering, we need to transpose to get O_2 itself reordered = np.array(np.zeros((4, 4)), dtype=np.complex128) order = [] for i in range(4): for j in range(4): if (abs(Fd[i]**2 - Fsq[j]) < 1.0e-12): if j not in order: order.append(j) assert len(order) == 4, "Couldn't order O_2" # should not happen # Reorder using the order we just figured out, and transpose for i in range(4): reordered[:, i] = O_2_transposed[:, order[i]] O_2 = reordered.transpose() # Now that we have O_2 and F, completing the Cartan decomposition is # straightforward, following along Appendix E of Daniel's thesis k2 = from_magic(O_2) O_1 = UB @ O_2.transpose() @ F.conjugate().transpose() k1 = from_magic(O_1) A = canonical_gate(c1, c2, c3) # Check our results assert(np.max(np.abs(O_1 @ O_1.transpose() - np.identity(4))) < 1.0e-12), \ "O_1 not orthogonal" assert(np.max(np.abs(O_2 @ O_2.transpose() - np.identity(4))) < 1.0e-12), \ "O_2 not orthogonal" err = (k1 * A * k2 - qutip.Qobj(Utilde, dims=[[2, 2], [2, 2]])).norm() assert(err < 1e-12), "Cartan Decomposition Failed" return k1, A, k2


text:
Inner regular measure

In mathematics, an inner regular measure is one for which the measure of a set can be approximated from within by compact subsets.

Definition

Let (X, T) be a Hausdorff topological space and let Σ be a σ-algebra on X that contains the topology T (so that every open set is a measurable set, and Σ is at least as fine as the Borel σ-algebra on X). Then a measure μ on the measurable space (X, Σ) is called inner regular if, for every set A in Σ,

$\mu (A) = \sup \{ \mu (K) \mid \text{compact } K \subseteq A \}.$

This property is sometimes referred to in words as "approximation from within by compact sets."

Some authors[1][2] use the term tight as a synonym for inner regular. This use of the term is closely related to tightness of a family of measures, since a measure μ is inner regular if and only if, for all ε > 0, there is some compact subset K of X such that μ(X \ K) < ε. This is precisely the condition that the singleton collection of measures {μ} is tight.

Examples

When the real line R is given its usual Euclidean topology,

However, if the topology on R is changed, then these measures can fail to be inner regular. For example, if R is given the lower limit topology (which generates the same σ-algebra as the Euclidean topology), then both of the above measures fail to be inner regular, because compact sets in that topology are necessarily countable, and hence of measure zero.

References

1. ^ Ambrosio, L., Gigli, N. & Savaré, G. (2005). Gradient Flows in Metric Spaces and in the Space of Probability Measures. Basel: ETH Zürich, Birkhäuser Verlag. ISBN 3-7643-2428-7.
2. ^ Parthasarathy, K. R. (2005). Probability measures on metric spaces. AMS Chelsea Publishing, Providence, RI. xii+276. ISBN 0-8218-3889-X. MR 2169627


text:
# Fiji Inc., a developer of radiology equipment, has stock outstanding as follows: 25,000 shares of...

Fiji Inc., a developer of radiology equipment, has stock outstanding as follows: 25,000 shares   of

1% cumulative preferred stock of $100 par, and 250,000 shares of$50 par common. During its

first five years of operations, the following amounts were distributed as dividends: first year,

none; second year, $40,000; third year,$80,000; fourth year, $120,000; fifth year,$140,000. Calculate the dividends per share on each class of stock for each of the five years.

Preferred stock is paid a dividend prior to any distribution to common stockholders. Preferred stock is frequently cumulative; if the annual dividend requirement cannot be satisfied, it will become a dividend in arrears, and all dividends in arrears must be paid before any dividends can be paid to common shareholders (in contrast to "noncumulative" where a missed dividend is not required to be made up in the future). Cumulative preferred stock dividends per share: Y1 : $0 (dividends in arrears$1 each) Y2 : $1.60 (dividends in arrears$0.40 each. Since they're cumulative, you must make good last yr's missed dividends of $1 and you're short$0.40 for this yr, since you can afford to pay only $40,000) Y3 :$1.40 ($1 for current yr and making good shortfall of$0.40 for Y2) Y4 : $1 Y5 :$1 Common stock dividends per share: Y1 : $0 Y2 :$0 (all $40k were for preferred stock, hence none for common stockholders) Y3 :$0.18 ($80k less$35k = $45,000 divided by 250,000 common shares. The$35k were paid to preferred stockholders i.e. $1.40 x 25,000, see above) Y4 :$0.38 ($120,000 less paid to preferred stockholders$25,000 divided by...


text:
Integral of product spaces

1. Dec 2, 2012

happysauce

1. The problem statement, all variables and given/known data

I just have a question about the integral of a product space. How do I define the integral of product spaces in terms of characteristic functions?

What I mean by that is, if I have a measure space, (X,M,u) and f(x) is a positive, simple, measurable function. Then ∫f du = Ʃa$_{i}$u(E$_{i}$). What I want to know is how can I apply this to a simple function given the product space of (X,M,u) and (Y,N,v)?

The problem I have to do is to prove that ∫f(x)g(y)d(u×v)=(∫f(x)du)(∫g(y)dv), you can't use fubini's theorem since the problem doesn't assume the measure spaces are sigma finite and the hint suggested using standard limit theorems for integrals, which made me think I probably had to use simple functions...

2. Dec 2, 2012

gopher_p

The same as any other measure space.

The same as any other measure space.

This sounds like a good strategy. But you probably want to restrict yourself to simple functions of the form $f(x)=\sum a_i\chi_{E_i}(x)$ where the $E_i$ are "rectangles" in the product space. Can you decompose the characteristic function of a rectangular region into a product of characteristic functions on the "component" spaces?

3. Dec 3, 2012

happysauce

That's what I tried. I took the product of the integrals and expressed them as a product of two sums [$\sum$a$_{i}$u(E$_{i}$) ][$\sum$b$_{j}$v(E$_{j}$)], one summed n parts the other summed m parts. Then I noticed that the product created a sum of n×m rectangles and I was able to express it in terms of one sum.

4. Dec 3, 2012

micromass

Staff Emeritus
OK, so you proved the theorem for the special case simple functions, where for every $\chi_{E_j}$ holds that $E_j$ is a rectangle. What did you do next?


text:
Equality constraints in mixed-integer optimization

Suppose I have a linear mixed-integer optimization problem of the form

$$MIP: min_{(x,y) \in \mathbb{R}^n \times \mathbb{Z}^m} c^\top x + d^\top y \hspace{0.2cm} \text{s.t.} \hspace{0.1cm} Ax+By \leq b, Cx+Dy =\gamma,$$ with $c\in \mathbb{R}^n$, $d \in \mathbb{R}^m$, $b \in \mathbb{R}^p$, $\gamma \in \mathbb{R}^q$, some $(p,n)$-matrix $A$, $(p,m)$-matrix $B$, $(q,n)$-matrix $C$ and $(q,m)$-matrix $D$.

Would a typical solver like GUROBI/ CPLEX apply some branch-and-cut alrorithm to solve this problem, or is there some "special treatment" for the equality constraints $Cx+Dy =\gamma$? In the literature, I can hardly find equality constraints in the problem formulation of $MIP$. Can someone tell me the reason for this?

I don't think there is any reason to use a special treatment for those kind of constraints. Any MIP solver can work perfectly fine with both inequality and equality constraints. There is no need to put equality constraints explicitly in text books, since you can replace them by two inequality constraints: $Cx+Dy\leq \gamma$ and $-Cx-Dy\leq -\gamma$.