## Partition into pairs with minimum absolute difference, NP-hard?

I have a set $$S$$ of an even number of positive elements $$2m$$ and $$m$$ values $$t_1,t_2,\ldots,t_m$$ where each $$t_i\leq1$$ for all $$i$$.

The question is: can you select $$m$$ pairs $$(a_i,b_i)$$ from $$S$$ such that $$|a_i-b_i|\geq t_i$$?

I was trying to prove that this problem is NP-hard by a reduction from 3-Partition Problem. I failed because if I choose the numbers as in 3-partition I cannot guarantee that their absolute difference is at least $$t_i$$.

Do you have any hints?

## How is an EFI partition secure?

I realise that similar questions have been asked before regarding the EFI System Partition, but I just cannot seem to get my head around this, or indeed get a direct answer.

When I boot into Linux, my files are protected, albeit in a basic manner, by permissions. The same is true of Windows, and of course most modern O.S.

However, the ESP uses a FAT filesystem, which can easily be mounted, and in Linux’ case is mounted, and can therefore be very easily messed with.

Why? Just why? How can this be considered safe? Any user of a system can play with the ESP and do whatever they like. It seems to defeat any and all sensible security measures.

I am aware of Secure Boot and key signing, of course, but that has to be enabled to be useful. Nonetheless the ESP is still FAT and can still be messed with, possibly bricking (to an ordinary end user) the system.

Or am I missing something? I really do feel like I’m the only person not “getting” this at all.

## Partition a multiset into pairs that sum up to given numbers?

Given a multiset of $$2m$$ positive numbers, $$S=\{s_1,s_2,\ldots,s_{2m}\}$$ and given $$m$$ targets $$t_1,t_2,\ldots,t_m$$. Can we partition $$S$$ into $$m$$ pairs $$(a_i,b_i)$$ such that $$a_i+b_i=t_i$$, where $$a_i\ne b_i$$ and $$a_i,b_i\in S$$?

For example for $$S=\{1,4,6,1,2,5\}$$ and $$t_1=7$$, $$t_2=t_3=6$$. The answer is YES and the pairs are $$(1,6)$$, $$(2,4)$$, and $$(1,5)$$.

## Equal partition up to one integer

In the partition problem, a set of positive integers has to be partitioned into two subsets with an equal sum. This problem is known to be NP-hard. But the following variant is easy:

Partition a set of integers into two subsets, such that the difference between their sums is at most the largest integer.

A solution always exists, and can be found using the following algorithm:

• Order the integers by descending value.
• Put the largest integer in subset A, the second in subset B, the third in subset A, etc.

The sum in subset A is always at least as large as the sum in subset B, but if we remove the largest integer from subset A, then the sum in subset B is at least as large as the remainder. Hence, the partition is equal up to one integer.

MY QUESTION IS: what happens when there are cardinality constraints on the subsets? For example, suppose there are $$4 m$$ integers, subset A must contain $$m$$ and subset B must contain $$3 m$$ integers. The algorithm above does not work, and indeed an equal partition up-to-one-integer may not exist. What is an algorithm to decide whether such a partition exists?

## Polynomial-time algorithm for Clique partition

Reductions for showing algorithms. The following fact is true: there is a polynomial-time algorithm BIP that on input a graph 𝐺 = (𝑉 , 𝐸) outputs 1 if and only if the graph is bipartite: there is a partition of 𝑉 to disjoint parts 𝑆 and 𝑇 such that every edge (𝑢, 𝑣) ∈ 𝐸 satisfies either 𝑢 ∈ 𝑆 and 𝑣 ∈ 𝑇 or 𝑢 ∈ 𝑇 and 𝑣 ∈ 𝑆. Use this fact to prove that there is polynomial-time algorithm to compute that following function CLIQUEPARTITION that on input a graph 𝐺 = (𝑉 , 𝐸) outputs 1 if and only if there is a partition of 𝑉 the graph into two parts 𝑆 and 𝑇 such that both 𝑆 and 𝑇 are cliques: for every pair of distinct vertices 𝑢, 𝑣 ∈ 𝑆, the edge (𝑢, 𝑣) is in 𝐸 and similarly for every pair of distinct vertices 𝑢, 𝑣 ∈ 𝑇 , the edge (𝑢, 𝑣) is in

## Extend my “/” EXT4 partition

I am trying to extend the EXT4 file system with “/” as mounting point. The problem is I can’t move the unallocated free space to that file system. Additionally, I can extend the other EXT4 file although it’s near the unallocated space.enter image description here

## Extend my “/” EXT4 partition

I am trying to extend the EXT4 file system with “/” as mounting point. The problem is I can’t move the unallocated free space to that file system. Additionally, I can extend the other EXT4 file although it’s near the unallocated space.enter image description here

## Extend my “/” EXT4 partition

I am trying to extend the EXT4 file system with “/” as mounting point. The problem is I can’t move the unallocated free space to that file system. Additionally, I can extend the other EXT4 file although it’s near the unallocated space.enter image description here

## Can’t boot windows after deleting Ubuntu partition?

Linux newb.
A while ago I ran Ubuntu from a usb to test out some stuff. I now need Ubuntu so wanted to install it properly.
On windows 7 I deleted the partition that would’ve contained Ubuntu (only one without nstf) and then tried resizing my C: drive to make space for Ubunutu.
I then had to restart my pc. When I did it loaded to grub rescue. I haven’t been able to figure this out from here.
I got Ubuntu running on the usb again but can’t get the partitioning to work right (I think)
I can’t lose my windows data and want dual boot.