Good morning everyone. I'm Shriram. I work at Facebook. I work as Android UI engineer My day-to-day job is to create Android UI widgets that will be used by different products inside Facebook. Yeah Sure So today I'm going to talk about under abstract UI concepts These are some techniques that you can use in your apps when you are ran out of ideas and optimizing your performance So if you look at apps in the Play Store, most of them are giant list views. They show a lot and a lot of stories Here is an example where Facebook is Showing a lot and a lot of stories. It could be from a user. It could be some forum It shows a title Reflecting either the username or the page name and some content and net and so on This is the Strava app here again It's a set of multiple stories and then this is dig and here is a Gmail So typically we all deal with list views and list view rows The height and the contents inside each row varies. So how do we optimize or how do we change the way? We think about these rows so To get a common base, let's define some feed story as something like this We have a profile photo some username some piece of text and then some secondary row showing some more information and a row of buttons We all know how list view recycling works So let's say we have seven items that can be shown in the screen as the user scrolls The items that go away from the screen or move to a recycle bin and new ones are either Coming back from the recycle bin are being inflated the set of steps that happen here Is vaguely like this so the list view calls its adapters get view method Which would inflate a new view and then it would do a measure pass and the view that was returned The layout pass and then add this view to the list view now the measure pass is pretty expensive If you have a huge view like what we saw now Then it would have to measure and sometimes remeasure the same view again and again, which is not even effective The place where this exactly happens is let's say we have this huge feed story And then the user tries to scroll this particular app when very small portion is seen At the bottom it tries to inflate the next row, which is really huge and so much measure pass happens To avoid this We can imply something like breaking the rows instead of treating one big story as one row in your list view You can split it into multiple rows. For example in this case you can treat the header as one row the Connect portion as the other row and then the Secondary icons as the third row and the footer icons as fourth row this way We split the way and write Recycles all these rows. This is not Just good for list views. This is also good for the Recycler view introduced by Android. So Now with the same Scrawling at this point when it has to inflate a new Feed story it won't inflate the entire feed story But it would just inflate just the header view that is needed for that particular portion that way That way we reduce the measure happening on these views Here's some example code that can achieve this in my case. I'm defining four different rows pair feed story this piece of code resides inside the adapter and The view type code written by this adapter is for and the view type depends on that particular position that the adapter requires so my get view would return and bind model just Required for that particular piece of the story and not for the entire story So what are the advantages of doing something like this as I said less binding time and less measure time We also reduce the view depth think of having an entire feed story where you have linear layout of linear layouts are relative layouts Here the connect portion can be just one text view instead of it being inside another linear layout the next approach you can use is Going beyond what and it provides like instead of using linear linear layout or relative layouts You can use custom view groups. These are really helpful if you are layout is pretty complex So here is an example. The first one is from Facebook. This is the normal header You see in each and every post this one is from Strava the Common thing is they have a profile view some title text and some sub title text So let's define something like this and see how much time it takes to measure this particular view if you use standard Android components So here is the same thumbnail title subtitle and a small menu button We can use a linear layout of linear layouts in this case we have the title and subtitle inside a vertical linear layout and This along with the thumbnail and the menu icon are inside a horizontal linear layout So I logged how much measure pass happens for this particular case inside Android. This is what we get It basically tries to measure how much time it takes How much space it needs for the inner linear layout and then measures it again clearly the title subtitle is measured twice, which is not really good because The text views are the ones that are going to take more time in your measure pass So we need to optimize on that. We can always also use relative layouts So in this case all the elements in this particular view are placed relative to one another In this case subtitle is placed below title the Thumbnail is always on the left and top of the view and the menu is on the right and top of the view By logging The measure passes. I found that it takes It measures every view twice, which is again not needed at all So if you had to measure it ourselves, if you had to design this particular thing ourselves the way we would do it is We would place the thumbnail first We know how much space it takes and then we would measure the menu button We know how much space it takes. So the remaining space is given to the title and the subtitle to measure so In this case every single view is measured only once this cuts down the measure pass by half So this is another technique which you can use To reduce the time taken during binding in your list views Here is how you achieve it in your measure pass You try to measure each and every view individually by yourselves and that provides a lot of helper methods to do it But sometimes you would have to overwrite few methods. So in my measure I'm measuring the thumbnail view first and based on how much width it takes. I'm measuring the Title so in line number 14 you can see that I'm adding the width constraints to be the measured width of the thumbnail This restricts the view that this restricts the width that the title can take This only shows example for thumbnail and title, but you can extend it for subtitle menu and so on and then All those were calling this particular method measure child with margins the default implementation of Android uses padding When you call this but in our case We Can you hear me? So we can use measure child with margins or to achieve the same The idea here is we create measure spec for individual views and then called child at measure which would measure individual views this way This is the approach With it with this approach we can measure individual things ourselves So if you had to do so we saw how much measure pass it takes to do linear left of linear layouts, especially with weights If you had to do the same thing here You would be calling measure pass again and again in this case that we can go start with the thumbnail measure it and Give the remaining space for the title We can measure the content portion separately and then we can measure the individual button separately So for example in the last column we can say that Instead of saying oh measure let the buttons take whatever space it needs and then enforce saying it should only be the 50% of the width We can Say the buttons to take 50% of the width the first time we ask it to measure It's not like you shouldn't use this approach where the breaker rows are you should You cannot use this with big break the rose approach If you want you can apply both the approaches together for more performance when the only problem with this approach is There is a bit of problem with code maintainability only the person who wrote it sort of knows like where he plays Whatever things because this is not as descriptive as XML. So otherwise This can cut down a lot of cost that you would incur by using standard Android widgets The next topic is about the sub views that we use in our in Android, so First we saw about a giant story. Now, let's move down to the text views in those stories So There are view groups like the linear layout or little layout and all the stuff which can have One or more views or view groups in it the popular ones are image views and text views image views show Drawables in them. These are more like sub views. The reason being they cannot have any interaction from the user You cannot tap them. You cannot have click events. You cannot have touch events on them Everything is controlled by the image view Similarly, the text view has a text layout. You can create text layouts It's not pretty simple as creating a drawable, but still layouts are more effective if you want to use them As a piece of trivia Gmail found that it's not effective to use text views So the entire Gmail app uses text text layouts instead of views same goes with Twitter and Pinterest So what are these layouts? This is you can think of them as Drawables for text views they contain all the information that you give to them Like whenever you call set text it creates the layout and it contains all that particular information in them it also contains information about the spanables it contains information about image spans and so on and It also has the same method as drawable. You can call layout or a draw to a canvas and it will draw to the canvas So why do we need to worry about layouts when we have text views? so again back to this view recycling when The view gets recycled it moves to the recycle bin and then comes back and in your get call you keep Setting the text on this particular text view every time you set a text on this text view This is what vaguely happens in your set text. It sees Should it do a relay out if it needs to do a relay out it creates a new layout Think of a scenario where the user scrolls down a bit and then scrolls up a bit and then scrolls down again He goes through the same set of rows back and forth again and again We are not recreating the views, but we are recreating the layouts again and again Which is costing us so much of memory allocation so much of object allocation and stuff So instead of doing that we can cache all these layouts. We can take those layouts Put it in a cache. So in my set text I am passing a key based on the particular row that I want to use and Using the key I'm trying to see if a layout has already been created for this particular text If it has already been created I'm using that layout if not I'm going to create a new layout and in my draw I'm just calling him layout or draw this will have the same effect as what text we will do it for you so again the advantage is less object creation you have more control over the cache and The machine cost is saved because it's going to be measured only once the next time you can just Get them a width from the layout. You don't have to recreate more layouts again and again But there are a few things we need to watch out for what if there are orientation changes if it changes from portrait to landscape the with Available for the title a subtitle would increase now in which case we have to nuke the entire layout cache and rebuild everything from start And similarly with local changes as well Again back to the same slide. We are drawing everything to the canvas Studying with ICS they introduce display list which basically caches all the GPU commands Which is really effective because it caches the commands and then replace them back Which is a huge performance win, but this is not available pre gingerbread. What can we do to achieve? Somewhat similar performance in gingerbread phones and it has something called a picture drawables The idea here is you cache all the commands that you send to the canvas and then replay them back So the same code I changed to use picture canvas the picture Is something that can record all the calls? You give it to a canvas In my on draw call if nothing is recorded already. I am creating a new Canvas so when I start a recording like mpicture.begin recording it returns me a new canvas I'll make calls like super.draw or mlayer.draw is passed to the picture canvas and The next time this particular view gets invalidated. I'm calling mpicture.draw. This is like the cached version of commands and The this approach gave like So without this approach it took like 18 milliseconds for me to render text with one particular example And with this particular approach it Got significantly lower and it just took three milliseconds. So this is another approach that you can use one caveat here is that You can use this only with software rendering model. Hardware rendering model doesn't support picture drawables The next thing is about images Our apps have a lot and a lot of images a lot and a lot of clips For example, this is Facebook app and these are the list of Icons shown in this particular screen. This is very very less compared to the whole lot of icons we ship as a part of the APK So how do we handle this and Android provides? I mean a web introduce this concept of sprites instead of Downloading one image after another sending a request to the server making a connection in the downloading the image You can download one giant image with all possible Images in it and then draw portions of it in each and every image view Android has started doing this they call it texture atlas. It's the same name in open GL world as well Here is the texture atlas used by standard Android and Jelly Bean This gets generated every time you put on your device and every time and it has to draw a piece of this It uses the same texture it binds this texture and then draw portions of this So why is this actually needed or why is this going to give us performance wins? So Before Jelly Bean if we had two buttons in our app like this It would go View after view it would draw the background of first one and then draw the text one It would go to the second button drives background and then draw the text after Jelly Bean They changed it where the batch and merge these Commands immaterial of the view so all the backgrounds will be batched and they will be drawn first And then the text will be drawn next the reason is these two backgrounds share the same texture so they bind the texture once they draw them first and then the characters usually had shared the same texture if they Have the same font size color and so on so they bind that texture and then they draw that text This reduces the number of commands that they pass to the GPU So if you are going to use something like sprite then you are going to bind the texture once you are going to draw all the Images in one single draw command instead of passing like 10 15 different draw commands in in case of the Facebook screen And how hard it is to implement something like this on pre Jelly Bean because this is something you get it for free in Jelly Bean How hard it is to implement in pre Jelly Bean is this simple Can us have this a method called draw bitmap in this You need to pass in the bitmap that you want to use and then the next two arguments There are the source and the destination rectangle the source rectangle is that patient that portion in the bitmap that needs to be drawn on the screen and the destination is The piece on the view that it should be drawn and and I would map the source and the destination and then would draw that particular bitmap to the destination so This is a bit more complex thing. It uses the same technique and line number line. It's the same API call the Here I'm setting the coordinates on the view with top left right and bottom and in my draw call and getting the destination rectangle and then The destination rectangle here would not have the padding Maybe if you want offset something or if you want to have more customizations You can put anything in that destination rectangle by calling this it uses the same bitmap and then draws that particular portion.  You're binding the same texture again and again and then drawing it So you would see performance improvements Even after jelly bean with this approach so again the advantages you are Binding one single bitmap and sending less commands to the GPU Next is collecting thing. We all know this was introduced in a lollipop this is a Cool feature if you want to reduce the number of images in your APK So the need arises for something like this say the tab bar icons have The disabled state enable state and then the selected state clearly We have like three different images that we need to ship with every single glyph That increases the APK size a lot How can we mitigate this problem or how can we reduce the amount of images we ship in our APK? so You can use something like a color filter that can achieve this for you. I'm taking a black Glyph, and then I am applying a color filter to get the gray one And it provides various color filters like ported of color filters lightning color filters and so on the ported of is pretty easy to use and That would help you a lot in this particular case the way it's basically an alpha composting method that means Whatever you want to draw now you say you give it an operation saying This is how I want to draw this particular thing onto whatever is already available in this case The destination is the purple blue circle The source is the red square So when you are about to draw the red square you can say like I want to draw the source or the destination so The red square will be drawn on whatever is already available on the canvas Or you can say destination over in this case the destination was this purple blue circle That will be drawn below the Actor what is what you want to draw? But in case of color tinting what we need is source and more what this basically means is draw pieces of source that Overlaps with whatever is already on the destination so wherever you see black parts on the canvas or wherever you see Now non-zero alpha parts on the canvas then you could use a different color to Redraw it so If I have say a black icon like this and then I use a gray color and then say use a source and Ported up more Then it would just shade that portion with a gray color So clearly you can use one single cliff and then use different colors That way recreating all different states So this is how we do it. It's again a very small piece of code You create a portrait of filter filter with the tint color the mode is sourcing and then you set this color filter on the draw But if you are using this inside an image view you can just set the color filter on the image view itself but Will it scale for state changes or how hard it is to manage state changes Say if you have a state pressed if you earlier if you were having Icon for a press state and now you want to simulate the same thing Would you have to monitor touch evens and so on actually? You don't have to monitor state changes because Android provides draw the state change before that Let's say we define a selector like this here I'm defining the disabled state to be gray enabled to be white and the selected state to be blue I'm going to use this color state list with my view whatever that I'm implementing In my drawable state change. I'm trying to get the state using a drawable state and then The tint color is obtained from that particular color stateless But that color tint color. I'm creating a new portrait of filter and I'm applying that color filter To this particular image view thereby You can reduce quite a lot of images in your app You can also come in come in this with sprites because again a sprite is going to bind one single texture and then you can This is a done at canvas level so This will work cleanly with sprites as well and that's pretty much it for today. Yep, right You're basically forcing the app to use more battery and CPU The these are done at a GP level and I would I don't think this would take more Battery because these this is something Android provides out of the box so This is not like a complex operation Especially if you if you think ported off is a pretty complex operation This is like a standard window composting operation that is available On any windowing system and this is a pretty basic operation To for it to compose a different views and so on so this is not CP intensive operation which particular approach in this Oh, the ported off mode that you told about. Ported off mode is available Since early days of Android So to give some more context if you want to create rounded bitmaps and stuff Using ported off mode is the most effective solution than having two or three layers or applying a mask in a different way and stuff so This is I mean, I would say like ginger starting with gingerbread you can safely apply this approach


