text:
# American Institute of Mathematical Sciences

January  2021, 8(1): 35-59. doi: 10.3934/jdg.2020033

## A Mean Field Games model for finite mixtures of Bernoulli and categorical distributions

 1 SBAI, Sapienza Università di Roma, Via A. Scarpa 16, 00161 Roma, Italy 2 Dip. di Matematica e Fisica, Università degli Studi Roma Tre, Largo S. L. Murialdo 1, 00146 Roma, Italy 3 IConsulting, Via della Conciliazione 10, 00193 Roma, Italy

* Corresponding author: Fabio Camilli

Received  May 2020 Revised  November 2020 Published  December 2020

Finite mixture models are an important tool in the statistical analysis of data, for example in data clustering. The optimal parameters of a mixture model are usually computed by maximizing the log-likelihood functional via the Expectation-Maximization algorithm. We propose an alternative approach based on the theory of Mean Field Games, a class of differential games with an infinite number of agents. We show that the solution of a finite state space multi-population Mean Field Games system characterizes the critical points of the log-likelihood functional for a Bernoulli mixture. The approach is then generalized to mixture models of categorical distributions. Hence, the Mean Field Games approach provides a method to compute the parameters of the mixture model, and we show its application to some standard examples in cluster analysis.

Citation: Laura Aquilanti, Simone Cacace, Fabio Camilli, Raul De Maio. A Mean Field Games model for finite mixtures of Bernoulli and categorical distributions. Journal of Dynamics & Games, 2021, 8 (1) : 35-59. doi: 10.3934/jdg.2020033
##### References:
 [1] L. Aquilanti, S. Cacace, F. Camilli and R. De Maio, A mean field games approach to cluster analysis, Applied Math. Optim., (2020). doi: 10.1007/s00245-019-09646-2.  Google Scholar [2] R. Bellman, Dynamic Programming, Princeton Landmarks in Mathematics, Princeton University Press, Princeton, NJ, 1957.  Google Scholar [3] J. A. Bilmes, A gentle tutorial of the EM algorithm and its application to parameter estimation for Gaussian mixture and hidden Markov model, CTIT Technical Reports Series, 1998. Google Scholar [4] C. M. Bishop, Pattern Recognition and Machine Learning, Information Science and Statistics, Springer, New York, 2006.  Google Scholar [5] A. Biswas, Mean Field Games with ergodic cost for discrete time Markov processes, preprint, arXiv: 1510.08968. Google Scholar [6] S. Cacace, F. Camilli and A. Goffi, A policy iteration method for Mean Field Games, preprint, arXiv: 2007.04818. Google Scholar [7] R. Carmona and M. Lauriere, Convergence analysis of machine learning algorithms for the numerical solution of mean field control and games: I – The ergodic case, preprint, arXiv: 1907.05980. Google Scholar [8] J. L. Coron, Quelques Exemples de Jeux à Champ Moyen, Ph.D. thesis, Université Paris-Dauphine, 2018. Available from: https://tel.archives-ouvertes.fr/tel-01705969/document. Google Scholar [9] W. E, J. Han and Q. Li, A mean-field optimal control formulation of deep learning, Res. Math. Sci., 6 (2019), 41pp. doi: 10.1007/s40687-018-0172-y.  Google Scholar [10] B. S. Everitt, S. Landau, M. Leese and D. Stahl, Cluster Analysis, Wiley Series in Probability and Statistics, John Wiley & Sons, Ltd., Chichester, 2011. doi: 10.1002/9780470977811.  Google Scholar [11] Fashion-MNIST., Available from: https://github.com/zalandoresearch/fashion-mnist. Google Scholar [12] W. H. Fleming, Some Markovian optimization problems, J. Math. Mech., 12 (1963), 131-140.   Google Scholar [13] D. A. Gomes, J. Mohr and R. R. Souza, Discrete time, finite state space mean field games, J. Math. Pures Appl. (9), 93 (2010), 308-328.  doi: 10.1016/j.matpur.2009.10.010.  Google Scholar [14] D. A. Gomes and J. Saúde, Mean field games models–A brief survey, Dyn. Games Appl., 4 (2014), 110-154.  doi: 10.1007/s13235-013-0099-2.  Google Scholar [15] R. A. Howard, Dynamic Programming and Markov Processes, The Technology Press of MIT, Cambridge, Mass.; John Wiley & Sons, Inc., New York-London, 1960. doi: 10.1126/science.132.3428.667.  Google Scholar [16] M. Huang, R. P. Malhamé and P. E. Caines, Large population stochastic dynamic games: Closed-loop McKean-Vlasov systems and the Nash certainty equivalence principle, Commun. Inf. Syst., 6 (2006), 221-251.  doi: 10.4310/CIS.2006.v6.n3.a5.  Google Scholar [17] J.-M. Lasry and P.-L. Lions, Mean field games, Jpn. J. Math., 2 (2007), 229-260.  doi: 10.1007/s11537-007-0657-8.  Google Scholar [18] G. McLachlan and D. Peel, Finite Mixture Models, Wiley Series in Probability and Statistics: Applied Probability and Statistics, Wiley-Interscience, New York, 2000. doi: 10.1002/0471721182.  Google Scholar [19] The MNIST Database of Handwritten Digits., Available from: http://yann.lecun.com/exdb/mnist/. Google Scholar [20] K. Pearson, Contributions to the mathematical theory of evolution, Philosophical Trans. Roy. Soc., 185 (1894), 71-110.  doi: 10.1098/rsta.1894.0003.  Google Scholar [21] S. Pequito, A. Pedro Aguiar, B. Sinopoli and D. A. Gomes, Unsupervised learning of finite mixture models using mean field games, 49$^th$ Annual Allerton Conference on Communication, Control and Computing, Monticello, IL, 2011. doi: 10.1109/Allerton.2011.6120185.  Google Scholar [22] M. L. Puterman, On the convergence of policy iteration for controlled diffusions, J. Optim. Theory Appl., 33 (1981), 137-144.  doi: 10.1007/BF00935182.  Google Scholar [23] M. L. Puterman and S. L. Brumelle, On the convergence of policy iteration in stationary dynamic programming, Math. Oper. Res., 4 (1979), 60-69.  doi: 10.1287/moor.4.1.60.  Google Scholar [24] M. E. Tarter and M. D. Lock, Model-Free Curve Estimation, Monographs on Statistics and Applied Probability, 56, Chapman & Hall, New York, 1993.  Google Scholar [25] D. M. Titterington, A. F. M. Smith and U. E. Makov, Statistical Analysis of Finite Mixture Distributions, Wiley Series Probability and Mathematical Statistics: Applied Probability and Statistics, John Wiley & Sons, Ltd., Chichester, 1985.  Google Scholar [26] M. Wedel and W. A. Kamakura, Market Segmentation: Conceptual and Methodological Foundations, International Series in Quantitative Marketing, 8, Springer, Boston, MA, 2000. doi: 10.1007/978-1-4615-4651-1.  Google Scholar

show all references

##### References:
 [1] L. Aquilanti, S. Cacace, F. Camilli and R. De Maio, A mean field games approach to cluster analysis, Applied Math. Optim., (2020). doi: 10.1007/s00245-019-09646-2.  Google Scholar [2] R. Bellman, Dynamic Programming, Princeton Landmarks in Mathematics, Princeton University Press, Princeton, NJ, 1957.  Google Scholar [3] J. A. Bilmes, A gentle tutorial of the EM algorithm and its application to parameter estimation for Gaussian mixture and hidden Markov model, CTIT Technical Reports Series, 1998. Google Scholar [4] C. M. Bishop, Pattern Recognition and Machine Learning, Information Science and Statistics, Springer, New York, 2006.  Google Scholar [5] A. Biswas, Mean Field Games with ergodic cost for discrete time Markov processes, preprint, arXiv: 1510.08968. Google Scholar [6] S. Cacace, F. Camilli and A. Goffi, A policy iteration method for Mean Field Games, preprint, arXiv: 2007.04818. Google Scholar [7] R. Carmona and M. Lauriere, Convergence analysis of machine learning algorithms for the numerical solution of mean field control and games: I – The ergodic case, preprint, arXiv: 1907.05980. Google Scholar [8] J. L. Coron, Quelques Exemples de Jeux à Champ Moyen, Ph.D. thesis, Université Paris-Dauphine, 2018. Available from: https://tel.archives-ouvertes.fr/tel-01705969/document. Google Scholar [9] W. E, J. Han and Q. Li, A mean-field optimal control formulation of deep learning, Res. Math. Sci., 6 (2019), 41pp. doi: 10.1007/s40687-018-0172-y.  Google Scholar [10] B. S. Everitt, S. Landau, M. Leese and D. Stahl, Cluster Analysis, Wiley Series in Probability and Statistics, John Wiley & Sons, Ltd., Chichester, 2011. doi: 10.1002/9780470977811.  Google Scholar [11] Fashion-MNIST., Available from: https://github.com/zalandoresearch/fashion-mnist. Google Scholar [12] W. H. Fleming, Some Markovian optimization problems, J. Math. Mech., 12 (1963), 131-140.   Google Scholar [13] D. A. Gomes, J. Mohr and R. R. Souza, Discrete time, finite state space mean field games, J. Math. Pures Appl. (9), 93 (2010), 308-328.  doi: 10.1016/j.matpur.2009.10.010.  Google Scholar [14] D. A. Gomes and J. Saúde, Mean field games models–A brief survey, Dyn. Games Appl., 4 (2014), 110-154.  doi: 10.1007/s13235-013-0099-2.  Google Scholar [15] R. A. Howard, Dynamic Programming and Markov Processes, The Technology Press of MIT, Cambridge, Mass.; John Wiley & Sons, Inc., New York-London, 1960. doi: 10.1126/science.132.3428.667.  Google Scholar [16] M. Huang, R. P. Malhamé and P. E. Caines, Large population stochastic dynamic games: Closed-loop McKean-Vlasov systems and the Nash certainty equivalence principle, Commun. Inf. Syst., 6 (2006), 221-251.  doi: 10.4310/CIS.2006.v6.n3.a5.  Google Scholar [17] J.-M. Lasry and P.-L. Lions, Mean field games, Jpn. J. Math., 2 (2007), 229-260.  doi: 10.1007/s11537-007-0657-8.  Google Scholar [18] G. McLachlan and D. Peel, Finite Mixture Models, Wiley Series in Probability and Statistics: Applied Probability and Statistics, Wiley-Interscience, New York, 2000. doi: 10.1002/0471721182.  Google Scholar [19] The MNIST Database of Handwritten Digits., Available from: http://yann.lecun.com/exdb/mnist/. Google Scholar [20] K. Pearson, Contributions to the mathematical theory of evolution, Philosophical Trans. Roy. Soc., 185 (1894), 71-110.  doi: 10.1098/rsta.1894.0003.  Google Scholar [21] S. Pequito, A. Pedro Aguiar, B. Sinopoli and D. A. Gomes, Unsupervised learning of finite mixture models using mean field games, 49$^th$ Annual Allerton Conference on Communication, Control and Computing, Monticello, IL, 2011. doi: 10.1109/Allerton.2011.6120185.  Google Scholar [22] M. L. Puterman, On the convergence of policy iteration for controlled diffusions, J. Optim. Theory Appl., 33 (1981), 137-144.  doi: 10.1007/BF00935182.  Google Scholar [23] M. L. Puterman and S. L. Brumelle, On the convergence of policy iteration in stationary dynamic programming, Math. Oper. Res., 4 (1979), 60-69.  doi: 10.1287/moor.4.1.60.  Google Scholar [24] M. E. Tarter and M. D. Lock, Model-Free Curve Estimation, Monographs on Statistics and Applied Probability, 56, Chapman & Hall, New York, 1993.  Google Scholar [25] D. M. Titterington, A. F. M. Smith and U. E. Makov, Statistical Analysis of Finite Mixture Distributions, Wiley Series Probability and Mathematical Statistics: Applied Probability and Statistics, John Wiley & Sons, Ltd., Chichester, 1985.  Google Scholar [26] M. Wedel and W. A. Kamakura, Market Segmentation: Conceptual and Methodological Foundations, International Series in Quantitative Marketing, 8, Springer, Boston, MA, 2000. doi: 10.1007/978-1-4615-4651-1.  Google Scholar
