Problem Detail: Let $G=(V,E)$ which is undirected and simple. We also have $T$, an MST of $G$. We add a vertex $v$ to the graph and connect it with weighted edges to some of the vertices. Find a new MST Read More …
Author: ignougroup
[Solved]: What’s the purpose of ANDing a bit mask with all bits set to a value?
Problem Detail: I’m adapting an algorithm for calculating a CRC 16-bit CCITT (XModem) value from an ASCII input. I’ve found some code here. I’m using the function the poster has in his question, but I’ve noticed at the bottom he does Read More …
[Solved]: Structure of a Pumping Lemma proof: contradiction or counterexample?
Problem Detail: This site is full of Pumping Lemma questions, and I do admit I’ve not read them all. I’ve tried some proofs myself and they seem to work, but I can’t find anywhere what is the (general) exact structure of Read More …
[Solved]: Construct a context-free grammar for a given set of words
Problem Detail: I have seen a few years back a nice and simple algorithm that, given a (finite) set of words in some alphabet, builds a context-free grammar for a language including these words and in some sense “natural” (e.g., the Read More …
[Solved]: Balance factor changes after local rotations in AVL tree
Problem Detail: I try to understand balance factors change after local rotations in AVL trees. Given the rotate_left operation: x y’ / / a y => x’ c / / b c a b and $b(x)$, $b(y)$ – balance factors for Read More …
[Solved]: What would dynamically-typed languages actually do if type enforcement was removed?
Problem Detail: I program in Python, which is a well-known dynamically typed language. I understand dynamic typing to mean mainly that “operations” (in a loose sense) in the language are either allowed or denied (raise an exception) based on the type Read More …
[Solved]: CoNP and NPhard intersection
Problem Detail: Can a problem be both NP-Hard and CoNP? Can a problem be both NP and CoNP-Hard? Asked By : Turbo Answered By : Peter Shor There is a problem which is both NP-hard and in coNP if and only if NP Read More …
[Solved]: $log^*(n)$ runtime analysis
Problem Detail: So I know that $log^*$ means iterated logarithm, so $log^*(3)$ = $(loglogloglog…)$ until $n leq 1$. I’m trying to solve the following: is $log^*(2^{2^n})$ little $o$, little $omega$, or $Theta$ of ${log^*(n)}^2$ In terms of the interior functions, $log^*(2^{2^n})$ Read More …
[Solved]: Subgraph isomorphism in planar graphs
Problem Detail: I’m a computer engineer trying to understand this Eppstein paper for matching subgraphs in planar graphs. I’m trying to find subgraph matches to map an application graph (the subgraph) to a network-on-chip (the large graph). I have already implemented Read More …
[Solved]: this automata is NFA or DFA?
Problem Detail: That’s my question, since it has two symbols but go to a single state, is DFA or NFA? Asked By : Teo Answered By : Yuval Filmus First of all, every deterministic finite automaton is a fortiori a non-deterministic finite Read More …