This is the milk detergent and food coloring experiment. The first thing we need to do is gather all the materials. Food coloring, paper plate, milk, detergent, and Q-tip. The first thing you need to do is put the milk in the paper plate. Then you put the food dye. Theoretically you should have more than one color so I'm using four. You then put the Q-tip into the detergent and wipe off all excess. Once you have removed all excess you can dip the Q-tip into the plate in the center of where you put the food dye. The food coloring liquids flow in the center of the milk bowl because all of the milk's surface tension is even across the bowl. When the detergent is added into the middle the surface tension is broken and unbroken surface tension draws the majority of the food coloring to the outside of the bowl creating a colorful design. To start to describe what is happening intermolecular force needs to be defined. Intermolecular force are the forces which mediate interaction between molecules including forces of attraction or repulsion which act between molecules and other types of neighboring particles. The way that this force is acting on this experiment is through the milk and detergent. The intermolecular forces of milk are based on the covalent bonds in the milk molecules. Milk is mostly water so to describe its intermolecular forces the two hydrogen atoms of water are unevenly distributed on the oxygen creating positive and negative ends of the water molecule. The positive end of one molecule is attracted to the negative end of the adjacent molecule. This attraction is spread evenly throughout the liquid except at the surface where there are no molecules above the water pulling in that direction. Therefore there is a downward force pulling the milk to itself on the surface of the milk. It requires an amount of force to break that bond. For example insects like flies or mosquitoes who are light and have hydrophilic beat can rest on top of milk because they do not exert enough force to break the surface tension. The reason why the surface tension is broken is because detergents are able to break through the surface tension because they have two polar ends one which is hydrophilic which is milk attracting and one which is hydrophobic which is milk repelling. The difference between polar and non-polar molecules is that polar molecules have two parts with opposite charges positive and negative. While non-polar molecules have no charge which means it has no opposing charges and no dipole. A dipole is a separation of opposite electrical charges. This experiment can be seen in the real world when washing clothing. So the surfactants in detergents improve the water's ability to spread over surfaces as it pushes it away. So this helps seep the water into dirty clothes fibers. Surfactants do another important job too. One end of their molecule is attracted to water while the other end is attracted to dirt and grease. So the surfactant molecules help water to get a hold of grease, break it up and wash it away.


