text:
# Everything I Know About Exponents

1. Represent repeated multiplication with exponent

If you had a question that asked you what is equal to $3\cdot3\cdot3\cdot3$ that’s just a more difficult way of saying $3^4$. its a form of $Exponents$.

${x}\cdot{x}\cdot{x}\cdot{x}\cdot{x}$ = $x^5$
2.Describe how powers explain multiplication
Exponents are a faster form of repeated multiplication, just as multiplication is a faster form of repeated addition, some examples are
x+x+x+x = ${x}\cdot4$, and exponents are
${x}\cdot{x}\cdot{x}\cdot{x}$ = $x^4$
so anything to an exponent is just the $Base$ multiplied the by itself the amount of time as represented by the exponent
3. Demonstrate the difference between the exponents and the base by building models of a power.

this is an example of
$2^3$ or 2 cubed
each side is 2 units long, so
its like saying $2\cdot2\cdot2$
and that’s the same as saying $2^3$
This is the flipped version of $2^3$,
$3^2$. as you can see it has gone from a cube to a 2 dimensional shape which is another reason why the base and the exponent CAN NOT BE SWITCHED.
4. Demonstrate the difference two given powers in which the exponent and the base are interchanged by using repeated multiplication
The $Base$ and the $Exponent$ are two completely different things. The base is the bottem part of the $Power$ and the number that is being multiplied, the exponent is the top number in the power that is how many times you multiply the base.
THEY ARE NOT INTERCHANGEABLE
$2^3$ = $2\cdot2\cdot2$ = 8
$3^2$ = $3\cdot3$ = 9
5. Explain the role of parentheses in powers
$Parentheses$ are very important when it comes to powers with negative bases. The difference between $-3^2$, ${(-3)}^2$ and ${(}{-3}^2{)}$ important. $-3^2$ in  repeated multiplication is ${-1}\cdot3\cdot3$ which is equal to -9, meanwhile ${(-3)}^2$ in repeated multiplication is ${(-3)}\cdot{(-3)}$ which is equal to 9. The third ${(}{-3}^2{)}$ is the same as $-3^2$, just inside parentheses. if you get these things confused then you will end up with 2 completely different numbers. Parentheses also have their regular use of grouping things together as in P.E.D.M.A.S.
6. Evaluating exponents with integral bases and whole number exponents

When we are doing exponents with negative bases remember that if the exponent is even the answer will be positive and if it’s odd then the answer is negative. This rule only works for negative exponents inside parentheses. an example of this is:

${(-3)}^4$ = 81

${(-3)}^3$ = -27

${-3}^4$ = -81

${-3}^3$ = -27

7. Explain the exponent law for multiplying and dividing powers with the same base.

When 2 powers have the same base, their exponents can be manipulated before you solve for the power. the 2 laws here are the $Product$ $law$, and the $Quotient$ $law$.

The product law is when both power’s bases are the same, you can add the exponents so ${x^6}\cdot{x^2}$ would be equal to $x^8$.

The quotient law is when both powers have the same bases, their exponents can be subtracted ${x^4}\div{x^2}$ would be equal to $x^2$

8. explain the law of raising a power to an exponent

if you get a question that looks like this ${{(}x^3{)}}^4$. this means you have to use the $Power$ $law$. the power law says that if you an exponent outside parentheses containing a power, then you can keep the base and multiply the exponents, so ${{(}x^3{)}}^4$ would be equal to $x^{12}$.

9. explain the exponent law for raising a quotient and  a product to an exponent.

the quotient law and product law are above but here they are again,

The product law is when both power’s bases are the same, you can add the exponents and then multiply the $coefficients$ (if there are any) so ${x^6}\cdot{x^2}$ would be equal to $x^8$.

The quotient law is when both powers have the same bases, their exponents can be subtracted, then divide the coefficients (if there are any) ${x^4}\div{x^2}$ would be equal to $x^2$

here is an example:

first you would add the exponents from 3 to the power of 4 and 3 to the power of 5,then subtract the exponents from 3 to the power of 7. this gives you $3^2$. notice how the base didn’t change throughout the whole thing.

10. explain the law for powers with the exponent of zero

first any base with an exponent of 0 is equal to 1. this works because while $4^0$ = 1 may not make sense at first there is a way to prove it. if you use PEDMAS the in the expression

${6^2}\div{6^2}$ = ${36}\div{36}$ which is 1.

so if $6^0$ is the same thing, the logically its equal to 1

11. use patterns to explain the zero law

observe:

$2^5$ = 32

$2^4$ = 16

$2^3$ = 8

$2^2$ = 4

$2^1$ = 2

$2^0$ = 1

the pattern is that each time the numbers divide by 2 so if $2^1$ is equal to 1, then logically the next one down $2^0$ should be 1.
12. Identify the error in the simplification of an expression using exponents
$3^2$ = 6
the student who did this preformed $3\cdot2$ instead of $3\cdot3$
${3^2}\cdot{3^3}$ = $latex 3^6 instead of adding using the product law like you are supposed to, the student multiplied the exponents. 13.apply the laws of exponents product law ${2^3}\cdot{2^4}$ = $2^7$ Quotient law ${5^7}\div{5^4}$ = $5^3$ power law ${({3^4})}^2$ = $3^8$ zero law $5^0$ = 1 negative law $3^{-1}$ = $\frac{1}{3^1}$ 14. use order of operations on expressions with powers. order of operations or PEDMAS is used on expressions where exponents are being added or subtracted as there is no way to do it in the form of a power so in the expression: $3^2$ + $2^4$ you would do the exponents first turning it to 9+16 = 23 or now one that’s more complicated. ${5^5}\div{5^3}$ + ($3^2$ – 4)+${2^3}\cdot{2}$ Answer: you have to work it out in the order of operations. first do the brackets, and inside use PEDMAS again and solve the exponent then subtract 4, making it 9-4=5, and now our question looks like 15. identify the sum and difference of 2 powers you have to convert both to fractions first then add or subtract them $4^2$ + $2^3$ = 16 + 8= 24 $3^3$ – $2^2$ = 27 – 4 = 23 16. identify the error in applying the order of operations with the incorrect solutions a student answered this equation $3^2$${3^1}\cdot{3^2}$ = 1 what the student did is he added the exponents on the multiplication right, but then did 3 squared divided by 3 squared when he should have done 9-9 which is 0 not 1 17 and 19. use powers to and order of operations to solve problems(growth) for the next 2 questions, a) is the powers problem and b) is the order of operations and powers part write an expression using powers to solve the problem, then solve it. a) if a single virus cell infected an animal, and it took 1h for that virus cell to corrupt a regular animal cell and multiply itself by 10, how many virus cells would there be in 12h? Answer: if a single virus cell infected an animal, and in 1 hour the 1 virus cell turned into 10, then that would be like saying $10^1$, so if the exponent is the hours then the expression would just be $10^{12}$ and the number of virus cells in 12 hours would be: 1,000,000,000,000 virus cells b) and if each virus cell can only live for 9h. that means that any virus cell created past the 3rd hour would live, so the expression would be $10^{12}$$10^3$ and the amount of cells there are would be 999,999,999,000 virus cells inside the animal 18 and 20. use powers and order of operations to solve problems(measurement) problem, write an expression using powers to find the area the question asks you for, then solve it. a) find the total area of the outer square it is a simple solution as $4^2$ would be the full area of the outer square, because exponents a can be used to find the area of a square. the are on the outer square is$latex {16cm}^2
Solution: because they’re both squares you have to subtract the area of the little square from the area of the big square.
so, the expression would be:
$4^2$ – $2^2$ which is
16-4=${12cm}^2$
21. apply the exponent laws to with coefficients and variable bases
The 5 main laws of exponents are
– the product law
the formula to solving for the product law with coefficients is to have the base of the power stay the same, add the exponents together, and multiply the coefficients
Example:
a and b are coefficients, c and d are exponents and x is the base. the answer is:
${b}\cdot{a}$$x^{c+d}$
– the quotient law
the quotient law is like the opposite of the exponent law, so you would keep the base, subtract the exponents and divide the coefficients
Example:
$a\div{b}$$latex x^{y-z} – the power law the power law is a simple one keep the base and multiply the exponents the give the coefficient an exponent of its own, then solve. Example ${(x^2)}^3$=$x^{6}$ – the zero law the zero law is the easiest of them all. any base with a coefficient of 0 is 1 Example: $x^0$=1 – the negative law the negative law is probably the hardest of the 5, but there’s a trick to it as well. whenever an exponent is negative in a question, then you have to flip it with a fraction and the power that had the negative exponent now has a positive one, just on the other side of the fraction. Example $x^{-4}$ =$latex \frac{1}{x^4}
22. explain the negative exponent law and apply it to both integral and variable bases.
The $negative$ $exponent$ $law$ is the law that tells you how to deal with negative fractions. if we continue with the pattern from #11 then we see that
$2^2$ = 4
$2^1$ = 2
$2^0$ = 1
so if we continue with this pattern…
$2^{-1}$ = $\frac{1}{2}$
$2^{-2}$ = $\frac{1}{4}$
$2^{-3}$ = $\frac{1}{8}$
and so on and so forth.
another way to think of it is whenever an exponent is negative in a question, then you have to flip it with a fraction and the power that had the negative exponent now has a positive one, just on the other side of the fraction.
Example:
$3^{-4}$ = $\frac{1}{3^4}$
and with variable bases:
$x^{-y}$ = $\frac{1}{x^y}$
this rule can be easily applied to any power with a negative exponent
23. use the order of operation’s on expressions with powers involving negative exponents, and variable bases.

