## What happens when a banished creature would return to an extradimensional space that no longer exists?

Consider the following scenarios.

### 1. Banished from a portable hole, portable hole is destroyed.

A portable hole is described as a ten foot deep, six foot diameter extradimensional space. Suppose I jump into my portable hole after spreading it out on the ground, and I am followed by an enemy. Once we are both inside my portable hole, I cast banishment:

If the target is native to a different plane of existence than the one you’re on, the target is banished with a faint popping noise, returning to its home plane. If the spell ends before 1 minute has passed, the target reappears in the space it left or in the nearest unoccupied space if that space is occupied. Otherwise, the target doesn’t return.

My enemy is banished to its home plane. Next, I climb out of my hole, get a safe distance away, and toss in my bag of holding:

Placing a bag of holding inside an extradimensional space created by a handy haversack, portable hole, or similar item instantly destroys both items and opens a gate to the Astral Plane.

The portable hole is destroyed, and finally I break my concentration on banishment before the full minute has passed.

### 2. Banished from a rope trick right before the spell ends.

Rope trick says:

an invisible entrance opens to an extradimensional space that lasts until the spell ends. […] Anything inside the extradimensional space drops out when the spell ends.

So I cast rope trick while I’m being chased, and my pursuer pursues me into my little rope trick room, where I am patiently holding banishment. I banish my pursuer, climb out of my rope trick room, and and cast dispel magic on the rope:

Choose one creature, object, or magical effect within range. Any spell of 3rd level or lower on the target ends.

Again, no space to return to as I break my concentration on banishment before the one minute is up.

What happens to the banished creature when banishment ends? Banishment is very specific that the creature returns to the space it left from. Both the actual extradimensional space and the 5 foot square space the creature previously occupied is gone, as well as all nearest unoccupied spaces. What happens?

## Can Lightning Lure pull a creature through a friendly or enemy creature’s space?

An enemy creature is 10 feet away from the caster. Right next to the creature is another enemy or friendly creature. Can Lighting Lure pull the target creature through the other creature’s space, and into the empty space next to the caster?

## What happens when allies occupy the same space?

According to “Moving Around Other Creatures” (PH p. 191 / SRD p. 92):

You can move through a nonhostile creature’s space. […] another creature’s space is difficult terrain for you. Whether a creature is a friend or an enemy, you can’t willingly end your move in its space.

So it’s possible for Alice to move into an ally’s space, attack from there, then move out, the only penalty being that the ally’s space counts as difficult terrain to enter.

If an enemy adjacent to the ally’s space has readied a grapple against Alice and is successful, then Alice (unwillingly) ends her move in her ally’s space.

Do allied characters in the same space suffer any negative effect?

Now the rest of Alice’s allies do the same thing.

Is there a limit to the number of characters that can be stacked on a space?

What if Alice’s ally was the one with the readied grapple?

Can you stack an ally on your space by readying a grapple to prevent them from leaving?

## Space complexity of using a pairwise independent hash family

I’m trying to analyze the space complexity of using the coloring function $$f$$ which appears in "Colorful Triangle Counting and a MapReduce Implementation", Pagh and Tsourakakis, 2011, https://arxiv.org/abs/1103.6073.

As far as I understand, $$f:[n] \rightarrow [N]$$ is a hash function, that should be picked uniformly at random out of a pairwise independent hash functions family $$H$$. I have a few general questions:

1. Does the space complexity required by $$f$$ is affected by the fact that $$H$$ is $$k$$-wise independent? Why? (if it does, then also- how?)
2. What do we know about $$|H|$$? What if $$H$$ is $$k$$-wise independent?
3. Is there a more space-efficient way to store $$f$$ than storing an $$N \times m$$ matrix that maps each vertex to its color, using O($$N m$$) storage words?
4. Does the total space complexity which is required in order to use $$f$$ as described in the paper is $$|H| \cdot O(\text{space complexity of } f)$$?

Best regards

## Analyzing space complexity of passing data to function by reference

I have some difficulties with understanding the space complexity of the following algorithm. I’ve solved this problem subsets on leetcode. I understand why solutions’ space complexity would be O(N * 2^N), where N – the length of the initial vector. In all those cases all the subsets (vectors) are passed by value, so we contain every subset in the recursion stack. But i passed everything by reference. This is my code:

class Solution { public: vector<vector<int>> result; void rec(vector<int>& nums, int &position, vector<int> &currentSubset) {     if (position == nums.size()) {         result.push_back(currentSubset);         return;     }          currentSubset.push_back(nums[position]);     position++;     rec(nums, position, currentSubset);     currentSubset.pop_back();     rec(nums, position, currentSubset);     position--; }  vector<vector<int>> subsets(vector<int>& nums) {     vector <int> currentSubset;     int position = 0;     rec(nums, position, currentSubset);     return result; } }; 

