instruction stringlengths 35 29.1k |
|---|
What makes neuromorphic architectures more efficient (less heat and power consumption) than von Neumann architecture for complex tasks? Except inspiration from biological systems, what are some formal results on this?
Any reference to books or articles is appreciated as well.
|
A natural number n represents the initial position in the game. When it is a players turn he/she is allowed to
I) Subtract 2 from n
II) Subtract 3 from n
III) Subtract 5 from n
We call the player who begin the game Adam and the other player Berta. The players alternate by applying on of the three rules to the num... |
When using resolution, if the empty set {Ø} is derived from a formula like {¬x,¬y} {x,y}, does that mean the formula is unsatisfiable?
If this is the case, why is {x,y},{¬x,¬y},{x,¬y} satisfiable, and
{x},{¬x},{x,y,z,w} is not satisfiable?
|
I have a question about simplifying O-notation. Specifically, why is $O(t(n)b^{t(n)}) = 2^{O(t(n))}$ where $t(n)$ is the running time of an algorithm?
|
Motivated by Efficiently sampling shortest s-t paths uniformly and independently at random,
The answers give methods of randomly sampling shortest $s\text{-}t$ paths. However, they use a lot of seemingly unnecessary random bits.
My question is:
Can the solution be improved to use a single random number in interval $[0... |
In section 3.2 of the book Computational Geometry: Algorithms and Applications (by Berg et al.), the authors describe a procedure to make a polygon y-monotone. The algorithm distinguishes vertices into $5$ different types: "start", "end", "regular", "split" and "merge" vertices.
A regular vertex is a vertex which has o... |
We know that deterministic TMs are countable (enumeration). Does the same hold for NTMs? Are TMs and NTMS equinumerous?
|
I need to implement TSP algorithm by brute force for learning purposes.
I've understood there's a set of cities, let's call it V and it's possible to get a matrix representation for the costs for going from a v1 city to a v2 city. I'll assume there are not cycles, so it's no possible to going from v1 back to v1
Then, ... |
I'm just trying to get my understanding of big O down. I know the concept and the basics but I'm a bit confused about what it means to be equal to big O of something.
For example, is $2^{2n} = O(2^{100n})$? From my understanding it is, since $2^{2n}$ is "faster" than $2^{100n}$, and so completes within the time $2^{100... |
Can I think this way:
We can convert a NFA to a RE using GFA.
We build a series of GFAs. At each step, one state (other than start or accept) is removed and replaced by transitions that have the same effect.
So, if we can convert k REs which have different forms but accept same language, then there must exists a string... |
In descriptive complexity, we have theorems that look like $\mathrm{ESO} = \mathrm{NP}$ or "on linearly ordered structures, $FO(LFP) = P$", but I don't really understand the proofs of those.
For the latter, the intuitive equality really means that the statement "$\mathcal A\models \varphi$" can be verified to be true o... |
I'm building a load test harness for a distributed system. Currently I'm using the "Cormode, Korn, Muthukrishnan, and Srivastava" method to estimate latency quantiles of system responses.
I'm now testing systems larger than can be adequately stressed using a single load generator. I'm looking for a method similar to th... |
I am trying to design a context-free grammar for the language $L = \{a^ib^jc^k \mid i\neq j+k\}$ over the alphabet $\Sigma = \{a,b,c\}$.
I know that I can split this up into the union of two cfg's $S_1$ and $S_2$,
where $S_1$ is the case where $\#_a \lt \#_b + \#_c$,
and $S_2$ is the case where $\#_a \gt \#_b + \#_c$.... |
I need some help understanding the problem statement in CLRS 11.3-4 pg 269. It says:
Consider a hash table of size $m = 1000$ and a corresponding hash function
$ h(k) =\left \lfloor m(kA \bmod 1) \right \rfloor $
for $A = (\sqrt5 - 1)/2$. Compute the locations to which the keys
61, 62, 63, 64, and 65 are mapp... |
consider a program that generates a random walk using a PRNG, as in following pseudocode. it uses arbitrary precision arithmetic such that there is no limit on variable values (ie no overflow).
srand(x)
z = 0
while (z >= 0)
{
r = rand(100)
if (r <= 50) z -= 1
else z += 1
}
the PRNG is inited with seed x (also ar... |
Here is a definition from the functions section in my discrete math textbook (Discrete Mathematics and its Applications 7e, Rosen 2012):
Let $f$ be a function from $A$ to $B$, and let $S$ be a subset of $A$. The image
of S under the function $f$ is the subset of $B$ that consists of the
images of the elements of $... |
I have asked this question in StackOverflow. I was asked to move in here. so here it is:
I need some clarifications and inputs regarding Dijkstra's algorithm vs breadth first search in directed graphs, if these are correct.
Dijkstra's algorithm finds the shortest path from Node A to Node F in a weighted graph regardles... |
Im in a functional languages computer science class and I have a question on the use of the kleene star and the Union in a context free grammar.
for the kleene star I have an idea of how I might do it.
for example
{0^n 1^n | n in the set of natural numbers}
I think it would look something like this.
S-> 0S1 | ... |
I'm given this problem:
Consider the following closest-point heuristic for building an approximate traveling-salesman tour. Begin with a trivial cycle consisting of a single arbitrarily chosen vertex. At each step, identify the vertex u that is not on the cycle but whose distance to any vertex on the cycle is minimum.... |
Consider the linear programs
\begin{array}{|ccc|}
\hline
Primal: & A\vec{x} \leq \vec{b} \hspace{.5cm} &
\max \vec{c}^T\vec{x} \\
\hline
\end{array}
\begin{array}{|ccc|}
\hline
Dual: & \vec{c} \leq \vec{y}^TA \hspace{.5cm} &
\min \vec{y}^T\vec{b} \\
\hline
\end{array}
The weak duality theorem states that
if $\vec{x}... |
I have basic background (at the level of Sipser's book),
but am looking to brush it up and get to the more advanced part via self-study.
I have two Computational Complexity books (Arora and Barak and Papadimitriou's).
I am looking for good lectures (online), exercises etc., possibly coursera style,
for a faster progre... |
I'm having trouble understanding the mechanics of the midpoint algorithm. I understand the gist of what it does; it keeps us within a half a pixel of where the actual line should be printed. It does this by updating this $d$ value for each pixel that we traverse.
However, even after drawing some samples and observing ... |
There are many solutions on the web showing that the subset-sum problem is polynomial time reducible to the set-partition problem. However, during my search, I came across the following powerpoint presentation (slide 12), where it says that the inverse is also true. i.e. the set-partition problem is polynomial time red... |
I have a distance to get to, and square tiles that have a cost and length. EX: a 1 unit block that costs 1 unit to purchase.
So if I was trying to get 10 units away. I would require 10 of the 1 unit blocks at that point for a total cost of 10.
So another example would be a distance of 10 units away except I have two ti... |
This question is a follow up to the question: Proving Equivalence of 1-dimensional Cellular Automaton and Turing Machines.
To simulate a CA with a TM, I used a construction which placed a marker on the ends of the input, and modeled each "step" with the transition function. Assuming that $\rho(\text{''blank''}, \text{'... |
I am trying to prove:
Let there be a constructible function $t: ~\mathcal{N} \to \mathcal{N}$. Then there exists a language $L$ where $L$ is decidable by an LBA in $O(t(n))$ time, but not $o\left(\frac{t(n)}{\log t(n)}\right)$ time. You may assume that LBAs have a fixed tape alphabet and have unique symbols marking th... |
Given a $n\times n$ matrix A[0...n-1][0....n-1] where all entries are non-negative integers, and a non-negative integer K, I want to find the number of submatrices whose entries sum to K.
The best solution I can find has $O(n^4)$ running time. Any ideas how to improve the running time?
|
I have a practice exam question that I don't know how to set up a recurrence for. It is dealing with a hash table. The question is as follows:
Suppose that a hashing strategy is designed so that it starts with an initial hash table size of $H= 8$. You may assume that only insertions are performed (no deletions).
Any t... |
Does the term schema, in the context of describing a structure, refer to the actual structure of the data, or the description of this structure? I.e. can I talk about the schema of an entity without a schema language?
For example, suppose I am writing documentation for some JSON API, that always returns a particular st... |
I want to prove that if P = NP, then there is a polynomial time algorithm for finding the largest clique in an undirected graph.
I understand how to use a verifier to find this but my issue is since P = NP it doesn't want me to use a verifier. I'm not sure how to approach this.
|
How to convert the below formula to CNF?
$\lnot(x \oplus y \oplus z\oplus a)$
|
I participated in one algorithmic competition. I got stuck in one problem, I am asking the same here.
Problem Statement
XOR-sum of a sub-array is to XOR all the numbers of that sub-array.
An array is given to you, you have to add all possible such XOR-sub-array.
Example
Input
Array :- 1 2
Output :- 6
Explanation
F(1, 1... |
If we consider polynomial-time (or log-space) computable reductions $<_p^m$ as transformations between computational problems, then the following definitions of known complexity classes suggest the conservation of information under "efficient" transformations. Assuming $P\ne NP$, it seems that information flows only f... |
Suppose one wants to use a μ-calculus model checker, but specify things in temporal logics, which is easier (more intuitive). Is there a technique (even better, a tool) that automatically translates formulae in any of these logics (CTL,CTL* or LTL) to the μ-calculus?
Thanks very much in advance!
|
It is well known that in Descriptive Complexity Theory FO is equivalent to AC0.
However, this accepts a couple of a theory and a string <T,s> iff the interpretation of s as a query is satisfied by the theory T.
My question now is if there is an interpretation of which is stronger than AC0. For example, is there an inte... |
I am wondering this statement above [the title] is true or not.
Here is what I've already had : non-recursive means undecidable.
I've read this Are all infinite languages undecidable?
which says:
If a Language is undecidable(non-recursive), there must be some strings make the TM fail to halt.SO IT MUST HAVE INFINITE OF... |
Symmetric/Metric TSP can be solved via the Held-Karp algorithm in $\mathcal O(n^2 2^n)$.
See A dynamic programming approach to sequencing problems by Michael Held and Richard M. Karp, 1962.
In Exact Algorithms for NP-Hard Problems: A Survey (PDF) Woeginger writes:
This result was published in 1962, and from nowadays p... |
First I apologize if I confused therms DFA and FSM, to me it seems that is the same thing. The question is simple: Are the flowcharts (sequence, branching and jumping) equivalent to DFA resp. FSM? I am a bit confused about this. There are classes where using logical synthesis, Karunaugh maps, state encodings, flip flop... |
Let $\{a_i\}$ and $\{b_i\}$ be non-decreasing sequences of non-negative integers.
How fast can one find
$$c_j=\max_{0 \leq i< j}\{a_i+b_{j-i-1}\}$$
for all $0\leq j\leq n-1$?
Naively, it takes $O(n^2)$ time, but I'm hoping monotonicity can help here.
It's easy to observe $\{c_i\}$ is also non-decreasing. If we conside... |
I'm working on some questions to bone up on my knowledge of DFA's for a computing class and I've run across the following problem that is giving me some issues. If we have some
DFA M = (Q, Σ, δ, q0, F) and some other DFA M' = (Q, Σ, δ, q0, F') where F is a proper subset of F', are the following relations possible or n... |
Given N finite subsets of the finite universe set E, it is necessary to find the intersection which contains maxumum number of subsets. Let call this problem MSI (Maximum Subset Intersetion).
Firstly I had thought that it is variation of well-known Maximum Clique Problem where vertices are subsets and edges are relatio... |
CS sometimes seems take for granted that $\mathcal O(\text{poly}(n))$ is "easy", while $\mathcal O\left(2^{poly(n)}\right)$ is "difficult". I am interested in research into "difficult" polynomial-time algorithms, where the best-case solution to the constructed problem runs in $\Theta(n^c)$, where $c$ can be chosen to b... |
I know how to figure out the start state, accepting state, input alphabet, and all that stuff. But how do you develop the transition relation of a PDA? For an FSM, (q0,a),q1) means if you start at q0 and get an a, you transition to q1. But what does (S,a,e),(S,a) mean? (S is start state and e is epsilon)
Here's a pictu... |
I came to know that the graphic processing unit have something called memory coalescing. On reading on it I was not clear on the topic. Is this any way related to Memory Level Parallelism.
I have searched in Google but was not able to obtain a satisfactory answer.
It would be helpful if someone gives a more comprehens... |
In order to prove a certain function to be partially computable, I need to show an $\mathbb S$-program that computes it. I could really use the predicate $X \in B$ in my program to draw my conclusion. To give you the idea of what I am dealing with here it is one of my problems:
Give an infinite set $B$ such that $\Phi... |
When using the pumping lemma for a context free language, if I write any $w \in L$ as $uvxyz$, is my goal to show that a string will not pump for ANY arrangement of $uvxyz$ that I choose, or is my goal to show that THERE EXISTS some arrangement of $uvxyz$ over $w$ that will pump?
|
I came across this question was I was browsing online
An operation OP has the following characteristics
OP Latency = 7 clocks
OP cycles/issue =2
Derive the minimum number of cycles required for the following computation:
X[0] OP X[1] OP X[2] OP ....... OP X[N-1]
The answer was written as 7 + 2(n-2). But I w... |
I've been told it is possible to find a solution to this optimization problem in $\Theta(n)$ but I still don't know how I could do it. I did find easily a solution in $n\lg (n)$ though. I only need to have a VALID solution, not the optimal.
This is the problem :
Let say you have n tasks that have a start time and a max... |
I am implementing a learner to learn a DAG model $G=\langle V,E\rangle$ where $V$ and $E$ represent both variables and dependencies respectively ( similar to Bayesian networks). Each variable $v\in V$ is associated with possible values (domain) $D_v$ and a function $\theta_v$.
I assume the learner knows the number of v... |
The syntax of dice notation follows the following grammar:
$$ Roll \rightarrow Dice | Dice'x'Int | More \quad Mod \quad More $$
$$ Dice \rightarrow Int_{1}'d'Int_2$$
$$ Mod \rightarrow '+'|'-'$$
$$ More \rightarrow Int | Roll$$
$$ Int \rightarrow <integer>$$
Give a leftmost derivation for the sample string:
$3d8 + 2d4x... |
One can, for example, represent 2d arrays such as:
[[1,2],[3,4],[4,5]]
as flat arrays:
[1,2,3,4,5,6]
as long as he transforms the indices before accessing:
index(x,y) = x + y*2 // because internal width=2
This is often faster. My question is: is it possible to use a similar approach of representing an structure as a... |
The typical and widely used PRNG, the linear congruential generator always has a finite (though possibly "long") period. Are there PRNGs that have no finite period?
For this question it is not necessary that it be practical or used in real-world implementations.
|
I'm trying to understand how LZW decodes a string.
For example suppose that we have a dictionary where:
a=0
b=1
and we have to encode the string "aabbabaabb", so the output of the encoding process (if I have not made mistakes) produces the string "0011324" and the dictionary became(using a tree representation):
(sou... |
I would like to determine interests or hobbies that people have given their Twitter timeline data. Their timeline is their historical collection of tweets.
The result I am trying to achieve is to automatically label a user with a collection of interests such as:
Finance
Photography
Android Development
I have tried ... |
Persistent data structures are immutable data structures. Operations on them return a new "copy" of the data structure, but altered by the operation; the old data structure remains unchanged though. Efficiency is generally accomplished by sharing some of the underlying data, and avoiding full copying of the data struct... |
During the process of deadlock detection, the wait-for graph can be obtained from the resource-allocation graph. To detect whether there is a deadlock using the wait-for graph, can topological sort be used?
By making a slight modification, i.e., instead of removing the source as done in usual topological sort, we can ... |
I want to determine the size of training data ($m$) when I know the parameters $VC(H)$, $δ$ and $e$. As I know the $VC$ bound satisfy this equation:
$$ \mathrm{error}_{\mathrm{true}}(h) \le \mathrm{error}_{\mathrm{train}}(h) + \sqrt\frac{VC(H) \times \ln\left(\frac{2m}{VC(H)} + 1\right) + \ln(4δ)}m
$$
but how can I det... |
If an NFA with $n$ states is converted to an equivalent minimized DFA then what will be the maximum number of states in the DFA? Will it be $2^n$ or $2n$?
|
Which data structure can be used to "eliminate" recursion from a recursive program? Array, stack, queue, or list? How is it used to that end?
When I eliminate recursion from the program computing factorial $n! = n(n-1)!$, I replace recursion with a loop. But I don't see how to do a similar transformation in general.
|
consider following code
int f(int x)
{
if(x<1) return 1;
else return f(x-1)+g(x);
}
int g(int x)
{
if(x<2) return 1;
else return f(x-1)+g(x/2);
}
Questions:
How do I find the growth of f(x), being that it contains a recursion to another function?
Are growth and time complexity of a a function same thing? Are ... |
I learned that there are two types of services in Windows , one called -service- which is in user-mode , other is called -driver service / device driver- which is in kernel-mode.
What I wonder is , do kernel-level services considered as a part of the kernel? If so , does writing kernel-mode services mean extending Ope... |
Below is a homework problem where we have been asked to alter a greedy algorithm to return n element instance of a set problem. The original algorithm is also below. I was thinking that I could alter line 3 so that it would run until the size of C was equal to n, and change the logic in line 4 so that it would pick and... |
Are all the NP-complete problems have strong reductions? If I find a polynomial solution to one NP-complete problem, can I state that P = NP?
|
Valid-invalid bit is used to indicate whether a page in a process’s page table is valid or not. Why is it needed?
Does that mean that each page table has a certain minimum size, i.e. it can accommodate minimum of n references to pages and if the number of pages being referenced by the process is less than n, then this ... |
Consider assigning a single object to $n$ potential receivers. It can only be assigned to one person.
For each receiver $k$, there is a value of profit $v_k$ and a probability $p_k$.
Fix an ordering of the receivers, then for the $i$th receiver he accept the object with probability $p_i$, if he does, we gain a value $... |
The question emerged while reading Ch. 3 of Rasmussen & Williams http://www.gaussianprocess.org/gpml/. In the end of this chapter, the authors gave results for the problem of handwritten digits classification (16x16 greyscale pictures); features are 256 pixel intensities + bias. I was surprised that in such a high-dime... |
I've just been learning about pushdown automata and I'm trying to create one that describe the following language:
{$a^n b^n c^i \in \{a,b,c\}^*\ |\ n \ge 0,i\ge 0$}
What I have is the following:
(state, symbol, top of stack), (next state, what goes to stack).
$(s,$e$,$e$),(f,$e$)$
$(s,a,$e$),(s,d)$
$(f,b,d),(f,$e$)$
$... |
I am studying Cluster Analysis and I came across BIRCH (Balanced Iterative Reduction Using hierarchical) http://en.wikipedia.org/wiki/BIRCH_(data_clustering) CF Tree insertion algorithm. I am confused what does branching factor(B), threshold for diameter of cluster in a leaf(T) means and in general how the algorithm wo... |
Let $U$ be a universal Turing machine that on input $<M,w>$ simulates a Turing machine $M$ on input $w$. I have a question about what would happen if $U$ "operated" on itself.
That is, what happens when we consider the input $<U, <M,w>>$?
Or what about the input $<U, <U, <M,w>>>$?
|
Some guy on the internet recommends using the same ntp server when it is required to troubleshoot asymmetric routes through ICMP, and it's somewhat important to have synchronised time between the two machines doing ICMP.
Granularity of timestamps in ICMP is 1ms (unique per 24h period), assume packet roundtrip between t... |
I've got 30 elements which has to be grouped/sorted into 10 ordered 3-tuple.
There are several rules and constraints about grouping/sorting.
For example: Element $A$ must not be in the same tuple same unit $B$.
Element $C$ must not be right in front of element $A$, etc.
I am searching for an approximated algorithm:
... |
I'm trying to study for an exam and I realized I'm confused about how the TLB and data cache work.
I understand that the TLB is essentially a cache of most recently used physical addresses. However, I was looking at a diagram in my textbook (shown below), and I don't understand what's going on in it. It suddenly splits... |
Let $L = \{ x \in \{a,b\}* | \ |x|_a \leq |x|_b^2\}$
I know this is a NOT context free language.
How can i choose the correct $z=uvwxy$ and try to apply the Pumping Lemma?
I think that $z=(a^n b)^n$ it's wrong, cause it's part of the language only if $n=0,1$
$z=(ab^n)^n$
should be fine.
Then the relatives substring... |
Im having some problems with a qeuestion regarding converting a context free grammar to chomsky normal form.
I have
S -> abC | babS | de
C -> aCa |b
I know what to do with the case of aCa and de and b but im not sure how to handle the abC case or the babS case. I believe that chomsky normal form is sup... |
One of Wikipedia examples of use of Chernoff bounds is the one where an algorithm $A$ computes the correct value of function $f$ with probability $p > 1/2$. Basically, Chernoff bounds are used to bound the error probability of $A$ using repeated calls to $A$ and majority agreement.
I don't understand how, to be frank. ... |
I have the following two languages, which are languages of TM descriptions:
$$INFINITE = \{ \langle M \rangle | \mbox{M is a TM and L(M) is infinite} \}$$
$$A_{ALL} = \{ \langle M \rangle | \mbox{M is a TM and } L(M) = \Sigma^* \}$$
Neither of these languages are decidable, recognizable, or co-recognizable.
However, I... |
Suppose we have a graph $H$, where each vertex represents a spanning tree of another graph $G$.
We create an edge between 2 vertices in $H$ if $ST_1$ (spanning tree) contains exactly one edge not in $ST_2$ (and vice versa).
How do we show that $H$ is connected?
|
This is one of the special cases for Chinese Postman Problem.
I know the answer is (Cost of all Edges + Cost of shortest path between the odd degree vertices). How do I prove this?
I am trying to prove the solution to this UVA problem.
|
Clique problem is a well known $NP$-complete problem where the size of the required clique is part of the input. However, k-clique problem has a trivial polynomial time algorithm ($O(n^k)$ when $k$ is constant). I'm interested in the best known upper bounds when k is constant.
Is there an algorithm with run time $O(n... |
The ICMP timestamp protocol is useful for determining which path — forward or reverse — is contributing to the jitter on the line.
In an ideal world, all computers would have an excellent ntpd, and time accuracy of about 1ms (the granularity of ICMP timestamp) should not be a problem:
0 145.5 146 = 75 + 71
1 ... |
Considering two sets $A, B$ containing some $p$-dimensional points $x \in \mathbb{R}^p$. Let $d_x^S = \min_{x' \in S \setminus \{x\}} \lVert \mathbf{x} - \mathbf{x'} \rVert$ denote the Euclidean distance from $x$ to its nearest point in $S$. We have a very simple algorithm:
$\forall x \in A$, if $d_x^A > d_x^B$ then m... |
I tried to solve the exercise:
Proof that determining the existence of a Hamilton Path in a bipartite graph is NP-complete
by making a bipartite graph from a general one (undirected) by inserting a vertex in the middle of every edge of the first (general) graph. This generates problems as suggested here: Finding the ... |
Given the language $L_1 = \{a^i b^j c^k \mid i \neq j \vee i \neq k\}$, I need to determine whether it is context-free by using the pumping lemma. I must do the same for the complement of this language.
I started off by breaking $L_1$ into two parts, $L_1 = L_2 \cup L_3$, where $L_2 = \{a^i b^j c^k \mid i \neq j\}$ and... |
How do I precisely define the function which is a mapping reduction of A to B for the following examples?
What is the process of figuring this out?
Given: A and B are languages over the alphabet {0,1}.
Examples:
A is the language described by 1*0*, B is the language described by 01*0*
A={w | the length of w is even}, ... |
I have no clue how to prove this question.
Consider the language
$L = \{ \langle D_1, D_2, ... ,D_K \rangle : k \in {N},$ the $D_i$ are DFAs and ${\bigcap}_{i=1}^k L(D_i) = \emptyset \}$
Prove that L is NP-hard.
Can someone guide me through this problem? I understand that I will have to reduce it into something, I ju... |
I have been trying to implement an algorithm to detect cycles (probably how many of them) in a directed and undirected graph. That is the code should apply for both directed and undirected graphs.
Using DFS or topological sort is mostly recommended in various posts. But largely, everything is addressed for undirected g... |
I'm trying to build an algorithm which takes two lists of natural numbers and finds if every element of the first list is displayed at least once in the second list.
What if the list is sorted?
An algorithm that can do this is by comparing every element of the first list with every element from the second list. I thin... |
I am studying the following paper for understanding next-word prediction using n-gram & trie: - http://nlp.cs.berkeley.edu/pubs/Pauls-Klein_2011_LM_paper.pdf Before this, I did some brief study on what are n-grams. And, I know trie data structure. The issue is - the algorithm in paper is not so intuitive to understand.... |
I Know that determining Hamiltonian cycle in a graph is NP complete. For the sake of my clarification, I just want to know that whether the problem remains NP complete with following restrictions ?
1) Graph is undirected , and every node has degree two.
Any help will be appreciated. Thanks.
|
I was looking into how a next-word prediction engine like swift key or XT9 can be implemented.
Here's what I did.
I read about n-grams here - en.wikipedia.org/wiki/N-gram and aicat.inf.ed.ac.uk/entry.php?id=663
I read about Language Models/Markov Model/n-grams/training/Smoothing/Back-Offs - en.wikipedia.org/wiki/Langu... |
I have just started learning Theory of Computation and have come across a question which I am not able to solve.
The question is as follows:
Design a DFA that reads a word (character strings) and decides whether the letters
of the word are in sorted order.
For example: 'adept' and 'chilly' have their words in sorted or... |
Let $G_1,$ $G_2$ be two arbitrary graphs with $n$ vertices and we want to check if they are isomorphic.
Question 1. For what maximal value of $n$ we can actually perform such verification?
Question 2.
Is there any result like as a list of all non-isomorphic graphs up to $n$, and what is the value of $n$ — 10, 20?... |
If I have a variable x bound to a machine precision real in Mathematica, I can use
y = FromDigits[RealDigits[x]]
then y is bound to a completely equivalent rational number which has infinite precision.
What are the basic principles behind FromDigits and RealDigits?
How could I implement a similar conversion using com... |
Assume you have an object moving at a constant velocity(up, down, left, right) in a grid. You have unlimited resources (memory, time). At any given time step in the grid, you can "guess" the location of the object, and you win if it is currently at that position. Without relying on probability techniques, what would be... |
$L$ is a regular language and $w$ is any word, not necessarily in $L$. We define the set as
$$L/w = \{x \in \Sigma ^* \mid xw \in L\}.$$
Show that $L/w$ is regular.
I'm really struggling with this one. I know its going to come on my final next week.
|
Suppose that G is a context-free grammar. How can I show that “Is L(G) regular?” is undecidable. Also, prove that L is always context-free but is regular if and only if L(G) = Σ∗.
This is what I have so far
Let N be some language that is known to be context-free but not regular (for example, {a^nb^n | n ≥ 0}). Conside... |
I am having a rather distressing confusion about whether storage media and storage devices are the same terms. I found on this yahoo answers page that there is a subtle difference but very tricky to understand.
I have googled a lot but cannot find the satisfying answer.
Can anyone kindly explain the difference between ... |
According to CLRS, each iteration of the outermost loop (on $k$) makes a new copy of the adjacency matrix. Is it safe not to copy the matrix on every iteration?
What I mean is, according to CLRS:
$d_{ij}^K = \min(d_{ij}^{K-1}, d_{ik}^{K-1} + d_{kj}^{K-1})$
Is the following possible?
$d_{ij} = \min(d_{ij}, d_{ik} + d_{k... |
So given an input of lets say 10 strings, what way can we input these so we get the best or worst case for these two given sorts?
Heap sort:
best case - nlogn
worst case - nlogn
Quick sort:
best case - nlogn
worst case - n^2
Where I get confused on these two is:
heap- Since the best and worst case are the same does ... |
Introduction and notations:
Here is a new and simple version of my algorithm which seems to terminates (according to my experiments), and now I would like to prove that.
Let the notation $x_i \in \mathbb{R}^p$ refer to a $p$ dimensional data point (a vector). I have three sets A, B and C, such that $|A| = n$, $|B| = m$... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.