instruction stringlengths 35 11.4k |
|---|
Assuming the edges are undirected, have unique weight, and no negative paths, do these algorithms produce the same Minimum Spanning Trees?
|
I have started study of approximation algorithms and have confusion about the definition of approximation algorithm. I have two textbooks: by Cormen and the second one by Williamson.
Cormen's textbook says
If an algorithm achieves an approximation ratio of $\rho(n)$, we call it a $\rho(n)$-approximation
algorithm.
... |
I have the following example that I have to prove
{a>7 ^ b>=0} n:=a-b {n<a ^ a+b>=0}
Using the Consequence Rule I assumed that the P is true
{true} n=a-b {n<a ^ a+b>=0}
so logically, the Q should be true, but I'm not sure if that'd be enough.
|
The normal Ford-Fulkerson method finds augmenting paths (as long as one exists) while including "back-flows", but if those back-flows are ignored, does there exist a flow network for which algorithm will not terminate? Assume integer capacities for each edge.
Edit: I learned that even if the back-flows are ignored, wit... |
I was just wondering, I think merge sort is more efficient but not sure if that is true. I know it's to do with the complexities but am still struggling to understand.
|
I understand how bubble sort works and why it is O(n^2) conceptually but I would like to do a proof of this for a paper using the master theorem.
As an example: The recurrence form for merge sort is T(n) = 2T(n/2) + O(n) which, using the master theorem, gives us O(n log(n)).
I am unsure of how to do this process with... |
Recently I came across some news that Google and IBM are planning to unveil a 50 qubit quantum computer. I read that in this design, each qubit is not connected to all other qubits rather only to the two nearby qubits(neighours). In layman terms, what difference will this create in terms of the system's computational... |
What are the drawbacks of Normalized Mutual Information (NMI) clustering evaluation method?
For evaluating what clustering algorithms, is the NMI evaluation method suitable?
|
I am looking for an example that shows how to canonically label a graph using brute-force approach. An example with a 3 vertex or 4 vertex simple graph is preferred.
|
We're given $T$ a minimal spanning tree (MST) of a non-directed, connected graph $G=(V,E)$ with non-negative weights for each edge $e \in E$. Let $e^* \in T$ be an edge in $T$ and let $G'=(V,E')$ be the graph which we get after removing $e^*$ ($E'=E\setminus \{e^*\}$). $G'$ is also connected.
I need to propose an al... |
I learned in my data structures class that QuickSort can be optimized by calling the InsertionSort method when the length of the subarray is less than a certain threshold. However, when it comes to the actual time complexity calculation of the optimized version of QuickSort, I'm having trouble finding the result. The p... |
How to prove that for a full (each node that's not a leaf has 2 nodes) binary tree $T$ of $n$ leaves there's a series of frequencies $f_1,f_2,...,f_n$ such that if we use Huffman algorithm on the series we'll get $T$?
First in order to get frequencies from $T$ we can assign the probability of $\frac{1}{2^d}$ to each ... |
Imagine any object oriented PL based around the idea of message sends: some method basically performs something like this:
send(target=someTarget, sender=self, message=someMessage)
Also, most of the PL allow for async message communications, where you can issue multiple messages to multiple targets and then "yield" to... |
Given a language $L$ over the alphabet $\{0,1\}$. Let $L^*= \{ w_1w_2...w_n | n \ge 0, w_1,...,w_n \in L\}$.
Prove:
If $L$ is recursive, then $L^*$ is recursive as well.
If $L^*$ is recursive, then $L$ is recursive as well.
For the first proof I have this idea:
If $L$ is recursive, then a turing machine $M_L$ can dec... |
Exactly as the title says, I'm looking for a DFA for an even number of A, odd number of B, and exactly one C, can anyone help with this?
Thanks
|
Why are programs kept in main memory for execution? As per my understanding, we need a memory management scheme to manage several processes in the main memory. These things can be done in secondary memory as well (I think). Just to improve performance, we need main memory or there is something more to it?
|
Title states the question.
We have as inputs a list of elements, that we can compare (determine which is greatest). No element can be equal.
Key points:
Comparison is not transitive (think rock paper scissors): this can be true: A > B, B > C, C > A (note this is not a valid input since there is no valid answer here, I... |
I'm searching the space of length $n$ strings (a-z lowercase), which I suppose we could represent as a large graph of strings and hamming distances between the strings.
I'm given some pairs of strings and distances $v_i, d_i$ . I need to find a string which has distance $d_i$ from each each string $v_i$ .
Does there ex... |
Given is DFA M:
1.) abb and bbb
2.) baa and ab
3.) a and ε (where ε is the empty word)
4.) abb and baa
If I understood correctly, x and y are equivalent to each other (in terms of Nerode), if you add the same suffix for both such that they can be read by the DFA, e.g. they are in L(M)
Thus 1.) is false because abb t... |
Imagine you have N distinct people and that you have a record of where these people are, exactly M of these records to be exact.
For example
1,50,299
1,2,3,4,5,50,287
1,50,294
So you can see that 'person 1' is at the same place with 'person 50' three times. Here M = 3 obviously since there's only 3 lines. My question... |
I was looking through some papers online on the equivalence of 2-way DFA and 1-way DFA and I couldn't find a simpler explanation on why 2DFAs are no more powerful than ordinary DFA. I wanted to write a simpler explanation of why this is the case so anyone who is new to the topic could understand without much trouble.
I... |
I know there may be no definitive answer to theses question, since they are rather broad and opinion based.
I have a solid CS background and want to continue (post)graduate study research in CS. In particular, I am interested in questions like "What is source of uncomputability in CS/Math?", "The reason behind why DFA... |
At the end of section 12.4 in the Local Search chapter from Kleinberg-Tardos's book "Algorithm Design" we are told that we can bound the running time of a proposed Maximum-Cut approximation algorithm via using "big-improvement-flips". The goal here is to use these flips to then place a bound on the running time of our ... |
I only just recently learned about the P=NP problem in introduction to algorithms class, and I'm still trying to wrap my head around it. I thought of this situation while cleaning my room today and couldn't think of a way to disprove it to myself. Perhaps it
Obviously, the algorithm described in the title would have to... |
I can't count the number of times I've seen questions on StackOverflow related to regular expressions where the problem was due to the programmer not understanding the impact of greedy quantifiers. Most recently, Python regex issue — [\S\s]* vs \d*.
I wonder why regular expression quantifiers were defined to be greedy.... |
Let h(x) be the integer n such that $n \leq \sqrt2 < n+1$ Show that h(x) is primitive recursive.
I know how primitive recursive functions are defined, but showing an integer is primitive recursive is throwing me off. I need some help starting the proof.
|
The notion of state I'm referring to is the one described in this wikipedia page : https://en.m.wikipedia.org/wiki/State_(computer_science)
Which defines it in this way:
"a program is described as stateful if it is designed to remember preceding events or user interactions; [1] the remembered information is c... |
I'm trying to find the best position in a set of points where each point p has a weight w. I need to take into account the distance between each point and the weight of the points, the point with the lowest weight to distance value is the solution. (A more detailed description can be found a bit further down the page.)... |
T(n) = 2T(n-1) + n
Using back Substitution at first step we get
T(n) = 4 T(n-2) + 2(n-1) +n
If i go further one more step then what i am getting is
T(n) = 16 T(n-4) + 8(n-3) +4(n-2) + 2(n-1) +n
|
I need to prove whether the language $ L = \{w \in \{0,1\}^* \mid |w|_0 = |w|_1 \}$ can be written as a regular grammar. Obviously it can, but how do I prove it?
|
Consider the following streaming ``algorithms'':
When an element $x$ arrives, flip a fair coin until it shows ``heads''.
Fix a random hash function $h:U\to\{0,1\}^\infty$ (i.e., it maps elements into infinite bit strings). When an element $x$ arrives, do $LZ(h(x))$ operations, where $LZ$ is the number of leading zeros... |
Bin packing problem is a problem, where one has to find the minimum number of bins of size $v$ required to store $n$ objects of sizes $s_1, \ldots, s_n$. Object sizes are never greater than $v$.
For example, if $v = 10$ and the objects sizes are $2, 5, 4, 7, 1, 3, 8$, we can store objects with 3 bins: [8, 2], [7, 3], [... |
I know $USELESS_{TM}$ is undecidable, but am having trouble showing that it is recursively enumerable. I wanted to reduce $USELESS_{TM}$ to the halting problem, which would show that $USELESS_{TM}$ is recursively enumerable but don't see a way to go about doing this. (I think I would need to check every possible input ... |
My instinctual response is that it is possible, but I can't see how to simulate the oracle tape on a 1-d CA.
If not, are they able to be simulated on n-dimensional CA? My thought is that the oracle tape could be simulated on another row in, say, a 2+1-dimensional cellular automaton.
|
Given a language $L=\{ 0^m1^n | m \neq n \}$ over $\Sigma = \{ 0,1 \}$, how would one go about characterizing the equivalence classes of this language?
I know there isn't a formal algorithm for that, but still, can some steps always be taken?
|
I'm working on a project that needs an advertisement targeting algorithm. I don't know much about the space, so I'm here to ask how to get started.
The interesting thing about this problem is that I have no access to ad performance metrics. So the targeting algorithm will have to be rule based, not an ML algorithm th... |
This is from CLRS problem 24.3-5:
Professor Gaedel has written a program that he claims implements
Dijkstra’s algorithm. The program produces $v.d$ and $v.\pi$ for each vertex
$v \in V$ . Give an $\mathrm{O}(V+E)$ time algorithm to check the output of the
professor’s program. It should determine whether the $d$ ... |
It is well-known that the problem of deciding if a graph contains a clique of size $k$ is W[1]-hard with respect to parameter $k$.
Is it also known to W[1]-hard (or perhaps FPT) in parameter $n - k$, where $n$ is the number of vertices of the graph?
|
Let's say that I have one task to perform $n$, $n<250000$ times and it takes $p$, $p < 700000$ time to complete it once.
I have list of time constraints ${t_1, t_2, ..., t_n}$ where $t_1\le t_2\le \cdots\le t_n\le 10^9$.
This list says that the $i$-th execution of task cannot be ended earlier than $t_i$.
I want to mini... |
I have directed Graph G(V,E) with weight function w. so that weight of each (u,v) is a positive value.
I need to find the most lightweight circle in the graph that vertex k' is part of it.
I've also given an algorithm i can use which can find the most lightweight path for a graph with positives weights ( i can use it o... |
I currently have a deck of cards (in fact this deck is an array of sorted elements in descending order as indicated by the picture above), that I want to shuffle. However, the caveat is that I want the card near the top of the deck to be shuffled to a new position relatively close to the top, while a card near the bot... |
I'm looking for a generic static analysis framework that could be used to detect problems that aren't necessarily specific to a particular programming language; for example:
Variable taint checking / unvalidated user input
Detecting when a variable is unused
Detecting when an identifier shadows another identifier in t... |
Given variables {A, B, ,,,,,Z}
We want to sort these varibles according to given constraints.
The constrains are in below format:
X Y Z
meaning the third variable (Z) is not in the range between first and second variables (X, Y)
X > Y or X > Y, we don't know. and Z can be greater than both X and Y or smaller t... |
Given the program:
{y=y0 ^ y>=0}
z=0;
while (y>0){
z=z+x; (1)
y=y-1;
}
{z=x*y0}
I am having trouble finding the invariant, I've tried:
z=xy-xy
z<=xy
z=0xy
with/without the precondition as the invariant, but none of my attempts can be used to prove the post-condition. Any help would... |
(Proposition, pg 26): Let ${x_1, \ldots, x_N}$ be $N$ points on $\mathbb{R}$, $N \in \mathbb{Z}$, labelled either $+1$ or $-1$ , then there exists a function from the set $\{t \mapsto \sin(\omega t)| \omega \in \mathbb{R}\}$ that separates these points into two sets, one with all labels ${+1}$, and one with all labels ... |
I would like to determine the time complexity of this function, in $\mathcal{O}$-Notation.
def g(x):
if x == 0:
return 1
elif x == 1:
return 2
else:
x_div = x//2 # // is integer division
x_mod = x % 2
return g(x_div)*g(x_mod)
Because it's recursive, I think it's $\ma... |
Reading an article (arXiv) about the Firefly optimization algorithm, it is stated that the objective function is called only once per firefly per iteration, but following both the pseudo-code in the article and some implementations I found online I do not understand why this is the case..
As I understand the following ... |
I was reading CFG's and PDA's. I need to understand one basic point in that.I have solved some questions on final state acceptance by PDA.But in every answer,the string always end with epsilon(means that there is always a transition when string ends which by reading epsilon takes to final state and mostly it invloves c... |
I've recently started independently learning type theory, using a combination of papers found online and ncatlab.org (but have not worked with category theory), and am about to start reading TAPL.
I'm interested in understanding how recursive types can be substituted for inductive types in dependent type theory (we ass... |
I'm reading McCarthy's paper Recursive Functions of Symbolic Expressions And Their Computation by Machine, where when the author describes the machine implementation of lists, he writes this:
a. Representation of S-Expressions by List Structure. A list structure is a collection of computer words arranged as in figure ... |
I'm working through some exercises in Robert Harper's "Practical Foundations for Programming Languages" and I'm not certain I understand what makes an occurrence of a type operator non-negative or negative in the general case.
I understand that positive type operators occur in the range of a function type, and that neg... |
Consider this version of the algorithm, for only 2 processes, 0 and 1:
Initially flag[i]=false
1. flag[i] := true
2. while flag[1-i] do{
2.1. if turn = 1-i then{
2.1.1. flag[i] := false
2.1.2. await turn=i
2.1.3. flag[i] := true } }
3. Critical Section
4. turn := 1-i
5. flag[i] := false
I b... |
Given a simple polygon $P$ and a point $p$ within the polygon, I want to compute the region in $P$ consisting of all points $q$ visible from point $p$. A point $q$ is visible from point $p$, if the line segment $\overline{qp}$ is completely in the polygon $P$.
As for now, let's ignore the case where a line segment lies... |
Suppose to have $n$ independent events $E_1, E_2,..., E_n$, where the probability of occurrence of event $E_i$ is $p_i$ (i.e., each event has its own probability of occurrence). We can easily define new events of type $N_k\equiv$"exactly $k$ events occur".
The probability of event $N_k$ can be computed as
$$\Pr(N_k) =... |
I'm trying to construct a recursively enumerable TM for this language. (Useless state: one that is never entered during a computation on any input).
The TM L:
Write out all of M's states, generate input in lexicographical order one at a time, and after one is generated, simulate M on the input and mark down which stat... |
I have ~4000 variables that are used in ~5000 logical formulas, where each formula consists only of conjunctions of the (non-negated) variables. I want to find the maximum number of satisfied formulas, given the number of variables that I can set to 1.
Does this problem have a name? Is it equivalent to the MAX-SAT prob... |
I found this problem to be similar to the problem of Finding least number of line segments with length L that cover N points.
The problem is:
Given N points on a circle, find the best positions of fixed size circular segments that cover all those points so that the number of circular segments is minimal.
I think tha... |
I'm a bit confused about the dovetailing concept. It seems too powerful. Could it solve non-recursively enumerable languages?
|
If you already have an approximation algorithm in hand, it's usually easier to prove that it is an α-approximation algorithm by merely analyzing the algorithm, than designing an approximation algorithm to achieve a α-approximation. That being said, what procedure or intuition should I have in mind to design a α-approxi... |
Imaging I am running a forum and I continuously have log in of members. A member can log in simultaneously many times
So I have :
Tom Jerry Jack Tom Joe Kay Neo Tom ...
each log in comes with a time stamp
I want to have an algorithm that can count how many UNIQUE names have logged in the past 1 minute.
How to design a... |
Let's say we have N people, each of them holds several colored cards (for each color and person pair the number cards held is no more than one). We want algorithm determine how to take exactly one card from each person (denote this set of taken cards S), so the following function would be maximal: number of colors sati... |
The feasible region of a Linear Program (LP) is $\{x \in {\bf R}^n: Ax \le b, x\ge 0 \}$. This is an intersection of halfspaces, a polyhedron. If the LP is bounded and feasible, its optimal value will be attained on some face of the polyhedron, typically a vertex. A vertex is a point determined by the intersection of ... |
If we can insert to a Fibonacci Heap in O(1), and increase-key and find-min in the same W.C time complexity, then why can't we sort an array in time complexity O(n)?
Given an array with n elements:
Find the maximum of the array (largest key) in O(n).
Build a Fibonacci Heap of the elements in O(n), emptying the array ... |
What i came up with is this
1) inner loop goes to 2n and at each. step it increments n/3 times threfore 2log n times it will execute
2) outer goes to n incrementing by 1 threfore n times
Hence for each value of outer loop innner executes n* 2log n times...
Threfore O(n*2logn)
Que 1) Is this correct
Que2) If it i... |
First, for the sake of notation, suppose a finite set A, where A is a set of real numbers. Then the function f(A) is defined as the sum of all the elements in A. Then here's the following problem.
I have a set X = {x_1, x_2, ..., x_n}, where x_i is a real number in (0,1], and I want to partition X into C_1, C_2, ....,... |
I have a Turing machine M and I have to answer the question are there infinitely many Turing machines that recognize L(M)? I also need to describe a Turing machine that solves this problem. My idea is to say that we can simply increase the number of states by adding a new unreachable state. Each time I add a new state,... |
Given a simple polygon $P$ and a point $p$ within the polygon, I want to compute the vertices of $P$ visible from point $p$. A point $q$ is visible from point $p$, if the line segment $\overline{qp}$ is completely in the polygon $P$.
One can use the accepted answer here to compute visible vertices in $P$ from a point $... |
There are n values given. Is there a possibility to have two Arrays A and B each containing elements from the given values such that the sum of all elements of A minus the sum of all elements of B gives the searched value? Each value can be used twice, but not twice in the same subset, so once in A and once in B at mos... |
Computing edit distance (shortest sequence of edit operations) on ordered trees is a well studied problem with many known algorithms (e.g. Zhang & Shasha, RTED). There is also considerable literature on edit distance for general graph (e.g., this review). I am however interested in a mixed case that has arisen in our i... |
I just drew this graph completely random:
I found the shortest path (marked in red) by simply checking everything. But the reason was to use Dijkstra's algorithm. But when I try I get stuck in a loop. Lake a look at my calculations:
How to read it is:
Top Row: Wich node
Section t: Total distance traveled
From: Wich... |
I searched on the net the different measures of text similarity. And I found many algorithms concerning this issue and there are classified into many categories such:
Token-Based Measure: Tf-idf, Euclidean, Manhattan, overlap coefficient, matching coefficient, cosine, etc.
Character-based: Levenshtein, Hamming, Jaro-W... |
I have arrays $a_1...a_n$ each containing $m$ values inside. I want to select one value from each array. Let us say the selected values from each array are represented with $x_1...x_n$ and the distance amongst every selected pair of values as $d_{ij}$ (distance is simply how far the indices in the arrays are for every ... |
Please can someone explain how Levenshtein edit distance works?
I've stepped through the algorithm in code and in excel, but I don't understand how this actually succeeds in finding an edit distance.
Specifically, I don't understand how these algorithms are able to find the number of substitutions, deletions, and inser... |
For the number 6, if I need to represent it in 5421 code form, should I code it as
1001 or 0110? Why should I choose the one over the other?
Similarly for the number 5 in 2421, is it 1011 or 0101?
Edit 1:
In a weighted binary code, the name of the code indicates the weight assigned to each place.
So if the code is 842... |
Let the Post Correspondence problem with input
$$K = ((x_1, y_1), . . . ,(x_n, y_n)), x_i, y_i ∈ \Sigma^*$$
for $$ i = 1, . . . , n $$
Find a concrete solution for the input
$$K = ((001,0), (01, 011),(01, 101),(10, 001))$$
The Post Correspondence problem is undecidable so it's really hard to find a concrete solution.... |
T = (BD + A'BC'+A'CD)
How can i draw this by only using NOR-Gates? This is what i have done so far:
https://i.stack.imgur.com/nIujl.jpg
Have I understood this right?
|
Given a set $S$ and some symmetric distance function $d(i, j)$ defined over the elements of $S$, we must maintain the closest pair of elements (i.e., $(c_1, c_2) \mid d(c_1, c_2) \leq d(i, j) \forall i,j \in S$) subject to insertions and deletions to $S$. Further, we can assume that the possible elements to be inserted... |
How can i draw a general resource graph which cannot be completely reduced but which is free from deadlock?
A general resource graph which can be completely reduced and hence is free from deadlock is shown below.
As depicted above, R1 and R2 are resources and P1 and P2 are processes.
|
Lot of mathematicians have made several efforts to answer the question : are mathematics consistent ? Although we haven't yet had a proof of consistency, and surely we will never (Gödel second theorem), does this question has an impact on computer science ? I mean, does the work of those mathematicians, like Gödel's th... |
I want to develop a previous answer to Is there a known maximum for how much a string of 0's and 1's can be compressed?.
I've looked at the Hutter Prize and various compression benchmarks. The compression records are graphed below over a 12 year period. The red curve is an exponential fit, which seems to be asympto... |
Hopefully this question is not a duplicate.
How do I show the problem below is decidable by describing a Turing machine?
Input: Turing machine M
Question: Are there infinitely many Turing machines that all recognize L(M)?
I know a language is decidable if there exists a Turing machine that halts on all inputs when runn... |
We say a negligible function is a function $\epsilon(n):\mathbb{N}\rightarrow \mathbb{R}$ such that for every positive integer $c$ there exists an integer $N_c$ such that for all $n > N_c$,
$$\epsilon(n)<\frac{1}{n^c}$$
(From wikipedia)
Assume that two probabilistic polynomial-time algorithms $O_{1},O_{2}$ satisfy tha... |
Suppose $M=(Q,\Sigma,\delta,q_0,F)$ is a deterministic finite automaton, and suppose there exists a state $q \in Q$, a string $z \in \Sigma$, and integers $i,j>0$ such that $\delta(q,z^i)=\delta(q,z^j)=q$. Prove that $\delta(q,z^{gcd(i,j)})=q$
I can intuitively say that starting from a state $q$ if you take $x$ steps o... |
Let $G$ be a finite state automaton (FSA) with transfer function $\delta(\cdot,\cdot)$ and initial state $q_0$. Suppose also $\Sigma_{G}$ represents its alphabet. Assume that its closed behavior is a set of strings defined as:
$L(G) := \{s \in \Sigma_{G}|\delta(q_0,s) \text{ is defined in }G\}$
Now, consider two partic... |
Given a particular value x and an array A, I'd like some way to determine (without literally checking each possible combination) all of the combinations of numbers in A that sum to it.
Thanks to Jeff Erickson's wonderful algorithm notes, I can write an algorithm that efficiently determines if a sum exists, but I'm hav... |
We know that NEXP $\not\subset ACC^0$ (Ryan Williams'10 Result). Also, We know that even $\Sigma_{2}^{P}$ cannot have polynomial circuits of bounded degree i.e. $SIZE(n^k)$ for some $k \in N$ (Kannan's Result). Does this give a hint towards $ACC^0$ is far more powerful than polynomial circuits of bounded degree? Are th... |
In the introduction to algorithms proof of Dijkstra, I don't understand why the statement "both y and u were in V-S when u was chosen". We add x before y, and so we relax d[y] with the the edge $$\omega(<x,y>) + \delta(s,x)$$, d[u] can't be smaller than delta[u], so shouldn't y be in S when we add x to S? thanks.
|
I am trying to represent a fragment of a number hierarchy using the Haskell concepts of value, type, and type class. I would like the Haskell code to reflect the mathematical semantics $\vdash ((x \in \mathbb{N}) \land (\mathbb{N} \subset \mathbb{Z}\subset \mathbb{Q}) \Rightarrow (x \in \mathbb{Q}))$. In words, given ... |
Is there any example of any natural problem which is known to be in MA, but not yet to known to be in NP?
I am aware that Graph Nonisomorphism (GNI) is known to be in AM which is considered a superset of MA. Can we construct a language (which may be non-natural) which is in MA, but not in NP?
|
I solved this problem from codechef:
problem link
and now I want to change it a bit. Instead of find out the distance between node $u$ and $v$ I want to answer $k$ queries of the form: find node $u$ to which distance from node $v$ is maximum but I'm not able to see fast enough algorithm for it.
I think that heavy light... |
Let $A$ be the language consisting of descriptions of Turing machines $\{M_1, M_2, \dots \}$, where each $M_i$ is a decider. Prove that $A$ is not Turing-recognizable.
Then suppose $A$ is Turing-recognizable and suppose $s = \{s_1, s_2, \dots \}$ is a set of all possible binary strings. Then I construct decider $D$ as ... |
Assuming that an implementation of a sorting algorithm takes 0,01 seconds to sort 1000 elements, how long would it take to sort 100 million elements?
What do I need to know about my the algorithm to estimate the time? Is its time complexity given in $\mathcal{O}$-notation sufficient to find that out?
In my example the ... |
I have a task to find a number of 2-3 trees... I don't quite know what it means, I'm asked to: find the number of 2-3 trees of depth $4$?
Is there a specific way to find number of 2-3 trees of depth $n$?
Thanks!
|
According to Wikipedia
In computability theory, a machine that always halts—also called a decider (Sipser, 1996) or a total Turing machine (Kozen, 1997)—is a Turing machine that halts for every input.
My understanding of decider is that a machine is a decider if it always halts with output $0$ or $1$ (or whatever you... |
I am currently stuck on a question from Sipser's book of automata. The question goes like this:
Consider the following language: V = {w|w = 0a for some a which is an
element of HALT} U {w|w=1b for some b which is an element of
complement of HALT }
Prove that V is unrecognizable? Prove that complement of V is
unr... |
A literal is a nonzero integer, and we define $\sim x = -x$.
A clause is a nonempty set of literals.
A CNF is a set of clauses.
A K-rule is a pair $(F,C)$ where $F$ is a CNF and $C$ is a clause.
A Krom-style proof system (KPS) is a set of K-rules.
If $S$ is a KPS, then an $S$-proof of $C$ from $F$, or an $(S,F)$-proof ... |
Given a language $L \subset \{0, 1 \}^*\#\{0, 1 \}^*$ and a language $$L'=\{u \in \{0,1\}^* | \textrm{ There is a word }w \in \{0,1\}^* \text{, so } u\#w \in L\}$$
Prove or disprove:
If $L$ is recursively enumerable, then $L'$ is recursively enumerable.
If $L$ is recursive, then $L'$ is recursive.
My idea for 1:
Si... |
Let the language $L$ be as follow ;
$$L=\{\langle M_1 \rangle \langle M_2 \rangle \mid L(M_1) \cap L(M_2)=\emptyset \}$$
$\langle M_1 \rangle$ and $\langle M_2 \rangle$ are the encoding of the Turing machine $M_1$ and $ M_2$.
Using Reduction, I have to prove that $L$ is not recursively enumerable.
In order to pr... |
Process X
/* other code for process x*/
while (true) {
1) varP = true;
2) while (varQ == true)
{
/* Critical Section */
3) varP = false;
}
}
/* other code for process X */
Process Y
/* other code for process Y */
while (true)
{
1) varQ = true;
2) while (varP == true)
{
... |
How can I demonstrate that the computational model of rewriting is adequate? For example, with it, it is possible to compute any computable function.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.