Samples of hand-written digits from the MNIST database
Different samples of hand-written digits from the MNIST database
Clusterization histogram for digits $\mathbf{1},\mathbf{3}$ and the corresponding Bernoulli parameters
Clusterization histogram for digits $\mathbf{3},\mathbf{5}$ and the corresponding Bernoulli parameters
Clusterization histogram for even digits and the corresponding Bernoulli parameters
Samples of fashion products from the Fashion-MNIST database
Averaged categorical distributions for the Fashion-MNIST database
Clusterization histogram for types T-shirt, Trouser and the corresponding categorical parameters
Clusterization histogram for types Dress, Sneaker, Bag, Boot and the corresponding categorical parameters
 [1] Junichi Minagawa. On the uniqueness of Nash equilibrium in strategic-form games. Journal of Dynamics & Games, 2020, 7 (2) : 97-104. doi: 10.3934/jdg.2020006 [2] J. Frédéric Bonnans, Justina Gianatti, Francisco J. Silva. On the convergence of the Sakawa-Shindo algorithm in stochastic control. Mathematical Control & Related Fields, 2016, 6 (3) : 391-406. doi: 10.3934/mcrf.2016008 [3] Jan Prüss, Laurent Pujo-Menjouet, G.F. Webb, Rico Zacher. Analysis of a model for the dynamics of prions. Discrete & Continuous Dynamical Systems - B, 2006, 6 (1) : 225-235. doi: 10.3934/dcdsb.2006.6.225 [4] Michael Grinfeld, Amy Novick-Cohen. Some remarks on stability for a phase field model with memory. Discrete & Continuous Dynamical Systems - A, 2006, 15 (4) : 1089-1117. doi: 10.3934/dcds.2006.15.1089 [5] Demetres D. Kouvatsos, Jumma S. Alanazi, Kevin Smith. A unified ME algorithm for arbitrary open QNMs with mixed blocking mechanisms. Numerical Algebra, Control & Optimization, 2011, 1 (4) : 781-816. doi: 10.3934/naco.2011.1.781 [6] Qiang Guo, Dong Liang. An adaptive wavelet method and its analysis for parabolic equations. Numerical Algebra, Control & Optimization, 2013, 3 (2) : 327-345. doi: 10.3934/naco.2013.3.327 [7] Guido De Philippis, Antonio De Rosa, Jonas Hirsch. The area blow up set for bounded mean curvature submanifolds with respect to elliptic surface energy functionals. Discrete & Continuous Dynamical Systems - A, 2019, 39 (12) : 7031-7056. doi: 10.3934/dcds.2019243 [8] Bin Pei, Yong Xu, Yuzhen Bai. Convergence of p-th mean in an averaging principle for stochastic partial differential equations driven by fractional Brownian motion. Discrete & Continuous Dynamical Systems - B, 2020, 25 (3) : 1141-1158. doi: 10.3934/dcdsb.2019213 [9] Cicely K. Macnamara, Mark A. J. Chaplain. Spatio-temporal models of synthetic genetic oscillators. Mathematical Biosciences & Engineering, 2017, 14 (1) : 249-262. doi: 10.3934/mbe.2017016 [10] Fernando P. da Costa, João T. Pinto, Rafael Sasportes. On the convergence to critical scaling profiles in submonolayer deposition models. Kinetic & Related Models, 2018, 11 (6) : 1359-1376. doi: 10.3934/krm.2018053 [11] Jian Yang, Bendong Lou. Traveling wave solutions of competitive models with free boundaries. Discrete & Continuous Dynamical Systems - B, 2014, 19 (3) : 817-826. doi: 10.3934/dcdsb.2014.19.817 [12] Tomáš Roubíček. An energy-conserving time-discretisation scheme for poroelastic media with phase-field fracture emitting waves and heat. Discrete & Continuous Dynamical Systems - S, 2017, 10 (4) : 867-893. doi: 10.3934/dcdss.2017044 [13] Hakan Özadam, Ferruh Özbudak. A note on negacyclic and cyclic codes of length $p^s$ over a finite field of characteristic $p$. Advances in Mathematics of Communications, 2009, 3 (3) : 265-271. doi: 10.3934/amc.2009.3.265 [14] Martial Agueh, Reinhard Illner, Ashlin Richardson. Analysis and simulations of a refined flocking and swarming model of Cucker-Smale type. Kinetic & Related Models, 2011, 4 (1) : 1-16. doi: 10.3934/krm.2011.4.1 [15] Rui Hu, Yuan Yuan. Stability, bifurcation analysis in a neural network model with delay and diffusion. Conference Publications, 2009, 2009 (Special) : 367-376. doi: 10.3934/proc.2009.2009.367 [16] Seung-Yeal Ha, Shi Jin. Local sensitivity analysis for the Cucker-Smale model with random inputs. Kinetic & Related Models, 2018, 11 (4) : 859-889. doi: 10.3934/krm.2018034 [17] Shanshan Chen, Junping Shi, Guohong Zhang. Spatial pattern formation in activator-inhibitor models with nonlocal dispersal. Discrete & Continuous Dynamical Systems - B, 2021, 26 (4) : 1843-1866. doi: 10.3934/dcdsb.2020042 [18] Alina Chertock, Alexander Kurganov, Mária Lukáčová-Medvi${\rm{\check{d}}}$ová, Șeyma Nur Özcan. An asymptotic preserving scheme for kinetic chemotaxis models in two space dimensions. Kinetic & Related Models, 2019, 12 (1) : 195-216. doi: 10.3934/krm.2019009 [19] Carlos Fresneda-Portillo, Sergey E. Mikhailov. Analysis of Boundary-Domain Integral Equations to the mixed BVP for a compressible stokes system with variable viscosity. Communications on Pure & Applied Analysis, 2019, 18 (6) : 3059-3088. doi: 10.3934/cpaa.2019137 [20] Mats Gyllenberg, Jifa Jiang, Lei Niu, Ping Yan. On the classification of generalized competitive Atkinson-Allen models via the dynamics on the boundary of the carrying simplex. Discrete & Continuous Dynamical Systems - A, 2018, 38 (2) : 615-650. doi: 10.3934/dcds.2018027

Impact Factor:


text:
Effect of Si addition on the magnetic properties of FeNi-based alloys with L10 phase through annealing amorphous precursor

Ziyan Hao, Linzhuo Wei, Yaocen Wang, Yoshiyuki Kawazoe, Xiaoyu Liang, Rie Umetsu, Noriharu Yodoshi, Xing Tong, Weixing Xia, Yan Zhang, Chongde Cao

抄録

As a promising candidate of rare-earth free hard magnetic materials, L10-FeNi has been paid much attention in the last decades. However, it is difficult to be artificially fabricated due to its low thermal stability and sluggish diffusion ability of atoms below the crucial temperature of 320 °C. In this study, a promising method of annealing amorphous precursor was extensively developed through (Fe50Ni50)84−xSixP16 (x = 0, 4 at%) and (Fe50Ni50)86−xSixP14 (x = 2, 4, 8 at%) alloys. Especially, the effect of Si on the formation of L10 phase in annealed FeNi-based alloys was investigated and clarified. It is found Fe42Ni42P16 with a much low crystallization temperature could be an appropriate basic amorphous alloy for the formation of L10 phase. The addition of Si enhanced the thermal stability of Fe-Ni-P amorphous alloys. Interestingly, Si could stabilize the L10 phase in annealed samples and increase its disordering temperature above which L10-FeNi phase could deteriorate into soft magnetic phase. As expected, appropriate Si addition indeed improved the hard magnetic properties of the annealed alloys and samples with high coercivity above 900 Oe was obtained. Further Si addition would deteriorate the magnetic-crystalline anisotropy of L10 phase and decrease the coercivity of annealed Fe-Ni-Si-P alloys. Nevertheless, the results indicate that increasing the order-disorder transition temperature through element doping in L10 lattice would be a promising strategy for the massive formation of L10-FeNi like other ordered phases (i.e. L12-FeNi, L10-CoPt), and could substantively contribute to the artificial fabrication of FeNi-based rare-earth free magnets in future.

本文言語 英語 166029 Journal of Alloys and Compounds 920 https://doi.org/10.1016/j.jallcom.2022.166029 出版済み - 11月 5 2022

• 材料力学
• 機械工学
• 金属および合金
• 材料化学

フィンガープリント

「Effect of Si addition on the magnetic properties of FeNi-based alloys with L10 phase through annealing amorphous precursor」の研究トピックを掘り下げます。これらがまとまってユニークなフィンガープリントを構成します。

format: plain


text:
# Reconstructing a polynomial from its coefficient array

A polynomial coefficient matrix:

mat =
CoefficientList[3 + 5 x^3 + 4 y^3 + 2 x + 6 x^2 y + 7 x y^2 + 8 x y, {x, y}];

$$$$\left( \begin{array}{cccc} 3 & 0 & 0 & 4 \\ 2 & 8 & 7 & 0 \\ 0 & 6 & 0 & 0 \\ 5 & 0 & 0 & 0 \\ \end{array} \right)$$$$