As of September this year, five robberies have been reported targeting women on BU's Charles River campus. It is scary to hear about, you know, robberies and assaults happening so close to me, but yeah, I think urban campuses are at more risk for safety concerns. The most recent incident occurred in 179 Bay State just yesterday morning. Now I had no idea there was a robbery outside of the building. I actually just heard about that right now. Robberies along Alston's Ashford Street, Gardner Street and Pratt Street are among the incidents that have been reported and any security measures are going unnoticed. I barely ever see any police or anything unless it's the weekend and there's like a party going on. While the reported incidents all target women, BUPD believes the robberies are unrelated.


So many women are asking to interview me lately, that I am beginning to seriously consider the possibility that I am actually a desirable man. Well, talk about delusional disorder. My name is Sam Vaknin, I am the author of Malignant Self-Lover, Narcissism Revisited, and I am a professor of psychology. And today we are going to discuss a very intricate problem. For those of you who are my students, this is within the unit on presentation, intake interviews, and what was the last part? Presentation intake, ah, and presenting signs and symptoms, okay? So here's the question, even skilled diagnosticians, even diagnosticians, therapists, psychologists with decades of experience in institutional settings find it very difficult to distinguish between psychopathy, autism, schizoid personality, and PTSD or complex PTSD. Let me repeat, psychopathy, the extreme form of antisocial personality disorder, autism spectrum disorders, schizoid personality and schizoid personality disorder, and complex post-traumatic stress disorder or straight out post-traumatic stress disorder. These are, they present, the people with these problems present so identically that in the intake interview, the first time the therapist or the diagnostician comes across the patient or the client, it's very difficult to tell them apart. Now we already know that people with borderline personality disorder, emotional dysregulation disorder, people with this disorder are actually indistinguishable from secondary psychopaths when they are exposed to stress, humiliation, and rejection, so there is a confluence, there is a confluence or a convergence between borderline personality disorder and secondary factor 2, psychopathy. But we are talking about factor 1 psychopathy, the classic psychopath, the animal, the beast, the monster, in short, me. Factor 1 psychopathy, someone with autism spectrum disorder, mainly high functioning autism or formerly known as Asperger, level 1 autism, Asperger's disorder, schizoid personality and personality disorder, and complex trauma. How do we tell them apart? All four conditions, all four conditions present the same. In all four conditions, there is extreme reduced effect display. Now reduced effect display is a fancy name because we psychologists will like fancy names. It gives us the illusion that psychology is a science. So reduced effect display simply means not showing emotions. Red effect, not displaying any emotional reaction to past events, to present occurrences, to future catastrophizing or speculations, no emotions, no display of emotion, a flat presentation of emotions and a flat presentation of personal experiences. These people describe the most harrowing, most traumatizing, most exceptional, most extreme situations, and you don't see a hint of a flicker of anything resembling an emotion on their faces. This is a poker face. And there is reticent self-disclosure. It's like pulling teeth, talking to these people. They refuse to kind of come clean. They refuse to share, confess, admit. They refuse to talk. It's very, very difficult to get these kind of people, these kind of patients or clients to actually talk about their lives, what had happened, how they had felt, what led to these events, and how did they extricate themselves and how do they feel about these occurrences nowadays. They absent themselves.  You can see the curtain falling. You can see there's nobody there suddenly. We try to talk to them about emotions, about personal experiences. We try to kind of coerce them or convince them or cajole them into self-disclosure. They become reticent, reluctant, and their body language changes. It becomes very defensive or very aggressive or both. And this is common to all four types, including survivors of trauma and including survivors of complex trauma, complex or traumatic stress disorder. So the first thing we see when such a patient or client enters the clinic, the first thing you see is the body language. And the body language is, again, very defensive and very aggressive, a bizarre mixture, kind of passive aggression.  They vanish. They absent themselves. And the third thing you see, they refuse to talk about emotions, personal experiences.  All four types of patients also use language in a highly idiosyncratic way, in a special way. Narcissists abuse language. Narcissists leverage language as a weapon. They use language to be fuddle, to confuse, to gaslight. So they abuse language. But psychopaths, people with autism spectrum disorder, schizoids and victims of trauma, use language not in order to obtain any goal or to score points, as the Narcissist does, they simply corrupt language. They undermine language. They render, it's like their language festers. It's like it became infested or infected with something. First of all, they are likely to use very vulgar, a very vulgar type of language, you know, with obscenities and profanities and so on. The language is likely to be patriot as though it's rotting from the inside. They're likely, whenever they try to communicate something, which is very rare, or if they have to respond to the therapist or the diagnostician, all the psychologists, for example, in court mandated evaluations, they tend to play with language. They tend to become ambiguous and equivocal. If you ask them, did you do this and this, they're going to say, how do you define doing this and this? Or they're going to answer in a way which is essentially hair-splitting and nitpicking, wiggling their way out, finagling their way out of conundrums and predicaments using language. Language is their exit strategy. They think that if they can redefine and reframe situations, behaviors and traits, they're scot-free, they're home-free, it's like a monopoly game. They're playing a game all the time and you can feel it. Their language is a gambit like in chess, so it's very ambiguous and very equivocal and leaves place for vagueness and kind of finagling and wiggling. The language is non-committal, it's clinical, it's impersonal. They're likely to describe the most terrifying, traumatizing, horrific experiences in very, very impersonal and clinical terms, as though they were talking about the third party at making clinical observation for some medical chart or some paper about to publish in an academic journal. They corrupt the language and they render it circumspect and cynical and cold and detached. And so this is the fourth thing you notice, the misuse of language. All four types of patients, the psychopath, the autism, the autist, the schizoid and the traumatized victim, trauma victim, all four types of patients are inaccessible. You feel that there's a kind of transparent partition that you cannot penetrate. They look at you, they're watching you and you're watching them through a glass darkly. There's something, something standing between you and them. It's ephemeral, it's ethereal on one hand, but on the other hand it's very real and it tends to regenerate all the time. The more intimate the conversation becomes, the more the clinician tries to broach difficult topics, painful topics or threatening topics, the more the partition solidifies, becomes thicker. And so there is this membrane between the patient and the diagnostician or therapist. The patient is inaccessible.  They're out of grass, they're like slimy goldfish. You can never get hold of them, you cannot nail them down, you cannot get them to commit even linguistically and so they're sealed off and they are emotionally numb. They're incapable of true intimacy, true communication, let alone intimacy. You can never get anywhere with them because you keep getting the feeling that there is somebody there, but out of reach, out of reach and they kind, you feel that you're being reduced by these patients into caricature, a two-dimensional icon avatar, a symbol. They don't relate these four types of patients, don't relate to the clinician or the therapist as another human being. They reduce him to a function and then they become very defensive and they try to isolate themselves from the situation and from the other person that's the therapist. And so you have this, you have this eerie, eerie feeling that the temperature had dropped, the oxygen had been sucked out of the room and you're in the presence of someone who is suspending their humanity. These people, all four types, the psychopath, the schizoid, the trauma victim, the borderline which is a form of psychopath and the autist. Deep inside we now know from multiple studies, starting in the 90s, we know that deep inside they harbor, they have the experience, self-loathing, self-hating. And so sometimes they act out, they act out by becoming self-defeating or self-destructive or self-trashing or aggressive or passive-aggressive. And so even the schizoid who is utterly detached ostensibly from the outside world, happy in his own nest, in his own den, happy, thriving in his solitude, even the schizoid actually has moments of rage and acting out and reaching out desperately trying to connect. Actually the prevailing theory of schizoid personality is that the schizoid defense is an attempt to maintain object relations, an attempt to maintain relationships with other people by somehow rejecting them, by somehow isolating them. Because even rejecting someone, even isolating yourself from someone is a form of connection. So it's one step removed from psychosis or schizophrenia. That's why it's called schizoid, almost schizophrenia. So even the schizoid has these moments of rejecting others, sometimes aggressively rejecting others, especially when he feels uncomfortable or disconfident by the presence of others when he feels overwhelmed. And so all these four patients are self-destructive. And all of them act out one way or another. The psychopath is defined and contrumacious and reckless and impulsive, borderline of course when she becomes a secondary psychopath. The trauma victim is heavily dysregulated emotionally. She has typically modulability. And I'm saying she because majority of victims of complex post-traumatic stress disorder are women, not all, but a majority. Now one thing, so to summarize this part as a clinician, as a diagnostician, as a therapist, there's a conundrum. How to tell these apart? Of course you wouldn't treat a trauma victim as you would treat a psychopath. You wouldn't administer the same techniques to a borderline as you would to a autistic person. And definitely would not try to treat someone with autism spectrum disorder as you would someone with schizoid personality disorder. These are seriously different problems, issues in mental health. And they require totally different approaches. It's very dangerous to misdiagnose. And misdiagnosis is very common in clinical practice precisely because all the presenting signs and symptoms on the face of it and initially sometimes for five sessions, ten sessions, they seem to be the same. Only when you delve deeper, you begin to discover differences. For example, attitude to sex and intimacy. The psychopath's attitude to sex and to sexuality, psychopath's psychosexuality is very unique and is not typical of the schizoid, of the trauma victim, the borderline and definitely not of someone with autistic personality, autistic disorder.  There's a Madonna-Hore complex, which also applies to narcissists.  He doesn't do intimacy at all, not with his sexual partners, not with anyone. So consequently, his sex is devoid of intimacy. Even when it looks outwardly as intimate, it's not. Psychopaths regard their bodies as dispensable, disposable objects. So they trash themselves, they self-trash sexually. It's very common for a psychopath to engage in very extreme sexual practices, reckless or not. Sexual practices which objectify his or her body. Sexual practices which trash the psychopath, disrespect his boundaries, physical or otherwise.  So they regard their bodies as a kind of coin or commodity. They leverage their bodies, the psychopaths leverage their bodies and use them to obtain goals. The goals could be instant gratification, satisfaction of an impulse. Harvey Cleckley said in his famous Mask of Sanity, the masterpiece, Mask of Sanity, Harvey Cleckley said that in 1942, the psychopaths, the psychopaths, the psychopaths, the sexual activities of psychopaths are like scratching your back. He said that psychopaths act on a whim. They rarely have any deep motivation to engage in sex. They engage in sex because they want to scratch their backs. It's just an impulse, an itch. They scratch the itch.  Their bodies are utterly meaningless. In the psychopath's life, everything is meaningless. And so it's very shocking, very unsettling.  In the sexual history of a psychopath, he or she subjects herself to the most degrading and dispoiling treatment by others. She is likely to find herself in situations which are not healthy or normal person, not even a mentally ill person would find herself or himself. Psychopaths are unlikely to have sexual boundaries. They are unlikely to be sexually dysregulated. They are likely to engage in extreme and reckless sex from a very, very early age. It's very common in the history of psychopaths to engage, for example, in group sex in teenage years.  It's utterly, utterly normal occurrence in the sexual history of psychopaths. And the same people, psychopaths, usually develop comorbidities or dual diagnosis like eating disorders and some of them suffer from body dysmorphia. Although this is much more common in secondary psychopathy and therefore in borderline personality disorder. So, attitude to body, attitude to sex, attitude to the bodies of other people. The willingness to self-trash sexually, the willingness to be objectified, degraded and despoiled, subjecting oneself to these situations, seeking them actually. This is a hallmark, a major hallmark, by the way. According to Cleckley and many other authorities, it's a major hallmark of psychopathy. And it is a differential diagnosis in the sense that it does not exist. In trauma victims, among people with autism, schizoids and narcissists. It is common among psychopaths all year long. And it's common among borderlines when they switch into a psychopathic state, secondary psychopathic state. So this is the first differentiating or differential sign. Now, psychopaths are deceitful. They're deceitful, they're disloyal, they're unfaithful, they're manipulative. They're parasites. Psychopathic women are usually gold diggers. They're goal-oriented. This is not, this is another differential diagnosis. This is not the case with schizoids, with borderlines, with people with autism spectrum disorder, and with trauma victims. Only psychopaths are like this. So when you see a history of deceitfulness, cheating, for example, in multiple relationships, serial cheating, betrayal, a history of adultery and untracefulness, extramarital sex, non-consensual extramarital sex, when you see a history of parasitism, when you see a history of antisocial, even criminal activities, actions. When you see extreme goal orientation, which is without scruples, without boundaries, without rules and without limits, which is reckless and callous and ruthless. When you see these things, this is a psychopath. Finally, a psychopath is likely to be very devaluing and humiliating of others. Psychopaths hold everyone in disdain and contempt, which is not the case with the narcissist, by the way. The narcissist does have role models. The narcissists tend to adopt public intellectuals, important politicians, footballers, you name it, he tends to adopt public figures and idealize and idolize them. This is not the case with the psychopath. The psychopath holds everyone. And when I say everyone, I mean everyone in disdain and contempt. So psychopaths are compelled, it's almost compulsive, they're compelled to devalue you, to humiliate you. And this is apparent and transparent in the therapy setting, where the psychopath embarks almost immediately on doubting the therapist's credentials, experience, knowledge, intelligence, wisdom, et cetera, et cetera. The evaluation and humiliation, degradation and dispoiling of other people are psychopathic acts when they are indiscriminate and when they don't target only specific individuals like intimate partners. Psychopaths are also very hyper-vigilant and very paranoid, much more so than trauma victims, much more so than trauma victims. So when we see someone who is viciously, viciously, contemptuous, disdainful, hatefully devaluing, totally hyper-vigilant and paranoid, that's likely to be a psychopath, not a trauma victim. The etiologies of this identical presentation, the etiologies couldn't be more different. And this is why it makes it crucial, it's crucial to apply the differential diagnosis, diagnostic signs and symptoms and criteria that I've just described. Because if you get it wrong, you can, as a clinician, as a therapist, you can wreak havoc and create enormous damage. The etiologies of these four groups or classes of disorders is very different. The psychopath has no empathy, he has no positive emotions. The narcissist has no access to his positive emotions, but he does have positive emotions. The psychopath does not have positive emotions, there's nothing to access, nothing there, he has no empathy, he doesn't, he has nothing to report. His self-reporting is denuded, minimal or sometimes non-existent, not because he's playing mind games or not because it's a power play, although they're prone to both. It's because he has nothing to report, there's nothing there. So the psychopath is goal-oriented, he defines himself via his environment. He derives his identity from his actions and from his environment, and this is why his goal orientation is extreme. Psychopaths are primitive two-state devices, almost in animals, almost in an animalistic level. Feel good, feel bad. So they're two state device, they mimic humans because they're great mimics, they have thespian skills, exactly like the narcissist, but it's mimicry, it's not real. The etiology of the psychopath is severe damage, probably cerebral, probably brain damage, to the ability to experience empathy or positive emotions, that's the root of psychopathy in effect. The autistic person is oblivious to social and sexual cues. He cannot read other people, he cannot read their body language, his thinking is concrete. So he is incapable of understanding and applying metaphors, similes, similes, jokes, he has a problem with humor. So his language is very concrete and very simplified, it's a dictionary language, it's like it's a walking, talking lexicon or dictionary. So he cannot, he doesn't understand other people, he doesn't get them, he has no clue, he's clueless and this renders his reactions weird, even antisocial sometimes, unintentionally. The autistic person is reluctant or unable to verbalize his internal world, his inner world and that is partly because this inner world overwhelms him and partly because he's been rejected all his life owing to anticipated rejection. He doesn't want to expose himself, he doesn't want to be mocked, shunned, ostracized, ignored, punished. The schizoid just wants to be left alone, that's all he wants. He is incapable of strong emotions, he is incapable of intense experiences. He, the schizoid flatlines, flatlines into solitude. The schizoid's solitary confinement is his comfort zone, it defies belief because we're all social creatures, even narcissists, even psychopaths, but not the schizoid, he thrives when he's alone and the survivor of trauma, she represses, she numbs her emotions because she finds her emotions and the memories that are attached to these emotions, threatening. She feels that she will be overwhelmed if she allows herself to directly touch upon and interact with what had happened to her with her trauma, so she's reluctant to revisit her harrowing experiences and she's triggered by any attempt to be intimate with her in any way. Though all four present identically in clinical settings, you need to dig deeper, you need to delve deeper, you need to ask yourself how do they regard their bodies, how do they regard sex and intimacy, are they deceitful unfaithful, goal-oriented, parasitic to the extreme, are they immediately vicious in devaluing and humiliating other people, are they hyper vigilant to the point of paranoid ideation and if the answer to all this is yes, that's a psychopath and you did your job.


