instruction
stringlengths
0
29.8k
⌀
null
I'm still a bit confused about the `transp` operator in Agda. > `transp : ∀ {ℓ} (A : I → Set ℓ) (r : I) (a : A i0) → A i1` Is found [this](https://arxiv.org/pdf/1802.01170.pdf) paper and I wonder if there is a relation to Agda's `transp`? >![](https://i.stack.imgur.com/IclvW.png) As far as I understand, the...
`transp` In Agda
|type-theory|agda|cubical-type-theory|
I'm still a bit confused about the `transp` [operator](https://agda.readthedocs.io/en/latest/language/cubical.html#transport) in Agda. > `transp : ∀ {ℓ} (A : I → Set ℓ) (r : I) (a : A i0) → A i1` Is found [this](https://arxiv.org/pdf/1802.01170.pdf) paper and I wonder if there is a relation? >![](https://i.sta...
I'm still a bit confused about the `transp` [operator](https://agda.readthedocs.io/en/latest/language/cubical.html#transport) in Agda. > `transp : ∀ {ℓ} (A : I → Set ℓ) (r : I) (a : A i0) → A i1` Is found [this](https://arxiv.org/pdf/1802.01170.pdf) paper and I wonder if there is a relation? >![](https://i.sta...
I'm still a bit confused about the `transp` [operator](https://agda.readthedocs.io/en/latest/language/cubical.html#transport) in Agda: >``` >transp : ∀ {ℓ} (A : I → Set ℓ) (r : I) (a : A i0) → A i1 >``` Is found [this](https://arxiv.org/pdf/1802.01170.pdf) paper and I wonder if there is a relation? >![](http...
$\newcommand{\nuSwap}{\nu\textsf{-swap}}$ *Two Hamiltonian cycles are different if and only if there is at least one edge they do not share.* Let $L$ consist of all graphs with exactly two Hamiltonian cycles. What complexity class does it belong to? Let us construct an NTM $M$ that decides $L$ in polynomial ...
Hardness of finding exactly two Hamiltonian cycles in a graph
|complexity-theory|np-complete|co-np|
I'm still a bit confused about the `transp` [operator](https://agda.readthedocs.io/en/latest/language/cubical.html#transport) in Agda: >``` >transp : ∀ {ℓ} (A : I → Set ℓ) (r : I) (a : A i0) → A i1 >``` Is found [this](https://arxiv.org/pdf/1802.01170.pdf) paper and I wonder if there is a relation? >![](http...
I found the following question in my book: > For probabilistic games like backgammon, where there is a resource > limit, the RB-Expectimax algorithm is used. > > Assume that it is known that the heuristic function h in the > Expectimax-RB algorithm holds: -1 <= h(s) <= 1 for each state s. > > How can this al...
Expectimax Pruning
|artificial-intelligence|search-trees|minimax|pruning|
|algorithms|artificial-intelligence|search-trees|minimax|pruning|
null
null
Given a function like: f(x) = x=y then 1 else 0 The number y is a natural number, other than that is unknown I had two approaches in mind: - The function is computable since an algorithm exists, that can compare two numbers, and tell whether they are equal return 1, otherwise 0. - The function is not ...
Is this function computable?
|computability|
I want to prove that the language $\text{Max-Unique-Clique} = {<G> | \text{The maximal clique of $G$ is unique}}$ is in $\Sigma_2^p$ by using the following $\Sigma_2^p$ machine: 1. The machine guesses $k$ and verifies that there is a subset of size $k$ that is a clique. If not, it rejects. 2. It verifies that all...
Max Unique Clique in $\Sigma^2_p$
|np-hard|decision-problem|
A common definition of a computable function $f(x) : \mathcal{X} \to \mathbb{N}$ is as follows: > There exists a Turing machine that given $x\in \mathcal{X}$ on its initial tape will produce $f(x)$ after a finite amount of steps. Note that it only requires such a Turing machine to *exist*. Now for your questio...
Monte-Carlo Tree Search is not an exhaustive search algorithm. It just does a certain amount of iterations, and then it is done. The branching factor has a (dramatic) influence on the size of the search space, but this does not affect the runtime of MCTS. Note that if the search space is a lot larger, the quality of...
The IR given in Appel's book ([Compiling with Continuations](https://www.cambridge.org/core/books/compiling-with-continuations/7CA9C36DCE78AD82218E745F43A4E740)) is certainly well explored and battle-tested in production compilers. I have been able to find several works based on or inspired by it (either by Appel himse...
Given a function like: f(x) = x=y then 1 else 0 The number y is a natural number, other than that is unknown I had two approaches in mind: - The function is computable since an algorithm exists, that can compare two numbers, and tell whether they are equal return 1, otherwise 0. - The function is not ...
By its nature abstraction reduces the communcation of information, both to the programmer and to the lower layers of the system (the compiler, libraries, and runtime system). In favor of abstraction, this generally allows the lower layers to assume that the programmer is not concerned with any unspecified behavior, pro...
Given a DiGraph $G=(V,E)$, I'm wondering if there's a way to determine the largest number of disconnected arcs? There is a similar problem for vertices (Maximum Independent Set). However, I'm unable to think of the corresponding problem for arcs. When I say "disconnected arcs" I mean the following: - $(u,v)$ to ...
How to determine the largest number of disconnected arcs in a graph?
|graphs|graph-traversal|
$\newcommand{\comp}{\mathsf{comp}}$ $\newcommand{\hcomp}{\mathsf{hcomp}}$ $\newcommand{\transp}{\mathsf{transp}}$ $\newcommand{\transport}{\mathsf{transport}}$ Compared to the paper you're reading, Agda divides $\comp$ into two distinct operations: 1. $\hcomp$ is like $\comp$, but the $A$ parameter is not all...
We proved that, there exist no algorithm so it can tell us if an algorithm halts or not (a.k.a. the halting problem is undecidable). But it surely can handle some of those; can we tell which of those it can handle, and which not? If we can't, can we tell which of those we can tell if it can handle or not? And even if n...
Can we tell if we can tell if an algorithm halts or not?
|decision-problem|halting-problem|
$\newcommand{\comp}{\mathsf{comp}}$ $\newcommand{\hcomp}{\mathsf{hcomp}}$ $\newcommand{\transp}{\mathsf{transp}}$ $\newcommand{\transport}{\mathsf{transport}}$ Compared to the paper you're reading, Agda divides $\comp$ into two distinct operations: 1. $\hcomp$ is like $\comp$, but the $A$ parameter is not all...
Arithmetic encoding is one of the most famous entropy encoding techniques, and I am using it to encode an image. For this, I am using the built-in function of Matlab that also gives other values such as seq, counts, and source along with the binary code. From theory, compression is done based on the probability distr...
Calculation of compression ratio using arithmetic encoding?
|arithmetic|data-compression|coding-theory|encoding-scheme|entropy|
If I understand your question correctly, you are considering an algorithm $A$ that, when run with an input $x$, which is in turn an algorithm, *attempts* to predict whether $x$ halts or not. Notice that $A$ could accept, reject, or run forever. Now you consider the language $H_{A}$ containing all algorithms $x$ ...
If I understand your question correctly, you are considering an algorithm $A$ that, when run with an input $x$ (which is in turn an algorithm) *attempts* to predict whether $x$ halts or not. Notice that $A(x)$ could accept, reject, or run forever. Now you consider the language $H_{A}$ containing all algorithms $...
null
null
If you set a timeout on the decision algorithm $A$ (let us call this variant $A'$), then by running it on any input you will get either a *yes/no* answer or a *don't know*. And this is precisely the question you are asking, "which of those it can handle, and which not", where "it" is $A'$.
null
Prove if $A,B$ are NP-complete then $((a, b) \mid a \in A \lor b \in B)$ is also NP complete I can understand why the union and intersection of 2 NP-complete languages are true but for statement above I can't understand why and how to prove.
Prove if $A,B$ are NP-complete then $((a, b) \mid a \in A \lor b \in B)$ is also NP complete
|complexity-theory|np-complete|
I have an object that is moving towards origin and I want to determine when it will reach or pass through it. I receive points in real time, which represent the current location of the object. Naive approach: For each received point: - Calculate distance between current point and origin. - As the object approac...
Detecting if an object reached origin
|algorithms|python|
To prove it is in $\mathsf{NP}$, use both certificates for $A$ and for $B$, and check if one of them is verified. To prove it is $\mathsf{NP}$-hard, you can find a reduction from $A$ to $L = \{(a,b)\mid a\in A \lor b\in B\}$: since $B$ is $\mathsf{NP}$-complete, it is neither the empty set nor the universal set. Let...
I have an object that is moving towards origin and I want to determine when it will reach or pass through it. I receive points in real time, which represent the current location of the object. Naive approach: For each received point: - Calculate distance between current point and origin. - As the object approac...
I am a research scholar currently working in computational complexity. I am working on a decision problem $P$ that is known to be W[2]-Hard parameterized by the solution size on split graphs. As split graphs are subgraphs of chordal graphs, if a problem is NP-complete on split graphs, it is also NP-complete on chordal ...
Parameterized intractability relation between split and chordal graphs
|algorithms|complexity-theory|np-complete|
I am a research scholar currently working in computational complexity. I am working on a decision problem $P$ that is known to be W[2]-hard parameterized by the solution size on split graphs. As split graphs are subgraphs of chordal graphs, if a problem is NP-complete on split graphs, it is also NP-complete on chordal ...
I am a research scholar currently working in computational complexity. I am working on a decision problem $P$ that is known to be W[2]-hard parameterized by the solution size on split graphs. As split graphs are chordal graphs, if a problem is NP-complete on split graphs, it is also NP-complete on chordal graphs. I won...
Yes, since the class of split graphs is a subgraph of the class of chordal graphs, you can define a `parameterized reduction` from the problem parameterized by output size on split graph to the same problem parameterized by output size on chordal graph with $(G, k)\mapsto (G, k)$ where the output of the reduction is th...
Given two sets of nonnegative numbers $X=\{x_1,...,x_n\}$ and $Y=\{y_1,...,y_n\}$, my problems consists in finding the partition $S \subseteq \{1,...,n\}$ and $\bar{S}=\{1,...,n\}\backslash S$ maximizing the following quantity: $$\frac{\displaystyle\left(\sum_{i\in S}x_iy_i\right)^2}{\displaystyle\sum_{i\in S}x_i^2}+\...
Partition of two sets to maximize a quantity, NP-hard?
|complexity-theory|np-hard|partitions|
null
null
I have a (2D) point cloud of reasonable size (say some thousands of points) and a set of (2D) polylines also of a reasonable size. I want to assess the discrepancies between the two geometries and for this I want to find the nearest point to every segment. This can be solved with the Voronoi diagram of the segments ...
Matching a 2D points cloud to polylines
|computational-geometry|nearest-neighbour|voronoi-diagrams|
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given b...
How to Think About Physical Design of Libraries in C++ When Considering the Deliverable's API?
|c++|design-patterns|api-design|
null
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making an application that does a whole bunch of complex mathematics. And, beforehand, you are given t...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
Since design ideas, and even the concept of Physical Design (exactly where you put your files), are such a broad topic, may I give a definite example and ask for feedback on the example? Suppose you are tasked with making a C++ application that does a whole bunch of complex mathematics. And, beforehand, you are give...
I can't find this from surface search in the literature When one observes/simulates NFA after processing several characters, one has to consider both "internal states of NFA" (individual nodes) and "state of the whole NFA" - which nodes are active - that can be seen as state of DFA that that automata is equivalent t...
Does there exist terminology to discern NFA states and NFA-transformed-into-DFA state?
|finite-automata|terminology|
null
A move of unlimited amplitude requires an unlimited amount of information for its description. There is no room in the model for such an amount, except on the tape. But it is not the purpose of the tape to encode move lengths explicitly.
I will share a pedantic answer: The first concept is called simply "state". Strictly speaking, the second concept does not exist, and reflects a misunderstanding of NFAs. NFAs are nondeterministic. This means that, at each step of execution, the NFA chooses one state to transition to (not a set of states; one s...
Given two sets of nonnegative numbers $X=\{x_1,...,x_n\}$ and $Y=\{y_1,...,y_n\}$, my problems consists in finding the partition $S \subseteq \{1,...,n\}$ and $\bar{S}=\{1,...,n\}\backslash S$ maximizing the following quantity: $$\frac{\displaystyle\left(\sum_{i\in S}x_iy_i\right)^2}{\displaystyle\sum_{i\in S}x_i^2}+\...
I know there are three barriers of computation; the thermodynamic barrier, the light barrier and the quantum barrier. Let’s say we figure out how to send signals FTL, learn how to get rid of excess heat and continue down the ladder of nanotech, picotech and femtotech. Is there a 4th barrier we might encounter at some p...
Is there a 4th barrier to computing?
|computability|hypercomputation|
null
null
In the paper [Tight Bounds for Lp Samplers, Finding Duplicates in Streams, and Related Problems](https://dl.acm.org/doi/abs/10.1145/1989284.1989289?casa_token=yjE1VqeXAYsAAAAA%3AcAeU-81J7AqJ8GqORSU8-6qi-3jhZKDGHbuOuzvzKBDShzBFhQpKORPmYgCEe4q-ylT4K4irNXGhqi8), the authors consider the **universal relation problem** in 2...
Understanding the proof of a property of universal relation
|randomized-algorithms|communication-complexity|