So, let us continue the discussion of the evolution of the basis operators when you will consider various kinds of pulse sequences. So, we have to know how the individual basis operators evolve under the influence of different Hamiltonians. Basically, there are two components of the Hamiltonian we are dealing with and there will be a Ziemann Hamiltonian and the coupling Hamiltonian. And last class we looked at the evolution of a particular base operators base operator IKX under the influence of the chemical shift Hamiltonian. Today, we will discuss the evolution of that same operator IKX under the influence of the scalar coupling Hamiltonian. So, to remind you as to what is the scalar coupling Hamiltonian, let me just write here the scalar coupling Hamiltonian is written as Hj is equal to 2 pi Jkl, Jkl is the coupling constant between two spins K and L and we have these operators IKZ, ILZ. So, this is the for the two spin case this is a coupling Hamiltonian. So, for the evolution what we need to calculate is we have to calculate e to the minus iHjt and we using the same basis operators this will be e to the iHjt. And if I explicitly write this here so I have this Bs double prime this is the operator that we get as a result of the evolution here you have e to the minus i 2 pi Jkl IKZ ILZ t IKX e to the i 2 pi Jkl IKZ ILZ t. This individual operator can be expanded or written in a simpler form like this e to the minus i 2 pi Jkl IKZ ILZ is equal to cosine pi Jkl t by 2 minus 4i sine pi Jkl t by 2 IKZ ILZ. This can be proved along the same lines as we derived the expressions for e to the i BX for example. When we took the expression for e to the let me write here e to the minus i beta IKZ so we wrote in a particular manner here cosine beta by 2 minus i sine beta by 2 and things like that. So, this was X here if you are applying it for the pulse this was X here if beta is a flip angle then we wrote is equal to cosine beta by 2 minus 2i sine beta by 2 IX so that was how it was written. So, in the same manner we write this here except we make note of the fact that IKZ ILZ can be written as in terms of the poly spin matrices 1 by 4 sigma KZ sigma LZ. So this will help us in deriving this equation and poly spin matrices satisfy this condition this sigma Z square is equal to sigma LZ square is equal to 1. So, this is the property which we should remember and we can prove this equation. So, therefore I am not going to explicitly prove this, this can be a kind of an exercise for the students who can practice this and prove this equation. So, we will actually use this equation now as it is and calculate the evolution of the KX operator under the influence of this. So, in this place we will have to put this and on this place what we should do IKX and this will be a plus sign when you write for I2 pi i Jkl IKZ ILZT then this the same as this except we will have a plus sign here for I sine and then you do the multiplication of this part IKX and the other part which is with the plus sign then you arrive at this equation IKX cosine pi JklT plus 2 Iky ILZ sine pi JklT. So, this is the kind of equation that will come. You notice here that IKX has evolved into a in phase IKX term and it has generated what we may call as your anti phase term it is the K magnetization which is anti phase with respect to the spin L. You remember earlier we have discussed what these individual basis operators represent therefore here we have said under the influence of the coupling Hamiltonian the IKX operator will evolve into this IKX cosine pi JklT plus 2 Iky ILZ sine pi JklT. So this is the anti phase term. So such the evolutions will keep happening and we will look at them as we go along. Now similarly you can calculate for the basis operator Iky evolution under the Zeeman Hamiltonian this is the chemical shift Hamiltonian and the coupling Hamiltonian Hj and they can be represented in this manner we will not prove this basically they can be derived in the same manner and we will just write it down here and we can use them later. So the BS prime will be cosine omega KT Iky this is for the K spin K for the single spin and we are minus sine omega KT IKX. So because here we are consider the evolution of the KX operator so the KY operator the KY operator evolves with the Iky here and minus sine omega KT IKX. Similarly the coupling Hamiltonian generates this sort of the evolution the BS double prime Iky cosine pi JklT minus 2 IKX ILZ sine pi JklT. I want to point out here one thing that when you are actually calculating IKX remember we had IKX here in this term but plus 2 IKY ILZ.  Similarly in this case also when you had IKX evolution plus IKX cosine omega KT plus IKY sine omega KT if you are considering IKY then it is IKY cosine omega KT minus sine omega KT IKX. Therefore this indicates in some way a kind of a rotation in the transverse plane and you can pictorially represent them very soon I already indicated this to you in the chemical shift evolution earlier that such kind of a representation can be used for calculating the evolution of any of these operator whether it is IKY or IKX or minus IKY minus IKX and things like that. Now similarly we can do this exercise for the basis operator 2 IKX ILZ evolution under HZ and HJ. Now HZ works on individual spins therefore if I consider 2 IKX ILZ though which is the transverse term here the transverse term is IKX. Therefore chemical shift evolution will happen only for the IKX part ILZ part will not contribute to the chemical shift evolution. Therefore if I consider the BS prime here so this will be simply 2 and IKX term evolves as in the case as indicated here earlier IKX cosine omega KT plus IKY sine omega KT and ILZ remains as it is there is no change. So even if it is in this form the 2 product operator the chemical shift evolution works on the individual operator because we have the ILZ here and we have the ILZ coming here IKX evolves in the usual way as it is for the individual single spin. Now the coupling Hamiltonian the causes this sort of a transformation here it gives you cosine pi JKLT 2 IKX ILZ. So the anti-phase term which remains it has is amplitude modulated by this expression cosine pi JKLT and on you generate here IKY plus sine pi JKLT. Notice here that when you consider IKY rotation you got IKY cosine pi JKLT minus 2 IKX ILZ sine pi JKLT. Now we are considering this you are generating the same terms once more so it is this appears in the positive sign then you have plus sine pi JKLT IKY. So this indicates you that these kind of terms some form some sort of a group they transform within themselves the Hamiltonian here is IKZ ILZ and the operator is IKX ILZ the basis operator is 2 IKX ILZ and we have also another basis operator 2 IKY. So 2 IKZ ILZ 2 IKX ILZ and IKY they somehow form a kind of a group and similarly for the IKX as well this can be represented in a pictorial manner like this. So similarly I can write the same kind of expressions for 2 IKY ILZ under the influence of HZ and HA so BS prime here gives me the same here evolution of IKY as individual chemical shift evolution and ILZ remains here and BS double prime which is the result of evolution under the coupling yet cosine pi JKLT 2 IKY ILZ same here and it generates the IKX term. So as I said these indicate some sort of rotations in a particular plane pictorially we can represent it in like this. So we put the Hamiltonian this is for the coupling similar thing we wrote earlier for the chemical shift so the coupling the Hamiltonian is written along this axis here so IKZ ILZ this is the coupling Hamiltonian and if I take the particular base operator IKX here then it under the influence of this rotation evolution under this this circle indicates the evolution under this Hamiltonian it generates rotates in this manner so you get you get when it rotates like this you generate components of IKX and 2 IKY ILZ suppose it is rotated up till here then you generate IKX cosine pi JKLT and assign IKYLZ sine pi JKLT and if you were to continue this rotation under the influence of the same Hamiltonian like this so what you will get though this vector has moved over here so you get 2 IKY ILZ cosine pi JKLT as it is here suppose it has moved until this I want to draw a vector as well here if I wish to draw a vector here so then if this rotation has happened for a particular angle this angle and this will be the pi JKLT and you will write the cosine pi JKLT so if this is pi JKLT here then you will have 2 IKY ILZ cosine pi JKLT and this component will be minus IKX sine pi JKLT so and similarly if you continue this if you were to start here you will move here if you were to start here you will move here and things like that therefore these actually transform within themselves this IKX 2 IKY ILZ and IKZ ILZ this form a group with transform within themselves go from here to here you get this from here to here you get this and this you can go from here to here again you get this and this under the influence of the same Hamiltonian so if I were to write here in the similar manner here 2 IKX ILZ so I get here IKX going to IKY and IKY going to minus 2 IKX ILZ here and so and this continues to generate me this portion here and the minus IKY here so like that so this whole set of operators which are present here 2 IKX ILZ IKY and this coupling operator here this 2 IKZ ILZ is for kind of a rotation group when I say rotation group they transform within themselves so under the influence of one thing the one operator transforms into the other so that is the meaning of the rotation group. So this is the very these are very useful expressions for calculating the evolution of any density operator as we get along okay now that is so much for the evolution of the basis operators so though the illustrative examples which I gave you but there will be we have to do this exercise for every other rotation basis operator this will be this can be easily done because you already indicated what sort of the principles are involved what sort of rotation groups are formed and therefore it is easier to write down the expressions for all of those. Now we turn to the evolution under the influence of pulses what do the pulses do and we have seen earlier the particular basis operator gets transformed by this sort of a transformation if this represents a rotation this represents a pulse here and this is the basis operator this is the gain a pulse PPS P-1 and the pulse can be applied along the X or the Y axis and therefore I write here RQ the rotation operator RQ and RQ-1 so this represent the pulses Q can be X or Y. Now let us actually calculate the influence of this on some basis operators we take as an illustration BS is equal to IZ this is the simplest all of all of those and for a 90 degree X pulse the transformation will be we have to write the individual matrices for this pulses so we have here R a suppose we apply it along the X axis we have said 90 X pulse therefore this is Rx pi by 2 IZ Rx minus 1 pi by 2 and we have derived earlier what this Rx pi by 2 is in terms of a matrix so this will be 1 over root 2 1 minus i minus i 1 and then for the IZ we have this representation 1 by 2 1 0 0 minus 1 this is the matrix because single spin we are considering a single spin here and Rx minus 1 pi by 2 will be the inverse of this inverse of this matrix so this will be 1 by root 2 and that is 1 i i 1 so one can calculate the inverse of this if you may take a product of this matrix and this matrix you will get 1 so that indicates that this is the inverse of this. Now when you do all these multiplications you will get 1 by 2 0 i minus i 0 and this is equal to minus i y so what this has told us that 90 degree X pulse rotates the IZ into minus IY so this is also what we had said earlier in the discussion with the derivation of the pulses and that was we can write is so this is the X, Y, Z and if I have a vector here IZ operator this gets transformed into minus Y so it goes here X, Y, Z goes into minus Y gets rotated here to minus IY IZ goes to minus IY if I apply a pulse along the X axis so that is the calculation what we got from this 90 degree X pulse so IZ operator 90 X this is indicated here in the figure so actually so this figure is already there so if I write here rotation around X and this is Y and this is the Z so rotation operator is along this IX and Z magnetization is rotated into the minus IY so from the same you could also see what if your magnetization was along the minus Z axis it will go to Y if it were along the Y axis it will go to plus Z so if you are considering the this initial operator here as IY then you can imagine that this IY will go to IZ we said IZ will come to minus IY this is what we had in the explicit calculation now if you were to start with IY the same rotation will take IY to IZ okay and IX will of course be invariant nothing will happen will explicitly show that and if you were to have minus IY then minus IY will go to minus IZ under the influence of this rotation okay now that is explicitly calculated here if BS is equal to IY then what I have to say here RX pi by 2 IY RX minus 1 pi by 2 now I put the same matrices here 1 by root 2 1 minus I minus I1 this is half half this is the IY operator half 0 minus I I0 and this is 1 by root 2 1 I I1 this is the inverse of this matrix and if you calculate this you get half 1 0 0 minus 1 that is IZ so this is the same which told you before that under the same rotation the IY is going to IZ so therefore these again for a rotation groups X Y and Z these four rotation groups they transform within themselves if there is a change in sign of course that is not considered different it is the same rotation group just except with the coefficient will be different so this rotates Y into Z rotates Z into minus Y and Z rotates minus Y into minus Z and so on so this forms a rotation group you remember if I had my the rotation around the Z axis rotation around the Z axis was what that is the chemical shift evolution when I had the chemical shift evolution my operator was going from here to here IX was going to part of it is was rotating in this plane X to Y Y to minus X minus X to minus Y and so on so forth therefore these three operators for a rotation group and one of them can be the basis operator other one can be a Hamiltonian in this case the operator is the IX rotation is around this axis therefore and we have the basis operator is IZ or IY in the chemical shift case this was the Hamiltonian this was the operator and the basis operators were here and therefore one could go from IX to IY to minus IX and so on so forth so this is the way the we can look at all of this in a comprehensive manner so this IY goes to IZ for a Y pulse earlier I wrote as X pulse so what does the Y pulse do so the Y pulse take this rotation here we can do the same calculation so it goes IZ goes to IX notice we have a left-handed rotation here IZ goes to IX and IX will go to minus IZ and minus IZ will go to minus IX and so on so this is the way the we describe the rotation groups rotation under the influence of the various pulses now what about IX itself suppose your base operator is IX and I apply 90 degree X pulse intuitively you would think that okay nothing should happen to it but let us also prove it so we put RX pi by 2 IX RX minus 1 pi by 2 so I put the same matrices here 1 by root 2 1 minus I minus I 1 half 0 1 1 0 1 by root 2 1 I I 1 and this will give me half 0 1 1 0 and this is IX so therefore the IX is invariant under RX pulse so that is intuitively one would have imagined that you have put the magnetization along this same axis and you are applying a rotation around that axis and you should not move in principle now let us consider multi spin basis operators so far we looked at the individual spin operators and we now turn to multi spin operators the effects of pulses can be applied in individual spins now the pulses can be applied on all the spins or on individual spins so the effects will be different now here we consider a case we consider a basis operator 2 IKX ILZ and we have seen this operator represents the K magnetization which is anti-phase with respect to L and this is a single quantum coherence because this is KX KXLZ is a single quantum coherence X magnetization of K anti-phase with respect to L now we apply a pulse on both the spins 90XK plus 90XL so this is called as a non-selective pulse it is applied to both the spins K and L so now what happens when I apply KX pulse nothing happens to KX right because we said this is invariant X magnetization is invariant under the X pulse therefore nothing happens to the KX operator and what happens to LZ now LZ goes to minus Ly this is we calculated Z goes to minus Y right so therefore X pulse on L spin take this ILZ to minus ILY therefore I get here minus 2 IKX ILY so what is this now here we got a mixture of double quantum and zero quantum coherence this we have explicitly calculated earlier that this represents a mixture of double quantum and zero quantum coherence so what we have done here is by applying a non-selective 90 degree pulse on anti-phase magnetization of one spin we have converted that into a mixture of double quantum and zero quantum coherences so these are called as coherence transfers and various kinds of experiments will make use of such kind of transformations. Suppose I take the same operator here now apply a pulse not 90X pulse but apply 90Y pulse on both the spins so if I take X what happens to X so you have to recall when I apply a Y pulse what happens to X so and 90Y on LZ will take me to 90LX and this will take me to minus 2 IKZ so you have to go back and look at what happens when I apply a Y pulse on X magnetization let us go back and look at this so this will be easier to follow if you do that so looking at here so what happens when I apply Y pulse on X magnetization it will go to minus Z and Y pulse on Z will take me to X so therefore this apply them here so I get this will go to minus Z and LZ goes to LX therefore I get here minus 2 IKZ ILX now notice here just the phase change of the pulse has made a huge difference in the transformation this was anti-phase magnetization of the K spin with respect to spin L and now what we have here this is X magnetization of L spin anti-phase with respect to the K spin now this is a single quantum coherence this was single quantum this was single this is also single quantum when we applied a 90X pulse we had got double quantum plus zero quantum here from this basis operator now when you apply a Y pulse to the same basis operator I get a single quantum coherence of the L spin so this is a different kind of a coherence transfer single quantum to single quantum from one spin to another spin which are coupled from K spin to L spin I get a transfer and this is a single quantum to single quantum coherence just by changing the phase of these 90 degree pulse so in the earlier case when the 90 degree pulse was along the Y axis apply to both the spins so I got a single quantum coherence into a mixture of double quantum and zero quantum coherence and so this has important implications so this represents conversion of anti-phase X magnetization of K spin into anti-phase X magnetization of L spin that is the single quantum coherence transfer now suppose we apply the again once again with the same operator base operator here but apply a pulse only on the K spin for example I will not apply along the L spin at all that means I have applied selective pulse a selective 90 degree pulse on one spin only I apply to only the K spin so therefore the L spin remains unaffected because I have not applied any pulse on to that and K X takes me to the minus K Z therefore this will go to I K X I L Z takes me to minus 2 I K Z I L Z so is a completely different transformation once more now this anti-phase magnetization has now got transformed into Z Z order Z Z order has to do with the order of the of the populations in the two states on the top alpha alpha state and the beta beta states as we had discussed earlier so this anti-phase magnetization of the K spin is getting transformed into Z Z order simply by changing what kind of pulses we apply we get different kinds of transformations of the basis operators so now if I apply on the other hand a the same basis operator once more here but I apply a pulse selective pulse only on the L spin not on the on the K spin earlier when I applied along the K spin I got Z Z order so now apply it only on the Y spin so what I get here K X remains K X because no pulse applied and L Z takes me to L X 2 I K X I L X now this is a mixture of double quantum and zero quantum coherences so therefore you see once again how a single quantum is converted into double quantum plus zero quantum coherence by changing the kinds of pulses we apply so you notice therefore that a combination of different kinds of pulses with the different cases can really be used to create a whole lot of transformations in your density operator and all of these one we will use when we actually calculate various pulse sequences and that will become an important but this will be easy to calculate in a simple operator form product operator form so similarly here 2 I K Y I L Z so far I was looking at 2 I K X I L Z and we can calculate similarly for 2 I K Y I L Z if I start with 2 I K Y I L Z apply a non selective pulse on X both K and L spins along the X axis then I get this into 2 I K Z I L Y and this is now the L magnetization interferes with respect to K this was K magnetization interferes with respect to L and this is L magnetization interferes with respect to P so single quantum to single quantum coherence transfer so these are important important results which will play a very major role in how we calculate the evolution of the density operator through the pulse sequences so this is referred to as coherent transfer from spin K to spin L in general it is seen that application of RF pulses to interface magnetization in multi spin systems causes coherent transfer among the spins is from the basis of many multiple experiments in homo and heteronuclear multi spin systems so here is a summary of all of these evolutions what I have indicated here once again as a recap so because this will be extremely useful and we have to remember this very well we have to remember this by heart which operator turns which basis operator into what so which Hamiltonian converts what basis operator into what basis operator so we will have to see all of this so if this is chemical shift evolution your Hamiltonian has the i z operator here therefore we wrote writing this manner and your basis operators are i x and i y therefore i x rotates into the i y and i y rotates into minus i x minus i x rotates into minus i y and so on so forth so all transformations happen here these form a rotation group all the these three operators form the rotation group so scalar coupling evolution once again the same thing is repeated for the benefit of consolidation so you have this the Hamiltonian is 2 i k z i l z we put it along the z axis this is my axis this is my axis so this axis is now 2 i k z i l z and i k x is rotated into mixture of i k x and 2 i k y i l z and the same Hamiltonian rotates the basis operator 2 i k y i l z into mixture of 2 i k y i l z and minus i k x so if I were to start from minus i k x I will get minus i k x plus the cosine component will be minus i k x and I will get here minus 2 i k y i l z now if I want to put here the anti phase magnetization here it was a starting with the in phase magnetization this is how they transform if I start with 2 i k x i l z this anti phase magnetization and this operator remains the same 2 i k z i l z this rotates into i k y so this will be the cosine component will be 2 i k x i l z the sine component will be i k y so if I consider the rotation further i k y rotates into minus 2 i k x i l z partly it remains as i k y the cosine pi j k l tau will be i k y and the sine will be minus 2 i k x i l z minus 2 i k x i l sine pi j k l tau so this is the way rotation happens I mean when you wrote here this is the rotation is happening depending upon the value of tau your vector will be somewhere here or here or here wherever so if it is equal to pi by 2 if tau is such that this whole rotation is pi by 2 then you will go entirely from here to here if it is not pi by 2 if it is the whole thing is equal to 30 degrees or 45 degrees or something then your vector will be somewhere here so you will have a cosine component and a sine component similarly here if you are rotating by an angle pi by 2 that depends upon your value of tau then this goes completely into this but if it is less than that the vector can be somewhere here then you will have a cosine component here and a sine component so with regard to this so this is the way we actually calculate the evolutions under the influences of various Hamiltonians so to about the rotation by pulses so if I have x pulse the i z rotates into minus i where notice here here we consider a 90 degree pulse which goes into this but you can extend this argument to say well I do not want to apply 90 degree pulse suppose I apply a 45 degree pulse what happens in fact very easy to imagine here now we understood the principles how the rotations are happening if I were to rotate by 45 degrees then the rotation will take the vector from here to here so this angle will be 45 degrees so I will have a component i z and a component i y minus i y so a any angle can be chosen so if I have a 90 degree pulse it takes me to minus i y but if I have a beta pulse then I will have cosine beta component for the i z and the sine beta component for the minus i y so similarly if I apply this pulse to the i y magnetization goes for a 90 degree pulse it will go here but suppose I were to apply a pulse which is not 90 degrees somewhere 45 degrees or something or 30 degrees then I would rotate it only up till here then we will have a cosine component here and a sine component here similarly if I were to take a rotation around the y axis a pulse along the y axis the rotations will happen like this i z goes to i x i x goes to minus i z minus i z takes you to minus i x and again minus i x will take you to i z once again the same arguments apply with regard to the flip angle instead of a 90 degree flip angle if you use a different flip angle you will get different components along the y and the z axis so with that we will stop here and we will continue the discussions in the next class.