the answer would be $\frac{15}{x^6}$ because the do negatives add together due to the product law, and because of the negative law they must go
to the bottom part of the fraction but 15 doesn’t have a negative exponent, so it stays on top.

-Anything else I know about exponents
any power with a base of 1 equals 1.

## 2 thoughts on “Everything I Know About Exponents”

1. kaitlinw2016 says:

You did a great job on addressing all of the prescribed outcomes for exponents. Your explanations and examples were easy to understand, especially because you added lots of detail in each outcome. It was also made easy to understand you r explanations and examples when you used colours or bold to emphasize the important words. There was an error in 11 (use patterns to explain the zero law). Your explanation was that the numbers descend by 2. But 32 to 16 to 8 to 4 is not descending by 2 it is dividing by 2. Also you didn’t apply the negative exponent law to variable bases in 22, you only explained using integral bases. Other than that I didn’t find any other errors but in 23 I think it would’ve been better to evaluate your order of operations expression by solving and showing each step underneath the expression other than explaining in a paragraph. I thought that your examples in each outcome were well picked out for they really helped with your explanations. I also thought outcome 3 was swell done because you used a long detailed description to help understand the difference between the exponents and the base. Overall I thought your post was very good other than the couple errors.

2. thubbard says:


text:
# Varational inference - coordinate ascent question

I see in this document on variational inference that (p.5):

$L_k = \int q(z_k)E_{-k}[\log(p|z_{-k},x)]dz_k - \int q(z_k)\log q(z_k)dz_k$

It is stated that taking the derivative with respect to $q(z_k)$ results in:

$\frac{dL_k}{dq(z_k)}=E_{-k}[\log(p|z_{-k},x)] - \log q(z_k) - 1$

It looks to me like it has been argued that:

$\frac{d}{dq(z_k)}\int q(z_k)E_{-k}[\log(p|z_{-k},x)]dz_k = \frac{d}{dq(z_k)}[q(z_k)E_{-k}[\log(p|z_{-k},x)]] = E_{-k}[\log(p|z_{-k},x)]$

and

$\frac{d}{dq(z_k)}[- \int q(z_k)\log q(z_k)dz_k]=-\frac{d}{dq(z_k)}[q(z_k)\log q(z_k)]= -\log q(z_k) - 1$

I can't see why this would work - it looks like there's been a bonus differentiation by $dz_k$. Can someone fill me in on why this is valid?

format: plain


text:
# Noether's theorem

Noether's theorem This article is about Emmy Noether's first theorem, which derives conserved quantities from symmetries. Pour d'autres usages, see Noether's theorem (désambiguïsation). First page of Emmy Noether's article "Invariante Variationsprobleme" (1918), where she proved her theorem. Part of a series of articles about Calculus Fundamental theorem Leibniz integral rule Limits of functionsContinuity Mean value theoremRolle's theorem show Differential show Integral show Series show Vector show Multivariable show Advanced hide Specialized Fractional Malliavin Stochastic Variations show Miscellaneous vte Noether's theorem or Noether's first theorem states that every differentiable symmetry of the action of a physical system with conservative forces has a corresponding conservation law.[1] The theorem was proven by mathematician Emmy Noether in 1915 and published in 1918.[2] The action of a physical system is the integral over time of a Lagrangian function, from which the system's behavior can be determined by the principle of least action. This theorem only applies to continuous and smooth symmetries over physical space.

Noether's theorem is used in theoretical physics and the calculus of variations. A generalization of the formulations on constants of motion in Lagrangian and Hamiltonian mechanics (developed in 1788 et 1833, respectivement), it does not apply to systems that cannot be modeled with a Lagrangian alone (par exemple., systems with a Rayleigh dissipation function). En particulier, dissipative systems with continuous symmetries need not have a corresponding conservation law.

Contenu 1 Basic illustrations and background 2 Informal statement of the theorem 3 Brief illustration and overview of the concept 4 Historical context 5 Mathematical expression 5.1 Simple form using perturbations 5.1.1 Exemples 5.2 Field theory version 6 Dérivations 6.1 One independent variable 6.2 Field-theoretic derivation 6.3 Manifold/fiber bundle derivation 6.4 commentaires 6.5 Generalization to Lie algebras 6.6 Generalization of the proof 7 Exemples 7.1 Exemple 1: Conservation of energy 7.2 Exemple 2: Conservation of center of momentum 7.3 Exemple 3: Conformal transformation 8 Applications 9 Voir également 10 Remarques 11 Références 12 External links Basic illustrations and background As an illustration, if a physical system behaves the same regardless of how it is oriented in space, its Lagrangian is symmetric under continuous rotations: from this symmetry, Noether's theorem dictates that the angular momentum of the system be conserved, as a consequence of its laws of motion.[3]: 126  The physical system itself need not be symmetric; a jagged asteroid tumbling in space conserves angular momentum despite its asymmetry. It is the laws of its motion that are symmetric.

Comme autre exemple, if a physical process exhibits the same outcomes regardless of place or time, then its Lagrangian is symmetric under continuous translations in space and time respectively: by Noether's theorem, these symmetries account for the conservation laws of linear momentum and energy within this system, respectively.[4]: 23 [5]: 261  Noether's theorem is important, both because of the insight it gives into conservation laws, and also as a practical calculational tool. It allows investigators to determine the conserved quantities (invariants) from the observed symmetries of a physical system. inversement, it allows researchers to consider whole classes of hypothetical Lagrangians with given invariants, to describe a physical system.[3]: 127  As an illustration, suppose that a physical theory is proposed which conserves a quantity X. A researcher can calculate the types of Lagrangians that conserve X through a continuous symmetry. Due to Noether's theorem, the properties of these Lagrangians provide further criteria to understand the implications and judge the fitness of the new theory.

There are numerous versions of Noether's theorem, with varying degrees of generality. There are natural quantum counterparts of this theorem, expressed in the Ward–Takahashi identities. Generalizations of Noether's theorem to superspaces also exist.[6] Informal statement of the theorem All fine technical points aside, Noether's theorem can be stated informally: If a system has a continuous symmetry property, then there are corresponding quantities whose values are conserved in time.[7] A more sophisticated version of the theorem involving fields states that: To every differentiable symmetry generated by local actions there corresponds a conserved current.

The word "symmetry" in the above statement refers more precisely to the covariance of the form that a physical law takes with respect to a one-dimensional Lie group of transformations satisfying certain technical criteria. The conservation law of a physical quantity is usually expressed as a continuity equation.

The formal proof of the theorem utilizes the condition of invariance to derive an expression for a current associated with a conserved physical quantity. In modern (since c. 1980[8]) terminology, the conserved quantity is called the Noether charge, while the flow carrying that charge is called the Noether current. The Noether current is defined up to a solenoidal (divergenceless) vector field.

In the context of gravitation, Felix Klein's statement of Noether's theorem for action I stipulates for the invariants:[9] If an integral I is invariant under a continuous group Gρ with ρ parameters, then ρ linearly independent combinations of the Lagrangian expressions are divergences.

Brief illustration and overview of the concept Plot illustrating Noether's theorem for a coordinate-wise symmetry.

More general cases follow the same idea: When more coordinates /* */5} undergo a symmetry transformation /* */4mapsto q_/* */3+varphi _/* */2} , their effects add up by linearity to a conserved quantity /* */1la gauche(partial L/partial /* */0}_9right)varphi _8} . When there are time transformations 7 , they cause the "buffering" segments to contribute the two following terms to 6 : 54}_3}}Delta 2}_1right)approx pm Tleft(L-09}_8}}7}_6right),} first term being due to stretching in temporal dimension of the "buffering" segment (that changes the size of the domain of integration), and the second is due to its "slanting" just as in the exemplar case. Together they add a summand 5left(partial L/partial 4}_3right)2}_1right)} to the conserved quantity. Pour terminer, when instead of a trajectory 0 entire fields 9,t)} are considered, the argument replaces the interval 8,t_7]} with a bounded region 6 of the 5,t)} -domain, the endpoints 4} et 3} with the boundary 2 of the region, and its contribution to 1 is interpreted as a flux of a conserved current 0} , that is built in a way analogous to the prior definition of a conserved quantity. À présent, the zero contribution of the "buffering" 9 à 8 is interpreted as vanishing of the total flux of the current 7} through the 6 . That is the sense in which it is conserved: how much is "flowing" dans, just as much is "flowing" out. Historical context Main articles: Constant of motion, conservation law, and conserved current A conservation law states that some quantity X in the mathematical description of a system's evolution remains constant throughout its motion – it is an invariant. Mathematically, the rate of change of X (its derivative with respect to time) est zéro, 54}=3}=0~.} Such quantities are said to be conserved; they are often called constants of motion (although motion per se need not be involved, just evolution in time). Par exemple, if the energy of a system is conserved, its energy is invariant at all times, which imposes a constraint on the system's motion and may help in solving for it. Aside from insights that such constants of motion give into the nature of a system, they are a useful calculational tool; par exemple, an approximate solution can be corrected by finding the nearest state that satisfies the suitable conservation laws.