When the web started 25 years ago, it was only its openness to people innovating on it. But now when we look back over 25 years, almost half the people in the world are using the web. But I think some of us initially had a big hopes that the internet is going to lead to a society in which inequality fades away because everybody has got the same possibilities, everybody has got the same advantages just starting off connecting themselves to the net. Guess what? That hasn't happened. In fact, here we are 25 years after the first web page and a lot of nonprofits, a lot of governments are realizing that we have a crisis of inequality. And so every time people put more powerful things on the web, we actually increase the gap between the haves and the have-nots. Things need to be said explicitly for the internet because the internet gives you a certain power that you wouldn't have had before. As people have started to think about accessing the internet more as a right, then that begs the question, okay, should we have a bill of rights for the internet? Snowden changed that dramatically. By putting those revelations onto the table, that it really started the conversation and I think we're indebted to Edward Snowden for actually introducing that material in a way that I think nothing else could have done that. There have always been forces to try to control the internet. When you're a government of a country, it's very tempting to want to govern the internet within your country. Trouble is, it doesn't work because the internet is not a thing of countries. You can certainly, you can put in barriers, you can put in firewalls, but as you do that, suddenly your country, your people, your entrepreneurs, your teachers have all lost their voice. We have to be reactive when we realize that, whoa, actually this country or this company has stepped over the mark and we have to immediately take to the streets with placards and shouting. So in 10 years' time, we'll see certain natural progressions.  Anything you hear, it gets enough fidelity. Whether the internet is an open space or a closed space, I'm not going to predict. It's up to us, it all decides on what we do now, all the decisions we make now.


