instruction stringlengths 35 29.1k |
|---|
I have recently implemented Dijkstra's Algorithm to the shortest path between all pairs of nodes in the graph. I have implemented this code in Java. As instructed I am using a linked list to represent the adjacency matrix. As instructed, I am running my algorithm for a complete graph. The running time for a 1000 node c... |
I've seen this question in a past exam paper, and I know that the answer given is (b), but I'm not sure why.
Which one of the following hash functions on integers will distribute keys
most uniformly over 10 buckets numbered 0 to 9 for i ranging from 0 to
2020?
(a) h(i) = i2 mod 10
(b) h(i) = i3 mod 10
(c) h(i) = (... |
Given a string $S$ of length $n$, and a number $k$, count the number of substrings (regardless of their length) that contain exactly $k$ different characters.
The obvious solution takes $O(n^2)$ time (fix substring start point, and move its end point while keeping track of the set of seen characters).
Is there a way to... |
Consider the following algorithm that computes the sum of two integers (toy example):
INPUT: Integers (a,b)
1. Toss a coin c
2. If c = 0, then loop forever
3. If c = 1, then compute and output a+b
What is the running time of this algorithm? The "strict" running time (defined as a strict upper bound on the running ... |
I've read a few papers (searched by Google Scholar) about $(2+p)$-SAT, but they're all quite old (2001 and earlier). Do newer publications exist? I'm looking for solvers, theorems and so on. I want to examine this topic thoroughly.
|
I am very well-aware of how optimal substructure for pairwise global sequence alignment using the Needleman-Wunsch algorithm works.
However, I have merely seen hand-waving explanations for the optimal substructure property for sequence alignment using a general/arbitrary gap penalty function (I realize that concave pen... |
Let's assume we have an arbitrary language $L'$ and let's define the language $L = \{1^n | \text{The number of strings in } L' \text{ of length } n \text{ is odd }\}$.
Is $L\in PSPACE^{L'}$?
I tried saying that I can define a determinstic machine that holds a counter and that goes over all possible strings of length $n... |
I am working on edge detectors: Canny, Sobel, Prewitt, and Roberts. These edge detectors work with conventional kernels to compute the edge. The kernel values are multiplied with the pixel values of an image, and then we compute an average value.
Suppose my average pixel value is 12, while the old value (of the origina... |
I am working on a simulated annealing algorithm for graph coloring. The model I follow is the following: http://riad.pk.edu.pl/~zk/pubs/PPAM07_2.pdf. I have troubles understanding the cooling schedule and more particularly, the part with the variable M. In my understanding M represents the number of iterations after wh... |
It comes from big data perspective. Basically, many frameworks (like Apache Spark) "compensate" lack of relational operations by providing Functor/Monad-like interfaces and there is a similar movement towards cats-to-SQL conversions (Slick in Scala). For instance, we need natural join (assuming no repetitions on indexe... |
I am fine-tuning the inception-v3 network(pretrained on ILSVRC) of tensorflow in a binary classification problem. I want to recognize if an image contains food or not. My dataset is imbalanced, the non-food class contains 5 times more images than the food class. I read that in an imbalanced dataset, I should train the ... |
The real-world problem I'm trying to solve is to create an algorithm which finds the ideal channels where I can transmit radio traffic, inside a radio frequency band that could contain various disturbances. These n ideal channels are those who are furthest away from any of the disturbances, but also the furthest away f... |
I'm given the following language:
L = {w∈{0,1}* | w ends in 010 and contains 011}
The task is to find a regular expression R that describes this language and prove L = L(R).
I have found the regular expression : ^([011])[01]*010$.
But have no idea how to prove L=L(R)?
|
I have gone through this particular problem in hackerrank.
You are given an array of $n$ integers, $a_0, a_1, a_2 , \ldots, a_n$, and a positive integer $k$. Find and print the number of pairs $(i, j)$ such that $i < j$ and $a_i + a_j$ is evenly divisible by $k$.
I wanted to make this work in $O(n)$ time. After lots... |
While doing some bibliography on term-rewriting, I often found these two properties to define a term rewrite rule (see for example here and this one):
A term rewrite rule is a pair $\langle l,r\rangle$ of terms, written $l \rightarrow r$, such that
1) $l$ is not a variable
2) all variables in $r$ occur also in $l$.
I... |
For the purposes of this question, please forget about computers being unable to perform as expected due to excess workloads, exceeded capacities, or general bad hardware/devious software (e.g. a calculator programmed . I'm only concerned with a perfectly "healthy" computer's not what was expected of it.
What are some ... |
I have been studying compilers for a while, and I have been searching what's meant by "context" in grammar and what it means for grammar to be "context-free", but with no result.
So can anyone help with this ?
|
I am stuck with the following task:
Show that the Decision Problem "Vertex Cover" is polynomial-time reducible to the Decision Problem "Binary Integer programming".
I have the feeling that there must be a very easy way.
My approach until now:
We can convert any decision problem to an optimization problem in polynomial... |
Given this algorithm:
int foo(int num) {
if (num == 0){
return 0;
} else {
return 1 + foo(num/10);
}
}
Me and my friend are debating how you should treat "N" as the size of the input.
If I'm considering N to be the number of digits: then my analysis will say O(n)
However, if I'm considering... |
I honestly haven't an idea how to proof that eventhough I can understand the background, could someone help me?
|
How do you search related works for your papers? To be concrete I have implemented few techniques of indirect call promotion for pure C and want to share my results. But at first I want to understand if there are some existing papers about it.
I searched with Google, Google shcolar, citeseerx, microsoft academic search... |
Let's us the following definition:
Tu·ring test noun
A test for intelligence in a computer, requiring that a human being should be unable to distinguish the machine from another human being by using the replies to questions put to both.
Also observe from Wikipedia:
The Turing test is a test, developed by Alan Turing... |
Expert systems seem to have been left at the wayside a little bit in the 21st century. In fact, expert-systems was not even a tag on this site (until I just created it). The traditional focus in expert systems has been on rule based systems and logical resolution via, for example, 2-SAT backward chaining. Have there be... |
Trying to learn more about compression techniques and found something in the wikipedia article on arithmetic coding that I'm not sure I fully grok. In describing how Huffman Coding can sometimes be inefficient, the author refers to an 'optimal compression ratio' that seems to be a function of the probabilities of a giv... |
In the article http://floating-point-gui.de/errors/comparison/, a method for comparing floating-point numbers is suggested:
There is an alternative to heaping conceptual complexity onto such an apparently simple task: instead of comparing a and b as real numbers, we can think about them as discrete steps and define th... |
I have found in a book the example of how to make a FA that accepts those numbers that are divisible by 3, that means that n mod 3=0. In the example the author used the binary representation of the number to be evaluated. The resulting automata is:
The states represent the probable remainders, that could be 0, 1 or 2.... |
I have a question about the logic circuit performing the division ( http://userpages.umbc.edu/~squire/cs313_l20.html ).
I implemented it to some software but does not work.
I drew the schematic circuit blocks of four CAS (2x2). Drawn circuit implements the division number of 3-bits by the number of 2-bits.
I'm interest... |
Here you can find the following lemma with its proof.
Lemma: In a network with unit edge capacities,
Dinitz algorithm terminates after $O(\sqrt{m})$
blocking flow computations.
Proof:
Consider the layered network after $\sqrt{m}$ iterations.
It has at most m edges. The average number of
edges between any two layers is ... |
If, for example, there is a problem B which have exponential time verifier - a verifier that verify on exponential time - Does it 100% means that B decidable?
On one hand I thought - If there is a verifier - why can't I just decide for each input - using the verifier? On the other hand - from what I know - if it doesn'... |
I'm designing an in-place sorting algorithm to sort a collection of size $n$. Near the end of the sorting, it may end up with with $\log{n}$ sorted sub-sequences of size $\frac{n}{\log{n}}$. At this point, I use a very simple $k$-way merge algorithm that merges the sub-sequences pairwise until everything has been merge... |
I'm learning natural language processing and I can't understand the difference between Shift-Reduce parser and LR parser.
As I've understood from Wikipedia, shift-reduce is just a name of a class of parsing algorithms which includes LR, LALR, SLR and other. But some articles describe algorithm of shift-reduce parsing ... |
Given the following definition of binary search tree:
$$\text{size}(t)=\cases{0\qquad\qquad\qquad\qquad\qquad\qquad t=\text{ null}\\
1+\text{size(t.left)+size(t.right)}\qquad\text{otherwise}}$$
for each vertex in the tree t.size contain the size of it's subtree
Write an algorithm selection(T,i) that gets a Tree with ... |
I am trying to find out from this visualization how does the AVL trees work. But I am not able to find out how is the algorithm choosing which vertex is the right one to use as "partial root".
The simple rotation is actually very simple, but when it comes to the double rotation it is much worse.
There are some tricks... |
Is there a technical term for a pair $(u,v)$ of algorithms, such that $u$ and $v$ have an identical output for each input (I include the option if not halting as a possible output), but they have different complexity (either time or space) as a function of their input?
An example of such a pair is (bubble sort, quickso... |
I'm trying to be ahead of the game by studying some Theory of Computation concepts before class starts at the end of this month. There's this question I came across that I don't understand below.
Let L be the language defined by the regular expression:
(c U ab U b)*bb(c U ab)
(U = union)
A. Write 10 distinct string... |
How can I prove this language is regular using just closures and homomorphism?
$$
L = \{a_1b_1a_2b_2\dotsm a_nb_n \mid a_i \in L_1 , b_i \in L_2\}
$$
and we know $L_1$ and $L_2$ are regular.
|
I'm given a B-tree where the delete-operation is not implemented, but instead keys are deleted using tombstones (so they stay in the tree, but are marked as deleted). Now when at least 90% of all keys are tombstones and there are less than 400 active (so non-deleted) keys, the B-tree is completely replaced by a new one... |
I'm relatively new to type theory and dependent programming. I've been studying the calculus of constructions (CoC) and other pure type systems. I'm particularly interested in using it as a proof-preserving intermediate representation for a compiler system.
I understand that (co-)recursive types are representable, comp... |
It is my understanding that quantum computers have gained interest, because some interesting problems are suspected to be in the BQP-class, but not in the P-class (integer factorization, ...). Quantum computers would then be able to solve these problems efficiently, while classical computers are not.
However, I'm wonde... |
I have the following question. Is the SAT solvers are deterministic?
I mean, for example, about miniSAT and DPLL algorithm. Are they completely deterministic?
If these algorithms will return unSAT it means that certainly the solution does not exist?
|
Are there any known algorithms for formulated problems that require a SPACE complexity of O(sqrt(N))? I know that algorithms with that big-O time complexity exist.
|
I'm looking for the most efficient spatial-indexing data-structure for storing and querying bounding boxes which contain individual points. The points represent 2D coordinates on a grid, while the bounding boxes represent regions of the grid. The bounding boxes may vary greatly in size, and multiple bounding boxes may ... |
Trees are pretty linear in nature, since the number of edges is always one less than the number of vertices. Furthermore, the absence of cycles can sometimes drastically reduce the computational complexity of otherwise pretty hard problems. For example, the longest path problem is NP-hard for general graphs, but is eas... |
A middlebox consumes some resources (CPU ticks, RAM, etc.) to process a traffic, e.g., a IDS consume 50% CPU and 20% RAM to process a 100M bps flow.
Here is the problem. 100M bps flow may consume more resource if the flow is processed by a lot computationally expensive rules.
Therefore, my question is that are there an... |
I have a very complicated formula logical (CNF) in the file DIMACS.
The question is as follows. The formula has hundreds of millions of clauses (assume billion) and a lot of variables.
It is a reconstruction of a logic circuit.
MiniSAT returns me the result for the SAT problem very quickly (a few seconds).
Can I increa... |
I am now reading two modern books on machine learning theory. Both of them emphasize that, in order to succeed in supervised learning, one must choose a good hypothesis class. "Good" means that it is sufficiently simple (formally, has a low VC dimension) and that it contains the true hypothesis or sufficiently close hy... |
I have to proof this theorem: "An extendible hashing table always contains at least one bucket where only one pointer points to after an element is added". I made this proof, but I'm not completely sure if it's correct.
Note: The expand-operation on an extendible hashing table works by first doubling the pointer array.... |
I'm trying to understand the NFA and $\epsilon$ moves logic.
Let's say there is an NFA $A$ with $\epsilon$ moves,
if $\epsilon ∈ L(A)$ then $q_0 \in F$? and vice versa? If $\epsilon \in L(A)$ then $q_0 \in F$?
How can I prove it?
|
For a property $P$ of languages, which we identify with the set of languages satisfying it, let $L_P = \{ \langle M \rangle \mid L(M) \in P \}$ be the set of descriptions of Turing machines whose languages satisfy $P$.
How can we prove that there's no property $\displaystyle P\subseteq RE $ for which $ L_{P}=K $, wher... |
Suppose we have context-free language and we know the Context-Free-Grammar, how do i found the minimum permanent which is pumping lemma for language ?
for example let sat i have this Grammar:
$$\begin{align}
S&\rightarrow AA\mid B\\
A&\rightarrow 0A\mid A0∣1\\
B&\rightarrow 00B0\mid 1\\
\end{align}$$
whats is the best... |
I wonder how do you clasify S->a (where a is a Terminal Symbol)
It can be right linear,left linear and context free at the same time?
So the only way to distinguish them is to see what productions there are with Non-terminal symbols (like S in this example)
0) If I see S->a it can be (left/right/context-free) impossibl... |
I'm trying to understand how can I sort an array of $n$ elements when only $\log n$ are not in place.
I heard that sorting an array with at most $I$ inversions has complexity $O(n\log(I/n))$. Because there are $\log n$ elements that are unsorted, in my case there are at most $n\log n$ inversion.
The answer to the quest... |
There are known algorithms to find the connected components of a given graph. Those I know are easily extensible to support addition of nodes and edges to the graph and then find the resulting components more quickly than by recomputing from scratch.
What I'm looking for is an algorithm with an associated data structu... |
I wrote a program to check the similarity of 40 documents. Firstly i use exact Jaccard method and secondly Minhash Jaccard method. I consider that the 2 methods differ if their values are differ more than 0,1. I also run the program for permutations 10,40,100,200,450. Which Jaccard limit must i choose to consider 2 doc... |
The time hierarchy theorem states that
$DTIME(f(n)) \neq DTIME(f(n)\log(f(n)))$
(Let me acknowledge that this statement isn't 100 percent accurate because f must be "time constructible" and potentially other things that I'm missing)
If we were to take some function f, we can consider
$DTIME(f(n)) \subset DTIME(f(n)\... |
I was reading above complexity classes from Formal Languages and Automata book by Peter Linz.
It gives following facts (in Theorem 5.2):
Consider we have a CFG without null or unit productions. For parsing a string w, if restrict ourselves to leftmost derivation, we can have no more than $|P|$ sentential forms after ... |
For given two lists $[s_1, s_2, ... s_n]$ and $[t_1, t_2, ..., t_m]$
I need to implement DTW algorithm with one extra constraint:
If $s_i$ is matched with $t_j$ then the next element $s_{i+1}$ has to be matched with some $t_{j+k}$ close enough to $t_j$ (i.e. $0 \le k \le W$ for some fixed window size $W$).
This constra... |
An array or vector is just a sequence of values. They can surely be implemented with a linked list. This is just a bunch of nodes with pointers to the next node.
Stacks and queues are two abstract data types commonly taught in Intro CS courses. Somewhere in the class, students often have to implement stacks and queue... |
I read a previous question,
Is a secondary TM sufficient to detect all loops?, which asks if there is a TM1 that takes the description and input of any other TM2 to detect if TM2 will loop for the input.
One answer was to run two copies of TM2, the second at 1/2 the speed.If the second machine ever reaches the same con... |
I have a basic question, but I cannot find an answer anywhere on the Web. I have the following grammar rules:
S -> if C ;
C -> O < O
O -> O + i
O -> i
The part than I`m interested in is at rules 1,2 and 4.
I have calculated First(O) = {i, +} and Last(O) = {i}.
So, First(C) = {i,+,<} and Last(C) = {<, i}.
Also, if <*... |
According to these notes, DFS is considered to have $O(bm)$ space complexity, where $b$ is the branching factor of the tree and $m$ is the maximum length of any path in the state space.
The same is said in this Wikibook page on Uninformed Search.
Now the "infobox" of the Wikipedia article on DFS presents the following... |
I wanted to know what are randomized algorithms and what are some of their uses?
When do you think they outperform "standard" algorithms?
|
I'm looking for an algorithm that can partition a rectangle into N smaller rectangles, at random. N will be small (on the order of 5-10 in most cases). It need not be uniformly at random, but at the very least, I'd like to avoid algorithms which completely exclude interesting classes of partitions.
One algorithm I've c... |
On-chip multithreading is considered a powerful performance enhancer technique that enables a processor to handle multiple threads at the same time. If I got the idea right, multithreading avoids pipeline stalls by processing instructions coming from different threads - since no data dependencies exist between differen... |
Well I guess it is only a matter of definition but I've failed to find certain answer to the following question:
In a Petri net if transition has k inputs and zero outputs what is considered to happen when transition fires? Do we have just k - 1 token left and then just transition is not enabled?
|
I have 50 documents and im using LSH+Minhashing Jaccard and i get this results:
for bands:25 -> false positives: 200
for bands:10 -> false positives: 80
for bands:2 -> false positives: 28
for bands:1 -> false positives: 4
Can anyone explain me why im getting more false positives for bigger number of bands and while d... |
I need to find the intersection of the internal tangents of two point sets $V_a, V_b$ in $\mathbb{R}^2$, defined via their convex hulls. We can assume that the sets are disjoint and linearly separable, so I think the internal tangents are uniquely defined as the two lines which are tangent to each of the convex hulls o... |
I have conducted two surveys on French political preferences. As half of each sample (of ~1000 persons) gave a satisfactory margin error, I have randomly displayed (or not) several questions. Now, I have an incomplete dataset of the preferences of the sample over many political propositions (I can provide it if needed)... |
The textbook The Nature of Computation uses the following definition of quasipolynomial time:
A quasipolynomial is a function of the form $f(n) = 2^{\Theta(\log^k n)}$ for some constant $k > 0$, where $\log^k n$ denotes $(\log n)^k$. Let us define QuasiP as the class of problems that can be solved in quasipolynomial... |
Let's say that I have $N$ data sets where I have data points at some fixed frequency, such as "daily".
What would be a good method for finding correlation between any of the data sets, or choosing a single data set, and asking what other data sets are most correlated?
To make it less abstract, imagine that I'm logging ... |
Say I have the following intsruction represented in a number of languages:
| Language | Instruction |
|----------------------------+----------------------------------------------------------|
| English | ... |
I recently learned about Q-learning, a reinforcement learning technique that directly estimates the expected value of taking an action in a state.
One of the difficulties I see with iterative update techniques is how to set the learning rate hyper parameter. Depending on the environment, a high or low learning rate cou... |
My question is - is there a semantic natural language processing that tries to understand the meaning of the texts and that tries to derive the consequences of the understood meaning? Is there a universal knowledge base that can be used for the "grounding" of the texts?
I have heard a lot about statistical NLP and NLP ... |
With $hash_n$, I mean a standard cryptographic hash like sha256, scaled up to have arbitrary length $n$ of its output with the same underlying principles. What is the time complexity class of the following problem?
Given an $n \in \mathbb{N}$ and data $d$ with $length(d) = n$, determine whether $\exists p : ((length(p... |
A lot of research and engineering effort is put into finding fast methods
to sort an array of integers; e.g., Java's runtime library has highly-tuned
methods to sort arrays of each primitive type (see java.util.DualPivotQuicksort).
What are real-world applications of these methods?
What are algorithms that build on pla... |
What are the differences of ground terms in first-order logic and higher-order logic?
I found on the Wikipedia: "In mathematical logic, a ground term of a formal system is a term that does not contain any free variables."
That mentioned "free variable" is the same thing with free variables of $\lambda$-terms?
I know th... |
I know that the following problems related to Hamiltonian paths in graph are NP-complete:
Undirected Hamiltonian circuit:
Given an undirected graph, does it has a cycle that passes through
each node exactly once?
Undirected Hamiltonian path:
Given an undirected graph, does it has a path that passes through each node e... |
I am trying to understand why the formula
$$ \frac{\log(1+x)}{(1+x)-1} \times x,$$
which simply reduces down to $\log(1+x)$, is considered as more stable to compute than $\log(1+x)$. In my head it doesn't make sense to me as my brain automatically simplifies it to $\log(1+x)$, which I am guessing a computer doesn't do... |
Assume a CPO $Q,\leq$ and a Scott-continuous function $f : Q \rightarrow Q$. As it is known, the chain $\bot \leq f(\bot) \leq \ldots \leq f^n(\bot)$ (where $f^n$ denotes the function $n-1$-times composed with itself) leads to a fixed point of $f$.
It is also clear, if $f$ is inflationary, that for any $q \in Q$, the c... |
What's the difference between Computer Science and Computer Programming? I've spent nearly all my experience with compsci writing programs and what not, and I certainly like it, but I feel like there's a higher level I could pursue, like the ideas precede concrete programming.
I suppose my question is, what does it mea... |
How can we prove that the language $COF=\{M\mid L(M)\text{ is cofinite}\}$ is m-complete for the class $ Σ_3^0$ ?
I have shown that $COF\inΣ_3^0$ but I can't prove that $COF$ is m-hard for $Σ_3^0$ which means that every other problem $L\in Σ_3^0$ satisfies $L\leq_m COF$.
|
The Wikipedia article on complex instruction set computing says
Before the RISC philosophy became prominent, many computer architects tried to bridge the so-called semantic gap, i.e. to design instruction sets that directly supported high-level programming constructs such as procedure calls, loop control, and complex ... |
Forgive me for my brief knowledge on hash functions as I am not from a computer science background, however I am researching password security for my thesis and have been looking into hashing functions for password security. I understand that a password goes through a hashing function and is stored in a separate databa... |
Was analysing old exam, still, even in home condition can answer this:
Determine which of the following languages over the alphabet $\{a,b,c\}$ are context-free. Prove the claim.
(a) $L_1 = \{a^nb^mc^k \mid n \leq m \leq k\}$,
(b) $L_2 = \{a,b,c\}^* \setminus L_1$, that is, $L_2$ is the complement of $L_1$ from (a).
... |
I have theorised a indexing algorithm (like a B-tree).
However, there's a mental block stopping me actually implementing it.
The algorithm comes in to forms:
form 1:
A look up time of O(1) to O(log2(n))
Each value in the index will have metadata associated to it that is of the size log2(n)*memory address size
form 2:
... |
Given a language:
$L = \{\; a_1b_1a_2b_2a_3b_3\dots a_nb_n \mid \forall i: a_i,b_i \in \Sigma, a_1\dots a_n \in L_1\ , b_1\dots b_n \in L_2 \;\}$
Also $L_1, L_2$ are regular languages.
Using closure only (homomorphism) prove that L is also regular language.
I think there can be a mapping $h\colon (L_1 \cup L_2) \to ... |
Consider a library, that is used by different programs. Under certain (unknown) circumstances, an error can occur. I want to feed execution traces of faulty programs to some kind of an algorithm / framework so it learns about the "pattern" which led to the error. It should then, when fed a live trace, detect when that ... |
What is the simplest possible way to calculate the coordinates of the center and the radius of the circle on the image (for example BMP and I'm interested in image of the Sun included below)?
|
Suppose a CSP has $n$ variables with finite domains of maximal size $d$. Furthermore, all constraints on the variables are binary. Can such a CSP be solved in polynomial time in $n$ and $d$?
This was an exam question on last year’s AI exam, but I’m not sure how to solve it.
I know the problem of graph coloring is eas... |
Suppose two equal-length lists of double precision numbers $A=(A_1, \ldots, A_N)$ and $B=(B_1, \ldots, B_N)$. Given a constant, $\epsilon > 0$, I want an efficient algorithm for finding 4-tuples of the form $(A_a, A_b, B_c, B_d)$ for which $|A_a + A_b - (B_c + B_d)| < \epsilon$.
One thing you could do is form the sum s... |
Given a vector of positive integers $A=[a_1, \cdots, a_n]$, where $\sum_{1 \leq i \leq n}a_i = n(n-1)$ and $a_i \geq a_j$ iff $i \geq j$, I am interested in encoding the vector, maintaining the following conditions,
The result of encoding is unique, i.e. the encoding of two different vectors cannot be the same.
The re... |
Let SHAM3 be the problem of finding a Hamiltonian cycle in a graph $G=(V,E)$ with $|V|$ divisible by 3 and DHAM3 be the problem of determining if a Hamiltonian cycle exists in such graphs. Are DHAM3 and SHAM3 $\mathcal{NP}$-hard?
What I tried is I proved that the problem of finding Hamiltonian cycle is in $\mathcal{... |
I was reading the first chapter of Robert Harper's Practical Foundations for Programming Languages in which it introduced abstract binding trees, aka abt. It seems pretty like typed lambda calculus.
There are ground sorts, which are similar to ground types in typed lambda calculus.
There are abstractions; they accept ... |
There are two important theorems about LR(k) grammars and DCFL. Mentioned here.
A language has an LR(1) grammar iff it is DCFL.
A language has an LR(0) grammar iff it is DCFL and has prefix property.
I have counter example for 2nd theorem, plz see if it is valid counterexample.
(Ofcourse its not valid and I am wrong,... |
Could you find an example of a complete $\mu$-recursive function that is not a primitive function?
|
An high level language such as C has many statements for decision and loops while an assembly such the MIPS' one has few. With slt, slti, beq, bne it can create all conditions. What are the advantages and disadvantages of reducing the decision statements?
|
To my knowledge, lots of languages can be classified as undecidable after applying Rice's theorem, for example {"M" | L(M) is regular}.
But what I am not sure is, how to determine if a language is enumerable after applying Rice's theorem? I reckon we can examine that whether the M halt on some specific input, i.e. test... |
Given a directed graph $G=(V,E)$ with a node labelling function $l:V\rightarrow L$, how would you encode this best for a neural network?
If it simplifies the problem, we can add the following assumptions about $G$:
$|V|$ is of fixed size $n$.
Every node $v$ in $V$ has exactly two successors.
$l:V\rightarrow L$ is inje... |
I was applying state equivalence algorithm in this diagram.
On input a and b Q1 and Q2 are going to different states. Which implies the states are not equal according to the state equivalence algorithm. But they are equal and we knows that , right ? Where am I going wrong ? Please help me how to prove these state are... |
How can I prove that for every NFA with $\epsilon$ moves if $q_0 \in F$ then $\epsilon \in L(A)$? I can't think of any technique since it seems so trivial.
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.