text:
# Particle System Question

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

## Recommended Posts

Hey everyone,

I have a particle system but am wondering if there is a more efficient way to implement it. The current particle class I have looks like this.

 //=============================================// //// Copyright 2012 - Ember in the Rain, LLC // // All Rights Reserved // // Developer: Shawn M. Foster // //=============================================// #ifndef _PARTICLE_H_ #define _PARTICLE_H_ class Particle { public: /** Variables **/ //============================// int id; int lastTime; int pType; bool active; Vector position; Vector velocity; Vector acceleration; Vector color; float size; float mass; float age; float lifeSpan; /** Methods **/ //============================// Particle(LONG id); ~Particle(); void Update(int time); void DrawParticle(); }; #endif

I am wondering if it would be more efficient to simplify the particle class to something like this.

 #ifndef _N_PARTICLE_H_ #define _N_PARTICLE_H_ /** Particle Class **/ /**----------------------------------------------**/ class NParticle { public: NParticle(); float mass; //mass float age; //age Vector pos; //position vector Vector vel; //velocity vector Vector frc; //force accumulator Vector col; //RGB color float rad; //repulsive radius }; /**----------------------------------------------**/ #endif

And then do any updating and drawing of the particles in the Particle System Class.. Does this sound like a better approach . Do you think that I do too much processing by updating the particle in the particle class and drawing it in that class?

Thanks,

Shawn

##### Share on other sites
Yes, it is better to batch things, and don't draw every particle on its own.
Make one particle system, and draw that in one draw call if possible.

You might also want to inline your constructor in case you will use that to quickly create individual particles.

##### Share on other sites
Thanks for the reply. So when you say inline my constructor you mean declaring and defining it all in the class declaration?

Like this...

 #ifndef _N_PARTICLE_H_ #define _N_PARTICLE_H_ /** Particle Class **/ /**----------------------------------------------**/ class NParticle { public: NParticle(int indx) {id = indx;} int id; float mass; //mass float age; //age Vector pos; //position vector Vector vel; //velocity vector Vector frc; //force accumulator Vector col; //RGB color float rad; //repulsive radius }; /**----------------------------------------------**/ #endif

Thanks,

Shawn

##### Share on other sites
He means to prepend the inline keyword to your ctor. This will remove the overhead of having to call to the ctor function every single time a particle is created. It will simply put the calling code wherever you create a particle(instead of having to "move" to the ctor, it is already there)

##### Share on other sites

He means to prepend the inline keyword to your ctor.

Actually defining the constructor in the class definition inlines implicitly. ;-) However, I don't think inlining the constructor will result in a big speed gain. But there are a few rules of thumbs you might consider in terms of optimizing your particle system:

Batch Drawcalls
Don't do a single drawcall for each particle. Rather batch many particles and render those with a single drawcall.

Use Texturatlases
Packing particle textures together in a atlas avoids texture switches

Try low resolution rendering
Render particle effects to low resolution targets for the sake of fillrate saving

Simulation on gpu
If your gpu is free you could do the simulation on gpu side to save memory bandwith (etc...)

Avoid Branches (etc...)
Don't do to many branches, virtual function calls etc.. Don't provide an update methode for a particle, do rather operate on particle batches

And then do any updating and drawing of the particles in the Particle System Class..

Yep, that sounds better!

If you'r doing the simulation on the CPU you could consider to swap the simulation to a free CPU core.

Use SIMD
Again, if you'r doing the simulation on the CPU you could use SIMD for speeding up the simulation.

Use cachefriendly datastructures
Using processor caches properly can result in big speed gains

Use specialized allocators (particle pools)
You could pool/preallocate particles to speed up allocation

##### Share on other sites
Thanks for the replies.

Don't do a single drawcall for each particle. Rather batch many particles and render those with a single drawcall.
[/quote]

So in this situation I fill my particle array once, then loop through my array of particles and call the draw function for each iteration?
Or, iterate through the particles inside of the draw function?

currently I draw the particles in the same loop as I update each particle's position. Which is a member of the ParticleSystem class.

I will look in to all of the other suggestions you made. Thanks again for your reply.

~Shawn

##### Share on other sites

So in this situation I fill my particle array once, then loop through my array of particles and call the draw function for each iteration?

