instruction
stringlengths
35
29.1k
So, there is an idea about multi-dimensional behaviour selectors that goes like follows (based on paper by R.Hirschfeld and P.Costanza : "Context oriented programming"): "selector": in 1D lookup we only have a name for our behaviour, which directly selects the function (i.e. in procedural languages, like C) "selec...
I know that an equation $$a^x \equiv b \pmod{p}$$ can be solved for $x$ in $O(\sqrt{p} \ log(p) )$ time using meet-in-the-middle technique, which relies on fact that we can rewrite the equation as follows: $$a^{nk} \equiv ba^{h} \pmod{p},$$ where $nk - h = x$. I want to know whether one can solve the following equa...
I am solving general black-box optimization problems like: x*: f(x) -> min, where x are permutations of length N (N = 50 for example, so brute force search is not possible). Objective function f(x) is represented by stand-alone computer code and x represents configuration of complex system with the response simulated b...
Edited: Suppose we have 4 sets $A, B, C, D $ which can can hold a maximum of two elements, each. Now, elements ($E_i$) arrive serially with properties such as: E1 : Should be placed in either B or C. E2 : Should be placed in either A or B or C. E3 : Should be placed in either A or B. When an element arrives, we have ...
I wrote a program to discover how height of the tree is relative to the number of elements in the tree (nodes). On first test I filled array with 10-50-100-200...-1000 elements of random numbers from 0 to 32k~~ and checked their height and then second array with the same number of elements, however this time keys were ...
Is the intersection of infinitely many recursive sets $\bigcap_{i}U_{i}$ (where each set is different ) recursive? Recursively enumerable? I know the union need not be recursive, because deciding if an element is in the set $U_i$ is the same as deciding the Halting Problem since you for each element you'll have to dec...
Is there a $O(|V|+|E|)$ algorithm to find and remove all parallel edges in a directed graph? I'm stuck because each idea I've thought of boils down to $deg(v)^2$ comparisons per $v$ which is of course not linear. Thanks.
I am stuck on this problem and unsure how to proceed. I understand how to show that two languages are closed under regular operators, but not one like the 'swap' operator. Let swap : {a, b}∗ → {a, b}∗ be the function that exchanges the a’s and b’s in a string. For example, swap(baaba) = abbab and swap(aaaa) = bbbb. For...
I am trying to prove that if a language $ L $ of binary strings (i.e. a subset of [01]*) is regular then so is the transformed language $ plus (L) $ consisting of the binary representations of those integers one greater than those represented by the elements of $ L $. That is to say $ plus (L) = \{ plust (l) : l ∈ L \}...
If someone solved the P vs. NP problem, would they be able to keep it a secret and make money off of it by, say, starting a software or security company? Or would they only be able to publish it for everyone to know? Also, would that person (realistically) be at risk of being kidnapped, tortured, killed, etc. by gov...
Given two integers m and n where m < n find the maximum pair-wise xor sum. The question is how to choose m distinct integers from 1 to n such that using those m numbers yields the maximum pair-wise xor sum. The maximum pair-wise xor sum is calculated on a set of integers x as F(x) = sum( number_of_bits( xor(x[i], x[j]...
Is the $L$ = { $<M>$, $M$ is a DFA accepting all strings except finitely many. } decidable ? I am sort of confused about the question - what exactly does $M$ accept. How are those finitely many strings look like for a particular $DFA$? It is known that $DFA$ accepts infinite number of strings if it accepts at least one...
I am trying to create a heuristic function for use in an A* algorithm. The problem to be solved is a single row tile puzzle with 3 total w tiles and 3 b tiles and one "_" tile as shown below WWW_BBB The goal of this puzzle is to get the white tiles on the right of the black tiles regardless of the position of the "_". ...
I'm reading the paper An Empirical Evaluation of In-Memory Multi-Version Concurrency Control which is about implementations of MVCC for in-memory databases. Section 3.3 on Two-phase Locking (MV2PL) says: To perform a read operation on a tuple A, the DBMS searches for a visible version by comparing a transaction’s T-...
I have been doing a fair amount of research about the halting problem. Most solutions I come across have the following pattern: We assume we have a program H that solves the halting problem. We then define a new program P that takes a program x, and uses H(x) to figure out if x halts. If x does halt, then we make P go ...
If Manufacturer manufactures electronic equipment, then manufacturer generates e-waste. I have generated the triple. However how to represent the if-then statement in DL? manufactures(manufacturer, electronic eqpt) generates(manufacturer, e-waste)
I have the need to parallelize as much as I can (in order to make it run fast) the following part of an algorithm: do i=1, n do j=1, n A[i, j] = A[i-4, j-4] + A[i-3, j-3] + B[i, j] end do end do I was thinking that the best i could do here is a loop skewing (but with what factor?) and loop interchange that wou...
** Edit: I just noticed my current algorithm is incorrect, as it only finds paths starting/ending at the given node. I'm trying to figure out a solution, but I'm a bit stuck. Say I have an undirected graph. I would like to find all possible combinations of nodes that could be connected with a single path, that include...
This is a question I have after listening to a lecture. def gosperize(curve): scaled_curve = scale(sqrt(2)/2)(curve) left_curve = rotate(pi/4)(scaled_curve) right_curve = translate(0.5,0.5)(rotate(-pi/4)(scaled_curve)) return connect_rigidly(left_curve, right_curve) def gosper_curve(level): return...
I have the following algorithm x = 0 S = {} k = 1 while x + a[k] < n do S = S + {k} x = x + a[k] k = k + 1 end where a[k] is a positive integer. What is the time complexity in terms of number of iterations of this algorithm? I tried to compute the number of operations. As I understand, I should find how ma...
If you calculate the area of a rectangle, you just multiply the height and the width and get back the unit squared. Example: 5cm * 10cm = 50cm² In contrast, if you calculate the size of an image, you also multiply the height and the width, but you get back the unit - Pixel - just as it was the unit of the height and wi...
As an academic exercise, I have to write a parallel algorithm that given a sorted array of $n$ integers computes the mode (i.e. the item with the highest frequency) efficiently using $p$ processors, where $p \le n$ is a constant. The model we use to describe these algorithms allows lock/unlock primitives to synchronize...
I have a task to test the time required to evaluate a specialised function and a generalized function that aims to get the same output, and conclude whether there is a speed advantage of using one over the other. It turns out that the time in milliseconds differ by roughly 0.835ms. My question is whether a difference o...
I was trying to prove following lemma, my_thm : ¬ (∀ {M : Set} (P Q : M → M → Set) → (∀ x → ∃ M , λ y → P x y ∨ Q x y) → (∀ x → ∃ M , P x) ∨ (∀ x → ∃ M , Q x)) my_thm = ? while Agda gives following mistake: Set₁ != Set when checking that the expression {M : Set} (P Q : M → M → Set) → (∀ x → ∃ M , λ y → P x...
I have been coding and testing Neural Networks for a while but as of now I have only used IMAGE datasets. (i.e. I have M training images and N testing images). Some datasets are video datasets. The UCSD Peds dataset for example has the following variants: Peds 1: 34 training videos (of 200 frames each) and 36 testing v...
Let's call G a DAG (directed acyclic graph) with N nodes labeled with a natural value. We define the cumulative sum of a node v as the sum of the value of all the ancestor nodes of v (including v). For example, the cumulative sum of d in the following DAG is 7: a (2) / \ v v (1) b c (3) \ / ...
I need some help with basic definitions and intuition to understand why and how it's possible to verify systems with infinitely many states. For example, if I consider an x86 computer, and assuming the CPU architecture is a large and finite state machine, it will have infinitely ($\aleph_0$) many possible states (seque...
I've seen how sigmoid would be used in machine learning sigmoid(dot(activations, weights)-bias) like this ^ but sigmoid makes sure your values are between 0 and 1. So how would ReLU ( max(0,x) ) be swapped out for sigmoid, if it doesn't clamp your values to a 0 to 1 range? Or would I just use tanh(x) in the output lay...
I was given this question: Let M = (Q,Σ, δ, q0, F) be a deterministic finite automaton. Assume that r∈Q is a state of M that is different from the start state q0. Define the language A⊆Σ* to be the language consisting of all strings that are accepted by M and cause M to enter the state r at least once. Give a precise...
Some terminology at first: Multiplicative 2-partition for number $N$ - a pair of numbers $\{A, B\}$ such that $AB=N$. Minimal multiplicative 2-partition length (denoted $l$) - minimal total number of bits needed to encode multiplicative one of 2-partitions. Example: Let $N = 36$. Then possible multiplicative 2-partit...
I am exploring how a Dynamic Programming design approach relates to the underlying combinatorial properties of problems. For this, I am looking at the canonical instance of the coin exchange problem: Let S = [d_1, d_2, ..., d_m] and n > 0 be a requested amount. In how many ways can we add up to n using nothing but the ...
What is the number that a minimum spanning tree can have a vertex with degree at most? Is there any rule? Is it related to the number of vertex or edge? Or not?
Is there a way to calculate some kind of numerical 'score' for arbitrary strings which when compared with score of some other string will preserve '<' relation? I've searched for order preserving compression/hashing but what I've found is either based on precomputing with known set of strings or is a some for of lossle...
Given a WAVL tree with pointers to its' minimum and maximum, we will add two operations: Insert-Max: given an element, which is bigger than all other elements in the tree, add it as the right child of the maximum element, and update the max pointer. Delete-Min: find the successor of the minimum element, delete the mini...
On a website it gives you questions and answers for computer science, yet does not explain the answer. I was hoping if someone could explain the pseudo-code (answer) for me, as I do not understand it. Especially the store index part - which is basically the entire pseudo-code. Thank you. More specifically: line 4, line...
so I've been looking around and haven't seen this before. Basically I'm working with a problem in which I need to expand/FOIL out. Something in the form of $$ z = (x+y)(x-y) \implies x^2+xy-xy+y^2 $$ but for any input with $n$ number of operations. $$ z = (x_1+x_2+x_3+...+x_n)\cdot(x_1+x_2+x_3+...+x_n)\cdot...\cdot(x...
What is a reducible flow graph? sorry if this is a stupid question but I'm having trouble finding an answer. Also multiple equivalent definitions and some motivation would be nice too.
Consider two computers $A$ and $B$. $A$ uses $G$ and $B$ uses $G'$ for the CRC computation. It is given that $\deg G \ne \deg G'$. Computer $A$ wants to send a data $D$. The claim says that: There couldn't be data $D$ such that $A$ sends it as a CRC-message corresponding to computer $B$ which will accept it as a valid...
My computer science professor introduced an interesting game in order to get us (his students) more familiar with the Stack and Queue ADTs. Game Description The banana game is played with a container -- e.g., a queue or a stack. The object of the game is to find a sequence of steps that will read a given string (i.e., ...
Hello friends need a bit of help, I Know that given: $$L_1 \in L_{cfg}, L_2 \in L_{reg}$$ $$L_2/L_1\notin L_{cfg}$$ because if it was contex free it would imply that $L_{cfg} $ is closed under complement and this is not true. But at another glance I can build a product construction of pda and dfa that could solve thi...
I'm new to CS and being aware of what algorithms exist, but what data structure allows you to have fast lookups of single points within a distance in 3d? e.g. (with 2d circles instead of 3d spheres) I would expect the first location to return null, and the second one to return circle a. Circles can not overlay, circle...
I need to store a list of sequential intervals. So for example I would to say: {0-5} = a {6} = b {7-10} = c and so on. I need to add and remove items from this list: .insert(d,{1,3}) will make our array: {0} = a {1-3} = d {4-5} = a {6} = b {7-10} = c Morehover you may need to check what items cover a range: .itemsI...
I have an algorithm with three variables affecting the time complexity: $k$, $L$, and $n$. I have come up with the following that expresses the complexity: $O(kn + k^2L + k^2nL + knL)$ I think I should be able to simplify this to: $O(k^2nL)$ Am I correct? I'm a little fuzzy on how to simplify things when working with m...
Let $G$ be a connected undirected graph, with integral positive weights on the edges, and let $e_1$ be an edge of $G$. As part of an assignment I proved the following Lemma 1: The edge $e_1$ appears in any MST of $G$ iff $e_1$ is a light edge in any cut $C$ that it crosses. Is it equivalent to the following Lemma 2? ...
Given undirected connected graph $G=(V,E)$ and a weight function $w:E\to\mathbb{R}$, two MST's $T_1, T_2$ are nearby if there exists $e\in T, e'\in T'$ such that $T'=(T-\{e\})\cup\{e'\}$. Prove that for every $T, T'$ there exists a series of $T=T_1,T_2,...,T_k=T'$ such that every two consecutive MST's are nearby each o...
in the book "Introduction to algorithms"(CLRS) page 49 it says: "The number of anonymous functions in an expression is understood to be equal to the number of times the asymptotic notation appears. For example, in the expression: $\sum_{i=1}^n O(i)$ there is only a single anonymous function (a function of i). This...
I have a directed graph and and a set of nodes(set = [1,2,5,9,24...]). I want to find a path that contains all the set of nodes and this path dont contain back edges(cycles) and forward edges. For example for set = [1,3,4] the following path is acceptable: but for the same set of nodes the following paths are not acce...
One of the questions in the problem sets that I'm struggling in is this specific number that asks me to prove an iterative Fibonacci algorithm. The algorithm is written below: function fib(n) if n = 0 then return(0) else a = 0; b = 1; i = 2; while i <= n do c = a + b ...
Considering only basic relational algebra operations, how can we implement the full outer-join ?
The assignment problem is to find the minimum weight perfect matching in a weighted bipartite graph. This problem can be solved using the Hungarian algorithm in polynomial time. It is also possible to enumerate assignments one-by-one in increasing order of their weights using methods like Murty's algorithm, where each ...
Reduction from ATM. Assume that EVEN TM is decidable with decider MT. We now show how to build, given a ⟨M, w⟩ a machine description ⟨M'⟩ that satisfies the following faithfulness condition. If M accepts w then M' accepts every even-length string If M does not accept w then M' does not accept every even-length string M...
I'm writing a scheduler of long-lived Processors which execute long-lived Tasks. Processors and Tasks may each come and go over time, at any time (when a Processor departs, its assigned Tasks now become available for other Processors). Additional constraints exist which can be modeled as a flow network (eg, Tasks can d...
Here is some content from the book by Peter-Linz I read "Consider a game-playing program where the machine needs to make the decision for the next move [say for tic-tac-toe]. Since there are multiple moves possible, we deterministically choose each move and evaluate the move and opt for the best one. Even though the s...
Let $h:U \to[m]=\{0,1,\dots,m\}$ be hash function, which can calculate $h(u), \forall u\in U$ in $O(1).$ Let $D \subseteq U$ be a subset of size $n.$ I'm looking for a deterministic algorithm, efficient as possible, to find the number of collisions of $h$ on $D$ I thought to start operating $h$ on all elements in $D,$ ...
I'm interested in how does cpu read 32 bit word from memory .If the processor has 32 bits of address space then it can address 4,294,967,295 locations (or 4 gb) Does this mean that each location has 32 bits.?
I can't seem to find anything about this and I wonder if I'm asking a silly question. If you have three languages $L_1=\{a,b\}, L_2=\{c,d\}, L_3 =\{e,f\}$, can they be concatenated? If yes, would you concatenate the first two and concatenate the result to the third one or would you concatenate it as $\{ace, ade, acf,...
This question is meant as a follow-up this question and my answer here. The question asked multiple questions about algorithms for playing Rummikub and my answer provided an algorithm that, given a set of Rummikub pieces $S$, determines whether they can be arranged as a set of valid plays (called an arrangement). Howe...
I have $P$ processors, each having a different vector $v_p$ of size $N$, $p=1, ..., P$. I now want to compute the matrix-vector product $$w = (E\otimes I_N)v$$ in parallel, where $\otimes$ is the Kronecker product, $v = (v_1, ..., v_P)^T$ is the stacked vector consisting of all local vectors $v_p$, $E = (e_{pj})_{p,j}\...
I am writing an algorithm to test whether a NFA accepts or not a string, and there is a case in which I don't know how the algorithm should behave namely: How should the algorithm behave? Should it stop and understand that no string is accepted or should it run for infinite time?
I have been thinking about the No Free Lunch (NFL) theorems lately, and I have a question which probably every one who has ever thought of the NFL theorems has also had. I am asking this question here, because I have not found a good discussion of it anywhere else. The NFL theorems are very interesting theoretical resu...
Supposing we have either a NFA or a DFA with accepted language $L$, what is $L^*$? And how can I build an automaton that accepts it?
In "regret" styled analysis over $T$ steps of an iterative algorithm $\{x_i \in F \}_{i=1}^T$ (where $F$ is some feasible set) being given the sequence of loss functions $\{ f_i\}_{i=1}^T$ one defines the regret $R_T = \sum_{i=1}^Tf_t(x_i) - \min_{x \in F} \sum_{i=1}^T f_t(x)$ Most typical analyses assume that the $f$s...
I'm using the definition of the height of a tree as the longest possible path from the root to a leaf by its number of edges, e.g. a tree of 2 nodes has a height of 1. With that in mind, what would be the number of binary search trees (don't have to be balanced) that have the maximum possible height for n-nodes? So ...
Is there an algorithm that removes edges to convert a non-planar DAG to a planar DAG while maintaining reachability? For example, the graph $G$ below is non-planar: but, by removing certain edges to produce $G'$, it can be made planar but every vertex still has the same transitive closure (meaning vertex $t$ is reacha...
I'm trying to write an induction statement to prove a full node in a tree but I have no idea how to do that. I've always been terrible when it comes to logic. Where do I even start with this? I know that a full node has 2 children.
Assume I have $P$ processors, each having a different vector $v_p$ of size $N$, $p=1, ..., P$. I learned in this question/answer that for computing the matrix-vector product $$w = (E\otimes I_N)v$$ in parallel, where $\otimes$ is the Kronecker product, $v = (v_1, ..., v_P)^T$ is the stacked vector consisting of all lo...
I have the following problem. Given an array A, filled with 0s, we should set some elements to be equal 1, considering such rules: If all elements equal 0,set A[0] to 1 Next 1 should be set at maximal distance from any other 1s. At this stage it will be A[size-1]. In case of equal distances, set 1 at the element with ...
I am prety stuck over here: prove or disprove that every $L$ got $L'$ s.t $L'\geq L$ and for every $L''\geq L$ $L''\ngeq L'$ basically it means L' is the hardest... my intuition tells me that this is correct, but I cant prove why. I tried to prove using counting but got stuck: we got $\aleph_0$ pairs of functions th...
I'm looking for a way to recognize and possibly extract source code from text files that may contain only source code, source code mixed with plain text or just plain text without any source code. There's different source code contained in the data set, just to name a few examples: Java, C, Python, Bash, PHP, Javascri...
The deferred acceptance algorithm solves the Stable Marriage Problem in a two-sided network, where each agent has complete preferences over each agent of the other side. There is always at least one stable matching but there can be several. Traditionally, the problem was solved by having men propose and women accept/re...
Question: Given that f(n)>0 and c>0 Prove that f(n)+c = O(f(n)) or provide a counter-example if it's false. My Effort to solve: \begin{eqnarray*} f(n) + c \space \leq \space d\cdot&f(n)\space for \space all\space n \geq n_0\space and \space d>0\\ \end{eqnarray*} So i believe there can be found some large d that s...
This is how I would think it n^2 = O(log n) f(n) <= c*g(n) should c=1 ? n0 = 1 n^2 <= log n 0 <= log n - n^2, for all n>=1 we take n=1 then 0 <= log(1) - 1^2 0 <= 0 - 1 0 <= -1 Therefore n^2 = O(logn) false? Is this correct?
I have an algorithm for finding if there is a cycle in a connected graph by depth first path creation of a graph until there is a duplicate in the path. Beside simply starting this algorithm at all possible points for an unconnected graph, how can I find if an unconnected graph is cyclical in good time and in a simple ...
I stumbled upon an interesting problem and I'm stuck with it, since I can't find parallels to other problems or algorithms to solve it. We have a set of objects $O = \{a,b,c,...,z\}$, objects can make triples, e.g. $T=(a,b,c)$ $a,b,c \in O$ and we have a set of triples $X = \{T_1, ... T_n\}$. Each triple is assigned a...
I was reading Stanford's CS 229 materials on Linear Quadratic Regulation (LQR) (Lecture note 13, YouTube Lecture 18, around minute 36), and it mentions that: [...] the quadratic formulation of the reward is equivalent to saying that we want our state to be close to the origin. For example, if $U_t = I_n $(the identity...
Why is it that the test for an infinite language on the DFA $M$ has an upper bound of $2n$? That is to say, when testing for a string of length $k$, why does the theorem say: $$n \leq k < 2n$$ I understand the lower bound of $n$ IAW the Pumping Lemma of $|w| \geq n$. I'm just not sure why $2n$ was chosen and I think I'...
There is already a post on this topic on stackoverflow. Nevertheless, I am asking the question here again, primarily because I do not understand the answer given there, and also because I have some takes on the problem I would like to supplement with. To reiterate, we have a problem in CLRS which goes like this: Show ...
I have been looking into vpn (virtual private network). And I wanted to know more about the theory, how does it work really: what does it do with the packages? why is it secure? (or why can it be unsecure) how does it work on the internet? how can it simulate you're coming from another country? It feels so mainstream...
Given an array of $N$ numbers and a number $K$, Find the minimum number of swaps required to bring all the numbers greater than or equal to $K$ together. Swap here means, swapping value of $array[i]$ and $array[j]$, where $1 ≤ i , j ≤ N$. We are also given that: $1≤N≤10^5$ $1≤array[i]≤10^5$ $1≤K≤10^5$ Sam...
I'm trying to work out how to find the gamma $\gamma -code$ that encodes the postings list (12, 18, 21, 22). Is the postings list encoded just by a list of the individual $\gamma$-codes for each integer? E.g. for 12 the gamma code is: 0001100, and so the first entry in the $\gamma$-code for the pointing list is just 00...
I'm looking for a data structure, in which the operations $Init, Median, Min, Max, Delete$ run in $O(1)$ amortized-time, and $Insert$ should run in amortized-time as low as possible. I tried to work with Min-Max Fibonacci heaps and pointer to median, but got stuck. I believe the $Insert$ operation can be done in $O(\l...
What i know is that applications create "socket"(visualized concept for high level programmers),the socket will address the ip addresses and send to internet and forward the feedback data.What i wonder is do applications send tcp packets directly to hardware interface or through another program like firewall?And how ex...
Let's say we're talking about a 1 GB video file. It's copy-pasted from hard disk D1 to the hard disk D2, then from D2 to D3, and so on, all using Windows. If we continue this process for like 1 million times, what would the resultant file look like? Do error bits accumulate and finally corrupt the file?
Lemma. (Transitivity) "$\leq_p$" is a transitive relation on languages, i.e., if $L_1 \leq_p L_2$ and $L_2 \leq_p L_3$, then $L_1 \leq_p L_3$. Proof. By definition, there are poly-time functions $f$ and $g$ such that $x \in L_1 \Leftrightarrow f(x) \in L_2$ and $y \in L_2 \Leftrightarrow g(y) \in L_3$, thus $x \in L_1...
A 010101 B 110011 C 111000 D 000111 The minimum Hamming distance of those code words is 3 as the minimum difference is 3 but the correct answer is 2. How can I find the correct Hamming distance?
I have collected data from numerous volunteers driving a simulator in 8 different scenarios (classes). A volunteer drives in a map for 4 minutes in one scenario (one experiment), then he drives in the same map for 4 minutes in a different scenario(second experiment). Our current dataset has around 0.4 million rows of ...
For any non-planar DAG, we can compute the transitive reduction, and sometimes it will be planar (e.g. $K_5$). However, sometimes the transitive reduction is also non-planar. For example, $K_{3, 3}$'s transitive reduction is just $K_{3, 3}$. Alternatively, it's possible to add vertices and adjust the edges to maintain ...
I was reading the question Consistency and completeness imply soundness? and the first statement in it says: I understand that soundness implies consistency. Which I was quite puzzled about because I thought soundness was a weaker statement than consistency (i.e. I thought consistent systems had to be sound but I gue...
What is meant by in the following statement (from the paper titled "Implementing Lightweight Threads"): As in singlethreaded processes, the number of signals received by the process is less than or equal to the number sent. Why is the number received less than or equal to the number sent. I don't have enough backgr...
Given a 2D image of a human face and the corresponding 3D shape, how do I project the shape onto the images to extract texture patches from them to form a partial UV map?
I was wondering what is the difference difference undecidable language and Turing recognizable language. I've seen in some cases where they ask: Prove that the language $ A_{TM} = \{ \ <M,w> | \ M \mbox{ is a Turing Machine accepting } w\}$ is undecidable. Prove that the language $ A_{TM} = \{ \ <M,w> | \ M \mbox{ is ...
Given a $G=(V,E)$ bipartite, undirected, 4-regular graph, I would like to find a perfect matching in linear time. It is easy to show that there is a perfect matching for the graph, by using flow and showing a flow of size $|V|/2$. Using flow networks, we can also use Dinic's algorithm to find the max-flow which is equa...
I have a research problem which has a general outline as follows: I have a 2D parameter space, $(\alpha, \beta)$ which serve as initial conditions on some set of partial differential equations. Given values for $\alpha, \beta$ I can integrate this set of PDEs numerically to obtain a result in a 2D phase space $(x,y)$. ...
Do we know of any necessary condition for a Boolean function or say a depth $2$ LTF circuit to have a low (~poly(dim)) sign-rank?
If one ignores the conflicts when accessing the dequeue in Work-Stealing algorithms, does it matter (and in what ways) if one steals from the top or bottom (or anywhere randomly) of the dequeue? Does it matter (and in what ways) if one steals one or more items ?
Until just now I thought that I have fully understood Rice's theorem but this example irritates me: $L^* = \{ \langle M \rangle \mid M \mbox{ is a Turing machine such that }L(M) = H_{all} \mbox{ } \}$ where $H_{all}$ denotes the totality problem. Correct me if I'm wrong but in my opinion this is not the same as $L' = ...
I found this problem on an algorithmic book. I have solve the requestments about time (O(n^2)) but I can't figure out how it works. Input: Two n-bit integers x and y, where y ≥ 1 Output: The quotient and remainder of x divided by y function divide(x, y) if x = 0: return (q, r) = (0, 0) (q, r) = divide...
Context In randomized algorithms two schemes of computation are common: Las Vegas algorithms with random running time Randomized algorithms that have a probability of success, and have to be executed multiple times before getting the answer You can also transform the latter in the former with a loop but they really d...
Say you have a language L = "{0,1}* without strings that start with 00". How do you prove this is decidable? I'm drawing a blank on this one.
DEFINITION: $f = O(g)$ if positive integers c and $n_0$ exist such that for every integer $n$ $\geq$ $n_0$, $f(n) ≤ c·g(n)$ so: $n^2 \leq c·log(n)$ $\frac{n^2}{log(n)} \leq c$ is this enough proof? since the fraction will grow larger and larger depending on n>1, so its false?