text:
All Language Resources is an independent review site. We earn money when you click on some of the links on our site. Learn More

# Language101.com Course Review – The Worst I’ve Ever Tried!

## 0.6

#### Summary

Language101 (not to be confused with LanguagePod101) is the worst course I’ve ever tried. The platform has ten different languages for you to choose from and focuses on teaching speaking and comprehension. Consequently, you likely won’t learn how to spell, write or translate the language, or even learn any of the grammar. I found the courses to be poorly designed — each ‘lesson’ is identical in form, and the fast-paced learning method seems inefficient; it is doubtful whether even beginners will learn much. To make matters worse, the price is obscenely expensive.

##### Quality

Easy enough to use, but I thought the content was severely lacking.

##### Thoroughness

There are virtually no explanations at all. You just learn to parrot and memorize words and phrases.

##### Value 0 star

Terrible value in my opinion. It honestly feels like a scam. Not worth using even if it were free.

Languages: Spanish, German, French, Russian, Japanese, Italian, Danish, Canadian-French

#### Price

Language101 has lots of different subscription plans for you to choose from. A one-time payment for access to all of its languages costs $727 or$97/month if you opt for the monthly installments option (that would end up working out at $1,164 if you chose the latter!!). For ‘1 Package’ of the language of your choice it is then$227 for lifetime access or $527 if you want all 3 packages in a given language. Alternatives: Literally anything else on the Internet (or in a bookstore) would be better! Before trying out Language101 for myself, I, unfortunately, confused it in my mind with the LanguagePod101 courses made by Innovate Languages (FrenchPod101, ChineseClass101, etc) which I like and think are quite good. As such I ended up being quite disappointed as there really is no comparison between the two as I found Language101’s ‘courses’ (if you can even call them that) to be very poorly thought out and that they don’t teach you all that much. Although the Spanish 1 Package is “for beginners,” the fact that there are no explanations means that you just have to memorize and parrot random words and phrases that are flung at you out of context. The ‘learning method’ that is used also seems to me to be pretty inefficient as you are asked to work through the content at breakneck speed. I fail to see how a beginner, who has never learned the language before, is expected to be able to immediately produce words and phrases in a language they don’t know. I found it to be a quite bizarre experience, being repeatedly told that I wasn’t hitting the ‘optimal learning’ of 7 seconds per phrase target. While I think beginners would learn some words and phrases just by using the platform I don’t think this is a very effective way of learning a language and so wouldn’t recommend it to anyone. The fact that you aren’t explicitly taught how to spell, write or translate the language, or any grammar and only learn to parrot phrases out of context means that for me Language101 is best avoided. In fact, it’s so bad that we’ve never given a review rating as low as the one we gave to Language101. Do yourself a favor and use any other language learning resource instead. ##### MOST RECOMMEND RESOURCES BY LANGUAGE ## Overview of Language101 So far Language101 has ten languages for you to choose from and these range from standards such as Spanish, Japanese and English to less popular ones such as Danish, and intriguingly, French-Canadian. The lowest-level package is aimed at “beginners who want to speak a little [language],” and the entire series in any language should allow you to “converse with confidence at a basic level.” I find this very unlikely. The courses, if you can call them that, are generally poorly laid-out and not well-designed, and the amount of content varies between the languages. They are really just a collection of ‘lessons’ – again, if you can even call them that – and so ‘Beginner Lesson 5’ of Canadian-French is somehow the 41st lesson of the course. In fact, the platform doesn’t even expect you to work through them in order and so under the Study in Order section it is grudgingly written ‘you will probably want to study some of our lessons in order’. The main study tool or batch of content that you are seemingly expected to work through is actually under ‘Start Studying’ where random words and phrases in the language you are learning are chucked at you. You then answer these as quickly as possible and say the expected phrase, in a language you have never learned before, out loud to yourself. You then have to rate how you have done, almost certainly rating yourself ‘wrong’ over and over again. To encourage you, however, you will get points for each answer. This is the level of speaking and understanding that you will come away with after having used their ‘innovative’ method and it is the only exercise for you to do on the whole platform. Over and over again. While some other language learning platforms have slightly similar exercises for you to work through, none of them, as far as I know, are solely made up of this one exercise on repeat. ## Getting started with Language101 After you have signed up for an account with Language101 and logged in, you’re almost ready to go – all you have to do to is select your language of choice. I decided to go with Italian. Once you have selected whichever one you want to learn you are then taken to your home study page where you can see your ‘study streak’ and just how much progress you have made so far. You then click on ‘Start Studying’ to begin learning your language of choice. Here I was slightly surprised to be greeted by the following page which asked me to say ‘I really like Italy’ in Italian with the only hint given being that I was expected to produce four words. After you’ve tried to formulate it in your mind or said it out loud (good luck if you are actually indeed a beginner and have never seen a word of Italian before) you then click either ‘I’ve tried to say it out loud’ or ‘I don’t know’. This then plays a recording of the phrase said in Italian. You then say whether you got it right by clicking one of the options that range from ‘wrong’ right up to ‘perfect’. In this instance, I gave myself a ‘good’ rating and continued on to the next phrases. It took me three or four ‘gos’ to realize that there is actually a timer and you get points depending on how quickly you conjure up the phrase, stop the clock and see if you got it right or not. The green dot in the middle of the screen winds down like a clock, pretty quickly turning orange and then red when you’re out of time. While some ‘gamification’ can undoubtedly encourage people to do better, I actually found this to be quite stressful. After working my way through the first five or ten phrases, the couple which I had got wrong came around again and I found myself getting them right the second time. Once I had rated myself ‘perfect’ for them, new phrases were then introduced. I kept this up for half-an-hour as Language101 recommends you do before taking a look at my progress and my stats. These showed which phrases I had learned so far and what rating I had given myself for each of them. After this somewhat bizarre introduction to both Italian and Language101, I had somehow unlocked actual lessons and a huge list of them appeared before me when I clicked on the ‘Study in Order’ link on the home page. After clicking on the first one, ‘Beginners Lesson 1 – Formal’, I was greeted with similar exercises as before, just with different colors and a slightly different look to them. You then work through them in exactly the same way, saying the missing word or phrases out loud before checking to see if you have got it correct or not. Down below you can then listen to each word or phrase individually and add them all to your study plan if you so wish. This first lesson ended up being quite similar to the introduction but without the time pressure and apparently the points too. Now that we’ve taken a look at the first lesson and what it offers up as well as what could possibly be described as a somewhat stressful introduction to the language and platform, what do the later lessons look like? ## ‘Lessons’ on Language101.com After trying the next couple of lessons and seeing that they followed exactly the same formula, I skipped ahead and tried some of the later beginner lessons. Unfortunately, these were identical in form and while, for the most part, the content did get slightly more complicated, the last lesson still asked me how to say ‘why?’ – ‘perche’. Before criticizing its many shortcomings I decided to take a look around the rest of the website to see what else it had to offer up and in doing so stumbled across their ‘Top Reviews’ section. Here, Brent Van Arsdell, Language101’s founder, gives his verdict on various other language learning resources such as Pimsleur, Duolingo and Rosetta Stone. Not surprisingly, in the reviews, Language101 usually compares quite favorably with its more famous competitors although Brent generously does allow that some of them are better at some things. Interestingly enough he also gives his verdict on Language101 and what you can expect from it and also, more importantly, what you can’t expect from it. He goes on to say that ‘Our program does NOT teach you how to spell, write, or translate your new language’. In addition to this, you shouldn’t expect to learn any grammar as they also don’t cover that (apart from for Spanish). Now, that’s already quite a lot of things that it doesn’t do with many of them being key aspects of learning a language. So, what does it do? Well, Brent asserts that Language101’s aim is to ‘teach you to speak and understand a very large amount of your new language very quickly’. And, if you want to learn quickly, well you have to study quickly! The idea behind the whole method seems to be, therefore, to study at speed and cram in as many phrases into 60 seconds as you can. The reason being that by devoting a whole minute to studying a complicated phrase full of grammar points and vocabulary you have just been introduced to is a waste of time. So to get the best out of the platform you should, in Brent’s words, ‘study many phrases very quickly and just try to improve slightly each time’. Now, this review by Brent of his own language learning platform thankfully answered quite a few of my questions and explained that awful timer which had so quickly counted down to nothing. My Stats Page also started to make sense as I’d previously thought the following was just gibberish if not a bit insulting and aggressive – ‘Your average speed per phrase was 24 seconds. You are studying too slowly. Try to do a new phrase every 7 seconds’. Despite these explanations for what I feel are the platform’s many, many shortcomings, I am still not too sure what to think of it. For one, the speed at which you are asked to produce an answer seems very unreasonable and could even be demotivating to students. For instance, I just can’t fathom how a beginner, who’s presumably never learned the language before, is supposed to even go about answering the questions. Are they just meant to keep clicking ‘show me the answer’ to reveal the correct phrase, getting everything wrong over and over again, but working through as many as possible? It just kind of seems ridiculous and a bit pointless as the best they can hope to do is slowly learn various phrases but out of context and without knowing any of the grammar that is involved. Funnily enough, the random flurry of Italian words and phrases I had been asked to produce right at the beginning, something I originally thought might be a test to place my level, is apparently the platform’s main study tool. This means you are expected to just keep clicking through phrases you can’t possibly know unless you’ve studied the language before. I imagine that for a first time user this would be very confusing as you are not given an explanation about why you are even doing this and what it is supposed to achieve. You are just prodded to go faster and faster through incomprehensible words and phrases. On top of this, you are never really given any explanation about what any of it all means or how a sentence is constructed. What also cracked me up was that at the top of the Study in Order section it says ‘In addition to using our main study tool, you will probably want to study some of our lessons in order’. I imagine that this would make sense to a lot of beginners, slowly building up their vocabulary before continuing onto something more complicated. Now, with a lot of platforms that would work, but with Language101 there is no real progression in difficulty between any of the beginner lessons; they all include complicated and not-so-complicated words and phrases. With Language101’s English ‘course’ for instance, the ‘Study in Order’ section starts you off with ‘The Ultimate Beginner’s Lesson’ and three lessons later you’re suddenly discussing ‘Business and Politics – Laws and Ordinances’. I mean, what!?! This just goes to show that the courses and lessons aren’t very well thought out. With Italian, for instance, you can work your way through Beginner Lessons 1 – 6 until you are suddenly presented with the Ultimate Beginners Lesson before that name for the lesson completely disappears. I must say, however, that the Italian course seemed much more comprehensive and well laid out than the English and German ones I briefly checked out. It covers quite a lot of different topics and there were many more lessons than with their counterparts. Disregarding the fact that you won’t learn how to spell, write or translate the language and you also won’t learn much if any grammar, I just don’t think Language101 does what it claims to do very well either. Essentially you would probably come away learning quite a few words and phrases, just without their cultural context and without knowing how they were constructed. In addition to this, I didn’t actually get any speaking practice, as there is no conversation practice and you are just asked to say words and phrases out loud to yourself over and over again, hopefully improving in the process. As such, you are learning to parrot, not to speak, and you never get to hear phrases that are longer than a short sentence of around five or six words. Throw in the random ‘time crisis’ scenario and this really does make for a bizarre package. I’m not entirely sure who would benefit from or even use this kind of learning resource and in all honesty, I’m not if many people actually are. On the ‘Leaderboard’ you can see how you’re doing and compare the points you’ve picked up against other people. This is possibly meant to be motivating but I’m not too sure. On some days not even ten people have used the platform across all of its languages and on others some people have only managed three or four minutes. This seems to indicate that people aren’t enjoying or don’t feel they’re benefitting from the learning method. As you may already have gathered, I didn’t particularly enjoy using Language101 and wasn’t convinced by its method. On top of its one-dimensional ‘lessons’ which ask you to do the same thing over and over again without actually really teaching you anything, I also think the website looks a bit clunky and is poorly designed and laid out – just like the lessons themselves. I did, however, find the literal translations of the phrases you were asked to produce quite helpful and I suppose that this does show that some, but not enough, thought has been put into the product. As I believe almost everything needs to be improved, I can’t recommend Language101 to beginners even though I think they could learn some useful words and phrases through it. This is because there are countless more efficient methods out there where you actually understand the grammar and vocabulary in the sentences you’re learning to parrot. Using Language101, I’m pretty sure you would stand almost no chance at getting to an intermediate level in your language of choice, and I think this is sadly but justifiably reflected in how many users actually use the platform. The way I see it, you’d be better off using pretty much any other resource instead of Language101 to learn a language. ## Plans and Prices For people interested in trying out Language101 for themselves there is thankfully a free 30-day trial which you can sign up for. After that, if you do find that the language learning method works for you then there are loads of different subscription plans and packages for you to choose from. I think these are all horrendously overpriced however so I would already recommend you not to consider signing up to them! First of all, let’s take a look at the one payment then lifetime access options. The ‘All Languages Super Package’ gains you lifetime access to the ten different languages that the platform has to offer up and this will set you back$727.