The earliest constants of motion discovered were momentum and kinetic energy, which were proposed in the 17th century by René Descartes and Gottfried Leibniz on the basis of collision experiments, and refined by subsequent researchers. Isaac Newton was the first to enunciate the conservation of momentum in its modern form, and showed that it was a consequence of Newton's third law. According to general relativity, the conservation laws of linear momentum, energy and angular momentum are only exactly true globally when expressed in terms of the sum of the stress–energy tensor (non-gravitational stress–energy) and the Landau–Lifshitz stress–energy–momentum pseudotensor (gravitational stress–energy). The local conservation of non-gravitational linear momentum and energy in a free-falling reference frame is expressed by the vanishing of the covariant divergence of the stress–energy tensor. Another important conserved quantity, discovered in studies of the celestial mechanics of astronomical bodies, is the Laplace–Runge–Lenz vector.

In the late 18th and early 19th centuries, physicists developed more systematic methods for discovering invariants. A major advance came in 1788 with the development of Lagrangian mechanics, which is related to the principle of least action. In this approach, the state of the system can be described by any type of generalized coordinates q; the laws of motion need not be expressed in a Cartesian coordinate system, as was customary in Newtonian mechanics. The action is defined as the time integral I of a function known as the Lagrangian L 2 ,1 }},t),dt~,} where the dot over q signifies the rate of change of the coordinates q, 0 }}=9 }8}~.} Hamilton's principle states that the physical path q(t)—the one actually taken by the system—is a path for which infinitesimal variations in that path cause no change in I, at least up to first order. This principle results in the Euler–Lagrange equations, 76}la gauche(54 }}}}droit)=32 }}~.} Ainsi, if one of the coordinates, say qk, does not appear in the Lagrangian, the right-hand side of the equation is zero, and the left-hand side requires that 10}la gauche(98}_7}}droit)=6}5}=0~,} where the momentum 4=32}_1}}} is conserved throughout the motion (on the physical path).

Ainsi, the absence of the ignorable coordinate qk from the Lagrangian implies that the Lagrangian is unaffected by changes or transformations of qk; the Lagrangian is invariant, and is said to exhibit a symmetry under such transformations. This is the seed idea generalized in Noether's theorem.

Several alternative methods for finding conserved quantities were developed in the 19th century, especially by William Rowan Hamilton. Par exemple, he developed a theory of canonical transformations which allowed changing coordinates so that some coordinates disappeared from the Lagrangian, comme ci-dessus, resulting in conserved canonical momenta. Another approach, and perhaps the most efficient for finding conserved quantities, is the Hamilton–Jacobi equation.

Mathematical expression See also: Perturbation theory Simple form using perturbations The essence of Noether's theorem is generalizing the notion of ignorable coordinates.

One can assume that the Lagrangian L defined above is invariant under small perturbations (warpings) of the time variable t and the generalized coordinates q. One may write 0t&rightarrow t^9=t+delta t\mathbf 8 &rightarrow mathbf 7 ^6=mathbf 5 +delta mathbf 4 ~,end3}} where the perturbations δt and δq are both small, but variable. For generality, assume there are (dire) N such symmetry transformations of the action, c'est à dire. transformations leaving the action unchanged; labelled by an index r = 1, 2, 3, ..., N.

Then the resultant perturbation can be written as a linear sum of the individual types of perturbations, 2delta t&=sum _1varepsilon _0T_9\delta mathbf 8 &=sum _7varepsilon _6mathbf 5 _4~,end3}} where εr are infinitesimal parameter coefficients corresponding to each: generator Tr of time evolution, and generator Qr of the generalized coordinates.

For translations, Qr is a constant with units of length; for rotations, it is an expression linear in the components of q, and the parameters make up an angle.

Using these definitions, Noether showed that the N quantities 21 }}}}cdot 0 }}-Lright)T_9-87 }}}}cdot mathbf 6 _5} are conserved (constants of motion).

Examples I. Time invariance For illustration, consider a Lagrangian that does not depend on time, c'est à dire., that is invariant (symmetric) under changes t → t + δt, without any change in the coordinates q. Dans ce cas, N = 1, T = 1 and Q = 0; the corresponding conserved quantity is the total energy H[10] 43 }}}}cdot 2 }}-L} II. Translational invariance Consider a Lagrangian which does not depend on an ("ignorable", comme ci-dessus) coordinate qk; so it is invariant (symmetric) under changes qk → qk + δqk. Dans ce cas, N = 1, T = 0, and Qk = 1; the conserved quantity is the corresponding linear momentum pk[11] 1=0El peso se redujo un 1.93% 9}}}}.} In special and general relativity, these apparently separate conservation laws are aspects of a single conservation law, that of the stress–energy tensor,[12] that is derived in the next section.

III. Rotational invariance The conservation of the angular momentum L = r × p is analogous to its linear momentum counterpart.[13] It is assumed that the symmetry of the Lagrangian is rotational, c'est à dire., that the Lagrangian does not depend on the absolute orientation of the physical system in space. For concreteness, assume that the Lagrangian does not change under small rotations of an angle δθ about an axis n; such a rotation transforms the Cartesian coordinates by the equation El peso se redujo un 1.93% 8 rightarrow mathbf El peso se redujo un 1.93% 7 +delta theta ,mathbf El peso se redujo un 1.93% 6 times mathbf El peso se redujo un 1.93% 5 .} Since time is not being transformed, T = 0, and N = 1. Taking δθ as the ε parameter and the Cartesian coordinates r as the generalized coordinates q, the corresponding Q variables are given by El peso se redujo un 1.93% 4 =mathbf El peso se redujo un 1.93% 3 times mathbf El peso se redujo un 1.93% 2 .} Then Noether's theorem states that the following quantity is conserved, El peso se redujo un 1.93% 1El peso se redujo un 1.93% 0 }}}}cdot mathbf {Q} = mathbf {p} point gauche(mathbf {n} fois mathbf {r} droit)= mathbf {n} point gauche(mathbf {r} fois mathbf {p} droit)= mathbf {n} cdot mathbf {L} .} Autrement dit, the component of the angular momentum L along the n axis is conserved. And if n is arbitrary, c'est à dire., if the system is insensitive to any rotation, then every component of L is conserved; in short, angular momentum is conserved.

Field theory version Although useful in its own right, the version of Noether's theorem just given is a special case of the general version derived in 1915. To give the flavor of the general theorem, a version of Noether's theorem for continuous fields in four-dimensional space–time is now given. Since field theory problems are more common in modern physics than mechanics problems, this field theory version is the most commonly used (or most often implemented) version of Noether's theorem.

