Let me just get my clock started here. So today, we're going to talk about WebGL, GPUs, and math.  Get rid of that. So this is my website, in case you haven't seen it. It's generally known as the website with that header. People don't actually scroll down that much, which is a shame, but that's life. But it's made in WebGL. What's really cool about this effect is that it's kind of its own progress bar, that as the effect animates, it's still doing a lot of the computation. And that's why it's so instant, is because it doesn't actually do any work before animating, or barely any. So that's a nice trick. And I was playing with this sort of concept of streaming graphics into a GPU and found that it was really fast. Because this object has something like 45,000 triangles in it. And it runs fine. This is a modern machine, but even on an older machine, this runs pretty well. So I was really happy with that and wanted to see where I could take it. Now, I've been working on mathematical visualization. And so there's a quote that I ran into that I think is really inspirational and says a lot about what I'm trying to do when it comes from a mathematician named William Thurston, who died not so long ago. So I'd like to read that. And he said, I think a lot of mathematics is really about how you understand things in your head. It's people that did mathematics. We're not just general purpose machines. We're people. We see things. We feel things. We think of things. A lot of what I've done in my mathematical career has had to do with finding new ways to build models, to see things, do computations, really get a feel for stuff. It may seem unimportant, but when I started out, people drew pictures one way. And I started drawing them a different way. There's something significant about how the representation in your head profoundly changes how you think. It's very hard to do a brain dump, very hard to do that. But I'm still gonna try to do something to give a feel for this kind of stuff. Words are one thing. We can talk about geometric structures. There are many precise mathematical words that could be used, but they don't automatically convey a feeling for it. I probably can't convey a feeling for it either, but I wanna try. And so that is pretty much what I wanna do too, is to try and convey a feeling for things that are difficult and hard to think about. So let's begin. Gonna start with pixels. It's not a strange concept.  Nevermind. Pixels. We all know pixels.  And oddly enough, in WebGL and in mathematics, in general, Y points up. It's annoying that there's different conventions, but you just have to deal with it. And pixels have been around since the early 80s and we've had lots of fun little algorithms to deal with them, like for example, the Brezenhem line drawing algorithm, which you can imagine is just a simple for loop to fill in a couple of pixels and set the right color. Fat lines, vertical lines, diagonal lines, you can do that too. But you quickly discover that it isn't just about filling in pixels, it's about doing operations with pixels, like for example, blending them in true color as they call it initially. And this isn't gonna surprise anybody, but colors are made of red, green, blue primaries, which comes from the human visual system, right? Like we have red, green, blue cones in our eyes and they're sensitive to specific wavelengths. And that's how the colors get mixed and created. Now on the inside, in those pixels are our numbers and usually those are eight bit numbers, number from zero to 255, one for the red, green, blue and transparency channel. And those create those colors. And it's not that I don't think people in this room don't know this, but it's again, it's about conveying a feeling, like a feeling of what happens when all these pixels are being animated in real time with the linear interpolation operator, which I don't have to explain because Courtney did that in her talk. And so when you're changing a value in CSS or changing a transparency in Photoshop or something, you're really directing thousands of pixels with a single slider. And I think it's important to point out that this is actually what's going on. So human color vision is additive. The confusion about primary colors stems from the difference between additive and subtractive color where some people say the primary colors are red, yellow, blue, but actually it's cyan, magenta, yellow, which happens because on paper with ink, the darker it gets, with light, the more light, the lighter it gets, so they're just opposite. That's what's going on there. So that's how human color vision works. But the RGB model that we use is SRGB, standard RGB is actually not linear. So that means that 50% gray is actually not half as bright as white. It just isn't, there's a curve there. So you have to be aware of that, especially when you're doing computations with numbers. And so all of this is part of the general practice of rasterization, drawing things on a grid of pixels, like say a triangle. And again, this is decades old stuff by now. But there's a problem. Like if you're trying to rasterize a triangle like this, it kind of skips around a little bit. And the reason is because if you work with a pixel grid, it's natural to define your coordinates as the pixels, but that means you can only move them in integer steps, which is obviously not good for smooth vector graphics. So for that, we invented something called subpixel accuracy, where the shape can be anywhere, and the goal is to figure out which pixels should be filled in and which ones shouldn't be. And that seems maybe difficult, but it's actually not that hard because we use the principle of sampling, where the color of a pixel is defined by the point exactly in the middle. If that one is inside the triangle, then the pixel is red, otherwise it's white. So that's a very simple principle, and that seems like it solves a lot of problems. And that means that there's really two worlds, right? Like on the left-hand side, you've got the vector world, where everything is mathematical. It's precise, exact. You're working with shapes and algebra and geometry. On the right-hand side, there's the raster world, the pixels that have been sampled, and that's sort of a one-way final step. Because when you're doing computer graphics, you want to work as much as possible with the idealized representation on the left so that you can ensure quality of graphics and all those things. Now, when you've turned something to samples, now it's a grid of things. So the fact that we're drawing every sample as a square pixel is in itself a choice. We call that the nearest neighbor filter. That's not that strange. But there's many alternatives. For example, you could use gradients, horizontally and vertically like this, which is called the bilinear filter. Looks a little bit better. You don't get the sharp jaggies on the pixel edges, but it still doesn't look smooth. It's still skipping around a bit. So how do we fix that? Well, the problem is that in choosing to work with samples, we've kind of ignored the entire pixel. The fact that the shape is moving to cover a pixel and then uncovering the pixel again is not taken into account. And you could do that analytically, like compute the actual coverage of the pixel by the shape. That's a lot of work. And it doesn't work very well when, say, you have a million triangles because you have to process every one of them individually. So what we do instead is we use a super sampling where you put multiple samples inside a pixel, usually in this sort of rotated grid arrangement because it has some interesting properties where basically if a horizontal or a vertical line sweeps across, it's going to trigger each of those samples individually rather than multiple at the same time, like if they were all on a row, for example. So that ensures that you get smooth stair steps. And so even just four times super sampling, you can get rid of a lot of the objectionable artifacts of rendering because you would get four levels of transparency, right? Or sorry, three levels of transparency between solid and completely invisible. But now you're doing four times as much work. It's generally not a good idea because if you're rendering four samples per pixel, why don't you just render it twice as wide and twice as high with way higher resolution? Well, because in practice we use multi-sampling where we selectively apply super sampling to certain pixels, generally the ones on the edge, to make sure that the objectionable jaggies are gone and are mostly invisible. But in the middle, where everything's solid anyway, we don't really need the super sample. On the outside, we don't really need the super sample. And so again, it seems like we've solved a lot of problems and then everything's going great. But no, it's still not good because there's something really fundamental that relates sampling to mathematics and that's the sampling theorem.  Because in this case, for example, I've got a sine wave that generates these patterns of white to black and white to black and the pixels are sampling that color and it looks pretty good, right? Like it's moving from right to left and the representation of the pixels looks like what the curve is just sampled very roughly. Unfortunately now, if I squeeze the frequency, there's a certain critical point here which is the Nyquist frequency. Where if you look at the curve, it's going right to left but if you look at the pixels, they're not moving anymore. They're just alternating in place, up and down, up and down. So you can't tell if it's going left or right anymore and what's worse is if you keep going beyond this frequency, like for example, to the exact sampling frequency, now that it goes back to DC, direct current, that's the electrical engineering heritage of this lingo, where all the pixels are the same and there's no bands, there's no more wave, it's completely wrong. But you can see why this happens, right? It's because the sampling is only looking at individual places, not at the whole. Now we go beyond that, it gets worse because now it's moving from left to right. Pleat opposite of what we're trying to achieve and then the frequency is wrong, it's just completely wrong. And so if you move back to below there's a Nyquist frequency, in theory this works pretty well but you're already starting to see this sort of left to right effect that is objectionable and going to be noticeable. So if you really want to avoid all sampling artifacts, you need to sample much lower, like for example this, a quarter of your resolution to ensure that everything's gonna look good and this is kind of why retina displays became so popular and made things look so much better is because suddenly we have twice the amount of pixels and all those effects that we get when things aren't pixel aligned kind of become irrelevant. And so the general problem of aliasing creates these moiré patterns they're called where the further in the distance here, because I'm applying this pattern on a plane, eventually it goes completely wrong. And if you want to see that up close, I can show you that, you can see that there's a line of pixels that's moving in the wrong direction, right? Like this is the complete visualization of aliasing along many different frequencies effectively. And this is already bad but if we move the camera it gets worse. Like you get these really crazy patterns, right? They're just shifting and then distracting and looks completely wrong. And to fix that you actually would need hundreds and hundreds of samples for some of these pixels because one tiny pixel now covers a massive area in the distance in this 3D world. So in practice what you do is you downsize it ahead of time, you know you make copies of quarter size, eighth size, sixteenth size, you select the right one so you only need to take one sample or maybe two samples, one from each level and blend between them. Another topic that's really important when you're sampling, especially when you're rendering 3D things is what goes in front of what. So assuming that we can make shapes look good, there's still the problem of what goes first, what goes in the front. And it might seem like all you need to do is sort your layers back to front, right? The red triangle is bigger because it's in front of the blue one. But that's not really always the case because shapes can intersect. And when shapes intersect, you can't draw them, there's no correct order to draw them in. You need something else. So for that we have a depth or Z buffer, it's called, or Z buffer. That's my Canadian giveaway. Where we record the depth with every pixel. And so when you draw something you can just check, is this closer or further away than what's already there? And so in the case of these triangles if I start rotating them in 3D, they can poke through each other on a per pixel basis and the depth is always resolved correctly. So once again, it seems like, oh we've solved all these problems. No, things still aren't quite right because this principle only works for solid things. If you have transparent objects like in this case, they look solid from the side, from one side, transparent from the other because the order in which they're being drawn isn't changing. We're expecting the Z buffer to fix this, but it can't because once a pixel is there it's considered solid. So when you're drawing transparent things you have to manually sort them or apply other techniques. And this is relevant for my kind of work is because I'm trying to do everything on a GPU I can't sort, so I have to deal with this. So let's talk a little bit more about the actual GPU, the graphics processing unit that exists in your phone and your laptops and everything. And let's talk a little bit about what's actually going on here. So Mathbox is a tool that I developed a while ago to do mathematical visualization that was GPU driven in a browser. And so it had pre-built shaders that enabled you to do certain kinds of visualizations like a polar coordinate visualization. And the emphasis was not just on rendering things but on connecting them, being able to transition between different states, different shapes, but it was all still, you had a couple of Legos to play with and that was it. What I've been working on since is a way to enhance this so anything is possible. Where I can just add a transform to completely mess this up and everything just works. Now what's going on here is this effect has two parameters. One is time. It's very simple, time is just increasing and I'm wrapping it around the graph just to show that, but time is just increasing as soon as it goes up. And that again seems quite obvious, but if time stops and nothing moves, time should go on. And this kind of playing with time is one of those things that I like to do because I think time as a dimension is a very interesting quality to play with. There's another parameter which is the intensity and so we're gonna start animating that a little bit, go all down, see it's just a grid and now we wait a little bit.  So that's fun. You got these two parameters that can just be animated and they control the whole effect. And so this is the code for that. This is the GLSL code that I'm injecting. I'm not really gonna go into much detail because it really is arbitrary. It's just a random mishmash of numbers and sine functions and some swizzles. That's the YZWX where I'm swapping channels and stuff. So it's just a random thing. But what matters is that this is 120,000 vertices that are being animated at 60 frames per second. So this one piece of GLSL code that I injected is being called 7.2 billion times per second. It's not a problem. And so what this is really is a mathematical function that takes X, Y, and Z coordinates and the time and intensity that I just said and produces a new one. And in doing so, you're distorting the entire space really where if I put a curve, for example, in here, that curve is gonna shift but it's really the entire fabric of the space that is warping continuously. So this is what you can do with mathematical functions. This explains or just hints at how, for example, the theory of general relativity talks about how space curves, how these things are modeled using bizarrely simple formulas. And that's because when you apply functions, you have the power to warp spaces and manifolds exactly like this.  But it isn't just being distorted. The points aren't just being moved by the transformation. The shading is changing too. And that should be kind of strange. I mean, it makes sense in real life but when you think about it just from a purely computer graphics point of view, that's annoying that you can't distort things without having to relight it. And why is that happening? Well, in order to light something we need something called the surface normal.  So at every point on the surface we need an arrow that points straight up and because the surface is warping those directions are continuously changing. And then the lighting model that's being applied is very simple where it's just if it points straight at the light source, it's brightest. If it points a little bit away, it's a little bit darker. If it points 90 degrees or more away from the light source it doesn't get any light because it's assumed to be in shadow. So how do we get these normals? Because again, the shape is being distorted in real time and there's a lot of stuff happening. Well, we need to see how it's constructed. And then this gets into what's called UV mapping. UV is just a convention for the coordinates like X and Y. UV is just a different X and Y. Where we have the surface that is parametrized by in two directions, U and V, that's what those grid lines represent. And that surface is being warped by the warp function that we had previously. And out comes a point, P. That's the point on the surface. So in order to calculate normals we need to look at the tangents. And then this is getting into calculus where we take a partial derivative and then people's eyes are gonna start glazing over. But the thing is, this isn't that hard. What you're doing is you're drawing an arrow between two neighboring points on the surface. That's one little grid square and then I've stretched out the arrow a little bit so you can see it better. But that's all that it's doing. It's connecting two neighboring grid points with an arrow and using that as the tangent direction. That's the epsilon and the formula is the step. And in calculus, people like to take infinitely small steps, but in practice just finitely small ones are just fine, mostly. Because we only have 255 color levels anyway. Why would you need more?  We can do the same thing in the other direction with V and that gives you this sort of metric of what's going on at every point. And using these two vectors, which are just arrows and then they're just a direction in space with a certain length, we can apply operations like the cross product. And the colors are very nice and there's a structure there that I won't go into too much. But it's a way of crossing two arrows to get a third one that's always perpendicular. And so that's where those normals come from. Always a 90 degree angle of the U and the V vector. And those are being used to light surface. So when the surface first appeared on the screen, this was already happening. This is what it's doing on the inside in order to make it look good. And now I've piled on even more visualization to visualize how it's visualizing, which is where this stuff gets really meta. In fact, so there's a new shader here where in order to calculate the normal, we need this little footprint, right? Those three arrows, which means we're actually warping points three times per vertex. On average, it comes out to about 2.5 because some of the surfaces aren't lit so they don't need normals. But in total, this piece of code, warp vertex, is now actually being called 127 million times per second, including all the extra visualization that's going on. So that's quite a lot. And we can do some more stuff here where if instead of a normal, for example, we look at the original up direction and we distort the original up as well, it's no longer gonna point up, right? It's just gonna point in a completely random direction. And those three vectors basically tell you how the space is shaped and distorted. This explains how angles change, how, you know, why the lighting changes is because the angles of the space itself are just completely going off in different directions. It's no longer straight. So this is called a Jacobian matrix. This is usually something that scares students and makes no sense to them. But I don't think this concept is that hard. You can look at it in action and sort of understand that when you apply an arbitrary transformation, your directions shift and they're no longer straight, that's the basic principle of what's going on. Little bit, just a side note about algebra. That there's a three dimensional matrix on the left. So that's just a set of three arrows. That's all that that is. On the right, there's a four dimensional matrix which is a set of four four dimensional arrows which we somehow use in computer graphics. And what's actually going on there is that we've invented a new dimension as sort of a formalism to enable us to move things around, not just in place, like not just shift the directions, but also move stuff around. It's confusing, but it really isn't that hard. You just get used to it.  It's not that bad. However, you've been had if you were impressed by my numbers because calling something 100 million times per second is not that surprising in a world of 1080p displays where that's roughly 2 million pixels on a 1080p screen at 60 frames per second. Just to fill them all in once, to touch them once, is already gonna be 124 million calls per second. So your fancy hardware accelerated desktop, if you have overlapping windows and shadows, you're looking at hundreds of millions of pixels per second being processed. And this is kind of just always going on in the background. Now, specifically, what was just happening here is this transition effect, right? That's done in the pixel shader. And so let's go actually look at the code because I've been showing you a lot of things, but this is a graph of simple functions. So this returns color and opacity as RGBA from a three vector and the opacity being passed in separately because I wanna animate those separately. There's also a mask that is being calculated from a per vertex value that was set. Those are combined with a multiplication and then out comes the color that is written to GL. So if you're familiar with GLSL, this shouldn't be that surprising. If you don't and you're not that familiar with the C type languages, this might seem kind of strange, but again, don't be afraid of it. It really isn't that hard. The point though of math box is that writing GLSL for everything is kind of annoying because every GLSL program has to be written top to bottom. It has to be a main function, basically. No inputs, no outputs. And there's tools like GLSLify that bring, due to GLSL, let's say, browser-ified it for JavaScript. It allows you to include other code, but it's still all statically defined. You're writing a program ahead of time to do one thing. Whereas what I want to do is compose shaders dynamically, so I don't have to think about the whole. I can just think about tiny pieces, like one transform that I want to slot in. And so that's the thing that I've kind of been working on and exploring is how to combine shaders like this. There we go. So this is a vertex shader for one of the objects before. I believe it is the arrows, the vectors. And this is quite a lot more complicated. So this is a functional graph where this part takes care of the masking and that writes out the vmask value that the vertex shader, that the pixel shader was using. And this thing here at the bottom calculates the transformation. It starts off with two points, xyz and stpq. Add some padding, does a resample. And here's the code that I injected.  Everything else comes from math box, so to speak. So this is the polar transformation that does the circular polar warping. The camera view and closing off the chain. And this then gets called by a sampler that leads to arrow position which orients the little arrow cones. And finally, you get the final position.  And so that's what this entire project was about, was enabling composition on a GPU beyond statically defined things. Out of my frame again, there we go. So the hardware that we have these days, especially with VR, as Jomay was talking about, is incredibly powerful. You've got the NVIDIA GTX 980. It has 336 gigabytes per second. It famously has 5 billion transistors. The more interesting number that I find is the 5 teraflops. Because if you actually go and look, this is the IBM Blue Gene P. The picture's not 100% correct, my fault. But in 2007, one of these cabinets had 5 teraflops. And so today, that's just one of these puppies. And you get numbers like 3.3 trillion bits per second. That's not an exaggeration at all. That's the objective ability of these things. And so that also means that your phone, that your fancy smartphone, is probably equivalent to a Dell box from the mid-2000s. Not as fancy. And so this stuff is what drives generally video games, right? Video game graphics. This is an example from Alien Isolation. I really like this game, but also because it's gorgeous. Not just the styling and the visual design, but the rendering is really, really good. The lighting is incredibly well done. You get these images that seem near photo-realistic, right? It's hard to tell if this is a picture from a set or a picture from a video game. It's actually from a video game. And that's a scary alien that you have to deal with. Another two examples that are included, because it's kind of interesting, this is Crisis 3. So this was the previous generation of consoles. And you can kind of sort of see in the background, there's still a lot of fog. And any time you see that in a video game, you know it's because they wanted to draw more, but they couldn't because it was too slow. Whereas nowadays on the PlayStation 4, for example, that problem has gone away. It effectively got infinite draw distance. That's the difference between one generation of consoles and the next. So there's an incredible amount of computational power here. Which means supercomputing has kind of just become background radiation. It's everywhere. From the displays in your pockets to the laptops, to the consoles, to the TVs, they all have to do incredible amounts of computation to make this stuff work. And we're kind of blissfully unaware. So finally, I want to just quickly talk a little bit about practical stuff with WebGL, stuff that I learned from this. Which is the first is pre-allocate as much as possible and avoid garbage collection. And trigger warning, coffee script. Because it's a two-year-old code base and that was the state of things then. Where you want to allocate your buffers and your objects in your state ahead of time and only change values. You don't want to allocate new things. Because doing that 120 million times per second is going to make Chrome V8 cry. Another thing that's a problem is text rendering in WebGL. This is the big problem that everybody deals with and the good solution seems to be something called signed distance fields. Where you create this image like the one at the top and then dynamically you apply a contrast, which is like the Curves tool in Photoshop, to actually make it crisp for a certain size. So based on the image at the top, you can render text at a relatively wide range of sizes. And you can also use this to do outlining, which is very useful for rendering labels in 3D on top of other things. Unfortunately, there's no way to generate a signed distance field easily in a browser. So I've had to come up with a technique to fake it with Canvas, which comes down to drawing progressively smaller outlines with stroke text and then doing a post-processing effect on that. It's a lot of work. The other thing is that little loading spinner that I put in, which I don't like. I wish it was faster. Unfortunately, when you create a shader in WebGL, you have to compile it synchronously. And as you've seen with the graphs that I create, you can imagine all that code combined is quite big. It takes a little while to compile. It's not the end of the world, but it is annoying. So I have to deal with that. A thing that is ridiculous is if you want to read floating point numbers from a GPU with WebGL, you can't. You can only read back bytes, which means if you want to read back floating point, what you do is you make a shader that encodes a floating point number as an RGBA. I didn't come up with this luckily. Somebody else already did the work because IEE floats are not your friend. And this is the kind of ridiculousness that you have to deal with sometimes. Another problem is all this multi-sampling stuff that I was talking about. You can use that, but you can't do anything with a multi-sampled result. It's only the final results. So if you want to do post-processing effects like cinematic effects, you kind of have to give up multi-sampling. And there's also order independent transparency, which is a technique that's relatively recent that solves the Z-buffer problem, so where things that are transparent aren't layered correctly. But you can't use it without rendering in two passes because, again, WebGL lacks certain capabilities. So that's, again, annoying. Now, there's a website called WebGLStats by a guy named Florian Bush, who's one of the people who's very active on the WebGL mailing lists that tracks the actual support for this stuff. So despite the fact that, you know, I'm painting a bleak picture, things are getting better, and you have really good information on what you can and cannot use in certain situations. So that's great. This site is a public treasure. It does not get enough recognition. And another problem that Florian particularly has worked on, too, is that life performance scaling with WebGL is quite difficult because you get a request animation frame. You can see it's taking me too long to render, but you can only scale down progressively. Once you're rendering at 60 frames per second, there's no way for you to know how much slack do I have. Could I render twice as much? You don't know because the request animation frame clock is just going to keep happening. So actually dealing with WebGL content that could work well on a low-powered smartphone as well as a fancy laptop is really difficult. You kind of just have to aim low and scale up very conservatively. So that's sort of the question of what is WebGL? Is it good? Is it bad? It's really good. I will say this. It's just the problem wasn't just how do we bring computer graphics into the browser. WebGL was the first time that they actually took an existing API and tried to make it work on the web and that's why there's these odd gaps here and there is because they had to invent a whole security model to make this stuff work. But that just didn't exist before. So if you're playing a video game on your laptop that's a native application, they're talking directly to the driver and you can be sure that there would be bugs that a developer worked around that would be considered a security issue in a browser. So a lot of the work in making this stuff work was work about the work. That's why we ended up with what we have today. A good question that was raised this week that I heard. I forget who said it. Where would WebGL be without 3.js? I think this is a very important observation. 3.js is one of the main drivers that made WebGL accessible. And luckily things are improving. So there's this work being done on WebGL 2 that will be an improvement that adds a couple things. It still doesn't quite match what you get as a native developer. But there's definitely improvements. The other thing that people are talking about is Vulkan which is sort of the next generation OpenGL which will maybe have a Web Vulkan at some point. This is basically the open version of APIs like Apple's Metal where they want a graphics API that is more multi-core, more parallelizable is more natively threaded and it's basically what they already use when they program game consoles. So the situation on a game console like at PS4 is you have, you know, luxurious access to the hardware. You have one machine that you're targeting. It's kind of blissful compared to the stuff we have to do on the Web. But, you know, reach versus accessibility is always a problem. The thing that I also want to bring up that I find really interesting is that there's work being done on something called Spear which is based on LLVM. So this is in the same realm of things like Asm.js and all that, cross-compiling where this might enable packaging of shaders as binary modules that don't need to be compiled but that can just be put straight into the driver and then translate it to the hardware's own instruction format really quickly. So we definitely don't have to compose shaders as source code forever. It's just that right now that seems to be the best way to do it. Now, time-wise I'm pretty much at the end so I am going to leave it at that. I haven't released this code base yet. I will be putting the slides online and talking more about this stuff as I can write the docs and explain it. There really isn't more right now than I have shown you. So thank you to everyone who made WebGL happen. There's some people there on the mailing list, too many to name, too many to thank. That did a lot of work to bring this to life and it's what enables what you saw today. Thank you very much for listening.


