instruction stringlengths 35 29.1k |
|---|
The regular expression $a^{3}b^{+}$ is indeed regular because we can define an automata $M$. But I see that $\mathcal{L} = \{a^{3}b^{n}, n \geq 1\}$ may generate the same strings, but using the pumping lemma with constant $N$ for a substring $\alpha\beta = a^{3}b^{t},|\alpha\beta| \leq N$, let $\alpha = a$ and $\beta =... |
How to solve fractional knapsack in linear time? I found this on Google but don't really understand it.
Choose element $r$ at random from $R$ (set of profit/weight ratios)
Determine
$R_1 = \{ p_i / w_i | p_i / w_i > r, for 1 \leq i \leq n \}, W_1 = \sum_{i \in R_1} w_i$
$R_2 = \{ p_i / w_i | p_i / w_i = r, for 1 \le... |
There is an infinite wall with a hole somewhere, you are placed on that wall at an unknown position. Let the distance between your initial position & the hole be $x$. Find the average distance traveled in terms of $x$ until you find the hole. What's the complexity of this problem in terms of $x$ and how does an algorit... |
Is $L=\{ xyx \mid x,y \in \{a,b\}^* \text {and } |x| \ge 1 \}$ context-free?
If yes, please explain how we can write grammar or create a PDA for it. If not a CFL, then prove it through pumping lemma.
I have tried to apply the pumping lemma with $w = a^nb^naba^nb^n$ as the word in $L$, but without success.
|
I have been studying Artificial Intelligence and I have noticed that the Bayes' rule allows us to infer the posterior probability if a variable. But, my question is, what does the word, or phrase, 'posterior' mean in this context with regard to the Bayes' rule?
|
Master's theorem is shown below,
The recursive function to be solved is shown below,
I understand that a refers to the number of recursive calls in this function (3 in this case). b refers to what the input size is being divided by in each recursive call. Which I believe should be 4.
d refers to the overhead of each ... |
I’m trying to make a Liquid State Machine in python and I already read many articles about it, but still there are many points I don’t understand.
The readout function is a Feed-forward Neural Network, but how is it taught to read out the states? In the echo state network I had a train period when I feed a train signal... |
I’m trying to make a Liquid State Machine in python and I already read many articles about it, but still there are many points I don’t understand.
(I had trouble putting 'LSM's in context to see what it actually is, but looking at PyBrain's feature list and the description of aureservoir I could classify LSM like this:... |
I’m trying to make an Echo State Network (ESN) in Python and althought I already read many articles about it, still there are many points I don’t understand.
(I had trouble putting 'ESN' in context to see what it actually is, but looking at PyBrain's feature list and the description of aureservoir I could classify ESN ... |
If $L = L(M)$ then $L$ is a subset of $L(M)$ and $L(M)$ is a subset of $L$.
Can anyone clarify what does this mean?
|
Would it be possible for a runtime environment to detect infinite loops and subsequently stop the associated process, or would implementing such logic be equivalent to solving the halting problem?
For the purpose of this question, I define an "infinite loop" to mean a series of instructions and associated starting stac... |
How do I show that TQBF $\notin$ SPACE$((\log{n})^4)$? I know that TQBF is PSPACE complete, but is this the right approach?
|
I have developed two existing data structures and I want to see their performances over a certain algorithm. In this case I use Dijkstra's algorithm with binary and Fibonacci heaps. Just to ask, if I have 100 to 1000 number of vertices in the tested sparse digraphs, how many times should I execute my program for a sing... |
Given a recursive function $T(n)=T(a_1\cdot n)+\dots +T(a_k\cdot n)+\Theta(n)$ such that $\forall a_i: 0<a_i<1$, what is the most general thing I can say about the sum of the cost of the nodes at each level of the recursion tree? I've looked at a few, and for the ones I've looked at it's always come out to $(a_1+\dots... |
I read that the Bernstein operator
$$
\mathfrak{B}_f(t) = \sum_{i=0}^n f\left(\frac{i}{n}\right) \; B^n_i(t)
$$
applied to a polynomial $f(x)$ of degree $m \leq n$ with the Bernstein polynomial
$$
B^n_i(t) = \binom{n}{i} \; t^i \; (1-t)^{n-i}
$$
returns a new polynomial also of degree $m$. In other words, the Bernstein... |
I have this recurrence equation:
$T(n) = T(n/4) + T(3n/4) + \mathcal{O}(n)$
$T(1) = 1$
I know that the result is $\mathcal{O}(n \log n)$ but i don't know how to proceed.
|
I have usually been using the Cormen algorithm format to teach some introductory courses in Programming. I mean something like this:
TreeSearch(k,n)
1. if x==NIL or k==x.key
2. return x
3. if k<x.key
4. return TreeSearch(k.left,n)
5. else return TreeSearch(k.right,n)
Actually I have not agree with a couple of ... |
My background came from imperative languages, primarily C, C++, and Python. I picked up Scala, Erlang, and a bit of Haskell a few years later and have since become very interested in functional programming and the formalisms behind it.
I am also interested in concurrent and distributed programming and have been looking... |
WP has an adequate discussion of paging, which I think I understand.. However I am confused by the articles repeated use of the term Page Frame.
I thought frames and pages were different things. Could someone please clarify the difference.
|
What is the difference between dynamic loading and dynamic linking?
Both systems seem to allow shared libraries, but I am struggling to differentiate between them.
|
I'm stuck on this question about context-free languages and was hoping for some clarification.
$\qquad L = \{a^i b^j c^k \mid i=j, i=k\}$
is not context-free. Show that its complement is context-free.
I understand that the complement basically means everything not in $L$, that is $A^* \setminus L$. However, I have n... |
I am doing some work on register machine theory which revolves around a 2-register register machine and attempting to show that it is not possible to compute an upper-bound on the final contents of its two registers on the basis of its program code and initial input, in halting configurations only. I believe this can b... |
I need to determine which complexity class this problem belongs to:
Given a graph $G(V, E)$, two vertices $u$ and $v$ and a natural number $k$, does a path of length $k$ exist between thesee two vertices?
How can I approach this problem to solve it?
|
I have a set of binary vectors where each vector represents one day of occupancy in a house and consists of 48 elements (each element for 30 minutes of the day). Each element can be 1 meaning that house was occupied and 0 for non occupied house.
My task is to predict the next day based on the history of the same days (... |
I was working on proving this one and I've solve one direction as follows :
to prove that $P \subseteq PCP(0,logn)$ I said :
let $M$ be deterministic polynomial TM that accepts $L \in P$ ,we want to show that we can there exists a proof system which consists of prover and deterministic polynomial verifier that have acc... |
By reduction I mean the following:
Problem X linear reduces to problem Y if X can be solved with:
a) Linear number of standard computational steps.
b) Constant calls to subroutine for Y.
If a problem X reduces to a problem Y, is the opposite reduction also possible? Say
X = Given an array tell if all elements a... |
Consider the following statement:
for any $a < b \in \mathbb{N}$, one of the following holds:
$\gcd(a,b) = 1$.
there is a $a < x < b$ such that
$\gcd(a,x) = \gcd(x,b) = 1$.
there are $a < x < y < b$ such that
$\gcd(a,x) = \gcd(x,y) = \gcd(y,b) = 1$.
Is this statement true?
Motivation:
I found a variant of this pro... |
Say $\ell: \{0,1\}^\ast \to \{0,1\}^\ast$ is a one-to-one polynomial-time computable function that preserves length. Consider the language $$L = \Bigl\{v \;\Big|\; \exists u: \bigl(u_1 = 1 ~~\text{and}~~ \ell(u) = v\bigr) \Bigr\}.$$ How do I prove that $L$ is in $\mathsf{NP} \cap \mathsf{coNP}$? Basically, what would a... |
I know that the CIRCUIT VALUE problem is P-complete.
In the CIRCUIT VALUE problem the input is a Boolean circuit together with an input to this circuit, and the answer is the evaluation of the given circuit on the given input.
I wish to know if the problem of evaluating a Boolean formula on a given assignment is also P... |
Question: If $H = \{(G,m)$ $|$ $G$ is a graph with $m$ distinct Hamiltonian cycles $\}$ ($m$ is in binary), prove that $H \in$ polynomial space.
My thoughts: I thought that I could show that $H \in NP$, by which it would automatically follow that $H \in$ polynomial space. By the witness theorem, the $m$ distinct Hamilt... |
I'm coding a few set comparisons and noting their big O's using different algorithms and set implementations. I got to one particular function and I decided that it is $O(max(n,m))$ runtime. Is that the proper way to express this?
|
Interested in learning more about algorithm design in functional programming, I picked up Andrew Bird's Pearls of Functional Algorithm Design. I have experience with a number of programming languages, but my only experience with functional programming is in Scala. I understood that I would have to pick-up Standard ML... |
I use the following scribe to study Pseudorandom Generators.
The most intriguing question for me is how exactly PRG can be used in order to simulate BPP.
Let $A(x,r) \in BPP$, where $x$ is primary input and $r$ - randomness provided by BPP. Instead of $r$ we can provide $A$ with pseudorandom input $G(U_{d(n^c)})$ and ... |
This is what I know:
GBN weakness is the fact that when the window size is too large, the number of packets in the pipeline grows and one packet error causes the retransmition of many packets unnecessarily.
Selective Repeat solves this by acknowleding just the suspicious packets, which sightly makes performance bette... |
I read somewhere that 3SAT can be used to solve Integer Factorization.
If that is true, could someone teach me a simple example of generating the 3SAT by using a small number? Let's say you are given the number 6, then the factors are 2 and 3.
|
I am studying Computer Systems. I have th following question and its answer:
Given the logical address 0xAEF9 (in hexadecimal) with a page size of
256 bytes, what is the page number?
Answer: 0xAE (I found this answer in the web, but I want to know how can I
figure it out myself?
How can I figure out the page numb... |
Suppose one has a couple of .wav files with English spoken words, multiple ones for each word, and for each such set there exists a transcription of their right output, the pronunciation as ascii text.
As far as I know, machine learning neural networks use arrays of floats as input and output, and also internally.
What... |
I have come across the following problem.
You have $N$ registers, numbered $1,2,\dots, N$, each of which can hold an integer value. You
are given the initial values of the registers, which have the property that every number
from $1, \dots, N$ occurs exactly once among the $N$ registers.
Each register has a "reset butt... |
How should I show that ${\sf P}$ is contained in ${\sf NP} \cap {\sf CoNP}$?
I.e., all polynomial time solvable problems and their complements are verifiable in polynomial time.
|
It is well known that the efficiency of randomized algorithms (at least those in BPP and RP) depends on the quality of the random generator used. Perfect random sources are unavailable in practice. Although it is proved that for all $0 < \delta \leq \frac{1}{2}$ the identities BPP = $\delta$-BPP and RP = $\delta$-RP ho... |
Got a final coming up, so I gotta get this concept down.
Given $A= \{(G_1,G_2 \mid G_1$ and $G_2$ are two CFG's and $L(G_1)=L(G_2) \}$.
Is $A$ decidable?
Would it be sufficient to take an undecidable language such as $B= \{x \mid L(M_x)$ is a CFG $ \}$. Then reduce it to A with function $f(x) = G'_{M_x}$?
|
I am studying parsing, i.e. bottom-up parsing. it is said that there some rules which are used by weak precedence grammar. What does weak precedence grammar mean? What about precedence relation?
Any help will be appreciated. If it is possible, could you give an example. Thanks
|
I want to show that non-emptiness of context free language is P-complete. So, I am trying to reduce CVP to this problem by generating grammar from circuit. I consider all type of gates in circuit and I make right production in grammar.
I hope that it is good way to prove that it is P-complete, but I have a problem wit... |
In Chapter 1 of Practical Foundations for Programming Languages, the author mentions that abstract syntax trees are associated with sorts.
Intuitively, sorts are like types, but I'd like to know if they have a precise definition. I'd be glad if some references are provided as well.
|
I want to reduce $MAX3SAT$ to $MAX2SAT$ ...
MAX-n-SAT : given $\phi $ n-CNF formula and number k does $\phi$ has an assignment that satisfy k clauses?
|
Compute a BDD for $B_{1} \wedge B_{2}$ by using an algorithm that applies dynamic programming. Document the execution of the algorithm by indicating pairs of BDDs $(q_{1},q_{2})$ and the BDD $q_{1} \wedge q_{2}$ computed by the algorithm. Suffice it to indicate only the effectively required pairs of BDDs. Furthermore, ... |
Let $p$ be the six-figure Boolean function with the following definition:
$p(x_{0},x_{1},x_{2},x_{3},x_{4},x_{5})=\begin{cases}
true & \text{if } x_{0}=x_{5} \text{ and } x_{1}=x_{4} \text{ and } x_{2}=x_{3}, \\
false & \text{else.}
\end{cases}$
This function obviously yields $true$ iff $x_{0}x_{1}x_{2}x_{3}x_{4... |
The exercises in a textbook I studied asks about the best case for Shell sort. I have scribbled a derivation for the same along the margins almost two years ago. Basically I don't know if this was my own derivation or one copied from an authoritative source.
I have elaborated upon the same below. Could you let me know... |
I want to solve job assignment problem using Hungarian algorithm of Kuhn and Munkres in case when matrix is not square. Namely we have more jobs than workers.
In this case adding additional row is recommended to make matrix square.
For example in the following
link.
And here task IV is assumed to be done.
But in real... |
In Bernard Chazelle's book The Discrepancy Method, which is available free as a PDF from the author's website, the very first statement requiring thought by the reader (on page 3, just before Theorem 1) is obtained by a simple probability argument. Unfortunately, I fail to follow the intended argument. Could someone ... |
This is a follow-up question of "Not all Red-Black trees are balanced?" and "AVL trees are not weight-balanced?".$\def\le{\leqslant}\def\ge{\geqslant}$
Definition: For a rooted tree $T$ and a vertex $v \in V(T)$, let $L_T(v)$ be the number of nodes in the left-subtree from $v$, and $N_T(v)$ be the number of nodes in t... |
Without using pumping lemma, can we prove $A =\{ww \mid w \in \{0,1\}^* \}$ is non regular?
Is $L= \{w \mid w \in \{0,1\}^* \}$ non regular? I'm thinking of using concatenation to prove the former isn't regular. If L is non regular then so is LL
|
I have seen some problems that are NP-hard but polynomially solvable in fixed dimension.
Examples, I think, are Knapsack that is polynomial time solvable if the number of items is fixed and Integer Linear Programming with fixed number of variables or constraints by Lenstras result.
Questions:
What are other examples of... |
If we have polynomial algorithm that $c$-approximation, $c<\frac{4}{3}$ for graphs that their chromatic number $\geq k$ then $NP=P$, how to prove such statements?
I also have some sort of explanation of this statement: It's NP-hard to separate between graphs that have chromatic number $k$ and chromatic number $c \cdot ... |
Let $\mbox{bin}(n)$ denote the binary representation of an integer $n$. Let $L = \{ \mbox{bin}(n^2) \mid n \in \mathbb{N} \}$.
Is $L$ a regular language?
I think one can prove that $L$ is not regular by using the pumping lemma, but I don't know how to use it here.
|
The idea of splay trees is very nice as they move frequently accessed elements to the top, which can gain a considerable speed up in many applications. The drawback is that in the worst case an operation can have $O(n)$ complexity.
(Although amortized bounds are $O(n\log n)$ if we perform at least $n$ operations.)
Is ... |
(This is the problem 1.56 from Michael Sipser' Introduction to the theory of computation )
Let
$A_k(S)= \{ w |w \text{ is the k-basis representation}$
$\text{ without leading 0 of some natural number in the set S}\} $
Example : $A_2 (\{3,5\}) = \{11,101\} $
Let the statement $ P = \exists S \text{, a set of natural num... |
We are given an array $A[1..n]$ of integers, and an array of 3-tuples known as queries. The query tuples $(i,j,v)$ denote additions of an integer $v$ to the subarray of $A[i..j]$. I'm interested in the query time of $A[k]$ for $1 \leq k \leq n$ between the queries.
For example, let $A = [1,2,3,4]$, and let the queries ... |
Basically, I currently have two ideas but unsure on which is correct for the following question:
"The High level data link control protocol (HDLC), is a popular protocol used for point-to-point data communication. In HDLC, data are organised into frames which begin and end with the sequence 01111110. This sequence neve... |
How would I solve the following.
An algorithm that is $O(n^2)$ takes 10 seconds to execute on a particular computer when n=100, how long would you expect to take it when n=500?
Can anyone help me answer dis.
|
How would I solve the following.
An algorithm that is O(Lg_2 n) takes 10 seconds to execute on a particular computer when n=100, how long would you expect to take it when n=500?
An algorithm that is O(n lg_2 n) takes 10 seconds to execute on a particular computer when n=100, how long would you expect to take it when n... |
Let $L$ be a regular language. Prove that:
$L_{+--}=\left\{w: \exists_u |u|=2|w| \wedge wu\in L\right\}$
$L_{++-}=\left\{w: \exists_u 2|u|=|w| \wedge wu\in L \right\}$
$L_{-+-}=\left\{w:\exists_{u,v} |u|=|w|=|v| \wedge uwv\in L\right\}$
are regular and:
$L_{+-+}=\left\{ uv:\exists_w |u|=|w|=|v| \wedge uwv\in L \ri... |
I am looking for the paper : "B. Awerbuch, A. Baratz, and D. Peleg, Efficient broadcast and light-weight spanners, Manuscript, (1991)."
It claims that we can build $(\alpha ,1+\frac{4}{\alpha -1})-LAST$ where LAST hold for "Light Approximation Shortest path Tree"
if not available could any one explain the algorithms used... |
How can we design a regular expressions without particular substrings.
The goal of this is to create language L which won't contain a particular substring (i.e. 110)
for the case of a regular expression without substring $110$, I Was thinking of: $\require{cancel}\cancel{(101)^*+}(010)^*+(10)^*+(\cancel{1}1)^*+(\cancel... |
I am given an oracle $A$ that takes input samples from two distributions $\chi_1$ and $\chi_2$.
Suppose we have $Pr_{x \sim \chi_1}[A(x) = 1] = p_1$ and $Pr_{x \sim \chi_2}[A(x) = 1] = p_2$, where $p_1 \neq p_2$.
In general, how can we use $A$ to construct a distinguisher to determine whether the input samples are fro... |
How can alpha-beta pruning be made safe for a chess program? Pruning away a certain set of nodes is safe when the tree is complete and it is known that no other new nodes can be found deeper in the tree, but obviously this is not the case in chess. If my program prunes away a move that looks bad because it sacrifices v... |
I have my own version of lex and I would like to add the complement operation. Derived from that I can then add the intersection and difference also. My version also supports the generation of NFAs (Non-deterministic Finite Automaton) and of course I try to keep the automatons as small as possible.
My question thus is:... |
I am trying to understand an algorithm presented in Using Stable Communities for Maximizing Modularity by S. Srinivasan and S. Bhowmick, along with its complexity results. (The complete algorithm is presented on page 7, in pseudocode.)
As I understand it, the idea of the algorithm is to identify densely connected comm... |
Which theoretical parallel model is closest to CUDA/OpenCL programming model?
For example, it fits at some degree to the generic Parallel Random Access Machine (PRAM) model. However, that is too generic, since it makes abstraction of various memory access latencies and synchronization issues.
My question is which is th... |
We're asked to prove the above mentioned lemma but I having a hard time proving this rigorously.
We did prove that given $n$ values AVL's height is $\Theta\left (\log \left ( n \right ) \right )$ So I thought that after inserting a $\frac{n}{2}$ values the height of the tree will be at least $\Theta\left (\log \left ( ... |
When I see a problem like "Write a grammar for a language $L$ if $L = \{..\}$" for me is a matter of "instinct" the way that one can define productions. For example given the following exercise:
Let $L$ a language which alphabet is $\{x,y,z\}$ and accepts strings
$w$ where there aren't consecutive $x$'s nor consecut... |
Runtime for many programming languages is typically analyzed either assuming each operation takes a constant amount of time, or assuming each operation takes a logarithmic amount of time in the size the the data being manipulated. From a practical perspective, this is reasonable since modern computers have essentially ... |
Whats the diffrence between Disk scheduling and process scheduling? I mean i know the roles of disks and processes, but it seems to me they both have the same aim. to reduce monopolies, they even both share similar algorithms like first come first serve. Am i right?
|
I am looking for an algorithm (or hint where to start), for Toads and Frogs Game. What I am interested in is not how to solve the problem (it's NP-hard), but how to plan one player's moves. I.e. how to design a computer player (AI), which could win against another player (another program or human player). I was looking... |
i have a binary tree.
2
/ \
3 4
/ \ \
5 1 8
\ /
6 9
I want to change the info part of each node such that the
nodeinfo = nodeinfo + nextInorderNodeInfo
so the actual inorder traversal
5, 6, 3, 1, 2, 4, 9, 8
will change to
5+6,6+3,3+1,1+2,2+4,4+9,9+8... |
Given we change the rule to:
$-s \ \ \leq$ height(left-subtree) - height(right-subtree) $\leq \ \ s$
I was wandering whether it's possible and how would it affect the trees' height, would it still be logarithmic?
Would the exact same balancing techniques work? (if we took those methods from a normal AVL and try to ... |
I'm wondering if there is a standard way of measuring the "sortedness" of an array? Would an array which has the median number of possible inversions be considered maximally unsorted? By that I mean it's basically as far as possible from being either sorted or reverse sorted.
|
What's the time complexity of the clique problem for input graphs where each connected component has size at most $3\log|V|$? Is it in P?
|
I'm doing some research regarding NFAs and inclusion problems with them. I know that in general, the inclusion problems, and converting to an unambiguous NFA, are both PSPACE-complete.
I'm wondering, are there any sub-classes of NFA for which these can be decided efficiently? In particular, the NFAs I'm looking at acce... |
For every integer $t$, is there a problem whose solutions can be verified in $O(n^{s})$ time but cannot be found in $O(n^{st})$ time?
By verifying, I mean that given a candidate solution $y$, we can judge whether $y$ is correct or not in time $O(n^s)$.
|
I'm trying to understand why quicksort using Lomuto partition and a fixed pivot is performing erratically, but overall poorly, on randomly generated inputs. I'm thinking that even though the inputs are randomly generated, there may be a lot of order to the sequences, but I'm not sure how to measure the level of disord... |
Fix a universal Turing machine $M$.
Let $A^*=\{0,1\}^n$ be the set of all binary string of length $n$.
Determine the Kolmorogov complexity $K(x)$ of each $x\in A$, w.r.t. $M$.
Just for a matter of simplicity assume that $K(x)'=\min(|x|,K(x))$.
Let $B^*=\{0,1\}^n$ be the set of all programs $y\in B$ of $T$: $x= M(y)$.
N... |
I was told by my adviser (future one) to look into libsvm library or any other and try to get familiar with it.. to work on a programming project (on Machine Learning) (will start in a month).
my background: Programming knowledge in Python, C.. doing Java now.
So, where should I probably start? and How long it takes me... |
Lets say we need a function to add two numbers and another function to multiply two numbers.
To take a trivial example, consider the function $F(a, b, c, d) = a \cdot (c+d) + b \cdot (c\cdot d)$
If $a=1$ and $b=0$, then $F$ adds $c$ and $d$. If $a=0$ and $b=1$, then $F$ multiplies $c$ and $d$.
So to evaluate both add ... |
Modification of vertex cover problem.
Given a graph G,does G have a vertex cover with 10 vertices? Is this problem still in NP?
Given a graph G and integer k, does G have a vertex cover with k vertices?
Is there any important difference between this two problems?
|
Could someone please provide a reference giving an algorithm to generate uniformly random binary trees?
|
I have the following CFG $G$:
$$ \begin{align}
S &\rightarrow aAbb \mid aaBb \\
A &\rightarrow aAbb \mid \epsilon \\
B &\rightarrow aaBb \mid \epsilon \\
\end{align} $$
I have to create a PDA (pushdown automaton) to recognize this language however I am unsure on how to do it. So far I have this(revised based on feedbac... |
Let $N(G)$ be the null graph. What's the number of vertex cover for this graph? I wanted to modify the reduction from SAT to vertex cover by adding vertices that are not connect to any vertices.
|
I am struggling to calculate the lower bounds of an algorithm. What is the right way to proceed.
For eg, I have the following algorithm
For i=1, 2,...,n
For j=i+1, i+2,...,n
Add up array entries A[i] through A[j]
Store the result in B[i, j] Endfor
Endfor
How do I calculate the lower bounds of this algo... |
Assume we fix a degree $d$ polynomials $f$ of $k$ variables. (If it helps, let $t$ be the number of terms in $f$).
Consider a list of real numbers $a_1,\ldots,a_n$, does there exist a permutation $\pi$, such that for all $i\leq n-k$
$$ f(a_{\pi(i)},a_{\pi(i+1)},\ldots,a_{\pi(i+k-1)}) \geq 0$$
How hard is this problem?
|
Is there a common code metric for "code redundancy" or "code cloning"?
I think I read somewhere a definition, where the LOC (lines of code) of
the redundant code was measured.
I also searched for references, but didn't find a paper that seemed like an good or trustworthy reference.
|
I have this confusion related to solving this problem
You’ve been working with some physicists who need to study, as part of their experimental design, the interactions among large numbers of very small charged particles. Basically, their setup works as follows. They have an inert lattice structure, and they use this ... |
I have a color (say $R=100, G=150, B=130$). How do I compute its intensity?
Do I just sum up all three components? Or are the colors not evenly weighted?
|
I would like to learn more about Amdahl's Law and other similar topics. In what branch of computer science would one place Amdahl's law? Could someone point me to a textbook or further reading (aside from Wikipedia or other sites that are found on the first page of a Google search) that discusses it?
|
Given $n$ points in $\mathbf{R}^2$, define the optimal Euclidean Steiner tree to be a minimum (Euclidean) length tree containing all $n$ points and any other subset of points from $\mathbf{R}^2$.
Prove that each of the additional points must have degree 3, with all three angles being $120^\circ$.
|
During a programming contest I was asked to find just smallest prime number to given number N.
As Sieve cannot be used and brute force also doesn't work.
So, I was wondering is there any other faster implementation.
Here N -> (2, 10^18).
|
I need to find largest value for $\frac{\phi(i)}{i}$ for $i \in (2, N)$ where $N$ can be as large as $10^{18}$.
I tried this approach , but is too slow.
Finding the just smallest prime number to $N$, as its $\frac{\phi(i)}{i}$ value is $\frac{i-1}{i}$, which is maximum in the range. (See Maximum of ϕ(i)i\frac{\phi(i)}i... |
I want to compare in a practical sense two methods of random permutations -- one theoretically perfect, namely that of Fisher and Yates, and another ad hoc, let's
call it X. A way of comparison I could think of is the following:
One starts from the standard configuration of n objects [0, 1, 2, ...., n-1] and
apply each... |
As per the title I was wondering if it's possible for a language $L \subseteq \Sigma^{*}$ to have $\Sigma^{*}$ as its syntactic monoid and if so could one give an example of such a language? I first thought that this was probably an easy question with a simple answer but I haven't been able to make much progress with i... |
I often hear phrases like 'true concurrency semantics' and 'true concurrency equivalences' without any references. What does those terms mean and why are they important?
What are some examples of true concurrency equivalences and what is the need for them? E.g. in which cases they are more applicable than more standard... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.