instruction stringlengths 35 29.1k |
|---|
Is there a way to reconstruct a binary tree just from its in-order representation?
I've searched the internet, but I could only find solutions for reconstructing a binary tree from inorder and preorder representations, but none for only inorder.
|
I know why and how the push relabel algorithm works for solving the max-flow problem. But why is a global update step required?
|
In terms of asymptotic space and time complexity, what is the most efficient priority-queue?
Specifically I am looking for priority queues which minimize the complexity of inserts, it's ok if deletes are a little slower.
If you're looking for a survey of priority-queues which minimises complexity of deletes over inser... |
Is there a way to create a single edge on a graph that connects 3 or more nodes? For example, let's say that the probability of Y occurring after X is 0.1, and the probability of Z occurring after Y is 0.001, but the probability of Z occurring after both X and Y occur is 0.95. If the probabilities are assigned to each ... |
In this answer it is mentioned
A regular language can be recognized by a finite automaton. A context-free language requires a stack, and a context sensitive language requires two stacks (which is equivalent to saying it requires a full Turing machine).
I wanted to know regarding the truth of the bold part above. Is i... |
So, TSP (Travelling salesman problem) decision problem is NP complete.
But I do not understand how I can verify that a given solution to TSP is in fact optimal in polynomial time, given that there is no way to find the optimal solution in polynomial time (which is because the problem is not in P)?
Anything that might h... |
I am not sure I see it. From what I understand, edges and vertices are complements for each other and it is quite surprising that this difference exists.
Is there a good / quick / easy way to see that in fact finding a Hamiltonian path should be much harder than finding a Euler path?
|
As I was going through the material about the greedy approach, I came to know that a knowledge on matroids (greedoids) will help me approaching the problem properly. After reading about matroids I have roughly understood what matroids are. But how do you use the concept of a matroid for solving a given optimisation pro... |
Show that if $A$ is a context-free language and $B$ is finite, then $A - B$ is a context-free language.
I'm just not sure how to use their properties to formally show this. Thanks for all the help in advance.
|
I am looking for a reference text on applied graph theory and graph algorithms. Is there a standard text used in most computer science programs? If not, what are the most respected texts in the field? I have Cormen et al.
|
I've been looking for a way to represent the golden ratio ($\phi$) base more efficiently in binary. The standard binary golden ratio notation works but is horribly space inefficient. The Balanced Ternary Tau System (BTTS) is the best I've found but is quite obscure. The paper describing it in detail is A. Stakhov, ... |
I just came across an exercise which is to find a regular expression for the following automata, such that the regular expression and the automata generate the same language.
One solution presents the following expression:
$\qquad \displaystyle r_A = a^+b^+(c\mid ca^*b^+)^*$
However, can this be true? I think not, bec... |
I need a super-fast method for ordinary differential equations. Should I use the midpoint method? I need this for a reaction-diffusion system (Gray-Scott).
|
We are given a set of objects, say integers, $S$. In addition, we are given a predicate $P$, for example $P(i): \Leftrightarrow i \geq 0$. We don't know in advance how many elements of $S$ satisfy the predicate $P$, but we would like to sample or choose an element uniformly at random from $S' = \{ i \mid i \in S \wedge... |
Modern SAT-solvers are very good at solving many real-world examples of SAT instances. However, we know how to generate hard ones: for instance use a reduction from factoring to SAT and give the RSA numbers as input.
This raises the question: what if I take an easy example of factoring. Instead of taking two large prim... |
Assume $L$ is a regular language over an ordered alphabet. Is the language built by taking every word in $L$ and sorting it always a regular language?
|
$\newcommand\ldotd{\mathinner{..}}$Given that $A[1\ldotd n]$ are integers such that $0\le A[k]\le m$ for all $1\le k\le n$, and the occurrence of each number except a particular number in $A[1\ldotd n]$ is an odd number. Try to find the number whose occurrence is an even number.
There is an $\Theta(n\log n)$ algorithm:... |
I had written a compiler compiler a few years ago and I'm now cleaning it up, improving it, and turning it into C.
I came across a terminology problem however that I remember in the past I couldn't solve it either.
Imagine an LL(k) stack. In this stack, you may have terminals, that are expected to be matched with the n... |
In a recent CACM article [1], the authors present an implementation for staged functions. They use the term as if it was well-known, and none of the references looks like an obvious introduction.
They give a short explanation (emphasis mine and reference number changed; it's 22 in the original)
In the context of progr... |
I am currently researching for my diploma thesis in computer science with a topic in the area of distributed hash tables. Naturally, I came to the question were the term distributed hash table came from. (I know it is not rocket science to just derive it from distributing a hash table, but somebody somewhere must have ... |
Lets say I have node A that connects to 10 other nodes. 6 of those nodes have Property 1 and the other 4 have Property 2. How can I easily determining the probability of landing on a node with property 1 randomly while traversing the graph?
Abstract Example
To clarify this problem, I'm trying to choose the most probabl... |
Let $f$ be a fixed time-constructable function.
The classical universal simulation result for TMs (Hennie and Stearns, 1966) states that there is a two-tape TM $U$ such that given
the description of a TM $\langle M \rangle$, and
an input string $x$,
runs for $g(|x|)$ steps and returns $M$'s answer on $x$. And $g$ can... |
We know that $\# \textbf{P}$ is closed under polynomial sums, i.e., sum of polynomially many $\# \textbf{P}$ functions is still in $\# \textbf{P}$.
Functions in $\textbf{P}^{\# \textbf{P}}$ are those which make polynomially many (non-parallel) queries to an oracle for a $\# \textbf{P}$-Complete problem. So, the computa... |
Let $M_{1}$ and $M_{2}$ be two (non-deterministic) turing machines accepting the language $L \subseteq \Sigma^{\ast}$.
Is is right to claim that:
$\#M_{1} \in \textbf{#C}$ if and only if $\#M_{2} \in \textbf{#C}$ ?
where $\textbf{#C}$ is a counting complexity class, that is closed under reductions (such as $\textbf{#P}... |
I'm defining an intermediate language for a multi-backend code generator that I'm writing. I want to document the operational semantics for this intermediate language in a way that is readable both from within the source code and generated documentation (ocamldoc). The notation introduced used in "Types and Programmi... |
In Sipser's textbook "Introduction to the Theory of Computation, Second Edition," he defines nondeterministic time complexity as follows:
Let $N$ be a nondeterministic Turing machine that is a decider. The running time of $N$ is the function $f : \mathbb{N} \rightarrow \mathbb{N}$, where $f(n)$ is the maximum number ... |
In Knuth's original paper on $LR(k)$ grammars, he proved that the decision problem "Given a CFG $G$, is there a $k$ such that $G$ is an $LR(k)$ grammar?" is undecidable.
Is there a similar result showing that it is undecidable whether a given CFG is an $LL(k)$ grammar for some choice of $k$? Or is this problem known t... |
There is a well known worst case $O(n)$ selection algorithm to find the $k$'th largest element in an array of integers. It uses a median-of-medians approach to find a good enough pivot, partitions the input array in place and then recursively continues in it's search for the $k$'th largest element.
What if we weren't ... |
Kolmogorov-Sinai entropy (KS) explains the mathematical concept behind KS entropy.
$$h ( T ) =\sup\limits_{\xi} \, h ( T , \xi )$$
defines the formula for KS where the left-hand side is nothing but the Shannon's entropy. In many papers I have seen that KS is defined as the supremum over source entropy. These conflicti... |
I want to encode strings as real numbers while preserving order. The order of the strings is the lexicographic order (as used in phone books); the order of the numbers is the standard order.
Is there an general (i.e. no additional conditions such as e.g. known max string size) encoding with this property?
|
I am trying to understand clustering methods.
What I I think I understood:
In supervised learning, the categories/labels data is assigned to are known before computation. So, the labels, classes or categories are being used in order to "learn" the parameters that are really significant for those clusters.
In unsupervi... |
At work I’ve been tasked with inferring some type information about a dynamic language. I rewrite sequences of statements into nested let expressions, like so:
return x; Z => x
var x; Z => let x = undefined in Z
x = y; Z => let x = y in Z
if x then T else F; Z => if x then { ... |
I have a very specific question about semantic clustering.
I have a list of words/phrases. I want to run an intelligent semantic clustering algorithm on this list. Please let me know what the available options are. Definitely I am looking for NLP based algorithms.
Simple, open-source, easy-to-use solutions will be high... |
I am teaching myself program verification and am currently learning proof assistants. I have the book Handbook of Practical Logic and Automated Reasoning which gives the proofs necessary for the understanding of such a system, but more importantly for me it also gives an implementation of the necessary algorithms as OC... |
What is the complexity of computing $n^{n^2},\;n \in \mathbb{N}$?
|
Background
$\newcommand\ldotd{\mathinner{..}}$Last month, I heard about a new linear-time algorithm to determine the longest palindromic substring called Jeuring's algorithm. It seemed interesting, therefore I had a try to analyze the algorithm. It's not too difficult to show that it's an $\Theta(n)$-time-algorithm, bu... |
The subsumption architecture, proposed by Rodney Brooks in 1986, is a "bottom-up" approach, in which robots are designed using simple hierarchical models. These models build upon and subsume the lower modules to form a final product. For example, a robot can be given a "find opening" module which is subsumed by a mor... |
I read about busy beaver numbers and how they grow asymptotically larger than any computable function. Why is this so? Is it because of the busy beaver function's non-computability? If so, then do all non-computable functions grow asymptotically larger than computable ones?
Edit:
Great answers below but I would like to... |
I've been studying the three and I'm stating my inferences from them below. Could someone tell me if I have understood them accurately enough or not? Thank you.
Dijkstra algorithm is used only when you have a single source and you want to know the smallest path from one node to another, but fails in cases like this.
F... |
The problem, coming from an interview question, is:
You have a stream of incoming numbers in range 0 to 60000 and you have
a function which will take a number from that range and return the
count of occurrence of that number till that moment. Give a suitable
Data structure/algorithm to implement this system.
Th... |
I have trouble understanding how to calculate the depth of a sorting network on $n$ inputs.
For example, in case of selection sort, we have:
$\qquad \displaystyle D(n)=D(n-1)+2\\\qquad D(2)=1$
which leads to
$\qquad \displaystyle D(n)=2n-3=\Theta(n)$
I have confirmed that the depth of selection sort is equal to $2n-3$ ... |
When testing algorithms, a common approach is random testing: generate a significant number of inputs according to some distribution (usually uniform), run the algorithm on them and verify correctness. Modern testing frameworks can generate inputs automatically given the algorithms signature, with some restrictions.
If... |
Is there a relatively simple way of telling if two pieces of text are semantically similar?
Some assumptions that are valid:
It is all english
I have a list of all the important nouns
Are there any strategies that I should pursue? Looking for something that is relatively computationally cheap, though something that c... |
Is the MAX-SAT problem NP-hard? From the Wikipedia page:
The MAX-SAT problem is NP-hard, since its solution easily leads to the solution of the boolean satisfiability problem, which is NP-complete
I see that a given SAT problem can be reduced to a MAX-SAT problem: just solve the MAX-SAT problem for the boolean formul... |
I want to make a sequence of numbers, where I pick the numbers $a_{0}, a_{1},..,a_{n}$. The length of the sequence is $n+1$.
Now I want the product of any pair of two numbers in the sequence modulo $k$ to be guaranteed to be unique and $k$ has to be as small as it can be in such a way that the resulting set has to be $... |
I need an example for how to calculate penetrance and branching factor of the search tree in in state-space heuristic search. The definitions are as following. Penetrance $P$ is defined by
$\qquad \displaystyle P = \frac{L}{T}$
and branching factor $B$ is defined by
$\qquad \displaystyle \frac{B}{(B-1)} \cdot (B^L – 1)... |
While I am learning a lot from others here at the Computer Science site, I must admit that I don't get as much out of some questions and answers since I typically don't understand the theorems to the level necessary. I am currently reading How To Prove It - A Structured Approach which is starting to make the theorems e... |
In studying logic to understand verifying programs I have found that there are books on logic targeted at Computer Science e.g.
Logic in Computer Science: Modelling and Reasoning about Systems
Mathematical Logic for Computer Science
Computability and Logic
Handbook of Practical Logic and Automated Reasoning
With ... |
Solving the recurrence relation $T(n) = 2T(\lfloor n/2 \rfloor) + n$.
The book from which this example is, falsely claims that $T(n) = O(n)$ by guessing $T(n) \leq cn$ and then arguing
$\qquad \begin{align*} T(n) & \leq 2(c \lfloor n/2 \rfloor ) + n \\ &\leq cn +n \\ &=O(n) \quad \quad \quad \longleftarrow \text{ wro... |
The 3SUM problem tries to identify 3 integers $a,b,c$ from a set $S$ of size $n$ such that $a + b + c = 0$.
It is conjectured that there is not better solution than quadratic, i.e. $\mathcal{o}(n^2)$. Or to put it differently: $\mathcal{o}(n \log(n) + n^2)$.
So I was wondering if this would apply to the generalised pro... |
Does any one know how to implement the simulation relation on two labelled transition systems (LTS)?
I know how to do it for branching bi-simulation. The signature refinement theorem is used for that purpose which has the time complexity of $O(n^3)$ on cyclic LTSs. Is the signature refinement technique useful for simu... |
I'm trying to prove that
$L_1=\{\langle M\rangle \mid M \text{ is a Turing machine and visits } q_0 \text{ at least twice on } \varepsilon\} \notin R$.
I'm not sure whether to reduce the halting problem to it or not. I tried to construct a new machine $M'$ for $(\langle M \rangle,w)$, such that $M'$ visits $q_0$ twice... |
I know that given two problems are undecidable it does not follow that their intersection must be undecidable. For example, take a property of languages $P$ such that it is undecidable whether the language accepted by a given pushdown automaton $M$ has that property. Clearly $P$ and $\lnot P$ are undecidable (for a giv... |
Assume we have an optimization problem with function $f$ to maximize.
Then, the corresponding decision problem 'Does there exist a solution with $f\ge k$ for a given $k$?' can easily be reduced to the optimization problem: calculate the optimal solution and check if it is $\ge k$.
Now, I was wondering, is it always pos... |
On Wikipedia, an implementation for the bottom-up dynamic programming scheme for the edit distance is given. It does not follow the definition completely; inner cells are computed thus:
if s[i] = t[j] then
d[i, j] := d[i-1, j-1] // no operation required
else
d[i, j] := minimum
(
... |
This question is about geometric theorem proving and is inspired by this Math.SE post. Currently, Euclidean-geometric theorem provers, as referred to in the post, use coordinate geometry to convert a geometry problem into a set of algebraic equations.
Why haven't people developed a theorem prover that uses synthet... |
A question was asked at Stack Overflow here:
Given an integer $N$, print out all possible combinations of integer values of $A,B,C$ and $D$ which solve the equation $A^2+B^2+C^2+D^2 = N$.
This question is of course related to Bachet's Conjecture in number theory (sometimes called Lagrange's Four Square Theorem becaus... |
Consider the context free grammar:
$\qquad \begin{align}
\mathrm{bill} &\to \mathrm{items}\ \mathrm{total}\ \mathrm{vat} \\
\mathrm{items} &\to \mathrm{item} \mid \mathrm{item}\ \mathrm{items} \\
\mathrm{item} &\to name\ \mathrm{price} \mid name\ \mathrm{quantity}\ \mathrm{price} \\
\mathrm{quantity} &\... |
I've just begun this stage 2 Compsci paper on algorithms, and stuff like this is not my strong point. I've come across this in my lecture slides.
int length = input.length();
for (int i = 0; i < length - 1; i++) {
for (int j = i + 1; j < length; j++) {
System.out.println(input.substring(i,j));
}
}
"In ... |
In "Introduction to Algorithms: 3rd Edition" there is Theorem 34.2, which states
$P = \{ L \mid L \text{ is accepted by a polynomial-time algorithm} \}$
"Accepted in polynomial-time" is defined by:
$L$ is accepted in polynomial time by an algorithm $A$ if it is accepted by $A$
and if in addition there exists a... |
In a recent CACM article [1], the authors present a way to improve scalability of shared and coherent caches. The core ingredient is assuming the caches are inclusive, that is higher-level caches (e.g. L3, one global cache) contain all blocks which are stored in their descendant lower-level caches (e.g. L1, one cache ... |
A Naive Bayes predictor makes its predictions using this formula:
$$P(Y=y|X=x) = \alpha P(Y=y)\prod_i P(X_i=x_i|Y=y)$$
where $\alpha$ is a normalizing factor. This requires estimating the parameters $P(X_i=x_i|Y=y)$ from the data. If we do this with $k$-smoothing, then we get the estimate
$$\hat{P}(X_i=x_i|Y=y) = \frac... |
Consider a sequence of $n$ positive real numbers $a_0,\ldots,a_{n-1}$. Let $S_n$ be the set of permutations on $\{0,\ldots,n-1\}$.
We are interested to find
$$
\max_{\pi\in S_n}\left( \min_{i=0}^{n-1}\left( \frac{a_{\pi(i)}}{a_{\pi(i-1)}} + \frac{a_{\pi(i)}}{a_{\pi(i+1)}}\right)\right)
$$
The addition and subtraction ... |
In the Subset Sum problem can some of the given numbers $a_1,a_2,a_3,\dots,a_n$ be the same? For example, we might have $[1,1,1,2,3,4]$ and the target is $5$? Can I assume that I have a specific solution with numbers $2$ and $3$ and $1,1,1$ and $2$ is not?
|
Suppose I'm renaming a file and the electricity goes off right in the middle. Naively, it looks like the file could be in some “half-renamed” state. Maybe the name would have half the old name and half the new name. Or maybe the file could disappear altogether because it no longer exists under the old name but it doesn... |
I'm currently looking at network clustering algorithms (we're currently looking at both directed and undirected, unweighted networks). The algorithms we've tried produce visually nice clusters. However, we would like to evaluate them against some "gold standard" -- a collection of networks in which the clusters have ... |
What's the complexity of Conflict-Driven Clause Learning SAT solvers, compared to DPLL solvers? Was it proven that CDCL is faster in general? Are there instances of SAT that are hard for CDCL but easy for DPLL?
|
A few years ago, MapReduce was hailed as revolution of distributed programming. There have also been critics but by and large there was an enthusiastic hype. It even got patented! [1]
The name is reminiscent of map and reduce in functional programming, but when I read (Wikipedia)
Map step: The master node takes the in... |
I am self studying discrete math and I am going through MIT Mathematics for CS lecture notes but they do not have solutions available. I got stuck at Problem 3.14 (pages 64-65 of this document). The problem is about the construction, given an arbitrary propositional formula $F$, of a proposition $C(F)$ such that:
$C(F... |
In the general case finding a Maximum Independent Subset of a Graph is NP-Hard.
However consider the following subset of graphs:
Create an $N \times N$ grid of unit square cells.
Build a graph $G$ by creating a vertex corresponding to every cell. Notice that there are $N^2$ vertices.
Create an edge between two vertic... |
I'm trying to find the Maximum Independent Set of a Biparite Graph.
I found the following in some notes "May 13, 1998 - University of Washington - CSE 521 - Applications of network flow":
Problem:
Given a bipartite graph $G = (U,V,E)$, find an independent set $U' \cup V'$ which is as large as possible, where $U' \subs... |
I'm learning Haskell and I'm fascinated by the language. However I have no serious math or CS background. But I am an experienced software programmer.
I want to learn category theory so I can become better at Haskell.
Which topics in category theory should I learn to provide a good basis for understanding Haskell?
|
We're running some benchmarks for an approximative query-answering system. It's sufficient to just think of it as running some SQL queries with joins. We are counting the results returned as part of the benchmark. However, the results often contain a lot of redundancy, so just counting results seems coarse.
Consider th... |
Wondering about any known relations between $\mathsf{RL}$ complexity class (one sided error with logarithmic space) and its complementary class, $\mathsf{coRL}$.
Are they the same class?
What are $\mathsf{coRL}$'s relation to $\mathsf{NL}$, $\mathsf{P}$?
|
The following predicate logic formula is invalid (i.e. not a tautology):
$\Bigl[\forall x \,\exists y {\,.\,} P(x,y)\Bigr] \implies \Bigl[\exists y \, \forall x {\,.\,} P(x,y)\Bigr]$
Which of the following are counter-models (i.e. counterexamples) for it?
The predicate $P(x,y) \equiv \bigl[ y \cdot x = 1 \bigr]$, whe... |
I'm trying to understand the proof of the time hierarchy theorem appearing in sipser's book. The proof requires a TM M to simulate an arbitrary TM N without too much slowdown. In particular, it is assumed that the encoding of N's tape alphabet using M's alphabet causes only a constant factor slowdown. This seems plaus... |
Let $M$ denote a set of $n$ positive integers, each less than $n^c$.
What is the runtime of computing $\prod_{m \in M} m$ with a deterministic Turing machine?
|
There are a lot of algorithms out there that solve this particular problem. My main problem is in trying to understand how they work; where to start. Most of the algorithms are academic in nature.
There is a master list of product names. We feed in an input file into the program with product names, but the names of the... |
Let $\mathrm{MIN}_{\mathrm{DFA}}$ collection of all the codings of DFAs such that they are minimal regarding their states number. I mean if $\langle A \rangle \in \mathrm{MIN}_{\mathrm{DFA}}$ then for every other DFA $B$ with less states than $A$, $L(A)\ne L(B)$ holds. I'm trying to figure out how come that $\mathrm{MI... |
I'm not even sure if this is the right StackExchange to post this, but it seems like sentiment analysis would go here.
What would be the best approach to determine if two people on Twitter are actually friends?
I think that the first criteria would be that they are following each other. This would eliminate all of the ... |
Call a family of sets $\mathcal{F} = \{S_1, \dotsc, S_k\}$ "diverse" if each set $S_i \in \mathcal{F}$ has at least one unique element. What are possible approaches for finding the largest diverse set $S$ in a family of sets $\mathcal{F}$?
One approach is to solve a modified set packing problem. Suppose $\mathcal{F}=... |
In the article Parsing Expressions by Recursive Descent by Theodore Norvell (1999) the author starts with the following grammar for arithmetic expressions:
E --> E "+" E | E "-" E | "-" E | E "*" E | E "/" E | E "^" E | "(" E ")" | v
which is quite bad, because it's ambiguous and left-recursive. So he starts from remo... |
I am curious as to how one might very compactly compress the domain of an arbitrary IDN hostname (as defined by RFC5890) and suspect this could become an interesting challenge. A Unicode host or domain name (U-label) consists of a string of Unicode characters, typically constrained to one language depending on the top-... |
As far as I know, the more collision-resistant a hash function is, the better. But is there any way to define a hash function with predicted collisions? In other words, a hash function that collides for some known set of possible inputs and avoids collisions for other input values. To state the problem simpler:
Let $A$... |
Of large sparse biparite graphs (say degree 4) with N verticies, roughly speaking, which of them cause the worst case running time of the Hopcroft-Karp algorithm? What is their general structure and architecture, and why does it cause a problem?
Further, in many implementations the DFS part is implemented using recursi... |
I do not have any argument opposing why we need only a single universal class. However why not we have two universal classes, say an Object and an AntiObject Class. In nature and in science we find the concept of duality - like Energy & Dark Energy; Male & Female; Plus & Minus; Multiply & Divide; Electrons & Protons; I... |
Repost from Stack Overflow:
I'm going through past exams and keep coming across questions that I can't find an answer for in textbooks or on google, so any help would be much appreciated.
The question I'm having problems with at the moment is as follows:
Given a regular expression (a|bb)*, derive an estimate of the ... |
Normally universities teach discrete math / discrete structure. My question is, how much math does one need to know to understand this area? Is calculus required or will precalculus do just fine? Does one need to have done proofs before to be able to understand this area?
Thank you all for your answers.
Note: My apolog... |
Surely spatial computing and amorphous computing share similarities and overlap. Is spatial computing a subset of amorphous computing? How are the two different?
|
Show that $L=\{a^{n^2} | n \geq 0\}$ is not regular
Hey guys. I'm taking a CS class and this stuff is really new to me so bear with me.
I tried to look if I get some contradiction by using the pumping lemma for regular languages and I worked it out like this:
Suppose $L$ is regular. Then there must be a natural numb... |
Can anyone suggest me a linear time algorithm that takes as input a directed acyclic graph $G=(V,E)$ and two vertices $s$ and $t$ and returns the number of simple paths from $s$ to $t$ in $G$.
I have an algorithm in which I will run a DFS(Depth First Search) but if DFS finds $t$ then it will not change the color(from w... |
I'm using the book Introduction to Computer Science by John Zelle and at the end of Chapter 3 (Computing with numbers), I'm asked to find the nth term of a Fibonacci sequence presumably using a definitive for loop, as no other decision structure has been introduced yet.
Is this possible? I've tried everything I could ... |
I am self-learning proof assistants and decided to start on some basic proofs and work my way up. Since proofs are based on other proofs and so form a hierarchy, is there a repository of the hierarchy of proofs?
I know I can pick a particular proof-assistant and analyze its library to extract its hierarchy, however if ... |
I wonder how come that the following language is in $\mathrm R$.
$L_{M_1}=\Bigl\{\langle M_2\rangle \;\Big|\;\; M_2 \text{ is a TM, and } L(M_1)=L(M_2), \text{ and } |\langle M_1\rangle| > | \langle M_2 \rangle| \Bigr\} $
(I know that it's in $\mathrm R$ since there's an answer for this multi-choice question, but witho... |
In Chapter 9 of the Dragon Book, the authors describe the dataflow framework for global analysis (described also in these slides). In this framework, an analysis is defined by a set of transfer functions, along with a meet semilattice.
At each step of the iteration, the algorithm works by maintaining two values for ea... |
How can I prove that a set is complete for $\Pi_2$ complete? Can you give me an example proof? Say for $All_{TM}$ = Turing machines whose accepted language is all strings?
|
Let $F = \{⟨M⟩:\text{M is a TM which stops for every input in at most 50 steps}\}$. I need to decide whether F is decidable or recursively enumerable. I think it's decidable, but I don't know how to prove it.
My thoughts
This "50 steps" part immediate turns the R sign for me. If it was for specific input it would be de... |
I'd like your help with proving that the language
$$L=\{\langle M \rangle \mathrel| L(M) \in \mathrm{NP}\smallsetminus \mathrm{P} \}$$
is decidable iff $\mathrm{P}=\mathrm{NP}$.
If $\mathrm{P}=\mathrm{NP}$, I get that it's the language of empty Turing machines. So $L$ is a $\text{co-RE}$ problem — but that's not what's... |
What I'm trying to do is generate Motzkin numbers mod a large number $10^{14} + 7$ (not prime), and it needs to compute the $n$th Motzkin number as fast as possible. From Wikipedia, the formula for the $n$th Motzkin number is defined as following:
$\qquad \displaystyle \begin{align}
M_{n+1} &= M_n + \sum_{i=0}^{n-1} ... |
I am trying to teach myself different approaches to software verification. I have read some articles. As far as I learned, propositional logic with temporal generally uses model checking with SAT solvers (in ongoing - reactive systems), but what about first order Logic with temporal? Does it use theorem provers? Or can... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.