instruction stringlengths 35 29.1k |
|---|
I am studying Software Engineering and I have different LTL formulas for which I have to determine if they are valid, unsatisfiable or neither.
Here are the formulas :
(<>[]p ∧ <>[]q) → <>[](p ∧ q)
([]<>p ∧ []<>q) → []<>(p ∧ q)
([]<>p) ∨ ([]<>¬p)
([](p → <>q)) → (p → <>q)
([]false) → (<>false)
I don't really understa... |
If the language is implementable as mere DFA (i.e. it's a regular language), then why would one need a parsing algorithm such as Earley?
Regular languages are a subset of context-free languages, but what advantages would call for Earley over a DFA in the case of a regular language?
E.g. in this example:
https://en.wik... |
I'm new in this area of complexity and I'm trying to get into it by understanding basic proofs.
I want to prove that if $L\in P$, so $L^k\in P$, where $k$ is non-negative integer.
How to prove it in the "official" way?
|
I know that NAND gates can be used to create circuits that implement every truth table, and modern computers are built up of NAND gates. What is the theoretical link between NAND gates and Turing completeness? It seems to me that NAND gate circuits are closer to finite automata than Turing machines. My intuition is tha... |
Can the context-free grammar model the Kleene star * operation of regular expressions?
If the CFG is reducible to not containing $\epsilon$ productions, as per:
Any context-free language can be converted into an
equivalent grammar in which at most the start variable
derives the empty string
then
how can it express e.g... |
One way to deal with the problem of collisions for a hash table is to have a linked list for each bucket. But then the lookup time is no longer constant. Why not use a hash set instead of a linked list? The lookup time would then be constant. For example, in C++ the hash table could be defined as:
unordered_map<int, un... |
Let's define distance (taxicab metrics) between two points $(x_1, y_1)$ and $(x_2, y_2)$ as
$$|x_2-x_1| + |y_2-y_1|$$
Initially, there are given empty set of points.
I think how to find maximum distance between two arbitrary points (among inserted points). Possible operations are:
1. Insert point
2. Delete point
3. F... |
In wikipedia there's the definition for "Proper CFG".
A context-free grammar is said to be proper, if it has
$$\text{no unreachable symbols}: \forall N \in V: \exists \alpha,\beta
> \in (V\cup\Sigma)^*: S \stackrel{*}{\Rightarrow} \alpha{N}\beta$$
$$\text{no unproductive symbols}: \forall N \in V: \exists w \in
> \S... |
When developing a CFG, I find that one can be confused about whether the grammar is correct, i.e. whether it recognizes only the required strings and not other strings.
But this can be hard to see?
Are there techniques and tools for "proof-reading", whether the grammar is correct and succinct enough?
|
Context free languages that has only one non-terminal is a proper subset of context free languages and they does not contains regular set. Since, CFL is more powerful than FSM and contains regular set, there must be some languages that requires more than one non-terminal. How can I show or proof this formally?
|
The pumping lemma for regular languages states:
Specifically, the pumping lemma says that for any regular language L there exists a constant p such that any word w in L with length at least p can be split into three substrings, w = xyz, where the middle portion y must not be empty, such that the words xz, xyz, xyyz, x... |
I'm currently reading Feynman Lectures on Computation and got stuck in problem 3.1 which says
Suppose we feed a sequence of 1's and 0's - a binary number -
into a machine. Design a machine which performs a pairwise sum
of the digits, that is, one which takes the incoming digits two at a time and adds them, spitt... |
I need to bulid a context-free grammar for
$\qquad \mathscr{L_4}=\{w\in\{a,b,c\}^* \mid w\text{ is not palindrome at all}\}$
Not palindrom at all:
We will say that a word $w$ is not palindrome at all if for all $i$ such that $1\leq i\leq |w|$ the $i$ letter from the beginning of $w$ is not the same like the $i$ lette... |
Maybe a newbie question, but why when we analyze algorithms do we focus on asymptotics? It seems to me the performance of algorithms on finite input sizes (after all, problems are rarely infinitely large) should be as important or more so than when they tend to infinity. Do things simply become too complicated and nu... |
I'm having some trouble figuring out where the "Carry in" value comes from in respects to a one bit full adder diagram. I understand the below half adder,
but my question is: is the the output of the bottom-most AND gate in the bottom diagram equal to the output "C" in the top diagram (Assuming A and B are constant t... |
The DFA is a 5-tuple ($Q,\sum, \delta, q_0, F$)
where
-finite set of states ($Q$)
-finite set of symbols called the alphabet ($\sum$)
-a transition function ($\delta: Q \times \sum \rightarrow Q$)
-an initial or start state ($q_0 \in Q$)
-a set of accept states ($F \subset Q$)
Since in practice (programmatic implementa... |
Stochastic gradient descent with a batch size of 1 is apparently used to learn from single examples as they arrive, but I don't understand why you would use such a small batch size instead of batching training inputs together.
|
The linear grammar is a grammar that's either left, right or left and right linear.
The context-free grammar can contain any kind of productions of non-terminals and terminals.
All linear grammars are context-free grammars.
But what is useful about distinguishing linear and context-free separately?
|
From what I can see, parser combinators are equivalent to scannerless parsing. I do not see this stated in implementations of scannerless parsing page, nor in the parsing combinators page, neither in the google generally. But, it seems they are. I didn't code the low-level rules separately or using different syntax th... |
We know $\mathsf{P=BPP} \implies \mathsf{NEXP\not\subseteq P/Poly}$ or permanent does not have polynomial sized circuits. However permanent needs superpoly circuits imply $\mathsf{NEXP\not\subseteq P/Poly}$ since $\mathsf{P^{\#P}\subseteq PSPACE\subseteq NEXP}$. So why dont we just say $\mathsf{P=BPP} \implies \mathsf... |
I'm learning vantage point trees, and I met this while reading the paper Data Structures and Algorithms for Nearest Neighbor Search in General Metric Spaces by Peter Yianilos (Proceedings of SODA 1993, SIAM, pages 311–321; PDF). The following pseudocode appears in Algorithm 1.
$$\begin{align*}
\hspace{2em}&\hspace{-2e... |
Complexity zoo https://complexityzoo.uwaterloo.ca/Complexity_Zoo:D#dtime states $DTIME(f(n))$ with $PP$ oracle is not in $P/Poly$ if $f(n)$ is superpolynomial.
We know $SUBEXP=\cap_{\epsilon>0}DTIME(2^{n^\epsilon})\not\subseteq DTIME(p(n))$ for any polynomial $p(n)$.
So do we have $SUBEXP^{PP}\not\subseteq P/Poly$? So ... |
I'm trying to find the ambiguity in this grammar so I can remove it and convert it to LL(1), however for the life of me, I can't find the ambiguity. Moreover, I think there is cycle between X and Y and I could not find a solution to solve this.
1) X -->YX|$
2) Y --> ε|A|let A in Y|let A in E end
3) A--> x=E
4... |
Are there problems the decidability of which is unknown but it is known for certain that the problems are less hard than the halting problem.
|
My university's automata theory book claims that the following claim can be proved by induction but it doesn't bother showing the proof.
I've tried to prove it myself but I got stuck at the Inductive Step.
Let $G=(V,T,P,S)$ be a context free grammar.
Prove by induction on $n$ where $n\geq 1$ that:
For every $w\in T^*... |
Does checking for correctness belong predominantly to "semantic analysis"?
Or is it reasonable to be done in earlier phases (in a compiler like construction) as well? Mainly in syntax analysis. Or is syntax analysis often/always "formal", rather than semantical?
http://courses.cs.vt.edu/cs1104/Compilers/Compilers.020.... |
As the question states, how do we prove that for every L ∈ L2 (context-free class of languages) is true that L ∈ NTIME(n)?
Can anyone point me to a proof or outline it here? Thanks!
|
I was making a program for solving 2 SAT problems, using Krom's algorithm. I did not found a lot of information searching in Google, so I used Wikipedia's description of Krom's algorithm to implement it but I'm stuck in the last step.
If I understand it well, the algorithm could be resumed in this:
1) You have to reduc... |
Suppose we have an $n\times n$ array $A$ of non-negative real numbers in which the sum of each row and each column is $1$. We want to find $n$ entries of the array $(x_1,y_1), \dots, (x_n,y_n)$ such that
each $A[x_i,y_i]>0$ and
no pair $(x_i,y_i),(x_j,y_j)$ are in the same row or column (i.e., $i\neq j$ implies that ... |
I've been writing codes to solve a standard partition problem. I've investigated brute force, greedy, Karmarkar-Karp and complete Karmarkar-Karp algorithms.
Standard partition problem: divding a set into two subsets such that the difference between the
sums of the subsets is minimized.
I'm also looking at a non-sta... |
Let's say we have a context-free grammar for the language $a\mbox{*}b\mbox{*}c\mbox{*}$. Is there a way to determine a lower bound for the number of nonterminals in this grammar? I'm pretty sure you need at least 2, but I haven't been able to prove it.
|
$NEXP$ smallest class above $ACC^0$ that we know is separated from $ACC^0$.
We do not know if either $NP$ or $P/poly$ is in $ACC^0$.
Suppose every problem in $NP$ can be solved in polynomial time with polynomial sized advice string (that is $NP\subseteq P/poly$ holds) however the circuit that computes it needs only $A... |
Is there a minimum number of non terminal we need to use in order to simulate a finite automata with n states? When we try to convert a language accepted by NFA to context free language, do we need n number of non-terminal to store n states in the NFA?
|
It is known that Markov decision processes (MDPs) can be solved using linear programming (see page 24 of Carlos Guestrin's PhD dissertation). The linear program is:
$$min_{V(x)} \sum_x \alpha(x)V(x)\\
\text{subject to: } V(x) \ge R(x,a) + \gamma\sum_{x'}P(x'|x,a)V(x')\text{ for all }x\in X, a\in A$$
where $V(x)$ is the... |
If the alphabet is countably infinite, then is the number of finite-length strings over this alphabet countably or uncountably infinite?
|
With the context-free grammar in Chomsky's form:$$S\to BA|AC|b\\A\to AA|AB|CC|a\\B\to AS|BB|CA\\C\to AB|SS|b$$
I need to:
run the CYK (Cocke-Younger-Kasami) algorithm and decide if I can derive the word $baabb$ from the context.
write the left derivation.
My try:
$1.$
$$
\begin{array}{c|lcr}
i\bigg/j & 1 & 2 &... |
I've read a proof explaining why $A_{\mathrm{TM}}$ is undecidable, and I don't seem to understand why we need to give the opposite of $H$ function $D$ itself as input.
Here's the copy-paste of that proof (link: https://courses.cs.washington.edu/courses/cse322/04au/Lect10.pdf):
$A_{\mathrm{TM}} = \{\langle M,w\rangle\mi... |
I am trying to prove the following theorem:
For every derivation-tree in a context-free grammar $G=(V,T,P,S)$ there exists at most one leftmost derivation.
My partial proof by contradiction (I stucked at Cases (2) and (3)):
Let $G = (V,T,P,S)$ be a context-free grammar.
Suppose that for some derivation-tree there are... |
What algorithm to apply when a graph have cycles ("circuits") and some negatives values in order to find the shortest path from $x1$ to all vertices? For instance in the following graph?
I know I can't use Djikstra...
|
In order to prove that 3-coloring is decidable, is it sufficient to say:
Each node in the graph has 3 possible colors
Therefore we can enumerate over all $3^n$ possibilities and then check that no two edges connect nodes with the same color
Does that prove that 3-coloring is decidable? Or do I need to construct a T... |
I proved by induction that every AVL tree may be colored such that it will be red black tree. The problem is that I can't see an error in my proof. Look at my proof.
Induction for height.
Let's assume that it is truth for each AVL tree of height at most $h$.
Let's consider AVL tree $T$ of height $h+1$. Now, let's con... |
This may be a ridiculous question, but is it possible to have a problem that actually gets easier as the inputs grow in size? I doubt any practical problems are like this, but maybe we can invent a degenerate problem that has this property. For instance, perhaps it begins to "solve itself" as it gets larger, or behav... |
Where can I find a list of algorithms organized by complexity.
I'm curious of what O(n), O(NlogN) algorithms are there.
These are the most useful for large datasets.
I'm aware of this but it isn't organized by complexity:
https://xlinux.nist.gov/dads/
Thanks
|
How do I transform the following formula into conjunctive normal form?
$$
A \land B \Leftrightarrow B \lor A
$$
|
I've read multiple time sentences similar to
Finally, for standard image classification bag-of-words
features based on SIFT descriptors have been found
critical for high performances. We first compute a
standard SIFT discriptor at regular grid points over
the whole image.
Source: "Multi-class image segmentati... |
I am looking for fast procedures for polygon matching, i.e. checking polygon similarity under different transforms
translation only,
translation + rotation,
translation + scaling,
translation + rotation + scaling (= similarity).
The matching can be partial, meaning that there can be a good match on a significant frac... |
I'm dealing with a BIP question, that represents a graph problem.
The goal is finding the graph problem.
I've spend a lot of time trying to solving this question but I couldn't find the answer to that question.
All I'm given is the set of constraints and the objective function:
I'd really appreciate your help, no full ... |
I'm new to computer science and came across an issue while learning about ripple carry adders. I'm trying to add binary 1+1+1 below (excuse the poor photoshopping). I know the answer should be binary 11, but my sums were 0 and 0 with a carry of 1. Shouldn't my sums be 1 and 1 with a carry of 0? What am I doing wron... |
I am trying to brute force a classical substitution cipher. The problem is that there are $26!$ possible keys. So, I'd like to do frequency analysis to try likely keys first. Then, on the first $n$ tries I will use a dictionary to see if there are actual words in the decryption. That way, I don't need to try all possib... |
Let's define thin AVL tree as AVL tree $t'$ such that contains minimal possible number of nodes among all AVL tree $t$ such that $height(t)=height(t')$.
I am trying to prove that every thin AVL tree may be colored to be red-black tree. I would like to use induction. I tried to do induction by height - but as you cou... |
I've read those words in quite a lot of publications and I would like to have some nice definitions for those terms which make it clear what the difference between object detection vs semantic segmentation vs localization is. It would be nice if you could give sources for your definitions.
|
I have many problems understanding algorithms described in the books.
Well, I'm talking about the mathematical description of a problem.
For example: I don't understand how the math of Unscented Kalman Filter works.
I have spent many days studying good books but for me just code make sense.
I have the basic math from... |
If we consider two predicates:
$b(x)$: x is a boy
$c(x)$: x is clever
Then, there are four statements involving $∀, b(x), c(x), →$ and $↔$ . These are below along with my interpretation of their meaning. Correct me if I am wrong in any of these interpretations.
(a) $∀x(b(x)→c(x))$ - All boys are clever
(b) $∀x(b(x))→∀... |
I encountered some system of ~5000 random nodes connected by ~8000 non-hookean springs, with ~1300 nodes at the boundary fixed as the "wall", the potential of the springs are of the form $dx*e^{(dx/a)}$ where $a$ is a constant and $dx$ the strain (displacement/original length) of the spring, I am using Monte Carlo meth... |
Are the "symbols" of a context-free grammar the same thing as the terminals?
Are the set of symbols and set of terminals the same?
|
I'm trying to compare a custom neural network architecture with other existing ones. I'm quite new to the CS field and I'm looking for desirable properties and/or applications of neural networks(especially recurrent architectures). Are there any?
|
Given an undirected, weighted graph $G=(V,E)$ and two nodes $s,t \in V$ and weight function $w: E \rightarrow \mathbb{N}$. The weight of a (s,t)-cut $ (U, U^C)$ is given by:
$$ w(U,U^C) := \sum_{\{i,j\}\in V :i\in U \land j\in U^C} w(\{i,j\}) $$
Reduce $$ MinCUT:= \{<G,c,s,t,k>\mid \text{There is a (s,t)-cut with weig... |
Binary is the result of using the simplest possible building blocks to hold memory, transistors, entities that can be switched between two states, on or off. We took that idea and ran with it, and it works very well, but I was wondering:
What if we replaced transistors with entities that could transition between more t... |
A definition for terminals and non-terminals of a CFG says that
terminals: The symbols that do not appear at the LHS of productions.
Therefore,
Are all non-terminals of the CFG given by the LHS of productions?
|
So here is the problem:
Say I want to find the only possible combinations to find the sum of a specific number using only the numbers 1, 2, & 3 with a specific number of additions.
I know this sounds confusing, but let me give an example:
Say we were trying to find the number of possible combinations to add up to the ... |
I'm a bit confused about this question:
"Multiple jobs can run in parallel and finish faster than if they had run sequentially. Suppose that two jobs, each needing 10 minutes of CPU time, start simultaneously. How long will the last one take to complete if they run sequentially? How long if they run in parallel? Assum... |
Given two domains, $D_1$, $D_2$,
already equipped with Scott (or Lawson) topology,
the product domain $D=D_1\times D_2$
has the Tychonoff product topology, e.g.,
Mathematical Theory of Domains, page 124.
I can't seem to find a similar discussion of the function space topology
for $D=[D_1\rightarrow D_2]$,
though ... |
I am studying for NP problems.
To prove k-CNF-SAT is NP-hard, there must exists something that can be reduced to k-CNF-SAT. So what I thought is to reduce 3-CNF-SAT to k-CNF-SAT and reduce k-CNF-SAT to 3-CNF-SAT both proves that it is NP-hard.
I know that 3-CNF-SAT is NP-Complete, because of its number of literals, ... |
Is there an arithmetic problem that is known to be in $TC^{i+1}$ but not known in $TC^i$ for any $i\geq0$? Concrete examples for $i=0$ would be of most utility however any arithmetic example is fine.
|
Let's say that I make a binary search tree and store it in an array so that I end up with an array that is more cache friendly to binary search compared to a sorted array.
The binary tree is full on all levels except possibly the last level, where it is filled from left to right.
Specifically index 0 is the root node, ... |
While reading about minimal instruction set computer I found out that one needs at least (for example) the ability to increment or decrement the value stored in register, a test for zero and a jump.
A machine with such instruction set would be Turing-complete, correct? Is this called "Counter machine"?
But then I found... |
Problem Statement
The problem is to calculate the coefficients $A_{j_1\cdots j_n}$, of a square matrix A with size $N$ by $N$ of complex double elements, whose weighted sum with $N^2$ irreducible matrices $[j_1]\otimes \cdots \otimes [j_n]$ is equal to $A$. $N=2^n$, where $n$ is a natural number. $[j]$ are the Pauli ma... |
$$C \to A B C \mid A$$
Obviously has the same FIRST(C) for the both productions.
But how can this be left-factorised?
Tried:
$$C \to A B C'$$
$$C' \to A C \mid \varepsilon$$
The FIRST sets are disjoint, but is this correct?
Should $B \to \varepsilon$ (or $C \to \varepsilon$) be added as well, so that it handles $A B A... |
Just to make it clear.
(since my book doesn't mention anything like this)
Suppose we have a context free grammar $G=(V,T,P,S)$.
where $T=\{a,b\}$ (The other sets doesn't really matter).
Since $\Rightarrow^*$ is the reflexive transitive closure of the relation $\Rightarrow$ on the set $(V\cup T)^*$, I see no problem in ... |
Consider the following problem:
Input: two arrays $A$ and $B$ of length $n$, where $B$ is in sorted order.
Query: do $A$ and $B$ contain the same items (with their multiplicity)?
What is the fastest deterministic algorithm for this problem?
Can it be solved faster than sorting them?
Can this problem be solved in deter... |
Input: Planar graph $G$ and its embedding in sphere $\Pi$, edges $e, f \in E(G)$ and integer $k$.
Output: A shortest closed walk (one among possibly many, if exists) in $G$ using $e$ and $f$ which contains exactly $k$ faces of $G$.
A walk $w = v_1,e_1,v_2,...,e_i,v_i$ (where $v_j \in V(G), e_j \in E(G)$ for $1 \le j \... |
Has anyone ever considered the class of languages $X$ generated
by growing context-sensitive productions which are described by context-free rules?
In particular, I wonder if there is a NP-complete language inside this class.
The proof that any language in GCSF is also in $P$ uses the fact that there is a constant $d>1... |
Given a set of two-dimensional rays, how can I determine the probable focal area of the rays?
For simplicity, assume a circle focal area.
Imagine a number of people throwing paper airplanes at a circular target. Some small percent are throwing in the completely wrong direction.
Is there any algorithm that can help me d... |
Given the fact that the qbits have superpositions, and have more representational power compared to circuits, are there any problems that require at least exponential time to guarantee a solution with a quantum computer?
I've checked the Complexity Zoo and couldn't find any complexity class mentioned there that fits th... |
I'm volunteering for a non-profit, and was asked to write a program for this problem, but I'm having a little trouble tackling it. Here's the problem:
So they're a daycare, and they get paid by the government depending on specific ratio's of staff to children. Here are the possible ratios and their pay:
one staff to 3... |
I have an application that depends on a random number generator to perform. The application might be sensitive to the quality of the random numbers, but I don't know for sure. I'd like to test this, and if it is, what the degree of sensitivity is.
I've currently got a xorshift1024* PRNG plugged in. It's fast and I... |
I am studying PDA at the moment, and I came up with this question.
The figure above tells me that although both PDA accept the same language, one is non-deterministic and the other is deterministic. I don't understand the reason why the first one in non-deterministic.
As far as I know, the conditions for DPDA is that
... |
This topic is normally brought up in computer science as a demonstration of how to calculate permutations but it stops there since we usually end up calculating that there are more images of a decent resolution then that of all the atoms we estimate are visible in our universe.
This makes sense because an image of a de... |
I see that language specifies reserved words, delimiters and whitespaces in the lexer section. Are delimiters just like reserved identifiers in the punctuation space or they have additioinal function regarding skipping the whitespace?
Namely, spec says
Each lexical element is either a delimiter, an identifier (which ... |
When dealing with sorting networks, we can check the validity of a sorting network with only $2^n$ sequences of $0$ and $1$ (where $n$ is the size of the collection to sort) thanks to the zero-one principle:
The zero-one principle states that, if a sorting network can correctly sort all $2^n$ sequences of zeros and on... |
Given a finite alphabet $A$ with $|A|=n$, what is the largest $l$ so that a string $s=a_1...a_l$ of length $l$ exists with $a_i\in A$ so that there is no $i,j,d$ with $i\neq j, d > 0$ so that $a_i = a_{i+d}$ and $a_j = a_{j+d}$?
Thanks to @greybeard I now know that such strings are called 2-surprising strings. More inf... |
I want to evaluate two polynomials $f$ and $g$ simultaneously, on the same input (in a computer program). These polynomial have only coefficients $0, 1, a , b$ and their degree is less than 700.
I want to compute $f(x)$ and $g(x)$ simultaneously as efficiently as possible. I'm looking for an algorithms that say me how ... |
From what I read in the preliminary version of a chapter of the book “Lectures on Scheduling”
edited by R.H. M¨ohring, C.N. Potts, A.S. Schulz, G.J. Woeginger, L.A. Wolsey, to appear around 2011 A.D.
This is the PTAS Definition:
A polynomial time approximation scheme (PTAS) for problem $X$ is an
approximation scheme... |
The following system of restrictions is given:
$$y_1+ 2 y_2 \leq 4 \\ 2y_1+y_2 \leq 2 \\ y_1+b y_2 \leq 3 \\ y_1, y_2 \geq 0$$
For which values of b is there a degenarate basic feasible solution?
Can we make a drawing to see when we will have a degenarate basic feasible solution?
The first tableau is:
$\begin{matrix}... |
How does the MC-AIXI algorithm work? I tried to read the paper, but I got lost in the math. I understand the concept of AIXI very well, but I don't get two things:
1) Where does MC-AIXI get its models from?? Kolmogorov complexity is non-computable! Why can MC-AIXI get models?
2) How exactly does the decision tree work?... |
Suppose Alice knows a secret vector of $N$ bits, say $A=\langle a_1, a_2, \ldots, a_N\rangle$ and Bob similarly knows $B=\langle b_1, b_2, \ldots, b_N\rangle$. Is there a protocol that allows them to determine the number of bits that their vectors have in common, without revealing any additional information about what... |
In 1950s a number of methods for circuit minimization for Boolean functions have been invented. Is there an extension of those methods or anything similar for optimising time or space complexity of algorithms?
For example an implementation of bubble sort as an input for such an algorithm would produce an implementation... |
Given there are 4 octaves(the 1st octave is the original image, the 2nd octave is half size of the original image, and so on.), does SIFT calculate the keypoint's orientation in the original image or the octave the keypoint extracted from?
For example, there is a keypoint found in the 3rd octave. Does SIFT calculate ... |
Let $f_i(x)$ be a continuous, convex, piecewise-linear function for $i=1,\ldots,n$. Define
$$g(x) = \min_{1\leq i\leq n} f_i(x).$$
Clearly, $g(x)$ is also a piecewise linear function. What would be a good approach to compute all the pieces? In other words, it's clear that $g(x)$ can be represented as
$$g(x) = c_k + d... |
I never heard or read about the concepts of "Minimizing Push Down Automata or Turing Machines"?
why we are not concerned about minimizing them, in general?
|
A type signature in Haskell is written in the following format:
functionName :: arg1Type -> arg2Type -> returnType
There's a (hyphenated, after a person or persons) name for this style of type signature (which predates Haskell), but it's escaping me and I can't find it anywhere.
|
I've got an exam next week all about this sort of thing. Ie: Find polynomial certifier for a problem, give a polynomial reduction, prove problem X reduces to Y and etc.
The problem is, there doesn't seem to be anyone available in my department to help me until after the test. I really struggle to understand it and get... |
I'm given the following recurrence equation:
$$\begin{align*}
T(1) &= 0\\
T(n) &= T(n/2) + 1 && \text{when $n > 1$ is even}\\
T(n) &= T((n+1)/2) + 1 && \text{when $n > 1$ is odd.}
\end{align*}$$
The problems I have are the following:
1) What does $T(1) = 0$ mean when it comes to writing computer program? I... |
For a list which contains a set of elements I have two starting positions pos1and pos2 that are selected randomly. Next, I check if I can swap these elements. If the swap is not possible I want to look at the next pair of elements closest to the two starting positions.
list = |9|1|2|3|5|4|6|7|8|10|
Lets say my start po... |
A pseudo-polynomial time algorithm is an algorithm that has polynomial running time on input value (magnitude) but exponential running time on input size(number of bits).
For example testing whether a number $n$ is prime or not, requires a loop through numbers from 2 to $n-1$ and check if $n$ mod $i$ is zero or not. If... |
We're given a set of $n$ intervals $[a_i, b_i]$, $i=1...n$.
I am looking for a data structure which makes it possible to query for all intervals that contain the point $x$.
My proposition is using two-dimensional interval (sometimes name is segment) tree. Each query will take $O(\log^2 n + k)$ time, where $k$ is n... |
I've studied this lots, and they say overfitting the actions in machine learning is bad, yet our neurons do become very strong and find the best actions/senses that we go by or avoid, plus can be de-incremented/incremented from bad/good by bad or good triggers, meaning the actions will level and it ends up with the bes... |
One procedure for table-driven top-down parsing is given here:
https://www.cs.rochester.edu/~nelson/courses/csc_173/grammars/parsing.html
This gives for matching the input the lines:
else if NextInputSymbol == top then
/* Match terminal symbol in input */
Pop(stack)
/* Get next terminal symbol in input */
... |
I'm studying computer architecture and I'm doing an experiment.
Does LRU make sense in a direct mapping cache? I'm quite confused.
Thank you.
|
EDIT: as templatetypedef commented, this problem is to find out if a DFA has a synchronizing word (a.k.a. "reset sequence").
Given a finite state set $Q$, a finite alphabet $\Sigma$, and a transition function $\delta : Q \times \Sigma \rightarrow Q$, I want to find out if there is a state $q_f \in Q$ and a string $s \i... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.