instruction
stringlengths
35
29.1k
I designed a simulated annealing-based optimization algorithm. My simulation shows that it converge fast. I am looking for some sort of proof to show that simulation annealing-based algorithm converge fast (based on satisfying some properties) to global/local optimal point and doesn't oscillate in the optimal points (o...
I am an electrical engineer, and only had one CS course in college 26 years ago. However, I am also a devoted Mathematica user. I have the sense that Turing Machines are very important in computer science. Is the importance only in the theory of computer science? If there are practical implications/applications what ar...
I read a question from my recitation about optimal buffer size. As solution there is a furmula for calculating the optimal buffer size; I'm not sure about one of its parameters. The formula is $\quad \operatorname{Buffer}_{\text{optimal}} = \frac{\operatorname{Buffer}_{\text{current}}}{1-\frac{R_{\text{app}}}{R_{\min}...
I recently discovered that I have a fondness for the work of Dijkstra. I am currently reading random EWDs, and stumbled across one with some notation that I couldn't quite grasp. Dijkstra states that $[ x < y \implies f.x.y < f.y.x]$ OK, so. This isn't a list comprehension, right? Why the brackets? Also, how could this...
Is there an algorithm for the following problem: Given a Turing machine $M_1$ that decides a language $L$, Is there a Turing machine $M_2$ deciding $L$ such that $t_2(n) = o(t_1(n))$? The functions $t_1$ and $t_2$ are the worst-case running times of Turing machines $M_1$ and $M_2$ respectively. What about space c...
On a PC I am implementing an algorithm in which a number from a look table will be chosen randomly, and will be multiplied by 1000 or 10000. Instead of multiplying by 1000 or 10000 I am thinking of simply padding the numbers with the required 0s. This padding will be nothing but some write operations (though random wri...
Suppose a process keeps running code (e.g. an infinite loop). How can other programs take over? What prevents the process from remaining active forever?
An assignment question asks me to find the complexity of a [tail] recursive algorithm, copied below. While I understand all the complexity specifics, for example that the while loop's complexity is $n-1$ and the complexity of setting $j$ to $0$ is 1, I don't understand how I could trace the code recursively, that is wi...
I always read that finding an independent set of size $k$ in a graph is $\mathsf{NP}$-complete. However, this only requires looking for all combinations of $k$ vertices and this is a polynomial procedure of order $k$. I know that we can reduce directly SAT to independent set, with $k$ the number of clauses. The problem...
Theoretically, if I were to subtract the number 10 from the ASCII character 10 (which is really 00110001 00110000), what would I get? Does the computer add both ASCII characters and subtract?
I am interested in precise time complexity of distributed algorithm for finding MIS (Maximum Independent Set) of a given graph $G$. I investigate the Slow MIS distributed algorithm (from these lecture notes, page 2). Following is the more detailed version than in lecture notes. Every node sends its UID to it's neighbo...
I am learning C++ and noticed that the running time for the push_back function for vectors is constant "amortized." The documentation further notes that "If a reallocation happens, the reallocation is itself up to linear in the entire size." Shouldn't this mean the push_back function is $O(n)$, where $n$ is the length ...
I don't know the right name for this problem, or if there is a name, but it is inspired by my initial interpretation of the title of this question (my question is very different, so the link may be misleading). Anyways, my question is this: We are initially given a list of "items" to be filled in a knapsack of fixed si...
I just started reading about theory of computation. If we compare which is more powerful (in accepting strings), both are same. But what about efficiency ? DFA will be fast compared to NFA, since it has only one outgoing edge & there will be no ambiguity. But in case of NFA we have to check all possible cases & that su...
I'm reading Cormen's Introduction to Algorithms 3rd edition, and in examples of Master Method recursion solving Cormen gives two examples $3T( \frac{n}{4} ) + n\log(n)$ $2T( \frac{n}{2} ) + n\log(n)$ For the first example we have $a=3$ and $b=4$ so $n^{\log_4 (3)}=n^{0.793}$ and Cormen says that if we choose $\epsil...
Speaking in terms of automata and regular languages, how would it be possible for a string repeating some $w$ twice equal a string repeating that same $w$ thrice? That is, why is the language $\qquad L = \{w \in \Sigma^ * \mid ww = www\}$ not empty? The only thing I can think of is $w = abab, ww = abababab, www = ababa...
I need a pool of photos (if possible with description) for my project. I mainly have to perform term extraction for semantic searching. Is there something available out there that is made available for such kinds of thing? I'm going to mine the description of these photos, maybe build ontologies and then perform search...
Wikipedia says: fun factorial n = if n = 0 then 1 else n * factorial (n-1) A Standard ML compiler is required to infer the static type int -> int of this function without user-supplied type annotations. I.e., it has to deduce that n is only used with integer expressions, and must therefore itself be an in...
I've been tasked with building a library of books on algorithms for our small company (about 15 people). The budget is more than 5k, but certainly less than 10k, so I can buy a fair number of books. All people here have at least a Bachelor's degree in CS or a closely related field, so while I will get some basic textbo...
I have to generate a grammar for the language $L = \{ w \in \{ a, b\}^* \mid |w| \in 2\mathbb{N}, w \neq w^R\}$ and give the type of the language. I've generated the grammar $\qquad \begin{align} S &\to aSa \mid bSb \mid aAb \mid bAa \\ A &\to abA \mid baA \mid aaA \mid bbA \mid \varepsilon \end{align}$ This gramm...
Studying LRU approximation Algorithms I think to have not understand how it works, for example: consider a process with 3 logical pages and 2 frames allocated , an approximation of the Algorithm Last Recently Used based of reference bits where every four references there is a shift and where are considered just the fi...
I read a post which talks about pretty much the same problem. But here I simplify the problem hoping that a concrete proof can be offered. There is a set $A$ which contains some discrete points (one-dimensional), like $\{1, 3, 37, 59\}$. I want to pick one point from $A$ which minimizes the sum of distances between thi...
What is the regular expression for the set of binary strings with the property that every $0$ is followed by exactly $m$ times $1$ and every $0$ is preceded by at least $n$ times $1$? $m$ and $n$ are integers.
I'm trying to prove/disprove two statements. I just want to make sure with you I'm on the right line. These are the following statements: Preface : Let A[n] be an array of min-heap (a min-heap represented by an array], whereas all the elements in the heap are different from each other. Let i and j be two indexes in th...
Recall that a language is $\omega$-regular if and only if it is recognized by a Büchi automaton. How can I prove that $\qquad (E_1 + E_2).F^\omega$ is equivalent to $\qquad {E_1.(F^\omega)+E_2.(F^\omega)}$ where both expressions are omega regular expressions, and $E_1$, $E_2$ and $F$ are arbitrary regular expressi...
I've been working with suffix arrays lately, and I can't find an efficient algorithm for building a suffix array which is easy to understand. I have seen in many sites that there is an $O(n \log^2 n)$ algorithm, but I can't understand it, as many important details are omitted. There's an example at Top Coder. Could s...
let us assume that: f is a grayscale image of size NxN, and F is the Fourier transform of f. G is a 2Nx2N transform obtained by inserting 0 between every value in F: What is the inverse transform of G? solution: so i have programmed it, and the picture will be 4 times bigger with the picture 4 times in it. g= [f f;f ...
Suppose I have a context free grammar described: $S \rightarrow 0SS1$ $S \rightarrow 1$ $S \rightarrow \epsilon$ Because the first rule is considered the start rule does that mean that this grammar could never generate a string that starts with 1 or can you apply the second $S$ rule first to generate th...
I'm being asked this question for my computer conceptes class, can't find anything about this in my text book, and have only been able to find half-baked answers googling it. Why is binary subtraction referred to as the invert-add-shift-add method?
Is it true or false that for running a dfs on an undirected graph G with a simple cycle than this cycle will have exactly one back edge? Looks to me likes its true ,is it?
If they were all linked to make a condition such as ($1 < i < j < k < n$), I know how to solve, but the last loop is disconnected so I have no clue on how to do these... the ones like for(i = 1 to n); for(j = i to n); x++; I can use $1 \leq i \leq j \leq n$ and use $x_1 + x_2 + x_3 = n-1$ and find out the gen...
There is a square table composed of N*N Cells. Initially all cell is filled with a number 0. Two types of Operations can be performed on the table. R i k: All the numbers in the cells on ith row has been changed to k. C i k: All the numbers in the cells on ith column has been changed to k. Please Note : k ∈ {0, 1} (ie ...
I am a bit confused. Somehow I have a problem connecting two problems together. The Closest String problem and the problem of matching with mismatches. They seam to be related but, I fail to see the connection. The Closest String problem is defined as : Instance: Strings $S_{1},S_{2}...S_{n}$ over alphabet $\Sigma$ of...
There is the well-known method of unbiasing of bit sequences due to von Neumann. Are there similar schemes applicable to other sequences, e.g. the result of throwing a normal die?
For a 4-bit multiplier there are $2^4 \cdot 2^4 = 2^8$ combinations. The output of 4-bit multiplication is 8 bits, so the amount of ROM needed is $2^8 \cdot 8 = 2048$ bits. Why is that? Why does the ROM need all the combinations embedded into it? What will be the case with RAM?
I have to make a regular expression from the following laguage: {$a^kb^mc^n : $ where k + m + n is odd} Is is possible for the sum of three numbers to be odd (other than three consecutive odd numbers)? I have this so far: {(abbbccccc) + (abbbbbccc) + (aaabccccc) + (aaabbbbbc) + (aaaaabccc) + (aaaaabbbc)} but I am r...
Theoretically speaking, is it possible to have a Lisp/Scheme compiler that can produce code that can compete with compiled C, let's say within 15-25% margin? In my testing, I've found that the current crop of compilers (Bigloo, SBCL, Gambit, Chicken, etc) are 20-50 times slower than equivalent C code. The only outlier ...
I am interested to know the complexity of the NAE-HORN-SAT problem (not all equal). We know that HORNSAT is $\mathsf{P}$-complete, but on the other hand, NAE-SAT is $\mathsf{NP}$-complete. I want to know what can we say about NAE-HORN-SAT problem. Let me define the problem formally: Given: One Boolean formula $\phi...
Given a tube with numbered balls (random). The tube has holes to remove a ball. Consider the following steps for one operation: You can pick one or more balls from the holes and remember the order in which you picked the balls. You need to tilt the pipe towards left side so that remaining balls in the pipe shifts towa...
I am considering what elements an operating system for Network On Chip systems might have and the issue of file systems looms large. NoCs have an embedded heritage, and their domain of use (at least initially) is likely to be similar tasks to embedded systems. But I cannot find any studies of embedded system file acces...
I have the following problem: Given an edge-colored DAG $G = (V,A)$, vertices $s$ and $t$, a set of colors $C$ and $k \in \mathbb{N}$, does there exist a path from $s$ to $t$ using exactly $k$ distinct colors? Can anyone provide pointers to the complexity of this problem? More specific, is it $\mathsf{NP}$-comple...
This is the homework question: $ \{w \in \{a, b, c\}^* : \text{(no symbol occurs twice in succession in w)}\} $ This is my answer: $$\{((abc)^*| (acb)^*| (ab)^* | (ac)^*)^* | (bac)^* | (bca)^* | (ba)^* | (bc)^*)^* | ((cab)^* | (cba)^* | (ca)^* | (cb)^*)^* | ((\epsilon +a) | (\epsilon + b) | (\epsilon+c)) \} $$ Is ...
What is the correct way to write a CFG? A -> B C' E C' -> C C' -> null or A -> B C' C' -> C E C' -> E
Input: A set of $\ell$ arrays $A_i$ (of numbers). The elements within each array are in sorted order, but the set of arrays is not necessarily sorted. The arrays are not necessarily the same size. The total number of elements is $n$. Output: The $k$th smallest element out of all elements in the input. What's the most...
Many max flow algorithms that I commonly see implemented, Dinic's algorithm, push relabel, and others, can have their asymptotic time cost improved through the use of dynamic trees (also known as link-cut trees). Push relabel runs in $O(V^2E)$ or $O(V^3)$ or $O(V^2\sqrt{E})$ normally, but with dynamic trees $O(VE \log...
First, let me write the definition of big $O$ just to make things explicit. $f(n)\in O(g(n))\iff \exists c, n_0\gt 0$ such that $0\le f(n)\le cg(n), \forall n\ge n_0$ Let's say we have a finite number of functions: $f_1,f_2,\dots f_n$ satisftying: $O(f_1)\subseteq O(f_2)\dots \subseteq O(f_n)$ By transitivity of $O$, w...
I molded my problem as the following game (it is a congestion game with varying price): $N$ players share resources $E$, $S_i$ is the strategy space of player $i$ which is in $2^E$ (where $2^E$ is the power set of resources). $P_e^i$ is the price of resource $e \in E$ considering player $i$. The price of resource $e$ i...
I'm reading “Speech segmentation without speech recognition” by Dong Wang, Lie Lu and Hong-Jiang Zhang. The algorithm I'm looking at is a V/C/P (Vowel/Consonant/Pause) classification algorithm on a digital speech signal. It is described as such: Audio data is segmented into 20ms-long non-overlapping frames, where fea...
I am having problems resolving the following question: Given some problem $X$. If there exists a polynomial time reduction from (for example) $\mbox{SAT}$ to $X$, $(\mbox{SAT} \leq_{p} X)$ and since we know that $\mbox{SAT}$ is $\mbox{NP-complete}$, to show that $X$ is $\mbox{NP-complete}$ is it necessary to show that...
If I have some function whose time complexity is O(mn), where m and n are the sizes of its two inputs, would we call its time complexity "linear" (since it's linear in both m and n) or "quadratic" (since it's a product of two sizes)? Or something else? I feel calling it "linear" is confusing because O(m + n) is also li...
I have the following homework problem: A 10 TB disk drive has an MTTF of 6,000,000 hours. How much data can we store in a system comprised of these disks, if we want the system MTTF to be at least 1.2M hours? If we are allowed to make it redundant (i.e., two of them operating in a parallel mode), and if the MTTR is 1...
Suppose we have a set $A$ of pairs $(a,b)$ such that $a$ and $b$ are real numbers and $a < b$. What is the most efficient algorithm to find the smallest subset $B \subseteq A$ such that, for any value within the range of any pair in $A$, the value is also within the range of any pair in $B$. I am currently considering...
Suppose I have a decision tree in which there is a label $L$ under which is the attribute $A$ as shown below. I am given that the Shannon entropy of label $L$ is $H(L) = 0.95$. I must find the Shannon entropy of $L$ given $A$ ($H(L \mid A)$). Here's what I have tried. \begin{eqnarray} H(L \mid A) &=& -(\frac{6}{8} \lo...
How can I build a finite automaton that accepts only the language of all words in which b is the second letter? This is my solution so far but I'm not sure if it's correct.
As a hobby, I have written a basic computer algebra system. My CAS handles expressions as trees. I have advanced it to the point where it can simplify expressions symbolically (i.e., sin(pi/2) returns 1), and all expressions can be reduced to a canonical form. The CAS can also differentiate expressions. Using this par...
I have some difficulties in understanding distributed algorithm for tree 6 - coloring in $O(\log^*n)$ time. The full description can be found in following paper: Parallel Symmetry-Breaking in Sparse Graphs. Goldberg, Plotkin, Shannon. In short, the idea is ... Starting from the valid coloring given by the processor ID'...
Is there a linear-time algorithm to check that a sequence of characters is a concatenation of palindromes? The only thing that comes to my mind is the naive solution: 1. k = 1 2. Split string into k substrings (all possibilities) and check 3. k++ 4. repeat Note: the answer is trivially yes if length 1-strings are defi...
Consider the context free grammar: $$S \rightarrow aSb \mid aSa \mid bSa \mid bSb \mid \varepsilon$$ It could generate regular language, which means it can be converted to a right linear grammar. Is there a general rule to convert CFG into a RLG? If there is no general rule, could you please show me how to convert this...
Problem: Given 11 numbers {N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11} where N1:amount of profit from product A N2:amount of profit from Product B N3:amount of time in hours required to make A in factory1(F1) N4:amount of time in hours required to make B in factory1(F1) N5:maximum number of hours available in a week to make...
Given this formula how do you calculate the following? I don't understand, can some one explain? 1 MTTF(System) = ------------------------ [Summation] 1 ------------ MTTFi (was going to upload an image of the formula but "the...
Article: CC-Radix: a Cache Conscious Sorting Based on Radix sort (IEEE 2003) I'm trying to figure out what the author means by this section: Explanation of CC-Radix For clarity reasons, we explain the recursive version of CC-Radix sort as shown in Figure 3. However, we use the iterative implementation of CC-Radix...
When working with λ-Calculus I see lots of extensions that use other symbols such as ∀ <:Top {} ←, which are from "Types and Programming Languages" (WorldCat) by Benjamin C. Pierce. Name Extends/Based on Figure Figure Page B u...
I am currently reading "Artificial Intelligence - A modern approach" and I really do not get the difference between intended interpretation and extended interpretation in first-order logic. Are extended interpretations all possible assignments from a symbol in my knowledge base to an object in the world? And is the int...
After I learned how to build a suffix array in $O(N)$ complexity, I am interested in discovering the applications of the suffix arrays. One of these is finding the longest common substring between two strings, in $O(N)$ time. I found on the internet the following algorithm: merge the two strings $A$ and $B$ into one s...
I'm in a course about computing and complexity, and am unable to understand what these terms mean. All I know is that NP is a subset of NP-complete, which is a subset of NP-hard, but I have no idea what they actually mean. Wikipedia isn't much help either, as the explanations are still a bit too high level.
The Master theorem is a beautiful tool for solving certain kinds of recurrences. However, we often gloss over an integral part when applying it. For example, during the analysis of Mergesort we happily go from $\qquad T(n) = T\left(\left\lfloor \frac{n}{2} \right\rfloor\right) + T\left(\left\lceil \frac{n}{2} \right\rc...
I know that maximum independent set on cubic triangle-free graphs is NP-complete. Is it still NP-complete in case we require the independent set to be of size exactly $|V|/2$? Basiclly, YES instance of independent set problem on cubic triangle-free graphs problem must have exactly $|V|/2$ nodes. NO instance has an ind...
This is one of my assignments. I am not able to comprehend how to reduce the Turing machine domain to Classical planning domain. My understanding is that we have to essentially perform complexity analysis of classical planning domain. So I have defined these two languages a) PLAN-EXISTENCE(D) = {P : P is the statemen...
Since TMs are equivalent to algorithms, they must be able to perform algoriths like, say, mergesort. But the formal definition allows only for decision problems, i.e, acceptance of languages. So how can we cast the performance of mergesort as a decision problem?
Can we study programming languages in the context of linguistics? Do programming languages evolve naturally in similar ways to natural languages? Although full rationality, and mathematical consistency is essential to programming languages, there still is the need (especially modern languages) to make them readable an...
I'm sort of new, but very interested to the field of computing and complexity theory, and I want to clarify my understanding about how to class problems, and how strongly the problems relate to the machine being used to solve them. My Understanding Standard Turing Machine - a Turing Machine which has a finite alphabet...
Let $\mathcal{A}$ be a problem in $\text{NP} \cap \text{co}$-$\text{NP}$. Now assume we can reduce another problem $\mathcal{B}$ to it using Cook reduction. What conclusions can we draw about $\mathcal{B}$? Does this question even make sense? I'm asking because from what I understand Cook reductions differ from Karp re...
Can anyone tell me the difference between the following in data mining? I am taking a class this semester and the professor is using the terms so frequently, I don't know what these mean anymore. Data point attribute feature
I just recently started learning in a CS context (as opposed to a programming context) about simple recursive functions, along with the combinatorial applications, and techniques such as Backtracking and Divide et Impera. The example problem that I chose for my questions is the n queens problem (given n queens and a n*...
Suppose that we expand our idea of context free grammar rules to allow regular expressions of terminals on the right hand side. For example, consider $G_1$: $\begin{align*} S & \rightarrow (a \mid b) S (c \mid d) \\ S & \rightarrow (a \mid b) A (c \mid d) \\ A & \rightarrow (f \mid g)^* \end{align*} $ Then the langua...
The fixed-point combinator FIX (aka the Y combinator) in the (untyped) lambda calculus ($\lambda$) is defined as: FIX $\triangleq \lambda f.(\lambda x. f~(\lambda y. x~x~y))~(\lambda x. f~(\lambda y. x~x~y))$ I understand its purpose and I can trace the execution of its application perfectly fine; I would like to under...
Suppose we have a set $A$ of pairs $(a,b)$ such that $a$ and $b$ are real numbers defined in the interval $[c,d]$. Assume no two values are identical. For $(a,b)$, if $a > b$, the range is $[a,d] \cup [c,b]$; otherwise, it is $[a,b]$. What is the most efficient algorithm to find the smallest subset $B \subseteq A$ such...
I know that Translation look aside buffer is used for address translation in paging to achieve better performance. I came across term called Look Ahead buffer in a document which said it implements Temporal locality. I tried searching for Look Ahead buffer's but could not get any significant data. Please help
I have a question if I have my $k=300$ and my loop is like this : for( int x = 0 ; x<n ; x--){ for(int y=0 ; y<k; y++){ ... } } Is this still $O(n^2)$? If no, why? Thank you :)
Studying Quick-Find and Quick-Union heuristic I've found clear that: with quick find trees and a union based on the size of the trees we can make a union in $T_{am}(n)=O(\log(n))$ with quick find trees and a union based on the height of the trees we can make a find in $T(n)=O(\log(n))$ But I read that using quick uni...
Task: Design a 2 bit comparator. Input: 2x 2 bit (I take it as 2 2-bit values, let them be unsigned for simplicity) Output: 1 if result input1>input2 is true, 0 otherwise Develop truth table and derive circuits. The problem: I'm completely new to this so I have not even a idea where where to look for the lighthouse. ...
We want to tile $m\times m$-square using two types of tiles: $1 \times 1$-square tile and $2 \times 2$-square tile such that every underlying square is covered without overlapping. Let us define a function $f(n)$ that gives the size of largest uniquely tillable square using $n$ $1\times 1$-squares and any number of $2 ...
It's known that for $f(n) \geq \log n$, $\mathsf{NSPACE}(f(n)) = \mathsf{coNSPACE}(f(n))$. What if $f(n)<\log n$? Are they also equal?
I've got a confusion in the following section of a book. Here we taking about FCFS Scheduling. I feel that calculation table is incorrect in the book. Because P3 got completed at time 7, it's turnaround time should be 7-3 because third process arrival time is 3 so why they take 1? Remember turn around time = t(process ...
I'm currently reading a book in algorithms and complexity. At the moment I'm, reading about computable and non-computable functions, and my book states that there are many more functions that are non-computable than computable, in fact the majority is non-computable it says. In some sense I can intuitively accept that ...
This page about Knuth-Moriss-Pratt Algorithm compared to Boyer-Moore describes a possible case where the Boyer-Moore algorithm suffers from small skip distance while KMP could perform better. I'm looking for a good example (text,pattern) that can clearly demonstrate this case.
The Floyd-Warshall algorithm is defined as follows: for k from 1 to |V| for i from 1 to |V| for j from 1 to |V| if dist[i][k] + dist[k][j] < dist[i][j] then dist[i][j] ← dist[i][k] + dist[k][j] Why doesn't it work if I simply use for i from 1 to |V| for j from 1 to |V| ...
I have a question about the regular operation 'star' in computational theory. IF $A$ is $\{ good , bad \}$ then $A^* = \{ \varepsilon , good, bad , goodgood, goodbad, badgood , \dots \}$ What is the exact "regular operation" mean then ? Can we use $^*$ operation only for regular language ? I don't think so. $L = \{0^n1...
I often read that deciding whether or not a number $r$ is a quadratic residue modulo $n$ is an interesting (and hard) problem from number theory (especially if $n$ is not prime). I am looking at the following special case of this problem: Let $p$ and $q$ be two different prime numbers and $n:=pq$. Given $r$ between $1...
As far as a I understand, a regular language is a set of words that can be run in a DFA. $L_1 = \{ x\#y \mid x,y \in \{0,1\}^* \ \text{and} \ |x| = |y| \}$ $L_2 = \{ xy \mid x,y \in \{0,1\}^* \ \text{and} \ |x| = |y| \}$ $L_1$ is not regular but $L_2$ is, why is that? Is it possible to create a DFA that accepts $L_2$ ...
Why would a company like Twitter be interested in algebraic concepts like groups, monoids and rings? See their repository at github:twitter/algebird. All I could find is: Implementations of Monoids for interesting approximation algorithms, such as Bloom filter, HyperLogLog and CountMinSketch. These allow you to t...
What are anonymous (lambda) functions? What is the formal definition of an anonymous function in a functional programming language? In my simple terms, when I am programming in scheme/lisp I would say an anonymous (lambda) function is a function that is not bound to an identifier. Is that all that you can say formally...
I was reading the ADA 95 reference manual. I came across these two words in annexes Normative and informative . I couldnt find the difference between those. Your help will be much appreciated.
Professor Tim Roughgarden from Stanford University while teaching a MOOC said that solutions to problems in the class NP must be polynomial in length. But the wikipedia article says that NP problems are decision problems. So what type of problems are basically in the class NP ? And is it unnecessary to say that solutio...
I've seen a reduction that's done by adding another vertex to the graph and creating a path through that vertex. Why do I need to add a vertex? Cant I just remove an edge? Lets say the graph with the HamCycle is G,s,t when removing the edge between s and t dont I get a path the goes through all the vertexes that's qual...
Is the language $\lbrace (aaaaa)^n aa (aaaaa)^n \mid n \in \mathbb{N} \rbrace$ regular? It looks like I need infinitely many states so it is not regular.
In many implementations of depth-first search that I saw (for example: here), the code distinguish between a grey vertex (discovered, but not all of its neighbours was visited) and a black vertex (discovered and all its neighbours was visited). What is the purpose of this distinction? It seems that DFS algorithm will n...
If I have a system of N polynomial equations with N unknowns in GF(2): What are some good methods to solve them? What's the highest value of N that can be reasonable solved? Now, my root interest isn't GF, it's crypto. Here's my reasoning: Any function from a n-dimensional binary vector to {0,1} can be represented ...
What are the fastest known algorithms for general convex optimisation under linear inequality constraints?
I am having trouble understanding a mapping reduction and I would appreciate your help. Define $\quad \begin{align} A_{TM} &= \{ \langle M, w \rangle \mid M \text{ Turing machine}, w \in \mathcal{L}(M)\} \\ S_{TM} &= \{ \langle M,w \rangle \mid M \text{ Turing machine}, w \in \mathcal{L}(M) \implies w^R \in \mathca...