instruction stringlengths 35 29.1k |
|---|
Let $ G(V, E, w)$ be a graph with no negative weights.
Describe an algorithm that returns the shortest cycle containing a node $ v $.
I came across this algorithm https://courses.engr.illinois.edu/cs374/sp2017/labs/solutions/lab10-sol.pdf
I can't convince myself it is true, because $ d(s,v)+w(s,v)$ might not be indepen... |
Is it true that a given problem is strictly NP-complete iff it's only decidable by universal Turing Machines? Similarly, a problem is in P iff there exists a non-universal Turing machine which solves it? Is it possible to come up with an NP-complete problem which could be solved by a non-universal TM?
|
i need help proving the following :
$$\sum_{k=1}^{n}\frac{1}{(3k-1)(3k+2)}=\frac{n}{6n+4}$$ for every integer n larger or equal to 1
Can you help? Thanks
|
I am targeting a simple dictionary-coder compression algorithm that uses a static dictionary (code in an existing program, but I can supply my own dictionary). How can I write a compressor for such an algorithm? The first thought I had was to rank all strings in the data by the size reduction from making them dictionar... |
Let a,b,c be arbitrary nodes in the subtrees $\alpha$, $\beta$, $\gamma$, respectively, in the left tree of Figure 13.2 (that is given below). How do the depths of a,b,c change when a left rotation is performed on node x in the figure?
Here is a snapshot of the original question.
My answer:
Since in the left tree, l... |
Does adding an $ \epsilon $-transition to a deterministic finite automata preserve the regularity of the language?
Don't we have one chance to scan the word? If we choose one direction, don't we miss the other one?
|
I have a graph G (G=(V,E)), where each edge has a non negative weight to it.
My problem is to find a subset S (it doesn't have to exist) of nodes such the sum of all the weights of the edges that start in S and end in V\S is lower than a given positive k.
My approach was to pick a random node in the graph, run a bfs on... |
I would like to experiment with displaying the output of an analog to digital converter on computer. Samples of the ADC output would determine the intensity of one pixel.
The input to the ADC is an array of XY wires, with each XY junction representing a pixel.
I can work with such circuitry, but I don't know where to s... |
I know that XOR-SAT can be solved in polynomial time using arithmetic in $F_2$ and Gaussian elimination.
I have a set of formula that is of the form
$$
G_i := \oplus_{j=0}^{i} \left ( a_j \land b_{i-j} \right )
$$
where $a_k, b_k$ are the variables and $\oplus$ denotes XOR and $\land$ denotes logical AND.
Is there any ... |
There are clusters of LAN connected computer systems. California cluster has cached "viral video" at first stage, when client near California requested the file firstly.
Now, another client near California requests "viral video".
The benefit here is that there would be no network latency and subsequently no network tr... |
kth smallest in one sorted array, just take O(1) time
kth smallest in two sorted arrays, there is a binary search algorithm, take O(log k) time
kth smaleest in n sorted arrays, we can use min-heap, takes O(k log n). However, when n = 1 or 2, it's essential brute-force linear scan which takes O(k).
Is there more optimiz... |
I have a multidimensional time series on which I would like to perform some clustering. I have been looking at DTW as a distance metric since my series are not always aligned in time. The problem I have is that while the one to many mapping of points along two series allows for their alignment in the event they are the... |
On $n$ parallel rails there are $n$ trains with constant speeds $v_1, ..., v_n$. At time $0$ the trains are at positions $k_1, ..., k_n$. Find an $O(n \log n)$ algorithm that determines which trains are in the lead at least once.
My current approach is to create a 2-dimensional coordinate system, time as x-axis and pos... |
This might be an irritating, naive question, but please bear with me. If an algorithm/code solves the string matching problem for a binary string, does not it imply that the algo/code actually solves the string matching problem in general?
Because, in hardware everything is converted to 0 and 1 and then calculation is... |
I am looking at the state flipping algorithm, an algorithm that tries to find a stable configuration in a Hopfield network.
The algorithm simply flips the state of unsatisfied nodes as long as the the network has not reached a stable configuration.
Please check page 673, chapter "An Application of Local Search to Hopfi... |
DNA is made of a string of different proteins.There are 4 different proteins which make up the human DNA.We can represent each protein as a 2 bit sequence of '0' and '1'.However wouldnt it be much better if we had 4 available logic states('0','1','2','3') for every type of protein?How would a algebra having as a base 4... |
Let there be $N$ sequences containing at least one set each. Each set has at least one element each.
Select exactly one set from each sequence. The selection within each sequence is mutually exclusive. Once any given selection is formed, calculate a superset as the union of all selected sets. The cardinality of the sup... |
For the definition of domination [Wikipedia],
a node $d$ of a control-flow graph dominates a node $n$ if every path from the entry node to $n$ must go through $d$.
If node $n$ is not reachable from the entry node, why are all other nodes not dominators for it? There is no path from entry node that goes to $n$, and th... |
I'm trying to solve the recurrence equation from CLRS ed 2.
$$
T(n) = 2T(\sqrt{n}) + 1
$$
The question says the solution should be asymptotically tight, but at first I didn't read it and solved it with a substitution of variables and tried to find a big-O solution.
$$
m = lg(n)
\\
S(m) = T(2^m)
\\
S(m) = 2S(m/2)+1
$$
A... |
It is said that PBFT (or Practical Byzantine Fault Tolerance consensus) is Byzantine fault tolerant (unlike Paxos or Raft that are only Crash fault tolerant.)
Based on this answer : LINK , in PBFT "a new leader is elected only if there is a suspicion that the old leader is no longer available."
If it is the case, why i... |
The question is the conversion from an animation to a video file with the following attributes:
Frame rate:24 fps
Resolution:320*240 pixels
Color depth:24 bits
Length of video: 60s
Bit rate: 500kbps
I calculated that the file size should be 24603202403=316MB (frame rate* resolution* colordepth / 3 * resolution), but th... |
For example, in finite-state machines (FSM), the main difference between a deterministic (DFA) and a non-deterministic machine (NFA) is that there are possibly more branches or outputs for each input, depending on how a machine the machine was built. In terms of computational power, are these two the same?
|
While porting an algorithm, I having a bit of a problem with finding an efficient algorithm for finding a linear combination of piecewise functions. The procedure is described in the Table 3 of the appendix of the SIRUS algorithm by Bénard et al. (https://proceedings.mlr.press/v130/benard21a.html).
The problem is defin... |
Let's say we have the following Recurrence Relation:
$$ T(n) = \begin{cases}
1 & n=1 \\
3T(\frac{n}{3}) + \Theta(n) & \text{otherwise}
\end{cases}
$$
I've been taught I can study its complexity by giving into input a power of 3 to calculate its height and consequently its total cost.
I'd like a proof of... |
Prove that there does not exist a universal Turing machine that takes a pair $\langle M, w\rangle$ as input, where M is a Turing machine and w is a string, and that always halts, accepts if $M$ accepts $w$, and rejects if $M$ reject w.
I think assuming the existence of such a machine H could allow one to decide the h... |
I have two sets of points in space with known positions:
$$A = \{r_1^{\alpha}, r_2^{\alpha}, ..., r_n^{\alpha}\} \quad n \in \mathbb{N}, \quad r_i^{\alpha} \in \mathbb{R^3}$$
$$B = \{r_1^{\beta}, r_2^{\beta}, ..., r_m^{\beta}\} \quad m \in \mathbb{N}, \quad r_i^{\beta} \in \mathbb{R^3}$$
$$m < n$$
I want to pick $a$ po... |
Let's say I visit an IP Checker online, is the OP shown there my IP or the IP of my router? I can't seem to find a conclusive authoritative answer online.
|
I am a CS student. I am looking at some questions my professor made and I got stuck in this one.
"Which one of the following inclusions between complexity classes is coherent with the current knowledge? (even if not proved, yet)". The possible answers are:
P $\subseteq$ EXP (Which I know it is true)
NP $\subseteq$ E... |
I am having two algorithms, of which the second is a refinement of the first. However, I am having trouble to show that the seemingly better algorithm runs at least as fast as the first algorithm.
The algorithms aim to be FPT with respect to the parameter $k$ for the following problem:
Circle-Cover:
Input: A set of po... |
Consider two finite languages, $L_A$ and $L_B$, potentially over different alphabets. Now since these languages are finite, there exist minimal acyclic deterministic finite-state automata to decide them. We are given that $L_A$ is bigger than $L_B$: $|L_A| > |L_B|$.
We are given a function $f$ which maps elements of $L... |
As far as I understand it, computation today is largely based on Turing machines implemented in von Neuman architectures. Are there other realizations of Turing machines in use or being considered theoretically that would be advantageous in any way? Or even non-Turing ones that may somehow scale? It seems to me that co... |
In a recent presentation, I've seen the difficulty of NP-complete/NP-hard problems attributed to the fact that they often have "long range" correlations, or at least they can be interpreted that way when the problem is mapped onto a physical system. For instance, in 3SAT a variable appearing in a given clause may also ... |
I was wondering if, given an algorithm for 3SAT, testing it on Barthel instances would provide a general idea of how well it empirically performs on hard instances. What would other hard instances look like that would perhaps be more telling?
Defining Barthel instances: I have only seen them namedropped so I thought th... |
I have the following idea:
Suppose a device D performing a set of tasks T1-Tn.
Each task Ti has 3 properties: time of execution(E), amount of memory needed(M) and priority(P).
Ti: <E=1s, M=45kB, P=0>.
Each of these properties is given a grade value ranging from 0-10 based on the property's value.
e.g.,: Ti grades: <5, ... |
These are three paragraphs from the book CLRS:
The rod-cutting problem is the following. Given a rod of length $n$
inches and a table of prices $p_i$ for $i = 1, 2, ..., n$, determine
the maximum revenue $r_n$ obtainable by cutting up the rod and selling
the pieces.
In the rod-cutting problem, an optimal solution for ... |
Suppose I have a directed acyclic graph $G$. I want to find a graph $H$ containing the nodes of $G$ (and potentially more) which minimizes the number of edges in the graph, without changing the reachability between the nodes of $G$. That is, if a path from $s$ to $t$ exists in $G$ a path from $s$ to $t$ must also exist... |
Skiena's Algorithm Design Manual, 3rd Ed p.71 gives the time complexity of a dynamic array according to the number of movements, $M$, as:
$$
M = n + \sum_{i=1}^{lg(n)} 2^{i-1} = 1 +2+ 4+\ldots+\frac{n}{2} + n \stackrel{?}{=} \sum_{i=0}^{lg(n)} \frac{n}{2^i}
$$
For the life of me, I can't figure out how he's getting fro... |
For a given recursive language $L$, let $TL$ be the language of turing machines that accept $L$, for some encoding of turing machines. $TL$ is countably infinite. Does there exist a set $S = \{S_1,S_2,\cdots\}$ of computable functions that take as input a turing machine and output a turing machine, such that if $T$ is ... |
What is the best way of implementing the following function,
$$f(x) = \frac{x}{\max(1, |x|)},$$
where $x$ is complex, using a Cartesian representation of $x$ with IEEE 754 floating point representations (i.e., float or double) for the real and imaginary parts such that $|f(x)| \leq 1$ for all possible values of $x$?
Yv... |
This is an exam question I couldn't solve
If I store 2^59 as double, that would give me
1 * 2^58. Is the answer just 2? I.e. next value is 2^60??
|
Suppose that we have a problem in $NP \cap coNP$, if we find an algorithm that solves the problem in P, does this mean that $NP=P$?
|
In some works, such as the recent maxflow paper, there is reference to an "almost-linear" complexity, which typically refers to a complexity of $O(n^{1+o(1)})$.
This is similar to the notion of quaslinear complexity, which refers to a complexity of $O(n \log^{O(1)} n)$.
It is clear that quasilinear complexity is a subs... |
Consider a long-lived TCP session with an end-to-end bandwidth of 1Gbps. The session starts with a sequence number of 1234. The minimum time (in seconds, rounded to the closet integer) before this sequence number can be used again is _________.
The solution given for above question was : [(2^32)*8]/(10^9) = 34.3597 sec... |
Question: we have the following language:
$$A = \{\langle M \rangle :| L( M)| < \infty \text{ and } M\text{ is a Turing machine}\}$$
where $\langle M\rangle$ is the encoding of $M$ and $L(M)$ is the language accepted by $M$.
Prove $A$ is a decidable language or not.
My idea was to use reduction on this but I can't f... |
I am currently trying to learn some more about complexity classes. I found this exercise but I cannot find a proper solution to this exercise:
I know this is in NP, can I also say it is in P? If that's the case how could I formally prove it?
|
In coding theory we typically consider the situation where we have a
channel that connects a sender and receiver. The messages flowing from
the sender to the receiver are corrupted by an error source ES. We
have an error detection and correction mechanism that is typically
fine-tuned to ES. Wikipedia (https://en.wikipe... |
given some $n$ variables I would be interested to know what is the count of all 3SAT formulas under $n$ that are unsatisfiable.
An example of all 3SAT forumlas under $n=3$ is the following:
$$
( x \lor y \lor z) = Satisfiable
\\ ...
\\
( x \lor y \lor z)\land ( \neg x \lor \neg y \lor z)= Satisfiable
\\ ...
\\
( x \lo... |
I got a question:
Design a pushdown automata that can recognize strings in L= {$ a^n b^{2n} c^{3n} | n ≥ 0 $} .
I tried to think and design it, but I couldn't find it. The best that I can think of is L= {$ a^n b^{m} c^{m+n} | m,n ≥ 0 $} . I only can make sure that c appears as much as a+b appear.
So, I'm wondering, is ... |
I am currently working on data compression and thought it would be a good time to read up on the basics of information theory to better understand data compression and its algorithms.
As I understand, given a set of data, we can compute the minimum no. of bits on average required to encode the data my multiplying the r... |
Given an undirected weighted graph $G$ and two vertices $s, t$. We want to find a path $P$ from $s$ to $t$ that minimizes the following objective function $L$
$$L(P) = max(len(P), max\{c(e) \mid e \in P\})$$
For example, consider the following graph
Here we have two ways to go from the green node to the red node. Eith... |
I have encountered a following problem:
Given the list of $k$ values from range $[v_{min}; v_{max}]$, find $m$ non-overlaping ranges of length $l$, such that maximises the number of values from the original range that would fit into those new ranges.
For example:
Given a list [2, 3, 4, 5, 10, 11, 12, 21, 22, 30, 31, 32... |
Suppose I have a graph with node weights, where a weight is either -1 or a positive integer. For example:
If a node has weight -1, it is "happy", and cannot be kicked out of the graph.
If a node has positive weight, it is "unhappy", and can be kicked out of the graph.
How do I efficiently calculate which unhappy nodes... |
Most versions of simulated annealing I've seen are implemented similar to what is outlined in the wikipedia pseudocode below:
Let s = s0
For k = 0 through kmax (exclusive):
T ← temperature( 1 - (k+1)/kmax )
Pick a random neighbour, snew ← neighbour(s)
If P(E(s), E(snew), T) ≥ random(0, 1):
s ← snew
Output: th... |
VC dimension covers the binary classification case, i.e. when we want to get a predictor $X \to \{0, 1\}$.
Using VC dimension, we can get the upper bound on the sample complexity for PAC-learning.
In our problem, we have 3 classes, i.e. we want to train a predictor $X \to \{0, 1, 2\}$.
We know a "VC dimension" for our ... |
Let there is an algorithm whose running time is $O(n^2)$. Suppose we apply a preprocessing step on the algorithm in $O(n)$ so that it reduces the input size to $O(\sqrt{n})$ but doesn't effect the true answer of the algorithm. It is just for optimization. Now is it true to say that the running time of the algorithm is ... |
I want to find out how to check, if the following relationships are true or false.
f(n) = nlog(n!); g(n) = nlog(2n^3n); Check, if f(n) = O(g(n)) and/or f(n) = Ω(g(n)) true/false;
f(n) = 3n^2; g(n) = 9^(base3-logn); Check, if f(n) = O(g(n)) and/or f(n) = Ω(g(n)) true/false;
I am very new to this topic, so i would be ver... |
Given an undirected graph $G=(V,E)$ where $V$ is a set of vertices, and $E$ is a set of edges and
given a set $D$ where $D \subseteq V $ and $ \forall v \in V \setminus D \: \mid \: \exists w \in D : \{v,w\} \in E$
INPUT an undirected graph $G=(V,E)$ and a number $k \in \mathbb{N}$
PROBLEM $X$ : Does a set $D \subset... |
Okay so imma noob as my question itself will suggest . And I know that of If I want to access a public class member we have to use the dot operator with the object .
So we know that int , float etc are also classes ..so why don't we use dot operators with the variables of that data type...?
|
Let $\Sigma$ be a finite alphabet. All strings below are over $\Sigma$.
Definitions:
If a string $s = vw$, then $v$ is a $\textit{prefix}$ of $s$ and $w$ is a $\textit{suffix}$ of $s$.
For a language $L \subseteq \Sigma^*$, define $L_n \subseteq L$ to be the set of strings in $L$ of length $n$: $L_n = \{s \mid s \in L... |
Let $S = \{\langle M\rangle | M \text{ is a TM and } L(M) = \{ \langle M\rangle\}\}$. Prove that neither $S$ nor $\overline{S}$ is Turing-recognizable.
I think the statement can be proved via a contradiction. Suppose $S$ is Turing recognizable and let $M$ be a TM recognizing it. Then M accepts all strings $\langle T\... |
This is from Ex. 0.2.(b) from "Computational Complexity" by Arora and Barak (2009):
One needs to find a non-recursively defined function $g$ s.t. (1) $f = O(g)$ and (2) $g = O(f)$, where $f(n)=f(n-1)+n$ for $n > 10$ (and $f(1) = ... = f(10) = 1$). Solution booklet says that $g(n) = n^2$, but I cannot see how to prove ... |
From what I've read, there are $C$-complete problems for all the complexity classes $C$ that I have looked at: $P$, $NP$, $EXPTIME$, $PSPACE$. But I also know that there is an infinite hierarchy of complexity classes. I'm wondering if there are uniform/general reasons that complexity classess have problems that are com... |
A computable function, formulated in the sense of mu recursion, can compute a for or do loop over some (possibly infinite) integer range.
I was wondering if a suitable generalization exists that allows the computation of a real-domain function $f$ where $f(x)$ can be calculated given the values of $f(y)$ for all real $... |
Given a geometric graph (interval, circular arc, disk, etc.), is there a difference between the realization of that graph and the embedding of that graph?
|
I have a minimax problem of the form $$\max_{\substack{u_1,\dots,u_n \ge 0 \\ u_1+\dots+u_n = 1}} \min_{\substack{v_1,\dots,v_m \ge 0 \\ v_1+\dots+v_m = 1 \\ v_{j_1} \le v_{j_2} \hspace{1mm} \forall (j_1,j_2) \in J}} \sum_{i=1}^n \sum_{j=1}^m c_{i,j} u_i v_j,$$ where $J$ is some (given) subset of $[m]\times[m]$ and eac... |
It is very surprising to me that some combinatorial games such as generalized chess are EXPTIME complete. I have no idea why having a solver for a combinatorial game allows you to solve arbitrary exponential problems. The reason is that while I understand that such games can be solved in exponential time, they seem to ... |
I'm using Bayesian optimization for a pretty cost expensive function in the context of neural networks in order to optimize hyperparameters for the neural net.
Is there a general, quantitative way to distinguish between becoming stuck in a local minimum in the optimization or just long running time of the process?
|
Consider a real-valued $L$-smooth and non-convex objective function $f: \mathbb{R}^n \mapsto \mathbb{R}$. There exists a bound on number of iterations in order to find a (local) minima using ordinary gradient descent (see page 15-20 here). The basic idea is to combine the condition of $L$-smooth and gradient descent al... |
Introduction:
Hi, I'm quite new to types so apologies in advance for the basic question and for any abuse of terminology. I believe I have a critical misunderstanding of dependent product types (and probably about types in general to be quite honest). My questions is based on a reading of Andrej's very helpful answer h... |
As far as I know, XMM is used to store floating point. But Highest width floating point according IEEE754 standard is double precision (64-bit). But why XMM register width is 128-bit. Is another 64-bit space is wasted? If not, then what the purpose of another wasted part (another 64-bit)?
|
Assume we have an algorithm consists of several (assume m and m<10) different algorithms each of which has time complexity $O(\log N)$. Is the time complexity of our algorithm is $m*O(\log N)$ or it is $O(\log N)$. which one?
Based on what I understand as the complexity is an approximation, the complexity is $O(\log N)... |
I'm embarking on my first adventure into the world of interactive proofs (IPs). Reading through Thaler's survey, I became interested in IP transformations with respect to error.
Since it's possible to transform an arbitrary IP with completeness error (≤ 1/3 [FGM 89]) into an IP with perfect completeness, I became curio... |
This certain Khan Academy videos introduces the intuition about information entropy: https://www.youtube.com/watch?v=2s3aJfRr9gE&t=102s . It relates information entropy to the expected number of questions needed to be asked to determine the given letter produced by a certain machine according to certain way of asking s... |
Given multiple sets of three items, how can I find the most-commonly occurring item among the sets using only one item from each set. The sets don't have duplicates, but if I'm thinking about this properly, it shouldn't matter.
Example: (1,2,3), (5,3,6), (4,3,7), (8,7,9), (5,1,8)
I want to see which number is the most... |
The question Is busy beaver the fastest growing function known to man? is answered negatively, pointing out that arbitrarily fast growing functions can be constructed.
But is there a "reachable" lower bound for uncomputable functions, or can the growth rate be just e.g. endlessly halved while still remaining uncomputab... |
I'm trying to solve a problem which I can solve in 3SAT or as a mixed 2,3,4 SAT. I know how hard each of those categories are individually and know the derivations of their hardness individually. But I don't see how those can be combined to give me an idea of comparative hardness of 3SAT vs 2,3,4 SAT. By how hard, I me... |
I have a string $a_0a_1..a_{n-1}$
Lets say we split the string at pos $i$, so the string are
$a_0a_1....a_{i}$ and $a_{i+1}a_{i+2}....a_{n-1}$
Now I need to compute:
$max(LCS(a_0a_1....a_{i} , a_{i+1}a_{i+2}....a_{n-1}))$ for all $i$ in $[0,n-1]$
common LCS algorithms takes $O(n^2)$ time. so if we use that n times it ... |
I am working at a Biomedical Center right now and my task is to track both pawns of rats and count the number of times they touch the glass surface.
To elaborate. I have a setup that contains one glass cylinder and 4 cameras that record the rat at 4 perpendicular angles. I need to train a model to track the rat's left ... |
I can't seem to grasp the term of reduction that well.
To explain I will take an example the problem of $$\sqrt{k} - clique $$ such that $$ k \leq \sqrt{V}$$
Solving by reduction with normal k-clique such as
$k-clique \leq \sqrt{k}- clique$
The reduction would be function f, such that f(G,k,) = (G',k')
where the input... |
I've been under the impression that RBM can be used for a variety of applications and a cursory search on google seems to confirm this. But I've heard from multiple people (including a peer reviewer) that they're not considered to be "good," whatever that means. Is there a limitation of RBMs that I'm not aware of? Is i... |
Most programming languages are Turing complete (finite memory blah blah blah), and when we design languages this is a goal.
But is it really necessary? What algorithms do we typically use that require Turing completeness? And do most industry software actually require it?
Like what can't pushdown automata do?
|
I’ve been researching an optimal strategy of playing in mobile game of Ingress and came up with an interesting (for me) computational geometry problem.
Statement of the problem: You’re given N distinct points on plane, and number M < N. Find a simple polygon with M vertices out of the given N points, that maximizes num... |
Studying Os development I encountered the need to interface with the Hard Disk Drive and thus i started learning how it actually works.
One of the problems that i found studying was that different sources said and claimed different things about the Hard Drive's structure.
So, i have some questions:
Is a Sector a Geome... |
Consider I have the following binary image (each pixel is either 0 or 255). How to count the number of lines (they could be straight or a little curvy). For example, in the picture, there are six lines except for the circle. The goal is to compute the number of cracks and its total areas.
|
Given $n\times n$ dense real valued matrices $A_1,\ldots, A_L$ let $P_i=A_1\ldots A_i$
For each $P_i$ I'm interested in obtaining the sum of all rows, and the sum of all columns.
Naive approach:
takes $O(L n^2)$ time to get $L$ rows sums
takes $O(L^2 n^2)$ time to get $L$ column sums
Is there a way to estimate $L$ co... |
According to this answer, given input $2^n$ (and thus input size $n$), this problem is not computable by a deterministic Turing machine in number of steps polynomial in the input size (though it is polynomial time computable under the Arithmetic model). Does this imply that the decision version of the problem is not in... |
I've been tasked with solving this problem, but I'm not sure where to begin:
Let $L$ be a context-free language. $L'$ contains all the words that belong to $L$ which can't be defined as $z=uvwxy$, for which $|vx|>0$ so that $\forall i \ge0$ we get $uv^iwx^iy\in L$.
Is $L'$ a regular language, context free but not regu... |
I have just started to study "Lambda-Calculus and Combinators, an Introduction" by Roger Hindley.
There is a formulation of B ̈ohm’s theorem that I can not understand.
$M$ and $N$ are terms in bn-normal form. Based on the description I assume that $M$ could be equal to λ-term $x$ and $N=y$. $x≠y$. Both $x$ and $y$ do ... |
My question relates to Problem 22.-2 in Introduction to Algorithms 3rd edition.
There biconnected components are defined as maximal sets of edges such that any two edges in the set lie on a common simple cycle. The problems that I am having are the last two tasks of this problem, namely
proving that biconnected compon... |
A strict left fold is straightforward to implement as a loop, rather than with recursion:
foldl(fn, acc, list)
loop until empty(list)
acc ← fn(acc, head(list))
list ← tail(list)
return acc
For a strict right fold, the best I've been able to come up with is by maintaining a stack of partially a... |
Constructivist mathematics states that in order to prove something, we must construct this something, in a notion similar to computation, where things don't spring out of nowhere from some "mystery platonic relationship". The theory behind this I already know. A thing that I just can't understand is, if computation req... |
In the standard definition of the Index problem in one-way 2-party communication complexity, there are two players, Alice and Bob. Alice gets a binary input vector $x$ of length $n$ and Bob gets an index $i$. Alice can send a single message to Bob who must output $x_i$. It is known that this problem has a lower bound o... |
I was reading this classical Coin Problem (7.1): Given a set
of coin values coins = {c1, c2,..., ck} and a target sum of money n, our task is to
form the sum n using as few coins as possible.
I fully understood the discussion until I encountered the last code snippet of the section Constructing A Solution:
int firs... |
I am currently studying triangular mesh generation in 2D and, in that connection, the Delaunay triangulation of a list of vertices $\{ v_1, v_2, ..., v_N \}$. The divide and conquer algorithm of Lee & Schachter (from their paper "Two Algorithms for Constructing a Delaunay Triangulation", 1980) constructs the Delaunay t... |
In a classical definition of the FPT complexity class, for a parametrized problem $L\subseteq \Sigma^* \times \mathbb{N}$ we require an algorithm, solving an instance $(G,k)$ in time $f(k)\cdot n^{O(1)}$, where $f$ is a computable function.
Very simillarly, there is a notion of parametrized reduction, where we require ... |
Our prof talked about why it's good to know that 3-SAT is NP-complete because it's easier to craft reductions from it than from plain SAT.
However, all the examples we've seen (reduction to independent set, Hamiltonian cycle, etc.) seem to work even if we start from a SAT formula and not 3-SAT.
Is there an example of a... |
We have an unstructured cloud of $N$ points in 3D space. What is known about the complexity of building the Euclidean Minimum Spanning Tree of the points ?
The tree is made of $N-1$ edges and can be built as a subset of the Delaunay triangulation in time $O(N^2)$, but I don't think that this is tight.
|
Can every undirected graph be transformed into an equivalent graph (for the purposes of path-finding) with a maximum degree of 3 in logspace?
Given an undirected graph G, is there another graph, H, such that:
all vertices of G are in H
H is allowed extra vertices not in G
if a and b are connected in G, a and b are als... |
Is it correct that, under a certain signature S, two First Order Logic formulae F and G are equisatisfiable if (F is satisfiable under S iff G is satisfiable under S)? But in Skolemization I’m confused because the signature ends up changing when fresh functions are added (when you remove the for-all quantifiers), so ho... |
I have a 3D space where N spheres of identical size, identified by the location of their centers, are continually inserted. When a new sphere is inserted, I have the ability to efficiently query the locations of any other spheres that may intersect with this sphere.
I can also compute the vector two intersecting sphere... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.