Would the space complexity be O(N)? As far as i know, passing by reference doesn’t allocate new memory, so every possible subset would be contained in the same vector, which was created before the recursion calls.

I would also appreciate, if you told me how to estimate the space complexity, when working with references in general. Those are the only cases, where i hesitate about the correctness of my reasonings.

Thank you.

## Regarding space of linear speed-up theorem

I was reading the proof of speed-up lemma from this slide (page 10 to 13) but I could not understand why the plus two factor appears in the new space bound. Would anybody elaborate?

Furthermore for a Turing machine that uses a linear amount of space, isn’t it possible to reduce the amount of space used by a constant factor without additional constant overhead? (i.e. to have only the εf(n) part as the new space)

Theorem: Suppose TM M decides language L in space f(n). Then for any ε > 0, there exists TM M’ that decides L in space εf(n) + 2.

## How does the Dimensional Loop’s Fold Space ability interact with areas of effect?

The magic item Dimensional Loop (Acquisitions Incorporated, pg. 220) has an ability called Fold Space which says:

Choose a space you can see within 60 feet of you (no action required). You treat that space as if it were within 5 feet of you until the end of your turn. This allows you to move immediately to that space without provoking opportunity attacks, or to interact with objects or creatures in that space as though they were next to you (including allowing you to make melee attacks into that space).

Suppose Jim Darkmagic is having a dual with another mage, and they are 50 feet apart. The mage uses its action to hold a fireball spell until he sees Jim casting a spell. On Jim’s turn, he uses the Fold Space ability of his Dimensional Loop and chooses the space the mage is occupying. Until the end of Jim’s turn, the mage’s space is treated as if it were within 5 feet of Jim. Next Jim starts casting inflict wounds on the mage. Seeing this, the mage uses his reaction to cast fireball centered directly on Jim.

Is the mage considered to be within the area of effect of his own fireball?

Similarly, does Jim need to be wary of casting his own fireball on the mage until next turn?

## Uniform Hashing. Understanding space occupancy and choice of functions

I’m having troubles understanding two things from some notes about Uniform Hashing. Here’s the copy-pasted part of the notes:

Let us first argue by a counting argument why the uniformity property, we required to good hash functions, is computationally hard to guarantee. Recall that we are interested in hash functions which map keys in $$U$$ to integers in $$\{0, 1, …, m-1\}$$. The total number of such hash functions is $$m^{|U|}$$, given that each key among the $$|U|$$ ones can be mapped into $$m$$ slots of the hash table. In order to guarantee uniform distribution of the keys and independence among them, our hash function should be anyone of those ones. But, in this case, its representation would need $$\Omega(log_2 m^{|U|}) = \Omega(|U| log_2 m)$$ bits, which is really too much in terms of space occupancy and in the terms of computing time (i.e. it would take at least $$\Omega(\frac{|U|log_2 m}{log_2 |U|})$$ time to just read the hash encoding).

The part I put in bold is the first thing is confusing me.

Why the function should be any one of those? Shouldn’t you avoid a good part of them, like the ones sending every element from the universe $$U$$ into the same number and thus not distributing the elements?

The second thing is the last "$$\Omega$$". Why would it take $$\Omega(\frac{|U|log_2 m}{log_2 |U|})$$ time just to read the hash encoding?

The numerator is the number of bits needed to index every hash function in the space of such functions, the denominator is the size in bits of a key. Why this ratio gives a lower bound on the time needed to read the encoding? And what hash encoding?

## Half dollar hosting-cPanel-Unlimited Web Space & Bandwidth.

Hostpoco.com offers cPanel based linux half dollar per month Hosting services included with all standard features like unlimited web space & bandwidth.Our main intention is to work against traditional hosting firms who are charging more than the expectation against small requirements of beginners and indirectly help clients to save their money.

*Our Half Dollar Hosting and Features:
~ Single Domain Hosting
~ Unlimited Web Space
~ Unlimited Bandwidth
~ 10 Email Accounts
~ 2 Parked Domains
~ 2 MySQL Databases
~ 10 Sub Domains
~ FREE cPanel Control Panel
~ FREE AwStats
~ FREE Auto SSL
~ FREE Virus Scanner
~ DDOS Protection
~ 99.99% uptime
~ Softacolous Supported
~ Tier 1 Technical Support

Hostpoco.com: Shared HDD/SSD Hosting | Reseller Hosting | VPS Hosting | Dedicated Hosting | Domain Registration | Web Designing | Logo Designing & SSL certificate Services.

Thank You.