instruction stringlengths 35 11.4k |
|---|
I am trying to solve a real-world problem that I was able to reduce to the problem described below. I would like to know the following things:
Is there literature about this problem?
Is the corresponding decision problem NP-complete?
Do you know an efficient algorithm to solve the problem?
If not, what would be a good... |
I have two lattice (grid) end points of the line, how can I generate intermediate points of the line segment between them?
One way is iterate through all the x points or y points and check (solve line equation) if the coordinates we get each time are integral solution or not.
|
We want to show one schedule of jobs consumes less energy than another one. For example, there are two schedules A and B. Both the schedules A and B schedule two jobs $j_1$ and $j_2$ with execution time $C_1$ and $C_2$. Schedule A schedules the two jobs with frequencies $f_1$ and $f_2$ while schedule B schedules the tw... |
Given a 3SAT problem where each clause is a Monotone Clause (i.e. each clause with all positive or negative literals).
Moreover, we are promised that each solution for the above SAT problem (if any exists at all) will be of the form 1 in 3 SAT.
Monotone 1 in 3 SAT is NP Complete, but with the additional promise above,... |
I've written a function. I believe the function runs in complexity:
$$ T(m, n) = \begin{cases}
T(m-1, n) + T(m, n-1) + T(m-1, n-1) + 1 &\text{if $m,n>0$}\\
0 &\text{otherwise}
\end{cases}
$$
I have no idea how to simplify this. Can anyone help?
(No, this is not a homework assi... |
I want to assign people to cover shifts considering a set of constraints and preferences. Here's the problem definition:
Daily shifts must be covered by workers, who are divided in three groups:
Trainees (Nt = 2)
Regulars (Nr = 3)
Experts (Ne = 7)
The organization constraints are:
All shifts must be covered
A Traine... |
Let $Ham$ be the $[7,4,3]_2$ Hamming code.
It is known that $\{w(c):c\in Ham\}\subseteq\{0,3,4,7\}$, where $w(c)$ is the Hamming weight of the word $c$.
A code $C$ of length $n$ is called cyclic if $\forall c=(c_0,\dots,c_{n-1})\in C:(c_{n-1},c_0,\dots,c_{n-2})\in C$.
A straight forward extension for $Ham$ to an $[8,... |
I'm looking for an algorithm or framework for thinking about how to determine affinities between nodes. Perhaps affinity is poor choice of wording, but basically I want to use utilities between nodes to determine how alike or unalike they are from each other. I've attached an example diagram to illustrate what I mean:
... |
Here is my exercise.
FINDLARGEST(k): return the elements in the heap with key >=k" ... "expand the priority queue (max-heap) so that it supports FINDLARGEST(k) in O(m) time, where m is the number of elements with key>=k.
Can anyone elaborate on this maybe?
I stumbled upon this on the wikipedia entry on min-max heap: ... |
I am trying to understand the assumption of Simple Uniform Hashing (SUHA) as e.g., in CLRS textbook; or other courses about hashing.
The usual description given to SUHA is (cf. CLRS):
"we shall assume that any given element [i.e., key] is equally likely to hash into
any of the m slots, independently of where any ot... |
I have this problem of obtaining a subset of maximum weight from a given array of size n (the i-th element is the weigth of the item i) - lets call it P. The only restriction is defined by an array R of size n: for each j in R[i] we have that the subset can not contain both P[i] and P[j].
How do I build a DP bottom-up... |
This is the Lisp code (from wikipedia) that implements the $s^1_1$ form of the $s^m_n$ theorem
(defun s11 (f x)
(let ((y (gensym)))
(list 'lambda (list y) (list f x y))))
since I don't know Lisp, can someone explain me what this code does and/or translate this code into other languages
|
One simple question I've never been able to answer is, "why use 'for', 'while', and 'if' as control statements?"
Could someone please elucidate the rationale behind using the above mentioned control statements, that have been embraced by most, if not all, high-level languages. I believe this has something to do with au... |
I understand how the outcome of each is supposed to be different, but in matrix form are these gates not the same? The CNOT matrix negates the second bit regardless of the input of the first.
|
What is the difference between Simulated Annealing and Monte-Carlo Simulations? Is Simulated Annealing a specific type of Monte-Carlo simulation, or are they completely separate techniques?
|
What is the diffrence between a carry bit and overflow
|
This is a question asked in Adobe interview:
Given heights of n towers and a value k. We need to either increase or
decrease height of every tower by k (only once) where k > 0. The task
is to minimize the difference between the heights of the longest and
the shortest tower after modifications, and output this di... |
For the Pushdown Automata episilon transition $\epsilon$ which is shorthand for $\epsilon; \epsilon / \epsilon$, does this mean that at any point, regargless of if there is input or not, you can transition to the next state? Or does it only transition to the next state when there is no more input?
|
I've been given a solution, included below and I do not see how it would reject a string where i=j.
The example given should reject an input string such as aabbcc where there are an equal number of a's an b's, so i=j, however I don't see how it would reject it. Wouldn't it just push 2 a's, transition to state 2, pop 2 ... |
If we take a look at Gödel's paper “On formally undecidable propositions”,
the first self referential proof given in the paper, with the following formula:
$$n \in K \equiv \overline{\textit{Bew}}[R(n); n]$$
Which look like this in more modern mathematics:
$$K = \{n \in \mathbb N : \lnot\text{provable}(R_n(n))\}$$
Göde... |
Is it possible to implement extractMin on a Max-Heap in O(log(n)) time, and if so how? Or do you need a more elaborate structure like a max-min heap?
|
I am trying to make sure my intuition for the following question from an assignment is correct
Prove or disrove: if $G = (V, E)$ is a graph and $I_1$ and $I_2$ are independent sets in $G$, then $I_1 \cap I_2$ is
an independent set in $G$.
Answer: This statement is true. Consider arbitrary nodes $x, y \in I_1$ and $u, ... |
I have to find number of ways (combination) to create graph that for each 3 vertices there are minimum 2 vertices connected. There is n vertices. For example when n=3, there are 7 possible combinations. How can I make this with maybe dynamic programming?
|
I am self-teaching myself Hindley-Milner type inference by writing my own implementation, separating tree traversal and constraint solving. The tutorials that I've been following only allow patterns that are variables, but I decided to implement pattern matching, and I've hit a wall concerning the separation of travers... |
The idea I'm thinking of is about a top-down approach for AI. I would like to know if there can be a model for computers so that they can perform causal reasoning. It seems that causal relation can be simplified to be a mathematical structure, as an acyclic directed graph. If using type theory, one builds some "time t... |
Given is a list of numbers.
Now you build different permutations of that list while there must not be two permutations where the sum of the numbers from any point of the row to the end/beginning is equal to the sum of numbers from any point of another row to the end/beginning.
E.g.
$1,2,3,4$
$2,3,4,1$
$4,3,1,2$
... |
So I think this falls under case 1...but I am not sure how to formally prove that $n^{lg_{10} 6}$ is asymptotically greater than $\lg^2 n$. I tried using L'hopitals but kinda reached a dead end. Here's what i have so far
$$\lim_{n \rightarrow \infty} \frac{d(\lg^2 n)}{d(n^{\lg_{10}6})} = \frac{2 \lg n (\frac{1}{n})}{(\... |
I read the paper Certification-Cognizant Time-Triggered Scheduling of Mixed-Criticality Systems (Baruah and Fohler, in Proceedings of 32nd IEEE Real Time Systems Symposium, 2011; see Section 6) which proves a particular problem to be NP-hard in strong sense and in PSPACE. Then they proposed a polynomial algorithm for t... |
Due to the linear nature of computer memory, row-major and column-major matrices have different performance for row- vs. column access. The obvious solution would be to keep two copies of the same data sorted accordingly. Is there a DS with better space complexity?
|
I have to ask for forgiveness in advance if the whole question doesn't
make a lot of sense, but unfortunately, I have no better intuition as
of right now and this seems like the best starting point I could come
up with.
I'm reading Tarski's book "Introduction to Logic: and to the
Methodology of Deductive Sciences", I'm... |
Is it possible to find the nodes larger than $ k $ in a min-max heap in $ O(m) $ time, where $ m $ is the number of nodes larger than $ k $?
If it is possible, then how do I implement the rest of the standard heap procedures in standard time (insert and delete, extract min and extract max is easy obviously)?
If needed... |
I want to find the all primes between 2 and $k-1$. We can come up with an $O(k\log k)$ running time algorithm. I want to compute this set in $O(k)$ running time. For this algorithm is :
we are maintaing a one pointer from node $i$ of the list $L$ to index $i$ of array $N$ and one pointer from index $i$ of $N$ to $i$th... |
I'm having trouble constructing a regular expression to meet the following criteria:
$$\sum = \{0,1\}$$
$$\epsilon \in L$$
$$0 \in L$$
$$1 \in L$$
$$\forall x \in L, 110x \in L \land x01 \in L$$
What I have so far is:
$$((1^*0)^*(0+1)^*(01)^*)^* \text{ or } (1^*(0+1)^*)$$
However I dont believe this to be fully correc... |
Prove $f(n) = O(g(n))$ and $g(n) = O(h(n))$, then $f(n) = O(h(n))$.
The question is
Prove that Big-O is transitive by relation.
What does it mean by by relation??
|
So I am trying to figure out the recurrence relation for the median of medians algorithm using groups of 3 instead of groups of 5. Per CLRS's method, my recurrence relation looks like
$$
T(n) = T(\lceil \frac{n}{3} \rceil) + T(\frac{2n}{3} + 4) + c_1n
$$
And I want to show $T(n) = O(n \lg n)$
Via substition, I assume ... |
This is the definition of $EXT = \{x\ | \varphi_x\ can\ be\ extended\ to\ a\ total\ computable\ function \}$. I'm trying to proof that $\overline{K} \le_{rec} EXP$ and I can't think of an example of a function that can't be extended
|
I have two operations:
$Sum(i,j)$ : Calculate $A[i]+A[i+1]+....+A[j]$
$Change(i,x)$: Set $A[i]=x$
I need to implement these operations in an appropriate data structure using $O(n)$ space ($n$ is the length of the input array $A$).
The $Sum(i,j)$ procedure needs to have a runtime complexity of $O(\log(n))$ and the $Chan... |
What are some examples of problems whose deterministic versions are easy, but become hard when injecting some uncertainty (or randomness of some kind)? What are some examples in which the problems remain feasible? Can one tell in advance?
I am particularly interested in scheduling problems and what to know as to how th... |
Suppose we have 3 sets $A, B, C$ which can can hold a maximum of two elements, each. So the total number of elements that the sets can hold together i.e. total capacity (TC) is $ 3*2 = 6$.
Now, elements arrive serially (one-by-one) with some properties that impose the following constraints:
E1 : Can be placed in either... |
If you apply standard Bellman-Ford algorithm to a graph containing negative loop it can only report its existence. Are there approaches to modify it to find shortest path containing any vertex not more than once so effectively avoiding loops? I would appreciate if an answer will contain a link to a paper.
|
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... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.