Problem Detail: In short: how are type systems categorised in academic contexts; particularly, where can I find reputable sources that make the distinctions between different sorts of type system clear? In a sense the difficulty with this question is not that Read More …
Category: Uncategorized
[Solved]: How to go from a recurrence relation to a final complexity
Problem Detail: I have an algorithm, shown below, that I need to analyze. Because it’s recursive in nature I set up a recurrence relation. //Input: Adjacency matrix A[1..n, 1..n]) of an undirected graph G //Output: 1 (true) if G is complete Read More …
[Solved]: Time complexity based on two variables
Problem Detail: Suppose we have a function based on two inputs of length $m,n$. Therefore the time complexity of the function is calculated by $T(m,n)$. Suppose that we have: $T(m,c)in O(m^2)$ for any constant $c$. $T(c’,n)in O(n^2)$ for any constant $c’$. Read More …
[Solved]: Get the running time of forest disjoint sets
Problem Detail: If you have a forest implementation of disjoint sets, and have the union by weight/rank heuristic where you append the smaller one. Then why is the worst case running time Θ(m log n)? (m is the number of disjoint Read More …
[Solved]: What does this definition of a Primary key mean?
Problem Detail: My text book gives the following definition of a primary key in a relational database, which I don’t entirely understand. Help would be greatly appreciated. Let $R$ be a relation. Then the primary key for $R$ is a subset Read More …
[Solved]: Non-deterministic Turing machine and palindromes
Problem Detail: I have to design a Non-deterministic Turing machine that accepts only non-palindromes in $NTime(nlog n)$. I think this would be easy on a 2-tape DTM. Simply copy the string onto the second tape – $O(n)$ time – and then Read More …
[Solved]: Is Logical Min-Cut NP-Complete?
Problem Detail: Logical Min Cut (LMC) problem definition Suppose that $G = (V, E)$ is an unweighted digraph, $s$ and $t$ are two vertices of $V$, and $t$ is reachable from $s$. The LMC Problem studies how we can make Read More …
[Solved]: Prove that the language of unary not-prime numbers satisfies the Pumping Lemma
Problem Detail: Here is a question from Daniel I. A. Cohen’s book Introduction to Computer Theory: Consider the language: $quad mathrm{PRIME}’ = { a^n mid n text{ is not a prime} } = { varepsilon, a, aaaa, aaaaaa, aaaaaaaa, ldots }$ Read More …
[Solved]: Build a regular grammar for a regular language
Problem Detail: The language considered is the infinite set of all chains that meet the following conditions. Conditions: 1) They consist of symbols from the set {1,a,b}. 2) They always start with the subchain ‘1a’. 3) They always include at least Read More …
[Solved]: Proving that $A vee (neg A wedge B) equiv A vee B$
Problem Detail: I’m reading a book at the moment about logic gates and Boolean simplification. There is a part which I can’t seem to follow. I can easily work out that $A vee (neg A wedge B) equiv A vee B$ Read More …