text:
# SIMD product of a 4×4 matrix and a vector

I wrote a matrix class for use in a ray tracer. I already have a 'scalar' version up and running, but now I'm trying to rewrite it to use Intel SIMD Instrinsics. I realize my compiler (clang-7.0.0) will probably generate code that is at least as fast as mine (chances are, it's going to be faster), but I'm doing this because I enjoy it, and because I find it interesting to think about things like this.

This is my version of a matrix-vector product. The matrix has a fixed dimension of 4x4, the vector has a fixed dimension of 4. I was wondering if I could take a different approach to make this function even faster?

My matrix class is set-up like this:

class alignas(16 * sizeof(float)) matrix
{
private:
union
{
struct
{
__m256 ymm0;
__m256 ymm1;
};

float data [16];
};

...

public:
...
}

ymm0 stores rows 0 and 1, ymm1 holds rows 2 and 3.

My simd_vec4 class is just contains a single __m128 called xmm that's aligned to 16 bytes (4 * sizeof(float)). The vector stores its components in the as {x, y, z, w}.

Here's my reasoning for the algorithm:

1. We basically need to perform 4 dot products; so the first thing I do is broadcast my 4-float vector to an 8-float vector with the same 4 floats in every lane.

2. Now, we perform the necessary multiplications, these only carry a data dependency with the vector from step 1, so they can be parallelized/out-of-order'ed.

3. (a) The next step is to reduce our 16 floats down to 4 floats. We do this by first performing 1 horzontal reduction on each of our 2-lane vectors, and then swapping lanes in one of them.

(b) The second portion of our reduction operation is to merge our two 2-lane vectors into one 2-lane vector, due to the way our data is laid out, we get the same data in both lanes (different order, but we need to fix that anyway...).

4. We now extract only the lower lane, because it has all the data we need.

5. Finally, we shuffle some data around in the lower lane to put the right components in the right places.

And here's the code:

simd_vec4 operator*(const simd_mat4& lhs, const simd_vec4& rhs) noexcept
{
// ymm0    = [        A                 B                 C                 D        ][        E                 F                 G                 H        ]
// ymm1    = [        I                 J                 K                 L        ][        M                 N                 O                 P        ]
__m256 broadcast = _mm256_set_m128(rhs.xmm, rhs.xmm);               // Vec     = [         x                 y                 z                 w       ][         x                 y                 z                 w       ]
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
__m256 xy_m256 = _mm256_mul_ps(lhs.ymm0, broadcast);                // xy_m256 = [        Ax                By                Cz                Dw       ][        Ex                Fy                Gz                Hw       ]
__m256 zw_m256 = _mm256_mul_ps(lhs.ymm1, broadcast);                // zw_m256 = [        Ix                Jy                Kz                Lw       ][        Mx                Ny                Oz                Pw       ]
//-------------------------------------------------------------------------------------------------------------------------------------------------------------
__m256   acc0  = _mm256_hadd_ps(xy_m256, zw_m256);                  // acc0    = [     Ix + Jy           Kz + Lw           Ax + By           Cz + Dw     ][     Mx + Ny           Oz + Pw           Ex + Fy           Gz + Hw     ]
__m256   acc1  = _mm256_hadd_ps(zw_m256, xy_m256);                  // acc1    = [     Ax + By           Cz + Dw           Ix + Jy           Kz + Lw     ][     Ex + Fy           Gz + Hw           Mx + Ny           Oz + Pw     ]
acc1  = _mm256_permute2f128_ps(acc1, acc1, 0x01);          // acc1    = [     Ex + Fy           Gz + Hw           Mx + Ny           Oz + Pw     ][     Ax + By           Cz + Dw           Ix + Jy           Kz + Lw     ]
__m256 merged  = _mm256_hadd_ps(acc0, acc1);                        // merged  = [Ex + Fy + Gz + Hw Mx + Ny + Oz + Pw Ix + Jy + Kz + Lw Ax + By + Cz + Dw][Ax + By + Cz + Dw Ix + Jy + Kz + Lw Mx + Ny + Oz + Pw Ex + Fy + Gz + Hw]
__m128    vec  = _mm256_extractf128_ps(merged, 0);                  //  vec    =                                                                          [Ax + By + Cz + Dw Ix + Jy + Kz + Lw Mx + Ny + Oz + Pw Ex + Fy + Gz + Hw]
vec  = _mm_shuffle_ps(vec, vec, _MM_SHUFFLE(2, 1, 3, 0)); //  vec    =                                                                          [Mx + Ny + Oz + Pw Ix + Jy + Kz + Lw Ex + Fy + Gz + Hw Ax + By + Cz + Dw]

return simd_vec4(vec);
}

I'm running this code on an Intel Core i7-5500U CPU @ 2.40GHz, so the allowed extensions are SSE4.1, SSE4.2, AVX2 (and below, I'm assuming).

Any advice is welcome, but one thing I do struggle with is coming up with meaningful names for the intermediate results, if anyone has any tips, you're more than welcome!

I've written two unit test so far, and both are passing (both are 'normal' cases though, I'm working on adding more 'edge' cases)

Here's the unit test code (I use Catch2 btw):

TEST_CASE("matrix * vec4", "[simd_matrix][vec4][multiplication][product]")
{
Math::matrix mat;
Math::simd_vec4 vec;

// First test case, tested by writing out all operations
constexpr std::array<float, 16> TEST_CASE_1 =
{0,  1,  2,  3,
4,  5,  6,  7,
8,  9,  10, 11,
12, 13, 14, 15};

for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
const int arrayIdx = (i * 4) + j;

mat(i, j) = TEST_CASE_1[arrayIdx];
}
}

vec = Math::simd_vec4(1.0f, 3.0f, 2.0f, 5.0f);

Math::simd_vec4 result   = mat * vec;
Math::simd_vec4 EXPECTED_1 = Math::simd_vec4(
(0.0f * 1.0f)  + (1.0f * 3.0f)  + (2.0f * 2.0f)  + (3.0f * 5.0f),
(4.0f * 1.0f)  + (5.0f * 3.0f)  + (6.0f * 2.0f)  + (7.0f * 5.0f),
(8.0f * 1.0f)  + (9.0f * 3.0f)  + (10.0f * 2.0f) + (11.0f * 5.0f),
(12.0f * 1.0f) + (13.0f * 3.0f) + (14.0f * 2.0f) + (15.0f * 5.0f));

CHECK(result.x == Approx(EXPECTED_1.x));
CHECK(result.y == Approx(EXPECTED_1.y));
CHECK(result.z == Approx(EXPECTED_1.z));
CHECK(result.w == Approx(EXPECTED_1.w));

// Second test case, checked with Wolfram Alpha (https://www.wolframalpha.com/input/?i=%7B%7B1,+7,+23,+-5%7D,%7B0,+-9,+-5,+1%7D,%7B2,+6,+-3,+8%7D,%7B-1,+8,+11,+-5%7D%7D+*+%7B-7,+5,+-3,+1%7D)
constexpr std::array<float, 16> TEST_CASE_2 =
{1, 7, 23, -5,
0, -9, -5, 1,
2, 6, -3, 8,
-1, 8, 11, -5};

for (int i = 0; i < 4; i++)
{
for (int j = 0; j < 4; j++)
{
const int arrayIdx = (i * 4) + j;
mat(i, j) = TEST_CASE_2[arrayIdx];
}
}

vec = Math::simd_vec4(-7, 5, -3, 1);
Math::simd_vec4 EXPECTED_2 = Math::simd_vec4(-46, -29, 33, 9);
result   = mat * vec;

CHECK(result.x == Approx(EXPECTED_2.x));
CHECK(result.y == Approx(EXPECTED_2.y));
CHECK(result.z == Approx(EXPECTED_2.z));
CHECK(result.w == Approx(EXPECTED_2.w));
}

For those that are interested: The full code can be found here: Header, Implementation. Should you have any problems building, here's my CMakeLists.txt.

Edit: I quickly got a gist setup, it's got 5 files (2 for the matrix, 2 for the vector and 1 for main) along with a shell script that contains the command I used to compile this.

The example code runs the first test case. If any of the results are wrong, the error will be written to stderr.

• Hello, is it possible for you to publish the matrix class in its entirety, or a reduced version that will allow me to run operator*? – Dair Nov 27 '18 at 20:56
• I added the necessary links to the bottom of the post, I'll get to work on a more minimal version. – shmoo6000 Nov 27 '18 at 21:01
• @shmoo6000 minimal is explicitly discouraged here. We are not stack overflow. We need coffee in its entirety in order to review it effectively. – bruglesco Nov 27 '18 at 21:43
• I could address mat4 x vec4 (which is an interesting problem in its own right) but are you sure you want to SIMDify that axis of your program? AFAIK the state of the art is still centered around ray packets and minor variants, which among other advantages allows SIMD to be applied in a more natural way – harold Dec 11 '18 at 15:54
• @harold Thanks for the tip, but I'm already pretty far along the project, and the class I'm taking is an introductory class on computer graphics. It is also the last class on the subject I'll take, so I'd like to keep things simple for now. – shmoo6000 Dec 14 '18 at 19:45

An issue with that code is that while it tries to pack the data to make efficient use of arithmetic throughput, actually arithmetic throughput is high anyway and it's the shuffles (including horizontal addition which has two shuffles internally) that are relatively expensive. Shuffles don't all have a low latency either, cross-slice shuffles such as vperm2f128 take 3 cycles, so it's easy to accidentally build up a large delay that way.