Hello, my name is Sujat. And hi, I am Harshad. So, today we will discuss about sampling in a digital video. So, as you know any video or an image is basically a sample two dimensional signal. And the rate of sampling is decided by the camera or the device which is capturing that image or the video. So, the rate of sampling is important and we have to decide what the rate of sampling should be. So, that the video can be perceived as it is. So, we will first discuss about spatial sampling. As you can see in this we will take the example of this particular video. So, in this video basically in this frame you can see regions of constant intensity and regions where there are lot of variations, we will see the effect of pixel density on this video. So, when I take up this particular region and represented it by a single pixel, we will see what happens. Now, let us increase the number of pixels to 4 and see what happens to this region. Now, again let us increase to the number of pixels to be 9 and then 16. Now, let us move on to region where there are lot of variations. So, in this video we will particularly represent Herschel space with one pixel. So, what we are doing is taking all the pixels over Herschel space and averaging it and then representing the whole image or the whole region using one value. So, let us see what happens when we represent Herschel space with one pixel. So, I hope you are not able to understand what expression Herschel is making. So, we have to increase the number of pixels to see exactly what Herschel is expressing right now. So, let us increase the number of pixels to 4, still it is not quite visible. Now, let us increase it still more to 9, now 16 and then more. Now, you can see Herschel is smiling and he was smiling all the time. So, we have seen the pixel density, how it affects the video. So, where the regions where we have constant intensities, we require less number of pixels and the region where we have lot of variations like Herschel space, we require large number of pixels. So, this is basically, this has a lot of correspondence with Nyquist rate and basically the Nyquist sampling theorem. The one dimensional Nyquist sampling theorem basically says if we have higher frequencies we require higher sampling rate and if we have a low frequency we will require lower sampling rate. So, this same in this video also, so where we have large number of variation within a particular region, we have to have large number of pixels and where we have constant region, we just require 2 or few pixels. Now that we have seen how pixel density affects our video, we will talk about the resolution of cameras. So, you might have heard of cameras having resolutions like 2 megapixel camera, 8 megapixel, 14 megapixel. So, what this number signifies? So, 14 megapixel camera is basically that we are capturing an image using 40 million pixels. As we have seen in this video, the more the number of pixels, the more better the video will be. So, whenever we are shooting an image or a video having very high amount of variations, we would require high resolution cameras. So, that is why resolution of a camera is important for shooting an image or a video. Now that we have seen how pixel density affects the image or a video, we have seen that lower variation image or lower variation region will require less number of pixels and higher variation region will require high number of pixels. I would like you to think how this can be exploited in image and video compression. So, now that we have looked at spatial sampling, we will look into the temporal sampling also. You might have noticed a fast moving wheel rotating in opposite direction. So, that essentially is effect of the sampling in time direction. To understand it, let us have a simple demonstration. We will take a simple sinusoidal wave moving in left direction. So, here we can see that sinusoidal wave is moving in left direction. Now if we down sample it, we get this which is again moving in left direction. Now if we down sample it further, we will obtain a wave like this in which actually we can see alternate sinusoid in one is in phase and one is out of phase. So, this is essentially we are sampling it at Nyquist rate and hence it is happening. Now if we further down sample it, it will appear as if it is moving in opposite direction. This is essentially because of the fact that initially we were sampling it at a much higher rate and hence we were smoothly getting the sine wave, but now since we are sampling it more than half of its time period, it appears as if it is moving in opposite direction. If we further down sample it, it will appear as if it is moving in opposite direction, but very slowly. At one point of down sampling, it will appear stationary. We can understand this from the fact that we are actually sampling it almost equally and its sampling rate is equal to time period of the sine wave. Further down sampling will make this sine wave appear moving in left direction. We will see one practical example of temporal sampling. Here fan is moving in anticlockwise direction. If we down sample it, it will appear as if it is moving in clockwise direction. Further down sampling will make the fan appear rotating clockwise direction with even low speed. So, this is actually known as wagon wheel effect and the main reason behind this is the aliasing which we observed. In this video we have explored spatial and temporal sampling and its effects on a video and we have also touched upon the fact that this can be used in image compression. So, why do we care? Well, this can be very useful for video compression. A scene having large amount of variation must be represented with large number of samples while scene having fewer variations can be represented with less samples. In temporal direction a scene having fast moving objects must be represented with high frame rate while scene having slow moving object can be represented with low frame rate. This is an a very active area of research in video coding domain. Hope this video has helped you appreciate sampling and its implications in a video which incidentally is a three dimensional signal. We will see you in another video, thank you.


