instruction stringlengths 35 29.1k |
|---|
I implemented a conforming (i.e. it creates Steiner points using Ruppert's algorithm) delaunay triangulator, which is working, but there is one step I am doing that I straight up don't understand and suggests something is broken.
After introducing a circumcenter of a triangle, I am having to check the entire mesh and r... |
I have the following recurrence relation that I am trying to solve using the telescoping approach:
$T(n) =
\begin{cases}
T(\frac{n}{4})+ n^2 & \text{for } n \geq 4
\\
1 & \text{otherwise}
\end{cases}$
I have this so far:
$T(n) = T(\frac{n}{4}) + n^2$
$T(\frac{n}{4}) = T(\frac{n}{16}) + (\frac{n^2}{16})$
$T(\frac{n}{16... |
I have a sequence of points over time, and a grid of X by Y cells to which I need to calculate the cells in which the points fall, as depicted in the diagram below
Another point now arrives (as depicted by the red dot to the right), the grid is stretched to fit the new data, and the containing cells recalculated
Know... |
Let's say I have a Monte Carlo algorithm $A$ that gives the correct answer with a probability $p$ > $1/2$. I don't have any information on if it's decisional or not.
I understand that I can make another algorithm $A'$ that runs $A$ for a number of times $k$ and returns the average (or the most repeated answer of $A$). ... |
Given a parsing expression grammar for a language, is there a way to make a parsing expression grammar for a new language that consists of the valid strings from the original language, plus the strings obtained by adding or removing a single character from an original language string?
|
Most OSes use the message passing system to let 2 processes communicated with each other.This works by a shared mailbox between the OS and each process loaded in the RAM however are there processes which have their own shared mailbox and can communicate without the OS acting as a middleman?
|
In 8086, as i know we need those segementation register to segment our memory because the address bus is 20 bit and register size is 16. So, If the register size and the address bus are equal and we can store all possible physical addresses in our registers like 80386 microprocessor, do we need those segementation regi... |
According to javatpoint, ready and wait queue are different. But according to wikipedia they are synonymous, in this context. Now I am more confused.
What I want to know is, when the parent process executes wait(NULL), in which queue it gets enqueued?
What I think is, since it blocked (or suspended), it should go in wa... |
If syscalls are meant to transition into kernel mode from user mode, what is the point of calling syscalls in the kernel?
Reference: https://stackoverflow.com/questions/15841327/can-we-call-system-call-in-kernel-space
|
Here I define $\Sigma_n^p$-SAT to be the problem of deciding if a boolean formula in prenex normal form with $n$ alternating quantifiers, starting with $\exists$, is satisfiable.
I found several mentions of complete problems for the classes of the polynomial hierarchy, but could not find if the completeness was taken w... |
I would like to model linked lists using set theory similar to that in Scheme and LISP.
There is a set theoretic definition of the ordered pair:
$p = \{\{a, 1\}, \{b, 2\}\}$
My question is how does one distinguish a value from a pointer to another list? Should I just use more types like $3$ for value and $4$ for point... |
I've been reading up on scheduling problems and the class of them that is NP-complete. Specifically, this is a foundational text on such problems, but the reductions are not clear to me. Can someone help identify the reduction from 3-partition, if I am trying to show the problem is NP-hard when I am scheduling tasks on... |
System F defines the data type pair as:
$$X\times Y := \Pi Z. (X\to Y \to Z)\to Z$$
with:
$$\langle x,y \rangle := \Lambda Z. \lambda p^{X\to Y\to Z}.p \text{ }x\text{ } y$$
Projections are defined:
$$\pi^1 p := pX(\lambda x^X.\lambda y^Y.x)$$
$$\pi^2 p := pY(\lambda x^X.\lambda y^Y.y)$$
It is easy to prove that:
$$\pi... |
i can't seem to find much info on the following question:
how (if at all) is the fixing of names to values (by binding or assignment) possible in a purely functional system like the lambda calculus?
i've seen examples of this being done in haskell, lisp etc. by using the 'let' or '=' operators.
to me it always reads li... |
I need to implement an algorithm to create schedules for round-robin tournaments (where each team faces each other team exactly once), but with the constraint that up to 2 teams – that may play in different leagues – might share the same field on the same time slot of the week, so they must never be scheduled to play a... |
How do I show that a (possibly partial) function is computable iff its graph is recursively enumerable?
|
Let $H=\left(V_H, E_H\right)$ and $G=(V, E)$ be graphs. A subgraph isomorphism from $H$ to $G$ is a function $f: V_H \rightarrow V$ such that if $(u, v) \in E_H$, then $(f(u), f(v)) \in E$. $f$ is an induced subgraph isomorphism if in addition if $(u, v) \notin E_H$, then $(f(u), f(v)) \notin E$.
A claw is another name... |
In the paper "Computability by Probabilistic Machines" by K. de Leeuw, E. F. Moore, C. E. Shannon, and N. Shapiro (in Claude E. Shannon: Collected Papers , IEEE, 1993, pp.742-771), a sequence (NOT a set) $S=(s_1,s_2,\ldots)$ is 1-computable if (I state it differently from the paper but equivalently) there is a Turing m... |
On a table there are $n$ stacks (numbered $1$ to $n$). Stack $i$ contains $i$ tokens ($1 \leq i \leq n$). During a move, a set of stacks can be chosen and the same number of chips can be drawn from each stack that is part of the chosen set. What is the minimum number of moves to make all stacks empty?
For example if $n... |
The state diagram for the initial part of this turing machine given as:
Here, we are basically traversing through the input tape, changing occurence of 'a' to X1, and 'c' to X2. After that we go back in the left direction until we find X1 again, and then we repeat the process, until both 'a' and 'c' are exhausted.
Whe... |
I came across the online course Design And Analysis Of Algorithms and the assignments have several questions that ask you to design algorithms, but you are not asked to implement them in code. I think I would have a deeper understanding if I could see how to implement them in code, but there are questions covered on va... |
Defintitions:
A graph is said to be r-regular if every of its vertex has a degree $r$. A graph is planar if it can be drawn in a plane without any of its edges intersecting each other except at their endpoints. A graph is connected if there exists at least one path between every pair of its vertices. A tree is connecte... |
Consider the problem of minimizing the checkout price of a shopping basket in the presence of some discount rules:
There are $n \gt 0$ distinct products in our shopping basket. Each product is associated with a price $price_i \geq 0$ and a quantity $quantity_i \gt 0$. Without applying any discounts, the checkout price ... |
Let's say I have a set of two columns - Name, Surname. I have a list of possible values for
Name -> Jacob, John
Surname -> Mayerson, Kindle.
I want to generate a set of unique combinations for columns Name and Surname. The result looks like this.
--------------------
| Jacob | Mayerson |
| Jacob | Kindle |
| John ... |
I am having great difficulty following the proof in class. I assume "optimal" means it minimizes the Average bit length to encode an alphabet with known frequencies. My understanding of how the algorithm works is by building a tree in a "bottom up" fashion. The least frequent alphabets are at the bottom and fused into ... |
If we have some function, $f$ with an exponentially sized domain, mapping the set $\{0, 1\}^N$ to $\{0, 1\}$, could we do something like this:
For ease, let's say $E(x) = x^e (\text{mod} \; n)$. This is the encryption function.
Now, let's say we represent $f$ with some $x$. I'm not exactly sure how this can be done---m... |
It is pretty well taught that any binary function can be represented using CNF. But conversion to CNF can take an exponential number of gates. The truth table is exponentially sized relative to the number of input variables.
Is there any form of representing truth tables that requires only a polynomial or quasipolynomi... |
I need to find an algorithm for a modified version of the stable marriage problem. In particular, I need to find all possible stable matchings and not only one (unlike what the Gale-Shapley algorithm does). The only solution I have is to recursively enumerate all the possible matchings, discarding the recursive branche... |
I need to find an algorithm for a modified version of the stable marriage problem. In particular, I need to find all possible stable matchings and not only one (unlike what the Gale-Shapley algorithm does). The only solution I have is to recursively enumerate all the possible matchings, discarding the recursive branche... |
How is the path matrix created by the Floyd Warshall algorithm used for path lookup?
The 2 images show the graph (b) and the path matrix (c). Both are taken from the book: Foundations of Algorithms by Richard E. Neapolitan.
To lookup the best path from a node to another, how would I use this path matrix (c)?
The metho... |
I'm trying to find an algorithm for this problem:
I'm going to the shop and need to buy X grams of an ingredient.
The shop does not necessarily have an "X grams of ingredient" product.
But they have N products with different weights.
Which combination of products should I buy so I end up with at least X grams of the in... |
Here is my code for computing the product of sequences of matrices
def product(A,B):
"""
Computing the product of two given matrices
Args:
- A (tuple): a matrix of size 2 x 2
- B (tuple): a matrix of size 2 x 2
Return:
- product (tuple): a product of two matrices A and B
"""
... |
I know the title is sort of misleading because we do have set-theoretic types in several languages:) From a theoretic view, set-theoretic types such as intersection, union, and negation may bring some troubles, as the proof object they do not encode the derivation, thus making it hard to find a logical part through the... |
Suppose I have a dynamic table supporting $Insert$ procedure, which sets an input value after the tail of the dynamic table. If the underlying table is already full, we multiply its size by $q > 1$. (I have proof that that arrangement leads to amortized constant time for $Insert$: see this post.)
My best attempt so far... |
In non-preemptive scheduling, the running process cant be interrupted .But what will when the CPU receive a hardware interrupt such as the an interrupt from the printer indicating that the current job has been completed ? Does the CPU will preempt the current running process and handles the interrupt ( run its interru... |
Recently, I began delving into complexity analysis with dictionaries. More specifically, I have been looking at auxiliary space complexity. For the most part, this type of analysis has been straightforward. For instance, suppose we have the following function foo, which takes in an integer n:
def foo(n):
d = {}
... |
Assume that you have an image that you going to classify its class ID.
One good option is to use interest points e.g FAST that can find coners/edges inside an image.
From these points you could classify a specific area....but how do I know which area I should classfy?
Assum that you're having a bunch of read dots over... |
I don't know if I asked the question in correct way but I will try to explain what's the thing I am not getting. I am currently reading book titled "Code: The Hidden Language of Computer Hardware and Software". In chapter sixteen, the book discusses structure of memory starting from latch. Following image shows 1 byte ... |
Let $G$ be a non-commutative group, such as $\operatorname{GL}_k(\mathbb F_p)$. Given a list $\vec{a}=(a_1, \cdots, a_n) \in G^n$, we use $(p, q, x)$ to denote the operation that maps $\vec{a}$ to $(a_1, \cdots, a_{p-1}, a_p x, \cdots, a_q x, a_{q+1}, \cdots, a_n)$. Do we have an algorithm running in time complexity $O... |
Say I want to build a trie out of 800,000 Sanskrit "base" words (in Devanagari script), with 20 prefixes and 2,000 possible suffixes. Each word is anywhere from 1-20 characters, and prefixes/suffixes are from 1-4 characters. The alphabet size (of the Devanagari script) is roughly 50 unicode characters.
We could say tha... |
I was studying Paxos and Failure Detectors, and it was asked whether a failure detector W could be used to make Paxos live, but I can't figure it out.
Any suggestions?
|
I would like to know if there is any research dealing with the problem of constructing an increasing family of expander graphs.
The goal is to find a family of expander graphs $(G_i)_{i \in \mathbb{N}} = ((V_i,E_i ))_{i \in \mathbb{N}} $ satisfying $V_1 \subseteq V_2 \ldots \subseteq V_n$ and $E_1 \subseteq E_2 \ldots ... |
Given an array of positive numbers with allowed replication, what is the algorithm to find the max amount possible only with summing or multiplying elements? All numbers must be involved in some operation.
I don't know how to look at this problem with greedy approach.
For example, given the array $[1, 1, 1, 1, 2, 2, 2,... |
I have a question on the implementation of the Johnson's algorithm in C that is actually at the interface of theory and practice.
Link to Johnson's paper
I already implemented this algorithm in R without any issue and did the same in C but I now have only one issue with the latter implementation.
Precisely I am struggl... |
A quick test shows what I'm describing:
> const text = 'foobarhelloworld'
> const pattern = /.+or/
> text.match(pattern) //=> 'foobarhellowor'
What is the basic algorithm for matching "anything up to some explicit text"?
The reason I ask is I am working on hacking together a spell checker / morphological analyzer, bui... |
So I have a regular language L and a non-regular language L' and i want to proof wether the union of both is regular or not.
Since I found counterexamples for both cases I want to look at more distinct cases to show when the union is regular and when it isn't:
case 1: L ⊆ L'
case 2: L ⊇ L'
case 3: L ∩ L' regular
case 4... |
I have a complete k-ary tree with a depth of $d$. If I'm given a node's depth-first index, I'd like a closed-form formula for calculating both the nodes children's depth-first indexes along with a formula for calculating the node's depth.
It's possible I just haven't searched the correct terms, but I was only able to f... |
Our current understanding of prime factorization states that it is hard to solve. The problem asks us to find the list of prime factors for an integer. For example, 18's prime factors are 3, 3, and 2. But since 3 is repeated, we only count it once.
But what about a slightly easier problem---finding how many prime facto... |
As a follow up to this question already been asked here, I was wondering - if we supposed that P != NP, would then the following reasoning be correct:
In NP problems we can only verify in poly-time whether x is in L based on the certificate that is also given as input. Hence we could be inputting the wrong certificate ... |
So I'm kind of confused as I'm not that deep into the algebraic theory of languages.
The wikipedia article states:
Another way to state Schützenberger's theorem is that star-free languages and counter-free languages are the same thing.
What does counter-free languages mean here?
Let's say that $CL$ denotes the class ... |
Assume we have this recurrence:
$$T(n)=2T(\dfrac{n}{2})+\dfrac{8}{9}T(\dfrac{3n}{4})+\Theta(\dfrac{n^2}{\log{n}})$$
We want to solve it using Akra-Bazzi method. As we know, $\sum_{i=1}^k\dfrac{a_i}{b_i^p}=1$. So $\dfrac{2}{2^p}+\dfrac{\dfrac{8}{9}}{(\dfrac{4}{3})^p}=1$ and we get $p=2$.
We know:
$$T(n)=\Theta\left(n^p(... |
Your classmates elected you to be in charge of the creation of the short and long distance running teams for the upcoming Sports Day event in your school. They have kindly given you their timings for both the short and long distance relay. Classes are will be ranked based on the shortest total time of both events combi... |
I have been reading these distributed computing notes. In some of the proofs, for proving lower bound of $\Omega(f(n))$, we prove that no algorithm which solves the problem in $o(f(n))$ exists.
I can't see how not having a $o(f(n))$ algorithm proves the lower bound is $\Omega(f(n))$.
I tried using the definitions, but ... |
I am looking at DAWGs, which are compressed tries, like this:
It is an acyclic graph though, and I'm wondering if you are allowed to create loops or cycles in such a data structure.
For example, I am thinking how to represent and store Turkish words in some sort of trie. Turkish can have almost an infinite number of w... |
Is there any books, papers or articles on how to analyze the time complexity of programs written in lazy languages such as Haskell?
I know how laziness is implemented and how it can be expanded and thus analyzed, but is there any "intuitive" methods that does not go deep into the low level implementation principles of ... |
My Problem
I'm currently dealing with an algorithmic problem that involves two input lists:
A list of natural numbers $[A_1, A_2, \dots, A_n]$ with $A_1, \dots, A_n \in \mathbb{N}$.
A list of triples $[(B_1, C_1, D_1), (B_2, C_2, D_2), \dots, (B_m, C_m, D_m)]$ with $m\geq n$, natural numbers $B_1, \dots, B_m \in \math... |
I am studying for an algorithm design course, and can't understand this demonstration about how Dinitz’ algorithm computes a maximum flow in $O(m \sqrt{n})$ time.
This is what is written on the slides I am reading:
Theorem. [Even–Tarjan 1975] In simple unit-capacity networks, Dinitz’
algorithm computes a maximum flow... |
There are three elevators in a building that has twelve floors. Find an algorithm that needs to find the best possible way for the elevators to stop at any particular floor considering the traffic waiting for the lift on that floor. Consider the following constraints:
there can be any number of people that need to use... |
Can we prove that classical search algorithms cannot do better than a binary search algorithm with complexity $O(log(n))$ ?
If so, how do we prove it?
|
There is an old CPU running a program in which memory operations
currently take 30% of its execution time. Scientists find that adding a cache memory
speeds up 80% of memory operations by a factor of 6. Adding a second level of cache
speeds up half of the remaining 20% by a factor of 3. By how much does the overall spe... |
I am exploring several approaches to summing floating point values, such as:
Naive summation, for comparison
Summing sorted values
summing with numpy, again for comparison
Kahan's algorithm
Pairwise summation
Kahan's algorithm on the same sequence sorted by absolute value
Pairwise summation on the same sequence sorted... |
We know that in the case where, L(D1) = L(D2), the problem is undecidable. But what happens when the languages are not equal?
I would assume it's still undecidable, but is it recognizable? And how would we build a recognizer for it?
|
While searching for the structure of the MMU, I found the image below (80386 Internal Architecture).
I have three questions.
Q1. I'd like to know the roles of 'Adder', 'Page Cache', and 'Control and Attribute PLA'.
I found some description for 'Control and Attribute PLA' (link below), but I still can't understand it.
h... |
I was trying to count the cpu_cycles from an ARM processor 4 core Cortex A78 to be exact) using the PMU registers. Now, at the beginning, I read the cpu cycles counter register, then for test just run one asm("nop") and then read the cpu cycles register back. I consistently get the result 7. At this point, if I add up ... |
I am using the JPS algorithm to find the shortest path from start $S$ to goal $G$ on a binary grid where each cell can be eithe 0 (free) or 1 (obstacle). Now, I would like my algorithm to take into account the distance between the path and the obstacles and to find a path that approximates the shortest, while being "sa... |
Currently P vs NP is the holy grail of theoretical computer science. And the nature of the problem is as such that if actually P = NP is proved then most of the proofs for mathematical statements would be trivial to find, and on the exact other end if P != NP is proved then one would appreciate the hardship of finding... |
There is an extremely standard proof that IP⊆PSPACE, used for instance here, here, or here, by the argument that the full protocol is max-avg game tree that can be evaluated in polynomial space. It's really clean and, dare I say, obvious as a first example of a simulation argument. Great! But that works as long as all ... |
I have a question about linear bounded automaton. Is it false that every recursively enumerable language is recognized by a LBA ?
Because LBA has limited tape size so not all recursively enumerable languages can be recognized by an LBA because some of them may require unbounded space for their recognition ?
|
I have written the following greedy stays ahead proof for the problem of covering an interval with subintervals. Is it correct? I think it is, but this is my first time proving a greedy algorithm.
Suppose you have a set of $n$ subintervals $\{1, 2,...,n\}$, and each subinterval has a left and right end $(l_i, r_i)$. Th... |
I'm trying to determine whether there exists a model for the following logical formula: $(p_1 \to (p_2 \lor p_3)) \land(p_2 \to \neg p_3) \land ((p_1 \lor p_3) \to \neg p_2)$. Here's my understanding of the formula: If p1 is true, then either p2 or p3 must be true, and if p2 is true, then p3 must be false. However, thi... |
I'm pretty sure b and d are ll2 and not one but not 100% sure.
(a) S → aaScc | aaBbc | aaBbb | aBb | ac | Ʌ
B → aBb | Ʌ
(b) S → aaScc | aaBbc | aBb | ac | Ʌ
B → aBb | Ʌ
(c) S → aaScc | aaBbc | B | ac | Ʌ
B → aBb | Ʌ
(d) S → aaScc | aaBbc | B | ac
B → aBb | Ʌ
|
This video of a group, who simulated (a very simple version of) Minecraft inside Minecraft itself got me thinking about the performance of such setups.
Another example to what I'm referring to, would be Conway's Game of Life simulating itself.
The first example runs through a bunch of modifications at 0.1fps and the se... |
I learned about abstract state macines recently, and on first sight they seem somehow reminiscent to TLA formalism. For example both:
Are used to research possible state sequence and prove safety/liveliness properties abot them
Use notion of refinement
Have specification language on top of them
So I wonder does one h... |
Given a string length $S$, find a substring length $k$ that has the most occurrences in the given string.
We want $O(S)$ time complexity in an average case.
I think the solution lies in sophisticated use of Rabin-Karp algorithm.
I've tried to use the sliding window method, but that results in $O(S * k)$ time complexity... |
What is the expected maximum matching size of a bipartite graph $(A\cup B, V)$ where $\lvert A\rvert = n$ and $\lvert B\rvert = n$ and the probability of a edge existing between $A$ and $B$ is a fixed $p$. If a general formula doesn't exist how about for $p = 0.5$ or some other $p$.
|
You have board size and one Knight but what is different is that when you move it you have to duplicate the knight and the 2 duplicates have to be in valid position from the knight
This gets repeated until the board is filled with knights just like visited in the original problem but both duplicates can be moved, once.... |
Problem definition
The world consists of an infinite three-dimensional cartesian grid, i.e. every position is in $P = \mathbb{Z}^3$.
Neighbours of a position $p \in P$ are defined by $N(p) = \{p + e_1, p - e_1, p + e_2, p - e_2, p + e_3, p - e_3\}$, where $e_i$ are the unit vectors, for example $e_1 = (1,0,0)^T$.
For a... |
Given a set $S$ of $n$ positive integers $S=\{a_1,\ldots,a_n\}$, can we partition $S$ into $k$ subsets of equal sum such that each subset has contiguous elements from $S$?
Here, a contiguous subset is in the form $\{a_i,a_{i+1},a_{i+2},\ldots\}$ for some $i$. For example, with $S=\{3,6,2,1\}$, possible contiguous subse... |
I am trying to implement a multi-agent path planning algorithm that works on non-planar graphs and large agents (that is, collisions may at the intersection of two edges and at points where the edges run beside each other, if the euclidean distance is small enough).
For context, one can imagine the given graph as repre... |
Why bit-based computer models?
The perhaps most commonly used computer model is a random access machine that can store natural (or even real) numbers in infinitely many cells indexed by natural numbers. This model's main benefit is that it greatly simplifies calculating Runtimes, as arithmetic and indexing are simply a... |
I'm building some teaching tools for teaching the lambda calculus and would like some kind of visual representation of it. I've looked at Alligator Eggs and while it is something very similar to what I'm looking for, I would like something that expresses church numerals in a more elegant way.
What other visual/graphica... |
First, can the Navier-Stokes problem be a formal computable one? like a P problem? Then, how to define the corresponding language? Would it only be the set of equations, or something else? Then, could the size of the input vary if the problem was the three dimensions one? Seems not if the number of equations is limited... |
As you know, big O notation hides all constants. For instance, both runtimes $T_1=n$ and $T_2=10^{10}n$ are considered to be linear ($\mathcal{O(n)}$).
Is there an iconic problem whose best known solution has a terrible (large) constant in the runtime expression?
|
Please explain to me if this is true or false. I had this in an exam, and I really need to know if I got this correct. I believe it is true because finite problems have finite solutions, which can be done in polynomial time.
|
L= {abc}
prefix = {epsilon,a,ab,abc}
suffix = {epsilon,c,bc,abc}
It's easy to find suffixes and prefixes for finite Regular languages. But what will be the approach for infinite Regular languages?
For example:-
Alphabet = {a,b}
L1 = Every string starts with a.
L2 = Every string ends with a.
L3 = {waw|w belongs to {a,... |
We got the following tasks in our Higher Algorithm class, to repeat our proof techniques from class:
Find asymptotic upper bounds (as sharp as possible) for $T(n)$ in each of the following cases,
using your favorite method.
You may assume that $T(n) < 10$ for all
$0 ≤ n ≤ 5$.
Where me and my colleague got stuck sp... |
I have read online and seen websites saying the optical disk drive is a storage device. In my opinion, the optical disk drive only writes data to the optical disk so it's not a storage device, am I wrong??
|
In simple precision format, the largest possible positive number is
$A = 0 ~~~ 11111110 ~~~ 111\ldots 111$
Its predecessor is
$B = 0 ~~~ 11111110 ~~~ 111 \ldots 110$
But what is the absolute difference (in decimal) between these?
Appealing to scientific notation,
$A = 0.(2^{22}+2^{23}+\ldots + 2 + 1) \times 2^{2^{7}+2^... |
Given sets A, B, C with a parent-child (one to many) relationship between A and B, and B and C.
There are concurrent attempts to modify the data.
Each concurrent modification has access to (a1, a2) in (A, A) different from all other modification attempts and a1 != a2. Each concurrent modification may change the parent ... |
I was given the following problem called the barter economy problem: Given a set of $n$ people $\{p_1, \ldots, p_n\}$ and a set of $m$ distinct objects $\{a_1, \ldots, a_m\}$, where each object $a_j$ is owned by exactly one person, and each person $p_i$ has a valuation function $v_i$ such that $v_i(a_j)$ is a non-negat... |
I am trying to wrap my head around the concepts of auto-reducibility and having access to an Oracle.
The way I understand is that a language is auto-reducible iff there is a Turing Machine $M^{L}(x)=1$ for every x $\in$ L with the special requirement that on input x the Turing Machine is not allowed to query the Oracle... |
In the book of Hopcroft-Ullman (the 1979 edition) there is a rule $Da\rightarrow aaD$ in the example of the CSL language $a^{2^i}$.
Valid rules in CSG have the form $\alpha A \beta\rightarrow \alpha\psi\beta$. I think the mentioned rule is not valid, since there is no way to get rid of the terminal $a$ at the right sid... |
As stated in the question title, if $f(n)$ has polynomial growth and $g(n)=\Theta(f(n))$, then how can we show $g(n)$ also has polynomial growth?
$g(n)=\Theta(f(n))$ gives us $0\leq c_1f(n)\leq g(n)\leq c_2f(n)$ for some positive constants $c_1, c_2$ for some $n>n_0>0$. But how can I conclude $g(n)$ also satisfies the ... |
Let's say that we have a set consisting of many strings encrypted with the same key by a xor cypher, moreover they are the same length as the key, both the key and the original strings might contain only small english letters and the space char.
We have encryption function E(k,m)=k⊕m and decryption D(k,c)=k⊕c, which me... |
In a graph with N nodes, where each node represents a house and is labeled from 0 to N-1, an adjacency matrix graph[i][j] indicates the distance from node i to node j.
Consider a list of tuples [[init_1, target_1], ..., [init_k, target_k]], representing delivery requests. Each tuple, like [[1, 2], [2, 3], [5, 3]], requ... |
I've been trying to wrap my head around the proof provided in this answer.
I understand that $P$ is a class where languages can be decided by a Turing Machine and that $P/poly$ is a bigger class that also includes languages that can be decided by circuits.
Take a language $L$ which is not in $\mathsf{E} = \bigcup_{c=1... |
I created a 8-puzzle search solver using BFS, A* with manhattan distance, and A* with misplaced tiles.
I generated data that said that for a particular random board, misplaced tiles did less node expansions to solve the board.
Is this possible?
I thought that manhattan distance is always less node expansions than mispl... |
Say I have an FPL class problem with the complexity O(2^k * n). If I limit the problem so that k is a known factor (for example 150). Then the complexity becomes O(2^150 * n). I have learnt that constants get removed from the complexity equation. Which means the complexity should now be O(n). Does this mean the limitat... |
I was wondering how you would go about making a two-tape Turing machine in linear time that starts with input # on Tape 1, where and are binary integers that might have leading 0's. It would accept the input if and have the same value such as 001101 has the same value as 1101. Would it be a good idea to replace the... |
$f$ and $g$ being known functions.
We suppose that the problem is solvable.
To me, for the moment, this question, if a decision problem it is or can be, is more an NP rather than a P problem, because if it was a P problem, we would have to answer it in polynomial time, and so test every $u$ function in a single polynom... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.