instruction
stringlengths
35
29.1k
Assume we have some statement called $\alpha$. We will define a new statement $P(\alpha):="(\alpha\text{ can be proved})\lor(\lnot\alpha \text{ can be proved})"$ I claim that $P(P(\alpha))$ is always correct (that is, we can always prove\disprove whether a statement can be proved or not). The following is a "proof" for...
I have a directed multigraph (a multigraph is a graph that can have more than one edge between any two nodes). In Wikipedia's terminology, this is a directed multigraph (edges without own identity). I want to find its longest directed trails (a directed trail is a directed walk in which all edges are distinct). I.e., I...
I am looking at register machines like the Random Access Machine. Wikipedia says: Random-access machine (RAM) – a counter machine with indirect addressing and, usually, an augmented instruction set. Instructions are in the finite state machine in the manner of the Harvard architecture. Does this mean the instructions...
I’m a self-taught software engineer who’s been working in industry for 12 years. I don’t have any formal education in CS and math was never my strong suit (although I’m willing to do the work to make it my strong suit!), but when I first started learning how to program I went through some basic courses offered by Stanf...
It is known that there is a $748$-state Turing machine that halts if and only if $\mathsf{ZF}$ is inconsistent. So by Gödel's second incompleteness, $\mathsf{ZF}$ cannot find what $S(748)$ exactly is, where $S$ is the maximum shifts function (Also known as the "Frantic Frog"). I'm rather confused by this fact. As $S$ i...
I'm working with squared matrices that can be quite large, for instance, a M = 50 x 50 matrix. My objective is to compute the power of the squared matrix M^t for very large t values (for example t = 4000). I work in R and I have used the R function matrix.power from the matrixcalc R package. I'm exploring the possibili...
How can I quickly judge whether matrix A is the inverse matrix of B? This is an exercise for the course I take. This question is given in the section of randomized algorithms. So I think its solution may be related to randomized algorithms.
I am wondering whether the language $$L_{\textrm{hanoi}} = \{\langle k,s \rangle \mid \text{$s$ is a solution of Tower of Hanoi problem on $k$ rings}\}$$ is in $R\setminus \mathit{NP}$. I want to claim that there is a Turing machine that solves the problem, therefore, $L_{\mathrm{hanoi}} \in R$, but given a solution to...
I don't 100% understand this. But I have a entailment, and I want to prove whether it is satisfiable or not, and I will do this using resolution and variable elimination. Here is the formula: $$ (x_1 \lor x_2 \lor x_6) \land (\lnot x_1 \lor x_3 \lor x_8) \land (\lnot x_2 \lor \lnot x_3 \lor x_4) \land \\ (\lnot x_4 \lo...
Consider the following setting. You have $n$ cities, and there is a cost to travel from a city $i$ to a city $j$ given by $c_{ij}>0$ where $c_{ij}\neq c_{ji}$. Moreover, if you are traveling to city $i$, you are allowed to stay exactly $d_i>0$ days. The problem is: Find a travel schedule, this is: a number $m$ and a se...
I know the basic definition between parallelism and concurrency. But there is not much information about concurrency in multiple core. what is the difference between concurrency in single-core vs concurrency in multiple-core? Is there much difference performance-wise between concurrency in multiple core vs parallelism ...
I have to show that the language $ \mathcal {L} = \{a ^ k b ^ {2k} a ^ k: k \geq 0 \} $ is not a regular language. So that's what I want to use the pumping motto for. What I could do is this: let $ \ sigma = a^Nb^{2N}a^N $, where $| \sigma | = 4N \geq N $, fulfilling that $ \alpha \beta^k \gamma$. But at the moment of ...
I'm working on a project where I need to create search functionality that can efficiently search a list of data structures like: json1 = [ { "name": "bob", "age": 55, "active": false, "location": { "state": "FF", "country": "NZ" } {, { "name": "susan", "age": 30, "activ...
I am trying to prove the above statement. A DeMorgan circuit is a circuit that has only $\{ \wedge, \vee, \neg \}$ gates, and the negation is applied only to input variables. So, assuming we have a circuit of size $s$ that computes a function $f: \{0,1\}^n \rightarrow \{0,1\}$. The basis for this circuit is $\{\wedge, ...
I was wondering if there is any formal, general way to prove the correctness of a candidate solution to the critical section problem in synchronization. For example, in the image enclosed, I have considered the Petersons solution to the critical section problem(reference: operating system concepts by Gagne) The exampl...
Consider sequences $p=(p_1,\dots,p_N)$ (the order matters) of length $N$, where $p_i\in\{1,\dots,D\}$ for fixed $D$. Moreover, consider a cost function $c:\{1,\dots,D\}^N\to\mathbb{R}$ which comply $c(q)\neq c(p), \forall p,q\in\{1,\dots,D\}^N$ with $p\neq q$. The problem is to find $p\in\{1,\dots,D\}^N$ with least cos...
I am trying to enumerate and display all possible divisions of an n-polygon into (n-2) triangles (as in the following mathworld picture) I know how to count how many divisions (Catalan numbers, 1, 2, 5, 14, 42, ... ), but I am struggling to find a way to generate all the C(n-2) triangulations. Can anyone point to exis...
I am so confused between concurrency vs parallelism in multi-core processors. If a concurrent process has many threads and if the processor is multi-core then can each thread run on multiple cores? If the answer is YES then multiple threads are running in parallel but the process is concurrent. How is it possible and w...
Suppose we have N natural numbers in a queue. ex queue = [3, 14, 1, 20] and an empty stack We are allowed to make only two actions: Action "x": Dequeue an element from the queue and push it to the stack. Action "o": Pop an element from the stack and enqueue it in the queue. In the above example, the following actions...
Context Let's say I have a finite set of points of size $N$. I can represent the points in a metric space and then compute distances between them. My goal is to replace a point in the set with another one (let's say a completely random point), only if the new point maximum distance is better than a set's point maximum ...
Given a set of elements {e1, e2, ... en}, a set of pairs of these elements (each element may be present in several pairs) and a number k. I need to count how many combinations of size k exist which not include any pair? For example: if there only one pair {e1, e2} result in number of all combinations without elements e...
I have to show that a PDA accepts empty language, but for this I have to use some algorithm, with what kind of algorithms could I demonstrate it? I've heard about the algorithm from Moore, Brzozowski or Thompson, but they are for DFA, so I don't know if it would work.
I recently decided to review the B-tree chapter (chapter 18, p 486 in 3ed) in Introduction Algorithms, and found that they call pages what I always referred to as blocks or clusters: In order to amortize the time spent waiting for mechanical movements, disks access not just one item but several at a time. Information ...
How to get the expected time complexity of while loop below? While infinity: case1: Return 0 with a probability of p(1 - p) case2: Return 1 with a probability of p(1 - p) case3: otherwise repeat this loop until return 0 or 1 I can understand the probability that this loop runs only one time is $2p(1 - p)$. But I...
Just trying to solve the second part of a question with two parts. First part was to prove that you can't add decrement method to a standart binary counter without hurting the amortized complexity and change it to be more than O(1). This part i have done with no problems. Solution in a nutshell - after some method you ...
What is the advantage of probability algorithm? e.g. Las Vegas. I would also like to know some applications of the randomized algorithms. Are there any recommendable courses or books?
I have to form a free context grammar for this language $w^{m-1}aca^m$ where $w \in \{a,b\}$, so what I have been able to do is this: $X \rightarrow SacA$ $S \rightarrow aS|bS$ $A \rightarrow aA$ But I don't know how to do it or if possible, condition the exponents as long as $ S $ is repeated $ m-1 $ times, and $ A $,...
I am not a formal student for CS nor have I ever been, I just want to understand something simple about your field for general knowledge, in plea. Turing, RAM, or Von Neumann --- which theory/model is consensually accepted to describe how "generally every computer works" (among computer scientists)?
I am trying to work out the time complexity of my function but I'm not sure how it works with powers. I've got $y=(\frac{x}{3})^n$ as one of my lines. How many basic operations is this? Would it be $2(n-1)$ for the power then $1$ for the division and $1$ for the assignment of $y$? Also, is the square root of a number j...
Wordsense.eu gives a definition of epilogue as (computing) A component of a computer program that prepares the computer to return from a routine. I’d like to know more & haven’t been able to successfully search for info. Could anyone point me to a source / share their knowledge?
I am not in the computer science field and was looking for some guidance on books/papers/programs that allow me to learn how to design algorithms for problems that involve very large number of calculations and search in very large datasets. Texts that have advanced mathematics is not an issue. I am just looking for som...
As shown above, several NP-Complete problems are derived from GSAT (general satisfiability problem) by a polynomial-time reduction. Then, my question is that is every pair of NP-Complete problems reduced in polynomial time? In other words, I think that the above graph should be represented as a complete graph by the d...
I wanna know if $X'(X+Y)$ means $X'.X+Y.X'$? Does it have an AND gate after $X'$? Notation: $X'$ : NOT $X$ $X + Y$: $X$ OR $Y$ (OR gate) $X.Y$ : $X$ AND $Y$ (AND gate) New to boolean, can't seem to understand this question.
I've been stuck on this problem for some time now.. Given an array A of size N that ranges between [1..N], a "move" is to increase or decrease an element (by 1). After each move the array must remain within [1..N] I need to find the minimum number of move operations to make the array pairwise distinct.
Tangled cable: Let's have a long cable, from both ends of which protrudes n wires. Each wire at the left end is connected to just one at the other end and we want to find out which one. To do this, we can use the following operations: (1) apply voltage to a given wire at the left end, (2) disconnect voltage from a give...
I was reading Professor Knuth's Volume 2 (page 136) about generating a geometrically distributed random variable $N$ (with $p$ as the probability of success). Basically, the idea is to generate a uniformly distributed random variable $U$ in $[0,1]$. Then, we can apply a simple formula $N = \left\lceil\frac{\ln(U)}{\ln(...
We define language substitution for a Context-Sensitive Language (CSL) $S$ over an alphabet $\Sigma$ is a map from $\Sigma$ into CSL's, for example: $f(abc) = L_1(a) L_2(b) L_3(c)$ such that (I guess) the union of all $L(s)$ for $s \in f(S)$ is defined to be $L(f(S))$ and $L(f(S))$ is known to be a CSL itself. That is ...
Let $L_1$ be a non-regular CFL. Let $L_2$ be a regular language. Assume that $\left(L_1\right)^{*} \subseteq L_2$. I'm looking at $L_3 = \left( L_1 \right) ^{*} \circ \overline{L_2}$. Is $L_3$ always non-regular? I can find multiple examples of it being non-regular, yet none of it being regular. Edit: $\overline{L_2} \...
The first step of Johnson's algorithm is the creation of a new vertex s which has an edge to every other vertex with a weight of 0. Then I perform only one iteration of the Bellman-Ford algorithm on this new graph and with this one iteration, you can see if there are negative cycles in this graph. But why is that? When...
Consider the sampling algorithm as described here section 2.2 specifically Algorithm 2.4. Essentially we are given a stream of $N$ elements and wish to maintain a uniformly random sample, $S$, of size $k$. Initially we put $k$ elements into $S$ and then for each iteration, $i \in [k+1, N]$ we choose a random number $x ...
There are many reasons why numbers larger than 64 bits must be computed. For example, cryptographic algorithms usually have to perform operations on numbers that are 256 bits or even larger in some cases. However, the programming languages that I use can only handle at maximum, 64 bit integers, so how do computers perf...
I saw this algorithm question which is as below. There is a server that receives request Ids that are positive integers. The High Water Mark (HWM) for the server at any instant of time is defined as the highest integer request Id n such that every positive integer request Id less than n has already been received. For e...
Given the image attached, I am looking for a way/strategy/pseudocode to iteratively find each polygon created either by two blue-dotted line segments, a blue-dotted line segment and an intersection, or two intersections. I have an ordered list of line segments for each line, an ordered list of blue-dotted line segments...
In section 3.5.4 , i saw this block: (define (integral delayed-integrand initial-value dt) (define int (cons-stream initial-value (let ((integrand (force delayed-integrand))) (add-streams (scale-stream integrand dt) int)))) int) Normally if this was something...
I was going through the "write-ahead logging (WAL) rule" from the Database System Concepts text by Korth et. al, where I came across the following excerpt: Strictly speaking, the WAL rule requires only that the undo information in the log have been output to stable storage, and permits the redo information to be writt...
I was going through the concept of database buffering from the Database System Concepts text by Korth et. al where I came across the excerpt below. The rules for the output of log records limit the freedom of the system to output blocks of data. If the input of block $B_2$ causes block $B_1$ to be chosen for output, a...
As I did not find any definition of the term "appearance checking" although it is widely used, I am eager to ask as what it can be defined. Perfect would be an example using a context free grammar.
Show that every Deterministic context free grammar is an unambiguous context free grammar How can I show this ? can anyone give a proof?
I've got the next problem, where I have two, instead of one, knapsacks. Formally, we have items $1, \ldots , n$ and each item $i$ has a positive integer weight $w_i \in \mathbb{N}$ and a positive value $v_i > 0$. Further, we have two knapsacks of capacities $W_1$ and $W_2$. We need to pack the items into the knapsacks ...
We use notation A determines BC in a database for functional dependency. Same way we use equations in mathematics which shows dependency of variables. We have inference rules in logics, functions in mathematics, set theoritic notations and functional dependency in DBMS. We have relational algebra, tuple calculus. We u...
I’m looking for a data structure that supports that store the salaries of it’s employees. Insert(e) – Insert employee e into the data structure. AvgDecile(k) – Returns the average salary of the k’th decile. MedianDecile(k) – Returns the median of the k’th decile of the salaries. The ten deciles of a data set divide it...
Do all covariant type constructors (using scala notation) F[+A] form a functor? If so, is there a proof of that? If not, what is a counterexample? The related Are there any type constructors which are *not* functors? is about all type constructors, not just covariant ones.
I have $N$ available sensors and $M$ devices. Each device needs $a$ sensors. One sensor cannot be used on multiple devices. Each sensor has two properties defined by $H$ and $R$. Let $\sigma_{i\_H}$ be the standard deviation of property $H$ for sensors on device $i$. Similarly, $\sigma_{i\_R}$ is the standard deviation...
I have this question: prove that the problem of testing whether a Context free grammar generates some string in $1^*$ is decidable. I know one way to prove it. But I saw a different way of its proof which says that- Convert the context free grammar to chomsky normal form. Then compute all derivations of length less th...
I am taking an intermmediate course related to programming and analysis of system. I have a teacher that give us two tasks during the semester that are somewhat beyound the purpose of the course that is more toward the basics. The tasks that I am asked is "Dissert about the analysis of complexity of algorithm. In...
Could an application be built such that it could track a user's actions on a particular software and log them? For example, could an application track a user's actions on MS Word, noting down when the user clicked a particular button? The question is asked assuming, our application has no access to the code of the 3rd ...
From a complete random graph (ER graph) after deleting an edge randomly with some probability (p) in each step how many edge deletion occurs to make the graph disconnected or break the giant component? What will be the value of p to make minimum no. of edge deletion? Can we delay this phase transition by varying the va...
"A string is a subsequence of a given string, that is generated by deleting some(possibly zero) character of a given string without changing its order." Suppose we have string s="aabca" and k=3. ( I will refer the three as as a1,a2 and a3 just to distinguish them). So number of subsequence with 3 distinct characters ar...
long shot question but I am super stuck. Donald Knuth has proven (p. 8 here, equation 12) that the probability that the maximum value in uniform hashing is smaller than $n/2$ is equal to 0.288. I wonder if with this information I can recover what is the expectation of the maximum value? Simulation strongly suggest 0.63...
With a CRCW (Concurrent Read, Concurrent Write) PRAM model, it is possible to find the maximum in an array containing $n$ elements with $n$ processors in $O(\log \log n)$ time. The algorithm is: If $n = O(1)$, solve the problem trivially; Split the array into $\sqrt n$ parts of equal sizes. Give each part $\sqrt n$ p...
We have the following task: Take as input a finite set of string pairs. Each pair represents a substitution. Replace exactly one instance of the left with the right. A substitution can only be performed on x if the left is a substring of x. For example $01\rightarrow 10$ means replace one 01 with 10, and can only...
Given grammar $$L(G) = \{ 0^n1^m | n \ge m + 2 \}$$ What is the grammar for this? I know the grammar for the following language: $$ L(A) = \{ 0^n1^m | n = m + 2 \} $$ We can divide any string in $L(A)$ in the following substrings: prefix $00$ the suffix $0^n1^n$ hence one of the grammars is : $$S \rightarrow 00A \\ A ...
After searching the internet for a bit, I found that the same proof came up over and over again. The thing is, it seems like the proof is incomplete. Here's the proof: However, the recursive languages are not closed under homomorphism. To see why, consider the particular language L consisting of strings of the form (M...
I'm currently working on problem in which a set of graphs $T=\{t_1,\dots,t_n\}$ is given and fixed. Given a graph $m$ I want to check which of the $t_i$ are subgraphs of it, as quick as possible. Is there any way to organize the graphs in $T$ beforehand to speed up this procedure? I found that using a substructure scre...
I'm studying for a computer vision module and I'm on the deep learning topic, in one past paper we have the following question: Given that a convolutional neural network has five convolution layers (all the convolution layers are composed of 3×3 convolution filters with stride 1 and no pooling layers), calculate how ma...
I know that in the Internet layer, the source ip and mac address and destination ip and mac address are added to the header. Is this the ip and mac address of the next router we take to get to the end router or just the ip and mac address of the computer we are sending the data too.
Let $T$ be an arbitrary data structure for a dynamic set. For every state T of $T$, let $d_t \in \mathbb{N}$. Observe two Operations $O_1, O_2$ on $T$ whose runtimes are proportional to $d_t$ and $O_1$ does not change the structure of $T$. Let $f\colon \mathbb{N} \mapsto \mathbb{N} $. Suppose there exists a potential ...
I am trying to find an efficient algorithm for the following problem: Input: weighted directed graph G=(V, E) in which all edges are weigthed either 1 or 2 s,t ∈ V n ∈ N Output shortest path from s to t that contains exactly n edges of weight 2 I have been experimenting with different modifications of Bellman-Ford,...
I've been tasked with figuring out the best way to implement record linkage between multiple data sources. My suspicion is that supervised approaches will increase accuracy over unsupervised approaches as long as we are willing to do a clerical review to create a training data set that is large enough to be representat...
in the base case of the inductive definition of the operations of the relational algebra there is also the so called "constant relation" (as for example found in the definition here https://www2.cs.sfu.ca/CourseCentral/354/zaiane/material/notes/Chapter3/node9.html). However, until now I have not understood the followin...
In Types and Programming Language's constraint typing rules (Figure 22-1), is it possible for any part of the typing derivation to contain free type variables that aren’t part of the fresh variables? Because the typing rules are based on the simply-typed lambda calculus with an infinite number of base types, a naïve re...
I try to delete a node, $z$, with 2 children in binary search tree by exchanging $z$'s right child and $z$'s predecessor, $y$, right child, which is NULL because $y$ has no right child, if it had then that child would have been the predecessor. Now $z$ has only 1 child and can be removed in the same way a node with 1 c...
If $A \le_p B$ and $B\in NP$, does it necessarily follow that $A\in NP$? ($\le_p$ is a polynomial many-one reduction) A quick yes/no comment is enough, a proof would be nice :-)
In a splay tree, doing $m$ sequential search operations for the same key that is in the tree has a time complexity in $O(n+m)$ where n is the number of nodes in the tree. Since the first search has a worst-case complexity of $O(n)$ and afterwards the node we're looking for is the new root, so further search operations ...
L = {0^p |p is a prime}. So was looking at the explanation at the bottom of page 5 of the following website: https://www.ics.uci.edu/~goodrich/teach/cs162/hw/HW5Sols.pdf I want to make sure that I understand every component of the problem. Why do they choose at least n + 2 when deciding k? Does the statement |vx| = m...
We define a new model: A "100-PDA" is a pushdown automaton with at most 100 states and with at most 100 symbols in the stack alphabet. Prove or disprove the following statement: "There exist infinitely many context-free languages on the alphabet {a,b} which cannot be recognized by any 100-PDA." I haven't been able to c...
Let $C$ be an uniform complexity class for example $NL$ or $NP$. Is there distinction between $(C/poly)\cap(coC/poly)$ and $(C\cap coC)/poly$?
hello I have written the sequence of configurations for the following Turing machine for input 00 but my answer has been marked wrong and I'm not sure where I have gone wrong I have fried it 3 times. this is the turning machine
I am trying to convert the following CFG to CNF: S -> ABS | ε A -> BSBa | a B -> Ba | a The finally result looks like this: S -> AS’ | AB S’ -> BS A -> S’B’ |BB’ | X B’ -> BX X -> a Y -> b B -> BX | XY I am fairly new to chomsky normal form, so can anyone verify that I did this right? Thank you in advance!
Let $P$ be a polygon. For each point $x$ on the boundary of $P$, denote by $N_P(x)$ the set of points in $P$, that are nearer to $x$ than to any other point on the boundary of $P$. Given a subset $X$ of the boundary (e.g. an interval contained in one of the sides of $P$), what is an algorithm for computing $N_P(X)$? He...
Given alphabet $\{0,1\}$, we want to uniformly sample $x,y \in \{0,1\}^n$ such that $ed(x,y)=k$, where $ed$ denotes the Levenstein distance, i.e., the minimum number of edit operations (insert, delete, substitute) that can transform $x$ to $y$. Clearly, this can be done by brute force over all pairs of strings, which i...
$$ L=\{a^ib^jc^k \;| \;i, j, k \in \mathbb{N} \; \text{and} \; i <k<j\} $$ I need to show that this language is not context-free with the help of the Pumping Lemma. My first intuition is, that there exist 5 different cases, i.e. the middle part, let's call it vwx, consists of only $a$'s only $b$'s only $c$'s $a$'s and...
Hopefully, this question is fine. I'm referring to the NP-complete problems regarding hamiltonian graphs. I suppose the C in HC is from Cycle or Circuit. It seems like Circuit is more popular. HL (called HAMPATH sometimes) is a bit more difficult. HL deals with hamiltonian paths (HP is already in use, of course). My b...
The question says: Design a sequence detector that searches for a series of binary inputs to satisfy the pattern 01[0*]1, where [0*] is any number of consecutive zeroes. The output (Z) should become true every time the sequence is found. The answer to this example in the document I am reading is this: My question is...
That the presence of voltage across a switch encodes 12 is purely arbitrary... Jeff Duntemann's book mentions: We could as well have said that the lack of voltage indicates a binary 1 and vice versa (and computers have been built this way for obscure reasons) I find this (italicized part) interesting. It would be gre...
This video shows a grid maze with a type of tile that I'd call turnstiles. The mechanics of those tiles are described below. A turnstile tile has two bars on adjacent sides of the tile. You cannot step into a turnstile tile if it would mean crossing a bar. You can exit a turnstile tile in any direction. If you exit th...
I have implemented Suurballe's and Bhandari's algorithms into a project I am currently doing based on this: http://www.macfreek.nl/memory/Disjoint_Path_Finding And it seems to work really well. However, what I am doing now is having a start and end node, from which the disjoint paths are calculated. The extension is, t...
We are given an array of $n$ Strings with total Length $K$, and we are asked to find an alphabetical order (if one exists) with respect to which the array become lexicographically sorted. The time complexity should be $O(K)$. I think we should use some data structure like a trie, but I can't find a way to solve the pro...
Let us consider a Directed Acyclic Graph $G(V,E)$ such that all edges have unit weight. Let $s$ be a source node, $s\in V$ and a set of destination nodes, $D\in V\backslash s$. My problem is to find a node $d\in D$ such that $d$ has a path of unique length $l>0$ from source node, $s$ to destination node, $d$ (i.e no ot...
Given two integer arrays a and b and a map m which for each element e of the array a returns an array p of possible mappings, map every e of a to an element k of b so that m[e] contains k, no element of a or b is mapped twice and the number of non-mapped integers in a is minimal. Note that both a and b may have repetit...
Check whether the following language is context-free. If yes, a suitable grammar should be given; if no, the pumping lemma should be used as a tool. $$L=\{a^ib^jc^k \mid i, j, k \in N \text{ and } i <k<j\} $$ Can I choose (since N includes 0) $$ L=\{b^jc^k \mid j,k >= 1 \text{ and } j > k\} $$ and provide a grammar for...
The Wikipedia page for strong and weak typing says: "Strong typing" generally refers to use of programming language types in order to both capture invariants of the code What is "invariants of the code"? There is no link for that
I am struggling to wrap my head around using $\Omega$-notation to describe worst-case running time of an algorithm, or $O$-notation to describe the best-case running time. Specifically, I struggle to understand how a given function $f(n)$ can have a worst-case lower-bound of $\Omega(g(n))$ without also having $O(g(n))$...
Swarm intelligence and Multiagent systems are both a part of Distributed AI. Multiagent systems describe a system with agents, which communicate with each other. Swarm intelligence describes systems, which coordinate through decentralized control and self-organization. However, I am unable to name an example for a Mult...
I am new in complexity theory and I am trying as part of an assignment to prove or disprove this. I am thinking this is a true statement but I am not sure how to prove or disprove it or what the implications of $NP \neq coNP$ are to randomized complexity classes.
Is it true that if $S\in\left(NP\bigcup coNP\right)$ then $\overline{S}\in NP\bigcap coNP$? I couldn't find any answer to that question. My attempt at proving it: If $S\in\left(NP\bigcup coNP\right)$, then, by set theory, $S=A\bigcup B$ for some $A\in NP\wedge B\in coNP$. Therefore the complement of $S$ is $\overline{S...
A key breakthrough is that the author of the best selling book on the theory of computation MIT professor Michael Sipser has agreed that the following verbatim paragraph is correct: If simulating halt decider H correctly simulates its input D until H correctly determines that its simulated D would never stop running u...
You are given a list of days numbered 0 to 365 in the calendar year where you need to be in a hotel. You need to book in advance for the year and need not necessarily be there when you have a booking. You can also book only in fixed intervals of 1, 7, 15, or 30 days. You have to be find the minimum cost of booking to s...
A proper prefix of a string $s$ that is also equal to a suffix of $s$ is called a PS (prefix-suffix). Given a string $s$ of length $n$ is there an algorithm listing the lengths of all the PSs in $O(n^{1+\epsilon})$ time? KMP can find the longest PS in linear time. Then we can note that the second longest PS is the long...
I'm looking for some problems that have higher degree of unsolvalbilty in term of arithmetical hierarchy that requires more than 2 quantifiers like $\Pi^0_3$ ,$\Pi^0_4$ etc.