instruction stringlengths 35 29.1k |
|---|
According to Peter Selinger, The Lambda Calculus is Algebraic (PDF). Early in this article he says:
The combinatory interpretation of the lambda calculus is known to be
imperfect, because it does not satisfy the $ξ$-rule: under the
interpretation, $M = N$ does not imply $\lambda x.M = \lambda x.N$ (Barendregt, 198... |
How can one calculate the winding number of a polygon given as
a list of vertices in some (counter-clockwise or clockwise) order?
The complexity of the algorithm must be linear time.
|
In the third page (the third paragraph in the right column) of the paper "Time, Clocks, and the Ordering of Events in a Distributed System" by Leslie Lamport, it says that
The reader may find it helpful to visualize a two-dimensional spatial network of processes, which yields a three-dimensional space-time diagram. Pr... |
Is there any approach to FACTORING that can leverage optimal substructure allowing the problem to be decomposed into smaller subproblems? That is, perhaps being unnecessarily verbose, until an easily solvable instance is encountered, at which point the ancestry of subproblems can be successively reconstructed from the ... |
I wonder which one of the two needs a larger input to achieve a decent accuracy:
programming language detection or natural language detection?
More details:
Definition of Language detection:
In natural language processing, language identification or language
guessing is the problem of determining which natural la... |
I have the following problem:
Given a string $x\in\{1,...,M\}^+$ of length $n$.
Let $S$ be the set of all words with exactly the same numbers of occurences of smybols as in $x$. In fact, $S$ consists of all permutations of $x$. We call this set the type class of $x$.
My question:
How to compute the position of $x$ in ... |
Let $\Pi$ be some counting problem which is known to be #$P$-Complete.
Does it imply that $\Pi$ is $APX$-hard (i.e. no PTAS for the problem exists unless $P=NP$)?
|
Below is a snippet about simply typed lambda-calculus from CS152: Programming Languages Lecture 9 | Simply Typed Lambda Calculus, on printed‑page 15, indexed 23.
$$
\frac {\Gamma, x: \tau_1 \vdash e: \tau_2}{\Gamma \vdash \lambda x. e: \tau_1 \rightarrow \tau_2}
$$
I read it as: if from a context $\Gamma$ containing $x... |
Several block structured languages (Scala, Go, Ruby, Julia, Quorum, ...) use semicolons as statement terminators, but allow newlines instead of semicolons under certain circumstances.
My question is: how can I represent Scala-like optional semicolons in a context free grammar? The specific issue is that some kinds of ... |
Let $\Pi$ be a parametrized counting problem, where the parameter is the solution cost, e.g. counting the number of $k$-sized vertex cover in a graph, parametrized by $k$.
Assume that $\Pi$ is $\#W$[1]-complete (a known problem for example would be counting the number of simple paths of length $k$ in a graph).
Does it ... |
The problem is as follows:
There are several rectangles in the plane (they are not necessarily axis-aligned), how can we index them in such a way that given a point $p$ we can quickly locate the nearest rectangle from $p$? The distance from a point $p$ to a rectangle $R$ is defined as the Euclidean distance between $p... |
Is there a deterministic parallel single-source shortest path algorithm (for graphs with non-negative edge-weights) that runs in sublinear time? The number of processors may depend on $n$ or $m$ (i.e., the number of vertices or edges) and the total work time may be worse than $O(m + n\log n)$.
The most suitable algorit... |
I'm looking at the Calculus of Constructions and its place in the Lambda Cube.
If I understand correctly, each axis of the cube can be thought of as adding another operation involving types to the simply-typed calculus, $\lambda_\to$. The first axis adds type-to-term operators, the second type-to-type operators, and th... |
S → aS | aSbS | (empty)
where the alphabet is {a,b}
in other words, the set of strings where any prefix has at least as many 'a's as 'b's.
|
I'm reading through the HoTT book and I have a hard time with path induction.
When I look at the type in the section 1.12.1:
$$\text{ind}_{=_A}:\prod_{C:\prod\limits_{x,y:A}(x=_Ay)\to \mathcal{U}}
\left(
\left(\prod_{x:A}C(x,x,\text{refl}_x)\right) \to
\prod_{x,y:A}\prod_{p:x=_Ay} C(x,y,p)
\right),$$
I have no issue u... |
I was wondering what the complexity of the following problem is:
Given: A flow network $N$ with a source $s$, sink $t$ and a number $k$.
Question: Is there an $s$-$t$ cut of capacity at most $k$?
Obviously, the problem is in P by standard methods. When trying to logspace reduce the P-complete LP-optimization problem,... |
I am trying to prove what is often titled the strong duality theorem. There is a hint in the book that I'm following, and I want to follow the method they have outlined for me. I will outline the problem:
Let A.1: Minimize $c^tX$ subject to $AX\ge b$, $X \ge 0$
Let A.2 (Dual): Maximize $Y^tb$ subject to $A^tY \le c$, ... |
As I've come across Grovers algorithm I dont understand why when computing F(X), which is an oracle function people use classical reversible circuits(toffoli, fredkin) to evaluate the circuit. Why can't it just be done using classical logic gates(and, or, etc) when the function doesn't have any thing to do with changin... |
I have a set of functions $F$.
The functions effectively take a set $S$ that is always a subset of a global set of all possible values $G$, where $|G|>1000$. (alternatively, they could take a $|G|$tuple of booleans, if that's easier). The functions return a real result. I want to minimize over $S$ the average value of ... |
Does anyone have any advice about how I can fast track my understanding of what these types of algorithms mean:
http://en.wikipedia.org/wiki/Monad_(category_theory)
I don't want to have to sit 3 years of maths but is there anything I can do for this to make more sense?
|
In the case of unlabeled graphs, the graph isomorphism problem can be tackled by a number of algorithms which perform very well in practice. That is, although the worst case running time is exponential, one usually has a polynomial running time.
I was hoping that the situation is similar in the case of labeled graphs. ... |
Consider the class $L^A$ which contains all the languages that are decided by a deterministic Turing Machine that uses $O(log(n))$ space and that can make queries to an oracle that decides $A$. My question is what is the length of query that the machine can ask the oracle? Is it $O(log(n))$ or can it be polynomial in $... |
I was just researching Fibonacci encoding of integers. Numbers are encoded in binary and where no two consecutive bits are equal to 1 - other than to terminate the number.
Now other schemes are possible, for example having three or more 1's terminating the number. These representations are more efficient (shorter) for ... |
I am suppose to create a minimum spanning tree from this graph below
I got this answer
However this is my textbook answer
Based on what i have learnt , I think my answer and the textbook answer would both be acceptable however I would like assurance from the community that both the answers are acceptable and I did n... |
Suppose, to the contrary, that there exists a computable algorithm for some undecidable decision problem. Would this mean that halting problem would be solved by a computable algorithm? I know that the converse is true for a decision problem in RE complexity class, but not for the other way around.
|
The problem
Prove that the language
$\qquad L = \{a^n b^j \mid n = j^2\}$
is not context free using pumping lemma.
Approach taken by the book
To prove such statements, the book takes the approach of a game played against an opponent who strives to fail our effort to prove that the language is not context free. The ste... |
I want to calculate the edit distance (aka Levenshtein-Distance) between two words: «solo» and «oslo».
According to this site we'll get the result matrix:
What I don't understand is: In case of comparison the last «o» from «solo» with the first «o» of «oslo» will see the submatrix:
3 2
4 3
As far as I understand, i... |
So I was thinking about how to computationally (e.g., with recursion) obtain the number of tilings of an $m \times n$ board with $2 \times 1$ dominoes. If $m \leq n$, then we can use recursion on $n$ by keeping track of the which squares are filled in the $n$th column, which gives $2^m$ cases to keep track of for each ... |
This is a PDA from the lecture slides I'm using:
They say it accepts all words that contain double a's. While it makes some sense it's not full proof.
What prevents the second a to be read in the left branch not the right? Or even a 3rd..4th a and so on? Is that the case of human Intervention like needed in PDA for o... |
Please excuse my ignorance in low level things. A lot of the written below might be very wrong.
As far as I understand (and I might be very wrong), there are two types of memory locations a microprocessor can have: registers and stacks.
My question is what is the most basic set of memory locatiins a microprocessor must... |
This is a generalization of another question I posted because I wasn't clear that I cared about more than $2 \times 1$ dominoes (it's just a special case), and there is an explicit tractable formula for $2 \times 1$ dominoes. I was wondering about how to computationally (e.g., with recursion) obtain the number of tilin... |
Shannon's entropy measures the information content by means of probability. Is it the information content or the information that increases or decreases with entropy? Increase in entropy means that we are more uncertain about what will happen next.
What I would like to know is if entropy increases, does this mean th... |
I have a set of related data/objects for which, when undergoing some algorithm, there should be only one valid match. Is there a unique term for this type of set?
A common practical use case would be a list displayed for user selection, or a list of keys that should have a single corresponding entry in a database table... |
So for an arbitrary $n^2 \times n^2$ Sudoku puzzle, there are rules for inferring values and auxillary information in cells that run in polynomial time, e.g. using the filled in values to check to see if only one number is possible for a cell, using the filled in values to check if only one cell in a given row/column/s... |
So I have a graph and need to find shortest path between two points in it. I need1 to do it it using bidirectional search. The bidirectional search should be goal-directed, i.e. A*.
So let $l(u,v)$ be length of the (oriented) edge $u,v$, $\pi_f(v)$ the potential of vertex $v$ in forward search and $\pi_r(v)$ potential ... |
In his "Types and Programming Languages", Pierce, at the very end, presents the most powerful system in the book: $F^{\omega}_{<:}$. He, however, does not explain how bounded existential polymorphism would work. I could not find a reference to this online anywhere. Is this just not possible or just not very interesting... |
I have trouble understanding my text-book on how to convert a DFA to a Regular Expression using "equation-method"(don't no what it's called).
If someone could explain step by step in detail what's going on it would be great(or maybe a few steps to get me going). (Old exam-task)
I have this DFA:
And the solution is:
I... |
Dynamical systems are those whose evolution can be described by a rule, evolves with time and is deterministic. In this context can I say that Neural networks have a rule of evolution which is the activation function $f(\text{sum of product of weights and features})$ ?
Are neural networks
dynamical systems,
linear ... |
Continuing on the theme from my last question Variable Length Encoding of Integers, I have come up with a simple encoding scheme, but for which an efficient algorithm eludes me.
The constraints are simple enough: no (binary representation) number is allowed where it is divisible by 3, or a subset (prefix) of that repre... |
How to decode gamma code ($\gamma$ code):
1110001110101011111101101111011
and get the gap sequence?
Detailed information about Gamma codes ($\gamma$ codes) with a brief example of decoding can be found here.
But in their example there is only one case when gamma code ($\gamma$ code) consists of one digit only, how t... |
An ISP has following chunk of CIDR-based IP addresses available with it: 245.248.128.0/20
The ISP wants to give half of this chunk addresses to Organization A,
and a quarter to Organization B, while retaining the remaining with itself.
Which of the following is a valid allocation of addresses to A and B?
A) 245.248.13... |
So, it's known that PCP is undecidable even when we fix the number of tiles to $n \geq 7$.
I'm wondering, can anything similar be said for when there is a fixed word length?
To be precise, here's the problem:
Given fixed $m$ and $n$, with $n \geq 7$, and words
$u_1, \ldots u_n$ and $v_1 \ldots v_n$ such that $|u_i|... |
I came across the following in a text book:
Frequency distribution – Given a set of n items, which element occurs the largest number of times in the set? If the items are sorted, we can sweep from left to right and count them, since all identical items will be lumped together during sorting.
To find out how often an... |
I would like to know what a state variable is in simple words, and I need to give a lecture about it.
I have chosen the Longest Common Subsequence problem
I found a similar question but it has no answers. I was told that I need to use the "states of variables" (not sure if variable of a state and state variable are th... |
Suppose we have the predicate
$\qquad A.p.q ≡ (∀i \mid p≤i≤j<q : X.i≤X.j)$
which says that $X[p..q)$ is ascending.
Apparently, the predicate holds for empty segments, is prefix closed and is postfix closed.
I would like to prove that the predicate above is indeed prefix closed, but I am not able to; that is, I am unabl... |
The XOR swap is a well-known in-place algorithm to swap two values, by XOR:ing them bitwise. It goes as follows:
a = a ^ b
b = a ^ b
a = a ^ b
Now, I was thinking to myself if I can find a way to help with my intuition regarding this algorithm. And here's what I thought of:
Bitwise XOR is the same as bitwise addition ... |
I'm more or less familiar with the landau symbols, most specifically in computer science for complexity, however I was wondering if someone could clarify a bit for me. I'll just mention that I know that technically the correct notation is to say $f(n)$ is an element of $O(f(n))$, not $f(n) = O(f(n))$.
Loosely, my under... |
How to decode gamma code ($\gamma$ code):
1110001110101011111101101111011
and get the gap sequence?
Detailed information about Gamma codes ($\gamma$ codes) with brief example of decoding can be found here.
But in their example there is only case when gamma code ($\gamma$ code) consists of one digit only, how to deal... |
Why does reduction from vertex cover to subset sum use base-4?
30.13 Subset Sum (from Vertex Cover)
|
Suppose I have a large distributed task running on a cluster system where part of the workload is compute bound and part depends on network performance. Data transfer is not completely homogeneous between processes - some communication pairs are more or less sensitive to bandwidth and latency than others.
We've profil... |
PS: MIPS architecture
This is a model of a memory RAM of 4GB: it has 4,294,967,295 addresses, and each address has 32 bits. Can somebody tell me why the load word instruction needs an offset to the address? My book says that the offset must be multiplied by 4, but for me, I could simply give the address of the array, ... |
I am considering the following class of algorithms:
The algorithm has access to some probabilistic oracle (procedure) $f$ in addition to input.
The answer of procedure $f$ (we may assume it is boolean) may be incorrect with probability at most $p<1/3$.
The error of different calls to $f$ are independent
(thus we may i... |
There is a complete graph $G$ with $n$ vertices and each edge has a distinct weight.
Is there an efficient (not necessarily optimal) algorithm to select $k$ vertices from the graph $G$, such that the total cost of the min-spanning tree of the selected $k$ vertices will be highest?
In my case, $n$ is around 1000, and $k... |
Can we algorithmically infer the number of comets that orbit the Earth, based upon periodic observations of them, if we cannot tell the comets apart? In more detail:
The problem
There is an unknown, fixed number of comets, numComets that pass by
Earth and are visible from the ground.
Each comet takes a fixed number ... |
Here is the scenario: There are three chefs(A- main chef, B and C- assistant) working together to prepare a diner set. The sequence of the event is as following.
Start: The three chefs enter the kitchen together with the ingredients.
Preparation: They prepare the utensils and the ingredients(e.g cleaning and cutting).... |
I'm researching the travelling salesman problem and looking for data regarding the current state of affairs regarding solutions and performance. So far the only data I've states that the current record for optimality is held by 'Concorde' which found a solution for a graph containing 85,900 cities. I've also found benc... |
I want to know if there is an algorithm for this problem.
I have a list of points given as (x,y) values and a given distance. I want to draw a line through the set of data points so that the size of the set of points that is within the given distance from the line is maximized. That is, this line
Does an algorithm fo... |
The Berman-Hartmanis conjecture discusses one-way functions (functions with hard to compute inverse functions).
As a step to solving the conjecture, if one-way functions could be reduced to a canonical or universal one-way function from which all one-way functions could be derived, this would be a major plus...
In a si... |
I'm trying to solve a constraint programming problem using a SAT solver. I have set of constraints in the form of propositional logic statements, which are converted to CNF using Tseitin transformation. From the nature of my problem I know that there are redundant constraints. For example, I have a rule:
$$AND\:(OR\: (... |
At pp. 7-8 of Ker-I Ko's Computational Complexity of Real Functions (1991), the following is stated for one dimensional cases:
Let $INV_1$ be the operator that maps a one-to-one function $f:[0,1]\rightarrow [0,1]$ to its inverse function $f^{-1}$. Then $INV_1(f)$ is polynomial-time computable for all polynomial-time c... |
I am wondering if it is possible to have a program that interprets programming code and is capable of turning that code into an optimized circuit. Is this possible, and if so, does it exist?
|
Most modern compilers split their syntax analysis into
a lexical phase that is followed by a parsing phase.
The lexical phase is given by a regular expression, while parsing
is guided by a context-free grammar.
What class of languages can be recognised this way?
Context-free languages, or can we get into context-sens... |
Are the integer factorization and PRIMES known to be in LOGSPACE?
Recently, it has been shown by researchers that PRIMES is in P. But this does not say anything about LOGSPACE since it is not known if LOGSPACE = P.
|
Given two sequences $A$ and $B$,
we want to check if $A$ is a subsequence of $B$ where the elements of $A$ appear in $B$ consecutively and in the same order.
Example 1.
input: $A = (4 , 6 , -5), B = (2 , 4 , 6 , -5 , 4)$,
output: Yes
Example 2.
input: $A = (2 , 6 , 4), B = (2 , 4 , 6 , -5 , 3)$,
output: No — alth... |
Given two symbols $\text{a}$ and $\text{b}$, let's define the $k$-th Fibonacci string as follows:
$$ F(k) = \begin{cases} \text{b} &\mbox{if } k = 0 \\
\text{a} &\mbox{if } k = 1 \\
F(k-1) \star F(k-2) &\mbox{else} \end{cases} $$
with $\star$ denoting string concatenation.
Thus we'll have:
$F(0) = \text{b}$
$F(1) = \t... |
In a bipartite graph, how can we find the total number of ways of getting a maximal matching?
The cardinality of both the sets in the bipartite graph may not be the same. So two matchings are said to be different if they have at least one distinct edge.
|
I am studying database functional dependency. It says if A can functionally determine all other attributes, it is considered to be a key.
What if 2 tuples are exactly the same, can we still say A is a key? To me A cannot determine an unique tuple.
|
Considering how often we do:
variable = variable + another;
variable = variable - another;
variable = variable * another;
variable = variable / another;
variable = variable & another;
variable = variable | another;
variable = variable ^ another;
we then made the following language shortcuts:
variable += another;
varia... |
Given a set of $n$ point in a plane, find the maximal number of colinear points (the points residing on the same straight line).
The crudest algorithm is to compute the slope and intercept of each pair of point, assuming infinite precision, find maximal number of appearance of the same pair of parameters.
Is there an ... |
I am teaching myself algorithms with the online lecture notes by Jeff Erickson and fails to solve the following problem (Problem 21 of Lecture 1).
(a) Describe an algorithm that sorts an input array $A[1 \ldots n]$ by calling a subroutine $\texttt{SQRTSORT}(k)$, which sorts the subarray $A[k + 1 \ldots k + \sqrt{n}]$ ... |
I wonder what is the fastest way to check whether the intersection of a set of half-spaces is empty.
Right now I'm using a linear programming formulation (with Gurobi as solver) to check if there is any feasible solution to a linear program constrained with a lot of linear inequalities. Is it possible to perform the f... |
As I understand it NP requires a solution to be verifiable in polynomial time. Can you provide examples of solvable problems not verifiable in polynomial time ?
|
True or False?
Say some data structure can perform $x$ operations in amortized $O(x)$ time.
Then for a big enough $y$ it can perform $xy$ operations in worst case $O(xy)$ time.
My attempt:
$x$ operations in $O(x)$ amortized means $O(1)$ expected time for $1$ operation.
Then for $xy$ operations it'd be $O(xy)$ amortized... |
Problem statement: Given a graph G(V,E) which is not acyclic and may have negative edge weights (and thus may possibly have negative-length cycles), how does one detect if the graph has a zero-length cycle, and no negative-length cycles?
Background information: The question came up when I tried to implement in code the... |
As I have read in book and also my prof taught me about the asymptotic notations
The general idea I got is,when finding asymptotic notation of one function w.r.t other we consider only for very large value of $n$.
So from here my confusion is-
$2^n=O(3^n)$ and $\log_2 n=\Theta(\log_3 n)$
First relation is clear to me a... |
In Computational Complexity A Modern Approach, one claim says that if $f$ is computable in time $T(n)$ by a bidirectional TM $M$, then it is computable in time $4T(n)$ by a unidirectional TM $\tilde{M}$. How to work out the constant $4$?
In my opinion, in addition to "go over the edge" operation, one transition in $M$... |
Given a sorted array A, we have to find the position of an element m in it. (It is also given that the element exists in the array.)
However there is a constraint. Like in a game you have 3 lives. If you probe any element x > m in the array you will lose one life. You can probe as many elements you want which are small... |
Is string matching and replacement, as an operation on strings or on formal languages, considered in formal languages?
For example, the family of regular languages, or the family of
context free languages, ..., are closed under certain string
operations.
I would wonder if these families or some others may be closed u... |
This is taken from OPERATING SYSTEMS: INTERNALS AND DESIGN PRINCIPLES by WILLIAM STALLINGS
Consider a 32-bit microprocessor composed of 2 fields: the first byte contains the opcode and remainder an immediate operand or an operand address.
What is the maximum directly addressable memory capacity?
Now the answer should b... |
Characteristic (average) path length is defined here: https://cs.stackexchange.com/a/7538/20256
I want to establish upper and lower bounds on the CPL for a graph of $n$ vertices, and any positive number of edges, such that each vertex has a degree of at least 1 (i.e. the graph is connected). Assume that the graph is un... |
Assume that we want to develop a warehouse management system, which picks up plastic boxes and stacks them on a pallet. A pallet has a maximum of 5 vertical box stacks and the maximum height of a box stack is 1400 mm. There are 3 box sizes with varying heights (other dimensions are the same). The heights of the boxes a... |
A cryptographic function is homomorphic on some operation if that operation is preserved in the encrypted data.
Such a function is homomorphic on addition modulo if the following holds for some cryptographic function $E$:
$
E(x)\cdot E(y) = E(x+y\mod N)
$
and on xor:
$
E(x)\cdot E(y) = E(x \oplus y)
$
This is called a... |
Suppose you had a set $P$ of people. Every person $p_j \in P$ is familiar with atleast one other person $p_i$ (familiarity is symmetric). Is there a subset $S$ of people such that for $|S| \ge k$, no two people in $S$ know each other? Show that the problem is NP-Complete.
Clearly this resembles the Maximum Independent ... |
In the context of this statement, what does 'a & b are terminals' mean?
Stacks and queues can be used for determining whether a particular
input string is in the language or not.
L = {a^nb^m | m,n >= 0, m >= n, and a & b are terminals}
Sample strings in L : abb, aabb, aabbb
Sample strings NOT in L : aab, ba
|
I hope this question is appropriate for this forum.
In this summer I am giving a 3-day workshop on machine learning and neural networks for advanced and very enthusiastic high school students which all know at least one programming language.
Typically a day consists of 2 hours lecture in the morning and later the stude... |
I have a large list $L$ of numbers and I need to count instances of elements $a,b,c \in L$ such that $a +c = 2b$. A brute-force approach would be to check all possible triples $(a,b,c)$ and this will run in $L^3$ time.
Can I do any better?
|
I have a (stupid ?) question about complexity theory. It's about a "proof technique".
I want to compare 2 models of computation. I want to prove that for each langage recognized in polynomial time by a machine of the first model, there exists a machine of the second class that recognizes the same langage in polynomial ... |
Consider two codes that do the same thing, in the same time and memory order, But they don't do it exactly the same way. Is there any Idea for a program to declare those codes as the same?
For Example:
Change Vars 1
a = a + b;
b = a - b;
a = b - a;
Change Vars 2
int temp = a;
a = b;
b = temp;
or consider two bubble s... |
How come computer science books are so relaxed about specifying which set variables/values belong too ?
I've read several books on algorithms like CLRS's Introduction to Algorithms, Sedgewick's An Introduction to the Analysis of Algorithms etc.
How come these kind of books are so sloppy about telling which set value... |
I am trying to implement a BTree in a pointer-free language as a proof-of-concept. However, a question came to my mind: every time I need to split a node, I need to do a deep copy of all the nodes in the (new) left sub-tree and right sub-trees, thus (I think) destroying the advantages of using a BTree. If I had pointer... |
Suppose I have a large list of numbers that I want to divide into equal-sized buckets so that every bucket contains only larger numbers than buckets to its left. Numbers within each bucket don't need to be sorted.
For example, for the input
[64, 72, 57, 47, 5, 4, 64, 21, 64, 65, 36, 43, 81, 44, 19, 87, 17, 86,
73, 21... |
So suppose that there is an undirected graph with edge connections known. Now in first-order logic there is quantifier $\forall x$. Then does this automatically refer to vertexes, or can we use relation like $v(x)$ to say that $x$ is a vertex?
|
This is am example of a RAM address in the MIPS architecture (32 bits)
I can imagine the RAM as having 32 pins just to inform the RAM address I want to access, so I can access each of these words in the image (because I saw in this vídeo). I think, then, it should need another 32 pins to inform what's the word in that... |
In the halting problem, we are interested if there is a Turing machine $T$ that can tell whether a given Turing machine $M$ halts or not on a given input $i$. Usually, the proof starts assuming such a $T$ exists. Then, we consider a case where we restrict $i$ to $M$ itself, and then derive a contradiction by using an i... |
The harmonic representation of boolean functions such as XOR or AND has been studied in different course note lectures that can be found on Google.
http://cs.mcgill.ca/~hatami/comp760-2011/
http://www.cs.cmu.edu/~odonnell/papers/analysis-survey.pdf
What is the state of research on the representation of boolean function... |
I was reading about decision trees and this is what I understood:
We build decision trees by choosing an attribute and building subtrees (which are also decision trees) as children of the node representing that attribute. This means that as we go down, in building a decision tree, the no. of training instances that we ... |
It seems to me that recursive equations can always be presented as inference rules. For the forward direction, an example is addition over Peono numerals (built from $O$ and $S(\_)$)
$$
\begin{align}
add(O, m) & = m \\
add(S(n), m) & = S(add(n, m))
\end{align}
$$
which can be also presented as
$$
\frac{ }{add(O, m)... |
i have a directed graph. Basically, i have to find how many edges i need to change to opposite direction to make a path between 1 and n. So, i tried solving it by making the graph undirected and marking the directions as -1 or +1 and then going through all paths and finding which paths has minimum -1(s). I store graph ... |
So in Neil Immerman's book http://books.google.co.kr/books?id=kWSZ0OWnupkC&pg=PA113&lpg=PA113#v=onepage&q&f=false, 3-colorability problem in descriptive complexity fashion is expressed as following: $\exists R \exists Y \exists B \forall x \left[(R(x) \vee Y(x) \vee B(x)) \wedge (\forall y) (E(x,y) \rightarrow \neg(R(x... |
Suppose I have two stacks $<a_1,a_2,...a_m>$ and $<b_1, b_2,...b_n>$ and a third stack of size $m+n$.
I want to have the third stack in the following manner, $$<a_1,b_1,a_2,b_2,...a_n,b_n...a_m-1,a_m>$$ for $$m>n$$
This was easy to do if the two initial stacks were not size constrained. But if the two stacks are size c... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.