So in principle this I think should be the following, we have a real kind of C infinity symplectic manifold and something called B field which is I think it's a two-core chain representing class B in H2 of X, then the thing should give, it's I'll tell you what are problems, an infinity category or complex numbers and in fact will be Calabi-Yaw category, Calabi-Yaw dimension Calabi-Yaw dimension n when n is half of real dimension of X. So that's kind of principle and what is a rough idea, it's first approximation, objects category with not f of X, objects of this category will be say compact Lagrangian submanifolds and Hamiltonian isotope you should give, if you apply Hamiltonian isotope you should be the same object, isomorphic object, then home spaces between two Lagrangian, home complex between two Lagrangian manifolds should be equal to C to the set of intersection points, if intersection is transversal and by this Hamiltonian isotope one can always achieve it and then when you consider infinity structure for any key you want, if you want to write an infinity composition, it should be such maps, it's a tensor, it's a tensor coefficient, it depends on the choice of intersection point, should be equal to, that means if you fix intersection points of L0, L1, L1, L2 and so on, it will be sum of all maps of holomorphic disks, pseudo-holomorphic disks, X such its boundary of this disk is union of Lagrangian manifold and it meets the intersection exactly this point and exponent, let's say minus integral of omega over disk plus roughly I times integral over B over disk, pure imaginary number defined up to 2 pi Iz, also maybe should be some plus minus, what is pseudo-holmorphic disks? There's one small definition, if you have almost complex structure on X is compatible with omega, if omega of xi, j xi is bigger than zero for any real tangent vector and zero real tangent vector, yeah so it guarantees that for any pseudo-holmorphic curve the integral of omega will be positive number if it's an integral curve, yeah so that's rough idea and there are several problems here, so problem number one, this thing should be z-graded, this complex should be z-graded and also we should orient, the space of disk should be zero-dimensional and we should orient the space of disks, orientation of maybe virtual orientation of space of disks not to get some fundamental class, so the second problem is when I consider the area of the disk or maybe the class, depends on the homology class of the disk given class of the disk which is in h2 of x and union of Li from zero to k with integral coefficient, we want to have finiteness of the space of disks and we need in particular compactness, sorry yeah right, we need a compactness, so there's a compactness issue because I didn't say that manifold is compact, it should be non-compact manifold, the third story even for given homology class we get some integer number in front of this story or maybe rational number, but then there's a question why the series converges if you submit over all degrees of disks, convergence of series and the fourth point is that presumably I should add more object, one can put like local system on Lagrangian manifolds and I will also discuss it need more object, for example we want the schedule to be triangulated and operate some triangulated, yeah so there are four different issues and I'll briefly tell you what is the state of art, about one orientation and grading, first notice the following, if you can see the simplect group which is structure group of a tangent bundle, it contains unitary group and this is homotopic equivalence, unitary group is the maximum compact group here, hence one can speak about, it also is homotopic equivalent to G, L, and C, so there are two groups which are, three groups which are homotopic equivalent and in particular one can speak about churn classes of tangent bundle and the condition which is necessary to make the grading is two times first churn class x is equal to zero in h2xz, this is the condition and more precisely one need not only the equality but some additional data just to making this equality and data is the following, let's consider a bundle over x, it is compact fiber, if you point x the fiber is, fiber text is a set of Lagrangian subspaces in the Tumkin space, so it's a certain guy and let's assume that n is at least one, this space is connected and its fundamental group is z, one of these things is z, so if you kill all high homotopic group idx cells you get a homotopically circle and this circle is twice times the circle coming from canonical bundle, this guy has a two fold covering oriented Lagrangian manifolds and one can easily see that it's, if you put almost complex structure you get this circle is the same as the one and the data will be the following, the data will be a map from, let me call this something like arg will be mod by z, it will be a map from the total space of this guy to arg mod by z, such that if you restrict it's on every fiber, get a map to a circle and it represents a generator of each one, each fiber and gives a generator of first homology of Lagrangian grasmani on the fiber, gives generator of each first of, I mean pull back of the fundamental class, the generator of each one, so how does it arise in practice, if x is scalar manifold and we get section xx squared, which is not vanished as any point, so we get each point volume form defined up to a sine, then we get a map, namely you take square root of this guy, which is defined now up to a sine, restrict to Lagrangian, x will be Lagrangian subspace in x and take argument of this guy and it's defined, argument is usually defined up to 2 pi z, but because up to sine it defines model up to 2 pi z, up to pi z, so you get this function, okay, so that's things responsible for your manifold and now about what about Lagrangians, it's this object of 4k category, it should be not arbitrary object, if lx is Lagrangian, then l also maps to this total space because at each point of Lagrangian we get its tangent space, so you get a lift to this lx, this vibration and then we get this map arc mod pi z to r mod pi z, then we get r and you get a map from Lagrangian to a circle and this map gives a class, you get a class mu belonging in each one, lz, because I get the map from a circle and what we need it, we need mu equal to zero, it's called muscle of index, for each loop we get certain integers, so we should get this function to be equal to zero in first cosmology and additional data graded, grading on l is a choice of a lift from l to r, choice of map which produces composition with the argument and then it's easy to see that for two Lagrangian, for two graded Lagrangian manifolds if intersection is transversal for graded l1 and l2 and intersection is transversal, you get a map index kind of z-grading, you can associate certain z-grading to each intersection point and if you change l1, l2, then index goes to n minus index, so it will be Calabria duality, so the same intersection point, you consider it's element of complex of Holmes in one direction and another direction and they have opposite, we sum it to n indices and get Calabria duality. Okay, yeah so this was, this is kind of standard, I think which one should do about z-grading, z-grading things, you should consider kind of Calabria varieties to get in a simple electric sense. Now the question, I still didn't finish the story, one need orient discs, then this Lagrangian manifold should be, it could be in principle not oriented, should be spin manifold in the sense that second Stiefel-Wittner class is zero. This I discuss first in the case and B-field is equal to zero and this is Stiefel-Wittner class and more precisely one need data, one need not equal to zero, for example this canonical representation of Stiefel-Wittner class, you choose some, sell the composition, choose arbitrary sell the composition and this Stiefel-Wittner class is represented by Zaka chain which is sum of all co-dimension two cells in the barycentric subdivision, you get some sell the composition, now you make this barycentric subdivision and and then this equality one should, like this equality of two c one equal to zero, it should promote to some data, namely L is compact, L is compact, L is compact, yeah and then one needed to write as a boundary of certain one chain with coefficients in Z mod two, yeah this would be like spin structure or a chain of spin structure on your manifold, then this is if you can see Lagrange manifold with such things and you get some well-defined orientations, in general if b is non-equal to zero it's some a bit longer story, then presumably what one needs is that b restricted to L should be a torsion element in this co-mold group and then what will happen is that one should consider not L itself, but not just L, but local systems kind of twisted by Jörp whose class in H2 maybe kind of C star containing is i times b plus Stiefel-Wittnig class, image of Stiefel-Wittnig class, we are going to interpret Z mod two as plus minus one or pi z of mod pi z in this Z mod two here, Z mod two embedded to okay, yeah so that's that settles the question one, yeah so done, but what about compactness, it's of disks with given area, definition, suppose we get a symplectic manifold which is not necessarily compact and but it's I have to say it's called power compact, it contains a dense countable subset because C infinity manifolds in principle could be very big, countable to infinity, yeah x countable to infinity is admissible and if for any compact subset in x and any positive number a real number there exists k2 in x said that k1 sits in the interior of k2 also compact and almost complex structure g on x say compatible with omega such that for any map from the two dimensional disk to x which is j holomorphic said that f of boundary belongs to k1 and integral of pullback of omega of disk is less than a implies that f the whole disk belongs to k2 yeah so it's it's essentially kind of a formula the condition which is more stereotypically what is needed to have at least for some almost complex structure you have this property yeah so it's kind of almost typological condition which what I need to have a compactness even existence I don't really fix one and the claim if I'm not confused with limits in this case one get a canonical infinity category which doesn't depend on the choice of almost structure over Novikov field which is by definition is the following it's a set of infinite sums ci t2 ai formal sums countable sum said that ci are complex numbers ai are real numbers and a limiting point of ai is plus infinity and t is just a variable I eventually want to put a t equal to e e to minus one but put it as a formal variable and that's it I think this is the idea I think behind the things is this guy called Groman he proposed something similar but a bit more strong a bit more stronger I think it's kind of really maximal generality one can define this 4k category at least over Novikov field the reason is the following it's if you want to count this disk series supposed to get two Lagrangian manifolds L1 L2 or several Lagrangian manifolds Lk and you want to study this some compositions so you want to map holomorphic disks to their union and if you are bound the area then that it sits in some compact space you can put some k2 so the whole things up to given area bounded sits in this or maybe one can say one can say something just a second maybe this almost complex structure maybe I should be a little bit more precise here almost complex structure on x minus k1 set it for any almost complex structure stages and for j is for any j set it j restricted to x minus k1 is j prime so you can see the holomorphic disks which inside satisfies some uncontrolled question but outside it will be controlled and eventually what you go on you just kind of sorry is it a version of heart of serum or some weakening no no no just condition it just condition which is a priori it's not clear how to check at all yeah but if condition you can check it can exhaust for larger larger area by different compact set and and put one complex structure here another complex structure here and yeah so it's completely formal argument with limits nothing nothing deep here and maybe guarantees the whole thing exists and then eventually it will be also unique yeah so it's pretty empty constraint but then one can kind of guarantee various means there's no boundary conditions in this in this story there's nothing about Lagrangian manifold at all yeah but in the compactness you do have a boundary condition yes yes now but it's kind of a bit stronger than I forget it sits and no no no it's about disks there's no disks it's boundary theory which go to infinity I need Lagrangian manifold to be compact my Lagrangian manifolds no no there's no Lagrangian manifold here but I say that it's it's it's it's boundary sits in the union of compact of union find union of compact guess it sits in some compact that's it sir if I replace a light by the totally real not Lagrangian but just totally real will be also the same yeah so there are various sufficient conditions there are various kind of sufficient conditions some criteria when the whole thing satisfies uh so one is when x omega has a contact type at infinity and what does it mean it means that there exists a vector field a real vector field and a compact subset such that lixi of omega is equal to omega on x minus k and then and then the following the boundary of k is smooth uh hypersurface in x and so you get this k and this vector field this is boundary c looks outwards let's see directed is directed outwards let's see and moreover uh x minus interior of k is vector field forget about symplectic form working as symplectic form as well is isomorphic to uh c times positive ray and vector field is coordinate t and vector field du dt so it will be just kind of cylindrical uh end and then automatically the things will be contact manifold yeah that's a very typical situation and it's when it holds okay if x is a cotangent bundle to y where y is interior over smooth compact manifold yeah then it's one can easily see one get this contact boundary so it's one good situation the second good situation is kind of uh more general so one implies two so two gives a more general class of examples when there exists a uh compact subset almost complex structure uh almost complex structure and the function h from x to let's say positive numbers which is proper and said that maybe i don't even need complex subset there exists almost complex structure and h such that um h restricted to premature some the tail is polluter sup harmonic in what sense uh it means that they've considered a map a germ of a map of geocholomorphic map from a disc to this this h minus one of this open domain or maybe this open domain okay uh then the pullback of h is uh polluter harmonic function uh Laplace Laplacian double back is non-negative yeah so it's uh also guarantees that uh if you stay in some up to some level set uh of of your function your boundary of your disk sits on boundary says that it cannot go outside by maximum principle because then i'll get a point on the boundary when the value of h will be get a local maximum which contradicts this condition yeah this is uh uh um a more stronger condition uh in fact uh people construct a long time go if you get a contact type boundaries and construct it infinity this polluter function so these things will be really strictly positive for any non-trivial disk so you get something like keller approximation of keller metric and this is pretty complicated differential geometric data and there are reasonable examples like in okay z categories when it's really this condition uh it's not the one not one but the third condition it's of different nature it's also very useful there exists complete Romanian metric uh g on x satisfying three inequalities so the curvature of the metric is uniformly bounded the injectivity radius is also uniformly bounded so there are local pieces which looks like very close to euclidean balls and third condition that both omega in omega inverse is a section of exterior power cotangent bundles of tangent bundle are bounded with respect to norm metric g are bounded also uniformly and then it guarantees uh really exactly this thing it's not that for each area one can find this this disk can go go too far and the reason is the following if you have this compact set k one and you have a uh disk uh then the uh first of all the integral of to form and integral of uh and uh Romanian volume will be uh bound niffer by constant so it means that this uh Romanian volume is bounded Romanian area is bounded and now if this thing is very long so the diameter is very big and area is bounded then it's uh at least at some points it should be very close to uh in kind of grand cause of distance to to to an interval it should be kind of one-dimensional object and then uh so it will be kind of very long seen cylinder injectivity radius says that it's big so it like sits in the euclidean space but then this uh along and since cylinders are not calomorphic do not satisfy Kashi Riemann equation badly yeah so yeah so that's uh rough rough idea and it's really different criteria so it's uh it's not related to one and two in in in any way yeah and this kind of fundamental equation for my future story will be the following suppose x omega c is halomorphic symplectic manifold and assume that it's uh is embedded is open dense open symplectic leaf to compact Poisson algebraic say Poisson vertex prime x bar um the question is in this situation x and I take real part of omega c which will be automatically real symplectic form admissible infinity so this is a station which I need for quantization and deformation quantization sense and this is for case sense uh so it's true for many examples yeah first it's definitely true if x is cotangent bundle explain it's in real case is it's okay or if x is c cross to c cross this kind of standard form to some power n on product of copies of standard multiplicative torus and also it's true if uh x is if dimension of x is a surface and and x bar minus x is a divisor not necessary with normal crossing so in surface case uh my story is a following if it's a divisor one can easily check it could be not normal crossing you make blow-ups to make it's normal crossing it will be still Poisson divisor you can reduce the equation to normal crossing in the normal crossing case this third criterion works very well because essentially you can have poles of order one and then you get kind of like cylindrical ends or pole of higher order you get very open ends and it's very easy to construct this metric it's a very rough picture also harmonic function and I don't know how to get yeah so this third criterion number three the third criterion is applicable and uh and as I think it's kind of not true at least not on the north true in the simplest example you can see the r4 minus zero and it takes standard form it infinity is a behavior it's okay but near zero it's wrong and it's completely parallel to kind of first count first example of non-compactifiable homogenous impact manifold c2 minus zero yeah so those are good indications that are all the same story okay so this is all about about compactness and that point is convergence of series yeah I think it's yeah that's a really main stumbling block in whole story for 25 years still open question so what we use now is kind of surrogate solution work over non-archimedean field for former series there's no field yeah so what really one what we need we need some tool to go from these former things to actual objects we need a tool which controls controls number of holomorphic disks uh of area lesson a uh you want to you want it to be growth it most exponentially in area so uh what is this what is the situation here uh there are some cases where we kind of understand a little bit more about 4k categories from homological mirror symmetry uh like green green tick three fault and so on and in this example it's clear that the radius of convergence is strictly less than one yeah typically you should expect to get some integer numbers and radius kind of should be one because coefficients of size one but in quintic cases radius converges strictly less than one and um it means that you cannot make if you try to make this is called mirror map it means that if if a class of symplectic form is too small uh then you cannot make unambiguously meaning what is 4k category you get ramified map to model space of categories from kind of killer model space and uh and i think it's also uh this problem with small area will affect this guk of written program they say that for any symplectic manifold blah blah blah but maybe for some simple in simplex form is too small the whole things will just break down uh yeah so yeah so this can so the conjecture is that uh uh in kind of uh that's under some conditions which we don't know yet kind of for good examples the whole things mn will be in kind of analytic part of the numerical field which is the set of the sums c i t a i such that sum over there exists a constant epsilon so that sum of sum over c i epsilon to power a i is less than infinity yeah i can see the kind of like convergent uh series with uh real exponents and now the last issue about more objects uh yeah the proposal is the following uh which is not yet materialized uh first we choose uh some lambda in x which will be compact uh singular Lagrangian subset so it's closed subset and what a singular Lagrangian um uh yeah for example it could be maybe sub-analytic if it's x is real analytic closed subset and and its its smooth locus will be Lagrangian sub-variety yeah so it's could have pretty horrible singularities maybe not so horrible kind of like and then the the story is the following this Lagrangian's set plus this orientation z gradient z gradient choice z gradient data which we have on our symplectic manifold so we don't do anything like spin structure on this guy at all so we have this trivialization of twice canonical class on symplectic manifold should produce a certain uh dg algebra comes like a lambda over integers uh and algebra will be of some the following uh may roughly of the following nature we'll get a maybe finite quiver uh then edges you'll have a set of edges you'll have a map to integers so edges will be kind of z graded and we can see the past algebra we get graded algebra is z graded and now we introduce some differential of the following form differential of each edge if each edge will be finite expression finite non-commutative polynomial non-commutative non-commutative expressions in these integer coefficients in previous edges uh so it means that a set of edges should be a set of edges is totally ordered yeah so you add some step by step you add one expression differential of this guy so you get some finite collection of some nice integer non-commutative polynomials to the square to zero you get this algebra and then uh yeah it's it depends only on neighborhood only on neighborhood of lambda and then uh what your manifold uh uh big symplectic manifold will do x omega will will give some not totally clear way a solution of marokatan equation for in for co-homological Hohschild complex for this algebra uh can you deform in co-homological Hohschild complex over Novikov thing for example and uh then the object uh yeah yes everything yeah no problem yeah but now one can uh if you can get this for a smart marokatan equation one can speak about finite dimensional modules uh finite dimensional representation of this algebra uh with depending on each bar so your algebra deform as well and consider modules over finite dimensional over Novikov ring modules over deformed algebra should be also interpreted as object of this fukai category x omega maybe be objects of enlarged fukai category yeah in the case of smooth manifold this thing is or something very close to uh group ring of the fundamental group we consider trivial representation yeah that will be like original object which we have so i'm sorry there you mean um in the in the algebra of Hohschild cotase is that what you yeah it's dg yeah did Hohschild complex is dg algebra okay so so basically it's an infinity algebra right it's an infinity structure but also this m0 maybe some things okay yeah but it's yeah so um what is the rough idea of this algebra about this algebra i think this this situation is more or less stabilized now uh yeah i suppose you get this like graph manifolds like on plane you get a graph yeah just this is just simple not true yeah then i take a small sorry l l m lambda or a lambda a lambda rough idea of a lambda lambda is subset yeah give a lambda is given i don't know what is this empty set yeah if you get uh modules over a lambda should contain inside the contact lagrangian which means that it's bigger than fukai yeah no the original fukai it's a smooth lagrangian but it's it'll be singular lagrangian some kind of shift data could be empty no for any lambda for any lambda and then we take inductive limit for all possible lambda yeah yeah one can if one if one sets it another one category sets is a full subcategory in another yeah so um the story is a funk this lagrangian manifolds this single lagrangian manifolds are more or less the same as kind of what's called Weinstein domains because um they appear in the following query uh you have open neighborhood of l and vector field xi uh set it let's say league psi of omega now it'll be minus omega to kind of opposite to the things which we have at infinity and suppose this xi at boundary looks inwards is directed inwards oh so so you really need the main on which restriction class of omega is zero in second commode class and you choose the representative which directed inverse and then they apply the flow so it's the things start to contract it and then if it's contract to something singular lagrangian guy and converse the singular lagrangian guy is coming from this neighborhood yeah so it's um okay but uh yeah so it gets this flow which uh contracts in practical form and you get the singular lagrangian but now you do the following flow uh on the same u uh you consider something like epsilon neighborhood of l it's a metric you can see the Hamiltonian flow which is lambda lambda sorry l lambda yeah you can see the gradient gradient of distance function to to lambda you can see the gradient of the distance function and um so you get some flow which now uh exist uh completing both in positive and negative direction so it's because orbits stay in a compact sets get the flow and what will be this uh very roughly it's not exactly this quiver you can see the i'll describe actually not some algebra which will be why is it amorph to a lambda uh namely what what i do i have this my this neighborhood and now i choose choose uh points p alpha in a connected component each one you can see the smooth locus of lambda it has several connected components like here this this interval this interval this interval in in each kind of point choose at least one point of lambda smooth then you can see the uh transversal uh lagrangian disks disks and endow with z-grading in the sense which i uh allow explained z-grading using lift of some argument function then we get something from which we can hope to make homes uh and and now uh consider following algebra some of all alpha beta and you can see the inductive limit when time goes to plus infinity uh of c and now you would do you the following if you get alpha and beta you start to apply the flow and then the disk became start to interest uh move and the alpha square two-dimensional disk what are you two denotes nothing the alpha two it's one dimensional in your picture it's in graph you take oh sorry like n n n dimensional yeah it's n dimensional disk if i if i n dimension to n you're right in this case it's one dimensional disk and you can see the intersection points of you apply a exponent t times the flow which i explain explain before this Hamiltonian flow with respect to distance function to d alpha and intersect with d beta you get infinitely many points yeah so this i think the simplest example if you take lambda is a circle and if you get one guy and let's see and you start to apply this flow many many times you get you get things like this intersection points will be larger and larger set eventually get basis of monomials in Laurent polynomials all these intersection points home from uh from home in this category from the disk itself is this inductive limit will be exactly say uh get all around polynomials yeah that's uh that's a typical example and um what is the state of art what is the specter that's alpha is alpha lambda is section of core shift of algebras maybe categories and uh and uh gamma in homotopy sense uh and on smooth locus beta categories i would say maybe i said perfect i modules uh and on smooth locus this category is equivalent to uh finite dimensional complexes of a billion group and uh and globally it's twisted a little bit by the second stifle stifle Whitney class uh um no one can shift twist this shift of categories by second but any class in h2 in z mode 2 of of of of of lambda lambda smooth lambda smooth yeah and uh for example in this one dimensional example if you consider triple point uh then what will be local is this category local is the category representation of quiver a2 we'll have three complexes e1 and 2 e3 and they form exact triangle and it will be the same as the representation of quiver a2 this exact triangle so on more generally if you get such guy with kind of k spikes you get representation uh of quiver ak minus one um yeah so that's a very beautiful story which i will not talk to you if lambda is smooth what is a lambda a lambda um if you forget about this z mode 2 it's chains or you can see them suppose it's connected manifold and choose base to the base point then you have a topological monoid loops from from the base point it's it's monoid and you can see the chains or singular chains of this monoid to get dg algebra negatively graded this will be a lambda yeah that's if it's a lambda escape a one space it's a group ring of the fundamental group it's a generalizational group yeah it's a nice object yeah and what i want to say is that there was a kind of breakthrough work by david nadler he proposed a finite list a finite list of possible singularities in any given dimension for example in real dimension 2 it will be uh at most three valent graph it will be one val maybe maybe not just maybe so just question it's about complexes and some exact triangles the whole whole category and it comes called arboreal singularities in high dimensions and what is not yet done uh how to so he deformed any uh single kind of lambda without changing homotopy tape to something with uh this nice singularities yeah for example for for graphs you can deform to some trees yeah kind of that that's a picture which doesn't change the category and um what is not done is how to construct this more cartoon class so how to count holomorphic disks with a boundary on the singular agrarian get some contributions uh yeah it's i think some people working committed it will be done in some finite future at least for this nadler's class of singularities yeah so it will be so it's almost as a good science no and now i think i'll make a five minute break i'll try to formulate certain trajectory unfortunately because of troubles on both sides it's not not really yet mathematical conjecture uh and uh conjecture is if only x x omega is let's say algebraic symplectic manifold uh and we choose for differentness that's a Poisson compactification with some Poisson structure uh and such that x bar minus x is let's say normal crossing divisor uh and suppose also you get some class class b zero in each two x bar to pi z i had some kind of seeds from which we can make deformation quantization and and as i assume that i extended to to an analytic germ of germ in each bar of uh quantum categories suppose now i have a family of uh maybe just a second and suppose i have a formal path to the more cartoon space of the following dj algebra consider r gamma of x bar and consider poly uh logarithmic poly vector field like a divisor have a form section that says first derivative coefficients of h inverse will be omega inverse then Poisson structure gamma of h to power one will be gamma and some kind of formal path then i get a family of categories i can twist them by also baby zero and what i want the things to be would be analytic germ in each uh analytic germ in each bar and uh yeah that's some part and then i kind of want to speak about object also analytic analytically depending on each bar yeah then for each bar less sufficiently small will should get a category of objects in quantized in quantized oh it's maybe maybe yeah it's maybe yeah it's yeah it's yeah it's it'll be very not precise and very long yeah that's that's the problem yeah that's the formulation of kind of left hand side of conjecture then i get category of object in quantized category uh uh such that the restriction to the boundary is zero yeah i recall you that uh by this logarithmic formality theorem uh one get not only one category but category for each divisor for its intersection then one have in functors and then one can ask about object whose restriction to the boundary is zero it will be analog of holonomic modules to get some some category and what will be another category uh when you get this thing in particular you can look what goes on inside of this story you you forget you can see the map from the small carton to the open part and inside you get a class in in what in h2 of x you can see the restriction uh you can see the solution of mark a ton in you restrict to x a gamma of x and call the story and then the simplect case there was a story in the first lecture which you missed uh but yeah that that's uh that if you deform formally deform open simplectic manifold just in an electric case you get a formal pass and second commulger with zero it's it's it's kind of separate it's it's just camp is a free addition forget about b0 uh you get a class which is omega of h bar and maybe you should add b0 later on yeah because modulo 2 pi i z let me say which will be plus b0 this class and now um what you do you make fukai category of x is a real part of omega is simplectic form and as b field will be b0 plus correction term repart or repart of omega plus real part of correction term and plus imaginary part of correction term yeah so we make this abstract fukai story and the conjecture is that this is a natural equivalent and it will be a kind of Riemann-Hilbert correspondence in uh very general setup yeah yeah i don't like something i mean this you should probably scale for omega in the real part by page uh yes yes yeah exactly yeah that's it this hits that's it and here to get imaginary part of omega divided by h h is real or no you should put h inside the 3 o part omega oh yes yes yeah you're right yeah right yeah so you're taking h real no no no no all small complex numbers that's that's the main point to put uh not real but arbitrary yeah yeah so to to say the things i need to say something about z-grading it's kind of automatic in this case and let me explain why when you get a complex simplectic manifold uh the structure group of the tangent space is sp two n two nc yeah this sir and this is homotopic equivalent to unitary quaternion uh u n quaternionic quaternionic groups and this is preserved so it means that you uh each tangent space has like hyperkeler geometry uh situation and uh then it gives you a certain if you choose this structure you give you first some almost complex structure but also it gives you uh it gives you kind of like three simplectic forms so your original simplectic form is uh is omega one plus items i'm omega two on my manifold so the real part will be omega one and then uh you get also three complex structure and um for all complex structure compatible with omega one you'll have two or you'll have holomorphic two form and take exterior part of homework to form we get uh volume form at each point and this volume form gives this grading uh procedure as i explained yeah so it's the grading is completely automatic in this case in the space of choices is contractible so now so that's uh that's a big conjecture it's not mirror symmetry it's uh also it's uh one category below looks like a model you do some fukaya category with holomorphic disks and another category it's like b model you do maybe deformation of perfect coherent shifts but it's on the same manifold and uh the snow duality and that's a kind of new statement and not mirror symmetry and uh in fact i really don't understand deep reasons why it should be true yeah it's uh yes yes but still yeah and there are really um yeah it looks like uh first kind of almost pseudo signs because we don't have a fukaya category we don't really know convergence and uh so yeah um yeah so uh first let me let me explain why it uh it's really has something to do with Riemann hybrid correspondence it's um that's why it'll be smooth algebraic variety or complex numbers uh and in fact uh uh i want to stress here that it's what we choose on a uh let me say suppose we have not one variety but variety depending on each bar kind of holomorphically depending so why it sits it's maybe some complication and all holomorphically depends on each bar uh like you have not one curve but family of curves depending on each bar then as a category we take a variety which is cotangent bundle which is just compactified fiber wise we pass on manifold and uh uh acclaim if you had just family of variety we can consider particular family of this categories and categories which you will consider category holomorphically depending on each bar will be um vector bar will be d models over y h bar kind of h h d models vector bundles on y h bar with h bar connection and uh all the story is the convenience for h bar non-equal to zero uh here we get a limit at h bar equal to zero you can see the uh what's called Higgs bundle Higgs bundles you can see the coherent shifts with complex support on cotangent bundle and support and direct image should be vector bundle on y now so you get uh these things and uh this focac category in this case will be um for for cotangent bundle consider local object of this focac category is representation of fundamental group no this is people people proved it and how and how is how is the constructive factor if we get cotangent bundle to uh uh uh let's let's let's simply assume that uh why why is compact it's to also for non-compact case if why is compact uh people people i think maybe abuser it proved it and the proof is the funk you get cotangent bundle and it took focac category in whatever version it is lagrangian many faults with local system or the singular lagrangian blah blah blah no no it's not representation of p1 it's it's it's kind of uh focac category it's going to be called constructible shifts uh with uh with locally of y with locally constant co-amology yeah that's with the right notion yeah it's not representation of p1 yeah and what is uh what is kind of the reason uh if you have uh object of focac category l yeah focac category maybe with something then consider different guys consider cotangent fiber it's another uh lagrangian guy a little bit non-compact but it's it's not really a problem here because the intersection will be compact when we get compact the space of disk we get uh homes bit from one to another uh home from l is well defined and we get some finite complex of vector spaces finite dimension complex of vector spaces but this object if you change shift y it will be Hamiltonian deformation and it shows that its objects are isomorphic and it identify homes this gives you uh uh roughly this sorry that's part of another thing of no yeah are not constructed eventually follows from all this stuff yeah yes yeah and then that's how you map uh object focac category to a local system and then eventually people can handle to prove that it's equivalence yeah but it's kind of very simple case uh it's a local system but we in last lecture explained some singularities the regular singularities and so on this can be done and add to the I think in the following way at least for the case of cotangent bundle of curve suppose it's y is a how we see is a curve uh then consider cotangent bundle uh again compactify but actually will be only first compactification I will do something else yeah so I remind you what I get I get a kind of cotangent bundle and at device at infinity that's projects to my curve y at this device are uh two has second order pole and let's assume for simplicity that y is compact curve then if I interested in some demodules with some singularities what I do is start to make blow-ups start to make Poisson blow-ups and uh and if I make blow-ups I can get different order of poles or different order of zeros of Poisson structures eventually there will be certain uh devices when I have first order pole and this first order poles correspond to irregular terms in formal classification of demodules yeah so I get to surface certain uh first order poles and uh kind of semi-classical picture which we considered uh spectral curves with something which intersect this there's infinity only this smooth point of this first order poles but now I can do uh something new I can take a point of this device and get first order pole and make again a blow-up when I make a blow-up exceptional divisor will have zero order poles so it will be part of larger symplectic leaf so I'm making new symplectic manifold and I can do it several several times several times and eventually if I have any uh curve in my Cartesian bundle by these blow-ups I can achieve the situation that it's infinity meets only first order poles but after many many blow-ups I can make it compact uh completely yeah so so this procedure gives some kind of modification of categories of demodules if you look uh what you're doing here uh yeah essentially you should choose uh if you do blow-up ones you do uh the following things this recalls that uh devices when order of pole of omega is equal to one uh they canonically identified with c they have canonical coordinate by they're canonically identified with c and coordinates it's better denoted by something called lambda and um just in the case of regular singularity if if make blow-up ones will be this coordinate lambda here uh and uh so if on each device I put so fix some collection of finite collection of complex numbers for each such for each logarithmic divisor uh this lambda i and then I make blow-up I get a new uh points of the symplectic leaf uh so what what what does correspond in terms in terms of demodules just let's speak about regular singularity I suppose I get on a formal disk uh I get a bundle with connection with logarithmic poles and uh all this data will say the following I identify uh so I get a bundle interest not not just meromorphic bundles but bundles over cz with this uh uh set at delta it'll be um delta zero d d z will be uh has no has no pole zero so it means that connection has first to the pole and then if consider residue of connect over the connection will be endomorphism with a fiber at zero uh uh the data will be the following I will identify e will identify with direct sum over i uh e zero e zero i and residue delta uh preserve preserves uh on e zero i will be lambda i divided by each bar times identity operator yeah so it becomes so this will be all again values uh will be no Jordan blocks and again values are fixed and actually it's quite a good formulation because uh like exponent of these numbers can coincide for certain h bar but still I separated this logarithms and if I make additional blow ups I can also handle Jordan blocks I don't know what to do in high dimensions but uh this is kind of a way to go from uh d modules to something uh which in a classical limit has compact support inside the simple electric manifold and this is the modification of category of d modules uh in this case really I consider uh this formal classification I also choose some uh sub lattices and such sums yeah and there's a similar story in FUKA in in FUKA category uh in fact here's there are kind of alternative uh theory but I think this the compact one is better the alternative theory is um consider not objective is compact support but uh such a restriction will be shift this finite support on this union of logarithmic poles uh not make do not make blow ups at smooth points points of log divisors so we get in other boundary conditions the restriction of zero that would be something and on FUKA side you can see the partially wrapped FUKA category uh but if we do blow ups we consider just just just compact yeah yeah it'll be slightly different category and uh this partially wrapped is not kalabiyaw it's what's called pre-kalabiyaw it's uh and partially wrapped uh roughly means the following that's FUKA this this my manifold x and now my Lagrangian lambda for example a single Lagrangian can go to infinity in certain direction and then I when I define homes I start to move a little bit things at infinity yeah so it's some story maybe I'll return to it next time and in this case the relation with the stocks filtration will be the following it's kind of a rough picture looks data I recall you that the stocks data we interpret geometrically in case of curves not not so this is the regular terms we get a compact curve we get some points and and then at points we get certain the stocks diagrams and these stocks diagrams we can now extend so a conical real Lagrangian guys so it will be some kind of non-compact we get lambda sitting in cotangent bundle to surface non-compact singular Lagrangian and the nice property here this case there's no correction in this case there's no correction from holomorphic disks it will be exact Lagrangian no deformation of a lambda and then this a lambda in this case modules will be exactly a better description of Riemann-Hilbert correspondence and it's related to the whole story this complex story is that the cylinders go to this logarithmic devices infinity and the picture how or how to map map from fukai category to this identify the stock's data essentially the same they can see the homes with vertical fibers but when we approach the singular point we deform them a little bit and eventually we see these filtrations yeah so it's I think because the intersection points of the this when we consider this vertical fibers approach singular point then we'll kind of intersect these things it's in several pieces and yeah that's that's roughly the story yeah yeah you can try to think that's object of fukai category it's something we support close to this guy and then the intersections with this vertical fibers will be yeah similar I think also explains this Riemann-Hilbert correspondence for quantum modules my axis like this I put this inflectic form and I have algebra algebra will be c of depending on on h bar z1 hat plus minus z2 hat plus minus modulus of relation z2 hat z1 hat this point of h bar yeah so I have this algebra and again one the complication is let's say some toric surface and so we get toric surface so it's it's a boundary we get a bunch of c star think of c stars and if you have such post on surface then we consider modules said that let's say in the classical limit the curves which do not go to intersection points or zero-dimensional they all go to other devices so in tropical limit you get some something curve which goes tropical only several directions and eventually one can make blow-ups at these points and make the c compact if you if you want to go to one language or go to this wrap for k if you go to another language actually wrap for k it's not a very bad case at least for absolute value of q less than one now for if it means that h is not in ir actually how to map for k category how to map to coherent shifts on elliptic curve plus two anti-harden or extreme filtration which I explain in the last lecture yeah let's assume this picture in this diagram I do not have vertical directions change applies to the transformations and don't have vertical direction then I get a vector bundle with two anti-hard signal filtration and the picture is a falling you can see the like in previous story you can see the home from object which will be the following it will be for each z w you can see the c star z one equal to z and w arbitrary it will be my c star cross c star I consider some fiber which will be Lagrangian sub manifold and local system will be of rank one and is even and monodrome is multiplication by w and I consider this is unobstructed object of of k category is then I can make a home from this things to your object and what we get we get something holomorphically depending on bundle on c cross coordinate z times c cross is coordinate w it's not locally constant because the deformations are not exact but there is some again piece of wisdom in this for k category if you deform Lagrangian manifold by non Lagrangian deformation gets a first commulger class of it is a speed of deformation it's equivalent to twist make local system with this first homologous class and then it's easy to see that this homomorphic bundle has flat connection a long fallation kind of holomorphic one fallation given by vector field z d o d z minus 2 pi i over h bar w d o d w so on c star c star square we get this holomorphic this home side don't change this direction and the quotient space will be elliptic curve exactly this elliptic curve and similar if you approach now go z goes to zero to infinity then this intersection points will separate in several groups and you get filtrations yeah so that's automatically if z goes to zero or infinity you will get two filtrations yeah it's all looks like some kind of pseudoscience yeah because i cannot have get precise definition of okay category i don't know convergence blah blah blah but there are some corollaries which are completely rigorous at least one get rigorously formulated conjectures first the first i think it's uh this correspondence for uh Riemann Hilbert correspondence for quantum torus hypothetically generalized to high dimension generalized to high dimensions i can see the c star cross c star standard to power two n the algebra will be a h tensor n i consider this product of arbitrary number of copies uh what i can formulate i will give complete details in now but i can formulate uh the hypothetical equivalence n and yes you're right uh and let's and let's uh x real normal set less than one and assumes that it's then holonomic h bar for n modules are equivalent to certain explicit category uh which can be described completely rigorously using all this machinery and the category is the following it will be inductive limit uh of some full subcategories under what set i consider uh Lagrangian fans in z to n q in r to n what is it maybe i denote some again lambda lambda is finite union or some finite union of some pieces and lambda alpha is uh uh is a convex full-dimensional cone in uh certain Lagrangian subspace and alpha is defined over rational numbers and cone with kind of rational it will be also rational cone and with the properties that uh intersection of lambda alpha is lambda beta uh interior of lambda alpha is lambda beta is empty for alpha and yeah so good there's some kind of yeah i don't know how to draw four dimensions you get some kind of arbitrary correction of this uh convex cone meeting each other and then for this correction uh one can make certain dj yeah this is a typical singular Lagrangian guy and then we get this small neighborhood and then we get this whole algebra and lambda and in particular we get this transversal disks and homes between them we get certain um dg category over integer seven or subject objects uh a set of alphas using and this in fact can be calculated completely explicitly because in this conical situation it's easy to reduce the conical in cotangent directions case and reduce to serial of shifts with some microlocal support so it will be uh totally elementary object yeah in the one dimensional example or two dimensional yeah example you you have the tight curve so to speak yeah so in the higher dimensions are you getting some uh to write all the generations of a billion varieties yeah related to those fans no no no there's no a billion no it's will be power of curve at the end of the day it's nothing yeah yeah i have one yeah yeah but uh but what is uh the story we have this algebra we have this category maybe called c lambda uh and now uh consider another category consider perfect complexes of the ends power of elliptic curve is my elliptic curve yeah uh you get a certain another category um b and for each a Lagrangian rational then this category there was something nice here sp to nz maybe universal cover acts on b my free mokai transforms then b contains certain category b zero b maybe horizontal explain in second way is until it will be perfect complexes this is finite support or zero dimensional support on e to power n just bunches of points and some commuting important operators this category is is a invariant under jl and z it's preserved by action of jl and z just acting by automorphism of e n and then it implies that um by equivalence if you consider quotient space it will be kind of like z covering associated with grading of the set of all rational Lagrangian subspaces jl and z stabilizer of one subspace and from one subspace and go to another in the covering of space of rational Lagrangian subspaces that means that for each subspace you get if you choose this on z grading you get um will define category and now uh this kind of right-hand side of rim and Hilbert's correspondence will be the following it will be functors from c lambda to b category of functors such that uh for each object object alpha maps the object in this corresponding in uh subcategory corresponding to Lagrangian subspace l alpha yeah in the case when n equal one you'll get exactly this original this picture with these filtrations because you just get a bunch of rational arrays this subcategory will be semi-stable think with the slope and then you get if you analyze what i think it means they get two filtrations i think yeah now so that's uh one uh kind of non-empty in precise statement and it's amazing that's works in high in precise conjecture and amazing that's works in high dimensions so it's much it's kind of cleaner cleaner than d modules when you have this irregular singularity so it's really really much simpler and another statement which is uh almost precise it uh when we get this in big correspondence we get some families of quantum spaces and then uh 4k categories but then different families can give the same symplectic same classes in h2 like for example consider d modules and you change the curve yeah so you get extra parameters which you cannot see in 4k side uh and then it says that uh if forget about 4k categories it says that uh this object with compact support in the quantum cases the isomorphic under some kind of isomandromeda formation yeah that's it's purely maybe it makes sense or even our formal power series yeah so it's it's kind of interesting statement by itself without referring to 4k categories because we get two more parameters on uh complex side can you give me an example no you for example have family of curves depending on each bar and consider each bar connections the claims it's uh you get equivalent categories for any two families constant family or no constant family yeah okay thank you