So, as far as I know, efficient single-vector mat4 x vec4 is still based on broadcasting the elements of the vector, multiplying that by columns of the matrix, and adding up the results (compilers tend to merge the add/mul into FMA if allowed). This would cost 4 shuffles pre-AVX or if the vector comes in a register, and potentially zero shuffles with AVX if the vector comes from memory, since a broadcast-from-memory has a "free shuffle" (it's just a load, and broadcasts for free, rather than going to the shuffle unit, though pre-AVX512 a broadcast-load cannot be a memory operand to an arithmetic operation). For example:

__m128 transform4(__m128* mat4, float *vec4) {
__m128 x = _mm_set1_ps(vec4[0]);
__m128 y = _mm_set1_ps(vec4[1]);
__m128 z = _mm_set1_ps(vec4[2]);
__m128 w = _mm_set1_ps(vec4[3]);

__m128 p1 = _mm_mul_ps(x, mat4[0]);
__m128 p2 = _mm_mul_ps(y, mat4[1]);
__m128 p3 = _mm_mul_ps(z, mat4[2]);
__m128 p4 = _mm_mul_ps(w, mat4[3]);

}

With Clang 7, AVX2 enabled:

transform4(float __vector(4)*, float*):                 # @transform4(float __vector(4)*, float*)
vbroadcastss    xmm1, dword ptr [rsi + 4]
vbroadcastss    xmm2, dword ptr [rsi + 8]
vbroadcastss    xmm3, dword ptr [rsi + 12]
vmulps  xmm0, xmm0, xmmword ptr [rdi]
vfmadd231ps     xmm0, xmm1, xmmword ptr [rdi + 16] # xmm0 = (xmm1 * mem) + xmm0
vfmadd231ps     xmm0, xmm2, xmmword ptr [rdi + 32] # xmm0 = (xmm2 * mem) + xmm0
vfmadd231ps     xmm0, xmm3, xmmword ptr [rdi + 48] # xmm0 = (xmm3 * mem) + xmm0
ret

This has a decent throughput, one transform every four cycles in the best case as it is, and better in a loop with the loads from the matrix factored out of the loop (hopefully a compiler can do that but better check the asm to make sure). The FMAs are tied together though (by Clang!), so the latency is not the greatest. Therefore it is best to batch transforms as much as reasonably possible, or otherwise latency could be reduced at the cost of an extra addition (and loss of source-level compatibility for pre-FMA processors)

__m128 transform4(__m128* mat4, float *vec4) {
__m128 x = _mm_set1_ps(vec4[0]);
__m128 y = _mm_set1_ps(vec4[1]);
__m128 z = _mm_set1_ps(vec4[2]);
__m128 w = _mm_set1_ps(vec4[3]);

__m128 p1 = _mm_mul_ps(x, mat4[0]);
__m128 p2 = _mm_fmadd_ps(y, mat4[1], p1);
__m128 p3 = _mm_mul_ps(z, mat4[2]);
__m128 p4 = _mm_fmadd_ps(w, mat4[3], p3);

}

These approaches don't scale well to wider SIMD..

With 8 SoA vectors to work with though, we can switch to broadcasting the matrix elements and doing 16 multiplications, which halves the number arithmetic instructions per transform. Since the matrix is being broadcasted from, its format is now free to choose, while this time the vector format is constrained. For example (not tested):

void transformBatch8(float *mat4, float *v) {
__m256 m00 = _mm256_set1_ps(mat4[0]);
__m256 m01 = _mm256_set1_ps(mat4[1]);
__m256 m02 = _mm256_set1_ps(mat4[2]);
__m256 m03 = _mm256_set1_ps(mat4[3]);
__m256 m10 = _mm256_set1_ps(mat4[4]);
__m256 m11 = _mm256_set1_ps(mat4[5]);
__m256 m12 = _mm256_set1_ps(mat4[6]);
__m256 m13 = _mm256_set1_ps(mat4[7]);
__m256 m20 = _mm256_set1_ps(mat4[8]);
__m256 m21 = _mm256_set1_ps(mat4[9]);
__m256 m22 = _mm256_set1_ps(mat4[10]);
__m256 m23 = _mm256_set1_ps(mat4[11]);
__m256 m30 = _mm256_set1_ps(mat4[12]);
__m256 m31 = _mm256_set1_ps(mat4[13]);
__m256 m32 = _mm256_set1_ps(mat4[14]);
__m256 m33 = _mm256_set1_ps(mat4[15]);
__m256 y = _mm256_load_ps(v + 8);
__m256 z = _mm256_load_ps(v + 16);
__m256 w = _mm256_load_ps(v + 24);


text:
# In a moving coil galvanometer, torque on the coil can be experessed as tau = ki, where i is current through the wire and k is constant . The rectangular coil of the galvanometer having number of turns N , area A and moment of interia I is placed in magnetic field B. Find
 (a) k in terms of given parameters N,I,A andB
 (b) the torsion constant of the spring , if a current i_(0) produces a deflection of (pi)//(2) in the coil .
 (c) the maximum angle through which the coil is deflected, if charge Q is passed through the coil almost instaneously. ( ignore the daming in mechinal oscillations).

Step by step solution by experts to help you in doubt clearance & scoring excellent marks in exams.

Updated On: 24-5-2021

Apne doubts clear karein ab Whatsapp par bhi. Try it now.

(a) The torque acting on the coil of moving coil galvanometre is
 tau=NiAB
 Given tau=ki
 ki=NiAB implies k=NBA
 (b) If C is torsional constant of the spring of galvanometre, then
 tau=C theta
 Ni_0AB=C(pi/2) implies C=(2NBAi_0)/pi
 (c) If q_m is the maximum deflection, then from conservation of energy
 1/2C theta^_m^2=1/2Iomega^2 implies theta_m=sqrt(I/C) omega.....(i)
 we have tau=NiAB Put tau=(dL)/(dt) where L is angular momentum.
 (dL)/(dt)=N((dQ)/(dt))AB or dL=NABdQ
 Integrating int_0^LdL=NABint_0^QdQ implies L=NABQ
 If omega is angular velocity,
 Put L=Iomega
 Iomega=NABQ
 omega=(NABQ)/I....(ii)
 Subtituting this value in Eq. (i), we get
 theta=sqrt(I/C). (NABQ)/I=(NBAQ)/({sqrt((2NABi_0I)/pi)}) =Qsqrt((piNAB)/(2Ii_0)).

format: plain


text:
• The exclusive charmonium production process in $\bar{p}p$ annihilation with an associated $\pi^0$ meson $\bar{p}p\to J/\psi\pi^0$ is studied in the framework of QCD collinear factorization. The feasibility of measuring this reaction through the $J/\psi\to e^+e^-$ decay channel with the PANDA (AntiProton ANnihilation at DArmstadt) experiment is investigated. Simulations on signal reconstruction efficiency as well as the background rejection from various sources including the $\bar{p}p\to\pi^+\pi^-\pi^0$ and $\bar{p}p\to J/\psi\pi^0\pi^0$ reactions are performed with PandaRoot, the simulation and analysis software framework of the PANDA experiment. It is shown that the measurement can be done at PANDA with significant constraining power under the assumption of an integrated luminosity attainable in four to five months of data taking at the maximum design luminosity.
• Simulation results for future measurements of electromagnetic proton form factors at \PANDA (FAIR) within the PandaRoot software framework are reported. The statistical precision with which the proton form factors can be determined is estimated. The signal channel $\bar p p \to e^+ e^-$ is studied on the basis of two different but consistent procedures. The suppression of the main background channel, $\textit{i.e.}$ $\bar p p \to \pi^+ \pi^-$, is studied. Furthermore, the background versus signal efficiency, statistical and systematical uncertainties on the extracted proton form factors are evaluated using two different procedures. The results are consistent with those of a previous simulation study using an older, simplified framework. However, a slightly better precision is achieved in the PandaRoot study in a large range of momentum transfer, assuming the nominal beam conditions and detector performance.
• The main characteristics of the COMPASS experimental setup for physics with hadron beams are described. This setup was designed to perform exclusive measurements of processes with several charged and/or neutral particles in the final state. Making use of a large part of the apparatus that was previously built for spin structure studies with a muon beam, it also features a new target system as well as new or upgraded detectors. The hadron setup is able to operate at the high incident hadron flux available at CERN. It is characterised by large angular and momentum coverages, large and nearly flat acceptances, and good two and three-particle mass resolutions. In 2008 and 2009 it was successfully used with positive and negative hadron beams and with liquid hydrogen and solid nuclear targets. This article describes the new and upgraded detectors and auxiliary equipment, outlines the reconstruction procedures used, and summarises the general performance of the setup.
• ### Soft x-ray magnetic circular dichroism of LaCoO$_{3}$, La$_{0.7}$Ce$_{0.3}$CoO$_{3}$, and La$_{0.7}$Sr$_{0.3}$CoO$_{3}$ films: Evidence for Co valency-dependent magnetism and magnetic anisotropy(0908.4015)

Aug. 27, 2009 cond-mat.str-el
Epitaxial thin films of undoped LaCoO$_{3}$\@, of electron-doped La$_{0.7}$Ce$_{0.3}$CoO$_{3}$\@, and of hole-doped La$_{0.7}$Sr$_{0.3}$CoO$_{3}$\@ exhibit ferromagnetic order with a transition temperature $T_{\rm{C}}$ $\approx$ 85 K, 22 K, and 240 K, respectively. The spin-state structure for these compounds was studied by soft x-ray magnetic circular dichroism at the Co $L_{2,3}$ and O $K$ edges. It turns out that a higher spin state of the Co$^{3+}$ ions is responsible for the magnetism in LaCoO$_{3}$\@ while for La$_{0.7}$Ce$_{0.3}$CoO$_{3}$ the Co$^{3+}$ ions are in a low-spin state and the ferromagnetism is predominantly determined by Co$^{2+}$\@. For La$_{0.7}$Sr$_{0.3}$CoO$_{3}$\@, on the other hand, the magnetism originates from higher spin states of Co$^{3+}$ and Co$^{4+}$\@. Moreover, a strong magnetic anisotropy is observed for all systems.
• ### Suppression of spin-state transition in epitaxially strained LaCoO_{3}(0807.3424)

July 22, 2008 cond-mat.str-el
Epitaxial thin films of LaCoO_{3} (E-LCO) exhibit ferromagnetic order with a transition temperature T_c = 85 K, while polycrystalline thin LaCoO_{3} films (P-LCO) remain paramagnetic. The temperature-dependent spin-state structure for both E-LCO and P-LCO was studied by x-ray absorption spectroscopy at the Co L_{2,3} and O K edges. Considerable spectral redistributions over temperature are observed for P-LCO. The spectra for E-LCO, on the other hand, do not show any significant changes for temperatures between 30 K and 450 K at both edges, indicating that the spin state remains constant and that the epitaxial strain inhibits any population of the low-spin (S = 0) state with decreasing temperature. This observation identifies an important prerequisite for ferromagnetism in E-LCO thin films.


text:
# Show that union of ascending chain of subgroups is subgroup

## Homework Statement

Let $H_1 \le H_2 \le \cdots$ be an ascending chain of subgroups of $G$. Prove that $H = \bigcup\limits_{i=1}^{\infty} H_{i}$ is a subgroup of $G$.

## The Attempt at a Solution

Certainly $H$ is nonempty, since each subgroup $H_i$ has at least the identity element. Now, let $a,b \in H$. Then $a \in H_i$ where $i$ is taken to be minimal. Also $b \in H_j$, where $j$ is taken to be minimal. WLOG suppose that $i \le j$. Then $H_i \subseteq H_j$ and so $a,b \in H_j$. Then since $H_j$ is a subgroup, $ab^{-1} \in H_j \subseteq H$, and so $ab^{-1} \in H$.

Related Calculus and Beyond Homework Help News on Phys.org
fresh_42
Mentor

## Homework Statement

Let $H_1 \le H_2 \le \cdots$ be an ascending chain of subgroups of $G$. Prove that $H = \bigcup\limits_{i=1}^{\infty} H_{i}$ is a subgroup of $G$.

## The Attempt at a Solution

Certainly $H$ is nonempty, since each subgroup $H_i$ has at least the identity element. Now, let $a,b \in H$. Then $a \in H_i$ where $i$ is taken to be minimal. Also $b \in H_j$, where $j$ is taken to be minimal. WLOG suppose that $i \le j$. Then $H_i \subseteq H_j$ and so $a,b \in H_j$. Then since $H_j$ is a subgroup, $ab^{-1} \in H_j \subseteq H$, and so $ab^{-1} \in H$.
Correct.


text:
If theta is an acute angle and sintheta=1/2, then what is costheta?

Jan 3, 2017

$\frac{\sqrt{3}}{3}$
${\cos}^{2} a + {\sin}^{2} a = 1$
${\cos}^{2} t = 1 - {\sin}^{2} t = 1 - \frac{1}{4} = \frac{3}{4}$
$\cos t = \pm \frac{1}{\sqrt{3}} = \pm \frac{\sqrt{3}}{3}$
$\cos t = \frac{\sqrt{3}}{3}$


text:
# Shortcut of Calendar and Clocks

Shortcut 87:
Using the odd days
Question:
Find the day of birth of MS Dhoni (7 July, 1981), if 31 Dec 1999 is Friday
Days after 7/7/1981 in 1981 = 177
Odd days by normal years from 1982 to 1999 = 14
Odd days by leap years = 4 x 2 = 8
Total odd days = 177 + 14 + 8 = 199
Remainder of 199/7 = 3
Since last day is Friday, MSD’s birth day is 3 days before Friday,
MSD’s day of birth = Tuesday.

Clocks
Shortcut 88:
Minute hand and Hour hand overlapping

$\frac{60h}{11}$

Question:
At what time between 3pm and 4pm, the hour hand and the minute hand will be overlapping?
h = starting time = 3
Time at which the hands will be overlapping,
= (60 x 3)/11
= 180/11
= 16.36 minutes after 3pm
= 03h 16m 21s

Shortcut 89:
Two hands at angleƟ
12/11(5h$\pm$0/6)
Question:
At what times between 1pm and 2pm the hour hand and minute hand will be 30 degrees apart?
h = 1
Ɵ = 30
Substitute the values in the above formula, we get
(12/11)[(5 x 1) ± (30/6)]
= (12/11)(5 + 5) , (12/11)(5 – 5)
= 10.9 minutes past 1, 0 minutes past 1
= [01h 10m 54s] and [01h 00m 00s]

Shortcut 90:
Two hands M minutes apart
$\frac{12}{11}(5h\pm M)$
Question:
At what times between 5pm and 6pm the hour hand and minute hand will be 10 minutes apart?
h = 5
M = 10
Substitute the values in the above equation, we get
(12/11)[(5 x 5) ± 10]
= (12/11)(25+10) and (12/11)(25 – 10)
= 38.18 minutes past 5 and 16.36 minutes past 5
= [05h 38m 10s] and [05h 16m 20s]

#### siva

Register New Account
##### Compare items
• Total (0)
0
ARE YOU READY? GET IT NOW!
Increase more than 500% of Email Subscribers!
Your Information will never be shared with any third party.
ARE YOU READY? GET IT NOW!
Get Weekly Current Affairs Magazine to your inbox.
Your Information will never be shared with any third party.
CURRENT AFFAIRS THAT MATTERS TO YOU
Get Weekly Current Affairs Magazine to your inbox.


text:
# Life and the Second Law

Beyond its application in neuroscience, <NAME>’s free energy principle appeals to the physicist in me, because it starts from a very elegant homeostatic (and autopoetic) argument.

It is based on the assumptions that (1) living organisms can be described as stochastic dynamical systems which are (approximately) ergodic, i.e. which possess some kind of attractor, and that (2) these systems are isolated from their environment via a Markov blanket, i.e. that there is a separation of the world into internal, external and boundary (sensory and active) states.

But how do such systems form? There are nice articles from Prof. Friston and colleagues, showing that these systems emerge under very generic circumstances (i.e. Life as We Know It, A Free Energy Principle for a Particular Physics).

Besides these works, there are exciting developments in the field of non-equilibrium thermodynamics related to the question of how living and adaptive systems form. An emerging view seems to be that in contrast to the widely held belief that life is an improbable “fight against entropy”, as it was coined by <NAME> in 1944, it is rather just the opposite. The seemingly unlikely, delicate structures of life might have just emerged to facilitate nature’s drive to increase entropy, following the second law of thermodynamics.

One of the likely origins of this misconception might be the way that entropy is usually described in everyday language, namely as “disorder”. This is only part of the truth. I will try to explain this more clearly by first giving an intuitive introduction to the concept of entropy and the second law of thermodynamics. Building on this, I will try to give a more formal definition, which can be used to develop some intuition on why spontaneously emerging ordered states, which allow a system to dissipate energy stored in macroscopic variables into heat, thereby increasing entropy, might actually be thermodynamically favoured, and thus very likely. Then I will try to (quickly) summarise or at least point to some relevant recent work in the field of non-equilibrium thermodynamics trying to understand the origin of life. Finally, I will argue (vaguely), that the emerging, living systems have to fulfil the basic assumptions required by the free energy principle.

## 1. Demystifying Entropy

Let’s start with the basics: Entropy is a quantity that even some physicists feel a little bit puzzled by. In my personal opinion, it should be better called “heat”, since it is pretty much the quantity that is described by this word in everyday language. Unfortunately, “heat” already has another very specific, technical meaning in physics, so we can not just change the name of the quantity to make it more familiar.

We’ll define entropy later in exact terms, but for now just stick with what you’d call “heat” in everyday life. This is because then, the second law of thermodynamics coincides with our everyday experience in many cases.

The second law of thermodynamics states, that in a closed system, i.e. a system which cannot exchange matter or energy with its environment, entropy can never decrease. When entropy stays constant, the associated processes are reversible, when it increases, the associated processes are irreversible.

Imagine we observe a small, red ball rolling down from the edge of a symmetric, smooth valley. Further imagine that the whole system is closed, i.e. cannot exchange matter or energy with its surroundings (think of a very well isolated, air-tight box). The initial situation is pictured here:

Now imagine, there is no friction. A good approximation would be an incredibly smoothly rolling ball on a perfectly smooth slope in a vacuum. In this case, the ball might rise to (almost) the same height on the opposite side of the valley, turn there and roll back to (almost) its initial position. If I were to record a video of the process and play it forwards and backwards, I couldn’t tell which was the right direction. Here’s what that might look like:

Now imagine that there is quite some friction between the ball, the slope (e.g. a real ball rolling down a grassy hill), and the air around it. The ball will roll down the valley and ascend a bit on the opposite side, but it will not even come close to its initial height. From there, it will roll back towards its starting position, but I will climb even less this time. After only a few of these iterations, it will settle at the bottom of the valley.

If I were to record a video of this process, everyone would instantly spot if I played it backwards. It just never happens (without any magic trick or external force involved) that a ball sitting at the bottom of a valley suddenly begins moving, acquiring more and more momentum and rolling higher and higher up the slope. Just watch the following illustration:

So apparently somehow the friction involved in the second process gives it a direction of time and makes the second process irreversible. Why is this?

In the first, reversible process the energy stored in the macroscopic variables, i.e. the position and the velocity of the ball, is almost exactly conserved. This is because there is no friction, which could brake the rolling ball by taking away some of the kinetic energy and transforming it into heat. Thus, the ball can rise to the same height on the opposite side of the valley, since energy only ever gets converted from macroscopic potential energy to macroscopic kinetic energy and back.

In contrast, in the second process, the friction transforms the usable, kinetic energy of the ball into heat, which is distributed in the environment, increasing the temperature of the ball, the slope and the surrounding air. This increase in temperature effectively increases the mean kinetic energy of the individual particles (i.e. atoms and molecules), which make up the ball, slope and air around it. This allows these particles to move and vibrate in more ways than before, as a physicist you’d say it allows them to access a larger volume of microscopic states in their state space (i.e. the space of possible microscopic configurations). This increase in the number of possible ways in which the microscopic particles can be arranged in terms of their position, velocities, vibrational states and so forth, which can macroscopically not be discerned (you just notice that the ball and the slope and the air get warmer, but you can’t exactly say in which way the individual particles are moving at any moment) is exactly the increase in entropy, which makes the process irreversible. Although energy is not lost (remember: we are talking about a closed system, i.e. there is an airtight, well isolated box around the slope, ball and the surrounding air), it is transformed from a macroscopic, usable form, to a microscopic form which cannot be used to push the ball up the slope (what a physicist would call “to do work”). Just try to imagine how unlikely it would be for the about $10^{23}$ microscopic particles, all moving or jiggling around in different directions, to spontaneously fluctuate in a spatially and temporally correlated way, so that they could push the ball around. This is about as likely as the water in a glas spontaneously cooling down and jumping out of it. It is theoretically possible, but the actual probability is infinitely small, so that even if you’d observe millions of glasses of water during the whole life of the universe, you’d still not see that happening.

Thus, in principle one could say that processes, during which a certain kind of friction occurs, which transports energy from macroscopic (say the position or velocity of the ball) to microscopic (say the mean kinetic energy of the individual atoms and molecules) variables, and which thereby increases the entropy (i.e. the number of indistinguishable microscopic states in which the atoms and molecules can be arranged and in which they can move) of the combined system, are irreversible. It is somehow intuitive, that the opposite direction, i.e. a spontaneous cooling of both ball and slope coinciding with the ball rolling upwards, due to a coincidental correlated motion of about $10^{23}$ individual atoms or molecules, will never happen.

## 2. Some more formal definitions

### 2.1 Entropy

We follow the nice and more in depth discussion of the modern formulation of the second law, given in the awesome paper by <NAME>, <NAME> and <NAME>.

An elegant way to formulate the second law is due to Boltzmann. He defined the entropy of a macroscopic state of a closed system as the number of microscopic arrangements of the constituents of this system, i.e. the individual atoms and molecules, that are consistent with a given set of values of the observed macroscopic variables, which define the macroscopic state. So the entropy $S(m)$ of a macroscopic state $m$ is defined as

$S(m) = k \ln W(m)$

Here $k$ is the Boltzmann constant and $W(m)$ is the volume (or the count) of all microscopic states which are compatible with the values of the macroscopic state variables characterising $m$.

Think of a very simple, closed system with only two macroscopic states, $A$ and $B$. Imagine the microscopic phase space could be sketched in two dimensions like this:

The different shades of grey depict the phase space volumes that correspond to the values of the macroscopic state variables, which define the two states $A$ and $B$. If the system is initialised in state $A$, but if there is no constraint on the macroscopic variables forcing the system to stay in this state, the microscopic states will just start to explore the phase space, performing a random walk. Finally, after a certain time (which depends on the actual details of the microscopic dynamics) the system will settle in its thermodynamic equilibrium, in which the probability of finding the system in any accessible microscopic state will be uniform. Thus, as there are many more microscopic states equating to macroscopic state $B$ than to macroscopic state $A$, one will find the system almost surely in macroscopic state $B$.

### 2.2 Information Theoretic Perspective

Please bear in mind that in this blog post, when I say “entropy”, I mean the special case of the thermodynamic entropy of a closed system. Entropy can be defined in a more general way for every probability distribution $p(x)$ on a (measurable) space $X$. It is defined as the expected value of the negative logarithm of the probability density. I.e. if $X$ was a finite, discrete set, it could be calculated as

$H(p) = -\sum_{x\in X} p(x) \log p(x)$

This quantity is also called the Shannon entropy, after <NAME>, who introduced it in the context of information theory. It looks complicated, but it is just a measure of how spread out the probability density is, e.g. how much about the system we don’t know  due to its randomness. Another way to see it is as the average surprise $-\log p(x)$ when observing samples $x$ from this distribution. Calling $-\log p(x)$ “surprise” makes sense, as you will be more surprised if you observe an element $x$, which is less likely, i.e. which has a small probability $p(x)$. It can be shown (try it) that the entropy of a distribution on a discrete, finite set is maximised, when the probability mass is spread out evenly over all elements $x$, i.e. when we know a priori nothing about which element $x$ we will observe, when we draw from the distribution. Put plainly, the entropy of a fair dice is maximal, as we don’t know which outcome we’ll observe, and the entropy declines when somebody tinkers with the dice to bias it towards a certain outcome.

Now we can calculate the maximum entropy of a discrete distribution $p(x)$, which could represent the macroscopic state $m$ of a system on a discrete microscopic state space, which has access only to a finite, discrete set  $W$ of microscopic states. In this case, the probability for every state is equal to $p(x) = \frac{1}{N_W}$, where $N_W$ is the number of states in $W$. Thus, the value of the entropy $H(p)$ is

$H(p) = -\sum_{x\in X} \frac{1}{N_W} \log \frac{1}{N_W} = - N_W\frac{1}{N_W} \log \frac{1}{N_W} = -\log \frac{1}{N_W} = \log N_W$

So if a system maximises its Shannon entropy on a finite discrete set of states, the value of the Shannon entropy is just the number of states it has access to. In the continuous case, in which the distribution $p(x)$ just represents the macroscopic state $m$ of a system, which has access only to a finite volume $W(m)$ of its microscopic phase space, we can replace the summation above with an integral and we find that the resulting value of the maximum Shannon entropy is just the volume $W(m)$ of the microscopic phase space to which the system has access. Thus, we see that we can recover Boltzmann’s definition by interpreting $p(x)$ as the probability density on the space of possible microstates of a closed thermodynamic system, which corresponds to a macrostate $m$ that has access only to a finite volume $W(m)$ of the state space and by positing that in thermal equilibrium the Shannon entropy of this probability density will be maximised. In this way, the information theoretic ($H$, Shannon) and classical ($S$, Boltzmann) definitions of entropy and the second law coincide (modulo the Boltzmann factor $k$, which just depends on the units in which you calculate the entropy).

On the other hand, the entropy of an arbitrary probability distribution on a discrete, finite set $X$ is minimised, when there is no randomness and we know exactly, which state $x^*$ we will observe. In this case all the probability mass is concentrated on this state. Therefore $p(x) = 1$ if $x = x^*$ and $p(x) = 0$ otherwise. The resulting entropy is

$H(p) = -\sum_{x\in X} p(x) \log p(x) = - p(x^*) \log p(x^*) = -1 \log 1 = 0$

Thus, if we manage to build a dice that always lands with the same side up, the entropy of the resulting probability distribution will be minimal and have a value of zero.

Please note that in the continuous case, the differential entropy that you get when you replace the sum with an integral over a probability density can also be less than zero. Just so you can’t say I didn’t warn you, when you do your own calculations.

So the take-away from this section should be that an information theoretic quantity called “entropy” can be calculated for any probability distribution and quantifies how spread out this distribution is on its underlying space, e.g. how much we don’t know about the system described by this distribution, due to its randomness. If we calculate the maximum value of this information theoretic entropy for the special case of a probability distribution on a microscopic state space of a closed, thermodynamic system, which represents a macroscopic state at thermal equilibrium, we recover Boltzmann’s classical formula (modulo the Boltzmann constant $k$) for the thermodynamic entropy of a closed thermodynamic system.

Finally, a quick word of caution for people familiar with <NAME>’s free energy principle: In this literature (e.g. Action and Behavior: A Free Energy Formulation,  Perceptions as Hypotheses, Saccades as Experiments), the word entropy usually refers to the information theoretic (Shannon) entropy of some clearly defined distributions (e.g. on sensory states, hidden states, some counterfactual density) and usually does not refer to the thermodynamic entropy. Also, in the next section we will talk about thermodynamic free energy, which is a different quantity from the information theoretic, variational free energy which lends its name to the free energy principle. I’m just stressing this here to prevent possible confusion due to the fact that entropy and free energy can mean different things in different contexts.

### 2.3 Thermodynamic Free Energy

As described in the initial example above, a very good way to increase $W(m)$ is to increase the energy stored in the microscopic variables. E.g. the increase in the mean kinetic energy of the atoms and molecules making up the ball, the air and the slope due to friction allows the atoms and molecules to move, jiggle or vibrate in many more different ways. In this process of transforming energy from macroscopic (i.e. the position of the ball) to microscopic (i.e. the mean kinetic energy of the atoms and molecules) variables, the “usable” energy in the system decreases. This is why the ball can and will not roll up the slope again after it has settled at the bottom of the valley. The energy, which is “free to use” to do work on macroscopic objects, is called free energy. It can be defined as the total energy in the system, which is constant for a closed system, minus the disordered energy in the microscopic variables, which can be calculated as the product of entropy times temperature. But please be aware of the fine print: Energy stored in terms of temperature can very well be used to do work, but only if there are objects at a different temperature. E.g. one could use a hot rock to boil a pot of water and use the resulting steam to move a macroscopic piston. But this only works if the water and the rock have not equilibrated yet, i.e. if there is still some kind of macroscopic disequilibrium in which free energy can be stored. As soon as thermodynamic equilibrium is reached and thus  the rock and the water are at the same temperature, there will be no free energy left to do macroscopic work in the system.

Thus, the free energy of a system decreases as its entropy increases. In fact, one can formulate the second law by saying that in a closed system free energy cannot increase over time, and that spontaneously occurring, irreversible processes are associated with a decrease in free energy. Please look at chapter one of this nice paper by <NAME> and <NAME>, for a mathematical argument why this is the case.

Now everyone who is familiar with <NAME>’s “Free energy principle” has to be very careful. We are talking about the thermodynamic free energy now, which is a completely different quantity than the variational free energy, used to do approximate Bayesian inference in machine learning and (putatively) also in the brain. The name just derives from the fact that the latter has a functional form very similar to the former, and that the variational formalism was indeed invented by Richard Feynman to approximately solve problem in theoretical physics.

### 2.4 Entropic Forces

Starting with the discussion of the inclined plane in school, most people are used to to energetic forces. These are forces that arise due to the gradient of an energy function, often also called a potential function or just potential. Examples are the electric forces drawing electrons through wires due to the potential difference created by a battery in simple circuits, or the force of gravity. Think again of our red ball on the slope, who’s acceleration and de-acceleration is simply due to the gradient in its gravitational potential function, which just happens to be the slope at its current position. However, many seemingly familiar forces actually arise not from the drive to decrease potential energy, but from a gain in entropy. A very familiar example is the force pulling a rubber band back together when you stretch it. In its relaxed state, the long polymers making up the band can curl up and wiggle in many more ways, compared to when they are all stretched in parallel. Thus, the force pulling the band back together is not the potential energy of the molecular bonds, which would have a very different characteristic, but indeed the potential increase in entropy, i.e. the increased volume of the accessible microscopic phase space in the relaxed state. And even seemingly more familiar forces, such as the force created by an expanding gas pushing on a cylinder, are in fact of entropic origin. A very insightful, and mathematically explicit discussion of entropic forces is given in this excellent blog post by <NAME>.

## 3. Entropy and Complexity

Interestingly, our universe started with the Big Bang in a state of very low entropy, i.e. with a tremendous amount of “usable” free energy. So far, no one knows exactly why. However, this initial low-entropy state, together with the second law of thermodynamics, i.e. the universe’s drive to increase entropy, was actually the driving force for the development of many complex structures in the universe. From galaxy clusters, galaxies and individual stars to planets, climate and plate tectonics. All these delicate structures formed because they allowed the universe to decrease its free energy, i.e. to increase its total entropy.

The key here are results from <NAME> and coworkers. Prigogine won the 1977 nobel prize for his work on the non-equilibrium thermodynamics of dissipative structures. One of his main insights can be summarised by this quote from Kondepudi & Prigogine (2006): “One of the most profound lessons of non-equilibrium thermodynamics is the dual role of irreversible processes: as destroyers of order near equilibrium and as creators of order far from equilibrium”, which I found in the great paper by <NAME>, <NAME>, and <NAME>.

With order, they mean complex structures, as opposed to a homogeneous distribution of matter. A nice way to look at this is in terms of equilibrium and disequilibrium. Technically, a state of disequilibrium just means that there is another, accessible state of the system which has higher entropy. Intuitively, if you have a pot with hot and a pot with cold water, you can use them to drive a heat engine, until both pots have the same temperature, i.e. an equilibrium is reached. It was the “disequilibrium” in their temperatures that carried the free energy, which could be used to do work. In these words, the universe started in a state of extreme disequilibrium and just strives toward thermal equilibrium. While the final state of the universe might look very uniform and boring, as long as we are far enough away from it, the drive to reach thermal equilibrium, formulated in the second law, can create complex structures.  An intuitive example of such a dissipative system, i.e. a system which forms to allow for or increase the rate of entropy production, i.e. the dissipation of free energy and the associated disequilibrium, are Bénard convection cells. They form far from thermal equilibrium to increase equilibrating heat transport in a fluid between two horizontal plates in a gravity field. Let’s assume the lower plate is hotter than the upper one. When the temperature difference between the plates is very small, heat is transported using diffusion. I.e. the individual molecules of the fluid stay at their place and just transfer heat by bumping into their neighbours. So if the system is already close to equilibrium (i.e. the temperature difference is small), there is just a simple flow of heat from the lower, hotter to the upper, colder plate, further decreasing the temperature difference, thereby destroying the macroscopic “order” or structure due to the difference in temperature. Beyond a certain difference threshold, however, convection starts to set in. I.e. the heat from the lower plate is strong enough to decrease the fluids density sufficiently, so that now not only heat (i.e. kinetic energy of fluid particles) is transported, but also the fluid particles themselves rise to the upper plate. The convective flows quickly self-organise to form geometrically complex cells, which make heat transport orders of magnitude more efficient. Thus, far from equilibrium the flows that dissipate the free energy stored in the temperature difference between the plates actually create macroscopically ordered structures. Although these cells are open system, i.e. they constantly exchange heat with their surroundings, their spontaneously arising macroscopic structure keeps ordered, as long as their driving temperature gradient persists. Their structure is even dynamically stable to perturbations. Thus, their macroscopic dynamic variables (such as the temperature- and density distribution, as well as the local fluid flows within the cells) possess a stable attractor. Furthermore, due to the short range of the participating interactions, one can easily define an interface in terms of a Markov blanket. However, these structures decay quickly as soon as the driving temperature gradient vanishes, and can not “survive” larger changes in their environmental conditions. Still, I think you might see where this is going, but we’ll take another short detour.

## 4. Meta-Stable States and Channels

Real thermodynamic systems usually have an unbelievably complex, structured phase space, featuring many so called meta-stable states. For an in depth discussion please see again the great paper by <NAME>, <NAME> and <NAME>. Meta-stable states are states which are not of maximum entropy, but which are hard to leave for the system, because there might be some kind of potential barrier, which requires the system to first encounter a very specific configuration before it can cross it. So systems can spend quite some time in a meta-stable state before they find a way to move to another (most of the time also meta-stable) state of higher entropy. Usually such a transition requires the system to build and maintain some ordered structures that support a so called “channel”, through which the system can evolve to a state of higher entropy. Often these structures seem very unlikely, especially from the perspective of the initial, meta-stable state, but because they allow the system to transition into a state with higher entropy, they in fact are not.

Let’s have a look at the following phase-space diagram. The color indicates the ensemble density, i.e. the probability of finding the system in a specific microstate. Red means high, white means zero. Imagine the system is initialised in a state of very low entropy $I$, as pictured below:

It will remain in this state, as long as there are constraints in place to keep it there. Think of a container of gas, which is divided by a wall, so that the gas particles can only be in a sub-volume of the container, while the remaining volume is empty. When we remove the constraints (remove the wall), the system will start to diffuse (i.e. the individual microstates will start a random walk) in phase space. In our example, the gas will expand and quickly reach its final state, in which it is homogeneously distributed in the volume of the container. But in reality, the speed and the way in which the system reaches a new stable or meta-stable state depends critically on the actual microscopic dynamics of the systems. For ideal gases they are very simple. In our example here, they are marginally more complicated. Just imagine the density as being a highly concentrated drop of red color given into a thin layer of viscous fluid on a Petri dish. Due to the random, Brownian motion of the fluid particles, the red color will start to disperse and distribute, until finally it will be evenly distributed in the whole accessible volume. This is not only a picture, but an actual example of such a process. The system will quickly reach a new, meta-stable state $M$ of higher entropy, which is connected to the final, stable state $F$ via a small channel $C$. The notion of “channels” and their relationship to the complex phase space of actual living systems is again discussed in detail in the awesome paper by <NAME>, <NAME> and <NAME>, which inspired most of this section.

Now let’s have a look at what happens, when we remove the constraints on the initial state $I$:

Let’s pause here. The system has reached the meta-stable state $M$ with higher entropy. But there is still state $F$ with even higher entropy. The only problem is, that it is only accessible through the very narrow channel $C$ of microstates, which forms the “gap” in the barrier separating the two states. Although the microstates right at this gap only form a tiny sub-volume of the intermediate meta-stable state $M$, and therefore seem to be very unlikely from the perspective of the meta-stable state $M$, they allow the system to transition into a state with much higher entropy:

In the end (i.e. in thermal equilibrium), the ensemble density, i.e. the probability of finding the system in a given microstate, will be evenly distributed in all of the accessible phase space.

Now, the vast majority of microstates will have transitioned through that narrow, and seemingly unlikely channel $C$ from the meta-stable state $M$ to the final state $F$. So actually the microstates, and therefore also the macroscopic variables will be very likely to, and in fact will almost surely have traversed that narrow channel. Why? Simply because it allowed the system to enter a state of higher entropy, i.e. less free energy. Thus, the formation of the structures required to dissipate the corresponding disequilibrium might seem very unlikely, although in fact it is almost inevitable, due to (not despite) the second law of thermodynamics.

A nice example are stars. At first, it seems very unlikely that burning stars might form from an almost homogeneous cloud of hydrogen atoms. However, slight inhomogeneities in the density of the gas and gravitation lead to a buildup of larger and heavier balls of gas. Finally, the Jeans instability leads to the gravitational collapse of the gas balls. Thus, the pressure and temperature in the cores of these balls will be high enough to allow for nuclear fusion, which brings the protons in the hydrogen nuclei in a higher entropy state by creating helium nuclei. Thereby, the seemingly unlikely structure of stars opens a channel to release free energy stored in hydrogen nuclei via nuclear fusion. In the end, a lot of nuclear energy is dissipated in the form of heat and photons, tremendously increasing the entropy of the whole universe.

## 5. More quantitative results

So far, our discussion was based on well known results from equilibrium thermodynamics and the work of Prigogine and colleagues, who where able to derive linearised equations describing non-equilibrium systems. Recent progress has lead to a generalisation of the second law to nonlinear, non-equilibrium, finite-time processes, which culminated in the Crooks fluctuation theorem.

<NAME>, <NAME>, and <NAME> (free preprint, video lecture) recently used this theorem to describe the behaviour of an open thermodynamic system, which is in constant exchange with a complex, driven environment. They could quantify the transition probabilities from an initial macroscopic state I to either of two possible macroscopic outcome states II and III during a given, finite time. The relative probability of the final states II and III was weighted by three factors: (1) A term considering the expected energy of the final states (remember that we are talking now about an open system, which can exchange energy with its environment). This term favours low energy states, similar to the Boltzmann term in the equilibrium thermodynamics of the canonical ensemble. , (2) A kinetic term weights the individual outcome states by their kinetic accessibility, i.e. states that are separated from the initial state by high potential barriers are less likely to be reached in finite time. (3) A dissipation term weights the outcome states by the expected amount of energy, which is absorbed from the driving forces in the environment and dissipated back into the environment as heat. Given outcome states with similar energy and kinetic accessibility, the crucial factor will be the amount of heat, which the system released into the environment during its propagation, i.e. the increase in entropy that it created. This term systematically favours systems which are good at harvesting usable free energy from their surroundings and dissipating it as heat back into the environment. This is especially interesting in the case of challenging environments, i.e. environments in which the dynamics of the driving forces show complex dynamics. Such environments require the system to adapt to its environment and to become predictive of the surrounding fluctuations, to harvest them optimally. If one just looked at the final state of such a system, which had been propagated within a challenging environment, it would most likely appear in a final state in which it had (close to) optimally harvested and dissipated energy from the environment. Thus, the system would appear to have adapted to its surroundings. This is very similar to how Darwinian evolution looks at the traits of existing species and explains them in terms of previous adaptations of their ancestors to challenging environments. Recently, there are more and more simulations showing that this kind of dissipative adaptation can indeed be found in simple, physical systems. A nice overview is given in a wonderful article by Natalie Wolchover for Quanta Magazine.

Further interesting work by <NAME>, <NAME>, <NAME>, and <NAME> (free preprint, video lecture) links the thermodynamic efficiency of an open system (e.g. an agent) in a driven thermodynamic environment to the efficiency of its internal representations of past experience in terms of their predictive power for future states. To be honest, I don’t really now how this fits into our whole narrative just now, but I liked the paper and its way of connecting information theory and thermodynamics very much, so I just had to mention it here.

Another, really interesting and possibly highly related article by <NAME> and <NAME> connects the dynamics of relative information (also known as relative entropy or the Kullback-Leibler-Divergence)  to biological processes in terms of population dynamics, evolutionary game theory, chemical reaction networks and quite generic Markov processes. They study how one can characterise the approach of these systems to equilibrium in terms of information theory in a very explicit and insightful way.

## 6. Complexity and Life

So how does the second law of thermodynamics now come into play, when we think about the origin and development of living systems?

Well, after the second law created complex structures on an astronomical scale, in the form of galaxy clusters, galaxies, stars – which were instrumental in creating most of the heavy elements that we are made of – and planets, the early earth found itself in a situation in which it was bombarded with high free energy (i.e. low entropy) photons from the sun. Furthermore, several disequilibria due to the heat stored in earth’s core and exothermic geologic processes provided even more free energy, e.g. at deep ocean vents. Simultaneously, earth featured an abundance of elements such as carbon, hydrogen, oxygen, nitrogen, phosphorus, or different kinds of metals, as well as liquid water, which allowed for a very rich and complex chemistry.

Here’s the short version of the whole story told by Minute Physics and <NAME>, much better than I ever could:

Nowadays, our ecosphere increases the universe’s entropy by absorbing high energy photons – mostly in the visible range – from the sun and radiating low energy infrared photons back into space. Since the entropy of a collection of photons is approximately proportional to their number, breaking down a high energy photon into twenty low energy photons increases the entropy of the photons by a factor of 20.

However, the initial disequilibrium on earth might have been a geo-chemical one, found at deep ocean vents. It is discussed in detail in a great paper by <NAME>, <NAME>, and <NAME>. There is also a great blogpost by <NAME> discussing this hypothesis, namely that the initial geo-chemical disequilibrium leading to the first metabolism on earth might have been a very CO2 rich atmosphere, becoming thermodynamically meta-stable after cooling down. Under these conditions, it was thermodynamically favourable for the carbon atoms to be reduced to methane. However, there was no direct chemical reaction that could achieve this, but only a complex chain of reactions, which was furthermore hindered by the fact that the initial reactions actually formed a potential barrier. The bold hypothesis is now, that early metabolic cycles were just a way of performing this reduction to dissipate the stored free energy.

In this view, early structures of life were simply required to sustain the necessary conditions, in terms of temperature, pH, and the concentrations of the individual reactive species, to sustain the complicated chain of reactions constituting the first metabolism. These metabolic cycles allowed the reduction of CO2 to methane, dissipating a tremendous amount of free energy stored in the prehistoric atmosphere. Thus, they formed the first of many thermodynamic channels opened by living system to dissipate reservoirs of free energy, which would not be accessible otherwise.

Crucially, to allow large-scale transitions from one meta-stable state to another meta-stable state of higher entropy, the structures supporting the corresponding channels have to exist for a sufficient period of time, to enable the system to complete the transition. Accordingly, these complex structures must not only emerge, but also persist in a thermally driven, non-stationary, stochastic and dynamic environment. Thus, the structures supporting the metabolic cycles, which allow the ecosphere to dissipate free energy, do not consume free energy to sustain themselves, or to “fight entropy”, as Schrödinger put it. Instead, they are sustained because they support a thermodynamic channel which allows the system to dissipate free energy. Therefore, homeostatic mechanisms are thermodynamically favoured, on a global scale, because they stabilise structures supporting metabolic cycles, which allow the universe to tap into reservoirs of free energy, which would otherwise not be accessible. Please see the excellent paper of <NAME>, <NAME>, and <NAME> for a deeper discussion of life in terms of thermodynamic channels and how the second law might lead to the emergence of stable, long time structures, such as DNA.

To efficiently dissipate large reservoirs of free energy, one of the best ways are cyclic processes. These allow to recycle their work medium – or in biochemical terms the involved catalysts, enzymes and co-factors – thereby limiting the amount of structured matter required to process large amounts of free energy and substrate. Just think of classical heat engines, or the Bénard cells described above. Furthermore, cyclic processes allow for stable flows of free energy, work, and heat over time. Thus, in terms of early life one could argue that biochemical reaction cycles allowed for a temporally stable and efficient dissipation of large amounts of energy by a relatively small amount of living, structured matter. To sustain these cycles, the supporting structures had to provide macroscopically stable reaction conditions in terms of the concentrations and spatial distribution of reactants, temperature, and pH. They had to do so in complex, stochastically driven, dynamic environments. Thus, while by their very nature dissipative systems are open, i.e. in constant exchange of energy and particles with their surrounding environment, to be able to sustain continuous reaction cycles, macroscopically well defined, ordered and temporally and dynamically stable structures had to emerge.

In summary, although dissipative systems are in constant exchange of energy and matter with their surroundings, in terms of their coarse-grained, macroscopic variables they are (they have to be) in a dynamically stable, driven (i.e. non-equilibrium) steady state. This follows from the imperative of their macroscopic state variables, such as their temperature, the spatial distribution and concentration of chemical reactants, or their pH to stay in a small, very well defined range, to allow the underlying metabolic cycles to work smoothly and continuously. Thus, when we look at these systems macroscopically, they will have adapted to their environment, having developed homeostatic regulation mechanisms to counteract changes in their noisy, dynamic environments. Thereby, they stabilise their internal milieu, which supports the metabolic cycles. These, in turn tap into otherwise inaccessible reservoirs of free energy, forming stable channels for the universe’s entropy to grow.

## 7. Connection to the Free Energy Principle

In summary, metabolism is not only the means to sustain life’s complex, hierarchical structures. Instead, life’s structures have emerged to sustain a continued metabolism, which allows to harvest and dissipate free energy from sources, which otherwise would not be accessible. In this way, life follows the second law of thermodynamics by providing channels for the combined entropy of the living organisms and their environment to grow.

Here we finally arrive at the starting point for the Free Energy principle: To be able to sustain these thermodynamically favoured metabolic cycles, certain macroscopic variables of the supporting structures have to be tightly regulated. This follows from the imperative of the supporting structures to keep certain state parameters, such as their pH, temperature, concentration of certain ion species or metabolites, and the spatial arrangement and compartmentalisation of specific reaction chains, in a narrow range, which is compatible with their survival, i.e. with the maintenance of their structure and – crucially – their metabolism. As the time-scales of traversing from one meta-stable state to another via a narrow channel opened by means of a specific family of metabolic cycles might take a very long time, the supporting structures have to be able to dynamically regulate these variables, keeping them stable in stochastic, noisy, non-stationary, changing environments. Therefore, (1) the macroscopic dynamics of the resulting systems are approximately ergodic (over the timescale of the supported transitions), possessing  stable attractors due to their emergent homeostatic processes. Furthermore, (2) the emergent boundaries between the internal, well regulated milieu supporting the underlying metabolic cycles, and the noisy, changing environment afford a Markov-blanket, which allows to speak of internal, external and boundary (namely active and sensory states). Thus, the whole setup of the free energy principle emerges not despite, but directly following from the second law of thermodynamics.

## Links and References

Edit 10/21/2019: I added some great work by <NAME> and colleagues to the main text and the references.

Edit 01/25/2020: Added some fine print to the section on free energy and some related links to a tweet by <NAME> and a paper by <NAME> and <NAME>.

## 4 thoughts on “Life and the Second Law”

1. Hi Kai, I have made several attempts to understand the mathematics behind the free energy principle. I made zero progress each time. After reading this blog, for the first time, I felt perhaps I can understand a few things. Really appreciate your effort.

Thanks,
Vinay

Like

2. jahed says:

Have you read <NAME> and <NAME>’ _Origin and Nature of Life on Earth_? They combine many of the references you have here with geochemistry, geophysics, information theory, and nonequilibrium statisticl mechanics in a graduate level text. Took me about a year to work through on my own, but neatly ties together your ideas here. Worth checking out! Thanks for writing this up, it was a great refresher, and _really_ tackles entropy well, which for me was honestly the hardest part, even though I have a graduate degree in biophysics.

Like

1. Thank you very much for the kind feedback and the pointer to the book by <NAME> and <NAME>. I’ve actually bought it earlier this year, after I had stumbled across a recording of a great talk by <NAME> (there are many, e.g. https://www.youtube.com/watch?v=0cwvj0XBKlE&t=2682s ,https://www.youtube.com/watch?v=SpJZw-68QyE , or https://www.college-de-france.fr/site/en-walter-fontana/seminar-2019-11-29-14h00.htm). I didn’t really have time to dive into the text, which really seems to tie all these levels of description together very well. To be honest, I did not know of the work of <NAME> and <NAME>, when I wrote the blog post last year, and if I can make some time, I definitely plan to add some of their work to the main text and the references, e.g. https://onlinelibrary.wiley.com/doi/abs/10.1002/cplx.20191 .

Like


text:
# GRE Subject Test: Chemistry : Analytical Chemistry

## Example Questions

### Example Question #1 : Limiting Reagent

Given the unbalanced equation below, how many grams of carbon dioxide will be produced from one mole of glucose and three moles of oxygen?

Explanation:

The first step to solve will be to balance the chemical reaction:

We see that we see that for every one mole of glucose used, six moles of carbon dioxide will be made. Similarly, for every six moles of oxygen used, six moles of carbon dioxide will be formed. For the reaction to carry out to completion, however, there must exist six moles of oxygen for every one mole of glucose. In the problem's circumstances, one of these compounds becomes the limiting reactant, in this case it is oxygen.

We only have three moles of oxygen, but we would need six to react all the given glucose, making oxygen the limiting reagent. We need to find the carbon dioxide produced from the limited amount of oxygen present. Use the molar ratio between oxygen and carbon dioxide and the molar mass of carbon dioxide to solve.

### Example Question #1 : Gravimetric Analysis

Household vinegar contains the organic compound acetic acid with chemical formula, . If a  vinegar sample contains  of acetic acid, calculate the percent (mass/mass) of the  in the vinegar sample.

Density of vinegar is the following:

Explanation:

Convert the moles of  to grams:

To calculate the percentage of  in the vinegar we need to use the following formula:

Therefore,

### Example Question #6 : Solubility And Equilibrium

Consider the following balanced equation for the solubility of barium hydroxide in an aqueous solution.

What is the solubility of barium hydroxide?

Explanation:

In order to solve for the solubility of barium hydroxide, we need to establish an ICE table for the reaction.

I. Initially, there are no barium ions or hydroxide ions in the solution, so we can call their concentrations zero at the beginning of the reaction.

C. For every molecule of dissolved barium hydroxide, there will be one ion of barium and two ions of hydroxide. As a result, the increases in each ion can be designated  and , respectively.

E. Finally, we plug these values into the equilibrium expression and set it equal to the solubility product constant.

### Example Question #41 : Analytical Chemistry

Write the solubility product, , for .

Explanation:

The solubility product constant () is an expression that describes the extent to which a compound is soluble in an aqueous solution. It describes the equilibrium between a solid and its constituent ions in a solution. The equilibrium constant for  can be written as:

The denominator represents solid barium sulfate which is considered a constant. When the equation is rearranged, it becomes:

The product, , can be considered a constant expression called the solubility product constant () and the equation can be written in the form:

### Example Question #42 : Analytical Chemistry

Write the solubility product, , for .

Explanation:

The solubility product constant () is an expression that describes the extent to which a compound is soluble in an aqueous solution. It describes the equilibrium between a solid and its constituent ions in a solution. The equilibrium constant for  can be written as:

The denominator represents solid barium sulfate which is considered a constant. When the equation is rearranged, it becomes:

The product, , can be considered a constant expression called the solubility product constant () and the equation can be written in the form:

### Example Question #43 : Analytical Chemistry

Write the  expression for the following equilibria:

None of these

Explanation:

The solubility product constant () is an expression that describes the extent to which a compound is soluble in an aqueous solution. It describes the equilibrium between a solid and its constituent ions in a solution.The equilibrium between undissolved  and its ions dissolved in solution is:

The equilibrium constant for  can be written as:

The denominator represents solid barium sulfate which is considered a constant. When the equation is rearranged, it becomes:

The product, , can be considered a constant expression called the solubility product constant () and the equation can be written in the form:

### Example Question #44 : Analytical Chemistry

Considering that  for the equilibrium reaction:

What would be the  concentration for a solution buffered at a pH of 8.5?

Explanation:

The pH of the solution is , therefore the pOH would be  considering the relationship:

Therefore  based on the equation

The solubility product expression for  is :

By inserting the knowns in to the expression, gives:

Rearrange this equation

### Example Question #6 : Analyzing Solids

The Ksp of  is . What is the molar solubility of  in water?

Explanation:

The equation for the dissolution of  in water is below:

The Ksp for the above equation is:

Due to the solubility of  of in water, the concentration of  and - should be equal:

Plug  into the Ksp equation:

Therefore:

The solubility of  in water is

### Example Question #45 : Analytical Chemistry

The Ksp of  is . What is the molar solubility of  in water?

Explanation:

The equation for the dissolution of  in water is below:

The Ksp for the above equation is:

Due to the solubility of  of in water, the concentration of  and  should be equal:

Plugging X into the Ksp equation gives:

Therefore:

The solubility of CuBr in water is

### Example Question #46 : Analytical Chemistry

Which salt is insoluble in water?

Explanation:

Solubility rules must be followed for substances in aqueous media. Below are some of the solubility rules and they must be followed in the order given. For example, rule 1 should have precedence over rule 2.

1. All alkali metal  and  compounds are soluble.

2. Nitrate , perchlorate , chlorate, , and acetate  salts are soluble.

3. Silver, lead, and mercury salts are insoluble.

Thus, we see that silver chloride is insoluble due to rule 3.


text:
Mathematics Part II Solutions Solutions for Class 9 Maths Chapter 4 Constructions Of Triangles are provided here with simple step-by-step explanations. These solutions for Constructions Of Triangles are extremely popular among Class 9 students for Maths Constructions Of Triangles Solutions come handy for quickly completing your homework and preparing for exams. All questions and answers from the Mathematics Part II Solutions Book of Class 9 Maths Chapter 4 are provided here for you for free. You will also love the ad-free experience on Meritnation’s Mathematics Part II Solutions Solutions. All Mathematics Part II Solutions Solutions for class Class 9 Maths are prepared by experts and are 100% accurate.

#### Question 1:

Construct $∆$PQR, in which QR = 4.2cm  $m\angle$Q = ${40}^{°}$ and PQ + PR = 8.5cm

Steps of constructions:

(1) Draw seg QR of length 4.2 cm.
(2) Draw ray QT such that ∠RQT = 40°.
(3) Mark point S on ray QT such that QS = 8.5 cm
(4) Draw seg RS.
(5) Construct the perpendicular bisector of seg RS .
(6) Name the point of intersection of ray QS and the perpendicular bisector of RS as P.
(7) Draw seg PR.
Therefore, △ABC is the required triangle

#### Question 2:

Construct  $∆$ XYZ, in which YZ = 6 cm, XY + XZ = 9 cm. $\angle$XYZ = ${50}^{°}$

Steps of constructions:

(1) Draw seg YZ of length 6 cm.
(2) Draw ray YV such that ∠ZYV = 50°.
(3) Mark point W on ray YV such that YW = 9 cm
(4) Draw seg WZ.
(5) Construct the perpendicular bisector of seg WZ .
(6) Name the point of intersection of ray YW and the perpendicular bisector of WZ as X.
(7) Draw seg XZ.
Therefore, △XYZ is the required triangle.

#### Question 3:

Construct  $∆$ ABC, in which BC = 6.2 cm,  $\angle$ACB= ${50}^{°}$, AB + AC  = 9.8 cm

Steps of constructions:

(1) Draw seg BC of length 6.2 cm.
(2) Draw ray CD such that ∠BCD = 50°.
(3) Mark point E on ray CD such that CE = 9.8 cm
(4) Draw seg BE.
(5) Construct the perpendicular bisector of seg BE .
(6) Name the point of intersection of ray CE and the perpendicular bisector of BE as A.
(7) Draw seg AB.
Therefore, △ABC is the required triangle.

#### Question 4:

Construct  $∆$ ABC, in which BC =5.2 cm,  $\angle$ACB = ${45}^{°}$ and perimeter  of  $∆$ ABC  is 10 cm.

Perimeter of △ABC = 10 cm
⇒ AB + BC + AC = 10 cm
⇒ AB + 5.2 + AC = 10 cm
⇒ AB + AC = 4.8 cm
A triangle can be only possible if the sum of the sides of a traingle is greater than the third side.
But here, AB + AC  < BC
Hence, the construction of △ABC is not possible.

#### Question 1:

Construct $∆$ XYZ, such that  YZ = 7.4 cm, $\angle$XYZ = ${45}^{°}$  and  XY $-$ XZ = 2.7 cm.

Steps of construction:

(1) Draw seg YZ of length 7.4 cm.
(2) Draw ray YP such that ∠ZYP = 45°
(3) Take point Q on ray YP such that YQ = 2.7 cm.
(4) Construct the perpendicular bisector of seg QZ.
(5) Name the point of intersection of ray YP and the perpendicular bisector of seg QZ as X.
(6) Draw seg XZ.

Therefore, △XYZ is required triangle.

#### Question 2:

Construct $∆$ PQR, such that  QR = 7.4 cm, $\angle$PQR= ${60}^{°}$  and  PQ $-$ PR = 2.5 cm.

Steps of construction:

(1) Draw seg QR of length 6.5 cm.
(2) Draw ray QA such that ∠RQA = 60°
(3) Take point B on ray QA such that QB = 2.5 cm.
(4) Construct the perpendicular bisector of seg BR.
(5) Name the point of intersection of ray QA and the perpendicular bisector of seg BR as P.
(6) Draw seg PR.

Therefore, △PQR is required triangle.

#### Question 3:

Construct $∆$ ABC, such that BC = 6 cm, $\angle$ABC = ${100}^{°}$   and  AC$-$ AB = 2.5cm.

Steps of construction:

(1) Draw seg BC of length 6 cm.
(2) Draw ray BE such that ∠CBE = 100°
(3) Take point D on the opposite of ray BE such that BD = 2.5 cm.
(4) Construct perpendicular bisector of seg DC.
(5) Name the point of intersection of ray BE and the perpendicular bisector of DC as A.
(6) Draw seg AC.

Therefore, △ABC is required triangle.

#### Question 1:

Construct $∆$ PQR,  in which $\angle$Q = ${70}^{°}$,  $\angle$R = ${80}^{°}$ and PQ + QR + PR = 9.5 cm.

Steps of construction:

(1) Draw seg AB of 9.5 cm length.
(2) Draw a ray making angle of 35° at point A.
(3) Draw another ray making an angle of 40° at point B.
(4) Name the point of intersection of the two rays as P.
(5) Draw the perpendicular bisector of seg AP and seg BP.
Name the points as Q and R respectively where the perpendicular bisectors intersect line AB.
(6) Draw seg PQ and seg PR.

Therefore, △PQR is the required triangle.

#### Question 2:

Construct $∆$ XYZ, in which $\angle$Y = ${58}^{°}$$\angle$X = ${46}^{°}$ and  perimeter of triangle is 10.5 cm.

Steps of construction:

(1) Draw seg PQ of 10.5 cm length.
(2) Draw a ray making angle of 29° at point P.
(3) Draw another ray making an angle of 23° at point Q.
(4) Name the point of intersection of the two rays as Z.
(5) Draw the perpendicular bisector of seg PZ and seg QZ.
Name the points as Y and X respectively where the perpendicular bisectors intersect line PQ.
(6) Draw seg XZ and seg YZ.

Therefore, △XYZ is the required triangle.

#### Question 3:

Construct $∆$LMN, in which $\angle$M = ${60}^{°}$$\angle$N = ${80}^{°}$  and  LM + MN + NL = 11 cm.

Steps of construction:

(1) Draw seg AB of 11 cm length.
(2) Draw a ray making angle of 30° at point A.
(3) Draw another ray making an angle of 40° at point B.
(4) Name the point of intersection of the two rays as L.
(5) Draw the perpendicular bisector of seg AL and seg BL.
Name the points as M and N respectively where the perpendicular bisectors intersect line AB.
(6) Draw seg LM and seg LN.

Therefore, △LMN is the required triangle.

#### Question 1:

Construct $∆$ XYZ, such that  XY + YZ  =10.3 cm,  YZ = 4.9 cm, $\angle$XYZ = ${45}^{°}$ .

Steps of constructions:

(1) Draw seg YZ of length 4.9 cm.
(2) Draw ray YV such that ∠ZYA = 45°.
(3) Mark point W on ray YA such that YB = 10.3 cm
(4) Draw seg BZ.
(5) Construct the perpendicular bisector of seg BZ .
(6) Name the point of intersection of ray YA and the perpendicular bisector of BZ as X.
(7) Draw seg XZ.
Therefore, △XYZ is the required triangle.

#### Question 2:

Construct $∆$ ABC, in which $\angle$B = ${70}^{°}$$\angle$C = ${60}^{°}$ , AB + BC + AC = 11.2 cm.

Steps of construction:

(1) Draw seg XY of 11.2 cm length.
(2) Draw a ray making angle of 35° at point X.
(3) Draw another ray making an angle of 30° at point Y.
(4) Name the point of intersection of the two rays as A.
(5) Draw the perpendicular bisector of seg AX and seg AY.
Name the points as B and C respectively where the perpendicular bisectors intersect line XY.
(6) Draw seg AB and seg AC.

Therefore, △ABC is the required triangle.

#### Question 3:

The perimeter of a triangle is 14.4 cm and the ratio of lengths of its side is 2 : 3 : 4. Construct the triangle.

Steps of construction:

1: A line AB = 14.4 cm is drawn.

2: Darw a ray AC making an acute angle at A in the downward direction. Then, divid it into (2 + 3 + 4) = 9 parts.

3: Join B and A9.

4:  Draw a line parallel to BA9 at A2 and A5 intersecting AB at X and Y respectively..

5: With X as centre and XA as radius, draw an arc.

6: With Y as centre and YB as radius, draw an arc cutting the previous arc at Z.

7: Join XZ and YZ.

Hence, △XYZ is the required triangle.

#### Question 4:

Construct $∆$ PQR, in which PQ $-$ PR = 2.4 cm, QR = 6.4 cm and $\angle$PQR = ${55}^{°}$ .

Steps of construction:

(1) Draw seg QR of length 6.4 cm.
(2) Draw ray QA such that ∠RQA = 55°
(3) Take point B on ray QA such that QB = 2.4 cm.
(4) Construct the perpendicular bisector of seg BR.
(5) Name the point of intersection of ray QA and the perpendicular bisector of seg BR as P.
(6) Draw seg PR.

Therefore, △PQR is required triangle.

View NCERT Solutions for all chapters of Class 9


text:
GMAT Question of the Day: Daily via email | Daily via Instagram New to GMAT Club? Watch this Video

 It is currently 28 Jan 2020, 15:53

### GMAT Club Daily Prep

#### Thank you for using the timer - this advanced tool can estimate your performance and suggest more practice questions. We have subscribed you to Daily Prep Questions via email.

Customized
for You

we will pick new questions that match your level based on your Timer History

Track

every week, we’ll send you an estimated GMAT score based on your performance

Practice
Pays

we will pick new questions that match your level based on your Timer History

# How many factors of the number 2^3 x 3 x 5^2 are perfect squares?

Author Message
TAGS:

### Hide Tags

e-GMAT Representative
Joined: 04 Jan 2015
Posts: 3230
How many factors of the number 2^3 x 3 x 5^2 are perfect squares?  [#permalink]

### Show Tags

Updated on: 13 Aug 2018, 02:08
1
13
00:00

Difficulty:

85% (hard)

Question Stats:

33% (01:04) correct 67% (01:02) wrong based on 249 sessions

### HideShow timer Statistics

Originally posted by EgmatQuantExpert on 27 Feb 2018, 09:40.
Last edited by EgmatQuantExpert on 13 Aug 2018, 02:08, edited 4 times in total.
Manager
Joined: 13 Oct 2016
Posts: 241
GMAT 1: 600 Q44 V28
Re: How many factors of the number 2^3 x 3 x 5^2 are perfect squares?  [#permalink]

### Show Tags

27 Feb 2018, 09:56
1
1
The answer should be 4 as per the logic explained in the below link by various moderators:

https://gmatclub.com/forum/how-many-factors-of-10800-are-perfect-squares-251823.html
e-GMAT Representative
Joined: 04 Jan 2015
Posts: 3230
Re: How many factors of the number 2^3 x 3 x 5^2 are perfect squares?  [#permalink]

### Show Tags

27 Feb 2018, 22:36
2
2

Solution

• Per our conceptual knowledge, a number is a perfect square only when the exponents of the prime factors in the number are even.
o For example: $$7^2$$is a perfect square but $$5^3$$ is not, since the exponent of $$7$$is even but the exponent of $$5$$is not.
• To find the factors which are perfect squares we need to first of focus on each prime number and its powers and try to find out, what are the possible perfect squares that we can create using those prime numbers.
• So, for making perfect squares, we need even powers of the prime factors and this can be written in the form: $$2^a * 3^b * 5^c$$ [where a, b and c can be 0,2,4,8…]
o The factors of$$2^3$$ are: $$1, 2, 4, 8$$ out of which only $$1(2^0)$$ and $$4(2^2)$$ are perfect squares.
o The factors of $$3$$ are: $$1$$ and $$3$$, out of which only $$1(3^0)$$ is a perfect square.
o The factors of $$5^2$$are: $$1, 5, 25,$$ out of which only $$1(5^0)$$ and $$25(5^2)$$ are perfect squares.
• Thus, the possible unique perfect square factors using only these prime numbers are $$1$$, $$4$$ and $$25$$.
But is that all?
Look at the following factor:
• Is $$2^2$$ *$$5^2$$ a perfect square?
o Yes, it is.
So, the criterion of perfect squares also holds true when we multiply 2 or more such perfect squares together.
o Hence, 100 will also be included in our list.
So, there are 4 possible cases where the factors of the given number are perfect squares.
Hence, the correct answer is Option D.
_________________
VP
Joined: 19 Oct 2018
Posts: 1297
Location: India
Re: How many factors of the number 2^3 x 3 x 5^2 are perfect squares?  [#permalink]

### Show Tags

06 May 2019, 09:42
Any factor of 2^3∗3∗5^2 can be written as 2^a* 3^b* 5^c
For factor to be a perfect square-
a can have 2 values (0,2)
b can have 1 value (0)
c can have 2 values (0,2)
Total factors of the number 2^3∗3∗5^2 are perfect squares= 2*1*2=4
VP
Joined: 18 Dec 2017
Posts: 1053
Location: United States (KS)
GMAT 1: 600 Q46 V27
Re: How many factors of the number 2^3 x 3 x 5^2 are perfect squares?  [#permalink]

### Show Tags

02 Dec 2019, 07:27
Quote:
How many factors of the number $$2^3 * 3 * 5^2$$ are perfect squares?

A) 1
B) 2
C) 3
D) 4
E) 5

1,2^2,5^2,2^2*5^2.

4 factors. Option D
_________________
The Moment You Think About Giving Up, Think Of The Reason Why You Held On So Long

Learn from the Legend himself: All GMAT Ninja LIVE YouTube videos by topic
You are missing on great learning if you don't know what this is: Project SC Butler
Re: How many factors of the number 2^3 x 3 x 5^2 are perfect squares?   [#permalink] 02 Dec 2019, 07:27
Display posts from previous: Sort by


text:
## Pizza Rolls 6

Volume: $\Delta S = nR\ln \frac{V_{2}}{V_{1}}$
Temperature: $\Delta S = nC\ln \frac{T_{2}}{T_{1}}$

Ellen Amico 2L
Posts: 101
Joined: Thu Sep 19, 2019 12:16 am

### Pizza Rolls 6

Can someone explain pizza rolls question 6? I'm confused on why ΔS = 0 and ΔU = 0. Also, I added up 2 calculations for the heat, but I can't seem to get the right answer. If anyone has tips on how to approach the problem please let me know!

<NAME> 1E
Posts: 101
Joined: Sat Jul 20, 2019 12:17 am

### Re: Pizza Rolls 6

delta S and delt U are 0 because the final and initial state of the system is the same (ends up being 100.0L and 1.0atm in the end again) and because U and S are state functions it means the change is 0. As for q and w, I have no idea i need help with those too

<NAME> 1I
Posts: 101
Joined: Sat Jul 20, 2019 12:15 am

### Re: Pizza Rolls 6

I also can't get the answer for q and w; it seems like he subtracted 23.3 and 9.12 to get 14.2, but I don't understand why you wouldn't add the work values you get for each part of the problem together instead.

Edit: it seems that work will be positive if the system is being compressed, like in the first part of the problem

Vuong_2F
Posts: 90
Joined: Sat Sep 14, 2019 12:17 am

### Re: Pizza Rolls 6

<NAME> 1I wrote:I also can't get the answer for q and w; it seems like he subtracted 23.3 and 9.12 to get 14.2, but I don't understand why you wouldn't add the work values you get for each part of the problem together instead.

Edit: it seems that work will be positive if the system is being compressed, like in the first part of the problem

He did add the work values from each part of the problem, it's just that for the second part it's an isochoric process (constant volume) and no work is done.


text:
Constant Air Volume (CAV) Systems

()

HVAC air systems can be either centralized or decentralized. Centralized air systems receive their cooling and heating energy from a remote central plant. Decentralized HVAC air systems contain the central heating and cooling plant equipment within the air system itself. HVAC air systems can also be constant air volume (CAV) or variable air volume (VAV). CAV systems deliver constant supply airflow at a variable temperature. VAV systems deliver variable supply airflow at a constant temperature. CAV and VAV air systems can be further subdivided into systems that condition a single temperature zone and systems that condition multiple temperature zones.

Whether the HVAC air systems are centralized or decentralized, CAV or VAV, serve a single zone or multiple zones, the choices for heating and cooling coils within the units are the same. Generally, the heating coil in centralized HVAC air systems will be hot water, steam, or electric, and the cooling coil will be chilled water. The heating coil in decentralized HVAC systems will be electric, direct or indirect gas-fired or (reverse cycle) direct expansion (DX) refrigerant (for heat pumps only); the cooling coil will be DX refrigerant.

Contents

Single-Zone

A single-zone CAV system consists of an air handling unit that delivers constant supply airflow (Fig. 1). The heating and/or cooling capacity of the unit is modulated by varying the temperature of the supply airflow to meet the needs of a single thermostat mounted in one of the spaces served by the unit.

Single-zone CAV systems may serve multiple spaces; therefore, it is important to ensure that all of the spaces served by a single-zone CAV system have similar HVAC load characteristics.

Heating and Ventilating

Heating and ventilating (H&V) systems are used to serve spaces that require heating only and also require outdoor air ventilation for occupant ventilation or exhaust air makeup. H&V units are often configured to deliver 100% outdoor air. However, they may have return air capabilities if the outdoor airflow is less than the supply airflow that is required to provide effective heating of the spaces served during the winter. If the units heat the spaces they serve during unoccupied periods when the exhaust systems are off and the outdoor air dampers are shut, H&V units may also be equipped with return air capabilities. H&V units normally recirculate 100% of the air during the unoccupied mode of operation.

During the summer it is common for H&:V units to position their outdoor and return air dampers to deliver 100% outdoor air to the spaces served in order to maintain the space temperature at 5 to 10°F higher than the outdoor temperature. If the H&:V units have return air capabilities, provisions must be made within the spaces served to either relieve or exhaust the excess outdoor air that is introduced during the summertime mode of operation.

Temperature control for H&:V systems is the same as for the single-zone CAV system described earlier, except the space thermostat will control the heating capacity of the H&V unit only. Some common examples of spaces requiring H&V systems are gymnasiums, locker rooms, and kitchens:

Multiple-Zone

CAV systems are not well suited to provide multiple zones of temperature control because serving multiple zones with CAV systems incurs a higher energy cost and, in some cases, a higher first cost than the VAV options that are normally available. However, through the use of reheat, dual-duct, and multizone configurations, CAV systems can serve multiple temperature .zones for certain applications, particularly renovations of existing systems.

Reheat

A CAV reheat system consists of a CAV unit whose supply air ductwork branches out to serve multiple zones within the area served by the unit (Fig. 2). A reheat coil is mounted within the branch duct to each zone. Typically, the discharge air temperature from the CAV unit is maintained at approximately 55°F so that it can meet the cooling needs of the temperature zones, if required. A heating-only thermostat located in each zone controls the heating output of its associated zone reheat coil. This coil reheats the supply air from the CAV unit as required to maintain the setpoint of the zone thermostat. If no heating is required in the zone, the heating coil will be shut off. The zone reheat coil needs to be sized not only to meet the building envelope heat losses for the zone but also to raise the supply airflow from the discharge air temperature (typically 55°F) to the zone cooling setpoint (typically 75°F).

CAV reheat systems are not energy efficient because simultaneous cooling (at the CAV unit) and heating (at the reheat coil) of the supply airflow occu.rs. Care must be taken when designing CAV reheat systems because the 2018 International Energy Conservation Code, Section 503.4.5, requires the supply airflow to be reduced to at least 30% of the maximum supply airflow to each zone before reheating can occur. One exception to this rule is for .zones that have special humidity control requirements.

Dual-Duct

A dual-duct CAV system includes two separate supply air ducts, one hot duct and one cold duct, connected to a specially configured CAV air handling unit (Fig. 3). The supply airflow is divided within the unit downstream of the supply fan into what are called the hot deck and cold deck. A heating coil is installed within the unit in the hot deck and a cooling coil is installed within the unit in the cold deck. A portion of the supply airflow is blown through the hot deck and disclw:ged through the main hot duct connected to the unit. The remaining supply airflow is blown through the cold deck. and discharged through the main cold duct connected to the unit. Both the hot and cold supply ducts are routed parallel to each other through the building and branch out to serve multiple zones within the area served by the unit.

Each zone is equipped with a dual-duct mixing box, which has both hot and cold duct inlet connections, each of which is equipped with a motor-operated damper and an inlet airflow sensor. The dual-duct mixing box has a single duct outlet through which air is supplied to the zone. The temperature of the air supplied to the zone is controlled by modulating the hot and cold airflows at the dual-duct mixing box as required to maintain the setpoint of the zone thermostat. For CAV dual-duct mixing boxes, the total supply airflow to the zone remains constant.

Typically, the cold deck air temperature from the CAV air handling unit is maintained at approximately 85°F so that cooling is available if required by the temperature zones. The hot deck temperature from the CAV unit is maintained at approximately 55°F so that heating is available if required by the temperature zones. The heating coil in a dual-duct air handling unit can be hot water, steam, or electric. The cooling coil will normally be chilled water. Dual-duct air handling units rarely, if ever, utilize a DX refrigerant cooling coil.

Dual-duct CAV systems generally do not have an application for commercial buildings because of the high first cost. Thus, we will not discuss dual-duct systems in any more detail Dual-duct CAV systems were designed years ago mainly to serve laboratory areas within buildings. Therefore, it is necessary for the HV AC system designer to understand th.is type of system should a project involve the renovation of a building with a dual-duct CAV system. However, today there are more modem HVAC systems available to serve laboratory areas that have a lower first cost and lower operating cost than dual-duct CAV systems. Therefore, it is unlikely for a new building to require a dual-duct CAV system.

Multizone

Multizone CAV systems are similar to dual-duct CAV systems in that there is a hot deck and a cold deck within the air handling unit (Fig. 4). The difference is that the hot and cold airstreams for each zone are mixed at the air handling unit. There is a hot and cold air motor-operated damper mounted on the discharge of the air handling unit for each zone; that is, if the unit is a five-zone unit, there will be five hot deck motor-operated dampers and five cold deck motor-operated dampers mounted on the discharge of the unit. There is a single duct connection on the combined outlet of each hot and cold damper serving each zone through which air is supplied to the zone. The temperature of the air supplied to each zone is controlled by modulating the hot and cold airflows at the air handling unit as required to maintain the setpoint of the zone thermostat. For CAV multizone systems, the total supply airflow to each zone remains constant. The hot and cold deck temperatures for multizone CAV systems are similar to the deck temperatures for dual-duct CAV systems.

Multizone CAV systems are not commonly used in commercial buildings because the VAV options that are available typically have a lower first cost and lower operating cost. Also, the number of zones that can be accommodated by a multizone unit is limited by the physical space available to install the hot and cold motor-operated dampers for each zone on the discharge of the air handling unit. Therefore, multizone units can serve no more than about eight zones. The number of zones that can be served by a VAV system is not limited by the equipment but is determined by the needs of the areas served.

HVAC Design Sourcebook - <NAME>., LEED AP, is a principal in the MEP consulting engineering firm Green Building Energy Engineers. He has worked in the MEP consulting engineering industry for more than 30 years. Mr. Angel has contributed to the development of design standards and continues to find new ways to streamline the HVAC system design process.

Click on a star to rate it!

Average rating / 5. Vote count:

No votes so far! Be the first to rate this post.

We are sorry that this post was not useful for you!

Let us improve this post!

Tell us how we can improve this post?