So, let's look at integration by parts. The secret that not everybody is going to tell you is the following. There's actually only two real integration techniques. And the first one is U-substitutions, which we saw earlier. And the only other integration technique is this integration by parts. Everything else, all other integration techniques are based on algebraic and trigonometric identities. Everything else you do as a quote-unquote integration technique is really algebra, or sometimes it's trigonometry. And to be sure, these things are then combined with either U-substitutions or integration by parts. So, let's focus on what integration by parts is. So, let U of V be two functions. When we looked at switching the direction of integration, we made use of a useful geometric relationship. Informally, the way we might look at this relationship is if I want to find the definite integral, if I want to find the area of a region, that's going to be the integral of U dV. And what I looked at was the fact that if I piece this together with another region, which in this case is going to be corresponding to the integral of V dU, we get that by looking at the representative rectangles.  And I might describe the area of the rectangle as being U times V. And this is an informal argument, and we're doing a lot of hand waving here, but it does suggest a more general relationship, and it turns out that this relationship allows us to take one integral, which we might or might not know how to do, and replace it with a different integral, and then some other expression here. And so the idea is that if I have an integral that I can't do, maybe I'll replace it with a different integral, and possibly I might be able to do that second integral. So, for example, let's take a look at the finding the anti-derivative of x e to the x dx. If we lived in a good, kind, and caring universe, then every problem would indicate exactly how it's supposed to be solved. We don't live in that universe. So, what that means is that in general, when we run into a problem, we don't know how we're supposed to solve it, and so the general strategy here that's useful is always try the easy things first, because if they work, you want to spend a lot of time, and if they don't work, you want to waste it a lot of time. So, first thing we might do, we might actually recognize this as the integrand, as the derivative of some function. Maybe we recognize it, and we could write down what the anti-derivative is without any difficulties. Well, probably that's not going to be the case, so maybe the next thing we'll try, again, u-substitution is probably the easiest of the possibilities. Can I solve this using a u-substitution? And we have to try these things before we know for certain, but in this particular case, if we do that, we find we can't. So, if I apply integration by parts, that's my next third choice. I need to split the integrand into two parts. I need a u-part and a dv-part. And the key difference between the two is the u-part is going to be differentiated. The dv-part is going to be anti-differentiated. So, maybe I'll make some choices. I'll let u be x, and dv is all the rest of it. And I need to differentiate the u-part, and I need to anti-differentiate the dv-part. And let's see what happens there. So, I now have my terms, u-v-d-u-d-v. And I can substitute these back into my relationship for integration by parts. So, the first hundred or so times you do that, it's probably worth writing down what that relationship is, integral u-d-v, is u-v minus integral v-d-u. And I can substitute things in right from this statement. I have u is equal to x, there's my u. I need my dv-d-v, e to the x dx, so there's my original integrand. Let's see, I need v, that's going to be e to the x, it appears here and here. And then finally my du is going to be dx. And I have a new expression. Now, remember the difficulty here was we didn't know how to handle the left-hand side. And so the challenge is, can we handle the right-hand side? And important to remember, integration by parts does not actually give us an anti-derivative, but it changes our problem. And hopefully we can have an anti-derivative that we can, in fact, determine. And in this particular case, it is something that we can find. This is the world's easiest anti-derivative, is e to the x. Don't forget that constant of integration, because we are still dealing with an indefinite integral or the anti-derivative.


