instruction
stringlengths
35
29.1k
As far I know, in general case there is no Turing machine which could get any theorem on its input and produce its proof on its output. Why is it so?
This problem is from Algorithms, problem 2 The Problem Given two sorted list of numbers $X$[1..$n$] and $Y$[1..n]. we need to come up with a O($log n$) time algorithm to find the median of the 2$n$ lists.' My question is regarding the case where median($X$) is less than the median($Y$). Here is the proof that the aut...
I have built a heuristic algorithm for approximately solving an NP complete graph problem by recursive linear relaxations. In each recursion, the algorithm returns a reduced graph, with number of nodes $N_{k+1} \leq 0.5N_{k}$. I think this means that the overall complexity should be order $\log N \times T(N)$ where $T(...
This seems like a simple problem but I'm getting the impression I'm missing something. The problem Given the values $v_1, v_2, \ldots, v_n$ such that $DFT_n(P(x)) = (v_1, v_2, \ldots, v_n) $ for $ P(x) = \sum\limits_{i=0}^k a_ix^i$ , $k < n$ - find $ DFT_{2n}(P(x^2)) $ My attempt: First expand $P(x^2) $ : $$P(x^2) = a...
So the Euclidean TSP decision problem is NP-complete (see http://dx.doi.org/10.1016/0304-3975(77)90012-3 ) so the TSP optimization problem should be NP-hard. On the other hand there is a PTAS for the Euclidean TSP (see http://dx.doi.org/10.1145/290179.290180 ). Wikipedia says that a PTAS is not possible for strongly N...
I'm trying to understand the pumping lemma for regular languages and would like to prove that $L=\lbrace{ab^{n}ba^{n}|n\geq1}\rbrace$ is not regular. My suggestion is as follows: Assuming $L\in{}REG$, let $p$ be the number that exists for $L$ according to the pumping lemma. Let $w=ab^{p}ba^{p}$ with $|w|=2p+2>p$. Since...
In 2PL (two phase locking), what advantage(s) does the rigorous model have over the strict model? I) There is no advantage over the strict model. II) In contrast to the strict model, it guarantees that starvation cannot occur. III) In contrast to the strict model, it guarantees that deadlock cannot occur. IV) I...
I am looking for some advice and direction on solving the weighted interval scheduling problem with $m$-machines to plan some experimental "wet lab" procedures. The problem is very similar to the standard weighted interval scheduling problem described but with the important difference that more than 1 'machine' can be ...
The list of finite languages over a finite alphabet is countable. I could prove it by saying that the list of languages of size 1 is countable, the language of size 2 is countable, and so on. Then I can prove that the infinite union of countable set is countable. However, I am sure that there is a simpler proof. Can so...
I want to implement following algorithm on Turing machine: rewrite binary numbers to their unary counterparts. For example: 101 will be rewritten to a string of 5 consecutive bars (wikipedia) But I don't know how to make the replacement "|0" -> "0||" because it requires 3 cells. Basically I want to insert addition...
Is there an algorithm to test whether the decomposition of relation $R$ into relations $R_1,\dots,R_n$ is dependency-preserving? In more detail, I am given a relation $R(x_1,\dots,x_m)$ on $m$ variables. I am given a decomposition of $R$ into relations $R_1,\dots,R_n$, where each relation $R_i$ refers to a subset of t...
I have a finite automaton with no final/accepting states, so F is empty. How do I minimize it? I got this on a test and I didn't know how to approach the problem because the automaton had no accepting states. Is a single initial state with all the transitions into itself the correct answer?
My textbook says a "complete binary tree" is a "full binary tree" where every root is at the same level. My conceptual understanding: All this time, I was led by my textbook to believe a root is the "top-most vertex" in which all the other vertex are led away from it. So basically I am led to believe there can be only...
I would like to implement short circuit evaluation logic in my code. And I want to know about the full details how it works? Ex: function a() {return true;} function b() {return false;} function c() {return true;} Expression Case 1) a() && b() && c(); Case 2) a() || b() && c(); Case 3) a() && c() || b(); Case 1: b() wi...
Is it $\mathsf{NP}$ complete to decide whether a graph $G$ has bigger clique $\omega(G)$ or bigger independence number $\alpha(G)$?
Setting Exactly as the title stated: Give an example of an $\mathsf{NL}$-complete context free language. $\newcommand{\angle}[1]{\langle #1 \rangle}$ Current Solution Recall in the past we proved that $E_{DFA}$ is regular, so it is also context free. $E_{DFA}$ is in $\mathsf{NL}$ since given DFA $\mathcal M$ over $n...
Given a graph G= (V, E) that is: directed, acyclic, non-weighted, may have more than one edge between two vertices (thus, source and destination are not enough to determine an edge). And given a set of vertices, let's call them vSet; that contains a vertex vRoot; I need to find ALL paths pSet between vSet elements...
For measuring the complexity of an algorithm, is it time complexity, or computational complexity? What is the difference between them? I used to calculate the maximum (worst) count of basic (most costing) operation in the algorithm.
For the purpose of implementing an optimization algorithm (finding the minimum of a multivariate function) I want to create a data structure that supports the following operations: load from array Peek at maximum element (but don't destroy it) Peek at next-to-maximum element Peek at minimum element decrease the maximu...
I'm using Q-Learning to find the values of states in on a gameboard. For example, something like: ----------------- | | | | 1 | ----------------- | | W | | -1| ----------------- | | W | | | ----------------- | S | | | 1 | ----------------- I have the transition, and I can calculate the values of th...
In an out-of-order processor, what is the difference between a reorder buffer and an instruction window? Wikipedia says: "In particular, in a conventional design, the instruction window consists of all instructions which are in the Reorder Buffer (ROB)." Does this mean that the instruction window isn't a seperate h...
Consider the language below, on the alphabet $\Sigma = \{a,b,\$\}$: $$L = \left\{ x$y \mid x,y\in\{a,b\}^* \land \left|x\right| \ne \left|y\right| \right\}$$ I need to define a CFG for this language. I've tried couple of CFGs but they all failed in one way or another. I'd be glad for help.
$$L=\{0^m1^n \enspace | \enspace m \neq n\}$$ I saw that this exact question exists elsewhere, but I couldn't understand what was being said there. My question does not mandate the use of the Pumping Lemma as stated "elsewhere", but I am using the Pumping Lemma anyway. I want to present what I have so far, and for some...
I tried to solve the following exercise : What is the order of growth of the worst case running time of the following code fragment as a function of N? int sum = 0; for (int i = 1; i <= N; i++) for (int j = 1; j <= i*i; j++) for (int k = 1; k <= j*j; k++) sum++; and I found that the complexity ...
In my lecture notes, the definition of the class NP is given as: A language $L$ is in the class NP, if there exists a turing machine $M$ and polynomials $T$ and $p$ such that: For every input $x$, $M$ terminates after at most $T(|x|)$ steps If $x\in L$, then there is a "proof"(or certificate) $t\in\{0,1\}^{p(|x|)}$ su...
I am thinking of the equality "PCP(O(log(n)),0) = P" Say I have a deterministic polynomial time algorithm $A$ whose correctness I can't prove immediately. But say I create a probabilistic version of this algorithm say $A_P$ such that it uses log(n) random bits. Now if I prove somekind of (exactly what ?) expectation c...
That's my question, since it has two symbols but go to a single state, is DFA or NFA?
I've written a library which stores numbers as an array of nibbles. You set the digits and decimal places at compile time. I've written all basic math +-*/% but I'm not sure how to do exponentiation ($a^b$). Raising a decimal to an integer power is a piece of cake, but how do you do, e.g., $4.6345^{3.1425}$ from first...
I have written a math library which handles really big numbers with good precision. Each digit is stored in a nibble and a 'nibble array' makes up the number. There is no epsilon portion, as for currency calculation big brother is happy enough to loose penny fractions with int like rounding. My problem is $a^b$ . It's...
What's the difference between them - Physically based simulation, Physically based animation, Physical simulation for computer animation, Physically based animation for Computer graphics, Physically based modelling for interactive simulation and games and Cognitive modelling ?
LW R2, 0(R1) CMP R3, R2 CMP R7, R5 the LW instruction stalls the first CMP so the second one will execute first. Wouldn't this cause the flags register to contain the wrong value since it expects the second CMP to be the last one that updates the flags register? I'm not sure about this one: does an ADD instruction ALW...
Suppose we have digraph G, set of its vertices W and two (possibly equal) vertices s and f. I'm looking for an algorithm which will solve the following problem: whether there is path from s to f passing through all vertices from W; if yes, return any of such paths. By "path" i mean path in the most general sense: repet...
For an assignment we are asked the following(simplified) : A function F(a) has a non-negative integer as a result. This result is reused in the function itself. Like this, and where the first a is given: new_a = (c1 * (previous_a or first_a) + c2) mod c3 Write, in C#, a sufficiently fast and memory efficient algorithm...
There is that popular problem [1] [2] in the computer science that is finding minimum number of straight lines that covers a given set of points in 2D. Even though I have scanned many papers, none of them has a clear motivation for the problem. What is the use of solving this problem? Is there a paper that explains thi...
Trying to explain a problem, I thought of a variant of Turing Machines. It is unlikely to be new, but I do not recall ever seing it before, and I wonder whether it has been used or has a name. The idea is that the TM uses a "linked list" rather than a tape, so that the head can splice a new symbol position between two ...
I have read various explanations why a 1-bit branch predictor is wrong twice per loop, once at the beginning when it wrongly predicts against entering the loop and once at the end when it wrongly predicts against leaving the loop. Makes sense. What I don't understand is why the 2-bit predictor is better. It seems it ...
Is it true that $\mathsf{P} \neq \mathsf{NP}$ implies $\mathsf{NP} \neq \mathsf{PSPACE}$? I have here some problem that is in $\mathsf{PSPACE} \setminus \mathsf{NP}$ if $\mathsf{P} \neq \mathsf{NP}$. Since I cannot find a fault in my proof, I wanted to be sure, if the upper implication holds or not.
My professor doesn't always know what's actually correct or wrong - he always has to think about it for a very long time and get back to the book and read the book for a long time to answer any of our questions. He says that I tell you that an algorithm runs in $O(2^n)$ but yet is in $\mathsf{P}$. How can this be? Ans...
Suppose a router X is dropping packets. Another router A will investigate whether X is dropping packets due to congestion. What are the procedures that A should follow? A already knows X's buffer capacity. Please explain the procedures and assume an arbitrary threshold T (if needed).
I'm working on a project where I want to to search for vectors in the form (x1, x2, x3,...xn), and be able to search for them by specifying a specific x value and getting all vectors with that x value for that dimension. The value n, the number of dimensions, will be 4 or 5 in most cases. For example, if I have a vect...
I am trying to show the data abstraction for a double ended queue along with the axioms. A double ended queue is a queue where items can be added to and remove from either end of the queue. I have already got the abstraction and axioms for a normal queue but looking at it, it looks to me like it would also work for a ...
Given boolean function $f$, let $F$ denote the unique multiaffine real polynomial representing $f$. Sensitivity of $f$ at input $x$ is $$S_x(f) = |\{i:f(x)\neq f(x^i)\}|$$ where $x^i=x\oplus\Bbb 1_i$ where $\oplus$ is $XOR$ operation. Sensitivity of $f$ is $$S(f)=\max_xS_x(f)$$ Is there an easy proof to show $S(f)\leq ...
Is the language $ L = \{a^n ~| ~n \text{ has even number of digits in 10-base system}\} $ regular? My approach: let the $ p $ be from the Pumping Lemma. Chose the smallest $ n $ which has even number of digits in 10-base system, but bigger or equal to $ p $, that is $ n = 10^{2m - 1} $ for appropriate $ m $. According...
Critical sections limit performance by constraining parallel execution and adding overhead. What features should a critical section have for improving performance?
I am writing a greedy algorithm for a variation of the interval scheduling problem that I haven't seen before. I have a set of jobs, each with start and finish time. All jobs in set must be assigned to a worker, workers cannot have overlapping jobs. My greedy algorithm should minimise workers - use the least number of ...
I understand what a multilayer neural network is, but what about them allows them to solve non-linear problems unlike perceptrons? Is it the fact that they can extend to any number of outputs/hidden layers? Or is it another feature?
It is definitely possible to write a program that takes another program as an input and changes it syntactically, but does not alter the meaning. But is it possible to write a general program $alter$ that alters the output of a given program $P$ for some input, i.e. $\exists x: P(x) \neq alter(P)(x)$? Edit: Let's add t...
Suppose $P \neq NP$. Does it imply that there exists some superpolynomial time bound, such that any $NP$-complete problem, like SAT, can be used to simulate an arbitrary deterministc Turing Machine working in that time bound? Rephrasing does $P \neq NP$ imply that there exists some class $D$ of languages solvable by a ...
For measuring the complexity of an algorithm, is it time complexity, or computational complexity? What is the difference between them? I used to calculate the maximum (worst) count of basic (most costing) operation in the algorithm.
Its known that a polynomial time approximation algorithm that satisfies 3MaxSAT in 7/8+e clauses implies P=NP. Its also experimentally known that 3SAT has the most difficult known cases when the clause to literal ratio is approximately 4.2. Q1. Is there a similar result for 3MaxSAT where the approximation algorithm ...
When implementing TSP GA I decided for adjacency representation (i.e. $j$ value in $i$-th index means that node $j$ goes right after node $i$), as it enables interesting heuristical crossover operation (see Greffenstette, 1985). However this source, like many others, is silent about a sensible option of mutating soluti...
I see this theorem whose proof is not clear to me : "Let $L \subseteq \{0,1\}^*$ be a language and suppose that there exists a polynomial time PTM M such that for every $x \in \{0,1\}^*$ and $Pr[ M(x) = L(x) ] \geq 1/2 + \vert x \vert ^{-c}$ Then for every constant $d >0$ there exists a polynomial-time PTM M' such th...
Consider two sets: the set of validities of propositional logic and the set of validities of monadic predicate logic. Call the first set $VP$ and the second set $VQM$. Both of these sets are decidable, so there are Turing machines that recognize both them and their complements. I'm interested in how the decidability o...
An associative array is a set of pairs (key, value). Does it represent a mapping, or a relation (i.e. does it allow the same key to be associated to different values)? Does it represent an injective mapping only, or does it allow different keys to be associated to the same value? Can a hash table implement any associa...
Let $M$ be a square matrix with entries that are $0$ or $1$ and let $v$ be a vector with values that are also $0$ or $1$. If we are given $M$ and $y = Mv$, we can computer $v$ if $M$ is non-singular. Now let us take the second bit (from the right) of the binary representation of each $y_i$ as another vector $z$. So ...
In the multi criteria decision making context, let $\mathcal{A}$ be a set of alternatives or choices. Each alternative $\alpha\in \mathcal{A}$ is a vector of $k$ criteria $\alpha=(v_1,v_2,\dots,v_k)$. Let $\geq_1,\dots,\geq_k$ be a set of $k$ partial orders over $\mathcal{A}$. For any two alternative $\alpha,\beta\in ...
I'm taking a graduate course on the theory of functional programming, based on Paul Taylor's "Practical Foundations of Mathematics." I understand the statement of Tarski's theorem about how for any $\omega$-compelte poset $X$, and any $\omega$-continuous function $T:X\rightarrow X$, that $T$ has a fixed point which is...
I am doing a project to recognize a kind of leaf using ANNs with Emgu CV in C#. My project is to get frames from camera then present them to the ANN and have the ANN tell me if that frame contain a leaf or does not contain a leaf. I am using 1000 images of leaves that I want to recognize, so if the frame contain a lea...
Let me ask my general question using a specific example, namely range searching: Given a set of points in the plane and an axis parallel rectangle, report all points lying in the rectangle. If the rectangle contains $k$ points, then this can be solved in $O(\log n + k)$ time (after some preprocessing). I understand th...
The question is: How many different undirected graphs are there with n nodes and no parallel edges but may include self-loops? I've been wracking my brain over this for hours now. Basically, I know that for 1 vertex, there are 2 graphs. For 2 vertices, there are 8 graphs. For 3 vertices, there are 64 graphs. However, I...
Is it theoretically exist a computer that never affected by computer virus? just wonder if there could be a revolution on the computer?
I'm trying to show how to reduce the Partition problem to the 3-Partition problem. I'll first describe the problem using the definitions and notations I'm familiar with (I hope they're legit), and will then ask my question. So, the Partition problem is as follow: Given a multiset of integers $X$, we have to decide whet...
I'm a GCSE Computing student and I've been asked to compare writing programs in a block programming environment (I think this means using programs such as Scratch or App Inventor but I'm not entirely sure) compared to writing programs using high level programming languages such as Python, Java etc. I'm honestly not try...
We know that if an edge is a part of a cycle in an undirected connected graph $G$, then if we remove that edge the graph is still connected. Is the opposite true? If an edge is not a part of a cycle in a connected graph $G$, and we remove that edge, then the graph we get is disconnected? P.S.: I think that it is true, ...
(Re-posted from StackOverflow as suggested) I have the following problem. The functions $f(x),g(x)$ are defined as $$ f(x) = \begin{cases} f_1(x) & 0 \leq x \leq 10, \\ f_2(x) & 10 < x \leq 20, \\ 0 & \text{otherwise}, \end{cases} \qquad g(x) = \begin{cases} g_1(x) & 0 \leq x \leq 5, \\ g_2(x) & 5 < x \leq 20, \\ 0 & \...
1) Is there a better algorithm than the naive O(|E|.|V|) to compute the number of descendants of each vertex in a DAG? 2) Is there an online algorithm to do so, assuming that nodes are added one by one and connect to a non empty subset of the existing nodes? Context: I'm interested in the case where m = O(n), millions ...
I am looking for articles relating to algorithms that deal with automatic selection of seating assignment. I need an algorithm (preferably more than one) that can automatically select a seating place while enforcing certain constraints that are predefined. Originally I was planning on having the seats selected on the f...
In class yesterday we went over DFA's and DFA acceptable languages. An example of a language that is not DFA acceptable was given as $\{ ab, aabb, aaabbb, aaaabbbb, \ldots \}$. The reason given was that the machine would need an infinite amount of states. But wouldn't a simple DFA that has only one state that is a ...
I have an idea of how a C program is turned into machine code by the compiler. I also know how the processor processes the instructions (https://www.youtube.com/watch?v=cNN_tTXABUA this video has a good introduction). But what I don't understand, is how an operating system (most times written in C or some low-level lan...
Have a question that requires me to write the rules for parsing a turing machine This is the question The PROBLEM involves writing a set of Turing Machine rules that will read and determine whether or not an input corresponds to the rules of a Turing Machine. This is the first step of a Universal Turing Machine. For ex...
From purely my knowledge of computer science a simple breadth first search from root A in search of node B, while keeping track of the depth of the tree, would be the most effective way to check whether A and B have 6 degrees of separation. If I simply wanted to check whether B is within 6 degrees I could also limit my...
I'm studying for my finals and I can across this statement. "For a fixed set of (unique) keys, any binary search tree containing those keys can be converted to any other BST on the same set of keys via a sequence of left- and/or right- rotations." I'm interested in a proof. Does anyone know any references?
I need a regular language $ L\subseteq \{0,1\}^{*} $ so that $unary(L)$ is not context free. unary of $L$ is defined by: $$unary(L) = \{0^{1x} : x \in L \}$$ Example $L = \{0, 11\} $ $\rightarrow unary(L) = \{00, 0000000\}$ Any help would be great.
I need to find a function $f$ which is in $o(\log^{k} n)$ for fixed value of $k$ with $f = \omega(1)$. I know that for little $o$ the function should be strictly less than $c\log^k n$ for all $c$ and large enough $n$; and for little $\omega$ it should be strictly greater than $c\cdot 1$ for all $c$ and large enough $n$...
I have two True or False questions in my practice test that are related but I am unsure about: 1. If an optimization problem can be solved using a greedy algorithm, there must be a solution for this optimization problem using dynamic programming as well. 2. If an optimization problem can be solved using dynamic progr...
I'm looking for public algorithm which gives the engine these abilities: Query by ranked terms Limit outcome by date/time range Basically, i'd like to concentrate articles (generally title|text|timestamp) identify the source and make N-N correlation to terms (is term for datasource same marking as term for dataentry?...
I'm ordering functions by their asymptotic growth for an assignment and I have verified I have the correct order by using limits, but I'm trying to understand why $n^{log\ log\ n}$ is between $n^3$ and $2^n$. It seems like it should be closer to the order of $n^n$. Can anyone provide some insight on this.
So I've been thinking about verifiers and a possible relation between a language's class and it's verifier complexity. From the book, "NP is the class of languages that have polynomial time verifiers". Is there an analog statement that can be said about a P-class verification complexity? Because P is a subset of NP, I ...
What I understated is this: Probabilistic algorithm: an algorithm that produces result in determined time with a confidence value about the probability of the produced result being correct. Randomized algorithm: an algorithm that uses some sort of randomization to reach the result, that too with absolute surety of reac...
I am trying to obtain the proof of the proposition: $(\forall x \in \mathbb{N}, P(x)) \vee (\neg \forall x, P(x))$ given that the property $P$ is decidable for every $x \in \mathbb{N}$, i.e. $\forall x \in \mathbb{N}, P(x) \vee \neg P(x)$ This is easy to prove (even without using the decidability of $P$) if I include t...
I am trying to prove that 3SAT is polynome time reducable to CNF-SAT, but I don't know how to do this. A formula F is in 3SAT iff f(F) is in KNFSAT, but since 3SAT is a part of KNFSAT, every formula that is in 3SAT will automatically be in CNF-SAT. Is my conclusion correct? And how do I actually show this in a correct ...
I'm trying to understand the material in "A Dual Coordinate Descent Method for Large-scale Linear SVM" by Hsieh et. al. (link to paper) There is an equation for the Dual form of an unconstrained optimisation problem, $$ f(\mathbf{\alpha})=\dfrac{1}{2}\mathbf{\alpha}^T\bar{Q}\alpha-e^T\alpha $$ I don't understand what t...
i'm a little bit lost ... can you help me ? So I have this table of date (each row give a point with its group) So i took a random weight let's say : [1, -2] H = 1 if n =< 0 0 otherwise a= H([1,-2][6,3]) = H(0) = 1 but the target output is 0 ... so we have to update the weight: w -> w - p = [5 , -5] . Next : a= ...
Reading the Wikipedia article for common terminology for tree (data structure) there are several near references, but I don't read a formal declaration for how to refer to a specific generation of a tree's subtrees. For example, Definition As a data type, a tree has a value and children, and the children are themselve...
Let me preface this question by giving some helpful background material. I'm trying to solve the traveling salesman problem using branch and bound. Concretely, for a partial solution, I'm using the solution the algorithm would attain by making greedy choices as an upper bound, and comparing this bound to the current b...
Java seems to be categorized as a statically-typed language [1], but I'm wondering if it would be accurate to describe it as generally statically-typed but having some dynamic typing because of the run-time type checks performed when downcasts are performed.
For simplicity, we can assume that only NAND gates are allowed. An asymptotically correct solution is all I really need. Thanks!
I got a problem related to graph theory - Consider an undirected graph ܩ where self-loops are not allowed. The vertex set of G is {(i,j):1<=i,j <=12}. There is an edge between (a, b) and (c, d) if |a-c|<=1 and |b-d|<=1 The number of edges in this graph is Answer is given as 506 but I am calculating it as 600, please ...
I'm working with compression algorithms that use context-free grammars (e.g. RE-PAIR and SEQUITUR). These grammars look for frequently occurring digrams (pairs of adjacent symbols) in an input string and use recursive substitution with non-terminal symbols to achieve compression. What I'm wondering is whether there ar...
I asked this on StackOverflow, but it was determined more appropriate to post here. So it goes like this.. For people concerned about users having slow connections and timeout issues, it is known that it can't be just always solved with minification, latency reduction etc.. I'll try to keep this question as short as po...
In an article I am currently reading the grammar S → SS | a | ε is being described as canonical infinitely ambiguous. The infinitely ambiguous part I have no problem recognizing, but does "canonical" mean? Does it mean "typical", "standard example" etc.?
I'm looking for a good definition of sparse graphs. Is a sparse graph effectively a big one, with millions/billions of nodes? An example from real world is the Facebook graph. Or can sparse graphs be in small networks as well?
I'm reading this Intel white paper on carry-less multiplication. It describes multiplication of polynomials in $\text{GF}(2^n)$. On a high level, this is performed in two steps: (1) multiplication of polynomials over $\text{GF}(2)$, and (2) reducing the result modulo an irreducible polynomial. We use the "standard" bit...
I have started to read about user-based and item-based collaborative filtering techniques. I understand how a rating of the target user for a particular item is predicted. How top-N recommendation list is created in user-based/item-based collaborative filtering??
Someone told me that the $\log$ function was introduced to make the calculation easier. If we have to calculate $xy$, we can calculate instead $\log x+\log y$ since $\log xy=\log x+\log y$. How this can make the calculation easier? Maybe from a mathematician point of view but what about a computer scientist's point of ...
I am coding a procedure that takes an integer $d$, and generates $d$ finite lists $X_1 \ldots, X_d$ of elements. I would then like for it to output a list of the elements in the product set $X_1 \times \cdots \times X_d$. I can't use nested for-loops because $d$ can vary so I wouldn't know how many to nest. I'm sure t...
Does anyone know any good introductions to Formal Language theory and Formal Grammar, that cover the mathematical basis of Syntax and things like context free grammars and pushdown automata. In particular, I'd like to be able to understand: -Parikh’s theorem -Pentus' proof that Lambek-calculus grammars define only cont...
Suppose I have a source node $S$, destination node $D$ and a set $A$ of intermediate nodes $P_1, P_2, \dots$ in an edge-weighted undirected graph. I want to find the vertex $P_i\in A$ that minimizes $\mathrm{dist}(S, P_i) + \mathrm{dist}(D, P_i)$? In addition, the overall path from $S$ to $D$ should contain only one n...
I know that if the set of free variables for a relational calculus query is equal to the set of range-restricted variables then the query is (roughly) safe. I also can identify free variables. However, I do not understand what range-restricted variables are at all, and I can't find any comprehensible explanations anywh...
I've been reading up on boosting algorithms. I understand that the main crux of the algorithm is to build weak classifiers that are slightly better than random guessing, and then to add them up so that we end up with a strong classifier. This is done via "boosting rounds". With different papers using different variable...