complexity theory – Dividing students into 4 groups based on preferences is NP-complete

Given a set of students $H$ of size $n$, and a set $E subseteq H times H $ of pairs of students that dislike each other, we want to determine whether it’s possible to divide them into $4$ groups such that:

  • no two students that dislike each other end up in the same group,
  • the size of each group must be at least $frac{n}{5}$.

I want to prove that this problem is NP-complete. I suspect that I could use the NP-completeness of the independence set problem, yet I have some problems with finding an appropriate reduction.

Let $G = (H, E)$ an undirected graph – each edge represents two students that dislike each other.

For the groups to be of the required size, their size must be $k in left (frac{n}{5}, frac{2n}{5} right ) cap mathbb{N}$. I could then try checking whether there is an independence set of size $k$ (which would mean there are $k$ students that potentially like each other), remove its vertices, and repeat for the next $k$. However, I don’t think this would result in a polynomial number of size combinations.

Do you have any advice on constructing this reduction?

How do I shorten my Rust code to get integer values from regex named capture groups?

I am completely new to rust. My first rust code is simple text filter application for parsing log file and accumulating some information. Here is my code:

//use std::io::{self, Read};
use std::io::{self};
use regex::Regex;

fn main() -> io::Result<()> {
    let re_str = concat!(
        r"^s+(?P<qrw1>d+)|(?P<qrw2>d+)",//qrw 0|0
        r"s+(?P<arw1>d+)|(?P<arw2>d+)",//arw 34|118
    let re = Regex::new(re_str).unwrap();
    //let mut buffer = String::new();
    //io::stdin().read_to_string(&mut buffer)?;
    let buffer = " 0|1 2|3n 4|5 6|7n 8|9 10|11n";

    let mut lines_skipped = 0;

    let mut m_qrw1:i32 = 0;
    let mut m_qrw2:i32 = 0;
    let mut m_arw1:i32 = 0;
    let mut m_arw2:i32 = 0;

    for line in buffer.lines() {
        match re.captures(line) {
            Some(caps) => {
                // I would like to shorten these long lines =>
                let qrw1 ="qrw1").unwrap().as_str().parse::<i32>().unwrap();
                let qrw2 ="qrw2").unwrap().as_str().parse::<i32>().unwrap();
                let arw1 ="arw1").unwrap().as_str().parse::<i32>().unwrap();
                let arw2 ="arw2").unwrap().as_str().parse::<i32>().unwrap();
                if qrw1 > m_qrw1 {m_qrw1 = qrw1}
                if qrw2 > m_qrw2 {m_qrw2 = qrw2}
                if arw1 > m_arw1 {m_arw1 = arw1}
                if arw2 > m_arw2 {m_arw2 = arw2}
            None => {
                lines_skipped = lines_skipped + 1;
    println!("max qrw1: {:.2}", m_qrw1);
    println!("max qrw2: {:.2}", m_qrw2);
    println!("max arw1: {:.2}", m_arw1);
    println!("max arw2: {:.2}", m_arw2);



This works as expected, but I think those long chained calls which I created to get integer values of regex named capture groups are a bit ugly. How do I make them shorter/more in idiomatic rust style? I’ve got an advice to use ? operator instead of unwrap calls but I’m not sure how to apply it in this case.

Relations between quantum groups at roots of unity, modular representation theory, and physics

I understand that quantum groups at roots of unity are related to physics because they are used in the construction of Reshetikhin-Turaev invariants, conjectured by Witten. Are there other relations of quantum groups at roots of unity to physics? Also, modular representation theory of Lie algebras is related to quantum groups at roots of unity via Andersen-Jantzen-Soergel (Lusztig’s conjecture). Modular representation theory is a very active area of research, and I am wondering if there are relations between results/questions in this area and physics.

Trump classified the antifa as a terrorist group, but didn’t he classify the white supremacist groups as terrorist groups?

Because he is a far-right white wealthy Christian conservative pig who hates LGBTQ+s, non-Christians, non-whites and poor people. He loves homophobic people, misogynistic people, neo-Nazis, white supremacists and white wealthy people. Far-right white poor people are only used as useful idiots and puppets.

coalgebras – This is a problem about infinite order permutation groups

That’s the problem :let A be an infinite set.let D be the subgroup of Permutation group of A which move only a finite number of elements of A and let A be the set of all elements x∈D such that acts as an even permutation on the finite set of points it moves.prove that A is an infinite simple group.
My confusion :Prompted me to prove that each pair of elements of D is in a finite simple group of D.I think this means that every element in the D is in a finite single group of D and I think the finite single group will be an alternating group.But isn’t there a odd permutation in D

availability groups – SQL Server 2019 Always On using Distributed Network Name

We’re running a couple SQL servers in Azure that are set up with an Always On availability group and Windows Failover Clustering. The servers are Windows 2019 and we’re running SQL Server 2019. When we set up the cluster, it was set up to use a Distributed Network Name instead of a static cluster IP address. Thanks to this we shouldn’t need an internal load balancer according to these notes:

I’m struggling to understand exactly how this works though. Based on what I read, it seems like our connection strings will point to the DNS name of the cluster (let’s call it AgCluster). If I look in DNS, there is an A record for AgCluster pointing to sql1 and another pointing to sql2. When I use AgCluster in my connection string it seems to always connect me to the primary server, even if I have ApplicationIntent=ReadOnly set. When I query @@SERVERNAME I always get the same server.

So with the Distributed Network Name setup, what should I use in my connection strings to make sure read/write queries go to the primary and read only go to a secondary? Any guides on setting this up in general would be helpful. Thanks!

macos – It seems to take far too long to unlock the “Users & Groups” setting on Mojave than was the case for High Sierra

This has bugged me from the time I did the first upgrade to Mojave (revision 3) under advice not to upgrade from High Sierra when Mojave was first released. I have tried several resets and even a clean install (I’m now on 10.14.6). Compared to High Sierra, it seems to take as long as 3 – 4 minutes to unlock but (without actually having measured it) HS might have only been a minute or so. Even the login at boot time it seems to take longer and I have to type more slowly type in my login than I used too!
I would appreciate please if anyone can provide any suggestion that might help. I have tried already quite a few discussion groups for answers but many refer to other OS’s and other situations not related to mine specifically. I can provide more info if needed.

ag.algebraic geometry – Semisimplicity for tensor products of representations of finite groups

Let $G$ be a group and $k$ a field of characteristic $p>0$. Let $$rho_i: Gto GL(V_i),~ i=1,2$$ be two finite-dimensional semisimple $k$-representations of $G$, with $dim(V_1)+dim(V_2)<p+2.$ Then a 1994 theorem of Serre tells us that $rho_1otimesrho_2$ is semisimple.

I was wondering—is there is an easier proof in the case that $G$ is finite?

Specializing Serre’s proof to the case of finite groups seems not to yield any real simplification; one has to apply the so-called saturation technique to replace the subgroup of $G$ generated by elements of order a power of $p$ by a linear-algebraic group.

I suspect the answer is “no” — it seems to me that the general case reduces to the case of finite groups (by a spreading out and specialization argument), so it’s hard to believe this case could be substantially easier — but I figured it was worth asking. I’d also be interested in a proof with worse bounds, e.g. with $p+2$ replaced by any increasing function of $p$.

permutations – Combinatorics – how many ways to divide balls in two groups

Suppose I have:

  • 8 black balls
  • 3 white balls
  • 5 blue balls

how many ways there are to divide those balls in two different groups (note that there is no need to divide in two groups with even number of balls, one group could have 1 e the other 15).

In my first attempt I did this:
$${ 16! over (3!cdot 5!cdot 8!) } cdot 17$$

The number of permutations times de number of ways to divide into to two groups. After some time I conclude this is wrong because it over calculate the permutations inside which group.

My second attempt I wrote this:

$$ sum_{i=0}^{16} {16 choose i} $$

And again wrong, I figure out that I can’t handle like having more than one ball per color. I hope this isn’t too confusing and if anyone can help me it would be very helpful.