instruction stringlengths 35 29.1k |
|---|
So if k is the number of tapes, is a multi-tape Turing machine allowed to have k = ∞ tapes.
I'd assume not since this would give an infinite transition function?
|
I'm given a graph and two weight functions, $w_1$ and $w_2$, such that there doesn't exist a negative loop in the graph in $w_1$ and $w_2$. I'm also given two vertices, $s$ and $t$, and am asked to find the lightest path from $s$ to $t$ in relation to $w_1$, out of all the lightest paths from $s$ to $t$ in relation to ... |
A polynomial map is equal to another polynomial map iff they take on the same values at each point. So this is different from formal polynomials. So since in $\Bbb{Z}_p$, $x^{p-1} = 1$ for all $x \neq 0$, and is $0$ on $0$, we have that there are a finite number of polynomial maps in $\Bbb{Z}_p[x_1, \dots, x_k]$. F... |
I've googled this problem somewhat pretty extensively, and all the relevant literature understandably deals with 2-d or 3-d cases, rather than the n-d case.
EDIT: Yes, ℝn. I've done many searches combining terms like union, intersection, volume, convex hulls, polytope, etc. I've come across papers like this and this. M... |
I'm currently trying to prove a language regular (for personal amusement). The language is:
The language containing all numbers in ternary that have even bit-parity when encoded in binary.
Now, I've currently tried a few different approaches that have not led me to any success. I've tried using the pumping lemma (could... |
I am trying to tackle a specific problem so any help would be greatly appreciated:
Let $G = (V,E)$ be an undirected graph with vertex set $V$ and edge set $E$. A 3-coloring of $G$ is a map $\chi:V\to \{R,G,Y\}$ such that if $\{x,y\}\in E$ then $\chi(x)\neq \chi(y)$. (Let $R,G,Y$ stand for red, blue, and yellow respect... |
I'm trying to make an algorithm to calculate what combination of cards from what buyers I should get to get the cheapest deal. Taking the shipping costs into consideration. It's for a website called MagicCardMarket, which is kind of an Ebay for trading cards. The problem is that the site doesn't have a proper optimizat... |
I was wondering about the nature of these managed languages i-e since c# and java both are converted into intermediate language and byte code respectively, and are interpreted by their respective runtime(s). So if they are somehow pure interpreted languages then is it feasible to develop any crucial application on thes... |
I'm trying to reduce an optimization problem to a decision problem, more specifically, consider the Max-Cut problem in its decision version:
Given $(G=(V,E),k)$ as input, where $G$ is an undirected weighted graph (all weights are positive integers, formally: $w: E\rightarrow \mathbb{N}$ is the weight function) and $k\i... |
My textbook says: "The Boolean hierarchy is contained in the class $P^{NP}\subseteq\Sigma^P_2\cap\Pi^P_2$." However, it provides neither a proof nor a proof sketch nor some hint. How can I convince myself that the claim is true?
|
Given $n$ points $x_1, x_2, ..., x_n \in \mathbb{R}^k$, where $\mathbb{R}^k$ can be high dimensional. Is it possible to devise a fast algorithm
(1) Preparation: first take the n points as an input, do whatever preprocessing necessary.
(2) Query: for each query $f_i = w^\top x$ being a hyperplane and a constant $b$, f... |
I'm looking for a type inference algorithm for a language I'm developing, but I couldn't find one that suits my needs because they usually are either:
à la Haskell, with polymorphism but no ad-hoc overloading
à la C++ (auto) in which you have ad-hoc overloading but functions are monomorphic
In particular my type syst... |
I have been reading a lot and I am still unsure of how to determine this. Let's say I have an initial binary state vector (1, 1, 1). How would I go about determining whether (1, 1, 1) is a fixed point in the network?
My initial understanding was to put the state through the network and if it converged to (1, 1, 1) the... |
In my textbook, enumeration machines are defined as possessing a special write-only output tape, which they can write characters to, but not move the head of. When they hit the print state, the string on the output tape is enumerated and reset to a blank tape.
Is this equivalent to the model of enumeration machines whe... |
For instance, given the polynomial expression $xy + x + y + 1$ it will output $(x+1)(y+1)$.
Thanks!
|
Why does packet don't need trailer/footer while frame needs it?
I am trying to understand networking concept regarding OSI & TCP/IP layering. I have googled a bit and it says that the footer in data link layer pdu (frame) is needed as a mark of the end of the pdu.
But why does packet data etc in the layers above it doe... |
The principle (called a Löwenheim–Skolem theorem by Huth and Ryan) states
Let $\phi$ be a sentence of predicate logic such that for any natural
number $n \geq 1$, there is a model of $\phi$ with at least $n$
elements. Then $\phi$ has a model with infinitely many elements.
IMO, it basically states that if you can ... |
I'm trying to construct the small-step semantic rules involving the for-loops, but I can't find anything about it in the literature (only about while-loops).
I was wondering if anyone could help me out with this? This is a first attempt, where $s$ represents a statement and $e$ an expression:
$\quad \displaystyle\sigma... |
I'm trying to reduce the MAX-2SAT problem to finding a cut in a graph, with no luck so far.
Let me first show a description of the problem:
2SAT: Given a boolean formula $\varphi$ in a CNF form, where every clause has 2 literals (a variable or its negation), one should decide whether there is an assignment that will sa... |
We know that $BPP \subseteq BQP$ but we have no proof $BPP \subset BQP$
(Though we have the proof that BQP $!=$ BPP with an oracle)
Since Simon's problem (as factoring) it's easily solvable by a quantum computer, and in exponential time complexity solvable by a classical computer, that's a hint of the separation betwee... |
Let the following datatype be defined:
data T = A | B T | C T T
That is, B, B T, B (B T), C A A, C (B T) A and so on all are members of T. Now, suppose we define two functions that operate on that type:
f :: T -> T
f A = A
f (B x) = B (B (f x))
g :: T -> T
g A = A
g (B x) = B (B (B (g x)))
There are restrictions on... |
Let $C = m(P,X,Y) \leftarrow m(Q,X,Z), m(R,Z,Y)$.
Is it possible to do the following substitution?
$D = C\theta$ where $\theta = \{Q/R,R/Q\}$ s.t. $D = m(P,X,Y) \leftarrow m(R,X,Z),m(Q,Z,Y)$
|
So here is the challenge problem statement: https://icpcarchive.ecs.baylor.edu/index.php?option=com_onlinejudge&Itemid=8&page=show_problem&problem=1512
Basically, given a 0/1 matrix, you need to permute the columns so that the first column is fixed and after the permutation of columns, then for each row the 1's in the... |
In the Wagner Fischer algorithm to calculate the Levenshtein distance for two input strings, the first step is to compare each input string with the empty string for each input. Why is this step necessary? Is the purpose simply to keep the algorithm consistent when checking the strings for matches and mismatches to det... |
How would one search for a string of digits in a large digit sequence? For example, I'd like to search for 351814 in Euler's number. I'm not too keen on computer science, I'm a pure math major, so I don't really know how to begin. I also wouldn't know how to run said code.
Any help would be greatly appreciated.
|
I have been using C for a while, for some reasons I learnt C++.
I can't see why object oriented is a "new" feature. For me an object is just a structure, and a set of functions which have a pointer to this structure as a parameter(the this parameter). So instead of creating structures then functions that modify them, ... |
When simulating the clock page replacement algorithm, when a reference comes in which is already in memory, does the clock hand still increment?
Here is an example:
With 4 slots, using the clock page replacement algorithm
Reference list: 1 2 3 4 1 2 5 1 3 2 4 5
Initial list would look like this:
-> [1][1]
[2][1]
... |
I have pretty simple question, but still can't find an answer just googling it.
I'm trying to understand Chomsky Normal Form (CNF). There are three production rules:
$A \to BC$
$A \to \alpha$
$S \to \epsilon$
First two I understand. But last one $\epsilon$ doesn't makes sense for me. Why do we need this rule? What is... |
I have heard of machine learning systems that can learn from trials of data what effect it should have, but I was wondering is it possible to make a learning appliance that builds on past data? Instead of only receiving new entries, once the database is big enough to begin going over it and doing pseudo consideration, ... |
Is it necessary to take the same bit size of "p" and "q" in case of RSA algorithm? i had read that bitsize of p and q must be same. BUT after calculating, i found that bit size could be different also. But time complexity will increase. Can anyone help me?
|
I am trying to define a Odd Parity Function that takes three 1 bit inputs and will output a 1 if the 3 bits are odd as a Boolean function.
1 1 0 = 0
1 0 0 = 1
0 0 0 = 0
1 1 1 = 1
I understand this has a relationship to XOR as I can define this with 2 parameter as
X xor Y = (XY')+(X'Y)
My assumption is the function w... |
I recently discussed with a friend about a website that proposed regex challenges, mainly matching a group a of words with a special property. He was looking for a regex that matches strings like |||||||| where the number of | is prime. I immediatly told him that won't ever work because if such a language was regular, ... |
I have a VHDL elaboration engine/simulator. As I understand it, the language syntax allows for ambiguities at syntax level. That is, an assignment
pin_value <= bus(5)
can be interpreted as picking a child of the bus by index. Here the bus is a signal (an object). However, it can also be that paranthis are applied to a... |
Is it more plausible that $NP\subseteq TIME[O(n^{\log n})]$ than $NP\subseteq P$? I don't see this mentioned much and is there a reason why? If this question doesn't make sense, explain why.
|
Whilst reading up on Xorshift I came across the following (emphases added):
The following xorshift+ generator, instead, has 128 bits of state, a maximal period of 2^128 − 1 and passes BigCrush:
[snip code]
This generator is one of the fastest generator passing BigCrush; however, it is only 1-dimensionally equidistribu... |
To add onto the question, how are elliptical differential equations applicable in this context?
I was listening to a talk about Bayesian networks and someone asked if they were using differential elliptical equations in the context of linear relaxation.
|
Is there any class of NP problems that have one unique solution?
I'm asking that, because when I was studying cryptography I read about the knapsack and I found very interesting the idea.
|
I'm not sure if this is the appropriate forum for asking the following question. Please guide me to the right forum.
I am trying to understand the algorithms used by kernels(such as Integer Sort) in NAS parallel benchmarks. I could not find any source online that explained the algorithms used by the kernels. I could tr... |
If I have a set $A$ with positive and negative numbers, and a number to find C.
It is possible to reduce the problem to one with only positive numbers in set $A$?
I mean, it is possible to find a new set $A$ and a new number $C$, so $A$ were only positive numbers, but the same problem?
|
I have made and trained a simple neural network which now seems to produce outputs reasonable in all the aspects but one: it gives negative values from time to time even though the outputs are always either 0 or 1 (positive) in all my treaining samples (the actual neural outputs show to be more or less close to the an... |
I have a CS course at Uni. Had an exam about two last week with a question I did not get, but still, am not totally comfortable with the expected answer.
Basically, we were asked
Many processes can execute simultaneously on the Von Neuman
architecture
[True/False]
I wrote True. Got it wrong, lost some points.
But... |
I am looking for concrete and simple problems that may be solved using bipartite graphs or bipartite graph properties. Any idea along with explanations are welcome.
|
How many arithmetic operations are required to find a Moore–Penrose
pseudoinverse
matrix of a arbitrary field?
If the matrix is invertible and complex valued, then it's just the inverse. Finding the inverse takes $O(n^\omega)$ time, where $\omega$ is the matrix multiplication constant. It is Theorem 28.2 in Intro... |
As far as I know choosing an activation function for the input layer is relatively straightforward: I use Sigmoid if the input data domain is (0,1) and TANH if it is (-1,1).
But what activation functions to set for hidden and output layers? Is there any conventional logic for making thish choice reasonably? How do I kn... |
The following recurrence relation,
$$T(n)=16T(\frac{n}{4}) + n^2$$
has been given to me to be solved via the Master Theorem. I'm pretty sure this is a case 2 situation, since
$$\log_4{16} = 2$$ and
$$\log_n{n^2} = 2$$
Where $b = 4$, $a = 16$, and $c = 2$, such that $f(n) = n^c$
What I'm not sure about is the end run... |
Every time I solve these questions, I get stuck at the end where I need to find a closed form for the summation.
Here in this case, I have reached until this point:
$$
\begin{align}
T(n) &= T(n-2) + 1/\lg n \\
&= T(n-4)+ 1/\lg(n-2) + 1/\lg n \\
&= T(n-6) + 1/\lg(n-4) + 1/\lg(n-2) + 1/\lg n. \qquad (1)
\end{align}
$$
A... |
I'm following Jeff heatons book 'Introduction to Neural Networks with Java'.
To get node deltas, we need to calculate $f'(sum)$. In the very first row for Training Element #1, we need to compute $f'(1.13) \cdot 0.25$ which Heaton evaluates to $0.045$.
Using my calculator, I get $f'(1.13)=-0.13$ (derivative of sigmoid ... |
I have a doubt about the runtime of the Euclidean algorithm; the slide of my Professor says:
The calculation of $\mathrm{GCD} (a, b)$ stops at the most after $2\log_2 a$ iterations.
Since $\log_2 a$ is the size of the input,
calculation requires a linear number of iterations.
The algorithm therefore has polynomial ru... |
In the standard proof why Subset-Sum is (weakly) NP-complete, one reduces Vertex Cover to Subset-Sum by using suitable numbers with O(m+n) bits (where m is the number of edges and n the number of vertices). But how can we talk about a polynomial time reduction if we generate exponential-size numbers?
I guess that this ... |
I am having difficulty with the concept of $LK-\Phi$ proofs, here is a question I have been working on:
Let $\Phi = \{Pafa\}$, where $P$ is a binary predicate symbol and $f$ is a unary function symbol. Give an $LK-\Phi$ proof of $\exists y Pby$. You do not need to show exchanges and weakenings.
My intution for these ... |
Hello I am having difficulty with this question, I am not even sure what strategy one would go about proving something like this:
Suppose $L$ is a language which includes an infinite list $c_1,c_2,\cdots$ of constant symbols. Let $\Gamma$ be a set of sentences $\Gamma = \{c_i \neq c_j \mid i,j\in N, i < j\}$. Let A be... |
I just read "Boole's Algebra Isn't Boolean Algebra" by Theodore Halperin (behind a paywall here). I don't have a strong background in abstract algebra, so, frankly, the paper is a bit over my head but the gist of it is as follows: the algebra developed by Boole in the 19th century has some strange properties. Boole int... |
Has some sort of canonical - or reference - implementation of Dual-pivot Quicksort been posted anywhere?
I would like to include that algorithm in a comparison among sorting algorithms for a specialized need that I have, but the Java versions I've seen appear to have various kinds of tweaks applied to them, like using ... |
I came across this notation and I don't know the meaning of it, or if it's a typo: $\{$ some set $\}^{+}$
What does the + mean, i.e., the plus operator applied to a set?
|
How can we prove that:
$$
L = \{ w_1\#w_2 \mid w_1 \in w_2;\; |w_2| > |w_1|;\; w_1 , w_2 \in \{0, 1\}^*\}
$$
is not context-free?
The language defines $w_1$ as a sub-string of $w_2$, and they are separated by a $\#$. This is easy with the CFG pumping-lemma for a slightly different language with $|w_2| \ge |w_1|$ by us... |
I've been given the following question and I've been finding it hard to give a good answer:
Prove or disprove: given a max-heap with n distinct elements, using Extract-Max to extract n/2 of the elements takes Ω(nlogn) time.
Because the heap contains distinct elements, I'm lead to believe the claim is true: I've tried t... |
I have a set of nodes S where all the nodes of an arbitrary integer value. I Also have a set of pairs of nodes from S, indicating that those node cannot be in the same subset. Given a subset of S, how can I determine the largest possible Sum of that subset taking into account the exclusion pairs.
Example:
S = (x1:50,... |
The setting
An argument from a set of formulas $\Delta$ is a pair $\langle \Phi, \alpha \rangle$ such that
$\Phi \subseteq \Delta$
$\Phi \nvdash \bot$
$\Phi \vdash \alpha$ (this is what I am wondering about)
There is no $\Phi' \subset \Phi$ such that $\Phi' \vdash \alpha$.
I am trying to think of how this undercut wo... |
The algorithm that is used by gcc and llvm is that of Keith D. Cooper, Timothy J. Harvey, and Ken Kennedy (page 9). We start with the immediate dominators of each control-flow graph node B already calculated and stored in idom[B]:
for each B in all basic blocks
if size of Predecessors(B) >= 2
for each P in... |
The 1-D distinct closest pair of points problem is as follows: Given a set of n distinct integer points on real line, find a pair of points with the smallest distance between them, here the distance between two points p_i and p_j is absolute difference of their values, i.e, |p_i-p_j|.
A naive way to solve this problem... |
So both the 0/1 subset sum problem (find a subset of given numbers that add up to a target sum) and the subset sum problem with "multiplicities" (find non-negative integer coefficients for the set elements so that the linear combination of set elements equals a target sum) are NP-complete. Is there some fairly easy red... |
A Bloom filter makes it possible to efficiently keep track of whether various values have already been encountered during processing. When there are many data items then a Bloom filter can result in a significant memory saving over a hash table. The main feature of a Bloom filter, which it shares with a hash table, i... |
Consider a random $n$ dimensional vector $v$ where $v_i \in \{0,1\}$. For each $i$ we know $p_i = P(v_i = 1)$ and let us assume the $v_i$ are independent. Using these probabilities, is there an efficient way to iterate over all possible binary $n$ dimensional vectors in order from most likely to least likely (with ar... |
You have a Turing machine that only processes input on the form $0^*$. If it is given an input without 0's, it will simply halt without accepting or do anything else. Is it Turing Complete?
The set $0^*$ is countably infinite, since you can make the bijective function $f(x) : 0^* → \mathbb{N} $:
$f(x) = length(x)$
Wher... |
Given a set of $N$ $n \times n$ matrices $A_1,\ldots,A_N$, and two vectors $x,y$, the problem is to find a product of up to $K$ matrices $A = A_{j_1}A_{j_2}\cdots A_{j_k}$ so that $Ax$ is as close to $y$ as possible in terms of euclidean distance. The problem can be shown to be NP-hard e.g. by reduction from subset sum... |
From Wikipedia:
Operating systems schedule threads in one of two ways:
Preemptive multitasking is generally considered the superior approach, as it allows the operating system to determine when a
context switch should occur. The disadvantage of preemptive
multithreading is that the system may make a context switch... |
Is there a Context-free grammar for the following language:
$L=\{ x\#1^m|x \in \{0,1\}^* \text{ and the $m^{\text{th}}$ char in $x$ is 1} \}$
If so what is it? Because i couldn't find any. I also tried to prove there isn't (by the Pumping lemma for context-free languages), but it's given that a Context-free grammar doe... |
A problem is NP-complete if:
It is in NP.
All problems in NP can reduce to it.
It's number 2 that I'm concerned with here. I would be highly surprised if we knew every problem in NP. Based on that assumption, how do we know for sure that any problem is NP-complete? For example, how do we know that there's not some p... |
I am given the following command $C$:
$y:=1;$
while $\neg (x=1)$ do
$y:= y*x;$
$x:= x - 1$.
I have to show that $[\![ C ]\!]_s(s) = \{x \mapsto 1, y \mapsto s(x)!\}$ if $s(x) \geq 1$ and undefined otherwise. Where $[\![ C ]\!]_s(s) = s'$ if $\langle C, s \rangle \rightarrow^* s'$ and undefined otherwise.
The proof is b... |
Let $X$ be an $m\times n$ ($m$: number of records, and $n$: number of attributes) dataset. When the number of attributes $n$ is large and the dataset $X$ is noisy, classification gets more complicated and the classification accuracy decreases. One way to over come this problem is to use linear transformation, i.e., pe... |
While I was studying SAT problem and its different instances, in Algorithms for the Satisfiability (SAT) Problem: A Survey by J. Gu et. al PDF, I came up with this variant (not mentioned there, but I though of it) and searched, but could not find anything useful.
Consider this variant:
Suppose $f$ is a boolean functio... |
I was studying the proof of Ackermann function being recursive, but not primitive recursive, and a question hit me: "So what?". Why does it matter? What is the significance of primitive recursive functions?
|
The question is whether this is recursive or not. I first thought that it wasn't but then I read this question which seems similar and is recursive.
Is it decidable whether a TM reaches some position on the tape?
I think it's a slightly different question though (?) and so I have tried to show that it isn't recursive b... |
Let $G$ be a graph of diameter 2 ($\forall u,v\in V: d(u,v)\leq2$).
Can we decide if $G$ has Hamiltonian path in poly time? What about digraphs?
Perhaps some motivation is in place:
the question arises from Dirac's theorem which states that if $\forall v\in V:d(v)\geq \frac{n}{2}$ then the graph is Hamiltonian, as w... |
I recently came across with a question that asks for the greatest subset of a given set, which includes relatively prime elements.(Randomly selected item from a set is always relatively prime to all others.)
My approach was eliminating the subsets depending on if the subset satisfies the rule.
Which means testing one b... |
How would one write code to find and add the prime numbers between 4 and 5 million? I need a code that can find all such numbers, and then add them together. I'm not too keen on computer science, so I wouldn't know even where to begin. (I'm a math major).
Any help is appreciated. Also any advice on how to compile and r... |
I have no source for this, but I've heard people offhandedly mention problems that are NP Complete under polylog reductions (I think SAT was one of them).
This confuses me - it seems to me that this is a violation of the nondetermistic time hierarchy. If SAT (or whatever) can be solved in $NTIME(n^c)$ for some $c$, an... |
The exercise says
"Show that the grammar $G = \langle\{S\}, \{a, b\}, S, \{S \to \lambda, S \to aSb\}\rangle$
generates the language $L = \{a^i b^i \mid i = 0, 1, 2, \ldots\}$."
Now, I'm new to this subject although I'm familiar with the theory of Turing machines and automata. I'm teaching myself (not in a class, com... |
I am working on acyclic orientations of undirected graphs and have the following questions:
Given connected undirected simple graph $G$, how to find all possible acyclic orientations of $G$ ?
What is the number of acyclic orientations?
It is known (from here) to be $(-1)^p\ \chi(G,-\lambda)$ for a graph $G$ with $p... |
So when you are decrypting an encryption with modular arithmetic, I know the modulus operator (%) gives the remainder of a/b, but what if a is less than b?
For example, 5%2 is 1, since the answer is 2 remainder 1. But for something like 2%9, how do you find the answer?
|
You have a description of a language that you have to prove is regular, context free, or other. In order to prove that it does not belong to a certain class of languages, you might think that it will be more convenient to prove it by using a subset of that language. The problem is that a subset of a language does not n... |
I am going through some past exam paper questions on regular languages for some revision, and I am having a bit of trouble with converting general ideas into formal mathematical proofs.
The question is:
Given regular expression $S$, prove formally that $S^* = (S^*)^*$.
My problem is expressing this in a formal proof.... |
How would I go about making a Turing machine to accept the following language L?
$$L = \{ www \mid w = \{0,1\}^* \text{ and } w > 0\}$$
I was thinking counting the number of symbols in the input string and then dividing by three to find the beginning of each instance of w and then testing if each instance is the same, ... |
I can't understand what my professor wrote about these inclusions concerning deterministic classes:
$$
DTIME(f) \subseteq DSPACE(f) \subseteq \sum_{c\in\Bbb N}DTIME(2^{c(log+f)})
$$
I understood the first inclusion:
The Turing Machine needs to do at least one step in order to check the
next cell on tape
I didn't ... |
Why operator overloading was included in Python and not in Java?
How does one decide to include or exclude operator overloading in a programming language?
It is said here that operator overloading is excluded from Java
to make the language simpler
(for programmers, language and VM developers, etc.).
I don't understan... |
I get how to reduce 3-SAT to 3-COLOR, but I'm not sure how to do it the other way around. Does anyone have any hints or insight?
|
We have an n-ary tree used for searching that we'd like to keep balanced. It is currently mostly a B-tree without the balancing operations. The issue we have for implementing those is that each sub-tree has its own sorting criteria (chosen in a set of five, if that's important) and that the balancing algorithms we kno... |
Please consider the following Divide-And-Conquer Problem:
You’re consulting for a small computation-intensive investment
company, and they have the following type of problem that they want to
solve over and over. A typical instance of the problem is the
following. They’re doing a simulation in which they look at... |
I am trying to prove that the Acyclic Subgraph Problem (AS) is NP-hard by showing that the Independent Set Problem (IS) is polynomially reducible to AS.
AS is as follows: Given a directed graph G = (V, E) and an integer k, does G contain a subset V' of
k vertices such that the induced subgraph on V'is acyclic?
IS is a... |
Consider the hitting set problem with $n$ elements and $m$ sets. I gather from the linked page as well as this that
1) it is NP-hard to approximate the cost of the optimal solution to a multiplicative factor of $c \log n$ for some $c>0$.
2) it is NP-hard to approximate the cost of the optimal solution to a multiplica... |
Let's say you have the following sentence: "This is my first cs question posted here". How would I go about inserting the sentence into a search tree. Do I assign each word a number value and perform the insertions based on those?
|
Wolfram alpha is able to compute this sum:
$$ \sum_{j=1}^n \binom{j}{2} = \frac{1}{6}(n-1)n(n+1). $$
How can Wolfram alpha do it? What kind of algorithm does it use?
|
I was reading the Paxos notes from yale from the following link:
http://pine.cs.yale.edu/pinewiki/Paxos
Recall that Paxos is a distributed system algorithm with the goal that the processes participating in its protocol will reach consensus on one of the valid values.
I was trying to better understand the revoting mecha... |
I have a set of vertices $V$ and a set of segments $S$. I want to know whether a segment in the set $S$ is Delaunay against the vertices in $V$.
I would like to state my assumed definition of a Delaunay edge: An edge is Delaunay, iff there exists a circumsphere of its endpoints not containing any other vertex inside it... |
I've been playing around with a simple probabilistic data structure which is very similar to a Bloom filter. Where a Bloom filter would use $k$ independent hash functions to choose $k$ of the $m$ bits to set, this structure uses $m$ hash functions, and sets each bit with probability $p$.
This structure doesn't produce ... |
I just completed a detailed theoretical mathematical study about the PageRank algorithm, I want to make a sample implementation to make some tests and play with it, supposing that I have a local set/folder full of a several webpages, representing a mini Web, I want to make a small software where I can make searches by ... |
While going through probabilistic/average analysis of an algorithm, I found written somewhere that average cost and expected cost are same. Can anyone please tell me what does exactly expected cost stands for.I think we take care of likelihood of an event while finding expected cost unlike average cost.
|
I know after some reading Amdahl law is a embarrassingly parallel programming model. Embarrassingly parallel means there is no communication and tasks work independently. Am I to assume a parallel and a non parallel aspect of the program is embarrassingly parallel? If not, what makes it embarrassingly parallel?
|
I have a problem that I would like to solve it. A robot have to move near an obstacle (e.g a wall) without colliding. He should also try to be always near the obstacle.
The following picture can help you to understand what I need to do:
In red is the wall
Black dots is the robot moving
The dashed line is the path of ... |
I need help with this exercise.
Indicate the regular expression for the following Languages. Explain your expression in one sentence and indicate the basis form of the alphabet. Indicate also every assumption you make.
i) Sums of positive fixed-point decimal numbers. The following Strings should exist in the Language... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.