instruction stringlengths 35 29.1k |
|---|
I'm thinking this should be just one or two things, since lambda calculus is so tiny and still Turing complete.
Probably just recursion (something like "MY_QUERY(param) = select * from param UNION MY_QUERY(DO_SOMETHING_WITH(param))"). But I don't see how I could define aggregate functions with this.
Any idea?
|
I have seen web sites that purport to "prove" that HTML5+CSS is Turing Complete.
I have seen web sites that purport to "prove" that SQL is Turing Complete.
I have seen a bunch of web sites that purport to "explain" what it means to be Turing Complete.
Enough!
Where can I find a book (written by an expert in computabili... |
I'm trying to prove that the language: \begin{equation*}
L = \{ w \in \{ 0, 1 \}^* : w \text{ contains more 0's than 1's} \}
\end{equation*} is irregular using the Myhill-Nerode theorem. I've been through all the basic examples in the book, and thought I understood them, but I'm having trouble with this one.
So far, I... |
I was asked to perform merge sort by iterative method. I solved it as follows: I first stored each of the elements of the array given in another array say $A$. Then I sent entries of $A$ two by two for merging(was given that the function for merging is known and it merged two arrays at a time). This function returned t... |
Imagine I have an ordering on a bunch of elements like so:
Where an arrow $X \leftarrow Y$ means $X < Y$. It is also transitive: $\left(X < Y\right) \wedge \left(Y < Z\right) \implies \left(X < Z\right)$.
In order efficiently answer queries like $A \stackrel {?}{<} D$, some sort of labeling or data structure is requir... |
Suppose I have a set of small subgraphs $A=\{G_i\}$ of an original directed acyclic graph $G$, typically $|G_i| \ll |G|$, which together span the original graph
$$
G= \bigcup_i G_i
$$
My question is if I take a arbitrary subset of these graphs $A′ \subset A$, and a single subgraph from this graph, $ a \in A′$, is there... |
I have an array of positive integers, $A = (a_1, a_2, ..., a_n)$.
Let $s(A)$ denote the sum of elements of array $A$.
I also have an integer $t$, such that $1 < t \le s(A)$.
I want to split the array $A$ into $m$ contiguous subarrays $(A_1, ..., A_m)$, for which I'll get a minimum of function $f$, defined as
$$
f(A_1, ... |
I know Gentle Boost, an adaption of the AdaBoost algorithm, can be used for binary classification. However, I need to do $n$-ary classification. How do I modify or extend the GentleBoost algorithm so it can be used for $n$-ary classification?
|
I have in mind a particular 3D object. Given an image taken by a camera, I want to check whether that image contains an instance of my object.
For instance, let's say that the object is a bathroom sink. There are many kinds of bathroom sinks, but they tend to share some common elements (e.g., shape, size, color, func... |
I have a bijection problem that I cannot get my head around. It goes like this:
let f: A -> B and g: B -> C be functions such that g o f is a bijection. Prove that f must be one-to-one and that g must be onto. And also an example showing that it is possible for neither f nor g to be a bijection.
This is the problem. ... |
u is defined to be a substring of a string v if v = xuy for some string x and y. Either or both possibly empty.
How to you prove that a substring relation on any set of strings is a partial order?
|
I'm interested in building an AI algorithm to play a board game. This is a sequential two-player game, where they alternate taking turns, so minimax or alpha-beta algorithms sound natural.
However, the twist here is that the game is randomized. There is a deck of cards that is shuffled randomly; each turn involves dr... |
Using the following recursive Fibonacci algorithm:
def fib(n):
if n==0:
return 0
elif n==1
return 1
return (fib(n-1)+fib(n-2))
If I input the number 5 to find fib(5), I know this will output 5 but how do I examine the complexity of this algorithm? How do I calculate the steps involved?
|
Let $S$ be a convex polygon on $n$ points. Given two points $A$ and $B$, where $A$ is left of $S$, and $B$ is right of $S$, what's an algorithm to find the shortest path from $A$ to $B$, that avoids the interior of $S$? What about the longest path?
|
One naive approach in solving multiple pattern matching problem is to call single pattern matching procedure on each of the pattern.
There must be some drawbacks in this approach, given the variety of multiple pattern matching algorithms such as Aho Cornsick algorithm, which prove to be more efficient.
So what are the ... |
This may be a naive question but I am a bit clueless. I was under the opinion that given two NP complete problems, $P1$ and $P2$, if $P2 \in APX$ and $P1 \notin APX$, then we cannot have a direct reduction $P2\leq P1$ but we can have a reduction $P1\leq P2$.
In this paper on page 165 http://www.lancaster.ac.uk/staff/le... |
I have a doubly link-list like this
typedef struct Record
{
int i;
Record* next;
Record* prev;
}Record;
I have over 5 trillions of records that I need to handle, now that I need to retrieve all of them and sort them out.
If its size was small, I could borrow stl's vector or list to do the job but now that it ... |
Consider the following random process. We have a $10\times 10$ grid. At each time step, we pick a random empty grid cell (selected uniformly at random from among all empty cells) and place a marker in that grid cell. As soon as we have five contiguous markers in a line (in a row, column, or diagonal), we stop.
I'm g... |
Assembly language is converted in to machine language by assembler. Why would a compiler convert high-level language to assembly? Can't it directly convert from the high-level language to machine code?
|
I am doing bachelors in Electronics & Communication Engg.. But most of my work happened to be in Web development.. I am thinking to do my bachelor thesis which very closely overlaps with my recent work.
Are there any specific areas in CS, EE (may be Computer Networking in broad terms) that I can take up?
|
I am looking into Hindler-Milney type system and I am trying to add support for
the pair type. In Pierces book, he introduces special language constructs for creation of pairs and getting their elements.
What I am interested in is the following. What if I don't introduce new constructs, yet use special functions with t... |
In some paper I read,
A theoretical worst case study shows that a single regular
expression of length $n$ can be expressed as an NFA with $O(n)$
states. When the NFA is converted into a DFA, it may generate
O($\Sigma^n$) states. The processing complexity for each character in the inpuyt it $O(1)$ in a DFA, but ... |
The CLIQUE problem -- problem of finding the maximum clique in a graph -- is NP-complete. That is, CLIQUE is
in NP and
there is an NP complete problem, 3-SAT for one, that reduces to CLIQUE in polynomial time.
Part 2. above is fine -- all over in every resource and very well explained. For Part 1., from what I know,... |
(I've been stuck on this homework assignment for far too long)
I need to find the number of independent sets in a tree.
For example, say the set of nodes in a tree is {A, B, C, D, E}. B and C are children of A and D, E are children of B. This tree has 14 independent sets.
I assume that the algorithm will be recursive... |
Suppose I have a compressed file and it is not possible to compress it more without loss of information. We say that this file is random or pseudorandom.
So, if the randomness means not comprehensible and not compressible, I don't understand why ths file is, at the same time, information that my computer and I can unde... |
For analyzing the running time of an algorithm , I'm stuck with this recursive equation :
$$
T(n) = \log(n) \cdot T(\log n) + n
$$
Obviously this can't be handled with the use of the Master Theorem, so I was wondering if anybody has any ideas for solving this recursive equation.
I'm pretty sure that it should be solved... |
I have a question regarding counting DFAs:
Given a Σ = {0, 1} input string, with the state set Q = {1...n}, how would I find the total number of DFAs that can be constructed?
I believe this is a combinatorics problem, but I am not really sure what I would have to multiply.
Thanks.
|
Just like there exists binary and integer Semaphores, does the Event Counter play an integer version of a Barrier?
Event Counters are described in the paper
Reed, DP; Kanodia, RK: Synchronization with eventcounts and sequencers. Commun. ACM 22(2):115-123, 1979, http://doi.acm.org/10.1145/359060.359076
There is an onl... |
Is the set of all syntactically valid C programs countable or uncountable?
|
Let $\Sigma$ and $\Delta$ be alphabets. Consider a
function $\varphi: \Sigma \rightarrow \Delta^*$. Extend $\varphi$ to
a function from $\Sigma^* \rightarrow \Delta^*$ such that:
\begin{eqnarray*}
\varphi(\varepsilon) & = & \varepsilon \\
\varphi(w\sigma ) & = & \varphi(w)\varphi(\sigma ), \textrm{ for any }
w \in \Si... |
This is a kind of follow-up to a question I asked on superuser, where I asked for the definitions of a 'distinghuisable state' and a 'memory cell'. My questions where properly answered, but I was still confused about a certain matter.
I'm reading this little paper, and in particular these sentences:
To perform useful ... |
I'm searching for a reference of an undecidability proof that is as simple as possible and starts "from scratch".
With "from scratch" I mean that it does not use some other undecidable problem to prove some undecidability (which is the usual case), I cannot wrap my mind about how proving undecidability that way (withou... |
Is there an incremental directed graph data structure that has the following properties:
Keeps an internal graph structure as a DAG, and the graph is accessible (notwithstanding other helper data-structures)
The accessible DAG is kept as a transitive reduction (notwithstanding other helper data-structures)
It should ... |
I'm clojure user myself. I'm trying really hard to learn haskell and to better understand the type system. However, I feel that trying to 'type' everything is quite restrictive when the problem or the data is less defined.
I intuitively feel that godel's incompleteness theorem offers some insight into the typed/untyped... |
I have the following problem:
Does inserting a node into a red-black tree and then immediately deleting it always result in the original tree? Prove that it does or give a counter-example if it does not. Does deleting a leaf node from a red-black tree, then reinserting the same node always result in the original tree?... |
Let $a$ one decision problem and $A$ one algorithm solving it in $O(n^k)$.
But, to construct $A_n$ we need to compute certain thing (strategy path, magic numbers, ...), we can compute that using certain general algorithm $R$ in $O(2^n)$.
Obiously, $A$ is polynomial (then, all $A_n$ are in P) and $R$ is exponential.
We ... |
I didn't know how to ask this question before but now that I'm reading about typed lambda calculus I think I've got a better idea.
There is this answer to a question asking whether CSS is Turing complete or not (note that this question is NOT about CSS at all), which I consider is not (at least in certain way, and thi... |
Let $x=(x_1,\dots,x_n)$ and $y=(y_1,\dots,y_n)$ be $n$-vectors of boolean variables. I have a boolean predicate $Q(x,y)$ on $x,y$. I give my friend Priscilla $Q(x,y)$. In response, she gives me $P(x)$, a boolean predicate on $x$, and she claims that
$$P(x) \equiv \exists y . Q(x,y),$$
or in other words, that
$$\fora... |
Does anybody know how would I approach calculating the maximum number of 1 child nodes (nodes that have exactly 1 child) in a binary tree with n nodes. Please don't give me the actual answer as this is one of the homework problems, I would like to solve it by myself, but I simply don't know where to start. Any help is ... |
This is a bit of a weird question, but I was wondering earlier if QR codes are Turing-complete when interpreted as initial states for Conway's Game of Life.
My intuition is "yes", as there are infinitely many QR codes (they just get bigger as you add more information), and the Game of Life itself is Turing-complete. Ho... |
Big-O notation hides constant factors, so some $O(n)$ algorithms exist that are infeasible for any reasonable input size because the coefficient on the $n$ term is so huge.
Are there any known algorithms whose runtime is $O(f(n))$ but with some low-order $o(f(n))$ term that is so huge that for reasonable input sizes it... |
Scott Meyers describes here that traversing a symmetric matrix row-wise performes significantly better over traversing it column-wise - which is also significantly counter-intuitive.
The reasoning is connected with how the CPU-caches are utilized. But I do not really understand the explanation and I would like to get ... |
Reading the Appendix A (Binary numbers) of Structured Computer organization by Tanenbaum I've found this exercise:
Signed decimal numbers consisting of $n$ digits can be represented in $n + 1$ digits without a sign. Positive numbers have $0$ as the leftmost digit. Negative numbers are formed by subtracting each digit ... |
Suppose we are given an M×N matrix, with some elements are zero, some non-zero. We know the co-ordinates of non-zero elements. Now, if I am allowed to multiply a whole row or a whole column by zero one at a time what will be minimum number of operations (i.e multiplications) I will need. For example, for the matrix
$\b... |
I'm trying to make a regular grammar for this language:
Where the alphabet is $ \Sigma $ = $\{a,b,c\}$
It seemed like it would go well with a right-linear grammar. This may be disastrously wrong, but here's how I started:
$S \to aA$
$A \to aA | cB $
$B \to bC | C $
$C \to cD |$ $\lambda$
$D \to cC$
EDIT:
Corrected fo... |
I know that Stable set cannot be approximated to constant factor. I saw a simple proof using OR product sometime back. I am unable to recall it. If anyone here knows what I am talking about could help fill my memory, that will be helpful.
Is there a graph product $\cdot$ such that $\alpha(G\cdot G)=\alpha(G)^2$ for all... |
I'm trying to figure out how to build a regular expression for a language that doesn't contain strings that contain $101$ or $001$. The alphabet is defined as $\{0, 1\}$. I'm stuck on trying to figure out the DFA. Any help would be appreciated.
|
I am trying to find the answer to the following question for the Floyd-Warshall algorithm. Suppose Floyd-Warshall algorithm is run on a directed graph G in which every edge's length is either -1, 0, or 1. Suppose that G is strongly connected, with at least one u-v path for every pair u,v of vertices, and that G may hav... |
So I'm studying for my data structures midterm and my professor gave out a sample midterm with the answers, but I'm having a hard time understanding one of the questions.
Here's a screen cap:
The answer is n^2(n+1)/2.
I would appreciate a very simple walk through and/or a pointer to some good material.
|
So I'm studying for a midterm and my professor put out a sample exam with the answers, and I'm stuck on one of the questions.
The answer is Big-O(n^2 log n)
Could someone show me the steps necessary to go from regular time complexity to asymptotic time complexity?
|
Can a problem be both NP-Hard and CoNP?
Can a problem be both NP and CoNP-Hard?
|
I made a right-linear grammar from a regular expression:
The alphabet is:
$Σ = \{a, b, c\} $
Regular expression:
$r = cc^{*}(ba)^{*}bb$
My solution, it seems a little too short like I'm leaving something out. Maybe someone can see where I went wrong on the right-linearity:
$ S \to cA $
$ A \to b a A | B | cA $
$ B \to ... |
I used this generalized transition graph with 3 states and got an equivalent generalized
transition graph with 2 states:
GTG:
Equivalent with 2 states:
I'm not sure about the regular expressions linking the nodes $q0$ and $q2$, if someone can clarify where I may have gone wrong here.
|
Let $f(x)=a_0+a_1x+a_2x^2+\dots+a_nx^n$, where $a_i\ge0$ and $a_i$ is integer.
Given $f(1)=p$ and $f(f(1))=q$, we have to find $a_0$, $a_1$, $a_2$, $a_3$, $\dots$, $a_n$, where such $f(x)$ exists. Or we have to confirm if such $f(x)$ exists or if the polynomial is ambiguous e.g. for $p=1$ and $q=2$, no such $f(x)$ exis... |
There is a long-standing and seemingly ever-growing trend to reduce various (even undecidable) problems to SAT to get practically useful solvers, like for instance [1].
I'm looking for some kind of survey or list of papers/projects that fall into this category.
[1] Chad E. Brown: Satallax: An Automatic Higher-Order Pro... |
There are $n$ elements in a hash table of size $m \geq 2n$ which uses open addressing to avoid collisions.
The hash function was chosen randomly among a set of uniform functions. A set $H$ of hash-functions $h:U\to\{0,\dots,m-1\}$ is called uniform, if for every tuple of different keys $x,y \in U$ the number of hash-f... |
Would it be possible to apply $(\lambda x.\lambda y. x)$ to the argument $y$? It seems to me that this must not be possible as it would give a different answer if applied to a constant, call it $\alpha$ and $y$. Namely:
$(\lambda x.\lambda y. x) \alpha = \alpha$
but
$(\lambda x.\lambda y. x)y = \lambda y.y$
I am afrai... |
I'm taking the MIT Open Courseware for Introduction to Algorithms and I'm having trouble understanding the first homework problem/solution.
We are supposed to compare the asymptotic complexity (big-O) for different functions:
$f_1(n) = n^{0.999999}\log(n)$
$f_2(n) = 10000000n$
$f_2(n)$ is obviously O(n), but the big-O ... |
I recently did work in the area of machine learning for one of my jobs and was able to build a classifier which evaluated to an F score of 85%. I also have access to correctly and incorrectly classified instances. My boss would like to make sure my classifier is good and and test it for statistical significance. I'm no... |
I am trying to work out the recurrence relation for Ternary Search. This is what I came up with:
C(n) = C(n/3) + 2
However, I talked to my professor and he said it's not correct. He says that we need to take all of their cases into account. This part confuses me a little bit, can you please clear it for me?
Thank you.... |
I have this equivalence relation problem:
Let $R$ and $S$ be two equivalence relations on the same set $A$. Define a new relation $U$ such that $U(x,y) \leftrightarrow [R(x,y) \text{ or } S(x,y)]$. Is $U$ necessarily an equivalence relation?
I said that is was an equivalence relation because $U$ is only true if $R$ o... |
I'm trying to flesh out a proposed application model where all peers in a distributed network discover each other in the least possible propagation time.
But I'm reached the limit of my knowledge of network theory and my naive search keywords return too many disparate PDF white-papers to narrow down.
So my question is... |
Does $P=NP \implies NL=P=NP$? The converse $NL=NP \implies NL=P=NP$ is clear.
Assuming $NP=PH=PSPACE$ is not true, if $P=NP$ is there anything else that can be used to show $NL=P=NP$?
Do the $P=NP$ barriers apply to $NL=P$ question or $NL=NP$ question?
|
I am trying to analyse the runtime of this algorithm:
for(i=1; i < n; i++){
for(j=1; j <= i; j++){
statement1;
}
}
Expanding the above loop into.
First :
for(j=1; j <= 1; j++){
statement1; //complexity O(1)
}
Second:
for(j=1; j <=2 ; j++){
statement1; //complexity O(2... |
In this table B is foreign key referring to the primary key A with on delete cascade option.What will be the result after deleting (4,3) and how
A:1 4 2 9 3 5
B:3 3 4 2 9 4
|
I have N by N symmetrical matrix with each side having the same items.
A B C D
A 0
B 4 0
C 8 3 0
D 3 1 8 0
In reality this would be much larger (100 x 100)
I am trying to find a subset of a fixed size in this matrix with the highest score. For example the selection ABC would... |
Do Natural Proofs, Relativization and Algebrization also affect separation of other complexity classes like $L\neq NL\neq NP\neq coNP \neq PH\neq PSPACE$ etc?
|
Reading an article on integer factorization I implemented the following - rather inefficient - factorization method:
Every odd
composite can be factored as a difference of
squares: $$ ab = \left[\tfrac{1}{2}(a+b)\right]^2 -
\left[\tfrac{1}{2}(a-b)\right]^2$$
We can look at values of $f(x) = x^2 - n$ until w... |
When we talk about DFA, we say that each new character from the input requires one memory access. What does that mean?
This is what I think about this. Please tell me is this right?
For example, I have a transition table stored for a certain regular expression in memory (RAM). Now, for each input character the CPU wi... |
Here is my approach
First I compute the longest non decreasing sub-sequence in $N \log N$ time. Algorithm to do this (that only uses arrays and binary search) can be found here:
http://en.wikipedia.org/wiki/Longest_increasing_subsequence#Efficient_algorithms
Let's suppose the longest subsequence has $L$ elements. Then... |
I am having challenges (in two phases) with creating a CFG.
Derive the CFG for the following language
Show parse trees for the strings cacab and aacabbb obtained from the grammar designed above.
I am getting a bit mixed up by the exercise especially because my CFG appears not to produce a parse tree.
Here is the lan... |
I am working on a diagram editor.
Diagrams display 2D shapes (nodes) connected with connectors (edges).
I'd like to add an operation that, given a selection of nodes, "disentangles" them: it repositions them to minimize the number of crossing edges, if possible
(and it's OK if the edges will have to be drawn with bend ... |
Is it possible to use Dependent Types in the existing Typed Racket implementation? (ie do they exist in it?)
Is it reasonably possible to implement a Dependent Types System using Typed Racket?
|
I am reading a paper on Semi Supervised Learning and I am confused about a term. The paper talks about graphs that are invariant to permutations of the vertices. Can somebody explain or perhaps give an example? Is it same a regular graphs?
|
I have been reading about the Strassen Algorithm for matrix multiplication.
As mentioned in Introduction to Algorithms by Cormen , the algorithm is not intuitive. However I am curious to know if there exists any rigorous mathematical proof of the algorithm and what actually went into the design of the algorithm.
I trie... |
I know that an ε-NFA (NFA with epsilon transitions) is not an NFA or a DFA and an NFA is not a DFA.
HOWEVER, say you have a complete DFA. Isn't that theoretically an NFA and an ε-NFA? Just because it doesn't have ε transitions, does it mean it is not ε-NFA? If a question asks you to turn a DFA into an ε-NFA, can't you ... |
We have two sets of vectors of positive numbers, $X$ and $Y$ where for
$x\in X$ we write $x=(x_1,x_2,\ldots,x_k)$ and similarly for $y\in Y$
we write $y=(y_1,y_2,\ldots,y_k$).
We are given two vectors $l=(l_1,l_2,\ldots,l_k)$, and
$u=(u_1,u_2,\ldots,u_k)$ such that $l_i\le u_i$ for all $i$.
We want to find all pairs $(... |
Here is a simple transition system of beverage vending machine:
The exemplary execution fragments can look like this:
Now, imagine we have multi-process TS where processes are identical and communicate over channels. I don't understand the semantics of how to present an execution fragment that runs across multiple p... |
Is it possible to count in Automata theory?
I am begginer in Automata theory and I am trying to do some examples.
Currently I am working on a program that will recognise equal numbers of 0 and 1, but they are orderd in such manner that they are together, example:
$$
000111\rightarrow true \quad
0001111\rightarrow fals... |
Given a sequence $(a)$ of lenght $n$, such $a_1 = a_n = 1$ and $a_i \in \left \{ -1, 1 \right\}$.
We want to find a subsequence $(b) \subset (a)$ which statisfies the following conditions:
The length of $(b)$, (let's call it $k$) is the largest possible
$b_k = b_1 = 1$
Each prefix sum $b_1$, $b_1+b_2$, $b_1+b_2 +... |
I'm working on a proof that deals with a modified PDA, which is identitical to a PDA, but with transitions: \begin{equation*}
a,b \to c
\end{equation*} where $a$ is a context free grammar, instead of just a symbol. The modified PDA then reads a prefix $w'$ of $w$, the suffix of the input stream, where $w' \in L(a)$.
I'... |
A deterministic computation can only be run backward in time, if all transitions are one-to-one. This restriction is absent for non-deterministic computations. Hence it seems to me that non-deterministic computations be can run both forward and backward in time. But because the output becomes the input for the reversed... |
I'm having a lot of trouble constructing a PDA for the language: \begin{equation*}
\{a^m b^n : m < 2n < 3m \}
\end{equation*}
I know if I push a symbol for each $a$ I see, then pop 2 symbols for each $b$ I see, then I should run out to satisfy the $m < 2n$ part of the inequality. But I really don't understand how to in... |
What is the time complexity of the recurrence relation
T(xn) + T((1 − x)n) + cn
|
I can't seem to find this stated explicitly anywhere, which makes me wonder if I have it all wrong.
So first, let's say we view problems in NP as degenerate problems in FNP, where the codomain of the binary relation is the set {true, false}.
Second, FSAT is known to be FNP-complete, meaning that everything in FNP can b... |
I been looking at this site and it says that people found solutions for TSP tours that are just 0.031% higher than the optimal tour is. Without finding the optimal tour how does they know what length it is supposed to be?
|
Those terminologies confuse me. As I understand
SAT solver: decide the satisfiability of propositional logic (using DPLL or Local Search).
Decision procedure is a procedure to decide the satisfiability of a certain decidable first-order theory.
SMT solver is a SAT solver + decision procedure.
Theorem prover indicates... |
It is known that HORN-3SAT is complete for $P$ under Logspace many-one reductions ($<_L^m$).
This implies that $\bar{A} <_L^m A$ for any $P$-complete problem $A$, where $\bar{A}$ means the complement of $A$. This immediately follows from that fact that $P$ is closed under complement and the $P$-hardness of $A$.
My qu... |
After skimming Multiplication by a Constant is Sublinear (PDF), (slides (PDF), slides with notes (PDF)) I was wondering if this could be extended to division by a constant in sublinear time?
Additionally, what about division with a constant numerator, ie. "division of a constant"?
|
I am reading "Neural Networks and Learning Machines" and in Chapter 11 the book covers Boltzman machines and it is stated "the network [Boltzmann machine] can perform pattern completion", but does not show how this would be done in practice, or how a Boltzmann machine could be used at all.
As I am more the "hands-on" p... |
I'm just wondering what the correct notation is when referring to an average case complexity of an algorithm that was calculated by doing empirical analysis.
For example, I have tested my algorithm and fitted the results to the curve $f(n)=2.65\times 10^{-15}\cdot(2.17^{n})$ and in my report right now I'm saying someth... |
Assume two languages $L_1$ and $L_2$, both of which are non-context-free.
Let $L = L_1 \cap L_2$. Could $L$ be context-free?
|
I was reading a proof that said that if $A \le_{m} \bar{A}$, then it can be inferred that $\bar{A} \le_{m} A$ as well. Is this a logical conclusion, and if so, why? I didn't think this followed with languages A and B, but if B is A's complement, can one make such a statement?
|
Give a context free grammar for the following language over $\Sigma = \{0,1\}$:
$ L = L_1^* $
where $ L_1 = \{0^n1^n : n \geq 0\}$.
Not really sure where to start with this one. Any help is appreciated
|
This almost makes sense to me, but I feel like I'm missing something.
I know that for a decidable language, there must exist some total computable function $f$ that can take in any $x \in \sum^{*}$ and tell us whether or not $x$ is accepted (while my textbook is unclear, I would infer from this that decidable languages... |
I am trying to find an efficient solution to my problem. Let's assume that I have positive weighted graph G containing 100 nodes(each node is numbered) and it is an acyclic graph. So there cannot be any edge like 2,2 or 2,1. I have got a list of nodes let's say 10 from graph G. Let's say each of these nodes are also in... |
Suppose I am given a number $n$ (less than $10^8$) and $m$ (less than $10^7$) and $p$ (less than $10^4$), I have to write a program to find number of numbers that divide $n^m$ exactly $p$ times.
Mathematically, I have to find number of distinct $x$ such that
$$ n^m \equiv 0 \mod x^p \qquad\text{and}\qquad n^m \ne 0 \mo... |
Wikipedia:
The structured program theorem [...] states that [...] any algorithm
can be expressed using only three control structures. They are
Executing one subprogram, and then another subprogram (sequence)
Executing one of two subprograms according to the value of a boolean expression (selection)
Executing a subpro... |
Have the bioinformatic methods like sequence analysis, genome annotation, comparative genomics (and many others), been applied to solve problems outside the field of bioinformatics?
|
I'm reading this article about game semantics and I'm a bit puzzled with the definition given for $\Upsilon$ in section $3.3$. There are some points that are either unintelligible or that don't make sense at all.
The definition provided is based on the concept of schedule:
A schedule $e:\{1, \ldots, n\} \rightarrow {0... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.