instruction stringlengths 35 29.1k |
|---|
I have already posted this question on the other page, but I was suggested to post it here as it might be more relevant.
I am currently following a course in concurrency theory and I am currently trying to prove that the Weak Bisimulation relation ≈ is an equivalence relation.
I have managed to prove cases for reflexi... |
Are there examples of regular languages $L_1$ and $L_2$, where $L_1$ and $L_2$ is not a subset of each other but that $(L_1 \cup L_2)^* = L_1^* \cup L_2^*$ ?
|
I have seen in many text when the author says "reasonable model of computation". What does it really mean?
|
I understand the concept that the CPU's machine code is what translates the binary input into commands, and then executes these commands, many billion times per second. I can understand how, given this concept, everything works -- breakneck calculations and a fantastically comprehensive codebook allow for advanced proc... |
How I would show: ∀x.(P (x) → Q(x)), ∃x.P (x) ⊢N ∃x.Q(x) using Natural Deduction?
Would I not need to know what P(x) and Q(x) are to prove soundness and completeness?
|
I have a real vector $v$. From this vector, I want to extract a sequence of integers, $ix$. The first integer is found by, $ix_0=argmax(v)$. 1 is then subtracted from $v_{ix_0}$, and the process is repeated until all elements of v are less than 0.
The following pseudo-Python function does this.
def countdown(v):
... |
The puzzle is made up of (n x n) squares so when taking the problem the input size would be n.
Rules of Masyu:
The goal is to draw a single continuous non-intersecting loop that properly passes through all circled cells. The loop must "enter" each cell it passes through from the center of one of its four sides and "e... |
I've been reading: https://en.wikipedia.org/wiki/Adjacency_list
It says that that graph can be constructed with the list $\{b, c\}, \{a, c\}, \{a, b\}$.
However, what if I wanted to construct a directional list? Does $\{b, c\}$ point to $b$ or $c$?
How can you use a list to represent a directional graph?
|
Sorry for long title - the question is a bit unwieldy. To state the question precisely, I'm wondering about the following proposition:
Let $\Sigma = \{0,1\}$. If $A$ and $B$ are Turing-recognizable and $A \cup B = \Sigma^*$, then there exists a Turing-decidable language $C$ such that $A \cap \overline{B} \subseteq C$ ... |
Graph $G$ is 2-connected. It means that for each two edges there are exists at least to disjont (in terms of edges) paths.
Graph $G$ is not directed.
Our task is to find spanning subgraph $H$ of graph $G=(V,E)$ such that $H = (V, F)$ such that $F=O(|V|)$ and $H$ is 2-connected.
So far I have came up with some idea... |
I'm studying the Approximation For Restricted Shortest Path Problem paper and don't understand what he is doing. In particular, I wonder why it is important that one computes upper and lower bounds $UB$ and $LB$ on $OPT$, so that their ratio is below some constant.
The problem is to find the least-cost path from nodes ... |
I am attempting to find the maximum value in a matrix (or 2d array) and want to find it in less than O(n) time. The easiest way, which results in O(n) run time, is an element wise search. If a better run time is possible, I would also like to find any values over a specific threshold in less than O(n) time. Is any of t... |
Connect 4 is a classical game in computer science. Recently I found a web game where one could play the game on a 3d board. One version can be found here
https://www.mathsisfun.com/games/connect3d.html
I know Connect 4 has been completed, and developed algorothms for solving it. Like the minmax strategy.
Algorithms f... |
I have an introductory class in computability theory and I'm currently working on my first exercises. I'm wondering if I'm on the right track with proving undecidable languages. Could you please have a look and give me some feedback?
I have the following decision problem and I want to show that it is not semi-decidable... |
We know that how much time a program needs is not computable.
Do we know how much memory a program needs is decidable?
|
Just a question for personal comprehension. Consider the following statement:
It is NP-hard to approximate Set-Cover within a $(1 - \epsilon) \log n$ factor for any $0 < \epsilon < 1$.
Now, NP-hardness refers to decision problems.So what is NP-Hard exactly here ?
My guess is that the statement is equivalent to sayin... |
In this paper,
http://www.vision.caltech.edu/malaa/publications/aly08realtime.pdf
the author mentioned "the vertical and horizontal focal lengths" but didn't have any clear definition.
My understanding about "focal length" is the distance between the lens and the image plane.
Does anyone have the idea about these focal... |
If $c\in \Sigma$ denotes terminals, then is $Y=\Sigma \setminus \{c\}$ the set of non-terminals?
These notations are used here, p. 379. But I cannot find their definitions.
So what I'm asking is, is the above a reasonable interpretation?
|
I have a faint notion of what NP hard is (that a problem is legit difficult 3 SAT for example).
I have forgotten what coNP hard, and Wikipedia tells me that the complement of coNP hard is NP hard...not really helping there
Can someone please clarify for me on an intuitive level what does it mean for a problem to be co... |
Why are multi-threading programs more prone to errors than single threaded programs ? or why is multi-threading programming one of the areas where developers are (more) prone to errors? Is this in general or is it valid only for scenarios where there are shared resources being used by multiple threads ? Are the difficu... |
The set packing problem is :
Given a universe $U$ and a family $S$ of subsets of $U$, a packing is a subfamily $C\subseteq S$ of sets such that all sets in $C$ are pairwise disjoint, and the size of the packing is $|C|$. The goal is to find the $C$ where $|C|$ is maximum.
According to Wikipedia, there exists a $\sqrt{|... |
I've seen the production rule $\stackrel{*}{\rightarrow}$ in some papers concerning regular languages.
What's the meaning of $\stackrel{*}{\rightarrow}$ production rule?
|
Given a word composed of opening and closing parentheses and brackets, we can do two operations:
Rotate a parentheses or bracket. That is, you can replace ( for ), ) for (, [ for ] and ] for [. This operation has cost 1
Replace a parentheses for a bracked and viceversa without changing its orientation. That is, change... |
Can you recommend an introduction to the topic of cut generating functions? I am looking for introductory or review-like material.
I did find the following survey paper, but it seems to be addressed to experts, so not what I'm looking for:
A geometric approach to cut-generating functions. Amitabh Basu, Michele Confor... |
What are some real world application for 2 stack pushdown automata, as i can only find pushdown automata applications in the internet
|
The following question appears in Section 4.9 of "Computational Geometry: Algorithms and Applications" By Mark de Berg, Marc van Kreveld, Mark Overmars, and Otfried Schwarzkopf:
Show that the problem of finding a center of rotation that allows us
to remove $P$ with a single rotation from its mold can be reduced to t... |
I have a band matrix -- a sparse, square, symmetric $N \times N$ matrix whose structure looks like the following:
Here, the area under the blue stripes is the non-zero elements; everything else is zero
Is there an algorithm to invert this kind of matrix that is simple yet more efficient than Gaussian elimination and L... |
I work in computational fluid dynamics. And I spend most of my time waiting for simulation to complete.
The common way to improve simulation performance is to use a suitable distributed linear algebra library, a big computer with Infiniband, tweek some parameters and hope for the best.
Most of my simulations can be s... |
I know that Big $O$ notation is used to describe the upper bound of running time of an algorithm, if we consider time complexity of that algorithm. However, I'm not sure why the following is not stated everytime anyone attempts to explain time complexity or Big $O$ - the fact we're looking for the least upper bound of ... |
Would much appreciate someone explaining how they managed to get to the upper bound of this algorithm.
$$T(n) = 2T(\lfloor \sqrt n\rfloor) + ln (n)$$
$$T(1) = 0$$
Solution is given as:
$$T(n) = O(logn*log(log(n)))$$
|
I use Moore's algorithm to minimize DFA as concluded below.
We start with the complete graph with vertices Q and edges E = { {p, q} | p = q ∈ Q }
We mark all edges {p, q} ∈ E with p ∈ F and q ∈ F
As long as there exist marked edges in E, we repeat the following procedure. We choose some marked edge {p , q } ∈ E. Then ... |
I have two questions regarding nullable nonterminals in a grammar. Often a simple algorithm is described to find nullable nonterminals:
Basis: if $A \rightarrow \epsilon$ is a production, $A$ is nullable.
Induction: if $A \rightarrow X_1X_2\ldots X_n$ is a production, and $X_1, X_2, \ldots, X_n$ are all nullable, the... |
Suppose I have a finite automaton to match a simple string "abc" and I built some software around it to not only match the start of a string or a full incoming string, but rather to search through a string and find the first match. As an example consider the string to be "12abcxxx".
The naive approach is to start with ... |
I am trying to teach myself how to write Context-free Grammar for different languages. I have an example language I am trying to work out and this is the answer I came up with, does it make sense?
the language is (i used an image because i don't know how to write out the powers on a mac):
This is my answer:
S --> rSjZ... |
I have a problem P that is said to be O(n^7) in the worst case.
I'm asked to agree or not if it is solvable in O(n^9) time. And also I'm asked to agree or not if P cannot be solved faster than Ω(n^7) in the worst case.
My answer for the first question is that if P is bounded by O(n^7) it is also solvable in O(n^9).
And... |
I am trying to solve the following problem:
Given a matrix which consists of only 0's and 1's. Considering the matrix as a metal sheet, we need to "cut-out" square blocks of sizes 2x2 consisting of only 0's from it. A 1 in the sheet (represented by the matrix) indicates that we cannot cut the region out from the sheet.... |
In class, we were given the following problem:
We are given a directed graph G = (V, E) on which each edge (u, v) ∈ E has an associated
value r(u, v) which is a real number in the range 0 ≤ r(u, v) ≤ 1 that represents the reliability
of a communication channel from vertex u to vertex v. We interpret r(u, v) as the... |
Given the following PDA describe the language it accepts.
Q = { q0, q1, q2 }
Σ = { a, b }
Γ = { A, B }
F = { q1, q2 }
z = B
δ ( q0, a, B ) = { ( q0, AB ) }
δ ( q0, λ, B ) = { ( q1, λ ) }
δ ( q0, b, A ) = { ( q2, λ ) }
δ ( q0, a, A ) = { ( q0, AA ) }
δ ( q2, b, A ) = { ( q2, λ ) }
δ ( q2, λ, A ) = { ( q2, λ ) }
δ ( q2, ... |
Sometimes, when reading about algorithms or other theoretical topics, I see time complexities that include other time complexities within the expression.
For instance, "the best fixed-parameter tractable algorithm for the vertex cover problem has a time complexity of $O(1.2738^{k} \cdot n^{O(1)})$."
What does this $O(1... |
I have a problem with understanding the $P_2 \mid \mid C_\max$ problem which is also known as Tasks Scheduling on Multiple Processors.
In fact, in my case I need only one processor (but the problem is usually described for 2 or more so let it be). I understand what is all about: given a set of tasks with constant dela... |
What is the successor of 6 in this tree: 7 or 9?
|
I was reading CLRS and it said in the chapter for the accounting method (for amortized analysis):
the total credit associated with the data the structure must
be nonnegative at all times.
where total credit is defined as:
The total credit stored in the data structure is the difference between the total amortized c... |
In this problem, a robot is moving around on a rectangular grid and try to traverse and cover the whole grid, but it can only go one direction until it hits the boundaries/obstacles or its own trace. The problem is to determine the starting position and the directions of robot so it can cover the whole grid (also in so... |
I remember reading this somewhere (will post the source as soon as I find it), but was wondering, if anyone knows why this is true or has maybe an example to portray why this is the case.
|
I was trying to understand why using only path compression (no rank) would yield $m log(n) $ total run time for a sequence of $m$ operations for Find-Set.
I was told that the potential function:
$$ \Phi(x_1, ... , x_n ) = \sum_i log(w[x_i])$$
would work (where $w[x_i]$ is the weight of the subtree rooted at $x_i$, i.e.... |
How to find which of $2^{n}$ to $n^{a}$ is an (upper bound, tight bound asymptotically larger, etc..)? I tried to use the formula:
$$ \lim_{n\to\infty} \frac{f(n)}{g(n)} $$
where $f(n) = n^{a}$ and $f(n) = 2^{n}$
But I cannot figure out how to use L'Hospital's rule to solve it. We are guaranteed that $a \in \mathbb{N}... |
Let L be the language consisting of all strings in (a+b)* that have an even number of letters and do not have aaba as a substring.
Into how many L-equivalence classes is (a+b)* divided?
|
You are given a directed acyclic graph G = (V, E) in which each node has one
“left” out-arc and one “right” out-arc, with a distinguished source node s and sink node t. You are also given a list of “ties” (u, v) which say that if you take the left [right] edge out of u, then you must also take the left [right] edge out... |
I'm trying to understand comparisons between the two. Is there ever a case where is it better to use Huffman Coding over LZW? Could the compression ratio for Huffman ever surpass that of LZW?
Thanks!
|
We have two languages: $L_1,L_2$. We know that $L_1L_2$ is regular language, so my question is if $L_2L_1$ is regular too?
I try to find a way to prove it...
I can't assume of course that $L_1,L_2$ are regular...
So I look for a way to prove it.
I'd like to get any hint!
|
MAX-2SAT is NP-Complete.
If the solution is stipulated to be unique, is MAX-2SAT still NP-complete?
|
I have:
<A> -> <B> <C> <D>
<D> -> <D> <C>
<D> -> lambda
Since <D> goes to lambda, can I just change my language to:
<A> -> <B> <C> <D>
<D> -> <C> <D>
<D> -> lambda
thereby removing the left recursion? If I do the alpha beta removal method it creates an extra state that seems like junk.
|
Consider rational numbers given as their decimal expansions, then for every number we can build a finite automaton able to accept it. To simplify the argument, assume that finite rational expansions are followed by an infinite number of zeros. In such case it is easy to see that the automaton that accepts such number... |
I have been working on Bangla keyboard optimization. I've taken this paper as a reference. In this paper they have introduce two terms monograph and digraph. But it is not clear how they have calculate these two things. In this paper it is written -
A monograph is an isolated key which is struck in the process of typ... |
The trial division algorithm for checking if a number $N$ is prime works by trying to divide $N$ by all integers in the range 2, 3, ..., $\lfloor \sqrt{n} \rfloor$. If any of them cleanly divide $N$, then we say that $N$ is composite; otherwise we say that $N$ is prime.
In the worst case, this requires $O(\sqrt{N})$ di... |
Can anyone direct me to some literature on learning nonlinear dictionaries? I don't mean sparse dictionaries specifically, but for example learning kernel parameters, or learning $W$ where $y = \phi(Wx)$ and $\phi$ is a fixed nonlinear function. There seems to be fairly well established methods when $\phi$ is linear, b... |
I'm not 100% sure this appropriate for CS. Sorry.
I'm looking for prior art on an idea I had, but either my Google fu is lacking, or it genuinely hasn't happened.
In distributed systems, there are a number of consensus protocols and implementations (Raft, Paxos, Zookeeper, etc.). There's also the Bitcoin blockchain. Bo... |
Does there exist an algorithm that will compute in sublinear time whether a bipartite graph contains a cycle of fixed length? For example given a $K_{3,3}$ graph finding if it contains a cycle $C_4$.
I considered the answer to be no. As a DFS could be used and then compare to see if after a certain traversal we were ba... |
Suppose I have two regular languages $L_{1}$ and $L_{2}$ such that $L_{1} \subseteq L_{2}$ and $L_{2} - L_{1}$ is infinite. I want to find another regular language $L_{3}$ such that $L_{1} \subseteq L_{3} \subseteq L_{2}$ and both $L_{2} - L_{3}$ and $L_{3} - L_{1}$ are infinite.
My solution to this problem is choosing... |
I read somewhere that the most efficient algorithm found can compute the factors in $O(\exp((64/9 \cdot b)^{1/3} \cdot (\log b)^{2/3})$ time, but the code I wrote is $O(n)$ or possibly $O(n \log n)$ depending on how fast division and modulus are. I'm pretty sure I've misunderstood something somewhere, but I'm not sure ... |
We learn about the Pumping Lemma at the class and I tried to make few examples to understand it...
There I make this example:
Let's say: $L=\{w\in L|w=(0+1)^*1\}$ - i.e. - L is the language of all the words that finish with $1$. (The language is regular of course).
Now, I can take the word: $w=0^{n-1} 1$. $w\in L$ an... |
I improved the complexity of an alogrithm from $O(n)$ to $O(\ln(n))$. Is it legitimate to call this an "exponential speedup" in a scientific publication? Usually I think going from NP to P when I hear the phrase "exponential speedup". I'd like to avoid overselling my work.
|
We know that $L=\{0^i 1^{j^2}|i> 0,j\ge 0\} $ is irregular (by the Pumping Lemma), we have to use it to prove two things:
$L_1=1^*\cup \{0^i 1^{j^2}|i\ge 0,j\ge 0\} $ is irregular.
$L_1$ is making all the three conditions (I don't know the exactly word at English for this...) of the Pumping Lemma.
For the first one... |
I started computer science in university. And we started learning about Discrete and it's mathematics which is completely based on logic, which I understand. however, how is predicates, sets, proofs are related to computers ? I want to know the reason for learning these stuff?
|
λ-terms can be split in two categories: EAL and non-EAL typeable terms. It is known not only that EAL-typeable terms can be reduced to normal form in polynomial time, but that the reduction can be executed through Lamping's abstract algorithm optimally.
What are the distinct features that make a term EAL-typeable? I'v... |
Let's say I have some static, unchanging data (no adds, modifies or deletes) which is looked up by a string value, and that I'm looking to minimize size in memory while also trying to minimize lookup time.
It seems to me that keeping the strings sorted in a list and then doing a binary search is always going to be bett... |
It is widely accepted that turing-complete systems are equivalent in terms of computability - i.e., whatever a turing-machine can do, can be emulated by automatas, the lambda calculus and other computing systems.
Not much is said about the efficiency of such systems. Intuitively speaking, it makes sense to think that s... |
I am aware that this seems a very stupid (or too obvious to state) question. However, I am confused at some point.
We can show that P $=$ NP if and only if we can design an algorithm that solves any given instance of problem in NP in polynomial time.
However, I do not understand how on earth can we prove that P$\neq$NP... |
Shor's algorithm is often used as the argument. It can solve the factorization problem faster than any known algorithm for classical computers. Yet, we have no proof classical computers can't also factor integers efficiently.
Is there any actual proof quantum computers can solve some problems faster than classical com... |
Different set of primitive operations lead to different complexity of certain problems. For example, sorting by comparison is only O(N*log(N)) if one assumes both integer comparison and random array indexing are O(1). While this might hold for bounded N, I believe complexity analysis is, theoretically, supposed to spec... |
There are particular problems in Kozen that I'm unable to solve, and they seem to be similar to each other. It is showing that sets:
$$ \{x \mid \exists y: |y| = 2^{|x|} \text{ and } xy \in A \}$$
$$ \{x \mid \exists y: |y| = |x|^2 \text{ and } xy \in A \} $$
are regular for a regular set $A$.
The only method I'm fami... |
My book uses this definition for the Polynomial complexity class ($L$ is a language over $\{0,1\}$):
$$\mathrm{P} = \left\{L\subseteq\{0,1\}^*\;\middle|\; \begin{array}{l} \text{there exists an algorithm $A$ that decides $L$} \\ \text{in polynomial time}\end{array}\right\}\,.$$
But by this definition, don't all languag... |
I have a language and I am trying to see if it's context-free or not, by trying to use a pumping-lemma but I can't figure it out, been reading a lot of other posts but still struggling to apply it to my example
this is the language (sorry for using an image, i know how to write number exponents but i don't know how to ... |
If you have a question saying "draw the NFA for the following language" what difference does it makes if the language is $(0^* \cup1^*)$ vs $(0 \cup1)^*$ in otherwords what difference does it make for the diagram if the star is on the inside or outside of the brackets?
|
My professor was giving a lecture on B+ Trees deletion, and I got very confused. According to him for deleting any key from a B+ Tree:
1- First navigate to the leaf *L* where it belongs.
2- If the *L* is at least half full if you can simply delete it.
3- If it contains d-1 elements then you need to redistribute and mer... |
I want to create multi-tape Turing machine that recognize language {ww, $w \in {a,b}$}. With condition that max. steps is less or equal than $\frac{3}{2}\left | x \right | + 2$. Where x is word from language. I have an idea to create x-tapes to solve this problem, but can be the number of tapes not known before readin... |
im trying to figure out why this is true
The clauses {a,b}, {b,~c}, {c,~a} constitute a 2SAT problem with an implication graph without bad loops.
Can someone show me how to illustrate this and indicate how i can find wether any 2SAT problem has a bad loop or not, Thank you so much :)
|
Given $n$ points in 2D, e.g., $p_1,p_2,....,p_n$, there are $n^2$ possible pairs of points. I want to output the list of $n^2$ pairs, but sorted according to their distance (e.g., the pair of two points that are closest is the first pair in the output, and so on).
Is there an algorithm to do this with running time bet... |
I been watching tutorials about how to check if a language is not context-free and in 1 video there was a language: L = {a^n b^n c^n | n ≥ 0} and they used a pumping lemma to prove that it's not context-free, I am only a beginner at CFG however I thought a language is Context-free if you are able to create a CFG for it... |
When I google for complete matching, first link points to perfect matching on wolfram.
It defines perfect matching as follows:
A perfect matching of a graph is a matching (i.e., an independent edge set) in which every vertex of the graph is incident to exactly one edge of the matching. A perfect matching is therefore... |
Let $A_1=(Q,\Sigma,q_0,F_1,\delta _1)$ and $A_2=(P,\Sigma ,p_0,F_2,\delta _2)$ a finite non determinustic automaons.
Describe algorithm that deside if there are two words $x$ and $y$ in the same length such that $x\in L(A_1)$ and $y\in L(A_2)$
Hint: Intersection automaton
My try
To bulid the intersection automaton $... |
When proving that that the quotient of a regular language $R$ and an arbitrary language $B$, I understand you take a DFA $M$ accepting $R$, and then construct a DFA that is the same, but its final states are those from which we can reach a final state of $M$ with a string from $B$. How can we just say it's possible to ... |
Given the definition of a regular language is one that can be expressed with finite memory, how is $\{1^n \mid n \geq 1\}$ regular? The $n$ is unbounded. I know a DFA can be drawn, which means the language is regular. But I thought another condition is that $n$ must be bounded, so it's as if the 2 tests contradict eac... |
I have a single output variable $y$ and a number of inputs $x_1$, $x_2$, etc. These are time series. Each $x_i$ explains the changes in $y$ in specific circumstances, and the goal is to have a linear model that looks like $y=b_1x_1+b_2x_2+...$ The point is that each $x_i$ must be sampled on different clock $c_i$. Imagi... |
This question is related to OS. After having solved many problems in CPU scheduling I was wondering how does the CPU know the burst time of all the processes in the main memory before executing them?
Selecting a process among a pool of processes using some scheduling algorithm is done based on CPU burst of each proces... |
I have the nfa problem below which I dont quite understand. I have been reading many slides on this but I'm having a really hard time understanding them enough to be able to complete the question. I can see that on the $q_0 $ state when we have an $a$ it should stay in the $q_0$ state and for the $q$ state when we have... |
Deamortization refers to the process of converting an algorithm with an amortized bound into one with a worst-case bound.
For example, assuming you need to find the median of an array once every $n$ operations of type $X$ (which does not change the array).
You could take a specific algorithm, such as the median of med... |
Give a counterexample to show that the following constructions are not correct proofs for the star operation:
Given a CFG $G = (V,Σ,R,S)$, add the new rule i) $ S → SS$ or ii) $S → SS|ε$.
For i), I basically said that this rule is an infinite loop and doesn't contain an epsilon, so can't be the star operation.
For i... |
Let $X\leq Y$.
If $X$ is $NP$-hard, is $Y$ $NP$-hard? I think yes, as if an $NP$ problem is reducible to $X$ in polynomial time, then surely it is also reducible to $Y$ given that $X\leq Y$.
If $Y$ is $NP$-hard, is $X$ $NP$-hard? Not sure how to tackle this. Are some $P$ problems reducible to an $NP$-hard problem? If ... |
For a given regular language, there are multiple finite automata. How do we determine which one is best?
|
I have to write a rule as part of a small step operational semantics (https://en.wikipedia.org/wiki/Operational_semantics).
Whenever this rule is applied, the next bit belonging to an infinite
bit string must be taken.
Therefore, in the premise of the rule, I have to express that the next bit of a (previously) fixed b... |
What are some good resources for practice problems on formal languages? Every textbook I've seen contains few practice problems with even fewer answers. I would like a resource that has questions with varying degrees of difficulty, not just one really hard problem. For example if you learn about the pumping lemma, how ... |
I have the CFG G with the following production rules:
$$
S \to aSaS \mid b
$$
Is it possible to find $L(G)$? I have no idea how describe it by any pattern. I use grammophone to check example words, but it's not very helpful tho.
|
Vertex set $A$ is of the form: $A = \{(v_1,r_1),(v_2,r_2),...\}$ where $v_1 \in V$ and $r_1$ refers to the number of times $v_1$ is reached in some walk and $v_j \neq v_i$ whenever $i \neq j$.
Suppose that one wants to count the number of distinct vertex sets that each have $\sum_i r_i = k$ and are allowed by some wal... |
So I generally understand how to follow a flow-diagram of a Turing Machine, but I'm going over how to write the "steps" in English and am having a bit of trouble. The problem is as follows: "Give the English description of a Turing machine that decides this language: {$1^{n}$$2^{n}$, $n > 0$}"
I understand that the str... |
Consider the augmented grammar G is:
S` -> S
S -> a
S -> (T)
T -> T,S
T -> S
I have tried to construct parse table. But, when I read '(' nonterminal Symbol (item 3), there is no action table elements either 'shift' or 'reduce'.
I3:
S -> (.T)
T -> .T,S
T -> .S
so I can't construe '(a,(a,a))' in this Parse table.
then ... |
The actual runtime of applying quick-sort to an integer array heavily relies on the choice of pivots.
It is well known that picking a random pivot does not work as good as taking the median of three, or the ninther of the array.
Obviously, for comparison we need to fix a model of computation / cost per operation.
Assum... |
Linear systems of equations over the reals have either 0, 1 or infinitely many solutions. However, when applied to finite fields (specifically GF(2)), infinitely many is not an option.
Is there a fast general method to calculate the number of distinct solutions to a linear system of equations over GF(2)?
You can assume... |
I am reading Skiena but do not have a formal background in Computer Science. On page 457 he discusses generating set partitions via restricted growth functions. Here's specifically what he says:
Set partitions can be generated using techniques akin to integer partitions. Each set partition is encoded as a restricted ... |
I am reading the book Computer Organization and Design. It compares instructions on memory and instructions on registers but doesn't say anything about the speed of instructions when the source operand(s) is/are constants. In that case which will be faster register operands or immediate(constant) operands ?
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.