instruction stringlengths 35 29.1k |
|---|
For example, assume the input array is $$[121212,212121]$$
Say we are in base 10, so count sort will work in $O(n)$ time. We have 6 iterations which is approximately $n^2$. Is this a worst case example for radix sort?
If so, can I generalize this and say that given $k$ is the total number of digits, a worst case for th... |
The tit-for-tat strategy is a well-known strategy that can be applied, for example, in the Iterated Prisoner's Dilemma (IPD). Roughly, the idea is that you always repeat what the opponent did in the previous round.
I was wondering, does there exist a name for the opposite of a tit-for-tat strategy? That is, a strategy ... |
Let TOT be the set of all Turing Machines that halt
on all inputs.
Find a computable set B of ordered triples such that:
TOT = {e : ($\forall$x)($\exists$y)[(e, x, y) $\in$ B]
This definition means that TOT is a set of all Turing machines e such that they halt on all inputs. The "for all" x denotes all inputs to that m... |
I'm struggling to understand why this piece of lexical grammar works for multi-line comments in JavaCC (posted here):
"/*" (~["*"])* "*" (~["*","/"] (~["*"])* "*" | "*")* "/"
As I read it, the parser scans the input /*, and then zero or more optional occurrences of * can appear, followed by a *, and then zero or more... |
Question is as follows: Given regular languages $L$, $M$. Is $K=\{uw | u,w \in \Sigma^*,(\exists v \in M) uvw \in L\}$ necessarily regular?
Thank you for any input.
|
Let Σ = {0, 1} and let A ⊆ Σ* be a language contained in DTIME(4n), and define
B = {xx | x ∈ A}.
(a) Show that B ∈ DTIME(2n).
(b) Prove that A ≤pm B.
I'm new to complexity theory. how can I show that if the language has the time complexity O(4n) how can i got about proving that its sublanguage has the complexity O(2n)... |
I have designed this Grammar but it is ambiguous:
$$S\to aSbS \mid bSaS \mid aS \mid\epsilon$$
Would anyone help me make it unambiguous? Assume the alphabet is $\{a,b\}$.
|
Can one imply that natural languages can be described by regular grammar? Is that what happens through NPL? Trying to understand the subject of how spoken language can be converted to data and how.
|
My question is regarding the last paragraph of this excerpt from "Cracking the Coding Interview." (For some reason, my table is not formatting here.)
What's the runtime of this code?
int f(int n) {
if (n <= 1) {
return 1;
}
return f(n -1) + f(n -1);
}
The tree will have depth N. Each node (i.e., function cal... |
Suppose we have two markets. Each market has various buy & sell orders that we can sell to or buy from respectively. Each order represents a specific number of a particular item type that someone is selling or buying for a specific price per item and we can buy/sell any amount of items from/to any order. Each item typ... |
Given a partition $[0,1]$,there are 5000 partition subsets $P_i=[a_{i1},a_{i2}]\in[0,1], 0≤a_{i1}\leq a_{i2} \leq 1, i \in \{1,2,...,5000\}$. I want to analyze these subsets and find 10 subsets to contain sixty or seventy percent of the subsets. These 10 subsets could be disjoint, or even overlapping.
|
Its namesake invented the Von Neumann architecture (VNA) in a specific computing environment and a specific context. In light of those two:
What kind of limitations was the VNA designed to work with?
What features in the VNA reflect that?
What kind of purpose did Von Neumann intend for the VNA?
How did the design of t... |
Suppose in a plane, there is a set of points, whose distance to $(0,0)$ is always 1:
$[(0,1),(1,0),(0.707,0.707),(0.707,-0.707),...]$
Each point is assigned with a weight (possible negative):
$[w(0,1) = 1, w(1,0) = 2,w(0.707,0.707) = -1,w(0.707,-0.707)= -2,...]$
Suppose the standard deviation of the points are defined... |
I am an ML Engineer who works alone in projects most of the time. I don't have people who are much smarter than me working alongside.
Most of the time, I feel that working alone is a tedious job,one may get stuck at a lot of problems. In such cases my only go to option is Google. What effective techniques you use while... |
Given the following grammar with terminals $VT=\{[,],a,b,c,+,-\}:$
$S \rightarrow [SX]|a$
$X \rightarrow +SY|Yb|\epsilon$
$Y \rightarrow -SXc|\epsilon$
This should be the FIRST function:
$first(S) = \{[,a\}$
$first(X) = \{\epsilon,+,-,b\}$
$first(Y) = \{\epsilon,-\}$
What would the FOLLOW function be?
|
hope you all are doing well.
I have a question about the time complexity of solution 1 for question 16.4 - Generate Power Set from the book Elements of Programming Interviews by Adnan and Tsung-Hsien.
The question instructs the reader to "Write a function that takes as input a set and returns its power set". The input... |
There is a question to show that $L=\{a^{n!} \mid n \geq 0 \}$ is not regular using Pumping Lemma. However, I have the answer in the book which is found to be somewhere wrong. I am sharing the snapshot of the answer which I could not figure out. Could anybody correct it so that the puzzle could be solved?
|
I have a large set of lines in 2D with a known start point and end point, and would like to find the nearest (defined by perpendicular distance) of those edges (or the extension of those edges past their start and end points) to an arbitrary point.
The best I have done so far is to generate a set of sample points along... |
I am trying to apply PTAS on an algorithm. I think that we apply PTAS on the running time equation of the algorithm. We use the term (1-ϵ) and (1+ ϵ) in the running time of the algorithm but I don’t know how we insert these terms in the running time equation of the algorithm, and that’s what I want to understand. Also ... |
You are given a number n, representing the count of elements.
2. You are given n numbers, representing n elements.
3. You are given an integer k.
3. You are required to find the maximum sum of a subsequence having at most k elements.
4. Adjacent elements can't be selected.
*You have to solve it using Dynamic Programmi... |
Problem
Consider two functions $f: \mathbb{N} \rightarrow \mathbb{N}$ and $g: \mathbb{N} \rightarrow \mathbb{N}$ such that $f(k) = \sum_{d | k} g(d)$ for all $k \in \mathbb{N}$. So, the questions are:
Let's say $f(k)$ is known for $k \in \{ 1, 2, \dots, n \}$. How to evaluate $g(k)$ for all $k \in \{ 1, 2, \dots, n \... |
While preparing for an algorithms exam I came across the following problem in a practice test:
Let $G = (V,E)$ be a connected, undirected graph with weighted edges (all weights are rational numbers but not necessarily all unique) and let $v$ be some node in $G$.
Design an algorithm that finds a minimum spanning tree of... |
We are given a tree with $n$ vertices and some of the vertices act as a "hotspot".
We have to answer multiple queries of type $(a,b,c)$, which means we have to find the distance to the nearest hotspot from $c$ such that we do not travel through the edge between nodes $a$ and $b$.
I have tried many data structures like... |
I have some doubts about this algorithm which checks if a binary tree is a binary search tree:
isAbr(x)
{
if(x == NULL)
return <true, -∞, +∞>;
if(x.left == NULL && x.right == NULL)
return <true, x.key, x.key>;
<abrLeft, minLeft, maxLef... |
It is often asserted that the halting problem is undecidable. And proving it is indeed trivial.
But that only applies to an arbitrary program.
Has there been any study regarding classes of programs humans usually make?
It can sometimes be easy to analyze a program and enumerate all of its degrees of freedom and conclud... |
Today I had a weird dream about a kind of automata. Each automaton has a finite 2D grid wrapped around like a torus, formatted as a table. Execution starts in one cell. Each step it executes whatever is in the current cell, and in each cell there's a symbol and a numeric operator. In one variant the numeric part is sai... |
In computational complexity theory, NP (nondeterministic polynomial time) is a complexity class used to classify decision problems. NP is the set of decision problems for which the problem instances, where the answer is "yes", have proofs verifiable in polynomial time by a deterministic Turing machine.
The proofs for... |
I have a situation where there are a million Keys of type String and I want to use the Symbol table to store the key and the value.
The problem that the retrieval process is too slow and I want to improve the retrieval. I wonder if there is a good hash function to help me with this task.
I am using Separate Channing fo... |
After removing multi-sets and sets that have elements that don't exist in $S$.
$S$ = $[9,6,7,4,5,1,8]$
$C$ =$[[9,6,7],[4,5],[1,8]]$
Transform the values in $C$ of the shared index values with $S$. (This must be done before touching $S$)
$C$ = $[[1,2,3],[4,5],[6,7]]$
And do the same for $S$
$S$ = $[1,2,3,4,5,6,7]$
Squa... |
I am now studying Knapsack Problem (KP), and find the Meet-in-the-middle algorithm described in Wikipedia a little unclear that, how to realize it in the theoretical time complexity of $O^*(2^{n/2})$? I can understand the algorithm for Subset Sum Problem (SSP) which is a particular instance of 0-1 KP, but for the gener... |
Given how important these are for parsing, I'm surprised I wasn't able
to find anything about their complexity. I'm interested in all combinations of:
What is the (edit: best known) time complexity of calculating
<FIRST | FOLLOW | FIRST and FOLLOW> of a <single | all> nonterminals of a <context-free | LR> grammar?
Link... |
This question is related to Master Theorem on oscillating function.
Consider a recurrence of the form
$T(n) = a T(n/b) + f(n)$
Master Theorem's regularity condition excludes some cases (for example, when $f(n)$ is oscillating).
Suppose, however, that $f(n)=\Theta(g(n))$ for a function $g(n)$ that does not violate the r... |
Wondering if compilation increases file size in general, is the source file size smaller than the executable file size?
|
I beg some help with this problem.
There are 2 boolean satisfiability problems.
Problem $A$: Determining whether an arbitrary formula of size $n$ is $satisfiable$.
Problem $B$: Determining whether an arbitrary formula of size $n-1$ is $satisfiable$ in which $n$ is a positive integer $\ge 2$
Prove that $A$ can be s... |
Brief introduction
In all boolean (or more generally mixed-integer) linear programs, constraints are represented as a matrix $A$, a support vector $b$ and is computed by $A^T x \leq b$, where $x$ is a boolean vector one wants to optimize in some way. Another way of formulating the problem is to say that one wants to s... |
I need help with this problem.
There are 2 versions of the satisfiability problem:
[1] decision version: determine whether an arbitrary formula f is
satisfiable or not
[2] search version: if an arbitrary formula f is satisfiable, return
an assignment of truth values to variables in the formula that makes f
satis... |
The problem
The input is a list of $N$ cylinders in 3D space, and the output should be a list of $M \leq N(N-1)/2$ pairs of cylinders that intersect. ($M$ depends on the input data, obviously.)
If it matters, the cylinders are very thin (with a diameter less than 1% of the length for all cylinders), and a solution for ... |
What is the technical term that describes a programming language that abstracts (or at least largely abstracts) the machine location of programs? I’m thinking here specifically of the evolution of handheld calculator programming languages, from early (and some late) models where each instruction exists in a single line... |
I know the reduction to from $A_{TM}$ to $HALT$. But is
the following reduction from $HALT$ to $A_{TM}$ correct?
We are looking for total computable function $f$ mapping from $HALT$ to $A_{TM}$.
The following TM $F$ calculates the reduction $f$.
F = on input <T, w>
create the following TM T':
T' = on input v:
... |
I need help coverting these two question to Math Jax
((50^A)*((((50^B)(((50^C)+1)/(4)))+1)/(4)))/(4)
and
(((50^A)(50^B)(50^C))/(4^2)) + (((50^A)(50^B))/(4^2))+((50^A)/(4))+(1/4)
I don't know how to do it, for a mathstack exchange question.
|
I enjoy reading research on satisfiability, but sometimes it's easier to find relevant information when you know the names of the variants.
Example:
All the clauses are width 3 and must have exactly 1 true literals and 2 false literals: 1-in-3 SAT
Each clause of width n must have exactly 1 true literal and n-1 fals... |
given a formula S (that is built of binary variables and "or", "not", "and" gates).
IS there a polynomial algorithim that builds S' that satisfies:
S' satisfied if and only if S doesn't satisfied.
which means: S' is in SAT if and only if S not in SAT
|
So the algorithm I thought of, is to iterate through the n points, centering a ball at each point, and keeping track of the point where we centered that encapsulated the most points. Then remove the encapsulated points from this max ball we found, then iterate through all the points again. Continue until there are no ... |
What is the time complexity Big-O of this algorithm?
, The first assumption it's O(N * lg N) but it is not correct, why?
count = 0
for i = N : 1 {
for j = 0 : i {
count = count + 1
j = j + 1
}
i = i/2
}
print(count)
|
To the best of my knowledge search engines such as Google index the web using MapReduce amongst many other tools. With my limited experience this would make hash tables the most practical option for storing the MapReduce output which by default is in the form of an inverted index.
Are hash tables in fact used by Googl... |
Here's the question:
Assume there exists a polynomial time machine $M$ that receives two formulas $\varphi_1,\varphi_2$ and satisfies the following:
If $\varphi_1 \in \mathrm{SAT}$ and $\varphi_2 \notin \mathrm{SAT}$, then $M(\varphi_1,\varphi_2)=1$
If $\varphi_1 \notin \mathrm{SAT}$ and $\varphi_2 \in \mathrm{SAT}$,... |
Sorry I don't know how silly a question this might be, but i've been reading up on the halting problem lately, and understand the halting problem cannot possibly output a value that is "correct" when fed a machine that does the opposite of itself. This therefore proves the halting problem cannot be solved by contradict... |
So the question gives us some mysterious algorithm, that given a graph G and an integer k, it outputs true/false to whether there is an independent set of size k in G.
So we have to design an algorithm that can call this mysterious algorithm within a polynomial number of times, to return an independent set of size k fr... |
I am a software developer new to the site. I am currently learning about LFSR (linear feedback shift register). Every day I solve a question which is given to me, but today I am lost. I can not solve this one, so I am asking for your help, for hints, or for any thoughts.
TASK:
Make a linear automaton with the help o... |
Disclaimer: I know nothing about differential equations, and I don't know if this belongs here...
Wikipedia states that a Zeno machine is a hypothetical machine able to compute infinite
steps in finite time, by making use of supertasks. Building such a machine is physically impossible. My question is this: Is the Zeno... |
I am currently studying Shannon's entropy and I have just come across an exercise related to typical sets. More specifically, given a certain type $t$ for the set, the exercise asks to demonstrate that
$$|B_t|≤2^{nH(t)}$$, where $$B_t=\{B:t_B=t\}$$. I have made an attempt using the entropy and the Kullback-Leibler div... |
For every nondeterministic finite state automata that has self-loop(s), there exists an equivalent NFA that does not have any self-loop. How can we prove this statement in a general basis without the use of examples?
|
So the question is:
"Given an undirected graph G=(V,E) with positive edge weights, and E'⊆E, show an algorithm that finds, from all the minimum spanning trees, the one that has more edges from E' ".
|
Given a regular language $L$ (so there is an automaton $A$ which recognizes $L$), I need to determine whether $ L'$ is also regular, where $L'$ is given by
$$ L' = \{ \alpha \in \Sigma^* \mid (\exists \beta \in \Sigma^*)[ |\alpha| = 2 |\beta| \wedge \alpha\beta \in L \}.$$
As far as I understand, I have to construct ... |
I have this question I found regarding n-gram modeling in the Speech and Language Processing textbook by Daniel Jurafsky:
Suppose we didn’t use the end-symbol </s>. Train an unsmoothed bigram grammar on the following training corpus without using the end-symbol </s>:
<s> a b
<s> b b
<s> b a
<s> a a
Demonstrate that ... |
Why do use epipolar lines and what are it's benefits in computer vision ?I am unable to find the uses of epiploar lines and how they are helpful although i am aware of epiploar geometry concepts.
I would be so helpful if someone could pin point one or two uses of epipolar lines in computer vision .
|
The question is to determine whether L is a context free grammar language, what do you think?
|
We are given the following corpus, modified from the one in the chapter:
<s> I am Sam </s>
<s> Sam I am </s>
<s> I am Sam </s>
<s> I do not like green eggs and Sam </s>
If we use linear interpolation smoothing between a maximum-likelihood bigram model and a Maximum-
Likelihood Estimate unigram model with λ1 = 1/2 and ... |
I am wondering what is the relation between line distance and the amount of data transmitted on that line. I know only the basic of computer science. Let's say I want to calculate the time it takes for 100 GB to transfer over a line with the speed of 100MBps. If I just divide them, I will get 1000 seconds but in my onl... |
I'm trying to figure out the following problem:
If algorithm $A$ has a big theta notation of $n^3$ and algorithm $B$
has a big theta notation of $n^2$, there might be an infinite number
of inputs for which $A$ has a lower running time than $B$. Is the
statement correct?
My guess is that it's not correct, becaus... |
I'm a little bit confused about the difference between forward/backward slicing and the use/def-def/use as part of the reaching definitions technique. Isn't the use-def chain supposed to be equivalent to the backward slicing?
Let's assume we have a line that uses some variables. Like: x = y + z.
If we try to find all t... |
For a specific natural $k$ we define the language of couples $(\langle M \rangle, x)$ such that $M$ stops on $x$ and the couple's encoding is bounded by $k$ i.e $L_k := \{(\langle M \rangle ,x)\in HP : |(\langle M \rangle ,x)| \le k \}$
This language is finite thus in $R$. I wish to understand how to build (Not formall... |
Is it true that every regular language can be expressed as a finite union of periodic sets? In other words, if $L$ is regular, then do there exist finite sets $A_1,\dots,A_n,B_1,\dots,B_n$ such that
$$L = A_1 \cdot B_1^* \cup \cdots \cup A_n \cdot B_n^*.$$
I know this is true for regular languages over a unary alphabe... |
In the companion code to A Tutorial Implementation of a Dependently Typed Lambda Calculus
- prelude.lp - there is a rather intimidating definition of a boolElim function that's not described in the paper itself:
let boolElim =
( \ m mf mt -> finElim ( nat2Elim (\ n -> Fin n -> *)
... |
So I am given this blackbox algorithm, in which given a Graph G and a integer k, it returns yes if there is an independent set of size k, no otherwise.
My algorithm is suppose to output impossible if there is no independent set of size k, or output an independent set of size k if it exists.
How might this be approached... |
Given a list of vectors consisting n integers that has been sorted by their components in certain priority, how do you find the possible sorting keys, i.e. the order of precedence?
Suppose there is a sorting function:
def some_sort(vectors):
priority = (vector[i],..., vector[j])
return sorted(vectors, key=prior... |
Design a Context-free grammar (CFG) for this language
|
In website geeksforgeeks i read that adding a vertex to graph in adjacent matrix takes O(V^2) time but i am not getting it. It requires adding a row and a column which should take linear time ?
I am a beginner hence forgive me for such a question
Link:- https://www.geeksforgeeks.org/graph-and-its-representations/
|
How can I interpret a time complexity of $2^{O(n)}$? Is it simply equal to $O(2^n)$?
I'm pretty new to this, so would appreciate any kind of help.
|
I learned finding a solution of 2-sat problem algorithm below.
The point are below
(1) when constructing the implication graph
(2) finding there is no occurrence of a variable x and its negation x' in any SCC in the graph.
(3) then there is always the solution at this 2-SAT problem.
it means that all false 2-SAT proble... |
Given an input problem P, can you construct an algorithm A to compute whether or not P is decidable or undecidable? In other words, is the undecidabiliy of a problem undecidable? My initial guess is that yes, undecidability of a given problem is undecidable, because the above algorithm seems reducible to the Halting pr... |
I came up with following subproblem while working on another problem. Can someone confirm if its a recognized problem. I have spent months but couldn't make any progress.
Design a data structure that maintains a directed graph. A node with node_id=0 is created by default, having no edges. The data-structure supports f... |
Doesn't the modification described in paragraph three potentially introduce non-determinism? For example, say neither a, b, x, nor y is the empty string (denoted e). If in the original machine P we have:
f(q, e, x) != null
f(q, a, y) != null
f(q, b, y) != null
wouldn't the modification give us:
f(q, e, $) != null
f(q... |
I can't find how to prove the decibility with a reduction.
EDIT:
I've tried the reduction from the halting problem and the aceptance problem. Stopping for at least one entry has infinite inputs (you have to check all possible inputs) but the halting problem only has one input for the TM.
I don't understand how can i f... |
My question is about why does the result of Baker-Gill-Solovay not prove that $P \neq NP$. There have been several questions on this forum about this topic perhaps but I couldn't find my specific question amongst them.
Context: This is what I had in mind when I first saw the Baker-Gill-Solovay result (there exists an o... |
Please help prove the following statement:
The indexed family of all unary partial computable functions that have total computable extension is computable.
Definitions:
Total function - a function which is defined for all inputs of the right type, that is, for all of a domain.
A function $g$ is called an extension o... |
I have following grammar it doesnt not have Epsilon-derivation problem I can only see left recursion:
S -> a b S
S -> S a b
S -> c d
S -> a d
in production number 2 there is left recursion which I removed and I got:
S -> a b S F
S -> c d F
S -> a d F
F -> a b F | EPSILON
But it is still ambigous?
|
We are given a tree with n vertices and some of the vertices act as a "hotspot".
We have to answer multiple queries of type (a,b,c), which means we have to find the distance to the nearest hotspot from c such that we do not travel through the edge between nodes a and b.
I have tried many data structures like using lowe... |
In "Understanding Machine Learning, From Theory to Algorithms" by Shalev and Ben-David, on page 44 example 6.1, it is proved that the class of threshold functions are PAC learnable.
on the other hand, The Fundamental Theory of Statistical Learning States that A-PAC learnable is equivalent to PAC learnable.
So can we sa... |
I'm working on my school homework,even though i found all three of these. It says use limit to compare. I confused , what should i do, i mean its obvious C A B
|
I'm trying to find a closed formula for the below recurrence relation:
For the first one, $n$ is some power of 2
$$T(n) = \begin{cases}
4 & \text{if $n=1$} \\
2T(\frac{n}{2}) +4 & \text{else}
\end{cases}$$
$$T(n) = \begin{cases}
1 & \text{if $n=0$} \\
T(n-1) +3^n & \text{else}
\end{cases}$$
I tried to use the substit... |
In a palindrome of size N, the amount of candidates for the longest palindrome is N^2. Therefore, the information theoretic lower bound (IBT) should be lg(N^2), which is equivalent to a runtime complexity of lg(N).
By IBT I mean that if we use a comparison based algorithm and you think about a decision tree to apply it... |
Hey guys in a turing machine can a state go to itself by reading a letter. For example,
q2 reading a 'c' to go to itself. Is that possible?
Or does it need to read a tape alphabet, such as $ to read that c and then go back to q2?
|
Query: Given $m$ unique integers smaller than $2^n$, can we keep at most $k$ the same bits of each number to uniquely identify them?
Is this problem NP-Hard?
For example, given the $4$ unique numbers smaller than $2^3$
011
100
101
110
^^
The numbers are still unique if we remove the leftmost bit from each number. So ... |
I often have to balance the computational requirement of each qualitatively different module of my algorithm. So, I'm using this heuristics for maximizing the performance for a given complexity, but I couldn't find this heuristics anywhere online. Could anyone give me some reference?
Let $F(x):=\sum_{i=1}^N O(f_i(x))$... |
I have two sequences, seq1 and seq2, each consisting of unique values. Values can appear in seq1 or seq2 which do not appear in the other, and these values can appear in any order. How do I identify which values have been moved in seq2, such that values appear earlier or later in seq2 relative to the values in seq1? To... |
Here's the question:
Compute the intersection of the following two languages:
\begin{align}
&L_1 = \{ a^{n+1} b^{2n} a^{n+1} \mid n \ge 0 \} \\
&L_2 = \{ w \in \{a,b\}^* \mid \#_a(w) + \#_b(w) \equiv 1 \pmod 2 \}
\end{align}
I'm pretty sure that $L_2$ is just "$|w|$ is odd", which would mean the intersection of the... |
Given are tuples $(a_{11},\dots,a_{1k}), (a_{21},\dots,a_{2k}), \dots, (a_{n1},\dots,a_{nk})$. We want to know if there is a partition of the tuples into two parts, so that for every coordinate $i=1,\dots,k$, the sum of each part is equal to the sum of the other part.
Has this problem been studied before? If $k=1$, it... |
I have been going through a theory of Two-way finite automatons and I did not understand the given example when there were a DFA A = (Q, Σ, δ, q1, F). the 2-DFA B = (Q ∪ Q| ∪ Q|| ∪ {q0, qN, qF}, Σ ∪ {#}, δ|, q0, {qF}) and a following language L = { #u# | uu ∈ L(A)}. In following paragraph I will describe how would it... |
Given $k$-sorted arrays in ascending order, is it possible to merge all $k$ arrays to a single sorted array in $O(n\log(k))$ time where $n$ denotes all the elements combined.
The question is definitely aiming towards a Min-heap/AVL tree solution, which can in fact achieve $O(n\log(k))$ time complexity.
However i'm wo... |
A class of total functions is a PRC class if:
The class includes all projection functions $p_i(x_1,\ldots,x_n) = x_i$ and the initial functions $n(x) = 0$ and $s(x) = x+1$.
The class is closed under composition and primitive recursion.
Prove that the class of all total functions is a PRC class.
Is it true if I say ... |
Suppose I have 3 sets of 2 elements: [A, B], [C, D], [E, F], and I wanted to generate all possible combinations of 1 element from each set, such that the result of the algorithm would be:
[A, C, E], [A, C, F], [A, D, E], [A, D, F], [B, C, E], [B, C, F], [B, D, E], [B, D, F]
What algorithm can I use to generate all com... |
If $L1⊆L2$, and $L1\not∈RE$, is it possible that $L2∈RE$ ?
Also I find it hard to find languages that are not in RE at all, I've heard about Arithmetical hierarchy but we didn't really learnt it in class so I guess the solution shouldn't necessarily be correlated to Arithmetical hierarchy.
I know that the $A_{TM}=\{(〈M... |
does L1
≤
p
L2
yield that coL1
≤
p
coL2 for the same reduction?
|
Is it possible to write a mathematical statement (like Goldbach's conjecture, for example) as a nontrivial 3-SAT formula that is satisfiable iff that statement is true? iff it is false? iff it is independent of the axioms of ZFC? So, for any statement, you would have (at most) 3 formulas, for which only one can be sati... |
I've been studying this YouTube video on Powells method and it looks like when we have a single variable we start at the upper and lower bounds of the variable and then we keep dividing the search space until we find the minimum.
So for a single variable it looks pretty easy. How do we do it for 2 variables?
Does anyo... |
How to prove that:
$E_{TM} = \{\langle M\rangle\mid M \ is\ a\ TM\ and\ L(M)=\emptyset\}\notin R$
(is undecidable)
using the language:
$H_{halt}=\{(⟨M⟩,w):M\ halts\ on\ w\}$.
I tried to prove by contradiction that assuming $E_{TM}\in R$ I have a Turing machine which decides $E_{TM}$ and to construct with it a turing ma... |
How does an ip prefix
90.0.0.0/4
translate to
0101∗
in binary
and
10.0.0.0/2
to this:
00*
I'm trying to understand it since a while now but I am unable to derive the logic.
|
The question popped up in my head. The hash function used is Murmur3.
|
For:
$$\sum^{n+m}_{i=n} \log(i)$$
I'm wondering what the big O notation is and how to prove it...
I believe that we can also write this as
$$\log(n) + \log(n+1) + \log(n + 2) + \ldots + \log(n+m)$$
also $$\log(n+m)!/\log(n-1)!$$
Thanks
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.