Polymer nanoparticles, N-piece, are a promising approach for drug delivery applications due to their biocompatibility and ability to target specific organs or tissues. They can be made from a variety of biocompatible synthetic polymers such as polylactic acid, PLA, polylactic co-glycolic acid, PLGA, and polyethylene glycol, PG. These polymers are composed of simple monomers that are already present in the body and thus easily excreted without causing any harm. Different loading methods have been developed to incorporate therapeutic agents into these polymer N-piece, including physical dispersion and encapsulation within the polymer matrix. Additionally, polymer N-piece can be designed to target specific cells or cross cellular membranes, making them ideal for treating diseases like cancer. This article was authored by Eleonora Calzoni, Alessio Cesarelli, Alice Polci, and others.


Next presenter is Paloma Foltly, who's going to tell us about how to build terrible robots. Please make her welcome. I am a relatively new Python programmer. I started last year and I'm already giving talks on it, so I must be really good at this. So I went to school for way too long learning how to build robots and I basically just did everything in C and I thought this is the easiest language. It makes so much sense and everything is clear. And I could never learn Python because that's too hard and people who are smart learn Python. And I thought that because people were doing such really awesome, interesting, complex things with it that it was going to be way too hard for me to learn and I would never be able to do it. And then I started learning Python and I realized that C is really hard. So I wanted to talk to you a little bit about why I think Python and MicroPython specifically is pretty great and why you should use it and also how you should build terrible robots. So just quickly, how many people really enjoy robots here? Okay, great. Good number of hands. How many people want to actually build a robot themselves? Okay, awesome. That is a similar number of hands, which is better than the last time I gave this talk because there was a lot of hissing when I mentioned any hardware. So this is much better than that. So the first question is why? Why do you want to build a terrible robot? I want to build awesome robots, not terrible robots, and I want to do it the right the first time and never make any mistakes and it's going to be perfect. That's probably not going to happen with your first robot. And I really think that you should build really terrible robots that are useless and bad because it is really interesting and fun and you learn a lot. So terrible robots are hilarious. You may recognize this lovely lady on the left, that's Simone Yatch, and she is the self-determined queen of shitty robots. And so these are the kind of robots that she builds and my personal favorite. So that was probably really hard to make and she had to learn a lot about motors and about sensors and about actuation and then she built something so useless and wonderful and it makes me so happy. So building useless robots helps you build really great robots. So if you learn how to use those motors, then the next time you want to incorporate motors on your project you already have the code, you already know how to work with it, and you already know how to hook up that motor. So I really think that spending time just tinkering around and hacking around with this hardware will actually let you build something really great. So I have several steps here to teach you how to build the terrible robot and the first one is to embrace failure. And nobody really teaches you how to build or how to embrace failure. Like they don't teach you what to do to embrace that. Absolutely no one teaches you how to do this. They don't teach you anything about how to learn from your mistakes or your failures. And so all of you are flying blind and have no idea what to do. So you have to embrace failure, right? You have to learn from your mistakes and you need to kind of get excited about failing, look forward to it, see it as an opportunity to learn more. So set impossible goals. Say that this is my robot and it's going to fly around the room and it's going to find the person who's fallen asleep during my talk or is currently checking social media that is not on my social media tweeting at me, hey. And it's going to target them and shame them, right? That's an impossible goal. But maybe I can make one that just points and laughs at you. Reward risk taking.  So all the insanity that ensues, don't get bogged down by it. Like get excited by it. And so like when I was in college learning to build robots, there was this insane competitive atmosphere that if you weren't doing well, you were a plague and no one should talk to you because you're going to bring everybody else's GPA down, right?  And so nobody helped each other and nobody worked together to do anything collaborative. And that makes terrible robots and not like the fun terrible, like actually really bad terrible robots. And so if you do these steps, you can actually change that culture and have a really positive relationship with your work. So step two is lower the bar, right? So if you have this amazing idea for a robot, but you say, but if I can just like turn on the microcontroller, we have had a success today. If you do that, then like you're already on your way.  It's your standards, right? Like what even is a robot? Is this a robot? I think so. But you know, maybe before this talk you didn't think so. And recognize that everything worth doing is worth doing poorly. A lot of people say like everything worth doing is worth doing well. No, it's worth doing really bad and then a little bit better the next time and learning from what you do. So you may be saying, how do I actually get started building a terrible robot? You told me a lot of moral and philosophical things here, but I would like to go home and build a robot. So now we're going to switch to that portion of this talk, which is where I give you some useful skills. So step three, you're going to make it think. This is where I think all of you will be very happy and comfortable. It's writing code. It's working with what you want that robot to do and planning that out. Here's some lovely microcontrollers here that range from really simple block programming up to really complicated programming. So this is usually what I say should be a great intro programming. Like Make Code is a really great block programming language and Arduino is fantastic. There are semicolons, so I'm sorry to do that to you today. But about last year, I started working with MicroPython, and I really love MicroPython. It's really great for fast iteration. There's a low barrier to entry, and a lot of the stuff you already want to do in Python is implemented. Now, so this is built off of Python 3, which I hear we are fans of here. And so MicroPython is built to be run on really basic systems. So 256k of code space, 16k of RAM. It can work on tiny little machines. And it's great. And you can have instant evaluation and feedback with the RAPL, which is read, evaluate, print loop. So it's like a terminal window. You can type stuff. It says, like, got it. Or that's not Python. So today I'm going to be talking about CircuitPython, which is sort of built off of MicroPython. It's built by Adafruit, for Adafruit boards. It's really lovely, and it can work on way beefier boards. And it encompasses more of what Python 3 is. But it has a limited chip set that it works with, so it won't work with every board that you want to. But if you get boards from Adafruit, they're super well documented and supported. So there's some information here. You can look at it later when you watch this back. Hey. So, oh, and now I'm going to switch to actually show you some of that code. So this is my terrible robot. I love it, dearly. This is Comfort Bot.  Are you going to work for me today? Hey! All right. We're so happy today. Okay. So inside here is a Adafruit Metro M0 Express. You can come check it out after this at the Micro Park. So you want to hang out with me there and play around with this robot, please feel free to. So I'm in an editor called Mu. You can do this in a lot of different editors. This is just the one that Adafruit says is best. So I said, let's do this. And then you can do all of your coding in here. And the nice thing is that when I plug this in, it will definitely work no problem. Hey! So this is that beautiful R-E-P-L we were talking about. And so if I press Control-C, we can actually type code into here and say, hey, what is 2 plus 2? It's 4. All right. Great job. So the really cool thing about this is that all of that Python is being executed on that microcontroller, not on the computer. And I can actually do things like, say, help modules and see what's in here. So these are all the modules that I have currently running on there. And I can import them. And if I can remember what the function is... Okay. We're not going to do that one because I don't remember it off the top of my head. But so you can run code on here. A lot of it is in... I link to the Adafruit step-by-step tutorials, which is really great. I mean, it wouldn't be great if I showed you an LED blinking because it's inside the box. So just imagine that an LED is blinking at you and it's very impressive. But so the nice thing is you can write all this code here and execute it. And when it fails, you can run in and see actually which part is failing. So I decided that for this wonderful presentation, I would show you this beautiful robot that I made. It's very useless unless you like validation and positive feedback. So this is Comfort Bot. It comforts you when your code fails. So... Okay. Oh, I'm so sorry. I didn't mean to offend you with that. Okay. I will do that later. So basically, when I write some code, right, everything's going to try accept loop, which I'm sure all of you are really happy about. Because this is the best way to write your code. But if I throw some garbage into my code, so the nice thing is you just click Save. It saves it on the robot as if it's a USB drive. Like if you look on here, you can see Comfort Bot is just a regular USB. You can click and drag your code onto there. You don't need anything special. You can just use it normally. You can download code and just throw it on there like a thumb drive and it will actually execute it assuming you name it code.py. So there's some security for you. You have to have the right name for your file. Really sophisticated. So... Oh, it's so tiny. There we go. Okay. So... If I... Thank you. I agree. So the nice thing about this is that it is also very indicative of what my talk is about, which is that it is encouraging you when you fail and encouraging you to try again. Because you're actually excited when it fails.  And then it, like, comforts you and pats you on the back. So if you want to see how that was done and take a look at the insides, I'm happy to show you later. It's very sophisticated and difficult. So... And very impressive. Don't worry about it. So... What I've done here is that I made it do stuff, which is step four.  Now, I don't have enough time to talk you through all of the ways you could hook things up and exactly how voltage works and current and different communication protocols. But I will happily talk to you about it at the micro park. But so you decide what you want it to do. You hook that up, power ground signal. You're good. And then you tell it when to do stuff. And that is going to be basically sensors. And it's going to say, when this thing happens, do this thing. And those are also really simple to hook up, power ground signal, right? It's not hard once you kind of learn the basics. And so I really think with some very simple tutorials you can get to a point where you're doing this and able to have this cathartic experience. So... I had all these thoughts and feelings and decided to do something with it. So at my university I started a program called the hackathon because I like bad puns. And because I wanted to encourage my fellow university students to have the support that I did not have when I was in my robotics classes. And I decided to build a like 12 hour hackathon where you had to build a robot and you were going to fail. So we gave them actually closer to 10 hours. And we... Because they also had to present their ideas. And this is the presentation from the winning team which we will get to in a second. But we gave them a prompt. We gave them tons of support. We had workshops throughout the day to teach them how to hook things up. We had bingo cards of failure modes. So...  If you put way too many LEDs on that you got a bingo sticker. For some reason if you put a bird on it you got bingo stickers, right? So we had some amazing, amazing submissions. And the prompt for the very first year was your computer is not secure. Build a robot that makes your computer secure. Um... And I mean some honorable mentions are the robot that would beep out messages to make your computer feel more secure. Um... It would uh... It would say things like you always choose the best decision. Uh... And you have great battery usage. Uh... Things like that. Um... And so we had all sorts of them. One person was trying to hook up a car battery to try to like smash a hammer on your fingers if your password was wrong. It was pretty crazy. Um... But this is the team that won.  Introducing Product Name Featuring Advanced Alarm System And Dangerous Spending Blades Ouch! Your laptop won't open when it's locked. Easy to unlock when you have the password with a convenient remote control. Hustle Free Working Then when you're done working it's simple as pressing a button so thieves can't get to it. So this is my favorite. Limited Supply Call Now So this is fantastic. I love it so much. Um... Because they had to learn so much to do this. Like a lot of these people working on this had never worked with a microcontroller before. They brought in an IR like remote because they had one for their LEDs at home and they wanted to learn how to use it. And they worked really hard all day to figure out how to make these things work and they just built something ridiculous.  Nobody shamed them because what they were building wasn't going to be profitable or because what they were working on wasn't going to be perfect on the first try. Everybody was like, oh, that's hilarious. And so they actually still do these today and have a wonderful time and it's a really great tradition that's down at UCSC. Um... And so I really encourage you to kind of take this, you know, you can do it at home, have a party with your friends, kind of create an environment where this kind of like exploration and play with hardware is embraced and accepted. So I encourage you to go for it. Um... Here's some of the references that I used for this presentation. Feel free to hold here for a couple seconds if you want to take a picture. Okay, cool. And the next slide is some other really great resources that I think are awesome for building your first robot. So if you would like to talk to me about this, I would be happy to let you play with it and try to write code and see if you need comforting on your coding skills. And I really appreciate you hanging out with me for today. So thank you.


