Up until now, we've covered symmetric key cryptography. That's all we've looked at. The classical ciphers in the encryptor and decryptor, they both need to have a shared secret key. With desks, AES, triple desks, those block ciphers, they all require both sides to have the same secret key. And then last lecture we looked at random numbers and one role of random numbers is in stream ciphers. A stream cipher really is take a random number, XOR it with our plain text. And the decryptor uses the same pseudo-random sequence and XORs with the ciphertext. But again, stream ciphers still are symmetric key systems in that both the source and destination must have the same shared secret key. This is called symmetric key cryptography and it's still widely used and it's especially for data encryption. But there's another form of cryptography called public key cryptography where the source and destination or the encryptor and decryptor use different keys. One key is used to encrypt, a different key is used to decrypt. But there's some relationship between those keys. So that's the next topic that we need to look at is public key cryptography. And it will take some time to go through it. But to understand some aspects of public key cryptography we need to review some number theory, some very basic mathematics. So what we'll start today, you probably know half of it. Maybe you forgot it but you've learnt it at some stage. So very simple. But we'll see it will lead to some concepts that we will use when we look at public key cryptography. So we need to know them now. So we'll go through, I'll introduce some concepts or refresh on some concepts, give a few very simple examples today and maybe even a little bit next week. Some different aspects of, we'll just mention about divisibility and some aspects of prime numbers and then modular arithmetic. Divisibility, we often, we want to care about finding the divisors of a number. Given a number, what can we divide it by and to get integer results? So we may say that B divides A if there's some number which we multiply by B that gives A where all those values are integers. So B divides A if M is an integer where we can multiply M by B to get A. So we talk about a divisor. We can say B is a divisor of A. So this is nothing new. The other word we will use is a factor. We say B is a factor of A. And we sometimes care about the greatest common divisor. So given two numbers, A and B, what is the greatest common divisor of those two numbers? So find the divisors of A and B and then of that set, the two sets find the one which is the greatest and it's in both of those sets. So GCD is just the abbreviation of greatest common divisor. There are actually some algorithms to find that for us. We will do it for a few simple examples, small numbers, but when you have large numbers and later when we look at public key cryptography we're dealing with some large numbers of hundreds of digits, then you need some algorithm to go through and find greatest common divisors and there are some algorithms that will do it quite efficiently. We can say, maybe this is new, we can say that two integers A and B are relatively prime if their greatest common divisor is one. This is not prime. This is a different thing, relatively prime. So any two integers, if their greatest common divisor is one then we can say those two integers are relatively prime with each other. We'll see that in use shortly. Just to be simple, you can help me out. What are the divisors of 15? One, three and five. And 15. One, three and five and 15 can all divide. 15 we can divide by those four numbers so we can say they are the divisors. I will not write them down, that's easy. Usually we, actually we can write them down just to be complete. We can say the divisors are one, three, five and 15. We can also write that number 15 as a multiple of some of its divisors. And a multiple of its prime divisors. So we can say 15 is equal to three times five. And in fact any number we can do that. We'll see some examples. Maybe it goes straight to it. What's the greatest common divisor? 15 and 16, for example. The greatest common divisor of those two numbers. Write it down, you find the answer. And someone in the, looking at the TVs, in the back rows, tell me the answer. Greatest common divisor of 15 and 16. You can use your phone if you want to calculate. Someone can help him. One. Okay, in this case it's one. So the divisors are 15, a one, three, five and 15. The divisors are 16, two, three we cannot pour, eight, 16. They're the divisors. So the greatest common divisor amongst those two sets is one. So another thing we can say is 15 and 16 are relatively prime. Any two numbers which have the greatest common divisor of one, we say they're relatively prime. Any more examples needed for that? I think you can find divisors easy. Of course, if the greatest common divisor is not one, it's greater than one, then they're not relatively prime. They either are relatively prime or not. What's next? Let's look at prime numbers then. What's a prime number? Divided by one and itself. So any integer p is a prime number if and only if its only divisors are one and itself. We know about prime numbers. And another thing we know already is that any integer, prime or not, can be factored or written as the multiplication of a set of prime numbers. In the formal way, some integer a can be written as a mistake here. This should be p1. This subscript of the first one should be p1 to the power of a1. p2 to the power of a2. p3 to the power of a3. Up to pt to the power of at. In general, we can write any integer as multiplying a set of primes together. And that's probably best illustrated by an example. And we've done it already for 15. 15 can be written as 3 to the power of 1 times 5 to the power of 1. We do it for all primes. 15 is actually 2 to the power of 0 times 3 to the power of 1 times 5 to the power of 1 times 7 to the power of 0. So in general, we can say that consider all primes and any number is made up of multiplying all those primes together raised to some power. But of course, when it's raised to the power of 0, it's just 1. 16 is the prime 3 to the power of 1 times 5 to the power of 1. 16, how would we write it as multiplying primes together? Times, no. 2 to the power of 4 quite simply here. So 2 is the prime, raised to the power of 4 gives us 16. So 2 times 2 times 2 times 2. Any integer can be written like that. Multiplying primes together. And in the reverse, then we can say that any integer can be factored into its primes. That is, given 15 we can find that 15 is made up of multiplying prime 3 times prime 5. So the prime factors of 15 are 3 and 5. The prime factors of 16 is 2. So we can find the prime factors of some integer. Let's try it for a few others Prime factors of 22 find that. Don't all yell out at the same time. It can be divided by prime 2 and the other prime is 11. 145 5 to the power of someone's told me 3 I don't think it's 3. What do you get? 29 5 times 29 29 is a prime, correct? Okay, so it's 5 times 29. So all we're saying is that any integer we can, in theory, break it into prime factors. That is the divisors of that integer where those divisors are all prime. In practice it's very hard to do with large numbers. And that will come up later as a security mechanism. Given a very large number not 145 but maybe a number which is 45 digits long given that find the prime factors is a problem that's considered too hard to solve with computers assuming that the number is large enough and that will be a principle that's used in securing some systems in public key cryptography. Finding the prime factors is hard when we have large numbers. By hard means it would take your computer forever to do it given the current known approaches. So we know about prime numbers this just lists the first prime numbers under 2000. You'll start to remember some of the first ones up to the first 10 or 15 if you don't already. Finding the value of pi is hard. Pi is the exact value is it? There are infinite number of digits, isn't there? Maybe that's a different definition of hard. Right. Finding the value of a number which has an infinite number of digits is hard in that we cannot compute it in any time. But it's of no benefit for us really from a security point of view. Because no one can find it. But what we'll see with primes and prime factors a security mechanism will be that if you know 5 and 29 it's easy to find 145. Just multiply them together. So if you know the two primes it's easy to find some large number. But if you just know that large number it's hard to find the two primes. That's a principle or an idea that will take advantage of. Going in one direction is easy going in the other direction is hard. But we'll see that later on public key cryptography. What else? Well that's it about the first thing. Dividing numbers, prime numbers. Just remember some of them. Now we'll look at modular arithmetic. What is modular arithmetic? Finding the remainder. Mod we know is finding the remainder and divide by something. So you know about mod. Modular arithmetic is doing arithmetic. Additions, subtraction, division, multiplication, exponentiation, logarithm are our main six operations. Doing arithmetic applying those operations where everything is mod by some number N. That's all. That's what we mean by modular arithmetic. Adding up numbers where we always add numbers. And a lot of the concepts follow from our normal arithmetic. So when I say normal arithmetic the way that you add numbers and subtract numbers. It's quite simple in most cases. But there are a few things that will be introduced which are useful later. So just define if we have some integer A and some positive integer remainder when A is divided by N. So mod we know is the remainder. A divided by N then A mod N equals the remainder when we divide A by N. A is, sorry N is called the modulus. So we talk about the modulus. We can say two integers A and B are really equivalent or more precise congruent modulo N if A mod N equals B mod N. And sometimes we'll write it like this. A and this equivalence sign or the three equals sign B in brackets mod N. Meaning A and B are the same when we mod them both by the same number N. We define so what mod N does mod N is an operator that takes the maps all integers into the set of integers to find a ZN. That is mod N as an operator as the input we can have any integer. And the result will always be an integer from 0 up into N minus 1. If N is 10 for example mod 10 means that any number mod 10 the result will be always between 0 and 9. Okay? And that's defined as the set ZN. So the result of mod N is always a positive number between 0 and N minus 1. We don't have negatives. In some interpretations of mod you can have a negative value. So some programming languages may deal with a variation where you can have a negative value. In here it's all positive results. Arithmetic performs arithmetic operations. So addition, subtraction multiplication, division exponentiation raise something to the power and logarithm those six operations are all performed within the confines of that set ZN which means that the answer is in that set ZN. So we'll go through those operations. Some are very easy. The normal arithmetic just mod by N. Let's go through examples to illustrate the arithmetic. Let's say start simple answer. Let's get through this quick. So one thing we can write is we can say 13 is congruent modulo 3 or equivalent to 3 when we mod them both by 10. It's a notation that we'll sometimes see. When we mod numbers by 10 then the answers are in the set Z10. The answers are between 0 and 9. That's all what we mean by Z10. So let's stay with Z10 that is in everything mod 10 and I will not write it mod 10. Let's just keep the examples. We're using Z10 in this set. Answer Answer 1 In this case we're using modulo modulo 10. Z10 means that everything is mod 10. In addition it's easy. We just do normal addition and then mod by N. In normal arithmetic we have addition In modular arithmetic addition is just the same as the answer and mod by modulus N. Addition is easy. What about subtraction? Another operation. We'll do it in a different view. Over here the normal arithmetic. The normal approach. What's 7 minus 3? Not in Z10 but in our normal arithmetic. 7 minus 3 Easy How do we calculate subtraction with normal arithmetic? Can we convert it to addition? Well subtraction is just addition of a negative number. So in normal arithmetic 7 minus 3 is really the same as 7 plus minus 3. So subtraction is just addition where the number that we add is the negative subtracting and that more precisely is called the additive inverse. Negative 3 is the additive inverse of plus 3 positive 3. The additive inverse is when we add two numbers together and we get 0 then those numbers are called the additive inverse of each other. So sticking so far with normal arithmetic we can say alright plus 3 additive inverse of minus 3 and vice versa. Minus 3 is the additive inverse of plus 3. Why? Because plus 3 when we add them together we get 0. When you add two numbers together and you get 0 then we say those two numbers are the inverse or the additive inverse and subtraction the operation of subtraction is really the operation of addition but we add the additive inverse of the number that we're subtracting. So 7 minus 3 is the same as 7 plus the additive inverse of 3 which is minus 3. That's in our normal arithmetic not modular arithmetic but in fact the same applies in modular arithmetic. Subtraction is just addition of the additive inverse and then we mod by n. What's the additive inverse of 5? Minus 5. Minus 5 in normal arithmetic. It's the negative that's easy. Now let's convert back to modular arithmetic and in Z10 in our example and I'll write it as additive inverse Ai I don't have to write it all. What's the additive inverse of 3 in modular arithmetic in mod 10? Using the same definition of the additive inverse in our normal arithmetic additive inverse is the when we add the two numbers together we get 0 3 plus minus 3 is 0. Now apply that definition for modular arithmetic. The additive inverse of a number is the number that when we add to 3 gives us 0 but in mod 10 in this case. 7. Remember we're doing it in mod 10 in this set of examples. Z10. So if everything is mod 10 3 plus 7 is 0. So we say the additive inverse of 3 is 7 in mod 10. Any questions so far? This is maybe new or a new way to think about some things. You know additive inverse already. You just don't think about it any questions? No answer means okay. So slightly different now we treat subtraction as addition of the additive inverse in the same way as our normal arithmetic subtraction is the addition of the additive additive inverse. So let's try some what is 4 minus 7 in Z10 in mod 10 calculate 4 minus 7 your calculator won't help much 4 minus 7 where we find the additive inverse instead of treating it as subtraction treat it as 4 plus that sorry the additive inverse of 7 4 minus 7 is the same as 4 plus the additive inverse of 7 what is the additive inverse of 7? Well in fact we found it here the additive inverse of 3 in mod 10 is 7 because 3 plus 7 is 0 so similar the additive inverse of 7 in mod 10 is 3 so it becomes 4 plus 3 equals 7 and I will not write up but this is all in mod 10 4 minus 7 equals 7 sounds strange but remember all in mod 10 of course the other way to think of it is wrapping around remember the Caesar Cypher that we implemented the wrap around feature as a mod and it's the same 4 minus 7 go back 7 spots where do you get to? you come back around to 7 if we have a sequence from 0 to 9 Z10 sequence from 0 to 9 if we start at 4 and we go to the back by 7 positions where do you end up? at 7 find the answer of these two 2 minus 6 is 2 plus the additive inverse of 6 what's the number that we add to 6 and we get 0 in mod 10 4 so additive inverse of 6 is 4 so 2 plus is 6 and just for brevity I omit writing the mod 10 in all this so it's all mod 10 5 plus the additive inverse of 3 and we've found that before at 7 5 plus 7 is 12 and again I am lazy I don't write the mod 10 does every integer have an additive inverse? let's try remember we're still in Z10 that is the values from 0 to 9 find the additive inverses the number that we add to A such that when we mod by 10 we get 0 inverse 0 0 plus 0 mod 10 is 0 the inverse of 1 that's an easy one and it turns out for any modulus N every number has an additive inverse we can always add 2 numbers together and get 0 in mod N every number has an additive inverse which means we can subtract any number from any other number so they are easy addition, subtraction, let's move on to multiplication and division the next operations remembering that multiplication is just addition multiple times multiplication we just add numbers together multiple times let's let's change our modulus to be more fun tends too easy let's do everything in maybe something different modulus let's do Z8 that is everything is mod 8 from now on just for something different let's do multiplication multiplication in modular arithmetic is the same as in normal arithmetic 3 times 2 in detail we say 3 times 2 mod 8 so multiplication is easy same as normal multiplication just multiply and then mod by modulus N 8 in this case 3 times 4 3 times 4 is 4 3 times 4 is 12 12 mod 8 we get 4 so you can do multiplication in normal arithmetic division is more fun division division is just multiplication but we multiply by the inverse in normal arithmetic that's how we do it again we'll just switch back in normal arithmetic we can say 8 divided by 3 is the same as 8 times 1 over 3 where 1 divided by the fraction 1 over 3 is the inverse of 3 but this is called the multiplicative inverse let's see if I can write it multiplicative inverse out of space the multiplicative inverse in normal arithmetic is that when we multiply two numbers together and we get 1 we say they are the multiplicative inverse of each other 3 times 1 over 3 equals 1 5 times 1 over 5 equals 1 so it's easy in our normal arithmetic and division is simply multiplication by the multiplicative inverse 8 divided by 3 is the same as 8 times the multiplicative inverse of 3 the multiplicative inverse of 3 is 1 over 3 so 8 divided by 3 is the same as 8 times 1 over 3 let's apply that same concept for modular arithmetic to do division 5 divided by 3 what's 5 divided by 3 in mod 8 division is the same as multiplying by the multiplicative inverse dividing by 3 is the same as multiplying by the inverse of 3 what is the inverse of 3 in mod 8 well the multiplicative inverse is defined as the number that we multiply by such that the answer is 1 and that's the same in modular arithmetic multiply two numbers together you get 1 they are the inverse the multiplicative inverse of each other so 5 divided by 3 is 5 times the multiplicative inverse of 3 am I alright what is the multiplicative inverse of 3 3 times something mod 8 equals 1 the multiplicative multiplicative inverse is this something well it's also 3 3 times 3 is 9 mod 8 leaves us 1 so the multiplicative inverse of 3 turns out to be 3 in this case 5 times 3 mod 8 15 mod 8 is 7 5 divided by 3 is 7 in mod 8 confusing yet any questions same concepts that we've known since primary school adding numbers dividing numbers but now we just formalize some aspects of it we talk about an additive inverse add two numbers you get 0 multiplicative inverse multiply two numbers you get 1 division is the same as multiplying by the multiplicative inverse but now we just do all of that mod n mod 8 in our examples 5 divided by 3 is 5 times the multiplicative inverse of 3 what is that 3 times something mod 8 equals 1 well 3 times 3 mod 8 equals 1 so in fact it's its own multiplicative inverse 5 times 3 all mod 8 gives us 7 try that one 6 divided by 4 mod 8 it's not 0 so go through the steps what do we need to find 4 times something equals 1 that is we need to find the multiplicative inverse of 4 to do division 6 times what is the multiplicative inverse of 4 well it's a number such that 4 times that number mod 8 equals 1 what is this number 9 there is no such number in this case you will not find one you cannot multiply 4 by any integer and mod by 8 to get 1 therefore there is no multiplicative inverse of 4 so we cannot do it there is no answer so in this case we cannot divide we cannot do 6 divided by 4 in mod 8 there is no answer not every integer has a multiplicative inverse we said that every integer has an additive inverse but it doesn't apply for a multiplicative inverse let's check them again we are still in mod 8 or z8 the set is 0 to 7 so the numbers that we can deal with as input is 0 to 7 let's find the multiplicative inverse of those numbers what's the multiplicative inverse of 0 there is no number that we multiply by 0 and get 1 when we mod by 8 so there is none 1 1 times something mod 8 equals 1 1 times 1 1 1 times 1 mod 8 equals 1 inverse of 2 there is none 3 we've done before 4 there is none 5 6 6 times something mod 8 equals 1 because 6 is even we mod by an even number we will not get 1 as an answer here 7 first point not every number has a multiplicative inverse in mod n that's the first point and it becomes important later but in this case z8 we see that the numbers are multiplicative inverses of themselves let's see if that applies for all modulus let's try something else maybe back to what do we have z10 find the multiplicative inverses 0 doesn't have 1 1 will always be itself 2 find it for the remaining numbers 2 times something mod 10 equals 1 again we have 2 even numbers we will not be able to get an odd number 1 as the output in that case 3 3 times something mod 10 equals 1 3 times 7 is 21 mod 10 is 1 4 no even number won't work in this case 5 5 times something mod 10 will never leave us a remainder of 1 6 no even 7 will be 3 they are the inverses of each other so it goes in both directions 9 9 times 9 is 81 so this is just in a different modulus we see the multiplicative inverses it's not always true that they are the inverse of each other that's the point here 3 is the inverse of 7 so in z8 each number that had an inverse was the inverse of itself but that's not always true that was a special case so not all numbers have a multiplicative inverse which means we cannot divide by just any number if we try to divide by a number that doesn't have a multiplicative inverse we will get no answer we just don't define the answer any questions so far we can do addition, subtraction subtraction is just adding the additive inverse we can do multiplication and division division is just multiplying by the multiplicative inverse what's left that we commonly use raise to the power so a to the power of b for example exponentiation and the inverse of exponentiation is logarithm so really exponentiation is just multiplication multiple times 2 to the power of 3 is 2 times 2 times 2 so exponentiation is quite easy we can calculate just do it in calculate in normal arithmetic and mod by n for example we're still in z8 5 to the power of 2 just use normal arithmetic 5 to the power of 2 is 25 mod by 8 and you get 1 so exponentiation is easy logarithm really exponentiation is multiple times logarithm follows from that the inverse of exponentiation in the same way that we not every number has a multiplicative inverse we cannot find the logarithm of any we cannot find the logarithm in modular arithmetic of every possible value we will not go to logarithms yet they're a little bit harder to learn to them later let's go back to our slides and see what we've said modular arithmetic is just performing arithmetic operations within that set zn where we mod by n we'll make use of it in public key cryptography and other techniques some of the properties of our normal arithmetic also apply so the laws for normal arithmetic which you use every day you don't remember them but also apply for modular arithmetic and actually it makes life easier in terms of implementing different algorithms for example a mod n plus b mod n all mod n is the same as a plus b mod n similar for subtraction and especially for multiplication a times b mod n is the same as a mod n times b mod n all mod n those rules apply and some of the others listed down there additive inverse distributive law associative law and so on but this one is useful it's useful in solving calculating the mod of large numbers that is a times b mod n if a and b are large numbers we multiply them together we get a very large number and then try and find mod n a simpler way is to if you know a and b first find a mod n then find b mod n and you get smaller numbers when you mod by n you can get smaller numbers and then multiply them together in terms of implementation that can make algorithms faster to finding the mod of a large number an example let's apply that in an example let's find by hand that is without a calculator a couple of examples first try to use that rule to find 160 mod 8 you could find it directly if the numbers are small enough but try and use that rule and think well some number if we can break it into its divisors we have 160 treat 160 as a times b find some a and b which gives us 160 and then simply mod those numbers by n first there are different divisors but I'll try 160 is 10 times 16 and following our rule that's the same as 10 mod 8 times 16 mod 8 all mod 8 10 mod 8 easy 16 mod 8 0 all mod 8 0 mod 8 returns a 0 find out when we divide 160 by 8 is 0 with small numbers you don't need to apply that rule but when you have larger numbers even with implementing software to do this for us using such properties can make implementations much faster one more 11 to the power of 7 mod 13 no calculator I've done this in quizzes solve it the power of 7 mod 13 remembering raising something to the power exponentiation is simply just multiplying multiple times what can we do the idea is to break instead of 11 to the power of 7 break that into smaller numbers multiplied together and then mod them by 13 so we get small numbers because if you calculate 11 to the power of 7 you get a large number not too large but larger than we can easily do in our head or quickly do well we can think in different ways but one way is to say our properties of exponentiation still apply here it's just so this is 11 multiplied by itself 7 times we can split it into 4 times 1 4 plus 2 plus 1 is 7 move over here let's do parts of them at least 11 to the power of 4 my brain cannot do that let's treat it as 11 squared squared I should put brackets there 11 to the power of 4 is 11 squared all squared 11 squared we can do that if it's 121 mod 13 simply 11 11 squared so it's actually 121 squared mod 13 times keep the brackets here 121 mod 13 we need to do that in our brain what do you get a remainder of 4 9 times 13 is 117 remainder 4 slowly and 121 mod 13 is 4 we just got that 121 squared mod 13 is the same as 121 mod 13 times 121 mod 13 which is the same as 4 times 4 mod 13 and I forgot my mod 13 121 mod 13 all mod 13 is 4 times 4 all mod 13 or 4 squared mod 13 16 mod 13 we still got 4 and 11 16 mod 13 well you can actually solve it there 12 times 11 132 so 13 times 10 remainder will be 2 so we can take this wasn't a very large number but 11 to the power of 7 something we cannot easily quickly do in our head 11 to the power of 7 mod 13 applying the rules of expanding the multiplication we can step through and find the final answer now the point isn't that you need to do this all the time the point is that when we have very large numbers a large number raised to the power of another large number and then mod by some large number calculating that directly is quite slow but steps like this can be implemented in an algorithm that will reduce those large numbers down that's what we're doing instead of 11 to the power of 7 mod 13 we bring it down to the smaller numbers which can be calculated faster so algorithms will apply these techniques to make the calculation feasible in a computer and again by very large numbers I mean maybe hundreds of digits not two or one digit let's introduce a new concept so there are different properties that are used and I don't normally require you to use them much maybe once or twice in a quiz that's all but that one at least but the others don't solve modular arithmetic by hand much it's just illustrating concepts division we'll return to ah maybe we've missed something here in division let's return to it in division we said we can divide when we have a multiplicative inverse and we found that not every number has a multiplicative inverse in z8 we found 1, 3, 5 and 7 they were inverses of themselves in z10 for example we found 1 and 1 3 and 7 are inverses and 9 is its own inverse the inverse is when we multiply those two numbers and mod by n we get 1 you can show that for a number to have an inverse it needs to be relatively prime with n a number a has a multiplicative inverse in mod n if a is relatively prime with n that is the greatest common divisor of a and the modulus is 1 so that's one location where we use relatively prime let's just check if that was the case here n is 8 in this case so is 1 relatively prime with 8 greatest common divisor of 1 and 8 is 1 so 1 and 8 are relatively prime 2 and 8 are not relatively prime the greatest common divisor of 2 and 8 is 2 they are not relatively prime therefore 2 does not have a multiplicative inverse in mod 8 3 and 8 are relatively prime greatest common divisor is 1 to have a multiplicative inverse for z10 for example 2 and 10 the greatest common divisor is 2 therefore 2 and 10 are not relatively prime therefore 2 does not have a multiplicative inverse for a number to have a multiplicative inverse that number must be relatively prime with the modulus n 3 and 10 are relatively prime 7 and 10 are relatively prime 9 and 10 are relatively prime so they have multiplicative inverses so if we want to have a number that has a multiplicative inverse then we choose a number that is relatively prime with the modulus n and that will become useful later when we use this in our security mechanisms let's finish with one more concept as an example what numbers less than 4 are relatively prime with 4 let's do the long way relatively prime means the greatest common divisor of that number and of those two numbers is 1 greatest common divisor of 1 and 4 1 greatest common divisor of 2 and 4 2 and 3 and 4 and also 1 so which numbers less than 4 are relatively prime with 4 1 is relatively prime with 4 2 is not relatively prime with 4 3 is so in this case 2 numbers which are less than 4 are p relatively prime with 4 in this example 4 let's find the numbers less than that number and count how many are relatively prime with it in this case 2 is the answer because there are 2 numbers this is called the totion or Euler's totion we write it as this Euler's totion function counts the number of numbers less than 4 which are relatively prime with 4 the answer is 2 in this case there are 2 numbers less than 4 which are relatively prime with 4 that's the definition of Euler's totion function try it with some others what's the totion of 9 find the totion of 9 that is for numbers 1 up until 8 check whether they are relatively prime with 9 if they are, count how many are let's do it the long way so the numbers 1 up until 9 so 1, I'll list them is 1 relatively prime with 9 greatest common divisor of 1 and 9 yes is 2 relatively prime with 9 yes 3 and 9 no, they have a divisor of 3 4 and 9 5 and 9 6 and 9 they have a divisor of 3 7 and 9 8 and 9 what's the answer? 6 there are 6 numbers less than 9 which are relatively prime with 9 the totion of 7 1 and 7 yes 2 and 7 3 and 7 4 and 7 5 and 7 relatively prime with 7 why? 7 is prime that is the only divisors of 7 are 1 in itself so the greatest common divisor of some number and 7 when that number is less than 7 will always be 1 so when we have a prime number it's quite easy to calculate here it's actually the number minus 1 because it's the number is less than 7 6 in this case the totion of 13 is 12 13 is prime therefore the numbers 1 up until 12 12 numbers are relatively prime with 13 the totion of a prime p is quite simply p minus 1 so if the number is prime then it's easy if it's not prime, if it's composite then we need some way to calculate the totion then it turns out when we have a very large number a very large composite number not prime calculating the totion of that is very hard it takes a lot of time so very large number the totion is very hard to calculate we're not finished yet last one on the totion totion of 5 totion of 35 is 35 prime it's 7 times 5 okay, why do I do that because I know that actually the totion of 2 prime numbers multiplied together is the same as the totion of those primes multiplied together and we know the totion of 7 is 6 and the totion of 5 is 4 so the answer is 24 calculating the totion of a large number is very hard, it takes a long time except under certain conditions if we have a large number and if we can break it into its prime factors we broke 35 into 7 and 5 the prime factors of 35 then a property of the totion is that the totion of 2 primes multiplied together is the same as the totion of each prime and then multiply of a prime is just that prime minus 1 this is easy to calculate we didn't have to go through 1 to 34 and that concept is used again in cryptography one way if you know the factors calculating the totion is easy if we know 7 and 5 it's easy to find 24 but if we don't know the prime factors of this number it is hard and in fact that's a key part of RSA public key cryptography we will stop there we will see some other properties on arithmetic modular arithmetic next week have a look at your assignment some encryption that you need to do with some software over the next week and ask me any questions on Tuesday


