instruction stringlengths 35 29.1k |
|---|
I'm given the set $T = \{\langle M, w\rangle : M $ is a Turing Machine that accepts $w^\mathcal R$ whenever it accepts $w \}$ and I want to show it's undecidable but recognizable. (I'm using the bracket notation to denote the encoding of the TM and input string)
Given that I know the set $A = \{\langle M,w\rangle : M \... |
I am trying to optimize what we call AJAX request polling frequency in the domain of web design. Here's a general version of the problem in simple lingo:
Problem Statement:
Suppose there are 3 persons - consumer (C), producer(P) and a messenger(M). The consumer and producer are some distant apart and can't communicate ... |
My teacher has provided the following pseudo-code, and says that the output using static scope is 1 2 3, but the output using dynamic scope is 2 3 4.
void fun1(void);
void fun2(void);
int a = 1, b = 2, c = 3;
int main() {
c = 4;
fun1();
return 0;
}
void fun1() {
int a = 2, b = 3;
fun2();
}
void ... |
It's clear that we can only have a single start state in G-NFA's but I would like to know why we can't have more than one accepting state in G-NFA's.I think it's better to have more accepting states so that we could avoid epsilon transitions.
Is this only a rule that might make conversion of NFA to Regular expressions... |
A while ago I asked Fixed point, what does it mean in the world of computer science?
While the answers did help me to understand what Fixed point meant, the answers left me in a murky world when ever I thought about what a fixed point meant. In other words, no clear definition poped into my mind and I would wonder abou... |
Why is the input $\epsilon$ accepted by the nondeterministic finite automaton shown below? Does it not leave $q_1$ and go to $q_3$?
|
Why no rotate property in matrix 2D ?
we know the short hand code in matrix 2D
transform:matrix(a,b,c,d,x,y)
a=scale X
b=Skew y
c=skew X
d=scale Y
x=translate X
y=translate Y
why developers didn't create extra place for rotation 2D?
|
Consider the following variant of the two phase locking protocol. Suppose a transaction $T$ accesses (for read or write operations), a certain set of objects ${O_1,...,O_k}$.
The modified algorithm works as :
Step 1. $T$ acquires exclusive locks to $O_1, . . . , O_k$
in increasing order of their ids.
Step 2. The requir... |
I want to map the various combinations to an unique index:
For a given $n$ and $r$, we would have $\binom{n}{r}$ arrangement for values:$[0,\dots,n)$:
Ex: For n = 6, r = 3
[012,
013,
014,
015,
...,
345]
So, for any given arrangement [012] the index would 0 as its the very first element.
Similarly, the index for arrang... |
Instance: $n$ non-negative real numbers $P_1,\ldots,P_n$, a positive number $k\le n$, and a positive number $\epsilon$.
Question: Is there a subset $S$ of $\{1,\ldots,n\}$ of cardinality $|S|\geq k$ such that
$$\dfrac{P_i}{\epsilon-P_i+\sum_{j\in S}P_j}\geq 1,\text{ for all } i \in S.$$
Can you see a simple, direct red... |
what is the difference between memory access and data memory access?
for example, here are the examples of register transfer language instructions:
$R1 ←[18]$
$R2 ←[R1 +3]$
$R1 ← R1 +2$
$[8] ← R1$
From my understanding, memory access is where load/store occurs, like these instructions $R1 ←[18]$$R2 ←[R1 +3]$$[8]... |
I asked, incorrectly, my previous question here. I would like to thank D.W. for his answer though. He answeres that the problem is polynomial time solvable. The thing is that the cited paper shows that it is NP-hard. So I corrected my question. But I don't understand, am I missing something? In the paper, as shows the ... |
Throughout my education in computer science, I feel like I've heard the terms "modulo" and "modulus" used interchangeably. It looks like even Wikipedia claims that "modulo" is "sometimes called 'modulus'" (see the first sentence of the page on 'modulo').
I've looked into this issue a little and it seems that "modulo" ... |
Suppose we define an operation such that
$$A \text{ avoiding } B = \{w \in A \mid w\text{ has no substring in }B\}\,.$$
How can I prove that, if $A$ and $B$ are regular then $A\text{ avoiding }B$ is regular too?
I know I should either construct a DFA/NFA or use closure properties, but where to start?
What I come up w... |
I understand that CPU scheduling takes place on 4 circumstances listed below:
When the process changes state from Running to Ready
Changes state from Running to Waiting
Changes state from Waiting to Ready
Process Terminates
However, i notice that the CPU scheduling does not take place when Ready to running. Why is th... |
In this http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.12.1090&rep=rep1&type=pdf an unconditional lower bound (provided constants used are bounded by absolute value smaller than $1$) of $\Omega(n^2\log n)$ for size of arithmetic circuits computing $n\times n$ Matrix Multiplication is given.
What is the best u... |
I saw that I can formulate single-source shortest path as the following linear program:
Given $G=(V,E)$ and $w\colon E\to R$ and with negative cycles, find
$\max\,d(s,t)$ such that
\begin{align*}
d(s,v) &\le d(s,u)+w(u,v) \quad \forall (u,v)\in E \\
d(s,s) &=0
\end{align*}
We want to find the shortest path fro... |
We have a directed Graph $G=(V,E)$ with vertex set $V=\left\{ 1,2,...,n\right\}$. weight of each edge $(i,j)$ is shown with $w(i, j)$. if edge $(i,j)$ is not present, set $ w(i,j)= + \infty $. For each vertex $i$ put $w(i,i)=0$. we want using Dynamic Programming to find shortest path between any two vertex in this gra... |
How can I find the Big Theta of $(\log n)^2-9\log n+7$?
I thought of $(\log n)^2-9\log(n)+7 < c_1(\log n)^2 +7$ or something like this and can't find the right way.
|
$\exists x \in \Sigma^* (t=sx)$
Have I interpreted the above into words correctly?:
"There exists a symbol 'x', which is a member of the set which contains all possible strings of alphabet sigma, where sigma contains string 't', which is a concatenation of string x and string s."
I'm not clear on how/whether t=xs is an... |
Cryptography has the concept of homomorphic encryption.
Homomorphic encryption lets you transform binary values into an encoded form, put them through a circuit and then decode the bits, getting the same value as if the plain text bits were put through an equivelant digital circuit. (A write up of a very simple impleme... |
Let $0 < a < 0.5$ be some constant. We have an $n$-element array as input. Randomized quicksort chooses one element from array uniformly at random as a pivot and partitions. With probability $1-2a$ the smallest section be greater than $an$.
How we can Calculate this probability?
after 72 hours try i reach to following ... |
I am reading the Handbook of Satisfiability and in the preface Martin Davis wrote
Of course what is regarded as the most important problem in theoretical computer science, P = ? NP lives right here. It is remarkable that we still don’t know whether or not there is a poly-time algorithm for SAT. I am in a tiny minorit... |
Let $\Sigma =\{ 0, 1\}$. Let $val:\Sigma^* \rightarrow \mathbb{N}$ be a function that given a string returns its decimal value, and $L_{halt} = \{\langle M\rangle \langle w\rangle \mid M $ halts on $w \}$.
I define the following language:
$L=\{ x \mid x\neq x^R \wedge (x\in L_1 \vee x\in L_2 \vee x\in L_3)\}$
where:
... |
I would like to know what are the differences between (a,b)-tree and a B-tree. It has been a few days I am studying different papers and I am seeing different definitions that make me confused.
For example in External Memory geometric Data Structure by Lars Arge on Page 3 he says
Normally, the N data elements are stor... |
So I am trying to fully understand the concept of quotient languages.
I will give some examples, let me know if this is correct:
Say that
L1={} and L2 is {ot}, then L1/L2 is {carr}
Or if L1=ab*c and L2 is b*c then L1/L2 is a.
If this is it, I will then try to approach more complex concepts :)
Thank you!
|
The Bloom filter data structure requires a set of hashing functions. The Murmur3 family is a great fit, as it contains the seed parameter to easily create a variety of different functions (plus it has good distribution of values and adequate speed).
Choosing the seed
Is there any particular method of choosing the seed ... |
Is it known that if polynomial multiplication of degree $n$ polynomials and coefficient size bounded by $M$ can be done in $O(n)$ arithmetic operations on $O(\log n+\log M)$ bit sized words then $FFT$ of length $n$ vectors with entries bound by $M$ can also be done in $O(n)$ arithmetic operations on $O(\log n+\log M)$ ... |
I remember reading somewhere that if matrix multiplication can be done in $O(n^\omega)$ time then determinants can be computed in $O(n^\omega)$ time. I am unable to find the reduction and would it be possible for someone to share the reference?
|
I have been given 2D matrix with some elements. I want to find out what is maximum frequency in any row and column.
Example:
1 2 1 2
3 4 1 2
1 1 1 1
2 2 2 2
Maximum frequency is 6 which occurs in last row and last column of matrix.
Constraints
No. of rows X No. of columns <= 10^6
1<=Elements in Matrxi <= 10^6
My appro... |
I am doing doing one of getting started competitions on kaggle, the one which requires you to find coordinates of different objects on images.
I know that the usual method for this is to use sliding window and predict whether some piece of image is that object. But I wonder, what if I just use values of all pixels as f... |
My intention is to select only those packages whose name do not contain adlib or ads. But if i add *adlib* and *ads* it selects all packages containing the substring adlib and ads. So i need a regular expression to select all packages that do not contain substring adlib and ads.
|
I'm implementing a interpreter for lambda calculus,
and now I want to add the equality type.
The introduction rule for it is easy,
but the elimination rule is rather obscure for me.
I found this stackoverflow thread, but it explains the J axiom only in one sentence. How can it be understood intuitively?
|
$\text{ExactOneSAT}= \{\phi\;|\;\phi\; \text{is a boolean formula}$ $\text{ such that it has a satisfying assignment with only one true literal per clause} \}$
I am trying to reduce 3SAT to this problem but can't find a way. I tried taking a small example $\phi=(x_1 \vee x_2) \wedge (\overline{x_1} \vee x_2 ) $. In th... |
Is there efficient algorithm to encode keys in hash function with provided collisions?
By efficient I mean with low-ish runtime of lookup operation (taking constants into account) and realistic time of finding such function.
Keys are floating point values - I can compare them for equality as they are raw, unprocessed. ... |
I just started studying decisions trees and I am trying to construct a tree for a training set which uses Status as the class label. I am using the misclassification error as measure of impurity. After the first iteration, the information gain indicates that Department should be the tree root. The following table repre... |
Given a array of N elements and a number k, then find the sum of maximum of a all continuous blocks of length k?
Examples :
A = {2,5,2}, k = 2, Max for 1st block = 5, 2nd block = 5, So sum is 10.
A = {3,1,8}, k = 2, Max for 1st block = 3, 2nd block = 8, So sum is 11.
A = {2,5,2}, k = 1, Max for 1st block = 2, 2nd bloc... |
First of all, I'm not a computer scientist so I apologize if this is a stupid question.
I know that the problem of computing the permanent of a matrix is #P-hard, which as I understand it this implies that if you can solve an arbitrary instance of the problem in polynomial time then you can in principle solve any probl... |
I have a problem on an assignment where I have to reduce the loss of significance due to subtraction for a function
$$\frac{\sin(x)}{x-\sqrt{x^2-1}}$$
without using a series expansion. I can get part way through the problem but get stuck where I can't remove the subtraction in the square root:
$$\frac{\sin(x)}{x-\sqrt{... |
As a newcomer to the field of parallel computation, is it accurate to say that CPUs are essentially "thread" calculators? My current understanding is that a "process" is made up of multiple "threads" and a single core of a CPU can execute instructions from one "thread" at a time, sometimes a bit more with hyper-threadi... |
If I have n integers, which are in range 1 to n^2, should I use count sort? My thought is that I shouldn't because it would be a risk if n happens to be substantial. I can't seem to figure out the implication on the time complexity for this problem, so I can't prove anything. Anybody have any insights?
|
Is it Ok to express an NFA accepting 1*0 like the one above? All examples in books are represented like the bottom one. I'd like to know is that only a convention or it must have two extra nodes?
|
Given an array $a$, I want to count all triplets of indices $x,y,z$ such that $a[x] > a[y] + a[z]$.
I can think of two solutions:
Go over all triplets of indices $x,y,z$ directly. This takes time $O(n^3)$ and constant space.
Compute a new array consisting of all sums $a[y]+a[z]$, sort it, and then go over all $x$ and ... |
Let A and B be two finite non-empty sets of positive integers. Their sumset is the set of all possible sums a + b where a is from A and b is from B. For example, if A = {1, 2} and B = {2, 3, 6} then A + B = {1 + 2, 1 + 3, 1 + 6, 2 + 2, 2 + 3, 2 + 6} = {3, 4, 5, 7, 8}.
As we can see, cardinality #(A + B) is less than su... |
Does Huffman algorithm generate a minimal weight of a tree?
I noticed that by trying to make two different trees with the same frequencies of letters, I get different weights of the trees.
We defined the weight of the tree as $\displaystyle\sum_{c\in C}f(c)d(c)$ where $C$ is all the letters, $f()$ is the frequency of t... |
I know that if a language $L_1$ and a language $L_2$ are regular, then
$L1/L2$ is regular.
When we construct a DFA $M'=(Q, \Sigma, \delta, q_0, F)$, for each state $i$
we can make $i$ the start state (we'll represent is using $L'i$) and if $L'i \cap L_2 \neq 0$ then put $q_i$ in $F'$ in $M'$.
I understand the process ... |
I have a grammar S-> SS* | SS+ | a
Really confused on how to remove the left recursion and do left factoring
My attempt on removing left recursion :
S -> aS'
S' -> S+S' | S*S' | epsilon
If this is correct, I'm stuck in left factoring. Help!
|
With a dependent type system in a normal functional language type checking may never halt. This is partially because dependent typing removes the isolation between types, and code. My question is this: would an implementation of dependent typing for a primitive recursive language(not Turing-complete) be guaranteed to h... |
Here http://tomstechnicalblog.blogspot.com/2016/02/rxjava-understanding-observeon-and.html I've found a sentence which I do not understand:
If you have a quad-core, you can optimally support 5 computational threads (4 cores + 1 extra thread for idle time).
What is that 1 extra thread for idle time for? Is it similar ... |
I have the following simple production rule:
S -> Sa | a
Which is left-recursive, and can recognize strings such as a or aa, etc
I tried to make it right-recursive, but I cannot find a way without creating ambigious grammars
(e.g.
S -> aS'
S' -> a | aS'
)
Can someone explain how to make this grammar right-recursive ... |
I use the same notation as I used in this previous question, About showing algorithmic gap instance for the Goemans-Williamson SDP The same definition continue.
Given a $f : \{0,1\}^n \rightarrow \mathbb{R}$ one defines a quantity called $\overline{sos}_d(f)$ which is the smallest $c \in \mathbb{R}$ such that one can ... |
My question consists of two parts.
Let say the edge connectivity of a graph is K. I would like to change the edge connectivity value to L (> K). What is the best possible way to do so?
My guess: Obviously, we have to increase the edge weight of one of the critical edges (edges of the min-cut), but among the set of cr... |
I was wondering if there is any programming style in which the outcome does not depend on the order of statements or groups of statements such as guards. Vaguely, I imagine this would leave room for things like optimization or parallelization. Using the functional language Haskell as an example:
f x
| x < 0 = -1
| ... |
We're facing following problem - an n * n 2D Matrix contains doubles (Java). Find a Set of elements such that
Each element in the set comes from a unique row and column combination. That is, once you've selected an element (i, j) as a candidate for a set, that set cannot contain any elements from ith row or jth colum... |
About the proof that quicksort has $T(n)_{best}=\Omega(n\log n)$.
I can't find this specific aspect anywhere online which is strange. I'm going through a proof for this in a book and I don't understand something, it says that about analyzing the "cost" of a level in the recursion tree that:
Since the recurrence relati... |
I am almost totally uneducated in programming and computer science in general, though I am really fascinated by these topics. I read that mathematics is important in programming and that nowadays many mathematicians specialise in applied mathematics in this field. So, I wonder how these two branches are linked with eac... |
Recall the definition of the load factor is the average number of elements in a chain for hashing for a table $T$ of size $m$ (with $n$ elements in consideration). Let $n_j = T[j]$ be the size of the chain for entry $j$. In this case the definition of the load factor should be:
$$ \mathbb{E}[n_j] = \mathbb{E}[T[j]] = \... |
Let me denote the number of elements with $n$ and the size of the table with $m$. I was trying to understand the Simple Uniform Hashing assumption that people and books describe in works and make them into equations and realize which of the different equations are equivalent and which are not.
Simple Uniform Hashing as... |
I am wanting to try and prove that the English language is not regular.
The alphabet is the set of all words in the English dictionary.
Looking at sentences, I was able to use this pattern of sentences
{ [ (determiner) (noun)]n (verb)n where n is >= 1} ⊆ of the English language
and { [ (determiner) (noun)]m (verb)n wh... |
I am wanting to show that the C programming language is not a regular
language.
The alphabet would be ASCII characters and
comments, strings, char can contain arbitrary characters.
Would I best approach this potentially with a pumping lemma?
There's not really constraints or anything, this is more of a creative
concept... |
I was reading CLRS and in theorem 11.1 it states:
In a hash table in which collisions are resolved by chaining, an unsuccessful search takes average-case time $\Theta( 1 + \alpha )$, under the assumption of simple uniform hashing.
I was trying to understand how to express this theorem with quantifiers ($\exists, \for... |
Does $(0 + 10^{*}1)^{*}$ simplify to the following language: Set of all binary strings with even number of ones.
In specific, does the * inside the brackets get evaluated first or the outer * gets evaluated first. Or does it even matter while simplifying as what we finally need is the set of all strings possible with t... |
Suppose we have a linear congruential generator defined by $X_{n+1} = (a X_n + c) \mod 2^n$ where $a, c, n$ are all known and we would like to determine the initial value $X_0$. However, if we can only see the $k$ high-order bits of each of the $X_i$ for $i \geq 0$, the best algorithm I know of is a brute force which t... |
The complexity class NL seems to allow cycling, otherwise we wouldn't have SL $\subset$ NL. What about L? If an algorithm from L cycles for a given input, it certainly cannot accept (because it won't enter the accepting state), so we could define that it rejects in this case (which would be consistent with NL). Or is c... |
There are many(and I mean many) countable languages which are Turing-decidable. Can any uncountable language be Turing decidable?
|
Sipser defines a time constructible function as
$f(n)$ is time constructible if there exists a turing machine which given input $1^n$ writes value of $f(n)$ in binary to the output tape in $O(f(n))$ time.
whereas Sanjeev Arora and Barak defines it as
$f(n)$ is time constructible if there exists a turing machine whic... |
I am aware of using Bellman-Ford on a graph $G=(V,E)$ with no negative cycles to find the single-source single-destination shortest paths from source $s$ to target $t$ (both in $V$) using at most $k$ edges. Assuming we have no negative edge weights at all, can we use Dijkstra's algorithm for the same?
My thoughts/algo... |
Suppose we have the Manna-Pnueli algorithm for mutual exclusion:
I was trying to find a sequence that violates mutual exclusion and I came up with this:
1. q1, q3; wantq=-1
2. p1
3. q4, q5; wantq=0
4. q1
5. p2; wantp=-1
6. p4
7. q3; wantq=-1
8. q4
9. p and q in critical section
Is my reasoning correct, supposing if i... |
The index of a language is the number of Myhill-Nerode classes that it has. It is also equal to the number of states in the minimal DFA for the language. What is an example of a language that has a different index from its reversal?
|
what would be the complexity of such program?
Code:
for(i=0;i<n;i++)
{
g(n); //any function call
}
|
I am reading this note on approximation algorithms for independet set problem. I am confused of Theorem 1. and Corollary 3.
Here is the statement of Theorem 1.
Theorem 1 (Hastad [1]) Unless P = NP there is no $\frac{1}{n^{1-\epsilon}}$-approximation for MIS for any fixed $\epsilon>0$ where $n$ is the number of nodes in... |
In Chapter 1 of Kenneth Slonneger and Barry L. Kurtz's Formal Syntax and Semantics of Programming Languages: A Laboratory Based Approach, an example of its production is given to illustrate the nature of context-sensitive grammar (page 3):
<thing> b ::= b <thing>
where <thing> is a non-terminal and b is a terminal.
I... |
From what I understand, a $MDP=(G, A, P, R)$ (markov decision process) is represented as:
A complete directed graph $G=(V, E)$
A set of actions $A_u$ for each vertex $u \in V$
A reward function $R$ that maps any vertex to some reward, i.e., $R \colon V \mapsto \mathbb{R}$.
A probability function $P$ that gives the pro... |
Given a graph $G=(N,E)$ with a special source node $s$ and sink node $t$. There is a subset of arcs $E^* \subset E$ that has the capacity drawn from a probability distribution $F$ independently. Then what is the expected maximum flow from $s$ to $t$? or the probability of the maximum flow exceeds some number $k$?
There... |
I'd like to as a variation on this question regarding Huffman tree building. Is there any theory or rule of thumb to calculate the depth of a Huffman tree from the input (or frequency), without drawing tree.
Specific Example is : 10-Input Symbol with Frequency 1 to 10 is 5. the above question mentioned depth is 5.
I r... |
I need help with this problem.
I proved that $L$ is not context free (using Ogden's lemma), but I can't prove that $\overline{L}$ is context free. I'm thinking about a proof by cases (if $\#(a)=\#(b) \neq \#(c)$ or something else) but the proof could be so extensive.
|
I am designing a 4-bit comparator with a look ahead unit using a bit slice approach. I have to break the propagation of the Logical expressions for (A<B)i and (A>B)i. The main question is, could I use the following to simplify the boolean expressions.. The i is a subscript meaning the ith bit. The i-1 is a subscript me... |
I have been wondering about this question since I was an undergraduate student.
It is a general question but I will elaborate with examples below.
I have seen a lot of algorithms - for example, for maximum flow problems, I know around 3 algorithms which can solve the problem: Ford-Fulkerson, Edmonds-Karp & Dinic, with ... |
As stated here, Rule-based Reasoning systems are considered to be "old style" AI that uses rules prepared by humans - as opposed to Neural Networks where machine recognizes pattern i.e. acquires new knowledge and takes decision based upon that.
What I understand about Case-based Reasoning (CBR), it looks at the new ca... |
I'm pretty new to computer science and just read about the concept of grammars. Now, I have a practical problem to solve. Here is the alphabet {a, b, c, d}.
How can I determine if the language consisting of all strings a^k b^n c^m d^l, where all k,n,m,l >= 1 is regular. I need to do this because as far as I got all re... |
As per the Sanjeev Arora book, for a certificate based definition of $NL$, the machine is allowed a "read-once" certificate tape to store the certificate along with $O(log n)$ read/write work tape for a deterministic verifier machine.
My doubt is that for a $3-SAT$ problem, if instead of storing an assignment to the $n... |
After finding the Strongly Connected Components of a graph and putting each SCC in a list, how i can contract each list of nodes into one node?
Thanks!
|
I am learning about "knowledge representation" in my intro to AI course and one of the key ideas has to do with isomorphic vs homomorphic representations. The examples I find when I google around are mainly on the topic of mathematical graphs, which are over my head.
Can someone give me a simple, non-mathematical exam... |
In the Handbook of Exact String Matching algorithms, it describes the transition set for a basic string matching automaton as:
for
q in Q (q is a prefix of x)
a in $\Sigma$
(q, a, qa) is in E if and only if qa is also a prefix of x
otherwise (q, a, p) is in E such that p is the longest suffix of qa which is a prefix ... |
I need to find if given two formal languages $L_1$ and $L_2$ $$(L_1 \cap L_2)^*\subseteq (L_1^* \cap L_2^*) $$
I think that it's true since this can be rewritten as $$ \bigcup^\infty_{i=0}(L_1 \cap L_2)^i \subseteq (\bigcup^\infty_{i=0}L_1^i \cap \bigcup^\infty_{i=0}L_2^i)$$ and in general, $$(A \cap B) \cup (C \cap D)... |
Background
I was playing the PC-Game "Darkest Dungeon" recently. In the game, you have to explore dungeons, which consist of connected rooms as shown in the picture below.
Here are the rules:
You start in fixed room (Entrance). You cannot choose where to start.
The goal is to visit every room at least once
The distan... |
We have the following problem: Given an array of integers $\{a_1, a_2,...,a_n\}$ and a number $s$, find a contiguous sub-array of elements that sum exactly to $s$. If multiple solutions exist, find a solution that is smallest in terms of length (length of sub-array). If there is no such contiguous sub-array, output "-1... |
I am trying to find the similarity between two time series, but not in terms of distance, in something more sensible such as percentage of similarity. In other words I need something that shows the similarity, not dis-similarity.
The dynamic time warping gives a very good response, when trying to compare the time-serie... |
How is n-gram different from k-mer? Both seem to be (n or k) length substrings of a larger string. Are these just terms common with different practitioners? viz. Computer Scientists and Bioinformaticians?
|
Till now, I always gave each db-table an id-column (generally with the table name and an underscore as a prefix, e.g. employee_id), and I also never have seen another approach to unique a db-table-record in practice. But on the other hand during my studies, I often have seen other columns that act as a primary key, for... |
Don't know if this is the right community for this and this should be pretty basic but here goes.
I'm studying System Engineering and one of the homework problems is the following question.
A 32-bit computer with a 200-MHZ Bus requires four cycles to read a
32-bit word. How much bus bandwidth does the CPU consume in... |
I have a "standard" problem, but I can't remember its "official" name: I have to keep track of the presence of the absence of value in an array.
Currently I use an each bits of an other array to track it.
Let's say I have a byte array of 8k elements if I want to know if a place is taken (without accessing to the array)... |
When I look at polyfill algorithm tutorials/articles or examples, nothing mentioned about how to handle horizontal lines. Does anyone have any idea how horizontal lines should be handled?
For instance, consider the following image:
For intersection I wrote if the line on the scan line count it as 1 point, even I count... |
Berman's theorem states
If a unary language ( a language with all the strings of the type $1^i$, $ i > 0 $ ) is NP-Complete then P = NP.
I tried reducing SAT to a given unary language $L$ assuming it is NP-Complete. But I can't think of a way such that after applying the reduction so that SAT gets solved in polyno... |
Some time ago, I asked this question but no one quite understood it or was able to answer. I deleted the original question and have since decided to try it again.
As I understand it, all things digital are originally based on ones and zeros - binary code.
However, I have wondered for some time if it would be possible (... |
This is what I have so far
1 1 0 0
Switch values by 2s Complement
0 0 1 1
+ 1
0 1 0 0
|
I understand what stack and heap refer to. However, I struggle with understanding exactly swap can do.
For example, let's take Linux as the OS. I connect another hard disk to my machine, and I make additional swap space available (using space from the said disk) via mkswap and swapon commands. It is known that swap sp... |
From my reading it seems that most grammars are concerned with generating an infinite number of strings. What if you worked the other way around?
If given n strings of m length, it should be possible to make a grammar that will generate those strings, and just those strings.
Is there a known method for doing this? Idea... |
I've got this question on my study guide: "Write an EBNF grammar description for Java float literals and one for Java double literals."
I've browsed the Oracle site and found the grammar for java float literals, but I'm not entirely sure how to convert that to EBNF grammar. I understand EBNF notation but for some reaso... |
Can someone explain the following about big-O from the textbook to me? (I'm trying to catch up after missing classes due to illness.)
Show that $f(x) \in O(x^2)$ where $f(x) = 8x+9$. List the witnesses $C$ and $k$.
From what I have gathered I am looking at/for a distinct point witnessed by $C$/$k$ wherein there is a ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.