instruction stringlengths 35 29.1k |
|---|
I was investigating why computers use binary instead of ternary and, from what I understand, found it's for precision. We want to avoid getting the wrong answer when computing math, and if we were to look at a bit at the wrong time in, for example, a base-10 system we might accidentally catch it switching states and ac... |
In other words, what algorithms have been demonstrated to have the fastest big O notation time/asymptotic complexity for, assuming two real numbers $x$ and $y$:
$x + y$
$x \times y$
$\frac xy$
$x-y$
$x^y$
|
Below, we have given you four different sequences of addresses generated by a program
running on a processor with a data cache. Cache hit ratio for each sequence is also shown
below.
\begin{array}{|c|c|c|}
\hline
Sequence No. & Address Sequence & Hit Ratio \\ \hline
1& 0, 2, 4, 8, 16, 32, 64, 128 &0.50\\ \hline
... |
Is $\overline{\text{BPP}}$ different from $\text{co-BPP}$? I am having trouble understanding the "co" part of these complexities.
I think yes and here is what I think: It seems given that $\text{BPP}$ is the class of languages decided by PTMs with error probability 1/3, then this is equal to $\text{co-BPP}$. But $\over... |
While reading a paper Nominal Unification from a Higher-Order Perspective, in the abstract I noticed something feel bit confusing,
Nominal Logic is an extension of first-order logic with equality,
name-binding, name-swapping, and freshness of names. Contrarily to
higher-order logic, bound variables are treated... |
The formal descriptions of ropes I’ve found use very small numbers like 4 or 8 characters per leaf node as the maximum size. Some also mention that this (obviously) is not a very efficient rope size for use in real life, but makes it easier to see the tree in a demonstrative diagram.
The trade-off is between speed of m... |
We have n deck of cards. To shuffle i-th deck we need a(i) seconds. Our task is to give a greedy algorithm, which will merge two decks until we have one deck.
My idea is to create a priority queue. At top of the queue we have a minimum value of a(i). And then shuffle Q.top() with the next Q.top() while Q.size() > 1.
Co... |
Cause applying H (hadamard gate) on a state |0> will evolve to 50% |0> and 50% |1>, assuming we are meausring along the vertical axis (Z-axis).
While applying a measurement along a horizontal axis (e.g. X-axis), will force the state to "evolve" (destroied) and let it be perpendicular to the vertical axis. In another w... |
In the his paper A simple and fast incremental randomized algorithm for computing trapezoidal decompositions and for triangulating polygons (Computational Geometry: Theory and Applications, 1:51–64, 1991), Siedel discusses following algorithm for finding out trapezoidation and query structure cost.
Generate a random o... |
One of the requirements for a coherent memory system is write serialization - "two writes to address X by any two processors are observed in the same order by all processors". I am not sure how this condition would be met when the CPU cores have a store buffer into which stores are retired before updating the memory hi... |
I am having trouble wrapping my head around the Stacking Boxes dynamic programming problem, and understanding how it has optimal substructure and overlapping subproblems. If it has the optimal substructure and overlapping subproblems, then I can use dynamic programming to solve the problem. How do I know that the stac... |
My thoughts process: let number of elements in heap be $n$, total height of binary heap be $H$, height of node be $h$, and let number of nodes with height $h$ be $x$.
Then number of nodes with height $H-1 \le 2^1, H-2 \le 2^2, ... => x \le 2^{H-h} = 2^{\lfloor \lg n \rfloor - h} = \frac{2^{\lfloor \lg n \rfloor }}{2^h}... |
I have a homework problem that is perplexing me because the math is beyond what I have done, although we were told that it was unnecessary to solve this mathematically. Just provide a close upper bound and justify it.
Let
$$f(n) = |\{w ∈ \{a, b\}^n : aa \notin w \}|. $$
Provide an asymptotic upper bound on $f$ as... |
Let $A$, $B$, $C$ be Turing-recognizable languages over an alphabet $\Sigma$. Assume that
$A\cup B\cup C = \Sigma^*$, and
$A\cap B = A\cap C = B\cap C = \emptyset$.
Prove that $A$ is Turing-decidable.
So far I've tried the following but it really hasn't gotten me anywhere.
Suppose $A$ is recognizable but not decida... |
i am trying to formulate an algorithm for syntax checking for simple boolean expression like (var1 = 10) or (var2 > 100).
evaluation part seems to be easy as i will convert infix to postfix and evaluate postfix without 'paren()'.
i am not fully sure which method should i be using.
can any one point me to a book with a... |
Random Forests is a bagged ensemble of CART learners. The following is what I've found, but am not sure if I'm completely right.
CART (Classification and Regression Trees) uses the Gini index for splitting (whereas Shannon's Entropy function is used in ID3). From what I know, it's asymptotic complexity can be represent... |
Is there an efficient algorithm which computes the (possibly approximately) shortest $n$-edge path between two points $A$ and $B$ in a weighted complete graph? Dijkstra won't work because it will just give the trivial answer of $A\to B$. I'd like to find an $n$-edge path (e.g. for $n=4$, find $C$, $D$ and $E$ which min... |
I'm trying to generate random numbers that would be distributed according to a sample curve that I provide in the shape of vertices.
I came up with this:
function curve_map(curve) {
// convert to sorted points
var points = [];
for (var x in curve) { var y = Number(curve[x]);
points.push( {'x' : N... |
what is an easy but efficient way to evaluate Boolean Expression. I have been searching a lot in google but not really finding a good book or site which has working algorithm.
Input string (A=100) and B > 4)
Expected output to be either True or false.
regards
Deb
|
My question is fairly simple, however I am not entirely sure if my solution is correct.
In this case we are using direct mapping. I know the value of byte-addressable memory and I know the block size and the number of cache lines. I need to find the cache size.
I've calculated the length of the memory address. Cache ha... |
I ask patience to help me to have clarity because I tend to equivocate between formal rappresentation like
like operator is a token
bit
it is determined which operation is to be performed and how to get the operands, according to a function whose domain consists...
and what is physically-electronic-logic rappresenta... |
I am stuck on a problem involving PDA's and CFG's. The problem is as stated:
Give a CFG and a PDA for the language of regular expressions over the
alphabet $\{a, b, c\}$. Give the formal tuple definition of each. You may use the
shorthand for pushing a string in the state diagram of your PDA, but not in the
tu... |
I've read two interesting research papers on face recognition and I'd like to understand the relation between them.
"Learning to Disentangle Factors of Variation with Manifold Interaction" by Reed et al.
"Tensor Analyzers" by Tang et al.
In Reed et al. they say "Our approach is complementary [...], and is also capabl... |
Lets say I have a random number generator that spits out uniform numbers from 0 to 1
Next, I have a shape defined by a series of vertices, like { [0, 0.4], [0.5, 0.2], [1, 0.4] }
In those vertices, the first value determines the position and second the distribution weight in that point (interpolated in between).
Now I... |
I know the fact that you cannot run the same machine code on two different machines,
so the software must be machine dependent (i.e Arm program cannot run on either powerpc or x86).
but in reality the software is OS dependent (i.e linux programs cannot run on windows or mac).
how does this happen? my best guess for now... |
Given a multiset $X=\{x_1,\dots,x_n\}$ where every element $w_i$ is a power of two, and given an integer $M$, I'd like to determine if there is any subset of $X$ that sums to $M$.
(This question is based on a previous question about the subset problem where every number in the set is a multiple of two, but this time $X... |
I am reading Algorithm's Design Manual by S.Skiena and I have a hard time understanding and proving the correctness of algorithms. I should use proof by induction and when we talk about summations and proving their formulas I can do it, I have no problem understanding why it is correct. When I get a loop on the other h... |
I am using a sensing board able to detect magnetic signals between the board and a display.
I have a set of objects that are represented (each of them) by a unique set of points (magnets) with a particular shape. For example: object #1 is made by three points that form an equilateral triangle with side length 1cm; obje... |
I'm a freshman in Computer Science and I'm studying bioinformatics sequence alignment algorithms.
My understanding of a greedy algorithm is one that takes the best decision for a particular instance in order to find a general best decision. By that definition, would the basic dynamic programming pairwise alignment algo... |
I recently saw this question somewhere and thought a lot on it but was unable to find an efficient solution for it.
Asked on Stack Overflow but got no solution there.
The Problem is as follows -
Given a tree with $X$ number of nodes we need to assign values to each node.
You are also given two arrays A[] and B[] each... |
I was reading the symbolic model checking, So there it has mentioned that we can represent the set of states and transition relations of any transition system with the help of ROBDDs.
I was trying to understand how the below would have executed step by step.
$$
\exists_{f({v'})}[\,\underbrace{f({v'})}_\text{ROBDD of... |
I'm studying program verification and came across the following triple:
$$ \{\top\} \;P \; \{y=(x+1)\} $$
What's the meaning of the $\top$ symbol on the precondition? Does it mean $P$ can take any input?
|
The input is: Given a matrix $\mathbf{A}=\left[a_{ij}\right]$ of nonnegative integers for all $i\in\{1,\ldots, m\}$ and $j\in\{1,\ldots, n\}$ (where $n<m$). Nonnegative integers $V_j$ for all $j\in\{1,\ldots,n\}$.
The question is: Find $n$ disjoint sets $S_j$ of $\{1,\ldots,m\}$ such that
$$\bigcup\limits_{j=1}^{n} S... |
I think that these two classes should be the same, but I can't find any literature about this and have a limited background on the topic.
This is my reasoning, and I would like to know if (1) this is already known or (2) I misunderstood something or (3) I just found out something useful:
$P_{CTC}$ is the class of probl... |
Hey guys sorry I'm new to cs and I'm trying to find the running time of algorithms... could you tell me about the algo given how much time is needed in terms of complexity? The actual algo I created is the same as below but the sum must be more or equal to 2^(n-2).Thank you]1
|
I am trying to learn CS fundamentals and I am confused by static vs dynamic allocated arrays. My only programming experience is JavaScript and all online resources I am using refer to C language.
A dynamic allocated array is made when the application starts and it cannot be resized. So how is this different from stat... |
As my title points out, I don't understand how do you show that, in general, the diameter of a MST (minimal spanning tree) can be bigger than the diameter of G, by the factor $\Omega(n)$. $(n:= |V|, G =(V,E)) $.
And I don't understand, how big is $\Omega(n)$ and why $\Omega$?
I made a example where the distance of two ... |
I am doing some research where I have a List containing numbers. For example
{5,10,98,22,13,15}
What is a fast algorithm to calculate all possible sums and differences from these? Eventually I will want to do the same thing for a list of 400+ numbers.
Some examples in the final set
index0+index1=5+10=15
index0+index3+... |
In Chris Okasaki's paper "Flattening Combinators: Surviving Without Parentheses" he shows that two combinators are both sufficient and necessary as a basis to encode Turing-complete expressions without the need for an application operator or parentheses.
Compared to John Trump's encodings of combinatory logic in "Binar... |
This question is about a common optimization in the basic sieve of Erathostenes.
If we look at this paper (page 3, footnotes), the author says:
If we start crossing off at $p^2$ rather than $p$, the number of composites
we cross off is $\frac{n}{p}−p+1$, but it makes no significant difference to our
sum, because ... |
I am learning from this video: https://www.youtube.com/watch?v=eHZifpgyH_4
at 21:17 he talks about his definition of NP-Hard.
The definition is: X is NP-Hard if every problem y which belongs to NP reduces to X.
I watched that part of the video several times but don't understand it. In particular, here's one thing I ... |
Is it possible to use Mizar Mathematical Library for the specification of algorithms at the same detalization level as the implementation of the algorithm in industrial programming language? Mizar should be able to describe constructive proofs in maths and therefore I guess Mizar should be able to specify algorithms as... |
Given $n$ time slots that $k$ people want to buy. Person $i$ has a value $h(i,j)\geq 0$ for each time slot $j$. Each person can only buy one consecutive block of time slots, which could be empty.
Is there a polynomial-time algorithm to compute the maximum value the seller can achieve?
Without the consecutiveness con... |
I am currently watching a lecture on Bloom filters, and the professor is doing a heuristic analysis of Bloom filters.
It's all based on the following assumption:
All $h_{i}(x)$'s are uniformly random and independent (across different $i$'s and $x$'s)
Setup:
Bloom filter of length $n$ bits.
Data set $S$ is inserted i... |
How to prove that standard Turing machine is equivalent to a variant model where a string is accepted if the machine enters an accept state during computation? However, the machine may leave the accept state, and this action does not change the acceptance outcome.
|
The internet is full of algorithms to calculate the modulo operation of large numbers that have the form $a^e \bmod p$. How about numbers with unknown factorization. More precisely, let's say I have a 4-byte sized modulus prime $p$, and a large number $a$ stored in memory as an array of bytes, that is, $a = [a_{k-1}, a... |
I wonder how to tackle such problem, to be more specific:
Given a set and an integer $k$, find the $n$th lexicographically smallest permutation (with repetitions allowed) of the set. We will say that the permutation is valid if its length is up to $k$ (inclusive).
Here's an example: $S$ = {a, b, c}, $k$ = 4, $n$ = 15... |
The input: Given a set $U=\{1, \ldots, k\}$ called the universe. Let $C=\{S_1, \ldots, S_n\}$ be a collection of subsets of $U$ and let $ s_j$ be a nonnegative integer for all $j=1,\ldots,n$ such that $\sum_{j=1}^{n} s_j=k$.
The question: Are there $n$ subsets $A_j$ of $S_j$ (i.e., $A_j\subset S_j$) such that
$$
\quad... |
$\small\textit{''The obvious things are the most difficult to understand''}$
May be the question does not make sense, but let me ask it anyway.
The Hoare assignment axiom is
$$
\dfrac{}{\{Q[v \mapsto expr]\} \;\; v:=expr \;\; \{Q\}}
$$
Is there an intuitive explanation of the axiom?
I "agree" with the Floyd assignment... |
I am able to solve $0^{k}10^{k}10^{j}$ where $ k < j$. and I was able to see that this is also a concatenation of two strings. How to do it for $0^{2k}10^{2k}10^{k}$ for $k \ge 0$?
|
I have a dynamic closest-pair problem. In my problem though, the points never move, but instead disappear and reappear.
That is, I would like to find for a point $p$ (where $p\in\mathbb{R}^3$)* in a set of points $P$, the closest point in $S$ where $S\subset P$. The catch its, while $S\subset P$, which elements of $P$ ... |
Lately, I asked this question to find the maximal set of elements $S$ of a given array $T$ such that every element of $S$ is greater than or equal to the cardinality of $S$.
My question is now different. How to find all maximal sets $S_i$ of a given array $T$ such that every element of $S_i$ is greater than or equal t... |
Prove that $L = \{wu, wu \in \{a,b\}^* \ \land |w| = |u| \}$ is not regular.
I'm trying to approach this problem with the pumping lemma.
So I know I have to pick a string s, which can be split into xyz components in terms of the pumping length, p.
But I cannot seem to find an s.
For example using $ s = a^p b^p$ or $s ... |
Given a linear program, is there any library or available code to enumerate all the corner points of a polytope ?.
PS: Simplex method finds one corner point depending on the objective, but I need to enumerate all the corner points.
Thanks in advance!
|
Let's say that an algorithm uses several nested loops to accomplish it's task, for instance :
An algorithm treating voxels on several frames, so there would be
four dimensions : t (for time), x, y and z.
An algorithm evaluating a
function that takes n entries, searching for which entries there is a
certain result. For... |
I need to show that deciding whether a graph G has at most 2017 strongly connected components in in NL.
After searching, i found a previous answer:
Checking whether a digraph on $n$ vertices contains exactly $10\sqrt{n}$ strongly connected components in NL
The answer there by yuval filmus was given for verifying an exa... |
The linear bounded automata (LBA) is defined as follows:
A linear bounded automata is a nondeterministic Turing machine $M=(Q,\Sigma,\Gamma,\delta,q_0,\square,F)$ (as in the definition of TM) with the restriction that $\Sigma$ must contain two symbols $[$ and $]$, such that $\delta(q_i,[)$ can contain only elements of... |
I want to automatically track heads in CCTV records.
Sometimes I need to re-identify heads because of multiple heads crossing each other. So I continually need to extract features from tracked heads so that I will be able to re-identify them when needed.
Those tracked heads are seen from any angle.
What would be the... |
I'm reading the book Parsing Techniques by Dick Grune et al. and in section 3.1.3 "Linearization of the Parse Tree" they introduce the notion of linearization:
[...] a parser can produce a list of rule numbers instead, which means that it linearizes the parse tree. There are three main ways to linearize a tree, prefix... |
If i wanted to write a piece of software that simulated a warehouse where typical warehouse procedures occur eg
loading of trucks onto conveyors
goods being transported around a warehouse by machines
goods being packed by operatives
goods being picked by operatives
... etc
should this be modelled / is this known a... |
I need to know the complexity of the following algorithm:
Draw elements from a set of size $m$, one by one, randomly, with replacement, until coming across $n$ different elements from the set ($n\le m$). We do not care what are the numbers drawn, and halt once $n$ different numbers were seen during this process.
This i... |
I am new to this algorithm and graphs. Just started learning. Could someone help me which algorithm is best suited to find the spanning tree of a Directed Acyclic Graph with less forward edges?
|
I'm into designing a recommender system for movie database and for effective optimization.I suggested the idea of using particle swamp optimization ,but my professors need recent algorithms,can any one suggest recent nature inspired algorithms for optimization.(After Cuckoo Search Optimization).
|
I have some doubts all related to the same basic concept of how a computer works.
1) I always thought that the address bus width defines ultimately how many memory locations the CPU can access (point to), therefore the memory range (i.e. in a 32-bit wide address bus, the CPU can access up to 2^32 memory locations, whic... |
Okay I am trying to understand why asynchronous systems are better that synchronous systems in terms of throughput.
Relating to the calculation done in this answer. Can someone tell if my reasoning is correct ?
Lets say I have a system that has 1000 live connections and each connection takes 5 packets to complete and a... |
It isn't very hard to decide if word belongs to language L. CYK algorithm should do here.
Occured thought, can CYK be modified to detect if all words of language L contain some specific subword?
|
Have such exercise:
Let $L_1=\{a^{2n}b^n|n\geq1\}^*$
and $L_2=\{b^na^n|n\geq 1\}^*b$
Prove, that $L_1, L_2$ are context free, while quotient $L_1/L_2$ is not context-free.
(This is home exercise, which I am not sure what to make of it. 3rd one)
Anyway, proving $L_1, L_2$ are CFL is trivial.
For $L_1$:
S->aaSb|$\epsil... |
From what I understand, to implement RAID 5, one would need a minimum of 3 disks, where 2 would be for data storage, and the third would be for the parity. But what is the maximum number of disks one can have?
For example, let's say each disk is 1GB, but I have 5GB of data, would I be able to make a RAID 5 with 6 disks... |
I met this problem when dealing with a social network problem. It is a subproblem of that. The problem is like that:
We look at a graph $G(V,E)$, where $V$ is the set of vertices and $E$ set of edges. We define $x \in V$ as an 'important' vertex if at least $\frac 1 3 deg(x)$ ($deg(x)$ refers to the degree of $x$)of th... |
Ok, this is a follow up question to this, about the Erathostenes Sieve.
If we look at this paper (page 3, footnotes), the author says:
If we start crossing off at $p^2$ rather than $p$, the number of
composites we cross off is $\frac{n}{p}−p+1$, but it makes no significant
difference to our sum, because it only su... |
Prove that every undirected connected graph with $|V| > 2$ has at least two vertices such that if one or both are removed (along with their incident edges) the resulting graph is still connected. Describe an efficient algorithm to find two such vertices.
How would I go about solving this?
|
How many matrices satisfy the following constraints?
$n$ rows
$n$ columns
Cell values are either $0$ or $1$
Sum of any row is at most $m$
sum of any column is at most $m$
Is there a formula or an efficient algorithm to solve this problem?
|
This question has recently occurred to me as I was working on an implementation of the (Bounded) Post's Correspondence Problem. Basically, which method is generally best for PCP? Breadth-first or depth-first search? Or is this question, well, undecidable?
I understand the basic difference between the two approaches, bu... |
I've been given some homework on dynamic programming and I'm having trouble to find the suboptimal recurrence. Let me copy the statement:
In a given motorcycle training circuit, the number of riders is becoming increasingly large. As such, a new set of stricter rules is being enforced.
Lap times last exactly a minute... |
I have two cameras side by side. I'd like to register two images taken from each camera. I think global transformation will not work for this issue since changes of distances between two images for the closer objects are significantly higher. What should I do in this case? I tried to read some papers but I am not sure ... |
In Cormen et al.'s Introduction to algorithms, section 15.3 Elements of dynamic programming explains memoization as follow:
A memoized recursive algorithm maintains an entry in a table for the solution to each subproblem. Each table entry initially contains a special value to indicate that the entry has yet to be fill... |
I've heard that the functions that are definable in simply-typed $\lambda$-calculus is the class of extended polynomials.
However, it is still not clear to me what exactly is extended polynomials. Could someone explain that to me? Some pointers would be good as well.
Thanks.
|
I fail to understand the proof of the Emptiness Problem
$E_{TM} = \{\langle M \rangle | M $ is a TM and $L(M) = \emptyset\}$
1) Use the description of $M$ and $w$ to construct $M_1$, which on Input $x$ behaves as follows:
If $x \neq w$, reject
If $x = w$, run $M$ on input $w$ and accept if $M$ does
2) Run $R$ on in... |
All I have in hand is a adjacency matrix of a digraph with equal weight on every edge, is there a very simple way to convert this to a state change probability matrix?
|
I have implemented a 3d Tic Tac Toe game with AI, where the computer is unbeatable.
The only thing is that the board looks like this:
_ _ _
_ _
_ _ _
rather than this:
_ _ _
_ _ _
_ _ _
There are a total of 3 boards stacked on top of each other, and any lines of 3 x's or o's grant a point. When the board is full, al... |
In Axioms and Hulls, Knuth defines the notion of a CC system, which is a generalization of Euclidean points in general position. While all such arrangements of points in the plane give a CC system, not all CC systems give an arrangement of points, i.e. are not realizable. Is there a polynomial-time procedure to determi... |
I'm trying to understand how external sorting works from the book "Data Structures and Algorithm Analysis" by Mark Allen Weiss.
The author illustrates an example where he tries to sort 81,94,11,96,12,35,17,99,28,58,41 with a memory which can hold upto M=3 numbers. He uses two input tapes Ta1,Ta2 and two output tapes T... |
Domain theory gives an amazing theory of computability in the presence of simple types. But when parametric polymorphism is added there doesn't seem to be a nice theory that explains whats going on quite as nicely as domain theory explains computation over simple types. Certainly I wouldn't expect such a thing to exist... |
In the previous two years of the GATE exams, a question has been asked for finding number of flip flop's for counting sequence $0−1−0−2−0−3$ in 2016 and $0−0−1−1−2−2−3−3−0−0$ in 2015. But still, the approach discussed in these questions hasn't arrived at Common answer (or) solution.
For $0−1−0−2−0−3$, there are $6$ dif... |
I'm currently reading an analysis hashing with chaining, and it goes over two examples:
In the first, the search is unsuccessful; no element in the table has
key k. In the second, the search successfully finds an element with
key k.
(This is all under the assumption of simple uniform hashing). I understood the an... |
I know that when an NL Turing machine is allowed to go back and forth freely, the resulting class of problems solvable on it is NP.
But limit of two passes over the witness tape, does not seem to add much power to the NL machine, if at all.
I am stuck on this problem. What is the resulting complexity class? Is it stil... |
Hi fellow computer scientists,
I just began my journey to the world of ML and NLP so please bear with me. I'm hoping to find some guidance here. I would be very grateful if anyone could point me in the right direction (reading materials, lectures, specific algorithms, tools, etc.) for solving the following list of prob... |
I'm trying to develop an algorithm to find a convex hull of a star shaped polygon in $O(n)$ time. The specific problem, which is also described here, is as follows:
A polygon $P$ is star-shaped if there exists a point $p$ in the interior of $P$ that is in the shadow of every point on the boundary of $P$. The set of al... |
I having some trouble tackling an assignment. We're asked to prove that there exists a recursive language that's not decidable by a Turing machine in $O(n)$ time for inputs of length $n$. We're supposed to do so using diagonalization.
Here's what I have so far:
Assume that for each recursive language $L$, there exists ... |
I need to calculate the difference between two dates in hours and in minutes which is what the code below does.
The only issue I have is that the dates and the location (timezone) has to be input by the user. How do I achieve that? Can be a different language from PHP as I only need a flowchart and the pseudocode.
?p... |
How efficiently can I build a binary tree satisfying the heap property from an array and such that the inorder traversal of the tree is the original array?
For example, if I have:
2 1 5 6 2 3
I want to build:
1
/ \
2 2
/ \
5 3
\
6
Because it has the heap property and its inorder is the original ar... |
I am trying to use the computation histories argument to fit this. But I am unable to find this as yet.
|
With an adder circuit where A+B=C, I am trying to have a method to determine when C will be valid based on a change in A or B. I know that it is possible to just determine the longest the circuit would take, but is it possible to determine if the result (C) is equal to A+B. This would speed up the result of the opera... |
Here is the problem:
There are connected graph with nodes representing a number of people. Each node/person has an opinion on a topic e.g. trump vs clinton, paper books vs kindle, etc
The goal is make every node in a graph share the same opinion, by selecting a specific subset of nodes, in a particular sequence.
If maj... |
I am trying to use a simple perceptron to recognize if there is a square or a circle on an image. The images I generated are 300x300 px and I am having issues training the network since the images are large and I seem to run out of memory after a few images.
What would be the correct approach for this?
|
On page 7/8, section 1.2, of Practical Foundations of Programming Languages, 2nd edition, Robert Harper gives this initial definition of abstract binding trees:
The smallest family of sets closed under the conditions
If $x \in \mathcal{X}_s$, then $x \in \mathcal{B}[\mathcal{X}]_s$
For each operator $o$ of arity $(\ve... |
I have a doubt understanding How a 3-Dimensional array is stored in column Major Order. An array in Row Major order is stored like [plane][row][column] So, for finding address of any element we cross planes first, rows next and then some elements in that column.
But How is a 3-Dimensional array stored in Column Major O... |
It seems that I've found a generic way to convert any recursive procedure to tail-recursion:
Define a helper sub-procedure with an extra "result" parameter.
Apply what would be applied to the procedure's return value to that parameter.
Call this helper procedure to get started. The initial value for the "result" param... |
I am trying to find a network, where Dinic's algorithm makes $|V|^2*|E|$ steps. Clearly it cannot be a network with $3$ or less vertices, but I am not able to come up with a working example for quite a while now.
Any idea?
|
I'm trying to write the relational algebra for a problem related to this schema:
I want to do the following: For each flight list the departure airport code for the first leg of the flight and the arrival airport code for the third leg.
I know how to do this for the individual parts, but I'm not sure how to select fro... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.