instruction stringlengths 35 29.1k |
|---|
Suppose the task is to make an LL(1) grammar for postfix operations, where the only operation is ternary.
Obvious approach is
$N$ - number
$O$ - operation
$S$ - expression
rules:
$S \rightarrow SSSO \mid N$
This grammar is obviously not LL(1), and refactoring it (removing left recursion and right branch... |
I'm still insecure in the section decidability (no proof needed, I want to divine it):
X is decidable and Y is undecidable. Is the intersection of X and Y decidable or undecidable?
X is decidable and Y is a partial quantity of X. Is Y decidable, too or not?
Thanks!
|
My Computing teachers talk about data duplication and data redundancy in terms of databases as different things, but I'm struggling to differentiate them. The context is database normalisation, and in particular why the third normal form is important: because it eliminates data duplication and redundancy. But as far as... |
I have read that true LRU page replacement requires significant hardware support, so only approximation of LRU is implemented for page replacement.
So I wanted to contrast LRU that is implemented for cache, and that for page replacement. Like - Is LRU properly implemented for cache?
|
Informal Problem Statement:
Given a string, e.g. $ACCABBAB$, we want to colour some letters red and some letters blue (and some not at all), such that reading only the red letters from left to right yields the same result as reading only the blue letters.
In the example we could colour them like this: $A\color{blue}{C}... |
Suppose you have the following game:
There are infinitely many counters $\{c_1,c_2,\ldots\}$, all initialized to 0.
In each step, you may choose a counter $c_i$ and increase it's value by 1.
Unfortunately, every $T$ steps, each counter that has a positive value is decremented by 1.
Also, the values of the counters are ... |
I would like to clarify this because I see some kind of contradiction between Rice's theorem and Turing completeness.
This is the problem:
In building an Universal Turing Machine to emulate another Turing Machine, how can we be sure that we are indeed simulating it? ('sure' in the sense of being computationally verifie... |
I have a matching algorithm that is based on making an comparison score. This score is divided into parts.
Example:
5 - Points for attributes (lets say they have 3 common attributes, would the score be ((3/5)*5) = 3 Points
5 - Points for location
10 - Points for content
Theses points are just something i have set thoug... |
I am currently reading the book of Arora and Barak on computational complexity.
In the third chapter (p69-70), two classic theorems regarding time complexity hierarchies are introduced:
$\left[f(n)\log(f(n)) = \mathcal{o}(g(n))\right] \Rightarrow \left[DTIME(f(n) \subset DTIME(g(n))\right]$
$\left[f(n+1) = \mathcal{o}(... |
I have one question about policy function in Reinforcement learning.
in fact this function indicates which action should be done in each state? Or
this function indicate for get the specific reward in each state, which action shoud be selected?
or something else?
|
i get stuck in one sentence in machine learning.
i read tom Mitchel book on ML, and some other materials.
if we have small training set, always over-fit can occurs? or is likely to occurs?
i read lots of material but i'm not sure that which of my fact will be correct.
any solution or idea?
|
As i See in ML Course a VC dimension calculation is very theoretical.
What is the VC-dimension of intervals in R?
The target function is specifieed by an interval, and labels any example positive i it lies inside that interval.
Answers:
VC-dim = 2. A set of two points can be shattered, since there's only a single blo... |
I am running in a conceptual problem in my development which I previously also encountered in the Drupal CMS and was wondering what would be the best solution to circumvent the problem.
Drupal, and my own Snap Websites software, make use of a publish / subscribe pattern where one can write functions that automatically ... |
In Haskell, the Monads type class has the bind operator, which is represented by the symbol >>=
The type of such operator is:
(>>=) :: Monad m => m a -> (a -> m b) -> m b
Why does the function need to be (a -> m b)? Why functions the preserve che inner data type (a -> m a) are not allowed?
Has this choice been made fo... |
Consider the following problem. I have a pattern $P$ of length $100$ and a text $T$ of length $n$. I want to find the minimum number of operations to transform $P$ into $T$. The operations are:
Insert a single character into $P$
Delete a single character from $P$
Substitute a single character in $P$ for another one
... |
Wikipedia says that
Set covering is equivalent to the hitting set problem
What problem is to the set packing problem, as the hitting set problem is to the set cover problem?
Is it that given the ground set $U$, and a collection of its subsets, $S \subseteq \mathcal P(U)$, find a $H \subseteq U$, so that $|H \cap S_i... |
I Take some online class for Machine Learning. one of teacher say this sentence.
if we have m data points, the training error converges to the true error as m → ∞.
i thought, this sentence not always correctly. i think when we assume that the data points are i.i.d this sentence becomes true. but in general it's false.... |
I'm studying (for self-betterment - I don't go to school) the 2nd edition of Compilers: Principles, Techniques and Tools by Aho et al. I'm not sure how to do Exercise 2.4.1 (b), which is to construct a recursive-descent parser, starting with the grammar:
$S\to S(S)S \mid \epsilon$.
It seem to me that the simpler gramm... |
I have a list like this:
1*0*0
1**0*
0*0**
001**
Where the number of elements in each row is $n$ and * is a wildcard for 0 or 1. I need a polynomial-time algorithm that can determine if there exists an $n$-bit number that does not equal any of the rows. Does anyone know of an algorithm that could do this? I've been th... |
An equivalence relation on a finite vertex set can be represented by an undirected graph that is a disjoint union of cliques. The vertex set represents the elements and an edge represents that two elements are equivalent.
If I have a graph $G$ and graphs $G_1,\dots,G_k$, we say that $G$ is covered by $G_1,\dots,G_k$ if... |
The book Computational Complexity: A Modern Approach by Arora/Barak provides the following:
Theorem 1.10
There exists a function $UC: \{0,1\}^* \to \{0,1\}$ that is not computable by any TM.
Theorem 1.11
HALT(The halting problem) is not computable by any TM.
Table 1.7 that shows how Theorem 1.10 can be proved using di... |
Forgive the naïveté that will be obvious in the way I ask this question as well as the fact that I'm asking it.
Mathematicians typically use $\exp$ as it's the simplest/nicest base in theory (due to calculus). But computers seem to do everything in binary, so is it faster on a machine to compute 2**x than Math::exp(x)?... |
It is known that for the number $c(n)$ of phrases / tupel of the LZ compression for binary words of length $n$ the following relation holds:
$$c(n)\leq\frac{n}{(1-\epsilon_n)\log_2 n}$$
With $\epsilon_n\to 0$ for $n\to\infty$.
The proof is made in Thomas & Cover: Elements of Information Theory (Lemma 12.10.1, page 320 ... |
It occurred to many that in all the $\textbf{NP}$-completeness proofs I've read (that I can remember), it's always trivial to show that a problem is in $\textbf{NP}$, and showing that it is $\textbf{NP}$-hard is the... hard part. What $\textbf{NP}$-complete problems are these whose polynomial-time verifiers are highly ... |
In cooperative coevolution algorithms, a high dimensional vector is broken into smaller vectors, each of which is optimized separately using EAs for fewer dimensions and then recombined.
What is the fitness function used to optimize those?
It can't be the same benchmark function, as those are for higher dimensions.
I a... |
I an brushing up on Dijkstra (specifically Wikipedia's pseudocode) and can't resolve this counter example. I want the shortest path between A and E. I would move from A to C to D, where D would have a cost of 105. Once I mark D as visited I no longer have an opportunity to find the correct path A to B to D to E. What a... |
I am new to the field of text mining. Could not figure out what to search on google so am here for the same help.
When we talk of approximate / fuzzy string match. searching for RAT would give RAAT too. i have used utl_match.edit_distance in oracle. searching for BAAT would give BAT. but if i search for RAT. it would ... |
The supercomputer I am researching has 2.2 petaflops and boasts total memory of 1000 terabytes and disk space of 23.5 petabytes.
Is this more computing power than the total of the entire worlds computing power 10 years ago (2004)?
|
I find lots of solution where you have an Automata and a input string , you can validate whether input string is accepted by automata or not.
Can we do the reverse ?
I am looking for solution which generates few possible inputs (not all) accepted by automata(NFA/DFA).
One of the Brute-force approach can be to randomly ... |
These two seem very similar and have almost an identical structure. What's the difference? What are the time complexities for different operations of each?
|
I want to prove that Mixed Quantified Horn SAT is a PSPACE-complete problem. I have proved that it is PSPACE-hard. How can I prove that it is in PSPACE?
My study:
To prove QSAT to be in PSPACE: Generate a boolean tree or circuit and evaluated it in O(n) space.
Similarly, it has been done for the "Geography " problem ... |
This figure says according to moore's law number of transistors doubles about two years. but clock speed, power flattening after given stage. can anyone describe the reasons this flattening in clock-speed. Why can't we increase the clock speed more and more?
|
So, I was analyzing the Calibron 12 puzzle and to me it looks like a bin-packing problem. Is this puzzle actually a bin-packing problem and thus NP-hard for the perfect solution?
Basically, you can make your own calibron 12-ish puzzle by doing the following:
Take a rectangular piece of wood. Cut the wood into randoml... |
I'm looking for a proof to the claim stated in the title:
if $L\in NP\cap Co-NP$ is $NP$-Hard, then $NP=Co-NP$.
I read the proof from my professor's recitation, but couldn't understand it, and I was hoping to find more easy-to-understand version of that proof.
It goes something like that:
Let $L\in NP\cap Co-NP$ be an ... |
I came across a proof that an AVL tree has $O(\log n)$ height and there's one step which I do not understand.
Let $N_h$ represent the minimum number of nodes that can form an AVL tree of height $h$. Since we're looking for the minimum number of nodes, let its children's number of nodes be $N_{h-1}$ and $N_{h-2}$.
Proof... |
I have pairs of "similar" values $(x_i, y_i)$ drawn from a space $x_i, y_i \in S$, and want to train a neural network $N$ such that $N(x_i)$ would be "close" to $N(y_i)$ for all $i$, yet, to make it useful, the overall image of $N$ would be as spread apart as possible. Note that the training data says which values are ... |
I read Computational Complexity of interacting electrons
and fundamental limitations of Density Functional Theory. In appendix, it is claimed that
In the following, we show that approximating the
ground state energy using the Hartree-Fock method is
an NP-complete problem
As far as I know, if a problem being NP-... |
I have an ordered set of $M$ software modules compiled together. The interaction of some $N$-tuple of these modules is causing a bug when the program is run.
I can run the program with any desired subset of the modules enabled/disabled, so I can test the program by running it with a certain subset of modules enabled a... |
In a sensor network graph $G = (V,E)$
$V = \{1,2,...,n\}$ is the set of sensors and the edge $(i,j)$ denotes that sensor $i$ and sensor $j$ are inside each other's sensing range. The weight of that edge denotes the Euclidean distance between the corresponding sensors.
The problem is in 2D.
Our goal is to fix the positi... |
My question is the following: How to calculate the regret in practice?
I am trying to implement the regret matching algorithm but I do not understand how to do it.
First, I have $n$ players with the joint action space $\mathcal{A}=\{a_0, a_1,\cdots,a_m\}^n.$
Then, I fix some period $T$. The action set $A^t\in\mathcal{... |
I've found many articles describing iterative procedures to reach Byzantine agreement on a graph (for instance http://www.crhc.illinois.edu/wireless/papers/icdcn14-vaidya.pdf or http://arxiv.org/pdf/1203.1888v1.pdf) but they all assume that a fraction of the peers aren't faulty or malicious.
Are there procedures to rea... |
Are there any tutorials on YouTube or good text tutorials on designing expanding opcodes? I always make mistakes on switching from one line to another and "counting" in binary. I pretty much know how to design them, but I don't really understand it and I make so many mistakes. I also don't have any examples to go by an... |
From Wikipedia,
a finite matroid $M$ is defined to be $(E,F)$, where $E$ is a finite set and $F$ is a family of subsets of $E$, so that it satisfies
either nonempty, the hereditary property, and the augmentation property:
or an accessible system, the augmentation property, and the interval property without lower b... |
Is there an efficient way to find the longest path between any two nodes in a tree. Given that edges can have negative weights. I know about the diameter problem which finds the longest path in a graph with edge weights 1 but that won't work here.
All I can think of is going for a $O(N^2)$ approach with LCA but thats a... |
Using the Earley vector as a recognizer is quite straightforward: when the end of the string is reached, you just have to check for a completed axiomatic production started at position 0. If you have at least one, then the string is accepted.
Using the Earley vector to reconstruct the parsing tree(s) is less obvious. A... |
I have two line segments $[(x_1, y_1),(x_2, y_2)] $ and $[(x_3, y_3),(x_4, y_4)] $ and I want to know if they intersect.
My current algorithm tries the following:
the line $[(x_1, y_1),(x_2, y_2)] $ is determined by
$\boxed{f(x,y) = \frac{y - y_1}{x - x_1} - \frac{y_2 - y_1}{x_2 - x_1} = 0}$.
I reasoned that if $y =... |
The title says it all: I have seen three functions so far, that seem to be the same / similar:
error function
criterion function
cost function
objective function
I am currently working on classification problems.
$$E(W) = \frac{1}{2} \sum_{x \in E}(t_x-o(x))^2$$
where $W$ are the weights, $E$ is the evaluation set, ... |
I'm trying to do a homework problem which references "disruption" in Genetic Algorithms.
True or false? For 1-point and 2-point crossover, the schemata
which have bits that are close together on the string encoding
are more likely to be disrupted by crossover.
I think that it is referring to is th... |
Given flat data like this:
01001, Butter, salted
01002, Butter, whipped, with salt
01145, Butter, without salt
04601, Butter, light, stick, with salt
04602, Butter, light, stick, without salt
What's the best approach to convert into this:
Butter (01001, 01002, 01145, 04601, 04602) -> salted (01001)
... |
Assumptions:
given a graph with N nodes, and two specific nodes A and B
the graph is undirected and no edge has a negative cost
there exists at least one Hamiltonian path with A and B as an end points
Is there a way to find the shortest path from A to B that passes through all the other points?
Note: I'm only conce... |
I'm a beginner in the field of pattern recognition and computer vision. I'm working on a project right now to classify t-shirt patterns into three categories i.e. solids, stripes and checks. I have close up training images of the t-shirt images. A sample shirt image looks like this
I have looked at a bank of gabor fi... |
we learned that for every type 2 grammar G exists a PDA A with L(A) = L(G). But does for every type 3 grammar G exist a PDA A_G with L(A_G) = L(G)? I think it does, because type 2 grammar is a subset of type 3 grammar. Am I wrong?
|
This problem came up in a graph network routing context, it can be expressed as follows:
Let $n, m > 0$ be integers. Find any smallest list of positive integers $\langle a_1, \cdots, a_k \rangle$ such that:
$$1 + \sum_{i = 1}^k \prod_{j = 1}^i a_j = n$$
With the added condition that $a_i \leq m$ for all $1 \leq i \leq... |
I have a intuitive question on the convergence of $Q$- learning. In $Q$ learning for each step a $Q$- value is learned for the state-action pair where the action is selected according to the $\epsilon$-greedy policy determined by $Q$ values.
Now my question is due to $\epsilon$-greedy policy (i.e. due to exploration) ... |
How do you most efficiently combine boolean functions with a large number of variables using AND, OR, and NOT? The most up-to-date work that I can find on this subject is about 20 years old (Efficient data structures for Boolean functions). Which search terms should I be using to explore this question?
Edit:
I am sta... |
I'm looking at a proof that says that:
If $M_1=(Q_1, \Sigma , q_1, A_1, \delta)$ and $M_2=(Q_2, \Sigma , q_2, A_2, \delta)$ are two finite automata(FA) then $M=M_1 \cup M_2$ is also an FA. We define $M=(Q, \Sigma , q, A, \delta)$ where $Q=Q_1 \times Q_2$, $q_0=(q_1,q_2)$ and $\delta((p,q),\sigma)=(\delta(p,\sigma),\del... |
Given two integers $x$ and $n$ in binary representation, what is the complexity of computing the bit-size of $x^n$?
One way to do so is to compute $1+\lfloor \log_2(x^n)\rfloor=1+\lfloor n\log_2(x)\rfloor$ by computing an approximation of $\log_2(x)$ with sufficient precision. It appears that computing $\log_2(x)$ with... |
We know Bellman Ford is an algorithm to find the negative cycle.
And here is the algorithm for Bellman Ford
Input: Given a graph G(V,E) and w(e) is weight
Output: Return Yes if negative cycle exists.
1: set d(s) = 0 and d(v) = 1 for all v (- s
2: for i = 1 ... n-1 do
3: for every edge (u, v) in G do
4: if ... |
As an A-level Biology student, I have thought a lot about the links with Biology and Computer Science, and something that often comes to mind are the links between Immunology and Computer Security/Viruses. For example, I (through reading about how the anti-virus programs work) decided that the way the immune system han... |
What is the importance of Alan Turing? What were his inventions or innovations and why are they so influential?
|
In a paper I am writing I want to make distinction between (1) string consisting of any characters and (2) string consisting of a chain of words from known language, with possible delimiters. My intuitive idea is to simply use string for meaning (1) and text for meaning (2). It sounds a bit naive, but this terminology ... |
I understand what a B-Tree is (I already implemented a B-Tree in Java with insert and delete methods that preserve the invariant).
However I do not understand exactly how it is used for example for file systems or databases.
How do you choose the keys in these 2 scenarios? And what is the data?
Are data and keys the ... |
Let's assume we have given a two dimensional cellular automaton with an initial configuration where alls cells are in an quiescent state, expect for one square of cells. Let $n$ be the number of cells in that square. We want to synchronize all cells in the square, so we basically want to solve the firing squad synchron... |
I've been watching the sicp videos lectures by Hal Abelson and Gerald Jay Sussman and am lost on lecture 3b. Can someone explain to me what's going on in this video?
https://www.youtube.com/watch?v=X21cKVtGvYk
What is numerical approximation vs exact expression?
|
I am trying to understand the DP solution to the basic knapsack problem.However even after reading through a variety of tutorials ,its still beyond my comprehension.I am taking an algorithmics course and need to solve questions based on the classic knapsack problem.However unless I understand the classic problem clearl... |
C++ initially had "readonly" and "writeonly" qualifiers, before "readonly" was renamed to "const", and "writeonly" removed. My question is: What are the problems with "writeonly" (or a "sink" qualifier)?
There are (non-object oriented) programming languages with "in", "out" and "inout" qualifier for functions argument... |
I recently attended a lecture on an introduction to computation complexity and I am looking to find out more, I haven't studied computer science or discrete mathmateics at university and I was wondering if anyone could recommend any relatively simple books or reading material that could help me understand the topic mor... |
The master method allows us to solve certain recurrences of the form
$$T(n) = aT(n/b)+f(n)\,,$$
where $a\ge1$ and $b>1$ are constants and $f(n)$ is a positive function with some further restrictions that aren't important for this question.
The above recurrence describes the running time of an algorithm that divides a p... |
This new paper A Lower Bound for Boolean Satisfiability on Turing Machines by Hsieh asserts an exponential lower bound for a TM time complexity on a problem of finding whether a solution exists to a conjunction of boolean formulas. obviously this problem is not in NP, or it would be a P≠NP proof. But the paper does not... |
The Rabin–Karp string matching algorithm requires a hash function which can be computed quickly. A common choice is
$$ h(x_0\ldots x_n) = \sum_{i=0}^n b^i x_i, $$
where $b$ is prime (all computations are module $2^w$, where $w$ is the width of a machine word). Why is it important for $b$ to be prime?
|
The title pretty much says it: I'm interested in examples of infinite families of non-regular, pairwise disjoint languages whose union is regular.
When is this the case?
Or, from a different perspective:
Given some regular language $L$, I want to find a family languages $(L_i)_{i \in \mathbb{N}}$ such that
$L_i \cap ... |
1) Set B is the finite set of all rules for a particular programming language.
2) Set A is the infinite set of all valid strings of that language and is defined by Set B.
I'm having a problem defining expressing that mathematically.
My so far unsuccessful idea:
Define a set C - the set of all possible strings.
set A i... |
Why is $\text{BPP}=\text{co-BPP}$?
I tried to find a proof online but couldn't.
Can anyone please provide a quick explanation (if it's trivial and I just can't see it) or a link to a proof?
|
I would like to minimize linear pseudo-boolean function
$$\mathrm{obj} = \sum_i c_i \mathrm{sel}_i$$
subject to $$\sum_i c_i sel_i \geq \mathrm{Value} \qquad\qquad(1)$$ where
$c_1,\dots c_5, \mathrm{Value}$ are some constants;
$\mathrm{sel}_1,\dots,\mathrm{sel}_5$ are sort of selector variables, $ 0 \leq \mathrm{sel}_i... |
Consider the following problem:
Let $S = \{ s_1, s_2, ... s_n \} $ be a finite subset of the natural numbers.
Let $G = \{$ $\gcd(s_i, s_j) \mid s_i, s_j \in S,$ $ s_i \neq s_j \}$ where $\gcd(x,y)$ is the greatest common divisor of $x$ and $y$
Find the maximum element of $G$.
This problem can be solved by taking the g... |
In 2007, Barrack Obama was interviewed at Google.
The question was, "What is the best way to sort a million 32-bit integers?" Does the fact that the size range of the integer was specified elude to a different way to sort integers of different sizes (i.e., 64- or 32-bit)?
|
In the Bible, a census is taken of the 12 tribes of Israel:
Simeon: 59,300
Levi: 22,000
Judah: 74,600
Issachar: 54,400
Joseph: 72,700
Benjamin: 35,400
Reuben: 46,500
Gad: 45,650
Asher: 41,500
Zebulun: 57,400
Dan: 62,700
Naphtali: 53,400
In the book of Deuteronomy 27: 12-13, the tribes are partitioned into two groups, t... |
I'm a self-taught programmer and have been coding for 8 years. Due to this experience, I'm already very familiar with the principles of programming (such as if-statements, classes, polymorphism, etc.).
However, I never learned "computer science," only programming. What are some good resources for someone in my position... |
There are well-known algorithms LICM, and they work well.
Unfortunately, there are certain cases when these optimizations can cause runtime failures with code that was initially correct.
Consider the following example:
read a
read_array bs
for (b in bs) {
if (a != 0) {
c = 5 / a
print b * c
}
}
... |
Definition: A renamable Horn formula is a Boolean formula that can be transformed into a Horn formula by flipping the polarity of every instance of one of more of its variables.
Example:
$\qquad (x_1 \lor x_2 \lor x_3)\land (\lnot x_1 \lor \lnot x_2 \lor x_3)$
This formula is renamable Horn because flipping the pola... |
Before asking this question,I had gone through Equivalence of NFA and DFA - proof by construction
but my question is a bit different from that. I was reading Michael Sipser's Introduction to Theory of Computation and I came to a problem. I couldn't understand as to how he is taking his act on equivalence between NFA an... |
As far as I can unserstand Dynamic programming stands simply for memoization (which is a fancy name for lazy evaluation or plain "caching"). Now, I read that there is we can reduce complexity of coin-change problem by truncating some search branches with caching.
Here is the problem, by the way
(define (count-change a... |
I was just looking at the big-Oh notation. I wanted to know if the following is true in general
$$f(n)=O(g(n)) \implies \log (f(n)) = O(\log (g(n)))$$
I can prove that this is true if $g$ is monotonically increasing, but am not sure if this holds in general.
|
I am trying to understand how Adaboost works, and many of the tutorials online involve the use of a decision tree stump. For example, http://www.cc.gatech.edu/~thad/6601-gradAI-fall2013/boosting.pdf or http://www.fromdev.com/2012/04/creating-weak-learner-with-decision.html. However, I am confused on how the plot is act... |
I have an un-directed, un-weighted graph G.Starting from a given node A, i want to find whether there is a path from A to a node of a certain type .There can be many nodes of that type. The problem is to find the shortest path from A to any such node, if it exists.
This can be achieved by doing a breadth first search w... |
I am trying to understand the following solution to CLRS 5.3-7:
http://clrs.skanev.com/05/03/07.html
Question description is on the page. I understood the part where m-element subset is constructed out of m-1 element subset when the m-element subset includes the last element n. But why does the probability of randoml... |
I want to practice proving a language is regular or not using the MyHill-Nerode theorm, but for that I need to be able to describe the classes. Here's my practice attempt:
For the language
$$L=\{\omega \in \{a,b\}^* \colon \omega \text{ contains at most 1 } 'a' \}$$
The classes are
$$M_1=\{\omega \in b^*\}$$
$$M_2=\{\o... |
I'm looking for an algorithm that receives as input a vertex $s$, and finds the shortest paths from $s$ to all vertices in the complement graph (undirected). The algorithm should run in $O(V+E)$ time, where $E$ is the number of edges in the original graph (not the complement graph).
If $G$ is a graph, the complement gr... |
I have a rather basic question about the number of operations taken by the Hopcroft-Karp algorithm for finding a maximum matching in a bipartite graph. It is commonly reported as $O(m \sqrt{n})$ where $m$ is the number of edges in the graph and $n$ is the number of vertices(for example, see wikipedia or this book, amon... |
How can I know if my DFA is implemented correctly?
For example, I need to build a DFA, and then minimize it which will recognize my name.
Language which describe my name is:
L = {pustai, marius}
I came with this solution:
>(0)--p-->(1)--u-->(2)--s-->(3)--t-->(4)--a-->(5)--i-->(6)(goto state 0)
|
(7)--m-->(8)--a-->(9... |
I was reading about the M/M/1 Queue and that we assume new customers arrive according to a Poisson distribution, and each customer takes an amount of time to service that is drawn from an exponential distribution?
I understand what it means to have an arrival rate based on Poisson distribution - if an average of 10 com... |
It is known that a turing machine and the lambda calculus are equivalent in power. I now want to try to prove this myself. I think proving that the lambda calculus is at least as powerful as a turing machine should be relatively easy, by trying to simulate a turing machine in lambda calculus. This should be possible by... |
I'm reading The Art of Multiprocessor programming and trying to understand their concept of inconsistent locks. Specifically, on page 37, the definition 2.8.1 of an inconsistent lock is not clear to me, as well as Lemma 2.8.1.
Definition 2.8.1. A Lock object state s is inconsistent in any global state where some threa... |
Could someone please explain how exactly the proof of optimal substructure property in dynamic programming problems works?
They usually say:
Let's say the global optimal solution is A, and B is part of the solution. So B must the optimal solution of the subproblem, because if it weren't, then A wouldn't be the global ... |
Is it correct that in a matroid, the union of all the circuits and
the intersection of all the bases do not overlap?
I susepect that is true from the equivalence in the definition for a
coloop from wikipedia:
An element that belongs to no circuit is called a coloop. Equivalently, an element is a coloop if it b... |
Most of the tutorials I have found on model checking and bounded model checking start with, the model is given as a Kripke Structure M = (S,I,T,L) where S is a set of states, I is a set of initial states, T is a transition relation, and L is a labeling function. Model checking takes a property P and tries to determine... |
Consider the language over the alphabet $\sum= \{a\}$ containing strings whose length is either a multiple of 2 or 3 (including the empty strings). Writing a regular expression for this language
|
Here's the problem. I've written a program that reads strings from stdin, and returns a random subset of those strings. The only other argument provided to the program is the length of the subset, $k$. The subset must contain exactly $k$ strings selected uniformly at random from the entire input set.
It's easy to do th... |
I'm confused as to why the MIPS designers would include 5 bits dedicated to shifting and have separate opcode and function bits.
Because MIPS is so RISC I assume that only shifting would be done in a few instructions, so those 5 bits seem like they're wasting space when they could be put in the immediate. I assume that... |
It is very well known that if the classes $\sf FP$ and $\sf FNP$ are equal, then also the classes $\sf P$ and $\sf NP$ are equal (see e.g. FNP on Wikipedia).
Is it also true that if $\sf FNP=FEXPTIME$ then also $\sf NP=EXPTIME$? (See the exponential time conjecture.) I did find a paper constructing real functions th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.