We spoke previously about Newton's first law, that objects move at a constant velocity with zero acceleration and less acted upon by a force. But what is a force? A force is a push or a pull. It has a strength and a direction. A quantity with a magnitude and direction is called a vector. We'll talk more about vectors in a few videos. We are already familiar with many kinds of forces. We now know that they are all manifestations of a few fundamental forces. All forces come from the interaction of two objects. We'll now go through a list of some common everyday forces. Weight is a force downwards due to gravity. This is from the interaction of an object with the Earth. When we're working with forces, it's extremely useful to draw a diagram of all of the forces acting on an object. This ensures that we don't forget any forces and that we know which direction the forces are in. We call this a free body diagram. Note that weight is not the same as mass. If you went to the moon, your weight would be less than it is on Earth due to the smaller gravity on the moon. Your weight actually also changes as you move around different locations on the Earth. However, these changes are quite small, so we usually don't notice them. Another useful force is the spring force. This is how we make the most of forces in machines or in biology. When we extend or compress a spring, there is a force back towards the original position of the spring. It's clear in this case that the force is a vector, because the direction of the spring force depends on whether we extend or compress the spring. When we pull on a rope, this produces a force in the same direction as the rope. This is known as the tension force. The normal force is an incredibly common force, which is all around us. It's why we think of objects as solid, and the reason why you don't fall through the floor. It might seem like a strange name, but the word normal comes from maths, meaning perpendicular to a surface. The force of friction opposes the motion or the attempted motion of an object, and is parallel to the contact surface between two objects. If an object is moving, then the force on it is called kinetic friction. For example, a park on ice slows down to a stop due to kinetic friction. Friction can also act on stationary objects. For example, if you try to push a parked car, it won't move, even though you're applying a large force. The friction here is called static friction. Usually static friction is larger than kinetic friction, so this means if you push on an object and get it to move, the force you need to keep it moving is smaller than the force you needed to get it moving in the first place. In these three body diagrams, we've just drawn one type of force on each diagram. However, in many cases, there will be more than one type of force acting on an object. Let's consider an example where we have a stationary book sitting on an angled desk, and we'll draw a free body diagram showing all of the forces. There's weight, which always acts downwards. There's the normal force, which is always perpendicular to the surface. And then there's friction, which opposes the attempted motion. It might be useful to think about what would happen if there was no friction, for example an icy desk, then the book would slide down the desk. So in this case, friction is upwards and parallel to the desk. If the book is not moving, we know from Newton's first law that there must be zero net force, and so these three forces must all balance. It's complicated to see exactly how these three forces could cancel each other, because they're not all in a straight line. So we'll leave this problem here, and come back and solve this quantitatively in a few videos time, after we've learnt about vectors.


