instruction stringlengths 35 29.1k |
|---|
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 ... |
$$L=\{0^n1^m | (n+m) \text{is even}\}$$
Using the pumping lemma ,
let me choose a valid string $W=0011$ $(n=2,m=2$ and $4$ is even$)$.
Let the number of states in the DFA ($C$) be $3$ (I find this step to be fishy)
$|W|\ge C$
Let $W=XYZ$
I choose $X=00,Y=1,Z=1$ such that $|xy| \le C ,|Y| \ge1$
So, for all $i$, $00(1)... |
Both $L_{REG}=\{ \langle M \rangle : L(M)\text{ is regular}\}$ and $L_{CFG}=\{ \langle M \rangle : L(M)\text{ is context-free}\}$ are $\le_m$-complete for $\Sigma_3^0$ in the arithmetic hierarchy. This of course implies that $L_{REG}\le_m L_{CFG}$. Can anyone come up with natural, intuitive, direct reduction?
[I can g... |
Please help me regarding following problem-
Let us consider Boruvka/Sollin's algorithm . Note that Boruvka/Sollin algorithm
selects several edges for inclusion in T at each stage. It terminates when only
one tree at the end of a stage or no edges to be selected.
Algorithm 1: One Step of Boruvka/Sollin's
Algorithm
1: Fi... |
I have the following problem.
I have a set of elements $x_0,\ldots,x_n$ which must retain their order inside the binary tree: if, given $x_i, x_j, i < j$, $x_i$ must be to the left of $x_j$ if $x_j$ is the root and $x_i$ is part of $x_j$'s subtree.
I also have a set of frequencies $f_0,\ldots,f_n$. I need to build ... |
Context-sensitive languages are exactly those that can be recognised using linearly bounded automata, i.e., those in NSPACE(O($n$)). This subsumes all languages that can be recognised in linear time, i.e., DTIME(O($n$)), since you can only use n memory cells in n steps.
However, this leaves open the possibility that so... |
We have a group of $n$ people. We are given a list of who must buy presents for whom within the group. Each person might need to buy/receive any number of presents, or possibly none at all. In a shopping trip, a subset of the people travel together to the same store, and buy presents for anyone who is not present at th... |
I am overviewing this expression given in set notation. Could someone translate what M "Element of" $\{{0,1}\}^k$ stands for? Im looking for an explanation in English like what I did below.
$K_e = \text{Encryption Key} $
$K_d = \text{Decryption Key}$
$\mathcal{E}_K(M)$ = Encryption using Key with Message M
$D_K(C)$ =... |
I've been struggling with solving the following question:
Supply an ADT that stores members (not necessarily unique) and supports the following functionalities:
1) MakeEmpty - creates an empty data structure - complexity in time Θ(1) worst case
2) Insert - inserts a member into the data structure - complexity Θ(1) in a... |
In O(n log k) time?
The input is the array of integers n, and some integer k. The output should be a boolean for whether or not the following condition holds for all elements: any two elements within k distance of this element cannot vary by a multiple of two (the maximum cannot be double the minimum).
The brute force... |
I have been reading up on the NeuronEvolution of Augmented Topologies and there's this little thing that's been bothering me. While reading Kenneth Stanley's Paper on NEAT I came on this figure here:
The innovation numbers go from 1,2,3,4,5,6 to 1,2,3,4,5,6,7 on the first mutation.
On the second one it goes from 1,2,3... |
Given a pseudo random number generator rand5() that generates a random integer in the set [0,1,2,3,4], how would someone use this to generate a function rand7() that outputs [0,1,2,3,4,5,6] with equal probability.
I was thinking of approaching it this way: reduce the problem to generate number from 0 to 6 using a coin.... |
I am new to machine learning. I am reading the book, where I have:
– Most general hypothesis
< ? ? ? ? ? ? >
– Most specific hypothesis
< Ø Ø Ø Ø Ø Ø >
in
Sky AirTemp Humid Wind Water Forecast
< Sunny ? ? Strong ? Same>
I understand that for a learning instance, "?" means it can take on any value, so the outcome of th... |
The prefixes of the string aabab are a, aa, aab, aaba, aabab.
If the number of a's should be greater or equal to the number of b's, the grammar would be
S -> aS | aSbS | e,
but I need it with strictly more a's than b's in any prefix.
I thought of this grammar, but I'm not sure it is correct.
S -> aS | aSAbA | a
A -> ... |
So I'm working on an implementation of a Wagner-Fischer-Algorithm for an online programming challenge site, but I can't seem to push the time down to where it needs to be. The assignment is to, for a number of different 'misspelled' words w1, w2, ... , wn and a dictionary D compute the editing distances between all wor... |
I want to show the following two propositions:
The domain of a recursive function is recursively enumerable.
The range of a recursive function is recursively enumerable.
I have thought the following in order to prove the first proposition.
Suppose that we have a recursive function $f$. Then we know that there is an a... |
I've been reading through the long division algorithm exposed in the Knuth book for a week and I still miss some details. There's an implementation of such algorithm in "Hacker's Delight" by Warren, however basically the author explains that it's a translation of the classic pencil and paper method and the Knuth book i... |
I have been reading this for quiet a long time that "RAM can be
accessed hundreds of times faster than a hard drive".
But, no one has been able to explain it properly.
I searched on Internet and found that "Access time of RAM is faster because they have less addresses(~4GB RAM) than Hard Drive(~1TB), and therefore ad... |
If we store a min heap of $n$ elements, $\color{Blue}{[1,2, \dots n]}$ into an array, then what can be minimum value present at any index $i$ and maximum value present at any index $i$. (elements are from $\color{Blue}1$ to $\color{Blue}n$)
|
A computational problem consists of a set of instances. In most cases the set of instances is infinite. Like the set of all graphs, e.g.:
Given a graph $G$, is there a Hamiltonian circuit in $G$?
Can the set of instances be finite and a problem still be non-trivial?
|
How do solve the following recurrence?
$$ T(n) = \frac{1}{2} T\left(\frac{n}{2}\right) + \frac{1}{n}. $$
Master's theorem cannot be applied as $a$ is equal to 0.5 which is less than 1. Hence the theorem fails. How do I solve a recurrence when the theorem fails?
|
Problem:
A number is said to be a magic number, if the sum of its digits, taken again and again till it becomes a single digit number, is 1.
Example: $289 => 19 => 10 => 1 => 289$ is a magic number
but, $20 => 2 =>$ not a magic number.
So the simple algorithm is to keep doing the digit sums till we reach a single... |
This question may be a little mathy or hardware-y, so I may have to ask elsewhere.
I've recently learned that if a is a positive rational number and b is a positive irrational number, there exists no common multiple between the two.
A common design consideration in threaded or embedded systems is concurrency control, w... |
Let be a language with the following alphabet : $\Sigma=\{a,b\}$
I want to write the regular expression of {$w$ | $w$ containing a number of $a$ that we can divide by $3$ }
A friend of mine thought of $(b^*+ab^*aa+aab^*a)^*$ and it seems alright for me but I said to me today that it wasn't true but I can't see why. I h... |
This question arose from a practical problem: given a set of texts, find one, which contains a given string (not word).
Let $S$ be a set of $n$ strings, and $l$ the length of the longest string in $S$. What will be the best data structure to efficiently search a string that contains a substring of length $k$ in $S$?
Se... |
When considering automata, they are normally considered over finite alphabets. The following are two types of automata that can handle words over infinite alphabets (definitions included for clarity).
The symbols $\triangleright$ and $\triangleleft$, appended to the beginning and end of the word respectively, are delim... |
I am trying to re-implement the model in this paper https://arxiv.org/pdf/1511.02917v2.pdf. But the paper omitted some details in feature extraction (Section 4.1). I am new to computer vision so I am confused when the paper just said they got the spatial feature (1440 dimensional) that corresponds to a 32*32 spatial hi... |
I'm writing a logic gate simulator. I would like to prevent user from constructing circuits prone to race condition such as flip-flops, and instead provide them as separate building blocks. Is that possible?
edit: I've got an idea. I guess that race conditions can only arise from logic circuit outputs directly or indir... |
Wiki gives two definitions for the NEXP complexity class:
$
\mathsf{NEXPTIME} = \bigcup_{k\in\mathbb{N}} \mathsf{NTIME}(2^{n^k})
$
where $\mathsf{NTIME}(f(n))$ is the set of decision problems that can be solved by a non-deterministic Turing machine which runs in time $O(f(n))$.
Using deterministic Turing machines ... |
Trying to find the right search terms for literature on classifying 2D time series data.
I am looking at data from positional tracking of a swarm of insects over time. I have example datasets for specific insect behaviors, and I would like to play around with training a classifier on these.
|
Suppose we have a complexity class $C$ (say for example $C = DTIME(2^{cn})$).
Take a language that belongs to $C$: $L \in C$.
Define an arbitrary polynomial reduction from language $L$ to $L'$.
To what complexity class does the result language $L'$ belong?
Thoughts: I think it might depend on the model of the compu... |
I'm having trouble with this homework question.
Prove if $f(n)$ is $o( g(n) )$ and $g(n)$ is $\Theta( h(n) )$, then $f(n)$ is $o(h(n))$.
I know I need to use the precise definition of a limit, but I'm not sure how to apply it to this proof. Any help would be appreciated.
|
In a comment on this question, @Kaveh wondered whether the questioner really wanted to ask "is there a relation between strings with high Kolmogorov complexity and pseudorandomness?" This is not the question that was answered, in the end, but I would like to know the answer.
I understand that any pseudorandom sequence ... |
This is a question from the book The Algorithm Design Manual by Steven Skiena, Page no- 201.
Articulation vertex : An articulation vertex of a graph (undirected) G is a vertex whose deletion disconnects G.
Given : Graph (undirected) $G = (V,E)$
Find : A vertex not an articulation vertex
Here is how i tried. I know a ... |
I am trying to understand Church's Numerals for 4:
$$4 = \lambda f.\, \lambda x.\, f f f f x\,.$$
This will be evaluated in the following order:
$$\lambda f.\, \lambda x.\, (f (f (f (f x) ) ) )\,.$$
My question is why the function body will not evaluate left outer most, like
$$( ( ( ( (f f) f) f) f) x)\,?$$
|
Given a regular language , how could we prove that it is alsways ( or can be always ) generated by clear grammar ( such as that for every sentence exists only one derivation tree ).
Could we prove it by creating minimalistic deterministic automata without epsilon transition ?
|
I was wondering if there is any technique in order to recognize similar functions behaviour. In particular, suppose that I implement two functions $f$ and $g$ in a certain programming language $P$ and for each input $i$, $f(i) = g(i)$. Moreover, the two functions $f$ and $g$ could be implemented in a completely differe... |
As we know, in IEEE 754 standard, float number's exponent and mantissa are stored differently. While the exponent is stored as an unsigned number, taking advantage of the bias, the mantissa is in sign-magnitude format.
The reason to use a bias seems to be the fact that another value of exponent can be achieved this way... |
Let's say $p_1, p_2, p_3, \ldots $ is the increasing sorted sequence of all prime numbers. Prove that there exists a constant $n_0 \in \mathbb{N}$, so that for all $n \ge n_0$:
$$K(p_n) < \log_2(p_n) − 2.$$
Hint: Prime number theorem: $p_n \in \Theta (n \ln n)$.
I think, I could have a program A, which generates... |
I came across a problem were you have to plan an optimal assignment pattern. Let's say you have $j=1,\ldots,n$ tasks during $i=1,\ldots,m$ time periods.
It's an single agent problem where we have to assign agent to perform exactly one task $j$ during each period $i$, i.e., $\sum_{j=1}^n x_{ij} = 1$ for $i=1,\ldots,m$ ... |
Is there any (kind of) (well-known) problem which can be expressed as a CSP in which the least constrained variable heuristic seems to give the best results, when employing backtracking with constraint propagation as the search method?
I am aware of the most constrained variable heuristic, and the intuition behind it, ... |
It is given $\mathcal O(n\log n)$ everywhere but in best case it should be $\mathcal O(n)$, isnt it ?
The argument here is, If my input has all the same keys, then every time I delete the root, I do not need to heapify, I just need to swap with the rightmost leaf.
Why is the above argument not valid ?
|
I have a system with three qubits as input and I want to demonstrate this equality:
where the left part of the equal is the circuit representation of the Toffoli gate where the first two lines are the control qubits and the third one is the target. On the right side we have the CNOT gate whose matrix representation is... |
I'm trying to think of corner-cases where I can skip having to linear-search through my dictionary in my problem; For a given word w1, find all matches with the least editing distance from it in the dictionary D (Levenshtein distance).
The dictionary can contain 500.000 words so a linear search through it can tend to ... |
We have to construct a DFA over the alphabet 0 and 1 for:
Every substring of four symbols has at most two 0's. For example, 001110 and 011001 are in the language, but 10010 is not since one of its substrings, 0010, contains three zeros.
I haven't reached to regular expression in the book which I am using. I am curren... |
The AND function in the lambda is:
and = (λ a. λ b. a b F)
I have following expression:
and T T
then the result will become T and I am asking me why?
When I do the beta reduction, then I understand, why I've got T:
(λ a . λ b . a b (λ x . λ y . y)) (λ x . λ y . x) (λ x . λ y . x)
(λ b . a b (λ x . λ y . y))[a →(λ x ... |
The activation of a perceptron style neuron is:
$DotProduct(Inputs, Weights)+Bias > 0$
That is essentially classifying what side of a (hyper)plane a point is on (positive or negative side), like the below:
$DotProduct(Point, Normal)+D > 0$
Looking at an N input, M layer perceptron network that has a single output can b... |
I'm teaching Architecture this semester, and I'm using Computer Organization and Design (Patterson & Hennessy) as the text. The book contains a table that has the typical access time and cost of SRAM, DRAM, flash, and hard disk as of 2012. Costs have come down pretty steeply in the last 4-5 years though, and I'd like t... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.