instruction stringlengths 35 29.1k |
|---|
I have an algorithm that takes a 3d triangle PMN(which is constructed from running a function that converts per-vertex UV coordinates to a PMN triangle) and P' which is a randomly chosen 3D point that is outside the plane of PMN and constructs two new 3D points (M', N') where the new points correspond to the same(with ... |
Let the Grammar be G = ({S}, Σ, P, S), where Σ = {⟨,⟩,[,]} and
P: S → ⟨S⟩, [S], SS, ε
[⟨ → ⟨[
Can I still use the CYK-Algorithm and if yes then how would I do it for a word like ⟨[]⟩ ?
|
If string concatenation $ab$ is like left- and right-multiplication, is there any infix (latex) operator notation I can use for checking for contiguous substrings, like $bc \subseteq abcd$? $\subseteq$ doesn't seem right because it's usually about unordered sets.
|
Conflict Clusters – Another P=NP Proof
Exactly 1 in 3 SAT ($X3SAT$) is a variation of the Boolean Satisfiability problem. Given an instance of clauses where each clause has three literals, is there a set of literals such that each clause contains exactly one literal from the set. $X3SAT$ is NP-Complete even when the in... |
I know this is a general question, so you can address this by giving some examples that are specific to your field.
I want to start learning algorithm design and consequently prove its convergence. Most of the algorithms I am interested in will be for use in machine learning and its applications. Where do I begin? I am... |
I was wondering how small we could make the instruction set of a typical machine that supports a single datatype: arbitrary integers. If you need a heap, you declare an integer variable $h$ where you can individually (hopefully) address bits.
So was wondering, in addition to $+, -, \cdot$ (no $\%$) what else is needed... |
I have a language that would require an infinite pumping length, I know the language is not context-free, but is this sufficient prove ?
|
The given proof for proving that no DPDA can be constructed to accept palindromes is unclear. There exists another similar question but it only explains the proof partially.
I understood how it aims to find two strings r and s (r!=s) for which rz,and sz with a common suffix z will be processed in the exact same way by ... |
Problem:- I have moving points in a 2d space with a fixed obstacle(A polygon) and a fixed destination. I want to find at what time Source(which is moving) can get a path to destination and what is that path?
totalV = all points including source, moving points ,fixed destination point, obstacle points.
ObsE= {Edges of ... |
I know that the height of a $d$-ary heap on $n$ nodes is $\lceil (\log_d (n(d-1) + 1) - 1)\rceil$, but I was wondering how to justify that that's $\Theta(\log_d n)$?
I know the definition of $\Theta, O, \Omega$ if only one variable is involved. In particular, what is the formal definition of a function $h(n,d)$ being i... |
In the following video, he mentions that x <- <SELF> (x obtaining a description of itself) is a "legal" operation for a Turing Machine to make. https://youtu.be/5yO_l2w0wIA?t=93
My question is, what is the description length of x with and without that 'line' of code? Does obtaining the description of x double the lengt... |
Given a vector of points (on the 2D plane), what is the fastest algorithm to find all pairs of points at a distance of 1?
Of course, I could use the $O(N^2)$ algorithm to check all pairs of points. However, I recently found out that there are at most $O(N^{4/3})$ points which satisfy the property, so I am wondering if ... |
What is the correct asymptotic lower bound for $f(n) = 3n^2 + 2n$?
I was thinking that the lower bound would simply be $\omega(n) = cn^2 + n$, for the constant $c = 3$ and integer $n \ge 1$. Indeed, $3n^2 + 2n \ge 3n^2 + n$ is the tightest lower bound I can come up with.
However, would this be the correct answer instea... |
Given a hypergraph $H = (V, E)$, call $H' = (V, E')$ a refinement of $H$ iff there exists a partition $p : E' \to I$ (where $I$ is an arbitrary index set) such that $E = \{\bigcup_{x \in p^{-1}(i)} x \mid i \in I\}$. Essentially this means that there's some way to partition the hyperedges in $E'$ such that merging toge... |
I am trying to create an optimisation process for a variant of the travelling salesman problem which is combined with a knapsack problem in the following way:
Let there be a set of points $P$ on a two-dimensional grid, each point $p$ has a specified weight $w(p)$ and value $v(p)$. A traveller leaves his home village ca... |
I am interested in designing number theory experiments and interested in knowing current capabilities of supercomputers to handle extremely large numbers. I'm interested in learning the size of the numbers (i.e. the largest possible) that their variables can hold. (Not things like what is the largest prime number so fa... |
Background
The task I have at hand is to write an event scheduler. From what I understood, it is basically a priority queue which needs to support concurrent insertions and single threaded delete operation of a key with highest value (in my case it is scheduled time). The worker thread will wait on a condition variable... |
I have seen an lot of proves why SET PACKING is NP complete. However, in every prove it states that SET PACKING is clearly in NP. It might be a stupid question, but is not so clear to me. I see that the procedure contains of 2 parts:
Choosing a subset of size k from a collection of sets
Check whether the chosen subset... |
I have atleast a terabyte of text data which I need to compress as efficiently as possible.
It is file of english words and numbers (Not randomly arranged but forming meaningful syntax just as regular grammatical sentences). I got to know about CMIX compressor and its benchmarks (not too much understandable to me) and ... |
I've just been doing some pondering, and given the fact that computers already operate on fundamentally continuous physical quantities, and then we have to use transistors to turn those real quantities into effectively discrete numbers, why don't any computer architectures just skip the intermediary and do away with fl... |
Ideally, these would be the points that form the smallest (nondegenerate or degenerate) triangle. However, I can admit a large amount of approximation to get it to a lower order of complexity.
I can do some preprocessing on the given set of $N$ points. Up to around $O(N\log N)$ would be acceptable.
I want to repeat the... |
In our Computability & Complexity course, we wanted to show that $ALL_{TM}\notin RE$. To do that, we have seen the following claim (I'm summarizing it):
Denote the languages:
$ALL_{TM}=\{(M)|L(M)=\Sigma^*\}$ and $A_{TM}=\{(M,\,w)|w\in L(M)\}$.
The problem is that we want to simulate $M$ on $w$, but we can actually wan... |
I found most union find problem try to traverse through the parent for the find method
But traversing seems unnecessary at times when using a set can achieve the same purpose
For example take this question that ask to find the minimum spanning tree
def __init__(self, n):
self.parent = [i for i in range(n)]
... |
Suppose I have a set of $2^{n}$ number of binary sequences. And I have to select only those sequences which contain a minimum ${P}$ number of $0$ in it. For example, please consider the below one
Eg.
suppose $n=4$, so the total number of the binary sequence is $2^{4}=16$. And the binary sequences are as follows
$0000, ... |
Given a multiset $S$ of numbers, partition it into two subsets $S_1 $ and $S_2$.
How to maximize the sum of their medians? For example, the median of {1,2} is 1.5.
I've found a greedy algorithm that $S_1$ contains the maximum of $S$ (if multiple, select one), $S_2$ contains the rest of $S$. It's intuitively correct but... |
Let $F$ be a set, for instance $\{a,b,c,d,e \}$. Suppose I have a set of subsets of cardinality two obtained from $F$:
$ ${ a,b },$\{b,c\},${a,d}
I want to create every possible set of cardinality three starting from one of these subsets of cardinality two that do not have $e$ as a member, and collect them in a set tha... |
Suppose we have three rods A, B and C, and rod A contains n disks (Exactly like the original Tower of Hanoi problem). The disks are numbered 1 to n, when the bottom disk is number 1 and the top disk is number n.
I want to build two towers: One on rod B which contains only the odd numbered disks and one on rod C which c... |
The original paper by Goldwasser and Sipser proved IP[Q(n)]=AM[Q(n)+2].
Is there some modern source that proofs the theorem? (The full theorem and not specific cases such as limiting the number of rounds to 2.)
|
I ran into a very surprising local contest problem.
after finishing bellman ford algorithm, if we continue to updating
distance and distance of one vertex v being updated, then v is
on negative cycle.
there is very easily counterexample that the above sentence is false, but two times asking from my instructor, he tol... |
A complete binary tree with $n$ leaves has $n-1$ internal nodes. For every internal node $i$, I care about the difference between the maximum depth of the left sub-tree and the maximum depth of the right sub-tree $d_i$.
I'm wondering what's the upper bound for $D = \sum_{i=1}^{n-1} d_i$, given $n$ ? The lower bound is ... |
I have recently started reading the book Computer Networking: A Top-down Approach in hopes to get introduced to computer networks. When attempting one of the questions
from the book for practice, I got stuck and spent the whole day today trying to make some progress.
The questions is:
Consider sending a large file of ... |
We're going over threading models in my freshman CS class. Are there any examples of operating systems that use exclusively user threads (N:1)? It looks like 1:1 is far and away the most common model but I wanted to see live examples of this other model. Google had been inconsistent and it seems a lot disagree on which... |
I don't know how to solve this.
Show that if P=NP, and if language A is not NP-hard, A = ∅ or A = Σ*
|
I'm trying to classify a certain family of Boolean functions, and need to represent the function as a graph. Is there any well-known graph representation for a Boolean function that captures the information that it is Boolean?
I'm presently using the variables as vertices with an edge between two if they are present in... |
I'd like to formally prove the correctness of Hoshen–Kopelman algorithm (link here https://en.wikipedia.org/wiki/Hoshen%E2%80%93Kopelman_algorithm). Anyway I don't know what is the right approach. At first I wanted to prove it by induction (as it obviously works for a 1x1 grid), but I got stuck.
|
Given some undirected weighted graph $\ G(V,E, w) $ and its minimum spanning tree $\ T$, I need to find another spanning tree $\ T' $ with minimal amount of common edges of both trees. If there are no other spanning trees then $\ T' = T $
I was thinking maybe if I can "subtract" the edges of the minimum spanning tree I... |
Recently I asked a question Here about following topics:
after finishing bellman ford algorithm, if BF continue to update
distances and distance value related to one vertex v being
updated,then v is on negative cycle. [***]
from my counterexample I think this is a wrong sentence.
I see in the implementation of the fo... |
I'm interested in computing of the product $M^n v$, where $M$ is an $m\times m$ matrix (over a semiring) and $v$ is column-vector, with the smallest number of multiplications in the underlying semiring and in the regime of $n=\Theta(m)$.
If we first compute $M^n$ using fast exponentiation, this would take $\Theta(\log ... |
Obviously it is an open question if $3$-SAT can be decided in a polynomial amount of time. But what results do we know about its recognizabilty? Can $3$-SAT be recognized in a polynomial amount of time?
|
This question is based off of the usual Skyline problem, which is discussed in GeeksForGeeks and also several other websites.
The following are two variations from the usual Skyline problem:
Report all points in the skyline, and not just the upper left points.
Use arbitrary triangles and report all points in the shape... |
This 2014 paper by Barak and Goldreich defines the notion of a universal set $S_{\mathcal{U}}$ as the set of all tuples $(M,x,t)$ such that the non-deterministic machine $M$ accepts the input $x$ in $t$ steps or less (page 2). They further go on to describe a relation $R_{\mathcal{U}}$ for $S_{\mathcal{U}}$ which they... |
I am trying to understand how $\Theta(n)$, $O(n)$, and $\Omega(n)$ relate to each other as sets and want to make sure I'm on the right track.
I get that $Θ(n) \subseteq O(n)$ since $Θ(n)$ is stronger and all of its elements are also in $O(n)$.
Then $Θ(n) ⊆ Ω(n)$ is true too, yes?
But $O(n) \subseteq Ω(n)$ isn't true?
... |
I'm trying to modify the original D* Lite algorithm adding a margin constraint wrt to any nearby obstacle to be satisfied for each selected cell in the path. This causes the edge cost function between nodes to be asymmetric: let x and y be 2 adjacent nodes, with x being distant to an obstacle less than the given margin... |
I am going through this lecture series by Martin Kleppman. In this video at around 1:25, he says you can manually configure the distributed nodes to chose a leader.
If that's the case can't we just automate the process by having a different process running that just checks for the health of the leader and chooses a new... |
I'm currently working on implementing all the major data structures from C++ to better understand them and I arrived at the unordered_map, which should be a hash table implementation (it's actually not) and wondered that even if I implement the hash table, how could I make it iterable?
Let's say I'm implementing the ha... |
Does multiplying word size numbers (using standard grade school algorithm) take constant time? Can you use this to speed up computation and do the fast multiplication algorithms use this?
By constant time I mean under the word ram model or whatever model of computation is standard.
I mean in the purely theoretical mode... |
We know from the linear-speedup-theorem that
NTIME($\mathcal{O}(f)$) = NTIME($f$) and DTIME($\mathcal{O}(f)$) = DTIME($f$),
given that $f(n) > (1+\varepsilon) n$ for some $\varepsilon\in\mathbb{R}$.
What happens in the case that $f(n)=n$?
I was told that equality still holds in the nondeterministic case, but not in the... |
I am wondering why modern consumer cpu usually has 128GB memory limit when server cpu supports terabytes. 128GB is really not that much.
Do they really can't handle more RAM? How wide is their address bus?
Is it possible to put more RAM if motherboard handles it?
-- Edit --
I think that my question is simple, but let m... |
We were given the following problem in our university:
We will call $x \in (0; 1)$ computable iff there exists an algorithm (e.g. a programme in Python) which would compute the $n^{th}$ digit of $x$ (given arbitrary $n$.)
Prove the set of computable numbers is countable
Let's enumerate all the computable numbers and ... |
Let's consider a function $f \in \Theta(h)$ and a function $g \in \omega(h)$, what could I conclude about the sum $f + g$?
Since $f \in \Theta(h)$ I think about $f$ as if it grows just like the function $h$, and the function $g \in \omega(h)$ as if it grows more than $h$. Given that, to me it seems to make sense that ... |
Given a $n \times n$ grid with some walls and two cells $a$ and $b$, I want to compute the non-homotopics paths from $a$ to $b$ on this grid. A path is a sequence of adjacent cells (diagonal does not count) such that from one cell to another, we never go through a wall. We also ask our path to be non-looping, that is t... |
It seems to be a popular opinion that "the right way" to implement undo/redo is "using a stack." (particularly in the context of an algorithms and data structures interview.)
Here's a GeeksForGeeks article as one reference on this view.
A common variation on this problem is "suppose we want to be able to do many undo o... |
I am looking for a publication-friendly term to describe the total quantity of data communicated between nodes of a distributed system, as invoked by some discrete operation. This term would describe the integral of the bandwidth over time.
For example, if node 0 sends 1 byte to node 1, and node 2 sends 3 bytes to node... |
Question:
Prove that there exists an algorithm that can decide using at most n-1 comparisons whether a n-element array contains only equal numbers.
We use an algorithm that loops through all the elements in the array, comparing Ai with Ai+1 to check if both are equal, where 0 <= i < n. If there exists some i, such that... |
Given context free grammar I use breadth first search and left most derivation rule to generate all possible words for a given language.
For example:
rules_1 = [('s', ''), ('s', '(s)s')]
depths = 0, nodes_on_current_level = 1, nodes = ['s']
depths = 1, nodes_on_current_level = 2, nodes = ['', '(s)s']
depths = 2... |
I am looking for an efficient algorithm to update a $N*N$ matrix, in which the coefficients represents the distance between $N$ number of points, every time that the coordinates of a point change in a 2D Cartesian plane.
Here an example:
There are 3 points in a Cartesian plane:
$a=(1,3)$
$b=(3,3)$
$c=(4,1)$
to calculat... |
So I'm learning about Myhill-Nerode relations and as an introduction, the book describes possible partitions for $\Sigma^*$. As an example, given a language $L$, a partition of $\Sigma^*$ would be $\{L, \overline{L}\}$.
Suppose there is a DFA for $L$, the book continues by creating the following notion: For a $q \in Q$... |
It seems to me that an array can be used as a stack or a queue and for various other things.
In my mind this makes an array a higher order abstraction compared to those other two.
Is this an acceptable argument or are there other preferred ways to determine order of abstraction that would invert my line of thought?
|
Given $n$ points in $\mathbb{R}$ each colored with one of following three colors
$$C=\{c_1, c_2, c_3\}.$$
In polynomial time, Choose the minimum number of intervals of length $1$ each containing some of $n$ points such that from each color, $c_i$ ($1 \leq i \leq 3$), there is at least one point in one of chosen interva... |
Define the halting problem as $\{\langle M, w\rangle: \text{$M$ is a TM that halts on $w$}\}$. It is undecidable, but recognizable, with a naive recognizer that simulates $M$ on $w$. In a certain sense, it is a "linear"-time algorithm, not in the length of the input of course, but in the "execution complexity" of $M$ r... |
My understanding is that a programming language is generally paradigm (functional, procedural, OOP) independent: we can code using different paradigms in some language. However, some languages, like Java, seem to require the developer to code only in OOP. And the language C does not even support OOP.
In regards to Pyth... |
During the fetch stage of the fetch-execute cycle, why are the contents of the cell whose address is in the MA (memory address register) placed in MB (memory buffer) then copied to IR (instruction register), rather than placing the contents of address of MA directly in the IR?
|
I am trying to implement the "DWR algorithm" described in Fig. 2 of This Paper (in order to get a program that reduces a planar graph to K2 using solely loop removal, leaf removal, "contraction" of nodes of deg 2, removal of redundant parallel edges, and, most importantly, delta-wye and wye-delta transformations)
The a... |
The maximum weighted matching problem (https://en.wikipedia.org/wiki/Maximum_weight_matching) finds a matching in a weighted graph that has maximum sum of weights. I was wondering if there are any existing approaches to find a matching that maximizes the minimum weight? (Can't seem to find any similar references on thi... |
As title, I'm trying to implement a text editor with the rope data structure, which is backed by binary search tree.
Since I want it to have persistent undos, the underlaying data structure should also be persistent.
I know that there is an candidate like randomized immutable treap, I'd like to know if there are other ... |
I have been looking around for a few days trying to find a clear and concise description of how, at a technical/implementation level, how distributed joins work, but haven't found much. The best so far is in Track Join: Distributed Joins with Minimal Network Traffic. In this though they seem to suggest that every joine... |
Could someone please explain the expression for division in tuple relational calculus in words? I do not understand how the multiple operators (existential and universal quantifiers) are to be interpreted.
My question is almost the same as Division in tuple relational calculus but there is no response to this.
|
Consider that
\begin{align}
\Gamma(n+1) = n!
\end{align}
for any integers. I then got the following two questions:
What is the largest value of $n$ for which $Γ(n+1)$ and $n!$ can be exactly represented by a double-precision floating-point number?
What is the largest value of $n$ for which $Γ(n+1)$ and $n!$ can be ap... |
For a given context-free grammar (CFG) you can always construct a pushdown automaton PDA (and vice-versa). This pushdown automaton is possibly non-deterministic, since for a non-terminal $X$ in the CFG, there might be multiple rules of the form $X \rightarrow \gamma$.
The book I am using says that this looks like it co... |
I am trying to describe a novel type of DAG's construction algorithm. The directed edges of the graph corresponds to a partial ordering: i.e. any directed edge $e$ spanning from $f$ to $t$ also observes: $f \preceq t$.
Q: How can I precisely define the main task of edge construction: that is finding the node $f$ for a ... |
I want to prove to a verifier that I know the passcode of a system. The system contains data/information of the verifier of which is only contained with this system. Since I know the passcode to the system, I retrieve data relating to the verifier and tell the verifier of this information. He acknowledge the informatio... |
This is a question I got for an assignment, and I have been stuck on it for the past few days.
Prove that
$\Theta(n)+\Theta(n-1) = \Theta(n)$
Does it follow that $\Theta(n) = \Theta(n)-\Theta(n-1)$
I was able to prove the first part but I am getting stuck in the second part. If someone could help me out with this I wou... |
What would be a pseudocode of try-catch pattern, common in generally all programming languages?
Perhaps the following?
Try X,
If you catch Y (success) than continue,
If you didn't catch Y (bug),
Either,
Do nothing || throw an exception (error)
|
MAX-QP problem (quadratic programming on boolean cube) statement:
Given symmetrical matrix $A$ with 0 on diagonal
$$A = (a_{ij}) : A^T = A, a_{ii} = 0$$
Find maximum $x^TAx$ where $x \in \{0, 1\}^n$, in other words
$$\max \sum_{ij}a_{ij}x_ix_j$$
Note that this problem is similar to the max-cut ploblem with no limitat... |
I've seen questions about how an NTM could simulate a DTM and this seems pretty straightforward to me. However, my text book says you can also simulate an NTM using a DTM.
How would this work? I'm especially curious on how to define the transitions, since in the DTM, each transition would have to be deterministic.
|
There is a lemma in our textbook that asks us to prove the following:
If $L_1 \leq_m L_2$, and $L_2$ is decidable, then $L_1$ is decidable
I tried proving this by saying that if $L_1 \leq_m L_2$, there is a function $f$ such that $f(L_1) \subseteq L_2$. But I know for a fact that a subset of a decidable language is not... |
Are turing machines with an infinite program tape that is completely random, or another example is a Game of Life simulation on an infinite randomly initialized grid, still turing machines, so to speak?
edit: if this is the wrong place to ask this(?) remove it
|
If we have input of size $N=13$, which represents array that has 13 element. We need in general $O(N\log{N})$ memory to store all intervals. We see that number of intervals we need in terms of power of $2^p$ is 3, so intervals is $p=3$.
Problem: I am not sure though why the space we need to store intervals then is $O(1... |
In "The Lambda Calculus - Its Syntax and Semantics" by H.P. Barendregt (WorldCat) the term "term modulo" is used, E.g.
The principal object of study in the λ-calculus is the set of lambda terms modulo convertibility. (p. 22)
Terms modulo a change of bound variables (p. 25)
What does "terms modulo" mean?
|
In "The Lambda Calculus - Its Syntax and Semantics" by H.P. Barendregt (WorldCat) is this statement, the first sentence of chapter 2 after the introduction chapter, so in a way this sets the tone of the book and is useful to understand.
The principal object of study in the λ-calculus is the set of lambda terms modulo ... |
In a two-level virtual memory, the memory access time for main memory, $t_M=10^{−8}$ sec, and the memory access time for the secondary memory, $t_D=10^{−3}$ sec. What must be the hit ratio, $H$ such that the access efficiency is within $80$ percent of its maximum value?
$\tag {GATE-CS-1990}$
I came across the problem... |
I have a large network of 10,000 nodes and I am trying to identify subgraphs which are clique-like, in that they share many connections. I don't a priori know how many subgraphs fit this criteria.
To solve this task, I have been trying to use the highly connected subgraph (HCS) algorithm for this, but it seems to run v... |
How do COVID-19 Vaccination ID verifications work? How do they automatically verify that the COVID-19 Vaccination ID is not faked?
|
Using the basic algorithm to calculate post dominators I run into trouble when working with a CFG containing an infinite loop (i.e., not terminating).
The algorithm:
// post dominator of the start node is the start itself
PDom(n0) = {n0}
// for all other nodes, set all nodes as the post dominators
for each n in N - ... |
I'm looking for an operating system (commercial opensorce or any) which can freeze any currently running application (video/audio playback, a game etc.).
While the app is frozen the OS must be able to show some windows (maybe some information to the user) or play some sound etc. In other words the apps are frozen and y... |
The wikipedia entry for disjoint set data structure includes the statement (in the "Applications" section)
Note that the implementation as disjoint-set forests does not allow
the deletion of edges, even without path compression or the rank
heuristic.
Is the article trying to say that a deletion is not possible with a... |
I am confused by the following claim:
Let $T$ be a (decider, single-tape) Turing machine with the property that for every input, every cell on its tape is accessed at most $10$ times. Then there is a (nondeterministic) finite automaton equivalent to $T$.
The assumption says that there are only finitely many possible ... |
I am trying to reduce between a solution problem and a decision version of the same problem.
The problem is the orthogonality problem. Given $2$ sets $L$ and $R$, whose size each is $n$ vectors over $\mathbb{N}\cup\left\{ 0 \right\}$, each vector with dimension $k$ (assuming $k<<n$), I want to:
A) Find whether a pair ... |
"The Ali Baba cave" example of ZKP is pictured below. There is no need for a probabilistic ZKP protocol to prove to the verifier of the statement (that the prover has the key to the door). It can be proved deterministically without the prover revealing any knowledge/information.
Assume that both the verifier and prover... |
I've been looking at algorithms for finding the diameter of a convex polygon, and while I like the Shamos' algorithm using antipodal points which is general and applicable to various other problems, I thought I would try and find my own solution/proof that's focused only on the diameter. I haven't taken a look at a pro... |
I recently heard about the concept of zero-knowledge proof. However, I still do not get how it is possible to make it a solution to some real-world problems. One thing I heard is that zero-knowledge proof can be utilized in Elections. But my question is what is the use, or how can we implement zero-knowledge proof syst... |
Background
I have some code, I have written.
The time complexity for building the Graph with Nodes + connections is calculated to be $O(N^2)$, even though in the constructor there is first, one $O(N^2)$ for creating the graph, and the second nested-for loop is for building the edges between nodes i.e. connections. Agai... |
TL;DR Is there a "standard" way to represent a float scaled to a particular range, such that we get maximum precision for the given bit depth, within that range?
I'll start with my general question, and because StackExchange likes me to be specific about what I am trying to do, I shall end with specifics.
General Quest... |
Consider the family of circuits $\{C_n\}_{n\in \mathbb{N}}$ that are big enough to compute every Boolean function for $n$ variables. We can label the nodes in order starting at the inputs and working down the layers, so that $2^{2^n}$ refers to the last, deepest node in the circuit.
A decidable problem corresponds to a... |
Define
Partition to consist of all tuples $x_1,\ldots,x_n$ which can be divided to two groups in which the sums of the two groups are equal.
Is there a proof that there isn't an additive approximation algorithm to the problem?
Where $c$ is the minimal distance between the groups.
|
When proving the bound on a summation in the Analysis of Algorithms when proving the bound also applies to $n+1$ the following inequalities are derived by the induction hypothesis:
$$\sum^{n}_{k=0}3^k + 3^{n+1} \leq c3^n + 3^{n+1}
= \left(\frac{1}{3} + \frac{1}{c}\right)c3^{n+1} \leq c3^{n+1}$$
I don't quite understand... |
I am trying to generate partitions of networks to evaluate clustering algorithms. I know that generating all partitions is infeasible (since they grow with Stirling number of the second kind which get big very quickly). I would like to restrict this to partitions that have a minimum size since these are the ones I care... |
I can't figure this out; is $2^{n^2}=O(n!)$ or is it the other way around? Any help is appreciated!
|
I am trying to build an imperative programming language with a type system that will allow for proofs. I just found kind lang, which implements all the ideas that I have been meaning to use (plus more), but it is a functional language. An older rendition of the project was Formality in JavaScript, or probably earlier, ... |
I am designing an automaton which determines whether a binary number is divisible by 3:
$$ \{x \in \{0, 1\}^* \mid \text{$x$ represents a multiple of three in binary} \} $$
0
1
0F
0
1
1
2
0
2
1
2
This is the transition state diagram of the automaton, whose states are $0,1,2$; the states are drawn from... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.