instruction stringlengths 35 11.4k |
|---|
Plz draw. Turing machine if
Design a Turing machine in the following three ways of descriptions that decide
the language
L = {12n+1 : n ≥ 0},
the language consisting of all strings of 0s in given
exponential function.
1. The Formal description of Turing machine
2. Implementation level description of the Turing mach... |
I believe from common sense that video shape recognition problems (identifying shape of a moving object) is of natural interest in many real world situations. The process of identifying is understood as recognizing/finding one selected changing shape/signal among all the present shapes/signals. Ideally, it should be po... |
I am doing research on paging algorithms. While learning about the working set algorithm from several scientific sources I was not really able to figure out where exactly the working set is defined or realized.
I can only imagine two ways of realising this. The first is to put it into the page table file with indicatio... |
A graph can be expressed as an structure $G = <A,R>$ satisfying the axioms
$ \forall xy R(x,y) \rightarrow R(y,x)$ and $ \forall x \lnot R(x,x)$.
How to extend the structure and/or axioms to express a 5 colourable graph?
|
A set $A$ is quasi-reducible to $B$ ($A \leq_Q B$) if there is a recursive function $f$ such that $$x \in A \iff W_{f(x)} \subseteq B$$
Or equivalently $$ x \in \overline{A} \iff W_{f(x)} \cap \overline{B} \neq \emptyset $$
Where $W_{e}$ is the domain of the recursive function of index $e$, i.e. $W_{e} = \{y : \varphi_... |
A procedure is a sequence of program instructions that perform a specific task, packaged as a unit (Techopedia).
We use block structure to make our code more readable by using indentations and spaces.
Now, is one block the same as a procedure and is vice versa true?
|
We consider two algorithms, Algo1 and Algo2, that solve the same problem. For any input of size n, Algo1 takes time $T_1(n)$ and Algo2 takes time $T_2(n)$.
Prove or disprove each of the following statements.
To prove a statement, you should provide a formal proof that is based on the definitions of the order notation... |
I have a sample that is collected to verify the accuracy of a new random number generator.
Applying the goodness of fit test to check if this sample comes from the Standard Normal Distribution and Uniform Distribution, I found out that both of these accept null hypothesis although they are contradicting to each other.
... |
I have some experiences with Convolutional Neural Networks before. I have a question regarding the Bilinear Sampler used in "Unsupervised Monocular Depth Estimation With Left-Right Consistency" (the link to it is provided here: https://arxiv.org/pdf/1609.03677.pdf and https://www.youtube.com/watch?v=jI1Qf7zMeIs)
I unde... |
We all know the partitioning problem: Given a super-set S of integers, can we partition S into 2 subsets with the same sum. And of course this problem is NP-complete.
My question is - let's denote M as the sum of all numbers in S. Is O(M) considered to be polynomial in this case?
I will clarify: I want to prove that a ... |
I am trying to argue that a certain problem is in $\mathsf{PSPACE}$ and my question is, essentially, whether it is ok to have an algorithm that takes an exponential number of steps as long as, overall, the whole thing stays in polynomial space.
The context for this is that I have a naive algorithm which, it seems to m... |
For example, take the problem "Does M Halt on the Blank Tape?".
My approach was to reduce the halting problem to prove this problem is also undecidable. I generated a Mw by
Writing w on the tape
Moving to the leftmost blank
Running M
Then, of course there is the M-halt-on-blank function:
if(Mw halts)
true
else fa... |
Suppose you have to provide a derivation by natural deduction, e.g.
$((A \rightarrow B) \rightarrow A) \rightarrow A$
Is it a good advice to start from backwards on in general?
I mean doing the derivation from bottom to top. The required premises or hypothesis should arise by itself.
|
Is there an algorithm that can find p + stuff within t, where stuff is any set of characters, not just HTML markup?
Sample text to search (t):
some HTML markup Some text and <span>more</span> text <h3>and
some more</h3> text in addition to <strong>more unknown text</strong>
Sample pattern to find (p):
Some text and m... |
I have 10 LDAP systems which contain users and groups in the form of objects. Each user / group is identified by a distinguishedName like name/systemName where name is name of user or group.
Group objects store which users are members of the group.
GroupA = {UserA, UserB, UserC ....}
GroupD = {UserF, UserB, UserK ....... |
This question is about segment-tree as described in this Wikipedia article.
When constructing the tree (inserting the new input-interval), if the input-interval doesn't contain the node-interval we have to recurse into node's child, where child-interval intersects input-interval.
But what if both children-intervals int... |
I have created an adjacency matrix which looks something like this
A B C D E F G H I
A 0 0 0 0 0 0 0 0 0
B 1 0 0 0 0 0 0 0 0
C 1 0 0 0 0 0 0 0 0
D 0 0 0 0 0 0 0 0 0
E 1 1 0 1 0 0 0 0 0
F 1 1 1 1 1 ... |
Suppose we want to represent some arbitrary Boolean function $f(x_1,x_2,...,x_N)$ on $N$ bits. We can explicitly specify such a representation using the disjunctive normal form. For "most" Boolean functions, this representation will be of length exponential in $N$, and incompressible (as per Shannon). We will assume we... |
I am going through the following lecture notes by Frank Pfenning :
http://www.cs.cmu.edu/~fp/courses/15317-f17/lectures/02-natded.pdf
In page no 5 I cam across the introduction rule .
The rule reads that $A$ is contained in $B$ if $B$ is true under the assumption that $A$ is true .
But in the text a subtle point ab... |
I visit some question but their implementations are slightly different and my doubt is not like theirs. I have this code in Javascript.
The code is typical BST implementation with methods to support in-order traversal. The code that is the most relavant for this question is the the inOrderTraverse and inOrderTraverseNo... |
Given a sorted $n\times n$ matrix $A$ of real values. That is $a_{ki}<a_{kj}$ and $a_{it}<a_{jt}$, when $i<j$. Propose and algorithm, finding two elements of this matrix with the sum nearest to a given value $q$. The restriction of memory is $\mathcal{O}(n)$. It is not allowed to change a given matrix.
The naive appr... |
Suppose that we have a family $F=\{a_1,\dots,a_s\}$ of sorted arrays
to merge. Our strategy is to choose two of them, say $a_i$ and $a_j$,
remove them from $F$, merge them and put the resulting array back into
$F$; we keep doing that until there is only one array in $F$. We will
use a greedy strategy: at each step, we ... |
So i tried turning the following NFA into a GNFA (first attempt).
Please don't ask why i chose to do such a complex NFA on my first try, i just like the challenge i guess?
ab is the concatenation of a and b, the language consists of a, b and c.
$L = \{a, b, c\}$
I calculated the following to be the Regular Expression ... |
I have being reading up on complexity classes (in Rieffel & Polak, 2011; pg149). I am slightly confused about something. Does for example $P$ (DTime($n^k$)) include all problems that can be solved faster then polynomial in time (e.g. logarithmic) on a deterministic Turing? And likewise for e.g. PSpace (DSpace($n^k$)) a... |
It is my understanding from what I have read that you need to compile separate executables for 32 bit and 64 bit machines. So if I compile a C program for example I need to compile 2 different binaries for 32-bit and 64-bit machines.
However, it seems like intuitively a compiler should just be able to compile down to i... |
I'm reading the "Art of Assembly" 2nd Edition by Randall Hyde. In the book the author seems uses his own language called High Level Assembly (HLA). Coming from a C Background, I question how useful this is in learning (real x86/NASM for use on Linux) Assembly. But, looking it up there seems to be a term "High Level Ass... |
Revised:
In my previous question, I was confused about the implications of the diagonalization language. I concluded that it proves there are languages for which there are no recognizable turing machine. However, how is this implication different from the halting problem? Do they both just reinforce the limitations of ... |
Given array $A$ of size $n$, we want to calculate $\sum_{i<j<k\leq n} A_i \cdot A_j \cdot A_k$. Is there way to speed this up rather than the standard $O(n^3) $ calculation with 3 for loops. I haven't worked with sums so I don't know their properties, but I was thinking if there is some way to rewrite the formula to ge... |
I'm working with trees in a project where I need to test various tree-making algorithms and their outcome. A frequent quantity I look for is the number of branches of a tree. Is there a commonly used name for that aside "number of branches"?
|
I need to develop algorithm for one task.
I have 500 types of object, each type is represented by a group of qualifiers (about 20 for each type, the same qualifier can be used for different types), where qualifier is a simple predicate (but calculation of the predicate can take some time, as you have to check data in ... |
Given a graph and an integer $k$ is there an independent set larger than $k$ is INDSET problem and is there a cut larger that $k$ is the MAXCUT problem. Is there standard way to convert to 3SAT from these problems that preserves number of solutions? I have only seen reductions other way in standard texts. Since all the... |
Consider following task:
we have an input of N+1 lines, where first line contains N ≤ 150000 - number of items, and then we have N lines, each one contains one item, which is a tuple (number id, number m), id ≤ 10^7, m ≤ 100.
We have to perform a stable sort on this sequence and print the result.
Sample input:
8
1 2
1... |
Given a string that consists of only digits, return an integer array (without shuffling sequence of string characters) such that the array elements form a Fibonacci series based on indices. If such an array can't be formed return a new array with -1 as the only element.
Fibonacci sequence based on indices means that [e... |
From my understanding, a problem amenable to a dynamic programming solution has these two properties:
Overlapping Subproblems — The same subcase (a subsection of the overall problem) keeps reappearing. Thus, memoization can be used to boost performance.
Optimal Substructure — The problem can be broken down into smalle... |
int sumHelper(int n, int a) {
if (n==0) return a;
else return sumHelper(n-1, a + n*n);
}
int sumSqr(int n) {
return sumHelper(n, 0);
}
I am supposed to prove this piece of code which uses tail recursion to sum up the squares of numbers. That is, I need to prove that for $n ≥ 1$, $sumsqr(n)=1^2+2^2+\dots+n... |
Floyd–Warshall calculates minimum distance between any two vertices in the graph.
for(int k=0;k<n;k++){
for(int i=0;i<n;i++){
for(int j=0;j<n;j++){
dist[i][j]=min(dist[i][j],dist[i][k]+dist[k][j]);
}
}
}
So, it basically calculates distance between every two nodes i,j having 1 inter... |
I analized the bubble sort algorithm and I cannot see why they "implemented this way". I wrote down the results as the two loops performed their works and, with my small testing arrays, the outer loop condition to stop was always too much (the array was sorted when "i" was like 2, when the loop conditon to stop was 5.... |
I have the language $L = \{a^i b^j c^k \mid i+j=3k\}$, however I am struggling to convert it to a CFG.
I have made it into a PDA fairly easily, its just now getting this to the CFG which is the issue.
I have thought about dividing it into 3 cases then taking the union of them for example:
$i=0, j=3k$
$i=3k, j=0$
But th... |
In the example below, is this guaranteed to be safe? I see two processes that require the same resource. It's not a direct cycle but it seems to be a possible deadlock where P0 could get held up.
|
s = n
while (s > 4)
s = s / 2
else
s = s - 1
Let $T(n) = \Theta(S(n))$ where $S(n)$ is number of while-loop runs.
$S(n)=1 + S(n/2)$ if $n$ is even
$S(n)=1 + S(n-1)$ if $n$ is odd
$S(n)=0$ if $n \leq 4$
By converting n to a binary number, and I think
if $n < 2^k$, then $S(n) \leq k - 1$
I have come to this relati... |
If Q1 and Q2 are countably enumerable, then is Q1\Q2 countably enumerable?
I am reading a text where they claim that this is not the case and ask the reader to come up with a counter example.
Can someone give a counter example to the claim that if both Q1 and Q2 are c.e. then so is Q1\Q2?
Since H is semi-decidable and ... |
I came across this question while solving past papers and I'm not very sure as to how to construct my proof for the second and third question. I understand the concept that can be applied here would be that the lower bound for any sorting via comparisons based algorithm is always $n\log n$.
It would be impractical to ... |
I am having much trouble understanding the following definition (of certificate complexity - for decision trees) from Arora and Barak's book Computational Complexity: A Modern Approach. Perhaps there is a typo in it:
Definition 12.3 (page 262). Let $f : \{0,1\}^n \to \{0, 1\}$, and $x \in \{0,1\}^n$. A 0-certificate f... |
I have some sources of data, and each one of this sources have a cost per request. I know wich data attributes each one of these sources have, and what are the best sources for each attribute.
Given a list of attributes, I have to decide the best group of datasources to consume, thinking about Quality of the data first... |
The following problem is from my algorithms class:
Given a graph $G=(V, E)$, decide whether a partition of $V=(V_1, V_2)$ exists such that $\delta(G(V_1))\ge 2 $ and $\delta(G(V_2))\ge 3 $, where $G(V_1)$ denotes the subgraph induced by $V_1$ and $\delta(G(V_1))$ denotes the minimum degree of graph $G(V_1)$. Prove thi... |
The following problem is from my algorithms class:
Given a graph $G(V, E)$, a set $C \subseteq V$ is called a biclique iff $G[C]$ is a complete bipartite graph, where $G(C)$ is the subgraph induced by $C$. A biclique is called maximal if it is not a subset of a larger biclique. Then our problem asks whether there exi... |
A directed acyclic graph $G$ is confluent, if any two vertices
${v_1},{v_2}$ in $G$ which have a common ancestor $u$ also have a
common successor $w$. (I.e. if there are paths from some $u$ to both
${v_1}$ and ${v_2}$, then there are also paths from ${v_1}$ and
${v_2}$ to some $w$. Vertices $u,{v_1},{v_2}$ and... |
So, while trying to dive into "recursion" and the like, I came across an epigram about recursion by Alan Perlis:
Recursion is the root of computation since it trades description for time.
-- Alan Perlis
Common to epigrams, this sounds like a deep insight. But I've already got stuck on "root of computation" and in wh... |
I was reading an article on fleury's algorithm GeeksforGeeks. In fleury's algorithm, Once an edge is processed (included in Euler tour), we remove it from the graph. To remove the edge, we replace the vertex entry with -1 in adjacency list.
Note that simply deleting the node may not work as the code is recursive and a... |
I was trying to implement a Binary Search Tree using this article as a reference: Binary Search Tree in JavaScript.
I was thinking especially about the node insertion method. Here's my implementation:
class BinaryTree {
// ... initialization
add(val) {
if(this.root === null) {
this.root = new Node(val);
... |
Let $M$ be a Turing machine, $\Sigma$ an alphabet, $t \in \mathbb{N}$
$L = \{ w \in \Sigma^* : w$ is accepted by $M$ by at most $t$ steps$\}$
I want to show that $L$ is regular.
My attempt:
I'm trying to do this directly by constructing a DFA for $L$.
Let $M = (Q, \Sigma, \Gamma, \delta, q_0, q_{accept}, q_{reject})$
D... |
Let $L = \{ a^{2^n} \mid n \ge 0 \}$, which is a non-regular language (no proof here). Let $M = (\Sigma,Q,\delta,z_0,F)$ be a DFA with $\Sigma = \{a\}$, $Q = \{z_0\}$, $\delta(z_0, a) = z_0$ and $F = \{z_0\}$. Then the DFA should accept $L$ and $L$ is therefore regular. Why is my approach wrong?
|
How would a priority queue be coded efficiently in a functional programming language? I'm new to functional programming, but I'm having difficulty understanding how a data structure that seems to require mutability would be coded in a functional programming language, or how to take advantage of lazy evaluation to pull ... |
This is graph G:
I am required to find as much as 15 induced subgraphs, but so far I only found 3. Which are: a-b-d-e, b-c-e-f and a-b-c-e.
I was wondering if a-d-e-f would also be counted as an induced subgraph and other of this similar arrangement.
|
i have read about SYN cookies and i understood that they help to avoid DOS .. BUt my prof wants an answer as how SYN cookies can be used to cause DOS and how can it be avoided ? any help woul dbe really appreciated.. thanks in advance
|
Given a directed graph $G=(V,E)$, we know that there are efficient algorithms (i.e., linear in the number of nodes and edges) for detecting cycles in it. But this uses the fact that a basic task such as determining whether there is a vertex from $v_1$ to $v_2$ is easy.
Suppose, however, that the size of $G$ (i.e., the ... |
There are various methods to detect hamiltonian path in a graph.
Brute force approach. i.e. considering all permutations T(n)=O(n*n!)
Backtracking T(n)=O(n!)
Using Dynamic programming T(n)=O(2^n * n^2)
Now, there is one another method using topological sort. Topological sort has an
interesting property: that if all p... |
I am curios how simon's algorithm works and I have read this post
Simple explanation of Simon's Problem but still is not clear for me.
I have found on th internet this example https://www.cs.vu.nl/~tcs/ac/ac-11_simon_algorithm.pdf. Can somebody explain how are calculated the value of Simon's algorithm?
If we take the a... |
Suppose that $L$ is a language.
What does $\overline{L}^*$ signify?
Is $\overline{L^*}$ the same as $(\overline{L})^*$?
|
Having the current news about Google Assistant in mind, I thought that robots might use interfaces designed for humans to send data. Like a telephone interface.
Then I wondered: What is the maximum amount of data you can send in 1 minute when you have to use a "normal" voice setup?
Setting 1
One machine encodes the da... |
I'm wondering what the correct term for an algorithm that is probabilistically complete is. An algorithm is probabilistically complete if the probability of finding a solution, should a solution exist, approaches one as the runtime goes to infinity.
A motion planner such as PRM will eventually find a solution if one ex... |
I've been trying to understand computer concepts and such recently and I've been curious to know how the process works of a processor asking for an address and sending the bits to the hard drive, as well as how the hard drive index works when it's just a bunch of magnetic specs that cooperate with a mechanical arm. Wha... |
I think that it implies that B can be solved by a non-deterministic polynomial time or worse Turing machine, but I realise that there is possibly some greater result that I'm missing.
Thanks in advance.
|
Define a regular expression such that there is a string of 1 or more a's continuous followed by a continuous string of b's so that the number of a's and b's are the same.
I have ideas on how i would do this with a context-free grammar but i don't know how to so this under the restriction of a regular grammar.
|
The question is based on if we have the same Priority value when we are given:
Arrival Time = AT, Priority and Burst Time=BT.
1.Say if we a table with AT, Priority and BT. To dispatch a process it is obvious that we check the AT first since we cannot predict the future.
2.If AT= 0 for all processes, we have to chec... |
Version 1 of the question: I am looking for any correct $O(n)$ algorithm in the literature which will solve the DFA minimization problem referred to in the quote below from [Almeida & Zeitoun 2008]. Whether the algorithm works on strings or automata doesn't matter.
Version 2 of the question: What is the classical algor... |
When doing variable elimination on a formula in cnf form, there is created a lot of new clauses. Is there any efficient way to check if these are subsumed by other, already existing clauses?
|
I'm reading this article on a GCD algorithm described by Dijkstra:
https://www.cs.utexas.edu/users/EWD/transcriptions/EWD03xx/EWD316.4.html
I'm looking at program 1. In particular I'm trying to understand the proof that the loop terminates. Here is program 1 (my notation is slightly different than the one in the arti... |
I'm studying computer science and I want to show that a language which is accepted by a pushdown automaton with a bounded stack height is regular, but I'm totally lost... Can someone try to explain how we can prove it ?
Thank you in advance!
|
I understand than function decreases exponentially, then order of growth of this function is exponential with negative exponent. But what does it mean that order of growth decreases exponentially?
I don't understand what should i look for in this exercise:
Exercise 2.33 Find a recurrence describing a sequence for whic... |
So far, i've only made recursive formulas for finding simple patterns such as fibonacci, however i can't seem to get my head around this.
The information available is that there are $n$ different beers with different prices, the $i$th beer has a price $p_i$. Students have $C$ amount of money
How would you make a recur... |
I want to create a function which allows me to input a list, and then add all of the positive numbers from the list together, leaving any that are negative.
([3,1,-1])
For example only 3 and 1 would be added from this list.
Would I right in thinking the function should be recursive and have a guard?
|
I want to produce a value from a set, where each value has an associated weight.
Eg:
[(1, 4), (2, 3), (3, 3)]
should give me a 40% chance of picking 1, and a 30% chance of picking 2 or 3 respectively.
Using a cumulative sum table and binary searching on it yields the value I want in O(logN) where N is the number of v... |
I'm searching to devise an algorithm that finds a set of n time intervals with a random duration between min and max. On top of that, the total duration is also given (tot).
For example:
n = 15
min = 30 s
max = 90 s
tot = 15 minutes
means:
"Find 15 time intervals, each of a duration between 30 and 90 seconds, which, ... |
There is a grammar G given:
S->XaX
X->aX|bX|eps
I just replied to the first question that was about showing that this grammar is ambiguous. The second question is to find an unambiguous equivalent grammar of this grammar given. I don't really know how to do ... |
Here's a nice property about unit-disk-graphs :
Suppose $V\subseteq\mathbb{R}^2$ is a finite set of points in the plane. Build the graph $G_V=(V,E)$ such that $(v,v')\in E$ iff $d(v,v')\le2$, where $d$ denotes the euclidian distance. $G_V$ is the unit-disk-graph associated to $V$.
Unit-disk-graphs and planar graphs ... |
Give an algorithm that, given an NFA over a one-letter alphabet, determines whether the language it generates has the property that for some $n$, $$ L^* = \bigcup_{k=0}^n L^k. $$
I need some tips how to solve that.
|
I got a little confused with these 3 concepts. Is there a difference between bisimulation and bisimulation equivalence and if yes, then what is it? Also, if we say that the LTS's X and Y are bisimilar, this implies they are simulation equivalent, right? Please, someone, clarify.
|
I have some signals that look like following:
I would like to remove the two peaks by doing linear interpolation, so I can get something like this:
where the orange line segment should replace the two peaks after the interpolation.
I understand this very difficult because even for human being you can do it different... |
A system consists of two separate algorithms (operated in pipeline). Algorithm#1 is iterated m times and has a time complexity of O(m). Algorithm#2 is iterated N times with time complexity O(N). The output of Algorithm#1 is the input of Algorithm#2. Hence, when Algorithm#1 is fully run (m times), Algorithm#2 is started... |
I'm currently studying the time complexity of the solution provided by my teacher to this problem, and I can't understand the logic:
Let A be an unordered array of positive natural numbers. Write an algorithm that checks if it's possible to divide A into pairs (subsets of two elements) of equal sum.
Example [1 7 4 2 4... |
I am trying to understand a Haskell class declaration and instance from a paper. I am trying to understand the class declaration:
class (Surfaces v o, Paths a b (v o)) => Vehicles v o a b
My current understanding is that the first occurance of types "v o" in the Vehicles context seems to refer to two distinct data typ... |
A partial computable function $\varphi_e$, defined on a c.e. set $W_e$, is called extendible if there exists some computable function $f$ which extends $\varphi_e$, i.e. $\varphi_e(W_e) = f(W_e)$.
My question is what are the conditions for a p.c. function $\varphi_e$ to have an injective extension.
So far I have found ... |
A problem in $P$ is one that can be solved in polynomial time (or faster) on a deterministic Turing machine. Now if I am correct, there is nothing here referring to the algorithms - which can themselves can be given a complexity class (necessarily greater or equal to that or the problem).
My question is: Are there any ... |
I am trying to solve a variant of the Exact cover problem where every element has to be covered exactly twice instead of once ( i.e. has to be in exactly two sets that are part of the cover).
Now, it is clear to me that this is an NP-complete problem, but I wish to know if there is any hope for some pseudo-polynomial t... |
I am studying various multi-threading models. Here the user threads are mapped to Kernel Threads. They are -
Many to one model.
Many to many model.
one to one model.`
What kept me wondering was why there is no one to many model ?
|
The definitions of 2NF, 3NF and BCNF goes like this:
2 Normal Form (NF) definition
A relation is in second normal form if and only if it is in first normal form and all the non-key attributes are fully functionally dependent on the candidate key.
3 NF - definition
A relation schema $R$ is in third normal form... |
I am working on this exercise with the purpose of learning how to provide proper proofs and I would like to know if my proof for the following problem is correct.
Given a sorted array $A$ (of $n$ distinct elements) and three elements $x$, $y$, and $z$, where $x < y < z$. The problem is to determine whether $x$, $y$, a... |
E -> E + E | E * E | (E) | a
Derivation for ( (a+a) * a)
Question : Show that the grammar is ambiguous by sparse tree method
Now, I have derived two derivation using left most derivation
but it results in like this
1st : ((a+a) * a)
2nd : (a * (a+a))
is this correct or the order should also be same?
|
The title might be hard to understand, here's a picture of what I don't understand:
And further, why can we conclude this?
I thought about posting to theoretical CS stackexchange but it asks for research level and I don't think this will be accepted
|
Consider the setting of finite MDPs. I will be using the notation in Chapter 2 of http://rll.berkeley.edu/deeprlcourse/docs/ng-thesis.pdf.
Say we have already computed values for the optimal $Q$-function: $Q^*(s, a) = \max\limits_{\pi} Q^\pi(s, a)$. Why exactly does $\pi(s) = \arg\max\limits_{a \in A} Q^*(s, a)$ consti... |
Suppose a computer using direct mapped cache has 512KB of main memory and a cache of 4 Bytes, where each cache size is 64KB.
1)Find Number of blocks in cache.
|
Func5(n)
1 s=0;
2 i=6;
3 while (i < n^(5/2)) do
4 j=4;
5 while (j < 5i) do
6 s=s + i - j;
7 j=j + 9 ;
8 end
9 i=4 * i ;
10 end
11 return (s);
So far I got the upper bound for this function is O(n^(5/2)log(n)) and I am not sure if or not this is the closest upper bound we can get. And I have ... |
T (n) = T (n/2) + 2^n
I am solving this using master theorem and I calculated it to be big theta(log2 n) (log n to the base 2). But answer state it to be 2^n.
Any help would be appreciated.
|
As reading the textbook of Introduction to the theory of computation_third edition - Michael Sipser, which have the concept that we call a context-free language L inherently unambiguous if there does not exist an ambiguous CFG that generates L.
Do we have any CFLs are inherently unambiguous? if so, can you please give... |
We have regular expression for DFA and NFA, at the same time, we have CFG for PDAs, What do we have for Turing Machine? If this questions is too obvious, please points me some reading, I am just learning Introduction to the theory of computation_third edition - Michael Sipser myself.
|
I've searched this and was not able to understand the answer.
What's the idea/intuition behind this? What's the purpose and why is it important?
And considering the wikipedia explaination, specifically this part:
outputs the binary (or unary) representation of f(n), while using only O(f(n)) space
Why does it matter ... |
I have this assignment for a class and we're beginning to learn time complexity. I have to find create a Java program that finds the stability indices of an array. Stability index being defined as a[0] + a[1] + ... a[i-1] = a[i+1] + a[i+2]+ ... a[n-1]. Essentially if you sum every element left of the index and every el... |
I am interested in the applications for set covering. On Wikipedia and this thread, I read that it is used in antivirus programs, random testing in software, and personnel scheduling. Does anyone know where to find or access set covering benchmarks that represent those problems (or any other problem for that matter)? M... |
I have this algorithm, which is exactly like merge-sort, but instead of halving the array each recursion, it actually splits it into $1/4$ and $3/4$ parts. Other then that, it does exactly the same operation as merge-sort.
The thing is, I can't understand the exact way to calculate a closed form solution to my recursiv... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.