## How to remove the smallest term from asymptotic expansion?

It is well-known that $$e^{-1/x}sim o(x^n)$$ as $$xto 0^+$$ for any $$ninmathbb{N}$$, thus if I do an asymptotic expansion for a function, say $$f=1/(1-x)+e^{-1/x}$$ as $$xto 0^+$$, I expect to receive an answer like $$fsim 1+x + x^2+o(x^2)$$. Nevertheless both Asymptotic and Series give me results including $$e^{-1/x}$$, see

In(1):= Asymptotic(1/(1 – x) + E^(-1/x), {x, 0, 2})
Out(1):= 1 + E^(-1/x) + x + x^2
In(2):= Series(1/(1 – x) + E^(-1/x), {x, 0, 2})
Out(2):= E^-(1/x)+O(x)^3+(1+x+x^2+O(x)^3)

My question is how to remove $$e^{-1/x}$$ in practice.

## data structures – k-th smallest element in sliding segment

Consider an array $$a(1ldots n)$$ and another array $$l = a(0)$$ (initial value). At each turn we may add next element to array $$l$$, or remove first element from array $$l$$. F.e. after first iteration it could be empty or could become $$a(0, 1)$$. We want to find k-th smallest element at each iteration in array $$l$$.

First of all if size of $$l$$ is less than $$k$$ the answer is ‘No’. Let’s consider more interesting case.

I’ve decided to have two heaps (one min and one max heap).

Max heap contains all k-th smallest elements from $$a(l..r)$$ and min heap contains elements which are greater than the k-th smallest element. Then answer is head of max-heap (we can take it in O(1)).

But there is a small problem. What if need to consider $$a(l+1 .. r)$$ (so we need to push left bound). Now of course if $$r – l < k$$ the answer is ‘No’, but what should we do otherwise? I thought we should do following: if $$a(l) > maxheap(0)$$ then the answer doesn’t change (because we will delete element greater than k-th smallest element), but what should we do with our heaps? Unfortunately I can’t delete in heap by position (it takes a long time). The best we can do is delete root node in O(log n). How should I affect them?

## arrays – Smallest subarray with sum equal to k

I want to find the length smallest subarray whose sum is equal to k.

``````Input: arr[] = {2, 4, 6, 10, 2, 1}, K = 12
Output: 2
``````

Explanation:
All possible subarrays with sum 12 are `{2, 4, 6}` and `{10, 2}`.

``````Input: arr[] = { 1, 2, 4, 3, 2, 4, 1 }, K = 7
Output: 2
``````

## Find smallest \$N\$ such that \$x/2^Nin[0,1]\$ (in python)

Assume $$x≥0$$. Find smallest $$N$$ such that $$x/2^Nin[0,1]$$

I want to write a while loop which gives me the smallest $$N$$ such that $$x/2^N$$ is in the interval $$[0,1]$$

## What is the smallest time/space complexity class for which no sparse language is hard?

For example, whether there exists $$mathsf{PSPACE}$$-hard sparse language an open problem, as it is not yet known whether polynomial hierarchy collapses.

But is it a solved problem for larger complexity classes like $$mathsf{EXP}$$ or $$mathsf{PR}$$? What is the smallest complexity class (that is larger than $$mathsf{PSPACE}$$) for which it is a solved problem?

## Smallest ideal of an element in a non commutative ring

Let $$A$$ be a non commutative ring and $$a in A$$. Which is the smallest ideal containing $$a$$?

## arithmetic – Find the smallest insertable number

Let’s say a number $$n$$ is insertable if for every digit $$d$$, if we insert $$d$$ between any two digits of $$n$$, then the obtained number if a multiple of $$d$$.
For example, $$144$$ is not insertable because $$1474$$ is not divisible by $$7$$.

The question is the find the smallest insertable positive integer with at least two digits.

It is relatively easy to see that such a number have to be divisible by $$2520$$. I also ran a script to check all integers below 75,000,000,000 with no success.

Disclaimer. I do not know if such a number do exist.

## ag.algebraic geometry – Generalization of: The dimension of a projective \$mathbb{F}\$-variety equals the smallest codimension of a disjoint linear subspace

Let $$mathbb{F}$$ be an algebraically closed field. Consider the following definition of the dimension of a (quasi)projective $$mathbb{F}$$-variety, given in Harris Algebraic Geometry: A First Course:

It seems nonstandard to take this as the definition of a variety, so I will think of this as a theorem that should be proven from a more conventional definition of dimension, e.g. the Krull dimension.

My question is this: Does Definition 11.2 generalize to structures other than a variety over an algebraically closed field? For example, what if $$mathbb{F}=mathbb{R}$$? Or $$X$$ is a manifold embedded in projective space? In these cases, does the dimension of $$X$$ still agree with the smallest codimension of a disjoint linear subspace?

Note that Definition 11.2 holds when the “irreducible” assumption is dropped, so this small generalization does hold.

## What is the smallest time/space complexity class that is known to contain complxity class \$mathsf{SPARSE}\$

Is it known if complexity class of all sparse languages is contained within e.g. $$mathsf{EXP}$$ or $$mathsf{EXPSPACE}$$? Or what is the smallest time or space complexity class that contains complexity class $$mathsf{SPARSE}$$?

## Which screen resolution (Largest or smallest) is best for developer hand-offs?

I am currently designing a web app to cater for the following screen resolutions:

1. 1920 x 1080
2. 1600 x 864
3. 1366 x 768

I’m wondering:

• Which is the default/primary resolution I should design in for developer hand-offs. (It’s a huge web app and I can’t possibly replicate it in all the resolutions.)
• What trade-offs am I making, or what precaution should I take if I select 1 resolution over another. (I’m currently inclined to design in 1366×768 since it’s easier for developer to imagine scaling up)