instruction
stringlengths
35
29.1k
It is well-known that $\mathsf{MIP} = \mathsf{NEXPTIME}$, and recently there was a breakthrough stating that $\mathsf{MIP^*} = \mathsf{RE}$. This was very confusing because it seemed like the (malicious) provers should become more powerful about fooling the verifier, for the provers was equipped with a new toy, namely ...
Consider a Reed-Solomon code over a finite field of $\mathbb{F}_q$. Why is the typical block size chosen to be $q-1$ [1][2][3]? The reasoning I saw around this is that in order to maximize the rate for a fixed minimum distance. But wouldn't choosing $q$ as the code size would be even slightly better? Does it have to do...
How to calculate the maximum step of sorting network? Based on image below, it has most comparators at second index which is 9 comparators than another indices. That's mean, overall networks need 9 forward propagation steps which is the 9 is the maximum step of sorting network. This network has 6 elements input. How ab...
If a CPU is able to execute multiple instructions in parallel, and fetching/decoding/scheduling instructions happen in batches, and there's multiple execution units, etc. What does the IP register points to among all the instructions being executed at the same time?
At 12:11 in this video the creator talks about unverified rumors the Q* algorithm can break AES-192 encryption. If this is true, would this mean P = NP?
I was wondering if there is a reason behind clearing all the values in a list and reusing it, as opposed to deleting the list and creating a new one. Are there any practical advantages of using clear() method, aside from situations where the list is referenced in multiple locations, and deleting it might lead to uninte...
I've implemented linear BVH as described in Karras 2012, and I was using triangles' centroids for Morton Code generation. I found recent papers and implementations use triangles' bounding boxes' centroids for Morton Code generation and they seem to result in better BVHs. I used triangles' centroids because I didn't kno...
I made some code about "integer interpolation" for running approximate alpha blending at FPGA which have low quantities of logic gate. Let's refer to "II" as integer interpolation. "II" made applying Russian peasant algorithm. The different point of Russian peasant between "II", Russian peasant is algorithm for multipl...
I have been trying to implement an approximation algorithm for the max traveling salesman problem with triangle inequality, and each paper I've read references the step of finding the max cycle cover in O(n^3) time. I know how to find it in O(n^6) time by creating a new graph with a vertex for every edge and using a pe...
$O(\sum_{l=0}^{log_2n} l*2^l)$. I took the integral of the term which I think is $O(n*log(n))$
Testing whether a number (N) is prime or not can be made very fast but it will require storage space. If there is a central repository that stores all prime numbers found till now and if there is a webAPI that returns these numbers or one/few number(s) at a time (sequentially) then it will be very fast to test whether ...
If I have two CTL equations, how do I prove they're equivalent or that one implies the other? What's the general approach? Disproving is obvious, but I am unable to figure out how to prove the equivalence of the two or an implication
This may seem like a simple question, but I can neither find the answer on the internet nor AI tools can give a proper answer. I was reading a book about static networks and I saw that the bisection width of the star topology is 1, but it didn't make sense to me. The definition of bisection width is given as follows: T...
for a=1 to m means for(a=1;a<=m;a++) for i=1 to n for j=i to n c= c+1; The total no of iterations is O(n^2) i=1,j executes n times. i=2,j executes n-1 times. . . . i=n, j executes 1 times. So Total No of iterations = n+n-1 + n-2+ ..... + 1 = Sum of n natural numbers = O(n^2) For the Time complexity of the given ...
We are given two cyclic $\{0,1\}$ strings $X$ and $Y$ with both length $n$, containing $k$ 0s and $n-k$ 1s. Suppose positions of 1 in $X$ are $x_0,\dots,x_{k-1}$, for $Y$ are $y_0,\dots,y_{k-1}$. We assume $x_0=y_0=0$. Find $c \in \{0,\dots,n-1\}$ and $s \in \{0,\dots,k-1\}$ minimize $$ \sum_{i=0}^{k-1} d(x_i,y_{(i+s) ...
I recently designed an algorithm for single-source shortest paths in graph structures, which can limit the number of edges as Bellman-Ford while approaching the performance of SPFA. Of course, it also supports negative weights and helps check the negative weight cycle. The runtime ratio is SPFA : Mine : Bellman-Ford = ...
Say i have an 2d array A of nxn size, int values already given for each item.these values can be the same or different. There's gonna be another nxn array B being input. I can only interchange one row from B with another row from B, or one col from B with another col from B. (Exchanging a row with a col is not a thing....
Let $G = (V, E)$ be a connected DAG (representing a circuit) with every vertex may be one of the following three types: Input variable, with in-degree $0$ and out-degree $\geqslant 1$. A gate, with in-degree $2$ and out-degree $\geqslant 1$. Output variable, with in-degree $1$ and out-degree $0$. Does there exist a p...
I've been reading the book "A Primer on Memory Consistency and Cache Coherency", and it contains the following paragraph: The Atomic Requests property states that a coherence request is ordered in the same cycle that it is issued. This property eliminates the possibility of a block’s state changing—due to another core...
Assume the following hypothetic scenario: You know the values $v_1^0, \ldots, v_n^0$ of $n$ cryptocurrencies. You know the values this currencies will have for the following $m$ days; this is, $v_0^1, \ldots, v_n^1$ up to $v_1^m, \ldots, v_n^m$. In general, $v_{i}^j$ is the value of the $i$th currency in $j$ days from...
Suppose a polynomial time machine that has an access to a polynomially long string of bits independent on the input. On average, it's impossible to compress this string to a subpolynomially long string using a deterministic polynomial time compression algorithm. As far as I understand, such a machine would be a $BPP$ m...
Is this the CFG for part (a), S -> AxxyxxA A -> Ax|ε If this is the answer then this grammar would accept "xxyxxx" also which is wrong. How to do it if this is wrong?
There are algorithms that speed up matrix multiplication over the naive $n^3$ algorithm. But supposing you have 3 matrices $A$, $B$ and $C$, is there a way to compute $ABC$ that is asymptotically faster than first computing $AB$ and then computing $(AB)C$? Let's assume the matrices are square and dense. This question w...
I am trying to understand this Expected linear time MST algorithm, and I have a problem in the implementation of the Borůvka's step. My problem is with the removal of duplicate edges between merged connected components and keep the one with minimal weight. To get the right complexity, one would need to do it in $\mathc...
Consider the following decision problem: Given $([b_1, \cdots, b_n],t)$, where $[b_1, \cdots b_n]$ is an array of natural numbers each less than $n^c$ and $t$ is a target natural number, do there exist natural numbers $f_1, \cdots f_n$ such that $f_i \le b_i$ for all $1 \le i \le n$ $\prod_{i=1}^{n} f_i = t$? We gues...
Consider the variant of the Subset Sum problem, where the input is a list of $2 m + 1$ positive integers of sum $2 S$, and the goal is to find a subset with the largest sum that is at most $S$. The problem is NP-hard in general, but it can be solved in polynomial time if the all inputs are 'big', that is, larger than $...
I want to compute the centroid of a body of the following form: $$ E\cap H_1\cap \cdots \cap H_T $$ where: $E$ is an ellipsoid in $\mathbb{R}^d$: $E = \{x = c + Bu | u^T u \leq 1\}$, where $c$ is the ellipsoid center and $B$ is a matrix. $H_1,\ldots,H_T$ are half-spaces. Can this be done in time polynomial in $d$ (th...
To find the maximum matching on a bipartite graph, I propose the following greedy algorithm: At each iteration, pick an unmatched vertex with the smallest degree and match it to one of it's neighbours if possible. Remove the 2 matched vertices and all of it's edges from the graph and repeat till the graph is empty. I'v...
Consider a directed unweighted graph (in a adjacency matrix for example), how can I visit each node exactly once? By once I mean for example in a DFS traversal, a node can get finished and we should go back to it's parent node and try other paths. But what's an algorithm that doesn't get back to the parent node at all ...
I'm learning about induction and co-induction. From what I know, given a set of judgments $U$ and an inference system $\Phi \subseteq \wp(U) \times U$, where $(\left\{ h_1,\dots,h_n \right\}, c) \in \Phi$ stands for the rule $\frac{h_1 \quad \dots \quad h_{n}}{c}$, we can define the function: $ F_{\Phi}(X) = \left\{ c ...
I recently came up with this bin packing variant and was wondering, if someone has studied it before: Given: Instance $I$ is a set of tuples $\begin{pmatrix}s_{i} \\ o_{i}\end{pmatrix}$ with $s_{i}, o_{i} \leq 1$ and $s_{i} \leq o_{i}$ for all $i$. Task: Pack the items in $I$ into the least amount of bin with size $1$....
I'm a student trying to learn more about CMOS design, I already understand assembly and computer architecture, but VLSI is very interesting and I was wondering if you guys knew some good books/games in order to learn more. I already know how to use electric, and I just want to know more about this topic. Also, I don't ...
Below depicts a FIFO buffer: So the buffer is there for when the speed of data written into the FIFO buffer is faster than the data read. But I don't understand one thing. Wouldn't eventually all the free buffers of the FIFO buffer run out after certain amount of time? Because writing speed is faster than the read spe...
Classic text (Linz, P., & Rodger, S. H. (2022). An introduction to formal languages and automata. Jones & Bartlett Learning.) describes the following language where one is to describe an nondeterministic pushdown automata (chapter 8 problem 4j fifth edition) : Describe a language over {a,b} where the count of b's is eq...
Classic text (Linz, P., & Rodger, S. H. (2022). An introduction to formal languages and automata. Jones & Bartlett Learning.) describes the following language where one is to describe an nondeterministic pushdown automata (chapter 8 problem 4j fifth edition) : Describe a language over {a,b} where the count of b's is eq...
Classic text (Linz, P., & Rodger, S. H. (2022). An introduction to formal languages and automata. Jones & Bartlett Learning.) describes the following language where one is to describe an nondeterministic pushdown automata (chapter 8 problem 4j fifth edition) : Describe a language over {a,b} where the count of b's is eq...
I'm trying to understand reaching definitions and I'm having hard problem wrapping it around my head with the following definition (taken from the the following paper page 114): $B_i\;\text{be a basic block}$ $ReachIn(B_i)\;\text{be the set of registers that reach the entrance to}\;B_i$ $ReachOut(B_i)\;\text{be the se...
I have an algorithmic problem in which I have a highway that is a straight line of length $n$ and a set of unique respective costs for construction of a radio tower for each mile on the highway. I am trying to use dynamic programming to find a way to minimize the cost of ensuring that each point in the highway is cover...
Given an isothetic polygon (sides parallel to the x-axis or y-axis) and 2 points (start and end) on the boundary of the polygon, find the shortest path traveling only in the direction of the x or y axis (up, right, down, left), such that the entire polygon is visible by the time a point travels from the start point to ...
Given an array of length n, how to determine if all the continuous subsequence of this array contains at least one unique element. Any subarray array[start, end] with 0 <= start <= end < n will have a unique element. The algorithm will return : True for array = [1, 3, 5, 3, 1] False for array = [1, 3, 5, 3, 5] becaus...
The question asks to write an algorithm using Dijkstra's algorithm with time complexity of $\Theta(|E| \log |V|)$ that find the second shortest path between $s∈V$ and $t∈V$. The farthest I managed to get is: Run Dijkstra's algorithm and find the path from $s$ to $t$. Mark this path as $P_{(s,t)}$. Remove one edge $e'...
I am trying to implement an algorithm that fairly distributes people into groups, given their ranking of those groups, while also taking into account their preference for partners. I have modeled this as a directed graph with upper and lower bounds and costs on edges representing their ratings. Finding a solution would...
#define N 2 #define TRUE 1 #define FALSE 0 int flag[N]={FALSE} int turn; void process(int i) { int j=NOT(i); while(1) { a) NON-Critical Section(); b) flag[i]=TRUE; c) turn=i; d) while(flag[j]==TRUE && turn==i) { //wait } e) Critical secti...
If you go to the JSON spec page : https://www.json.org/json-en.html, then you'll see the language represented by some diagrams showing graphically what the language looks like. I wondered, does this kind of diagram has a name ?
I'm a first year BCA student. Can you help me with flowgarithm of the common child problem (LCS) without pointers
I'm given a rectangular plane with width, height and a set of rectangles defined by left, top, width, height, where left and top define left upper corner of the rectangle. My task is to find the largest rectangle that can fit among the other rectangles without overlapping. It should be possible using Sweep line algorit...
Now, I have assumed the unary number to be 1. and my doubts are Do you design this machine similar to normal unary multiplication assuming that the constant 2 (11) is always present in the input tape? Or Is there only one unary number present in the tape? This confusion may be because of my poor understanding of the ...
You are given a rooted tree $T=(V,E)$ with $n$ nodes and the root $r$. Each node $u\in V$ has an integer label $l(u)$. Suppose $S⊆V$ then $S$ is well-formed if for every $u,v\in S$ if $u$ is an ancestor or the parent of $v$ then $l(u)\le l(v)$. Let $wf(T)$ be the maximum size of any well-formed set in $T$. How can we ...
I've been asked to prove that the language $A_{TM} = \{ \langle M,w\rangle \mid M$ is a TM that accepts $w\}$ is mapping reducible to the language $LOOP-ONE = \{\langle M \rangle \mid M$ is a Turing machine that doesn't halt on exactly one input$\}$. I came up with the following idea : F = "On input <M,w>: Construc...
The Fermi Paradox asks why we have not yet encountered other intelligent life given the high chance of intelligent life emerging. I recently had the following thought: Evolution shapes the behaviour of an organism so that the organism behaves in ways that increase the organism's chance of survival. When evolution creat...
Git uses SHA hashing as a content address key. This relies on their being a vanishingly small probability that two different pieces of content will ever hash to the same key. For content c with length l(c), SHA(c) can be computed in time O(l(c)) and uses constant space. I am curious if there are hashes with a similar e...
So this is the Rice's theorem we were provided: Definition: $TM$-$FUNC(S)$ Input: Turing machine $M$ Question: Is $f_M \in S$ Let $S$ be a set of computable partial functions with $\emptyset \neq S \neq R$, where $R$ is the set of all functions computable by a Turing machine. Then $TM$-$FUNC(S)$ is undecidable. In othe...
$\mathsf{RP}$ can be deterministically defined as: A language $L\in\mathsf{RP}$ iff there exists a polynomial $p$ and deterministic Turing machine $M$, such that: $M$ runs for polynomial time $p$ on all inputs, $\forall x \in L$, the fraction of strings $y$ of length $p(\vert x\vert)$ which satisfy $M(x, y) = 1$ is g...
where i got it from. This was weird so I wanted to try it myself because they way he did it seemed wrong. So this is my attempt is it correct? I did not add the basic parts of the pumping lemma proof but just did the hard part, is it correct? $L=\{a^ib^j \mid j = i^2\}$, ab, aabbbb $z = a^nb^n$ Case one: v and x only c...
I have come across a c program like this . int main() { int a,i=4; int z=5; a=--i+ --i+ --z; printf("%d %d",a,i); return 0; } What will be the output? I need some explanation.
If we were to discover a deterministic algorithm capable of deciding, in polynomial time, whether a given graph contains a Hamiltonian path, would that imply that the problem SUBSETSUM belongs to P? In this scenario, the existence of a deterministic polynomial-time algorithm for the Hamiltonian Path problem could lead ...
C++ code: int main() { short int arr[4][4]; for (int i = 0; i < 8; i++) { for (int j = 0; j < 8; j++) { arr[i][j] = i+j; } } return 0; } Is there going to be a difference in hit time if it is loading data from arrays or storing data into array. For example for arr[i][j] = i+j; and a = arr[i][j]; ? Also what ...
I know that, in general, the Shortest Hamiltonian Path Problem in a general weighted graph is NP-complete. I am wondering, however, if the restriction to a complete weighted graph admits an algorithm in P. Being in a complete graph does give the knowledge that a Hamiltonian path exists in the first place. My guess is t...
Brief: I have two configurations, a and b, of the same set of Rummikub tiles (a may not be a valid Rummikub config) and want to find the fewest number of pickup->place tile operations to transform a into b. Type Definitions: C = Pair<int, int>: Card represented as a suit and value pair. CL = List<C>: Card list. S = Mu...
I have a question related with the response time of Deadline Monotonic scheduling...let's assume that there are 4 tasks, and the processor only allows to have 3 task priorities, thus there will be 2 of 4 tasks that will have same priorities. Tasks with same priorities will be processed in FIFO order. Do you know the fo...
I have a data set showing different clusters of data points and was attempting to find a way to get the peak of at every cluster. Comparing the moving average between a set of points does not work as the y values fluctuate up and down as x increases.
Is there a name for the class of software errors that arise from the fact that the software believes something wrong about the state of the world? (Allow me a bit of anthropomorphization of software, for the sake of explanation.) One example: A temperature sensor correctly reads 19°C, but the software accesses its mem...
Here is the block diagram of the pipeline for the H.264 encoder (Fundamentals of Multimedia by Ze-Nian Li, Mark S. Drew and Jiangchuan Liu). The feedback loop is used for motion estimation, but why is it taken after the transform and quantization steps? Why introduce and overhead from the inverse functions? I know th...
I have a parameter $q$ which is the probability of selecting a vertex (among $n$ vertices...) to be in a certain set. I am constructing the sets in an iterative way, having the vertex $v_i$ be in the set with probability $\leq \left(1 - q\right)^i$ (I'm not going into details about the order of the vertices for which t...
A practice problem in my textbook asks to proof the amortized complexity for a sequence of insert, delete min, and decrease-key operations on an initially empty skew heap. Insert and delete min both have an amortized complexity of $O(log(n))$, and the deletion algorithm that removes an arbitrary node in a skew heap is ...
Turing Machine where instead of having a set of final states F it has: A designated final state qaccept which exists in Q set of states. Upon being in this state, it halts, and accepts the input. A designated reject state qreject which exists in Q set of states. Upon being in this state, it halts, but rejects the input...
Suppose $P\neq NP$. The following problem can be solved in polynomial time? Given natural number $n$ and positive real numbers $a_1,a_2,\dots,a_n$ and $b_1,b_2,\dots,b_n$. The goal is to find $I\subseteq\{1,2,\dots,n\}$ such that $\sum_{i\in I}b_i$ maximized and $\sum_{i\in I}a_i\leq 5$. But I have no idea about it...
Let $D(V, A)$ be a DAG. We call a dominated path in $D$ a path $P$ such that $P$ is maximal and $\exists P^{'} \in D . (P^{'} \text{ is maximal } \wedge V(P) \subset V(P^{'}))$ that is, $P$ is a dominated path iff $P$ is maximal and there exists another path $P^{'}$, also maximal, containing all the nodes of $P$, along...
I just started studying the concept of context-free grammars and I find something very confusing. Watching a video I found someone tackling the problem ${0^n 1^m : n,m\geq 0}$. I thought that the simple answer would have the production rules: $S \rightarrow \epsilon \ | \ 0S \ | \ S1$ Since I thought this implies that ...
While preparing for final exam, I encountered a (target) problem where you have $M$ lines and $L$ points and you want to answer if it's possible to cover them all using $K$ disks of unit radius (decision problem). I would like to reduce the Disk Covering Problem to the problem at hand to show that the problem is NP-har...
Does an edge never being the largest weight in any cycle imply that it is included in the MST? I believe the answer is not, but can't think of a counterexample. I know that one guarantees an edge is in the MST with the cut property, but was wondering if this is equivalent.
To understand this proof you must first understand NP vs P problem The quantum eraser experiment True randomness Before we start I must first assert things that have been proven to be true, if you question any of my assertions feel free to research them yourself. True randomness does exist (demonstrated in quantum p...
Using the regular mergesort algorithm for a list, say $a[1...n]$, we call the merge function to merge, mergesort($a[1...\lfloor \frac{n}{2} \rfloor]$) and mergesort($a[\lfloor{\frac{n}{2}}\rfloor+1...n]$). Let $T(n)$ be the time complexity for mergesort. Then, the first sublist needs $T(\lfloor \frac{n}{2} \rfloor)$ ti...
It is well known that context-free languages are not closed under intersection or complement. But what about context-free languages $L_1$ and $L_2$, such that $L_1 \cap L_2$ as well as $\left( L_1 \cap L_2 \right)^C$ are not context-free languages. I can think of many examples of two context-free languages whose inters...
I've come up with a greedy algorithm proof for the minimum denominations problem, and I'm curious if someone can verify the correctness of the proof for me. I have simplified the problem by restricting the denomination set to the US Coinage System. Thank you very much in advance. A Formal Definition of the Problem Give...
I have a dataflow graph where a set of different types of tasks are placed in corresponding types of nodes. Say the task types are called A, B, and C. A-type tasks are placed in all the leaf nodes of the dataflow graph. B-type tasks are placed in nodes with the data from any two nodes hosting A-type tasks, or one node...
I study computer science and I was taught that sometimes one can test tests. The lecturer did not used citations. One other programmer told that this is not useful. Is there any research showing pros and cons of testing tests?
I know that an algorithm can't decide whether another algorithm halts on an input or not (a Turing machine can't decide whether another Turing machine will halt on an input). But I, as an human, can: I mean you just don't end up in your activity as a programmer with a looping algorithm and you don't know why! To do thi...
Given a set of $n$ positive numbers $\{a_1,\ldots,a_n\}$ and a positive target $T$, find a subset $S$ from $\{a_1,\ldots,a_n\}$ of contiguous elements, that is $S=\{a_i,a_{i+1},a_{i+2},\ldots\}$ for some $i$, such that $|S|$ is minimum and $\sum_{a\in S}a\geq T$. My algorithm is an exhaustive search one. Generate all ...
I have a question that I am trying to work through. I have a program: 1. program Pass 2. var b:integer; a:integer; v :array[5] of integer ; 3. procedure P (x:integer, y:integer ) ; 4. var z:integer ; 5. begin 6. z := x ; 7. x := y ; 8. y := z ; 9. end 10. begin 11. b :...
So my question is about when we want to find the total derivative of the NLL Loss function $L$ w.r.t. $w_i$. So the "pipeline" is often expressed as: $$\frac{\partial L}{\partial w_i} = \frac{\partial L}{\partial z} \cdot \frac{\partial z}{\partial w_i}$$ Where $L$ is the NLL Loss function, $w_i$ is the context word-em...
I am designing a simple algorithm to be used at hardware level. And I want to find its time complexity. i=1 while(i<=n) { i=i*2; } How I'd go about finding time complexity of this?(And I'm wrong). i=1,2,4,8....n =$2^{n-1}$ So the time complexity is $2^n$ But I am wrong according to the professor. Why? Isn't my mat...
First, this is not an opinion question. I'm interested in if there is some kind of objective answer. If there isn't, then the answer would be "no". Is bytecode ("virtual machine code" for a "virtual processor") inherently faster to compile and/or interpret, than higher level (above Assembly) languages? What I mean is, ...
Given array $a$ of size $n$ and array $p$ of size $m$. How we can for every $i < m$ find $p_i$-th order statistics of array $a$ in $O(m log(n) + n)$? We can find order statistics separately, but it will be $O(mn)$. How can we do better?
I have found two formulas in the work on pages 5 and 6, of which I am trying to develop a recursive implementation. The similarity to the DFT or FFT might be useful here. I divide this question into three sections, in the first part I explain my thoughts, in the second section there are open questions and in the third ...
function fun(n) { let i, j, p, q = 0; for (i = 1; i <= n; ++i) { p = 0; for (j = n; j > 1; j = j / 2) { ++p; } for (k = 1; k < p; k = k * 2) { ++q; } } return q; } let val_q = fun(36); console.log(val_q); My confusion: Outer loop runs $n$ times. The loop with $j$ ...
I wrote a pseducode for the Algorithm I am interested in its time complexity. Here is algorithm: SolveDominoes(n, dominoes_data): ListA for dominoes in dominoes_data: ListA.add(dominoes) ListP = Red Domino from starting domino for(int i = 1; i < n; i *= 2) ListB = ListA.copy() ListC Sort(ListA, Li...
I'm embarking on a long-term project, aiming to build a computer based on the Intel 8088 architecture. This venture provides an excellent opportunity to deepen my understanding of computer hardware and operating systems. As I begin this journey, I have some queries to address, seeking clarity on certain aspects. One ke...
I'm trying to solve the recurrent $$T(n) = 2T\left(\frac{n}{2} \right) +O(n\log n)$$ I thought about Master's theorem but unfortunately, my recurrent doesn't belong to any cases Could you please help me with solving my difficulties? Thank you a lot for your help.
I read that one assumption for Successive Shortest Paths algorithm for computing the minimum cost flow problem is that every cost is non-negative. I also read that this assumption can be removed with proper network transformations, what are those? I found on some notes this: Where $ c(u\rightarrow v) $ is the capacit...
I have a real-world (see background below) problem wherein a set $S = \{A,B,C,D...\}$ needs to be partitioned into set $P = \{ \{A,B\},\{D\},\{E,F\},\{C,G,H\},...\}$ where $P$ is required to have the fewest possible elements. There are restrictions on which elements of $S$ can be partitioned together; at any time I can...
are there some packages in any programming language which make it convenient to solve this specific type of PDE? $f_t + \left(1 + \xi \frac{\kappa_t - a}{T-t}\right) f_a + \frac{\sigma^2}{2} f_{aa} + r(1-\gamma)f - (\rho + \lambda(a))f + \gamma f^{1-\frac{1}{\gamma}} = 0$ I've come across similar PDEs multiple times so...
The part that I have problems with is showing the existence of an oracle for which: $NP^B \neq coNP^B$ The hint: consider the language: $L_B = \{ 1^n : \forall x \in {0,1}^n, x \in B \} $ Having seen the proof for $P^B \neq NP^B$ my thought process goes along the line that I want to show the following: $ L_B \in coN...
The way I understand is that complexity classes which are denoted with $\Sigma_i$ are representing a combination of alternating variable quantifiers which must start with an existential quantifier $\exists$, for example: $\exists y_1 \forall y_2 ... Q y_i$ and the last quantifier does not really matter. That is why we ...
I understand of the existence of Rice's Theorem, however, I want to understand better how this reduction is formed. My professor gives the answer as follows: "By contradiction, assume that $L$ is decidable and let $D$ be a decider for $L$. Then construct the TM $S$ such that $S$ decides the Halting Problem as follows: ...
In a simple weighted graph, with n vertices and m edges , for each pair of vertices we want to find the number of edges that appeared at least in one of the shortest paths between these two vertices. I assume we can solve it using Floyd-Warshall algorithm or something similar to it but I tried and didn't reach any algo...
I'm learning NFA and the following question is confusing me. Can Someone explain the answer. I have a feeling that it might be wrong. Thank you!
My question is simply this: is it possible to upper bound the output length of a halting turing machine? I.e., is there a function $f$ such that for every halting machine $M$ and every input $x$ we have $|M(x)| \in O(f(|x|))$? On the one hand, it seems like yes because every halting machine will leave some finite strin...
I am working through the exercises in the book "Term Rewriting and All That" and got stuck on question 2.3. The question reads: find a reduction $\rightarrow$ on $\mathbb{N}$ such that $\rightarrow$ is decidable, but it is undecidable for some $n$ in normal form. A friend and I came up with two different solutions. But...
Do any hash functions exist that provide the same result if the input is reversed? If this is impossible, why is it impossible? I am interested in sending packets of constant size around a circuit in a network in both directions, having each node add its value to the hash and then, when the packets meet, compare the ha...