All righty, welcome back to 105. So we get to do some more recursion today. So just as a reminder, recursion, kind of a hard topic to wrap your head around, but really just two rules. So a recursive function is a function that calls itself and we need two things in order for it to be useful and to actually give us some result. So today I have some props, so we get to figure out a fun toy, but before that we'll go over some more problems. So we need two things. We need first our base case, so that is a simple solution that we know, and then we do a recursive step. So we reduce the problem and solve it in terms of a smaller version of itself and those are the only two things. We don't have to, for some problems, we don't have to think more than that if the solution is really, really complicated. All we need is these two things and then we actually have a solution for it. So another thing we could do is compute the greatest common divisor, typically another prime example of using recursion. So the greatest common divisor or GCD of two integers, A and B, is just the largest integer D, that is a divisor of both A and B. And for the purposes of this, we'll just assume that all the integers are positive and greater than zero. So there is a algorithm for this called the Euclidean algorithm, and it says to find the largest common divisor between two integers, given that A is greater than or equal to B, all we have to do is to find the greatest common divisor of A and B, just replace it with B as the first argument and then the second one could just be A mod B. So basically we get the remainder of the larger number and we just recursively do that over and over and over again until eventually one of the arguments becomes zero. So we have a zero divisor, which means that while it divides evenly and then that remaining number would be our greatest common divisor. Don't worry about this algorithm, this is all in the math, we will just worry about actually implementing this so we can actually write a recursive solution to this problem. So what it would look like is, well, let's go there. So we can just go ahead and implement it directly. So if we're doing the greatest common divisor of A and B and we know that B is equal to zero, then that is our base case. So we can just return A. So A is actually D, which would be our greatest common divisor. Now this is a case where A is greater than or equal to B, then we can just return the greatest common divisor of, well, we switch the arguments. So the first argument becomes the current value of B and then the new value of B becomes A mod B. So we also have to worry about the case where A is less than B and for that, well, we can simply just do else and then return and just swap the two arguments around. So we make sure that if A is smaller than B, we'll just swap the arguments around and then suddenly it will become, this will be true because, well, now A will be greater than or equal to B. So for the rest of it, I use the other version of main because I don't want to have two scan Fs and hit enter a bunch of times because I'm lazy. So I just check that I have three arguments. So the program name and then two numbers that I'll give to A to I, which is our string function that converts the string to a natural integer. I'll check that they are both greater than zero. So if either is equal to zero or less than, I will just exit with an exit failure. Then other than that, I will just return the greatest common divisor. So if we think about the greatest common divisor between like 20 and eight, well, common divisors between both numbers are one, two. So two can divide evenly for that and then four and then that's it. So our common divisors are one, two and four. So with this algorithm, we should get the result four because that is the greatest common divisor. So if we run it, we get four. So fun, we can just implement it, get the greatest common divisor. Works for arguments if we reverse it to. So if we reverse it, we get, go ahead and we get, the first call is A is eight and B is 20, but then we would go into this else statement. It would go ahead, swap them around and now we would get what we had before. So how this would work is if we call GCD 20 and then eight, what's going to happen is in this case, while 20 is greater than or equal to B, so we would do swap them and then this would evaluate GCD of eight and then we would do 20 mod eight. So what's 20 mod eight quick? Four, all right, so it's just four. So this would evaluate to four. So in order to do GCD of eight and four, well, we swap the arguments, we get four and then we would get eight mod four, which is just simply equal to zero and then, well, whatever we call this function, this would hit our base case. So this would just go ahead and directly return four and then we go ahead, we get four as our final answer. Why this works, you can ask math people, but this is how our computer would actually go ahead and evaluate all of these. So let us get into some more examples. So here's that, so you can have it. For more practice, if you want, we could write this in terms of a loop as well. So you could try and solve this using in terms of a loop if you just want to get some more practice with C and converting these two things and just thinking about solving the same problem in the same way. So another thing we could do is, well, recursion looks a lot like loops. So maybe we try to count to five recursively. So let's stop and think for a minute that if I was to use recursion, how could I actually count to five recursively?  So let's think of the two things we need. We need a base case and then we need to just solve a single step of it. So I will give you about a minute or two and then we can, yeah, a minute or two a think, then we can try and implement it. And as a hint, we'd probably just want to write a function that returns nothing and we just give it an int of the number of numbers to count. So it should print out like hopefully one, two, three, four, five, if we give it a count of five. All right, any thoughts? So what is a, well, what would be a good base case in this scenario? If I want to count, if I give it n of five, I want it to count down like one, two, three, four, five and that's it. Yeah, so n equals one as a base case. So if n is one, what do I want to do? So, well, in this case, I just want print, right? So just print n, okay, and then print and then return so that I'm done. So this would be my base case. Okay, then what would I want to do as my recursive step? Anyone for the recursive step then? So just count n minus one. So I should just count one less and that should work. Yeah, print, where do you want me to print? Like, oops, so print here. Do you want me to just put like the count thing here? So that's gonna be the same as if I do, well, count doesn't actually return anything, right? So if I put count here, it doesn't have a value so it's not gonna work. So I have to do something like that. So that, okay, well, let's try it. So build, boom. So yep, one, two, three, four, five, six, seven all the way up to five. So what we could do instead, if we want to get rid of one print f, well, we could think of our base case as just n is equal to zero then we don't have to do anything. So we could just return and now we do that. So we call count of five. Well, in order to do count of five, we have to count to four first. To count to four first, we have to count to three, then we have to count to two, then we have to count to one and then we have to count to zero which won't do anything. And then we'll go ahead and then print one, two, three, four, five. So this is pretty much exactly the same as just doing a while loop. The only thing that might be confusing is what happens if I do that instead? So if I move the print before the recursive call. Yeah. Do it backwards. Do it backwards, right? So in this case, if I compile it, I run it, now it's just backwards. So I get five first, then four, then three, then two, then one. And why is that? Well, I do the print F before I do the recursive step. So if I call count of five, well, first thing it's going to do is go into the recursive step, then print out five first before it recursively calls itself. That would call count of four. So that would go into the recursive step. It would print four, then do count three. Then count three would return, or print three, then it does count two. Print's two, does count one, prints one. Then it calls count zero, and then count zero does nothing. And then the whole thing just returns and returns nothing because it is a void function. So everyone okay with that? So print F, so with recursion gets a bit weird. You have to think about what happens in what order because just moving a line by one suddenly just changes counting from five to one to one to five. So this will become more important later, but I'm showing you this now just so you can kind of wrap your head around what happens if I just move a print F line if I'm calling a function recursively. So do, do, do. So here is the solution to you. I just remove the else statement. Otherwise it's exactly the same. So what about computing the sum of an array recursively? Ooh, can we do that as more practice? So let's think about how we would write a function to compute the sum of an array using recursion. So I'll do this. So we've wrote this function before using a while loop or a four, sorry, a four loop, but now we can go ahead and just practice writing it recursively. And good to get into this mind of thinking because when we try to solve a baby's game we will need to think recursively. So let's think about how we would calculate the sum of an array using recursion. So I will give you a minute or two to ponder this and then we will try and do it. And it's just going to be an integer array. So if I wanted to, I could write it like this, but remember array decays a thing means the same thing. I'll leave as a pointer. All right, anyone with an idea or a solution to this? Yeah, so my base case could be if the array length is one. Oops, if the array length, all right, let's do some other practice. If I do this, is that smart? No, that is assignment, not a equivalent. So here, so this is my base case. Here I'll go ahead and write in a comment base case. So if my array length is one, what should I do? Just the returns of value of the array. So what would the first element, which would be index what? Zero. So just return index zero. Okay, sure. Okay, then what about my recursive step? So what should my recursive step be? Recursive step. So how do I solve it in terms of itself? Yeah. Yeah, so use the first element and then, well, I need to return. Yeah, so I could do first or second. So if I start with the first, let's just say we start with the first, what should my smaller problem be? Yeah, so I can use pointer arithmetic here. So if I do array plus one, that will go to the next element. So I'm adding this number and then I'm trying to add a smaller array. So I'm doing the sum of the remaining array minus the first element. So that would be array plus one to move that pointer forward one. What should I do with array length? Yeah, array length also needs to go down by one because I'm making my array one smaller. I'm moving an element, so I also need to adjust the array length. So, and then I need to make sure that I go ahead and I return something too. So let's see if that works. So let's compile. So in my main, my array just has the elements one, two, three, four, five. If I add them all together, it should be 15 if we have written our program correctly. Then I use that funny array length macro I had before because while it is defined and declared in the main function, so array length would work. Array length, this array length macro would not work in the sum function because of array decay. So here I'm just printing the result which should be 15 if we implement this correctly. Boom. Cool. So we got our answer recursively. We could also go ahead and just add the last element to the back, means the same thing. I could also change my base case if I want so I could just say maybe I wanna cover the case where the array length is zero. Maybe I just make my array length, make my base case the array length of zero and just return zero. So in case you pass an empty array, maybe we get a proper solution for that but same thing, I'm just going to get 15. All right, cool. Any questions about that? Alrighty, so we are experts now. So again, here you have the solution in your slides means the same thing. So you could think of another solution here. Let's go ahead and think of another solution. So you might be like, oh, okay, well, I should just go ahead and maybe I just add another argument to here that just says, I don't know, the current sum. So add another argument that has a current sum and then my base case could be if the array is empty, well, then I should just return the current sum and the idea is going to be, well, I keep on just keeping track of this current sum. So I could change my recursive step instead of being this. We have the same idea where we sum the smaller version of the array by one but we would just take the current sum and then we would add the current index to it instead of just returning the value directly. We'll just use a function argument for that. So this will also work. The only difference is, well, I should just give my current sum as zero whenever I am using it but other than that, if I go ahead and compile it, this will work just fine. So another solution if you wanted, technically this is like, if we remember the tail recursion thing, we don't have to remember, this is like the tail recursive version of it. So you might see a function like this and be like, well, why does it have an extra argument? That is real ugly to use. I don't want to have to remember to put a zero on it. Like I just want to sum an array. I don't really care about this extra value. So if you happen to think of this as a solution, it is all right but what typically you do is you just could rename this as like a helper function. So generally, if it's a function that you're using for recursion, that you don't want someone to actually use, you might call it a helper function, just something us weird programmers do. So we instead rename it helper function and then we could instead define sum just using those two arguments so that it's a bit nicer to use. So I don't have to remember to use the third argument and for sum, its implementation could just be actually just using the helper function, passing in the array and the array length and then just setting the number by itself so that when I go to use the function in main, I don't have to remember to go ahead and always tack on a zero. So now I compile and run that. I get 15 again. Again, means the same thing. Just if you do happen to think of an easier solution that just needs more function arguments, typical thing to do, write a helper function, go ahead and just have a function with a better, less arguments and have it call that helper function for it, for you. So any questions about that before we get to actually figure out how mean parents are to their babies, apparently. That will make sense in a second. So, let's see. So, okay, so now the thing that will make sense. So, there is this. I don't know if you can see it.  So this is the Tower of Hanoi. It says, let's see, who are we got? We got 36 months plus. So I hope everyone is of age for this. So hopefully we can solve this. So has anyone ever seen this before? The Towers of Hanoi. So we have one, two people. All right, so I'll do a simpler version of it. So the rule is, all right, I have a green screen effect on, apparently. Oh, right, I do. Can I turn that off? Filters, look, you can, filters. Hey, there we go. All right, so green screen effect removed. All right, so the rule of this game is they are three, what do they call them? There are three, let's call them rods. And our goal is we want to move all four of these discs from this rod to this rod. And the rules are as follows. I can only move one of these discs at a time. So I can only move one disc at a time from rod to rod. And the other rule is that, see how they are different sizes. So it goes from big to small. The other rule is I'm not allowed to place a big disc on top of a small disc. So I'm not allowed to do something like this. This is invalid, we are not allowed to do that. So the only valid move I would have is to do something like this. So using those rules, we need to get all of these discs from this over to here, following those rules. So let's make it a bit easy first. So if I just have two discs, what's my first move? So I have to move this, let's see, should I move it here or here? All right, one, two, three. So I'll call them one, two, three. So we got twos, all right. So drop this here, allowed to do that. All right, so now with this disc, I can't do that, but I can do this. So that's fine. And now I can take this disc, move it here. Oh wait, that didn't do anything. All right, this is why they give it to the baby. All right, so I can move it there, boom. So that's solved. So how many steps did that take us? So in order to move all these discs from this peg to this one, it was one, two, three. Not too bad, all right. So let's do hard mode. So now we got three. All right, should I move the green one to disc two or three? So A votes for two, votes for three. All right, everyone's smarter than I am. All right, so I do this, okay? So now I only have one move, right? I can own, well, I could move the green one back, but that wouldn't really make sense. So I can only move this one. I can't move it on top of the green one because it is bigger, so I have to move it here. So now what should I move? The green one, where do I move the green one? Here? Okay, the green one goes here. All right, so green one goes there and now the blue one can move to where it should go. Okay, and now the green one, oh no, okay.  All right, so how many steps was that here? It was easy solve. All right, so that was what? One, two, three, four, five, six, seven. Four, five, six, seven. Okay, so how do I solve this with four deaths now? Yes, this will be on your final. And remember, so yeah, you only have to be, what's that, three? Why is it in months? Why doesn't it just say three plus? I don't know. It makes you feel older if it's in months. All right, so this, this, where do I want to move it? Let's see, votes for two? Okay, three? Okay, no, all right, so I move it here. Okay, here, yeah, here, here. Oh, you got bamboozled. So I'm not doing this. So this is too hard. So did anyone think of how to solve this recursively? So did anyone catch it while we were solving it when it was easier? So maybe here, let's do four again. So see if you can spot any recursive steps here. So what did I do? Make sure, anyone spot anything recursive? So was there at any point I solved this problem? So this is essentially, the problem is I have four disks. I want to move them from rod one to rod three using rod two as just kind of a spare rod that's chilling around. So is there a way to solve this problem in terms of three disks? So this could be my smaller problem, right? Just having three disks. So anyone want to tell me how I solve this problem in terms of solving these three? So you're thinking of just in terms of smallest disk what's happening to that, right? They kind of follow, but we want to think it in terms of like solving it with a smaller problem in the case these three, yeah. Yeah, in terms of smaller problems like a recursive problem. So I want to move these four disks from rod one to rod three. I can use rod two as a spare. Well, my recursive solution could be, well, if I put it in terms of a smaller problem, well, I really just want to move these three disks. So this is my smaller problem. I want to move them to rod two using rod three as a spare. So I could use that whatever I want. And now, well, this is my one step I have to make.   Again, it'll be on your exam. So then after that, my other thing I need to do is I have to move these three disks. So again, another smaller problem from rod two to rod three using rod one as a spare. So I do that, right? So that works even for this. So even if I have eight, so eight, that is eight. So even if I have eight, well, I could move seven to disk, or to rod two, then move the big one to rod three. Then I would take these ones, all seven of them, and move them to rod three. And then I would be done, right? So let's write a recursive program for that. Because it turns out doing this recursively is a lot easier. So let me go ahead and switch. All right, we will show these babies what for. So I'm going to define a function. So I'll give it four parameters here. So an int of the number of disks I want to move. And then I'm just going to give an integer number to the from rod, and then one to the to rod. So I'm moving from, in this case, how I want to use it is to solve a problem of moving any number of disks. I'm moving them from rod one to rod three, like I numbered them in the example, and then I'm using rod two as my spare rod. And then with this function, I want to return the number of steps I need to take. So I'll give you a hint for our base case. We're going to print the number of moves and just go ahead and keep track of them for my base case. While my base case is if I have no disks to move, then I don't have to do anything, right? I can just return zero. I'm not moving anything. Don't have to do anything. Don't really have to worry about anything past that. So what was my recursive step? So I want a new variable called steps. So let's go back. So how would I explain my first step? So my step should be, let's see. So if I have n disks on rod one, I want to take n minus one disks of these. And then if my goal is to get this whole stack from rod one to rod three, well, I need to take my big stack, which is n minus one, and move them from rod one to rod two, right? So if I just go ahead and try to program that, well, that should be Hanoi disk minus one. So that's my current disk, my from rod. So initially it's rod one, two, and three. So I'm just giving them numbers to be more generic. So they start on the from rod, but I want to move them to the spare rod, right? So their destination, which is the second number or second rod in this function argument, basically this argument, I want to move them to the spare rod and then I'm using whatever was the two rod as the current spare rod, right? So that's one part of the problem. And then my other step is, let's see. So that should solve this part. Now I need to express just moving the big disk from the from rod to the two rod. So I can just say, move the disk to rod to rod and then that also counts as an additional step, right? So I just add one to the steps because I just moved the big one. Then the other part of the problem is the last step. So the last step is to move this current stack, which is N minus one disk from the current spare rod because that's where they are all the way over to the two rod like that. And then I can use this one as a spare. So if I go back to it, I would do steps plus equal Hanoi disk minus one. So currently they're on the spare rod and then I want to move them to the two rod and then I can use the from rod as the spare rod and then just return the number of steps. So that, believe it or not, that's the whole solution. So now if we go ahead and build this, assuming I haven't screwed it up. So you could see solving the Hanoi with one disk. So it just says move disk one to rod three. That's the same as we got, right? We just moved the disk to rod three. We solved it in one step. What about two steps? Well, it says we moved disk one. So I ordered the disk in terms of, like disk one is the smallest then disk two is slightly larger than that, then disk three. So this says move disk one to rod two, move disk two to rod three, move disk one to rod three and then we're done. Now we can give it with two, three, make sure that it matches so it was seven steps like we did before, it seems to work. Let's, what's my time? Oh yeah, we got time. All right, so here is with four disks. So this is about where I maxed out and my intellectual capacity got exceeded here. So let's see if this one works. So you can still kind of see it. So first step it says this is disk one, two, three and four. So it says move disk one to rod two, move disk two to rod three, move disk one to rod three. So that's right here. And it says move disk three to rod two, move disk one to rod one, this is rod one, sorry, move disk two to rod two, move disk one to rod two like this. And see, this is the first half of our recursive solution. If we're just taking into account disk four, then it says disk four moves to rod three. And then we just do the same steps over again. Well, not the same steps. We do the other sub-problems. So we move disk one to rod three, disk two to rod one, disk one to rod one. And then disk three to rod three, disk one to rod two, disk two to rod three. And then the final step should be disk one to rod three. And it's 15 steps and we have a solution for it, right? So now to get off why I said this is mean to babies. So remember, the current thing is this, eight, right? How many steps do you think this takes? 2,000? So well, good thing we wrote a program to do it for us, right? So I don't have to worry about moving disks around for like an hour. So let's go ahead and see. So was that eight this? So let's see all the instructions that will give us. 255. So now you can see why this was designed for babies because if the baby is really, really smart, still takes some 255 steps to do it, which should keep them occupied for like a good hour or two, right? So this is why this is a good child's toy because provably it just wastes their time. So, and it gets worse. If your child's really, really smart, this scales up, right? I just make my own little disk and then give them nine. And then suddenly it takes 511. Okay, well, smart baby, all right, give them 10 disks. Oh, that'll keep them busy. And then if you really want to keep your busy baby or your baby busy for a lifetime, let's give them 20, probably shouldn't have done that. So that should keep your baby busy for pretty much a lifetime. And yeah, it's basically to the power of N minus one. So any questions about that? So now we can prove that this toy is kind of cruel to babies because, well, I mean, come on, am I really gonna do 255 steps to do that? How long would that take me? I could follow all the steps that are there, but yeah, it takes a while. Cool, though, right? All right, any other questions? Cool, so practical use of recursion, finally, because I give you a challenge. Try and write that with a loop. It will be, you can do it, but to think of the solution, you probably had to think of the recursive solution anyways, but still try and do it. Turns out to be fairly tricky, but we'll have time, so just remember, pulling for you, we're all in this together.