No not exactly. You would loop through all your particles and write the vertices in one big vertexbuffer. Afterwards you just draw the geometrie residing in this vertexbuffer. Here is some pseudocode to illustrate the idea:

 for each particle p { /// this'll generate the actual geometry for the particle (i.e. a quad) vertices = generateVerticesForParticle(p); /// draw a single particle drawPrimitive(vertices) }

 for each particle p { /// this'll generate the actual geometry for the particle (i.e. a quad) vertices = generateVerticesForParticle(p); /// write the vertices to the end of the vertexbuffer writeVerticesToVertexbuffer(vertexBuffer, vertices); } /// draw the particles in a single draw call drawPrimitives(vertexBuffer);

##### Share on other sites
Great thanks. I will play around with it and see if I can optimize it.

##### Share on other sites
Switching from an AOS (array of structures) approach to a SOA (structure of arrays) approach for your particle data, then ensuring your arrays are 128 bit aligned allows for blindingly fast SIMD implementations.

A tightly packed float3 array thats 128-bit aligned at the start is faster to operate on than a typical aligned "128-bit" float3 structure, as long as you ensure the number of particles is a multiple of 4.

Memory is also kept contigious, which is always a bonus as cache read/writes are less likely to miss.

• 9
• 15
• 9
• 9
• 56


text:
## Cryptology ePrint Archive: Report 2016/889

Ouroboros: A Provably Secure Proof-of-Stake Blockchain Protocol

Aggelos Kiayias and Alexander Russell and Bernardo David and Roman Oliynykov

Abstract: We present Ouroboros,'' the first blockchain protocol based on proof of stake with rigorous security guarantees. We establish security properties for the protocol comparable to those achieved by the bitcoin blockchain protocol. As the protocol provides a proof of stake'' blockchain discipline, it offers qualitative efficiency advantages over blockchains based on proof of physical resources (e.g., proof of work). We also present a novel reward mechanism for incentivizing proof of stake protocols and we prove that, given this mechanism, honest behavior is an approximate Nash equilibrium, thus neutralizing attacks such as selfish mining. We also present initial evidence of the practicality of our protocol in real world settings by providing experimental results on transaction confirmation and processing.

Category / Keywords: blockchain, consensus, proof of stake.

Original Publication (with major differences): IACR-CRYPTO-2017

Date: received 12 Sep 2016, last revised 20 Jul 2019

Contact author: akiayias at inf ed ac uk

Available format(s): PDF | BibTeX Citation

Note: various minor corrections in the previous major revision.

Short URL: ia.cr/2016/889

[ Cryptology ePrint archive ]

format: plain


text:
Why zero padding the 2-d DFT interpolates images in spatial domain?

I was applying different image interpolation techniques and I came know to about interpolation in frequency domain. In this technique we first take 2d DFT of an image, pad it with zeros and take the inverse DFT. The magnitude of inverse DFT gives interpolated image. It is working quite well!

Now my question is that how can it interpolate image in spatial domain when we are just padding zeros in frequency domain? How it constructs data points? And why only use zero padding?

Now I know about Shannon interpolation theorem (sinc interpolation) in which we can ideally reconstruct continuous signal from its discrete counterpart (if the sampling frequency is greater than Nyquist frequency). We can construct unknown values by sinc interpolation, but I can not understand how inverse DFT is constructing values for interpolated signal?

For the sake of simplicity, I'll explain the 1-D case; the 2-D case is completely analogous. Let $$x[n]$$ be a finite length sequence with $$n\in[0,N-1]$$. Its discrete Fourier transform (DFT) is

$$X[k]=\sum_{n=0}^{N-1}x[n]e^{-j\frac{2\pi}{N} kn}\tag{1}$$

The sequence $$x[n]$$ can be obtained from $$X[k]$$ via the inverse DFT (IDFT):

$$x[n]=\frac{1}{N}\sum_{k=0}^{N-1}X[k]e^{j\frac{2\pi}{N}kn}\tag{2}$$

Note that the sequences defined by $$(1)$$ and $$(2)$$ are periodic with period $$N$$. Let's use $$\tilde{X}[k]$$ to denote the periodic sequence of DFT coefficients. For odd $$N$$, $$\tilde{X}[k]$$ just equals (the periodic continuation of) $$X[k]$$. For even $$N$$, we split the coefficient $$X[N/2]$$ in two equal terms $$\frac12 X[N/2]$$, such that for even $$N$$, the periodic sequence $$\tilde{X}[k]$$ is defined as

$$\tilde{X}[k]=\\\big[\ldots ,\underbrace{X[0],X[1],\ldots,\frac12 X[N/2],\frac12 X[N/2],\ldots,X[N-1]}_{N+1\textrm{ elements}},\ldots\big]\tag{3}$$

With that definition, the period of $$\tilde{X}[k]$$ is always odd. Let's denote that odd period by $$2K+1$$. For odd $$N$$ we have $$K=(N-1)/2$$, and for even $$N$$ we get $$K=N/2$$.

Using $$\tilde{X}[k]$$ and $$K$$ as defined above, we can rewrite $$(2)$$ as

$$x[n]=\frac{1}{N}\sum_{k=-K}^{K}\tilde{X}[k]e^{j\frac{2\pi}{N}kn}\tag{4}$$

With these preparations we can now interpret the coefficients $$\tilde{X}[k]$$ as Fourier coefficients of a continuous periodic function $$x_c(t)$$ with period $$NT_s$$, where $$T_s$$ is an arbitrary sampling interval:

$$x_c(t)=\frac{1}{N}\sum_{k=-K}^{K}\tilde{X}[k]e^{j\frac{2\pi}{NT_s}kt}\tag{5}$$

The sequence $$x[n]$$ can be obtained by sampling $$x_c(t)$$:

$$x[n]=x_c(nT_s)\tag{6}$$

But we can also obtain other, more densely sampled sequences by sampling $$x_c(t)$$. We choose the new sampling interval such that the new sequence is also periodic with period $$M>N$$:

$$\hat{x}[m]=x_c\left(m\frac{NT_s}{M}\right)=\frac{1}{N}\sum_{k=-K}^{K}\tilde{X}[k]e^{j\frac{2\pi}{M}km}\tag{7}$$

The new length $$M$$ sequence $$\hat{x}[m]$$ can be interpreted as an interpolated version of the original length $$N$$ sequence $$x[n]$$.

Note that $$(7)$$ can be written as a length $$M$$ IDFT with a zero-padded sequence $$\tilde{X}_0[k]$$:

\begin{align}\hat{x}[m]&=\frac{M}{N}\left(\frac{1}{M}\sum_{k=0}^{M-1}\tilde{X}_0[k]e^{j\frac{2\pi}{M}km}\right)\\&=\frac{M}{N}\cdot \textrm{IDFT}_M\big\{\tilde{X}_0[k]\big\}[m]\tag{8}\end{align}

with

$$\tilde{X}_0[k]=\big[\tilde{X}[0],\ldots,\tilde{X}[K],\underbrace{0,\dots,0}_{M-2K-1\textrm{ zeros}},\tilde{X}[K+1],\ldots,\tilde{X}[2K]\big]\tag{9}$$

In terms of the original DFT coefficients $$X[k]$$, the zero-padded sequence $$\tilde{X}_0[k]$$ is given by

$$\tilde{X}_0[k]=\big[X[0],\ldots,X[(N-1)/2],\underbrace{0,\dots,0}_{M-N\textrm{ zeros}},\\\qquad X[(N+1)/2],\ldots,X[N-1]\big]\tag{10}$$

for odd $$N$$, and by

$$\tilde{X}_0[k]=\big[X[0],\ldots,\frac12 X[N/2],\underbrace{0,\dots,0}_{M-N-1\textrm{ zeros}},\\\qquad \frac12 X[N/2],\ldots,X[N-1]\big]\tag{11}$$

for even $$N$$.

• But how is it "creating information" for those zeros in spatial domain? Is sinc interpolation is being used in which every interpolated point is calculated through whole sequenc? Sep 12 '19 at 12:45
• @Naeem: There is no new information, it's all in the DFT coefficients. They completely define a continuous band-limited periodic function from which you can take as many samples as you like. Sep 12 '19 at 16:38


text:
## canyouhelpmewiththis one year ago Is this right?

1. canyouhelpmewiththis

This is the problem...

2. canyouhelpmewiththis

|dw:1359123239041:dw| This is my answer?

3. canyouhelpmewiththis

|dw:1359123384510:dw| wait, this is my answer.

4. UnkleRhaukus

you can only combine like terms , $\sqrt[3]x~~\&~~\sqrt[4]x$ are not like terms

5. zordoloom

6. zordoloom

|dw:1359123886678:dw|

7. canyouhelpmewiththis

Thank you!

8. Not the answer you are looking for?
Search for more explanations.

Search OpenStudy


text:
a question on : why sin(x) = sin(180-x)

I was trying to follow a proof from another question in this forum: Why is $\sin(x) = \sin(180^{\circ}-x)$

I was following the geometric proof given by forum poster : egreg.

I could follow his proof for the cosine. But I think the proof for the sine contains an error.

Egreg stated that from the triangle in the circle you get the following: sin(alpha)/a = 2R

BUT when I analyzed the small triangle with angle alpha in it, I get: sin(alpha)/a = 1/2R

It really doesn't affect the proof much at all. But I am wondering if there was an error, or there is something wrong with my own trig analysis.

Hope that the forum guy Egreg can reply since he is the originator of this proof.

Regards,

P

-
Thanks for noting; I fixed the error. –  egreg Nov 24 '13 at 19:11
Hi Egreg, thanks for your response. BUT can you make a picture of the point A' (A prime diametrically opposite A), because I am having difficulty understanding how to construct this new triangle to show that in this new triangle we have the angle "180-alpha". Really appreciate it if you can do that. Sincerely P. –  Palu Nov 24 '13 at 20:31
In a quadrilateral inscribed in a circle, the opposite angles always sum to 180°. –  egreg Nov 24 '13 at 22:48
Hi Egreg, Thanks so much! Yes, that is the geometric fact that I was missing: In quadrilateral inscribed in a circle the opposite angles sum to 180 degrees! After I created the quadrilateral with A' diametrically opposite and the angle at A' being alpha prime, the proof became crystal clear!!! Thanks so much once more! Sincerely Palue –  Palu Nov 25 '13 at 3:08

You are correct. Recall the Law of Sines, which states $\dfrac{a}{\sin A} = \dfrac{b}{\sin B} = \dfrac{c}{\sin C} = 2R$. This means $\dfrac{\sin A}{a} = \dfrac{1}{2R}$. This is probably a typo on his part; it doesn't affect the proof at all. The section of the proof you are referring to is just simply a clever proof of the Law of Sines.


text:
Maximizing $f(x,y)$

Could somebody please shed some light on this problem?

Let $x,y \in \mathbb R$, we wish to maximize $f(x,y)=\frac{x^2-y^2}{(x^2+y^2)^2}$ by finding suitable values of $x,y$.

Setting $\partial f\over \partial x$ and $\partial f \over \partial y$ as $0$ gives

$x(x^2-3y^2)=0=y(y^2-3x^2)$ but these give $x=y=0$ which is not acceptable! Any ideas?

Thank you.

-
So you've proven that the only place the $\nabla f$ could possibly be $0$ is where the function is not well defined. What does that tell you? (Hint: don't think too hard!) – Neal May 10 '12 at 14:26
Your function is clearly unbounded, why are you expecting a different answer? If you are expecting finite answer, are you sure your domain is not bounded in anyway? – TenaliRaman May 10 '12 at 14:30
Thanks Neal and TenaluRaman! – keane May 10 '12 at 15:51

The function doesn't attain a maximum. Assume that $(x,y)$ was a maximum, then you have $$\frac{x^2-y^2}{(x^2+y^2)^2}\leq \frac{x^2}{(x^2)^2}=\frac{1}{x^2},$$ which is also a value of $f$. Hence $y=0$. But then $f(x,0)\to\infty$ as $x\to 0$.


text:
# It's as hard as 1-2-3

Geometry Level 5

A circle with center $$O$$ has two points $$A,B$$ on its circumference and one point $$P$$ inside the circle such that $$AP=1$$, $$BP=2$$, $$OP=3$$, and $$\angle APB=90^{\circ}$$. If the area of the circle can be expressed as $\left(\dfrac{a+b\sqrt{c}}{d}\right)\pi$ for positive integers $$a,b,c,d$$ such that $$c$$ is square-free and $$a,b$$ are coprime with $$d$$, then find the value of $$a+b+c+d$$.

×


text:
# Time Dialation Question

1. Sep 28, 2005

### afbla

Hi I was wondering about how fast do you have to go before time dialation comes into effect

P.S. I'am no Qauntum physics professor so I don't know alot about relativity

2. Sep 29, 2005

### Tom Mattson

Staff Emeritus
This has nothing to do with quantum physics, so I'm moving it out of the Quantum Physics Forum.

It's not as though relativistic effects "kick in" at some critical speed. They are always applicable. It's just that they aren't noticeable at everyday speeds.

Now, if you want to know when relativistic effects are noticeable, that would depend on how sensitive your instruments are.

3. Sep 29, 2005

### pervect

Staff Emeritus
To give a very rough idea, at .001 times the speed of light, time dilation effects are about half a part per million. That's 3*10^5 meters/second.

Cesium clocks have accuracies on the order of a few parts per 10^14, so they can detect time dilation at speeds on the order of slightly over 10^-7 c, say 50 meters/sec, which is only around a hunderd miles/hour.

This comes from gamma = 1/sqrt(1-(v/c)^2) ~ 1 + (1/2)*(v/c)^2 for small v via a taylor series expansion.

4. Sep 29, 2005

### Staff: Mentor

Time Dilation Formula

The measured rate of a moving clock is given by the following formula, where $\Delta T_0$ is the time interval according to the moving clock itself and $\Delta T$ is the time interval as measured by clocks in the "stationary" frame ($v$ is the speed of the clock according to the stationary frame):
[tex]\Delta T = \frac{\Delta T_0}{\sqrt{1 - \frac{v^2}{c^2}}}[/itex]

Thus a time interval measured on the moving clock is observed to take longer according to the stationary frame; this is the meaning of time dilation and the statement "moving clocks run slow".

You can use this formula to see how time dilation depends on the speed of the clock ($v$) compared to the speed of light ($c$).

5. Sep 29, 2005

### Vast

afbla, there’s a nice little relativity calculator here especially for time dilation. Where it says “input” just put in a number close to the speed of light such as 290000 km/s and click on km/second. You’ll notice it gives a Relativistic Change Factor, which means, if it’s 3.944802246249386 for the above input of 290000 km/s, 1 year of your time on a spaceship traveling at such a speed would be 3.944 years on earth. Also notice that for significant time dilation to take affect the speed needs to be at least 0.9 the speed of light.

6. Oct 3, 2005

### Sam Woole

Does "3.944 years on earth" mean the earth planet has gone round the sun for 3.944 times?

7. Oct 3, 2005

### Staff: Mentor

Yes, that's what it means.

8. Oct 3, 2005

### pervect

Staff Emeritus
More or less, though picking nits, there are a number of different definitons of "year", depending on how one measures the earth going around the sun. One usual definition is the time between vernal equinoxes, however there are a number of subtle isues here.

To a level of 4 significant figures, though, the statement will be correct by most any of the possible subtly different definitions of "year".

As far as timekeeping goes, though, our atomic clocks keep much more accuarate time than astronomical motions do, and have become our primary time standard.

Atronomical motions will also not be very useful for a hypothetical space traveler as far as measuring time - he will not base his units of time by the astronomical motions of a distant planet around a distant sun (he won't even be able to observe them in real time). He will base his time on the atomic clocks that he caries with him.

9. Oct 4, 2005

### Sam Woole

Thank you, Doc Al. Maybe you knew that my question has something to do with time dilation. The whole sentence reads: "1 year of your time on a spaceship traveling at such a speed would be 3.944 years on earth." When the twin on the spaceship met his twin brother on earth, it means both twins have spent an equal time interval t, from departure on earth to meeting on earth. There could not have been two time intervals. Then a question has arisen. In this same time interval t, what has the planet earth done? Has it gone round the sun 1 time, or 3.944 times? Which is right, 1 or 3.944?

Undoubtly there can be only one right, the 3.944.
The 1 year on the spaceship is wrong. Does this mean that time dilation is nothing but false? It cannot be justified any way we try.

10. Oct 4, 2005

### Staff: Mentor

This means that folks on earth would measure 3.944 years passing on earth while the folks on the spaceship only experienced 1 year. Note that this is according to the earth. Things get interesting--and unambiguous--when the spaceship is able to make a round trip.

Again you have to realize that time is not an absolute, it really does depend on the relative motion of the frame doing the measuring. When the ship returns to earth, the two brothers will really be different ages!

If you are really interested in learning about time dilation and relativity, stick around and ask questions. (You aren't ready to understand the traveling twins quite yet--you first need to understand the relativity of simultaneity!) But please don't start up again with the accusations of lying, cheating, and claiming that relativity is "nothing but false". It's tiresome.

11. Oct 4, 2005

### JesseM

Time dilation is based on what would be read by clocks moving along with each observer--in this case, the earth-twin's clock will say that 3.944 years have passed when they reunite, while the travelling twin's clock will say 1 year has passed. The two twins don't disagree about what the other twin's clock reads--the travelling twin agrees that 3.944 years have passed on the earth-twin's clock, and the earth-twin agrees that 1 year has passed on the travelling twin's clock. The earth going around the sun is just like another type of "clock" that stays at rest relative to the earth-twin, so of course everyone agrees it elapses 3.944 years as well. If the travelling twin carried a copy of the earth and sun along with him on the trip, then the duplicate earth would have only completed 1 orbit when the two twins reunited, and both twins would agree that this was true.

12. Oct 5, 2005

### Sam Woole

JesseM, my understanding of your words above is: if both twins departed at the age of n, when they united both twins agreed they were both (n + 3.944) years old, the same age according to the clock kept by the earth twin. On the other hand, according to the clock kept by the traveled twin, both agreed that both were (n + 1) years old, the same age. That is to say, whichever way we looked at it, there is no differential aging, no time dilation.

13. Oct 5, 2005

### Staff: Mentor

Both twins agree that only 3.944 years have elapsed on earth. But what counts as far as aging goes is the time elapsed on the clocks that move along with each twin. Both twins will agree that the traveling twin is physically younger than the stay at home twin.

The twins themselves are biological clocks. To make the difference more apparent, increase the speed so that 100 years go by on earth while only a year passes on the ship. When the twin returns to earth, he'll find his brother long dead.

14. Oct 5, 2005

### Staff: Mentor

And both twins agree that one year has elapsed on on the traveling twin's spaceship. (just to make this point clear)

For a worked-out numeric example that demonstrates how the twins can arrive at this agreement, see posting #3 in this thread.

15. Oct 5, 2005

### JesseM

I don't know how you got that conclusion from my words. What I said was: "The two twins don't disagree about what the other twin's clock reads--the travelling twin agrees that 3.944 years have passed on the earth-twin's clock, and the earth-twin agrees that 1 year has passed on the travelling twin's clock." So if they departed at the age of n, this sentence tells you that the travelling twin would agree that the earth-twin was n+3.944, and the earth-twin would agree that the travelling twin was n+1.

16. Oct 5, 2005

### Sam Woole

While I do apologize for my offensive charges, on the other hand I do believe that there must be something wrong with the relativity theory, as can be deduced from your words above.

When the traveling twin left, he was in his inertia frame. The clock he carried was at rest in his frame. His clock therefore would work exactly like any other clocks in inertia frames such as the one carried by the earthbound twin. Don't you agree?

If you do, then both clocks would registered one identical departure time D when the twins departed; then both clocks would register one identical arrival time A when they met again. (A - D) would give one time interval, which means both twins are of the same age.

If you don't agree, then show me why the clock carried by one twin would work differently from the clock carried by the other twin.

17. Oct 5, 2005

### Staff: Mentor

All you can deduce is that relativity does not agree with your preconceptions about time.

All clocks do work the same way. They just don't work the way you think they do!

As measured from any inertial frame, the rate at which a moving clock operates depends on its speed. As long as the two clocks remain in their single inertial frames, they both can equally claim that the other's clock runs slow--perfect symmetry. But if the travelling twin makes a return trip to earth he cannot possibly remain in a single inertial frame; he must accelerate and thus change frames. (To really understand this you'll have to learn some relativity.)

It would be a problem if the motion of the twins were perfectly symmetric and yet their clocks read different times when they reunited. But their motion is not symmetric! One remains in an inertial frame; the other accelerates.

If you like, you can arrange for the two clocks to read the same at the start of the trip. But once you do, you'll find that they don't read the same when they are reunited. The only way you can deduce that the clocks would read the same is if you ignored what relativity has taught us about how moving clocks--and time itself--actually work and just assumed that time flows at the same rate for everyone, regardless of relative motion.

It's not that they work differently, it's that they were moved differently. One accelerates; the other doesn't.

18. Oct 7, 2005

### Sam Woole

I believe you were contradicting not only yourselves but also Einstein. Here you said "One accelearates; the other doesn't" This directly contradicted the principle of relativity, which means (to me at least) all motions are relative. If the spaceship accelerates relative to earth, earth is also accelerating relative to the spaceship. Based on this known principle, the earthbound twin would see the clock on the spaceship to have registered 1 year while his own has done 3.944 years. Similarly the spaceship twin would see the clock on earth has registered 1 year while his own has done 3.944 years. Your words : "As long as the two clocks remain in their single inertial frames, they both can equally claim that the other's clock runs slow--perfect symmetry. " Namely, it is always the other guy's clock running slow, not mine, acceleration or not. The fact that it is the other guy's clock running slow also agrees with the physical phenomenon as we know it, that light needs a time interval to reach the earth from the spaceship, say 2.944 years, and vise versa. When the two clocks come together, united on earth, both certainly will read the samething, no time dilation, no differential aging.

Not only you appeared contradicting yourselves, but also you were using languages that don't agree with convention. JesseM said the space twin carried a copy of the sun-earth. He also used the word "duplicate". If it was a duplicate, it must duplicate the number of orbits the earth has done. If it did not duplicate the number of orbits, then it was not a copy of the solar system. It was completely a different system, completely a different kind of clock, not the clock of identical construction specified by Einstein. In such a contradictory confusion people like me certainly cannot learn relativity. I do not understand how could some have.

If it were true that speed would make us younger, it must also be true that life forms on earth will never die, because the earth is always moving at c relative to light. But we are all dying. It is obvious to me that there is no time dilation.

19. Oct 7, 2005

### ZapperZ

Staff Emeritus
This is wrong. You can ALWAYS do an experiment to detect that you are accelerating. You cannot do an experiment to detect if you're moving without using another frame as a reference. The accelerating frame can always tell that it is accelerating, and can tell that another frame isn't.

Zz.

20. Oct 7, 2005

### Staff: Mentor

You need to learn to distinguish an inertial frame (non-accelerating) from an non-inertial frame (accelerating). The principle of special relativity can be written as "All inertial frames are equivalent for all experiments; no experiment can measure absolute velocity". If one frame accelerates, things are very different.

Wrong again. A solar system like sun-earth works exactly like any other clock. You just mistakenly think that the operation of a clock is independent of its speed with respect to the frame observing it.
It seems to me that you much prefer the comfort of your preconceptions.

Wrong again. This is exactly the opposite of what relativity actually says. The principle of relativity says that I age at the usual rate according to my clocks, and that it would be a violation of physics if it were any other way. And you (on that uniformly moving spaceship) age at the usual rate according to your clocks. You can't tell that you are "really" moving (at least not by how your own clocks work).


text:
# 그라우팅 재료가 지중 유효열전도도에 미치는 영향

• 손병후 (한국건설기술연구원, 화재.설비연구부)
• Published : 2007.05.30

#### Abstract

The design of a ground-source heat pump system includes specifications for a ground loop heat exchanger where the heat transfer rate depends on the thermal conductivity of the ground. To evaluate this heat transfer property, in-situ thermal response tests on four vertical test boreholes with different grouting materials were conducted by adding a monitored amount of heat to water over various test lengths. By measuring the water temperatures entering and exiting the loop, water flow rate, and heat load, effective thermal conductivity values of the ground were determined. The effect of increasing thermal conductivity of grouting materials from 0.82 to 1.05 W/m$^{\circ}C$ resulted in overall increases in effective ground thermal conductivity by 25.8% to 69.5%.


text:
# A classification of some 3-Calabi-Yau algebras

OASW02 - Subfactors, higher geometry, higher twists and almost Calabi-Yau algebras

This is a report on joint work with Izuru Mori and work of Mori and Ueyama.
A graded algebra A is Calabi-Yau of dimension n if the homological shift A[n] is a dualizing object in the appropriate derived category. For example, polynomial rings are Calabi-Yau algebras. Although many examples are known, there are few if any classification results. Bocklandt proved that connected graded Calabi-Yau algebras are of the form TV/(dw) where TV denotes the tensor algebra on a vector space V and (dw) is the ideal generated by the cyclic partial derivatives of an element w in TV. However, it is not known exactly which w give rise to a Calabi-Yau algebra. We present a classification of those w for which TV/(dw) is Calabi-Yau in two cases: when dim(V)=3 and w is in V and when dim(V)=2 and w is in V{\otimes 4}.  We also describe the structure of TV/(dw)  in these two cases and show that (most) of them are deformation quantizations of the polynomial ring on three variables.

This talk is part of the Isaac Newton Institute Seminar Series series.

## This talk is included in these lists:

Note that ex-directory lists are not shown.


text:
# $\vert$q/p$\vert$ INSPIRE search

The mass eigenstates ${{\mathit D}_{{1}}^{0}}$ and ${{\mathit D}_{{2}}^{0}}$ are related to the $\mathit C$ = $\pm1$ states by $|{{\mathit D}_{{1,2}}}>$ = p$~|{{\mathit D}^{0}}>$ + q $|{{\overline{\mathit D}}^{0}}>$. See the note on ${{\mathit D}^{0}}--{{\overline{\mathit D}}^{0}}$ Mixing'' above.

OUR EVALUATION'' comes from CPV allowing averages provided by the Heavy Flavor Averaging Group. This would include as-yet-unpublished results, see the note on ${{\mathit D}^{0}}-{{\overline{\mathit D}}^{0}}$ Mixing.''
VALUE EVTS DOCUMENT ID TECN  COMMENT
$\bf{ 0.92 {}^{+0.12}_{-0.09}}$ OUR EVALUATION  HFAG fit; see the note on ${{\mathit D}^{0}}-{{\overline{\mathit D}}^{0}}$ Mixing.''
$\bf{ 0.97 {}^{+0.14}_{-0.12}}$ OUR AVERAGE
$1.05$ ${}^{+0.22}_{-0.17}$ 2.3M 1
 2019 X
LHCB ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}_S^0}$ ${{\mathit \pi}^{+}}{{\mathit \pi}^{-}}$
2
 2018 K