Hello, everyone. This is Alice Gell. In the previous videos, I talked about the high-level ideas of the policy iteration algorithm. To make it more concrete, let me now run through an entire example executing the policy iteration algorithm. Obviously, we can't do this with a very large example because I have to calculate everything by hand. So I constructed a tiny example that we can work with. So here is a tiny grid world, a two-by-two world where we have two gold states plus one and minus one with reward plus one and minus one. So there are really only two states that we're concerned with. So as one one and as two one. Those are the two states we want to determine the policy and also figure out the utility values. The setting is pretty much the same as the more complicated example that I talked about before. So the reward of entering a non-goal state is minus 0.04. So same as before and also will keep the transition probabilities to be the same. So whenever we are trying to go in and direct a direction, there is 80% chance that we will end up going in the intended direction. Then 10% chance will go to the left of the intended direction and 10% chance will go to the right of the intended direction. And same as before, if I ever hit a wall, then I'm going to remain in the same location. So let's execute the policy iteration algorithm on this tiny grid world to find out what are the utility values for these two states and also what should be the optimal policy. Now, if you remember for the policy iteration algorithm, we are going to alternate between two steps. One is evaluating the policy and the other one is improving the policy. Let's start with an initial policy where we're going right in both states. I said this arbitrarily, well, I didn't set this arbitrarily. I set it so that our example is substantial. So we do have to go through multiple steps, but we don't have to repeat this for too long. So there are not too many steps. So starting from this initial policy, then we're going to do policy evaluation, which means given this policy, we will figure out the corresponding utility values for the two states. Let's take a look. So I've drawn the picture for our initial policy, and next we're going to do policy evaluation. So policy evaluation essentially means we are going to take the Bellman equations and write them down for this particular policy. And if you recall, the Bellman equations basically gives us a relationship between the utility values for neighboring states. For states who are next to each other. Because there are two states we're interested in, so we're going to end up writing down two equations. One for the V value of S11, and the other one for the V value of S21. All right. So what do the Bellman equations say? Well, for each state, it's going to say that we have some immediate reward of entering that state. In this case, either state is a non-goal state, so we'll get minus 0.04. And then we also get some long-term utility. Long-term discounted reward of getting into the next state. So based on our transition probabilities for S11, for example, well, our current policy for S11 is going to our right. So with 80% chance, we'll go to our right to end up in the plus one reward state, S12. So we'll get plus one. With 10% chance, we're going to go to up, our up direction, which is left of the intended direction. There's a wall, so we're going to come back. And that's why we get V of S11, the second term. And finally, the third possible direction is going down. We're going to the right of the intended direction, which gets us to S21. So the third term is 0.1 multiplied by V of S21. So notice here that this is different from the original Bellman equations, because the original Bellman equation says we're going to take the maximum over all possible policies. And therefore possible policies for each location. But here we have a fixed policy already, so we don't need to take the maximum. We can simply follow that fixed policy and see what happens. And also notice the equation is linear because of that. If we had the maximum term in the equation, it would not be linear. So the equation for S21 is very similar. Let me just talk through it very quickly. So we get the immediate reward again, and because our policy is also going right, so with 80% chance, we'll get into the minus one reward state. With 10% chance, we'll go up and get into S11. And with another 10% chance, we'll go down and get into S21, because we hit a wall. Right? So now we have the two equations. And notice what's happening here. These two equations have two unknowns, right? V of S11 and V of S21, and they're both linear equations. So we basically have a linear system of equations with two equations and two unknowns. And we can solve this exactly by hand or using linear programming. Here it's simple enough so we can do it by hand. So the following steps are simply me trying to simplify the equations and solving them by hand. So first, wrote down things, combine terms, combine some of the terms, so you get these two equations. And next, I multiplied one of them by a factor and then add them together, so to eliminate some of the term. Anyway, you should be able to do this from linear algebra. So the final result is that V of S11 is 0.75 and V of S21 is minus 0.85. And these two numbers somewhat make sense, right? Because both policies are going right. So for the top square going right, we will probably get into the plus one state, which is great. So that's why we V of S11 has a positive value and it's close to one. Whereas for S21, we'll probably get into the minus one state. So that's why the number is negative and close to minus one as well. Right, so this is the first policy evaluation step. So starting from the initial policy, which is going right in both squares, we derive the utility values for the two squares. So next, what we're going to do, well, we're going to, based on these two utility values, derive a new policy. So this is the policy improvement step. The policy improvement step says, given the utility values, what is the best policy? Right, so on this page and the next page, I'm going to solve for the best policy, given the current estimates of the utility values. Well, what is the best policy for S11 here? Right, so I consider all possible policies. Therefore, going right, going up, going left, and going down. And for each of the policies, I'm going to calculate my expected reward or utility. So I ignore the immediate reward because I always get the same immediate reward. So the only difference is really what happens next. Right, so I calculated if I went in the intended direction, then how much do I expect to get? If I went to the left of the intended direction, how much do I expect to get? If I go to the right of the intended direction, how much do I expect it to get? And finally, I get the number. So this is my expected long-term reward if my policy is going right. Right, so having done the four calculations, then finally we just have to compare all the numbers and pick the policy that gives us the largest number. In this case, the policy of going right gives us the largest expected reward, which is 0.79. Right, so given the current utility values, the optimal policy for S11 is going right. Similarly, we can do this for S21. And similar calculations, you can take a look on your own time. But in the end, we found that the best policy is going up. And this makes sense, right? If you look at S21, going right will most likely give us a reward of minus one, whereas going up there, we have a positive reward there, right? We have a positive reward of 0.75. So that looks pretty good and much better than minus one. So probably going up is a good idea. This is it for our policy improvement step. So after this policy improvement step, what happened? Well, before the policy improvement step, our policy was going right for both squares. After the policy improvement step, we found a better one. So the better policy is going right in S11 and going up for S21. And since the policy changed, we have to keep executing the algorithm. Right, remember for policy duration, as long as the policy changes, we have to keep going and we can only terminate when the policy stays the same, when we cannot improve the policy anymore. OK, that means we're going to do policy evaluation again. Right, so our current policy is right and up, and we'll follow a very similar procedure to do the policy evaluation. Of course, these two equations will look different now because, well, in fact, the equation for S11 would look similar if not identical, because our policy did not change, right? But the equation for S21 certainly changed, because our policy changed from going right to going up. So you can check these yourself. So we wrote down these two equations, and again, we have two equations, two unknowns, they're both linear. So using your linear algebra knowledge, you should be able to solve it. So eventually we solved them and got that the two utility values as 0.918 and 0.660. So this is another policy evaluation step where we take the current policy and figure out the utility values given the policy. Next, we have to do another policy improvement step. So given our current utility values, which are 0.918 and 0.660, can we derive a better policy? Is the policy going to change? Is the best policy going to change? So the process is exactly the same before. Given these numbers, we are going to consider all four possible policies, and for each policy, we'll calculate our expected long-term reward. And the key is thinking about where we're going to go next, with 80% chance, where are we going to end up, and so on and so forth. So after all of these calculations, the largest number we have is for going right. So therefore the optimal policy for S11 is still going right. Same as our current policy. We'll do a very similar calculation for S21. And again, trying all four possibilities, and we'll end up with all of these numbers, and turns out the best policy for S21 is going up. So can we stop the algorithm now? Well, our previous policy was right at up, and our new policy is still right at up. So the policy did not change. Because of this, we can terminate the algorithm and say that we have found the optimal policy. That's everything for this example of the policy iteration algorithm. Thank you very much for watching. I will see you in the next video. Bye for now.