Let there be a set of differentiable fields {style d'affichage varphi } defined over all space and time; par exemple, the temperature {style d'affichage T(mathbf {X} ,t)} would be representative of such a field, being a number defined at every place and time. The principle of least action can be applied to such fields, but the action is now an integral over space and time {style d'affichage {mathématique {S}}= entier {mathématique {L}}la gauche(varphi ,partiel _{dans }varphi ,x^{dans }droit),d^{4}X} (the theorem can be further generalized to the case where the Lagrangian depends on up to the nth derivative, and can also be formulated using jet bundles).

A continuous transformation of the fields {style d'affichage varphi } can be written infinitesimally as {displaystyle varphi mapsto varphi +varepsilon Psi ,} où {displaystyle Psi } is in general a function that may depend on both {style d'affichage x^{dans }} et {style d'affichage varphi } . The condition for {displaystyle Psi } to generate a physical symmetry is that the action {style d'affichage {mathématique {S}}} is left invariant. This will certainly be true if the Lagrangian density {style d'affichage {mathématique {L}}} is left invariant, but it will also be true if the Lagrangian changes by a divergence, {style d'affichage {mathématique {L}}mapsto {mathématique {L}}+varepsilon partial _{dans }Lambda ^{dans },} since the integral of a divergence becomes a boundary term according to the divergence theorem. A system described by a given action might have multiple independent symmetries of this type, indexed by {displaystyle r=1,2,ldots ,N,} so the most general symmetry transformation would be written as {displaystyle varphi mapsto varphi +varepsilon _{r}Psi _{r},} with the consequence {style d'affichage {mathématique {L}}mapsto {mathématique {L}}+varepsilon _{r}partiel _{dans }Lambda _{r}^{dans }.} For such systems, Noether's theorem states that there are {displaystyle N} conserved current densities {displaystyle j_{r}^{nu }=Lambda _{r}^{nu }-{frac {partiel {mathématique {L}}}{partial varphi _{,nu }}}cdot Psi _{r}} (where the dot product is understood to contract the field indices, not the {style d'affichage non } index or {style d'affichage r} index).

In such cases, the conservation law is expressed in a four-dimensional way {style d'affichage partiel _{nu }j^{nu }=0,} which expresses the idea that the amount of a conserved quantity within a sphere cannot change unless some of it flows out of the sphere. Par exemple, electric charge is conserved; the amount of charge within a sphere cannot change unless some of the charge leaves the sphere.

For illustration, consider a physical system of fields that behaves the same under translations in time and space, as considered above; autrement dit, {displaystyle Lleft({symbole gras {varphi }},partiel _{dans }{symbole gras {varphi }},x^{dans }droit)} is constant in its third argument. Dans ce cas, N = 4, one for each dimension of space and time. An infinitesimal translation in space, {style d'affichage x^{dans }mapsto x^{dans }+varepsilon _{r}delta _{r}^{dans }} (avec {delta de style d'affichage } denoting the Kronecker delta), affects the fields as {style d'affichage varphi (x^{dans })mapsto varphi left(x^{dans }-varepsilon _{r}delta _{r}^{dans }droit)} : C'est, relabelling the coordinates is equivalent to leaving the coordinates in place while translating the field itself, which in turn is equivalent to transforming the field by replacing its value at each point {style d'affichage x^{dans }} with the value at the point {style d'affichage x^{dans }-varepsilon X^{dans }} "behind" it which would be mapped onto {style d'affichage x^{dans }} by the infinitesimal displacement under consideration. Since this is infinitesimal, we may write this transformation as {displaystyle Psi _{r}=-delta _{r}^{dans }partiel _{dans }varphi .} The Lagrangian density transforms in the same way, {style d'affichage {mathématique {L}}la gauche(x^{dans }droit)mapsto {mathématique {L}}la gauche(x^{dans }-varepsilon _{r}delta _{r}^{dans }droit)} , alors {style d'affichage Lambda _{r}^{dans }=-delta _{r}^{dans }{mathématique {L}}} and thus Noether's theorem corresponds to the conservation law for the stress–energy tensor Tμν,[12] where we have used {style d'affichage lui } in place of {style d'affichage r} . To wit, by using the expression given earlier, and collecting the four conserved currents (one for each {style d'affichage lui } ) into a tensor {style d'affichage T} , Noether's theorem gives {style d'affichage T_{dans }{}^{nu }=-delta _{dans }^{nu }{mathématique {L}}+delta _{dans }^{sigma }partiel _{sigma }varphi {frac {partiel {mathématique {L}}}{partial varphi _{,nu }}}=gauche({frac {partiel {mathématique {L}}}{partial varphi _{,nu }}}droit)cdot varphi _{,dans }-delta _{dans }^{nu }{mathématique {L}}} avec {style d'affichage T_{dans }{}^{nu }{}_{,nu }=0} (we relabelled {style d'affichage lui } comme {style d'affichage sigma } at an intermediate step to avoid conflict). (Cependant, la {style d'affichage T} obtained in this way may differ from the symmetric tensor used as the source term in general relativity; see Canonical stress–energy tensor.) The conservation of electric charge, by contrast, can be derived by considering Ψ linear in the fields φ rather than in the derivatives.[14] In quantum mechanics, the probability amplitude ψ(X) of finding a particle at a point x is a complex field φ, because it ascribes a complex number to every point in space and time. The probability amplitude itself is physically unmeasurable; only the probability p = |ψ|2 can be inferred from a set of measurements. Par conséquent, the system is invariant under transformations of the ψ field and its complex conjugate field ψ* that leave |ψ|2 unchanged, tel que {displaystyle psi rightarrow e^{c'est-à-dire }psi , psi ^{*}rightarrow e^{-c'est-à-dire }psi ^{*}~,} a complex rotation. In the limit when the phase θ becomes infinitesimally small, δθ, it may be taken as the parameter ε, while the Ψ are equal to iψ and −iψ*, respectivement. A specific example is the Klein–Gordon equation, the relativistically correct version of the Schrödinger equation for spinless particles, which has the Lagrangian density {displaystyle L=partial _{nu }psi partial _{dans }psi ^{*}eta ^{nu mu }+moi ^{2}psi psi ^{*}.} Dans ce cas, Noether's theorem states that the conserved (∂ ⋅ j = 0) current equals {displaystyle j^{nu }=ileft({frac {psi partiel }{partial x^{dans }}}psi ^{*}-{frac {partial psi ^{*}}{partial x^{dans }}}psi à droite)eta ^{nu mu }~,} qui, when multiplied by the charge on that species of particle, equals the electric current density due to that type of particle. Cette "gauge invariance" was first noted by Hermann Weyl, and is one of the prototype gauge symmetries of physics.

Derivations One independent variable Consider the simplest case, a system with one independent variable, time. Suppose the dependent variables q are such that the action integral {displaystyle I=int _{t_{1}}^{t_{2}}L[mathbf {q} [t],{point {mathbf {q} }}[t],t],dt} is invariant under brief infinitesimal variations in the dependent variables. Autrement dit, they satisfy the Euler–Lagrange equations {style d'affichage {frac {ré}{dt}}{frac {partial L}{partiel {point {mathbf {q} }}}}[t]={frac {partial L}{mathbf partiel {q} }}[t].} And suppose that the integral is invariant under a continuous symmetry. Mathematically such a symmetry is represented as a flow, Phi, which acts on the variables as follows {style d'affichage {commencer{aligné}t&rightarrow t'=t+varepsilon T\mathbf {q} [t]&rightarrow mathbf {q} '[t']=varphi [mathbf {q} [t],varepsilon ]=varphi [mathbf {q} [t'-varepsilon T],varepsilon ]fin{aligné}}} where ε is a real variable indicating the amount of flow, and T is a real constant (which could be zero) indicating how much the flow shifts time.

{style d'affichage {point {mathbf {q} }}[t]rightarrow {point {mathbf {q} }}'[t']={frac {ré}{dt}}varphi [mathbf {q} [t],varepsilon ]={frac {partial varphi }{mathbf partiel {q} }}[mathbf {q} [t'-varepsilon T],varepsilon ]{point {mathbf {q} }}[t'-varepsilon T].} The action integral flows to {style d'affichage {commencer{aligné}I'[varepsilon ]&=int _{t_{1}+varepsilon T}^{t_{2}+varepsilon T}L[mathbf {q} '[t'],{point {mathbf {q} }}'[t'],t'],dt'\[6pt]&=int _{t_{1}+varepsilon T}^{t_{2}+varepsilon T}L[varphi [mathbf {q} [t'-varepsilon T],varepsilon ],{frac {partial varphi }{mathbf partiel {q} }}[mathbf {q} [t'-varepsilon T],varepsilon ]{point {mathbf {q} }}[t'-varepsilon T],t'],dt'end{aligné}}} which may be regarded as a function of ε. Calculating the derivative at ε' = 0 and using Leibniz's rule, on a {style d'affichage {commencer{aligné}0={frac {dI'}{dvarepsilon }}[0]={}&L[mathbf {q} [t_{2}],{point {mathbf {q} }}[t_{2}],t_{2}]T-L[mathbf {q} [t_{1}],{point {mathbf {q} }}[t_{1}],t_{1}]T\[6pt]&{}+entier _{t_{1}}^{t_{2}}{frac {partial L}{mathbf partiel {q} }}la gauche(-{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}T+{frac {partial varphi }{partial varepsilon }}droit)+{frac {partial L}{partiel {point {mathbf {q} }}}}la gauche(-{frac {partiel ^{2}varphi }{(mathbf partiel {q} )^{2}}}{point {mathbf {q} }}^{2}T+{frac {partiel ^{2}varphi }{partial varepsilon partial mathbf {q} }}{point {mathbf {q} }}-{frac {partial varphi }{mathbf partiel {q} }}{ddot {mathbf {q} }}Tright),dt.fin{aligné}}} Notice that the Euler–Lagrange equations imply {style d'affichage {commencer{aligné}{frac {ré}{dt}}la gauche({frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}Tright)&=left({frac {ré}{dt}}{frac {partial L}{partiel {point {mathbf {q} }}}}droit){frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}T+{frac {partial L}{partiel {point {mathbf {q} }}}}la gauche({frac {ré}{dt}}{frac {partial varphi }{mathbf partiel {q} }}droit){point {mathbf {q} }}T+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{ddot {mathbf {q} }},T\[6pt]&={frac {partial L}{mathbf partiel {q} }}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}T+{frac {partial L}{partiel {point {mathbf {q} }}}}la gauche({frac {partiel ^{2}varphi }{(mathbf partiel {q} )^{2}}}{point {mathbf {q} }}droit){point {mathbf {q} }}T+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{ddot {mathbf {q} }},T.end{aligné}}} Substituting this into the previous equation, on obtient {style d'affichage {commencer{aligné}0={frac {dI'}{dvarepsilon }}[0]={}&L[mathbf {q} [t_{2}],{point {mathbf {q} }}[t_{2}],t_{2}]T-L[mathbf {q} [t_{1}],{point {mathbf {q} }}[t_{1}],t_{1}]T-{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}[t_{2}]T+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}[t_{1}]T\[6pt]&{}+entier _{t_{1}}^{t_{2}}{frac {partial L}{mathbf partiel {q} }}{frac {partial varphi }{partial varepsilon }}+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partiel ^{2}varphi }{partial varepsilon partial mathbf {q} }}{point {mathbf {q} }},dt.fin{aligné}}} Again using the Euler–Lagrange equations we get {style d'affichage {frac {ré}{dt}}la gauche({frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{partial varepsilon }}droit)=gauche({frac {ré}{dt}}{frac {partial L}{partiel {point {mathbf {q} }}}}droit){frac {partial varphi }{partial varepsilon }}+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partiel ^{2}varphi }{partial varepsilon partial mathbf {q} }}{point {mathbf {q} }}={frac {partial L}{mathbf partiel {q} }}{frac {partial varphi }{partial varepsilon }}+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partiel ^{2}varphi }{partial varepsilon partial mathbf {q} }}{point {mathbf {q} }}.} Substituting this into the previous equation, on obtient {style d'affichage {commencer{aligné}0={}&L[mathbf {q} [t_{2}],{point {mathbf {q} }}[t_{2}],t_{2}]T-L[mathbf {q} [t_{1}],{point {mathbf {q} }}[t_{1}],t_{1}]T-{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}[t_{2}]T+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}[t_{1}]T\[6pt]&{}+{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{partial varepsilon }}[t_{2}]-{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{partial varepsilon }}[t_{1}].fin{aligné}}} From which one can see that {style d'affichage à gauche({frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{mathbf partiel {q} }}{point {mathbf {q} }}-Lright)T-{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{partial varepsilon }}} is a constant of the motion, c'est à dire., it is a conserved quantity. Since φ[q, 0] = q, on a {style d'affichage {frac {partial varphi }{mathbf partiel {q} }}=1} and so the conserved quantity simplifies to {style d'affichage à gauche({frac {partial L}{partiel {point {mathbf {q} }}}}{point {mathbf {q} }}-Lright)T-{frac {partial L}{partiel {point {mathbf {q} }}}}{frac {partial varphi }{partial varepsilon }}.} To avoid excessive complication of the formulas, this derivation assumed that the flow does not change as time passes. The same result can be obtained in the more general case.

Field-theoretic derivation Noether's theorem may also be derived for tensor fields φA where the index A ranges over the various components of the various tensor fields. These field quantities are functions defined over a four-dimensional space whose points are labeled by coordinates xμ where the index μ ranges over time (μ = 0) and three spatial dimensions (μ = 1, 2, 3). These four coordinates are the independent variables; and the values of the fields at each event are the dependent variables. Under an infinitesimal transformation, the variation in the coordinates is written {style d'affichage x^{dans }rightarrow xi ^{dans }=x^{dans }+delta x^{dans }} whereas the transformation of the field variables is expressed as {displaystyle varphi ^{UN}rightarrow alpha ^{UN}la gauche(xi ^{dans }droit)=varphi ^{UN}la gauche(x^{dans }droit)+delta varphi ^{UN}la gauche(x^{dans }droit),.} By this definition, the field variations δφA result from two factors: intrinsic changes in the field themselves and changes in coordinates, since the transformed field αA depends on the transformed coordinates ξμ. To isolate the intrinsic changes, the field variation at a single point xμ may be defined {displaystyle alpha ^{UN}la gauche(x^{dans }droit)=varphi ^{UN}la gauche(x^{dans }droit)+{bar {delta }}varphi ^{UN}la gauche(x^{dans }droit),.} If the coordinates are changed, the boundary of the region of space–time over which the Lagrangian is being integrated also changes; the original boundary and its transformed version are denoted as Ω and Ω’, respectivement.

