instruction stringlengths 35 29.1k |
|---|
I encountered the following exercise in a textbook about logic:
$\lambda x \lambda Y(Y(x))(j)(M)$
It seems that the expected result from the textbook should be $M(j)$, since there were some type specifications on the variables. However, if I substitute $M$ for $x$, and $j$ for $Y$, then the result would become $j(M)$, ... |
Suppose that $\Sigma = \{c_1, \dots, c_m\}$ is some finite alphabet and supposing $s \in \Sigma^*$, let $\mathcal{I}_j(s)$ denote the number of instances of character $c_j$ in $s$. Call a string $s$ odd-parity absent iff $|\{j : \mathcal{I}_j(s) = 0\}|$ is odd. That is, $s$ is odd-parity absent iff an odd number of cha... |
http://rationalwiki.org/wiki/Pseudomathematics#P_vs._NP_problem
A computational problem is considered "in P" if an algorithm exists
that can solve the problem in "polynomial time" — that is, it's O(n),
or O(n2), or O(n3), or any order where the n is raised to some fixed
power. If, however, the fastest algorithm ... |
We're given these two finite state machines where the alphabet consists of ${a, b, c}$. The question is to determine the language for the following two machines. I tried following the machines to find the language, but the languages I derived are quite verbose.
FSA #1
This FSA accepts words with at least one a followe... |
For my undergraduate senior project, a professor asked me and my partner to design an algorithm to determine true resolution in the browser, unaffected by zooming, multiple screens, viewport size, etc. (tl;dr our implementation was okay, it usually did the job correctly.)
It's super pedantic, but I've been thinking abo... |
Barendregt's Variable Convention: If $M_1,...,M_n$ occur in a certain mathematical context (e.g. definition, proof), then in these terms all bound variables are chosen to be different from the free variables.
This convention appears a lot in papers and I always wonder what does it mean. I want to know exactly what it i... |
Right now I am working on my implementation of Knuth's DLX algorithm.
I did understand the exact cover problem. But I didn't fully understand how Dancing links works. Here is Knuth's paper.
The question is about the solutions presented in the paper. I don't understand how these solutions make sense taking into account ... |
I've stumbled a heap-like sorting algorithm on the Internet as followed:
$\\$
For convenience, given a list of $2^n \; (n \in \mathbb{N^*})$ distinct numbers to be sorted increasingly.
Step 1: From the list, build a $P$-tree (to be defined) satisfying the min-heap property (Willard Zhan points out that this is actually... |
I want to solve Heterogeneous fleet in vehicle routing problem using the Clarke and Wright saving algorithm. After reading many literature I found two options:
Explicit and early assignment for the route.
Using saving algorithm sequentially, and iterating over all generated routes to fulfill capacity constraints.
Bu... |
Currently I know:
About vertical micro programming: The control signals are not immediately passed to the ALU components, but are rather processed first and passed as an compressed function code.
About horizontal micro programming: There is just one wire connecting all ALU components directly. The signal contains for... |
I am thinking that many example only takes free variable with one occurrence, such as $(\lambda x.x )y$ where $y$ is free.
can we say $y y $ is a $\lambda$-term and two $y$ are same free variable?
I did not see such examples so far, just wondering.
|
I am working with some tournament software where i need to generate pairings based on the swiss system. Some of the ideas i have came up with are as follows:
1)Create all permutations and choose best
-This is O(n!) which is not possible when n can be up to 1000.
2)Create a weighted graph and choose best pairs somehow... |
I often ask for a "simple" algorithm that solves some problem and I realized that, almost aways, the answerers's notions of simplicity doesn't match mine's. Often, for example, I notice people using numbers inside a supposedly "simple" answer, ignoring the fact numbers are, themselves, a complex dependency which adds a... |
I was wondering what the limitations to an algorithm that runs in O(n!). For example lets take an algorithm that generates all permutations of a list. Now what i am wondering is what the upper bound would roughly be for size of list. I understand that this can vary based on ram/memory. Let's say that this would be ran ... |
Assume we have a really cheap function $f$ that is defined on a mixed parameter space and we want to find a minimum.
For example
$\operatorname{arg\,min}\limits_{x_1,x_2,x_3} f(x_1,x_2,x_3)$
with
$x_1 \in \mathbb{R}, \ x_2 \in \{1, \ldots, 10\}$ and $x_3 \in \{\text{'a'}, \text{'b'} \}$.
and we have no assumptions on ... |
I am trying to understand bits, operations and masking. I have a hard time to get this thing into my head. I have tried to read at many different websites without luck.
I have 8 states, going from 1 to 8:
state 1 = 0001
state 2 = 0010
state 3 = 0011
state 4 = 0100
state 5 = 0101
state 6 = 0110
state 7 = 0111
state 8 = ... |
Say we have two (NP-)optimization problems $A$, resp. $B$, such that it is NP-hard to approximate within a factor $\alpha$ resp. $\beta$.
Now define problem $C$ whose input consists of pair inputs from $A$ and $B$, and a solution as pair of solutions of $A$ and $B$, but the objective function as the product of objecti... |
Given $$ (¬(P ∧¬Q)⇒S)∧¬P ∧(R⇒¬S) ⇒ ¬R $$ prove that this is a tautology.
One way is to use a hypothesis taken from the proposition itself.
As an example:
If we want to prove this rule: $P ⇒ (P ∧ Q ≡ Q)$ , we can do as follows:
We prove the equation $P ∧ Q ≡ Q$ using the hypothesis $P$ as justification:
$$P ∧ Q$$
$$ ... |
I am currently working in area of computer vision for my master's thesis and am trying to use distances between landmark points on the face for recognition.
My question is this: What landmark points should I use for measuring distances between landmarks? And, since distance is dependent on scale, what ratios of dista... |
imho this is not at all a duplicate, because the other question does
not address the "recursive" case $T(d,n) = ....T(d-1,T(d-1,n))....$,
which appears to be part of the Taylor expansion of this function.
Also I don't know how to write this as a Taylor expansion. If I would,
I would still not know how to solve... |
I have a massive distance matrix of clusters. The distance matrix is the distance between each cluster. I now need to recluster each entity based on two constraints. Each cluster has an associated volume. The constraints are a max volume and min distance. I want to scan for the minimum distance and if neighbor cluster... |
Let $ L = \{ \langle M \rangle : L(M) = \Sigma^* -\{\epsilon\} \}$
Determine whether $ L\in RE, \space L\in R, \space L\in co-RE$, or none of the above.
I tried to show a reduction function from $L_{\Sigma^*}$ to $L$ to prove that $L\notin RE$ , here is my attempt:
$\forall M\in L_{\Sigma^*} : f(M) = M'$, where M' is ... |
Given the alphabet $ Λ = \{a, b\}$ construct a FSA for the following language:
$$ L=\{α∈Λ^* ∧ |α|a =even ∧ |α|b =odd\}$$
where $|α|x $ is the number of occurrences of $x$ in $α$.
Basically, only strings where the number of $a$'s is even and the one of $b$'s is odd.
My attempt was the following:
whereas that's the solu... |
1 Context
Near pg. 184 of Lambda Calculus and Combinators, the author is discussing the theory of dependent types. In particular, we are extending the lambda calculus to look at terms of form
$$
\Pi x : \sigma . \tau (x)
$$
Now terms of this form denote type functions with degree and ranks, unless I am mistaken.
2 Te... |
Roughly, an undirected graph is very similar to a directed graph where for each edge (v, w), there is always an edge (w, v). That suggests that it might be acceptable to view undirected graphs as a subset of directed graphs (perhaps with an additional restriction that adding/deleting edges can only be done in matching ... |
I have a number with $n$ digits. I want to keep only $m$ digits out of it. What is the smallest possible $m$ digit number which can be generated from the larger number so that order of digits is retained.
Ex: 3422509739
I need the smallest 3 digit number by removing 7 digits with order retained which will be 039.
|
Imagine that I need to install my server in a remote location, so my algorithm can do something fancy (collocation of server at a financial exchange is how I thought of this question, but it applies more generally).
Imagine also I don't trust the people I am working with. They will have access to my server and I canno... |
It's clear that Mathematica uses the Baillie–PSW test for its PrimeQ function (which tests primality), and as I read in the Mathematica documentation, it starts with trial division, then base 2 and 3 Miller–Rabin, and then Lucas pseudoprime test. My question is:
Can we remove base 2 and 3 and use only a random base?
... |
I'm studying for a test, and got stuck on Time Complexity questions. Hope you guys could show me how to solve these.
I searched everywhere I could but didn't find a way.
they are two different qustions.
|
We have a language
$L = \{ a^{n^{2}}, n < 12\}$ We have to find minimum constant P for pumping lemma.
What does p represent here? I thought p in pumping lemma represent number of states , yet the right answer is $p >= 122$ , i would understand if it was $p <= 122$.
So for example it would be correct when $p = 155$. Bu... |
Consider the alphabet $\Sigma = \{0, 1, +, =\}$ and the language $ADD = \{x=y+z|x,y$ are binary integers $x$ is the sum of $y$ and $z$ $\}$.
This is the (informal) solution I came up with (not sure about its correctness).
Using the pumping lemma:
Take $s= 1^p=0+1^p$, $s \in ADD$. $s$ can be divided into three parts so ... |
As I understand it, one proof of the Halting Theorem is done by contradiction; we assume we have program X which can determine if any program terminates. We input program X into program X (with some modifications at the output), and we arrive at a contradiction. However, is it possible for a program Y to exist, where p... |
Although it is relatively simple to see that integer linear programming is NP-hard, whether it lies in NP is a bit harder. Therefore, I'm wondering whether the following reasoning shows that $ILP\in NP$ implies $NP=CoNP$.
To be precise, I am considering the decision variant of ILP over a non-unary input encoding, so th... |
Consider arbitrary context-sensitive grammar on strings $G_s$.
Is any known and described formalism (or type) for tree grammars, using which we can build weak-equivalent tree grammar $G_t$, which yield language will coincide with $L(G_s)$:
$L(G_s)=\{yield(t)|t\in L(G_t)\}$ ?
Yield operator is as it defined in TATA boo... |
For example on wikipedia a function $f : \mathbb N^k \to \mathbb N$ is defined to be computable, if there exists an algorithm (in form of a Turing machine, as an $\mu$-recursive function or maybe a C++ programm) such that the following holds:
If $f(x)$ is defined, then the program will terminate on the input $x$ with ... |
Suppose that I would like to find the shortest path between two vertices in a dynamic graph, where the cost function of an edge changes occasionally. I understand that an efficient algorithm to target this problem must have efficient ways to handle the "cost updates" and the shortest path queries.
Does anyone know wha... |
So I've got the regex /[1-9][0-9]*(\.[0-9]*[1-9])?/ and I'm trying to write a regular grammar for it.
I started off like this:
S ∶≔ EAB
A ∶≔ DA | ε
B ∶≔ .AE | ε
D ∶≔ 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
E ∶≔ 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9
But I realised that this does not follow Chomsky's rules for regula... |
I understand the difference between DFA (has finite set of accept states, and doesn't have output function, nor output alphabet) and Moore Machine (doesn't have accept states, but has output for every state). But when implementing DFA in programming language, it always generates output. That is, if it last state was ac... |
I'm working on my data structures homework and proving Big O and Big Theta for a couple questions. After choosing my values for C and getting to the end I'm left with the fraction 1/300 for $N_0$ for both Big O and Big Theta. I understood from lecture that we actually take the ceiling of the fraction for Big O, makin... |
While I'm aware most (good) hash functions are one-way (or at least mostly so), I'm wondering if there's any construct (not necessarily called a hash function) which behaves in many ways like a hash function, but can be easily reversed.
For example, a function $f$ takes an arbitrary string $x$ and maps it to $y$, where... |
What's the input to the decoder part of a sequence to sequence autoencoder? I've seen certain examples of such an autoencoder (using LSTM's more often than not) but am still unclear.
For example, here in this often-cited paper by Dai & Le ('Semi
Supervised Sequence Learning'), we have the following diagram:
What's th... |
It is possible to distinguish Normal terms which don't contain beta redex as a sub-expression, from others like so
data WithBound a = Var | Other a
data Normal a
= Neutral (Neutral a)
| Abstract (Normal (WithBound a))
data Neutral a
= Variable a
| Apply (Neutral a) (Normal a)
Is there any intuitive explanat... |
I'm relatively familiar with spacial access methods and related data-structure such as Kd-trees and R-trees, but there is a related issue which I don't remember having seen mentioned when reading on that subject.
I'm concerned with the 2 dimension case. Programs manipulating shapes often sort overlapping shapes in z-o... |
I am trying to solve a weighted set cover problem where the number of selected subsets is limited by a constant $k$.
Assuming this is a pretty straight-forward variation of weighted set cover I ended up quite confused with only one, also rather recent paper by Golab et al. [1].
Am I missing something here?
[1] Golab, K... |
I have some question about DFA Language properties.
Does closure under intersection and complementation imply closure under union?
Does closure under intersection and union imply closure under complementation?
Thank you
|
Processor has the internal clock which is a multiplier of the main clock which is present on the motherboard which is designed by keeping in mind the critical path and the slowest device on board,
My question is :-
How there are two clocks working simultaneously in the computer system, what is the mechanism of their ... |
I'm thinking that there are two cases for each sub-tree: the root is in the independent set and the root is not in the set. How to write a recursive algorithm for finding the number of independent sets in a tree? The tree is n-ary.
|
As said, i want to build a program to generate n equidistant points in an euclidian space.
From what i know
1d : all couple of points
2d : all equilateral triangles
3d : all equilateral tetrahedra
up to 3d : i suppose it's called an equilateral hypertriangle
So my problem is as follow, in a n-1 euclidian space, givin... |
The problem in the title is to be proven, and while proving $\mathrm{coNP}\subset\mathrm{NP}$ is rather clear given the assumptions (see below), I fail to see a way to prove $\mathrm{NP}\subset\mathrm{coNP}$.
My main idea is to prove that $L$ is also $\mathrm{NP}$-complete (or rather $\mathrm{NP}$-hard, as it is in $\m... |
Let me define first Halting problem $(\mathsf{HP\text{}})$.
Given : $(M , x)$, $M$ is a turing machine and $x$ is a input binary string to turing machine $M$.
Decide : Does $M$ halt on string $x$?
I tried to reduce $\mathsf{SAT\text{}}$ instance to $\mathsf{HP\text{}}$ in polynomial time. Let $\phi$ be a instance of... |
Given an array A of n real numbers, are the maximum prefix sum and minimum suffix sum (and vice-versa) of A complements?
I.e. Given A[1..n] and its maximum prefix subarray P[1..i], is its minimum suffix subarray S[j..n] where i+1 = j?
Or stated another way, is sum(A) = maxPrefixSum(A) + minSuffixSum(A) true?
For an arr... |
We call the sharing of two languages L1 , L2 to be the set of all strings that are in both or neither of L1 and L2 . If L1 and L2 are regular, then the sharing of L1 and L2 is regular. True or false?
Apparently the answer is false but that confuses me because can't the sharing of L1 and L2 be all the strings tha... |
BB represents the busy beaver function here. Do we even have any idea of what order of magnitude $n$ would have? Is it possibly around 10, or more like 1000?
|
Let's say we have a universe $U$ of $n$ elements and a collection $S$ of $m$ subsets of $U$, i.e., $S=\{S_1,\ldots,S_m\}$, and a positive integer $k$. If I ask "is there a set cover of $U$ of size $k$ or less", then this is NP-complete.
Now suppose that I add the following:
$|S_1| \gt |S_2| \gt \ldots \gt |S_m|$.
I... |
I'm reading Aaronson's survey on P vs. NP, and I've come to understand that in CS theory, people really care about derandomization results like P vs. BPP etc. My question is, what's the problem with randomness? If your algorithm is known to only require a polynomial number of random bits, then simply go ask a physicist... |
Suppose there is a weighted graph representing a network with available bandwidth. I want to allocate end-to-end bandwidth between a set of pairs of nodes to transfer data. I want to find a path and allocate bandwidth to these pairs over that path and cover the most number of pairs possible. To solve this, I used short... |
We define a partial recursive function $f:\{0,1\}^* \longrightarrow \{0,1\}^*$ to be semi-good if we can define a total recursive function $g:\{0,1\}^* \longrightarrow \{0,1\}^*$ from $f$, such for all $x \in \{0,1\}^*$ either $f(x) = g(x)$ or $f(x)\uparrow$.
Now I want to prove that there exists a partial recursive fu... |
One of the definitions of NL is the set of all languages that can be decided by a logarithmic space verifier with a 'read-once' witness tape, i.e. the witness tape head can only move right.
I want to prove that if we allow the verifier to read the witness tape twice, i.e. when the witness tape head reaches the end of ... |
I want to remove left recursion in grammar:
$G = ({S, A,B,C,D}, {a,b,c},P,S)$
$S → A$
$A → Aa | Bc$
$B → B a |CD$
$C →C b | ε$
$D → Bb | a$
We see that this grammar contains direct recursion ( $A → Aa$ ) and indirect recursion ( $B → CD → D → Bb$ ). We need to remove indirect recursion and convert it into direct recurs... |
Is below statement true?
$\forall L \in r.e. \,\, \, \exists f:\{0,1\}^* \longrightarrow \{0,1\}^* \, , \exists x\in \{0,1\}^* \; s.t \, \, L = \{x,f(x),f(f(x)),..\} $ .
My guess is no and I tried to prove this with cantor diagonalization.If we suppose that $L_i$ has this property so $L_i = \{x_i,f_i(x_i),f_i(f_i(... |
Is RTT = $2*T_{Propagation delay}$ only. Or we include Transmission delay to send packets as well. Some examples include Transmission delay some not. I'm confused. Can anyone help.
|
I have read about cryptography prgs.
If I have a generator G(x1,x2...,xn)= x1,x2,...,xn, x1&x2...&xn , how can I prove that it is a prg or prove it is not?
Is there some principles I have to be based on while proving prgs?
|
Suppose a logical address space of 32 pages of 2048 words. There are 64 frames in the main memory. According to given information calculate the various parameters related to paging.
Calculate the size of Logical Address?
Calculate the size of Physical Address?
|
Assuming I have an encoding of a DFA $<M>$ and a regular expression $<r>$, I'm interested in finding an algorithm for comparing whether or not $L(M)=L(r)$.
I have thought about converting $r$ into an NFA, and then converting the NFA to a DFA, but the problem is that this process may result in a totally different DFA.
A... |
Let $P=\{L \mid \exists w\in \Sigma^* s.t. w\in L \wedge \forall z>w\colon z\in L\}$ .
Now denote $L=\{\langle M \rangle \mid L(M) \in P \}$.
That is, $L$ is the set of all TMs $M$ s.t. there exists a $w\in \Sigma^*$ s.t. $w$ is accepted by $M$ and for each $z>w$, $z$ is accepted by $M$ as well.
I am trying to fin... |
I have 'discovered' a way to encode rose trees (see e.g. What are the applications of Rose trees? ) as a sparse matrix: if you have a node n with ID i and parent ID p, then you place n in the matrix at coordinates (row, column) of (p, i). This makes it easy to:
Get a node by its ID and parent ID (single lookup of the ... |
Given an alphabet $ Λ = \{a, b, c\}$, I have the following grammar:
$$ S -> aSb | aAb $$
$$ A -> aaA | aBb $$
$$ B -> Bbb | c $$
Which method should I use to write the definition of the language?
|
given a binary number b, is there any grammar that generates the languages of $1^x$ where $x$ is $b$ in base $n$ ($n \in \mathbb{N}$) e.g. if $b$ is 1100, the grammar should generates $11,1^{12},1^{36},\cdots$. is there any idea that helps to create the proper grammar?
|
I have a problem with creating an algorithm that would find continuous line consised of points of one color (say blue) that surrounds points of different color (say red).
This problem occurs in "Dots" game.
At first I tought that simple BFS would suffice (I can treat two dimensional table of ints that represents map o... |
I'm using a simulator for my thesis and I've come across the term "Fast-forwarding" but I have found no definition anywhere in the documentation or online. From a pdf I've been reading about the simulator I am using (gem5), I've come across this section:
The gem5 simulator supports four different CPU models: AtomicSim... |
I have proven that it is not regular and context free. But is it Turing decidable/recognizable? I'm thinking yes, as I am able to write a Java program for it, and by the Church-Turing thesis the power of the Turing Machine and a Java program is equivalent (or am I wrong here?).
|
I suppose that $\Sigma = \{a\}$.
Prove or Disprove: For every polynomial $p(n)$ with coefficients in $\mathbb{N}$, $L = \{a^{p(n)} \; | \; n \in \mathbb{N}\}$ is a context sensitive language.
It seems that it is a context sensitive language. I guess making LBA or context sensitive grammar is not easy for this language.... |
Regular Languages, by definition, can be accepted by finite automata, which do not have memory. But if I know that a language is not regular, does that imply that any mechanism that recognizes the language must have memory?
|
Recently, I was given a puzzle by a friend of mine, which has 6 pieces. Giddy to try it out, I took it apart without batting an eye to follow what I was removing or moving or sliding.
I've been struggling with this puzzle for over a year and a half now, and so thought I would write an algorithm that would list all the... |
This looks like a typical divide and conquer algorithm, but with a few tricky parts.
It looks like we want to do k operations and divide the array in half at each step because of the O(k log n) restriction, but I'm confused about the specifics. When I try to come up with the algorithm, I think about making k compariso... |
I am new to Kalman filter and parsers. I understand that it's suitable for prediction/estimation on the go, when you have something to measure (not only the model), and when changes always occur in the measurement or model.
However, for the case of finite automata, pushdown automata, or grammars, usually the automata o... |
I was reading about connectedness of a graph where I came across following points:
The $n$ vertex graph with the maximal number of edges that is still disconnected is $K_{n-1}$ (complete graph with $n-1$ vertices) with an additional vertex, which has $\binom{n-1}{2}=\frac{(n-1)(n-2)}{2}$ edges.
Adding any additional ... |
Let's take this lambda expression : $\lambda\:x \:\ast\:x\:2$ that "computes" x * 2.
From what I understand, $\ast$ is a constant operator, but since its nothing else than a symbol, how does that let us compute the multiplication x * 2?
I would have thought that we should have defined $\ast$ as some sort of recursi... |
How can one model the following condition in an integer linear program?
$$A = \begin{cases} 1 & \text{if } B > C\\ 0 & \text{otherwise}\end{cases}$$
where $A \in \{0,1\}$ and $B, C \in \mathbb N$. We have upper and lower bounds on both $B$ and $C$.
|
As we know on NDTM all the possible solutions for a given problem is verified the similar kind of work is done in bogo sort sequentially.
So in future if an NDTM will be there. can we say it will be using bogo sort for sorting?
|
While I was learning about time complexity of recursive functions, I came across this code to calculate $x^n$:
power (x, n) {
if n == 0
return 1
if n is even
return power(x, n/2) * power(x, n/2)
if n is odd
return power(x, n/2) * power(x, n/2) * x
According to the book, its... |
I just found the paper A Neural Algorithm of Artistic Style which seems to be very cool.
It describes a way to combine two images: Use the content of image A and the style of image B to create a new image. This is done with a CNN (e.g. VGG).
As may be seen on the following page it works very well:
https://deepart.io/la... |
Let $L_1, L_2$ be languages.
Can the following conditions hold:
$L_1,L_2\notin RE$.
$L_1\cap L_2\in R$
$L_1\cup L_2\in R$
$\overline{L}_1, \overline{L}_2 \in RE / R$
I believe the above cannot hold at the same time. I thought since $L_1\cap L_2\in R$ and $L_1\cup L_2\in R$ then $\overline{L}_1\cup \overline{L}_2\in R... |
In cycle stealing mode, is CPU idle during data transfer between peripheral devices or idle only for 1 cycle ( during shifting of bus controls ) ?
Because I'm unable to understand these lines.
The DMA module is transferring characters at the rate of 1200 characters per second. or one every 833 microsecond. The DMA t... |
I have trouble analyzing the characteristics of this algorithm that merges two adjacent sorted lists. Basically it looks at some number of the tail of the first list, and the same number of head elements of the second list, swaps them, and recurses on the four sublists. Code for the algorithm:
// Assuming that the subr... |
I have stumbled upon this idea of "algebraic complexity" and I couldn't really find what it is and how it is calculated. For instance: the algebraic complexity of Graham Scan (https://en.wikipedia.org/wiki/Graham_scan) is : second grade polynomials.
Now, another question could sound something similar to this:
Given a ... |
I am trying to develop an algorithm that can traverse a graph with intermediary/all or nothing(?) nodes.
The problem is that there are companies B, C and D that are bidding on projects X, Y and Z. The companies can do individual bids for any of the projects, or they can say that they will complete a combination of pro... |
Let $L_1$ be a language.
I would like t prove that $L_1\in CO-RE$ if and only if exists a language $L_2$ s.t. $L_1=\{ u\,\, |\,\, \forall_{v\in\Sigma^*} : <u,v>\in L_2 \}$ and $L_2\in R$.
I'm not quite sure on where do I start here from?
I've tried writing down what I know and trying to develop any ideas, but got stuc... |
I'm interested in applications to verifiable computing. Let's say Alice would like to find an x such that f(x) < c for some real-valued function f and some c of Alice's choosing, so she hires Bob who has a powerful computer. Bob finds such an x, but he doesn't want to give it away before receiving payment from Alice, b... |
I just started a college course and I'm being asked for a flowchart where I explain how to calculate the average of x quantity of numbers. For this assignment I'm asked to follow the problem solving steps, which are:
Identify the problem.
Comprehend the problem. (As in, "is it mathematical?")
Identify different altern... |
Suppose we have the following array of pairs representing start and end indices within an array. Think of them as an interval. I'll be using this term from now on.
$[\left\{1,3\right\},\left\{4,9\right\},\left\{2,11\right\},\left\{8,14\right\},\left\{16,21\right\}]$
I want to yield all intervals which contain no other... |
Suppose that $\Sigma = \{c_1, \dots, c_m\}$ is some finite alphabet and supposing $s \in \Sigma^*$, let $\mathcal{I}_j(s)$ denote the number of instances of character $c_j$ in $s$. Call a string $s$ odd-parity absent iff $|\{j : \mathcal{I}_j(s) = 0\}|$ is odd. That is, $s$ is odd-parity absent iff an odd number of cha... |
I am actually little bit confused when I am reading through the text - Database system concepts by Henry F. Korth and others
I won't be able to understand one thing, which one of the following models I have to use when I have to design the ER diagram.
As the textbook says:
We are going to treat the telephone as an... |
We have Hoare logic. Why is it still possible that an algorithm is right but there is no proof that it's correct? Suppose the algorithm is expressed in C. Then we can argue step by step that it's doing what it's supposed to do.
So my question is:
Give me an example of an algorithm that's right but does not have a proo... |
Assuming the regular Heap ADT.
What is the time complexity of getting its size ?
I tend to think that because insert is O(log(n)), then I always know the last index of my heap. So in order to get its size all I need is to return the last index + 1.
However I have seen in some places that refer to the size of the heap'... |
Sometimes I read about the term userland and sometimes userspace.
From Wikipedia, it is said that userland is referring userspace:
https://en.wikipedia.org/wiki/Userland
Is there any difference between the terms userland and userspace?
|
I was reading BFT from CLRS. This is the example given in the book:
(Figure:The operation of BFS on an undirected graph. Tree edges are shown shaded as they are produced by BFS. The value of $u.d$ appears within each vertex $u$. The queue $Q$ is shown at the beginning of each iteration. Vertex distances appear below v... |
for my current project I am working with decision tables that uses expression to determine conditions. Currently the decision tables support FEEL expressions. A simple example table using feel expressions is shown below:
| visitors | season | dish |
| <4 | "spring", "winter", "fall" | Veal ... |
Is there any NP-Problem that can't be (maybe even proven) solved by quantum computers. I'm not talking about quantum NP-Problems (if that's even a thing), but about normal NP.
If that NP Problem exists could you also use it for cryptography, since I don't want to buy a quantum computer just to be secure.
EDIT:
I'm no... |
I have been using MATLAB for a particular project, and have seemed to find a function that may or may not exist. This question isn't MATLAB specific, more algorithm specific.
I have a list of 12 items, indexed from 1 to 12. I want to be able to create a list of all possible permutations of these 12 items where I only ... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.