In this video, we are going to hear direct from the guy at Ironman who is responsible for setting up the Ultra Trail Whistler by UTMB. Let's do it. Rarely do we experience such an extreme and polarising reaction to a new story in trail and ultra running as we have done over the past few days with the announcement of the UTMB Whistler event. The video I released just a few days ago is already the fifth most viewed on my channel. In it, I tried to unpack what I could from Gary Robbins own blog post, essentially my only source of information for that video. And in that blog post, Gary claims that his event, the Whistler Alpine Meadows event, had effectively been run out of town by a company called Veil Resorts, leaving the door open for UTMB to drive their steamroller into Whistler. The inference being, and the conclusion drawn certainly by me and many others, was that Veil Resorts and Whistler Blackcomb had already had contact with UTMB and the Ironman group prior to February 2023, which is why Veil Resorts put so many barriers up and made it so difficult for Gary and the WAM team to go about setting up the next edition of their event. Why February 2023? Well, on the 10th of that month, Gary publicly announced that WAM was dead. Not George Michael and Andrew Ridgely, WAM, the Whistler Alpine Meadows event, was dead and they would no longer be returning to Whistler. Subsequently, the announcement of the Ultra Trail Whistler event by UTMB was then met with anger, outrage and uproar by the trail and ultra running community, causing many people to ask for a boycott of all UTMB events and all brands associated with UTMB. Hocus specifically came in for some particularly aggressive finger pointing. Just a side note here by the way, I've read a lot of very angry social media posts from across the pond recently and it has amazed me how few people are aware that the Western States 100 race is on the UTMB World Series calendar for 2023. It is a partner of Western States. UTMB and Western States are partners. Now I did comment on this in a few social media posts and I even had the Mayor of Auburn message me to just make it clear that although that is the case, Western States does remain an independent race and UTMB does not have a controlling stake in Western States. Anyway, I digress. Off the back of my video and the backlash against UTMB and the Ironman group that ensued and continues, I was contacted by an ex-colleague. Many of you will know that I am a content creator for Zwift. Yes, Zwift, the cycling company. Many of you may not be aware that Zwift also does running and I run on Zwift a lot. Now the former head of running and triathlon on Zwift with whom I worked for some three years, Craig, now works for Ironman as the vice president of marketing for North America. He contacted me to say, would I like to meet with the guys from Ironman who were responsible for setting up the UTMB Whistler event? Now unsurprisingly, I wasn't the only one contacted by UTMB and Ironman in what has clearly become a damaged limitation exercise caused by this badly managed and seemingly naive initiative. So on Monday, October 30th, I joined a call in which Craig introduced me to Colby Gonowitz, who is the Ironman director of communications, and Keats McGonigal, who is the vice president of operations for North America. Now I'm going to share some audio clips with you. Recently I had recorded the meeting for my own personal notes, so I wouldn't forget anything. I had no intention of making it public, and no one in the meeting knew it was being recorded. However, in talking to Colby, Keats and Craig afterwards, they agreed that I could indeed share some of the audio with you. In fact, actually it's only Keats who answers my questions during the meeting. But bear in mind therefore that there are no rehearsed clips here. Nobody knew I was recording the event, and they haven't vetted what I'm going to release to you. That, at least, is to their credit. Just before we get into it, if you are finding the video useful, interesting, entertaining, informative, please do click that subscribe button, really helps out this channel, helps me to grow, and helps me to keep making videos like this. Okay, let's do it. Keats McGonagall has worked for Iron Man for 15 years. One of my early positions was actually race director of Iron Man Canada in Whistler. And so I helped to start that event when it moved from Penticton to Whistler in 2012. So I have a long professional relationship with the team in Whistler and all of the people there, been going there for a number of years. He also told me he's been running the trails in Whistler for many years and he was well aware of Gary's Whistler Alpine Meadows event. So Keats is no faceless Iron Man executive. Keats has been working and living and running in and around the Whistler area for a long time. The main question to which I needed an answer was, did UTMB contact Vale Resorts or Whistler Blackcomb at any point prior to Gary's announcement in February of this year? It was actually when it was publicly announced that that event was no longer, and Gary came out and said he's no longer operating in Whistler and leaving the market. I saw that announcement publicly on his website as well as some other media outlets and it was kind of that public statement that was kind of the impetus for me to reach out to my contacts that I have in Whistler and just say, if there's a boy that exists, are you interested in filling this? And to be clear, my contacts on the triathlon side were with Resort Municipality of Whistler and Tourism Whistler. And we had conversations with them over a couple of months in March and April. I actually never directly approached Vale. I never approached Whistler Blackcomb. It was through our contacts in Whistler that they were the ones who actually made the introduction a couple months later. We had email records of like timestamps of when the interactions happened and they were after the void was already created. Look, I stated in my original video that it was quite clear to me that the only reason Vale made it so difficult for Gary and the WAM team to organise the 2023 edition of their event was because they already knew that UTMB would be coming on board. I guess we'll never know for sure. However, I'm inclined to believe Keats, who came across to me as very sincere. However, that doesn't mean that someone somewhere at some level within Ironman or UTMB didn't make contact with Vale Resorts or Whistler Blackcomb prior to February 2023, knowing that they did need a Stones race in Canada for 2024. However, even if we accept Keats and Ironman's version of events that they only proposed the race once Gary had pulled out, it still looks bad. It smacks of really poor judgement to ride roughshod over what Gary and WAM had built up and worked so hard for over the preceding years. So I asked why they had not reached out to Gary and Keats said they had and they have said to him. If we can still work together, let's do this. I mean, part of what we were doing when we set this up was looking at not only our event calendar, the calendar in Whistler, but then the broader trail running community. And Gary has his Squamish 50k, which if you're not familiar with Canada, Squamish is less than an hour drive from Whistler. So it's it's in very close proximity to it. And so we were aware of that event that happens in the middle of August. And we had a couple of options on dates in September. And we said, let's push as far as we can to the end of September. You know, so it's six weeks after if you're getting ready for 100k, running a 50k, six weeks in front of that is perfect. Hindsight's 2020.  Right. And and that's the void and the premise under which, you know, we were operating. Could we have done it differently? Sure. But, you know, this is this is where we sit and we go from here. It's fair to say Keats and others at Ironman underestimated the strength of opinion and the backlash there would be following their announcement of the UTMB Whistler event. You know, I'll be the first to admit that had we known this was going to be the narrative of launching this, we obviously would have done it differently. For me, this caught me a little bit off guard in terms of like, again, from my perspective, we were feeling, you know, a void. I was like, hey, this is super cool. Let's give others the opportunity to do this. And particularly for the Canadian runners. Right now, there's no way for them to get stones in in Canada. This was our goal and impetus on on this whole thing from the beginning. So Keats admits, yes, they did make mistakes, but he's also adamant that they did not make that call until they were under the impression that Gary had completely pulled out. And yes, they could have and they really should have contacted Gary at the outset. They're aware of that. They should also have had a lot more foresight as to what this might have looked like from the outside. So where do we go from here?  You're huge, but there's always lessons to be learned. And I think I think I think you guys should probably learn a bit of a lesson that might influence how you go about things moving forward and just try and step a little bit more carefully. Nobody is denying that UTMB has has exponentially increased the love and and and reach of trail running. We just need it to be a little bit more respectful of the people who've been there before and and put in the hard work beforehand. Yeah. And and again, 100 percent agree with that. Yeah. And you know, again, I appreciate you having this dialogue with us and pointing in the right direction. Right. This is what's going to make all of us better. And we we take this and we learn from it and we grow just like we have, you know, in the other facets of our business and go from there. So 100 you're 100 percent right as we do more of this in the future. We will definitely do it differently than what we did here. I really do hope this has been a wake up call for Iron Man and UTMB and that they will modify their behavior in the future. I've no problem with businesses looking to grow, expanding, looking to make more money. Heck, we're talking about North America. That's the American dream, right? Prosperity and success. Peter, what are you doing here? Shouldn't you be a what? I quit my job, Lois. You what? Yeah, we're rich now. I don't need to be working. I still believe there's room for everyone. There are plenty of runners to go round. I still believe small race companies can operate at a profit and be successful. But their races have to be good. They have to be well managed, well resourced and well executed to attract runners and to keep those runners coming back. And that involves hard work. UTMB are very experienced at putting on races and by and large, their events are impeccably well organised. Feel free to boycott UTMB if you feel that's the right move. But a very well respected run tuber, running YouTuber, told me this week that he believes, despite everything, that UTMB is a net positive for our trail and ultra running sport. And I have to say, I am inclined to agree with him. Thank you very much for watching. If you'd like to watch the original video, click that link right there. I'll see you over there in a moment and I'll see you on the start line next time. Bye bye.


