text:
# How are the coefficients in the EGM96 model normalized?

For my own interest I'm trying to implement the EGM96 gravitational model. I found the coefficients here. The readme file says that they are "fully normalized", but I'm not 100% sure what this means.

For instance MATLAB defines fully normalized associated Legendre polynomials as: $$N_\ell^m = (-1)^m\sqrt{\frac{(\ell+0.5)(\ell-m)!}{(\ell+m)!}}P_\ell^m$$

whereas the Wikipedia article on spherical harmonics says that geodesy often uses the normalization: $$Y_\ell^m = \sqrt{\frac{(2\ell + 1)(\ell-m)}{(\ell +m)!}}P_\ell^m$$

The readme file uses the notation Ynm, which leads me to believe I should be using the second normalization. Is that correct?

• The correct answer is "none of the above." Both the MATLAB and wikipedia articles use complex spherical harmonics. The gravity model coefficients are real, separated into sine and cosine parts. The normalization is a bit different. Rather than worry about denormalization, it's best to use normalized coefficients throughout. I don't have time to write a good answer. (Continued). – David Hammen Nov 9 '15 at 0:13
• – David Hammen Nov 9 '15 at 0:13
• Caveat emptor: That paper is over 20 years old, and the Ada code (Ada? What's that?) in the paper has bugs. Except for locations directly over the poles, the equations in that paper are not buggy. – David Hammen Nov 9 '15 at 0:14
• @DavidHammen I'm not trying to denormalize the coefficients; but in order to use the normalized coefficients, I also have to use the normalized associated Legendre polynomials, correct?. In the paper you posted, the normalization they use is given in eq 3-11. Is this for sure the same one that's used in EGM96? – Lukas Bystricky Nov 9 '15 at 10:08
• Yes, this is the same one that's used in EGM96, and in every other spherical harmonics gravity model I've run across. See page 6 of csr.utexas.edu/grace/gravity/ggm02/GGM02_Notes.pdf . While models differ in how they handle tides, the coefficients have been standardized (de facto) for a long time. – David Hammen Nov 9 '15 at 11:47

The normalization factor conventionally used in satellite geodesy appears in [Kaula's Eq. 1.34]{https://store.doverpublications.com/0486414655.html}. Here I call it $$N_{n,m}$$: \begin{align*} N_{n,m} = \sqrt {(2-\delta_{0,m})(2n+1) \dfrac {(n-m)!} {(n+m)!}} = \begin{cases} \sqrt {(2n+1) \dfrac {(n-m)!} {(n+m)!}}, & \quad m = 0 \\ \sqrt {2 (2n+1) \dfrac {(n-m)!} {(n+m)!}}, & \quad m > 0 \end{cases} \end{align*}
One compact formula for gravitational potential is \begin{align*} U & = \frac {G M}{r} \left[ 1 + \sum_{n=1}^{\infty} \left(\frac {a_e} {r}\right)^n \sum_{m=0}^{n} P_{n,m}(\cos\theta) \big[ C_{n,m} \cos(m \lambda) + S_{n,m} \sin (m \lambda) \big] \right] , \end{align*} where coordinates $$(r,\theta,\lambda)$$ are respectively the radial distance, colatitude, and longitude of the point where potential is to be evaluated, all expressed in a coordinate system fixed in the body and rotating with it. Product $$G M$$ is the body's gravitational parameter. Coefficients $$C_{n,m}$$, $$S_{n,m}$$ encode the body's gravitational field. The $$P_{n,m}(\cos\theta)$$ are Associated Legendre Functions (ALFs). Their argument $$\cos\theta$$ is the cosine of colatitude $$\theta$$ measured southward from the north pole, or equivalently the sine of latitude measured north and south from the equator. Degree $$n$$ and order $$m$$ are non-negative integers $$0, 1, 2, \dots$$ with $$0 \le m \le n.$$ Reference distance $$a_e$$ and body mass $$M$$ make $$C_{n,m}$$, $$S_{n,m}$$ dimensionless pure numbers.
For large $$n$$ or $$m$$, ALFs can become very large while coefficients $$C_{n,m}$$, $$S_{n,m}$$ become very small. To compensate, a normalization factor (denoted above as $$N_{n,m}$$) is introduced which becomes small with large $$n,m$$. The factor multiplies $$P_{n,m}(\cos\theta)$$ and divides $$C_{n,m}$$ and $$S_{n,m}$$ so that products $$C_{n,m} P_{n,m}(\cos \theta)$$ and $$S_{n,m} P_{n,m}(\cos \theta)$$ are unchanged within the potential formula. An overline above $$P$$, $$C$$, and $$S$$ distinguishes "fully normalized" quantities from their unnormalized counterparts: \begin{align*} C_{n,m} \, P_{n,m}(\cos\theta) & = (C_{n,m} / N_{n,m}) (N_{n,m} P_{n,m}(\cos\theta)) \equiv \overline{C}_{n,m} \, \overline{P}_{n,m}(\cos\theta) , \\ S_{n,m} \, P_{n,m}(\cos\theta) & = (S_{n,m} / N_{n,m}) (N_{n,m} P_{n,m}(\cos\theta)) \equiv \overline{S}_{n,m} \, \overline{P}_{n,m}(\cos\theta) . \end{align*} The only change to the potential formula is the overlines: \begin{align*} U & = \frac {G M}{r} \left[ 1 + \sum_{n=1}^{\infty} \left(\frac {a_e} {r}\right)^n \sum_{m=0}^{n} \overline{P}_{n,m}(\cos\theta) \big[ \overline{C}_{n,m} \cos(m \lambda) + \overline{S}_{n,m} \sin (m \lambda) \big] \right] . \end{align*}
• +1 This is one of those answers that's going to be really handy/helpful to have here! – uhoh May 29 at 21:47

format: plain


text:
Public Group

# Random Number Generator

## Recommended Posts

I'm running to some issues with a random number generator that I am trying to create to test what type of attack an enemy will use (weapon or magic) and whether or not they land a hit with the attack.  What I want it to do is generate a random number number for the type of attack, then generate a separate random number for if the hit lands or not.  What actually happens is it is generating a different number each iteration, but the same number for each item.  So for instance, if the random number is a 6, both attack type and if it hit is a 6, if it's a 7 both are 7, etc.   I'm almost certain the issue is within how I'm using time in conjunction with this, but everything else I've found hasn't been helpful.  I've tried doing one function, but had the same issue and switched to two functions in the hopes that would help, but it didn't and now I'm not quite sure what to try next.

Here is the code I have so far:

// Example program
#include <iostream>
#include <string>
#include <stdlib.h>
#include <ctime>

using namespace std;

int getRandAttack();
int getRandHit();

int main()
{

int randomAttack;
int randomHit;

randomAttack = getRandAttack();
cout<<randomAttack<<endl;  //used to ensure same number isn't given every time

//decides what happens based on what number was given
if (randomAttack <= 5)
{
cout<<"Enemy used a weapon!"<<endl;
}else if (randomAttack > 5)
{
cout<<"Enemy used magic!"<<endl;
}

randomHit = getRandHit();
cout<<randomHit<<endl;  //used to ensure same number isn't given every time

//decides what happens based on what number was given
if (randomHit <= 5)
{
cout<<"The attack missed!";
}else if (randomHit > 5)
{
cout<<"The attack hit!";
}
}

//gets random number to determine enemy attack type
int getRandAttack ()
{
int random;
srand (time(NULL));

random = rand() % 10 + 1;
return random;
}

//gets random number to determine if enemy attack lands a hit
int getRandHit ()
{
int random;
srand (time(NULL));

random = rand() % 10 + 1;
return random;
}

I know there is an easier way to do this that involves classes, but the online compiler I'm messing around with right now doesn't seem to support extra files, so I'm making functions work instead.  Any help and lead in the right direction would be greatly appreciated.

##### Share on other sites
Quote

srand(time(NULL)) should be run exactly once to intialise the PRNG. Do this in Main when the application starts.

##### Share on other sites
53 minutes ago, TheChubu said:

Okay thanks.  I'll give that a try in the morning.

##### Share on other sites

You can also have a counter running and flag that how you like, this works if you need 1 random value at some time.

Edited by the incredible smoker

##### Share on other sites

Using the C++ standard library for generating pseudorandom numbers is easy and less error-prone than most of the alternatives.

#include <random>
#include <iostream>

//gets random number to determine enemy attack type
int getRandAttack ()
{
static std::random_device rd;  // Will be used to obtain a seed for the random number engine.
static std::mt19937 gen(rd()); // Standard Mersenne twister seeded with rd().
static std::uniform_int_distribution<> dist(1, 10);

return dist(gen);
}

//gets random number to determine if enemy attack lands a hit
int getRandHit ()
{
static std::random_device rd;
static std::minstd_rand gen(rd()); // Smaller, faster simple LCG generator (good enough for most uses) seeded with rd().
static std::uniform_int_distribution<> dist(1, 10);

return dist(gen);
}

int main()
{
// same as OP's example
}

I would rather have the generators as class members instead of all the static cruft, but this is a drop-in replacement.

##### Share on other sites
2 hours ago, Bregma said:

Using the C++ standard library for generating pseudorandom numbers is easy and less error-prone than most of the alternatives.

#include <random>
#include <iostream>

//gets random number to determine enemy attack type
int getRandAttack ()
{
static std::random_device rd;  // Will be used to obtain a seed for the random number engine.
static std::mt19937 gen(rd()); // Standard Mersenne twister seeded with rd().
static std::uniform_int_distribution<> dist(1, 10);

return dist(gen);
}

//gets random number to determine if enemy attack lands a hit
int getRandHit ()
{
static std::random_device rd;
static std::minstd_rand gen(rd()); // Smaller, faster simple LCG generator (good enough for most uses) seeded with rd().
static std::uniform_int_distribution<> dist(1, 10);

return dist(gen);
}

int main()
{
// same as OP's example
}

I would rather have the generators as class members instead of all the static cruft, but this is a drop-in replacement.

I would rather do it as a class too, but I was just messing around with some code to get a better hang of the random number generators.  Thank you for the help and I will definitely give this a try and look further into the other features the standard library has.

13 hours ago, swiftcoder said:

Also worth mentioning, C++ developers aren't stuck with rand() these days. The standard library has some nifty alternatives.

I'll have to look into those alternatives.  Thanks for the suggestion!

TheChubu - Thanks for the suggestion!  I tried it out and that worked.  Now I'm going to look into the other suggestions to see if I can make this more reusable and viable in a game!

• ### Similar Content

• By owenjr
Hi, I'm a Multimedia Engineering student. I am about to finish my dergree and I'm already thinking about what topic to cover in my final college project.
I'm interested in the procedural animation with c++ and OpenGL of creatures, something like a spider for example. Can someone tell me what are the issues I should investigate to carry it out? I understand that it has some dependence on artificial intelligence but I do not know to what extent. Can someone help me to find information about it? Thank you very much.

Examples:
- Procedural multi-legged walking animation
- Procedural Locomotion of Multi-Legged Characters in Dynamic Environments

• I am a talented 2D/3D artist with 3 years animation working experience and a Degree in Illustration and Animation. I have won a world-wide art competition hosted by SFX magazine and am looking to develop a survival game. I have some knowledge of C sharp and have notes for a survival based game with flexible storyline and PVP. Looking for developers to team up with. I can create models, animations and artwork and I have beginner knowledge of C sharp with Unity. The idea is Inventory menu based gameplay and is inspired by games like DAYZ.
Here is some early sci-fi concept art to give you an idea of the work level. Hope to work with like minded people and create something special. email me andrewparkesanim@gmail.com.
Developers who share the same passion please contact me, or if you have a similar project and want me to join your team email me.
Many thanks, Andrew.

• By mike44
Hi
saw in dependency walker that my app still needs msvcp140d.dll even after disabling debug.
What did I forget in the VS2017 release settings? After setting to multithreaded dll I get linker errors.
Thanks

• So I have been playing around with yaml-cpp as I want to use YAML for most of my game data files however I am running into some pretty big performance issues and not sure if it is something I am doing or the library itself.
I created this code in order to test a moderately sized file:
Player newPlayer = Player(); newPlayer.name = "new player"; newPlayer.maximumHealth = 1000; newPlayer.currentHealth = 1; Inventory newInventory; newInventory.maximumWeight = 10.9f; for (int z = 0; z < 10000; z++) { InventoryItem* newItem = new InventoryItem(); newItem->name = "Stone"; newItem->baseValue = 1; newItem->weight = 0.1f; newInventory.items.push_back(newItem); } YAML::Node newSavedGame; newSavedGame["player"] = newPlayer; newSavedGame["inventory"] = newInventory; This is where I ran into my first issue, memory consumption.
Before I added this code, the memory usage of my game was about 22MB. After I added everything expect the YAML::Node stuff, it went up to 23MB, so far nothing unexpected. Then when I added the YAML::Node and added data to it, the memory went up to 108MB. I am not sure why when I add the class instance it only adds like 1MB of memory but then copying that data to a YAML:Node instance, it take another 85MB of memory.
So putting that issue aside, I want want to test the performance of writing out the files. the initial attempt looked like this:
void YamlUtility::saveAsFile(YAML::Node node, std::string filePath) { std::ofstream myfile; myfile.open(filePath); myfile << node << std::endl; myfile.close(); } To write out the file (that ends up to be about 570KB), it took about 8 seconds to do that. That seems really slow to me.
After read the documentation a little more I decide to try a different route using the YAML::Emitter, the implemntation looked like this:
static void buildYamlManually(std::ofstream& file, YAML::Node node) { YAML::Emitter out; out << YAML::BeginMap << YAML::Key << "player" << YAML::Value << YAML::BeginMap << YAML::Key << "name" << YAML::Value << node["player"]["name"].as<std::string>() << YAML::Key << "maximumHealth" << YAML::Value << node["player"]["maximumHealth"].as<int>() << YAML::Key << "currentHealth" << YAML::Value << node["player"]["currentHealth"].as<int>() << YAML::EndMap; out << YAML::BeginSeq; std::vector<InventoryItem*> items = node["inventory"]["items"].as<std::vector<InventoryItem*>>(); for (InventoryItem* const value : items) { out << YAML::BeginMap << YAML::Key << "name" << YAML::Value << value->name << YAML::Key << "baseValue" << YAML::Value << value->baseValue << YAML::Key << "weight" << YAML::Value << value->weight << YAML::EndMap; } out << YAML::EndSeq; out << YAML::EndMap; file << out.c_str() << std::endl; } While this did seem to improve the speed, it was still take about 7 seconds instead of 8 seconds.
Since it has been a while since I used C++ and was not sure if this was normal, I decided to for testing just write a simple method to manually generate the YAMLin this use case, that looked something like this:
static void buildYamlManually(std::ofstream& file, SavedGame savedGame) { file << "player: \n" << " name: " << savedGame.player.name << "\n maximumHealth: " << savedGame.player.maximumHealth << "\n currentHealth: " << savedGame.player.currentHealth << "\ninventory:" << "\n maximumWeight: " << savedGame.inventory.maximumWeight << "\n items:"; for (InventoryItem* const value : savedGame.inventory.items) { file << "\n - name: " << value->name << "\n baseValue: " << value->baseValue << "\n weight: " << value->weight; } } This wrote the same file and it took about 0.15 seconds which seemed a lot more to what I was expecting.
While I would expect some overhead in using yaml-cpp to manage and write out YAML files, it consuming 70X+ the amount of memory and it being 40X+ slower in writing files seems really bad.
I am not sure if I am doing something wrong with how I am using yaml-cpp that would be causing this issue or maybe it was never design to handle large files but was just wondering if anyone has any insight on what might be happening here (or an alternative to dealing with YAMLin C++)?

• So I am trying to using Yaml as my game data files (mainly because it support comments, is a bit easier to read than JSON, and I am going to be working in these files a lot) with C++ and yaml-cpp (https://github.com/jbeder/yaml-cpp) seems like the most popular library for dealing with it however I am running into an issue when using pointers.
Here is my code:
struct InventoryItem { std::string name; int baseValue; float weight; }; struct Inventory { float maximumWeight; std::vector<InventoryItem*> items; }; namespace YAML { template <> struct convert<InventoryItem*> { static Node encode(const InventoryItem* inventoryItem) { Node node; node["name"] = inventoryItem->name; node["baseValue"] = inventoryItem->baseValue; node["weight"] = inventoryItem->weight; return node; } static bool decode(const Node& node, InventoryItem* inventoryItem) { // @todo validation inventoryItem->name = node["name"].as<std::string>(); inventoryItem->baseValue = node["baseValue"].as<int>(); inventoryItem->weight = node["weight"].as<float>(); return true; } }; template <> struct convert<Inventory> { static Node encode(const Inventory& inventory) { Node node; node["maximumWeight"] = inventory.maximumWeight; node["items"] = inventory.items; return node; } static bool decode(const Node& node, Inventory& inventory) { // @todo validation inventory.maximumWeight = node["maximumWeight"].as<float>(); inventory.items = node["items"].as<std::vector<InventoryItem*>>(); return true; } }; } if I just did std::vector<InventoryItem> items and had the encode / decode use InventoryItem& inventoryItem everything works fine however when I use the code above that has it as a pointer, I get the following error from code that is part of the yaml-cpp library:
impl.h(123): error C4700: uninitialized local variable 't' used The code with the error is:
template <typename T> struct as_if<T, void> { explicit as_if(const Node& node_) : node(node_) {} const Node& node; T operator()() const { if (!node.m_pNode) throw TypedBadConversion<T>(node.Mark()); T t; if (convert<T>::decode(node, t)) // NOTE: THIS IS THE LINE THE COMPILER ERROR IS REFERENCING return t; throw TypedBadConversion<T>(node.Mark()); } }; With my relative lack of experience in C++ and not being able to find any documentation for yaml-cpp using pointers, I am not exactly sure what is wrong with my code.
Anyone have any ideas what I need to change with my code?

• I already asked this question on stack overflow, and they got pissed at me, down-voted me and so forth, LOL .... so I'm pretty sure the answer is NO, but I'll try again here anyway just in case..... Is there any way to get the size of a polymorphic object at run-time? I know you can create a virtual function that returns size and overload it for each child class, but I'm trying to avoid that since (a) it takes a virtual function call and I want it to be fast and (b) it's a pain to have to include the size function for every subclass. I figure since each object has a v-table their should be some way since the information is there, but perhaps there is no portable way to do it.

• This is the code I have:
//Create Window     DWORD windowStyle = WS_VISIBLE;     DWORD windowExStyle = WS_EX_OVERLAPPEDWINDOW;     SetThreadDpiAwarenessContext(DPI_AWARENESS_CONTEXT_SYSTEM_AWARE);     RECT client{ 0, 0, 100, 40 };     UINT dpi = GetDpiForSystem();     AdjustWindowRectExForDpi(&client, windowStyle, false, windowExStyle, dpi);     UINT adjustedWidth = client.right - client.left;     UINT adjustedHeight = client.bottom - client.top;     m_hwnd = CreateWindowEx(windowExStyle,                             className.c_str(),                             windowName.c_str(),                             windowStyle,                             CW_USEDEFAULT,                             CW_USEDEFAULT,                             adjustedWidth,                             adjustedHeight,                             nullptr,                             nullptr,                             m_hInstance,                             m_emu     ); The generated window has a client area of 1 pixel in height, even though I'm asking for 40. so I'm always getting 39 pixel less than what I need...can someone help me with this? x_x

• I've spent quite a while (and probably far longer than I actually should) trying to design an allocator system.  I've bounced ideas around to various people in the past, but never really gotten something satisfactory.
Basically, the requirements I'm trying to target are:
Composability -- allocators that seamlessly allocate from memory allocated by other allocators.  This helps me to do things like, for example, write an allocator that pads allocations from its parent allocator with bit patterns to detect heap corruption.  It also allows me to easily create spillovers, or optionally assert on overflow with specialized fallbacks.   Handling the fact that some allocators have different interfaces than others in an elegant way.  For example, a regular allocator might have Allocate/Deallocate, but a linear allocator can't do itemized deallocation (but can deallocate everything at once).   I want to be able to tell how much I've allocated, and how much of that is actually being used.  I also want to be able to bucket that on subsystem, but as far as I can tell, that doesn't really impact the design outside of adding a new parameter to allocate calls. Note:  I'm avoiding implementation of allocation buckets and alignment from this, since it's largely orthogonal to what I'm asking and can be done with any of the designs.

To meet those three requirements, I've come up with the following solutions, all of which have significant drawbacks.
Static Policy-Based Allocators
I originally built this off of this talk.
Examples;
struct AllocBlock { std::byte* ptr; size_t size; }; class Mallocator { size_t allocatedMemory; public: Mallocator(); AllocBlock Allocate(size_t size); void Deallocate(AllocBlock blk); }; template <typename BackingAllocator, size_t allocSize> class LinearAllocator : BackingAllocator { AllocBlock baseMemory; char* ptr; char* end; public: LinearAllocator() : baseMemory(BackingAllocator::Allocate(allocSize)) { /* stuff */ } AllocBlock Allocate(size_t size); }; template <typename BackingAllocator, size_t allocSize> class PoolAllocator : BackingAllocator { AllocBlock baseMemory; char* currentHead; public: PoolAllocator() : baseMemory(BackingAllocator::Allocate(allocSize)) { /* stuff */ } void* Allocate(); // note the different signature. void Deallocate(void*); }; // ex: auto allocator = PoolAllocator<Mallocator, size>; Advantages:
SFINAE gives me a pseudo-duck-typing thing.  I don't need any kind of common interfaces, and I'll get a compile-time error if I try to do something like create a LinearAllocator backed by a PoolAllocator. It's composable. Disadvantages:
Composability is type composability, meaning every allocator I create has an independent chain of compositions.  This makes tracking memory usage pretty hard, and presumably can cause me external fragmentation issues.  I might able to get around this with some kind of singleton kung-fu, but I'm unsure as I don't really have any experience with them. Owing to the above, all of my customization points have to be template parameters because the concept relies on empty constructors.  This isn't a huge issue, but it makes defining allocators cumbersome. Dynamic Allocator Dependency
This is probably just the strategy pattern, but then again everything involving polymorphic type composition looks like the strategy pattern to me. 😃
Examples:
struct AllocBlock { std::byte* ptr; size_t size; }; class Allocator { virtual AllocBlock Allocate(size_t) = 0; virtual void Deallocate(AllocBlock) = 0; }; class Mallocator : Allocator { size_t allocatedMemory; public: Mallocator(); AllocBlock Allocate(size_t size); void Deallocate(AllocBlock blk); }; class LinearAllocator { Allocator* backingAllocator; AllocBlock baseMemory; char* ptr; char* end; public: LinearAllocator(Allocator* backingAllocator, size_t allocSize) : backingAllocator(backingAllocator) { baseMemory = backingAllocator->Allocate(allocSize); /* stuff */ } AllocBlock Allocate(size_t size); }; class PoolAllocator { Allocator* backingAllocator; AllocBlock baseMemory; char* currentHead; public: PoolAllocator(Allocator* backingAllocator, size_t allocSize) : backingAllocator(backingAllocator) { baseMemory = backingAllocator->Allocate(allocSize); /* stuff */ } void* Allocate(); // note the different signature. void Deallocate(void*); }; // ex: auto allocator = PoolAllocator(someGlobalMallocator, size); There's an obvious problem with the above:  Namely that PoolAllocator and LinearAllocator don't inherit from the generic Allocator interface.  They can't, because their interfaces provide different semantics.  There's to ways I can solve this:
Inherit from Allocator anyway and assert on unsupported operations (delegates composition failure to runtime errors, which I'd rather avoid).   As above:  Don't inherit and just deal with the fact that some composability is lost (not ideal, because it means you can't do things like back a pool allocator with a linear allocator) As for the overall structure, I think it looks something like this:
Memory usage tracking is easy, since I can use the top-level mallocator(s) to keep track of total memory allocated, and all of the leaf allocators to track of used memory.  How to do that in particular is outside the scope of what I'm asking about, but I've got some ideas. I still have composability Disadvantages:
The interface issues above.  There's no duck-typing-like mechanism to help here, and I'm strongly of the opinion that programmer errors in construction like that should fail at compile-time, not runtime. Composition on Allocated Memory instead of Allocators
This is probably going to be somewhat buggy and poorly thought, since it's just an idea rather than something I've actually tried.
Examples:
struct AllocBlock { void* ptr; size_t size; std::function<void()> dealloc; } class Mallocator { size_t allocatedMemory; public: Mallocator(); AllocBlock Allocate(size_t size) { void* ptr = malloc(size); return {ptr, size, [ptr](){ free(ptr); }}; } }; class LinearAllocator { AllocBlock baseMemory; char* ptr; char* end; public: LinearAllocator(AllocBlock baseMemory) : baseMemory(baseMemory) {end = ptr = baseMemory.ptr;} AllocBlock Allocate(size_t); }; class PoolAllocator { AllocBlock baseMemory; char* head; public: PoolAllocator(AllocBlock baseMemory) : baseMemory(baseMemory) { /* stuff */ } void* Allocate(); }; // ex: auto allocator = PoolAllocator(someGlobalMallocator.Allocate(size)); I don't really like this design at first blush, but I haven't really tried it.

"Composable", since we've delegated most of what composition entails into the memory block rather than the allocator. Tracking memory is a bit more complex, but I *think* it's still doable. Disadvantages:
Makes the interface more complex, since we have to allocate first and then pass that block into our "child" allocator. Can't do specialized deallocation (i.e. stack deallocation) since the memory blocks don't know anything about their parent allocation pool.  I might be able to get around this though.
I've done a lot of research against all of the source-available engines I can find, and it seems like most of them either have very small allocator systems or simply don't try to make them composable at all (CryEngine does this, for example).  That said, it seems like something that should have a lot of good examples, but I can't find a whole lot.  Does anyone have any good feedback/suggestions on this, or is composability in general just a pipe dream?

• Hi
I’ve been working on a game engine for years and I’ve recently come back to it after a couple of years break.  Because my engine uses DirectX9.0c I thought maybe it would be a good idea to upgrade it to DX11. I then installed Windows 10 and starting tinkering around with the engine trying to refamiliarise myself with all the code.
It all seems to work ok in the new OS but there’s something I’ve noticed that has caused a massive slowdown in frame rate. My engine has a relatively sophisticated terrain system which includes the ability to paint roads onto it, ala CryEngine. The roads are spline curves and built up with polygons matching the terrain surface. It used to work perfectly but I’ve noticed that when I’m dynamically adding the roads, which involves moving the spline curve control points around the surface of the terrain, the frame rate comes to a grinding halt.
There’s some relatively complex processing going on each time the mouse moves - the road either side of the control point(s) being moved, is reconstructed in real time so you can position and bend the road precisely. On my previous OS, which was Win2k Pro, this worked really smoothly and in release mode there was barely any slow down in frame rate, but now it’s unusable. As part of the road reconstruction, I lock the vertex and index buffers and refill them with the new values so my question is, on windows 10 using DX9, is anyone aware of any locking issues? I’m aware that there can be contention when locking buffers dynamically but I’m locking with LOCK_DISCARD and this has never been an issue before.
Any help would be greatly appreciated.

• I'm writing a small 3D Vulkan game engine using C++. I'm working in a team, and the other members really don't know almost anything about C++. About three years ago i found this new programming language called D wich seems very interesting, as it's very similar to C++. My idea was to implement core systems like rendering, math, serialization and so on using C++ and then wrapping all with a D framework, easier to use and less complicated. Is it worth it or I should stick only to C++ ? Does it have less performance compared to a pure c++ application ?

• 48
• 12
• 10
• 10
• 9
• ### Forum Statistics

• Total Topics
631374
• Total Posts
2999653
×


text:
# Chapter 18 - Ionic Equilibria I: Acids and Bases - Exercises - Review of Strong Electrolytes - Page 743: 7

(a) $[Sr^{2+}] = 0.0105M, [OH^-] = 0.0210M$ (b) $[H^+] = [ClO^{3-}] = 0.0105M$ (c) $[K^+] = 0.0210M, [S{O_4}^{2-}] = 0.0105M$

#### Work Step by Step

Strong electrolytes, like strong acids and bases, and salts, are capable of ionizating completely in water, therefore: - $[AB] = [A^+] = [B^-]$ Because the reaction: - $AB (aq) -- \gt A^+(aq) + B^-(aq)$ Occurs for all the compound molecules. For $Sr(OH)_2$, since there is 2 $OH^-:$ - $Sr(OH)_2(aq) -- \gt Sr^{2+}(aq) + 2OH^-(aq)$ The "$OH^-$" concentration will be the double of the base concentration. 2 * 0.0105 = 0.0210M The same thing for $K_2SO_4$ 2 * 0.0105 = 0.0210

After you claim an answer you’ll have 24 hours to send in a draft. An editor will review the submission and either publish your submission or provide feedback.


text:
# Decision Trees

• ID3和C4.5使用信息熵计算最优分裂。
• CART使用基尼指数计算最优分裂。
• XGBoost使用二阶泰勒展开系数计算最优分裂。

# Ensemble Method / Meta-Algorithm

• bagging / bootstrap aggregating: one way to reduce the variance of an estimate is to average together multiple estimates
• bootstrap sampling to obtain the data subsets for training the base learners. Given a training set $D$. Generate $n$ new training sets $D_i$, each of which is sampling from $D$ with replacement.
• aggregating voting for classification and averaging for regression to generate the outputs of base learners.
• Example: random forest. $f(x) = \frac{1}{M} \sum_{m=1}^M f_m(x)$
• feature importance??
• boosting: primarily reducing bias and variance. It’s incrementally building an ensemble by training each new model instance to emphasize the training instances that previous models mis-classified.
• sampling: more weight is given to examples that were misclassified by earlier rounds
• aggregation: a weighted majority vote (classification) or a weighted sum (regression)
• Example: XGBoost, one efficient implementation of GBDT. Second-order gradient. Reference
• Bagging方法有放回地采样同数量样本训练每个学习器, 然后再一起集成(简单投票).
• Boosting方法使用全部样本(可调权重)依次训练每个学习器, 迭代集成(平滑加权).

The principal difference between boosting and the committee methods, such as bagging, is that base learners are trained in sequence on a weighted version of the data.

N samples, M weak classifiers.

1. sample weight $w_i = \frac{1}{N}$.
2. For m in [1,2, …, M]
1. Learn a weak classifier $G_m$
2. Get the false classified ratio in the training data: $e_m = \sum_{i=1}^N w_i I(G_m(x_i) \ne y_i)$
3. Calculate coefficient to $G_m(x)$, $\alpha_m = \frac{1}{2} \log \frac{1 - e_m}{e_m}$
4. Update sample weight: $w_i = \frac{w_i \exp(-\alpha_m y_i G_M(x_i))}{Z}$, where $Z = \sum_{i=1}^N w_i \exp(-\alpha_m y_i G_M(x_i))$.
3. Do linear combination of $M$ weak models: $f(x) = \sum_{i=1}^M \alpha_m G_m(x)$. The final classifier is $G(x) = sign (f(x)) = sign (\sum_{i=1}^M \alpha_m G_m(x))$.


text:
External Memoization Worksheet - Maple Help

Home : Support : Online Help : Mathematics : Algebra : Expression Manipulation : External Memoization Worksheet

External Memoization Using Modules

This worksheet demonstrates a technique for building robust memoized procedures using modules and other techniques. This worksheet is referenced in the help topic on efficiency hints, and goes into further detail about the caching and memoization techniques mentioned there.

Memoization of a procedure is a process by which previously computed values are stored somewhere and, whenever a computation is to be repeated, the stored valued is looked up and returned instead of repeating the entire (typically expensive) computation.

Maple already provides automatic memoization by means of the "remember" option that may be specified for procedures. A procedure with option remember has, as part of its internal data structure, a table in which previously computed values are stored. Whenever the procedure is called, Maple examines the remember table (if one exists) to determine whether the procedure has been called before with the same arguments and therefore has a stored value. If a stored value is found, then it is returned; otherwise, the computation is performed normally, and the computed value is stored in the remember table of the procedure.

 > restart:


text:
POLICY & PRACTICE

The human qualities needed to complete the global eradication of polio

Qualités humaines nécessaires pour achever l'éradication mondiale de la poliomyélite

Las cualidades humanas necesarias para lograr la erradicación global de la poliomielitis

Dermot Maher*

The Wellcome Trust, 215 Euston Road, London, NW1 2BE, England

ABSTRACT

Although the 99% decrease seen in global polio incidence between 1988 and 2000 represented remarkable progress towards polio eradication, tackling the last 1% of polio has proved tantalizingly difficult. Pockets of endemic transmission currently persist both on the border between Afghanistan and Pakistan and in northern Nigeria. These pockets have permitted the reinfection of countries that were previously polio-free. Global strategic plans for polio eradication set out the activities, resources and financing needed to overcome the managerial, technical and security challenges faced by those tasked with the interruption of poliovirus transmission. However, polio eradication also depends on the less tangible but equally important human qualities of energy, realism, articulacy, determination, imagination, collaboration, adaptability, tactical awareness, innovation, openness and nimbleness (the initial letters of which give the acronym "ERADICATION"). By paying attention to these human qualities, the stakeholders involved may be more likely to achieve global polio eradication.

RÉSUMÉ

Même si la diminution de 99% de l'incidence mondiale de poliomyélite entre 1988 et 2000 a représenté un remarquable progrès vers l'éradication de la maladie, s'attaquer au dernier 1% de la polio s'est avéré terriblement difficile. Des poches de transmission endémique persistent actuellement à la frontière entre l'Afghanistan et le Pakistan et au nord du Nigeria. Ces poches ont permis la réinfection des pays qui ne présentaient auparavant plus aucun cas de poliomyélite. Les plans stratégiques mondiaux pour l'éradication de la poliomyélite ont établi les activités, les ressources et le financement nécessaires pour surmonter les défis techniques, de gestion et de sécurité que doivent relever les personnes chargées d'eradiquer la transmission du virus de la polio. Cependant, l'éradication de la maladie dépend aussi de qualités humaines moins tangibles, mais tout aussi importantes, qui sont l'énergie, le réalisme, la faculté d'expression, la détermination, l'imagination, la collaboration, l'adaptabilité, le sens tactique, l'innovation, la sincérité et la vivacité (dont les lettres initiales en anglais donnent l'acronyme «ERADICATION»). En prêtant attention à ces qualités humaines, les parties prenantes pourront probablement réussir à éradiquer la poliomyélite à l'échelle mondiale.

RESUMEN

Introduction

Progress towards polio eradication has been remarkable. The annual number of polio cases recorded worldwide fell by 99% between 1988, when the Global Polio Eradication Initiative (GPEI) was established, and 2000.1 However, tackling the last 1% of polio has proved difficult.1 Although the number of countries where polio was endemic fell rapidly after the launch of the GPEI, from at least 125 in 1988 to 20 in 2000,1 progress in eradicating polio has since slowed. In 2006 polio was still endemic in Afghanistan, India, Nigeria and Pakistan and only India has been declared polio-free, in 2012.1,2 In the last few years, travellers from the few countries where polio remains endemic have carried poliovirus into countries that were polio-free.2 Such reintroduction of the virus was detected in 23 previously polio-free countries in 2009 - 2010, in the World Health Organization's (WHO's) European Region (which was certified as polio-free in 2002)2 in 2010, and in China in 2011.3

Since 2009, efforts have intensified to identify what it will take to interrupt poliovirus transmission in the countries where polio is still endemic or where transmission has recently reappeared. In an independent evaluation conducted in 2009, the main managerial, technical and security challenges faced by those attempting to clear the remaining pockets of transmission (then on the Afghanistan - Pakistan border, in northern India and in northern Nigeria) were identified.4 The GPEI's Strategic Plan for 2010 - 2012 subsequently set out the activities, resources and financing needed to overcome these challenges.5 In 2010, the GPEI established the Independent Monitoring Board to monitor and guide the plan's progress. The Board's chairman, Sir Liam Donaldson, stated that although "polio eradication is on a knife edge", it was "still feasible, but more urgency is needed to complete the task".6,7 Reflecting this urgency, the World Health Assembly declared in May 2012 that the completion of polio eradication constituted a "programmatic emergency for global public health", and an appropriate Emergency Action Plan for 2012 - 2013 was developed.8

The GPEI has concentrated on the technical considerations for stopping poliovirus transmission, to the neglect of the key human qualities that will also be needed. The Independent Monitoring Board has advised that "the style and approach to management of the global programme need reorientation"7 and has warned that the GPEI runs the common risk "for change management programmes to pay too little attention to the human factors, to over-orientate themselves to the technical elements of a challenge".7 The aim of this paper is to help redress the balance by identifying the human qualities that have contributed to the progress made so far and that need to be highlighted in attempts to eradicate polio. These qualities are considered first in relation to embracing the goal of polio eradication and second in relation to overcoming the main roadblocks to the interruption of poliovirus transmission.

Embracing the goal

All landmark achievements in science and its application require imagination. For example, although the enthusiasts for human genome sequencing in the 1980s were often considered wildly optimistic or hopelessly deluded, sequencing of the human genome was completed in 20019 thanks, in large part, to the imagination and vision of the enthusiasts. Similar imagination and vision - as well as a sound strategy and a strong likelihood of technical feasibility - are needed by those attempting to globally eradicate an infectious disease. Efforts to eradicate malaria, yaws and yellow fever all foundered on the "rock" of doubtful technical feasibility. Polio eradication is, however, based on a sound and adaptable strategy, similar to the one used to eradicate polio in the Americas in 1994 (Table 1), and on technical feasibility.10,11

A few years ago, the persistent pockets of poliovirus transmission in the Indian states of Uttar Pradesh and Bihar were regarded as a "stress test" of the technical feasibility of polio eradication. Certain technical difficulties in achieving high enough immunity levels to halt poliovirus transmission in the affected areas were observed. One was low vaccine immunogenicity. These problems had been exacerbated by behaviours and conditions that dramatically enhanced the local populations' vulnerability to poliovirus infection, such as indiscriminate defecation, contaminated water supplies, high population densities, malnutrition, unclean supplementary infant feeds, high birth rates and inter-birth intervals of less than 1 year.4 Despite all of these conditions, India was declared polio-free in February 2012; this provided definitive evidence of the technical feasibility of polio eradication.12

Within the overall strategy, tactical awareness is needed to harness the full benefits of an improved understanding of the relationship between population immunity and interruption of poliovirus transmission. One reason for the considerable inter-country variation in the progress made towards polio eradication is that the level of population immunity needed to halt the transmission of wild poliovirus can differ substantially between geographical areas. The GPEI's Strategic Plan for 2010 - 2012 reflected the observation that, to stop local transmission of poliovirus, the percentage of the population that needs to have poliovirus-specific immunity is higher in Asia (> 95%) than in sub-Saharan Africa (80 - 85%).5 Eradication efforts in Asia are currently focused on the few districts and subdistricts where transmission, though highly localized, persists. The aim is to achieve the high immunity thresholds needed to halt transmission in Asia through frequent campaigns of supplementary immunization activities with exceptionally high coverage. Although the aim in Africa is also to achieve high coverage with supplementary immunization activities, these will have to be run over relatively few campaigns and a relatively wide area to decrease the risk of recurrent outbreaks following importation of poliovirus into previously polio-free areas.

In some settings, particular population subgroups and communities - e.g. nomads, migrant labourers and other highly mobile groups of people, those with relatively poor access to public services and those (often minorities) who otherwise make scant use of public services - play an important role in sustaining polio transmission. In discussion with relevant local leaders, tailored approaches have been developed, for implementation by special polio-eradication teams, to address the special needs of such groups. The vaccination of travellers at crossing points between polio-endemic and polio-free countries, and on the border between the polio-endemic countries of Afghanistan and Pakistan, is a useful approach.

The GPEI has shown tactical awareness by recently taking on board the lessons learnt through more than 20 years of experience in strategic planning. For example, the GPEI's Strategic Plan for 2010 - 2012 reflects four key lessons learnt (Table 2), each with a specific tactical implication.5

Interrupting transmission

The stakeholders' determination to overcome operational barriers to the interruption of poliovirus transmission is complemented by key human qualities that are relevant to each of the technical, managerial and security challenges identified during the independent evaluation conducted in 20094 in the then-endemic areas in northern India and northern Nigeria and on the Afghanistan - Pakistan border (Table 3).

Technical challenges

Need for more research

The success of global polio eradication hinges on innovation for several reasons. First, when adapting an older strategy, such as that developed in the Americas in the 1990s, for current use in other settings, not all of the obstacles that may be encountered can be anticipated. An example of such an unexpected obstacle is the relatively low efficacy of oral polio vaccine observed in northern India.13 This obstacle was, however, successfully overcome by an innovation: the development of a new bivalent vaccine. Second, the decades needed to achieve eradication provide time for important developments in, for example, diagnostics, vaccinology and cold-chain technology that can enhance programme effectiveness and reduce costs. Third, potentially important aspects of the pathogen or its control that were unrecognized at the outset of the eradication programme (e.g. vaccine-derived polioviruses) can be investigated and identified as the programme progresses. In the late stages of polio eradication, as the transmission of wild poliovirus is interrupted, the proportion of polio cases caused by circulating vaccine-derived polioviruses is expected to increase.14 To try to resolve this problem, the plan is to switch from trivalent oral vaccines to the bivalent vaccines that are more genetically stable. The use of all oral polio vaccines will be stopped once the transmission of wild poliovirus is interrupted.

Since the GPEI's inception, the key stakeholders have built the GPEI's capacity to pursue an active and wide-ranging research agenda. For example, the United States Centers for Disease Control and Prevention have contributed epidemiological and virological expertise, and the Bill & Melinda Gates Foundation and the Global Alliance for Vaccines and Immunization have financed several important research projects, particularly for the development and testing of new vaccines. From its base at WHO's headquarters in Geneva, a dedicated GPEI research and product development team has successfully coordinated the network of vaccine manufacturers, academic research institutions, not-for-profit research groups, public health laboratories and regulatory agencies worldwide that has facilitated the development, testing and licensing of new vaccines, diagnostics and related technologies, as well as operational research.

The importance of fast-track vaccine development was shown by the successive appearance of new vaccines aimed at enhancing the impact of each immunization contact in areas of highly efficient poliovirus transmission. In the early 2000s, despite high vaccine coverage through a combination of routine and supplementary immunization activities, transmission was being sustained in areas of Egypt and India where population densities were particularly high and sanitation was poor. Monovalent oral polio vaccine of type 1 was found to confer substantial gains in immunity compared with the trivalent vaccine15 and, after fast-track development, testing and licensing, was in use in Egypt and India by 2005. A similarly rapid response to the recent demonstration of good immunogenicity induced by bivalent vaccines of types 1 and 316 has resulted in rapid deployment of such vaccines in the field.

In the late stages of polio eradication, the GPEI will need to promote and support innovation to address remaining problems and issues, such as the immunological basis of multiple vaccinations, the ages of children to be vaccinated, and the optimal utilization of new oral and inactivated vaccine constructs. In the eradication of polio from the areas of persistent transmission in Asia, a key research challenge is to improve vaccine effectiveness and reduce the thresholds of population immunity required to stop poliovirus circulation. Operational research to improve programme performance should be tailored to the specific challenges of each remaining endemic area (e.g. improving lot quality assurance sampling in Nigeria) and the resolution of key eradication issues such as the use of short-interval additional doses of oral vaccine for outbreak response.4 Improvements in the GPEI's capacity for social science research could help to obviate the problems arising from unfounded fears over vaccine safety, particularly the persistent myths, rumours and misconceptions in Nigeria and Pakistan that contribute to vaccine refusal.4 Further focus on practical programmatic research is needed to improve the quality of vaccine campaigns and surveillance. Although we may have the data that show where vaccination coverage is poor, we still need to understand why coverage is poor in certain areas and to identify and implement effective solutions.7

The interruption of wild poliovirus transmission globally is not the end of polio, but it is the beginning of the end. Two important risks will need to be managed: the reintroduction of wild poliovirus and the re-emergence of circulating vaccine-derived polioviruses. The success of post-eradication strategies, like that of the pre-eradication strategies, hinges on innovation. In leading the GPEI's programme of work on post-eradication risk management, WHO is continuing its multi-pronged programme of research, new product development, strategy formulation and policy development.5 This programme has four main aims: (i) to characterize in detail the primary risks that may threaten polio eradication in the long term; (ii) to develop strategies for mitigating each of the long-term risks; (iii) to establish the mechanisms needed to coordinate these risk management strategies internationally; and (iv) to develop new products to manage the risks associated with a halt in the use of oral polio vaccines. In 2013, WHO will finalize the Polio Eradication and Endgame Strategic Plan for 2013 - 2018.

Managerial challenges

Levels of routine immunization

Global eradication of any disease that crosses national borders requires international collaboration. The solidarity between nations that has permitted tremendous progress to be made towards polio eradication must be reinforced in the late stages of eradication and the post-polio era.17 Such solidarity is a common strand running through several health initiatives, including the Expanded Programme on Immunization. In the independent evaluation that was conducted in 2009, low levels of routine immunization - which were partially attributed to inadequate collaboration between GPEI and the Expanded Programme on Immunization - were identified as one of the main challenges to the successful interruption of poliovirus transmission.4 By exploiting all of the opportunities for collaboration between the GPEI and the Expanded Programme on Immunization, it should be possible to improve the performance of both initiatives. Such collaboration will be essential in the polio "endgame strategy" and also in the post-eradication era, when reliance on inactivated polio vaccine will make house-to-house supplementary immunization activities more difficult. Careful consideration of the merging or overlapping of the measles initiative with the final and post-eradication phases of the GPEI might identify potential gains in efficiency for both initiatives.

Following the GPEI's launch in 1988, energy and enthusiasm were initially maintained by the dramatic early successes achieved in those parts of the world where polio eradication efforts were rapidly scaled up. In these areas, the mean time from strategy initiation to the interruption of the transmission of indigenous wild poliovirus was only 2 to 3 years. The few areas of the world where polio remained endemic by the mid-2000s were the exceptions to this rapid progress. There were serious setbacks in subsequent efforts to eradicate polio from the endemic areas of southern Afghanistan, northern India, northern Nigeria and Pakistan, as well as from the nearby countries where transmission was re-established. For example, the suspension of polio vaccination in Kano state in northern Nigeria in 2003 was followed by the international spread of poliovirus from Nigeria and the consequent reinfection of 18 countries (directly or via another country) by mid-2005.18 Little progress appeared to be made in Afghanistan, India, Nigeria or Pakistan between 2004 and 2008, and 11 new outbreaks of polio occurred in 2010.19 These setbacks proved a test of both the stakeholders' energy and their enthusiasm.

Although transmission of wild poliovirus had not been interrupted globally by the initial target date of 2000, the substantial progress made initially in implementing strategies and reducing the number of countries with polio endemicity reinvigorated eradication efforts. However, any prolonged eradication effort runs the risk of fatigue at international and national levels. At the local level, community and health staff fatigue may be worsened by difficulties in the efficient delivery of routine GPEI and other immunization activities in dangerous environments, the often high frequency of supplemental activities, and the proliferation of vertical donor initiatives that directly or indirectly affect immunizations.4 Fatigue often leads to poor campaigns and then to a vicious circle of lack of progress and waning confidence. In contrast, the energy and enthusiasm arising from positive developments, such as the declaration that India was polio-free in February 2012, can promote a virtuous circle that encourages further progress and the confidence to overcome any remaining barriers to eradication.

The human quality of realism enables the translation of what is feasible in theory into what is achievable in practice. It was the successful adaptation and implementation of the GPEI's main strategy in the WHO's Western Pacific Region that convinced many decision-makers of the "operational" feasibility of polio eradication. However, a key lesson arising from the late stages of the GPEI is that proof of technical feasibility in one setting does not necessarily equate to operational feasibility in all settings. Evidence of the technical feasibility of a particular eradication strategy in any area does, however, provide the basis for realistic application and adaptation of that strategy to the conditions in different settings. In the final drive towards global polio eradication, such tailored approaches will be needed in polio-endemic areas and any countries where poliovirus transmission reappears.

Commitment of resources

Those involved in GPEI at all levels, from global to local, must show articulacy in advocating for the full deployment of the required resources at the local, grass-roots level. Operational barriers at the grass-roots level can only be overcome if the GPEI's stakeholders fulfil their financing commitments, which include the filling of the GPEI's budget shortfall for 2012 - 2013 - estimated to be 700 million United States dollars (US$) - by increasing domestic and international funding.20 At the global level, the justification for further financing is sound, as failure to achieve the GPEI's ultimate goal would have significant and adverse humanitarian and economic consequences. If the GPEI's activities had to be halted early, hundreds of thousands of children would be paralysed for life by polio within a decade and billions of dollars would have to be spent on outbreak response activities, the rehabilitation and treatment of polio cases, and the associated loss of economic productivity. The incremental net benefits of achieving global polio eradication, aggregated over the period 1988 - 2035, have been estimated at no less than US$ 42 billion.21 Successful eradication will ensure that the 21-year financial investment made so far will be protected in perpetuity.

GPEI's authority and control

Openness and accountability at all levels of the GPEI will promote effective and efficient performance. At the national level, GPEI has had little authority or control over those local implementing entities that are performing poorly. This has been a huge constraint on progress.4 Greater openness on the part of national and subnational authorities would put the spotlight on areas in which the quality of eradication activities is currently insufficient to interrupt poliovirus transmission. This would enable collaborating partners to concentrate extra resources and enhanced technical assistance where they are most needed. The Independent Monitoring Board already monitors the progress of the Strategic Plan for 2010 - 2012 against major milestones and process indicators and advises countries and partner agencies on any corrective actions that are needed.23 Independent quarterly assessment of indicators of programme performance for each polio-infected country will enable prompt remedial action wherever underperformance is identified. In treating polio eradication as a global health emergency, the Independent Monitoring Board presents its reports "frankly, objectively, and without fear or favour".7 Evidence of the Board's frankness can be seen in its recommendation that "Pakistan should fundamentally rethink its national emergency plan, focusing on what can be done to enhance meaningful accountability".7 Openness on the part of the GPEI's senior management is a requirement for the consultation and decision-making needed for the GPEI to streamline its administrative structure, and to promote effective and efficient performance.

Disparities in country support

Fast-changing epidemiology and cash flows often require nimbleness in the reallocation of funds. Responding to resource constraints, the GPEI has developed new mechanisms to evaluate and prioritize activities for maximum effect. Financial tracking allows identification of weaknesses and disparities in country support, such as the inadequate funding given to some countries where transmission had been re-established, such as Chad in 2009 and South Sudan in 2008.4 A nimble reaction to outbreaks can limit their spread and decrease the risk of re-establishment of poliovirus circulation. GPEI is developing a two-pronged approach to enhance the speed, quality and impact of outbreak response activities for both wild poliovirus and circulating vaccine-derived polioviruses. There will be closer international monitoring of response activities to manage risks associated with new polio outbreaks, and new, international, outbreak response guidelines informed by the results of pilot studies, operational research and clinical trials.4

Security challenges

Conclusion

Acknowledgements

I am grateful to staff of the WHO's Polio Eradication team for fruitful discussions that informed this paper and critical review of the manuscript. The views expressed by the author are not necessarily those of the Wellcome Trust.

Competing interests: None declared.

References

1. Bhutta ZA. The last mile in global poliomyelitis eradication. Lancet 2011;378:549 - 52. doi:10.1016/S0140-6736(11)60744-7 PMID:21664681

2. World Health Organization [Internet]. Poliomyelitis fact sheet number 114. Geneva: WHO; 2010. Available from: http://www.who.int/mediacentre/factsheets/fs114/en/index.html [accessed 17 January 2013]          .

3. Zarocostas J. Spread of polio to China and Africa threatens eradication. BMJ 2011;343:663.

4. Global Polio Eradication Initiative [Internet]. Independent evaluation of major barriers to interrupting poliovirus transmission. Geneva: GPEI; 2009. Available from: http://www.polioeradication.org/Resourcelibrary/Evaluations.aspx [accessed 17 January 2013]          .

5. Strategic Plan 2010 - 2012. Geneva: Global Polio Eradication Initiative; 2010. Available from: http://www.polioeradication.org/content/publications/gpei.strategicplan.2010-2012.eng.may.2010.pdf [accessed 17 January 2013]          .

6. Wise J. Final push is needed to tackle last 1% of polio. BMJ 2011;343:231.

IMB.report.july.pdf
[accessed 17 January 2013]          .

8. Global Polio Eradication Initiative [Internet]. Emergency Action Plan. Geneva: GEPI; 2012. Available from: http://www.polioeradication.org/Resourcelibrary/Strategyandwork/EmergencyActionPlan.aspx [accessed 18 January 2013]          .

9. Lander ES, Linton LM, Birren B, Nusbaum C, Zody MC, Baldwin J et al.; International Human Genome Sequencing Consortium. Initial sequencing and analysis of the human genome. Nature 2001;409:860 - 921. doi:10.1038/35057062 PMID:11237011

10. Hull HF, Ward NA, Hull BP, Milstien JB, de Quadros CA. Paralytic poliomyelitis: seasoned strategies, disappearing disease. Lancet 1994;343:1331 - 7. doi:10.1016/S0140-6736(94)92472-4 PMID:7910329

11. Cochi SL, Kew O. Polio today: are we on the verge of global eradication? JAMA 2008;300:839 - 41. doi:10.1001/jama.300.7.839 PMID:18714066

12. India, United Nations Children's Fund [Internet]. Polio eradication. India no longer a polio-endemic country. New York: UNICEF; 2012. Available from: http://www.unicef.org/india/health_3729.htm [accessed 18 January 2013]          .

13. Grassly NC, Fraser C, Wenger J, Deshpande JM, Sutter RW, Heymann DL et al. New strategies for the elimination of polio from India. Science 2006;314:1150 - 3. doi:10.1126/science.1130388 PMID:17110580

14. Kew OM, Sutter RW, de Gourville EM, Dowdle WR, Pallansch MA. Vaccine-derived polioviruses and the endgame strategy for global polio eradication. Annu Rev Microbiol 2005;59:587 - 635. doi:10.1146/annurev.micro.58.030603.123625 PMID:16153180

15. Polio Eradication Initiative. Conclusions and recommendations of the ad hoc advisory committee on poliomyelitis eradication, Geneva, 21 - 22 September 2004Wkly Epidemiol Rec 2004;79:401 - 7. doi:10.1016/S0140-6736(10)61230-5 PMID:20980048

16. Sutter RW, John TJ, Jain H, Agarkhedkar S, Ramanan PV, Verma H et al. Immunogenicity of bivalent types 1 and 3 oral poliovirus vaccine: a randomised, double-blind, controlled trial. Lancet 2010;376:1682 - 8. doi:10.1016/S0140-6736(10)61230-5 PMID:20980048

17. Aylward RB, Sutter RW, Cochi SL, Thompson KM, Jafari H, Heymann D. Risk management in a polio-free world. Risk Anal 2006;26:1441 - 8. doi:10.1111/j.1539-6924.2006.00840.x PMID:17184391

18. Aylward RB, Maher C. Interrupting poliovirus transmission - new solutions to an old problem Biologicals 2006;34:133 - 9. doi:10.1377/hlthaff.28.4.1091 PMID:19597208

19. Aylward RB. Lessons from the late stages of the Global Polio Eradication Initiative. In: Cochi SL, Dowdle WR, editors. Disease eradication in the 21st century: implications for global health. Cambridge: MIT Press; 2011. pp. 13 - 23.

20. Global Polio Eradication Initiative [Internet]. Financing. Geneva: GPEI; 2012. Available from: http://www.polioeradication.org/Financing.aspx [accessed 18 January 2013]          .

21. Duintjer Tebbens RJ, Pallansch MA, Cochi SL, Wassilak SGF, Linkins J, Sutter RW et al. Economic analysis of the global polio eradication initiative. Vaccine 2010;29:334 - 43. doi:10.1016/j.vaccine.2010.10.026 PMID:21029809

22. Kaufmann JR, Feldbaum H. Diplomacy and the polio immunization boycott in northern Nigeria. Health Aff (Millwood) 2009;28:1091 - 101. doi:10.1377/hlthaff.28.4.1091 PMID:19597208

23. Global Polio Eradication Initiative [Internet]. Governance. Geneva: GEPI; 2011. Available from: http://www.polioeradication.org/Aboutus/Governance/IndependentMonitoringBoard.aspx [accessed 18 January 2013]          .

24. Tangermann RH, Hull HF, Jafari H, Nkowane B, Everts H, Aylward RB. Eradication of poliomyelitis in countries affected by conflict. Bull World Health Organ 2000;78:330 - 8. PMID:10812729

25. Foege WH. House on fire: the fight to eradicate smallpox. Berkeley: University of California Press; 2011.

26. Graves R. The Greek myths. London: Penguin; 1960.

Submitted: 20 August 2012
Revised version received: 3 December 2012
Accepted: 6 December 2012
Published online: 24 January 2013

* Correspondenceto Dermot Maher (e-mail: dermotmaher1@yahoo.com).

World Health Organization Genebra - Genebra - Switzerland
E-mail: bulletin@who.int


text:
Nilpotent matrices related to Lie algebras of special orthogonal groups in characteristic 0

In terms of matrix theory, the question I'm led to is the following: Start with an $n$-dimensional vector space over an algebraically closed field of characteristic 0 such as $\mathbb{C}$, which has a non-degenerate symmetric bilinear form. Consider all $n \times n$ skew-adjoint matrices $A$ relative to this form.

Given $n\geq 5$, what is the least power $k$ for which all nilpotent matrices of this type satisfy $A^k=0$?

For any nilpotent $n \times n$ matrix $A$, it follows from the Cayley-Hamilton Theorem that $A^n=0$. But in the special case here it seems plausible to expect a slightly smaller minimum: namely, $n-1$ if $n$ is odd and $n-2$ if $n$ is even. I also wonder what is written down in the literature along this line.

There is of course a hidden agenda, relative to simple Lie algebras attached to special orthogonal groups over a field like $\mathbb{C}$. In the classification of simple types $A_\ell-D_\ell$ of rank $\ell$, the respective Coxeter numbers are $\ell+1, 2\ell, 2\ell, 2(\ell-1)$. (Types $B, C$ share the same Weyl group.) Types $A, C$ are realized naturally as $n\times n$ matrices with $n=h$, but the other Lie algebras of orthogonal type yield $n=2\ell+1$ and $n=2\ell$. So my question for the latter types means: does every nilpotent element $e$ of this natural matrix Lie algebra satisfy $e^h =0$ as in types $A,C$?

Behind this question is a related prime characteristic question for restricted Lie algebras, motivated in part by Kostant's classical 1959 paper in Amer. J. Math. (Corollary 5.4). In the general setting of simple Lie algebras he showed that regular (= principal) "nilpotent" elements $e$ are characterized by a condition on their adjoint operators: $(\mathrm{ad} \:e)^{2q}\neq 0$ where $q$ is the sum of coefficients of the highest root expressed relative to simple roots. Moreover, the next power annihilates all regular nilpotents. Earlier he showed that $q+1 = h$ is the Coxeter number of the Weyl group. (But there is a misprint in that corollary.)

ADDED: As Victor points out, except for a small decrease in type $D$ the four classical families of simple Lie algebras have index of nilpotence in their natural representations given by the Cayley-Hamilton approach in type $A$. My question arose from passing to characteristic $p>0$ via a Chevalley basis over $\mathbb{Z}$, then extending scalars. For $p \geq h$, results from the mid-1980s on cohomology of restricted Lie algebras and support varieties of modules (Jantzen, Friedlander-Parshall, ... ) reveal that for the built-in $[p]$ operation on such a Lie algebra one has $\text{ad}\: e^{[p]} = 0 = (\text{ad} \:e)^p$ for all nilpotents $e$. But in natural matrix representations like those for types $A-D$, the $[p]$ operation is the usual matrix power. Here the slightly modified Cayley-Hamilton power needed for vanishing agrees.

At the extreme of $E_8$ there is more divergence: Here the "natural" smallest faithful representation is given by the adjoint module with $n=248$, whereas $h=30$. For $p = 31$ this power of each $\text{ad} \:e$ vanishes, contrasting with Kostant's characteristic 0 result which requires a power at least $59$ when $e$ is regular.

• For odd n there is n-dimensional orthogonal irreducible representation of sl(2). Then $e\in sl(2)$ would be represented by skew-adjoint operator with $e^{n-1}\ne 0$. This seems to contradict your statement.. Mar 3, 2011 at 4:27

Let $\lambda$ be a partition of $n.$ Then there exists a skew-symmetric nilpotent matrix whose Jordan blocks sizes are $\lambda_i$ if and only if every even parts has even multiplicity. This follows easily from the representation theory of $\mathfrak{sl}_2$ and is duly recorded in standard sources, e.g. Collingwood and McGovern. It follows that the maximum "nilpotence index" of a skew-symmetric $n\times n$ matrix is $n$ for odd $n$ and $n-1$ for even $n.$


text:
Top > m-metacompact
HTML convert time to 0.002 sec.

m-metacompact

Last-modified: 2015-12-24 (ÌÚ) 04:37:17

Definition

m denotes an infinite cardinal.
The space X is said to be m-metacompact if and only if each open covering of X by no more than m sets admits as a refinement a point-finite open covering.

Property

• Let X be a linearly ordered space, and let m be an infinite cardinal. The following are then equivalent:
1. X is m-fully normal.
2. To each open covering U of X there corresponds a star-finite open covering V which is an m-quasi-refinement of U.
3. X is almost m-fully normal.
4. X is strongly m-paracompact.
5. X is m-paracompact.
6. X is m-metacompact.
7. Each open covering U of X with |U|¡åm admits as a refinement an open covering V which is point countable (that is, no point of X belongs to more than contably many members of V).
8. For each open covering U of X with \aleph_0¡å|U|¡åm there is an open covering V which refines U such that each point of X belongs to less than |U| members of V.
9. Each gap u of X satisfying |¦Ø_¦Á(u)|¡åm (respectively,|¦Ø_¦Â(u)|¡åm) is a Q-gap from the left (respectively, right).

Reference

Gulden, S. L. , Fleischman, W. M. and Weston, J. H., Linearly ordered topological spaces, Proc. Amer. Math. Soc. 24 1970 197--203.


text:
# Convergence or Divergence of $\sum_{n=1}^{\infty}(3^{1/n}-1)\sin(\pi/n)$

How to determine convergence of this series. $$\sum_{n=1}^{\infty}(3^{1/n}-1)\sin(\pi/n)$$ I've tried using comparison test:

$$\sin(\pi/n) \leq \pi/n$$, so:

$$(3^{1/n}-1)\sin(\pi/n)<(3^{1/n}-1)\pi/n < (3^{\frac{1}{n}})\frac{\pi}{n}$$ By comparison test if $$\sum(3^{\frac{1}{n}})\frac{\pi}{n}$$ is convergent, so would be initial.

But $$\sum(3^{\frac{1}{n}})\frac{\pi}{n}$$ is divergent.

I also know that $$\sin(\pi/n)$$ is divergent. How would it help? Can you give a hint?

• Well, $\int_1^{\infty}(3^{1/x}-1)\sin(\pi/x)dx$ converges. Thus the series does too. – clathratus Oct 26 '18 at 16:32

HINT

We have that

• $$3^x = e^{x\log 3}=1+x\log 3 +O(x^2)$$
• $$\sin x = x +O(x^2)$$

therefore

$$(3^{1/n}-1)\sin(\pi/n)\sim \frac {\pi\log 3} {n^2}$$

then refer to limit comparison test with $$\sum \frac 1 {n^2}$$.

HINT

Note that $$3^{1/n} \to 1$$, so $$3^{1/n} - 1 \to 0$$ and the last step in your inequality should not be made.

Your series is absolutely convergent by asymptotic comparison with $$\sum_{n\geq 1}\frac{\log 3}{n}\cdot\frac{\pi}{n}=\frac{\pi^3}{6}\log(3)$$.
If you like explicit bounds, you may notice that $$\frac{3}{2} = \frac{2n+1}{2n}\cdot\frac{2n+2}{2n+1}\cdot\ldots\cdot\frac{2n+n}{3n-1} ,\qquad 2=\frac{n+1}{n}\cdot\frac{n+2}{n+1}\cdot\ldots\cdot\frac{n+n}{2n-1}$$ $$3 = \prod_{k=1}^{n}\frac{(2n+k)(n+k)}{(2n+k-1)(n+k-1)}=\prod_{k=1}^{n}\frac{(2n+k)(2n-k+1)}{(2n+k-1)(2n-k)}$$ and by the AM-GM inequality $$3^{1/n} \leq \frac{1}{n}\sum_{k=1}^{n}\frac{(2n+k)(2n-k+1)}{(2n+k-1)(2n-k)}=\frac{1}{n}\sum_{k=1}^{n}\frac{(4n+1)^2-(2k-1)^2}{(4n-1)^2-(2k-1)^2}$$ or $$3^{1/n}-1 \leq \sum_{k=1}^{n}\frac{16}{(4n-1)^2-(2k-1)^2}=\sum_{k=1}^{n}\frac{4}{(2n-k)(2n+k-1)}.$$ By letting $$H_n = \sum_{k=1}^{n}\frac{1}{k}$$ the previous line gives $$3^{1/n}-1 \leq \frac{4}{4n-1}\sum_{k=1}^{n}\left(\frac{1}{2n-k}+\frac{1}{2n+k-1}\right)=\frac{4}{4n-1}\left[H_{3n-1}-H_{n-1}\right]$$ and by the Hermite-Hadamard inequality it follows that $$3^{1/n}-1 \leq \frac{4}{4n-1}\left(\log 3+\frac{4}{3(4n-1)}\right)\leq \frac{1}{n}\left(\log(3)+\frac{1}{n}\right).$$ In particular the given series is bounded by $$\frac{\pi^3}{6}\log(3)+\pi\zeta(3)$$.

• Then you finally leave as a moderator! I'm really sorry for that but I'm happy to continue to read your answer. Ofetn I understand a 1% but they are very stimulating to learn more advanced topics and related methods. – user Oct 27 '18 at 7:57


text:
# Is it possible to throw a baseball so hard it circles the earth above your head?

Assuming the earth had no atmosphere, and you could throw a baseball as fast as you wanted to, and you were standing on the surface of the earth, is it possible to throw the baseball so fast that it circles the earth and flies over your head above the height you threw it at?

The thinking goes like this: you throw a baseball and it lands far away from you. Then you throw it harder and it lands half way around the world. Then you throw it harder and it lands at your feet from behind. Then you throw it harder and it passes your head, in orbit.

But could you throw it even faster so that it passes you above your head?

I think this is not possible, because if you threw it even harder, the orbit would just become elliptical and the ball would still arrive at your head height. Even if you angled it slightly up or down, it would still only arrive back to your at head height. Right?

It's because baseballs are not rockets. They can't circularize their orbits once they have some altitude. Right?

• So the solution is to throw like volleyball high style instead of baseball style? Is it so hard to throw a ball at above head height? Feb 1 at 15:24
• How simplified do you want the problem to be? the Earth does not have uniform gravitational strength, leading to minor wobbles in orbit (in all 3 dimensions). Feb 1 at 18:25
• Are you assuming a spherical Earth?
– Mark
Feb 2 at 0:01
• If you could throw it as fast as you wanted too, you could aim it to bounce of some debris to circularise.
– user20636
Feb 2 at 0:10
• You can release the ball above the height of your head. Most people have arms that they can raise above their head. Feb 3 at 12:11

Yes, but only because the Earth rotates. If you throw the ball, you will end up in a slightly different spot. If you were at a high point at the equator and threw the ball due East at higher than orbital velocity, you would rotate by the time the ball came back and it would be slightly over your head, because you have moved to a different spot in the orbit. The lowest point in the orbit, however, would be where you released the ball.

If Earth also didn't rotate, it would return at whatever point you released the ball at. Most people don't throw a ball over their heads, so...

• So if you tried to repeat your performance from the same time and place on the next day, you might get clobbered by the first ball. But any other time of day you should be safe. Feb 2 at 2:24
• But if you are anywhere but on the equator, or throw the ball in any direction but due east (or west), the ball will not return to where you're standing, because the Earth will have rotated about 22.5 degrees during the orbit. (Assuming one orbit takes 90 minutes.) Feb 2 at 2:40
• This answer is assuming that, in addition to lacking an atmosphere, the Earth is perfectly round and homogeneous (except for radial density variation). Bumps on the actual, realistic, Earth would alter the trajectory, making it non-closed and thus changing the "same-point" outcome. Feb 2 at 10:55
• Upvoted for "Most people don't throw a ball over their heads" - I have yet to find a more convincing proof of any theorem Feb 2 at 13:50
• Nitpick: the lowest point on the orbit would only be where you released the ball if you threw it perfectly horizontally. If it was angled slightly up or down at the release point (as the OP suggests), then its perigee would be closer to the center of the Earth than the release point was. Feb 3 at 14:58

You're correct.

On a perfectly spherical, atmosphere-free Earth, with no obstacles as tall as you, with a uniformly spherical gravitational field, it would be possible; the low point of the orbit would be at the altitude you threw the ball from, a couple of meters above the surface.

• Provided it was thrown horizontal, and that's not guaranteed. When I throw a baseball the trajectory is pretty random, it's basically a Monte-Carlo method for estimating the cross-sectional area of the batter.
– uhoh
Feb 1 at 19:05
• If the ball could go through the earth without friction, then even if you throw the ball up or down, it'd still orbit and end up right at the point where you released it Feb 1 at 23:29
• @uhoh I figure if we're granting the ability to throw a ball at 7800m/s, we can throw in "good aim" for free. Feb 1 at 23:33
• The OP has independently thought of Newton's Cannonball, If a ball is thrown horizontally hard enough from the top of a mountain it will hit the back of the cannon after completing one orbit
– CSM
Feb 2 at 10:50
• @uhoh When my partner is throwing a ball for the dog, a 100% success rate in the ball even going forwards would be a noticeable improvement, at least from the point of view of those who want to avoid getting hit by a tennis ball covered in saliva. Feb 2 at 16:49

"...above the height you threw it at?"

No. It would come back to exactly the height* from which you threw it, unless you threw it so hard (i.e., at "escape velocity") that it did not come back at all.

All orbits are conic sections (ellipses, parabolas, hyperbolas.) If you throw the baseball, at exactly escape velocity, then it will follow a parabolic trajectory that never returns. If you throw it any harder, it will follow a hyperbolic trajectory, and if you throw it less hard, it will follow an elliptical trajectory.

The elliptical trajectories all return to their starting point, but the shape of the ellipse (i.e., it's "eccentricity") and how long it takes to return depends on how hard you throw it.

* Not just exactly the same height, but also, if you're plotting its position in an inertial coordinate system that is at rest with respect to the common barycenter of the baseball and the planet, and if no other forces besides gravity act on it, then it will come back to exactly the same place where it left your hand.

But also note, if the planet is rotating, then it's highly likely that you will no longer be in that place when the ball comes back to it.

you can't throw it so that it lands behind your feet. if it doesn't hit halfway around the world, it will return to your hand, because elipse

A circle is a subset of ellipse, and a circular orbit can (on a theoretical, magical, non-rotating, vacuum Earth) be thrown. A slightly slower orbit might reasonably be thought to hit your knees (to avoid hitting the antipodal soil), but it would no longer be circular but again elliptical, with a greatly shifted major axis, since you would be releasing it at its apogee rather than perigee.
You might also note that you can slightly shift the elliptical axes of this almost circular orbit, by aiming slightly above or below your shoulder at the 'horizon' (minor axis).

• I think a slightly [s]lower orbit (thrown horizontally, but slower than needed for a circular orbit) would still result in an elliptic trajectory, but now you'll be on top of the major axis, and the ball will hit the ground 90 or fewer degrees in front of you because the minor axis is shorter than Earth's radius. Actually, every ball you throw follows an elliptic trajectory (minus air resistance) which would take it close to the Earth's center and back, if it could (and Earth's mass were concentrated there). Feb 3 at 12:13
• oh, you're right. clearly seen. Feb 3 at 16:21

In addition to the argument about the earth rotating, it is also possible because you don't release the ball from your head, you release it from your hand. By the rules of 2-body problem orbits, the orbit will always intersect with the release point. This point is in front of you. So in theory one could have an elliptical orbit which is at a higher altitude above your head before intersecting with your hand.

This means you need to throw the ball downward, not horizontal or up. That will cause the ball to be coming down when it completes the orbit. This of course, is a challenge because the earth is going to get in the way of your ball. If it wasn't there, it would be easy to achieve your goal.

As such, I would say you need to climb Mt. Everest, and throw the ball with a slight downward angle. You also should release the ball as high as you possibly can. I don't think this can be done if you release at shoulder height, just due to geometry. To have the path go above your head and then hit shoulder height at the release point would require a very steep angle... meaning you had to throw it downrward more -- and you're more likely to intersect the earth.

Beyond that, it's just a geometry game. You need a pitch that's high enough (near head level) that when you look at the perigee of the orbit, it doesn't intersect the ground.

On the other hand, if we start asking how you manage to accelerate the ball that fast, we might be talking about a long robotic arm. If its long enough, that could make the geometry easier because it permits a shallower angle while still being able to go overhead.

Of course, the easy answer is to throw the ball goofy, holding you hand up above your head and releasing it there.

Newton had about the same idea. He pictured a canon on the top of a mountain, shootig a bullet horizontally with different speeds:

You are incorrect in saying that the ball ends up in an ellips. That is, the circular orbit lies exactly between elliptical, parabolic (escape), or hyperbollic orbit. It can end up on an ellipse but then it maintains its height. For every distance there is a circular orbit. So also for one above your head. Depending on your throwing skills the ball can end up on a circular orbit above your head, or through the windows of the white house, in the cereal bow of Byden.

I edit because I misunderstood the question. It asked if the ball can end up higher above you than the height from which you threw it away.
Say you throw it with such a speed that the orbit is circular. Now throw it again with a tiny higher speed, parallel to the Earth. What will the orbit be? It will be non-circular, that's sure (there is only one circular orbit for the height you throw it fro. So it has to be an elliptical orbit. All elliptical orbits are closed. So there is no way the thrown awsy ball will end up a bit higher than the point you threw it from because for all elliptical orbits a mass must pass the same point after a a full rotation, which is not the case if the point of the ball after one rotation doesn't coincide with the throwing point . You can try other directions but the same holds.

Objects can't spiral. Only if GW's are emitted. In classical mechanics this is not the case. So you might have a chance near a black hole.

So. If you throw the ball horizontally there are these possibilities:

-The ball lands on the Earth. Earth before reaching you. Somehere behind you.

-The ball shows circular motion.

-The ball orbits on an ellips with the Earth in a focus point.

-The ball shows a parabolic orbit and never returns, ending up with zero velocity at infinity.

-The ball's orbit is a pyperbole, ending uo with a non-zero velocity at infinity.

• @GremlinWranger Ah! I thought if it was asked if it could return at the same spot. Thanks. At least you make it clear why you downvoted. Thats always good to know and a downvote is certainly justified here. Aug 8 at 9:26
• @GremlinWrangler I made an edit. Aug 8 at 9:55
• @GremlinWranger Thanks. Aug 8 at 10:05
• Much more correct now, but suggest a further edit to tidy into a coherent whole - since there has been no changes to the question the 'edit' description in the middle is largely unnecessary, assume people are reading from the top for the first time and make sure it makes sense to them. Your reasons would go here in the comments and in the 'edit description' box. Aug 8 at 10:05

Easy.

erm, let's rephrase that ... "easy".
(for a rather ludicrously hard version of the word "easy")

Just throw the ball at escape velocity-aLittleBit, so that it not only orbits Earth but reaches apogee of some several tens of thousands of km. Aim so the Moon's gravity slightly pulls this orbit, shifting the perigee up a bit. Done.

The lumpyness of Earth's surface and gravity field will cause less perturbation of the orbit than the more gross gravitation of the Moon, allowing enough predictability to the trajectory.

But why are you throwing stuff around Earth, when you could be the all-star ultimate baseball champion, EVAH!

As long as the ball is thrown at escape velocity (~11 km/s) its curve due to falling under gravity will be the same as the circumference of the earth - this is what a circular orbit is.

Of course this assumes a perfectly spherical earth of constant density and no atmosphere (none of which are true), but if these were true and one could throw at such crazy high speed in an exactly tangential direction, then the ball will continue at constant height above the perfectly spherical earth, eventually returning to the same position and height.

• Your velocity number is incorrect. 11 km/s will result in a parabolic (or hyperbolic) trajectory, not a circular trajectory. If an object is above escape velocity, it will never circle the Earth, it will move away for infinity. The orbital velocity is roughly 7.6 km/s. Feb 26 at 2:08
• @StarMan you are incorrect and thus your down voting is not appreciated. From en.wikipedia.org/wiki/Escape_velocity: The escape velocity from Earth's surface is about 11,186 m/s (6.951 mi/s; 40,270 km/h; 36,700 ft/s; 25,020 mph; 21,744 kn). Feb 26 at 3:13
• Escape velocity is the speed needed to escape (the earth) and never return, thus it will never orbit, because it will never return. Feb 26 at 3:25
• Ok, I concur. You are correct, and I have now learnt the difference between escape velocity and orbital velocity. Feb 26 at 3:34
• @Socco a) I didn't downvote. b) escape velocity != orbital velocity Feb 26 at 16:12


text:
By Nico Jimenez

# New API endpoint for text

We are happy to announce that our new API endpoint v3/text is now in public beta. We highly recommend that search and typesetting apps switch to using this new endpoint. After a few months of testing and bugfixes, we plan to remove the beta flag. The API specs for v3/text are available at https://docs.mathpix.com/#process-image-v3-text-beta.
The goal of v3/text was to provide a simpler and more robust way of extracting all math and all text in an image. It uses a different algorithm that is much better at reading a large amount of text. Traditionally, MathpixOCR has always struggled at reading more than a single paragraph at a time. Now, we can read up to a full page of mixed text and math (although we don’t support double columns yet). Text is represented as simple text (instead of using \text), inline Latex is enclosed in inline delimiters (by default $$...$$), and block mode Latex is enclosed inside block mode delimiters (by default $...$). We chose these defaults because they are standard in modern Latex and Markdown editors.

# New features

- v3/text strips newlines, except in cases where they are semantically important, whereas v3/latex returns all newlines that appear visually
- v3/text currently only returns text and latex_styled output options; text is always set in the response JSON if there’s readable text in the image. On the other hand, latex_styled is not returned when in the input is a text heavy image; in some cases there is ambiguity about whether latex_styled (math mode) and text (text mode) make more sense for a given image; in such cases we return both options
- multiple choice questions are represented one line at a time in v3/text
- text and latex_styled contain newlines in math mode when they make sense in order to make the resulting Latex code more readable

# Limitations

- not available in batch API yet
- still in beta, bugfixes coming soon

# Examples

## Just text

returns:
4. By inserting a dielectric material between the plates of a parallel plate condenser, the energy is increased five times. The dielectric constant of the material is

## Multiple choice

which gets rendered as:
Equation of circle touching and is
(1)
(2)
(3)
(4)

## Paragraphs and block mode math

Here’s a demo of v3/text working on multiple paragraphs:

### Text result:

The study of physical systems by means of particle simulations is well established
in a number of fields and is becoming increasingly important in others. The most classical example is probably celestial mechanics, but much recent work has been done in formulating and studying particle models in plasma physics, fluid dynamics, and molecular dynamics [ 5] Thee are two major classes of simulation methods. Dynamical simulations follow the trajectories of particles over some time interval of interest. Given initial positions and velocities, the trajectory of each particle is governed by Newton’s second law of motion:
where is the mass of th particle and the force is obtained from the gradient of a potential function When one is interested in an equilibrium configuration of a set of particles rather than their time-dependent properties, an alternative approach is the Monte Carlo method. In this case, the potential function has to be evaluated for a large number of configurations in an attempt to determine the potential minimum.

# Conclusion

Questions or comments? Get in touch! nico@mathpix.com


text:
# Homework Help: Summation Notation - Variable in the exponent

1. Mar 1, 2008

### Goldenwind

[SOLVED] Summation Notation - Variable in the exponent

1. The problem statement, all variables and given/known data

This is an example formula.

How do I solve a summation if something is in the form of Sum(c^i), where c is some constant?

2. Mar 2, 2008

### Dick

Then it's geometric series. You'll want |c|<1.

3. Mar 2, 2008

Thank-you :)


text:
# Riemann-Roch and quartic

I know very little in algebraic geometry, but I want to learn!! So I know the Riemann-Roch theorem as follow: let $$L(D)=\{\text{ meromorphic functions, s.t. }\operatorname{div}(f)\geq D \}$$ and $$O(D)=\{\text{ meromorphic differentials, s.t. }\operatorname{div}(f)\geq D\}.$$

Then $$\dim L(D^{-1})= \deg(D)-g+1+\dim(O(D)).$$ Then I would like to prove the following: if $Q$ is a quartic (4,0) on $S^2$ with one poles of most order $2$ then $Q$ is zero.

I would like to say $Q=g\,dz^4$ with $g$ meromorphic with a pole of order at most $2$. Then compute $\dim(L(D^{-1}))$ with $D=k\cdot\infty$ with $k\leq 2$ and then conclude that $\dim(L(D^{-1}))=0$ hence $g=0$.

Is the rough idea is correct? how to compute $O(D)$? is there a big difference between quartic and one form? I am ready to read any reasonable approach for somebody with a good background in differential geometry and one variable complex analysis.

• Isn't the defining condition of $L(D)$: $\;\operatorname{div} f \ge -D$? – Bernard Jun 8 '16 at 21:44
• it is corrected. – Paul Jun 9 '16 at 4:52
• not quite: it should be ${}\ge\color{red}- D$. Furthermore the group of divisors is noted additively. – Bernard Jun 9 '16 at 8:48
• Here, math.ucdavis.edu/~kapovich/RS/RiemannRoch.pdf, where my source, but it is not impossible I miss something. – Paul Jun 9 '16 at 9:10