instruction
stringlengths
35
29.1k
Given is a undirected and 1-connected graph G=(V,E). Between every two node b=(u,v) in graph G there is a cost c_b to build another edge(Regardless of whether (u,v) ∈E or not). We use a C={c_b |c_b∈Z^+,b∈V×V} to represent costs between every node regardless of whether (u,v) ∈E or not. Now, we want to add some edges M⊂E...
In a CS theory class I'm taking, we showed Halts was undecidable via a diagonalization argument. All other undecidable problems we looked at we either got by reducing Halts to them, or some chain of reductions that started with Halts. Are there any undecidable languages which Halts does not reduce to?
Let $S = \{ ⟨M,q⟩ | (\exists x) M $ reaches state $q$ when running $M$ on $x$$\}$, where ⟨M,q⟩ is coded TM M and state q. To prove that $S$ is semi-decidable, I've tried to use the equivalence: Language $L$ over alphabet $\Sigma $ is semi-decidable $ \iff $ There exists a semi-decidable language $M$, such that $L = \...
I'm interested in how the computer registers got their names, for example: eax and ebx. I couldn't find anything.
I've been reading about building Turing machines for specific purposes, and some sources talk about input encodings and some talk about programming specific machines, but I've been unable to find anything that discusses both. Here's a specific set-up: Suppose you have a universal Turing machine. It has a two-sided inf...
Given I have a $n$ dimensional $\vec{a}$. All elements of $\vec{a}$ are between 0 and a positive number $K$. $n$ is about 15 to 20. Problem I want to randomly and unbiasedly choose a vector $\vec{b}$ such that: Elements of $\vec{b}$ are between 0 and 1. $\vec{a} \cdot \vec{b} = 1$ How to do that? Attempt I thought ...
I'm supposed to prove this through mapping reducibility. I think I'm supposed to show that $A_{\mathrm{TM}} \le_\mathrm{m}\overline{L}$, which means that $\overline{A_{\mathrm{TM}}}\le_\mathrm{m} L$ and, since $\overline{A_{\mathrm{TM}}}$ is not Turing-recognizable, then $L$ is not Turing-recognizable. I think that $\o...
Uniform sampling over a $n$-dimensional standard simplex is described here: Uniform sampling from a simplex I want to sample one point from a non-standard simplex with vertices at: $s_{i}\vec{e_{i}}$, where $\vec{e_{i}}$ is the $i^{th}$ vector in the standard basis, and $s_{i} \ge 0$. the origin is : $\vec{0}$ How to...
I was wondering what is the most efficient algorithm to solve something like the following: You have $P$ people. You have $T$ tasks, each of which is a set of sets that represent all of the possible sets of people that could be used to complete the task. What is the minimum set of people required to complete all of the...
Let $\mathbb{F}_p$ be a finite field of prime order $p$. Define $r_q : \mathbb{F}_p \to \mathbb{F}_p$ as $r_q (x) = x \bmod q$ with $q<p$. A tad more formally, treat $x$ as an integer in $[0, p)$ and then perform the modular reduction mod $q$. For example, with $p = 5$ and $q=3$, we have: $$0 \mapsto 0$$ $$1 \mapsto 1$...
There is an undirected graph and some of the vertices are said to be stores. Person A wants to reach to person B with a present. That means person A has to stop by one of the vertices marked as stores and get the present first before ever reaching to person B. Moreover, each store has a specific waiting time, and if th...
Take the nearest neighbor algorithm for the traveling salesman problem as an example. Why is it used to find the upper bound? When can't it guarantee an optimal solution? (Thanks to many comments below, which suggest (and are invalidated by) the last update of this question)
What is the regular expression for the following language? $$L = \{acbc: a,b,c \in \{0,1\}^+ \}$$ maybe we can say $$L = ((0 + 1)^+ 0 (0 + 1)^+ 0) + ((0 + 1)^+ 1 (0 + 1)^+ 1)$$ Is it true??
Consider the following image: The problem is: can we cover the bigger rectangle with small rectangles such that no two rectangles overlap and no gap opens up? Prove that this problem is $NP-Hard$. I know that to prove that it is $NP-hard$, I must reduce a $NPC$ problem to it. However, I guess that the problem is not $...
Is there a standard name for the following algorithm? At each step, the code picks an index, remove the object at that index, and remember to never pick that index again. See the following illustration: Others have suggested the Fisher–Yates shuffle, but it seems like this algorithm is simpler. I found this algorit...
I translated the following $\lambda$-term: $z(\lambda b.ba)(tt)(\lambda y.y)$ in the following CL formula: $z(CIa)(tt)I$ through the Markov algorithm. Now I'd like to prove the translation was correct, and I know that's done by applying arguments to such CL formula and execute each constant by its rule. If I apply it t...
In chapter 4 of Jeffrey Shallit's A Second Course in Automata Theory the following problem is formulated as open: Let $p(n)$ be a polynomial with rational coefficients such that $p(n) \in \mathbb{N}$ for all $n \in \mathbb{N}$. Prove or disprove that the language of the base-k representations of all integers in $\{p(n)...
Show that $R^{+} \equiv R \leftrightarrow L(RR) \subset L(R)$ sigma is any alphabet. R is a regular expression. How can L(RR) even be a subset or equal to L(R)?
$L=\{\left<M\right> \ | \ M $ is a TM s.t. $M$ does not accept any string starting with a '1' $\}$. Assume the alphabet to be $\Sigma = \{0,1\}$. By Rice's theorem $L$ is undecidable. I managed to "prove" that $L$ is decidable. So can someone point out the error in my proof. To keep things clean I ignore the empty...
Do one have to define the upper and lower bound to be able to solve the tsp, or is that just an unnecessary intermediate step? And if so, why would one define those bounds? (context: the traveling salesman problem (TSP)) Additional question: After having calculated the upper bound (using eg. the Nearest Neighboor algo...
Is there a small-memory way to estimate how many unique strings have been encountered without needing to know the strings themselves? The trick is that we only have a tiny amount of memory to track what strings we have seen. Tiny like a 64 bit integer or 64 byte string. (The EZ infinite-memory solution is to keep a h...
Let $f$ be a continuous function and $[a,b]$ be an interval where $f(c)=0$ for some unique number $c \in [a,b]$ and where $f(a) f(b) \leq 0$. Suppose there exists a sub-interval $[a_0,b_0]\subset [a,b]$ so that $c \in [a_0,b_0]$ and some other function $g$ such that $g(x_1)=g(x_2)$ for all $x_1, x_2 \in [a_0, b_0]$. Al...
Suppose we have $n$ different summands. Is it possible to get the sum x with a maximum of two of the $n$ summands (Below the m summands there can be several times the same one). For example you have the summands (2,4,6,7). So its possible to get the sum $2+4 =6$,$6=6$ but its impossible to get the sum $3$ or $1$ ect. M...
Given two sequences $a$ and $b$, find largest $x$ such that in $a$ there is substring $A$ and substring $B$ in $b$ meeting those conditions: length of both $A$ and $B$ is equal to $x$; sum of elements in $A$ has the same parity as sum of elements in $B$. Lengths of $a$ and $b$ are up to $5\times10^5$, so simple $O(n^...
How many boolean functions exist that satisfy the following condition? $$\neg f(x_1,x_2,x_3,....,x_n) = f(\neg x_1, \neg x_2,...,\neg x_n)$$
I originally posted this on math.stackexchange, but then deleted it and moved it here since I think it would fit this site more. I saw a claim in a slideshow from a basic computer architecture course that given some boolean operator $T(x_1,...,x_n)$, if it is universal then necessarily: $$T(x,...,x)=\neg x$$ However, I...
How could you design an efficient algorithm that uses the least amount of memory space and outputs, in ascending order, the list of integers in the range 0..255 that are not in a randomly generated list of 100 integers? The aim is to output the number of such integers, and determine if the randomly generated list of 10...
Full question: Numbers of the form $a+b\sqrt{q}$, where $a$ and $b$ are nonnegative integers, and $q$ is an integer which is not he square of another integer, have special properties, e.g. they are closed under addition and multiplication. For $q=2$, some of the first few numbers of this form are given: $0 + 0\sqrt{2},...
Following is a Question from a competitive exam, it is given that the solution is A but I don’t know why the dead state 4 is not eliminated.Dead states like 4 which has transitions only to itself, should be eliminated right? UPDATE: My solution to the question in the comment
I'm studying Quick-Sort and I am confused as to how it works when the first element is chosen as the pivot point. I am trying to trace the first step in the Quick-Sort algorithm, to move the pivot S[1] (17) into its appropriate position. Example: [17, -10, 7, 19, 21, 23, -13, 31, 59]. ^# = pivot ^ pointer My underst...
I am given a homework assignment on this question: Show that if we add any number of incoming arcs, with any capacities, to the source node, the maximum flow value remains unchanged. Similarly, show that if we add any number of outgoing arcs, with any capacities, at the sink node, the maximum flow value remains unchan...
I understand the concept behind for and do/while loops, but I am trying to understand what is happening at the hardware level that allows a loop to run infinitely. Technically wouldn't it have to stop at some point because there are only a couple billion transistors in a microprocessor? Maybe my logic is off.
The question asks to provide an algorithm to compute $(i)$ The product of $n$-bit numbers using reciprocation operation and addition operation but not using multiplication and squaring. $(ii)$ The square of a polynomial of degree $n−1$ using only reciprocation and addition operation but not using multiplication and sq...
I'm trying to understand this claim. I see that if there are $S$ vertices, then we can identify each vertex using $\log S$ bits. Now each vertex can be connected to, let's say, $S$ other ones (is there some sort of restriction to the fan-out that I'm unaware of?). If we use an adjacency list, then for each vertex, we w...
I just read this definition for the longest path problem: LONGEST PATH Input: A graph $G=(V,E)$, an integer $k$. Question: Is there a path with at least $k$ vertices in $G$ This seems a decision problem and a certificate can be verified easily. But, what is the usage of such a problem? Isn't the main concern finding ...
I'm trying to prove that if $G$ is a connected graph, then $BFS(u\in G)$ is total (i.e. it visits all the vertices of $G$). The inductive proof consists in 2 cases: (i) Prove that $\rm{BFS}$$(u \in \rm{G'})$ is total, where $\rm{G'} = G \cup (u,v) \quad u,v \in G$ (ii) Prove that $\rm{BFS}$$(u \in \rm{G'})$ is total, w...
Been thinking about a problem recently and I am wondering if anyone can comment on some ideas to make solutions to this problem more efficient. Let's say that I am some business owner with a set of $n$ possible store locations $L = \lbrace x_i \in \mathbb{R}^m \rbrace_{i=1}^n$, for $m > 1$, where I'd like to build som...
Wikipedia's solution for multi Producer-Consumer problem uses both mutexes and semaphores. mutex buffer_mutex; semaphore fillCount = 0; semaphore emptyCount = BUFFER_SIZE; procedure producer() { while (true) { item = produceItem(); down(emptyCount); down(buffer_mutex); putIte...
Let's assume that we have a binary search tree with node Y that hasn't a right child and for whom a successor exists in the tree. I want to prove that if I insert a node X into the tree and node X is greater than node Y and less than the successor of node Y then X will be added as the right child of Y. Intuitively, thi...
In Parameterized Complexity the Independent Set Problem for a Parameter $k$ ist $W[1]$-complete, and Dominating set is $W[2]$-complete. Now the prototypical $W[1]$ problem is deciding by a single-tape non-deterministic Turing machines if it has an accepting run with at most $k$ stepts, and for $W[2]$ it is the same not...
I was doing a practice question. As you can see below there is an Implication graph. To check whether the problem is satisfiable, I checked whether there were any 'bad loops'. To do so, for each literal/variable in the boolean formula, I see if there is a path from X --->-X and from -X---->X if both exist then a 'bad l...
Let $L_1$ be the language over alphabet $\{0, 1\}$ defined by $L_1 = \{x : \#_{01}(x) \mod 3 = 0\}$. Give a regular expression that denotes $L_1$, and justify its correctness Attempt Believe this is asking for number of $01$'s in $x$ but $|x|$ must be an even number. Like $x = 0101$, $|x| = |0101| = 4 \mod 3 = 1$ woul...
Part of something I'm working on (or rather begin working on) involves white box approaches to facial recognition. I previously worked on something for character recognition using scene segmentation and neural networks but for faces I'm trying to challenge myself by not using neural networks or other AI strategies. Con...
Let $L_1$ be the language over alphabet $\{0, 1\}$ defined by $L_1 = \{x : \#_{01}(x) \mod 3 = 0\}$. Using as few states as possible, give a DFSA that accepts $L_1$. Also give an appropriate state invariant for your DFSA. I have a regex for it and that is $1^*(00^*11^*00^*11^*00^*11^*)1^*$. An example of accepted str...
I've been reading up on programming languages to better my understanding with the textbook Essentials of Programming Languages (3e) - Friedman & Wand. In a chapter regarding the states of languages (i.e. when we account for the effects that a computation may have rather than the immediately evaluated value), I've noti...
An encryption algorithm with information-theoretic security is one which even with infinite amount of computation cannot be broken. That is, given only the ciphertext, no amount of computation can reduce your uncertainty about the plaintext. Fully homomorphic encryption is, roughly, an encryption scheme where $\text{En...
For an assignment I have to proof that for two given decidable languages A,B, A\B is decidable too. My idea is as follows: If B is empty or doesnt have elements in common with A, then A\B is decidable because A\B=A. If B is not empty and intersects with A, A\B is just a smaller subset of A and therefore decidable. I ha...
I found that shell sort with the gaps of Fibonacci sequence has the lower bound complexity $\Omega(N \log N)$ in average cases. I want to know the upper bound complexity in average cases, so I write some of code to test it. It seems to be $O(N\log N)$ but how to prove it? Here is the lower bound of average cases anal...
By computable real I mean $x\in\mathbb{R}$ such that there is some computable total function $p_x$ that takes a natural number $n$ and returns a dyadic rational $r$ such that $|x-r|<2^{-n}$. I think this is probably equivalent to any other reasonable definition but I want to fix this to avoid ambiguity. By a semi-decid...
I came across this problem in an online judge: We are given a distance matrix consisting of $N$ rows and columns. The $i$th line of $j$th row is the distance between node $i$ and $j$ (not necessarily neighbors). The task is to find out if there exists a tree satisfying the given distance matrix or not. The only constra...
I have a formal language that describes digit production like <digit> ::= 0|1|2|...|9 and I need to intruduce fraction to write decimals like 3.14 and so on What did I do: <frac> ::= <digit><frac> | .<digit><frac> | <digit> I feel that the .<digit><frac> part is wrong, as every time we go this production we can subst...
Let us consider the class $\cal F$ of functions that contains all constant functions all projections the successor function the Ackermann function as basic functions, and that is closed under composition and primitive recursion. (If we remove the line with the Ackermann function from this definition, then this is th...
Given a graph G, how can I check that its diameter doesn't exceed log(n) (n is the number of vertices)- by using only O(log(n)) space? (adjacency matrix doesn't seems to help...)
I am trying to figure out if this language is decidable: $$ \{ \langle M \rangle \mid \text{$M$ accepts all strings starting with 010}\}. $$ My intuition is that it is. Whatever string $w$ starts with 010 it accepts, and if it doesn't it rejects.
I have an educational assignment to make an VLSI floor-planning tool. Can I use machine learning in some part of the algorithm? For example, I was reading the book Algorithms for VLSI Physical Design Automation by Naveed Sherwani, and here's a quote from there: Initial estimate on the set of feasible alternatives fo...
There is question in one of my exercise but I couldn't prove or disprove anything about it. This is language $L$ which is introduced with grammar: $$S \to 0S1 | 1S0 | AA$$ $$A \to 0A | \lambda|A1$$ My explanation and work: I know that we can prove with pumping lemma that a language is not regular. I know that if $L_1 \...
Would you say that the following problem is undecidable? $$L_1 = \{\langle T \rangle \mid T \text { accepts 14 words}\}$$ My intuition says that this must be undecidable, and I want to try to reduce it from the emptiness problem for Turing Machines. If we can tell whether or not a TM accepts 14 words, then we should b...
Note: my main experience with theorem provers is with Type theory based proof-assistant, rather than an actual automated theorem prover. It is obvious why naive automated theorem proving is inefficient: just doing an uninformed search through proof-space (e.g. with breadth first search) runs into the problem that the n...
I know that there exist type theory based proof-checker, and I know that there are logic/sequent-calculus based automated theorem provers. But I haven’t heard of a type-theory based automated theorem prover (nor of a sequent-calculus based proof-checker). Does a type-theory based ATP exist? (And a sequent-calculus base...
If P is a program that can be run in exponential time on a deterministic RAM. Can P always be run in polynomial time on a non-deterministic RAM?
I have a vague understanding what formal verification is about, a vague understanding of what the cutting edge is of type theory for programming languages, and a better understanding of formal proofs. So far as I understand, the purpose of formal verification is to (1) specify a set of “desired properties” in the form ...
While learning to prove undecidability of problems, I came across a statement that you can't reduce a recognizable language to a co-recognizable language and vice-versa to prove undecidability. Why is it so? Eg: Halting problem of TMs can't be reduced to Emptiness problem of TM $\qquad$ $H_{TM}$ = {$\langle M,x \rangle...
$L_n = \{x \in \Sigma^{*} | \exists w, y, z \in \Sigma^*, x = ywz, w^R = w, |w| = n \}$ Informally x is palindrome of length n where $\Sigma = \{0,1\}$ I'm having a hard time understanding this could someone please explain. For $n = 1$ $L_1 = (0+1)^*(0+1)^*$ (Why? What does this mean?) $L_1^c = ?$ (What would the com...
Sentence: From every reachable state it is possible to reach a state where $p$ is true. How do you write this sentence as a CTL formula? So far I only dealt with CTL syntax and trees but maybe it will also be asked in a test how you convert a sentence to a CTL formula.. So I've read that $AX$ means all next. Then $AXp$...
İf Somebody wants to play perfect chess.I consider for finding solution to this problem,possible minimum data compression method which describes with 10 bit maximum possible data is in the range of 2^10.Then with some formula which can take input as next move in the chess,There should be some formula that can change al...
I am interested in solving the following problem: Given an undirected graph whose vertices are weighted, find a subset of vertices of minimal weight whose removal disconnects the graph. Is there any known algorithm solving this problem? Here is an attempt at a solution (in python), using network flow: deg_G = nx.deg...
Propositional extentionality in the lean theorem prover is stated as the following axiom: axiom proptext {a b : Prop} : (a $\iff$ b) \to a = b My confusion about this is as follows: Previously I’ve read (in “introduction to type theory” by Herman Geuvers) that one key property of type theory is that we don’t say that...
It is well known that if some computing apparatus is Turing-complete, then the halting problem is undecidable for that computing apparatus. However, is it true that if the halting problem is undecidable for some computing apparatus, then it is Turing-complete?
In this formulation of quotient types in cubical type theory I was able to implement an eliminator and use that to implement basically curried function application. However, in all this, the only requirement on the factoring relation is that it is reflexive. I find this surprising. I would have expected transitivity an...
I am trying to implement a simple web search engine mechanism with using HITS algorithm. I understand how the algorithm work and produce hubs and authority values for each page. But how can I use this hubs and authorities values to sort web pages? Let's say I have 100 page, their urls, their contents and their hub and ...
I'm studying Binary Search Trees (BST) and I would like to verify that my understanding of BSTs is correct. For example, let S = [17, -10, 7, 19, 21, 23, -13, 31, 59]. Binary Search Tree for S, with S1 as root: How many comparisons is needed to search this tree for the presence of each of the elements in I = {-13, 31}...
Let $n\in\mathbb{Z}$ and $0\leq b\leq63$, $b\in\mathbb{N}$. Find the $b$-th bit for the number n on it's $64$ bit representation with sign. and $T$ be the number of test cases. This is my attempt: #include <iostream> #define f cin #define g cout using namespace std; int T; long long n; int b; int main() { f >> ...
I'm trying to develop an Algorithm for Polygon Intersection. Where each polygon is an array of Points, where each Point has X and Y properties. Algorithm limitations: - Algorithm input: 2 Polygons. - Algorithm output: Intersection Polygon. - Polygons may be convex or concave (angle between 2 neighbor edges my be more ...
I am learning about stream algorithms and am implementing Count-Min sketch data structure. I am also learning to approximately solve the HH problem with sublinear space complexity. I want to know what are some of the basic applications of HH problem.
If I have two languages L1 and L2 that are pumpable, what is the minimum pumping length for the union of them? Does it differ if either of them contains just one string like 001?
Chinese postman problem, but where the postman have to visit each vetex at least once. Is there a name for this problem? What is the ideal algorithm to solve this problem?
Let $q$ be a prime number and let $\mathbb{Z}_q = \left\{1,\dots,q-1\right\}$; I need to prove that the family $\mathcal{H} = \left\{h_s \colon \mathbb{Z}_q \rightarrow \mathbb{Z}_q\right\}_{s \in \mathbb{Z}_q^3}$ is 3-wise independent, where $h_s$ is defined as: $$h_s(x):=h_{s_0,s_1,s_2}(x):=s_0 + s_1 x + s_2 x^2 \bmo...
Let $L_{n} = \{x \in \Sigma^* | x = ywz, w^R = w, |w| \geq n, |y| = |z| \}$ Generate a cfg of $L_n$ For n = 1, 2, 3 Informally, x is in $L_n$ means some palindrome of at least length n is a substring of x that occurs exactly at the midpoint of x. for $n = 1$ $S \to 0S0 | 1S1 | 0S1 | 1S0|0 | 1 | 00 | 11$ for $n...
Let's say I have a Las Vegas algorithm $L$ for some problem $P$, which runs in $n^3$ steps with 50% likelihood. My friend asks me for an algorithm for $P$ that runs in $n^3$ steps with 75% likelihood. My intuition says, "No problem! I'll just run $L$ once, and if it doesn't return after $n^3$ steps, I'll terminate it. ...
Proving that L is not regular by showing that $\equiv_L$ has infinite index. $\Sigma$ = {a}, L = {$a^{3^n} : n \geq$ 0} My ideas: theorem of Myhill-Nerode: L $\in$REG $\Leftrightarrow$ $\equiv_L$ has finite index We show: $\equiv_L$ has infinte equivalence classes. $a^{3^i}$ $\not\equiv$ $a^{3^{i+k}}$, $k>0$ -> equival...
I try to design a LL(1) grammar to parse the basic regular expression. Here's the origin grammar.(\| is the escape character, since | is a special character in grammar's pattern). E -> E \| T | T T -> TF | F F -> P* | P P -> (E) | i To remove the left recursive, import new Variable E -> TE' E' -> \| TE' | ε T -> FT' T...
Usually formal grammars have production rules in the format N=tNt where simple concatenation function is used for the expansion of the nonterminal. https://www.grammaticalframework.org/ has concrete grammars (e.g. FoodEng https://www.grammaticalframework.org/doc/tutorial/gf-tutorial.html#toc19 grammar) with more genera...
I am looking at the following implementation of Quicksort that uses Hoare partition scheme (two approaching indices $i$ and $j$ starting from either end of the array). I am having trouble seeing why in the inner while-loops, the condition $i \leq j$ is needed in addition to checking $M[i] \leq p$ (or $M[i] > p$). What...
The convolutional layers are most computationally intense parts of Convolutional neural networks (CNNs).Currently the common approach to impement convolutional layers is to expand the image into a column matrix(im2col) and perform and perform Multiple Channel Multiple Kernel (MCMK) convolution using an existing parall...
I'm plotting the fitness histogram of my particle swarm optimizer - i.e. the individual fitness scores for each particle and iteration - during a run. The problem tackled is basically curve fitting/predicting time series data. In some runs I'm seeing a rugged landscape with no tendency towards a stabilization of fitnes...
How to balance this AVL tree after inserting node 5, using left/right rotations as indicated in the AVL tree tutorial. I have tried applying both double rotations but with no luck. Either of the double rotations still ends up producing a tree with imbalance as indicated above. Do you mean the below solution?
I am learning hash tables, and I would like to know how to determine the average length of the linked lists. For example: A hash table holds about 10,000 employee records. Each record is indexed by the 2-character initials of the employee name, transformed into integers using the mapping: A=01, B=02, C=03, and Z=26. On...
I am looking for the name of an algorithm category, or even specific algorithms, that solve the following problem. I have noisy data. For simplicity, let this data be represented by numbers. I have the full data set in RAM. In this noisy data, I want to find signal. Signal is an interval of contiguous numbers that ...
How to check if a given point lies inside or outside a polygon with holes? Does the below algorithm works for polygon with holes? https://www.geeksforgeeks.org/how-to-check-if-a-given-point-lies-inside-a-polygon/
Hello i am studying about LZW algorithm by watching this video: https://www.youtube.com/watch?v=j2HSd3HCpDs&t=481s I couldnt fully understand decoding process. At current 258,how does 116 come at add to dictionary part ? At current 256,how does 101 come at add to dictionary part ?
Are there any known problems in $UP \cap co-UP$ other than integer factorization and parity games (or a problem that can be reduced in polynomial time to either problem), that aren't known to be in $P$?
I have a basic understanding how operators work (bitwise, logical, unary, ternary, etc.), but I am confused how you define what the operator does so the machine knows how to treat the operator when you use it in your code base. Are operators predefined by the compiler and is there a way for me to access the source code...
In Aurora and Barak, they give the following alternative definition of $BPP$: What is the meaning of the subscript to $Pr$? Is that $Pr_{r \in_R \{0,1\}^{p(|x|)}}$? My guess is this is supposed to represent $poly(|x|)$ many coin toss results, but what is $R$? And why is this a subscript to $Pr$?
I am trying to write a Turing machine enumerator that enumerates the language where $w = 0^n1^n$ and $n ≥ 0$. So for example it should output the following to the first tape: e,#,0,1,#,0,0,1,1,#,0,0,0,1,1,1 etc. Here e means empty, i.e., to leave that index blank. I can't figure out how to display this as a Turing mach...
I have the following optimalization problem. I use the notations below because maybe it would be easier to understand that way, but I'm not good at conventions – I'm not sure if I'm using it all the right way – so feel free to correct me on this. We have multiple tasks, $T_1,…, T_n$. Each of them has exactly one type (...
For a while, all classification tasks in natural language processing were based on simple RNN's, which operate in a very word-by-word order. Adding gating mechanisms increased ability to "look back", and the newer addition of context vectors which can train attention to different words during the task have made classi...
It's well known that depth-first search order of a graph is (usually) not unique, and multiple orders are possible depending on the order in which successors are processed for each node. Let's consider rooted directed graphs in the following discussion. Muchnick 1997 gives an example: . Intuitively, DFS with (more) for...
I saw the following animation at making sense of PCA , which shows blue data points. I am reading a paper on Eigenfaces which says that: "a typical image of size 256 by 256 becomes a vector of dimension 65536 or equivalently a point in 65536 dimensional space" The paper is available at the following link: Eigenface...
I have this NPDA for language L = {w: num_a(w) == num_b(w)} all loops in q1 a, $ -> 0$ b, $ -> 1$ a, 0 -> 00 b, 1 -> 11 a, 1 -> \lambda b, 0 -> \lambda ------>q1-----------------\lambda, $ -> $------>q2 initial state: q1 final state: q2 What if I modified L such that the number of a's is not ...
$B = \{w \in \{0,1\}^* | w^R = w, w \text{ length is odd} \}$ Solution: For example: $111$ should be accepted steps are $q_1 \to q_2$ stack: [$\$$] $q_2 \to q_2$ stack: $[\$, 1, 1]$ (using up $11$ only having a single $1$ left) $q_2 \to q_3$ stack: $[\$, 1, 1]$ (no change except we lost our final $1$) $q_3 \to$ (no st...