If you study the Forbes list, which is better than Harvard MBA of understanding wealth, it's right there on the website. You can just reverse engineer the patterns. The people who create wealth create a brand and they exert control. There are no passive investors at the top of the list. So I think the one disclaimer for people in crypto that you have to realize is that the passive investor game is an illusion. It's an oasis and mirage that always appears out on the horizon. And at the end of the day, you're better off to actually be involved in a protocol. And now with the Dow world and so on, there's possibilities for people to be involved in big projects.


The repeat unit or repeating unit is a part of a polymer whose repetition would produce the complete polymer chain except for the AND groups by linking the repeat units together successively along the chain, like the beads of a necklace. The repeat unit is sometimes called the Mer or Mer unit. Mer originates from the Greek word Meros, which means a part. The word polymer derives its meaning from this, which means many Mer's. The repeat unit or Mer is not to be confused with the term monomer, which refers to the small molecule from which a polymer is synthesized. One of the simplest repeat units is that of the addition polymer polyvinyl chloride, CH2CHClN, whose repeat unit is CH2CHCl. In this case the repeat unit has the same atoms as the monomer vinyl chloride CH2CHCl. When the polymer is formed, the C equals C double bond and the monomer is replaced by a C C single bond in the polymer repeat unit, which links by two new bonds to adjoining repeat units. In condensation polymers C examples below the repeat unit contains fewer atoms than the monomer or monomers from which it is formed. The subscript hand denotes a degree of polymerization, that is, the number of units linked together. The molecular mass of the repeat unit, Mr., is simply the sum of the atomic masses of the atoms within the repeat unit. The molecular mass of the chain is just the product hand them are. Other than monotispersed polymers, there is normally a molar mass distribution caused by chains of different lengths. In copolymers there are two or more types of repeat unit, which may be arranged in alternation, or at random, or in other more complex patterns.