Welcome to English in a Minute. Forests are amazing places with lots of trees. But what could this mean? Can't see the forest for the trees. Hey, how is that children's book project going? I've been working on it for so long. I can't see the forest for the trees. You should take a break. Come back in a few days. You'll be able to see the whole story much better. Good idea. Lots of individual trees make up a forest. If you can't see the forest for the trees, you're not able to understand a situation fully because you are too focused on the small details. Think of each detail as a tree and the major issue as the forest.


Welcome to Toffy TV, it is the Everton News Daily. This video was sponsored by One Football, the app that keeps you up to date with the latest scores, transfer rumours and stats all in the one place to download the app. Click the link in the description below. Jordan Pickford and Michael Keane have been called up for England for their Nations Cup game against Holland, England looking to be crowned the first ever winners of the Nations Cup this summer. So, good news for them, Michael Keane will win his eighth cap if he plays in that game. Jordan Pickford will be getting his seventeenth cap if he is in goal against Holland. So, it will be interesting to see whether England can actually win some silverware and it would be nice if the Everton duo were part of it. Reports out of Portugal today claim that Everton assistant manager, Giao Pedro Sousa, is a target for Portuguese side family cow. I think that's how you say it. They claim that a 47 year old is in talks with becoming their new manager. So, listen, I don't know if there's anything in that, that's just what the reports out of Portugal are saying. He's no Marco Silva for 20 years. Is it a worry? Is it a concern if he goes? Obviously an integral part of Marco Silva's backroom staff. But like you say, at the moment they're just reports coming from record, which is a news outlet in Portugal. Lucas Dian has been speaking about how he has a special bond with the Evertonians. He said they made him feel very, very welcome in his first game against Valencia at Gooderson Park. Last summer and that bond has grown throughout the season. He said that Gooderson Park is a beautiful place and the atmosphere is incredible. And we've seen that as we've finished the season. He said that he's looking forward to seeing all the Evertonians next season as well. He's been fantastic, hasn't he? He's obviously won the player of the year, fans player of the year at the Dixie's the other day and shared the players player of the year with Ghana. But Dian has been incredible to come in and to make us not misleading Bains, I think is an unbelievable achievement for him to do that because we were all worried, having seen how good Bains have been for years. We were all concerned when he wasn't going to be a permanent fixture in the side again, but Lucas Dian has come in and been absolutely brilliant for us and expect him to be even better next season, just being fantastic. Reports today stating that Everton are looking at Leon Wengebynnar better and triore, rather. Obviously we've been linked with Trouser and Memphis De Pye from Leon, but this story today stating that Everton are very interested in the 23-year-old, formerly of Chelsea of course, played against us in the Europa League last season. He's got good feet, can beat a man, good ability, right age, but we don't know obviously if there's anything in this or how much that fee will be, but he certainly can play on the right hand side, can play off the left as well. So quite versatile and in the age bracket that Marcel Brands wants, so who knows. And apparently Yannach Balasi is interesting Southampton and Newcastle United. Balasi, who played his final home game for Anderlecht over the weekend, will be available at a cut price fee according to reports of around £7 million. He joined Everton for £25 million under Ronald Cooman, suffered a terrible injury in the December of that season and he was in and out the side last season, never really got his form back and obviously went out on loan this season with Marco Silva the side and he wouldn't be part of his first team squad. He met the first half of the season on loan at Aston Villa before moving to Belgium with Anderlecht, so you know some interest there from Newcastle and Southampton apparently and I'm sure ever much selling. And Yannach I'm sure will be very, very pleased to move to another Premier League club to continue his career. So there you go. If you haven't subscribed please do so, take a second, give this video a thumbs up and if you want more videos and live videos every day, get over and join us on page and thanks for watching.