instruction stringlengths 35 11.4k |
|---|
Can someone help me to construct a Turing Machine for this function:
$f(n) = \frac{n}{8}$. If $n \mod 8 = 0$, then
$f(n)$ is undefined.
So the machine should somehow first prove if the number (which is represented in binary) is divisible by $8$ . That means for numbers like $1000$, $10000$, $11000$ and so on. But I don... |
I'm totally new in algorithms and I have a hard time studying how to calculate the time complexity of algorithms.
I'm studying Introduction to Algorithms, by Cormen on my own. Iam doing an exercise and I faced a problem that I couldn't solved it. first, the book asks for the worst time complexity of combination of merg... |
Consider a set $S$ of formulas $\beta_i$ and a formula $\alpha$, if we have a condition such as $S \land \alpha$ is inconsistent what we have to calculate to check the inconsistency of $S \land \alpha$? In other words, what is the result of $S \land \alpha$?
For example, $S=\{\beta_1, \beta_2, \beta_3\}$
|
My question spawns from this question. The question is straightforward:
Can we find whether there exist 2 values in a balanced binary search tree where their sum equals a given target value?
Now the constraints:
Constant additional space in regards to $n$, the size of the tree. By this I mean you can use a constant ... |
I'm trying to solve the same problem as this fellow, in Java. The problem, in short, is:
Given pairs $(a_1,b_1),\dots,(a_k,b_k)$ of strings, find a sequence $s_1, \dots, s_m$ such that
$a_{s_1} \dots a_{s_m} = b_{s_1} \dots b_{s_m}$.
for all $i \ne j, s_i \ne s_j$.
If there is a shortest such sequence, the corres... |
This problem came up during the Google CTF 2017. For background information about the challenge you can search for GoogleCTF A7 ~ Gee cue elle.
Problem description:
A random number N between 0 and 39402006196394479212279040100143613805079739270465446667948293404245721771497210611414266254884915640806627990306815 (~3.9... |
Disclaimer
I have no idea about complexity theory. If this question makes no sense or is wrong, mods are free to delete the question
I´ve read somewhere that the problems that can be correctly decided in $o(log\ log\ n)$ space are exactly the regular languages. I was thinking in "$promise-DSPACE(o(log\ log\ n))$" probl... |
I am implementing the Christofides algorithm for TSP problem and currently I have one issue with the MST result. Let's assume that I have one graph $G$, whereas I can get $MST_1$ and $MST_2$ where both are Minimum Spanning Trees, because $G$ contains more than one edge with the same weight.
In image [2] below, the diff... |
Looking at this video starting at 1:45, the author claims to be using a second-order approximation for a Markov text generation. He has one letter which he outputs followed by another letter which tells him which state to go to - so in other words, he might first pick AC, so he outputs A and then goes to state C, where... |
I'd like to prove that the following problem is NP-complete. I'd just like to know what reduction I should do:
Two Subset Sum: Given a set S of integers and an integer T, determine whether there are two subsets of S such that the sum of the numbers of one is T and the other is 2T. The subsets do NOT have to be disjoint... |
Given a $3SAT$ problem the decision version of the problem (if it has a solution or not) is $NPComplete$. Now, given that we consider the promise version of the $3SAT$ problem, the promise is every $3SAT$ problem provided always has at least 1 solution.
Query: Does every solution of the above $3SAT$ problem instance ha... |
Given two non-trivial (not $\emptyset$ or $\Sigma^*$) languages $A$, $B$ over an alphabet $\Sigma$, which of the following is correct:
a. There is a language $C$ such that $A\leq_pC$ and $B\leq_pC$.
[..]
c. There is a language $C$ such that $C\leq_pA$ and $C\leq_pB$.
According to two different sources I've seen the c... |
Suppose that $F_2$ denotes the field with $2$ elements. We are given $m$ vectors $\{x_1, \ldots, x_m\}$ in $F_2^d$ which are a basis for a subspace $W$.
Suppose we have a vector $v \in F_q^m$, and we want to find a $w \in W$ that is closest to $v$ in the Hamming metric.
What is the complexity of this problem, as a fun... |
There is a large body of literature on RAMs with "reasonable" and "unreasonable" operations, where "unreasonable" operations would yield a machine with too much power to be practically feasible.
For example, it is known that for integer RAMs, allowing unit-cost multiplication yields a machine that is exponentially fast... |
Assume that a given turing machine $M$ accepts words in the language
in $n^k$ or less steps, but words that aren't in the language
are rejected in unknown number of steps (the machine might even loop).
$k$ is unknown.
Is $L(M)\in P$?
Well, obviously $L(M)$ is recognized in polynomial time. The question is whether... |
What is the most efficient way to prove that a person computed r rounds of some cryptographic hash function (ex. sha256) on an input?. The trivial solution seems to be to show all r hashes, where value_i = hash(value_(i-1)) /forall i <= r, but this seems very space inefficient.
|
Is "Rice's theorem for the computable reals" -- that is, no nontrivial property of the number represented by a given computable real is decidable -- true?
Does this correspond in some direct way to the connectedness of the reals?
|
According to Amortized time cost of insertion into an Array list,
A dynamically resizing array list will resize when the number of elements reaches a power of two. So, after n elements inserted, we've resized at sizes 1, 2, 4, ... , n.
Can anyone kindly explain me the logic of this? If we consider the n(number of ele... |
How much training data is needed to build a speech-to-text engine based on machine learning? (To within an order of magnitude or so.)
Big companies like Google, Facebook have a massive amount of data. For usual people its not possible to acquire that amount of data and without it training a model for the purpose seems ... |
Consider a graph where edges represent the similarity of two nodes. In general, the graph is sparse with edges existing between only similar nodes (I can achieve this by deleting edges with similarity values below a threshold). Now, let us say I have a group of nodes who are known to be similar (say determined by a clu... |
I have a set of sorted values $\left\{a_j \right\}_{1 \leq j \leq n}$, suppose now a number $x$ is given and we would like to find out the index $j$ such that $a_j \leq x < a_{j+1}$ (you can assume always $- a_1 = a_n = +\infty$). I could find such index with a binary search on the lower bound (which would take $O(\lo... |
I have a homework that I can't solve can somebody help me?
If $\Sigma$ is an alphabet, $R$ is regular and $L$ is context-free. Is the language $$P = \{\alpha\in\Sigma^*\mid \alpha\beta\in L\text{ for some }\beta\in R\}$$ context-free?
|
I am trying to understand how to build an eventually consistent KV store. It's just a learning experiment. Let's only consider one value which stores a fruits list.
We have 2 servers, 2 clients, N=2, W=1, R=1.
We start with an empty value and a zero version vector on both servers.
Server 1 and 2: ('', {'Client-A': 0, ... |
I'm a developer, so I understand (a bit) how computers work, and how softwares work and fail.
In all softwares I've dealt with (as a developer or as a user), I've always seen small or huge bugs:
Even in systems well designed/implemented you encounter design/implementation bugs.
Even sites/softwares exceptionally... |
We recently figured out a Dynamic Programming solution to compare two trees using concepts of edit distance in strings. It goes something like this-
$A[i', i, j', j] = \min \begin{cases} B[i', i-1, j', j] + c(i) \\ \min_{j_1 \le k \le j} \{A[i', p(i), j_1, k] + B[p(i) +1, i-1, k+1, j] + d \}
\end{cases}$
$B[i', i, j... |
I am thinking of a particular datastructure, but don't know the name of it.
A sequence of elements may be modeled by a collection of some X, where each X consists of:
The element, serialized as a bunch of bytes.
[a] The hash of the previous X in the sequence, based on the bytes of both parts of that X in a predictabl... |
Is there any algorithm which can transform any graph to tree, with providing mapping from one to another?
Suppose we have directed graph:
E->A
A->C
C->C
C->B
B->A
B->D
I want to convert it to tree in such way, that all biggest cycles is converted to node, and all dependencies out of this cycle is binded to this node. ... |
S → D
D → E | EC
E → anyId
C → B | .D | B.D
B → <S> | <SA>
A → ,S | ,SA
The tool I am using keeps complaining about left recursion in this grammar. I can't see where.
The language recognized is something like:
anyId
anyId.anyId
anyId<anyId>
anyId<anyId>.anyId<anyId,anyId>
|
I want to construct a loop-computable program for this construction:
IF x1 = c THEN P ELSE P'
I know how to transform if else construction in loop , but I can't understand how to check the equality.I have idea for x1 >= c , but how can I check if the both numbers are equal ?
|
Say I have a large number of sets (on the order of ~1000) with a smaller number of potential entries (~200), and a widely varying number of entries per set. An example:
$s_1 = \{1, 42, 133\}$
$s_2 = \{27, 283, 292, 172, 66, 62\}$
$s_3 = \{1, 42, 292, 66\}$
$...$
$s_{1000} = \{1, 133, 72\}$
Is there an algorithm more ef... |
I was given an object with exactly 2 operations test-and-reset that sets the value of the object to 0 only if it was previously set to 1 and does not return a value and fetch-and-add(v) which adds v to the value of the object and returns the previous value.
I am almost sure the consensus number of this object is 2 and ... |
So the basic doubt i had started with this piece of code
def fn2(a,n):
.
.
for i in range(0,n):
.
.
.
def fn1():
.
.
for i in range(1,n+1):
fn2(a,i)
Would this be considered as a loop within a loop or will this take more than the usual O(n2) or would it take gr... |
I have following statements which I must prove or disprove :
1) Let $L$ be a CFL and $k \in N$ then $L^k$ is also a CFL.
2) $L_1 \subseteq L_2 \subseteq L_3$ are Languages, if $L_1$ and $L_3$ are DCFL, then $L_2$ is also a DCFL
The first one I have no idea how to start or whether it is also a CFL
For the second one I ... |
Let $$MAX-CLIQUE = \{\ <G,k>\ |\ G\ is\ an\ undirected\ graph,\ and\ the\ largest\ clique\ of\ G\ has\ k\ vertices\}$$
Does $MAX-CLIQUE\in coNP$? If it does, can you think of a verifier?
If $NP=P$, does $MAX-CLIQUE\in P$?
I cannot think of a polynomial verifier for $MAX-CLIQUE$'s complement. There might not be a ma... |
I want to build the distance constrained k-Nearest Neighbours Graph, i.e. for every point $p$ in the data cloud $P$ there are at most $k$ undirected edges to points that are closest among all possible vertices using $L_2$ metric with additional constraint that are no further than $d$.
There are only insertions (in batc... |
how can i prove the following statement :
1- $L_1\subseteq\Sigma^*$ is CFL and $L_2\subseteq\Sigma^*$ is regular Language, then $L_1$\ $L_2$ is CFL .
so i want to know what is the method to prove it ?
I'm not sure, but can i use a PDA and DFA or something else ?
so i tried the following :
$L_2$ is regular and thus is ... |
I got onto the topic of HDLs (Hardware Description Languages) from a comment elsewhere on this site.
The Wikipedia article states, rather tantalizingly:
One important difference between most programming languages and HDLs is that HDLs explicitly include the notion of time.
I tried to dig deeper in the article to bett... |
I was thinking about developing a daily production work plan algorithm for an enterprise. The problem is as following:
There are various tasks that needs to be completed, each has a deadline, a duration and a set of requirements for resources. It is mandatory that no task is expired, but if that's not possible, we wi... |
what is the complexity of $FP^{NP}$ w.r.t. $FPSPACE$?
Also can someone please provide a few examples of Problems complete for $FP^{NP}$? If possible let the examples be natural.
|
I'm looking for the name of a particular pattern, and/or resources (articles) on its usage.
The context of the pattern is a journalling system to operate on some collection, as in the example given here:
We could model an webstore using patterns from event-sourcing. In such a model, we would have a collection (e.g. a s... |
If I have a language over alphabet $\Sigma=\{(,[,],)\}$. How can I find out if a tape has a valid (matching) parentheses structure in linear time?
So far, my attempt is as follows:
state 0: accept ( or [ i.e. no open parentheses
state 1: accept ), ( or [ i.e. a ( has occurred previously
state 2: accept ], ( or [ i.e... |
I am a starter in complexity theory though I have fair knowledge in Turing machine. I know what it means to be non-deterministically polynomial time solvable but I am trying to understand where the time goes beyond polynomial time even using non-deterministic concept. Is it possible or we can do everything in polynomia... |
The decision version of $TSP$ is $NPComplete$. I was reading about the functional version of $TSP$ i.e. the class $FP^{SAT}$.
It is mentioned in the original paper that TSP is complete for the class $FP^{SAT}[n^{O(1)}]$. By definition of the class, it means TSP can be solved in polynomial time by making $[..]$ calls to... |
I am looking for algorithm to rather complex problem and I am wondering if this is some well known problem or can be translated to one.
Let's say that i have buckets B1, B2, B3 that contain some number of colored balls (red and green) and set of conditions K1=(1 green, 2 red), K2=(2 green, 1 red), K3=(2 green, 1 red) ... |
The goal is to get big $\Theta$ for $$T(n) = 2T\left(\frac{n}{3}\right) + 2T\left(\frac{2n}{3}\right)+n$$ I tried two approaches, but both failed:
Recursion tree. We see that
$$\begin{align}
\sum_{i = 0}^{\log_{3}(n)}n2^i & = \Theta(n^{1+\log_3(2)})\\
& \ll T(n) \\[1em]
& \ll \sum_{i = 0}^{\log_{\frac{3}{2}}(n)} n2^... |
I have $a_1, a_2,\dots,a_n$ and $b_1,b_2,\dots,b_n$ and an upper bound $U$ and $n$ linear equations of the form:
$k_1 * a_1 + b_1 = x$
$k_2 * a_2 + b_2 = x$
$\dots$
$k_n * a_n + b_n = x$
Additional info where $r \in \{ 1,2,\dots , n \}$:
$a_r$ is prime
$0 \leq b_r < a_r $
$k_r b_r, U, n, \in N_0$ and $(a_r\in N)$
I... |
I'm wondering if anyone knows of any place where the Wolfram classifications of many outer totalistic cellular automata have been catalogued. The classes of a few examples are given in A New Kind of Science, famously that of Rule 224 (Life) or more simply ones like Rule 0 which kills all of the cells. I'm wondering if ... |
What is the complexity of finding the k'th largest element in an unsorted linked list? If we sort the list, I think that the complexity is O(nlogn + k)=O(nlogn) since k < n. Is there a way of finding the kth largest element without sorting the list?
|
Assuming that a database entry schema contains two 64-bit hash IDs generated via the algorithm explained here, in the section "Generating Hash Keys for Chess Boards", and simply a score that's a 32-bit integer, how many bytes would the database need to be to guarantee that it can store every possible game state of ches... |
My name is Webber from Auckland, New Zealand. I am currently in my second year studying the bachelor of computer and information science. I have chosen to do a double major in computational intelligence and analytics. My goal is to become a data scientist after graduation. I am currently trying to decide which paper to... |
After uploading a high definition video in youtube, youtube automatically makes a low definition(standard definition) version of the video.
I would like to know what algorithm they use to reduce the quality of video. Is it lossless or lossy?
If not youtube, I would like to know what algorithms are there in the literatu... |
In real-world programming, we frequently need to compute hash codes for complicated objects. The main desired properties are that the values should
be deterministic and
have few collisions.
Let's assume we have access to robust hashing for basic data types such as integers, strings, etc. How do we combine multiple s... |
Let $\text{MOD}_2 : \{0,1\}^n \rightarrow \{0,1\}$ be a parity function where $$\text{MOD}_2(x_1,\dots,x_n) = \sum_i x_i \bmod 2$$
It is known [See e.g. Lemma 5 of this lecture note] that any polynomial $f(x_1,\dots,x_n) \in \mathbb{R}[x_1,\dots,x_n]$ of degree at most $\sqrt{n}$ must disagree with $\text{MOD}_2$ on at... |
I have a question about the Set Cover problem: If I get a universe $U$, and $m$ subsets of size exactly $2$, and an integer $k$. Is this problem is still NP-C or I can solve it on a polynomial time?
Thanks.
|
I am not a computer scientist and have no knowledge of programming.
However, I wondered continuations occur as natural and interesting mathematical structures, perhaps as algebraic or type theoretic structures of some kind, and quite apart from computer science considerations.
I understand that continuations are spec... |
I have written an algorithm for rectangle packing where I have the following recurrence relation for the running time:
$$
T(x,y,z)=\begin{cases}
O(1)&\text{, if x = 0}\\
\sum^{z-1}_{i=0}\bigl(x\cdot T(x-1,y+1,z+1-i)\bigr)+x\cdot y\cdot z&\text{, if x > 0}\\
\end{cases}
$$
You however always start with $T(n, 0, ... |
If we choose a unit square in which the four points where the function $f$ is known are as shown in the diagram the interpolation formula for $f$ is:
\begin{equation}
\begin{split}
f(x+u, y+v)\approx (1-u)(1-v)f(x,y)+u(1-v)f(x+\Delta x,y)\\
&\hspace{-7cm}+(1-u)vf(x,y+\Delta y)+uvf(x+\Delta x,y+\Delta y).
\end{split}
\e... |
The extensional version of Intuitionistic Type Theory is usually formulated in a way that makes extensional concepts like functional extensionality derivable. In particular, equality reflection, together with $\xi$- and $\eta$-rules for $\Pi$ types are enough to get the standard formulation of $\textsf{funext}$
$\Pi_{x... |
Ranked Biased Overlap (RBO) is a metric for comparing two rankings and is used when the sizes of the given rankings are different and/or the elements that they carry are not the same. Ranked Biased Distance (RBD = 1 - RBO) is the distance metric emanating from RBO. A simple demonstration of the metric can be found here... |
I'm reading this paper:
http://citeseerx.ist.psu.edu/viewdoc/summary?doi=10.1.1.150.14
or
http://www.jmlr.org/papers/volume10/kontorovich09a/kontorovich09a.pdf
On page 1101 are introduced 2 functions without a precise definition.
It is said that they are functions of the type
$\textrm{f}:\mathbb{A} \rightarrow \math... |
Let A = {2, 8, 11, 3, 12, 7, 10, 4, 15}
Want to find $E_4$.
Little unsure how to do this question. Would this be similar to finding the probability of the number of comparison 2/(j -i +1)?
|
(From CLRS -- 3-4,d)
Let $f(n)$ and $g(n)$ be asymptotically positive functions.
I tried to prove that $$f(n) = O(g(n)) \implies 2^{f(n)} = O\left(2^{g(n)}\right) .$$
I know that the above statement is false, so where have I gone wrong in my proof?:
Suppose $f(n) = O(g(n)).$ Then there exist positive real numbers $c, ... |
I've got a variant of bipartite graph matching and I can't find any literature about it.
We have bipartite graph with real capacity edges from source to left vertices (the sum of which is 1), real capacity edges from right vertices to sink (also summing to 1), and unlimited capacity edges between left and right. What ... |
I'm trying to write an algorithm to check if a given binary tree is a perfect binary tree, and of course with the lowest complexity.
I was thinking to calculate the height of the tree $h$ and the number of the nodes $n$, then if $2^{h+1} -1 = n$, it's a perfect tree.
But then again, it's not very efficient.
The I thoug... |
Let $A = \{ g(n) \mid \exists c,n_0 \, \forall n \ge n_0\colon g(n) \le cf(n) \}$, and $B = \{ g(n) \mid \exists c,n_0 \, \forall n \geq n_0 \colon g(n) < cf(n) \}$.
Prove $A = B$.
My solution:
Let $f(n)$ and $g(n)$ be functions from $\mathbb{N}$ to $\mathbb{N}$.
$g(n)\le cf(n)$ for all $n > n_0$.
$g(n) = O(f(n))$ m... |
I would like to solve a scheduling problem where, I am able to maximize the number of consecutive shifts a employee may have, therefore minimizing the likelihood of them not showing up for a single, short shift on an odd day. However, I want to preferentially give shifts to better performers - where 'performance' is an... |
I have a simple program (assume a shop) that is actually just returning the $m$ most active customers from a total list of $n$ users (so $m \leq n$). I only use this program on one machine with one process, so assume no distribution of data to be necessary.
I require a data structure storing $\mathrm{userId}$ and $\mat... |
I have R={A,B,C,D,E} with functional dependencies ABCD → E and AC → ABCD,with Axiom of transitivity rule is AC → E a transitive dependency? Thanks before and sorry for this simple question
|
What is the input of a given hash?
The problem can be verified in polynomial time (using a hash that executed in polynomial time), and I suspect that it may be possible to prove that there is no algorithm that can solve it in polynomial time.
Take a binary string $X$ of length $n$.
The number of possi... |
Does there exist a more optimum algorithm to solve every problem than brute force (or an equivalent)?
A brute force algorithm for the purpose of this question is defined as an algorithm of time complexity $N^*$, there $N^*$ is the cardinality of the set of all possible solutions.
|
According to the reference Time/Space Trade-Offs for Reversible Computation by Charles H. Bennett given by Peter Shor in https://cstheory.stackexchange.com/questions/18938/is-there-any-task-where-classical-computers-outperform-quantum-computers,
Using a pebbling argument, this paper shows that, for any
$\epsilon > ... |
I would like to have a canonical representation of a map from rational intervals (f, t] with f, t ∈ ℚ to some irrelevant value type. These intervals are non-overlapping and there exist only finitely many such keys in the map. I would like to be able to implement the following functions on this representation:
Lookup b... |
Is the following true?
Given a problem with a known algorithm of time complexity $g(n), \exists$ another algorithm to solve said problem with time complexity $f(n). \,\,\, f(n): g(n) = o(f(n)) $
If true, it implies that:
For all problems, there are algorithms of arbitrarily high
complexit... |
What does quick/fast mean in the context of computer science?
I couldn't find a definition online (poor google fu), and I want to provide a referenced/cited definition for fast for an article I'm writing.
|
DISCLAIMER : I'm pretty new to machine learning field, so forgive me
if my questions are somehow naive ... I already searched on Internet
about this topic and find nothing interesting so I am asking here ....
I wonder if a ML algorithm can be consider as a way to store data ?
There is programs that "contains" tho... |
I have a weighted graph where each edge is a 1d vector eg if weight going from A to B is 1 then from B to A it is -1. In the graph each cycle should add to zero though sometimes the weights have errors and in that case a cycle will not add to zero.
So for example if the weight from A to B is 1 and B to C is 1 then fo... |
I have never seen my account not being able to login!
|
As a reduction from another problem, I am trying to deal with finding all edges which are part of some cycle in an undirected graph $G=(V,E)$ in time $O(|V|+|E|)$.
My first idea is to use DFS and search for back edges closing cycles, but then the issue is how to add all edges found to the cycle, if we just naively add ... |
I have an issue about proving the next problem:
Let's define a BVL tree, which is a binary tree, who satisfied the feature that the difference between the heights of the children of a node, is at most 2.
Meaning|height(node.left) - height(node.right)| <= 2
Prove that BVL tree is a balanced tree.
Now I do know it's some... |
We know the Halting Problem is in the 1st level of arithmetical hierarchy. We know that the Totality Problem is in the 2nd level of arithmetical hierarchy. What are some examples of problems in the 3rd (or higher) level of arithmetical hierarchy. +1 for problems which instances are solved in the practical world (progra... |
A formal description of the problem:
Given a set $P$ of $n^k$ points in $d$ dimensional space, what algorithm can I use to find a mapping between them and points on a $n \times n \times n...$ grid in $k$ dimensional space so that points that are close together in $P$ map to points that are likely to be close together o... |
What are the rules of converting a weighted digraph to a weighted, undirected graph?
I understand that the edges should go in both directions from vertex to vertex. However, do the weights of each edge to/from other edges need to be the same? If not, how does one decide which weight to attach to the undirected vertice... |
I have the following problem and I wonder if there exist a solution (or some algorithm to approximate it, even if it's far from optimal, as long as it is tractable) to it.
Say I have a set $V\subseteq I_1\times I_2 \times\dots\times I_n$, all discrete finite subset of, say, integers.
Can I compress the representation o... |
There are two ways to define a probabilistic Turing Machine:
A Turing Machine that can toss coins during its computation.
A deterministic Turing Machine that takes two inputs: $(x,r)$, where $x$ is the original input and $r$ is taken from a distribution of coin tosses.
For example, Arora and Barak give an "alternativ... |
I know the definitions and differences of big-theta, big-oh, and big-omega in finding time complexity of algorithms. what I can't understand is that why the big-oh of a linear function cannot be O(n).
$0 \le an + b \le cn \Rightarrow c = a + \frac b {n_0}$
so we could find a value for constant $c$. as a result, the bi... |
I was looking at the following algorithm which prints all the paths from node s to node t and I have some questions I don't understand
The basic idea is :
DFS-Visit(s)
Change current status to "currently visiting"
If neighbor is t -> print the path (from the stack trace or any way)
If not: DFS-Visit on neighbors
When ... |
I don't understand the line in the paper "Mappings and Grammars on Trees" by William C. Rounds, the passage:
Transformational theory, as developed by Chomsky
[7] and many others, deals with the notion of phrase-structure grammar, and with certain mappings defined on derivation trees associated with the grammar. Deri... |
The paper is "Mappings and Grammars on Trees" by William C. Rounds. There was a definition of ranked alphabet in page 3 and I can't understand the second part of the definition.
Definition. A ranked alphabet is a pair $(\Sigma, r)$ where $\Sigma$ is finite, and $r: \Sigma \rightarrow \mathbb{N}$.
We set $\Sigma_n = r^... |
We've learned in class that CVAL is P-complete. CVAL is the language of all $\langle C,x\rangle$ where $C$ is a formula (a circuit which outputs $0$ or $1$) and $x$ is some input for $C$ such that $C(x) = 1$.
We've done this in the same fashion Michael Sipser does in this paper (accessed Jul 11, 2017).
The reduction i... |
I was just going through some of the primality test algorithms. It seems that the regular one – loop up to square root of $n$ – has running time $O(n^{1/2})$.
Is $O(n^{1/2})$ exponential? And is exponential time better than polynomial always?
|
I'm starting to learn about CNNs, and I have this question that I haven't been able to answer. Sorry if it is too basic.
I know that in a CNN, the network learns to extract relevant features of images in order to classify them. My question is: if I just update the weights of the fully-connected layer and leave the kern... |
I’ve always wondered how to make a best guess in the absence of any knowledge.
Let’s say you have a computation running, and you don’t know when it will complete (just that it will). Can you make any estimate when it will be finished just based on the elapsed time without any further knowledge? For example after 10 min... |
Suppose there is a language $L$ on alphabet $Σ$.
Now consider the language
$$ S(L) = \{x : wxy ∈ L, w, y ∈ Σ^*\} ∪ \{x : w ∈ L,\text{ and $x$ is a subsequence of $w$}\}. $$
How to prove that if $L$ is regular then $S(L)$ is also regular?
For first part I think if there is a DFA that accepts $wxy$ then there is a DFA t... |
Let Σ2 = {0, 1}, and define Σ = Σ23. Informally, Σ* is the set of triples of the form (a, b, c) where a, b, c are single binary digits.
Consider a string s ∈ Σ* : it is a sequence of such triples. Have to “verify” binary addition of numbers in the first two coordinates by checking that it is equal to the third. Let A b... |
I'm trying to build an agent-based model to study facebook usage. One important part is determining, at each step, whether a given user is online/active or not.
I am looking for a distribution of time spent online by percentage of users. I read in [this study][1] that this distribution is exponential, which is expected... |
This paper states that the general number field sieve is of order:
$$L\approx\exp\left((64/9)^{1/3}\,n^{1/3}\,(\ln(n))^{2/3}\right)$$
However several sources (e.g. Wolfram) give it as:
$$O\left( \exp\left((64/9)^{1/3}\,(\log n)^{1/3}\,(\log\log n)^{2/3}\right) \right)$$
To my knowledge L-notation and big O notation are... |
So the question is;
For the following three jobs:
P1: 10 (3,2,5); P2: 4 (2,2); P3: 16 (2,3,5,6)
Execute the three jobs using Exp Ave Alpha =0.6, default=2
I know the formula to get the exponential average for a process is
Pn+1 = (alpha) * Tn + (1-alpha * Pn)
I am basically confused at where to start. Obviously, the va... |
Related to this, but I felt it was more appropriate to ask as a separate question:
The complexity of Shor's algorithm is of order
$$O\left(n^2\,\log(n)\,\log(\log(n))\right)$$
with $n$ the bit length of the number to be factored. This paper asserts that on a terahertz range quantum computer (i.e. $10^6$ instructions pe... |
Background
I am currently coding an AI in C++ to solve a game called Hunt the Wumpus. You can try the game out here. My implementation of the game is based on a Graph template which I use to model the caves and the AI's "memory".
Rules
The start position for the player, the Wumpus and the hazards (pits or bats) is... |
How can I prove that the output sequence of Mealy Moore Machine is a Regular Language ?
And what if transition outputs more than one character ? How can we prove for this case that the language in (1) and (2) are same ?
Can I do something like this -
The right side one is Mealy Machine. So can I prove like making a ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.