LHCB ${{\mathit p}}{{\mathit p}}$ at 7, 8, 13 TeV
$0.90$ ${}^{+0.16}_{-0.15}$ ${}^{+0.08}_{-0.06}$ 3
 2014
BELL ${{\mathit e}^{+}}$ ${{\mathit e}^{-}}$ $\rightarrow$ ${{\mathit \Upsilon}{(nS)}}$
• • • We do not use the following data for averages, fits, limits, etc. • • •
4
 2013 CE
LHCB Repl. by AAIJ 2018K
$0.86$ ${}^{+0.30}_{-0.29}$ ${}^{+0.10}_{-0.08}$ 5
 2007 B
BELL Repl. by PENG 2014
1  AAIJ 2019X ${{\mathit D}^{0}}$ come from ${{\mathit D}^{*+}}$ and ${{\overline{\mathit B}}}$ $\rightarrow$ ${{\mathit D}^{0}}{{\mathit \mu}^{-}}{{\mathit X}}$ decays (and c.c.) in ${{\mathit p}}{{\mathit p}}$ collisions at 7 and 8 TeV.
2  Based on 5 fb${}^{-1}$ of data collected at $\sqrt {s }$ = 7, 8, 13 TeV. Allowing for $\mathit CP$ violation, the direct $\mathit CP$ violation in mixing is reported 1.00 $<$ $\vert$q/p$\vert$ $<$ 1.35 at the 68.3$\%$ CL for the ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}^{+}}{{\mathit \pi}^{-}}$ and ${{\overline{\mathit D}}^{0}}$ $\rightarrow$ ${{\mathit K}^{+}}{{\mathit \pi}^{-}}$ .
3  The time-dependent Dalitz-plot analysis of ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}_S^0}$ ${{\mathit \pi}^{+}}{{\mathit \pi}^{-}}$ is employed. Decay-time information and interference on the Dalitz plot are used to distinguish doubly Cabibbo-suppressed decays from mixing and to measure the relative phase between ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}^{*+}}{{\mathit \pi}^{-}}$ and ${{\overline{\mathit D}}^{0}}$ $\rightarrow$ ${{\mathit K}^{*+}}{{\mathit \pi}^{-}}$ . This value allows $\mathit CP$ violation and is sensitive to the sign of $\Delta \mathit m$.
4  Based on 3 fb${}^{-1}$ of data collected at $\sqrt {s }$ = 7, 8 TeV. Allowing for $\mathit CP$ violation, the direct $\mathit CP$ violation in mixing is reported 0.75 $<$ $\vert$q/p$\vert$ $<$ 1.24 at the 68.3$\%$ CL for the ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}^{+}}{{\mathit \pi}^{-}}$ and ${{\overline{\mathit D}}^{0}}$ $\rightarrow$ ${{\mathit K}^{+}}{{\mathit \pi}^{-}}$ .
5  The phase of p/q is ($-14$ ${}^{+16}_{-18}$ $\pm5)^\circ{}$. The ZHANG 2007B value is from the time-dependent Dalitz-plot analysis of ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}_S^0}$ ${{\mathit \pi}^{+}}{{\mathit \pi}^{-}}$ . Decay-time information and interference on the Dalitz plot are used to distinguish doubly Cabibbo-suppressed decays from mixing and to measure the relative phase between ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}^{*+}}{{\mathit \pi}^{-}}$ and ${{\overline{\mathit D}}^{0}}$ $\rightarrow$ ${{\mathit K}^{*+}}{{\mathit \pi}^{-}}$ . This value allows $\mathit CP$ violation.
Conservation Laws:
 $\mathit CP$ INVARIANCE
