instruction
stringlengths
35
29.1k
From Wikipedia, KD-Trees: Alternative algorithms for building a balanced k-d tree presort the data prior to building the tree. They then maintain the order of the presort during tree construction and hence eliminate the costly step of finding the median at each level of subdivision. [..] This algorithm presorts n poin...
All we need to do is guess $k$ vertices. We look at vertex $v_1$, and make sure $v_1$ is not connected to $v_2...v_k$. Then, we "throw" $v_1$, and look at $v_2$. We do this to all vertices. Meaning that we only need to guess $k$ vertices, and in our working memory (which determinates NL or NP) we only need to keep 2 ve...
We have grammar with nonterminals $ X_1,...X_n$ terminals $V_t$ and rewriting rules of form: $X_i \rightarrow a \in V_t $ $X_i \rightarrow X_jX_k, \ i \ge j , \ i > k $ How can I show that language generated by this grammar is regular? I don't think this is duplicate question, because: I don't have concrete lang...
If the strings of a language L can be effectively enumerated in lexicographic order then is the statement "L is recursive but not necessarily context free" is true?
I am studying with Game theory right now. In Nim game, in any turn, a player can move any number of stones from any one pile. I am wondering what might be the winning strategy of first player if in any move, a player can pick any number of stones from one or more piles? In this case, how the xor = 0 rule will work? Bot...
Will choosing the child of a node randomly in the alpha beta algorithm have a better chance to get a cut off than choosing them in order? Here's the pseudocode with my addition marked with ***. function alphabeta(node, depth, α, β, maximizingPlayer) if depth = 0 or node is a terminal node return the heuri...
I try to solve an exercise, unfortunately without any success yet. From the following given information, the virtual address space should be calculated: Page size is 16 KB Logical address size is 47 bit 3 levels of page tables; all have the same size Page table entry size is 8 byte My idea is to find out how many pag...
A common Natural Language Processing (NLP) task is to determine semantic similarity between two sentences. Has the question of agreement/disagreement between two sentences been covered in NLP or other literature? I tried searching on Google Scholar but didn't get any relevant results.
I thought about how in lambda calculus (and many implementations of functional programming languages) function (lambda) application and lambda itself, as a construct, are "primitive things", usually somehow implemented by an interpeter. Then I thought, can you "boil-down" these two things to more primitve stuff. For in...
I'm learning about LL(1) parse tree. We need to find first and follow in order to construct a LL(1) parse tree. Each and every time when I find first and follow I'm missing one or the other terminal as we to back track each production. When makes me end up in wrong LL(1) parse tree. Is there any standardized way to che...
In these notes, https://courses.engr.illinois.edu/cs598csc/sp2011/Lectures/lecture_3.pdf 4.2.1 exercise 1, the following argument works if $f$ takes values in the integers, but I don't know how to deal with it if $f$ can take values in the reals. Problem: Given a monotone submodular function $f$ (whose value would be ...
How you can find the number of balanced binary tree knowing only the number of nodes? Is there a method better than generate all possible balanced trees and if not how can i generate those trees based only on the number of nodes?
We are given $n, m$ with $n - m > 1$. Let $S$ be the set of all $n$-bit words. Form $2^{n-m}$ disjoint subsets of $S$ of size $2^m$, denote a typical one of them by $A$, and let $B = S \setminus A$. With $H(a,b)$ denoting the Hamming distance of elements $a \in A$ and $b \in B$, let $G(a) = \max_{b \in B} H(a,b)$ and $...
Greeting I'm studying computing theory and are trying to grasp the concept of complexity classes. If graph isomorphism (suspected NPI) turns out to have polynomial time solution. What possible implication it has or what can we possibly deduce? Thanks for any explanation
tl;dr? See last paragraph. If I use the initial value $2^{\left(\big\lfloor\lfloor\log_2 x \rfloor/n\big\rfloor + 1\right)}$ with Halley's recurrence in the compact form $ x_{k+1} = \frac{x_k\Big[A\left(n+1\right) + x_k^n\left(n-1\right) \Big] }{A\left(n-1\right) + x_k^n\left(n+1\right)} $ to evaluate $\lfloor x^{1/n}\...
I think I understand the theoretical definition of decidable and undecidable languages but I am struggling with their examples. A(DFA) = {(M, w): M is a deterministic finite automaton that accepts the string w} A(TM) = {(M, w): M is a turing machine that accepts the string w} I know that A(DFA) is decidable and A(TM) ...
I have a set of points that are used to draw a shape. I want to rotate this shape without moving its start and end points. I tried to illustrate what I want in the image below (original shape on left, interpolated on right). Are there any algorithms to do that? I researched Hermite Spline and Bezier Curves but I did no...
Let $G=(V,E)$, a directed with non-negative weights ($w:E\to\mathbb{R}^+$). Describe an algorithm, finds all shortest paths in the graph from a source vertex, $s\in V$, such that, each paths has an even number of edges and the number of edges is greater-equal to $6$. So I know I need to use Dijkstra algorithm on a mo...
I have $n$ variables $x_1,\dots,x_n$. I'm given a set $E$ of equalities (each of the form $x_i=x_j$ for some $i,j$) and a set $I$ of inequalities (each of the form $x_i \ne x_j$ for some $i,j$). I want to find a maximum-size subset $E' \subseteq E$ such that $E'$ is compatible with $I$, i.e., such that there is an as...
A little background information from my previous question:https://english.stackexchange.com/questions/318528/conflict-resolution-how-to-decide-if-two-words-are-generally-unmistakable When a court reporter strokes 2 different words with the same keys, this creates a conflict. Normally, the reporter will fix the error la...
In practice I understand that any recursion can be written as a loop (and vice versa(?)) and if we measure with actual computers we find that loops are faster than recursion for the same problem. But is there any theory what makes this difference or is it mainly emprical?
I follow a course in Computer Architecture and I'm making exercises on number conversions. Now one of the questions asks me to convert 251.5625 to octal and hexdecimal base. No further info is given. Would this mean that I have to convert it and just ignore the point? Or what's the convention on something like this?
Is it possible to construct a Turing Machine such that given any finite input on a tape $s$, it clears the tape in a finite amount of time? I have used such a TM as an intermediate step to show a reduction from the State Entry Problem to is $w \in L(M)$ problem but I don't know if it is feasible to construct one. Even ...
Finding genus of a biparite graph is $NP$-complete and finding genus of a degree $3$ graph is $NP$-complete and so finding genus of a degree $3$ bipartite graph is $NP$-complete. Though implication could be right is there any harm in reasoning this way on $NP$-completeness?
From Simon Peyton Jones (recent Royal Society member) we read the paper: Implementing lazy functional languages on stock hardware: the Spineless Tagless G-Machine. Now this paper is part of how they made Haskell a lazy language when they were implementing it, and solved some problems they had at the time. The only com...
I am currently finishing my MSc in computer science. I am interested in programming languages, especially in type systems. I got interested in research in this field and next semester I will start a PhD on the subject. Now here is the real question: how can I explain what I (want to) do to people with no previous knowl...
I am asked, "Show that these T-Grammars constitute a set of languages that are undecidable. Do this by building a T-Grammar for a Turing machine description. For a starting point you might think about machine configurations." I am not sure how configurations is suppose to help, but the grammar that I built: $$ abc \to...
I understand that a self-hosting compiler is a compiler which can compile the code of the language that it is written in into different language but I don't understand why we would want to do that. What are the benefits (and drawbacks) of a compiler which is self-hosting?
I would like create a classifier which works on a relatively large (about 30k samples) dataset with circa 20 attributes and a binary decision, however such, which contains relatively small amount of samples with, say, "Yes" decision. That is, the data for building a classifier seems underepresented. My question is, are...
Given a relation with attributes { A, X, Y, Z } and functional dependencies $AX\rightarrow Y, AX\rightarrow Y, Y\rightarrow A, Z\rightarrow B$, I would think that this would be in 3NF because there are no partial or transitive dependencies. What I don't understand is how to decompose the relation to BCNF by ensuring no...
This Reduction is trying to prove that 2CNF-SAT is also NP-Complete, after proving 3CNF-SAT is NP-Complete. If we had a reduction that given an instance of 2CNF-SAT with k clauses over 'i' number of variables, and we create an instance of 3CNF-SAT with 2n clauses by introducing for clause i a new variable y; then for t...
I have searched the internet for an analysis of why WQUPC is amortized $O( m \alpha (n) ) $ for m operations on n nodes ( $\alpha ( n) $ is the inverse Ackerman function). I understand why it is $O ( m \log^{\ast} ( n ) ) $ as it is proven on wikipedia. So the question is, why is WQUPC $O( m \alpha (n) ) $? I would pre...
I am an undergrad. I can do mathematics fine and am a lot more interested to explore. I turned towards TAOCP as it is highly mathematically oriented so as to excel at maths and programming at the same time. But I am stuck. I have only studied calculus, numerical analysis and probability (undergrad level) but the first ...
Show that checking if a TM accepts some input string of length greater than some constant $k$ is undecidable. Here the constant $k$ is publicly known. I tried solving this problem by trying to reduce the "Acceptance Problem" i.e. the problem where we have to check whether a TM $M$ accepts a string $w$ or not. One idea ...
I came across a confusing situation when reducing the Halting Problem (HP) to the Blank Tape Accepting Problem (BP). We know that since HP can be reduced to BP, BP is decidable $\implies$ HP is solvable. By contrapositive, we get that if HP is undecidable, then BP is undecidable as well. But now this creates an issue. ...
I came across this question. If we want to check if a graph contains both Hamiltonian path and clique. Would this problem be NPC. I knew that clique contains a Hamiltonian path and both problems are NPC, but I am uncertain if something would be different if we check it in same time.
I am trying to understanding this. If a problem has exponential amount of candidate solutions, such as 2^2^n. Is this decidable? To my understanding, as long as its' verfiable, no matter how big the solutions there are, it's.decidable. Thanks for clarity
I read that the maximum set packing and the minimum set cover problems are dual of each other when formulated as linear programming problems. By the strong duality theorem, the optimal solution to the primal and dual LP problems should have the same value. However, consider a universe $U = \{1, 2, 3, 4, 5\}$ and a coll...
According to what I've read in the CLRS book , we calculate the amortized cost for a complete set , and not for a single operation.But in an exam question , it was asked about an operation amortized cost and there hadn't been any info on the analyze function. In these scenarios, how would one calculate the cost for an ...
In that picture, I am having trouble counting why there are 17 pairs of queens. I can only count 14. I counted 10 diagonal pairs and 5 horizontal pairs. Can someone please elaborate on this? I am not exactly sure how it was numbered, but I believe the numbers on the board represent the new number of pairs that are att...
(1) We know that $EXP ⊄ P/poly ⇒ BPP$ is in $SUBEXP$. Does $SUBEXP ⊄ P/poly$ mean $P=BPP$ or anything close? (2) We know that if $NP$ is in $P/poly$ then $PH$ collapses to second level. What is the consequence if $\oplus P$ is in $P/poly$?
In Python's implementation of $k$-$d$ tree it is possible to manually change the norm used for computing distances from $L^2$ to $L^p$. When would one use a norm other than $L^2$ in a $k$-$d$ tree?
I can see that we can do higher kinded types ( * -> *) -> * in Scala and Haskell and other languages. I'm looking for a simpler vanilla implementation of just the basic static type checking system - perhaps in Prolog or MiniKanren. My question is: Is there an implementation of higher kinded types in typed lambda calcu...
Is there a polynomial algorithm that can find a pair of arc-disjoint paths in a directed graph that has a minimum total cost, subject to the condition that both paths are within the same distance. Given a distance $D$, and a graph $G(V,A)$, where $V$ is a set of nodes, $A$ is a set of directed links (or arcs). Each lin...
So as the title suggests, How does a programing language, such as Java or C, abstract itself away from underlying byte machines? Im curious, because I know that static/dynamic typing, data abstraction and control abstraction play a role. But I don't understand it so I was wondering if anyone could shed a nice expl...
I have a stream of 3-tuples of type (x,y,t) where x and y are in the range 0-127 and t is time, therefore monotonic increasing. I want to be able to quickly search for points around a query point and think that constructing a kd-tree from the data is a good way to achieve that. Now I can hardly construct a kd-tree by i...
I usually follow approach of taking logs and putting arbitrary large powers of $2$ for $n$ and reducing the given function to some constant value for large value of $n$. So in this case I did it as follows: $\log{n}$ Putting $n=2^{2^{2^{16}}}$ and taking $\log$ $\log{\log(2^{2^{2^{16}}})}={2^{16}}$ $(\log{n})^c$ Putt...
I am doing a project on Huffman coding and wanted to know when it wouldn't be ideal to use or rather when would the Huffman coding produce low compression. Since it mainly revolves around the frequencies of the characters present in the input text, I believe the answer is also going to be related to that. This is what ...
I was given the following question. Given a minimal DFA $A$ with $m$ states over some alphabet $\Sigma$ which is a "black box" (you can only run words to it and it tells you if it accepts or not): a) describe an algorithm that allows you to find the equivalence classes of the Myhill-Nerode relation and then, b) descri...
I understand how both forward and backward data-flow analysis work but in what situations would we use them? Why do we need to be able to do it in both ways? Do compilers of certain types perform one way more efficiently than the other?
This paper http://www.mountainvistasoft.com/docs/BattleshipsAsDecidabilityProblem.pdf says that the decision problem, "Given a particular puzzle, is there a solution?" is NP-Complete. I don't understand why this can't be done in polynomial time. Given constraints that no two ships can be orthogonally or diagonally adja...
Is there any pathfinding trivial problems like the TSP? I know that is possible to solve TSP using A*, Best-first and using spanning tree and other things as heuristic but, is there any problem well know by the AI community?
I've read that the human eye can only really decipher around 10 million different colours, so what's the point in technology that uses 48-bit colour, which allows for $2.81\times 10^{14}$ colours. Is this not like giant, super inefficient overkill?
Using the IEEE754 standard, let's assign single precision variable s to double precision variable d and then assign d to single precision variable s'. Is this operation is reversible (lossless) for any value that can be represented in IEEE754, including NaN, infinity, etc.? In other words, is it guaranteed that s = s'...
I'm learning some Data Retrieval concepts, one of them being K-means clustering. I understand that it's meant to help understand data, but that's where I begin having issues. I'm working on this problem and I'm not sure how to approach it. This isn't a "just give me the answer" kind of thing either, I would actually l...
I am working trough the book "Introduction to the theory of computation", 3rd edition, by M. Sipser. On page 294, the book states: A problem is in NP iff it is decided by some non-deterministic, polynomial time turing machine. I get that it is decidable by some NDPTTM if the problem is in NP, the other way around I...
I can remember reading that computer intelligence is heading (or maybe the most powerful ones already have) towards the Natural intelligence of a four-year-old child. But how are the two kinds of intelligence compared?
$L := \{w \in \{0,1\}^* | $the length of $w$ is odd $ \wedge $ 1 is in the middle of $w\}$ So the alphabet is $\{0,1\}^*$. My problem is that I can't keep track of the equality of chars before and after $1$. A limited DFA for the length less than 6: How can I expand it so that it would accept any length words? Is it p...
I have an MxN matrix where each element contains a positive numeric value. I need to find those elements in the matrix that add up to the "maximum value". The caveat is that each row and column can be used at most once in calculating the total. I have a brute force algorithm for doing this bit it's ugly. I was wonderin...
In Genetic Algorithms, the idea of elitism is that we keep our best solution from the generation in our population regardless of what happens throughout the iteration. However, elitism seems to be discussed as an optional thing; so what situations is using elitism actually a negative aspect of a genetic algorithm?
I'm working on training a game AI using deep reinforcement learning to achieve specific examples based on pixel input and some additional state information. Naturally, I'm using a convolutional neural network to deal with the pixel information, which has been working well so far. However, I still have additional infor...
My mother is taking some online course in order to be a librarian of sorts, in this course they cover boolean searches, so they can search databases efficiently, however, she got a question sounding something like this: The search "x OR y" will result in 105 000 hits, while a search for only x will result in 80 000 hit...
I'm trying to understand the following excerpt from a paper: Subproblem 1: computing $S$. The $S$ estimation subproblem corresponds to minimizing $$ \sum_{p}(S_p - I_p)^2 + \beta((\partial_xS_p - h_p)^2 + (\partial_yS_p - v_p)^2) \tag {7}\label{7} $$ by omitting the terms not involving $S$ in Eq $(6)$. The funct...
I have implemented a neural network for load forecasting in Microsoft Excel. My structure is very simplistic and involves only 1 hidden layer and 4 neurons. (See picture) I trained my network with a very large set of data and the predictions are as decent as could be expected. However, when I go to try and predict the...
The problem looks a bit like the knapsack problem, but here the objects placed in the sack are unique and it is allowed to overflow the sack. The main goal is to see if it is possible to fill all of the sacks. PROBLEM: Say I have a set of unique buckets $Q = \{4,2,7,1\}$, where the value indicates the space of each buc...
I'm less interested in languages where you can write almost anything, but then are required to write an accompanying proof that what you wrote terminates. I'm more interested in the design space of languages inherently confined to certain complexity classes by construction. Is there any sort of theory hierarchy for su...
In our daily computer, the microchips in it are 2-dimensional, but could it be possible to produce 3-dimensional ones, in some way similar to the brain structure?
My professor gave an example of Huffman tree. Given inputs a 80 b 10 c 20 d 50 e 100 f 35 g 60 … then the tree will be: But when i tried to solve it at home, I get this answer: Which is correct, and why?
In the wikipedia page for Toda's Theorem, the notation $A\cdot B$ is used where $A$ and $B$ are two complexity classes, but without explanation as to its meaning. SO given two classes $A$ and $B$ what does $\cdot$ mean in $A\cdot B$? Using an example for the cited page, what would $BP \cdot \oplus P$ mean? Is it corre...
Currently learning about Networks in Computer Science, and I don't understand why you would ever use an ATM (asynchronous transfer mode) network instead of IP, as IP doesn't have to be as reliable and can be set up much more quickly, and is what the entire Internet basically uses.
How can one solve $$T(n)= 3T\left(\frac{n}{4}\right) + n\cdot \log n$$ without using the master method? I know it has a solution using the master theorem from this link.
Sentiment analysis using Machine Learning is a hot topic. In the present situation when a person doesn't have a problem in having the training data set then which way should we create the classifier possibly the NaiveBayes classifier?
I know what mod does it gives you the remainder but why is it that (smaller integer) % (bigger integer) = smaller integer e.g ( 3%5 = 3 ) or ( 4%5= 4 ) why does this happen i cant figure it out
I just wanted to know if there are actually jobs only devoted to creating and optimising algorithms after finishing a Bachelors degree. Or is it only restricted to PhD's? I solve problems on SPOJ and CodeForces, but I'm not sure if I'd get a job doing something like that.
Suppose we have a multi-class classification problem, where the number of classes $K \geq 3$ We use a tree structure of multiple SVMs to divide and conquer the problem, with one example in the figure below. Generally, in this kind of hierarchical classification, if a sample is wrongly classified in an upper layer, it ...
Let G be k-reguler bipartite graph of degree at least 2, for all v belong to V(G) prove that k(G-v) is connected?
Many of us are familiar with N+1 problem when working with database queries. The problem was known before ORMs (Object-relational mapping frameworks) came around, but it seems that ORMs exacerbated it. The problem goes like this. If your database has a table of cars and each car has a list of wheels (stored in another ...
I'm looking at Lecture #2 from this Stanford course http://web.stanford.edu/class/cs168/index.html, let me introduce the HH problem: We have an array of $n$ elements and we want to know which elements appear at least $\frac{n}{k}$ times, for a given $k$. You can think of $n$ as being pretty large and $k$ small. Proposi...
I am trying to solve the problem of minimizing the overall cost over several groups. The schema of the data goes something like this: User (U) | Group (G) | Price (P) ================================ U1 | G1 | P11 U2 | G1 | P12 -------------------------------- U1 | G2 | P21 U2 ...
Suppose that I have a bit string of finite length. Is there any bit rewriting rule rewrire :: (Bit,Bit,Bit) -> (Bit,Bit,Bit), that doesn't change the total count of 1s on the bit string, and that when applied to arbitrary triplets in any order will converge to a bit string that will begin with an arbitrarily long seque...
Lets represent a class of cellular automata as a finite, unidimensional bit array state : [Bit], plus a rewrite rule rule : (Bit,Bit,Bit) -> (Bit,Bit,Bit). Given any state of the system, a posterior state can be computed by taking any consecutive triple of bits (a,b,c) and replacing it by the result of rule(a,b,c). Si...
I'm trying to solve the following recurrence relation. I've gotten through two iterations, but I don't see any pattern. I would appreciate any help with this. $T(1)=1$ $T(n)=6\ T(n/6)\ +\ 2n\ +\ 3$ I've manually ran through two iterations and found the following: $T(n/6)= 36T(n/36)+14n+21$ $T(n/36)=216(n/216)+86n+129$ ...
I was looking through a paper called "AI2 : Training a big data machine to defend", and saw this (http://people.csail.mit.edu/kalyan/AI2_Paper.pdf) $score(X_{i}) = \sum_{j=1}^{p} (|X_{i} − R^{j}_{i}|) × ev(j) $ Where $ev(j)$ is the percentage of variance. I was wondering, why isn't the the term $(|X_{i} − R^{j}_{i}|)$...
From LessWrongWiki, a seed AI [I]mproves itself by recursively rewriting its own source code without human intervention. Some would even say this could bring about an Intelligence Explosion. Many of these sources mention that it recursively "improves" itself. What exactly does that mean? How do you define "improve"?...
When I read about the Church-Turing thesis it seems to be a common claim that "physical reality is Turing-computable." What is the basis for this claim? Are there any theoretical results along these lines? For context, I am a researcher who works on physical simulations, so of course I'm aware that many partial differe...
Given a set of vectors, lets say that each coordinate is populated from an alphabet (meaning set of symbols, numbers, etc) (particular or shared alphabets are indistinct). Is there any standard procedure for performing the following task ? Look for sets of positions that "make the same choice" in several vectors. Th...
I came across this problem in the “Elements of Programming Interviews” interview preparation book, and also on the site, leetcode.com (link to problem). Problem statement – Letter Combinations of a Phone Number "Given a digit string, e.g., “23”, return all possible letter combinations that the number could represent. ...
If $NP\subseteq P/log\implies P=NP$ why does $coNP\subseteq NP/O(1)$ or $coNP\subseteq NP/O(\log n)$ not implies $coNP=NP$?
Assume I have a set of items $A$ and each item $a \in A$ has a score $s(a)$. Also, each two items $a_1,a_2 \in A$ have variety score $var(a_1,a_2)$ which tells how different they are. I want to optimize over these two values (say with equal weights) to find $k$ items that have both high scores and large variety (to avo...
I was given the following problem: Calculate the computational time complexity of the recurrence $$P(n) = \begin{cases} 1 & \text{if } n = 1 \\ \sum_{k=1}^{n-1} P(k) P(n-k) & \text{if } n \geq 2 \end{cases}$$ using the substitution method. Answer: $\Omega(2^n)$. I have seen there is a closed-form for this recurrence ...
It is known that $\mathsf{NL}=\mathsf{Co{-}NL}$ and unknown if $\mathsf{NP}=\mathsf{Co{-}NP}$. But what about $$\mathsf{NEXP}=\mathsf{Co{-}NEXP}?$$ Is it known whether these two classes are equal?
Last week I stood up and gave a talk on the Raft Consensus Algorithm. The first question I got was: Doesn't it need an odd number of nodes? I answered "During leader election, the first node to become a candidate, all the other nodes have to vote for. (Provided for that node the lack of heartbeat, timeout conditions...
I'm interested in implementing an algorithm detailed on this Wiki page for finding the longest path of a DAG. The second part of the algorithm says the length of the longest path of a node with no outgoing edges should be zero, but my programming professor says this node should return 1 as its longest path length. (Per...
I have a recurrence relation $T(n) = \left( \sum_{i=1}^{k} T(d_i n) \right) + f(n)$, where each $ 0 < d_i < 1$, $f(x) > 0$ for all $\, x > 0$ and $f(xy)=f(x) \cdot f(y)$ for $x,y\geq 0$. I am asked to give an asymptotically tight bound on $T(n)$ if $\sum_{i=1}^{k} f(d_i) < 1$ and if $\sum_{i=1}^k f(d_i) = 1$ using the ...
For a fixed $k\geq 0$, let $X_k = \{\langle M\rangle\mid |L(M)|=k\}$, where $\langle M\rangle$ is the encoding of a Turing machine $M$ and $L(M)$ is the language $M$ accepts. Is $X_k$ recursive, recursively enumerable or neither? I think $X_k$ is NOT recursively enumerable because even if you generate every possible s...
I'm actually trying to give an example of a language being context-free and its superset that isn't context-free. I came up with this, but I'm not sure if this particular language is a superset of the other. Let A be a context-free language. A = {a^n b^n | n >= 0}. Let B be a non context-free language. B = {a^n b^n c^n...
I am looking at a number of algorithms in Data Mining and some are described as being greedy. My issue is that they seem to be using the term greedy in different ways, which seems contradictory. For example, with Hierarchical Clustering the decision to merge clusters is described as greedy. However, a filter attribute...
I'm trying to understand what a compiler intrinsic function is. I did find a wiki article but I'm still kind of fuzzy on what it is exactly. If someone could provide a few concrete examples that would definitely clarify the issue. Any help is appreciated.
I need to show a CFG can express everything that can be expressed by a regular expression, and something that cannot.. I have no idea what example is traditionally used for this.
I want to classify the runtime of this function in big O notation. This function is multiplying two whole numbers and checks the in binary digits of the multiplicand. And adding the multiplier to the product a specific number of times if the bit is '1', dependent on the weigth of that bit. I'm trying to figure out the ...