I would like to thank all the organizers, Alina, Mike, and Filip for the kind invitation to speak here. And today I'll talk about smooth polynomials and smooth numbers. So I'm going to first tell you what is the plan for the talk. I'll start by defining these notions in the title and some other notions. I'll then discuss, oh, and give some motivation for them. I'll then discuss some old and new results in the discrete settings of polynomials and permutations. I'll then describe all the new results in the integer setting. And then I'll focus on one approach to prove some of these new results, which I'll call the integration approach. And only if time permits, I'll also discuss a second approach. So I'll start by defining what is a Y smooth number, also sometimes called Y-friable. So a number is Y smooth if its prime factors are at most Y in their size. And we are interested in their count, which is denoted CXY. So this is just the number of integers up to X that do not have a prime factor greater than Y. And this is a function that gets smaller as Y gets smaller. And let us see some special cases. So if Y is X, we are counting all the integers. So we get the floor function. This is because a number N is automatically N smooth. If Y is equal to 1, we only count the number 1 because the number greater than 1 will have a prime factor. If Y is equal to 2, we are counting perfect powers of 2. So we get log X in base 2. And one useful, one important feature of smooth numbers is the following. Their indicator function is multiplicative. In fact, completely multiplicative. And this, of course, comes in handy. For instance, the Dirichlet series of smooth numbers is very simple. Next, I'm going to define an analog of this definition in the so-called function field setting. So fix your favorite finite field, FQ. I'll say that the polynomial is M smooth. If the degrees of its irreducible factors do not exceed M. And I'll use irreducible and prime interchangeably here. And again, we are interested in their count, CQ and M. This is the number of monic polynomials of degree N that do not have a prime factor of degree larger than M. And if you wish, you can also replace exactly N by degree up to N and use results about CQ and M to study degree up to N. Again, let us see some special cases. If I take M to be M, I'm counting all polynomials of degree N that are monic. So I get Q to the M. Now, if M is 1, I'm not counting perfect powers. Rather, I count products of linear polynomials. And the number of products of linear polynomials is given by a binomial coefficient. And let me briefly explain why is this so. This is because we have two linear polynomials of the shape T plus a constant. And we are selecting N of those linear polynomials to create a one smooth polynomial. And repetitions are allowed. And there is no regard to orders. So the answer is described as this binomial coefficient. An important point I want to make that will be repeated several times in the talk is that one can and should compare results in the integer setting to results in the polynomial setting. But in doing so, one should calibrate the parameters correctly. Let me explain this. I claim that X should be compared to Q to the N while Y should be compared to Q to the M. And why is this so? Because in the count of smooth numbers, I ask the norm of my primes to be bounded by Y. And in the count of smooth polynomials, I ask the norm of my primes to be at most Q to the M. Where the norm is the usual norm in the polynomial setting, it's Q to the degree of M. Hence, it makes sense that QM should correspond to Y. And similarly, Q to the M should correspond to X. And now I'll go on to the third and last definition, that of smooth permutations. So a permutation is M smooth. If all its cycles are of size at most M, and we are again interested in their count, sub CS and M counts permutations on N letters that have no cycle longer than M, and S stands for symmetric. So let's see some special cases. If M is equal to N, I count the entire symmetric group, I get N factorial. If M is one, I count only the identity element because all the cycles are of size one. If M is equal to two, I'm basically counting permutations with cycles of size one and two. This is exactly the parametrization of involutions, permutations that if you apply them twice, you get the identity. And it's been known for a long time that it grows roughly like square root of N. Let me just mention by name some recent, some old motivation that has been recently popularized. There is an old riddle called the 100 prisoners problem that its solution involves counting permutations that are N over two smooth. And we'll see later that this is asymptotic to one minus log two. Any questions about any of these three definitions? Okay. If so, I'll discuss some motivation for cryptography for studying these subjects. The RSA algorithm is an asymmetric encryption algorithm. By asymmetric, it means that there is a public key and a separate private key. It relies on the difficulty of factoring numbers. And then it came as a nice surprise in 81 that Pomeran's found an algorithm which he calls the quadratic sieve to factor numbers in sub-exponential complexity. The number of operations as a reservoir peculiar shape, it's X for square root log N. I should say that it's a randomized algorithm so it can potentially fail, but then you run it again. And the reason I mentioned smooth numbers is that they are used in the algorithm both in its steps and in its complexity analysis. I do not have time to explain the algorithm but I'll state its complexity. So basically for any parameter T, you get an algorithm that factors a number N in this complexity. So T squared times N over Pc and T, this is one over the density of smooth numbers plus TQ. This is the complexity. And if you take T to be one or take it to be N, this is exponential complexity. It's not good. So the point is to find the T that minimizes it. And you see that it's by definition requires understanding this function Pc and T. It turns out that the optimal T as this shape, it's X for square root log N. And for this choice of T, the two factors, the two terms in the complexity are balanced. So the complexity will be TQ, which is also of this order. And this is only about smooth numbers and factoring numbers. However, there are other cryptographic algorithms over finite fields, which rely, for instance, on the difficulty of the so-called discrete logarithm problem. And then again, there are algorithms that break this in sub-exponential time, but this time they rely on smooth polynomials instead of numbers. So understanding this density is relevant in cryptography. And at this point, I would like to ask, is there any question about the motivation? In any case, this talk will not be about cryptography, but I wanted to let you know about this motivation. Now I'll proceed to discuss all the new results for discrete settings. And almost all the results are described in terms of the Dickman function, the Dickman row function, which I'll define now. So it's a function on non-negative reals. It starts as a constant function. From zero to one, it's equal to one. Afterwards, it's defined via a delay differential equation. So the derivative at time U is a function of the value at time U minus one. And if you don't like derivatives, there is an equivalent integral equation where the value of time U is some sort of average of past values. And from the integral definition, it's clear that the function is always positive because it starts positive. And from the first definition with derivatives, we see that the derivative is always a non-negative, sorry, non-positive. So it's a positive decreasing function. And the integral equation implies this inequality.  This should remind you of something. It should remind you of one over the gamma function because one over the gamma function satisfies this with equality. It's not hard to show that, indeed, the Dickman function is dominated by the reciprocal of gamma. And by a very basic version of Stilling's approximation, this decays like U to the minus U. Turns out this is also the decay of the Dickman function. So you don't have to remember these formulas. You just have to remember that the Dickman function decays rapidly. So let me describe some results about permutations. Recall PS counts M smooth permutations. And it will be useful to introduce the following notation. You will be the ratio of M by M. The first results is due to Vgon-Charov in 44. He proved that the density of M smooth permutations is asymptotic to the Dickman function of U, as long as U is bounded. In other words, as long as M is at least linear in M. Now it's natural to ask, what is the range where this holds? Somehow there was no work on this specific problem when M is large for many years. People focused on small M, for instance, the involution problem. So the next result that I'm interested in is due to Mstavitzius and Petruchovas in 2016. They proved that the Dickman function asymptotic remains true as long as M grows to infinity faster than square root N log N. And their proof involves the saddle point method. And they proved that the range is optimal, meaning for smaller M, the asymptotic breaks. Last year, Ford gave a completely elementary argument involving recursions, showing that the density is always sandwiched between two values of the Dickman function. And this is in the entire range of parameters, M between one and N. I want to say that because of the rapid decay of the Dickman function, this does not give you an asymptotic result in general. It will only give you an asymptotic result if the two end points are asymptotic. And this turns out to hold exactly when M tends to infinity faster than square root N log N. So it recovers the first part of these results, the result of Mstavisius and Petruccioli's. I want to briefly discuss Ford's proof and some improvement to it. Let me write the density of smooth permutations as PNM. And one can prove a recursion for this quantity. PNM is related to past values of PN minus IM. And this is very similar to the recursion satisfied by the Dickman function. How does one prove this recursion for PNM? It basically goes as follows. You look at the permutations, you think of them as acting on the elements one to N and you partition according to the size of the cycle that contains the element one. And doing this partitioning gives you that. Now, if you replace this sum here in the first identity with a similar sum, where P is replaced by the Dickman function, you get a ribbon sum for row. And because the Dickman function decays rapidly, it is actually an overestimation for the EPI row. And that's an observation that has been used by Ford to prove his lower bound. And actually in my work, I even show that one can exactly quantify how much it overestimates the integral to get a physical space proof that there is a transition at square root N log N. I'm trying to say that one can extend the ideas of Ford to treat to also recover the optimality. Okay. I should also say that when M is below this range, Mastaviches and Petuchovas have very satisfactory formulas for this density in terms of the saddle point methods, so not involving the Dickman function. So I would say that permutations are easy or relatively easy compared to integers because there is no arithmetic involved and we can answer basically any question there. So let me turn to polynomial. Recall CQNM counts M's most polynomials of degree N and again, I'm going to use the same notation U is equal to N divided by N. The first result is in 87 is due to car. She proved that the density of smooth polynomials is equal to the Dickman function plus a certain error and this is uniform in the entire range of parameters. A few years later, Barley-Mont in 91 improved the error. However, one should remember that due to the decay of the row function, once M is below N over log N, already the main term will be absorbed in the error. So even for moderately large M, this will only be an upper bound. And the third results I want to mention is due to Mastaviches in 92. He proved that the Dickman row asymptotic holds in this range where M grows to infinity faster than square root N log M. This does not follow from the previous results from these two results. And this range should remind you of the exact same range in the permutation problem. It matches the range that we saw there. So it's natural to ask if these results, two results are related. And this is addressed in the following theorem. The first theorem I wanna tell you about today. In this theorem, I compare the density of smooth polynomials to the density of smooth permutations. So it's a density divided by density. And the theorem says that the ratio of densities is very close to one. There is an exponential saving in Q. Here U is again N divided by M. This holds in a very wide range. M can be even logarithmic in N. I'll discuss soon what happens for smaller. Before I go on to discuss some interpretations of this, I want to say that this result does not go, this proof does not go by studying the numerator and the denominator separately, rather it goes by studying the ratio directly. So the idea is to write both densities in terms of an integral. And when we subtract the densities, we subtract the integrals and we're studying this difference directly. We're very roughly speaking. I want to tell you two takeaways you should take from this theorem. The first takeaway is that previous results on CQ, smooth polynomials, follow for free from those four permutations. So it's not a coincidence that the ranges I showed you match to each other. If you know something about PS, you can use this to convert it to something about CQ as long as M is not too smooth. And the second takeaway is that working with PS leads to better saving and better ranges. So it's just a better main term than the Digmond function, at least in this case, at least in this problem. To demonstrate the strengths of this theorem, I want to show you that it actually incorporates within it the prime polynomial theorem. So let me explain. Let me take M almost as large as possible. I'm taking it to be N minus one. Now a polynomial is N minus one smooth as long as it's not irreducible. So the numerator in this case is one minus density of primes. And the denominator counts N minus one smooth permutations. These are permutations that are not N cycles. So the denominator is one minus one over N. It's not hard to show. And if you plug these parameters in the theorem, you recover the prime polynomial theorem with square root cancellation with optimal error. Of course, the prime polynomial theorem also plays a role in the pool. And I should say that, yeah, the error here can be shown that it's sharp. Now I'm going to discuss very briefly what happens for smaller M. So instead of stating a very technical result, I'm going to take M to be N minus epsilon log QM for some epsilon between zero and one. I can show that then the density, the ratio of density is not asymptotic to one. It blows up, it tends to infinity. In fact, I can show that the ratio is asymptotic to one if and only if M minus two log QM tends to infinity. So the range of the last result is essentially sharp. And now I want to mention two questions that I think are natural to ask, which are, first of all, is there an analog for this main term in the integer setting? Is there a main term that leads to error terms that are so good that are exponentially Q to the N? And second of all, is there an analog of this range and being greater than log QM in the integers? We see that at this range, something happens, at least in the polynomial set. It turns out that the answers to both the questions are positive. There is an analog of the main term CS. It's known as the Bruins approximation lambda X, Y. We'll discuss it later. And remember I told you how to compare results in integers to results on permutation on polynomials. Using this correspondence, the range M being at least two log QN will correspond to log Y being at least two log log X. In other words, Y being at least log X squared. So we should expect that something interesting happens in integers when Y is close to log X squared. And in fact, it was a barrier in the study of smooth integers in several works. So that's what I hope to convince you in the next slides. So at this point, I want to ask, are there questions about these results in the polynomial setting and also about the questions I just raised? Can I ask one question? Sure. Result in the previous slide. Is it uniform in Q? So if this is your- Yes, it's uniform in Q. And in fact, in the paper itself, it's even, there is a ceiling function and some nice improvement. Yes, it's uniform in Q. Thank you. Okay. So now I'm going to proceed and discuss integers. And the first result, or one of the first results on smooth numbers even predates those on smooth polynomials and smooth permutations. It's from 1930. And Dijkman proved that the number of Y smooth numbers is asymptotic to X times the Dijkman function on Q.  It's log X divided by log one. And it proved this relation as long as U is bounded, or in other words, as long as Y is at least a power of X. And there were several works that extended the range of validity of Dijkman. And before I discuss them, I want to say that something interesting happens near log X, there is a phase transition there. And there is a nice observation of Gronville that this asymptotic relation cannot hold for very small Y. For instance, if you use precise asymptotics for the Dijkman function, the right-hand side will be smaller than one if Y is below some multiple of log X. While the number of smooth numbers is always at least one. So there is a point where this asymptotic relation, the first significant results about this range is due to the drawing in 51, used Bookstab's identity, which I'll mention later in the talk, to derive this sort of asymptotic relation in a qualitatively better range. Y can be a smallest X of square root log. Then 30 years later, Ildebrand extended the range qualitatively even further, replacing a power of log by a power of log log by using a completely different identity. The exponent five over three comes from our best zero free region for the Riemann zeta function. And if you improve the zero free region tomorrow, Ildebrand's method will be able to give you a better range for this asymptotic formula to vote. And Ildebrand also adds some results related to the Riemann hypothesis and the relationship to smooth numbers. He proved that under RH, this asymptotic relation star holds for Y a smallest log X squared plus epsilon. He also had a remarkable converse. He showed that if you know that star holds in this range, you recover RH. There is a strong relationship with RH here. I should point out that when Y is a power of log, the saving he gets is does not go to zero. This is of one. And then in this range, he actually proves order of magnitude results under RH. So are there any questions about these results before I raise some questions? Okay. Now I'll state some questions, some of which have appeared in the literature. One question is very naive. What is the behavior of CXY when Y is less than log squared plus epsilon? The second question was asked explicitly by Ildebrand and reiterated by several others. I also mentioned in papers of Brownville. The question is whether one can show unconditionally or otherwise that the number of smooth numbers is not of the size of X times the Dickman function when Y is below log X squared minus epsilon. And a third question of a somewhat different flavor is about one sided inequality. So Pomeran's asked, is it true that CXY is always at least X times the Dickman function? Is the density of smooth numbers always at least the Dickman function? And also more independently asked a similar question. You may ask why would one expect something like that to hold? I'll give exact motivation later, but there is at least hope for it to hold because for a very small Y, we know that the right-hand side is smaller than Y. So for very small Ys, they're already taken care of. So you might hope that it falls over. And I've made some progress on these questions and I solved them, some of them conditionally and some of them unconditionally using two different approaches, although both of them involve subtle points. I give them different names. The approaches relate the number of smooth numbers to primes and to zeros of the zeta function, of the zeta function, which is not too surprising given the work appeal, the brand that already established some relationships. However, it turns out that the answers to the questions are quite tricky to state. And I'll try to convince you by giving you one taste, one small taste. Three is a theorem. It assumes RH to make matters nicer. And here I'm taking Y a very specific value. It's essentially log X squared, but not exact. For this choice, the number of smooth numbers is asymptotic to X times the Dickman function, but there are three different correction terms. There is a value of zeta at one half that comes from one reason. There is square root of two that comes from a second reason. And there is a certain exponential factor. So what's written here? CY is the usual Chebyshev function. It's the summatory function of the von Mangold function. And it's asymptotic to Y. That's the prime number theorem. So this is the error term in the prime number theorem here in the exponent. Now RH turns out is not strong enough to tell us that this is negligible. RH tells us that this is big of log Y inside the exponent. However, it's conjectured. There is a conjecture of Montgomery that uses a probabilistic models for the zeros of zeta. It's conjectured that this is little open. In fact, that it decays to zero in a certain rate. In a certain rate. So RH is not enough to allow us to ignore it, but it's conjectured that it can be ignored. But we see that for instance, if we're interested in knowing when is C of the order of magnitude of X times rho, the answer has to be stated in terms of this error term. And if I don't assume RH, or if I choose a different value of Y, I'll have a different formula, but quite a more complicated one. That's why I chose to present you this. But the point of this theorem is to convince you that and the answers have to be slightly complicated. Okay. Now I want to mention an unconditional result. Unconditionally, if you give me some positive epsilon, I can construct sequences X and Ym, where Yn grows like log Xm to the two minus epsilon plus a little of one. And for these special sequences, the ratio of C by the Deekman function will explode. And this answers the question of Hildebrand, that the Deekman function is not the right model for the smooth numbers for Y below log X squared minus epsilon. And this formula should remind you of some. When I told you about a result for permutations for M less than two minus epsilon log Qn, we had a very, very similar shape with this thing replaced by N. And it's not a coincidence, the proofs are very similar. The reasons this is unconditional and does not need RH is that the proof involves exhibiting large values of the error term in the prime number theorem and exhibiting large values can be done unconditionally. In fact, if RH falls, we even get better results. So that's why it's unconditional. Next, I'll mention a result about the inequality that Pomeran's conjectured. Here I assume RH. And as long as Y is not too close to X, which is a necessary condition that's already mentioned by Poran. And as long as we are not too close to the critical point log X squared, this inequality will hold. If you wanted to hold near the critical point, then this is true if the error term in the prime number theorem is even better than what RH predicts. So CY minus Y is little of square root Y, log Y implies these sorts in the remaining region. So Sergei is asking in theorem four. Yeah, epsilon has to be between zero and one. Thank you. For epsilon greater than one, in a sense this is an easier place. Thank you. And I want to say that also if RH is false, one can construct infinitely many examples to this inequality. About this very last sentence in theorem five, I want to say that Hildebrand had a work in this direction. He showed that if RH fails, he can show that this ratio is either very big or very small when Y is log X to the C plus little of one for some large C related to the counter example to RH. But he didn't say that it can be necessarily large. He said either large or small. And the proof of theorem five proceeds very differently than he did. But he was in the right direction and one can extend his method to prove this very last line in theorem. Any questions about these results? Okay. I want to present before I go on to describe more technical details, I want to give some sort of philosophy for what's going on. So given some nice function f of X, recall it's malintransform and inverse malintransform. So the malintransform is an integral of f against the power of X. And then I can write f as a complex integral of the malintransform against X to the S where S varies over a vertical line. And there is a special point which I'll denote CF. It's the real number, the positive real number that minimizes the integrand. So it's the point for which MFC X is the smallest possible. This is what's known as a sudden point. And now I'm going to give names to two functions. I'm going to call the number of Weismuth numbers, f one X and the Deekman function normalizing this way, f two X. So I see if there is any question. This is some question by Zach. Okay. It's a somewhat long question. So I'll try to address it at the end. Sorry. Yeah, but thank you for the question. So that you should think of the ratio of C divided by X times the Deekman function, a smouldered very well by the ratio of the malintransforms evaluated at the subtle points coming from the Deekman. And if you believe this sort of heuristic, then you can reduce many questions about smooth numbers to questions about this ratio, Mf one by Mf two which is very concrete, very explicit. Mf one is basically the generating functions. Smooth numbers are partial, the function we'll see later. And Mf two is more or less the Laplace transform of the Deekman. My point is that this ratio is a very concrete. Now this relation as I stated here holds under RH for wise a smallest log X that's three over two breaking the log X squared barrier. So working with this list to better ranges, better error terms, et cetera. Now what can I do unconditionally? Unconditionally I can sandwich this ratio between two values of this ratio of malintransforms. So here the ratio is evaluated at a subtle point coming from F two and here it's evaluated at the subtle point coming from F one. But it's still sandwiched by two values of the same function. So if for instance you're interested in showing that this ratio can get very big for Y log X to minus epsilon plus theta one then you just need to show that this ratio of malintransforms can get very low. So it reduces many questions to concrete that's the point. And in the next slide I'll try to make this completely formal. Okay. So here we'll see some objects that I only mentioned by name. So first I'm going to define you to the generating function of smooth numbers that you wish less serious supporting on smooth numbers. It has a very nice order product. It's a finite order product over primes up to Y and it converges for all real S greater than zero because it's a finite product. And the brain suggested a way to model theta S Y by something that has essentially no arithmetic. So what was his suggestion? Let's for simplicity assume that we work with real S greater than one and write the partial Zeta function as Zeta of S times a product over primes greater than Y. And because products are annoying you wrote it as the exponential of the logarithmic product obtaining sum of logarithms and then Taylor expanded the logarithmic obtaining this sum of. He then suggested throwing away two arithmetic pieces of information. So first he suggested throwing away the contribution of proper prime powers the contribution of K being at least two.  And we know what's the density of primes. It's one over log T by the prime number theorem. So he suggested let's approximate it by a continuous integral of T minus S against the density of primes. And this new thing, this new function let's denote it F. So F serves as a model for a Zeta S Y that has no arithmetic. So by Perron we know that C is an integral of the finite over product Zeta S Y against the power of X. In analogy, the Bruins said, okay let's replace Zeta here by F and call the resulting integral lambda X Y. That's the Bruins approximation for the number of Y smooth numbers. And it's a much better approximation than X times the Digmond function. And this is what I claim is an analog for the density of smooth permutations. And if you do the same process of throwing away this arithmetic information starting this time from the generating function of smooth polynomials instead of smooth numbers you actually end up with the generating function of smooth permutations. So it's a perfect analogy here. Now it has studied lambda sort of for its own sake but that will come beneficial soon. It proved that lambda satisfies a continuous bookstab identity written here relating values of lambda X Y to values of lambda X Z and lambda X over TT or T between Zeta Z and Y. I'll just remind you that the usual bookstab identity says that C X Y is C X Z plus a sum over primes between Y and Z of C X over P. So this is indeed a continuous bookstab identity that involves no problem, okay? It then showed that lambda is an asymptotic expansion. The first term in the asymptotic expansion is the Digmond part. And the next term involves the Euler-Mascheroni constant gamma and it's non-negative. And that's the original motivation for Cormorants to ask does C X Y is always at least X row? That's the original equation. Now, how did the Brogne prove that the number of smooth numbers grows like X row? It proceeded in two steps. Use the bookstab identities, both the continuous and the discrete, to show that C X Y is asymptotic to lambda X Y in some wide region with an excellent error term, an error term that is greater than any power of law. And then in this range, use the asymptotic expansion to say that lambda is asymptotic to X row this time with a rather weak error. And by transitivity, we are done. And then in 88, Syus showed that one can extend the range of star to the same range we saw in Hildebrand's result. So it recovers Hildebrand's result. However, it's even stronger. But in star, I'm hiding here a very good error. So it's stronger than it is. And it doesn't involve identities at all, only generating points. Okay. Now I'm going to explain to you the approach of Syus and then I'll explain you a way to upgrade it. So the approach of Syus is the following. We have integral representations for C and lambda. Let's subtract them. So C minus lambda is an integral of zeta S Y minus F S Y times some power of X. Next, it shows a very specific C. It shows C that minimizes F S Y X to the S, the so-called saddle point. And I remind you that F is a very concrete object is essentially the last plus transform of the big one function. It's an extremely concrete object with no arithmetic. And it turns out that for this saddle point, F S Y X S, when wheel S is C, the integrand is essentially real value. Moreover, it's positive. And we won't need that, but it actually looks like a Gaussian. We won't need that. So for this choice of C, the integral is a positive function. Now, let's go back to this difference and write it as zeta over F minus one times A. It showed that in the range of here, the brand zeta C Y over F C Y is asymptotic to one. So the integrand can be written as little in some range. Now, in general, if you have a little of one, you cannot pull it outside of an integral because there are oscillations that you won't capture. But if the integral is a positive function, you can pull out a little of one. So it basically showed that the right-hand side here is little o of the integral with F X to the S over X. That's what it showed. And this integral is the definition of lambda. So we are done. C minus lambda is little of lambda. That is proof, what I call the integration approach, although it does involve a certain saddle point. And it stated without proof that under R H, one can extend the range to Y being at least log X squared plus epsilon.  However, log X squared is a real barrier even under R H because it turns out this ratio is not asymptotic to one for smaller Y. So this method has a real barrier. It cannot be extended beyond this range that Hildebrand stated. Now I'm going to explain, I'm going to modify this proof to break the log X squared barrier. And I'll finish in a few minutes.  So G is the ratio of zeta S Y by F S Y. Now, instead of subtracting from C, the main term lambda as psi as did, I'm subtracting a different main. Lambda times G evaluated at the saddle points, the same C from the previous. So again, I have a difference of integrants inside the integral. And I rewrite it slightly in a beneficial way. I write zeta S Y as F S Y, G S Y. Now there is a common term F. And I rewrite the entire thing as a different of the G function evaluated at two points, time F. Now it's clear that there is a chance of this method to go beyond the previous approach because just by continuity, if S is very close to C, you'll see cancellation in this difference, just by continuity. Of course, continuity is not enough. So one has to do some sort of computation and understand roughly speaking, when is this difference? In what range is this little log G? In what range does this hold? Where I think of S as C plus I T. But once I solve this calculus problem, I get the following results. Under R H, C divided by lambda is asymptotic to the ratio of generating paths, essentially. Evaluated at C and at C. And this will hold when Y is at least log X to the three over two. Now I didn't give you much information about this subtle point, but there is a very old approximation to it. And it's roughly one minus log log X over log Y. And a different behavior emerges for smaller Y by a different method. So this is the limit of the method, but it's also the limit of the result. So the takeaway is that working with some modified main term leads to a better result. I'll just give two more slides. Let's summarize what we've seen. We've seen that under R H, C is asymptotic to lambda times G, for Y at least log X to the three over two. But it's natural to ask, how do lambda and G behave? How does this help us? Turns out lambda is always of the order of magnitude of X times the Deitman function. And if log Y grows faster, sorry, if Y is greater than any power of log X, this is also asymptotic. However, if Y is a power of log, there is a correction term found by Labrotash and Tanonbaum. So they show that there is a continuous function KT, starts as one, and we have this relation, lambda is a symptotic to X log time, this correction factor. And if Y is greater than any power of log, we do not see it, but why is a power of log we don't see? Okay, this leaves us G. What can we say about G? Do you remember how we constructed F? We threw away some pieces of information from Zeta. We throw away prime powers, and we throw away the error term in the prime logic. And because G is exactly the ratio of these two guys, it captures precisely this information. And it's not hard to show that log G one is a sum over zeros, and log G two is a sum over proper prime powers. And for instance, if S is real, this is positive, and this sum over zeros, one can throw into it anything you know about zeros of the Zeta function. For instance, you can show that it exhibits large values, it exhibits small values, you can bound it using zero free regions, et cetera. And I want to finish on this slide. Here I'm saying that I want to compare with what I started this talk with, with the polynomial and permutations. Let me look at the density of M-smooth polynomials and call it generating function Zeta Q. It's a finite order product, just as in the integer case. Let me also look at the density of M-smooth permutations and look at E-generating function Zeta S. This will be some exponential function, entire function. And what I actually prove for polynomials and permutations is that this ratio is asymptotic to the ratio of generating functions, Zeta Q by Zeta S at some special saddle point C. Let me call it C prime, because it's not the C from the integer rule. In the range where M is at least three over two log M. And this is a perfect match to what I prove in the integers where C divided by this approximation lambda, which is morally the big one function, at least in order of magnitude, is asymptotic to the ratio of the partial Zeta function by F, which is the melin transform of lambda at the saddle point. But there is a perfect analogy here, I would say. And I think I would end here. So I would like to thank you very much for listening and for the questions, and that's it.