Okay, so thanks for the introduction. It's a pleasure to be here so Okay, so what was the initial motivation of this work is to? Try to we think about long-term security and to try to avoid computational assumptions when it is possible and So it's a quantum session. So we know that sometimes with quantum mechanics We can do things like for example quantum key distribution, but it's Sometimes for other primitives. It's impossible like information theoretically even with quantum mechanics. So another idea is to use relativistic cryptography, which is a fancy name to say that we have Two Provers that cannot communicate. So it was first theoretical idea that kind of Emerged I think in the in the in the 80s and we saw like Multi-prover interactive proofs and also like what we can do with two Provers in terms of cryptographic primitives for example in terms of bit commitment or other such primitives and there was a recent resurgence of of this area and People thought okay like because it was thought to be something theoretical, but you know, can we actually create physical conditions in order to Make sure that two Provers cannot communicate and if yes, how and the main idea is to use the relativistic constraint or just more simply to say that if the Provers are far apart then the information has to take some time to go from one Prover to the other one and Which has a high speed limit of the speed of light that information cannot travel faster than the speed of light so that was the the main idea and And so what were recent results? So there were a series of recent results in relativistic cryptography Mostly dealing with bit commitment. So there was this first paper. So there was this first observations that If you have two Provers if you have these two Provers that cannot communicate if you want quantum mechanics things can go differently, so there's paper from Provers in isolation that that sometimes even information theoretically you can have Protocols that are secure in the classical setting but not in the quantum setting because they share an entangled state and also there has been constructions of bit commitment schemes which are secure against quantum adversaries and So our initial motivation was can we use This bit commitment scheme to do other stuff and in today's talk I'll talk about how to use bit commitment to do zero knowledge, which are things that we know how to do normally, but When you do this reduction sometime you have issues or here you have and the multi-prover setting and the quantum setting and everything so it's not clear how all these things will compose well together and The main technical contribution of this talk is will actually be to analyze and improve tool for analyzing the disturbance of quantum measurements and how this these tools will be useful to improve The analysis of security against quantum adversaries. So actually I spend a large part of my talk of talking about This quantum measurement problems because like they're more generic so that will not Talk too much about like to Prover settings. I'll talk a little bit about it at the end and somehow that Many people that try to prove security of classical protocols against quantum adversaries can relate to so Okay, so before again like being too vague I'll just start from one simple example and then see from there like what are the problems and what solutions We bring in this paper. So suppose a Any kind of Prover verifier scenario. So here I took like a Sigma protocol. We have a Prover that has a Public key a secret key the verifier only has the public key and the Prover wants to convince the verifier that he knows a secret key Without revealing it. So it's some kind of a proof of knowledge some kind of a Sigma protocol Just a message a challenge first match And the second message so and In many cases the security of those protocols are based on some property called special soundness is that if the Prover can answer two Different challenges let's say to then this will be approved that he knows the secret key and But what we do is that okay? So of course the verifier could send well give I will send to the Prover two challenges I'll tell him answer those two challenges, but then the verifier will also be able to extract that secret key. So The verifier will only send one challenge and somehow this will be enough To prove that the Prover knows a secret key without revealing any information about the secret key So these are something, you know, which are quite known which are which are pretty which are pretty nice and So the question is so there is this difference between one challenge and two challenge How do you go from one challenge to two challenges? Well, normally it's very simple. So you have an algorithm that answers, you know One challenge. So if you ask to then you apply the algorithm for the first challenge and then for the second challenge And you get the answer to both. So somehow it's relatively easy normally to to go from one to two and What about the quantum setting? So, okay, so we do the same thing we get a first challenge And we answer and then we get a second challenge or get them at the same time But after the first answering this first challenge What happened is that the internal quantum state has changed. So somehow the question is Did answering the first? query made it impossible to answer the second one and And it may complicate answering the the second challenge. So this is Basically what most of the of the technical part of paper deal it and what I'll talk about here. So just to I get pictures. So look at quantum consecutive measurement. So this is exactly what I said So if you have an internal state for all you have a quantum algorithm, you have a first challenge C1 and an output one and If you're given a second challenge, then you're a new internal status row prime and if You output and in many cases this row prime can be very different from role and somehow these things are kind of hard to control in in general so okay, so When does the thing work well? so suppose that you have only one valid good outcome, so you give a challenge and you have one good answer and You get this answer with high probability then We know so there is this Okay, so there are several ways of calling but one of the things called a gentle measurement lemma is that you can perform this measurement only By modifying slightly this internal state rule that somehow if your measurement You're almost certain that you're gonna get a good answer of one possible answer. Then you're not gonna Change much, but in many cases. That's not what's happening. So So typically like if you can answer the the first challenge only with some Not so high probability or in particular the thing is that okay? Let's say I'll always answer correctly, but it's one out of many possibilities. So let's say, you know, you have many good answers and You're answering your first challenge. You'll just get one of them So even if you always get one of the good challenges, then somehow this will have disturbed the state a lot so you cannot really like extract one of the good answers without disturbing the state a lot and This problem arises in many problems of soundness analysis when you look at Simulation of zero knowledge if you want to do rewind not been talking about Rewinding where if you got kind of witness extraction and in many cases this This this is this is a problem And so there there was a paper by a mindless medicine on rule like from a few years ago That truly said that in the most general case This is a problem that you cannot solve that you can find Algorithms and measurements so that you can easily answer one of the two challenge any challenges If if you get one challenge, but it's very hard to get two of them So in the most general case, this is this is really a problem and we know how to construct Examples where this happens so okay, and so Final thing is can we still do something so okay? So if the most general case is problematic, what are the cases where we can still do something so? Just a recap we want to relate two quantities p1 is the probability that if a quantum algorithm I've given a challenge to get a good answer and p12 which is the probability output correctly on two different challenges and so okay, so here we're only consider for p12 for strategies that In when you get the two challenges when you do this very naive strategy that Look at the first challenge you try to answer then you get the second challenge and you try to answer There might be more clever ways of doing but that will only let's say improve our results So let's say that already with this very naive strategy. We have some interesting results so Okay, so I'll I'll already show what are the the main theorems so First case is as I said single good outcome. So let's say that for any challenge There's a unique good answer and let's say the challenge size is n and is the Is the dimension of the challenge space so meaning that log n so log n bits So if the challenge is of log n bits then We can show that p12 is larger than this quantity which is related to p1 so And if we have as good outcomes if we have as good solutions for each challenge, then we just lose a factor of s so okay, so then a little bit discussed like quantitatively like what this means and There was actually already one one bound like there were several bounds for like specific cases, but let's say though Think the most generic case was like from paper by who was actually studying like proof of knowledge So exactly here. Let's say that if p1 is larger than one over root k. Okay, so case should be n here then He has a bound which is similar similar to to the first bound but for this p1 which is Not so it this would be useful for p1 only larger than one over root n and not one over n and Okay, so Just to look okay, so how how tight are those things? Okay, so it's not clear how to how to interpret those bounds So in the single good outcome, let's let's look at this inequality These are actually pretty tight So first we see that if we take p1 which is large enough then we have p12 which is larger than some cube version of p1 which was actually already the case in Unro that if p1 is very large then somehow we have p12 which is larger than the cube and We can't find states and measurements so we can find setups where this cube stays somehow so we have no We have no hope in reducing this cube to a square and on the second hand if we take p1 Which is equal to one over n Which Basically, so this is kind of an extremal case it kind of so you can't think of setups where Let's say the quantum algorithm can only answer to one challenge one specific challenge That would give him a probability of one over n. So this is this is why somehow we cannot we cannot go below Yeah, so I mean of course. Yeah, this this holds only for the other way It's negative so it's fine So and if p1 equal one over n then we have also some cases where the strategy will give p12 equals zero So it's tight in those two settings. So somehow, okay the one over 64 is probably not tight What happens in the cube and what happens in different behaviors? It's probably not tight in several ways, but at least in these extremal points. We know that we cannot improve so, okay, so It was a very natural question so it was a very natural question and so We hope that we can use it in several things. So as I said in the proofs of knowledge and like this small example that I showed before more generally for a bounding value of entangled games if that's if that's your thing and the original motivation of Why we why we started to study this was relativistic zero knowledge for np secure against quantum adversaries and so Actually, what happens is that once we have this once we had this bound Then the rest was actually pretty pretty straightforward at least for the for the kind of security we wanted to prove so not going into the the technical details of how it works, but you know once we have this then the the rest is fine and Yeah, and then okay, so now I'll just spend a spend a few minutes talking about like this Multi-prover scenario so that you can see see a little bit like where we use this thing. So Then we did something very simple. We had we know a protocol for Hamiltonian cycle that We know a zero-knowledge protocol for Hamiltonian cycle that uses bit commitment and we have a bit commitment scheme so we just so we just put them together and we see what what happens, right, but that's a that's a very natural thing and Yeah, so it was also also just like a quick note is that typically This would not work for like for three coloring typically is that like this Because of the reasons because a little bit of the special soundness kind of issues is that with only two of only two challenges Somehow the Hamiltonian cycle will only have two challenges and you can recover if you can answer both challenges We can recover the whole cycle Whereas in three coloring if you're only you know You it gives you some information if you can answer two challenges, but you cannot recover the whole coloring So then it's not clear like what what to do So, okay, so, okay, so here. I okay So here I I just briefly we mentioned like what are the requirements? Okay? This is all very informal now of course But so what are the requirements of a commitment scheme? So want to commit for a bit D and so there are two phases after the commit phase want that The verifier has no information about D and that after the reveal phase the prover cannot change his mind So Okay So what do we do? So as I said, so okay So now it's kind of the only picture that kind of splits those two provers is that okay? So we start from two so we start from P1 P2 Okay, and they're very there. They're very very far away Okay, don't have to be very far away, but let's say you know like a few hundred thousand kilometers And let's say that beforehand, you know, they managed to So they have a secret they they have a secret a they have a secret string a and we'll always be working in some finite field of Dimension Q so all of these strings will be of size lock you and then Again the verifier so if the two provers are far away and we won't like to have very like sharp synchronization We cannot have one verifier that talks to the two of them and somehow like have something meaningful, right? Otherwise would give more power to the verifier. So we'll also split the verifiers into two and Do the following so the first message the verifier will send a random string B in FQ to the prover And you will send back Y equals a the secret plus B times D be the query and D being the The bit so D is in D isn't zero one here, but you know, it just is the same multiplication and the prover two will just send a And D and then the two verifiers They will check this thing But then you know after after this prover send this message Then let's say the protocol is over and they can check offline somehow you can a lot of time can pass and you know you can check that Everything is valid somehow that's the the Y and the a D everything corresponds so and the only thing that we require from the scheme is that We correct P2 to send this message Before he has any information about B before any information about be can travel to the second prover. So, you know if If you're a hundred, you know, if you're 300 kilometers away, it takes a millisecond. So it's not you know Which is not that which is not that short, you know, it's in in 2017 right unlike in 1980 so and Okay, so this was so this is was okay So what I got the FQ the FQ scheme which was like proposed by lungi et al. And so they did an analysis and you know so somehow they reduce this this protocol to an entangle game and we know that That the protocol that the protocol is secure and the arguments are in the end the arguments are a little bit similar than this special this consecutive measurements is that if the P2 can answer both can Can give two openings one for equal zero and one for equal one that will satisfy those two checking properties Then you can easily extract be which and be should be hidden from P2 so this is the This is the main thing. Okay. This. Okay. So this is the textbook. This is a Textbook Hamiltonian cycle zero knowledge protocol for Hamiltonian cycle with commitments. Okay, I don't have a lot of time. So I will not Go too deep into this into this protocol you can read it. The only thing I want to say is that We said first of all as I said before if you have if you can answer the two challenges Then somehow you'll be able to recreate the Hamiltonian cycle, but there's actually also a problem in this in this protocol is that There are many possible answers is that somehow there is this hidden permutation pi in the protocol and for each pie there is a valid opening somehow so you have V let's say if now M is the number of vertices you have m factorial possible Possible answers so and we said that you know you lose of you lose a factor of one by m factor m factorial somewhere and somehow Will it will still work out? So somehow we will just work on these very low probabilities and We'll see how it works. So okay, so again all of this is very informal But just you know just trying to show you how all these kind of quantities go together As I said is that okay if there's no Hamiltonian cycle somehow you'll have to break the commitment scheme and breaking the commitment scheme as I said before it will happen to probably one over Q and So somehow this P12 somehow breaking the commitment schemes what I say meaning being able to have produced the two openings so this P12 will be one over Q and If you want P1 to be smaller than epsilon we need to take Q If we know if you just plug this in the other formula we need to take Q which is this huge thing To huge thing, but it's the dimension of the thing. So actually the communication is log of this So log of this is actually fine. So as long as the messages you sent are polynomial in the number of vertices and in one over epsilon then We can We can show the security of this protocol so Okay Running late. I'm just gonna you know, just this is that's a quick recap. So which so just take bound for consecutive measurements and we prove zero knowledge and okay, so What are the open questions now? So here the security prove is very basic So again, so we had a bit commitment scheme that we don't know how to compose We wanted to use it for your knowledge so we had to redo the whole thing from scratch somehow and again now we have a zero knowledge scheme and Again, if we want to use it for something else, we'll have to redo the whole thing from scratch, right? another thing which is kind of a Bit surprising is because we work on these low probabilities. This isn't even a proof of knowledge So if you can so if you can win this game, we cannot show that you can produce the cycle actually because because of this Factorial because of this m factorial thing you can only show that you can create this Hamiltonian cycle of probably one over m factorial which is not Which is not great and also like other primitive so also you say oh well, okay, so these things work well, so you can use this bit commitment, you know, you're kind of What do you can you do it for something else? typically Oblivious transfer you say okay in the quantum setting you have a Reduction from bit commitment to oblivious transfer. So I say great Let's use it as well. And actually here. This is a case where things don't work out very well somehow Because you have this bit commitment scheme that only work for a certain amount of time and then oblivious transfer You need some very kind of static security for for both players somehow you can break those schemes and of course like You know what are other applications of the bound and I learned here. Thank you