References:
 AAIJ 2019X
PRL 122 231802 Measurement of the mass difference between neutral charm-meson eigenstates
 AAIJ 2018K
PR D97 031101 Updated determination of $D^0$-$\overline{D}{}^0$ mixing and CP violation parameters with $D^0\to K^+\pi^-$ decays
 PENG 2014
PR D89 091103 Measurement of ${{\mathit D}^{0}}−{{\overline{\mathit D}}^{0}}$ Mixing and Search for Indirect $\mathit CP$ Violation using ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}_S^0}$ ${{\mathit \pi}^{+}}{{\mathit \pi}^{-}}$ Decays
 AAIJ 2013CE
PRL 111 251801 Measurement of ${{\mathit D}^{0}}-{{\overline{\mathit D}}^{0}}$ Mixing Parameters and Search for $\mathit CP$ Violation using ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}^{+}}{{\mathit \pi}^{-}}$ Decays
 ZHANG 2007B
PRL 99 131803 Measurement of ${{\mathit D}^{0}}−{{\overline{\mathit D}}^{0}}$ Mixing Parameters in ${{\mathit D}^{0}}$ $\rightarrow$ ${{\mathit K}_S^0}$ ${{\mathit \pi}^{+}}{{\mathit \pi}^{-}}$ Decays


text:
parasys.net

Home > Error Propagation > Error Propagation Standard Deviation

Error Propagation Standard Deviation

Contents