In this video, we provide the solution to question number 16 from practice the practice final exam for math 1050 We have to compute the remainder in quotient of the rational function r of x equals 3x to the fourth minus x cubed plus x minus 2 all over 3x squared plus x plus 1 as the denominator is a quadratic Function we get we can't use synthetic division to do division here. We're gonna have to use long division So let's set that thing up. So our divisor is 3x squared plus x plus 1 We need to then divide the numerator 3x to the fourth Minus x cubed. There's no x squared terms. I actually gonna leave a space for it Plus x minus 2 like so So then we ask ourselves how many times is 3x squared divided into 3x to the fourth That's gonna happen exactly x squared times So that's why I left a gap for the x squared term there So we get what we're doing here is 3x to the fourth divided by 3x squared That equals just x squared. That's where this number came from So next what we have to do is we have to take x squared and times it by our divisor 3x squared plus x plus 1 Distribute this throughout and you end up with 3x to the fourth plus x cubed plus x squared like so I'm gonna record that over here. So we have a 3x to the fourth Plus x cubed plus x squared and then we subtract this from above The the first term should always cancel out if we chose this number correctly Then be careful with this because you have a double negative. Why I shouldn't say you have a double negative You have negative here then this distributes.  You know you could bring down all the terms We actually won't need the negative 2 yet. So I'm not gonna bring it down yet Then we repeat this process How many times this 3x squared divide into negative 2x cubed and that situation we'd end up with a negative 2 thirds X like so so again, what are we doing here? We're just computing the ratio What is computing the ratio negative 2x cubed divided by 3x squared that simplifies to be negative 2 Thirds x like so. That's the number that went up here Then we have to take This partial quotient two-thirds x and times it by the divisor 3x squared plus x plus 1 So with the first one you end up with a negative 2x cubed for the next one You're gonna negative two-thirds x squared and another negative two-thirds x like so We then record that over here negative 2x cubed minus two-thirds x squared minus two-thirds x like so We then subtract this from above The first term should cancel out perfectly the next one's maybe not so much we do have some fractions here So be careful here. So you're gonna subtract 1x squared and then this is a double negative So you have you're gonna take one Just it should say sorry negative one plus two-thirds Negative one of course we can write that as negative three-thirds plus two-thirds So that's gonna give us a negative one-third when we're done That's the coefficient of x squared that we're gonna record right here negative one-third x squared Similar thing for the next one you will distribute this negative sign here So that's gonna be a one plus two-thirds one plus two-thirds this time. So again, it's three-thirds plus two-thirds That's gonna give us five-thirds. That's the coefficient of x that we need to put in there So we get five-thirds x like so bring down the negative two and then we have to do this one more time So again, we have the leading term here negative one-third x squared We divide that by three that actually is going to give us a negative one-ninth Right there as the quotient. So at this moment actually I'm gonna put a label here. We found our quotient Let's actually label this this is our quotient Because we're asked to identify the quotient. So we have the quotient, but we need to find the remainder So we're not quite done with that yet What we have to do is we have to take this thing and times it by negative one-ninth So three x squared times negative one-ninth will be negative one-third x squared X times negative one-ninth will be one negative one-ninth x and then negative one-ninth times one is negative one-ninth like so We subtract this from above Again, the leading term should cancel out perfectly For the next one might take a little bit more effort here because we have some fractions to deal with So we have five-thirds plus one-ninth So we should rewrite the five-thirds as 15 ninths plus one ninth. That's gonna give us 16 ninths there So we record that 16 over 9 x and then for the last part there we have a negative two plus one ninth Negative two plus one ninth. So again, I'm gonna rewrite the denominator. So it's a nine there So I'm gonna get negative 18 over 9 plus one ninth like so And so that'll then combine to give us a negative 17 ninths in which case that then gives us The rest of the remainder negative 17 ninths like so Maybe put a box or something to indicate that we've now found the remainder here Clearly indicate what we have and so zooming out We could then see the quotient was x squared minus two-thirds x minus one ninth And then the remainder was 16 16 ninths x minus 17 ninths