instruction
stringlengths
35
29.1k
Do any streaming hash functions exist that provide the same result if the input is reversed? That is to say, is there some hash function, $h$, such that: $$ h(h(h(h(0, x_1), x_2), ...), x_n) = h(h(h(h(0, x_n), ...), x_2), x_1) $$ If this is impossible, why is it impossible? I am interested in sending packets of constan...
I have been trying to solve the following problem. I have n intervals each with a cost.I want to choose a subset of the intervals that maximizes the cost but with the following constraint. Each interval when chosen uses one resource from a limited amount say k and when it finishes releases the resource to be used by an...
Consider the language $L = \{\langle M_1,\ M_2 \rangle \mid \exists x : x \in L(M_1) \cap L(M_2)\}$. Show that $L$ is not decidable. I'm attempting a proof by contradiction but I'm having trouble with the Turing machine part.
From the book "Fabric of reality" by David Deutsch. We know from quantum theory that all such variables are quantized, and therefore that, no matter how the computer works, the set of possible programs is discrete. Each program can therefore be expressed as a finite sequence of symbols in a discrete code or computer l...
(This is a somewhat fuzzy question.) I believe that most of the "standard" complexity classes that one comes across in complexity theory are countably infinite, because they are defined in terms of decision problems that can be solved by Turing machines with certain prescribed capabilities, and the set of Turing machin...
This is algorithms and data structures assignment and I have been thinking 3 days about it. You are given N sections, placed on numeric axis. Numeric axis is divided by unit intervals. Each section in described by two integers - coordinates of left and right endpoints and it covers corresponding number of intervals. Fr...
I know that if decidability of $A \cap B$ and $A \cup B$ doesn’t guarantee the decidability of any of $A$ or $B$. We can prove that: ATM is not decidable. Since decidable languages are closed under complementation, ATM' is also not decidable. But $\textrm{ATM} \cup \textrm{ATM}' = \Sigma^*$ and $\textrm{ATM} \cap \text...
A register in a CPU can be much more well utilized if it could be divided and its parts can be used independently. For example, if you need 8 8-bit values, you could just use a single 64-bit register, and each 8-bit segment could be treated independently of one another. But the way CPUs are designed, using 8 64-bit reg...
I'm not sure how to solve this problem. Problem statement is: Consider the binary classification problem where X = R d and Y = {0, 1}. Consider the class of Binary classifiers given by intersection of three half-spaces. Show that proper learning w.r.t. this class of intersection of three half-spaces (the class F) is co...
To prove the that the halting problem is undecidable I was provided with 5 lemmas. I understood each Lemma individually and also the proof itself. What I'm confused about is that one of the Lemmas seem like it didnt contribute to the proof at all. If someone could tell me if I have missed the importance of the Lemma th...
I need help with this is possible. Could someone who has a good understanding of Linux and Windows explain how they differ in file implementation foxuing on low level end? There isn't a huge amount of literature on this, thanks.
I am reading a paper (link) in which an algorithm proposes a solution $\hat{\mathbf x}^{(t)}$ in each iteration $t = 1, \dots, T$, and each time, learns the true solution $\mathbf x^{(t)}$, so we learn whether the algorithm made a mistake, i.e. $\hat{\mathbf x}^{(t)} \neq \mathbf x^{(t)}$. In Theorem 9, we learn that t...
I have a large set $\mathbf{V}$ of vectors in $\mathbb{R}^d\setminus\{\mathbf{0}\}$ and need to find a vector $\mathbf{u}$ that maximizes $\sum_{\mathbf{v}\in\mathbf{V}}\mathbf{1}_{\mathbf{u}\cdot\mathbf{v}>0}$, which is to say the count of vectors in $\mathbf{V}$ that have a positive dot product with $\mathbf{u}$. Alt...
The Wikipedia page about interpreters mentions the following three strategies Parse the source code and perform its behavior directly Translate source code into some efficient intermediate representation or object code and immediately execute that Explicitly execute stored precompiled bytecode made by a compiler and ...
We know Insertion Sort would be faster than Merge Sort and Quick Sort for nearly sorted data. What about Binary Insertion Sort? At what case is it better than Insertion Sort? Also, is there a better solution than Binary Insertion Sort, for the problem is solves better than Insertion Sort?
The program is designed to start with values for $x$ and $y$. The variables $u1$​ and $u2$​ are intended to represent $x$ and $y$ in ascending order. Provide suitable preconditions and postconditions for the program. Then, using Hoare logic, prove the correctness of the program. Specify all proof obligations and justi...
I am trying to understand how the algorithm used by Flex works. I refer to the determinization procedure producing the output DFA. The algorithm is publicly available and contained in Flex's source code (dfa.c:345). However, I am experiencing several difficulties making out the idea behind it: this is mostly due to the...
I have a computer science problem that seems relatively simple. We are given a number of 2D rectangles that we want to place next to each other on a 1D line (without rotating them). The 1D line has a certain finite length. The rectangles width is randomly and uniformly distributed between 0.1 - 10 units. The height is...
How do I calculate the complexity of this Algorithm below? I would like to know how I calculate the sums that form to obtain a formula as a function of n? I know that in general this algorithm has O(n^3) complexity, but how can I do that? int i,j,k,s; for(i=0; i < N-1; i++) for(j=i+1; j < N; j++) for(k=1...
How to learn DSA if you are already working as a software engineer and have decent knowledge about development. Only thing that makes me procratinate is going over theories behind different data structures. I thinkg solving problems is fun but the begineer phase is really boring and after a year i have almost forgotten...
Description of the problem: Alice and Bob are both given as input the same graph and vertex $x$ and $y$ respectively. In the graph there are no self-loops and the given vertex can be the same. Prove that communication complexity between Alice and Bob for deciding whether $x$ and $y$ are neighbours is at least $log \chi...
I wanted to see what models would be best suited for providing a image (see the link below) and having the model perform a image to text (OCR of some kind) and laying out the contents of the image in a "question" "answers" format. This gets more tricky as I would like to include pictures between the question and answer...
i saw this comment here : David Deutsch says "number of atoms in universe is finite", but then says "number of programs of all finite lengths is infinite". Contradiction? ""stating there are an infinite number of programs but that a program cannot be infinitely long is a contradiction" That's not a contradiction. Ther...
As a beginner to competitive programming, I want to know a few things about informatics Olympiad such as the resources and books needed to prepare for the competition. I also want to know which problems should I solve from CodeChef, HackerRank, etc because I was unable to find Olympiad problems and most of the problems...
Write an algorithm that takes an arbitrary natural number and returns a boolean of whether the number is a perfect square. Sketch a flowchart of the algorithm. My approach is that a natural number $n$ is a perfect square if and only if we are able to find a natural number $i$ where $i < n$ such that $n / i - i = 0$ and...
PSSM or PWM (Positional Weighted Matrix) is a common thing in biological science, used often to observe the distribution of letters inside a group of strings of the same length. It's composed by log-odds of observing a letter inside a given positions, so the value of each cell in the matrix could be either a positive o...
$\mathsf{PH}[1]$ is a variant of a polynomial hierarchy in which each machine can only call its oracle once. $\Sigma^{\mathsf P}_{poly(n)}[1]$ is a polynomially "tall" tower of $\mathsf{NP}[1]$ oracles. Each of these oracles can accept an input no longer than $n+o(n)$. Quite trivially, $\mathsf{PH}[1]\subseteq\mathsf{P...
Recall some terminology: Let $\mathsf P$ be a finite set of propositional atoms, and let $\Phi$ be a proposition over $P$ that is generated from $\top$, $\bot$, $\neg$, $\wedge$, and $\vee$. Then: A satisfying assignment for $\Phi$ is a function $\varsigma:\mathsf P\to\{\bot,\top\}$ such that $\varsigma\vDash\Phi$ ho...
I remember in a Computability Theory class building a state machine for an assignment that required many 'go-back' transitions on $\Sigma - symbols$ for all symbols not already handled. This was very verbose and seemed to be a thing people would run in almost all states in any sort of parser. Is there an agreed-upon sh...
the 24 hour clock/timer on my BEMER PEMF device's microprocessor is keeping erratic time lately. Shortly after I reset to the correct time, it fails to keep accurate time. I'm wondering if exposing the motherboard will allow me to easily identify and replace the clock chip? I am a newbie and have never done component l...
I'm learning about Reed-Solomon codes so apologies if this is a basic question. The alphabet size $q$ in RS codes grows with the block length $n$ - in particular, we have $q \geq n$. But intuitively, what's the reason behind this constraint? This is introduced as a part of the definition in the notes I'm reading and I ...
It's possible to construct SAT problems that are solvable in quasipolynomial time, but they are also solvable in polylogarithmic space. Consider, for example, the following problem: Let a set $S$ consist of $\mathcal O(\log^k n)$ variables. Suppose a boolean formula $\varphi(S, X)$ in 3-CNF form such that $\forall c\i...
Is it possible to write a piece of code that will run forever without using a loop?
I write this question because my professor in Algorithm Analysis briefly mentioned some property related to the countability/uncountability of the set of strings/problems/algorithms and the consequent inability to have an "algorithm that can solve it all" which I didn't fully understand... As I understand: A decision p...
I was looking at the Advent of Code 2023 day 11 problem and misread it to think that the question ended up asking something akin to what's below (after transforming the positions of the "galaxies"), and I'm wondering what kind of optimization problem this is. See nearly equivalent problem, but with specified values for...
We aim to optimize the execution of a specific task. Consider a set, P, containing N 2D points. A new query point, p1, is introduced, and the objective is to identify the nearest point in P to p1. If the distance surpasses a specified threshold, p1 is incorporated into P, increasing its cardinality to N+1; otherwise, p...
Build a Turing machine that will count the units written in a row (without omissions) (their number does not exceed n) and write their number in the number system with the base n +1, here n=3+[N](mod 13) and N =(your number in the group list)+(your number groups).Build a Turing machine that will count the units recorde...
In an image processing system, an algorithm processes an $N \times N$ image with each pixel being a number between $0$ and $255$. It finds the median value $M$ in the $N \times N$ image and applies the binary function $f(x)$ to every pixel. $f(x) = \begin{cases} 1 & \text{if $x ≥ M$} \\ 0 & \text{if $x < M$} \end{c...
Given a binary $n \times n$ matrix, we would like to decide whether there is a row or a column which consists entirely of $1$s. The caveat is that after we read an entry of the matrix, it is erased. How much space do we need in order to solve this task? If entries do not get erased, the task can be solved in space $O(\...
Given a sorted array of positive integers that is guaranteed to have some unique entry that occupies more than $1/3$ of the entries, is there an algorithm to determine this entry in $O(1)$ time? Some remarks: (1) If we replaced $1/3$ with $1/2$, then by checking the first, middle, and last entries of the array, we obta...
I have the following problem, and would like to figure out whether or not it's NP-hard - primarily to know that searching for a polynomial algorithm for it is futile. Approximations are possible, and in practice sufficient, but I'm still interested in how hard the exact problem is. Given is a DAG $(V, E)$, where every ...
So I am given the language qr where q is any combination of a's and b's. r is then the reverse of whatever q is. For example, abba is in the language because we can make a q = ab and r = ba I have to prove, using the Pumping Lemma, that this language is not regular. I can't make any sense of this, because it seems appa...
I am trying to solve a competitive-programming-style problem which I've boiled down to the following: given two arrays $a, b$ of length $n$, where $a_i, b_i > 0$ for all $i=1\ldots n$, compute $$\max_{i, j : i\neq j} \quad a_ib_i + a_jb_j + \max \{ a_ib_j, a_jb_i \}. $$ Of course, this can be solved by brute force by s...
We're looking to model the following problem as a standard optimization problem (or even a non-standard one). We can come close, but nothing seems to fit exactly. We have a working algorithm coded, but the performance is unacceptable. Problem statement The problem is set up in two parts. First, there are fixed data: a...
I have been trying to figure out why this problem is supposedly not in $P$. Eager to learn where my reasoning is wrong! Problem: Given a pair of integers ($n$, $m$) in binary, does there exist $2 \leq k \leq m$ such that $k$ divides $n$? Reasoning: In order to find a potential $k$ we need to loop over all numbers from ...
i have an idea of enhancing the heapsort by finding the max and min simultaneously and then swapping the max into the last node, and then the min will be swapped into the second to the last node, and then they will be removed or pop. and then they will be sorted in the array, the max will be at the last element, and th...
Let $\varphi(X)$ be a boolean formula in CNF over a set $X$ of boolean variables $x_1,x_2,...,x_n$. Let $c_i$ denote $i^{th}$ clause in $\varphi(X)$. $x_j^0$ denotes $\overline{x_j}$ and $x_j^1$ denotes $x_j$. $\varphi(X)$ is considered clause-pair minimal if $\forall i\forall j\neq i$ the CNF $c_i\land c_j$ consisting...
Is it possible that an AI bot behave as a human being in the long term? I would like to know what people think but according to me it is not possible. One example is - Many times humans know what is the right thing to do but they don't feel like doing it. In humans, there is a tussle between heart and mind many times. ...
I have been struggling with the understanding of why this problem is in coNP. Problem: CNF-Equivalence, denoted as C, takes as input a pair of CNF formulas ($\phi, \sigma$) both are defined over the same set of $n$ variables $x = (x_{1}, x_{2}, ... x_{n})$. The goal is to decide whether these two formulas are equivalen...
We know that $\mathsf P$ is low for itself. It's also low for $\mathsf{NP}$, $\mathsf{RP}$, $\mathsf{UP}$ and some other complexity classes that contain $\mathsf P$ and are contained in $\mathsf{NP}$. Does it actually hold $\forall\mathcal C:\mathsf P\subseteq\mathcal C\subseteq\mathsf{NP}$ that $\mathcal C=\mathcal C^...
Let $L = \{\langle M, W \rangle \mid M $ is a Turing machine, w is a string and some Turing Machine $M_1$ exists such that w does not belong to $L(M) \cap L(M_1)\}$ I am unsure of how to deal with the TM $M_1$. One idea I had was to let $L(M_1) = \phi$ such that $L(M) \cap \phi = \phi$. So when we simulate $w$ on $M$...
Given two boolean functions f1 and f2, are there any tools available that could be used to automate the process to represent f1 in terms of f2? I understand the process of this doing this by hand quite well, however, the process gets quite tedious with more variables. Are there any tools that are readily available onli...
I have read a book ‘Men of Mathematics’ by Eric Temple Bell, which includes the development of mathematics through ages and the biography of famous mathematicians . I am looking for such an history oriented book about computer science and the computer scientists. Can anyone suggeste me any such books and I am unable to...
I'm working on a problem from my textbook (not homework, just an example), and it asks us to calculate the 'best case' scenario of reading a 1MB file from the hard drive. I don't know why the right way to calculate the total time involves the max time for a single rotation. Also in the answer they said that a 1MB file ...
The following question is related to finding the size of the original datagram. The formula for original datagram size is: Data length of first packet + (Total length of subsequent packets * no. of subsequent packets. Do I also need to consider the header size for the first packet sent? And what if the MF for the first...
The outline of the exercise is this: Describe two non-regular L1 and L2 languages on A = {a,b} such that L1∩L2 is infinite and regular. The proposed solution to this exercise is: L1 = {a^n b^n | n > 0} L2 = {a^n b^m | n != m AND word length is even} L1∩L2 = {words of even length} What I don't understand, however, is th...
$\mathrm{MFVS} \leq 1$ is a concise way of writing the following decision problem: Let $G = (V, E)$ be a directed graph. Is there a $v \in V$ such that every cycle in $G$ passes through $v$? (More generally, $\mathrm{MFVS}$ stands for minimal feedback vertex set, the problem of finding the smallest set of vertices su...
I'm practicing the following exercise for my exam: CFG {$w\in ${a,b,c}$^* | $#$_a(w) + $#$_b(w) = $#$_c(w)$} and I'm struggling a bit. I've already solved {$a^nb^mc^l | n+m=l$} with production rules: $ S\rightarrow aSc | B|\varepsilon \\ B\rightarrow bBc|\varepsilon $, which is almost the same except the positions o...
Determine two languages L and L1 on the alphabet {a,b} with regular L, L∩L1 is non-regular and L1 does not contain L. I came up with this solution: L = { w | w ends with the string aba} L1 = {w | w = w^r (palindrome) } L∩L1 = {w | w ends with the string aba AND w is palindrome} I don't know if this is correct as a solu...
I am puzzled by a point in this paper by Phil Wadler. Figure 6 shows a proof of the law of the excluded middle, $A ∨ ¬A$. The computational interpretation of this proof exploits the ability of classisal [sic] control operators to return multiple times from a single term. The term of type $A ∨ ¬A$ first returns an inje...
I have been trying to understand the following proof but so far no cigars. My Understanding: For a given function $f$ we can define $C_{1}(f)$ as a $k$-DNF formula where $k$ represents the size of the certificate and where every clause in the formula is a different certificate. Similarly we can define $C_{0}(f)$ as a $...
I've done some PL-related work in Rust that requires some proofs to guarantee the resulting language is free of data races. I'd like to include such work in a paper, but I'm not sure whether I should just formulate the work using operational semantics or whether that approach is becoming outdated, and tools like CoQ ar...
Binary search is the well-known algorithm that compares the input value to an entry in a sorted array, and based on the result then decides to check the same input value against another entry either on the left or the right of that array entry. The number of comparisons needed is O(log(n)), but we can specify the numbe...
I don't know the name of this algorithm, but anyway it was interesting to share (btw Linear sieve, Sieve of Atkin and Sieve of Pritchard performs better) The main idea is to use the Fundamental theorem of arithmetic, and iterate through primes and at each prime cancel out every possible number expressed as a product of...
In the context of finite, simple, undirected graphs, associate with each node $v\in V$ an integer $n(v)$ (you can limit this to positive integers without loss of generality). Create the set of edges by defining a threshold $T$, and join an edge $x,y$ iff $n(x)+n(y) \geq T$. These are called threshold graphs$^{[1]}$ and...
I'm studying for final and currently stuck in the question below. You have an embedded processor. It has its L1 instruction and data cache. No L2 or last level cache are available. Consider the following assumptions. The processor core is running at 2 GHz. Memory access instructions are 25 % of total instructions. Rea...
Two sorted arrays A and B are given having size l and m respectively. Our task is to find the median of these two sorted arrays combined. Suppose the length of the combined array is n i.e. n = l + m.By definition the median will be greater than half of the elements and less than the other half. Suppose A[i] is the me...
Research on Photorealistic 3D Virtual Environments for Robotics Background I am engaged in a robotics research project focusing on the development and evaluation of photorealistic 3D virtual environments. Our approach integrates Neural Radiance Fields (NeRF) with Unreal Engine 5 (UE5) to create realistic environments f...
I am studying the cycle cancelling algorithm for the minimum cost flow problem, and I can not understand the proof of the following: If there no negative cost cycles then you have a minimum cost flow. The other direction is easy but I am stuck with this one. If you want to get a smaller cost with an augmentation on the...
I've been reading on the Tree-vs-Aversary game in the example of proving the lower bound of a Decision Tree in the context of Resolution Refutation Proof Complexity. While I understand how the Adversary game can be used in proving the lower bound of the depth of the tree, I have problems visualising the Tree-vs-Adversa...
I am currently trying map a grammar to a graph in the context of syntax- and graph-based testing. However, until now I haven't had an enlightenment how would I map non-terminals and terminals to nodes and edges in relation to the following quote? ... [Terminal Symbol Coverage] and [Production Derivation Coverage]* can...
Suppose a problem: Given $n$ pigeons and $m$ holes of sizes $b_{i\le m}$ decide if you can put all pigeons in given holes. It's possible to find a refutation of size $\mathcal O(n^2\log^2 n)$ of this principle when it's encoded as a conjunction of threshold functions, therefore there must exist a polynomial size Freg...
I have been wracking my head around the understanding on how to calculate $N_{1}(f)$ and $N_{0}(f)$ from the communication matrix. Definitions: $N_{1}(f)$ = least cost of non-deterministic protocol that accepts $f^{-1}(1) = \{(x,y) : f(x,y) = 1 \}$ $N_{1}(f)$ = ceiling( log(number of monochromatic rectangles needed to ...
Let me first specify my question. I am looking for decision problems with polynomial algorithms but such that the simpliest or fastests verifiers do many computations. Here by verifiers I mean both YES and NO verifiers. It might be the case that this is too specific. By "verifiers with many computations" I mean verifie...
Problem: given a set of classes and classrooms, then given a set M of pairs (a,b), which means it is valid assignment from class a to classroom b(ex:(c,2), (c,3), (d,2), means class c can be assigned to classroom 2 or 3, class d can only be assigned to classroom 2), each class can only be assign to a classroom at the ...
I'm working with sparse vectors represented as index (array of unsigned integers) and coefficient (array of floats with the same dimension). Suppose I have many vectors of different length, and I want to add them all, summing the corresponding coefficients for each unique index. I need to calculate it the fastest possi...
The Short Version of my Question The following two regular expressions represent two sets of strings. REGEX EXAMPLES OF STRINGS OF TEXT THAT MATCH THE REGEX I?D?A?H?O? “IDAHO”“ID”“IDH”“IDAHO” I?L?L?I?N?O?I?S? “ILLINOIS”“IL”“ILINOI”“ILLN” What regular expression (regex) represents the intersection of the t...
Historically, processors often increase in bit-size by powers of 2, such as 8-bit, then 16-bit, 32-bit, 64-bit. Although this has not always been the case, it is a well known trend. One benefit is backwards compatibility. Another is that components can be scaled by combining two 8-bit components into a 16-bit, and so o...
I recently asked a question on Stack Overflow and found that I need to solve a 0/1 knapsack problem. However, the problem has evolved to one where the knapsack problem is only part of it. The problem is as follows: I have a variable named num_items which determines the number of items in the knapsack. Each item has a v...
If I understand CHC correctly, simply typed lambda calculus corresponds to propositional logic. As HM allows polymorphic definitions by let-expressions, my guess is that it would correspond to a version of propositional logic where universal quantification over variables is allowed. But as polymorphism in HM is only al...
Let $L$ be a language for which there exists some turing machine deciding it in at most $n^2$ steps. Is it decidable whether a given turing machine $M$ decides $L$ and runs in at most $n^2$ steps? I expect the answer to always be "No", regardless of $L$, but I fail to see exactly how.
I had a discussion with a C++ developer on whether aborting a thread causes memory leaks. His opinion on how aborting a thread works was all destructors of the stack objects of the thread to abort are executed by the C++ runtime the C++ runtime calls the OS method to abort the thread the kernel gets rid of the stack m...
Here is the explanation in Sipser's. For step 3, why should we accept only when none of the markers lie on an accept state? If the alphabet of the language is $\Sigma = \{a,b,c\}$, and after the first iteration, let's say $a$ and $b$ lie on the accept state while $c$ doesn't (meaning that c is not in the language). Thu...
What is the parameterized complexity of Weighted-CNF-SAT, when parameterized by the number of clauses? Input: A CNF formula $\phi$ with $m$ clauses and $n$ variables, and an integer $k$. Parameter: $m$ Output: Does there exist an assignment to $\phi$ with hamming weight $k$? When this problem is parameterized by $k$ it...
The class $\mathsf{NPO}$ is defined as optimization problems such that the corresponding decision problems defined with a threshold are in $\mathsf{NP}$. Let $A$ be an optimization problem and $B$ a decision problem associated to $A$ with a threshold. If we can solve $B$ in polynomial time, is it the same for $A$? I ha...
There are some $n$ people and $2 n$ items. Each person assigns a positive value to each item. The items should be allocated to the people, giving exactly 2 items to each person. The value of a person is the sum of values of the two allocated items. The goal is to maximize the minimum value of a person. For example, sup...
I am writing a program where I need to have a circle animation that grows from a start value to a end value and back to the starting value. I was able to come up with a semi-solution. double radiusFromProgress(double progress, double maxValue) { // Ensure progress is in the range [0, 1] progress = progress.clamp(0....
In the classical set cover problem, we are given the set $U$ of elements $\{1, \dots, n\}$ and a collection $C$ of some subsets such that their union is the whole set. Now, I will introduce the first small twist: instead of searching for one cover, we have a target number $t$ and we need to find $t$ disjoint covers. F...
How to create a structure which acts as union of ranges. In that structure new ranges can be inserted beforehand and then some queries are asked to find out if the given point is covered by any of the ranges. What are different approaches and space/time complexity tradeoff?
My wife has a small workshop where she fixes dolls. She works alone without any external help. She has N orders from her clients, she estimates each order and she has deadline for each order. She asks me to make a program which will create a schedule for her. She wants to minimize a number of overdues. Also the progra...
I am looking for some greatest references that could help me understand the theorem $MIP^* = RE$ ($MIP*=RE$) step by step. The paper (The Connes Embedding Problem: A guided tour) covers various topics related to this problem, but it is very brief. As a student with bacgrouds on operator algebras (von Neumann algebras,...
Any $\mathsf{NC}$ circuit could be presented in SAT form via Tseytin transform. This applies in the reverse too: an arbitrary SAT instance could encode any $\mathsf{NC}$ circuit. Now, Frege proof system is said to be limited with $\mathsf{NC_1}$ circuits. In that case, does it mean that $\mathsf{NP=coNP}$ iff there exi...
Of course, it isn't possible to construct them directly since we hasn't these type constructors, but only function constructor (arrow). But suppose there are 2 types $A$ and $B$, from which we need to create a product (or tuple) type $A*B$ and also sum type $A+B$. Let's remember the algebra of types: functional type $A...
I am trying to understand why the above is not the case. In my understanding, if $P = NP$ I can replace a deterministic machine with a non-deterministic and vice-versa. Hence, I will always have the exact same computational tool ...
For simplicity, let's assume all Turing machines print 0 or 1 on the tape. Consider an algorithm $A$, which, given any Turing machine $T$ as the input, outputs $x\in \{0,1\}$, satisfying the condition that if $T$ halts, then the last symbol printed by $T$ is $x.$ When $T$ does not halt, it does not matter what the outp...
Consider an $n \times n$ matrix of integers. Define a boundary in the matrix to be a sequence of cells, one per x-coordinate, where the y-coordinates of the boundary either stay the same or go up/down by one for successive values on the x-axis. I would like to find a boundary that maximizes the sum of the cell values o...
I have a set cover problem in the real world, it is a unicost set cover problem, with many subsets(around 10~30 million subsets, yes, no mistake here). Due to the nature of the problem in real world, it is kind of easy to find all the exact covers of the problem. I am trying very hard to find a better set-cover solutio...
Let $B$ and $C$ be two languages on $A = \{a,b\}$: $B = \{ w \mid w \text{ has the same number of }a\text{ and }b\text{ symbols}\}$ $C = \{ a^n b^m \mid n,m \ge 0\}$ Describe $B \cap C$ and determine whether $B$ is regular or not using only the closure property of regular languages. I reasoned like this: $B$ is not r...
Let us say I have an empty graph G and a list of nodes N to add to the graph one-by-one. Let us say that I will have a node X that I do not yet know, but will know after I construct my graph G. My ultimate goal is to find the shortest distance from each node N to X, in the weighted graph G (For some context on why I ne...
My 1st question ever on stackexchange, please be nice to me if it's too naive :) I read the map reduce paper and i discover distributed system is expensive. As an example in the paper, roughly speaking, approx. 1700 machines with 30000 mb/s throughput compares to non distributed single machine with 500mb/s ssd, it's 60...