The answer to this fairly common question depends on how the individual measurements are combined in the result. Note that even though the errors on x may be uncorrelated, the errors on f are in general correlated; in other words, even if Σ x {\displaystyle \mathrm {\Sigma ^ σ Let's say we measure the radius of a very small object. External links A detailed discussion of measurements and the propagation of uncertainty explaining the benefits of using error propagation formulas and Monte Carlo simulations instead of simple significance arithmetic Uncertainties and More about the author

Define f ( x ) = arctan  ( x ) , {\displaystyle f(x)=\arctan(x),} where σx is the absolute uncertainty on our measurement of x. The general expressions for a scalar-valued function, f, are a little simpler. This example will be continued below, after the derivation (see Example Calculation). of all the measurements as one large dataset - adjusts by removing the s.d. https://en.wikipedia.org/wiki/Propagation_of_uncertainty

Error Analysis Standard Deviation

The mean of this transformed random variable is then indeed the scaled Dawson's function 2 σ F ( p − μ 2 σ ) {\displaystyle {\frac {\sqrt {2}}{\sigma }}F\left({\frac {p-\mu }{{\sqrt Table 1: Arithmetic Calculations of Error Propagation Type1 Example Standard Deviation ($$\sigma_x$$) Addition or Subtraction $$x = a + b - c$$ $$\sigma_x= \sqrt{ {\sigma_a}^2+{\sigma_b}^2+{\sigma_c}^2}$$ (10) Multiplication or Division $$x = General functions And finally, we can express the uncertainty in R for general functions of one or mor eobservables. Call this result Sm (s.d. University Science Books, 327 pp. Journal of Sound and Vibrations. 332 (11). Error Propagation Covariance JSTOR2281592. ^ Ochoa1,Benjamin; Belongie, Serge "Covariance Propagation for Guided Matching" ^ Ku, H. Generated Fri, 14 Oct 2016 15:00:55 GMT by s_ac15 (squid/3.5.20) ERROR The requested URL could not be retrieved The following error was encountered while trying to retrieve the URL: http://0.0.0.10/ Connection Standard Error Standard Deviation of those averages. Typically, error is given by the standard deviation (\(\sigma_x$$) of a measurement. https://en.wikipedia.org/wiki/Propagation_of_uncertainty doi:10.6028/jres.070c.025.

You want to know how ε SD affects Y SD, right? How To Find Propagation Of Error Text is available under the Creative Commons Attribution-ShareAlike License; additional terms may apply. I really appreciate your help. If Rano had wanted to know the variance within the sample (the three rocks selected) I would agree.

Standard Error Standard Deviation

Would it still be 21.6 ± 24.6 g? http://lectureonline.cl.msu.edu/~mmp/labs/error/e2.htm haruspex, May 27, 2012 May 27, 2012 #14 haruspex Science Advisor Homework Helper Insights Author Gold Member viraltux said: ↑ But of course! Error Analysis Standard Deviation We know the value of uncertainty for∆r/r to be 5%, or 0.05. Standard Deviation Standard Deviation doi:10.1016/j.jsv.2012.12.009. ^ Lecomte, Christophe (May 2013). "Exact statistics of systems with uncertainties: an analytical theory of rank-one stochastic dynamic systems".

Simplification Neglecting correlations or assuming independent variables yields a common formula among engineers and experimental scientists to calculate error propagation, the variance formula:[4] s f = ( ∂ f ∂ x http://parasys.net/error-propagation/error-propagation-formula-standard-deviation.php Peralta, M, 2012: Propagation Of Errors: How To Mathematically Predict Measurement Errors, CreateSpace. Some error propagation websites suggest that it would be the square root of the sum of the absolute errors squared, divided by N (N=3 here). of the population that's wanted. Error Propagation Mean

Derivation of Arithmetic Example The Exact Formula for Propagation of Error in Equation 9 can be used to derive the arithmetic examples noted in Table 1. Retrieved 2013-01-18. ^ a b Harris, Daniel C. (2003), Quantitative chemical analysis (6th ed.), Macmillan, p.56, ISBN0-7167-4464-3 ^ "Error Propagation tutorial" (PDF). Then we go: Y=X+ε → V(Y) = V(X+ε) → V(Y) = V(X) + V(ε) → V(X) = V(Y) - V(ε) And therefore we can say that the SD for the real http://parasys.net/error-propagation/error-propagation-standard-deviation-mean.php This is easy: just multiply the error in X with the absolute value of the constant, and this will give you the error in R: If you compare this to the

In both cases, the variance is a simple function of the mean.[9] Therefore, the variance has to be considered in a principal value sense if p − μ {\displaystyle p-\mu } Uncertainty Subtraction I'll give this some more thought... I'm not clear though if this is an absolute or relative error; i.e.

But now let's say we weigh each rock 3 times each and now there is some error associated with the mass of each rock.

What is the error then? That was exactly what I was looking for. Example: If an object is realeased from rest and is in free fall, and if you measure the velocity of this object at some point to be v = - 3.8+-0.3 Error Propagation Formula UC physics or UMaryland physics) but have yet to find exactly what I am looking for.

What's needed is a less biased estimate of the SDEV of the population. These instruments each have different variability in their measurements. I think this should be a simple problem to analyze, but I have yet to find a clear description of the appropriate equations to use. navigate to this website For highly non-linear functions, there exist five categories of probabilistic approaches for uncertainty propagation;[6] see Uncertainty Quantification#Methodologies for forward uncertainty propagation for details.

In a probabilistic approach, the function f must usually be linearized by approximation to a first-order Taylor series expansion, though in some cases, exact formulas can be derived that do not Caveats and Warnings Error propagation assumes that the relative uncertainty in each quantity is small.3 Error propagation is not advised if the uncertainty can be measured directly (as variation among repeated Le's say the equation relating radius and volume is: V(r) = c(r^2) Where c is a constant, r is the radius and V(r) is the volume. Berkeley Seismology Laboratory.

This is desired, because it creates a statistical relationship between the variable $$x$$, and the other variables $$a$$, $$b$$, $$c$$, etc... External links A detailed discussion of measurements and the propagation of uncertainty explaining the benefits of using error propagation formulas and Monte Carlo simulations instead of simple significance arithmetic Uncertainties and I think this should be a simple problem to analyze, but I have yet to find a clear description of the appropriate equations to use. UC physics or UMaryland physics) but have yet to find exactly what I am looking for.

I would believe $$σ_X = \sqrt{σ_Y^2 + σ_ε^2}$$ There is nothing wrong. σX is the uncertainty of the real weights, the measured weights uncertainty will always be higher due to the Retrieved 3 October 2012. ^ Clifford, A.


text:
# All Questions

3 views

### Unable to use section in appendix package

I try to use appendix package for my document, but I have problems using a command. There is no error in the minimal code, but in my original document it is. I tried a lot of modifications, and I ...
4 views

### Present reference in a table

How can the reference section be changed that the reference appear in table: {\bf Reference} \begin{tabularx}{\textwidth}{||c|X||}\hline\hline cite1 & Title, author etc\\ \hline cite2 ...
11 views

### Are odd pages always on the right-hand page?

I have a document whose page numbering starts on the first page, which is obviously a right-hand side page. This makes every right-hand side page odd and every left-hand side page even, as usual. ...
11 views

### question on multicols width and minipages difference in section vs. main document

I am trying to split a page into 2 halfs, using 2 minipages side by side. So I made the following construct \begin{multicols}{2} \begin{minipage}[t]{0.45\textwidth} stuff here \end{minipage} % ...
16 views

### Macro or \def to create lines in a table

I have a certain table to which I would like to add lines by a command. One way I can get to this looks like this: \newcommand\arow[3]{ #1 & #2 & #3 \tabularnewline } and the table ...
8 views

### how do I put a line break among multiple tikzpictures?

If I do this: \documentclass{standalone} \usepackage{tikz} \begin{document} \begin{tikzpicture}[scale=3,>=latex, font=\sffamily] \draw [->](0,0) -- (0,1) node[at end, above left, rotate=90] ...
6 views

### CV template not compiling

I am attempting to get someone else's CV template to compile but it is not working. I am on Linux using the TeX Live packages. Unfortunately the following line is causing problems: \setromanfont ...
28 views

### Single character keywords/operators with no spaces with listings package

I want to add a very simple macro language to listings. It uses single-letter keywords/operators, with no whitespace between. I can't see how to make keywords that don't require some kind of separator ...
13 views

### How to move the matrix on the left side?

I have to move the matrix on the left side in order to fit in the page. How to do it? \documentclass[smallextended]{svjour3} % onecolumn (second format) \usepackage[paperwidth=165mm, ...
21 views

### How to change the title, abstract and headings font to Sans Serif

I'm making a journal publication in LaTeX and I've been trying to change the font of all my non-main texts to a sans serif font. Meaning, all the headings, titles, section titles, abstracts and so on ...
30 views

### Width of figure affects caption position

I would like to control the amount of space between a (starred) caption below a figure with width=\linewidth. However, when I choose skip=0pt, there is additional space compared to a figure of smaller ...
22 views

### Issues with feynman diagram vertex

I'm unable to put more then one label on a vertex in a Feynman diagram. I've tried to use the command \fmfv twice or with more then one argument, but sadly I'm not getting the result I wished for. ...
20 views

### how to move a rotated of 90 deg text on the left bottom corner of the page?

I would like the text on the bottom left corner of the page. Instead, the text is on the top side of the page. I am trying to move it down, I deleted \centering and I tried also other options I set ...
12 views

### Article Class, A4/a4 “Unused Global Option”

I'm trying to typeset an article. The document class is as follows: \documentclass[a4]{article} I have also tried: \documentclass[A4]{article} Both yield the following error: LaTeX Warning: ...
67 views

### How to draw an 1-D array

I want to draw something like this: Easier or better way to draw 1d array. The problem is that I need to change the value of the second array and I don't know how to do that using stack instead of ...
653 views
+100

### How could LaTeX replace the tokens <= by the command \leq?

How could LaTeX replace the tokens <= by the command \leq efficiently? Example 1: I have this code: $2x <= 4x - 2$ And I want to get after the compilation this: Example 2: \[ ...
18 views

### Set color of \emph{} in beamer

How can I set the color of the \emph{}-tag in beamer? I tried something like \setbeamercolor{emph}{fg=red} inside of beamercolortheme.sty but it had no effect.
25 views

### Strange behavior using tkz-fct

Lately I've using the tkz-fct package for plotting graphs and I have a document with several graphs but something weird occur when I use \tkzDefPointByFct in some graphs the first graph doesn't have ...
53 views

### How can I fix my bibliography with LaTeX?

Hello I am newbie with Latex and I couldn't compile my bibliography.tex when I comment it the pfd work well but when I uncomment it. the PDF doesn't appear and I couldn't resolve it I tried a lot ...
81 views

### Table with a diagonal line that crosses cells

How can I draw the following table in LaTeX? I tried looking here but from the examples I can't figure out how I can draw this. Edit: After browsing a few more times I found this with the help of ...
32 views

### Row sep in Tikz for a single row of a legend

I'm using the legend-only solution from Using a pgfplots-style legend in a plain-old tikzpicture How can I get a style for a single row? I'm trying to have row sep = 5pt for example for all rows, but ...
14 views

### Separation of two authors using the amsart document class

I want to achieve a similar result to this one (see answer). However, I am using the amsart document class and the result for that code is this: The problem I believe is with the \and command that ...
40 views

### I have to draw this graph by tikz [on hold]

How to draw this graph by tikz?
24 views

### Syncing Two Files

I am creating two documents: 1 is a set of homeworks and the other is their solutions. Each homework and solution set is its own .tex file and there is a master .tex for the HW-booklet and another for ...
16 views

### KOMA-Script error trying to use enotez in WinEdt

I am trying to use the package enotez for the first time and WinEdt will not compile even a simple test file such as the following: \documentclass{article} \usepackage{footmisc,enotez} ...
470 views

### TeXstudio: \ref and \eqref auto-completion

I've read quite a few questions and answers on this web site but none helps me to resolve my problem. I am using \ref and \eqref commands most often. After installing and re-installing the latest ...
57 views

### TikZ: Perpendicular bisector of a line

Given two coordinates A and B, I'd like to draw the perpendicular bisector (of any length) of the line joining A and B. I am not given any extra information, and A and B can be any two coordinates ...
40 views

### Spy glasses in a group plot

I have a group plot in which the graphs have common x axis and are stacked one over the other- like the one givenhere. Now, I want to have a spy glass on each of these plots in the group. But when I ...
41 views

### Using Separate Serif and SansSerif Fonts in a Document

I have a bunch of figures that I am compiling using the standalone class in which I load two font packages mathpazo for the serif fonts and cabin for the sans serif fonts. The problem is that when I ...
24 views

I am new to here. I am using beamer to make ppt, so I have a question: I like the warsaw theme, but I also like boadilla navigation bar. So my idea is using warsaw theme, but at bottom of each slide I ...
706 views

### Lyx citation style: et al only when three or more authors

I'm using lyx and bibtex for my master thesis. In lyx, I changed the bibliography style from standard to natbib (author-year). The problem occurs when I cite a paper with two authors. The reference to ...
7k views

### LaTeX in CorelDRAW

What is a good way to get LaTeX formulas into CorelDRAW figures? I will provide a solution below, based on a rather old macro adapted to work on 64 bit systems as well as 32 bit - it works well, but ...
15 views

### How to place the illustration on the page in two columns and number them?

How to place the illustration on the page in two columns and number them? and another question. How to insert an image height of 30 % of the height of the text. Thank you.
8 views

### vim-latex suite doesn't expand packages

Recently I reinstalled Ubuntu 15.10 (after having too many problems with 16.04) and everything else I need. I used Vim-latex to write, compile and view tex documents, and it was so easy to press F5 ...
45 views

### Persistent Gap! [duplicate]

I'm working on my paper using MiKTex v2.9 and i came across this odd problem with {proof} environment. Syntax i use for proof is working properly in other areas of text but in one place i encountered ...
312 views

### Highlight a specific author name in bibliography using babelbib

I want to highlight (more precisely make bold) a specific author name in bibliography using bibtex. There are several answers to this question, like this, this, this, this or this one. However, I'm ...
8 views

### macvim: latex-suite reference autocomplete does not work after mac update

I recently had a software update of my macbook pro, then I noticed an issue with my latex-suite autocomplete function for references. \cite{<F9>} not will always open an empty outline window ...
31 views

### How to use gnuplottex?

I want to use gnuplottex, but even example from documentation don't work. \documentclass[a4paper]{article} \usepackage{gnuplottex} \begin{document} \begin{figure}% \centering% ...
36 views

### How to rename acknowledgment

Question: As a Chinese student, we are asked to use some extremely stupid template where it is "致谢"(the Chinese of acknowledgment) on the places of where "Acknowledgment" should be. I have a simple ...
19 views

### Setting Exact Length for producing a CV

I am currently working on my CV. I found a template online, and the code at the beginning is as follows: \documentclass[margin,line]{res} \oddsidemargin -.5in \evensidemargin -.5in ...
44 views

### Cannot find bibliography

I am working on my thesis and apparently, when compiling the file, it does not find any bibliography file, whereas this is actually located in the same path as my thesis file. The code I have is: ...
22 views

I wrote out my table of contents as follows: \begin{document} \pagestyle{fancy} % The page style headers have been "empty" all this time, now use the "fancy" headers as defined before to bring them ...
18 views

### Problems compiling outside of sharelatex

My tex file compiles in sharelatex, with a few minor errors, but it works. The problem is that when I try to download the project file and compile it in texmaker it has a huge list of errors. These ...
16 views

### MATLAB generated Tikz not working

When trying to use a .tikz file generated from a MATLAB script, the .tex file errors and is not able to build. The .tex code is as follows: \documentclass{article} \usepackage{amsmath} ...
51 views

### Make a smoother plot of functions with pgfplots

The following code gives me a plot which is not very smooth. It looks like several points (with spacing 0.5 in the horizontal direction) are drawn first and then connected by straight lines. What ...
16 views

### How do I get the value of 'columnwidth'? [duplicate]

I am using the ACM SIG Template for a conference paper (a two-column document). And I'd like to insert several figures plotted by matplotlib. I was wondering what is the width I should set for ...
20 views

### How to change the line spacing within an equation environment? [duplicate]

see this post Example; \begin{equation*} \begin{aligned} 1 + 2 = 3 \\[3mm] 3 + 1 = 4 \\[3mm] 4 + 1 = 5 \end{aligned} \end{equation*} I find that I'm often adding the [3mm] to the ...
13 views

### BibLaTeX automatic capitalization of pubstate in entrytype thesis?

I have a bibliography entry of type thesis, with institution and pubstate given. In the citation, this results in a dot after the institution, followed by uncapitalized version of pubstate. I would ...
I noticed this on accident (I actually meant to render \mathbb{N}_0). Take the following example \documentclass{article} \usepackage{amsmath} \usepackage{amssymb} \begin{document} $$\mathbb{N_0}$$ ...


text:
## Main

Over the past decades, the spread of antibiotic resistance among pathogenic bacteria has become a global threat1. Because of comprehensive medical application and extensive use in agriculture, antibiotic resistance has increased steadily2,3. The contamination of natural environments with low antibiotic concentrations from wastewater might further contribute to resistance spread4,5. As a consequence, infections with antibiotic-resistant bacteria are predicted to be a major cause of death6 by 2050. New approaches in the fight against antibiotic resistance are thus desperately needed. Their successful development and implementation rely on in-depth understanding of the evolution of antibiotic resistance.

Evolution of drug resistance is not only influenced by the presence of the antibiotic per se. It is also affected by the drug concentration and the resulting selective constraints, as well as different population-genetic characteristics, such as population size and bottlenecks. Surprisingly, the combined influence of these factors has been largely neglected in current work on evolution of resistance, despite their likely relevance in vivo7,8,9. Populations of pathogenic bacteria undergo severe bottlenecks during an infection of a host, imposed by the host immune system, physical properties of infected tissues, transmission between hosts and, importantly, as a consequence of antibiotic treatment10,11,12,13, thereby linking population size and antibiotic-induced selection. In the presence of such bottlenecks, adaptation is strongly influenced by genetic drift, and the first beneficial variants that arise by chance usually face little clonal competition and have a higher probability of going to fixation14,15. Over time, this leads to periodic selection with decreased likelihood of parallel evolution16,17,18. By contrast, higher degrees of parallel evolution and clonal interference are expected in the case of weaker bottlenecks14,15. As higher genetic diversity is more likely to be maintained, the fittest variants tend to occur repeatedly under weak bottlenecks and steer the adaptative process19,20,21. In this context, variation in antibiotic dose alters the degree of selection on bacterial populations, often favouring different resistance mutations22,23. This is especially true in the case of trade-offs between resistance level or mechanism and competitiveness7.

The aim of our study is to assess to what extent bottleneck size and its likely interaction with antibiotic-induced selection affect evolution of drug resistance. To address this aim, we combined evolution experiments with whole-genome sequencing (WGS) and genetic analysis using P. aeruginosa, one of the three World Health Organization priority 1 most critical multidrug-resistant pathogens24. Experimental evolution was performed by serial dilution, for which we developed a protocol that achieves precise control of bottleneck size. P. aeruginosa reference strain PA14 was evolved over approximately 100 generations at two regular bottleneck sizes (BN): 50,000 or 5,000,000 cells, referred to as k50 or M5, respectively—and at three distinct selection levels (defined by the 0%, 20% or 80% inhibitory drug concentration: IC0, IC20 or IC80, respectively). Evolution experiments were performed for two antibiotics with different modes of action, the aminoglycoside gentamicin (GEN) or the fluoroquinolone ciprofloxacin (CIP). Genome sequencing and genetic analyses were used to identify the targets of selection and assess competitive fitness of the identified variants.

## Results

We performed fully independent experiments with the antibiotics GEN and CIP, but otherwise identical experimental design (Extended Data Fig. 1). On the basis of cell counts at the beginning and end of each growth period, we calculated the harmonic mean of population size and found that the experimentally controlled bottleneck size was indeed the main determinant of population-size differences among treatments (Extended Data Figs. 2 and 3 and Supplementary Table 1), thereby confirming the general suitability of our experimental design for assessing the influence of bottlenecks on evolution of resistance. Nevertheless, antibiotic concentration has an additional, smaller influence on this integrative measure of population size, especially at the beginning of the experiment (Extended Data Figs. 2 and 3). We then studied the evolutionary response to antibiotics for two types of traits—bacterial fitness and antibiotic resistance—each assessed using two approaches. As a proxy for bacterial fitness, we analysed the overall yield relative to the no-drug IC0 control, inferred from counts of viable cells at the end of each growth period across the evolution experiment, and growth rates, inferred from continuous optical density (OD) measurements throughout the evolution experiments (Methods). For resistance analysis, we used an integrative resistance estimate for bacterial populations from the end of the evolution experiment, measured as area under the curve (AUC) of a standardized dose–response curve, and proxies for minimum inhibitory concentrations (MIC), inferred from the standardized dose–response curves for the final populations (Methods).

Across both evolution experiments, we consistently observed the highest overall yields for treatment with weak bottlenecks (that is, IC20-M5 and IC80-M5), followed by the IC20-k50 and IC80-k50 treatments (Fig. 1a,c, Extended Data Fig. 4 and Supplementary Tables 2 and 3). Our analysis of growth rates as an alternative proxy for fitness produced a consistent pattern for the CIP experiment (Extended Data Fig. 5 and Supplementary Table 4). However, for the GEN experiment, growth rates were significantly lower for the IC20-M5 treatment, while growth rates for the other treatments did not vary from each other (Extended Data Fig. 5 and Supplementary Table 4). In this case, the comparatively high yields achieved under IC20-M5 cannot rely on growth rate alone. We further consistently observed that the variation in overall yield only partially translated into final resistance. Irrespective of the drug and the approach used for resistance analysis, the highest resistance was always observed for the IC20-k50 and IC80-M5 treatments, in contrast to lower resistance in the IC20-M5 and IC80-k50 treatments (Fig. 1b,d, Extended Data Fig. 6 and Supplementary Tables 58). All antibiotic treatments produced higher resistance than the ancestor or no-drug IC0 control (Extended Data Fig. 6 and Supplementary Tables 58). Together, these data suggest that P. aeruginosa is better able to adapt under weak bottlenecks and produce higher bacterial yields, irrespective of the applied antibiotic. Interestingly, the ability to produce high yield is not necessarily the result of evolving higher levels of resistance, thus indicating that selection acts distinctly on these two parameters.

Our subsequent genome analysis of the populations from the GEN experiment revealed that high population variant frequencies were primarily found in two genes (ptsP and pmrB) under weak bottlenecks, but in more genes under strong bottlenecks, and distinct variants emerged in environments with different antibiotic concentrations (Figs. 2 and 3 and Extended Data Figs. 7–9). In detail, we used WGS to identify the possible targets of selection and to characterize variant frequencies, either for the final populations from the evolution experiment (Fig. 2; total of 48 populations for the two evolution experiments) or across time (Fig. 3 and Extended Data Figs. 7 and 8; total of 46 populations, each assessed over 7 time points for the two experiments). For the GEN experiment, we found variants in more than a dozen genes with different functions. Among these, the most frequently mutated genes were the two-component regulatory systems PmrAB, ParRS and PhoPQ, as well as the gene ptsP, which is involved in nitrogen metabolism (Figs. 2a and 3). Weak bottlenecks led to high-frequency variants in only few genes: for IC20-M5, mainly in ptsP, and for IC80-M5, mainly in ptsP and pmrB (Supplementary Table 9). Interestingly, variants in ptsP emerged and reached detectable frequencies across all replicate populations more frequently than variants in other genes (Supplementary Table 9), possibly indicating a mutational bias. Nevertheless, this possible bias did not lead to predominance of ptsP variants across treatments.

In the GEN experiment, the divergence of favoured gene variants was higher in the populations that faced strong bottlenecks, both at the end of the evolution experiment and across time (Figs. 2a and 3 and Extended Data Fig. 7). This resulted in consistently more strongly differentiated replicate populations compared with the populations that experienced weak bottlenecks (indicated by higher FST values; Extended Data Fig. 9a). Moreover, variant frequencies increased more slowly when undergoing low-selection treatments rather than with high-selection treatments (IC20 compared with IC80 treatments; Fig. 3). Particularly for the low-selection and strong-bottleneck treatment IC20-k50, new variants usually did not reach detectable frequencies before transfer period 7 or 9, and high variant frequencies developed only during the second half of the experiment (Fig. 3a). In contrast, the IC80-M5 treatment usually showed high frequencies of new favoured variants by transfer 3 (Fig. 3d). In general, more competitive dynamics, consisting of more simultaneous variants at particular time points, appear to be common in treatments with weak bottlenecks (5 out of 7 replication populations each for the IC20-M5 and IC80-M5 treatments; Fig. 3c,d).

In the CIP experiment, only two treatment groups yielded information on variant distribution. For these treatments, the genomic results appear to be consistent with the GEN experiment. Only one population survived the high-selection and strong-bottleneck treatment IC80-k50, thus precluding more detailed genome comparisons. For the remaining two treatments, we found variants in six genes, almost all affecting multidrug efflux (Fig. 2b). The different CIP treatment groups appeared to favour variants in different genes: mexZ variants occurred exclusively under IC20-k50, whereas mexS and nfxB variants occurred primarily under IC80-M5 conditions (Supplementary Table 10). Moreover, weak-bottleneck treatments appeared to produce variants in a smaller number of genes (Fig. 2b), which then also reached high frequencies much earlier than in strong-bottleneck treatments (Fig. 3e,f and Extended Data Fig. 8), resulting in lower FST indices for population differentiation (Extended Data Fig. 9b) and low diversity indices (Supplementary Table 11). The most important difference between the CIP and GEN experiments is that we could not detect any new variants for the low-selection and weak-bottleneck treatment IC20-M5. Since identical methods were used for WGS analysis across treatment groups, the genomic response of this treatment is clearly distinct from those of the other treatments. This result suggests that the observed response in yield under IC20-M5 conditions (Fig. 1c) results from phenotypic, non-heritable adaptations.

While ptsP variants emerged and reached detectable frequencies more often than variants in other genes across the entire GEN evolution experiment (Supplementary Table 9), they did not predominate in all treatment groups. For example, pmrB variants appear to be at least as strongly favoured as the ptsP variants under IC80-M5 conditions, especially if temporal dynamics are considered (Figs. 2a and 3a–d). To further assess the differential success of ptsP and pmrB variants, we specifically characterized variants of these genes and found opposite effects in resistance and competitive fitness (Fig. 4). First, we used a subset of the obtained GEN-resistance data (see Fig. 1b) to assess whether populations with high frequencies of either pmrB or ptsP variants differ in resistance, revealing that variants in pmrB are significantly more resistant than variants in ptsP (Fig. 4a and Supplementary Table 12). This suggests that the pmrB variants should have been selectively favoured in all treatments with antibiotics, which however was not the case (Figs. 2 and 3). We then assessed the competitive fitness of individual variants at different antibiotic concentrations and bottleneck sizes. For this, we isolated three strains with a single variant in ptsP and three strains with a single variant in pmrB from different evolved populations of the same or comparable evolution treatments (in all cases, the isolated variants showed high frequencies in the genomic analysis; Supplementary Table 13). Additional WGS revealed that the isolated strains only varied from the ancestor at the expected mutations in either ptsP or pmrB (Methods). These strains with either ptsP or pmrB variants were each combined with either the ancestral wild-type PA14 reference strain or with each other, always in a 1:1 competition ratio and for a single growth period of 12 h, followed by variant frequency analysis using amplicon sequencing. We found that the ptsP variants possessed significantly higher competitive fitness than pmrB variants under low antibiotic concentrations or absence of drugs (IC0 and IC20 treatments; Fig. 4b, Extended Data Fig. 10 and Supplementary Table 14). However, no significant difference in pmrB variant frequencies versus ptsP was detected under IC80 conditions. In summary, ptsP variant frequencies decreased with increasing antibiotic concentration. The competition against PA14 in drug-free environments showed an equal frequency of ptsP and a lower frequency of pmrB variants compared with the ancestor. All resistant strains outcompeted PA14 in the treatment groups with antibiotics (Fig. 4b, Extended Data Fig. 10 and Supplementary Table 14).

## Discussion

Bottlenecks occur frequently in natural populations of pathogenic bacteria and have a critical role in pathogen adaptation during infection and transmission25,26,27. The interplay of bottlenecks and antibiotic-induced selection is therefore likely to be key for evolution of resistance in vivo, but is widely neglected in the current literature on antibiotic resistance. Here, using an approach in which population bottleneck size is controlled by counting cells with flow cytometry, we demonstrate a consistent and reproducible interplay of the two factors on the dynamics of resistance evolution in two independent sets of evolution experiments. By varying both factors, we could specifically assess which aspects of bacterial adaptation are affected by a strong bottleneck alone. As predicted, we found that high resistance emerged when bottlenecks were weak and selection was strong. Surprisingly, however, high resistance also repeatedly evolved with strong bottlenecks and weak selection, most probably because the lower selective constraints reduced the bottleneck-induced probability of losing favourable alleles. Moreover, in one of the experiments, weak bottlenecks and weak selection favoured the spread of variants with low-level antibiotic resistance but higher competitive fitness than more resistant variants, leading to a low degree of resistance under these conditions. Furthermore, strong bottlenecks increased variation across replicate populations, most probably due to high genetic drift, resulting in little parallel evolution. Together, our results provide evidence for a critical influence of both bottlenecks and the level of antibiotic-induced selection on the dynamics of evolution of antibiotic resistance.

Our main findings were consistent across the two independent sets of evolution experiments, which were performed with distinct antibiotics from two different classes, aminoglycosides and fluoroquinolones, and with several independent replicates per treatment. Across these two sets of experiments, we found that the larger starting population size under weak bottlenecks often favoured competition between independent mutations, with one ultimately being lost, depending on the strength of antibiotic selection (Figs. 2 and 3). This observation agrees with the original expectation that weak bottlenecks facilitate a higher degree of parallel evolution because of the increased probability of the fittest mutants occurring and outcompeting others24. In accordance with this expectation, populations experiencing weak bottlenecks had a comparatively high overall yield (Fig. 1a,c), indicating that the bacteria were indeed able to respond to the respective selection conditions. By contrast, strong bottlenecks in both sets of evolution experiments led reproducibly to a comparatively late spread of variants and large variation among replicate populations in the variant genes, highlighting the strong influence of genetic drift under these conditions (Figs. 2 and 3).

There are two important exceptions to the above patterns. First, in the CIP experiment, we could not detect any variants spreading under weak bottlenecks combined with low selection levels (that is, the IC20-M5 treatment), even though populations increased their overall yield (Fig. 1c). This result may suggest that the evolutionary response is due to genomic rearrangements, which cannot be easily inferred from the short-read sequencing data obtained for this study. As an alternative explanation, phenotypic responses are sufficient to counter the low selective constraints imposed, thus allowing the wild-type bacteria to proliferate (Fig. 1c) and to outcompete any low-resistance variants, which were observed to spread in the GEN experiment under the IC20-M5 conditions (Figs. 1a, 2a, 3b and 4). Second, almost all populations went extinct when experiencing strong-bottleneck and high-selection conditions in the CIP experiments. This result indicates that this combination of conditions imposed a double constraint on the bacterial populations: the high inhibitory concentration of the drug continued to constrain population size after the bottleneck—as confirmed by analysis of an integrative measure of population size across one growth period, especially at the beginning of the evolution experiments (Extended Data Figs. 2 and 3)—thus decreasing the probability of favourable mutations to arise and reach sufficiently high frequencies. As the latter effects were particular to the experiments with CIP, the exact causes underlying the generally consistent overall results seen in Fig. 1 may vary, depending on the antibiotic and possibly the probability of resistance mutations arising de novo.

Surprisingly, populations consistently evolved a high yield and high resistance under IC20-k50 conditions, especially compared with the treatment with a strong bottleneck (IC80-k50; Fig. 1). We reason that this is probably because the lower drug concentration allows the populations to recover and maintain comparatively higher population size than the corresponding higher-drug concentration condition, as confirmed for the beginning of the evolution experiments by our analysis of the integrative measure of population size (Extended Data Figs. 2 and 3). During such a recovery phase, a newly arisen resistant variant that survived drift during the bottleneck can spread and reach sufficiently high frequencies to be maintained over longer time periods or even become fixed in the population. Moreover, the larger population size during the recovery phase increases the probability of favourable mutations occurring, further enhancing the ability of the bacterial populations to adapt. Both processes are less likely under the IC80-k50 conditions, where strong bottlenecks combined with high selection levels constrain population size over longer time periods (Extended Data Fig. 3 and 4).

Unexpectedly, high overall yield in the weak-bottleneck treatments did not directly translate to high antibiotic resistance (Fig. 1), especially in the GEN evolution experiments, for which this treatment consistently resulted in evolutionary changes (confirmed by the observed genetic changes; Figs. 2 and 3). Moreover, in the IC20-M5 treatment of the GEN experiment, high overall yield coincided with low growth rates, suggesting that the high cell counts were not caused by the rate of replication alone and there was not a simple linear relationship between these two components of bacterial fitness (that is, reproductive rate and final population size). For a further evaluation of this finding, we performed competition experiments among variants in two genes, ptsP and pmrB, which were most commonly affected in either IC20-M5 or IC80-M5 treatments. These experiments (Fig. 4b) demonstrate that the variations in resistance levels and competitive fitness are jointly responsible for the evolutionary success of the variants across treatments. PmrB is a sensory kinase of the two-component regulatory system PmrAB, which regulates lipopolysaccharide modifications of the bacterial outer cell membrane, specifically lipid A28,29,30. Lipid A modification is often found in aminoglycoside-resistant bacteria31. PtsP is a phosphoenolpyruvate-dependent phosphotransferase that transfers the phosphoryl group from phosphoenolpyruvate to the phosphoryl carrier protein (NPr)32. It has an important role in the nitrogen cycle and glucose transport in bacteria32,33. However, the role of ptsP in aminoglycoside resistance is poorly understood34. Deletions of ptsP have been shown to cause overproduction of pyocyanin, a toxin produced by P. aeruginosa that oxidizes other molecules35. Moreover, ptsP mutations can increase resistance to antimicrobial peptides and expression of the major quorum-sensing regulators lasI and rhlI35,36. Our work highlights that different variants in ptsP can also confer resistance against the aminoglycoside GEN, albeit at a lower level than mutations in pmrB. Importantly, the lower resistance levels of the ptsP variants were associated with a higher competitive fitness than the pmrB variants under low antibiotic concentrations, explaining their predominance under these conditions. Interestingly, ptsP and pmrB variants had similar competitive fitness under high antibiotic dose, resulting in variants of either gene going to fixation under these conditions (Figs. 2a and 3d).

Our study expands the insights obtained from the few previous experiments on the influence of bottlenecks on the evolution of antibiotic resistance. For example, a recent study assessed evolution of Escherichia coli under continuously increasing concentrations of CIP and with three bottleneck sizes, two in the range of the inverse of the frequency of drug target mutations (that is, 108 and 1010 cells), and a third with a single-cell bottleneck12. Even though the exact experimental design was different, the results similarly highlighted that variation in bottleneck size impacts evolutionary trajectories and that weak bottlenecks generally lead to high resistance and a high degree of parallel evolution. Interestingly, the largest bottleneck size favoured the spread of variants in drug target genes, especially gyrA, with apparently no fitness costs, whereas the intermediate bottleneck size led to selection of different gene variants, all with apparently large fitness costs12. By contrast, we did not identify mutations in the drug target genes and no substantial differences in growth costs under drug-free conditions for the high-resistance variants. A possible reason for the absence of drug target gene variants, which are often found in clinical P. aeruginosa isolates from patients treated with aminoglycosides and fluoroquinolones (for example, in fusA1 or gyrA)37,38, is that we used antibiotics at sub-MIC levels, to enable populations to survive initially and adapt to the imposed treatments. A second example previously assessed adaptation of Pseudomonas fluorescens to rifampicin under three bottleneck sizes, similarly revealing an impact of bottleneck size on the paths of resistance evolution39. In particular, variants in the main resistance gene rpoB spread under both strong and weak bottlenecks, yielding high levels of resistance and a high degree of parallel evolution under these conditions. By contrast, intermediate bottleneck sizes favoured mutations in a variety of genes, including a regulatory gene, yielding little parallel evolution. This study applied relative bottleneck sizes (rather than absolute bottleneck sizes, as in our study) and used a higher carrying capacity. As a consequence, the number of generations over the course of a growth period, and thus the likelihood of emergence and spread of favourable resistance mutations, is increased15,40, leading to the observed high resistance and parallel evolution even under strong bottlenecks. None of the previous studies assessed an interplay of bottlenecks and antibiotic-induced selection. As antibiotics themselves affect population size, similar to other environmental stressors, the adaptive consequences of a bottleneck need to be related to the relevant selective constraint that challenges the evolving populations. By experimentally controlling the interaction of both factors, our study allows us to increase the understanding of how populations adapt to stressful environments under different bottleneck intensities.

Bottlenecks are a characteristic property of the infection process10,11,25,27,41,42,43,44. Thus, knowledge of their impact on adaptation is essential for a full understanding of pathogen evolution and for the design of effective therapy. Our study provides a proof of concept that the interplay of bottleneck size and antibiotic-induced selection consistently alters the evolutionary trajectories to resistance and competitive fitness of adapting bacteria. Strong bottlenecks, which are likely to be prevalent in vivo, lead to more diverse outcomes under both high and low antibiotic concentrations, making predictions on evolution of resistance and the prevailing resistance variants exceedingly difficult. This has important consequences for the optimization of treatment design, which is unlikely to be universally applicable for a specific type of infection. Instead, treatment would have to be adapted on an individual patient level, taking into account the selected resistance mechanism(s) in the pathogen population and, importantly, the associated fitness costs45.

## Methods

### Materials

All experiments were performed with P. aeruginosa PA1446 and mutants thereof, which emerged during the evolution experiments. Bacteria were grown in M9 minimal medium, consisting of 7 g l−1 K2HPO4, 2 g l−1 KH2PO4, 0.588 g l−1 Na3C6H5O7, 1 g l−1 (NH4)2SO4, 0.1 g l−1 MgSO4, and supplemented with 2 g l−1 glucose and 1 g l−1 casamino acids. Different single colonies from M9 agar plates (M9 supplemented with 15 g l−1 agar) were picked to initiate the independent replicate populations of the evolution experiments. Exponential phase cultures with an OD of 0.1 (equivalent to 104–105 colony-forming units per ml) were used as inoculum for resistance assays. For long-time storage, bacterial cultures were supplemented with 30% glycerol and frozen at −80 °C.

### Flow cytometry

A Guava easyCyte flow cytometer was used to assess cell counts of bacterial cultures during the evolution and competition experiments. Cells were suspended at an appropriate concentration of <1,500 cells per µl in PBS and analysed by flow cytometry using a flow rate of 0.236 µl s−1 for either 30 s or until a total cell count of 5,000 cells per sample was reached. Propidium iodide (1.9 mM) was used to stain dead cells and thus determine the number of viable cells during flow cytometry. For each culture, the total number of cells was calculated from the measured cell concentration, adjusted by the number of dead cells, sampling volume and dilution factor. These calculations were used to determine the transfer volume during the evolution experiment and to infer final yield at the end of each season as a proxy for bacterial fitness.

### Dose–response curves and drug concentration determination for the ancestral populations

We used dose–response curves in broth cultures and OD measurements as a proxy for bacterial growth, consistent with standard diagnostic approaches for measurement of antibiotic resistance (for example, the Vitek 2 approach (bioMérieux)). Bacterial growth was assessed in 100 µl volumes at ten different antibiotic concentrations in a 96-well plate using a fully randomized design, including eight technical replicates per concentration, eight no-drug controls and eight medium-only controls. Growth was measured as OD after 12 h at 37 °C under constant shaking (double-orbital, 900 rpm) in Tecan plate readers. The lowest antibiotic concentration for which no visible growth was optically measurable was taken as the drug’s MIC.

### Design and general setup of evolution experiments

We developed a protocol for experimental evolution that includes cell counting by flow cytometry to ensure that an exact number of cells are transferred across growth periods (Extended Data Fig. 1). The evolution experiment was run in 96-well plates over 16 growth periods and included two distinct transfer bottleneck sizes (BN of 50,000 cells and 5,000,000 cells) and three inhibitory antibiotic concentrations (IC0, IC20 and IC80), combined in a full factorial design. The evolution treatments were randomized across the 96-well plates using a block design and each included eight fully independent replicates. Experimental evolution was performed independently with two distinct antibiotics, the aminoglycoside GEN and the fluoroquinolone CIP.

In detail, after each growth period, a 4 µl subsample of each bacterial culture was diluted 1:1,000 in PBS in two steps in a new 96-well plate and then used to determine the exact cell count by flow cytometry. In parallel, the remainder of the bacterial culture was centrifuged at 5,000 rpm for 75 min to remove the old growth medium and resuspended in fresh M9 medium. The resuspension volumes were calculated individually, on the basis of the flow cytometry results. Resuspension volumes were set to achieve a concentration of 5 × 105 cells per μl per culture. The plate for the next growth period was prepared accordingly (100 μl per well minus the calculated transfer volume) and the respective volumes were then transferred to the new plate: 0.1 μl for 50,000 cells and 10 μl for 5,000,000 cells. The freshly inoculated plate was sealed with transparent foil and incubated for 9.5 h in a Tecan plate reader at 37 °C under constant shaking (double-orbital, 900 rpm). OD measurements were taken at 15 min intervals throughout each growth period of the evolution experiments and later used for inference of growth rates. After every second transfer, a subsample of bacteria from the evolution experiments were supplemented with 30% glycerol and frozen at −80 °C for later use.

As the evolutionary potential of the bacteria is influenced by population size across entire growth periods and not only by the bottleneck size, we additionally assessed variation among treatments for an integrative measure of population size across entire growth periods. For this assessment, we calculated the harmonic mean of population size, using the cell numbers at the beginning of a growth period, which we controlled experimentally through our protocol (either 50,000 or 5,000,000) and the end-point population size, which we determined through flow cytometry, as described above. The AUC of harmonic mean population size was calculated and statistically compared with a general linear mixed model and Tukey’s HSD post hoc tests.

### Assessment of bacterial fitness

We calculated two proxies of bacterial fitness during the evolution experiment. First, we used the absolute cell counts, determined by flow cytometry at the end of each growth period, to infer final yield for each growth period and replicate population, followed by calculation of relative yield by dividing the cell counts for each replicate population with that for the corresponding no-drug control (either IC0-k50 for strong-bottleneck treatments or IC0-M5 for weak-bottleneck treatments). Relative yield was further summarized by calculating the AUC of yields across all growth periods of the evolution experiment. As final yield was based on absolute cell counts, we consider this measure an informative proxy for bacterial fitness, which reflects the number of cells achieved by each population under the various treatment conditions. Second, we used continuous OD measurements to calculate growth rate for each growth period and each replicate population using GrowthRate software47. Although these calculations become less reliable if growth rates are generally low, as in some treatment groups, we similarly considered growth rate to be an informative proxy for bacterial fitness. Growth rate was also summarized by calculating AUC across growth periods of the evolution experiment. For both measures, we statistically compared treatment groups with a general linear mixed model and Tukey’s HSD post hoc tests.

### Antibiotic resistance of evolved populations

Populations of the last transfer period were challenged with different concentrations of the treatment drug, to obtain dose–response curves for the evolved populations. For this assessment, all cultures were standardized to the same population size of 500,000 cells. All bacterial populations were consistently subjected to eight distinct antibiotic concentrations: two below (IC50 and IC80) and six above (2 × MIC, 4 × MIC, 8 × MIC and 16 × MIC) the MIC of the ancestral population. We specifically chose this design to ensure comparability of the experimental procedures for the evolved populations. Control measurements were performed in the absence of antibiotics. Kinetic OD measurements were performed in Tecan plate readers at 15 min intervals. As an integrative measure of antibiotic resistance, we used the end-point ODs of all concentrations to calculate the AUC of resistance for each replicate population. As an alternative measure of resistance changes, we also determined MIC as the lowest concentration for which the measured OD was below 0.01. If growth was still observed for the highest antibiotic concentration that was included in the experiment, then the MIC was set at this concentration, thereby yielding a conservative estimate for resistance increases in this case. For each of the two measures of resistance, we statistically compared variation among treatments using a general linear model and Tukey’s HSD post hoc tests.

### DNA sequencing and genomics

We performed WGS of entire populations, because this allows us to describe the overall pattern of allele frequency changes within the populations and thus the overall evolutionary response48,49,50. DNA was isolated from experimentally evolved populations and the original starting cultures, using an established cetyl trimethylammonium bromide-based extraction protocol51. WGS of DNA samples of the last transfer period was performed at the Competence Centre for Genomic Analysis. Material for two populations from the GEN treatment could not be recovered and was thus excluded from analysis. Sequencing libraries were generated with the Nextera DNA Flex library preparation kit and sequencing was performed on the Illumina HiSeq 4000 platform using the Illumina paired-end technology with read lengths of 150 bp and an average base coverage of > 100 (ref. 52). In addition, DNA extracted from transfers 3, 5, 7, 9, 11 and 13 were sequenced on the Illumina NextSeq platform at the Max Planck Institute for Evolutionary Biology (MPI-EB), with read lengths of 150 bp and an average base coverage of >40. Sequence reads were provided in the fastq format53. We excluded populations IC20-M5 H2 and IC80-M5 G7 from the GEN experiment, because material from some transfers could not be recovered. Quality and quantity of reads were checked with FastQC54. Trimmomatic was used to remove sequencing adapters from the Nextera library and to filter out low-quality reads55. High-quality reads were mapped to the UCBPP_PA14 reference genome with the software bwa46,56. The generated.bam files were scanned for SNPs, insertions and deletions using the variant calling programs FreeBayes, PinDel and VarScan57,58,59. The resulting output files were filtered for duplicates, ancestral variants and variants found in the evolved controls using R and additionally checked by visually inspecting the called genome positions provided by the.bam file in the IGV genome browser60. The detected variants were annotated with the help of SnpEff61 and the Pseudomonas database (available at http://pseudomonas.com). The R package ggmuller was used to generate Muller plots of the evolving populations. SNP frequencies were used to calculate FST at every transfer for all treatment groups in which high-frequency variants occurred. Haplotype diversity was calculated as

$$H = 1 - \mathop {\sum}\limits_{i = 1}^j {P_i}^2$$

where Pi represents the fraction of a haplotype in the population and j represents the total number of haplotypes. Haplotype diversity was calculated within individual populations of the treatment group (HS) and between the different replicates of the treatment group (HT). FST was then calculated as:

$$F_{\mathrm{ST}} = \frac{{{\mathrm{HT}} - \overline {{\mathrm{HS}}} }}{{{\mathrm{HT}}}}$$

We further performed WGS on the Illumina NextSeq platform of the MPI-EB as above to confirm that the isolated clones used in the competition experiments contained only a single variant, as expected from the genome data of the evolved populations.

### Competition assays and clone frequency analysis using amplicon sequencing

In total, three pairs of different pmrB and ptsP mutants were competed against one another and against the PA14 reference in 96-well plates (Supplementary Table 13). As a control, each single strain was incubated in individual wells under the same conditions on a separate 96-well plate. The clones were each picked as a single colony-forming unit from M9 agar plates, which had been inoculated with a cryo-preserved culture of an evolved bacterial population, which should contain only a single variant according to the performed WGS of bacterial populations. The picked clones were cultivated in 5 ml M9 medium at 37 °C. Cultures of competing strains were set to an OD of 0.1 mixed at a 1:1 ratio before inoculation of the competition cultures. The cultures were then transferred to 96-well plates. Competitions ran with culture volumes of 100 µl at different GEN concentrations for 12 h at 37 °C in a Tecan plate reader.

The relative frequency of the competing strains was determined using amplification of diagnostic genome regions and sequencing. Bacterial pellets from the end of the competition experiments were resuspended in 50 μl nuclease-free water and boiled for 15 min. A two-step PCR was subsequently performed to amplify the region of interest and to ligate barcodes to the amplicons. In detail, 1 μl of each lysate was used as a template for PCR amplification of the diagnostic loci (primer sequences are shown in Supplementary Table 15). One microlitre of each PCR product served as template for the second PCR to attach the individually barcoded sequencing primers (Supplementary Table 16). Both rounds of PCR were run for 15 cycles. DNA concentrations of every final sample were set to 100 ng μl−1 and 5 μl per sample was pooled in a single Eppendorf tube. The library mix was then further purified by gel extraction with the GeneJET gel extraction kit (Thermo Fisher Scientific). Sequencing was performed on the Illumina NextSeq platform of the MPI-EB. Reads were quality-filtered with Trimmomatic 0.39 and subsequently aligned to the PA14 reference genome by using bwa46,55,56. SAMtools was used to generate bam files that were evaluated with the Integrative Genomics Viewer60,62. The strain frequencies were calculated from the SNP counts. The mean frequencies of every biological replicate were calculated and then used to compare the frequencies between the three main variants (ptsP, pmrB and wild type) in competition with a two-sample t-test (n = 3).

### Reporting Summary

Further information on research design is available in the Nature Research Reporting Summary linked to this article.