Noether's theorem begins with the assumption that a specific transformation of the coordinates and field variables does not change the action, which is defined as the integral of the Lagrangian density over the given region of spacetime. Expressed mathematically, this assumption may be written as {style d'affichage entier _{Omega ^{prime }}Lleft(Alpha ^{UN},{Alpha ^{UN}}_{,nu },xi ^{dans }droit)d^{4}xi -int _{Oméga }Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)d^{4}x=0} where the comma subscript indicates a partial derivative with respect to the coordinate(s) that follows the comma, par exemple.

{style d'affichage {varphi ^{UN}}_{,sigma }={frac {partial varphi ^{UN}}{partial x^{sigma }}},.} Since ξ is a dummy variable of integration, and since the change in the boundary Ω is infinitesimal by assumption, the two integrals may be combined using the four-dimensional version of the divergence theorem into the following form {style d'affichage entier _{Oméga }la gauche{la gauche[Lleft(Alpha ^{UN},{Alpha ^{UN}}_{,nu },x^{dans }droit)-Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)droit]+{frac {partiel }{partial x^{sigma }}}la gauche[Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)delta x^{sigma }droit]droit}d^{4}x=0,.} The difference in Lagrangians can be written to first-order in the infinitesimal variations as {style d'affichage à gauche[Lleft(Alpha ^{UN},{Alpha ^{UN}}_{,nu },x^{dans }droit)-Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)droit]={frac {partial L}{partial varphi ^{UN}}}{bar {delta }}varphi ^{UN}+{frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}{bar {delta }}{varphi ^{UN}}_{,sigma },.} Cependant, because the variations are defined at the same point as described above, the variation and the derivative can be done in reverse order; they commute {style d'affichage {bar {delta }}{varphi ^{UN}}_{,sigma }={bar {delta }}{frac {partial varphi ^{UN}}{partial x^{sigma }}}={frac {partiel }{partial x^{sigma }}}la gauche({bar {delta }}varphi ^{UN}droit),.} Using the Euler–Lagrange field equations {style d'affichage {frac {partiel }{partial x^{sigma }}}la gauche({frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}droit)={frac {partial L}{partial varphi ^{UN}}}} the difference in Lagrangians can be written neatly as {style d'affichage {commencer{aligné}&left[Lleft(Alpha ^{UN},{Alpha ^{UN}}_{,nu },x^{dans }droit)-Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)droit]\[4pt]={}&{frac {partiel }{partial x^{sigma }}}la gauche({frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}droit){bar {delta }}varphi ^{UN}+{frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}{bar {delta }}{varphi ^{UN}}_{,sigma }={frac {partiel }{partial x^{sigma }}}la gauche({frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}{bar {delta }}varphi ^{UN}droit).fin{aligné}}} Ainsi, the change in the action can be written as {style d'affichage entier _{Oméga }{frac {partiel }{partial x^{sigma }}}la gauche{{frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}{bar {delta }}varphi ^{UN}+Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)delta x^{sigma }droit}d^{4}x=0,.} Since this holds for any region Ω, the integrand must be zero {style d'affichage {frac {partiel }{partial x^{sigma }}}la gauche{{frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}{bar {delta }}varphi ^{UN}+Lleft(varphi ^{UN},{varphi ^{UN}}_{,nu },x^{dans }droit)delta x^{sigma }droit}=0,.} For any combination of the various symmetry transformations, the perturbation can be written {style d'affichage {commencer{aligné}delta x^{dans }&=varepsilon X^{dans }\delta varphi ^{UN}&=varepsilon Psi ^{UN}={bar {delta }}varphi ^{UN}+varepsilon {mathématique {L}}_{X}varphi ^{UN}fin{aligné}}} où {style d'affichage {mathématique {L}}_{X}varphi ^{UN}} is the Lie derivative of φA in the Xμ direction. When φA is a scalar or {style d'affichage {X^{dans }}_{,nu }=0} , {style d'affichage {mathématique {L}}_{X}varphi ^{UN}={frac {partial varphi ^{UN}}{partial x^{dans }}}X^{dans },.} These equations imply that the field variation taken at one point equals {style d'affichage {bar {delta }}varphi ^{UN}=varepsilon Psi ^{UN}-varepsilon {mathématique {L}}_{X}varphi ^{UN},.} Differentiating the above divergence with respect to ε at ε = 0 and changing the sign yields the conservation law {style d'affichage {frac {partiel }{partial x^{sigma }}}j^{sigma }=0} where the conserved current equals {displaystyle j^{sigma }=gauche[{frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}{mathématique {L}}_{X}varphi ^{UN}-L,X^{sigma }droit]-la gauche({frac {partial L}{partiel {varphi ^{UN}}_{,sigma }}}droit)Psi ^{UN},.} Manifold/fiber bundle derivation Suppose we have an n-dimensional oriented Riemannian manifold, M and a target manifold T. Laisser {style d'affichage {mathématique {C}}} be the configuration space of smooth functions from M to T. (Plus généralement, we can have smooth sections of a fiber bundle over M.) Examples of this M in physics include: In classical mechanics, in the Hamiltonian formulation, M is the one-dimensional manifold {style d'affichage mathbb {R} } , representing time and the target space is the cotangent bundle of space of generalized positions. In field theory, M is the spacetime manifold and the target space is the set of values the fields can take at any given point. Par exemple, if there are m real-valued scalar fields, {style d'affichage varphi _{1},ldots ,varphi _{m}} , then the target manifold is {style d'affichage mathbb {R} ^{m}} . If the field is a real vector field, then the target manifold is isomorphic to {style d'affichage mathbb {R} ^{3}} .

Now suppose there is a functional {style d'affichage {mathématique {S}}:{mathématique {C}}flèche droite mathbb {R} ,} called the action. (It takes values into {style d'affichage mathbb {R} } , plutôt que {style d'affichage mathbb {C} } ; this is for physical reasons, and is unimportant for this proof.) To get to the usual version of Noether's theorem, we need additional restrictions on the action. We assume {style d'affichage {mathématique {S}}[varphi ]} is the integral over M of a function {style d'affichage {mathématique {L}}(varphi ,partiel _{dans }varphi ,X)} called the Lagrangian density, depending on φ, its derivative and the position. Autrement dit, for φ in {style d'affichage {mathématique {C}}} {style d'affichage {mathématique {S}}[varphi ],=,entier _{M}{mathématique {L}}[varphi (X),partiel _{dans }varphi (X),X],d^{n}X.} Suppose we are given boundary conditions, c'est à dire., a specification of the value of φ at the boundary if M is compact, or some limit on φ as x approaches ∞. Then the subspace of {style d'affichage {mathématique {C}}} consisting of functions φ such that all functional derivatives of {style d'affichage {mathématique {S}}} at φ are zero, C'est: {style d'affichage {frac {delta {mathématique {S}}[varphi ]}{delta varphi (X)}}environ 0} and that φ satisfies the given boundary conditions, is the subspace of on shell solutions. (See principle of stationary action) À présent, suppose we have an infinitesimal transformation on {style d'affichage {mathématique {C}}} , generated by a functional derivation, Q such that {displaystyle Qleft[entier _{N}{mathématique {L}},mathrm {ré} ^{n}xright]approx int _{partial N}f ^{dans }[varphi (X),partial varphi ,partial partial varphi ,ldots ],ds_{dans }} for all compact submanifolds N or in other words, {style d'affichage Q[{mathématique {L}}(X)]approx partial _{dans }f ^{dans }(X)} pour tout x, where we set {style d'affichage {mathématique {L}}(X)={mathématique {L}}[varphi (X),partiel _{dans }varphi (X),X].} If this holds on shell and off shell, we say Q generates an off-shell symmetry. If this only holds on shell, we say Q generates an on-shell symmetry. Alors, we say Q is a generator of a one parameter symmetry Lie group.

À présent, for any N, because of the Euler–Lagrange theorem, on shell (and only on-shell), Nous avons {style d'affichage {commencer{aligné}Qleft[entier _{N}{mathématique {L}},mathrm {ré} ^{n}xright]&=int _{N}la gauche[{frac {partiel {mathématique {L}}}{partial varphi }}-partiel _{dans }{frac {partiel {mathématique {L}}}{partiel (partiel _{dans }varphi )}}droit]Q[varphi ],mathrm {ré} ^{n}x+int _{partial N}{frac {partiel {mathématique {L}}}{partiel (partiel _{dans }varphi )}}Q[varphi ],mathrm {ré} s_{dans }\&approx int _{partial N}f ^{dans },mathrm {ré} s_{dans }.fin{aligné}}} Since this is true for any N, Nous avons {style d'affichage partiel _{dans }la gauche[{frac {partiel {mathématique {L}}}{partiel (partiel _{dans }varphi )}}Q[varphi ]-f ^{dans }droit]environ 0.} But this is the continuity equation for the current {displaystyle J^{dans }} Défini par:[15] {displaystyle J^{dans },=,{frac {partiel {mathématique {L}}}{partiel (partiel _{dans }varphi )}}Q[varphi ]-f ^{dans },} which is called the Noether current associated with the symmetry. The continuity equation tells us that if we integrate this current over a space-like slice, we get a conserved quantity called the Noether charge (fourni, bien sûr, if M is noncompact, the currents fall off sufficiently fast at infinity).

Comments Noether's theorem is an on shell theorem: it relies on use of the equations of motion—the classical path. It reflects the relation between the boundary conditions and the variational principle. Assuming no boundary terms in the action, Noether's theorem implies that {style d'affichage entier _{partial N}J^{dans }ds_{dans }environ 0.} The quantum analogs of Noether's theorem involving expectation values (par exemple., {textstyle leftlangle int d^{4}x~partial cdot {textbf {J}}rightrangle =0} ) probing off shell quantities as well are the Ward–Takahashi identities.

Generalization to Lie algebras Suppose we have two symmetry derivations Q1 and Q2. Alors, [Q1, Q2] is also a symmetry derivation. Let's see this explicitly. Let's say {style d'affichage Q_{1}[{mathématique {L}}]approx partial _{dans }F_{1}^{dans }} et {style d'affichage Q_{2}[{mathématique {L}}]approx partial _{dans }F_{2}^{dans }} Alors, {style d'affichage [Q_{1},Q_{2}][{mathématique {L}}]=Q_{1}[Q_{2}[{mathématique {L}}]]-Q_{2}[Q_{1}[{mathématique {L}}]]approx partial _{dans }F_{12}^{dans }} where f12 = Q1[f2μ] − Q2[f1μ]. Alors, {displaystyle j_{12}^{dans }=gauche({frac {partiel }{partiel (partiel _{dans }varphi )}}{mathématique {L}}droit)(Q_{1}[Q_{2}[varphi ]]-Q_{2}[Q_{1}[varphi ]])-F_{12}^{dans }.} This shows we can extend Noether's theorem to larger Lie algebras in a natural way.

Generalization of the proof This applies to any local symmetry derivation Q satisfying QS ≈ 0, and also to more general local functional differentiable actions, including ones where the Lagrangian depends on higher derivatives of the fields. Let ε be any arbitrary smooth function of the spacetime (or time) manifold such that the closure of its support is disjoint from the boundary. ε is a test function. Alors, because of the variational principle (which does not apply to the boundary, by the way), the derivation distribution q generated by q[e][Φ(X)] = ε(X)Q[Φ(X)] satisfies q[e][S] 0 for every ε, or more compactly, q(X)[S] 0 for all x not on the boundary (but remember that q(X) is a shorthand for a derivation distribution, not a derivation parametrized by x in general). This is the generalization of Noether's theorem.

To see how the generalization is related to the version given above, assume that the action is the spacetime integral of a Lagrangian that only depends on φ and its first derivatives. Aussi, assume {style d'affichage Q[{mathématique {L}}]approx partial _{dans }f ^{dans }} Alors, {style d'affichage {commencer{aligné}q[varepsilon ][{mathématique {S}}]&=int q[varepsilon ][{mathématique {L}}]d^{n}x\[6pt]&=int left{la gauche({frac {partiel }{partial varphi }}{mathématique {L}}droit)varepsilon Q[varphi ]+la gauche[{frac {partiel }{partiel (partiel _{dans }varphi )}}{mathématique {L}}droit]partiel _{dans }(varepsilon Q[varphi ])droit}d^{n}x\[6pt]&=int left{varepsilon Q[{mathématique {L}}]+partiel _{dans }varepsilon left[{frac {partiel }{partial left(partiel _{dans }varphi right)}}{mathématique {L}}droit]Q[varphi ]droit},d^{n}x\[6pt]&approx int varepsilon partial _{dans }la gauche{f ^{dans }-la gauche[{frac {partiel }{partiel (partiel _{dans }varphi )}}{mathématique {L}}droit]Q[varphi ]droit},d^{n}xend{aligné}}} pour tous {displaystyle varepsilon } .

Plus généralement, if the Lagrangian depends on higher derivatives, alors {style d'affichage partiel _{dans }la gauche[f ^{dans }-la gauche[{frac {partiel }{partiel (partiel _{dans }varphi )}}{mathématique {L}}droit]Q[varphi ]-2la gauche[{frac {partiel }{partiel (partiel _{dans }partiel _{nu }varphi )}}{mathématique {L}}droit]partiel _{nu }Q[varphi ]+partiel _{nu }la gauche[la gauche[{frac {partiel }{partiel (partiel _{dans }partiel _{nu }varphi )}}{mathématique {L}}droit]Q[varphi ]droit]-,dotsm right]environ 0.} Exemples Exemple 1: Conservation of energy Looking at the specific case of a Newtonian particle of mass m, coordinate x, moving under the influence of a potential V, coordinatized by time t. The action, S, est: {style d'affichage {commencer{aligné}{mathématique {S}}[X]&=int Lleft[X(t),{point {X}}(t)droit],dt\&=int left({frac {m}{2}}somme _{je=1}^{3}{point {X}}_{je}^{2}-V(X(t))droit),dt.fin{aligné}}} The first term in the brackets is the kinetic energy of the particle, while the second is its potential energy. Consider the generator of time translations Q = d/dt. Autrement dit, {style d'affichage Q[X(t)]={point {X}}(t)} . The coordinate x has an explicit dependence on time, whilst V does not; consequently: {style d'affichage Q[L]={frac {ré}{dt}}la gauche[{frac {m}{2}}somme _{je}{point {X}}_{je}^{2}-V(X)droit]=msum _{je}{point {X}}_{je}{ddot {X}}_{je}-somme _{je}{frac {partial V(X)}{partiel x_{je}}}{point {X}}_{je}} so we can set {displaystyle L={frac {m}{2}}somme _{je}{point {X}}_{je}^{2}-V(X).} Alors, {style d'affichage {commencer{aligné}j&=sum _{je=1}^{3}{frac {partial L}{partiel {point {X}}_{je}}}Q[X_{je}]-L\&=msum _{je}{point {X}}_{je}^{2}-la gauche[{frac {m}{2}}somme _{je}{point {X}}_{je}^{2}-V(X)droit]\[3pt]&={frac {m}{2}}somme _{je}{point {X}}_{je}^{2}+V(X).fin{aligné}}} The right hand side is the energy, and Noether's theorem states that {displaystyle dj/dt=0} (c'est à dire. the principle of conservation of energy is a consequence of invariance under time translations).

Plus généralement, if the Lagrangian does not depend explicitly on time, the quantity {somme de style d'affichage _{je=1}^{3}{frac {partial L}{partiel {point {X}}_{je}}}{point {X_{je}}}-L} (called the Hamiltonian) is conserved.

Exemple 2: Conservation of center of momentum Still considering 1-dimensional time, laisser {style d'affichage {commencer{aligné}{mathématique {S}}la gauche[{vec {X}}droit]&=int {mathématique {L}}la gauche[{vec {X}}(t),{point {vec {X}}}(t)droit]dt\[3pt]&=int left[somme _{alpha =1}^{N}{frac {m_{alpha }}{2}}la gauche({point {vec {X}}}_{alpha }droit)^{2}-somme _{alpha

Si vous voulez connaître d'autres articles similaires à Noether's theorem vous pouvez visiter la catégorie Calcul des variations.

Monter

Nous utilisons nos propres cookies et ceux de tiers pour améliorer l'expérience utilisateur Plus d'informations


text:
## C Specification

To determine the memory requirements for a plane of a disjoint image, add a VkImagePlaneMemoryRequirementsInfo structure to the pNext chain of the VkImageMemoryRequirementsInfo2 structure.

The VkImagePlaneMemoryRequirementsInfo structure is defined as:

// Provided by VK_VERSION_1_1
typedef struct VkImagePlaneMemoryRequirementsInfo {
VkStructureType          sType;
const void*              pNext;
VkImageAspectFlagBits    planeAspect;
} VkImagePlaneMemoryRequirementsInfo;

or the equivalent

// Provided by VK_KHR_sampler_ycbcr_conversion
typedef VkImagePlaneMemoryRequirementsInfo VkImagePlaneMemoryRequirementsInfoKHR;

## Members

• sType is the type of this structure.

• pNext is NULL or a pointer to a structure extending this structure.

• planeAspect is a VkImageAspectFlagBits value specifying the aspect corresponding to the image plane to query.

## Description

Valid Usage
• VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02281
If the image’s tiling is VK_IMAGE_TILING_LINEAR or VK_IMAGE_TILING_OPTIMAL, then planeAspect must be a single valid format plane for the image (that is, for a two-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT or VK_IMAGE_ASPECT_PLANE_1_BIT, and for a three-plane image planeAspect must be VK_IMAGE_ASPECT_PLANE_0_BIT, VK_IMAGE_ASPECT_PLANE_1_BIT or VK_IMAGE_ASPECT_PLANE_2_BIT)

• VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-02282
If the image’s tiling is VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT, then planeAspect must be a single valid memory plane for the image (that is, aspectMask must specify a plane index that is less than the VkDrmFormatModifierPropertiesEXT::drmFormatModifierPlaneCount associated with the image’s format and VkImageDrmFormatModifierPropertiesEXT::drmFormatModifier)

Valid Usage (Implicit)
• VUID-VkImagePlaneMemoryRequirementsInfo-sType-sType
sType must be VK_STRUCTURE_TYPE_IMAGE_PLANE_MEMORY_REQUIREMENTS_INFO

• VUID-VkImagePlaneMemoryRequirementsInfo-planeAspect-parameter
planeAspect must be a valid VkImageAspectFlagBits value


text:
Tidy Text Analysis

## Tidying Text Data

### Harry Potter!

We have a data frame loaded in our environment with the entire text of all Harry Potter books.

Run the code chunk below to inspect it…

hp_text

## Step 1: Tidying Up

### unnest_tokens()

Each row of our data contains the entire text for each chapter of each book. But to analyse this data using the tools we have learned so far, we need to reduce each row down to a more meaningful unit of text, know as a token.

When we talk about ‘tidy text data’ we are referring to a table with one-token-per-row. In this case, we are going to define a token as a single word. We can then perform various forms of text analysis on a row-by-row basis and derive some insight from each token of text.

Luckily, there is a single function from the tidytext package that will perform this laborious task for us called unnest_tokens(). Fill in the blank below with the function name to see how it transforms the Harry Potter data set.

The output argument is name of the new column that is going to be created. Since we’re unnesting down to a single word, let’s call that word.

The input argument is the name of the column in the current data set that contains the text. In our case that is text.

hp_text %>%
___(output = ___, input = ___)
hp_text %>%
unnest_tokens(output = word, input = text)

### What did unnest_tokens() do?

• Other columns have been retained
• Punctuation has been stripped
• Words have been converted to lower-case

## Step 2: filtering out ‘stop words’

Now that the data is in one-word-per-row format, we can manipulate it with tidy tools like dplyr.

Often in text analysis, we will want to remove stop words; stop words are words that are not useful for an analysis, typically extremely common words such as “the”, “of”, “to”, and so forth in English.

We can remove stop words (kept in the tidytext dataset stop_words) with an anti_join().

The stop_words data set looks like this…

stop_words
## # A tibble: 1,149 x 2
##    word        lexicon
##    <chr>       <chr>
##  1 a           SMART
##  2 a's         SMART
##  3 able        SMART
##  5 above       SMART
##  6 according   SMART
##  7 accordingly SMART
##  8 across      SMART
##  9 actually    SMART
## 10 after       SMART
## # ... with 1,139 more rows

Fill out the blanks with the name of the function and the name of the data set containing stop words to filter out any stop words in the Harry Potter data.

hp_text %>%
unnest_tokens(output = word, input = text) %>%
___(___, by = "word")
hp_text %>%
unnest_tokens(output = word, input = text) %>%
anti_join(stop_words, by = "word")

## Step 3: Word Counts

We now have our tokenized data frame with all stop-words removed saved as hp_tidy as below. We’re now ready to conduct some analysis on the text!

hp_tidy
## # A tibble: 409,338 x 3
##    book                    chapter word
##    <fct>                     <int> <chr>
##  1 The Philosopher's Stone       1 boy
##  2 The Philosopher's Stone       1 lived
##  3 The Philosopher's Stone       1 dursley
##  4 The Philosopher's Stone       1 privet
##  5 The Philosopher's Stone       1 drive
##  6 The Philosopher's Stone       1 proud
##  7 The Philosopher's Stone       1 perfectly
##  8 The Philosopher's Stone       1 normal
##  9 The Philosopher's Stone       1 people
## 10 The Philosopher's Stone       1 expect
## # ... with 409,328 more rows

### Word Counts

Use the count() function passing the word column as the first argument to count the occurances of each unique word in the data. Add a sort = TRUE argument to bring the most common words to the top.

hp_tidy %>%
count(___, sort = ___)
hp_tidy %>%
count(word, sort = TRUE)

### Word Count by Book

To get word counts on a by-book basis, we can simply add the book column name to the count() function…

hp_tidy %>%
count(___, word, sort = TRUE)
hp_tidy %>%
count(book, word, sort = TRUE)

### Counts minus names

In this case, character names dominate the top word counts. If we wanted to get a look a top words that are not some of the most popular names in the books.

To do this you would create a character vector of the names you would like to remove like the below.

hp_characters
##  [1] "harry"          "potter"         "dumbledore"     "voldemort"
##  [5] "snape"          "sirius"         "hermione"       "ron"
##  [9] "weasley"        "draco"          "malfoy"         "hagrid"
## [13] "neville"        "dobby"          "moody"          "lupin"
## [17] "bellatrix"      "mcgonagall"     "newt scamander" "grindelwald"
## [21] "tina"           "queenie"        "jacob"          "harry's"
## [25] "ginny"          "george"

Then use a filter function to filter out words from the data that are in the hp_characters vector.

Hint: use a ! before the column name you are filtering to filter to only words that are not %in% the vector you are using to filter by.

hp_tidy %>%
___(___ %in% ___) %>%
count(word, sort = TRUE)
hp_tidy %>%
filter(!word %in% hp_characters) %>%
count(word, sort = TRUE)

## Step 4: Sentiment Analysis

### Sentiment Lexicons

The tidytext package comes with 3 built-in sentiment lexicons: AFINN, Bing and NRC.

How does each lexicon differ in their measurement of sentiment?

get_sentiments("afinn")
## # A tibble: 2,476 x 2
##    word       score
##    <chr>      <int>
##  1 abandon       -2
##  2 abandoned     -2
##  3 abandons      -2
##  4 abducted      -2
##  5 abduction     -2
##  6 abductions    -2
##  7 abhor         -3
##  8 abhorred      -3
##  9 abhorrent     -3
## 10 abhors        -3
## # ... with 2,466 more rows
get_sentiments("bing")
## # A tibble: 6,788 x 2
##    word        sentiment
##    <chr>       <chr>
##  1 2-faced     negative
##  2 2-faces     negative
##  3 a+          positive
##  4 abnormal    negative
##  5 abolish     negative
##  6 abominable  negative
##  7 abominably  negative
##  8 abominate   negative
##  9 abomination negative
## 10 abort       negative
## # ... with 6,778 more rows
get_sentiments("nrc")
## # A tibble: 13,901 x 2
##    word        sentiment
##    <chr>       <chr>
##  1 abacus      trust
##  2 abandon     fear
##  3 abandon     negative
##  5 abandoned   anger
##  6 abandoned   fear
##  7 abandoned   negative
##  9 abandonment anger
## 10 abandonment fear
## # ... with 13,891 more rows

### Sentiment analysis using inner_join()

With data in a tidy format, sentiment analysis can be done as an inner join. This is another of the great successes of viewing text mining as a tidy data analysis task; much as removing stop words is an anti-join operation, performing sentiment analysis is an inner-join operation.

Inner-joining a lexicon to our data will reduce the data to only words that have a match in the lexicon and then join on the the sentiment column to the data set.

Use inner_join in the code chunk below to join the bing sentiment lexicon to our data.

hp_tidy %>%
___(get_sentiments("___"))
hp_tidy %>%
inner_join(get_sentiments("bing"))

### Calculate proportion of positive/negative words in each book

Once we have joined the positive/negative sentiments from the bing lexicon to our data, we can use group_by(), summarise() and mutate() to calculate the proportions in each book.

• First group the data by the book and sentiment columns
• Then use the n() function with summarise to count the occurances of each group
• Finally we use n / sum(n) with mutate() to get the proportions and then ungroup()
hp_tidy %>%
inner_join(get_sentiments("bing")) %>%
group_by(___, ___) %>%
summarise(n = ___) %>%
mutate(prop = n / sum(n)) %>%
ungroup()
hp_tidy %>%
inner_join(get_sentiments("bing")) %>%
group_by(book, sentiment) %>%
summarise(n = n()) %>%
mutate(prop = n / sum(n)) %>%
ungroup()
hp_props <- hp_tidy %>%
inner_join(get_sentiments("bing")) %>%
group_by(book, sentiment) %>%
summarise(n = n()) %>%
mutate(prop = n / sum(n)) %>%
ungroup()

### Visualise the results with ggplot2!

Once we’ve done some analysis, it’s good idea to visualise the results in a chart. We can use the ggplot2 package from the tidyverse to do this.

We won’t have time to cover ggplot2 at great length today but it’s widely regarded as the best chart programming library in the world with near endless visualisation options made possible by the possibility of iteratively adding layers of data.

Combining visualisation and your data wrangling/analysis into a single scripted process is also a very powerful concept that can save you a lot of time by eliminating the need to export your data into another visualisation tool.

Below is a basic ggplot setup. Note that each line is linked with a + rather than a %>%.

The initial ggplot() function takes a data argument as well as an aesthetics function aes() in which you map columns of your data to coordinates, shapes or colours on the chart.

In this instance, we then add a geom_col with position set to stack (stacked-bar chart), flip the axis to make the book names more readable then add a title to the chart.

Fill in the blanks to put the book column on the x-axis, prop column on the y-axis and map the sentiment colour to the colour fill. Finally give your chart an appropriate title and run the code to see what we get!

ggplot(data = hp_props, aes(x = ___, y = ___, fill = ___)) +
geom_col(position = "stack") +
coord_flip() +
labs(title = "Give your chart a title here!", x = NULL, y = NULL)
ggplot(data = hp_props, aes(x = book, y = prop, fill = sentiment)) +
geom_col(position = "stack") +
coord_flip() +
labs(title = "Proportion of sentiment in Harry Potter books", x = NULL, y = NULL)

### Challenge

Starting with the hp_tidy data set. Can you:

1. inner_join() the AFINN sentiment lexicon (get_sentiments("afinn"))
2. Calculate the sentiment score of each chapter in each book
hp_tidy %>%
hp_tidy %>%
inner_join(get_sentiments("afinn")) %>%
group_by(book, chapter) %>%
summarise(score = sum(score)) %>%
ungroup()
hp_scores <- hp_tidy %>%
inner_join(get_sentiments("afinn")) %>%
group_by(book, chapter) %>%
summarise(score = sum(score)) %>%
ungroup()

### Visualise the results!

For this chart, lets show the computed scores over time (chapters) and create a separate chart for each book by using supplying the book column to the facet_wrap() function.

ggplot(data = hp_scores, aes(x = ___, y = ___, fill = ___ > 0)) +
facet_wrap(~___, ncol = 1) +
geom_col(show.legend = FALSE) +
labs(title = "Add your title here...", x = "___", y = "___")
ggplot(data = hp_scores, aes(x = chapter, y = score, fill = score > 0)) +
facet_wrap(~book, ncol = 2) +
geom_col(show.legend = FALSE) +
geom_hline(yintercept = 0, colour = "black") +
labs(title = "Sentiment score by chapter", x = "Chapter", y = "Sentiment Score")

After you have a chart, try modifying some of the elements…

• What does changing the ncol = argument in the facet_wrap function do?
• Add a scales = "free_x" argument inside facet_wrap(). What has changed?
• Try adding another line (remember to use the +) to use a different chart theme… theme_light() perhaps?

## Summary

A typical tidy text analysis with R…

# your data set with a text column
sent_analysis <- text_data %>%
# tidy, remove stop words, join setntiments
unnest_tokens(word, text) %>%
anti_join(stop_words) %>%
inner_join(get_sentiments("...")) %>%
# do some analysis
group_by(...) %>%
summarise(...) %>%
mutate(...) %>%
ungroup()

labs(title = "...")


text:
# AoC 2021 Day 3: Binary Contraption

### Source: Binary Diagnostic

#### Part 1: Given a list of binary numbers, calculate gamma such that each bit is the most common bit in that position in the input and epsilon which is the binary inverse of gamma. Return the product.

I feel like this one could have been expressed a bit more elegantly, but I think the point is still clear enough:

def part1(lines: typer.FileText):
# Keep track of how many lines we counted total and just the number of ones
counter = 0
one_counts = []

for line in lines:
line = line.strip()
if not line:
continue

counter += 1

# If we don't have an initalized counts, start with '0' or '1'
if not one_counts:
one_counts = list(map(int, line))

# Otherwise, add for any ones
else:
for i, bit in enumerate(line):
if int(bit) == 1:
one_counts[i] += 1

# Recombine into a binary number, that is the gamma rate
# The epsilon rate is the inverse
gamma = ''.join(
'1' if bit > counter / 2 else '0'
for bit in one_counts
)
epsilon = ''.join(
'1' if bit == '0' else '0'
for bit in gamma
)

print(f'{gamma=}={int(gamma, 2)}, {epsilon=}={int(epsilon, 2)}, product={int(gamma, 2)*int(epsilon, 2)}')

In this case, we’re going to keep a running count of the number of ones in each position in one_counts (we have to initialize the first time through). Most of the loop counts that using enumerate to get the positions.

Then when we’re done, if the number of ones is greater than half the number of inputs, 1 was more common. Otherwise, 0. Turn those back from binary to integers with int(bits, 2) and multiply and we’re done.

For my particular input:

$python3 binary-contraption.py part1 input.txt gamma='100100101010'=2346, epsilon='011011010101'=1749, product=4103154  #### Part 2: Given a list of binary numbers repeatedly filter the list such that in iteration i, only numbers with the most/least common bit in that position of numbers remaining is kept. After each set has been reduced to one number, return the product of the most/least values. That’s a bit confusingly worded, but as an example, consider if, after 3 iterations, we have the list: • 00100 • 11110 • 10110 • 10111 • 10101 We’re on the 4th iteration, so the most common 4th bit is 1. If we’re evaluating ‘most’, keep the middle 3 values. If we’re evaluating the least, keep only the first and last. Full code: def part2(lines: typer.FileText): # Load the entire file into memory this time lines = [ line.strip() for line in lines if line.strip() ] potential_generators = copy.copy(lines) potential_scrubbers = copy.copy(lines) # Helper to find the most/least common bit in a given position from a given list # Note, the >= here is necessary to break ties (resulting in 1 for most common, 0 for least) def most_common(data, position): one_count = sum( 1 if (line[position] == '1') else 0 for line in data ) return '1' if (one_count >= len(data) / 2) else '0' def least_common(data, position): return '1' if most_common(data, position) == '0' else '0' # Helper to filter an iterable so that lines with line[position] = value are kept def filter_position_equals(data, position, value): return list(filter(lambda line: line[position] == value, data)) # Iterate through the bits for position in range(len(lines[0])): if len(potential_generators) > 1: potential_generators = filter_position_equals( potential_generators, position, most_common(potential_generators, position) ) if len(potential_scrubbers) > 1: potential_scrubbers = filter_position_equals( potential_scrubbers, position, least_common(potential_scrubbers, position) ) generator = int(potential_generators[0], 2) scrubber = int(potential_scrubbers[0], 2) print( f'{potential_generators=}={generator}, {potential_scrubbers=}={scrubber}, product={generator*scrubber}')  They are getting a bit longer, aren’t they? Fun though! There was a gotcha (as mentioned in the comment) on what to do if you have an even number of current values with equal number of 1s and 0s. In that case, it’s spelled out in the full problem statement: on a tie, use 1 for most common and 0 for least. $ python3 binary-contraption.py part2 input.txt
potential_generators=['110101000111']=3399, potential_scrubbers=['010011100001']=1249, product=4245351

#### Timing

Timing wise, we’re still in the basically instant camp:

--- Day 3: Binary Diagnostic ---

$python3 binary-contraption.py part1 input.txt gamma='100100101010'=2346, epsilon='011011010101'=1749, product=4103154 # time 34395958ns / 0.03s$ python3 binary-contraption.py part2 input.txt
potential_generators=['110101000111']=3399, potential_scrubbers=['010011100001']=1249, product=4245351
# time 35739667ns / 0.04s