One of the most common questions I get asked is, you know, how do I start day trading? So what me and my mentor about it for our viewers on YouTube is create a free mentorship course that reveals our 12 secrets that every single brand new day trader should know before they get started. But please take note that there is limited seating every single week. So please reserve your spot at myinvestingclub.co link is in the description. All right, enjoy the video, guys. All right, here we go, folks. Round two today, September 8th, seven o'clock market time. Market is and has been selling off in the after hours due to some corona related news. So AstraZeneca COVID-19 vaccine phase three study put on hold. Let's talk about state of the market, basically. OK, state of the market here. The cues in terms of after hours, we're in a tech driven market. So ZM is still, you know, this is the this is the crazy run. OK, this is the crazy run. We're still holding this 300 level. You know, I think it was just I think personally, we just we're resetting as far as price goes. We're having a bit of a reset. We're having a bit of a correction. We got way ahead of ourself spy. I really wanted me just throw this on here for just a second. I really like this, this looking at the nine EMA on the weekly timeframe. And I think if I'm not mistaken and I don't even know, I don't know if he's in here or not, but this is something that Stockslayer likes to do. Stan Stockslayer that when he likes to when he's riding these like week long trends for like months and months on end, he'll use the nine EMA on a weekly timeframe and I'm a big fan of that when it comes to riding a trend and really getting those kind of like good, good exits. So on tomorrow, we're likely going to open under 333 unless something happens overnight, okay? So if you notice this, the market has been holding the nine ever since April 13th, really. So the nine EMA is a good thing to reference in terms of trend and kind of following those trends. So if you notice this, we hold the nine this entire time, right? Nine, hold the nine, hold the nine, hold the nine, hold the nine, hold the nine, hold the nine, hold the nine, hold the nine, hold the nine, hold the nine, no, I'm not Longsium, but I do like the setup. Ever since the reclaim of the nine on April 13th, we've done nothing but support it, okay? For the last, what is that nearly? I mean, that's five months. We've supported it for five months until now. So it's very plausible to kind of break down and test these levels. If we hit this level, this 323 zone, like, dude, I'm long in the market again. Even I'm, I mean, I'm just, I'm doing it again. I'm doing it again. I'll do it again until I go broke. Like I'm just, I'm not going to, I'm not going to do it. I'm not going to do it. It, this doesn't feel like this, okay? You know, when it all, when it hit 323, I don't know if any of you were here back in June, but when it did this right here, you know, everybody thought it was going back to 250 and then it just supported 300 and then that, that, that, that, that, that, and then off to the races we go.  Touching that nine, touching that nine, touching that nine, touching it. And the Dow is still not at all-time highs. And so it, you know, it could be that the market obviously was led by tech, but it could be that, you know, we've kind of double-topped here in the other arenas, such as the Dow. In Q, obviously we've just, we jammed straight freaking parabolic. Now we've broken below the nine. And so for Qs, I'm kind of eyeing this 250 level. I'm eyeing this 250 level for a potential bounce on that. I just don't, I don't see a like a sell-off again, like another sell-off coming.  I just don't see it. I don't see it coming. And the reason why I don't see it coming is if you look at the VIX, let's look at the VIX in the after hours here. Hey guys, my name is Tosh Bradley and I'm one of the head mentors of my investing club. If you have any questions about getting started in trading, getting started in the MIC, MIC in general, text me at<PHONE_NUMBER>. This is not a robot. It is me directly on the other end of my business line. And we'll get you in the club. We also have special promotions going on that I can get to you depending on your trading needs. Hit me up. Back to the video. Okay. So VIX in the after hours is, I mean, it's barely up. Okay. Barely. Up. We had a little bit of a peak, but I mean, look at this, just pure sell all sales, sales. So, so, so, so, so just since the market open right here, right? Right here. Since the market open, fear has decreased, increase, decrease. Okay.  We're not past Corona affecting everything we do. So, all right, back to what we're talking about here. Let's look at Tesla. God have mercy. Woo, Lord Jesus.  Man, I would really like to, I'd really like to long it there. I'm going to be honest with you.  I honestly, what I'm looking for here and I'm just going to be cautious about this. So 277 is kind of where what I've calculated as being key for the trend to hold is this level right here. I don't know what that looks like on a daily timeframe. Let's look at that.  Yeah, lines up with support and everything.  Right. We tested that after hours, didn't we? Not quite close enough though.   What's Apple doing? Has the top on Apple blown off yet? That's still not an exhaustion gap. Like I'm, it's still not an exhaustion gap. You know what I'm saying? Like that's still not, like we're still not there. Like it, I mean, in terms of Apple, we're, you know, we're, we're looking okay. We're looking all right. All right, all right, all right, you're going to learn today. Okay. Um, and now you're getting this, like people are buying the dips and everybody would, uh, how does Apple coming up with the new cell phone? See the news, like the, the events on Apple used to be like a big thing and it always led to like good trading on Apple every September over the last few, they've really kind of been like really lax. Um, this one, I think it is going to be interesting. What is it?  Okay. So what's that next Tuesday? Okay. Cool. No new iPhone, you know what's new, you got to buy your own charger. I really, here's my plan of attack guys. Okay. So let's just share this and I'm going to kind of break this down for you. This is really what I want to see for, for, uh, anything. Okay. You want this followed by this and I will undo that. This is the type of setup we want to see in the market. This is what we call first green day. Okay. Or the F G D entry point. Okay. That right there is your long signal. All right. That right there is your long seven because the odds are far the following day, the odds are that we're going to gap up and we're probably going to have a strong move that day. This is what I want to see. Whether you play it in the market, whether you play it in stock, whatever you do, um, whatever you do in this, the risk is pretty defined in most cases. Okay. The risk is pretty defined in most cases. In most cases you'll either risk red green. So you risk a green red move or, you know, somewhere a little under that, or you're going to risk these prior lows right here, just depending on your taste. All right. This is on a daily timeframe. So this is like day one, day two, day three, day four, day five. Okay. This is what you want to see. It can be a little jacked and a little manipulated and a little, and a little different, but let's kind of take a look at some charts now. Okay. Let's have a look back at this. So in terms of chart, I mean, you see it right here in Tesla, the entry on that chart is the high of the day on the fourth day. No, it's the first day it closes green. There's many difference. Uh, let me give you a great example of this and it couldn't be any more textbook and it happened on Home Depot, like last year, right there. Okay. So you had earnings, earnings disappointed.  The range is getting less. Okay. Range is less. And then you get this big, like rebound candle here. This day right here, you're buying into the clothes or you're buying the green, the red, green movie or you're, you're buying with a set risk. And sometimes it'll happen overnight. Sometimes it will happen intraday. Okay. But most times it ends up looking something like this. Okay. And you want to get this little swoosh. Um, that is really what you're looking for. Thank you so much for watching our video. If you want to see more of our videos, please subscribe to our YouTube channel by clicking the button here. We do our best to post a new video every single day. If you have any questions about MIC or any general trading questions, please text Tosh using the number here. Also stay up to date by watching some of our most recent videos right over here.


I thought technical colleges were not as challenging or as rigorous as a four-year university would be and I continued to think that for a few years even though one of my best friends was going to a technical college. I thought her classes weren't as hard. I thought her homework wasn't as difficult or as as much as what I was getting at the four-year university. And then I came to a technical college and realized how very very wrong I was because it's challenging. You have a hands-on learning approach which is so beneficial but that does mean you have to go beyond just memorizing some facts and filling out a multiple choice test. You need to be able to apply what you've learned so it's technical college is not easy but for me that learning an educational approach has been far more beneficial.