## building a polynomial algorithm that solves SAT when given a polynomial TM that solves SAT on two formulas

Here’s the question:

Assume there exists a polynomial time machine $$M$$ that receives two formulas $$\varphi_1,\varphi_2$$ and satisfies the following:

• If $$\varphi_1 \in \mathrm{SAT}$$ and $$\varphi_2 \notin \mathrm{SAT}$$, then $$M(\varphi_1,\varphi_2)=1$$
• If $$\varphi_1 \notin \mathrm{SAT}$$ and $$\varphi_2 \in \mathrm{SAT}$$, then $$M(\varphi_1,\varphi_2)=0$$

Show that there also exists a polynomial time algorithm for SAT.

Note that we have no guarantee for the output of $$M(\varphi_1,\varphi_2)$$ whenever $$\varphi_1,\varphi_2$$ are both satisfiable (or when both are not).

Can I get any hint on how to start the solution?

## Optimal algorithm for building raises in 7th Sea?

I’m writing a Discord bot for an online 7th Sea campaign. Players will type something like

roll finesse 4 + weaponry 3 + 1

and the bot will spit out something like

3 raises (9+2, 8+3, 6+4, leftover 5)

The hard part is grouping the dice into raises. I would like to do this automatically. Is there a known optimal algorithm for this? I played around with a straightforward greedy approach, but I’m not convinced that it is optimal in all cases. The algorithm I’m using now is:

2. Repeatedly add the largest die that will not make the group exceed 10 (or 15, if applicable).
3. If the group isn’t 10 yet, add the smallest die.

I’ve found cases where this “almost” doesn’t produce the optimal outcome, but no actual failures. Still, I’m not completely convinced. Is there any existing research on this?

## rankjester.com – NEW & POWERFUL Link Building Tool

Hello! introducing a new way to build quality backlinks that no one else has.

– Create your OWN templates to use publicly or privately.
– Add as many temnplates as you like.
– Visual logs show you what the rank jester sees.
– Much more head over to: https://www.rankjester.com/

Regards

## Building a perfect hashing table

My understanding is that one way to build a perfect hash, as per CLRS, is to use two levels of hashing, with universal hashing functions at each level.

More specifically, CLRS shows that assuming $$n$$ is the total number of keys, and $$n_j$$ the number of keys hashed to the value $$j$$ for the second level, we can then make $$m=n$$ and $$m_j=n_j^2$$ to guarantee that the expected number of collisions is < 1/2 in the second level.

However, as far as I understand, collisions are still possible in this second level, so to truly have no collisions in this 2nd level, one may need to try a few hash functions in this level for each value of $$j$$.

Is my understanding correct? If so, CLRS does not seem to elaborate much on this algorithm. Is it fair to assume that a simple sequence of random “try and error” (i.i.d sampling) of hash functions in this 2nd level is “as good as it gets” for this perfect hashing design?

## Is destructuring a heap (taking down a heap) also O(n) like building a heap? If so, can the selection problem be solved by this method in O(n) time?

If we can build up a heap with time O(n), can we take down a heap also by O(n)? (by delete-max repeatedly).

Intuitively, it may feel it is, because it is like the reverse of build it up.

If building a heap is O(n) in the worst case, including the numbers are all adding by ascending order, then taking the heap down is exactly the “reverse in time” operation, and it is O(n), but this may not be the “worst case” of taking it down.

If taking down a heap is really O(n), can’t the selection problem be solved by building a heap, and then taking it down (k – 1) time, to find the kth max number?

## If we started over again in building the Internet, what characteristics that are missing would you want to build in?

How can we again build the Internet, what characteristics are missing would you want to build in?

## Bootstrap & what for building a directory like website ?

Hi guys,

I am not particularly active here because I am more or less capable to find and solve my wordpress/SEO related problems just by googling or searching through these forums but here am I looking for some help.

To make a long story short, I would like to build a "directory" like website similar to "freetechbooks" where users can filter and search for specific items. It is written that "freetechbooks" was build with Bootstrap but isn't Bootstrap front-end CSS framework only and when…

Bootstrap & what for building a directory like website ?

## Building a combat-tanky Warforged Artificer multiclass

I’m trying to figure out the most optimized build for quite a specific setup using a Warforged with multi-class Artificer.

Specifically i’m looking for a character that come across as durable and dangerous in melee combat, while also being able to provide some of the unique quirks Artificers can offer (like infusions, etc). Wanting to play this character as a despondent “jack-of-all-trades” kindof deal that can help out the party by tinkering away on things if asked, but generally is just a close-combat tanky menace.

So, what is the most optimized build assuming the following requirements:

1. Race: Warforged
2. Class: Artificer multi-classed whatever works best to make a decent melee tank (so possibly Fighter or Barbarian? But really whatever works).
3. I’m wanting to be welding a 2-handed-weapon and taking the feat Great Weapon Master, just to help illustrate the characters brutishness (and hopefully allow more damage dealing).
4. For the purposes of this question, lets limit the character to a total of 10 levels.
5. Lets assume stats of 15 across the board (with the Warforged also adding +2 to Con and +1 to something else as normal).

So, with the above requirements, what is the best build one can make to soak up loads damage while also dealing respectable combat damage? And also making use of the Artificer class so that it isn’t a burden to the build.

## Do mounts impact party XP threshold for the purpose of building combat encounters?

The 5e DMG has rules and a process for developing combat encounters of an appropriate level: https://www.dndbeyond.com/sources/dmg/creating-adventures#CreatingEncounters

However, mounts can take actions in combat, e.g. player with a halfling PC mounted on a mastiff could sic the dog onto an enemy, effectively increasing that player’s combat actions.

How should mounts factor into a party’s XP threshold for calculating a budget for use in balancing combat encounters?