instruction stringlengths 35 29.1k |
|---|
To understand this proof you must first understand
NP vs P problem
The quantum eraser experiment
True randomness
Before we start I must first assert things that have been proven to be true, if you question any of my assertions feel free to research them yourself.
True randomness does exist (demonstrated in quantum p... |
Using the regular mergesort algorithm for a list, say $a[1...n]$, we call the merge function to merge, mergesort($a[1...\lfloor \frac{n}{2} \rfloor]$) and mergesort($a[\lfloor{\frac{n}{2}}\rfloor+1...n]$). Let $T(n)$ be the time complexity for mergesort. Then, the first sublist needs $T(\lfloor \frac{n}{2} \rfloor)$ ti... |
It is well known that context-free languages are not closed under intersection or complement. But what about context-free languages $L_1$ and $L_2$, such that $L_1 \cap L_2$ as well as $\left( L_1 \cap L_2 \right)^C$ are not context-free languages.
I can think of many examples of two context-free languages whose inters... |
I've come up with a greedy algorithm proof for the minimum denominations problem, and I'm curious if someone can verify the correctness of the proof for me. I have simplified the problem by restricting the denomination set to the US Coinage System. Thank you very much in advance.
A Formal Definition of the Problem
Give... |
I have a dataflow graph where a set of different types of tasks are placed in corresponding types of nodes.
Say the task types are called A, B, and C.
A-type tasks are placed in all the leaf nodes of the dataflow graph.
B-type tasks are placed in nodes with the data from any two nodes hosting A-type tasks, or one node... |
I study computer science and I was taught that sometimes one can test tests. The lecturer did not used citations. One other programmer told that this is not useful. Is there any research showing pros and cons of testing tests?
|
I know that an algorithm can't decide whether another algorithm halts on an input or not (a Turing machine can't decide whether another Turing machine will halt on an input). But I, as an human, can: I mean you just don't end up in your activity as a programmer with a looping algorithm and you don't know why!
To do thi... |
Given a set of $n$ positive numbers $\{a_1,\ldots,a_n\}$ and a positive target $T$, find a subset $S$ from $\{a_1,\ldots,a_n\}$ of contiguous elements, that is $S=\{a_i,a_{i+1},a_{i+2},\ldots\}$ for some $i$, such that $|S|$ is minimum and $\sum_{a\in S}a\geq T$.
My algorithm is an exhaustive search one.
Generate all ... |
I have a question that I am trying to work through. I have a program:
1. program Pass
2. var b:integer; a:integer; v :array[5] of integer ;
3. procedure P (x:integer, y:integer ) ;
4. var z:integer ;
5. begin
6. z := x ;
7. x := y ;
8. y := z ;
9. end
10. begin
11. b :... |
So my question is about when we want to find the total derivative of the NLL Loss function $L$ w.r.t. $w_i$.
So the "pipeline" is often expressed as:
$$\frac{\partial L}{\partial w_i} = \frac{\partial L}{\partial z} \cdot \frac{\partial z}{\partial w_i}$$
Where $L$ is the NLL Loss function, $w_i$ is the context word-em... |
I am designing a simple algorithm to be used at hardware level. And I want to find its time complexity.
i=1
while(i<=n)
{
i=i*2;
}
How I'd go about finding time complexity of this?(And I'm wrong).
i=1,2,4,8....n
=$2^{n-1}$
So the time complexity is $2^n$
But I am wrong according to the professor. Why? Isn't my mat... |
First, this is not an opinion question. I'm interested in if there is some kind of objective answer. If there isn't, then the answer would be "no".
Is bytecode ("virtual machine code" for a "virtual processor") inherently faster to compile and/or interpret, than higher level (above Assembly) languages? What I mean is, ... |
Given array $a$ of size $n$ and array $p$ of size $m$. How we can for every $i < m$ find $p_i$-th order statistics of array $a$ in $O(m log(n) + n)$?
We can find order statistics separately, but it will be $O(mn)$. How can we do better?
|
I have found two formulas in the work on pages 5 and 6, of which I am trying to develop a recursive implementation. The similarity to the DFT or FFT might be useful here. I divide this question into three sections, in the first part I explain my thoughts, in the second section there are open questions and in the third ... |
function fun(n) {
let i,
j,
p,
q = 0;
for (i = 1; i <= n; ++i) {
p = 0;
for (j = n; j > 1; j = j / 2) {
++p;
}
for (k = 1; k < p; k = k * 2) {
++q;
}
}
return q;
}
let val_q = fun(36);
console.log(val_q);
My confusion:
Outer loop runs $n$ times.
The loop with $j$ ... |
I wrote a pseducode for the Algorithm I am interested in its time complexity.
Here is algorithm:
SolveDominoes(n, dominoes_data):
ListA
for dominoes in dominoes_data:
ListA.add(dominoes)
ListP = Red Domino from starting domino
for(int i = 1; i < n; i *= 2)
ListB = ListA.copy()
ListC
Sort(ListA, Li... |
I'm embarking on a long-term project, aiming to build a computer based on the Intel 8088 architecture. This venture provides an excellent opportunity to deepen my understanding of computer hardware and operating systems. As I begin this journey, I have some queries to address, seeking clarity on certain aspects.
One ke... |
I'm trying to solve the recurrent
$$T(n) = 2T\left(\frac{n}{2} \right) +O(n\log n)$$
I thought about Master's theorem but unfortunately, my recurrent doesn't belong to any cases
Could you please help me with solving my difficulties?
Thank you a lot for your help.
|
I read that one assumption for Successive Shortest Paths algorithm for computing the minimum cost flow problem is that every cost is non-negative.
I also read that this assumption can be removed with proper network transformations, what are those?
I found on some notes this:
Where $ c(u\rightarrow v) $ is the capacit... |
I have a real-world (see background below) problem wherein a set $S = \{A,B,C,D...\}$ needs to be partitioned into set $P = \{ \{A,B\},\{D\},\{E,F\},\{C,G,H\},...\}$ where $P$ is required to have the fewest possible elements. There are restrictions on which elements of $S$ can be partitioned together; at any time I can... |
are there some packages in any programming language which make it convenient to solve this specific type of PDE?
$f_t + \left(1 + \xi \frac{\kappa_t - a}{T-t}\right) f_a + \frac{\sigma^2}{2} f_{aa} + r(1-\gamma)f - (\rho + \lambda(a))f + \gamma f^{1-\frac{1}{\gamma}} = 0$
I've come across similar PDEs multiple times so... |
The part that I have problems with is showing the existence of an oracle for which:
$NP^B \neq coNP^B$
The hint:
consider the language: $L_B = \{ 1^n : \forall x \in {0,1}^n, x \in B \} $
Having seen the proof for $P^B \neq NP^B$ my thought process goes along the line that I want to show the following:
$ L_B \in coN... |
The way I understand is that complexity classes which are denoted with $\Sigma_i$ are representing a combination of alternating variable quantifiers which must start with an existential quantifier $\exists$, for example: $\exists y_1 \forall y_2 ... Q y_i$ and the last quantifier does not really matter. That is why we ... |
I understand of the existence of Rice's Theorem, however, I want to understand better how this reduction is formed. My professor gives the answer as follows:
"By contradiction, assume that $L$ is decidable and let $D$ be a decider for $L$. Then construct the TM $S$ such that $S$ decides the Halting Problem as follows:
... |
In a simple weighted graph, with n vertices and m edges , for each pair of vertices we want to find the number of edges that appeared at least in one of the shortest paths between these two vertices.
I assume we can solve it using Floyd-Warshall algorithm or something similar to it but I tried and didn't reach any algo... |
I'm learning NFA and the following question is confusing me.
Can Someone explain the answer. I have a feeling that it might be wrong.
Thank you!
|
My question is simply this: is it possible to upper bound the output length of a halting turing machine? I.e., is there a function $f$ such that for every halting machine $M$ and every input $x$ we have $|M(x)| \in O(f(|x|))$?
On the one hand, it seems like yes because every halting machine will leave some finite strin... |
I am working through the exercises in the book "Term Rewriting and All That" and got stuck on question 2.3. The question reads: find a reduction $\rightarrow$ on $\mathbb{N}$ such that $\rightarrow$ is decidable, but it is undecidable for some $n$ in normal form. A friend and I came up with two different solutions. But... |
Do any hash functions exist that provide the same result if the input is reversed?
If this is impossible, why is it impossible?
I am interested in sending packets of constant size around a circuit in a network in both directions, having each node add its value to the hash and then, when the packets meet, compare the ha... |
Do any streaming hash functions exist that provide the same result if the input is reversed?
That is to say, is there some hash function, $h$, such that:
$$ h(h(h(h(0, x_1), x_2), ...), x_n) = h(h(h(h(0, x_n), ...), x_2), x_1) $$
If this is impossible, why is it impossible?
I am interested in sending packets of constan... |
I have been trying to solve the following problem. I have n intervals each with a cost.I want to choose a subset of the intervals that maximizes the cost but with the following constraint. Each interval when chosen uses one resource from a limited amount say k and when it finishes releases the resource to be used by an... |
Consider the language $L = \{\langle M_1,\ M_2 \rangle \mid \exists x : x \in L(M_1) \cap L(M_2)\}$. Show that $L$ is not decidable.
I'm attempting a proof by contradiction but I'm having trouble with the Turing machine part.
|
From the book "Fabric of reality" by David Deutsch.
We know from quantum theory that all such variables are quantized, and therefore that, no matter how the computer works, the set of possible programs is discrete. Each program can therefore be expressed as a finite sequence of symbols in a discrete code or computer l... |
(This is a somewhat fuzzy question.)
I believe that most of the "standard" complexity classes that one comes across in complexity theory are countably infinite, because they are defined in terms of decision problems that can be solved by Turing machines with certain prescribed capabilities, and the set of Turing machin... |
This is algorithms and data structures assignment and I have been thinking 3 days about it.
You are given N sections, placed on numeric axis. Numeric axis is divided by unit intervals. Each section in described by two integers - coordinates of left and right endpoints and it covers corresponding number of intervals. Fr... |
I know that if decidability of $A \cap B$ and $A \cup B$ doesn’t
guarantee the decidability of any of $A$ or $B$. We can prove that:
ATM is not decidable. Since decidable languages are closed under complementation, ATM' is also not decidable. But $\textrm{ATM} \cup \textrm{ATM}' = \Sigma^*$ and $\textrm{ATM} \cap \text... |
A register in a CPU can be much more well utilized if it could be divided and its parts can be used independently. For example, if you need 8 8-bit values, you could just use a single 64-bit register, and each 8-bit segment could be treated independently of one another. But the way CPUs are designed, using 8 64-bit reg... |
I'm not sure how to solve this problem. Problem statement is: Consider the binary classification problem where X = R
d and Y = {0, 1}. Consider the
class of Binary classifiers given by intersection of three half-spaces.
Show that proper learning w.r.t. this class of intersection of three half-spaces (the
class F) is co... |
To prove the that the halting problem is undecidable I was provided with 5 lemmas.
I understood each Lemma individually and also the proof itself. What I'm confused about is that one of the Lemmas seem like it didnt contribute to the proof at all. If someone could tell me if I have missed the importance of the Lemma th... |
I need help with this is possible. Could someone who has a good understanding of Linux and Windows explain how they differ in file implementation foxuing on low level end? There isn't a huge amount of literature on this, thanks.
|
I am reading a paper (link) in which an algorithm proposes a solution $\hat{\mathbf x}^{(t)}$ in each iteration $t = 1, \dots, T$, and each time, learns the true solution $\mathbf x^{(t)}$, so we learn whether the algorithm made a mistake, i.e. $\hat{\mathbf x}^{(t)} \neq \mathbf x^{(t)}$.
In Theorem 9, we learn that t... |
I have a large set $\mathbf{V}$ of vectors in $\mathbb{R}^d\setminus\{\mathbf{0}\}$ and need to find a vector $\mathbf{u}$ that maximizes $\sum_{\mathbf{v}\in\mathbf{V}}\mathbf{1}_{\mathbf{u}\cdot\mathbf{v}>0}$, which is to say the count of vectors in $\mathbf{V}$ that have a positive dot product with $\mathbf{u}$. Alt... |
The Wikipedia page about interpreters mentions the following three strategies
Parse the source code and perform its behavior directly
Translate source code into some efficient intermediate representation or object code and immediately execute that
Explicitly execute stored precompiled bytecode made by a compiler and ... |
We know Insertion Sort would be faster than Merge Sort and Quick Sort for nearly sorted data. What about Binary Insertion Sort? At what case is it better than Insertion Sort?
Also, is there a better solution than Binary Insertion Sort, for the problem is solves better than Insertion Sort?
|
The program is designed to start with values for $x$ and $y$. The variables $u1$ and $u2$ are intended to represent $x$ and $y$ in ascending order.
Provide suitable preconditions and postconditions for the program.
Then, using Hoare logic, prove the correctness of the program.
Specify all proof obligations and justi... |
I am trying to understand how the algorithm used by Flex works. I refer to the determinization procedure producing the output DFA. The algorithm is publicly available and contained in Flex's source code (dfa.c:345). However, I am experiencing several difficulties making out the idea behind it: this is mostly due to the... |
I have a computer science problem that seems relatively simple.
We are given a number of 2D rectangles that we want to place next to each other on a 1D line (without rotating them). The 1D line has a certain finite length. The rectangles width is randomly and uniformly distributed between 0.1 - 10 units. The height is... |
How do I calculate the complexity of this Algorithm below? I would like to know how I calculate the sums that form to obtain a formula as a function of n? I know that in general this algorithm has O(n^3) complexity, but how can I do that?
int i,j,k,s;
for(i=0; i < N-1; i++)
for(j=i+1; j < N; j++)
for(k=1... |
How to learn DSA if you are already working as a software engineer and have decent knowledge about development. Only thing that makes me procratinate is going over theories behind different data structures. I thinkg solving problems is fun but the begineer phase is really boring and after a year i have almost forgotten... |
Description of the problem:
Alice and Bob are both given as input the same graph and vertex $x$ and $y$ respectively. In the graph there are no self-loops and the given vertex can be the same.
Prove that communication complexity between Alice and Bob for deciding whether $x$ and $y$ are neighbours is at least $log \chi... |
I wanted to see what models would be best suited for providing a image (see the link below) and having the model perform a image to text (OCR of some kind) and laying out the contents of the image in a "question" "answers" format.
This gets more tricky as I would like to include pictures between the question and answer... |
i saw this comment here : David Deutsch says "number of atoms in universe is finite", but then says "number of programs of all finite lengths is infinite". Contradiction?
""stating there are an infinite number of programs but that a program
cannot be infinitely long is a contradiction" That's not a
contradiction. Ther... |
As a beginner to competitive programming, I want to know a few things about informatics Olympiad such as the resources and books needed to prepare for the competition. I also want to know which problems should I solve from CodeChef, HackerRank, etc because I was unable to find Olympiad problems and most of the problems... |
Write an algorithm that takes an arbitrary natural number and returns a boolean of whether the number is a perfect square. Sketch a flowchart of the algorithm.
My approach is that a natural number $n$ is a perfect square if and only if we are able to find a natural number $i$ where $i < n$ such that $n / i - i = 0$ and... |
PSSM or PWM (Positional Weighted Matrix) is a common thing in biological science, used often to observe the distribution of letters inside a group of strings of the same length. It's composed by log-odds of observing a letter inside a given positions, so the value of each cell in the matrix could be either a positive o... |
$\mathsf{PH}[1]$ is a variant of a polynomial hierarchy in which each machine can only call its oracle once. $\Sigma^{\mathsf P}_{poly(n)}[1]$ is a polynomially "tall" tower of $\mathsf{NP}[1]$ oracles. Each of these oracles can accept an input no longer than $n+o(n)$.
Quite trivially, $\mathsf{PH}[1]\subseteq\mathsf{P... |
Recall some terminology: Let $\mathsf P$ be a finite set of propositional atoms, and let $\Phi$ be a proposition over $P$ that is generated from $\top$, $\bot$, $\neg$, $\wedge$, and $\vee$. Then:
A satisfying assignment for $\Phi$ is a function $\varsigma:\mathsf P\to\{\bot,\top\}$ such that $\varsigma\vDash\Phi$ ho... |
I remember in a Computability Theory class building a state machine for an assignment that required many 'go-back' transitions on $\Sigma - symbols$ for all symbols not already handled. This was very verbose and seemed to be a thing people would run in almost all states in any sort of parser.
Is there an agreed-upon sh... |
the 24 hour clock/timer on my BEMER PEMF device's microprocessor is keeping erratic time lately. Shortly after I reset to the correct time, it fails to keep accurate time.
I'm wondering if exposing the motherboard will allow me to easily identify and replace the clock chip? I am a newbie and have never done component l... |
I'm learning about Reed-Solomon codes so apologies if this is a basic question. The alphabet size $q$ in RS codes grows with the block length $n$ - in particular, we have $q \geq n$.
But intuitively, what's the reason behind this constraint? This is introduced as a part of the definition in the notes I'm reading and I ... |
It's possible to construct SAT problems that are solvable in quasipolynomial time, but they are also solvable in polylogarithmic space. Consider, for example, the following problem:
Let a set $S$ consist of $\mathcal O(\log^k n)$ variables. Suppose a boolean formula $\varphi(S, X)$ in 3-CNF form such that $\forall c\i... |
Is it possible to write a piece of code that will run forever without using a loop?
|
I write this question because my professor in Algorithm Analysis briefly mentioned some property related to the countability/uncountability of the set of strings/problems/algorithms and the consequent inability to have an "algorithm that can solve it all" which I didn't fully understand...
As I understand: A decision p... |
I was looking at the Advent of Code 2023 day 11 problem and misread it to think that the question ended up asking something akin to what's below (after transforming the positions of the "galaxies"), and I'm wondering what kind of optimization problem this is. See nearly equivalent problem, but with specified values for... |
We aim to optimize the execution of a specific task.
Consider a set, P, containing N 2D points. A new query point, p1, is introduced, and the objective is to identify the nearest point in P to p1. If the distance surpasses a specified threshold, p1 is incorporated into P, increasing its cardinality to N+1; otherwise, p... |
Build a Turing machine that will count the units written in a row (without omissions) (their number does not exceed n) and write their number in the number system with the base n +1, here n=3+[N](mod 13) and N =(your number in the group list)+(your number groups).Build a Turing machine that will count the units recorde... |
In an image processing system, an algorithm processes an $N \times N$ image with each pixel being a number between $0$ and $255$. It finds the median value $M$ in the $N \times N$ image and applies the binary function $f(x)$ to every pixel.
$f(x) = \begin{cases}
1 & \text{if $x ≥ M$} \\
0 & \text{if $x < M$}
\end{c... |
Given a binary $n \times n$ matrix, we would like to decide whether there is a row or a column which consists entirely of $1$s. The caveat is that after we read an entry of the matrix, it is erased. How much space do we need in order to solve this task?
If entries do not get erased, the task can be solved in space $O(\... |
Given a sorted array of positive integers that is guaranteed to have some unique entry that occupies more than $1/3$ of the entries, is there an algorithm to determine this entry in $O(1)$ time?
Some remarks:
(1) If we replaced $1/3$ with $1/2$, then by checking the first, middle, and last entries of the array, we obta... |
I have the following problem, and would like to figure out whether or not it's NP-hard - primarily to know that searching for a polynomial algorithm for it is futile. Approximations are possible, and in practice sufficient, but I'm still interested in how hard the exact problem is.
Given is a DAG $(V, E)$, where every ... |
So I am given the language qr where q is any combination of a's and b's. r is then the reverse of whatever q is. For example, abba is in the language because we can make a q = ab and r = ba
I have to prove, using the Pumping Lemma, that this language is not regular.
I can't make any sense of this, because it seems appa... |
I am trying to solve a competitive-programming-style problem which I've boiled down to the following: given two arrays $a, b$ of length $n$, where $a_i, b_i > 0$ for all $i=1\ldots n$, compute
$$\max_{i, j : i\neq j} \quad a_ib_i + a_jb_j + \max \{ a_ib_j, a_jb_i \}. $$
Of course, this can be solved by brute force by s... |
We're looking to model the following problem as a standard optimization problem (or even a non-standard one). We can come close, but nothing seems to fit exactly. We have a working algorithm coded, but the performance is unacceptable.
Problem statement
The problem is set up in two parts. First, there are fixed data:
a... |
I have been trying to figure out why this problem is supposedly not in $P$. Eager to learn where my reasoning is wrong!
Problem:
Given a pair of integers ($n$, $m$) in binary, does there exist $2 \leq k \leq m$ such that $k$ divides $n$?
Reasoning:
In order to find a potential $k$ we need to loop over all numbers from ... |
i have an idea of enhancing the heapsort by finding the max and min simultaneously and then swapping the max into the last node, and then the min will be swapped into the second to the last node, and then they will be removed or pop. and then they will be sorted in the array, the max will be at the last element, and th... |
Let $\varphi(X)$ be a boolean formula in CNF over a set $X$ of boolean variables $x_1,x_2,...,x_n$. Let $c_i$ denote $i^{th}$ clause in $\varphi(X)$. $x_j^0$ denotes $\overline{x_j}$ and $x_j^1$ denotes $x_j$.
$\varphi(X)$ is considered clause-pair minimal if $\forall i\forall j\neq i$ the CNF $c_i\land c_j$ consisting... |
Is it possible that an AI bot behave as a human being in the long term?
I would like to know what people think but according to me it is not possible.
One example is - Many times humans know what is the right thing to do but they don't feel like doing it. In humans, there is a tussle between heart and mind many times. ... |
I have been struggling with the understanding of why this problem is in coNP.
Problem:
CNF-Equivalence, denoted as C, takes as input a pair of CNF formulas ($\phi, \sigma$) both are defined over the same set of $n$ variables $x = (x_{1}, x_{2}, ... x_{n})$. The goal is to decide whether these two formulas are equivalen... |
We know that $\mathsf P$ is low for itself. It's also low for $\mathsf{NP}$, $\mathsf{RP}$, $\mathsf{UP}$ and some other complexity classes that contain $\mathsf P$ and are contained in $\mathsf{NP}$. Does it actually hold $\forall\mathcal C:\mathsf P\subseteq\mathcal C\subseteq\mathsf{NP}$ that $\mathcal C=\mathcal C^... |
Let $L = \{\langle M, W \rangle \mid M $ is a Turing machine, w is a string and some Turing Machine $M_1$ exists such that w does not belong to $L(M) \cap L(M_1)\}$
I am unsure of how to deal with the TM $M_1$. One idea I had was to let $L(M_1) = \phi$ such that $L(M) \cap \phi = \phi$. So when we simulate $w$ on $M$... |
Given two boolean functions f1 and f2, are there any tools available that could be used to automate the process to represent f1 in terms of f2? I understand the process of this doing this by hand quite well, however, the process gets quite tedious with more variables. Are there any tools that are readily available onli... |
I have read a book ‘Men of Mathematics’ by Eric Temple Bell, which includes the development of mathematics through ages and the biography of famous mathematicians . I am looking for such an history oriented book about computer science and the computer scientists. Can anyone suggeste me any such books and I am unable to... |
I'm working on a problem from my textbook (not homework, just an example), and it asks us to calculate the 'best case' scenario of reading a 1MB file from the hard drive.
I don't know why the right way to calculate the total time involves the max time for a single rotation. Also in the answer they said that a 1MB file ... |
The following question is related to finding the size of the original datagram. The formula for original datagram size is: Data length of first packet + (Total length of subsequent packets * no. of subsequent packets. Do I also need to consider the header size for the first packet sent?
And what if the MF for the first... |
The outline of the exercise is this:
Describe two non-regular L1 and L2 languages on A = {a,b} such that L1∩L2 is infinite and regular.
The proposed solution to this exercise is:
L1 = {a^n b^n | n > 0}
L2 = {a^n b^m | n != m AND word length is even}
L1∩L2 = {words of even length}
What I don't understand, however, is th... |
$\mathrm{MFVS} \leq 1$ is a concise way of writing the following decision problem:
Let $G = (V, E)$ be a directed graph. Is there a $v \in V$ such that every cycle in $G$ passes through $v$?
(More generally, $\mathrm{MFVS}$ stands for minimal feedback vertex set, the problem of finding the smallest set of vertices su... |
I'm practicing the following exercise for my exam: CFG {$w\in ${a,b,c}$^* | $#$_a(w) + $#$_b(w) = $#$_c(w)$} and I'm struggling a bit.
I've already solved {$a^nb^mc^l | n+m=l$} with production rules: $ S\rightarrow aSc | B|\varepsilon \\ B\rightarrow bBc|\varepsilon $,
which is almost the same except the positions o... |
Determine two languages L and L1 on the alphabet {a,b} with regular L, L∩L1 is non-regular and L1 does not contain L.
I came up with this solution:
L = { w | w ends with the string aba}
L1 = {w | w = w^r (palindrome) }
L∩L1 = {w | w ends with the string aba AND w is palindrome}
I don't know if this is correct as a solu... |
I am puzzled by a point in this paper by Phil Wadler.
Figure 6 shows a proof of the law of the excluded middle, $A ∨ ¬A$. The computational interpretation of this proof exploits the ability of classisal [sic] control operators to return multiple times from a single term. The term of type $A ∨ ¬A$ first returns an inje... |
I have been trying to understand the following proof but so far no cigars.
My Understanding:
For a given function $f$ we can define $C_{1}(f)$ as a $k$-DNF formula where $k$ represents the size of the certificate and where every clause in the formula is a different certificate. Similarly we can define $C_{0}(f)$ as a $... |
I've done some PL-related work in Rust that requires some proofs to guarantee the resulting language is free of data races. I'd like to include such work in a paper, but I'm not sure whether I should just formulate the work using operational semantics or whether that approach is becoming outdated, and tools like CoQ ar... |
Binary search is the well-known algorithm that compares the input value to an entry in a sorted array, and based on the result then decides to check the same input value against another entry either on the left or the right of that array entry. The number of comparisons needed is O(log(n)), but we can specify the numbe... |
I don't know the name of this algorithm, but anyway it was interesting to share (btw Linear sieve, Sieve of Atkin and Sieve of Pritchard performs better)
The main idea is to use the Fundamental theorem of arithmetic, and iterate through primes and at each prime cancel out every possible number expressed as a product of... |
In the context of finite, simple, undirected graphs, associate with each node $v\in V$ an integer $n(v)$ (you can limit this to positive integers without loss of generality). Create the set of edges by defining a threshold $T$, and join an edge $x,y$ iff $n(x)+n(y) \geq T$. These are called threshold graphs$^{[1]}$ and... |
I'm studying for final and currently stuck in the question below.
You have an embedded processor. It has its L1 instruction and data cache.
No L2 or last level cache are available. Consider the following assumptions.
The processor core is running at 2 GHz.
Memory access instructions are 25 % of total instructions.
Rea... |
Two sorted arrays A and B are given having size l and m respectively. Our task is to find the median of these two sorted arrays combined. Suppose the length of the combined array is n i.e. n = l + m.By definition the median will be greater than half of the elements and less than the other half.
Suppose A[i] is the me... |
Research on Photorealistic 3D Virtual Environments for Robotics
Background
I am engaged in a robotics research project focusing on the development and evaluation of photorealistic 3D virtual environments. Our approach integrates Neural Radiance Fields (NeRF) with Unreal Engine 5 (UE5) to create realistic environments f... |
I am studying the cycle cancelling algorithm for the minimum cost flow problem, and I can not understand the proof of the following:
If there no negative cost cycles then you have a minimum cost flow. The other direction is easy but I am stuck with this one.
If you want to get a smaller cost with an augmentation on the... |
I've been reading on the Tree-vs-Aversary game in the example of proving the lower bound of a Decision Tree in the context of Resolution Refutation Proof Complexity.
While I understand how the Adversary game can be used in proving the lower bound of the depth of the tree, I have problems visualising the Tree-vs-Adversa... |
I am currently trying map a grammar to a graph in the context of syntax- and graph-based testing.
However, until now I haven't had an enlightenment how would I map non-terminals and terminals to nodes and edges in relation to the following quote?
... [Terminal Symbol Coverage] and [Production Derivation Coverage]* can... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.