Decide whether two strings $x, y$ can be split into substrings $a,b,c$ such that $x=abc$ and $y=cba$

What is the fastest algorithm for the following problem?

Given two strings $ x, y \in \Sigma^*$ as input, decide whether there exists strings $ a, b, c \in \Sigma^*$ , such that $ x=abc$ and $ y=cba$ .

By calculating all the length of the longest common prefix of $ s = x$ y$ and all suffixes of $ s$ , we can compute all candidates for $ a$ in $ O(n)$ time.

For each candidate of $ a$ with length $ k$ , we now just need to check whether $ x_k, x_{k + 1}, \ldots, x_{n}$ is a rotation of $ y_0, y_1, \ldots, y_{n – k}$ . This can of course be done in $ O(n)$ .

However checking the rotations naively results in a worst-case $ O(n^2)$ algorithm.

It seems that using the result from either https://arxiv.org/pdf/1601.08051.pdf or https://arxiv.org/pdf/1311.6235.pdf would make the algorithm run in expected $ O(n)$ time.

Is there a simpler way of speeding up the rotation checking, where it is still faster than $ O(n^2)$ ? Is there a way of making it deterministic, so that it still runs in $ O(n)$ time?

How to prevent players from metagaming when they split the party?

Let’s say that I have a group of 4 players. During the game they decide to split for some reason (e.g. one group goes shopping, the other goes to the tavern).

Now let’s say that the group in the tavern gets into a fight and ends up being kidnapped. At the same time, they can see where are they taken, but the second group should have no idea of such event happening or where they’re being taken.

What should I do in this case? Players who went shopping might (even unintentionally) use the information about the event, if I were to openly talk about that. What should I do? Should I simply prevent splitting the party from ever happening?

Grid Puzzle Split Algorithm

What could be the best approach to divide an $ N\times N$ grid into $ N$ groups having $ N$ tiles each? Is there a well-known algorithm to create a random puzzle of this type? I could not find a direct answer on the net. Max grid size will be 10×10. Below is an example for 5×5 grid.

enter image description here

How does the Split feature of Ooze creatures interact with buffs or debuffs? [duplicate]

Bart the Bard is fighting against three Black Puddings.

Bart casts Bane to protect himself from their attacks, which all three fail.

Bart then sends a lightning bolt through all three. Unfortunately, Black Puddings have the Split feature:

Split. When a pudding that is Medium or larger is subjected to lightning or slashing damage, it splits into two new puddings if it has at least 10 hit points. Each new pudding has hit points equal to half the original pudding’s, rounded down. New puddings are one size smaller than the original pudding.

They split into 6 medium-sized Black Puddings.

Which (if any) of those 6 Black Puddings are affected by Bane?

Can a player split up attacks like they can movement?

I didn’t think so, but I’ve read a couple postings elsewhere that make me think otherwise.

Ex. A fighter with ‘Extra Attack’ from the PHB:

Beginning at 5th level, you can attack twice, instead of once, whenever you take the Attack action on your turn.

To me, both attacks would be during the same attack action, so the fighter could move 10′, attack twice, then keep moving, since you can split up movement.

But, could they move, attack once, let’s say the opponent goes down, then move to another opponent and use their second attack?

Is a split button valid without proper visual grouping

Split button is basically a button with a default action and several other actions which are shown in a drop-down menu.

While there’s no doubt in how it functions, the issue is with how the default-action and more-actions icon should be highlighted in UI.

I have created basic variations of split buttons in below codepen.

https://codepen.io/paulj05hua/full/PooayrP

In the above, both styles 1 & 2 are properly highlighted as a single group. But with style 3 user might mistake the more-actions arrow as separate button.

So the question is whether style 3 is valid or not ?

PS:

  • style 3 is used by Gmail in the mail list panel for selecting emails

    gmail-split-button-usage

    If this is considered valid, kindly state the reason.

  • There’s no mention of this type of component in material design ( material.io )

To Split or Not to Split: Should I split one website into multiple?

I have a website that's been around for over 13 years built on WordPress. Let's say it's about video games (it's not but it will serve as an analogy.) It's a news and reviews website – not a store or business. Revenue is all from ads. DA 61, for reference on age/size/popularity.

tl;dr: Is it OK to split an old website into multiple new ones (splitting off a new niche from the old general site), copy over the posts related to the new niche, and 301 redirect the old posts to the new…​

To Split or Not to Split: Should I split one website into multiple?