instruction stringlengths 35 29.1k |
|---|
I am trying to understand the algorithms by Peterson and Dekker which are very similar and display a lot of symmetries.
I tried to formulate the algorithms in informal language like follows:
Peterson's: "I want to enter." flag[0]=true;
"You can enter next." turn=1;
"... |
I am trying to prove by induction the following theorem:
Use Induction to prove the following fact: for every integer, $N\ge 1$ , a BST with $N$ nodes must have at least $\log( N + 1)$ levels.
I've proved the base case but I am struggling to figure out how to apply induction to prove for the $K+1$ case. Any suggestio... |
Or at least generate a set of strings that one NFA accepts, so I can feed it into the other NFA. If I do a search through every path of the NFA, will that work? Although that will take a long time.
|
Let $L$ be a language such that $\overline{L}^R$ (the reversal of the complement of $L$) is context-free. Is then also $\overline{(L^R)} \in \mathrm{CFL}$?
|
We define an onto function from $[n] \times [n]$ to $[n-2] \cup \{0\}$ as follows, where $[n] = \{1,2,3,\ldots ,n\}$,
$$f : [n] \times [n] \rightarrow [n-2] \cup \{0\}.$$
1) $f(x,x) = 0$.
2) $f(x,y) = f(y,x) > 0$, for $y ≠ x$.
3) $f(x,y) \leq \max\{f(x,z),f(z,y)\}$ for all $x,y,z$ belonging to $[n]$.
How many such func... |
I'm looking for a data structure that can work as a priority queue with reasonable maintenance complexities (like $O(\log n)$ for insertion and deletion) and that has a theoretical unbounded limit for its number of elements (like a tree structure, that is bounded only by the computer's available memory, and unlike a tr... |
I've been reading a book on using loop invariants and induction to prove program correctness. Then I came across the following program which got me thinking...
Specification for Cube_Root(n)
Pre-Condition: $n$ is a natural number.
Post-Condition: Cube_Root returns a natural number $i$ that is the cube root of $n$ or it... |
Define the Nerode equivalence over a language $L \subseteq \Sigma^{*}$ as $u \sim_L v$ iff $uw \in L \Leftrightarrow vw \in L$ for every $w \in \Sigma^{*}$.
The Nerode equivalence ${\sim}_L$ has finitely many equivalence classes precisely when $L$ can be recognized by a finite-state automaton. This is the Myhill-Nerod... |
I try to solve Physical Travelling Salesman Problem using evolutionary algorithm and I have diffucult to detemine how to choose the parent , on which we do the crossover.
Assume I have popultion of 100.
The parent should be selected randomally? or according to their fitness?
If I choose them randomally I don't think ... |
I don't know whether it was a joke, but once I read what was referred to as a formal definition of a file in a versioning system such as git, hg or svn. It was something like a mathematical object like a homeomorphism. Was that a joke or is there really computer science theory about versioning systems and the mathemati... |
Here given is a sequence from OEIS.
The sequence is triangle of coefficients from fractional iteration of e^x - 1. Few terms are:
1, 1, 3, 1, 13, 18, 1, 50, 205, 180, 1, 201, 1865, 4245, 2700, 1, 875, 16674
The expression of finding the sequence is also given as:
A(n;x) for n-th row satisfies
A(n;x) = Sum_{k=0..n-1} S... |
I am trying to come up with a regular expression for the following language:
The set of all strings with at most one triple of adjacent 0s.
What does "triple of adjacent 0s" mean? Does it mean 010101, or something else?
|
I have a a few fundamental doubts in recursive enumerability and countability and below, I have written what I understand them to be with proofs. But there are contradictions at the end. What is wrong with the statements/proofs i have made?
Countability (C=Countable): A set $X$ is C when a bijection exists between the ... |
Well, i have a binary search tree $T$ that is equilibrated by height witch has $2^d+c$ nodes ($c<2^d$).
What is the number of comparisons that will occur in the worst case scenario, if we ask whether $k\in V(T)$ and why does it arise?
|
I searched for linear solver libraries and found out about PETSc library which is considered to be a powerful and useful library. PETSc consists of implementations of various iterative methods with preconditioners and sparse matrix storing methods. All the methods are realized sequentially and in parallel using MPI.
I ... |
I have to create a roadmap for the quantum computing technology. Looking around I found the timeline on wikipedia that is pretty wide but does not highlight the key events in quantum computing research neither sets the possible future for research.
Could somebody help me to define which are key events in the quantum co... |
A nice easy one.
I'm interested to know the most standard and accepted way to denote the update of a mapping in the context of a theoretical computer science paper.
By example, suppose we have a mapping $m$:
$$
m = \{1 \mapsto 2, 2 \mapsto 3, 3 \mapsto 4\}
$$
Now suppose we wish to mutate the $m$ such that $~m(1) = 666... |
Assuming $P \neq NP$ Is the following langauge in $P$ or $NPC$:
$L=\{\langle\phi\rangle\mid\phi$ is a 3CNF formula with an assignment satisfying at least half of the clauses$\}$
The first thing I tried to do is to find a 3CNF formula $\phi$ such that $\phi \notin L$ and I haven't managed to do so. Is it possible that ... |
I always wondered how various certain languages like Java, HTML5 and browser extensions are made with cross platform(operates and functions the same, regardless of OS, being Linux/Windows/BSD not specifically CPU architecture) compatibility in mind...
Is there a certain developmental process semantic or otherwise that... |
Θ - Tightly bound
O - Upper bound
Ω - Lower bound
I understand that for addition, the max asymptotic value is taken, for example...
if ƒ1(n) = O(n) and ƒ2(n) = O(n log n), then ƒ1 + ƒ2 = O(max(ƒ1, ƒ2) = O(n log n)
and for multiplication, the multiplied asymptotic value is taken, for example...
if ƒ1(n) = O(n) and ƒ2(n)... |
I have seen it mentioned that dependent type systems are not inferable, but are checkable. I was wondering if there is a simple explanation of why that is so, and whether or not there is there a limit of "dependency" where types can be indexed by values, below which type inference is possible and above which it is not?... |
I know that we can minimize DFAs by finding and merging equivalent states, but why can't we do the same with NFAs? I'm not looking for a proof or anything like that--unless a proof is simpler to understand. I just want to understand intuitively why NFA minimization is so hard when DFA minimization is not.
|
Denotational semantics are abstract functions that give meaning to statements of a programming language. They accept an expression and return a value.
But how do you define denotational semantics for languages that define, for example, functions (and later use these functions), or global variables, and change some glob... |
In the book on complexity by Arora and Barak, there is an exercise to show $Space(n)\neq NP$, the proof of which goes by showing that $NP$ is closed under Karp reductions, while $Space(n)$ isn't.
To show that $Space(n)$ isn't closed under Karp reductions, the suggested technique (both in the solutions given at my place... |
I need your help with an exercise on Ford-Fulkerson.
Suppose you are given a flow network with capacities $(G,s,t)$ and you are also given the max flow $|f|$ in advance.
Now suppose you are given an arc $e$ in $G$ and suppose this arc's capacity is increased by one.
Give an efficent algorithm which returns true iff th... |
I'm interested in surprising data structures that extend the things people learned in their first algorithm/data structure course. Usually by offering an additional operation at a very low cost.
I learned that one can create a dynamic array with $O(1)$ access and $O(1)$ amortized append a long time ago. I thought there... |
Consider 3-player game.
Players $x,y,z$, each player has two strategies. $x$: $x_1$ and $x_2$, $y$: $y_1$ and $y_2$, $z:z_1$ and $z_2$.
The outcome of the game are represented by the labels of the player who has playoff $1$, otherwise outcome is $0$.
The best way to represent the game is to depict two tables, the firs... |
Find the number of topological sorts in a tree that has nodes that hold the size of their sub-tree including itself.
I've tried thinking what would be the best for m to define it but couldn't get anything specific.
Maybe $\mbox{Number of sorts =}\prod\limits_{x\in \mbox{children}}\mbox{Number of sorts}(x)$
Meaning tha... |
Some context: I'm to write a program that sorts the lines of a file in C for Linux. Since I have to read all lines of the file (fgets() for example) I'm thinking about inserting them in a tree like structure in a sorted manner using the so called tree sort algorithm.
Looking for a self-balancing tree structure I came a... |
It is known that the language of words containing equal number of 0 and 1 is not regular, while the language of words containing equal number of 001 and 100 is regular (see here).
Given two words $w_1,w_2$, is it decidable if the language of words containing equal number of $w_1$ and $w_2$ is regular?
|
I've been working on this graph and just completely botching it. I mean to say that my solution may be the worst possible other than if a monkey had thrown darts at the graph to decide the next path. Anyhow, I'm lost and really trying to get a grasp of where my conclusion and the proper conclusion diverged dramaticall... |
I am working on a program that involves detecting faces in photos, i am reading a paper that someone has wrote and they said that they had more success detecting faces once he they applied some enhancements to the image, one of these being a contrast enhancement. The exact words are...
Contrast enhancement improves th... |
I am working with sparse matrices (not particularly huge, <100Mb) and I want to compute the largest independent set on the bipartite graph $(N,E)$ defined as follows: suppose the matrix is named $A$ and is of size $m \times n$.
$m+n$ nodes ($1,\dots,m$ for the rows, $m+1,\dots,m+n$ for the columns)
the edge $(i,j) \in... |
I am having a difficulty in deciding the scope of the left-most lambda in the following expression.
λx.x(λuv.v)(λab.a)(λcd.c)
I have learnt that we should put brackets in such a way that the scope of lambda will be maximum. So arrived at candidate- answer 1, below.
On the other hand, since the expression (λuv.v)(λab.... |
Suppose I have two mutually recursive functions like this:
f1(x)
{
.//some code
.
.
f1(x-1)+g1(x-1);
}
g1(y)
{
.
.//some code
g1(y-1)+f1(y-1);
..
}
How can I calculate time complexities in such cases?
|
Is it possible to write a universal loop program for if-then & loop programs and it is possible to write a universal while program for while programs?
Long version and some background:
Before anyone asks, YES, it is a homework and I am not here to find an answer, but only clues to help me get this question right !
I'l... |
There seems to be a sense of competition in creating the fastest computer in the world, and I feel like technically you just have to continue increasing the core number to gain more flops, which is exactly what some countries are doing, so how would you really bench mark the technological level of a supercomputer
for e... |
Productions of the form A-> A are removed immediately, but what if the production is of the form A -> AA?
example:
A -> AA | a
|
I have read the Wikipedia article on Recursively Enumerable languages. The article suggests that the halting problem is recursively enumerable but undecidable. My idea till today was that the halting problem belongs to a class of languages which are not even recursively enumerable. But the article suggests that the hal... |
I am writing this, because no matter how I look at the algorithm I see an error :-)
Aho & Ullman in "Theory of Parsing, vol.1" (pp. 357-359) described the algorithm for building $FIRST_k(A)$ set for any $A$ non terminal by incrementally building helper set $F_i(A)$ which has such property that every $F_i(A)$ set is con... |
I often see claims that modern functional strictly-typed languages are 'safer' than others. These statement mostly linked with type systems and their ability to explicitly express the following pitfalls:
Alternatives in function result. Maybe and Either datatypes vs. exceptions and null-pointers in C++-like languages.... |
I have a problem where, there are a set of nodes and dependencies between them. I want to cluster them based on the maximum number of dependencies. Dependencies can be thought of as number of edges connected. I want to group those with maximum dependencies.
For example in the set $\{1,2,3\}$ and $\{3,5,7\}$ if $\{3,5... |
I have a problem that states the following :
Given a cyclic graph , output for each node if the node removes all cycles in the graph.
The most trivial way to do this is using a Union-find disjoint set , and for each node , try not putting it in the Union-find disjoint set , if there are no cycles , then this node sho... |
I have an issue for which I am looking for an algorithm (if it exists)
What I have:
An array of items which have certain properties, e.g. item $A$ has properties $x$ and $y$.
Example: $[ A(x,y), B(x,y), C(x,y), D(x,y), E(x,y) ]$
What I want:
A result list consisting of elements of the original list, such as $[ A(x,y), ... |
How is a hypergraph different from the bipartite graph generated from the hypergraph by introducing new vertices for each hyperedge, and connecting these vertices with the vertices connected by the original hyperedge. Alternatively, I could also start with a bipartite graph, designate one of the sets of vertices as the... |
I have a deep appreciation for formalisms like the Turing Machine and the $\lambda$-Calculus, and enjoy studying them and learning more about how they relate to physical computers. I am now learning about writing GUI programs, and the graphical library (GTK) relies on things like signals and callbacks, which I have not... |
I have to show whether a program containing only if-else statements but no loops is able to calculate the following type of functions: $f^n(x)$. The function $f$ is applied $n$ times to $x$, so I guess this is a recursive function.
How can I prove that formally?
|
Let $B=\{b_1=g_1,\cdots,b_n=g_n\}$ be a set of binary variables $b_i$ and their corresponding values $g_i \in \{0,1\}$. Let $M=\{\sum_{e \in A}e \;:\; A \subset B\}$, i.e., $M$ is the set of all possible linear combinations of the equations in $B$.
Given $S_i \subset B$ for $i=1,\cdots,m$, is that possible to compute, ... |
I have a problem that I think should have been studied. I am looking for algorithms for it.
Each item is a set of key-value pairs.
Let $x$ be an item and $F$ be a set of items.
Each key and each value can appear multiple times.
The number of possible keys and possible values can be arbitrary large.
We are given $x$ and... |
I am studying for my exam and I wanted to do some extra excercises, but I have some problems with solving :) Can anyone please help or give me some advice where to start? Thank you!
We can represent every list of lambda expressions $x_0, x_1, ..., x_k$ with lambda expression $[x_0, x_1, ..., x_k]$ , defined as:
$[x_0, ... |
As I remember:
A decision problem is a problem that has the answer yes or no.
An algorithm (in the context of automata theory) answers yes or no; it halts on all inputs, accepted or not.
A TM represents an algorithm. The TM accepts an input string and executes with that input. If the machine ends up in an accept state... |
I'm looking for an algorithm to construct a grammar which, given a set of words which can have multiple identical symbols, represents a compressed version of this set, that is, I can generate only the words of the set but the grammar will take less memory than the set himself.
Besides, I'm looking for an algorithm whic... |
I have this problem, maybe anybody could help.
Given a graph $G = (V, E)$ and an integer $k \geq 1$, find the minimum number $l$ of vertices to remove to make the largest connected component of $G \setminus \{v_1, \dots,v_l\}$ have at most $k$ vertices.
I wonder it this problem can be solved quickly (in polynomial tim... |
Given a graph $G = (V, E)$, find $k$ vertices $\{v^*_1,\dots,v^*_k\}$, which removal would result in a graph with smallest largest component.
I assume for large $n = |V|$ and large $k$ the problem is difficult (NP-hard), but I am interested in small values of $k$ ($k \in \{1, 2, 3, 4\}$).
For $k = 1$, I think it is p... |
I am trying to understand how the Mersenne Twister random number generator works (in particular, the 32-bit TinyMT). I am still relatively new to the concept of RNG. As I read the source code, I noticed there were two ways to seed the MT: with a single integer seed or an array of integer seeds. What is the point in see... |
Is there a name for the DAG obtained from a directed graph by collapsing together the strongly connected components?
|
I pulled this right from Wikipedia to compare, staring with an SoC:
A system on a chip or system on chip (SoC or SOC) is an integrated circuit (IC) that integrates all components of a computer or other electronic system into a single chip.
And to compare, here's the microcontroller:
A microcontroller (sometimes abbr... |
I am confused by the definition of probabilistic checkable proofs.
Language $L$ has an $(r(n),q(n))$ - PCP verifier, if there is a PPA V satisfying:
Efficiency: $V$ uses at most $r(n)$ random coins and makes at most $q(n)$ nonadaptive queries to location of $\pi$.
Completeness: $x \in L, \exists \pi \in \{0,1\}^*, Pr[... |
Let S be a system whose state can be altered by performing actions. Each action has two possible outcomes, and each outcome brings to a specific system state. A state is never visited two times, i.e., the state graph is a DAG (a tree, more specifically, where the root corresponds to the initial system state and each ed... |
I've been trying to get my head around Expectation maximization algorithms, and I thought I'd start simple. I found this 3-coin example here: http://cs.dartmouth.edu/~cs104/CS104_11.04.22.pdf I understand the calculation of all of the probabilities but I don't understand how the recalculation of lambda, p1 and p2 is a... |
Is there any general technique for proving a problem NOT being NP-Complete?
I got this question on the exam that asked me to show whether some problem (see below) is NP-Complete. I could not think of any real solution, and just proved it was in P. Obviously this is not a real answer.
NP-Complete is defined as the set o... |
Should the independence assumption on which the Naive Bayes (NB) classifier is based, be taken into account when applying Expectation Maximization(EM) to infer missing values?
The Naive Bayes classifier assumes that all attributes are independent given the class variable.
Normally, the given structure of a Bayesian Ne... |
I have to find out whether the language $J_1=\{0^n1^n0^n \mid n \in \mathbb{N}\}$ and $J^{c}_{1}$ is recursively enumerable.
I already know that $J_1$ is RE, because I have found Turing machine which accepts $J_1$.
I would also like to prove this for $J^{c}_{1}$ by using the following theorem:
$J\in RE \wedge J^{c} \i... |
The knapsack problem is $O(c\,n)$ where $c$ is the capacity of knapsack and $n$ is the number of items. Yet it's exponential because the size of the input is $\log(c)$.
However, why don't we emphasize length of input in other algorithms? To name one example, what would be the input size $n$ and worst case time complexi... |
A parallel implementation of a computation is usually compared to a sequential version of the same computation. The ratio of the time taken by the sequential version to the time taken by the parallel version is called the speedup. So if 8 cores run their smaller parts of the computation in 2 time units, and one core ... |
When analysing treaps (or, equivalently, BSTs or Quicksort), it is not too hard to show that
$\qquad\displaystyle \mathbb{E}[d(k)] \in O(\log n)$
where $d(k)$ is the depth of the element with rank $k$ in the set of $n$ keys.
Intuitively, this seems to imply that also
$\qquad\displaystyle \mathbb{E}[h(T)] \in O(\log n)$... |
Let's say I am using Bloom filters to create a function to check if a word exists in a document or not. If I pick a hash function to fill out a bit bucket for all words in my document. Then if for a given number of words, wouldn't the whole bit bucket be all 1s? If so then checking for any word will return true? What ... |
This is a homework problem for a class that ended 2 years ago, I'm learning it by myself.
Consider a directed graph $D=(V,A)$, $s,t\in V$. $A=\{a_1,\ldots,a_n\}$. Let $P=\{p_1,\ldots,p_m\}$ be the set of all simple paths from $s$ to $t$, There is a capacity function $c:A\to \mathbb{R}^+$. First we are asked to express... |
I've been reading the excellent book Knowledge Representation and Reasoning by Ronald Brachman and Hector Levesque.
In the beginning of Section 3.2 "Vocabulary" of Chapter 3 "Expressing Knowledge" they state:
In creating a KB (Knowledge Base) it is a good idea to start with the set of domain-dependent predicates and f... |
I have 2 histograms that represent the height of characters in 2 images.
example:
1 **
2 ****
3 ****
.
.
.
100 ******
For these 2 histograms I compute the peaks. And To check if these 2 images are similar I compute the interseciton between the indices of the 2 images.
Example:
For image 1 the indices of the peaks a... |
Let $T$ be a depth-first search tree of a connected undirected graph $G$ and $h$ be the height of $T$. How do you show that $G$ has no more than $h \times |V|$ edges where $|V|$ is the number of vertices in $G$?
|
Most probably, this question is asked before. It's from CLRS (2nd Ed) problem 6.5-8 --
Give an $O(n \lg k)$ time algorithm to merge $k$ sorted lists into one sorted list, where $n$ is the total number of elements in all the input lists. (Hint: Use a min-heap for $k$-way merging.)
As there are $k$ sorted lists and to... |
I have been searching for long but unable to find a solution for this. My question is "Suppose you have n street lights(cannot be moved) and if you get any m from them then it should have atleast k working.Now in how many ways can this be done"
This seems to be a combination problem, but the problem here is "m" must be... |
I'm going to be involved with a sort of 'open day' at my university in a few weeks. As part of this time, I (along with a coworker) am being given a whole bunch of high-school level students for two hours, as well as a computer lab big enough to contain them all, and I have to do some kind of activity or set of activit... |
I am trying to solve a problem on Sphere Online Judge (SPOJ) link to which is: http://www.spoj.com/problems/TRANSP/
The matrix can be thought of as a permutation and its transposition as another permutation. I need to convert the first one into another. I have found a relation between the Cycles in the Permutation and ... |
I know that Hamiltonian cycle problem in $3$-regular triangle-free graphs is $NP$-complete. I would like to know how far we can stretch this result. Observing that a triangle is just $C_3$ cycle, what is the longest fixed-length cycle $C_g$ such that deciding the existence of Hamiltonian cycle in $3$-regular $C_g$-free... |
I met the problem
Show that the solution to $T(n) = 2T(\lfloor n/2\rfloor + 17) + n$ is $O(n \log n)$
while reading Introduction to Algorithm. It's a question about the substitution method for solving recurrences.
Should I just assume $T(n/2 + 17) \leq O((n/2 + 17) \log(n/2 + 17))$ and then prove $T(n) \leq O(n \log... |
I have a question whether or not CSS and HTML are regular languages.
I believe CSS is a regular language, since it should be possible to create a regular expression to match the structure of CSS.
However, I believe that HTML is not a regular language since you have nested attributes that could be defined recursively.
|
I am a CS undergraduate (but I don't know much about AI though, did not take any courses on it, and definitely nothing about NN until recently) who is about to do a school project in AI, so I pick a topics regarding grammar induction (of context-free language and perhaps some subset of context-sensitive language) using... |
I am a bit confused about calculating complexities.
Above is a C++ program converting a char array into an int, incrementing the value, parsing it back to char array.
#include <iostream>
int main() {
char number[] = {'4', '3', '1'};
int num = 0;
//char to int conversion
for (int i = 0; i < (int)siz... |
Is it possible, in general, to determine whether two regular expressions admit the same set of strings?
Also, in particular, is it possible to determine whether a given regular expression admits the same set of strings as the regular expression ".*" (i.e., accepts anything).
|
When two threads try to access the same resources at exactly the same time how does the computer decide which one gets the resource, or is it just decided at random?
|
Suppose that $S \in PCP(r(n),q(n))$, colclude that $S \in NTIME(2^r \cdot poly) \cap DTIME(2^{2^r q+r} \cdot poly)$
The idea of a nondeterminstic simulation of the $V$ on input $x$ is simple, guess a proof, check every string $y$ of the length $2^r$, and this simulation should take nondeterministic time $2^r \cdot poly... |
I'm working on old multiple choice exams and would like to know if the following statements are true or false:
a) $L_1 \le_p L_2 \le_p L_3 \Rightarrow L_1 \le_p L_3$
b) If $L \in \mathsf{NP}$ and $U \le_p L$ holds for all languages $U \in \mathsf{PSPACE}$ then $\mathsf{NP} = \mathsf{PSPACE}$
c) $L \in P \Leftrightarrow... |
I've read that quantum computers can solve 'certain problems' exponentially better than classical computers. As I think I understand it, it's NOT the same to say that quantum computers take any problems that are EXPTIME-complete, 2-EXPTIME,... and convert them to linear time or constant-time.
I would like to know some... |
Consider the $n$-fold integral
$$
J = \int_{\theta_1 \in I_1, \theta_2 \in I_2 \ldots, \theta_n \in I_n} d\theta_n\ldots d\theta_2 d\theta_1
$$
whose intervals are defined by
$$
\begin{align}
I_1 = [0,1] \\
I_i = [\max(c_i,\theta_{i-1}),1] , 2\leq i\leq n
\end{align}
$$
and the $c_i \in [0,1]$ are predefined ration... |
The main question is, how exactly is the big O analysis calculated on routines? Is there a specific formula that relates what each function in a program does to a big O calculation?
Also, what about more complex iterations, such as colour conversions etc?
I would like to point out that this is not a homework question, ... |
I am trying to implement and optimize the Tiny Mersenne Twister (TinyMT) algorithm as required by an API I am developing with my team at work. The algorithm utilizes a C structure with 32-bit unsigned integers "mat1", "mat2", "tmat", and an array called "status" which is four 32-bit unsigned integers wide.
I am relativ... |
This is a question I found in a practice exam while I am preparing for my mid term exam.
The answer needs justification, either a pseudo code or a logical explanation why not.
What puzzled me about that question is that we already know that all LOOP programs terminate at some point, the question seems odd to me.
Any re... |
Given $m,n\in\mathbb{N}$, finite alphabet $A=\{a,b,c\}$, and $L=\{(a^m,a^n)\}^*=\{(a^{mk},a^{nk})|k∈N\}\subseteq A^*\times A^*$.
Is this binary language $L$ regular over $A(2,\$)$ (i.e. $\{A∪\{\$\}\}\times \{A∪\{\$\}\}\setminus \{\$,\$\}$)?
For example, is this binary language $L=\{(a^3,a^7)\}^*=\{(a^{3k},a^{7k})|k∈N... |
The PCP theorem implies (with other results) that there is no polynomial time algorithm for MAX 3SAT to find an assignment satisfying $7/8+ \epsilon$ clauses of a satisfiable 3SAT formula unless $P = NP$.
There is a trivial polynomial time algorithm that satisfies $7/8$ of the clauses. How hard is it to find an assignm... |
If I am right students learning computer science at universities learn very theoretical kind of knowledge. A knowledge most of which (e.g. algorithm theory) can't be used to create everyday software (e.g. MS Word, IE, etc.).
What opportunities do computer science graduates have if they don't want to do research but ra... |
I am having some issues proving a problem I am working on. I have been sketching out examples but the proof is not jumping out at me.
Question:
Let $G = (V,E)$ be an undirected $r$-regular graph (that is each vertex has a degree of $r$) for some $0 < r < n$, where $|V| = n > 1$. Prove that either $G$ or its complement ... |
Solve this problem: "build an infinite binary oscilator"
With a Turing Machine we can solve it
a=False
While True:
a=not a
print a,
then output will be
True False True False True False ...
(for ever)
I think an oracle can't do it, because its definition, it could solve in "one operation", but here there's not h... |
I'm writing deduplication program that implements content-defined chunking. Just now i know 3 algorithms to do it (hashing a fixed-size window and selecting hashes < maxuint/N, hashing an order-1 bounded window, and local maxima chunking). Are you know other algorithms or ideas to improve these ones? My goal is to get ... |
I'm currently doing some research on operations on languages, specifically prefix, suffix, infix and outfix.
For example, for a language $L$, the prefix set of $L$ is:
$pref(L) = \{x \mid xy \in L, y \in \Sigma^* \}$
Infix is
$inf(L) = \{w \mid xwy \in L, x,y \in \Sigma^* \}$
and outfix is:
$outf(L) = \{xy \mid xwy \i... |
I was admiring this rendition of the Mona Lisa from quasimondo's Flickr account. He says:
Combining circle packing with data visualization. The pie charts show
the distribution of the dominant colors under the circle area.
The circle packing technique used here is a combination of an image
segmentation with a dis... |
I'm interested to see if I can use machine learning/network analysis methods to automatically detect automatically generated (spam) webpages. I'm particularly interested in webpages that look structurally like a non-spam website, but on closer inspection are total rubbish.
If I want to test a method, I'd need some way... |
In Type Theory if one allows Type to be a member of itself, it makes the theory inconsistent. I understand it by analogy to Russel's paradox in Set Theory, but would prefer to see it done in Type Theory. Is there a short example of the equivalent in Type Theory?
|
This seems like a question that should have an easy answer, but I don't have a definitive one:
If I have two $n$ bit numbers $a, p$, what is the complexity of
computing $a\bmod p$ ?
Merely dividing $a$ by $p$ would take time $O(M(n))$ where $M(n)$ is the complexity of multiplication. But can $\bmod$ be performed s... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.