In contrast, each ‘1, 2 and 3 Package’ for each individual language will cost you $527. Just ‘1 Package’ of your language of choice works out at$227. Now, unfortunately, I am not too sure what the difference between the 1 and 1, 2 and 3 packages is but I have to assume you get more with the latter.

I say ‘more’ but really all of the ‘courses’ and ‘lessons’ are so poorly designed that I don’t suppose it’s much consolation if you do get more of the identical exercises to work through or not.

After these options, we then go to the ’12 Payments then Lifetime Access’ options which see you pay a certain amount of money each month for one of their subscription packages. This obviously works out to be much more expensive than if you simply pay one lump sum upfront for lifetime access.

For the ‘All Language Superpack’ it then works out at $97 a month, at$77 for the ‘1, 2 and 3 Package’ and at $47 for just the ‘1 Package’ of the language of your choice. This means that if you select the latter, you will end up paying$564 over the course of a year for a language resource that doesn’t teach you much (if any) grammar, doesn’t teach you to spell, write or necessarily understand how the language is constructed and doesn’t even really teach you how to speak or hold a conversation!

This is simply insanity and I can’t stress enough what poor value I think it is.

You are much better off signing up for almost any other language learning platform on the internet as this is one of the most expensive and worst value products around in my opinion.

On All Language Resources, we’ve reviewed over a hundred language learning resources and briefly tried out countless others. We’ve never given a score as low as the one given to Language101.

It is frankly insulting that they even attempt to charge people that much for what is essentially just one exercise you do over and over again on repeat as quickly as possible until you finally learn a word or phrase out of context.

I would already have serious qualms about using it even if it were free as there are just so many better products out there that will actually teach you the basics of the language.

For what you get for your money, I don’t think there’s anything as bad as Language101. It’s truly impressive just how terrible it really is.

## Final Thoughts

It was only after I had worked my way through all, well, I say all but really mean the same identical exercise over and over again, that I checked how much one of Language101’s subscription plans costs and I was shocked at how much they were charging.

In experience, this product had poorly thought out ‘lessons’ (they’re not even really lessons), zero explanations and a useless, possibly even demotivating, gamification aspect. I would find it barely even worth using if it were free, but \$227?!

At its cheapest! And for just one language?!

Wow.

This has to be one of the most expensive, overpriced and actually just downright useless language learning platforms out there.

I mean, besides all of the things it tells you that it doesn’t do, you can only hope that it will teach you how to understand and speak the language and I didn’t even find it to do that well at all. For setting its scope out so narrowly, it is shocking that it so widely misses the mark.

As such, you are almost certainly better off spending your money just about anywhere else on the internet. I feel bad for anyone that paid for this ‘course’.

Anything but Language101.com!

#### Learning a language doesn’t have to cost money.

Sign-up to get a huge list of free resources tailored to the language you’re studying.

[contact-form-7 id=”11784″]

We won’t send you spam. Unsubscribe at any time.


text:
Question

# A drop of mercury of radius $$2\ mm$$ is split into $$8$$ identical drops. Find the increase in surface energy. Surface tension of mercury $$= 0.465\ Jm^{-2}$$

Solution

## $$R=2mm$$ $$\Rightarrow$$ $$2\times {10}^{3}m$$The volume of  drop is given as:$$\cfrac{4}{3}\pi{R}^{3}=8\times \cfrac{4}{3}\times {r}^{3}$$$$\therefore$$ $${R}^{3}=8{r}^{3}$$$$\cfrac{{R}^{3}}{8}={r}^{3}$$ $$\Rightarrow$$ $${(\cfrac{R}{2})}^{3}={r}^{3}$$$$\therefore$$ $$r=1mm={10}^{-3}m$$$${A}_{1}=4\pi {R}^{2}$$ $$\Rightarrow$$ $$4\pi {(2\times {10}^{-2})}^{2}=4\pi \times 4\times {10}^{-6}=16\pi \times {10}^{-6}$$$${A}_{2}=8\times 4\pi {r}^{2}=32\pi {({10}^{-2})}^{3}=32\pi {10}^{-6}$$$$\Delta A={A}_{1}-{A}_{2}$$$$(32\pi-16\pi){10}^{-6}=16\pi\times {10}^{-6}$$the increase in surface energy will be:$$E_s=T\Delta A=23.376$$Physics

Suggest Corrections

0

Similar questions
View More

People also searched for
View More

format: plain


text:
# How does the demand curve change if there is an increase in the quantity demanded?

Jul 7, 2015

An increase in quantity demanded will result in a movement along a given demand curve, whereas an increase in demand will lead to a shift outwards of the entire demand curve.

#### Explanation:

A change in quantity demanded refers to a response in quantity when price changes, for example, when price falls, quantity demanded will increase, The movement is along the same demand curve. But a change in demand relates to the entire relationship between demand and other factors that affect demand, for example, tastes, income etc. For example, when income increases, assuming other factors are kept constant, the quantity demanded at any one price increases and the entire demand curve will shift outwards to the right.

When Price is P’, quantity demanded is Q’. When price falls to P, quantity demanded increased to Q. The movement from Q’ to Q is an increase in quantity demanded.

When demand curve is dd’, at price P, quantity demanded is Q. Then when income increases, all other things remaining constant, the demand curve shifts outwards to DD’. At the same price P, the quantity demanded on the new demand curve is now Q’. The change in demand from Q to Q’ is an increase in demand.


text:
# Bigfloat lufact

#1

Has anyone noticed anything odd with lufact on BigFloats? Is there some theoretical weird instability thing I should know about? I am wondering because as I am testing some algorithms I am noticing a pattern that the same methods (ODE solvers) with the same coefficients (some methods are only specified to Float64 precision) suddenly fail if the coefficients are changed to BigFloats. But I can “save” the methods if I change the linear solve from lufact to qrfact.

This is odd and is against my intuition: why would the same numbers give a bad lufact when converted to BigFloat but not as Float64s? If there’s no reasoning for this and it’s likely a problem with the generic fallback I’ll dig into this more and make an MWE. I just wanted to ask first because it might take a bit to pull out an actual example which isn’t integrated with everything else, but I have many different tests showing that it’s only lufact. I know qrfact is more stable, but this seems bizarre to me.

#2

I haven’t seen anything like that. How are the solvers failing? How ill conditioned are the matrices? It would be great if you could provide an example.

#3

I pulled an example out. In this case, it looks like lufact! is the only one correct on BigFloat:

A = 92.317*eye(4)
b = [0.0970454, 0.00944241, 0.167562, 0.08518]
println("True solution")
println(b/92.317)

lufact!(A)
println("lufact")
println(A\b)

A = 92.317*eye(4)

qrfact!(A)
println("qrfact")
println(A\b)

A = 92.317*eye(4)

svdfact!(A)
println("svdfact")
println(A\b)

Abig = big.(A)
bbig = big.(b)

lufact!(Abig)
println("lufact bigfloat")
println(Float64.(Abig\bbig))

Abig = big.(A)

qrfact!(Abig)
println("qrfact bigfloat")
println(Float64.(Abig\bbig))

Abig = big.(A)

using GenericSVD
svdfact!(Abig)
println("generic svdfact bigfloat")
println(Float64.(Abig\bbig))

This prints out the following:

True solution
[0.00105122, 0.000102282, 0.00181507, 0.00092269]
lufact
[0.00105122, 0.000102282, 0.00181507, 0.00092269]
qrfact
[0.00105122, 0.000102282, 0.00181507, 0.00092269]
svdfact
[0.00105122, 0.000102282, 0.00181507, 0.00092269]
lufact bigfloat
[0.00105122, 0.000102282, 0.00181507, 0.00092269]
qrfact bigfloat
[-0.00105122, -0.000102282, -0.00181507, 0.00092269]
generic svdfact bigfloat
[0.0485227, 0.00472121, 0.083781, 0.04259]

Now I’m getting really confused. There’s definitely something odd in GenericSVD though.

How do you use debuggers?
#4

You’d have to use the output of the in-place factorization. The input matrix hasn’t changed type and the interpretation of the elements has changed. E.g. for the generic SVD, you’d like to do

julia> A = big.(92.317*eye(4));

julia> F = svdfact!(A);

julia> Float64.(F\b)
4-element Array{Float64,1}:
0.00105122
0.000102282
0.00181507
0.00092269

julia> b/92.317
4-element Array{Float64,1}:
0.00105122
0.000102282
0.00181507
0.00092269

#5

Oh my bad. The real code is actually doing the correct form there. Let me try to find out what’s going on once more.

#6

Aha, I got it:

W = 92.1935*eye(8)
linsolve_tmp_vec = [0.323673, 0.369958, 0.0735182, 0.409571, 0.46994, 0.335103, 0.0287147, 0.402722]
vectmp = similar(linsolve_tmp_vec)

pA = lufact!(W)
A_ldiv_B!(vectmp,pA,linsolve_tmp_vec)
println((vectmp))

# vectmp == [0.0035108, 0.00401284, 0.000797434, 0.00444251, 0.00509732, 0.00363478, 0.000311461, 0.00436823]

W = big.(92.1935*eye(8))
linsolve_tmp_vec = [0.323673, 0.369958, 0.0735182, 0.409571, 0.46994, 0.335103, 0.0287147, 0.402722]
vectmp = similar(linsolve_tmp_vec)
pA = lufact!(W)
A_ldiv_B!(vectmp,pA,linsolve_tmp_vec)
println(Float64.(vectmp))

# vectmp == [0.323673, 0.369958, 0.0735182, 0.409571, 0.46994, 0.335103, 0.0287147, 0.402722]

Interestingly, in the bigfloat one we get vectmp == linsolve_tmp_vec (terrible variable names, don’t hate) but not vectmp === linsolve_tmp_vec. So I checked:

println(@which A_ldiv_B!(vectmp,pA,linsolve_tmp_vec))
A_ldiv_B!(Y::Union{AbstractArray{T,1}, AbstractArray{T,2}} where T, A::Factorization, B::Union{AbstractArray{T,1}, AbstractArray{T,2}} where T) in Base.LinAlg at linalg\factorization.jl:u55

which for me is the same as this spot:

I see a copy! there, and so maybe nothing is really being called?

#7

There is a real issue here and it is quite old. The reference to the input array is broken so although the array returned has the right values, the rhs is not getting updated. See https://github.com/JuliaLang/julia/issues/22683

#8