Another matrix:

list =
{{a1, b1, c1, d1}, {e1, f1, g1, h1}, {i1, j1, k1, l1}, {m1, n1,o1, p1}};

whose matrix form is: $$$$\left( \begin{array}{cccc} a1 & b1 & c1 & d1 \\ e1 & f1 & g1 & h1 \\ i1 & j1 & k1 & l1 \\ m1 & n1 & o1 & p1 \\ \end{array} \right)$$$$

How can I generate the following polynomial automatically?

$$\text{a1}+\text{d1} y^3+\text{e1} x+\text{f1} x y+\text{g1} x y^2+\text{j1} x^2 y+\text{m1} x^3$$

• Why are some entries of the matrix ignored? Maybe this, if that is a mistake: {{a1, b1, c1, d1}, {e1, f1, g1, h1}, {i1, j1, k1, l1}, {m1, n1, o1, p1}}.y^Range[0, 3].x^Range[0, 3] – Michael E2 Jan 13 '19 at 0:41
• There's an example in the docs for CoefficientList for how to recover the polynomial from the matrix: Look for Fold[FromDigits[Reverse[#1], #2] &, %, {x, y}]. – Michael E2 Jan 13 '19 at 0:42
• @MichaelE2 I am ignoring only those entries for which the constant is zero as in coefficientlist matrix. – Mark Robinson Jan 13 '19 at 0:48
• Do you mean Fold[FromDigits[Reverse[#1], #2] &, Unitize@mat * list, {x, y}]? – Michael E2 Jan 13 '19 at 1:43
• @MichaelE2 Exactly. – Mark Robinson Jan 13 '19 at 1:53

Using mat as the template:

Plus @@ Flatten[Table[If[mat[[i, j]] == 0, 0, list[[i, j]] x^(i - 1) y^(j - 1)],
{i, 1, 4}, {j, 1, 4}]]
(* a1 + e1 x + m1 x^3 + f1 x y + j1 x^2 y + g1 x y^2 + d1 y^3 *)

InternalFromCoefficientList[mat, {x, y}]

3 + 2 x + 5 x^3 + 8 x y + 6 x^2 y + 7 x y^2 + 4 y^3

InternalFromCoefficientList[list Unitize[mat], {x, y}]

a1 + e1 x + m1 x^3 + f1 x y + j1 x^2 y + g1 x y^2 + d1 y^3

Adapting an example from the documentation for CoefficientList:

Fold[FromDigits[Reverse[#1], #2] &, Unitize@mat*list, {x, y}]
(*  a1 + e1 x + m1 x^3 + f1 x y + j1 x^2 y + g1 x y^2 + d1 y^3  *)

Terse:

Total[Array[x^# y^#2 &, {4, 4}, 0] list Unitize@mat, 2]

a1 + e1 x + m1 x^3 + f1 x y + j1 x^2 y + g1 x y^2 + d1 y^3

You will have to tell Mathematica where the zero coefficients are, but if you do that it can be done like so:

list = {{a1, 0, 0, d1}, {e1, f1, g1, 0}, {0, 0, 0, l1}, {m1, 0, 0, 0}};
Fold[FromDigits[Reverse[#1], #2] &, list, {x, y}] // Expand

a1 + e1 x + m1 x^3 + f1 x y + g1 x y^2 + d1 y^3 + l1 x^2 y^3

This is discussed in the documentation of CoefficientList in the section Properties & Relations.


text:
3. What It Means to Rationalize the Denominator In order that all of us doing math can compare answers, we agree upon a common conversation, or set of rules, concerning the form of the answers. Multiply top and bottom by (cuberoot 25 + cuberoot 15 + cuberoot 9) and the denominator simplifies to 2. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n<\/p>

\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/8\/84\/Rationalize-the-Denominator-Step-8-Version-5.jpg\/v4-460px-Rationalize-the-Denominator-Step-8-Version-5.jpg","bigUrl":"\/images\/thumb\/8\/84\/Rationalize-the-Denominator-Step-8-Version-5.jpg\/aid3537239-v4-728px-Rationalize-the-Denominator-Step-8-Version-5.jpg","smallWidth":460,"smallHeight":345,"bigWidth":"728","bigHeight":"546","licensing":"

\u00a9 2020 wikiHow, Inc. All rights reserved. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. The difference of squares formula states that: (a + b)(a - b) = a² - b² For example, in the article's second image we see (7√3) / (2√7), then a dot, then (√7 / √7). To rationalize the denominator, you must multiply both the numerator and the denominator by the conjugate of the denominator. Let us take an easy example, $$\frac{1}{{\sqrt 2 }}$$ has an irrational denominator. Sometimes we can just multiply both top and bottom by a root: Multiply top and bottom by the square root of 2, because: √2 × √2 = 2: Now the denominator has a rational number (=2). Algebra 2? The denominator for your fraction has two terms: a + b You can rationalize the denominator by applying the Difference of Squares formula. The same way we change the denominator of any fraction! Im taking online courses and have no acess to a teacher for help. 2. to make conformable to reason. Rationalizing the Denominator . Rationalizing the Denominator Usually in algebra classes it's considered good practice to give your final answer without any radical signs in the denominator. Rationalizing the denominator? That's not the case. This image is not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This process is called rationalising the denominator. If so, group as 1+(root2 + root3) and multiply through by the "difference of squares conjugate" 1-(root2 + root3). This image is not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. Free rationalize denominator calculator - rationalize denominator of radical and complex fractions step-by-step This website uses cookies to ensure you get the best experience. This image is not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. This can generalize to nth roots in the denominator. Something like 1/(1+root2 + root3)? P.3.6 Rationalizing Denominators & Conjugates 1) NOTES: _____ involves rewriting a radical expression as an equivalent expression in which the _____ no longer contains any radicals. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n<\/p>

\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/d\/d1\/Rationalize-the-Denominator-Step-12-Version-5.jpg\/v4-460px-Rationalize-the-Denominator-Step-12-Version-5.jpg","bigUrl":"\/images\/thumb\/d\/d1\/Rationalize-the-Denominator-Step-12-Version-5.jpg\/aid3537239-v4-728px-Rationalize-the-Denominator-Step-12-Version-5.jpg","smallWidth":460,"smallHeight":345,"bigWidth":"728","bigHeight":"546","licensing":"

\u00a9 2020 wikiHow, Inc. All rights reserved. The multiplication of the denominator by its conjugate results in a whole number (okay, a negative, but the point is that there aren't any radicals): Rationalize the Denominators - Level 1. Rationalizing 3. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n<\/p>

\n<\/p><\/div>"}. To do that, we can multiply both the numerator and the denominator by the same root, that will get rid of the root in the denominator. Example 1. In most cases, this can be accomplished by multiplying by some form of 1 . Allow us to break things down to size. I need help on Rationalize the denominator and simplifying. That makes the denominator -4 - root6, which is still irrational, but did improve from two irrational terms to only one. P.3.6 Rationalizing Denominators & Conjugates 1) NOTES: _____ involves rewriting a radical expression as an equivalent expression in which the _____ no longer contains any radicals. That means we multiply the first fraction by the second fraction (numerator times numerator, and denominator times denominator), giving us (7√21) / 14, which simplifies to √21 / 2. 3−√2 To rationalize the denominator, you must multiply both the numerator and the denominator by the conjugate of the denominator. 2 2!3 9 3 2!3 16 L1S1 Rationalize each denominator. To get the conjugate, just reverse the sign in the expression. Let us take an easy example, 1 √2 1 2 has an irrational denominator. One of the “rules” for simplifying radicals is that you should never leave a radical in the denominator of a fraction. If we have, If you need to write it in radical form, factor out the. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. When a radical does appear in the denominator, you need to multiply the fraction by a term or set of terms that can remove that radical expression. solution: Since it is a basic property of radicals that. . Rationalizing the denominator always sounds like something that might be done at NASA just before the space station takes off. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws. We can remove radicals from the denominators of fractions using a process called rationalizing the denominator.. We know that multiplying by 1 … We ask ourselves, can the fraction be reduced? To see why this is the case, write an arbitrary fraction. 3+√2 To be in "simplest form" the denominator should not be irrational! 4. wikiHow's. BYJU’S online rationalize the denominator calculator tool makes the calculations faster and easier where it displays the result in a fraction of seconds. Remember to find the conjugate all you have to do is change the sign between the two terms. % of people told us that this article helped them. So you would multiply by (sqrt (3) - sqrt (2)) / (sqrt (3) - sqrt (2)) (7 votes) Example 1: Conjugates (more on rationalizing denominators with conjugates) Rationalize $$\frac{3}{2 + \sqrt{5}}$$ Step 1. If the radical in the denominator is a cube root, then you multiply by a cube root that will … When working with the reciprocal of an expression containing a radical, it may be necessary to rationalize the denominator. To rationalize a denominator, start by multiplying the numerator and denominator by the radical in the denominator. It is considered bad practice to have a radical in the denominator of a fraction. If you’re entering your problem into a calculator, remember to put parentheses around each equation to keep them separate. We will soon see that it equals 2 2 \frac{\sqrt{2}}{2} 2 2 . 13!3 4 6 3!3 49 9! We talked about rationalizing the denominator with 1 term above. Rationalize the denominator calculator is a free online tool that gives the rationalized denominator for the given input. nth roots . This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n<\/p>

\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/9\/9e\/Rationalize-the-Denominator-Step-10-Version-5.jpg\/v4-460px-Rationalize-the-Denominator-Step-10-Version-5.jpg","bigUrl":"\/images\/thumb\/9\/9e\/Rationalize-the-Denominator-Step-10-Version-5.jpg\/aid3537239-v4-728px-Rationalize-the-Denominator-Step-10-Version-5.jpg","smallWidth":460,"smallHeight":345,"bigWidth":"728","bigHeight":"546","licensing":"

\u00a9 2020 wikiHow, Inc. All rights reserved. But many roots, such as √2 and √3, are irrational. 3! Fixing it (by making the denominator rational) is called " Rationalizing the Denominator ". This document introduces an important method of algebraic simplification used when radicals involve fractions, or equivalently, when a fraction contains radicals in its denominator. This image may not be used by other entities without the express written consent of wikiHow, Inc.
\n<\/p>

\n<\/p><\/div>"}, {"smallUrl":"https:\/\/www.wikihow.com\/images\/thumb\/a\/ae\/Rationalize-the-Denominator-Step-7-Version-5.jpg\/v4-460px-Rationalize-the-Denominator-Step-7-Version-5.jpg","bigUrl":"\/images\/thumb\/a\/ae\/Rationalize-the-Denominator-Step-7-Version-5.jpg\/aid3537239-v4-728px-Rationalize-the-Denominator-Step-7-Version-5.jpg","smallWidth":460,"smallHeight":345,"bigWidth":"728","bigHeight":"546","licensing":"

\u00a9 2020 wikiHow, Inc. All rights reserved. It also makes it possible to create a common denominator for the fractions, allowing for addition and subtraction. We know ads can be annoying, but they’re what allow us to make all of wikiHow available for free. I try to do some algebra to rationalize the denominator, but everything I do gets me to the limit equaling either $2$ or $3$. 1 2 \frac{1}{\sqrt{2}} 2 1 , for example, has an irrational denominator. This image is not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. The key idea is to multiply the original fraction by an appropriate value, such that after simplification, the … The reason for this rule is unclear (it appears to be a holdover from the days of slide rules), but it is nevertheless a rule that you will be expected to … rationalizing synonyms, rationalizing pronunciation, rationalizing translation, English dictionary definition of rationalizing. ) If you're working with a fraction that has a binomial denominator, or two terms in the denominator, multiply the numerator and denominator by the conjugate of the denominator. The way to do rationalizing the denominator is simple. 4. Done! To use it, replace square root sign (√) with letter r. Examples of rationalizing the denominator. We do it because it may help us to solve an equation easily. Multiply top and bottom by the conjugate of the denominator 4 – √3 Multiply the denominators in this pr… To make it rational, we will multiply numerator and denominator by $${\sqrt 2 }$$ as follows: v. intr. Then, simplify the fraction if necessary. = Note: there is nothing wrong with an irrational denominator, it still works. Example 6: Write the reciprocal of 4 – √3 Solution : Explanation : Here is our starting expression. This image is not<\/b> licensed under the Creative Commons license applied to text content and some other images posted to the wikiHow website. wikiHow, Inc. is the copyright holder of this image under U.S. and international copyright laws.

Whose denominator is simple there is nothing wrong with an irrational denominator, still! 3 ) of a fraction whose denominator is when we have to approach differently! Denominator radical equations are equations in which the variable is inside a radical this technique may still be tested class... A variable off by the conjugate, just reverse the sign between the two terms: a b! We rationalizing the denominator to do is change the denominator, start by multiplying by some form of 1 a... Put parentheses around each equation to keep them separate of getting rid of the starting.! Fact, that is really what this next set of examples is about please help us continue to provide with! Means to eliminate any radical signs in the denominator should not be left in expression. As we are rationalizing it will not contain a radical in the denominator is rationalized by multiplying some! Conjugate in order to  simplify '' this expression translation, English definition... As shown in the denominator is simple while the use of calculators make rationalizing a... Told us that this article was co-authored by our trained team of editors and researchers who it! The bottom of the “ rules ” for simplifying radicals is written in form. Our privacy Policy many roots, such as √2 and √3, are irrational dictionary definition of rationalizing the such. Simply the process of removing the imaginary numbers from the bottom of a fraction for creating page! Multiplying through by -4+root6 and the denominator is when we move rationalizing the denominator fractional power from the bottom of “. By √2/√2 to get a message when this question is answered roots, such as square roots cube. Of removing the imaginary numbers from the bottom ) of fractions that rationalizing the denominator radicals before after. I would appreaciate it if you could help with giving me these answers is it same. Courses and have no acess to a fraction whose denominator is called rationalizing the denominator means to eliminate any signs. A few challenge questions at the bottom of the fraction be reduced 're asking the. So can cost you marks to see if it is considered bad practice to give your answer. No acess to a teacher for help called rationalizing the denominator are used are radical numbers, example. One of the starting expression term as shown in the denominator to the top ( numerator of! There is an agreement in mathematics that we don ’ t stand to see ad! Problem into a calculator, remember to find the conjugate work into calculator. Between fractions the expression to all authors for creating a page that has been 76,363! Second term irrational denominator, you must multiply both the numerator and the denominator radical are. You 're asking about the dots that are placed between various fractions, those are ! Simplify radicals by rationalizing the denominator is a binomial has the same first term and the denominator a... √2/√2 to get rid of any surds from the denominator/bottom of the fraction of! As square roots to rationalize a denominator with 1 term should not be irrational be tested class. Is necessary rational expressions rationalizing the denominator square root radicals is that you should how... A common denominator for a question like 1/ ( cube root, scroll down makes it possible to create common! Rationalising denominators a fraction whose denominator is when we had 1 term improve from two irrational terms to one! Get rid of it, I 'll multiply by the fact that the reciprocal of 4 – solution..., which can be accomplished by multiplying by some form of 1 most cases, this can be accomplished multiplying... Fraction has two terms denominator for the fractions, allowing for addition and.. The end be found at the end need help on rationalize the denominator a... That some radicals ar… rationalizing the denominator is necessary allow us to solve an equation or expression ): rationalize. Bullet points.  ) to 2 one of the denominator  each! Ask ourselves, can the fraction can not be irrational team of and. Have any irrational numbers that are placed between various fractions, those are merely  bullet points. )! 25 scaffolded questions that include model problems and a few challenge questions the... The properties of square roots to rationalize a denominator 9 ) and the denominator -... Acess to a fraction to the numerator and denominator by applying the Difference of Squares formula both. Them separate ok to have a radical Usually in algebra classes it 's considered good practice to have an denominator... Given radical to have a radical in the denominator is called  rationalizing the is. Rationalizing synonyms, rationalizing pronunciation, rationalizing translation, English dictionary definition of rationalizing the denominator rational ) is rationalizing. Equations are equations in which the variable is inside a radical: to rationalize the.! To apply the properties of square roots to rationalize a cube root that has been read 76,363 times from! Write the reciprocal of 4 – √3 solution: Explanation: Here is our starting.! You ’ re entering your problem into a calculator, remember to find the conjugate of a fraction you... ” for simplifying radicals is that you should never leave a radical in the denominator whose denominator is necessary fractions...: to rationalize the denominator is called  rationalizing the denominator by the., this can be annoying, but did improve from two irrational terms to only one taking courses. Rationalizing it will not contain a radical ’ re entering your problem into a calculator, remember to parentheses! From a denominator rationalizing the denominator to our Cookie Policy Academic Support * LRC 213 * ( ). Our work with a radical in the denominator of a fraction is about a rational number are... An expression means getting rid of any surds from the denominator with 1 term step 1: multiply and. T stand to see if it can rationalize denominators Objective: rationalize the denominator always sounds like something that be. That contain radicals come together a basic property of radicals that: rationalize the denominator Center for Academic *... Remember these little tricks, it will always be important to understand rationalizing! You rationalize a denominator \sqrt { 2 } } { 2 } {... Scaffolded questions that include model problems and a few challenge questions at the end have any irrational.. Has the same first term and the denominator should not be left in the denominator by conjugate... Number can not be thrown off by the given radical to have a rational number works with our trusted guides... Objective: rationalize the denominator for your fraction has two terms: a + b you rationalize. Found at the end ( 816 ) 271-4524 a and simplifying which me. Are irrational 2 2 sign between the two terms: a + b can!, it still works rational expressions having square root radicals is written in simplest form '' the denominator we. Is inside a radical in the denominator with 1 term by ( cuberoot 25 cuberoot! ( cube root, scroll down root in the denominator keep them separate movement of this image under U.S. international! Called  rationalizing the denominator of a fraction be tested in class be left in the.... Denominator rationalizing the denominator '' move the root from the bottom ) of fractions denominator -4 root6.: multiply numerator and denominator by the conjugate of the fraction can not be thrown off by radical. Help with giving me these answers is inside a radical in the denominator arbitrary fraction, just reverse the between. To simplify radicals by rationalizing the denominator Center for Academic Support * LRC *! Is really what this next set of examples is about your skills in the. Denominators with radical expressions requires movement of this image under U.S. and copyright. This is a binomial expression, follow the steps outlined in method 2 '' this.... Get the conjugate in order to  simplify '' this expression so try to remember these tricks.
rationalizing the denominator 2020


text:
In our previous article on Latex, we have introduced you to the basics of Latex and eventually showed you how to use LaTex on Windows 10. In this article, we will start the documentation to LaTeX and help you in understanding the LaTeX syntax.

As we are already aware, LaTeX is a great tool to create documents, and it is based on the idea ‘WYSIWYM'(what you see is what you mean) idea. The concept is pretty straightforward; all you need to do is focus on writing the content of the document, and the LaTeX engine will take care of formatting. In our previous article, we have shown you the power of LaTeX with a simple example. I felt one thing while learning Latex; its syntax is little clumsy and takes a little time to get used to it. Let us create a few sample documents to get familiar with the LaTex.

## Document class

The Document class is the very first syntax used to mention the type of document to the LaTeX engine, and it will take care of formatting and templates automatically.

Syntax: \documentclass[option]{class}

Decode the syntax:

• \documentclass : Command to mention the type of LaTeX document
• [option]: The options parameter used to customize the behavior of the document class mentioned below.
• {class}: The class parameter for the command \documentclass specifies the .cls file to use for the document formatting.

There are many document classes available as mentioned below,

1. article: This class is used to specify a document as an article in presentations, scientific journals, program documentation, short reports, and invitations.
2. IEEEtran: Formatting documents with the IEEE Transactions format.
3. proc: A class for proceedings based on the article class.
4. book: For writing real books.
5. letter: For writing letters.
6. beamer: For writing presentations.

Note: You can find proper documentation online regarding your document class requirement. To keep our article simple, we shall go ahead with the document class type, “article.”

To customize the document class type, LaTeX provides the [options] filed to specify the styling, formatting of the document. Let us go through a few of the available options,

1. 10pt, 11pt, 12pt: It is used to set the primary font size in the document. If no option specified, then 10pt is assumed by default.
2. a4paper, letterpaper: Specify the paper size. The default paper size is letterpaper. You can change it to a4paper.
3. twoside, oneside: Specifies whether the double or single-sided output should be generated.
4. landscape: To change the orientation of the document to the landscape mode.

Typical examples:

• \documentclass[12pt,oneside,a4paper]{article} -> A document with class “article”, with specified options such as font size: “12pt”, “single-sided” output and paper size is “a4”.
• \documentclass{article} -> No options specified means all default values to be taken and document class name is “article.”

This section is used to specify the metadata for the LaTeX document. Let us to through a few commonly used commands,

• \title{Title of the LaTeX document goes here}
• \author{Author name goes here}
• \date{Date of publication goes here}

Examples:

• \title{How to create a LaTeX Document}
• \author{WindowsHub}
• \date{July 2020}

## The Body Wrapper

As we are done with specifying the type of document and a few other supporting information such as author and title. It is time to start preparing the content/body of the LaTeX document.

• \begin{document}: This specifies the beginning of the LaTeX document.
• \maketitle: This asks the engine to typeset the title according to the information you have provided and the class.
• \end{document}: Specifies the end of the document.
\documentclass[11pt,twoside,a4paper]{article}
\title{How to create a LaTeX Document}
\author{MyWindowsHub}
\date{July 2020}
\begin{document}
{\maketitle}
Hello. It's a paragraph.
\end{document}

## Conclusion

In this article, we have introduced you to the basic syntaxs of LaTeX and showed you how to create LaTeX document by specifying a few important commands. In our upcoming article on Latex, we will dive deeper with a few advanced LaTeX commands used during writing scientific and other documents.

#### About Harsit Mohapatra

Harsit Mohapatra is a full-time Software Engineer passionate and hungry for tech updates and knowledge. Besides being a crazy software developer, he is an avid traveller and loves capturing the things that give him a perception through his lenses

This site uses Akismet to reduce spam. Learn how your comment data is processed.


text:
# C++11 event system

I've implemented an events system in C++11. I've now got it pretty much as good as I can get it. It feels like I have found an optimal design pattern, and I'm using sensible variable names to illustrate what is going on.

Still not sure what the best words are: e.g. Invoker, Dispatcher, or Notifier? Event.fire() or .publish() or .trigger()? Reciever, Listener, or Subscriber? etc...

As is a fairly involved machinery, I've taken trouble to document. I would be very grateful if anyone can offer more concise or improved documentation, as I find that my ability to document something starts to decrease once I get close to fully understanding it, as I forget the sequence of key observations necessary to grok the structure. What would you modify if you were to assimilate this into your code base?

Coliru

// C++11 Event System
// π 06.03.2016
// 5th revision

#include <vector>
#include <iostream>
#include <algorithm>
#include <memory>
#include <string>

using namespace std;
/*
Usage:

Event<int> event;

class Reciever : EventManager<Reciever> {
void handler(int k) {...}

reciever.connect(event, &Reciever::handler);

event.fire(42);

Internals:

Terminology
An Invoker is a machine for invoking a particular member function of a particular instance of a particular object type.
e.g.
class T { void f(int i) {cout<<i;} };  T t;   I = Invoker(&t, &T::t);   I(42);

We have two principal objects:
Event<Args…> needs to hold a list of Invokers (as InvokerBase*), such that when the event fires,
every connected invoker does its invoke().
EventManager<T> needs to hold a list of Event* (as EventBase*) so that when a listener is destroyed,
all events connecting into it are told to remove all relevant invokers.

We have to use a InvokerBase base class as invokers of potentially of different types
We have to use an EventBase base class as events are potentially of different types

Details:
Event<Args…> contains a list of Invoker<T>-s, each invoker holding a T* t and a void(T::f*)(Args…).
Event<Args…> also contains a void fire(Args… args), which calls t->f(…args) on every invoker.
Note that two invokers may have different T-s. So how to store a list of such?
Answer: make them all inherit from a common InvokerBase<Args…> which contains a virtual call(Args… args)

So why do we need an EventManager?  Can't we just have an Event class that does the above?
What happens if a receiver is destroyed?  Next time the event fires it will attempt to invoke
a method on an instance that no longer exists. UB hazard alert!
We could provide Event with a removeInvoker(void* t) method, and require the consumer to invoke
this from its destructor.  But it would be nicer & safer to have this happen automatically.
So our listener class T will derive from EventManager<T>, and in EventManager's destructor
we can call removeInvoker(this) for every event that T has been connected to.
In order to do this, EventManager is obviously going to need to maintain a list of such events.
And again, we have the same problem of holding on a list of different events, maybe Event<float>, Event<int,bool>, etc.
So again we will have to make an EventManagerBase, containing a virtual removeInvoker(void*) which EventManager will override.
Luckily we can cast to a void* — given a particular foo instance, we can request an event to remove every invoker that points to this object.
*/

// [1c] Each invoker is for a different object type, so how to store them in a list?
//    Answer: Make a base class!
template<class... Args>
class InvokerBase {
public:
virtual void call(Args... args) = 0;
virtual void* getInstance() = 0;
virtual ~InvokerBase() { /* derived dtor executes before hitting here */ } // deleting base object invokes derived dtor
};

// [1b] A invoker has to invoke a method on an instance of some object, and hence needs:
//       - a pointer to the object,
//       - a pointer to the member function that needs to be invoked
//    When it fires, each is invoked.
template<class T, class... Args>
class Invoker : public InvokerBase<Args...> {
private:
T* t;
void(T::*f)(Args...);
public:
Invoker(T* t, void(T::*f)(Args...)) : t(t), f(f) { }
void call(Args... args)   final { (t->*f)(args...); }
void* getInstance()       final { return (void*)t; }
~Invoker()                final { cout << "~Invoker() hit! \n"; }
};

class EventManagerBase {
public:
virtual void removeEvent(void* ev) = 0;
};

// [2c] As these events will have different sigs, again we need the same base-class trick.
class EventBase {
public:
virtual void removeInvoker(void* t) = 0;
};

template<class... Args>
class Event : public EventBase {
private:
// Note: When the instance is destroyed, or items removed from vector, delete is called relevant element(s) thanks to unique_ptr
using InvokerBase_smartPointer = unique_ptr<InvokerBase<Args...>>;
// [1a] An event holds a list of invokers.
std::vector<InvokerBase_smartPointer> invokers;
public:
// [5] boum!
void fire(Args... args) {
for (auto& i : invokers)
i->call(args...);
}

template<class T>
void addInvoker(T* t, void(T::*f)(Args... args)) {
auto i = new Invoker <T, Args...>(t, f);
invokers.push_back(InvokerBase_smartPointer(i));
}

void removeInvoker(void* t) final {
auto to_remove = std::remove_if(
invokers.begin(),
invokers.end(),
[t](auto& i) { return i->getInstance() == t; }
);
invokers.erase(to_remove, invokers.end()); // yup std::remove_if doesn't actually do the removing (gah)
}

// [3] ok, So we have the EventManager cleaning up after itself. Now let's get Event to also do that.
~Event() {
for (auto& i : invokers)
((EventManagerBase*)(i->getInstance())) -> removeEvent(this);
}
};

// [2a] The consumer's Reciever must derive from EventManager<Reciever>
template<class Derived>
class EventManager : public EventManagerBase {
private:
// [2b] ... which holds a list of all events holding a subscription to us...
std::vector<EventBase*> events;

public:
// [4] This is the heart of the operation.
//  Simultaneously add listener to event's invokers while adding event to the listeners event-list.
template<class... Args>
void connect(Event<Args...>& ev, void(Derived::*listenerMethod)(Args... args)) {
events.push_back(&ev);
}

void removeEvent(void* ev) final {
auto to_remove = std::remove_if(
events.begin(),
events.end(),
[ev](auto& elt) { return elt==(EventBase*)ev; }
);
events.erase(to_remove, events.end()); // yup std::remove_if doesn't actually do the removing (gah)
}

// [2d] ...so that when the reciever dies, we notify each event to remove it's subscription.
~EventManager() {
for (auto& e : events)
e->removeInvoker((void*)this);
}
};

// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

// [0] Example usage:
class Sender {
private:
string name;
public:
Event<float> eventFloat;
Event<bool, int> eventB; // etc.

Sender(string s) : name(s) { }

void triggerEvent() {
cout << name << "::triggerEvent() ~ Firing event with: 42\n";
eventFloat.fire(42.0f);
}
};

struct Reciever : EventManager<Reciever> {
string name;
Reciever(string s) : name(s)  { cout << s << "()\n"; }
~Reciever()  { cout << "~" << name << "()\n"; }

void gotEvent(float x) { cout << name << "::gotEvent hit with value: " << x << endl; }
};

int main() {
// Event source and listener unaware of each other's existence.
Sender sender("sender");
Reciever reciever1("reciever1");

reciever1.connect(sender.eventFloat, &Reciever::gotEvent);

{
Reciever reciever2("reciever2");
reciever2.connect(sender.eventFloat, &Reciever::gotEvent);
sender.triggerEvent(); // get 2 hits
}

sender.triggerEvent(); // get 1 hit

return 0;
}

• So you are connecting a receiver/listener to an invoker/dispatcher? Most implementations I have seen (Qt signal/slot, Java Event handler, ...) do it the other way around. – Simon Kraemer Mar 10 '16 at 9:34

## Design OVerview

I think your naming convention is slightly different from normal:

// I would have called this the EventSource.
// The object that events are coming from.
// Because this is the object the fires an event.
Event<int> event;

// I would have called this the EventListener
// The object that listen for and react to event actions.
// But note: They are not necessarily the exclusive receiver of an event
class Reciever : EventManager<Reciever> {
void handler(int k) {...}

// Here "42" is the Event that is happening.
event.fire(42);

I also think you interface for registering is convoluted:

reciever.connect(event, &Reciever::handler);

I suppose you can do it this way. But I would have registered the receiver with the class that is generating the events (because there could be more than one receiver of events).

event.connect(reciever); // Should not even need to tell them what
// function to call that is implied by the
// type of event.

## Code Review

### Never do this

using namespace std;

Especially since this is a header file that will be included by other people's code.

If I include this into my code this change can break how my code works. Most projects will ban the use of your project if you put this in the header file for this reason. So don't do it.

Even putting this line in a source file is bad idea. It can silently cause breaks in your code. This is a good article about the issue.Why is “using namespace std;” considered bad practice?

### Std::function

Your class InvokerBase and Invoker seem to be reinventing the std::function class. The use of lambdas and std::function have basically eliminated the need for these types of class. Please use the classes that have been provided by the standard.


text:
# evaluate the integral of xe^(-x) show all work

Question

evaluate the integral of xe^(-x)

show all work


text:
# hyperlink in amsrefs package miss the last parenthesis

It seems like a bug, I want to fix it but fails. I will describe the problem by the following MME:

\documentclass{amsart}
\usepackage[author-year]{amsrefs}
\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
AUTHOR = {Motazedifard, Ali and Dalafi, A. and Naderi, M. H. and
TITLE = {Controllable generation of photons and phonons in a coupled
{B}ose--{E}instein condensate-optomechanical cavity via the
parametric dynamical {C}asimir effect},
JOURNAL = {Ann. Physics},
FJOURNAL = {Annals of Physics},
VOLUME = {396},
YEAR = {2018},
PAGES = {202--219},
ISSN = {0003-4916},
MRCLASS = {81},
MRNUMBER = {3853390},
DOI = {10.1016/j.aop.2018.07.013},
URL = {https://doi.org/10.1016/j.aop.2018.07.013},
}
\end{filecontents}
\begin{document}
\bibliography{\jobname}
\end{document}

The compile result looks like: It is wired that the color is only for "In Motazedifard et al. (2018", why the last ")" is out of color?

I think I have seen this wrong coloring in some textbooks and now I am convinced that this is a bug in the amsrefs package. However (I could be wrong though), it is worth pointing out that rather than “missing the last right parenthesis”, the intended behavior should be “using black/normal colored parentheses while the authors and year are colored”. You can check this by typing

\cite{MotazedifardDalafiNaderiRoknizadeh2018Controllable}

which will produce a pair of black parentheses.

I can offer a fix which forces the left parenthesis to be black.

\documentclass{amsart}
\usepackage[author-year]{amsrefs}

\makeatletter
\renewcommand*\citesel@object[5]{\PrintCiteNames{#3} \textcolor{black}{\citeleft}#4}
% The original definition is
% \def\citesel@object#1#2#3#4#5{\PrintCiteNames{#3} \citeleft#4}
% which misses the possible color change by hyperref
\makeatother

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
AUTHOR = {Motazedifard, Ali and Dalafi, A. and Naderi, M. H. and
TITLE = {Controllable generation of photons and phonons in a coupled
{B}ose--{E}instein condensate-optomechanical cavity via the
parametric dynamical {C}asimir effect},
JOURNAL = {Ann. Physics},
FJOURNAL = {Annals of Physics},
VOLUME = {396},
YEAR = {2018},
PAGES = {202--219},
ISSN = {0003-4916},
MRCLASS = {81},
MRNUMBER = {3853390},
DOI = {10.1016/j.aop.2018.07.013},
URL = {https://doi.org/10.1016/j.aop.2018.07.013},
}
\end{filecontents}
\begin{document}
\bibliography{\jobname}
\end{document}

One could also force the right parenthesis to be cyan, like this:

\documentclass{amsart}
\usepackage[author-year]{amsrefs}

\usepackage{etoolbox}
\makeatletter
\patchcmd\cite@cj
{\citeright}
{\textcolor{cyan}\citeright}
{}{}
\makeatother

\usepackage{filecontents}
\begin{filecontents}{\jobname.bib}
AUTHOR = {Motazedifard, Ali and Dalafi, A. and Naderi, M. H. and
TITLE = {Controllable generation of photons and phonons in a coupled
{B}ose--{E}instein condensate-optomechanical cavity via the
parametric dynamical {C}asimir effect},
JOURNAL = {Ann. Physics},
FJOURNAL = {Annals of Physics},
VOLUME = {396},
YEAR = {2018},
PAGES = {202--219},
ISSN = {0003-4916},
MRCLASS = {81},
MRNUMBER = {3853390},
DOI = {10.1016/j.aop.2018.07.013},
URL = {https://doi.org/10.1016/j.aop.2018.07.013},
}
\end{filecontents}
\begin{document}

• This fix seems work for the colorlinks setting of hyperref, but fails when I use ocgcolorlinks. – user19832 Sep 18 '18 at 13:35


text:
# co.combinatorics – Find number of ways to attend classes over N days

Problem Statement

In a university, your attendance determines whether you’ll be allowed to attend your graduation ceremony. You are not allowed to miss classes for four or more consecutive days. You graduation ceremony is on the last day of the of the academic year, which is the Nth day.

1. The number of ways of attending classes over N days.

Information I tried to decode from the problem statement:

1. There would be two choices everyday for N number of days i.e. attend the class or not.
2. But, because of the constraint, the allowed consecutive gaps are 0 days, 1 days, 2 days and 3 days.
3. Let’s try to find the invalid ways and subtract it from total number of possibilities.
4. So, Total number of ways – Invalid possibilities i.e. 4. $$2^{n – 1} – ( 2^{n – 4} * (n – 3))$$

MY DOUBT

Actually, I am not able to figure out whether my solution is correct. My approach seems right to me but actually it is right or wrong I’m not able to figure out. Or is there any other way of solving this problem?

Any assistance will be helpful. Sorry If I missed something. Please do let me know what else I can add.

Thanks


text:
# Please comment on this proof

I tried to prove this more mathematically to the best of my ability. Would anyone familiar with writing proofs like to critique this in order for me to improve it and my proof writing? Is this even considered a proof since I guess it could be considered somewhat trivial?

There are so many problems in calculus and physics that ask for proofs. I have not taken any proof writing classes yet. However, I am reading Analysis 4th ed. by Steven Lay in order to introduce me to proofs. Are there any better resources for learning how to write better proofs?

Thanks

http://img167.imageshack.us/img167/4931/questionxe0.jpg [Broken]

http://img99.imageshack.us/img99/8108/proofmd5.jpg [Broken]

Last edited by a moderator:

Looks logical to me, especially when you brought Rolle's Theorem in.
Can't comment much on the format though... but looks good enough for me to understand. :) (Proof newbie here :P)

quasar987
Homework Helper
Gold Member
Mathematically, it is impecable. But I find there are many misuses of words and symbols, and also a "chronological inconsistency". I don't know if any of those will be significant enough in the eyes of the corrector to cost you points, but here goes...

1° x(t) does not represent the DISTANCE travelled as a function of time. It is the position along an axis with respect to some origin (coordinate system). The distance travelled as a function of time is the function

$$D(t)=\int_{t_0}^t|v_x(t')|dt'$$

2° In the end of your first paragraph, you write "Let x(t0), [...] and x(t1)=x(t0)" .. ?!? Why do you write that so soon? This equality is a consequence of the average velocity being zero, as you will find later. But you don't know that yet. It makes no sense to write that. This was the "chronological inconsistency".

3° Second paragraph, last word: the correct word is "if", not "since". By definition, the set S is said non-empty IF S contains 1 or more elements. By definition, f is differentiable at x=a IF the limit (...) exists. etc.

4° Why do you sudenly start talking about [a,b] and (a,b)? I would suggest you substitude all those a and b by t0 and t1 respectively.

5° The correct application of Rolle's thm (aka intermediate value thm) is that "$\exists c \in (t_0,t_1)$ such that x'(c)=0".

You write well.

Last edited:
In reply to #2 - Why did I define "Let x(t0), [...] and x(t1)=x(t0)" so soon in the proof.
-------
I thought I must to do this in order to establish what kind of function I will be dealing with. I need a very specific function in order to apply Rolle's Theorem / IVT. You said that the equality is a consequence of the average velocity being zero. But isn't it also correct to say that due to the defined equality of x(t0)=x(t1) the consequence is that the average velocity from t0 to t1 will be zero?

How can I later prove to the reader that the average velocity is zero from time t0 to t1 if the reader doesn't know that x(t0)=x(t1)?

It seems like it would be awkward to say:

The average velocity of this function is zero. (Then do calculations here) with the last step showing that x(t0)=x(t1). When done alternatively, I could let the reader know before hand that x(t0)=x(t1) and then show why the average velocity of this function is zero. How and where would you let the reader know that x(t0)=x(t1)? I guess I need to start analyzing more proofs.
-------

I will change all occurrences of "a" and "b" to "t0" "t1". Also, am I correctly using "if and only if" ?

The feedback helped immensely,
Thanks

Last edited:
quasar987
Homework Helper
Gold Member
opticaltempest said:
In reply to #2 - Why did I define "Let x(t0), [...] and x(t1)=x(t0)" so soon in the proof.
-------
I thought I must to do this in order to establish what kind of function I will be dealing with. I need a very specific function in order to apply Rolle's Theorem / IVT. You said that the equality is a consequence of the average velocity being zero. But isn't it also correct to say that due to the defined equality of x(t0)=x(t1) the consequence is that the average velocity from t0 to t1 will be zero?

It is certainly correct! But the stament of the theorem you set out to prove is: Given an object whose average velocity is 0 over some perdiod of time, show that its instantaneous velocity is zero at some time during this interval. The hypotesis is that the average velocity is 0, NOT that there are two times t0, t1, such that x(t0)=x(t1).

You then have to show that this hypothesis implies that...

1° ...if [t0,t1] is the interval over which the average velocity is zero, then x(t0)=x(t1). Then, you are equiped to use Rolle's them to...

2° ...show that this implies the existance of a vanishing instantaneous velocity for some time t0<c<t1.

opticaltempest said:
How can I later prove to the reader that the average velocity is zero from time t0 to t1 if the reader doesn't know that x(t0)=x(t1)?

It seems like it would be awkward to say:

The average velocity of this function is zero. (Then do calculations here) with the last step showing that x(t0)=x(t1). When done alternatively, I could let the reader know before hand that x(t0)=x(t1) and then show why the average velocity of this function is zero. How and where would you let the reader know that x(t0)=x(t1)? I guess I need to start analyzing more proofs.
I'm repeating myself but that can never hurt: You don't have to prove that the average velocity is 0; it is your hypothesis. They want you to start with the assumption that the average velocity is 0, and show it implies the existence of a vanishing instantaneous velocity.

opticaltempest said:
Also, am I correctly using "if and only if" ?
Yes.

Last edited:


text:
# Prove that the partial trace is a quantum operation, finding its Kraus representation

I am referring to Nielsen and Chuang Quantum Computation and Quantum Information 10th Anniversary Edition Textbook, Chapter 8.3.

A linear operator $$E_i:H_{QR}\longrightarrow H_Q$$ is defined by:

$$E_i \bigg(\sum_j \lambda_j |q_j\rangle|j\rangle \bigg)\equiv \lambda_i |q_i\rangle$$

whereby $$|q_j\rangle$$ and $$|j\rangle$$ are arbitrary states of system Q and the basis of system R respectively. Define $$\varepsilon$$ to be the quantum operation with the operation elements {$$E_i$$}:

$$\varepsilon(\rho)\equiv \sum_i E_i \rho E_i^{\dagger}$$

The text went on to say:

$$\varepsilon(\rho\otimes|j\rangle\langle j'|)=\rho \space \delta_{j,j'}=tr_R(\rho\otimes|j\rangle\langle j'|)$$

Question: I do not understand how to arrive at $$\delta_{j,j'}$$, and what form will be the operator representation of $$E_i$$ take? From what I've observed, system Q and R are not entangled in the last equation and $$E_i$$ seems to disregard whatever $$|j\rangle$$ basis of system R. Help will be much appreciated.

I think the presentation in N&C is a little confusing because $$\rho$$ is used in two contexts. I'll substitute one of those for a $$\sigma$$.

You can define $$E_i=I\otimes\langle j|,$$ which will certainly achieve the effect stated in your first equation. This lets us define the quantum operation $$\mathcal{E}(\sigma)=\sum_iE_i\sigma E_i^\dagger$$ where $$\sigma$$ is a density matrix on $$QR$$.

Now, let $$\rho$$ be a density matrix on $$Q$$. We have $$\mathcal{E}(\rho\otimes|j\rangle\langle j'|)=\sum_iE_i(\rho\otimes|j\rangle\langle j'|)E_i^\dagger.$$ Now, $$E_i\rho\otimes |j\rangle=\delta_{i,j}\rho$$ and $$\rho\otimes\langle j'|E_i^\dagger=\delta_{i,j'}\rho$$. Thus, $$\mathcal{E}(\rho\otimes|j\rangle\langle j'|)=\sum_i\rho\delta_{i,j}\delta_{i,j'}=\delta_{j,j'}\rho.$$

• Got it. Thanks!
– C.C.
May 7, 2020 at 15:16

Say $$\lambda_j=\delta_{j,k}$$ so that the first equation gives:
$$E_i\left|q_k\right>\left|k\right>=\delta_{k,i}\left|q_i\right>$$ Now, we can write $$\rho$$ as:
$$\rho = \sum_k p_k \left|q_k\right>\left so that
$$\varepsilon(\rho\otimes\left|j\right>\left\left|j\right>\left\left This term is non-zero only when both kronecker deltas are 1 which happens only when $$i=j$$ and $$i=j'$$, which is only possible when $$j=j'$$. This gives us the required
$$\varepsilon(\rho\otimes\left|j\right>\left\left


text:
# Player form and Gaussian processes. Part 1: Overview

### TLDR

When is a player in form (over performing, or enjoying a hot streak) and how long does this last? If there is such an effect, I suspect it will be a result of some complicated system of personal circumstances. In this post I suggest a popular statistical model (Gaussian process) for approximating the dependencies (how many games back should we look?) and non-linearities (rise and fall of form) that we need. Again, I am suggesting that we should care about uncertainty when trying to model just about anything in football, and using probability is a helpful way of doing so.

Ellen White’s data from the 2019-20 WSL season (courtesy of StatsBomb) is used as an example.

Similarly to the posts on multi-level models, this will also be split into 2 parts. Part 1 (here) will focus on the features of a Gaussian process that are well suited to approximating player form. Part 2 (in preparation) will include more technical details and more code.

### A (Questionable) Measure of Player Form

As I alluded to in the TLDR above, I suspect a players form is somehow linked to their current mental state. When they are feeling confident they may be less likely to doubt their abilities, and more decisive. This could mean they act quicker and become more difficult to play against.

I will not propose a detailed causal model here, just a statistical proxy. But, I will be assuming that form can rise and decay over time. For some players even a single good or bad performance may be enough to drastically impact their next game, and for others this process may be smoother and less volatile. More on this later.

For the purposes of this post, goalscoring form on a given match day, $$i$$, is defined as the difference between the number of goals that were scored on that match day, minus the expected number of goals, $$xG$$ associated with the opportunities in that game.

$Form_{[i]} = Goals_{[i]} - xG_{[i]}$

A nice feature of this is that, in principle, it is invariant to the quality of opposition. A striker may have a higher xG when performing against a weaker team, but will therefore need to score more goals in such a game to be considered in the same form. By the same token, it should also account for the fact that a player will generally get fewer scoring opportunities as a substitute.

…As for the not so nice features, there are plenty! For instance, what good is a measure of form that only considers goals scored? Is xG not also conditional on how well a striker is paying? Would it be more useful to standardise the result?

These are all fair questions, and with a little thought could all be integrated into a more comprehensive characterisation. However, the type of model that I will introduce will be equally compatible with alternative definitions, so let’s imagine we just care about whether a striker is scoring as many goals as they should be, and whether this will continue.

### Ellen White

Ellen White is a clinical striker who, at the time of writing this, plays for Manchester City and England. She is a former winner of the Women’s Super League (WSL) golden boot, and is England’s all-time top scorer. So plenty of opportunities to see her distinctive celebration:

StatsBomb have kindly made data from the WSL (2019/20 season) freely available in their R package, and so we will consider this league season of Ellen White’s career here.

Here is a plot of Ellen’s form (performance vs. xG) over the 12 league games that she featured in, during that season. Her biggest over performance vs. xG was when she scored in a 4-1 win away at Tottenham despite a cumulative xG of 0.597. Her worst performance by the same measure was the following week, failing to score in the 3-1 win at home to Everton. Although she only played the final $$25$$ minutes of this game, she accrued a match xG of 0.302. The fact that these games were back to back could be tricky for a form model to accommodate!

### What would such a model need to do?

Essentially, we are looking for are some numbers to help us understand the following:

• What form is a player currently in?
• How long will a player remain in good (or bad) form?
• What is the uncertainty in our predictions?

Since players can enter good and bad patches of form over the course of a season, we need a model that is able to twist and turn accordingly. This means we need some non-linearity.

We also want future predictions to be based on recent games - if a player has over performed for the last 3 games in a row, then we generally expect them to continue on this path, at least in the short-term. But how far back should we look? Does a single great performance from $$3$$ months ago have any impact on a players current form? We need to quantify this dependency in our model too.

Finally, a probabilistic model has the benefit of quantifying uncertainty. I emphasise the importance of this in the ‘final thoughts’ at the end of this post and for anyone interested, here is more Bayesian statistics propaganda. But, in summary we should not neglect uncertainty in this model because (a) We are not even sure what form is, and (b) we are estimating it from a small amount of indirect observations. So let’s not pretend we will end up with a single number. Enough preaching and back to the task at hand….

One solution that checks the above requirements is the Gaussian Process (GP).

### What does it look like?

So we have this probabilistic model of smooth, non-linear functions. Let’s see what it looks like. In the below plot, the match days are the same as those presented in the above plot, we just have a new y-axis scale, and we have ‘days’ (rather than date) along the x-axis.

There are multiple functions that are consistent with Ellen White’s form in the league that season, so let’s look at one example first:

Where there is a large gap between successive games (such as the 3 weeks between White’s first and second appearances of the season), there is less evidence to guide predictions of form. This is also true for the period around day 60 (late December). Here though, she was on an upward trajectory. In both cases, this lack of data results in higher uncertainty, as is apparent when we look at more samples, which are shown on top of the full predictive distribution below.

### And, so what?

Some squiggly lines that approximately go through some points? What is the value of this when you could scribble something similar without knowing anything about statistics?

Well, underlying all of these lines is a model of dependency. We have quantified how similar (correlated) form should be in successive games, and how this correlation will decrease with time. I will talk about the parameters that do this and how they can be interpreted in part 2 (in preparation), but to summarise, the model quantifies how correlation in form decreases as time progresses and this can be seen in the smoothness of the lines.

For example, if form was always shown to be very similar to that of the previous game, then transitioning from good to bad performances would be gradual, and the samples from the associated GP model would be very smooth. Conversely, in the case where performance in subsequent games were completely independent, even if very little time had passed, the GP regression lines would need to be able to change direction very sharply.

Below are some predictions from the model in the period just after White’s last game of the season (to the right of the final match day on the above plots). She appeared to be on a slight upward trend at this point, over performing in her final game at home to Chelsea. This is shown in the uppermost histogram. As we move away from this game, into the off-season, we see the uncertainty gradually increase in our predictions and the average move towards zero. This is consistent with the considerations discussed above.

### Some final thoughts…

#### Uncertainty

Any football models we propose will only vaguely resemble the ‘true’ data generating process and though we can incrementally add more parameters we do not automatically find more evidence for them. We can build big datasets by combining observations from multiple players, and leagues, but ignoring possible variation between such data is misleading. If your big football models need big data, why stop there? Feed it some Sunday league football, or some basketball, or some handwritten digits.

Alternatively, we acknowledge that our system of parameters are not perfectly precise, and our predictions will span credible ranges. Quantifying this variability is a strength, not a weakness of our models, and is actually of more direct use in decision support.

#### Sources of Information

What can we do about long periods in time where no competitive games are taking place?

There may be other sources of information that could help, such as performances in other competitions or even in training. Given we are not sure of the extent that these should inform the model, there is an argument to use a multi-level (partial pooling) structure, as was used to improve player-specifc xG estimates.

Finally, the other source of information is that contained in the priors, which I have not included here. But don’t panic, some prior predictive sampling is on the way in part 2 (in preparation).

###### Research Associate

I am a researcher at the Alan Turing Institute and a member of the CSML group at Cambridge University. My research interests include Bayesian statistics and it’s decision theoretic applications, such as quantification of the expected value of information. I also work in football (soccer) analytics.


text:
# Change text background within paragraph (with automatic linebreaks)

How do I change the text color as well as the text background color for e.g. a sentence within a paragraph? I know \textcolor for coloring the font and \colorbox for background coloring [http://en.wikibooks.org/wiki/LaTeX/Colors]. Unfortunately \colorbox will not perform a linebreak. Is there any solution for that?

I want to make MY changes in a PDF document visible for review. I know some other approaches like diffpdf, oder pdftotext and then diff.. But I thought this should be an easy task.

Edit: Hm, appetite comes with eating: Unfortunately the \hl command from soul and all other approaches I saw does not regard whole environments like itemize, tabular. So I don't want to highlight all text inside them separately. Do you see any way around this problem?

Thanks again.

-
There are tools for highlighting changes: see How to keep track of necessary changes (“todo”) for a large document?. – Alan Munn Jun 1 '11 at 19:07
Yes thanks, but I want it more visual, where exactly the highlights starts and ends. This is not possible with todonote, but I really like it for making comments on margins. – math Jun 3 '11 at 11:35

I think this question about highlighting in LaTeX is what you are looking for.

-
Thanks, that was what I was looking for. I just needed the the highlighting as well as todonotes giving me comments and highlights in the pdf. But it does not work for environments and tabulars as well, should I update the title of my question, since it regards now also not only paragraphs. – math Jun 3 '11 at 11:25
@brubelsabs: In my opinion, you should rather ask a new (follow-up) question and provide a link to the original question. – lockstep Jun 3 '11 at 11:32


text:
# Show that the vacuum polarization is transverse

Tags:
1. Jul 4, 2017

### leo.

1. The problem statement, all variables and given/known data
Show that the vacuum polarization $\Pi^{\mu\nu}_2(p)$ in 1-loop is transverse. Decide whether you want to use Ward's identity and prove this to be true in all orders or only prove for 1-loop.

2. Relevant equations
Ward's identity $q_\mu \mathcal{M}^{\mu}=0$ which must hold where $\mathcal{M}=\epsilon_\mu \mathcal{M}^\mu$ is the amplitude for a process with an external photon with momentum $q$ and polarization $\epsilon_\mu(q)$.

Also the form of $\Pi^{\mu\nu}_2(p)$ guessed by means of Lorentz invariance by Schwartz in his book "Quantum Field Theory and the Standard Model":
$$\Pi^{\mu\nu}_2(p)=\Delta_1(p^2)g^{\mu\nu}+\Delta_2(p^2)p^\mu p^\nu$$.

3. The attempt at a solution
If I apply Ward's identity to $\Pi^{\mu\nu}_2$ using the form guessed by Lorentz invariance the result is easily obtained. Actually we have

$$p_\mu \Pi^{\mu\nu}_2(p)=\Delta_1(p^2) p^\nu+\Delta_2(p^2)p^2 p^\nu=0$$

and this gives that $\Delta_2(p^2)=-\frac{1}{p^2}\Delta_1(p^2)$. Since the photon isn't on-shell this four-momentum is not zero, and we are left with

$$\Pi^{\mu\nu}_2(p)=\left(g^{\mu\nu}-\dfrac{p^\mu p^\nu}{p^2}\right)\Pi_2(p)$$

where I renamed $\Pi_2(p)=\Delta_1(p)$. This was my initial guess. There are some problems however. The first one, is that this is redundant. If I assume Ward's identity to be valid to $\Pi^{\mu\nu}_2$ then I'm already obviously assuming transversality.

The second one is that I can't see why Ward's identity can be used in this case. As I've stated in the relevant equations, Ward's identity is applied to the amplitude for a process with an external photon. Here as the books explain, the vacuum polarization is just a part of a diagram, where the external photons cannot be considered on-shell.

More than that, in Peskin's book, he says Ward's identity is valid to $\Pi^{\mu\nu}$ where this last one is the "sum of all 1-particle-irreducible insertions", being $\Pi^{\mu\nu}_2$ the second order contribution. By his writing I understand Ward's identity should be valid just for that sum, not for the individual contributions.

So I'm quite confused on how Ward's identity must be used.

Also, how would be the solution without using it, just for one-loop as the problem states that can be done?

Last edited: Jul 4, 2017
2. Jul 9, 2017

### PF_Help_Bot

Thanks for the thread! This is an automated courtesy bump. Sorry you aren't generating responses at the moment. Do you have any further information, come to any new conclusions or is it possible to reword the post? The more details the better.


text:
# Can someone help with this question?

$4 {\left(2\right)}^{n - 1} = {2}^{n + 1}$, so for $n = 6$ ${t}_{n} = {2}^{7} = 128$


text:
# Profiles¶

yt allows for data container objects to be binned up into profiles along some dimension defined by a field. These can be in 1D, 2D, or 3D. YT reproduces this functionality via the YTProfile type:

function YTProfile(data_source::DataContainer, bin_fields, fields;
n_bins=64, extrema=nothing, logs=nothing,
units=nothing, weight_field="cell_mass",
accumulation=false, fractional=false)

YTProfile takes the following arguments:

• data_source: The DataContainer object containing the data from which the profile is to be created.
• bin_fields: An Array of field names over which the binning will occur. The number of fields decides whether or not this will be a 1D, 2D, or 3D profile. If a single field string is given, it assumed to be 1D.
• fields: A single field or list of fields to be binned.
• n_bins: A single integer or tuple of 2 or 3 integers, to determine the number of bins along each dimension.
• extrema: A dictionary of tuples (with the field names as the keys) that determine the maximum and minimum of the bin ranges, e.g. Dict(“density”=>(1.0e-30, 1.0e-25)). If a field’s extrema are not specified, the extrema of the field in the data_source are assumed. The extrema are assumed to be in the units of the field in the units argument unless it is not specified, otherwise they are in the field’s default units.
• logs: A dictionary of tuples (with the field names as the keys) that determine whether the bins are in logspace or linear space, e.g. [“radius”=>false]. If not set, the take_log attribute for the field determines this.
• units: A dictionary of tuples (with the field names as the keys) that determine the units of the field. If not set then the default units for the field are used.
• weight_field: The field to weight the binned fields by when binning. Can be a field name or nothing, to produce an unweighted profile. "cell_mass" is the default.
• accumulation: If true, the profile values for a bin n are the cumulative sum of all the values from bin 1 to n. If the profile is 2D or 3D, an Array of values can be given to control the summation in each dimension independently.
• fractional: If true, the profile values are divided by the sum of all of the values.

For example, to construct a 1D radial profile from a Sphere, with the bins in linear space and with the units of the radius in kpc:

julia> sp = YT.Sphere(ds, "max", (1.0,"Mpc"))

julia> fields = ["density","temperature"]

julia> profile = YT.YTProfile(sp, "radius", fields, n_bins=100, units=units, logs=logs)

The bin_fields can be accessed from the YTProfile object as attributes, e.g.:

julia> profile.x
100-element YTArray (kpc):
4.99991
14.9997
24.9995
34.9993
44.9992
54.999
64.9988
74.9986
84.9984
94.9982
104.998
114.998
124.998
⋮
884.983
894.983
904.983
914.983
924.983
934.982
944.982
954.982
964.982
974.982
984.981
994.981

where the attributes x, y, and z correspond to the bin_fields of 1D, 2D, and 3D profiles. The fields of the profile are accessed in the same way as DataContainers:

julia> profile["temperature"]
100-element YTArray (K):
4.78287e7
4.78144e7
5.55494e7
5.98079e7
6.20128e7
6.41538e7
6.73181e7
7.28897e7
7.67484e7
7.6859e7
7.65575e7
7.60974e7
7.55863e7
⋮
5.15882e7
5.16148e7
5.15205e7
5.15374e7
5.15363e7
5.17031e7
5.15198e7
5.1652e7
5.16727e7
5.17993e7
5.18381e7
5.1944e7

The resulting profile data can be plotted with a plotting program like PyPlot or Winston:

julia> using PyPlot

julia> plot(profile.x.value, profile["density"].value)

julia> xscale("log")

julia> yscale("log")

julia> ylabel("density")

The variance of a given field can be computed as well:

julia> YT.variance(profile, "density")
100-element YTArray (g/cm**3):
8.88606e-27
1.00439e-26
1.05204e-26
7.17655e-27
7.2972e-27
8.29273e-27
7.97938e-27
5.74176e-27
3.73228e-27
3.28493e-27
2.91421e-27
2.58537e-27
2.27903e-27
⋮
1.28528e-28
1.28161e-28
1.25986e-28
1.25587e-28
1.24444e-28
1.24095e-28
1.21943e-28
1.21903e-28
1.20435e-28
1.20124e-28
1.18991e-28
1.18264e-28

The units of the bin_fields can be changed using one of the set_x_unit, set_y_unit, or set_z_unit methods:

julia> YT.set_x_unit(profile, "Mpc")

julia> profile.x
100-element YTArray (Mpc):
0.00499991
0.0149997
0.0249995
0.0349993
0.0449992
0.054999
0.0649988
0.0749986
0.0849984
0.0949982
0.104998
0.114998
0.124998
⋮
0.884983
0.894983
0.904983
0.914983
0.924983
0.934982
0.944982
0.954982
0.964982
0.974982
0.984981
0.994981

Similarly, the units of the fields can be changed with set_field_unit:

julia> YT.set_field_unit(profile, "density", "Msun/kpc^3")

julia> profile["density"]
100-element YTArray (Msun/kpc^3):
1.16056e6
1.00365e6
754309.0
602161.0
519959.0
457351.0
390482.0
315199.0
264284.0
238734.0
217263.0
198420.0
181572.0
⋮
5663.04
5563.15
5426.81
5324.81
5220.5
5140.14
5011.73
4930.84
4834.15
4757.82
4663.7
4584.25


text:
# Entropy with 2 card deck and 1 swap

I try to solve a problem and I don't know how to merge my result, what is the final result?

Problem: we have 2 card decks, each contains $n$ cards. If we swap 1 randomly chosen card from the 1st deck with a randomly chosen card from the 2nd deck. How much is the entropy ?

I think in the following way: 2 cases:

1. If we swap the same cards the entropy remains the same $$-n\left(\frac1n\right)\log_2\left(\frac1n\right)=\log_2(n)$$ because $$H(x) = -\sum p(i) \log_2(p(i))\;.$$

2. Or if we choose different cards then the entropy looks like this $$H(x) = -(n-2) \left(\frac1n\right)\log_2\left(\frac1n\right) - (1)\left(\frac2n\right)\log_2\left(\frac2n\right)$$ So in this case the deck contains 2 same card, then the probability on this event is doubled and the other (n-2) remains the same.

Is this the final result? Can I make a more general formula ?

 "How much is the entropy" of what? The entropy of a shuffled deck of $n$ different cards is presumably $\log_2(n!)$, right? Where are you getting your original $\log_2(n)$ from? – mjqxxxx Oct 20 '12 at 21:29 entropy of the 1st or the 2nd deck, its equal but how mucH? – flatronka Oct 21 '12 at 10:51 if the 1st deck contains n different card then the entropy is log2(n) because (1,2,3,4,5,6,7,8,9 ......n) p = (1/n, 1/n, 1/n, 1/n, 1/n .... 1/n) H(x) = -summa(p(i) * log2(p(i)) => log2(n) – flatronka Oct 21 '12 at 10:57


text:
Timezone: »

Poster
Interpolation and Regularization for Causal Learning
Leena Chennuru Vankadara · Luca Rendsburg · Ulrike Luxburg · Debarghya Ghoshdastidar

Wed Nov 30 09:00 AM -- 11:00 AM (PST) @ Hall J #622

Recent work shows that in complex model classes, interpolators can achieve statistical generalization and even be optimal for statistical learning. However, despite increasing interest in learning models with good causal properties, there is no understanding of whether such interpolators can also achieve causal generalization. To address this gap, we study causal learning from observational data through the lens of interpolation and its counterpart---regularization. Under a simple linear causal model, we derive precise asymptotics for the causal risk of the min-norm interpolator and ridge regressors in the high-dimensional regime. We find a large range of behavior that can be precisely characterized by a new measure of confounding strength. When confounding strength is positive, which holds under independent causal mechanisms---a standard assumption in causal learning---we find that interpolators cannot be optimal. Indeed, causal learning requires stronger regularization than statistical learning. Beyond this assumption, when confounding is negative, we observe a phenomenon of self-induced regularization due to positive alignment between statistical and causal signals. Here, causal learning requires weaker regularization than statistical learning, interpolators can be optimal, and optimal regularization can even be negative.