Hello everyone, this is Dr. Anavits from the Department of Radiative Diagnosis, M.M. Sierra Mysore. I would like to thank Indian radiologist for giving me this opportunity to present the role of magnetic resonance imaging in diagnosis and staging of patients with CSRVICS. Coming to abstract, the background of this study was we wanted to evaluate the efficacy of MRI in assessment of important diagnostic factors in carcinoma cervix like tumor size, involvement of pyrimatrium, involvement of pelvic sidewall, adjacent organs and nodal status and how we targeted the plan of management and correlate MRI findings with clinical figure staging and CSRVICS. Materials and methods, this was a hospital based cross-sectional study conducted among esophageal and pulmonary cases of CSRVICS presented to the department of radiodiagnosis attached to M.M.C.RI for 18 months from January 2022 to June 2021. Coming to introduction, CSRVICS is the most common gynecological cancers in India and second most common gynecological cancer worldwide. It predominately affects the multiparous woman and is transmitted by HPV. MRI can tell accurately about the urinary bladder and rectal invasion by CSRVICS. Therefore invasive procedures such as gystoscopy and zygmodoscopy can be avoided by using non-invasive diagnostic modalities like MRI. MRI is not only useful for preoperative staging but also it helps in identification of recurrent residual tumors in treated patients. Radiological staging by MRI is better than clinical staging most of the time. These were to evaluate the efficacy of MRI in assessment of important prognostic factors in CSRVICS like tumor size, paramedic involvement, pulmonary sidewall involvement, adjacent organs and auto status and how it utters the panoponism. And the other objective was to correlate the figure staging. Inclusion criteria, histopathal script proven cases of CSRVICS refer to the department for MRI imaging. Exclusion criteria was the patients who were with cardiac pacemakers, new implants, new lips within the body and other contraindications of MRI like lot of those patients were excluded. The third of data collection was HPE proven cases that were referred to our department. Scan was done using 1.5 Tesla G Optima MR3 system machine. Therefore the minimum, after the calculation the minimum sample came around to be 30 due to the availability of cases. The data we took 50 patients who were YPC proven CSRVICS case. In the statistical analysis, categorical data were represented in the form of frequencies and proportions. The CHI score test was used as test of significance for qualitative data. Contest data was represented as mean and standard deviations. An independent T-test was used as a test of significance to identify the mean difference between two quantitative variables. The p-value of LSN 0.05 was counter-statistically significant assuming all the rules of statistical test. MSXL, SPSS version 22 were used to analyze the data. Results of the total of 50 patients who were YPC proven CSRVICS were included in the study. Both newly diagnosed and treated with chemotherapy were included. FICO stage was assigned both clinically and with MRI and the parameters were combined. The two categories of patients were considered for the study that is 18 newly diagnosed patients that forms 36% of the study population and 32 treated cases which formed 64% of the study population. In our study, majority of the patients that is 90% of the study population were married, 10% were unmarried. The age group of patients in the study varied from 36 years to 73 years. In general, majority of the patients belong to this age group of 41 to 50 years that is 38% of the study population. Pollered by 51 to 60 years that is 32% of the population, 11 patients belong to more than 60 years of age, 4 patients belong to less than 40 years of age. Among the newly diagnosed cases, majority of them belong to the age more than 60 years and the age group 41 to 50 years. But among the recurrent cases, the common age group was 41 to 50 years and the 51 to 60 years. The most common presenting symptoms were wide discharge according to the R study seen in about 58% of the population, followed by lower abdomen pain seen in 52% of the patients. In our study, the majority of the patients that is 29, which formed 58% of the study belong to post-maramposal group. 15% belong to pre-maramposal group. 6 patients had undergone total, sub-total hysterectomy. Leather therapy was given to 32 patients totally and most of them, that is 10% 10 patients which formed 31%, were referred for MRA during the follow-up by more than 5 years. Hydrohydro-HIN is an indirect sign of pelvic-side wall invasion and was noted in 7 patients, that is 14% of the cases. Out of these 7 cases, 4 were new cases and 3 were recurrent cases after treatment. In our study, hydrometer was present in 20 cases, that formed 40%. Among these, 10 cases were newly diagnosed and 10 patients were post-treatment cases. Among the 10 post-treatment cases, 9 had a demonstrable massage on MRA. In our study, there were 18 biopsy-prone new cases. Clinically, mass was identified in 16 cases and was not suspected for 2 cases. Out of 16 cases with clinical suspicion of mass, MRA showed presence of mass in 15 cases. MRA was not able to detect one clinically suspected case. MRA showed the presence of mass in 17 cases, including those 2 cases where there were no clinical suspicion. The accuracy sensitivity, positive critical value, thus came around 83%, 88% and 90% respectively. According to the clinical figure staging, the majority of the cases belonged to stage 2B, but according to MRA figure staging, the majority of the cases belonged to stage 4A. No cases were staged as 3C clinically. However, on MRA, 2-3C cases were detected. In our study, significantly, 2 cases were diagnosed as stage 3B clinically and on MRA, they were found to have stage 4B on MRA with bladder rectal emission and distant metastases. One case was diagnosed as 3A. It was found to be 4A on MRA with bladder rectal emission. One case, which was diagnosed as 3B, was found to be 4A on MRA with bladder rectal emission. 2 cases of clinically staged 2 were found to have bladder emission on MRA and hence staged as 4A. One case, which was clinically diagnosed as 1A, showed bladder emission on MRA, just upstage as 4A. One case, which was clinically diagnosed as 4A, with cytoscopy showed bladder emission. Rectal infiltration on Zygmodus came out to be 4A on MRA. Cytoscopy detected bladder emission in only one case. However, on MRA, 7 cases were diagnosed. One patient had both carcinoma of rectum and cervix. Apart from this, one more was identified with rectal infiltration in the Zygmodus scopy. However, MRA showed 3 cases of rectal infiltration. The most common HP type was squamous cell carcinoma, which was present in 94.4% of the newly diagnosed cases and remaining 5.6% constituted by adenosia. In our study, among the 18 newly diagnosed cases, biospeed proven, T2 weighted imaging, diffusion weighted imaging and contrast enhanced imaging showed lesion in 16, 17 and 15 cases respectively. One case did not show T2 hyperintensity or contrast enhancement. However, the lesion was detected in DWI. DWI MRA was able to diagnose 94.4% of the cases. T2 weighted imaging detected 16 cases with form 88%. Contrast images detected 15 cases that form 83.3% cases. A combination of T2 weighted and DWI detected lesion in 16 cases. A combination of T2 weighted and contrast enhancement detected lesion in 15 cases. MRA staging correlated with clinical staging in only 22% of new cases. There was an upstaging in MRA for approximately half of the cases that is 55.5% and downstaging for 22.2% of cases. In our study, considering the 32 post-statement cases, clinically mass was suspected in 24 patients, that is 75% of cases. In 8 cases, there was no clinical suspicion of, but MRA showed the presence of mass in 18 patients out of 24 clinically suspected mass patients. In 8 patients, mass was not suspected clinically, 25% which found 25% of cases. But MRA showed the presence of mass in 2 cases among these 8 cases. The accuracy, sensitivity, specificity, positive and negative predictive values of MRA in recurrent cases were 75, 90, 50, 75, 75% respectively. Squamousal carcinoma was the most common historical type in post-statement cases also, that is in 30%. I don't know if you have seen in 2%. In our study, altogether 20 patients showed lesion on MRA, the number of patients showing lesion on T2, weighted imaging, diffusion weighted imaging and contrast studies were 19, 20, 17 respectively. 3 patients showed T2 hyperneticism and diffusion restriction in the survey. However, in the contrast study, there were no enhancement of tumors in these 3 cases. In one case, imaging was done 2 months after radiotherapy to assess the residual tumor, which was clinically suspected. MRA of the patient showed no obvious lesion on T2, whereas diffusion restriction was noted with earlier RTL phase enhancement in dynamic contrast study. The diagnosis of residual tumor was made for the patient. In our study, the primary group of lymph nodes, that is, parametral obturator, external and internal lymph nodes were involved in 4 patients among the newly diagnosed. A secondary group of lymph nodes was involved in 2 patients. One patient showed involvement of both primary and secondary group of lymph nodes. In the post-statement cases, the primary group of lymph nodes was involved in 6 patients and secondary group was involved in 2 patients. One of the important prognostic indicators is uterine body involvement in patients with CSRX. Of the total 50 cases, uterine body involvement was noted in 21 patients, which found 42% of the studies. More number of cases, 52.3% with stage 4, this was found to have uterine body involvement in our study. 4 cases with stage 3C, 5 cases with stage 2B and only one case with stage 1B showed involvement of lower uterine body. In our study, among the 21 cases with uterine body involvement, 6 showed primary lymph node metastasis and 2 patients showed secondary lymph node metastasis. The mean diameter of the mean size of tumour is another important prognostic pattern. The mean size of the tumour in patients with stage 1B, 2A, 2B was 2.02 cm, 1.6 cm and 4.4 cm respectively. The mean size of the tumour in patients with stage 3C, 4A and 4B was 5.85 cm and 4.5 cm respectively. There was nodal involvement in the mean size of the tumour and it was not seen in cases where mean size of the tumour was 3.4 cm or less. From our study, it was evident that post-radiation complications were more common to develop after 3 years of fetal therapy. The most common post-rarity changes were fatty replacement of bone marrow seen in 7 cases out of 32 RT cases that formed 21.8% of the patients followed by proctitis and cystitis. In new cases, a combination of T2 waiting and DWI detected a lesion in CT cases, a combination of T2 waiting and contrast enhancement detected a lesion in 15 cases. In record cases, a combination of T2 waited imaging, DWI diagnosed 19 cases and a combination of T2 imaging and contrast studies diagnosed 16 cases. For all the newly diagnosed cases, staged with FIGOS system using clinical examination and MRI, the correlation was best for stage 2B disease and a higher staging was given with MRI to clinical stage 1, 2 and 3. Now, critical sensitivity, specificity and positive and negative predictive values of MRI in new cases in our study were 83, 88 and 0%, 93 and 0% respectively. Now, accuracy, sensitivity, specificity, positive and negative predictive value in MRI in recurrent cases in our study were 75%, 90%, 50%, 75% and 75% respectively. Coming to discussion, two categories of patients were considered for study 80 newly diagnosed and 32 treated cases. The most common presenting symptoms was wide discharge seen in 28% followed by low round open. Among the newly diagnosed, majority of them belong to age more than 60 years and between 41 to 50 years but among the recurrent cases, the common age group is 41 to 80 and 50 to 100. These patients must have been diagnosed with disease at an early stage. It is seen that when the life expectancy is more, possibility of recurrence of tumor is also more. The most common histopathic type was SCC, both in newly diagnosed and recurrent cases in our study. It is common cell forming the most majority of the thing correlating with the study done by MITM, LDSE, Nordin et al. 12131 cases of CSRX. In our study, majority of the patients belong to postmanopausal age group. Thus, the disease is more prevalent among postmanopausal men. In our study, totally there were 18 biopsy prone cases. Clinically, most were suspected in 16 cases and not suspected in two cases. However, MRI showed the presence of mass in 17 cases including those cases where there was no suspicion of mass clinically. MRI was not able to diagnose lesion in one case which is there was clinical suspicion. In a study done by Nicolet V, carignanial burden fee of et al shows that stage 1A disease can be staged only at histopathal scale analysis as tumor are not visible at MRI. It was also noted that accurate staging was lacking in cases who underwent histotomy for early stage disease and for benign regions. These patients would be benefited with MRI. Acuracy sensitivity, positive predictive value of MRI in newly diagnosed cases are 83, 88, 93% respectively. The MRI without contrast is reliable in assessing the parametrium and polyxadol invasion. T2 weighting images and diffusion weighted images give good information. Contrast material, contrast analysis T1 imaging has not proved to be more accurate than T2 weighted images in this setting. This is in agreement with the study done by Havigore H et al and Schlider J et al. MRI scores better in delineating the invasion of adjacent organs. In our study three cases were diagnosed as stage 3 clinically and were found to be stage 4A with MRI. Three cases who were staged as 2 were actually found to have bladder invasion. The MRI evolution prevented unnecessary surgical intervention in these patients. Invention of bladder can be ruled out with sufficient confidence with MRI. This was in accordance with study done by Kim et al. For all newly diagnosed cases staged with the FICO system using clinical examination of MRI, correlation was best for stage 2B and higher staging was given with MRI to clinical stage 3. MRI staging correlated with clinical staging in 22%. Upstaging was done in 55% and advanced staging in 22%. This was due to the reason that all these stage 3 disease patients diagnosed clinically had minimal bladder or rectal or invasion, which was missed in clinical cases were misclassified. So MRI is advocated in all advanced cases for proper staging in prognostication. From our study it is evident that there is no definite role for contrast study in all the cases which were newly evaluated. There is no added advantage of contrast over plain study. Among 18 newly diagnosed cases T2W, T2 weighting images, diffusion weighting images, contrast analysis shows lesion 16, 17, 15 cases respectively. DWMRA alone was able to diagnose in 94% cases. T2 weighting in 88% and contrast analysis in 83%. New cases, a combination of T2 weighting images and diffusion weighted images detected lesion in 16 cases. A combination of T2 weighted images and contrast analysis detected in 15 cases. This combination of T2 and DWMRA is better than T2 and contrast study. This was in accordance with study done by Havigost et al. and Shidler et al. who found that there is no added value of contrast in these cases. In our study primary group of lymph nodes was involved in four patients among the newly diagnosed. Secondary was involved in two patients. One patient showed involvement of both primary and secondary group lymph nodes. This is lower than reported by Drescher et al. in this study. From our study involving post-treatment cases, it is clearly evident that there is no added value of routine contrast imaging for all post-treater therapy cases. It has an added value on cases of discrepancies between findings in T2 weighted imaging and diffusion weighted imaging where it serves as a problem solving tool. In our study, although 20 patients showed lesions on MRI, patients showing lesions on T2 images DOEW and contrast studies are 19-20-17 respectively. Diffusion restriction was able to diagnose recurrent lesions. In recurrent cases, combination of T2 weighted imaging and DW is able to diagnose 19 cases. Three patients who showed T2 hyperintensity and diffusion restriction didn't show enhancement of the tumor in cervix. A combination of T2 weighted imaging in contrast study was able to diagnose only 16 cases. Kinkal et al. in his work found that in the first five months after radiotherapy inflammatory chance may be responsible for early enhancement that may mimic recurrence. Thus, there is no added value of routine contrast imaging for all post-treater therapy cases. In our study, MRI helped to exclude the patients with no recurrence of tumor or no residual mass in post-treatment phase so that over treatment of these cases with radiotherapy could be avoided. It also added in the diagnosis of recurrence in two cases which were clinically undiagnosed so that appropriate treatment could be instituted in these cases. One of the patients had pure parameter nodal recurrence with no pelvic mass and MRI helped in diagnosis and staging it as 3C. Procuracy sensitivity, specificity, positive and negative predictive value came around 75-90, 75-75 respectively. In the post-treatment cases, primary group of nodes was involved in six patients, secondary group in two patients. The most important diagnostic indicators are size of the tumor, written body involvement and nodal metastases. More number of cases which stage 4 of the tumor in patients were found to have written body involvement in our study. Thus written body involvement could be directly correlated to the advantage of the disease. Means size of tumor is another important diagnostic pattern as this could be correlated with the stage of disease and nodal involvement. It is also noted that there is nodal involvement if the main size of the tumor crosses 4.4 cm. In our study, hydrometer was current in 20%, among these 10 were newly diagnosed, 10 were post-treatment cases. Among the 10 post-treatment cases, hydrometer was due to cervical stenosis. From our study, it is evident that post-treatment complications are more common to develop after 2-3 years of radiotherapy which also corresponds with the average time of recurrence. Since most of the patients are referred during this time to look for recurrence of tumor, more complications are also diagnosed during this time. The most common post-treatment changes are vital replacement of bone marrow followed by prokaryotes and cystitis. This is the image representation. It is a 55-year-old female, mass is suffix involving lower myometrium hydrometer withening of myometrium metastatic internal iliac lymph nodes and obliteration of fat plane and rectum and bladder infiltration. Stage 3 This is another case. In the non-case of CSRX, post-treatment ill-defined, soft-tastic, solid-cystic mass lesion involving vault, encasing right-terminal lurid, causing proximal hydronephrosis recurrent lesion. Coming to conclusion, MRI is better at demilitating the information of adjacent organs. MRI can replace histoscopy and zygmodoscopy in identifying bladder and rectal imaging. A combination of T2-weighted imaging and diffusion-weighted imaging would be the optimal technique for imaging both new and post-treatment cases. T2 and diffusion-weighted images were the best sequences not only in identifying recurrence but also excluding false positive in already treated patients. The counter-study provides no additional information from our study. The most important prognostic indicator was uterine body involvement in patients with CSRX. Uterine body involvement could be directly correlated with the advanced stage of the disease. These are the references for the study. Thank you.