I have a good idea about what went wrong.
The results to Abig\bbig after qrfact! and svdfact! must be wrong, because of wrong usage.
You could have written Abig = qrfact!(Abig) etc.
While the contents of Abig is overwritten, the Abig\big works with the modified Abig (with an ordinary matrix inverse multiplication. In order to call the multiplication of typeof(qrfact!(Abig), it is necessary to have an object of that type, not Matrix{BigFloat}.
Of course it is better style to use a different variable name for the factorization.

#9

No, read the whole thread. Yes, the first example was botched, but not the later one. It’s an issue in Julia.


text:
Separating two sugars according to their heavy atoms - Steered Molecular Dynamics

I am trying to separate two methyl-N,N'-diacetylchitobiose sugars using steered molecular dynamics in AMBER. I have tested out:

&rst
iat=-1,-1,
r2=2.5,
rk2=10.0,
r2a=12.5,
iresid=0,
fxyz=1,1,1,
outxyz=1,
igr1=2,5,6,8,9,11,14,16,18,20,22,24,26,27,28,32,33,35,36,38,41,43,45,47,49,51,53,54,55,59,60,
igr2=65,68,69,71,72,74,77,79,81,83,85,87,89,90,91,95,96,98,99,101,104,106,108,110,112,114,116,117,118,122,123
/

Which should apparently separate the two sugars relative to their heavy atoms from a distance (between each other) of 2.5 A to 12.5 A along the x,y and z axes and using a force constant of 10 (I think kcal/mol). The solvent I am using is water.

I ran this separation for 100 ns and the two sugars refused to separate. I am not sure if my force constant is too small, or if something else is wrong with my reference file. I have googled it and spoken to m supervisor about it, and unfortunately I have not succeeded in finding a solution.

Any help would be appreciated.

• Are you sure you have specified the correct groups/residue IDs/atom numbers? If yes, then have you tried increasing the force constant to a very high value, to see whether or not the molecules separate?
– Bdrs
Jun 6 '18 at 8:53
• The force constant was too low. I managed to fix it now. Jun 6 '18 at 10:32


text:
# Pointed objects in a category

Let $\mathscr{C}$ be a model category (following Mark Hovey's "Model Categories") and let $*$ be its terminal object. Consider the slice category $*/\mathscr{C}$: it's endowed with a canonical forgetful functor $*/\mathscr{C} \to \mathscr{C}$ which has a left adjoint given by $X \mapsto X\coprod *$, with the inclusion in the coproduct as basepoint $* \to X\coprod *$. I can't understand why such a functor (the left adjoint) should be faithful, as claimed in Hovey's book at page 4. In fact this amounts to say that if two arrows $X\coprod * \to Y\coprod *$ of the form $f\coprod 1_*, g\coprod 1_*$ are equal, then $f=g$. This is of course true in the most common examples but why is it true in this generality?

-
Since the functor is not faithful in general (see Zhen's answer), a natural question would be: Under what asssumptions is it faithful? –  Martin Brandenburg Dec 20 '13 at 10:50
@MartinBrandenburg It suffices to assume that the coproduct insertion $Y \to Y \amalg 1$ is monic, which happens in e.g. any extensive category. –  Zhen Lin Dec 20 '13 at 11:57
Actually it's equivalent to that fact: I got stuck after realizing this, since I wasn't able to show that it holds. Moreover, it's enough to find a map $* \to Y$ for each $Y$, since in that case the coproduct injection would be a section, hence a mono. –  Edoardo Lanari Dec 20 '13 at 14:27

The claim is false. Let $\mathcal{C}$ be the category of (commutative) rings. Then the terminal object in $\mathcal{C}$ is the trivial ring $\{ 0 \}$, and the slice under $\{ 0 \}$ is equivalent to the trivial category $\mathbb{1}$. In particular, the forgetful functor ${}^{\{ 0 \} /} \mathcal{C} \to \mathcal{C}$ cannot have a faithful left adjoint.
Are you considering some trivial model structure on $\mathcal{C}$? Why should that be equivalent to the trivial category? It seems to me that is equivalente to $\mathcal{C}$ itself, but I can be wrong. –  Edoardo Lanari Dec 20 '13 at 10:10
The question has nothing to do with model categories. Also, in case it wasn't clear, my rings have unit and homomorphisms preserve them. So the only possible ring homomorphisms $\{ 0 \} \to R$ are those where $R$ is also trivial. –  Zhen Lin Dec 20 '13 at 10:12


text:
# How to create a new math symbol?

How can I create my own scalable math operator with limits just like the sum symbol? Specifically I want to invent a "concatenation" symbol that looks alike to: "[". For example I want to put

[ _{i=1}^N

etc. where the subscript/superscripts are positioned below and above the symbol as in "eqnarray" environment.

I have tried with \newcommand and creating a drawing similar to "[" with \begin{picture} \end{picture}, but it didn't work.

Thanks for the help!

• Something like $\mathop{\Big[}\limits_{i=1}^N$? – Jairo A. del Rio Dec 6 '20 at 13:11
• Welcome! If you post a very small code with what you tried, it would be great: people here could find what's wrong without having to guess too much. So please post a minimal working example (MWE) even if it doesn't really work – Rmano Dec 6 '20 at 13:13
• – Steven B. Segletes Dec 6 '20 at 13:37
• @StevenB.Segletes, after posting my answer, I realize this is essentially the same thing you did in your linked solution. Would you like to post it as an answer? I can remove mine. – Sandy G Dec 6 '20 at 15:01
• @SandyG Your answer is fine (+1) – Steven B. Segletes Dec 6 '20 at 16:47

A simple solution would be to use the \DeclareMathOperator* command from the amsmath package. The unstarred version places sub- and superscript limits to the right of the operator; the starred version places limits above and below the operator when it is in displaystyle.

\DeclareMathOperator*{\concat}{[} will produce the following results:

You could leave it like that, but for me, the displayed version produces a [ symbol that is too small. Using the scalerel package, you could make the symbol the same size as a \sum symbol:

\DeclareMathOperator*{\concat}{\scalerel*{[}{\sum}}, which will produce the following:

Here is a MWE:

\documentclass{article}

\usepackage{amsmath,scalerel}

%\DeclareMathOperator*{\concat}{[}
\DeclareMathOperator*{\concat}{\scalerel*{[}{\sum}}

\begin{document}

$\concat_{n=1}^{\infty} a_n$

Inline: $\concat_{n=1}^{\infty} a_n$.

\end{document}

• Excellent!! Thank you – Leonardo Vanni Dec 6 '20 at 15:14
• I am agree with the user. +1 – Sebastiano Dec 7 '20 at 21:14

You can use a modified version of https://tex.stackexchange.com/a/23436/4427 (first code set).

\documentclass{article}
\usepackage{amsmath}
\usepackage{graphicx}

\makeatletter
\DeclareRobustCommand\bigop[2][1]{%
\mathop{\vphantom{\sum}\mathpalette\bigop@{{#2}{#1}}}\slimits@
}
\newcommand{\bigop@}[2]{\bigop@@#1#2}
\newcommand{\bigop@@}[3]{%
\vcenter{%
\sbox\z@{$#1\sum$}%
\hbox{\resizebox{#3\dimexpr\ifx#1\displaystyle.9\fi\dimexpr\ht\z@+\dp\z@}{!}{$\m@th#2$}}%
}%
}
\makeatother

\newcommand{\bigconcat}{\DOTSB\bigop[0.5]{[\,}}

\begin{document}
$\sum_{i=1}^n \bigconcat_{i=1}^n x_i \qquad \textstyle \sum\bigconcat_{i=1}^n x_i \qquad \scriptstyle \sum\bigconcat_{i=1}^n x_i \qquad \scriptscriptstyle \sum\bigconcat_{i=1}^n x_i$
\end{document}

The scaling is necessary because of how TeX is treating [.

My idea uses \left[\phantom{\sum}\right. trick:

\def\concat{\mathop{\left[\vphantom{\sum}\right.}}

Test:
$\concat_{n=1}^\infty \displaystyle \concat_{n=1}^\infty \scriptstyle \concat_{n=1}^\infty$

\bye


text:
Home
• Get access
• Print publication year: 2008
• Online publication date: May 2010

# 8 - Representations of semisimple Lie algebras

## Summary

In this chapter, we study representations of complex semisimple Lie algebras. Recall that by results of Section 6.3, every finite-dimensional representation is completely reducible and thus can be written in the form V = ⊕niVi, where Vi are irreducible representations and ni ∈ ℤ+ are the multiplicities. Thus, the study of representations reduces to classification of irreducible representations and finding a way to determine, for a given representation V, the multiplicities ni. Both of these questions have a complete answer, which will be given below.

Throughout this chapter, g is a complex finite-dimensional semisimple Lie algebra. We fix a choice of a Cartan subalgebra and thus the root decomposition g = h ⊕⊕R gα (see Section 6.6). We will freely use notation from Chapter 7; in particular, we denote by αi, i = 1 … r, simple roots, and by siW corresponding simple reflections. We will also choose a non-degenerate invariant symmetric bilinear form (,) on g.

All representations considered in this chapter are complex and unless specified otherwise, finite-dimensional.

Weight decomposition and characters

As in the study of representations of sl(2, ℂ) (see Section 4.8), the key to the study of representations of g is decomposing the representation into the eigenspaces for the Cartan subalgebra.

Definition 8.1. Let V be a representation of g. A vector uV is called a vector of weight λ ∈ h* if, for any h ∈ h, one has hu = 〈λ, hu.


text:
# Random number weighted probability - where highest probability is least likely

I want to do a standard picking a random number by weighted probability problem.

Example Data Set:

Person A    70
Person B    30
Person C    40

So normally, these are the probabilities of being picked randomly:

Person A    50%
Person B    21%
Person C    29%

Now I want to make it so it's inverted, where the higher your probability, the less likely you are to be picked. How do I invert it?

The way I tried:

Invert the probabilities

Person A    50%
Person B    79%
Person C    71%

Add those up .5 + .79 + .71 = 2

Divide them by the new total:

Person A    .5/2  = 25%
Person B    .79/2 = 40%
Person C    .71/2 = 35%

I'm not confident in that answer though - is that the correct way of donig it? Or am I thinking about it wrong?

• You might want to change your terminology: it's confusing to say "the higher your probability, the less likely you are to be picked". Instead, how about "the higher your weight" or "the higher your score"? – Théophile Aug 22 '18 at 16:43

There's no right way to do this - any method of inversion will have its pros and cons. However, a way to do this is to invert the weights before computing probability, i.e., $$\textrm{New Weight} = \frac{100}{\textrm{Old Weight}}$$


text:
# Existentially closed models of bowtie-free graphs

Setting

Definition(1). $$\mathcal{M} \models T$$ is an existentially closed (e.c.) model of $$T$$ if whenever $$\mathcal{N} \models T$$, $$\mathcal{N} \supseteq \mathcal{M}$$, and $$\mathcal{N}\models \exists \bar{v} \phi(\bar{v},\bar{a})$$, where $$\bar{a} \in M$$ and $$\phi$$ is a quantifier free formula, then $$\mathcal{M} \models \exists \bar{v} \phi(\bar{v},\bar{a})$$.

Definition(2). Let $$T$$ be a theory. A theory $$T^*$$ is called the model companion of $$T$$ if $$\mathcal{M}\models T^* \text{ iff } \mathcal{M} \text{ is an e.c. model of } T$$

So $$T^*= \bigcap_{\mathcal{M} \text{ is e.c.} } Th(\mathcal{M})$$, where $$Th(\mathcal{M})$$ is the full theory of $$\mathcal{M}$$.

Case of study

Let $$T$$ be the theory of bowtie-free graphs (i.e. $$T$$ is the theory of graphs plus the axiom that expresses every five points does not form a bowtie), and $$mod(T)$$ be the class of all models of $$T$$.

Question(1). Is $$mod(T)$$ closed under the union of chain? (equivalently we may ask, does $$T$$ have $$\forall\exists$$-axiomatization?)

If the answer of the first question is positive, we can ask the following questions.

Question(2). What are the $$e.c.$$ models of $$T$$?

Question(3). Does $$T$$ have model-companion?

• The answer for 1) is easy : if there's a bowtie in the union, then it appears in some finite stage; so it is closed under chain unions. – Maxime Ramzi Jun 8 '19 at 22:06
• @Max Yes, you're right. I was actually thinking about the third question. I just broke it down into 3 steps to make more sense! – user6232017 Jun 8 '19 at 22:19
• Doesn't $T$ have $\forall$-axiomatization? Isn't the class of bowtie-free graphs closed under passage to substructures? – bof Jun 13 '19 at 16:20

The answer to question (3) is yes. This is a theorem of Cherlin, Shelah and Shi in the paper Universal graphs with forbidden subgraphs and algebraic closure. More generally, they prove (Theorem 1) that for any finite set $$\mathcal{F}$$ of finite graphs, the theory of $$\mathcal{F}$$-free graphs has a model companion.
• I'm confused by Example 4.7 of onlinelibrary.wiley.com/doi/pdf/10.1002/malq.201400019 Do we need any assumption on $\mathcal{F}$, the finite set of finite graphs, such that the theory of $\mathcal{F}$-free graphs has a model companion? (It seems that Corollary 4.5 is a direct consequence of Theorem 1 of Cherlin, Shelah and Shi. Am I right?) – Mostafa Mirabi Jul 5 '19 at 23:25
• Hi @MostafaMirabi. It is strange that the paper you link to by Takeuchi, Tanaka, and Tsuboi (TTT) does not cite the paper by Cherlin, Shelah, and Shi (CSS). It seems to me that Corollary 4.5 of TTT is exactly the same statement as Theorem 1 of CSS. The confusion you're having with Example 4.7 is probably due to an unfortunate ambiguity in terminology: Does $K$-free mean have no induced subgraphs in $K$, or no (possibly non-induced) subgraphs in $K$? The former is what $K$-free means in TTT (and it's more natural for model theorists), while the latter is what $K$-free means in CSS ... – Alex Kruckman Jul 6 '19 at 2:06
• ... and it seems to be the more common usage in graph theory. This is why Corollary 4.5 of TTT speaks of a class $K$ of graphs closed under adding edges. If you take an arbitrary class $K$ and form a new class $K'$ by closing under adding edges, then $K$-free in the CSS sense is equivalent to $K'$-free in the TTT sense. – Alex Kruckman Jul 6 '19 at 2:08
• Hi @AlexKruckman. Thank you! Right! In TTT, $K$-free means have no induced subgraph (actually no sub-structure in model theory sense) in $K$, and in CSS it means have no usual subgraph in $K$. Also, in CSS they define a universal graph as a graph that every graph embeds into it as an induced subgraph. So, Theorem 1 of CSS does not hold in the case that we consider induced subgraphs, right? – Mostafa Mirabi Jul 6 '19 at 17:41


text:
# Singular Values of Weighted Composition Operators and Second Quantization

@article{Putinar2016SingularVO,
title={Singular Values of Weighted Composition Operators and Second Quantization},
author={Mihai Putinar and James E. Tener},
journal={International Mathematics Research Notices},
year={2016},
volume={2018},
pages={6426-6441}
}
• Published 12 December 2016
• Mathematics
• International Mathematics Research Notices
We study a semigroup of weighted composition operators on the Hardy space of the disk $H^2(\mathbb{D})$, and more generally on the Hardy space $H^2(U)$ attached to a simply connected domain $U$ with smooth boundary. Motivated by conformal field theory, we establish bounds on the singular values (approximation numbers) of these weighted composition operators. As a byproduct we obtain estimates on the singular values of the restriction operator (embedding operator) $H^2(V) \to H^2(U)$ when \$U…
5 Citations
Weighted Composition Semigroups on Some Banach Spaces
• Fanglei Wu
• Mathematics
Complex Analysis and Operator Theory
• 2021
We characterize strong continuity of general operator semigroups on some Lebesgue spaces. In particular, a characterization of strong continuity of weighted composition semigroups on classical Hardy
Explicit power laws in analytic continuation problems via reproducing kernel Hilbert spaces
• Mathematics
Inverse Problems
• 2020
The need for analytic continuation arises frequently in the context of inverse problems. Notwithstanding the uniqueness theorems, such problems are notoriously ill-posed without additional
Fusion and positivity in chiral conformal field theory
Conformal nets and vertex operator algebras are axiomatizations of two-dimensional chiral conformal field theories, both of which have had a significant impact on related mathematical areas of study.
Preservers of totally positive kernels and Polya frequency functions
• Mathematics
• 2021
. Fractional powers and polynomial maps preserving structured totally positive matrices, one-sided P´olya frequency functions, or totally positive kernels are treated from a unifying perspective.
Matrix compression along isogenic blocks
• Computer Science
ArXiv
• 2020
A matrix-compression algorithm is derived from a novel isogenic block decomposition for square matrices that possess strong functorial and spectral-permanence properties and an array of applications to current investigations in computational matrix analysis arises.

## References

SHOWING 1-10 OF 14 REFERENCES
Composition Operators: And Classical Function Theory
The study of composition operators forges links between fundamental properties of linear operators and results from the classical theory of analytic functions. This book provides a self-contained
The Cauchy Transform, Potential Theory and Conformal Mapping
Introduction. The Improved Cauchy Integral Formula. The Cauchy Transform. The Hardy Space, the Szego Projection, and the Kerzman-Stein Formula. The Kerzman-Stein Operator and Kernel. The Classical
Construction of the Unitary Free Fermion Segal CFT
In this article, we provide a detailed construction and analysis of the mathematical conformal field theory of the free fermion, defined in the sense of Graeme Segal. We verify directly that the
Quantum energy inequalities in two-dimensional conformal field theory
• Physics
• 2004
Quantum energy inequalities (QEIs) are state-independent lower bounds on weighted averages of the stress-energy tensor, and have been established for several free quantum field models. We present
Topology, geometry and quantum field theory : proceedings of the 2002 Oxford Symposium in the honour of the 60th birthday of Graeme Segal
• Mathematics
• 2004
Part I. Contributions: 1. A variant of K-theory Michael Atiyah and Michael Hopkins 2. Two-vector bundles and forms of elliptic cohomology Nils Baas, Bjorn Dundas and John Rognes 3. Geometric
Quantum energy inequalities in two dimensions
Quantum energy inequalities (QEIs) were established by Flanagan for the massless scalar field on two-dimensional Lorentzian spacetimes globally conformal to Minkowski space. We extend his result to
The Definition of Conformal Field Theory
I shall propose a definition of 2-dimensional conformal field theory which I believe is equivalent to that used by physicists.


text:
# The Future of FX: Too Many Cooks?

## Over half of all trades in the foreign exchange market are now conducted electronically, with new players and venues entering the market.

It’s not often that you see the figures thrown around the financial markets written out in full. Millions, billions, even trillions of dollars become almost abstract concepts without the actual zeros on paper. So consider the trading volumes of the foreign exchange (FX) market, a figure that now exceeds $5 trillion on a daily basis. That’s$5,000,000,000,000 in a market that has been historically unregulated and without a central counterparty…traded every day.

To date, the fines meted out to tho

#### Waters Wavelength

###### Waters Wavelength Podcast Episode 92: The Best of Sibos Toronto

While at Sibos Toronto, James shares some interviews covering topics on blockchain, fintechs and cybersecurity.


text:
# Chapter 11 Point Pattern Analysis

## 11.1 Centrography

A very basic form of point pattern analysis involves summary statistics such as the mean center, standard distance and standard deviational ellipse.

These point pattern analysis techniques were popular before computers were ubiquitous since hand calculations are not too involved, but these summary statistics are too concise and hide far more valuable information about the observed pattern. More powerful analysis methods can be used to explore point patterns. These methods can be classified into two groups: density based approach and distance based approach.

## 11.2 Density based analysis

Density based techniques characterize the pattern in terms of its distribution vis-a-vis the study area–a first-order property of the pattern.

A first order property of a pattern concerns itself with the variation of the observations’ density across a study area. For example, the distribution of oaks will vary across a landscape based on underlying soil characteristics (resulting in areas having dense clusters of oaks and other areas not).

In these lecture notes, we’ll make a distinction between the intensity of a spatial process and the observed density of a pattern under study. A point pattern can be thought of as a “realization” of an underlying process whose intensity $$\lambda$$ is estimated from the observed point pattern’s density (which is sometimes denoted as $$\widehat{\lambda}$$ where the caret $$\verb!^!$$ is referring to the fact that the observed density is an estimate of the underlying process’ intensity). Density measurements can be broken down into two categories: global and local.

### 11.2.1 Global density

A basic measure of a pattern’s density $$\widehat{\lambda}$$ is its overall, or global, density. This is simply the ratio of observed number of points, $$n$$, to the study region’s surface area, $$a$$, or:

$$$$\widehat{\lambda} = \frac{n}{a} \label{eq:global-density}$$$$

### 11.2.2 Local density

A point pattern’s density can be measured at different locations within the study area. Such an approach helps us assess if the density–and, by extension, the underlying process’ local (modeled) intensity $$\widehat{\lambda}_i$$–is constant across the study area. This can be an important property of the data since it may need to be mitigated for when using the distance based analysis tools covered later in this chapter. Several techniques for measuring local density are available, here we will focus on two such methods: quadrat density and kernel density.

#### 11.2.2.1 Quadrat density

This technique requires that the study area be divided into sub-regions (aka quadrats). Then, the point density is computed for each quadrat by dividing the number of points in each quadrat by the quadrat’s area. Quadrats can take on many different shapes such as hexagons and triangles, here we use square shaped quadrats to demonstrate the procedure.

The choice of quadrat numbers and quadrat shape can influence the measure of local density and must be chosen with care. If very small quadrat sizes are used you risk having many quadrats with no points which may prove uninformative. If very large quadrat sizes are used, you risk missing subtle changes in spatial density distributions such as the east-west gradient in density values in the above example.

Quadrat regions do not have to take on a uniform pattern across the study area, they can also be defined based on a covariate. For example, if it’s believed that the underlying point pattern process is driven by elevation, quadrats can be defined by sub-regions such as different ranges of elevation values (labeled 1 through 4 on the right-hand plot in the following example). This can result in quadrats having non-uniform shape and area.

Converting a continuous field into discretized areas is sometimes referred to as tessellation. The end product is a tessellated surface.

If the local intensity changes across the tessellated covariate, then there is evidence of a dependence between the process that generated the point pattern and the covariate. In our example, sub-regions 1 through 4 have surface areas of 17.08, 50.45, 26.76, 5.71 map units respectively. To compute these regions’ point densities, we simply divide the number of points by the respective area values.

We can plot the relationship between point density and elevation regions to help assess any dependence between the variables.

Though there is a steep increase in density at the highest elevation range, this increase is not monotonic across all ranges of increasing elevation suggesting that density may not be explained by elevation alone.

It’s important to note that how one chooses to tessellate a surface can have an influence on the resulting density distribution. For example, dividing the elevation into equal area sub-regions produces the following density values.

While the high density in the western part of the study area remains, the density values to the east are no longer consistent across the other three regions.

The quadrat analysis approach has its advantages in that it is easy to compute and interpret however, it does suffer from the modifiable areal unit problem (MAUP) as highlighted in the last two examples. Another density based approach that will be explored next (and that is less susceptible to the MAUP) is the kernel density.

#### 11.2.2.2 Kernel density

The kernel density approach is an extension of the quadrat method: Like the quadrat density, the kernel approach computes a localized density for subsets of the study area, but unlike its quadrat density counterpart, the sub-regions overlap one another providing a moving sub-region window. This moving window is defined by a kernel. The kernel density approach generates a grid of density values whose cell size is smaller than that of the kernel window. Each cell is assigned the density value computed for the kernel window centered on that cell.

A kernel not only defines the shape and size of the window, but it can also weight the points following a well defined kernel function. The simplest function is a basic kernel where each point in the kernel window is assigned equal weight.

Some of the most popular kernel functions assign weights to points that are inversely proportional to their distances to the kernel window center. A few such kernel functions follow a gaussian or quartic like distribution function. These functions tend to produce a smoother density map.

#### 11.2.2.3 Kernel Density Adjusted for Covariate

In the previous section, we learned that we could use a covariate, like elevation, to define the sub-regions (quadrats) within which densities were computed.

Here, instead of dividing the study region into discrete sub-regions (as was done with quadrat analysis), we create an intensity function that is dependent on the underlying covariate. This function, which we’ll denote as $$\rho$$, can be estimated in one of three different ways– by ratio, re-weight and transform methods. We will not delve into the differences between these methods, but note that there is more than one way to estimate $$\rho$$ in the presence of a covariate.

In the following example, the elevation raster is used as the covariate in the $$\rho$$ function using the ratio method. The right-most plot maps the modeled intensity as a function of elevation.

We can compare the modeled intensity function to the kernel density function of the observed point pattern via a scatter plot.

A red one-to-one diagonal line is added to the plot. While an increase in predicted intensity is accompanied with increasing observed intensity, the relationship is not linear. This can be explained by the small area covered by these high elevation locations which result in fewer observation opportunities and thus higher uncertainty for that corner of the study extent. This uncertainty is very apparent in the $$\rho$$ vs. elevation plot where the 95% confidence interval envelope widens at higher elevation values (indicating the greater uncertainty in our estimated $$\rho$$ value at those higher elevation values).

### 11.2.3 Modeling intensity as a function of a covariate

So far, we have learned techniques that describe the distribution of points across a region of interest. But it is often more interesting to model the relationship between the distribution of points and some underlying covariate by defining that relationship mathematically. This can be done by exploring the changes in point density as a function of a covariate, however, unlike techniques explored thus far, this approach makes use of a statistical model. One such model is a Poisson point process model which can take on the form of:

$$$\lambda(i) = e^{\alpha + \beta Z(i)} \label{eq:density-covariate}$$$

where $$\lambda(i)$$ is the modeled intensity at location $$i$$, $$e^{\alpha}$$ (the exponent of $$\alpha$$) is the base intensity when the covariate is zero and $$e^{\beta}$$ is the multiplier by which the intensity increases (or decreases) for each 1 unit increase in the covariate $$Z(i)$$. This is a form of the logistic regression model–popular in the field of statistics. This equation implies that the relationship between the process that lead to the observed point pattern is a loglinear function of the underlying covariate (i.e. one where the process’ intensity is exponentially increasing or decreasing as a function of the covariate). Note that taking the log of both sides of the equation yields the more familiar linear regression model where $$\alpha + \beta Z(i)$$ is the linear predictor.

Note: The left-hand side of a logistic regression model is often presented as the probability, $$P$$, of occurrence and is related to $$\lambda$$ as $$\lambda=P/(1-P)$$ which is the ratio of probability of occurrence. Solving for $$P$$ gives us $$P = \lambda/(1 + \lambda)$$ which yields the following equation: $P(i) = \frac{e^{\alpha + \beta Z(i)}}{1 + e^{\alpha + \beta Z(i)}}$

Let’s work with the point distribution of Starbucks cafes in the state of Massachusetts. The point pattern clearly exhibits a non-random distribution. It might be helpful to compare this distribution to some underlying covariate such as the population density distribution.

We can fit a poisson point process model to these data where the modeled intensity takes on the form:

$$$Starbucks\ density(i) = e^{\alpha + \beta\ population(i)} \label{eq:walmart-model}$$$

The parameters $$\alpha$$ and $$\beta$$ are estimated from a method called maximum likelihood. Its implementation is not covered here but is widely covered in many statistics text books. The index $$(i)$$ serves as a reminder that the point density and the population distribution both can vary as a function of location $$i$$.

The estimated value for $$\alpha$$ in our example is -18.966. This is interpreted as stating that given a population density of zero, the base intensity of the point process is e-18.966 or 5.79657e-09 cafes per square meter (the units are derived from the point’s reference system)–a number close to zero (as one would expect). The estimated value for $$\beta$$ is 0.00017. This is interpreted as stating that for every unit increase in the population density derived from the raster, the intensity of the point process increases by e0.00017 or 1.00017.

If we are to plot the relationship between density and population, we get:

## 11.3 Distance based analysis

An alternative to the density based methods explored thus far are the distance based methods for pattern analysis whereby the interest lies in how the points are distributed relative to one another (a second-order property of the point pattern) as opposed to how the points are distributed relative to the study extent

A second order property of a pattern concerns itself with the observations’ influence on one another. For example, the distribution of oaks will be influenced by the location of parent trees–where parent oaks are present we would expect dense clusters of oaks to emerge.

Three distance based approaches are covered next: The average nearest neighbor (ANN), the K and L functions, and the pair correlation function.

### 11.3.1 Average Nearest Neighbor

An average nearest neighbor (ANN) analysis measures the average distance from each point in the study area to its nearest point. In the following example, the average nearest neighbor for all points is 1.52 units.

An extension of this idea is to plot the ANN values for different order neighbors, that is for the first closest point, then the second closest point, and so forth.

The shape of the ANN curve as a function of neighbor order can provide insight into the spatial arrangement of points relative to one another. In the following example, three different point patterns of 20 points are presented.

Each point pattern offers different ANN vs. neighbor order plots.

The bottom line (black dotted line) indicates that the cluster (left plot) is tight and that the distances between a point and all other points is very short. This is in stark contrast with the top line (red dotted line) which indicates that the distances between points is much greater. Note that the way we describe these patterns is heavily influenced by the size and shape of the study region. If the region was defined as the smallest rectangle encompassing the cluster of points, the cluster of points would no longer look clustered.

An important assumption that underlies our interpretation of the ANN results is that of stationarity of the underlying point process (i.e. that there is no overall drift or trend in the process’ intensity). If the point is not stationary, then it will be difficult to assess if the results from the ANN analysis are due to interactions between the points or due to changes in some underlying factor that changes as a function of location.

### 11.3.2 K and L functions

#### 11.3.2.1 K function

The average nearest neighbor (ANN) statistic is one of many distance based point pattern analysis statistics. Another statistic is the K-function which summarizes the distance between points for all distances. The calculation of K is fairly simple: it consists of dividing the mean of the sum of the number of points at different distance lags for each point by the area event density. For example, for point $$S1$$ we draw circles, each of varying radius $$d$$, centered on that point. We then count the number of points (events) inside each circle. We repeat this for point $$S2$$ and all other points $$Si$$. Next, we compute the average number of points in each circle then divide that number by the overall point density $$\hat{\lambda}$$ (i.e. total number of events per study area).

Distance
band
(km)
# events
from S1
# events
from S2
# events
from Si
K
10 0 1 0.012
20 3 5 0.067
30 9 14 0.153
40 17 17 0.269
50 25 23 0.419

We can then plot K and compare that plot to a plot we would expect to get if an IRP/CSR process was at play (Kexpected).

$$K$$ values greater than $$K_{expected}$$ indicate clustering of points at a given distance band; K values less than $$K_{expected}$$ indicate dispersion of points at a given distance band. In our example, the stores appear to be more clustered than expected at distances greater than 12 km.

Note that like the ANN analysis, the $$K$$-function assumes stationarity in the underlying point process (i.e. that there is no overall drift or trend in the process’ intensity).

#### 11.3.2.2 L function

One problem with the $$K$$ function is that the shape of the function tends to curve upward making it difficult to see small differences between $$K$$ and $$K_{expected}$$. A workaround is to transform the values in such a way that the expected values, $$K_{expected}$$, lie horizontal. The transformation is calculated as follows:

$$$L=\sqrt{\dfrac{K(d)}{\pi}}-d \label{eq:L-function}$$$

The $$\hat{K}$$ computed earlier is transformed to the following plot (note how the $$K_{expected}$$ red line is now perfectly horizontal):

This graph makes it easier to compare $$K$$ with $$K_{expected}$$ at lower distance values. Values greater than $$0$$ indicate clustering, while values less than $$0$$ indicate dispersion. It appears that Walmart locations are more dispersed than expected under CSR/IRP up to a distance of 12 km but more clustered at distances greater than 12 km.

### 11.3.3 The Pair Correlation Function $$g$$

A shortcoming of the $$K$$ function (and by extension the $$L$$ function) is its cumulative nature which makes it difficult to know at exactly which distances a point pattern may stray from $$K_{expected}$$ since all points up to distance $$r$$ can contribute to $$K(r)$$. The pair correlation function, $$g$$, is a modified version of the $$K$$ function where instead of summing all points within a distance $$r$$, points falling within a narrow distance band are summed instead.

The plot of the $$g$$ function follows.

If $$g(r)$$ = 1, then the inter-point distances (at and around distance $$r$$) are consistent with CSR. If $$g(r)$$ > 1, then the points are more clustered than expected under CSR. If $$g(r)$$ < 1, then the points are more dispersed than expected under CSR. Note that $$g$$ can never be less than 0.

Like its $$K$$ and ANN counterparts, the $$g$$-function assumes stationarity in the underlying point process (i.e. that there is no overall drift or trend in the process’ intensity).

## 11.4 First and second order effects

The concept of 1st order effects and 2nd order effects is an important one. It underlies the basic principles of spatial analysis.

Density based measurements such as kernel density estimations look at the 1st order property of the underlying process. Distance based measurements such as ANN and K-functions focus on the 2nd order property of the underlying process.

It’s important to note that it is seldom feasible to separate out the two effects when analyzing point patterns, thus the importance of relying on a priori knowledge of the phenomena being investigated before drawing any conclusions from the analyses results.


text:
visualization/qtquick_qml/pmiviewer/main.cxx

Refer to PMI Viewer Example

PMIViewerApplication.hxx

// ****************************************************************************
// $Id$
//
//
// This file is part of the CAD Exchanger software.
//
// You may use this file under the terms of the BSD license as follows:
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ****************************************************************************
#include "../baseviewer/BaseViewerApplication.hxx"
class PMIViewerApplication : public BaseViewerApplication
{
Q_OBJECT
public:
PMIViewerApplication();
void CreateSceneNodes() override;
};

PMIViewerApplication.cxx

// ****************************************************************************
// $Id$
//
//
// This file is part of the CAD Exchanger software.
//
// You may use this file under the terms of the BSD license as follows:
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ****************************************************************************
#include "PMIViewerApplication.hxx"
#include <deque>
#include <iostream>
namespace {
class ModelVisitor : public ModelData_Model::CombinedElementVisitor
{
public:
ModelVisitor (const ModelPrs_SceneNode& theRoot, const ModelPrs_SceneNodeFactory& theFactory) :
myFactory (theFactory)
{
myNodes.push_back (theRoot);
}
void VisitLeave (const ModelData_SceneGraphElement& /*theSGE*/) override
{
myNodes.pop_back();
}
bool VisitEnter (const ModelData_SceneGraphElement& theSGE) override
{
auto anSGENode = myFactory.CreateNode (theSGE);
myNodes.push_back (anSGENode);
return true;
}
void operator() (const ModelData_Part& thePart) override
{
auto aPartNode = myFactory.CreateNode (thePart);
auto aRep = thePart.BRepRepresentation();
auto aRepNode = myFactory.CreateNode (aRep);
}
{
ModelData_Appearance anAppearance (ModelData_Color (0.0f, 0.0f, 0.0f, 1.0f));
ModelPrs_SceneNode aPMIRootNode;
aPMIRootNode.SetAppearance (anAppearance);
for (ModelData_PMITable::PMIDataIterator anIt (theSGE.PMI()); anIt.HasNext();) {
auto anElement = anIt.Next();
if (anElement) {
auto aPMINode = myFactory.CreateNode (anElement.GraphicalElement());
}
}
}
private:
std::deque<ModelPrs_SceneNode> myNodes;
};
} // end of unnamed namespace
PMIViewerApplication::PMIViewerApplication()
{
}
void PMIViewerApplication::CreateSceneNodes()
{
ModelVisitor aVisitor (myRoot, aFactory);
myModel.Accept (aVisitor);
}

main.cxx

// ****************************************************************************
// $Id$
//
//
// This file is part of the CAD Exchanger software.
//
// You may use this file under the terms of the BSD license as follows:
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
// AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
// IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
// ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
// LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
// CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
// SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
// INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
// CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
// ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
// POSSIBILITY OF SUCH DAMAGE.
//
// ****************************************************************************
#include "PMIViewerApplication.hxx"
#include <QtCore/QUrl>
#include <QtWidgets/QApplication>
int main (int argc, char *argv[])
{
return 1;
}
// Must set dpi scaling before creating an application.
QCoreApplication::setAttribute (Qt::AA_EnableHighDpiScaling);
// Create QApplication because Qt.labs.platform module requires Qt Widgets library.
QApplication app (argc, argv);
PMIViewerApplication anApp;
if (anApp.Initialize (QUrl ("qrc:/qml/BaseViewerWindow.qml"), "viewPort")) {
return app.exec();
}
return 0;
}
Base class for part, instance and assembly.
Definition: ModelData_SceneGraphElement.hxx:36
Iterator over added PMIData items, which contains graphical and semantical elements.
Definition: ModelData_PMITable.hxx:80
ModelData_PMITable PMI() const
Returns a PMI table.
Definition: ModelData_SceneGraphElement.cxx:233
Defines an RGBA color (with alpha channel).
Definition: ModelData_Color.hxx:33
void SetAppearance(const ModelData_Appearance &theAppearance)
Definition: ModelPrs_SceneNode.cxx:913
Provides an interface to appearance which is a collection of visual styles.
Definition: ModelData_Appearance.hxx:38
Adds theNode to children. Returns false if the node already has a parent, otherwise returns true.
Definition: ModelPrs_SceneNode.cxx:806
Represents a node in the visual scene graph.
Definition: ModelPrs_SceneNode.hxx:43
Defines classes, types, and global functions related to CAD Exchanger.
Definition: A3DSTestLib.hxx:22
Creates a scene nodes and its children from input data model objects.
Definition: ModelPrs_SceneNodeFactory.hxx:47
Provides combined methods VisitEnter() and VisitLeave() to visit all elements.
Definition: ModelData_Model.hxx:116
ModelData_BRepRepresentation BRepRepresentation() const
Definition: ModelData_Part.cxx:343
Defines a leaf node in the scene graph hiearchy.
Definition: ModelData_Part.hxx:34


text:
## Me-calculus: Continuous predictions arrive

By Anthony on Dec. 31, 2016, noon GMT

Although a lot can be learned from asking about whether or not various things will occur in the future, there are many cases where it would be much nicer to predict a number, such as a date by which something happens, or an amount of money, sales, citations, hits, etc., etc.

As of now, such questions can be posed on Metaculus. Rather than input a probability of yes, users may now define a probability distribution, i.e. a probability assigned to each possible value within a defined range. You get more points if you assign a higher probability to the actual realized number, but you have a fixed amount of probability to assign; thus you can make a narrow distribution if you are fairly certain of a particular value, and a wider distribution to reflect more uncertainty. See the FAQ for a lot of detail on how this works, and how these questions are scored at resolution.

To kick this off, here are a few numerical questions that are now live:

We’re very interested in what you think of the system, and welcome feedback as comments to this post. There are still some features to be added accompanying this change, but feel free to suggest anything that would be useful.

Happy predicting!

Team Metaculus


text:
# fft of point wise product

I have a sequence

  a =   [1     2     3     4     5     6     7     8],

and a weighting

   w = [ 2     3     4     5     6     7     1     2],

Now, based on convolution theorem, the Fourier transform of point-wise multiplication of two sequences is equivalent to the convolution of the Fourier transform of the two:

$\mathcal{F}\{w \cdot a\}= \mathcal{F}\{w\}*\mathcal{F}\{a\}$

where $\cdot$ indicates point-wise multiplication, $*$ in dicates cpnvolution, and $\mathcal{F}$ indicates Fourier transform.

However, my problem is when I apply this theorem to above example, it does not seem to match the convolution theorem. I am using MATLAB, to calculate

the Fourirt transform the point-wise product of the two:

 fft(w.*a) = fft([ 2     6    12    20    30    42     7    16])

= 1.0e+02 *[
1.3500 + 0.0000i
-0.5628 + 0.1763i
0.1300 - 0.1200i
0.0028 + 0.2763i
-0.3300 + 0.0000i
0.0028 - 0.2763i
0.1300 + 0.1200i
-0.5628 - 0.1763i]

and the convolution of the Fourier transform of the two:

conv(fft(w),fft(a)) =

1.0e+03 * [
1.0800 + 0.0000i
-0.4422 + 0.2072i
0.0459 - 0.0653i
-0.0239 + 0.1975i
-0.2640 + 0.0127i
-0.0597 - 0.2067i
0.0461 + 0.0187i
-0.4503 - 0.1410i
0.0000 + 0.0000i
-0.0081 - 0.0661i
0.0581 - 0.0307i
0.0261 + 0.0235i
0.0000 - 0.0127i
0.0619 - 0.0143i
0.0579 + 0.0773i]

Obviously,

fft(w.*a) $\neq$ conv(fft(w), fft(a)).

Therefore, from what I tested, it does not seem that the fft of the point-wise multiplication equals the convolution of the fft. I don't find an explanation. So where is the problem? Can anyone help please?

Thanks alot.

 1. fft(w.*a)


text:
An integral identity

$$\int_\R \frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{dt}t=\pi i\,\frac u{1-u}$$ for $$u\in(0,1)$$, with the integral understood in the principal value sense. However, I have not been able to prove this, even with the help of Mathematica.

How can this be proved?

• Maybe it helps to set $s=(e^{itu}-1)/(it)$, identify the geometric series and thus write it as $i\int_{\mathbb R} \sum_{n=0}^\infty\left((e^{itu}-1)^{n+1}\,/\,(i t)^{n+2}\right)dt$. Having gotten rid of the fraction, I'd try to formally switch the integral and sum and see if you can compute the principal value. Maybe they are $\pi\,u^{n+1}$ and the sum gives you the result. – Nikolaj-K Nov 20 at 19:02
• The numeric calculation with Mathematica NIntegrate[(1 - Exp[I*t*1/2])/(Exp[I*t*1/2] - 1 - I*1/2)/ t, {t, -1000, -0.001}, AccuracyGoal -> 3, PrecisionGoal -> 3] + NIntegrate[(1 - Exp[I*t*1/2])/(Exp[I*t*1/2] - 1 - I*1/2)/t, {t, 0.001, 1000}, AccuracyGoal -> 3, PrecisionGoal -> 3] produces $1.25389\, +2.51409 i$ and does not confirm your hypothesis. – user64494 Nov 20 at 19:07
• Also NIntegrate[(1 - Exp[I*t*1/2])/(Exp[I*t*1/2] - 1 - I*1/2)/ t, {t, -10000, -0.0001}, AccuracyGoal -> 3, PrecisionGoal -> 3, WorkingPrecision -> 30] + NIntegrate[(1 - Exp[I*t*1/2])/(Exp[I*t*1/2] - 1 - I*1/2)/t, {t, 0.0001, 10000}, AccuracyGoal -> 3, PrecisionGoal -> 3, WorkingPrecision -> 30] produces $1.2564281632324901625528374684+2.51331913735615084972161764584 i$. – user64494 Nov 20 at 19:31
• @user64494: It is no longer a hypothesis. See the two proofs below. – GH from MO Nov 20 at 19:36
• @user64494 -- there is a way to avoid the need to take a principal value, which returns a value close to the expected answer (I worked this out in the answer box, it's a method which I have found quite useful). – Carlo Beenakker Nov 20 at 21:07

3 Answers

I would close the contour in the upper half of the complex plane, the principal value picks up $$i\pi$$ times the residue$$^\ast$$ at $$t=0$$, which is $$u/(1-u)$$. There are no other poles.$$^{\ast\ast}$$

$$^\ast$$ $$\frac{1-e^{i t u}}{e^{i t u}-i t-1}=\frac{u}{1-u}+{\cal O}(t^2).$$

$$^{\ast\ast}$$ poles are at $$t=i\tau$$ with $$e^{-\tau u}+\tau=1$$ (excluding $$\tau=0$$, which is canceled by the numerator); these remain at $$\tau<0$$ for all $$u\in(0,1)$$, approaching $$-2(1-u)$$ for $$u\rightarrow 1$$.

In the comments there was an issue with the numerical evaluation. Principal value integrals of this type can be evaluated more accurately by replacing $$1/t$$ by $$\frac{d\log |t|}{dt}$$ and carrying out a partial integration. This gives $$\int_{-\infty}^\infty dt\,\frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{1}t= -2i\Im\int_{0}^\infty dt\,\ln|t|\frac{d}{dt}\frac{1-e^{itu}}{e^{itu}-1-it}.$$ For the case $$u=1/2$$ considered in the comments, Mathematica gives 3.1406.

• Why are there no other poles? (I was thinking about the same argument and haven't been able so far to show this.) – Christian Remling Nov 20 at 17:53
• Sorry, I still don't understand this. How does it follow that the solutions of $e^{-u\tau}+\tau =1$ are all real? – Christian Remling Nov 20 at 18:31
• Thank you. I don't know why, before seeing your answer, I decided to deal with the poles in the lower half-plane. :-) – Iosif Pinelis Nov 20 at 19:18
• The integration by parts in an improper integral should be grounded. In other case this is done in the L. Euler's style. – user64494 Nov 21 at 5:46

$$\newcommand\eps\varepsilon$$ We want to show that, under $$R\to\infty$$ and $$\eps\to 0+$$, we have $$\int_{(-R,-\eps)\cup(\eps,R)} \frac{1-e^{itu}}{e^{itu}-1-it}\,\frac{dt}t=\pi i\,\frac u{1-u}+o(1).$$ Equivalently, $$\int_{(-R,-\eps)\cup(\eps,R)}\left(\frac{1-e^{itu}}{e^{itu}-1-it}+1\right)\,\frac{dt}t=\pi i\,\frac u{1-u}+o(1).$$ In other words, $$\int_{(-R,-\eps)\cup(\eps,R)}\frac{dt}{e^{itu}-1-it}=\pi\,\frac u{u-1}+o(1).$$ The integrand is holomorphic in an open set containing $$\{t\in\mathbb{C}:\text{\Im(t)\geq 0 and t\neq 0}\}$$, hence by Cauchy's theorem it suffices to show that $$\int_{\gamma(R)}\frac{dt}{e^{itu}-1-it}=-\pi+o(1)\qquad\text{and}\qquad \int_{\gamma(\eps)}\frac{dt}{e^{itu}-1-it}=\frac{\pi}{u-1}+o(1),$$ where $$\gamma(r)$$ is the semicircle in $$\{t\in\mathbb{C}:\Im(t)\geq 0\}$$ going from $$r$$ to $$-r$$. For large $$r$$, the integrand on $$\gamma(r)$$ is $$i/t+O(1/t^2)$$. For small $$r$$, the integrand on $$\gamma(r)$$ is $$-i/(t(u-1))+O_u(1)$$. The result follows.

This is to detail Carlo Beenakker's assertion about the poles of the integrand. Suppose that $$t=x+iy$$ is such a pole, where $$x$$ and $$y$$ are real. Then $$1-y=e^{-uy}\cos ux,\quad x=e^{-uy}\sin ux.$$ Suppose that $$y>0$$. If $$x=0$$ then $$1-y=e^{-uy}\ge1-uy$$, so that $$(u-1)y\ge0$$, which contradicts the conditions $$y>0$$ and $$u\in(0,1)$$. So, $$x\ne0$$ and hence $$\frac{\sin ux}{ux}=\frac{e^{uy}}u>1,$$ which contradicts the inequality $$\frac{\sin v}{v}\le1$$ for all real $$v\ne0$$.

So, $$y\le0$$.

If now $$y=0$$ then $$1=\cos ux$$ and hence $$x=\sin ux=0$$.

Thus, the only pole $$x+iy$$ with $$y\ge0$$ is $$0$$.

• @GHfromMO : Yes indeed, this is much simpler. – Iosif Pinelis Nov 20 at 19:37
• @ChristianRemling : Indeed. When I saw $t$ in the inequality $1\le|1+it|$ I somehow forgot that $t$ is complex. :-) So, it again looks like the assertion about the poles is not quite trivial. – Iosif Pinelis Nov 20 at 20:57
• @IosifPinelis: For what it's worth, I tried it for about 10 minutes unsuccessfully (and then Carlos posted his answer), so I think it has to be something like the argument you give here. – Christian Remling Nov 20 at 21:52


text:
# SYMARRSWAP - Editorial

Author: rkyouwill
Testers: iceknight1093, tabr
Editorialist: iceknight1093

TBD

# PREREQUISITES:

Sorting, two pointers

# PROBLEM:

You have two arrays A and B. In one move, you can swap A_i and B_i for some 1 \leq i \leq N.
Find the minimum possible value of \max(A) - \min(A) that you can attain.

# EXPLANATION:

Unlike the easier version of this problem, it’s no longer possible to put any N elements we want into A.

Instead, let’s once again consider the sorted array C of length 2N consisting of every element from A and B.
Suppose we fix C_L to be the smallest element we choose. We’ll try to find the optimal maximum element for C_L.

Suppose we also fix C_R to be the maximum element (where L \lt R). Can you say anything about the subarray [C_L, C_{L+1}, \ldots, C_R]?

We want to pick N elements from this subarray to put into A.
Notice that for any N elements we put into A, there must be one element corresponding to each index (since the i-th position can only contain A_i or B_i).

So, suppose we also knew an array \text{ind} of length 2N denoting which index each element of C belongs to, i.e, \text{ind}_i = j means that A_j = C_i or B_j = C_i.
Then, we can choose C_L to be the minimum and C_R to be the maximum if and only if [\text{ind}_L, \text{ind}_{L+1}, \ldots, \text{ind}_R] contains every integer from 1 to N at least once.

Computing the \text{ind} array is not hard: just make C an array of pairs of (value, index) and then sort it as usual.

The above discussion should tell you how to find an optimal R in, at the very least, \mathcal{O}(N) time for a fixed L:
Iterate R starting from L, and stop the first time the \text{ind} array contains every integer from 1 to N.

This gives a solution in \mathcal{O}(N^2), which is too slow for our purposes.

To improve it, let’s reuse some computations.

Let f(L) denote the optimal R-value for when L is the left endpoint.
Then, it’s not hard to see that f(L)\leq f(L+1).

Proof

Let R_1 = f(L) and R_2 = f(L+1).

We know [L+1, R_2] is the smallest subarray starting at L+1 containing all N indices.
In particular, this means the subarray [L, R_2] also contains all N indices.

But, [L, R_1] is the smallest subarray starting at L that contains all indices.
So, R_1 \leq R_2 must hold, which proves our claim.

This allows us to apply a 2-pointer approach:

• Iterate L from 1 to 2N. Also keep a variable R, initially equal to 1.
• For a fixed L, increase R till the subarray [L, R] contains all N indices.
• If no such R exists, stop.
• Otherwise, set \text{ans} = \min(\text{ans}, C_R - C_L)
• Then, increase L by 1 and continue. Note that R remains unchanged.

This way, both L and R only increase, each making 2N steps at most.

Note that this requires us to maintain the set of available indices at each step.
This can be done using an array ct of size N, where ct[i] denotes the number of times we have index i.
Also keep a variable denoting the number of non-zero elements of ct.

Then,

• When moving R to R+1, increment ct[\text{ind}_{R+1}] by 1.
• When moving L to L+1, decrement ct[\text{ind}_{L}] by 1.
• At each step, don’t forget to update the number of non-zero elements.

This gives us a solution in \mathcal{O}(N) after sorting.

# TIME COMPLEXITY:

\mathcal{O}(N\log N) per testcase.

# CODE:

Setter's code (C++)
#include<bits/stdc++.h>
#define f first
#define se second
#define endl "\n"
#define pb push_back
#define ll long long int
#define pi pair<int,int>
#define all(st) st.begin(),st.end()
#define rep(i,l,r) for(int i=l;i<r;i++)
using namespace std;

int main(){
int t;
cin>>t;
while(t--){
int n;
cin>>n;
vector<int> a(n),b(n);
rep(i,0,n) cin>>a[i];
rep(i,0,n) cin>>b[i];
vector<pi> c;
rep(i,0,n) c.pb({a[i],i}),c.pb({b[i],i});
sort(all(c));
vector<int> freq(n);
int ans=1e9,unique=0,l=0,r=0;
while(r<2*n){
freq[c[r].se]++;
if(freq[c[r].se]==1) unique++;
if(unique==n){
while(unique==n){
ans=min(ans,c[r].f-c[l].f);
freq[c[l].se]--;
if(freq[c[l].se]==0) unique--;
l++;
}
}
r++;
}
cout<<ans<<endl;
}
return 0;
}

Tester's code (C++)
#include <bits/stdc++.h>
using namespace std;
#ifdef tabr
#include "library/debug.cpp"
#else
#define debug(...)
#endif

struct input_checker {
string buffer;
int pos;

const string all = "0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz";
const string number = "0123456789";
const string upper = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
const string lower = "abcdefghijklmnopqrstuvwxyz";

input_checker() {
pos = 0;
while (true) {
int c = cin.get();
if (c == -1) {
break;
}
buffer.push_back((char) c);
}
}

int nextDelimiter() {
int now = pos;
while (now < (int) buffer.size() && buffer[now] != ' ' && buffer[now] != '\n') {
now++;
}
return now;
}

assert(pos < (int) buffer.size());
int nxt = nextDelimiter();
string res;
while (pos < nxt) {
res += buffer[pos];
pos++;
}
return res;
}

string readString(int minl, int maxl, const string& pattern = "") {
assert(minl <= maxl);
assert(minl <= (int) res.size());
assert((int) res.size() <= maxl);
for (int i = 0; i < (int) res.size(); i++) {
assert(pattern.empty() || pattern.find(res[i]) != string::npos);
}
return res;
}

int readInt(int minv, int maxv) {
assert(minv <= maxv);
assert(minv <= res);
assert(res <= maxv);
return res;
}

long long readLong(long long minv, long long maxv) {
assert(minv <= maxv);
assert(minv <= res);
assert(res <= maxv);
return res;
}

assert((int) buffer.size() > pos);
assert(buffer[pos] == ' ');
pos++;
}

assert((int) buffer.size() > pos);
if (buffer[pos] != '\n') {
cerr << int(buffer[pos]) << endl;
}
assert(buffer[pos] == '\n');
pos++;
}

assert((int) buffer.size() == pos);
}
};

int main() {
ios::sync_with_stdio(false);
cin.tie(nullptr);
input_checker in;
int sn = 0;
while (tt--) {
sn += n;
vector<int> a(n);
for (int i = 0; i < n; i++) {
}
vector<int> b(n);
for (int i = 0; i < n; i++) {
}
for (int i = 0; i < n; i++) {
if (a[i] > b[i]) {
swap(a[i], b[i]);
}
}
multiset<int> st;
for (int i = 0; i < n; i++) {
st.emplace(a[i]);
}
int ans = *st.rbegin() - *st.begin();
vector<pair<int, int>> c(n);
for (int i = 0; i < n; i++) {
c[i] = make_pair(a[i], b[i]);
}
sort(c.begin(), c.end());
for (int i = 0; i < n; i++) {
st.erase(st.find(c[i].first));
st.emplace(c[i].second);
ans = min(ans, *st.rbegin() - *st.begin());
}
cout << ans << '\n';
}
assert(sn <= 2e5);
cerr << sn << endl;
return 0;
}

Editorialist's code (Python)
for _ in range(int(input())):
n = int(input())
a = list(map(int, input().split()))
b = list(map(int, input().split()))
c = []
for i in range(n):
c.append([min(a[i], b[i]), i])
c.append([max(a[i], b[i]), i])
c.sort()
ans, ptr = 10**10, 0
last = [-1]*n
have = 0
for i in range(2*n):
val, id = c[i]
if last[id] == -1: have += 1
last[id] = i
if have < n: continue
while True:
if last[c[ptr][1]] == ptr: break
ptr += 1
ans = min(ans, c[i][0] - c[ptr][0])
print(ans)


text:
# Properties

 Label 5.2.ai_bi_adt_hw_amq Base Field $\F_{2}$ Dimension $5$ Ordinary No $p$-rank $3$ Principally polarizable Yes Contains a Jacobian No

## Invariants

 Base field: $\F_{2}$ Dimension: $5$ L-polynomial: $( 1 - x + 2 x^{2} )( 1 - 2 x + 2 x^{2} )^{2}( 1 - 3 x + 5 x^{2} - 6 x^{3} + 4 x^{4} )$ Frobenius angles: $\pm0.123548644961$, $\pm0.250000000000$, $\pm0.250000000000$, $\pm0.384973271919$, $\pm0.456881978294$ Angle rank: $2$ (numerical)

This isogeny class is not simple.

## Newton polygon

 $p$-rank: $3$ Slopes: $[0, 0, 0, 1/2, 1/2, 1/2, 1/2, 1, 1, 1]$

## Point counts

This isogeny class is principally polarizable, but does not contain a Jacobian.

 $r$ 1 2 3 4 5 6 7 8 9 10 $A(\F_{q^r})$ 2 3800 179816 1710000 35539702 1366601600 39982829098 1019710620000 31323168057272 1132739151995000

 $r$ 1 2 3 4 5 6 7 8 9 10 $C(\F_{q^r})$ -5 9 22 25 35 78 149 241 454 1029

## Decomposition and endomorphism algebra

Endomorphism algebra over $\F_{2}$
 The isogeny class factors as 1.2.ac 2 $\times$ 1.2.ab $\times$ 2.2.ad_f and its endomorphism algebra is a direct product of the endomorphism algebras for each isotypic factor. The endomorphism algebra for each factor is: 1.2.ac 2 : $\mathrm{M}_{2}($$$\Q(\sqrt{-1})$$$)$ 1.2.ab : $$\Q(\sqrt{-7})$$. 2.2.ad_f : $$\Q(\sqrt{-3}, \sqrt{5})$$.
Endomorphism algebra over $\overline{\F}_{2}$
 The base change of $A$ to $\F_{2^{12}}$ is 1.4096.h 2 $\times$ 1.4096.bv $\times$ 1.4096.ey 2 . The endomorphism algebra for each factor is: 1.4096.h 2 : $\mathrm{M}_{2}($$$\Q(\sqrt{-15})$$$)$ 1.4096.bv : $$\Q(\sqrt{-7})$$. 1.4096.ey 2 : $\mathrm{M}_{2}(B)$, where $B$ is the quaternion algebra over $$\Q$$ ramified at $2$ and $\infty$.
All geometric endomorphisms are defined over $\F_{2^{12}}$.
Remainder of endomorphism lattice by field
• Endomorphism algebra over $\F_{2^{2}}$  The base change of $A$ to $\F_{2^{2}}$ is 1.4.a 2 $\times$ 1.4.d $\times$ 2.4.b_ad. The endomorphism algebra for each factor is: 1.4.a 2 : $\mathrm{M}_{2}($$$\Q(\sqrt{-1})$$$)$ 1.4.d : $$\Q(\sqrt{-7})$$. 2.4.b_ad : $$\Q(\sqrt{-3}, \sqrt{5})$$.
• Endomorphism algebra over $\F_{2^{3}}$  The base change of $A$ to $\F_{2^{3}}$ is 1.8.e 2 $\times$ 1.8.f $\times$ 2.8.a_l. The endomorphism algebra for each factor is: 1.8.e 2 : $\mathrm{M}_{2}($$$\Q(\sqrt{-1})$$$)$ 1.8.f : $$\Q(\sqrt{-7})$$. 2.8.a_l : $$\Q(\sqrt{-3}, \sqrt{5})$$.
• Endomorphism algebra over $\F_{2^{4}}$  The base change of $A$ to $\F_{2^{4}}$ is 1.16.ab $\times$ 1.16.i 2 $\times$ 2.16.ah_bh. The endomorphism algebra for each factor is: 1.16.ab : $$\Q(\sqrt{-7})$$. 1.16.i 2 : $\mathrm{M}_{2}(B)$, where $B$ is the quaternion algebra over $$\Q$$ ramified at $2$ and $\infty$. 2.16.ah_bh : $$\Q(\sqrt{-3}, \sqrt{5})$$.
• Endomorphism algebra over $\F_{2^{6}}$  The base change of $A$ to $\F_{2^{6}}$ is 1.64.aj $\times$ 1.64.a 2 $\times$ 1.64.l 2 . The endomorphism algebra for each factor is: 1.64.aj : $$\Q(\sqrt{-7})$$. 1.64.a 2 : $\mathrm{M}_{2}($$$\Q(\sqrt{-1})$$$)$ 1.64.l 2 : $\mathrm{M}_{2}($$$\Q(\sqrt{-15})$$$)$

## Base change

This is a primitive isogeny class.

## Twists

Below are some of the twists of this isogeny class.
 Twist Extension Degree Common base change 5.2.ag_u_abv_dk_afg $2$ (not in LMFDB) 5.2.ae_k_ar_y_abg $2$ (not in LMFDB) 5.2.ac_e_ah_m_aq $2$ (not in LMFDB) 5.2.ac_e_ab_a_i $2$ (not in LMFDB) 5.2.a_c_ab_e_ai $2$ (not in LMFDB) 5.2.a_c_b_e_i $2$ (not in LMFDB) 5.2.c_e_b_a_ai $2$ (not in LMFDB) 5.2.c_e_h_m_q $2$ (not in LMFDB) 5.2.e_k_r_y_bg $2$ (not in LMFDB) 5.2.g_u_bv_dk_fg $2$ (not in LMFDB) 5.2.i_bi_dt_hw_mq $2$ (not in LMFDB) 5.2.af_n_at_s_aq $3$ (not in LMFDB) 5.2.ac_e_ab_ag_o $3$ (not in LMFDB) 5.2.ac_e_ab_a_i $3$ (not in LMFDB) 5.2.b_b_f_g_c $3$ (not in LMFDB) 5.2.e_k_x_bq_ck $3$ (not in LMFDB)
Below is a list of all twists of this isogeny class.
 Twist Extension Degree Common base change 5.2.ag_u_abv_dk_afg $2$ (not in LMFDB) 5.2.ae_k_ar_y_abg $2$ (not in LMFDB) 5.2.ac_e_ah_m_aq $2$ (not in LMFDB) 5.2.ac_e_ab_a_i $2$ (not in LMFDB) 5.2.a_c_ab_e_ai $2$ (not in LMFDB) 5.2.a_c_b_e_i $2$ (not in LMFDB) 5.2.c_e_b_a_ai $2$ (not in LMFDB) 5.2.c_e_h_m_q $2$ (not in LMFDB) 5.2.e_k_r_y_bg $2$ (not in LMFDB) 5.2.g_u_bv_dk_fg $2$ (not in LMFDB) 5.2.i_bi_dt_hw_mq $2$ (not in LMFDB) 5.2.af_n_at_s_aq $3$ (not in LMFDB) 5.2.ac_e_ab_ag_o $3$ (not in LMFDB) 5.2.ac_e_ab_a_i $3$ (not in LMFDB) 5.2.b_b_f_g_c $3$ (not in LMFDB) 5.2.e_k_x_bq_ck $3$ (not in LMFDB) 5.2.ag_u_abx_dq_afq $6$ (not in LMFDB) 5.2.ae_k_ax_bq_ack $6$ (not in LMFDB) 5.2.ad_f_ah_k_ao $6$ (not in LMFDB) 5.2.ad_f_af_k_aq $6$ (not in LMFDB) 5.2.ab_b_af_g_ac $6$ (not in LMFDB) 5.2.ab_b_b_g_ai $6$ (not in LMFDB) 5.2.a_c_ab_ac_ac $6$ (not in LMFDB) 5.2.a_c_b_ac_c $6$ (not in LMFDB) 5.2.b_b_ab_g_i $6$ (not in LMFDB) 5.2.c_e_b_ag_ao $6$ (not in LMFDB) 5.2.d_f_f_k_q $6$ (not in LMFDB) 5.2.d_f_h_k_o $6$ (not in LMFDB) 5.2.f_n_t_s_q $6$ (not in LMFDB) 5.2.g_u_bx_dq_fq $6$ (not in LMFDB) 5.2.ag_w_acf_ek_agy $8$ (not in LMFDB) 5.2.ae_g_ab_aq_bk $8$ (not in LMFDB) 5.2.ae_m_abb_by_acy $8$ (not in LMFDB) 5.2.ae_o_abh_cm_adw $8$ (not in LMFDB) 5.2.ac_a_b_ae_m $8$ (not in LMFDB) 5.2.ac_g_aj_o_au $8$ (not in LMFDB) 5.2.ac_i_ap_bc_abs $8$ (not in LMFDB) 5.2.a_e_ad_g_am $8$ (not in LMFDB) 5.2.a_e_d_g_m $8$ (not in LMFDB) 5.2.c_a_ab_ae_am $8$ (not in LMFDB) 5.2.c_g_j_o_u $8$ (not in LMFDB) 5.2.c_i_p_bc_bs $8$ (not in LMFDB) 5.2.e_g_b_aq_abk $8$ (not in LMFDB) 5.2.e_m_bb_by_cy $8$ (not in LMFDB) 5.2.e_o_bh_cm_dw $8$ (not in LMFDB) 5.2.g_w_cf_ek_gy $8$ (not in LMFDB) 5.2.af_p_abd_bu_acm $12$ (not in LMFDB) 5.2.ad_h_an_w_abi $12$ (not in LMFDB) 5.2.ad_h_al_w_abg $12$ (not in LMFDB) 5.2.ab_d_ah_k_ao $12$ (not in LMFDB) 5.2.ab_d_ab_k_ai $12$ (not in LMFDB) 5.2.a_c_b_ac_c $12$ (not in LMFDB) 5.2.b_d_b_k_i $12$ (not in LMFDB) 5.2.b_d_h_k_o $12$ (not in LMFDB) 5.2.d_h_l_w_bg $12$ (not in LMFDB) 5.2.d_h_n_w_bi $12$ (not in LMFDB) 5.2.f_p_bd_bu_cm $12$ (not in LMFDB) 5.2.ae_i_aj_e_c $24$ (not in LMFDB) 5.2.ae_m_az_bs_aco $24$ (not in LMFDB) 5.2.ad_h_aj_m_am $24$ (not in LMFDB) 5.2.ad_j_ap_bc_abk $24$ (not in LMFDB) 5.2.ac_c_ad_e_ac $24$ (not in LMFDB) 5.2.ac_g_al_u_abe $24$ (not in LMFDB) 5.2.ab_ad_f_c_am $24$ (not in LMFDB) 5.2.ab_ab_d_ac_ae $24$ (not in LMFDB) 5.2.ab_ab_d_e_ak $24$ (not in LMFDB) 5.2.ab_b_b_e_ag $24$ (not in LMFDB) 5.2.ab_d_ad_i_ae $24$ (not in LMFDB) 5.2.ab_d_ab_i_ag $24$ (not in LMFDB) 5.2.ab_f_af_q_am $24$ (not in LMFDB) 5.2.ab_f_ad_k_ae $24$ (not in LMFDB) 5.2.ab_f_ad_q_ak $24$ (not in LMFDB) 5.2.ab_h_af_w_am $24$ (not in LMFDB) 5.2.b_ad_af_c_m $24$ (not in LMFDB) 5.2.b_ab_ad_ac_e $24$ (not in LMFDB) 5.2.b_ab_ad_e_k $24$ (not in LMFDB) 5.2.b_b_ab_e_g $24$ (not in LMFDB) 5.2.b_d_b_i_g $24$ (not in LMFDB) 5.2.b_d_d_i_e $24$ (not in LMFDB) 5.2.b_f_d_k_e $24$ (not in LMFDB) 5.2.b_f_d_q_k $24$ (not in LMFDB) 5.2.b_f_f_q_m $24$ (not in LMFDB) 5.2.b_h_f_w_m $24$ (not in LMFDB) 5.2.c_c_d_e_c $24$ (not in LMFDB) 5.2.c_g_l_u_be $24$ (not in LMFDB) 5.2.d_h_j_m_m $24$ (not in LMFDB) 5.2.d_j_p_bc_bk $24$ (not in LMFDB) 5.2.e_i_j_e_ac $24$ (not in LMFDB) 5.2.e_m_z_bs_co $24$ (not in LMFDB)


text:
# Math Help - Indices for Negatives

1. ## Indices for Negatives

Why is it that $\sqrt{-1}\sqrt{-1}=-1$ instead of $\sqrt{(-1)(-1)}=1$? What other index laws are different when involving one or more negative numbers?

Also, according to my book, $(-1)^{\frac{2}{6}} \neq (-1)^{\frac{1}{3}}$, but according to my calculator, this is perfectly fine. According to it, $(-1)^{\frac{2}{6}} \neq ((-1)^2)^6$ and $(-1)^{\frac{2}{6}} \neq ((-1)^{\frac{1}{6}})^2$. This is also the case when drawing graphs on my calculator.

2. Originally Posted by DivideBy0
Why is it that $\sqrt{-1}\sqrt{-1}=-1$ instead of $\sqrt{(-1)(-1)}=1$?
[snip]
"sqrt" is defined for real numbers as the positive number whose square is ..... but can't be defined that way for non-real numbers ..... The phrase the positive number no longer makes sense because the complex numbers cannot be ordered so as to make them an ordered field.

By an ordered field I mean:

a < b => a + c < b + c

a < b and c > 0 => ac < bc.

So you can't group complex numbers into positive and negative numbers. Square root, along with many other functions, has to become multi-valued .....

A complication with that is that you can't just define i by $i = \sqrt{-1}$ because -1 now has two square roots and there's no way to distinguish between them.

A more formal definition is to define the complex numbers as the set of all pairs of real numbers (a, b) and deine addition and multiplication by (a, b) + (c, d) = (a + c, b + d) and (a, b) * (c, d) = (ac - bd, ad + bc) respectively. It can then be proved that all the rules of arithmetic hold, that pairs of the form (a, 0) obey the same rules as real numbers and that (0, 1) * (0, 1) = (-1, 0).

If the symbols 1 and i are used to mean (1, 0) and (0, 1) respectively, then (a, b) can be written as (a, 0) * (1, 0) + (b, 0) * (0, 1) = a * 1 + b * i = a + ib.

3. Originally Posted by DivideBy0
Why is it that $\sqrt{-1}\sqrt{-1}=-1$ instead of $\sqrt{(-1)(-1)}=1$? What other index laws are different when involving one or more negative numbers?
Because the mistake is here:
$\sqrt{ab} = \sqrt{a}\sqrt{b}$.

If $a,b\geq 0$ then this is okay. But if $a,b<0$ then it CAN be wrong, like here.

This is Mine 88th Post!!!