instruction
stringlengths
35
29.1k
It seems to me that Fine-grain call-by-value already subsumes CBV and CBN, using lambdas as thunks. What does CBPV improve upon FG-CBV or in what way is it "better"?
Consider a zero-indexed array representation of a binary tree (as in a binary heap), where 0 is the root The left child of i is L(i) = 2*i+1. The right child of i is R(i) = 2*i+2. Is there a simple predicate S such that S(i,j) means j is in the subtree rooted at i? It should preferably be quickly computable with some...
I was reading the paper on Jump consistent hashing, and I'm having some trouble understanding one particular line (page 5, paragraph 2) "Since we want P(j ≥ i) = (b+1) / i, we set P(j ≥ i) iff r ≤ (b+1) / i." My understanding is that: P(j ≥ i) is the probability that a key "jumps"/moves to a different bucket after buc...
I think it should be false because there may be more than one edge with the same weight.
Question: Consider the DFS tree generated by a DFS on a connected graph. Write below the necessary and sufficient condition for a node v to be a leaf node on the DFS tree. The condition must be in term's of v's discovery time d[v] and finishing time f[v]. I honestly have no idea what the answer to this question from a...
I have a problem similar to Shortest path problem where edge weight depends on path taken but not quite the same. In my case each edge has either a fixed finite weight, or an infinite weight, depending on which path has been followed. So depending on the path taken through the graph, some edges from the current node ar...
Suppose f is a constant-time function. Is it always possible to apply it n times in O(log(n)) time? Example If f is not, then, apply_not_n_times(n,bool) = if n % 2 == 0 then bool else !bool, which is O(log(n)), since it is linear in the number of bits. That means the answer is yes for that particular choice of f. I wo...
I have been implementing some neural networks in MATLAB and recently I noticed a weird thing while implementing softmax derivative: Setting the derivative to one, rather than using the actual derivative converges faster. I have to admit that the derivative of softmax in particular confused me quite a bit, since the ...
For AVL trees, which one of the following is possible as the tree size (expressed in term of the tree height h)? Recall that the size of a tree is the number of nodes in the tree. A. $Θ(h^{2.1})$ B. $Θ(1.1^h)$ C. $Θ(1.9^h)$ D. $Θ(2.1^h)$ So this question came up on my midterm and I don't understand why the answer is C...
Can anyone help me understanding this exercise? We define the SIMD utilization of a program run on a GPU as the fraction of SIMD lanes that are kept busy with active threads during the run of a program. The following code segment is run on a GPU. Each thread executes a single iteration of the shown loop. Assume that th...
Let T be an AVL tree of height 3. What is the smallest number of entries it can store? Note that a tree with one node (only the root) has the height of zero and stores one element. The only method I could think of was just drawing an AVL tree and trying to minimize the number of nodes in which I get an answer of 7. B...
I'm studying OS and I came up with this scenario where the OS works with a paging scheme and virtual memory, and a process wants to start running, but in memory, there's not enough space to allocate the minimum pages the process needs. So I was wondering, will the OS try to allocate the process pages and end up thrash...
Consider the following procedure computing a dummy function. Which one is a correct asymptotic bound for the running time of F(N) expressed in terms of N? F(i): if i<3then return 0 end if return F(i−1) + F(i−2) $• A. O(N) • B. O(N^2) • C.O(2^N) • D. O(N log(N))$ This may seem like a dumb question...
A comment was made to me saying the following in relation to Kolmogorov complexity:- You're not the first to think non-computability = impractical or even useless. But it can be useful. In particular to random, "non-algorithmic" data. I now have a physical box on my bench that outputs perfectly random bytes with th...
One common observation in type systems is that having subtyping makes type inference hard [1]. Consequently, for records, many modern functional languages shun subtyping (OO style) in favor of row polymorphism. Some examples include: Ur/Web - duplicate labels are disallowed, the programmer uses first class disjointedn...
I'm currently using the Heavy-Hitters algorithm as described here and I'm wondering what if any space, time, accuracy, or real-world performance differences I would see if I were to switch to an implementation of Count-min Sketch plus a linked list to store the "heavy hitters" instead? As far as I can tell, both requir...
I work on the topics of sparse coding (SC) and dictionary learning (DL), in which classification is not the main goal, but the discriminative power of the representation is one of the concerns. Therefore, i use classification accuracy in order to show how my method is more discriminative than other SC or DL approaches....
I've been doing the HPC course from Udacity (https://classroom.udacity.com/courses/ud007/l) One of the problems is as follows (apologies for the image, as I was unable to format this using $\LaTeX$): Here, we assume a RISC processor. The text says: For consistency with the rest of the text, we use MIPS64, the 64-bit...
I want to represent a fishing network using a graph representation. My question surrounds how I can write the adjacency matrix if there are two types of connections, which I want to capture together. Here's the most basic setup. Say there are two people represented by nodes. Person one owns a fishing right and also ...
I want to use a PRNG to generate random patterns. I would provide the PRNG with a hash value as a seed. Ideally, the seed size would be 64-bit or 128-bit and I would expect no collisions if the seeds are unique. Do PRNGs encounter 'collisions', where two different seeds produce the exact same sequence of random numbers...
I have a directed weighted multigraph whose vertices are sets of URLs. We add to this multigraph all edges of the form $i\to j$ where $i\subset j$ (such edges are of zero weight), where $i$, $j$ are vertices of the graph. Now having a set of source vertices and destination vertices, I need to find the minimum weight pa...
How to prove that a string, s is made up of n > 1 subsequences occurring some arbitrary number of times using concatenation and stripping first and last character? E.g s = xyzxyz, subsequence is xyz and it occurs 2 times. The solution is to concatenate the same string e.g. xyzxyzxyzxyz and then strip the first and las...
When we compute the complexity of calculating factorial of a number $n$ why is it in terms of $n$ instead of the number of the number of bits occupied by the number of bits occupied by $n$ (like we do in number-theoretic algorithms like primality checking etc.)?
I solved bunch of questions which give some function and then ask to implement it with minimum number of gates of specific type, each having specific number inputs. I was making mistakes in all those problems by not implementing given function with minimum number of gates. Let me give those problems one by one and expl...
Sorry if this seems like a dumb question, but what what type of logarithm is $\log$ in Wikipedia articles? Cheers.
This article shows some of the issues. But basically, on the web, you have fillStyle and strokeStyle, and in WebGL you have those different ways of rendering primitive lines, but you end up needing workarounds to draw more complex lines. In CSS borders don't have patternable backgrounds, etc. Wondering why this limitat...
In particular, was there any kind of implementation at the time Christopher Strachey wrote Fundamental Concepts in Programming Languages? In that work, Strachey lists Ad Hoc and Parametric polymorphism as the two main classes of polymorphism. But while examples of limited ad hoc polymorphism can be found in languages ...
Let take a multi-dimensional array: $a[2][3][4]$ Here $a$ is a three-dimensional array, which means that it is a collection of two-dimensional array's. Therefore sizeof(a) = No.of 2D arrays * Size of each 2D array = $2*(3*4) = 24$ elements. Now my observations are: If Row Major Order is taken, then we have 2 arrays of...
I came across this paper (page 16) which explains how to calculate the size of B+ trees. According to it the maximum number of nodes at level $i$ is $2(n/2)^{i-1}$ for a B+ tree of order $n$. Thus a B+ tree of $l$ levels will contain at most $\sum_{i=0}^{l} 2(n/2)^{i-1}$ nodes (*). But we also know that for example for...
I've seen a few questions posted regarding the upsides/downsides of floating point formats that have explicit integrals vs. formats that have implicit integrals, but have not seen an answer that really handles my question about it. By integral, I mean the single digit to the left of the radix point. Let's assume that t...
Consider a $n \times n$ matrix $A$ with $k$ nonzero entries. Assume every row and every column of $A$ has at most $\sqrt{k}$ nonzeros. Permute uniformly at random the rows and the columns of $A$. Divide $A$ in $k$ submatrices of size $n/\sqrt{k} \times n/\sqrt{k}$ (i.e. $\sqrt{k}$ meta-rows and meta-columns). Enumerate...
I have an almost sorted linked list containing N distinct elements with only 1 element not in it's place. Every implementation I have seen start insertion from the beginning (unlike insertion sort on arrays) therefore the complexity will be $O(N^2)$.
The code below is in F#. It creates a scene which looks like a perspective coming from the top left. I thought if I would change i % j = w then it would come from the top right instead, but that doesn't work. So what change do I need to make for it to be able to come from the top right, bottom left, bottom right and ev...
Consider a two-player game. A winning strategy of a player is a strategy following which the player can always beat his opponent, no matter how his opponent responds. A game can be unfolded to a state space consisting of the possible ways of both sides of the game. How to express the existence of winning strategy of t...
Set $I_n = \{0,\ldots,n-1\}$. Given integers $v_0,\dots,v_{n-1} \in \mathbb{N}$, find an integer $t>0$, a map $f:\mathbb{N} \times I_n \to \mathbb{N}^t$, and a well-founded order $>_t$ on $\mathbb{N}^t$ such that: $$\forall i \in I_n, m \in \mathbb{N}. f(m,i) >_t f(m+v_i,i+_n 1)$$ where $+_n$ is addition in $\mathbb{Z}...
In this paper, page 4, it is said: "...there is always a constant expected number of elements that map to the same slot" Assume we have a set $S$ of $n$ values, and we want to insert them into a hash table. Let's fix some parameters: let $d$ be the hash table's bin/slot capacity, i.e. the bin will get more than $d$ el...
I discovered that SpaCy had the ability to make dependency trees. For instance given a question “To whom did the Virgin Mary allegedly appear in 1858 in Lourdes France?” We can create its dependency tree with the following code : I know that it is a set of edges $E$ which represents the relations of labeled dependenci...
Given an array with n real numbers, each in the range [0,1], I need to sort them. Moreover, the only operations that are allowed are comparisons or copying. It means I cannot multiply or divide the numbers, which prohibits me from using bucket sort. From what I learned, when you use only comparisons you cant sort any f...
I am trying to find $T(n)=O(f(n))$, where $$T(n)\leq n^2+n\left[T(n-m)+T(m-1)\right],$$ where $m\in\{1,2,\ldots,n\}$. Is it possible to find $f(n)$ such that $T(n)=O(f(n))$? I started to fix $m=n/2$ (which I assume the worst scenario, isn't it?). I found $$\begin{align}T(n)&\leq n^2+\frac{n^3}{2}+\frac{n^4}{8}+\frac{n...
I'm studying time complexity of Union-Find data structure. I saw time complexity of union and find function depends on some conditions. without anything: $O(N)$ with Union by Rank: $O(\log N)$ with Path Compression: $O(\alpha(N))$ which is inverse Ackermann function. I understood $O(N)$ because of skewed tree of disj...
I am studing a PHD framework which the propose is to reduce the dataset with the most representative samples for training a classifier. Maybe I am loosing something, but I could not undestand a specific part. Basic this is the algoritm 1 proposed: Question 1: line 7 says it will union 'edge (s,t)'. What it means? It m...
Fix an optimal solution G∗ to k-Cycle-Free Subgraph. Partition the vertex set V of G randomly into two subsets, A and B, each of size n/2, and remove edges internal to A or B. In expectation, the fraction of edges in G∗ that remain after this process is 1/2. With probability at least 2/3 the fraction of edges in G∗ tha...
I found this question in the exercise of Tanenbaum (operating systems): Two processes, $A$ and $B$,each need three records $1, 2, \text{ and } 3$ in a database. If $A$ asks for them in the order $(1, 2, 3)$ and $B$ asks for them in the same order, deadlock is not possible. However, if B asks for them in the order $(...
I'm trying to solve the recurrence $$T(n)=2T(\sqrt{n})+\log n$$ using the master theorem. Which case applies here?
For a changing directed graph, I would like to maintain information about strongly connected components. The graph operations are incremental: only vertex addition and edge addition. What data structures achieve the best known amortized complexity for these operations? If the graph was undirected, the answer would be t...
I am going through the online course MIT OCW 6.006, lecture 1. It introduces a binary search algorithm that finds a peak in O(lgN) time. A peak A[i] is defined as A[i]>=A[i-1] and A[i]>=A[i+1]. But I wonder what if the definition takes the equal sign out A[i]>A[i-1] and A[i]>A[i+1], a peak is defined as an element that...
I've been wondering if research of these algorithms exists. An example, let's say I'm fine with $p$% of possible inputs of size $n$ to be unsorted. Is there an algorithm that would allow me to sort $n$ integers in sublinear time with a guarantee that $(100-p)$% of all possible inputs will be sorted. Algorithms don't ha...
I want to implement a program that splits a set $S$ of $n$ points in the plane into two sets such that the distance of the convex hulls of the two sets is maximized. It should be done in $O(n^3)$. I have several ideas but I'm not sure whether they are correct: I sort points by $X$ and then for each two points I find ...
Is every language (including languages over alphabet having infinite symbols) which is not recursively enumerable, uncountable? In other words, let $R$ be the set of languages (including languages over alphabet having infinite symbols). For all $L$, belonging to $R$, that are not recursively enumerable, can it be s...
I have an assignment that I have to do and the question is Draw a DPDA that accepts the language L = {ba(bb)^(n+1)a^(n – 1) |n > 1}. Im not looking for the answer but rather some direction. I would like to understand the 'n' powers. Currently my understanding of the above language is that it will start with ba (obvi...
I'm trying to learn the Big O Notation...and I got a bit confused by this article: https://brilliant.org/practice/big-o-notation-2/?chapter=intro-to-algorithms&pane=1838 where it stands that f(x) = 4x and g(x) = 10x, (...), and that one could look at the Big O Notation by dividing f(x) by g(x): 10x/4x Shouldn't it be ...
was doing coin change problem as an assignment(didnt know before), after came with this solution i checked the solutions available couldnt find a similar one like this, just curious. removing the element from the list is O(N) so seems this also O(N^2) right? def rec_coin(target,coins): if target == 0 or coins == []...
I was trying to modify the Floyd–Warshall's algorithm to take into account the weights over the vertices, in addition to the weight of the edges, while computing the shortest path. The length of a path from vertex A to an adjacent vertex B, Path(A,B) , is defined as: Vertex_Weight(A) + Edge_Weight(AB) For a vert...
I have to find the maximum, minimum, and average height of a BST with n nodes. After doing some researching I found that the maximum height is $n-1$ and the minimum height is $\log_2(n+1)-1$. My question is how do I get the average height of a BST with n nodes?
$\mathrm{NP}$ has not been separated from constant-depth circuits consisting of solely $\mathrm{Mod}_6$ gates. So, the question is whether current techniques are enough to deduce interestingly unintuitive consequences of that bizarre claim.
A tree is a special kind a graph. However, I came across a data structure which is a like a rooted tree, but where nodes are authorized to have direct links to any of their descendants. Shortcuts if you will. This is not a tree anymore. This is a specialized DAG that has more restriction. That is, it has a single root ...
I couldn't find a good answer to how this formula was derived for the divide and conquer algorithm in a 1D Peak-Finding problem. About the problem Basically, there's an array of numbers and we want to find a peak in this array (a peak is a number higher than the two numbers to the left and right of it). The formula ...
Why do we consider the sequence "3,3,4,5,2" a bitonic sequence? In the sequence, "3,3,4,5,2", the sequence is constant for "3,3", increasing for "4,5", and decreasing for "5,2".
I wanted to know if there is good resource to learn about the ADTs like set ADT, list, array, boolean etc and their implementation.
(The notations used: $\oplus$ is XOR operator $\odot$ is XNOR operator) I was solving a problem, where they asked which of the given options give equation for the difference of full subtractor. The circuit in the solution option was: For me the first line: $(x'y'+xy)'z'+(x'y'+xy)z$ looked more like $x\odot y\odo...
I would like to get some opinions about using a context free grammar to generate sample utterances for Amazon Alexa/Google Assistant skills. When developing these skills one has to provide a large number of sample utterances, i.e. sentences with which a user could try to invoke a particular feature of the skill. So whe...
I'm looking for a generic algorithm to optimally combine elements of a list. I'm not sure if it even exists, but I believe some kind of divide-and-conquer algorithm could exist. In my specidifc case, optimally combining the score means minimizing, but that's probably not important Formally stated: We have the function...
{Q} = {n>0} C1 = i := 1; C2 = c := 1; C3 = p := 0; {P} = {i<=n, p = fib(i-1), c = fib(i)} My lack of understanding towards the rule of consequence in hoare logic is blocking me from find the solution which i hope someone can shed some light on how can i approach this with minimal abstraction of the process. {R} = {i<=n...
I'm working on a scheduling algorithm that schedules a set of events with an event duration to a set of agents with various working times. However, some events require more than one agent to be assigned to them to be completed. The event must be completed by both agents simultaneously. Does anybody know of an algorithm...
Dancing Links: wikipedia article, research paper is an implementation of algorithm X for exact cover problem. In the Knuth's research papaer, linked above it is shown how Polymino problem (that is covering a given shape with given sets of Polymino) is translated to exact cover problem, so that dancing links can be used...
I'm trying to setup a primary and secondary on call schedule with 6 people. I'm trying to schedule people to be on call, so that they will be paired with everyone and they have the longest "break" between their schedules. Ex for one rotation: week: 1 2 3 4 5 6 7 8 9 10 11 ... primary: 1 2 3 4 5 6...? seconda...
A Bitonic Sequence is a sequence of numbers which is first strictly increasing then after a point strictly decreasing. According to the definition of a bitonic sequence, we know that a graph of a bitonic sequence can have at most one "peak" and one "valley". So, why is the sequence 1,3,2,4 not a bitonic sequence? I ha...
Is preorder traversal enough to check if a tree is subtree of a binary tree? Are there any scenarios which I can miss if I use just the preorder traversal? What other methods can be used to check if a tree is subtree? Also, what happens if my binary tree contains non-unique values at nodes?
I understand that TM is a 'Model of Computation' which tells us about the computational power of a machine while Von Neumann Architecture is a 'System Architecture' that tells us about how the machine is actually been implemented. Also, I think of 'Programming Paradigms' as how a problem is modelled in a High-Level Lan...
Here is a problem that I've been given to solve in time $O(n^2|\Sigma|)$. Given an alphabet $\Sigma$ and the product of every two elements in this alphabet (i.e., an arbitrary mapping $\cdot\colon \Sigma^2 \to \Sigma$), find an algorithm that determines whether we can parenthesize the expression $x_1 \cdot x_2 ֿ\cdot...
In Concrete Mathematics Textbook by Donald Knuth and Oren Patashnik , ch.2 Sum ,sec2.2 He wrote: The average number of comparison steps made by quicksort when it's applied to $n$ items in random order satisfies the recurrence : $$C_0=0;$$ $$C_n = n + 1 + \frac{2}{n}\sum_{k=0}^{n-1}C_k$$ The question is how he g...
What would these statements mean if f(n) and g(n) are functions over natural numbers? g(n) is in Θ(f(n)). and An algorithm is in the complexity class Θ(f(n)).
Knuth's Algorithm X (described here in more details) prescribes that we select a column deterministically (but arbitrary), when we backtrack rows we do not backtrack columns, so we do not have an opportunity, to "rewind", select a different column and try again, during the course of the algorithm. How can we be sure, t...
Given two arrays of the same length $n$: $A = \{a_1,a_2,\dots,a_n\}$, $B = \{b_1,b_2,\dots,b_n\}$, I have to maximize the following expression: $$\frac{a_{i_1} + a_{i_2} + a_{i_3}+ \dots + a_{i_k}}{b_{i_1} + b_{i_2} + b_{i_3}+ \dots + b_{i_k}}$$ Where $k \lt n$. Given the constraints: Firstly, when you select a particu...
Problem inputs is an ordered array $A = [a_1, a_2, \ldots, a_n]$ with $\text{weight}(a_i) = w_i$. We define a $subgroup$ of $A$, denoted by $B$, whose elements' indices are continuous in integer. For example, if $A = [a_1, a_2, a_3, a_4, a_5]$, then $[a_2,a_3, a_4]$ is a subgroup of $A$, while $[a_1, a_3, a_4]$ is not...
I have just started reading about fitness landscapes and I couldn't understand what the peak means. What does the peak mean?
Programming courses are about 30% of my computer science degree. Also at my university, around 15-20% of the degree are applied math courses. What other areas/fields are covered? For the majority of ABET accredited universities? The question that inspired this post was "should i study computer science if I'm only inte...
I am not sure this is the right forum to ask. For a machine learning training, I need a dataset of old top news by keywords that can be organized by date. From where I can download it? I have seen that Google News API can provide only real time news.
Say, I have one of the standard implementations of a hash table: chaining or open addressing, and my hash key is a pair of strings. Instead of using the hash table with the pair as a key, I can use the first key to get to a "sub" - hash table, and then use the second key to find the element from it. How do these strat...
Suppose we have a peer to peer network of, say, $n$ peers. Peers communicate by an asynchronous randomized gossip protocol (Push, Pull, Push/Pull doesn't really matter here). The task is for any local peer to get an (approximate) picture of the global communication in all of the network over time. I mean after some ti...
Given a 4096-bit integer $x$ and a 4096-bit RSA modulus $N$ (of unknown factorisation) what is the fastest circuit to compute $x^{2^T} \mod N$ where $T=2^{40}$. That is, what is the fastest parallel-time (i.e. lowest latency) algorithm for repeatedly squaring $x$ modulo $N$ a trillion times? For context, I am looking t...
Suppose that I have a graph $G = (V,E)$, given as an incidence matrix of edges and vertices. Suppose that $G$ is planar, that is, it can be embedded in the plane without edge crossings. I would like to construct in the combinatorial map corresponding to some (any) planar embedding. That is, corresponding to each planar...
I am trying to do the formal semantics (Montague grammar, abstract categorial grammar) of natural language and encode the sentence John is boss. The type system has to primitive types - e for entity and t for Boolean type. John has type e, is has type (e->t)->(e->t) and boss has type (e->t). The the full sentence is tr...
As the title states I'm trying to write an algorithm that generates accepted strings to an upper bound from a given DFA. It should not generate more strings than the upper bound n if it contains cyclic patterns, because obviously I can't print an infinite amount of strings, which leads me to my problem. Machines with ...
I was reading about the page cache Page cache - the cache in memory for files, but I couldn't find the answer to my question. Does the page table have anything to do with, or maintain any entries, for the page cache? My guess is no, despite the similar sounding name, as the page table only stores entries for text/code,...
Consider n buckets that contain from 0 to x items. From time to time something is added (moved, removed) to (between, from) any bucket(s). Once in a while runs something that will have to calculate what items have to be moved from their bucket to another with minimal amount of moves so number of items in each bucket wi...
"Can QTM (Quantum Turing machine) solve halting problem" Why not have an immediate answer "No QTM Can't do this", we know that Turing proved it impossible when DTM , i meant , " Why we cant use the same proof which turing use it" Let H be a program in a quantum turing machine that will solve the issue of halting , why ...
I am reading Operating Systems: Three Easy Pieces, but I can't fully understand the following paragraph. It's from the 6th chapter of the book. I think it's self-contained, so I quote here. Note that there are two types of register saves/restores that happen during this protocol (context switch). The first is when the...
I am studying pumping lemma from Introduction to theory of computation by Michael Sipser. I wanted to check if the language generated by regular expression a(b*)c(d*)e can be proved to be regular using pumping lemma. The string generated by this expression are of the form. abcde abbcdde... We can not write these st...
In Dybjer's Inductive Families the author present a method to derive an eliminator/induction principle for every inductive family of types. In particular for the type of finite lists, namely $$List' \colon (A \colon set) (n \colon N) set$$ we get the eliminator $$\begin{align*} listrec' \colon &(A \colon set)\\ & (C \...
Can I get a bit of help over here, I can't seem to get to a finish point with this code complexity. I have trouble with making notations, exponential ones in particular..... I spent hours with this particular piece of code to get BIG O but i can't mathematically..... I'm a newbie. I tried to logarithmate the whole thin...
My approach to the problem has been to reformulate it into something more recognizable, but I don't know the best way to solve the reformulated problems either. I list the original problem, an example, and two reformulations below. The second reformulation is equivalent to an unbalanced assignment problem with a binary...
I am not sure if the names of these logics are right, but I saw that you can generalize logic with probability theory. Then I found 3 ways of reasoning with probabilistic/smooth logic, Fuzzy, Bayes/probabilistic and quantum. Can someone explain what are the major differences and expressiveness of such logics? Are they ...
I understand that many similar questions of this sort have been asked, but in this case, the solution does not appear to be provable - or is it? Question: If $f(n) = \Theta (g(n))$ and $g(n) = o(h(n))$ then $f(n) = O(h(n))$ Current solution: $f(n) = \Theta (g(n))$ implies that $c_1 . g(n) \le f(n) \le c_2 . g(n)$ for $...
This is mostly a terminological question: Is there a fundamental difference between "optimization problems" and "search problems"? Apologies if this is an obvious question As I understand it, we can define the two as follows (note, I consider the problem for a fixed input size for brevity): Search problem. Given a set...
My basic position is that everything is in P. Then comes the time hierachy theorem and EXP. That's easy: simulate and then diagonalize. After that comes EXP-completeness; that's difficult to swallow. Papadimitriou basically says that the proof is very similar to that of Cook-Levin theorem and do it yourself. Also, I wi...
The language of a DFA can be the empty set (by defining no final states), but can a Regular Expression do that? If Regular Expression cannot do that, does it mean that DFA and Regular Expression are not equivalent (in at least some cases)?
I was calculating the time complexity of one of the phases of my proposed algorithm, but unfortunately, I faced a problem about solving that and providing an understandable running-time. This phase of the algorithm indeed iterates a task $t$ times where $t$ is that iteration in which the algorithm achieves the desire r...
i am a beginner to Discrete optimization domain. I am working on the real world problem, i.e., Scheduling of hybrid appliances. I have hybrid appliances which can use gas and electricity or electricity and hot water or hot water and gas for their operation. Each appliance has some set of tasks, each task use above ment...
Lets just say I have two lists of the running time of tasks A and B. Formally, I would have: A = {a_1, a_2, a_3 ... a_n} B = {b_1, b_2, b_3 ... b_n} I can only have one task from A running at any one time. All other tasks in A have to wait on that task to complete before they can be released. I can have any amount of ...