Hi everyone. We'll give folks just a couple of minutes to arrive to the webinar. So hang tight. Hi everybody. Welcome to the New Mexico Smart Grid Center webinar series. My name is Ann Jekyll. I'm the Associate Director of New Mexico EPSCORE. And today I'm pleased to bring you a New Mexico Smart Grid Center student research spotlight where graduate students from our project will be presenting on our various research goals. Just as a reminder, all of our webinars are recorded and archived on our website. So you'll be able to access this afterwards if you want to revisit any of the information. And you can use the question and answer box in your Zoom interface to type in your questions. We will have a Q&A session at the end of all of the presentations after they're all completed. And so if you have any questions at any time though, you can type them in there and we will address them later. Our next webinar will be on April 22nd also at noon to 1pm. And Kevin Tomsovic who's the Director of Current which is the Center for Ultra Wide Area Resilient Electric Energy Transmission Networks will be presenting. This is a complimentary center to the New Mexico Smart Grid Center where they do research on some similar questions. And in his presentation he'll be emphasizing the need for developing new test beds to better understand grid modernization. So we hope you can make that too and you can access the link and download a calendar feature on our website. Before we started in start in today, I wanted to just give a little overview if there's new students or those of you who are who are coming to our project maybe for the first time, just the general context. So the New Mexico Smart Grid Center is a five year project funded in 2018 through the National Science Foundation EPSCOR program that establishes an interdisciplinary research center to address the design operational data and security challenges of next generation electric power management. So the approach of this project is to look at how we can transform existing electricity distribution feeders and turn them into a set of interconnected distribution feeder microgrids. I know some of you have a background in power systems and some of you don't. So I'll just take a second to define these two terms. The distribution system is the final stage of the electricity delivery system where electricity is stepped down in voltage from the transmission system and delivered to residential, industrial and commercial users. And a microgrid is also a discrete entity in that it's a group of interconnected loads and distributed energy resources that acts as a single controllable entity with respect to the electricity grid. So that is it can connect and disconnect from the grid and operate independently. So we're looking at taking existing distribution feeders and overlaying microgrid. We are organized into four research teams and research goals. The first is the architecture group RG1 and they're looking at optimizing this distribution feeder microgrid or DFM design, incorporating human preferences. The second group is networking and they're looking at creating new DFM networking and communication systems that are scalable secure and protect user privacy. The third group is integrating machine learning data mining and knowledge based techniques to make computer aided and data driven decisions in the smart grid and RG4 the deployment group is validating the proposed models and technologies and simulations as best beds in New Mexico and represented scenarios in the nation. And this is all encompassed by our cyber infrastructure which we have high performance computing resources and NMSU that are available to all project team members and also data archive and sharing resources if you're interested in those I encourage you to check out our last webinar the archive where there's more information provided on how you can access the high performance computing and data management resources. So this is just to say, we have a wide ranging project, it encompasses the three main research universities Santa Fe Community College Explorer we have many faculty and students for part of this, and you will hear from five different graduate students today. So, first, I am going to introduce G1 Choi. She is a PhD student at UNM and the mechanical engineering department and currently advised by Dr. Ali Bidram. Her research interests are in power systems, especially the smart microgrid area and she'll be presenting on areas of research related to research goal one architecture. Hi everyone. My name is G1. I'm a PhD student at UNM. And today I'm going to present about the secondary frequency restoration of islanded microgrids using a decentralized event triggered and finite time control strategies. Next slide please. Okay, so first, I'm going to introduce the concepts of the proposed control strategy. And then I'll go through the preliminaries of the current research and how the newly proposed technique is developed from the preliminary work. And then I'll present the case studies of the proposed technique simulated using the four DG microgrid system model. Next slide please. In these days, microgrids are becoming the substantial components of the modern power grid systems. And as a result, there are a lot of ongoing researches on how to control those microgrids. And the hierarchical microgrid control system is one of them. And it consists of the two major control layers, once the primary and the secondary. And one of the roles of the primary control is to stabilize the system frequency and voltage when islanded. And the other role is to share the power to the distributed energy resources or distributed generators of a microgrid based on their power ratings. So that the more loads can be assigned on the DG with the higher generation capacity. However, the primary control makes the microgrid frequency and voltage deviate from the nominal value. Next slide please. And this graph here shows how the DG frequency is determined as a consequence of the active power sharing. So this slope MP comes from the active power ratings of a DG. So corresponding to the amount of active power P assigned to the DG, the frequency of that DG omega is determined. So in order to place this omega at the nominal value, the only thing we can do is to adjust the omega star. Because P is fixed from the power sharing. So finding the proper omega star is the duty of the secondary control. And the similar process applies for the voltage restoration and reactive power sharing, but I'm going to only cover the frequency restoration and active power sharing. And note from the second bullet item that keeping MP times P equal in every DG is the goal of the power sharing. Next. Then the decentralized control is applied to bring higher reliability and flexibility to the system. And next. So there are various decentralized secondary control techniques out in the literature. I won't have enough time to go through the details, but notice that omega star dot is determined from the frequency measurements and the active power sharing. So the conventional secondary control is advanced by applying auxiliary control techniques, for instance, the addition of the finite time control provides the shorter settling time, or the shorter restoration time than the conventional control. And the event triggered control reduces the communication burden by only triggering the communication between the distributed generators, only if some condition is met. So finally, the goal of this study is to combine and apply those two existing techniques to the conventional secondary control in order to achieve both faster restoration time and the lower communication burden. And I'll refer to them as the event finite time control. Next. So to test the proposed control technique, the four DG micrograde system is implemented in simulink. So there are four DGs and there are two laws defined in the system. And it inside each DG the primary control is implemented. Next. In the first case study, we assume a fixed communication. So here each dotted line indicates the mutual communication between the two DGs. So each DG transfers this frequency and active power measurements to its neighbors through the communication link. And specifically for this communication graph, DG one is said to be the only DG that has the access to the nominal frequency value. So the rest of the DGs will be able to reach to that nominal value indirectly through DG one. Next. So the first and second grad show the frequencies and active power ratios, which is MP times P of the DGs of the microgrid. So first, let's look at the first graph. And at zero second, the microgrid is islanded from the main grid. So the frequency becomes unstable. But soon we can see that the frequency becomes stable around 1.5 seconds. So we know that the primary control is working. But the frequency is not at the nominal frequency, which should be 60 Hertz. Then the secondary control is applied at two seconds and the frequencies of the DGs are restored at 60 Hertz around 2.7 seconds. And also in the second graph, we can see that the active power ratios of all DGs are equal. So we can verify that the active power is properly distributed to the DGs. Next. And in the second case study, we test the response of the proposed control to the load variation. And the same communication graph is used from the case one. And likewise, the microgrid is islanded at zero second and the DG frequencies are restored after the secondary control is applied at two seconds. And at three and four seconds, the active power of load one and two changes and the system frequencies become unstable when the load changes. But shortly they are restored to the nominal frequency after by the secondary control. And we can also see that the active power ratios are kept equal after the load changes. And next. The third case study, we assume the time varying communication graph. So the graph changes from the left to the right every 0.05 seconds. And in this case, DG one is the only DG that receives the nominal value. So the second and the third graphs represent the instant, but repeating failure of the nominal value acquisition in the system, because DG one is not communicating with any DGs in those two graphs. Next. So, under the time varying communication graph, the proposed secondary control is able to restore the DG frequencies at the nominal value while successfully distributing the active powers to the DGs. Next. And lastly, the proposed control is compared with the existing secondary control methods in order to show its strong points. So these comparisons are made under the condition given in the case one, which is the fixed communication. The first event finite time control is compared with the event triggered only control. So the times taken until the frequency restoration in each case are found as shown in the slide and the new method provides almost three times faster response than the existing method. Next. And the event finite time method is compared with the finite time only control and the average average communication time intervals in each case between two to 2.7 seconds, that is the transient duration of the secondary control are found as shown in the slide. And using the new method, the communication burden has reduced nearly three times compared to the existing method. And let me conclude the presentation here. So in this presentation, a decentralized event triggered and finite time secondary frequency restoration is proposed, and it has been proved to be able to restore the frequency while successfully sharing the active powers among DGs. In addition, it has been proved to have faster restoration speed as well as the lower communication burden than the event only or the finite time only controls. Thank you. Thank you. Thank you, G1. A reminder to everyone on the webinar if you have questions for G1 and we'll hold them till the end, but you can use the Q&A box to type in your questions. Our next presenter will be Jacob Marks, who is a computer science master's student at New Mexico Tech, working with Dr. Dong Wan Shin. He's studying how differential privacy can be applied to the smart grid and he'll be presenting for research goal two, which is networking. Hello. I'm going to be talking about differential privacy in the smart grid.  So first I'll talk about what are some of the privacy issues that we face with smart meters? What are some of the main privacy-preserving solutions that we have? What is differential privacy? And finally, how can it actually be used in the smart grid? So what are the privacy concerns? So with the kind of fine-grained data that we can get from smart meters over older types of electrical meters, there's a lot of concern about what kind of information people could get out of households with those meters. So studies have shown that it's possible to identify the household occupancy of people with a smart meter, their economic status, and even their appliance usage. So some studies have been able to compare different electrical loads of appliances and identify which ones are being used at what time of day in a household with a smart meter. Or even more amazing to me, in this one paper, multimedia content identifications through smart meter power usage profiles, they were able to identify what somebody was watching on their television using just a small amount of data, using only five-minute chunks of viewing was enough to identify a movie. Now, with this study, they were only able to identify it using smart meter data that was collected every .5 seconds. It wasn't real smart meter data, it was a simulation. And so that's not something that could be done yet, but I think it illustrates the large privacy concerns that people have with smart meters. So how can we solve those privacy problems? So the two primary types of privacy preservation techniques that people are considering using for the smart grid. One of them is cryptographic privacy that people are probably more familiar with. And another is statistical privacy, differential privacy as a type of statistical privacy. And these are two different, very different ideas. So with cryptographic privacy, that's the concept that if I want to send something to a friend of mine, both of us are allowed to see it, but we don't want an adversary, some interceptor to read our data. So it would ruin our privacy if somebody was able to intercept the data. But with statistical privacy, a legitimate receiver is the same as an adversary. So to keep ourselves private, even from a trusted data analyst, we still want our privacy preserved, which seems like a very difficult goal and it can be difficult, but differential privacy seems like a pretty good solution to that. So differential privacy has a very specific goal and a definition of privacy that I think is different from the way a lot of us think about it. The definition of differential privacy is that we want it to be very unlikely that an attacker can identify if we're in a data set. We want to have plausible deniability. So if I'm in a data set or if I'm not, it should be extremely unlikely that an attacker could detect that. Now, what this plausible deniability gives us is the chance that an attacker may suspect that somebody was in a data set, but it's extremely unlikely that their results are actually true so they can't use it to damage somebody's privacy. Now that's different from the actual definition, it's more the goal. So the actual definition is on my next slide. So the definition is a little confusing. In order to preserve differential privacy, we need some form of mechanism that will modify our data set. So that mechanism could be adding random noise, or it could be a random selection of data. So privacy only works with an aggregate of the data. So if we have an individual's data set, we can't protect their privacy individually, but if we have some kind of aggregate of a number of people's smart meter data, we can protect their privacy. So in the definition, we need the probability that the mechanism applied to one data set D one being an element of set as the probability is less than or equal to e to the power of epsilon times the probability of the mechanism applied to the data set to being an element of set. So the important part there is the epsilon value. So epsilon is the privacy parameter for differential privacy. And in the paper, I have a dream, differentially private smart metering. I found there was a really good definition that I think helped is that the modification of any single user's data in the data set changes the probability of any output only up to a multiplicative factor e to the epsilon. So our privacy parameter epsilon is defining how much privacy we have and an extremely low value of epsilon will guarantee higher privacy, while a high value of epsilon will guarantee low privacy. Now, why would we want to have less privacy? Well, the problem is that differential privacy is usually using some form of noise. And if we have perfect privacy and epsilon value is zero, then the data will be unusable, because it'll be essentially random noise, we won't be able to get any useful information out of it. So most differential privacy solutions use random noise added to the data set. So most differential privacy solutions for the smart grid use the Laplacian mechanism. So the Laplacian mechanism was, I believe, introduced by Cynthia DeWerck, one of the people primarily responsible for differential privacy, and it pulls noise from a Laplacian distribution in order to try and add noise to the data. So the noise is added to the data set based on what the epsilon value is. So a lower epsilon value will mean more noise added. And it's also tuned depending on what the data set is, what your values are supposed to be. Another important consideration when choosing differential privacy solutions for the smart grid is finding ways to choose a good epsilon value. And there's a lot of research that's been done on ways to add noise, ways to confirm differential privacy, but there is not a tremendous amount of research done on what epsilon values are usable in the real world. And I'm hoping to see more research on. Now, one problem with differential privacy is that you cannot guarantee people's privacy if the individual's data is compromised. So in this image from the, I have a dream paper, it shows an individual's electrical data over the day. And in the second image it shows with random noise added. And only some noise has been added, and it's quite obvious, some of the peaks are exactly the same in both of these images. I don't remember exactly how much noise was added in this example. But you can see that an attacker could still get useful information from this and somebody's privacy may be compromised. So a number of differential private privacy solutions for the smart grid propose combining it with cryptographic privacy in order to ensure that an individual's data isn't compromised. Because if we add noise to this it's still not differentially private until we aggregate it with other people's data. And once we have the secure aggregate, we're able to confirm differential privacy, and customers can be assured that their data is safe. So the problems that are still rather open and researchers being done on them, but it's unclear exactly which solutions are good is what kind of accuracy will actually be enough. How much privacy can we really confirm for people while still having useful data for researchers and utilities companies. Also who will be trusted with the original data. Many different solutions use different privacy models. Some will have a trusted utility company, while others trust nobody and try and aggregate the data outside of any human interaction. Other concerns are the speed with which this can be done. Can we add this noise or confirm cryptographic privacy at a fast enough rate to accommodate the high fine grain data of future smart meters. Also the privacy and accuracy or concerns. So part of my work with Dr. Shin has been trying to look at the modern solutions using differential privacy and try and find out which ones are actually good enough to use. So, in conclusion, there's a lot of privacy concerns associated with smart meters. But there are also a lot of privacy solutions cryptographic ones statistical solutions does is differential privacy is especially promising. However, it's a relatively new solution and it needs more data on which differential privacy solutions will actually work best. So, my best references were the I have a dream differentially private smart metering paper that paper presents a very good solution that takes into consideration some of the problems with differential privacy, and also some of the cryptographic solutions. And since you did the works work on differential privacy is really the foundation of it and provides most of the information I've gotten on how differential privacy functions and how it can be used. Thank you, Jacob. Great presentation. So our next presentation will be for research group three, which is decision support and Adnan Bashir who's a PhD student in computer science at the University of New Mexico, working with Dr. Trilsay Estrada will be presenting on database that he has helped develop. His primary research areas include applied machine learning and he will be grabbing control of the screen I think at some point to also do a demonstration so go ahead Adnan. Thanks and for the introduction. Hello everyone. I'm going to be presenting my research work, which primarily consists of two different projects one is a smart good data generation and the other one is how we can host the data and make it accessible for our group. And also for our for public, you know, under that score project. So, first of all, we have to, why do we need to synthesize market data, there are many, many reasons and one of them is still like an immature field right now and still under development. So we don't get to see a lot of data that we can use for decisions support in our project. And also like the people who collect this data they don't really share it you know with public and the data which is accessible by public doesn't have like a lot of parameters which we need. So that's why we need to look for a framework or like, or a software which can synthesize smart with data that that is very realistic and can help us in training our neural networks using it in machine learning. And also they are like a lot of very good mathematical models up there, which we can use to generate synthetic smart data. So here are like some options which we can use. First one is GANs is Generative Adversarial Networks. It's basically a neural net and the problem with GANs is that we still need our real data to generate some new data. So, first of all, we should have a lot of like real data, then we can generate some new ones. So currently we don't have enough data so I'll skip on that. And the next one is Mozak. Mozak is basically a framework that can add different simulators and each different simulator can be like a generator or like a bus or like a hub or like a branch in smart grid and we can analyze the power flow through it and we can then collect the readings at the end. And the third one is MAT power. This is primarily I'm working on right now. It is basically a MATLAB language based framework. And I will show you what kind of configuration parameters we can use and how we can use it to generate like a lot of data and then use it in our project. What fun is PI power? PI power is a part-time base solver similar to my MAT power, but and it's also been used with the Mozak framework as well. So now I'll explain what I'm doing with MAT power. MAT power was first officially launched in 2010 and a lot of people have been using it and you can basically run it on MATLAB. But the problem with MAT power is that it gives you the configurations or the simulations but when you have to create a big chunk of data and run simulations over a longer period of time, then you have to use some kind of scheduling software. And the MAT power comes with a software called Mozt which is MAT power scheduling software. And right now I'm in the process of figuring out how we can add these two and use MAT power to generate data and then see whether it's realistic enough or we can use it for our decision support or not. So here's a summary of configurations for MAT power. These are, as you can see on the left column, we can select how many buses are there, how many generators you want and how many branches are there, do you want any loss in the transmission lines and what is the total capacity. And also, we can select different voltage levels, active power, reactive power. Besides that there are like a lot of many other functions and a lot of other parameters which we can tweak to make our smart grid more realistic. And besides that the results are like saving a CSV file or MATLAB data structure so we can also like import data from there. So right now I'm working on scheduling part in MAT power. So as soon as I get some data I will share it with the group and that should with the MAT power. And now I will give a demo about the data repository which we have created for AppScore project. So now I'm going to switch over to my screen. So this is the main page. I'm currently hosting it locally and at some point we will be given a machine with more RAM and with an actual physical machine or maybe a high power PM on which this will be installed. And for just for the demo I have hosted two data sets. One of them is provided by Olga. I think she is at the meeting with us right now as well. This is a fault fed data set from NMSU. And also there's another one which is from Dr. Martin Ramon from ECIP1M and so currently I have hosted these two just to give an idea. So the main thing which we require from this data repository is the search field. So for searching as you can see if I type ECE both of these sets are related to ECE so these two are coming up. And also if I type let's say unnamed fault it's only one data set shows up. So this is based on CCAN which is pretty good in searching. And if we want to add a new one we can also we can add a data from like a local machine or also a URL. And then we can have some descriptions. We can add as many tags as we want. We can choose the license from here. And we can have choose the odds per emails and everything which is pretty common. And then we have three custom fields. We can also increase the number of these custom fields. These can be anything if someone wants to add the tag which is not already there. They can write the key and then enter the value for that. And this can also be accessed publicly if I just have to log out and then if I go back to the website again. I can see two data sets again because these two are available publicly. So that was also our goal to share the data with the public. And I've also added a publication. This is just a text publication. We can also add like a sample data. This is a sample image of the image data set which is included in this data set. And we also have like a sample CSV file. We have hundreds and thousands of CSV files. So just if she can put one other sample and people can view it in the form of a graph as well like this. So this also gives a nice idea before downloading that what the data set exactly looks like. So that's it for the data repository thing. And once we divide this on an actual VM, I will be sharing the tutorial with everybody in the group and with instructions how they can download. And share their and upload their own data sets to this website. Thanks. That's it. Thank you, Adnan. Okay, our final presentation will be by Shuba Patti, who is a PhD student and electrical and computer engineering at New Mexico State University. And she's working with doctors Satish Rana day and Olga Lover, she's currently working on the resiliency considerations of the electricity good grid in the event of natural disasters. And she'll also be joined by Rusty Nail, who's pursuing a master's degree at an MSU in the same research group. A reminder to all if you have any questions for these presenters or any other ones, please use the Q&A box as part of your zoom interface and go ahead Shuba. Thank you. So this is Shuba and with me there is Rusty and together we are going to talk about some of the research that we do at an MSU on power system resiliency. So what happens to the grid in case of a natural disasters like a cyclone tornado or hurricane or in case of a cyber physical threat. The part of the grid might get damaged, some of the lines may get disconnected, some of the generators might fail, or some of the equipment might get damaged, which ultimately leads to the shutdown of the power system. For example, in 2012, in case of the hurricane Sandy, there was a loss of $50 billion. So there the term resiliency comes to our mind. So what is the resiliency? The resiliency is the ability of the power system to recover either completely or partially from the adversity is defined as the resiliency. So now the resiliency is depend on the adaptability of the grid to unexpected failures. Here the term adaptability is similar to that used in biology, which is the ability of an organism to respond and survive in case of an environmental distress. Similar phenomenon is expected to happen in case of power system resiliency. So now what's the basic difference between the reliability and resiliency. So the goal of the resiliency is to maintain the continuity of the service. How do we maintain the continuity of the service? We make the infrastructure more redundant in order to make the system reliability. Whereas in case of the resiliency, the goal is to quickly recover either completely or partially through active management of the grid. So the difference between the reliability and resiliency is the objective in reliability is to minimize the cost. Whereas in resiliency, the objective is to maximize the throughput. So in order to do the resiliency study, we have taken IEEE 24 bus reliability system. In this picture, we have taken two cases and we have taken two critical loads at bus 19 and bus 20. So in order to do the resiliency study, we need to define the objective function. So here the objective function is to maximize the throughput or minimize the mismatch between the generation and the total demand. Here, in addition to that, we have also taken the constraint on generation as well as on the line capacity. In addition to that, we have also taken the constraint on supplying the power to the critical load at all point of time without any disruption. So in case one, so we have taken out, as you can see in the picture I'm seeing on the red arrow. So once we took out those part of the line from bus 23 to bus 12, from bus 13 to bus 11, from bus 13 to 12. So when we took out those part of the line and then when we solve the optimization function, you see that there are some of the line that are in red that gets overloaded. And the line which are in green that gets under loaded here overloaded means the load in the line is increased by 30%. Similarly, we have taken another case case to when we disconnect the line that are shown in the case to from 15 to 21 from 15 to 16 from 15 to 24 from 15 to 21. And then when we solve the optimization function, you can see in this picture the lines that are in red that get overloaded and the line that are in green that gets under loaded. So the study of the multiple resiliency test cases on a simulated model of a power system can differ about the changes required to improve the resiliency of the grid. Like in our case, as you can see we identify the lines for which the capacity needs to be increased. Over to Rusty. Hi everybody my name is Rusty. I'm extending what we're talking about with resiliency I'm working on a current project right now in Cordova, Alaska, we coordinate with several national research labs as well as some other universities. In the image on the right that's a picture of the town of Cordova. It was fascinating about this place is it's kind of a natural micro grid. We're currently in the process of transforming it into a smarter smart grid. This is a natural micro grid because it's naturally enclosed in its geological location, self sustaining and they provide their own distribution network and so this provides a really awesome test bed for our university our group as well as these other national labs to take a look at, you know how we can mitigate some other contingency issues when it comes to now potential national natural disasters, cybersecurity threats, especially as we get more of those sensing and monitoring systems. And that's kind of been a really cool new frontier and that's the work that I'll be talking about here in a second. So as you can see in the last slide. I'm trying to use these kind of illustrate to you that you know these are we can we can envision a lot of these natural disasters that have happened in the past, and while they aren't very current. They do happen. And so some of these you can, you can see it's pertinent to know a relative. It's important to know where the rivers what what potential things could happen like tsunamis the avalanches. As well as mudslides and things of that nature so only when we're considering these different contingencies it's important to note not only the type of generation but also the location of said generation because that's depending on the potential type of natural disaster that all affected each of them differently a hydro plant located closer to these water resources will probably be affected differently in the case of a tsunami, or some type of mudslide coming down than a diesel generator located elsewhere. So those are the types of things that we have to consider, in addition to those growing concerns of cybersecurity threats. So my current job is taking that distribution system that we have that is in Cordova image shown to you on the left side is the one line diagram, and that's a distribution network. In the top portion you can see there's orchid substation. That's one of the diesel generation locations, and then the other two humpback creek substation and Power Creek on the right, those are the hydro substations. These are the different areas where we might be able to need to plan for contingencies, as well as if you look at the other components within the system, those are each switch gears in which case. These are where potential contingencies or issues, grid down failures and areas may occur. On the right, I've translated that one line diagram to a MATLAB Simulink system visual visualization that you can take a look at. This is the actual thing that I've made in Simulink. We simulate this on a target hardware that is known as Opal RT. It's a real-time simulator that allows us to do real-time simulations with higher computational power, stronger than that of just what you regularly run on Simulink just on your own computer. So here I'd like to illustrate the potential scenario where we're looking at some type of natural disaster that comes in, and for simplicity's sake, I'm going to say, okay, we're going to take out this particular type of switch gear. In this simulation, I'm simulating this switch gear as a bus 530 as a compilation of breakers. In this scenario, we're going to say that one of those breakers goes down or is open. As you can see, they're externally controlled. And this is something we can use to maybe plan for these types of contingencies. It can be timed. And that's a great thing about using the Simulink and Opal RT platform. In the case of this occurring, I would then go within to the simulation, either to one of the substations. There will also be other measurement devices and whatnot. We're still building part of this model. That would then, if you look in the top right of the slide, you can see that's the generator set up. That's the simulation that I have for it. We would then open up that scope and then I can see some of the implications of that particular incident. Putting in some other control mechanisms, this goes towards the actual planning side of the resiliency and collaborating this with some of the other, or collaborating this with some of the other simulations we have with the other groups, we can then develop a better holistic contingency plan. So again, in closing for my portion of this, I wanted to point out again, it's an evolving process. We're going towards the evolutionary point of this. That's something that I've not had pointed out. We're looking towards adaptability. We have to consider some of these larger issues. And the big things with resiliency is how can we maintain those critical loads before, during, and after these big issues. And it's, it's, that's the difference between it being reliable and resilient. It's, you know, how quickly can we recover and adapt to these scenarios. Back to you. Thank you, Rusty. So previously, as I have shown in the two cases, we have taken the load is constant load, but in future, we are also exploring like working on the considering statistical distribution of the load. And also we are going to address the time sensitive Lord, for example, suppose in case of a hurricane and there is a train in there in metro in midway. So our first priority would be to bring the metro or the train to the station. And then once the train is stationed, and then we can like divert the power to somewhere else. So it's like, how, how to like manage the load based on the time, time, like, which is more important. And first we need to assign the load over there, the power line over there and then to the next critical load. Also, it's like rusty top before we're also working on the switch placement. And also we are working on the battery placement like where how quickly we can place a battery in a system. So that in case of any natural disasters. We have some backup and also like, what would be the size of the battery we are exploring in those directions. Thank you everybody. Let us know if you have any questions. Thank you, Shuba. Thank you, rusty for that great presentation that really brings it together for the deployment part of our project. A remind everybody. So you can use the Q&A feature or you're welcome to use the zoom webinar chat feature to type in any questions for any of our presenters here today. And I will give you a second and let us know if you're having any problems with your, your technology to if there's a way that you can communicate with us. Right now I don't see any questions though I do see a comment from Satish which says excellent presentations with two exclamation points which I, I agree with. We do have one question. Oh, what's the question. Rusty Nail to Chi Wan and was the need for time varying communications to lower operation costs. Mark, you had mentioned that it reduces the communication burden. Okay, so the time varying communication wasn't like designed for the lower operation costs but just to represent the communication link failure. So sometimes like communication may fail between the digits. So yeah, for that case study. I just wanted to show you guys the response of the proposed control to those communication link failure. Did it answer your question. Yes, thank you so much you want appreciate it. No problem. Okay, great. Thank you. Okay, well, we'll see you next month on April 22 at noon link on our website and stay well everybody.