instruction stringlengths 35 29.1k |
|---|
In reading the Wiki article on Simon's Problem, the article states that it takes exponential time(in the classical version) to discover the secret string S that is inside the black box. Why is this black box problem not considered to be a one way function and are there any cryptographic primitives based on the hardness... |
$A=${$ ⟨M⟩$:$M$ $is$ $a$ $Turing$ $Machine$ }
What can be said about $A$ ? Specifically, is $A$ decidable,regular,CFL,CSL?
I would say $A$ is decidable since we can write an algorithm to check whether a string is a valid encoding of a Turing machine .
But, is $A$ Regular[or CFL or CSL] ?
Edit : Someone argued that h... |
I'm trying to solve 17-2(b) problem from Cormen(CLRS) using potential method.
Problem from Cormen:
17-2 Making binary search dynamic
Binary search of a sorted array takes logarithmic search time, but the time to insert a new element is linear in the size of the array. We can improve the time for insertion by keeping se... |
While doing my NFA homework in my automata class, I feel like I'm not taking advantage of the ε-transitions I'm learning about. I can solve problems without using it. It's not like I really need it, except for when an empty string is part of the language, then I'll finally add an ε.
A lot of my text book examples use ... |
Let the sequence $r$ be defined by:
$$\begin{align*}r_{1} &= 1\\
r_n&= 1 + r_{\lfloor\sqrt{n}\rfloor}\,,\quad n\geq 2\,.\end{align*}$$
Prove by induction that $r_n$ is $O(\log_2(\log_2n))$.
My idea is to find the closed form function of r and then use the big O definition on the closed form function but I'm having a ha... |
I'm preparing a presentation on prefix computation (aka scan, the generalization of prefix summation to any associative operator) for a class I'm taking on parallel algorithms.
Several lists of applications of prefix computation include lexical analysis (tokenizing), but do not cite a source for that. I have failed to... |
What is a standard term for a matching in a bipartite graph, in which one part has less vertices than the other part, and the part with less vertices is fully matched (but the other part is, obviously, not fully matched)?
It is not exactly perfect, but it is "one-sided perfect", or "as perfect as it could be". What is ... |
Let $L = \{ab^ncd \mid n \geq 0\}$. If we take $p = 5$ and $w = abbcd$ and write
$w_i = xy^iz$, where $x = abb$, $y=c$, $z=d$, then $w_2 = abbccd$ which is not in $L$. We conclude that $L$ is not regular but it obviously is!
What am I doing wrong?
|
Is the language of the set of descriptions of all Turing machines recognizable? I'm thinking not, but I can't quite define why.
A language is Turing-recognizable if some Turing machine recognizes it. So I guess I'm wondering if the language L of all Turing machine descriptions is Turing-recognizable.
|
Reducing one computable problem to another by providing an algorithm which transforms an instance of one problem to one of the other (and limiting the time or space of that algorithm) is clear to me. However, I fail to understand how reductions via logic work, e.g. a reduction in FO. My biggest problem is that the stru... |
I've looked through all the other similar questions, but I don't feel like I understood exactly what I'm supposed to do with my case, so I'm hoping I'm not the only one.
In an exercise I'm doing, I'm told to consider a computational system with a direct mapping cache, that can store 16 blocks of 4 bytes, and 32-bit add... |
Just need a little help understanding hardware interrupts.
As I understand (feel free to correct) a hardware interrupts occurs when hardware wants attention of the computer. In basic terms the hardware sends a message down the interrupt line which is then controlled by the PIC. The CPU receives the interrupt and carrie... |
I was thinking whether it is true that every computational problem intrinsically has a minimum ammount of memory required for any algorithm that computes it.
But then i was confused to what "memory requirement" really means and how we could quantify it .
Looking for how Computational Complexity treats the memory requir... |
Consider the following recurrence
$$T(n)=T(n-1)+n\log n$$
My approach:
Solving using Substitution
$T(n)=n \log n+(n-1) \log (n-1)+(n-2) \log (n-2)+(n-3) \log (n-3)+...$
$=[n\log n + n \log(n-1)+ n \log(n-2)+ n \log(n-3)+...]-[\log(n-1)+2\log(n-2)+3\log(n-3)+...]$
$=[n(\log n + \log(n-1)+ \log(n-2)+ \log(n-3)+...)]-[\lo... |
0.1 via $32\text{ bit}$ is rather easy:
Sign: $0_2 = 0_{10}$
Exponent: $123_{10} = 01111011_2$
Mantissa: $5033165_{10} = 100110011001100110011001101_2$
Now, how do you calculate this, if you've only $8\text{ bit}$ available?
Sign: $1\text{ bit}$, Exponent: $2\text{ bit}$, Mantissa: $5\text{ bit}$
My idea: $S=0; E=01; ... |
I want to build a Automatic Speech Recognition (ASR) engine for myself, but I've no idea from where to start.
I've read that most ASR's are build upon Hidden Markov Models, but also I've read that HMM is limited somehow and a better approach is to build a ASR upon Machine Learning features.
Overall I am confused.
Can... |
Could someone explain to me WHEN do you use existential and universal quantifiers for Relational Calculus?
Given this schema:
Hotel(hotelNo, hotelName, city)
The expression below gets all hotel names based in London (expressed in Domain Relational Calculus)
$$\mathrm{HotelName|(\exists hNo,cty)(Hotel(hNo,hotelName,ct... |
http://en.wikipedia.org/wiki/Modular_exponentiation#Right-to-left_binary_method
What is the time complexity of the right to left method in modular exponentiation?
is it O(1) because we are going through the binary representation of e which is constant time? assuming e is a 32-bit integer
int mod(int b, int e, int m) {
... |
I'm trying to link Combinational Logic Circuits ( computers based on logical gates only ) with everything I have learned recently in Theory of Computation.
I was wondering whether combinational logic circuits can implement computations in the same way finite state machines can. They seem radically different :
Fi... |
After reading about iterative deepening depth-first search on Wikipedia, I could understand that it just limits the depth upto which dfs can go in one iteration/call.
However, I could not understand why it is said that it requires $O(b \times d)$ memory, where $b$ is fan-out of nodes i.e. children and $d$ is max-depth.... |
If a certain problem $X$ is NP-complete and $P\neq NP$, then $X$ is not polynomial. But we still don't know that $P\neq NP$, so in theory $X$ may be polynomial. Does the fact that $X$ is NP-complete say anything about it being more difficult than other polynomial problems? In particular:
Does it mean that $X$ cannot b... |
I read in the introduction of this paper
http://www.scottaaronson.com/papers/uncompute.pdf
that there is a problem $B$ such that $BQP^B \not\subset P^{NP^B}$, and that $B$ is in $BPP$. But, using the fact that $BPP$ is in $BQP$ and that $BQP$ is low for itself (i.e. $BQP^{BQP}=BQP$), as proved in
http://arxiv.org/pdf/q... |
The 3SUM problem has two variants. In one variant, there is a single array $S$ of integers, and we have to find three different elements $a,b,c \in S$ such that $a+b+c=0$. In another variant, there are are three arrays $X,Y,Z$, and we have to find a number per array $a\in X, b\in Y, c\in Z$ such that $a+b+c=0$. Call th... |
I am looking for the optimal string distance metric to indicate similarity/difference between possibly truncated words. For example, I would like to find the distance metric between the name "Richard" and possible variations of it (and other names as well)
Variations: Richard | Rihcard | Richard Smith | Rich? | R?ard ... |
I have read a lot of books on membrane computing (P system), of which the computational completeness of several variants are already under investigation. My goal is to design my own variant and prove its computational completeness.
I also know that in order to prove computational completeness many research papers norm... |
I understand that a regular language can be specified by either regular or non-regular grammars. What is an example of a non-regular grammar for a regular language?
|
I am working with small data sets of N elements, usually with N = 8, 16, or 32 elements; all are positive 64-bit float numbers. I need to identify the smallest N/2 elements. It is not required that the smallest N/2 elements be sorted, just that I identify which ones they are from among the group of N. Each program r... |
Like think of the function $f\colon \{ 0,1\}^* \rightarrow \{0,1\}^*$ which maps a binary string string $x$ to say a string of $0$s of length $\vert x \vert ^2$ whre $\vert x \vert$ is the length of the input string.
This to my mind looks like a work that can be done using only a linear amount of space on the work tap... |
Regarding turing completeness, i read that for a language/machine to be turing complete it is required that it has some sort of conditional.
Consider the factorial problem, we would typically define the algorithm as
Solution 1.
int fact(int n)
{
if n == 0 then
return 1;
else
return n*fact(n-1);
}
An alternative woul... |
$$T=\{\langle M\rangle \mid |L(M)| =1 \text{ or } |L(M)| >2\}$$
I started with Rice's theorem (come up with an example where $|L(M)| = 2$) to see that $T$ was undecidable. Then I figured out $\bar{T}$ was unrecognizable, because $H =\{\langle M \rangle \mid M\text{ halts on the empty string} \}$ has a mapping-reduction... |
How would you understand this pseudocode of parallel algorithm for LU-decomposition ? I'm confused mostly with the
min(i; j) - 1,
because I have no idea, what the author wanted to say by it. I know that it means " choose the lesser number of 'i' and 'j' and then substract one", but I don't know what is I and J here (m... |
I have the following language...
$$A=\{a^ib^i | i>0\}\cup\{a^jb^k|j>2, k>3\}$$
Now, pumping lemma states that a regular language can be written in the form $x=pq^ir$. What confuses me is how to split the language into three parts, this is my attempt:
$p=a^j$
$q=a^jb^k$
$r=b^k$
I believe my attempt is incorrect but this... |
I am a high school sophomore who is interested in computer science. I developed a cool algorithm for #SAT, and I'm implementing and doing a science fair project on it. My adviser, who is the best science teacher at my school and is also the AP Comp Sci teacher, told me that she has absolutely no idea what my project is... |
Let $a_{1} , ... , a_{m} $ be real numbers $\geq 1$, where $m$ is at least 1. I am supposed to store them in an augmented AVL structure with the following operations:
-PartialSum (i): Return the $i_{th}$ partial sum.
-Change (i, y): Change the $a_{i}$ element for y.
I need this structure to retain the AVL properties an... |
Suppose we have a function, CalculateEdgeWeight, which is computationally expensive. We want to find the shortest path between two nodes $s$ and $t$ in a simple edge-weighted digraph $G= (V,E)$ where weights of $ij \in E$ are calculated with CalculateEdgeWeight($ij$).
Is there a shortest path algorithm that does not r... |
I wonder how we can perform algorithm analysis when in an algorithm we have calls of functions whose definition we do not know, e.g. functions delivered by external libraries.
|
Regarding turing completeness, i read that for a language/machine to be turing complete it is required that it has some sort of conditional.
Consider the factorial problem, we would typically define the algorithm as
Solution 1.
int fact(int n)
{
if n == 0 then
return 1;
else
return n*fact(n-1);
}
An alternative woul... |
I am trying to understand the proof why Gale–Shapley algorithm is optimal, however i am unable to do so. Could you please expand the proof, since the proof on this page https://sites.google.com/site/stablemarriageproblem/intro and here
http://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15251-f10/Site/Materials/Lecture... |
Say the CPU is currently handling an interrupt. Another interrupt arrives but it's lower priority than the current one so it gets put in the 'pending interrupt register'. My current interrupt is done so I use a 'return from exception' instruction. Where will this instruction jump to: the address which was interrupted, ... |
Let $A \subseteq B$, and A is unrecognizable. I know in general that doesn't mean B is unrecognizable. However, are there some limitations we could put on A and B that would make it true? The only thing I could come up with was A=B. Plus, we could say B is unrecognizable as part of our assumptions, but that's not reall... |
I wanted to know how M:N kernel user thread model handles context switching, between multiple khread and pthread. How does the PCB/TCB for process and threads look like, how is state of registers stored while switching between kernel mode and user mode or vise versa, or between kernel threads or between user threads.An... |
I'm working on a problem set for my algorithms course and we're asked to solve the recurrence relation
$$
T(n) = 7T(n/2) + n^2 + \log(n).
$$
Since this recurrence relation is not of the form $T(n) = aT(n/b) + n^d$ and therefore the master theorem does not apply, I'm confused about where to begin in solving it.
Could an... |
I want to find a near-optimal solution for a maximum weight independent set.
i.e given a graph $G = (V,E)$ I want to find a set $S = \{v_1,v_2,\dots,v_n\}$ of nodes in $V$ such that the sum of their weights is maximum (The weights are positive), under the constraint that every pair is not connected by an edge,
i.e $\f... |
I was wondering if someone could possibly verify my solution to the following:
I'm trying to solve the recurrence relation $T(n) = T(n-1) + 2/n$. To get it into the form of the Master Theorem, I note that for sufficiently large $n$, $n - 1 \geq n/2$. Moreover, $2/n = O(1)$. Thus, we can rewrite the equation as $T(n) = ... |
Question:
If a system has $32k$ bytes and each such byte has unique address(so $32k$ addresses), what is the smallest possible bits that can be use by every byte for the address ? All the bytes use the same number of bits for the address.
I thought the answer can be found by finding the value to which $2$ can be rai... |
I thought the answer would be 32 for remainder $0,1,2,\dots, 31$. But answer given as $6$.
and explanation is given as if the number is $2^n$ then number of states required would be $n+1$.
|
I am implementing a genetic algorithm to use as an optimisation algorithm to evolve robots. The robots have certain parameters (represented as floats) which can lie anywhere within a certain range defined for each parameter. My goal is to optimise these parameters to produce the fittest robot.
There are about 25 parame... |
I am doing a artificial intelligence course as part of my computer science degree.
I am stuck on a question about searching. The question is a version of the Bridge and torch problem.
Five people need to walk from this side to the other side of a bridge at night. The bridge is not in a very good condition and will ho... |
I fail to understand why cut off value would be system dependent, and not a constant.
From Princeton University website
Cutoff to insertion sort. As with mergesort, it pays to switch to
insertion sort for tiny arrays. The optimum value of the cutoff is
system-dependent, but any value between 5 and 15 is likely to... |
When deterministic automaton, I need to prove that you can't implement the language in it, because the language is not regular.
Easiest way to prove that a language is regular, is just by making an automaton for it. But if the automaton is not regular, you can't just say that it's not regular because you couldn't build... |
I know a simple reduction from 3-color to 4-color. But how do you reduce 4-color to 3-color ?
I have been searching for the right way to make this reduction for a while now. I would love some pointers.
|
Why should computer designers trade off clock rate against cycle count? Can somebody explain this sentence for me? Shouldn't it be that when the clock rate increases the cycle count decreases?
I don't understand why the cycle rate and the cycle count are not proportional.
|
In a queuing system (M/M/1) with a finite packet capacity $z$, how do you determine the probability of packet loss if we assume that packets are dropped when the system is full? Packets arrive with a rate $\lambda$ and are served at rate $\mu$ (using the Poisson distribution).
My attempt at a solution:
Probability of p... |
Consider the following problem:
Input: lists $X,Y$ of integers
Goal: determine whether there exists an integer $x$ that is in both lists.
Suppose both lists $X,Y$ are of size $n$. Is there a deterministic, linear-time algorithm for this problem? In other words, can you solve this problem in $O(n)$ time deterministica... |
In a recent homework question we were asked to implement a program that would use only bitwise operations. From our notes, this includes & | ^ ~ >> << and >>>. We are not allowed to use arithmetic operations, or loops.
Since immediately addition can be defined with the above accepted operators, what constitutes "arith... |
In BSS model in which one is allowed $\{+,-,\times\}$ operations, how is division and square root handled? Is there a typical procedure dealing with these involved situations?
|
I am trying to solve this equation using C++:
X and Y are both given sets of data.
X = [x1, x2, ... , xn], Y = [y1, y2, ... , yn]
a is a given integer.
The goal is to find a pair z and k that fulfills this equation based on the given data.
I am currently attempting to solve this equation using non-linear least squares ... |
$A=\{\langle M \rangle \mid M \text{ is a turing machine and }|L(M)|\geq3\}$
Since Recursive enumerable languages are turing enumerable, so listing of all strings of the language in finite time is possible. Then deciding whether cardinality is greater than 3 should be decidable. But the material that i have been studyi... |
I am working with random number generation and testing, so I'm using NIST statistical tests to examine my random numbers. Now I want to compare my solution with other RNGs, but i can't find any probabilities of passing a NIST statistical test for them. So does anyone have that info? Info about both PRNGs and TRNGs woul... |
While reading about Day–Stout–Warren algorithm for balancing BST which takes any BST and transforms it into a balanced BST in O(n) time.
In my opinion I can achieve absolutely the same with these simple steps:
convert BST into array using inorder traversal. This will give me an array in increasing order and can be com... |
Given a directed graph, Dijkstra or Bellman-Ford can tell you the shortest path between two nodes.
What if there are two (or n) paths that are shortest, is there an algorithm that will tell you all such paths?
Edit:
I have just thought up a possible solution. Could you just do a Bellman-Ford but when relaxing edges, if... |
Wikipedia says about Gustafsons's law that:
It may even be the case that $\alpha$ diminishes as $P$ (together with the problem size) increases.
I'm not understanding how $\alpha$ can ever change given it's definition:
$$ \alpha= a / (a + b)$$
I thought that $a$ and $b$ are constants independent of the problem size.
... |
We are given a finite set of propositional atoms $\{x_1, \dots, x_n\}$ and an integer $k$.
Can we capture through a propositional formula $\varphi$ (built from the standard connectives $\neg, \wedge, \vee$ only) the set of all models having at most $k$ atoms valued at $1$, such that the size of $\varphi$ is polynomial ... |
This is a problem in a theory of computation book that's stumping me:
Suppose that we know that $L_1 ∪ L_2$ and $L_1$ are regular. Can we conclude that $L_2$ is
regular? Explain.
At first, I thought I could build the NFA that is the union of two DFAs, one which accepts $L_1$, and one which we don't know about. Th... |
One formulation of NP is this: a language is in NP if it can be solved in polynomial time by an algorithm that has access to a special "Nondeterministic Bit" function, which branches the world into two alternate universes, writes a $1$ on the worktape in the first universe and a $0$ in the second, finishes the computat... |
How can I make a finite automaton which does not end in string ab.
With the alphabet a,b
I made 3 states. For the first one it is accepting states and thus accept the empty string.
So here is a table I made. State 1 is initial state
input goes to state input goes to state
State 1
b 1 ... |
I'm working on a class library (C++) that can be thought of as a producer/consumer queue of producer/consumer queues. There are many queues of data, and the goal is to assign worker threads to process these queues, as needed, using coroutines. At any rate, the details aren't necessarily important to the question, but I... |
I'm new to linear/integer programming and I'm trying to solve a little problem I made up. I want to "pack" animals into a minimum number of bins where some of the animals cannot co-exist (wolves and sheep). Here is a picture of my little flow network that's guiding me.
Imagine that each animal node outputs 1 animal o... |
Suppose there are $\lceil\log n\rceil$ sorted lists of $\lceil\frac{n}{\log n}\rceil$ elements each. The time complexity of producing a sorted list of all these elements is: (Hint: Use a heap data structure)
$O(n \log \log n)$
$θ(n \log n)$
$Ω(n \log n)$
$Ω(n^{\frac{3}{2}})$
My approach:
I know complexity of heap so... |
So, I'm new to this whole asymptomatic notation with respect to algorithms. So say you have a $f(n) = 1/n$ and $g(n) = 1$, would it be OK to say that $f(n)$ is not equal or is not an element of $O(g(n)) $?
I say this because I'm actually drawing an analogy with another example. Say in my second example $f(n) = n$ a... |
A program takes as input a balanced binary search tree with n leaf nodes and computes the value of a function $g(x)$ for each node x. If the cost of computing $g(x)$ is min{no. of leaf-nodes in left-subtree of x, no. of leaf-nodes in right-subtree of x} then what is the worst case time complexity?
Since $g(x)$ is app... |
In my Computer Logic class we were assigned the following problem:
Complete a truth table that has $3$ inputs $(A, B,C)$ and one output
$(F)$. $F$ is asserted whenever $B$ or $C$ are asserted, but
deasserted if both $B$ and $C$ are asserted. $F$ is asserted whenever $A$ is
asserted and $C$ is deassert... |
This is a homework problem. I've wrestled with it for quite awhile and can't come up with a valid solution. The problem is:
Find a regular grammar that generates each of the following languages:
$$L = \{ w \in {a,b}^* \mid \text{na}(w) – \text{nb}(w) = 1 \mod 3 \} , $$
where $\text{na}(w)$ is the number of $a$s and $... |
I'm trying to understand how to prove a language is decidable, semi-decidable, co-semi-decidable, or none of the above.
I've got the problem: $$A_{\mathrm{right}} = \{ \left< M\right> | M \text{ never moves on blank input} \}$$
and I have to prove what it is. I know that it is decidable, because if given an input whe... |
As title says, can the number of states in DFA be greater than $2^n$ when language-equivalent NFA has $n$ states - that is if the NFA recognizes the same language as the DFA and has $n$ states, can DFA have more than $2^n$ states?
I think it is, and this is trivially. However Wikipedia seeems to write that it is not po... |
It is known that when NFA's accepting states are swapped with rejecting states, the recognized language is not complement of the original language. For some language, it may be the case that some strings that were recognized in the original NFA may still be recognized in the state-swapped NFA.
My question is, is there... |
(Full disclosure: homework question)
Let $M = (Q, \Sigma, q_0, A, \delta)$ be a finite automaton. The extended transition function $\delta^*$ is defined as follows:
$\forall q \in Q$
$\delta^*(q, \Lambda) = q$
$\forall q \in Q, y \in \Sigma^*, \sigma \in \Sigma$
$\delta^*(q, y \sigma) = \delta(\delta^*(q, y), \sigma)$... |
Assume we have a (multi)set of nontrivial intervals $\mathcal{I} = \{I_1,...,I_n\}$ and for any two $I_i, I_j \in \mathcal{I}$, we have that $I_i \cap I_j$ is trivial (that is: contains at most one point), or one of them contains the other. Just to clarify, an example would be $\mathcal{I} = \{[0,10], [2,6],[6,8], [2,4... |
I was reading the book "The singularity is near" written by Kurzweil and he mentioned the reversible gates like for example the Fredkin gate. The advantage using such gates is that we could get rid of the thermal waste related to computation where bits just disappear into heat, and computation won't need any energy inp... |
I've been learning about Theory of Computation lately, and i'm trying to link general programming with the Theory of Computation. I thought of considering any arbitrary program that halts, as an algorithm for solving some specific computational problem in the sense of Theory of Computation.
For some programs (like ... |
Is there a way to multiply scalar by vector faster than just multiplying each element of the vector by that scalar?
It feels to me that there should be some exploit to do that. After all we will multiply two vectors elementwise in N steps. The original problem is simpler as it's only scalar by vector. Shouldn't we be a... |
I'm reading a Wikipedia article on the Traveling Salesman problem as an Integer Programming formulation (http://en.wikipedia.org/wiki/Travelling_salesman_problem). The authors have all their constraints and I don't understand the final one. The following statement is in there.
To prove that every feasible solution co... |
Think of an $n$-ary alphabet as $\{0, 1, ..., n-1, n\}$. For example, a binary alphabet is $\{0, 1\}$.
Do Turing Machines with binary alphabets decide the same set of languages as Turing Machines with $3$+ symbol alphabets?
I am unsure of how to show equivalence. Clearly, any $3$+ symbol TM can simulate a TM with $2... |
I'm doing a course in Computer Programming Languages and I'm trying to prove the following (roughly following Pierce's Types and Programming Languages book):
if $t \rightarrow^* t'$ then $if\; t\; then \; t2 \; else \; t3 \rightarrow^* if\; t'\; then \; t2 \; else \; t3$
I'm a little confused about where to start; as f... |
I am trying to reduce the grammar to LL(1) for a hypothetical language we created. I have removed most of the left factoring issues in the grammar, using the general rule of introducing new non-terminal characters for the same.
For example,
<assignmentstats>------- <type><id>=<E>/ id=<E>/id'['<E>']'=<E>/
is trans... |
I am given this algorithm
And I am also given the fact that $1 \leq k \leq n$.
If we let X be the number of times line 2 is executed, then I am supposed to find the run-time probabilities for the different cases.
Thus I know the best case will be when $A[n-1] = k$ because line 2 will only be called once.
I know that $... |
So I'm learning for an upcoming exam and there's a specific problem which I can't show:
Let A be decidable and B undecidable, then $A \le B$
Can someone give me a hint how to solve that? Furthermore, does that mean, that every decidable language is reducible to an undecidable language?
|
Please, help me to understand the mathematics behind the following formula of CPI. Why do we calculate CPI the way it's done on the pic?
|
I am currently constructing pushdown automata.
can I push/pop alphabet more than two in a transition??
For example, $\delta$(a, a/aaa) means, in the state of input alphabet 'a' and stack point 'a' (there is only one item 'a') then it can push two more item 'a' on the stack so that there is three a's in the stack.
|
What is the correct term for the maximal running time of a given algorithm on all inputs of length bounded by given $n$, on which the algorithm halts? Assume, if necessary, that the halting problem of the given algorithm is decidable (with unknown complexity).
How is this time function of $n$ called? Is it studied in... |
You are given a natural number n (n<20). We construct the set S from all binary numbers with n bits. We call two numbers "compatible" if they don't have any common substring of length n-1 (consisted of not necessarily consecutive bits). Now we have to find the maximum number from the numbers in S so that every pair of ... |
There is a branch mispredict and while executing the false code, an interrupt occurs (for example a keyboard interrupt). The EPC (register that holds the return address) now holds the wrong return address (after the interrupt handler has finished, it would return in code that wasn't even meant to be executed). How do C... |
I've been searching the net for an answer to this question, but it's guetting quite confusing.
I want to know if there are some undecidable problems for a classical computer that a quantum computer could do.
The examples I've seen are things like Shor's algorithm, but that's "just" because the quantum computer is more ... |
I am in High School (P.R.) and I am a regular person in math. Should I try computer science?
|
I was reading about Suurballe's algorithm on Wikipedia, for the shortest
edge-disjoint paths problem, i.e. given nodes $s$ and $t$ finding a pair of paths between these nodes, whose accumulated weight is minimal.
I understand why the output consists of two $s$-$t$ paths, and the relationship between this and augmenting... |
For a certain language $L \subseteq \{a, b\}^∗$, IL has exactly four equivalence
classes. They are $[\lambda]$, $[a]$, $[ab]$, and $[b]$. It is also true that the three
strings $a$, $aa$, and $abb$ are all equivalent, and that the two strings $b$ and
$aba$ are equivalent. Finally, $ab \in L$, but $\lambda$ and $... |
I have just read this answer and was very satisfied and it is indeed a fantastic answer. It taught me the working of BIT.
But at the end, the second last paragraph is where I am struggling.
It says,
Similarly, let's think about how we would do an update step. To do this, we would want to follow the access path back u... |
There is an algorithmic problem $A(n)$, where $n$ is the size of the problem.
It is known that, for every candidate solution S, the time it takes to verify whether it is a correct solution to $A(n)$ is $T(n)$.
Does this imply a lower bound on the time it takes to find a correct solution to $A(n)$ (e.g. that it takes ... |
I am reading a few papers on Bloom Filters – Bloom Filters in Probabilistic Verification (Dillinger and Manolios) suggests the following allocations for double and triple hashing respectively
$$\begin{align*}
f[i] &= a(δ) + ib(δ)\pmod{m}\\
f[i] &= a(δ) + ib(δ) + (c(δ)(i)(i − 1))/2 \pmod{m}
\end{align*}$$
Less Hashing... |
I have the following question to answer in a MapReduce assignment sheet
The Naive Bayes classifier is a widely-used tool for analyzing data. Consider a data set that has $n$ data items, each of which has the same $m+1$ attributes.
Each data item is stored as a tuple
$$(i,(X_0,i, X_1,i, . . . X_m,i))$$
where $i$ is th... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.