instruction
stringlengths
35
29.1k
I have a project in which I need to compare different distances in a database with a distance in input in order to identify a person. For that I use this expression: DistanceDB - DistanceInput < epsilon, if this is true then the distance and information in the Database row are related to the person standing before the ...
Is it possible to calculate the average between n numbers in a static random access array of some size in less than $O(n)$ time? I know that the trivial approach is $O(n)$, but can I do it in less time using a data structure or a certain preparation? or both? I am asking for hints, not a solution. Note: The array is of...
Given a $n\times m$ matrix $A$ of integers, find a sub-matrix whose sum is maximal. If there is one row only or one column only, then this is equivalent to finding a maximum sub-array. The 1D version can be solved in linear time by dynamic programming. The 2D version can be solved in $\cal O(n^3)$ by looping over all p...
I have here a little problem with my homework, and would appreciate some direction. I am attempting for some time now to show that every planar graph is embeddable into a grid (As large as needs be). I tried to make this argument inductively in many ways, but I am afraid that I don't see any good way to do that so far....
The language recognized by an automaton is defined as the set of strings that are accepted by the automaton. I wonder if it is possible that the languages recognized by two automatons are the same? Note, if I am correct, the most general automatons are the Turing machines, and the languages recognized by an automaton a...
I understand that most problems are trivial if a halting oracle is available (or, I think equivalently, hyper-computation). However, applying the argument that shows the Halting Problem is impossible for a Turing machine also shows that it is impossible for a Turing+oracle to decide the Halting Problem for a Turing+ora...
Wikipedia says: A trio is a family of languages closed under e-free homomorphism, inverse homomorphism, and intersection with regular language. A full trio, also called a cone, is a trio closed under arbitrary homomorphism. A (full) semi-AFL is a (full) trio closed under union. A (full) AFL is a (full) semi-AFL cl...
I am referring to the algorithm from the Wikipedia page on the Floyd–Warshall algorithm. In case of undirected graphs should I change the assignment statement inside the if condition to dist[i][j] = dist[j][i] = dist[i][k] + dist[k][j] or they are equivalent?
From Wikipedia's definition of regular langauges The collection of regular languages over an alphabet $Σ$ is defined recursively as follows: The empty language $Ø$ is a regular language. For each $a ∈ Σ$, the language $\{a\}$ is a regular language. If $A$ and $B$ are regular languages, then $A \cup B$ (union), $A •...
I think I understand the RP complexity class (along with coRP, BPP, and ZPP). However, I can't seem to think of how an RP algorithm might be formulated. How can the random coin flip possibilities allow for a guaranteed response of NO when the correct answer is NO, yet return with a probabilistic chance YES or NO when t...
Got a simple construction seemingly contradicting a paper assuming plausible conjecture. Since it is unlikely the conjecture to be false, what is wrong with the argument? From a paper An AND-compression is a deterministic polynomial-time algorithm that maps a set of SAT-instances $x_1,\dots,x_t$ to a single SAT-inst...
I am trying to prove the NP-Hardness of the MAX-CUT problem. Other sources seem to reduce from the NAE-3SAT problem, however I have been trying to reduce from PARTITION because PARTITION and MAX-CUT are both in Karp's list of 21 NP-Complete problems and this is the reduction that he did [1]. PARTITION: Given ($c_1,c_2,...
Which cache strategies/algorithms (especially for L2 Cache) are used in practice and don't exist solely in research/theory? There is a list on Wikipedia which does not state which algorithms are really used. Bélády's Algorithm for example would be as far as i understand it the best solution but is impossible to be used...
I try to compute the asymptotic runtime for this algorithm and compare it with other algorithm $A = (C -(D * E ) ) mod p$ $ B = ((C * (D)^{-1} - (E * F ))$ mod p if we suppose each value A, B, C, D, E, F has O(log n) bit My attempts were as follows line one = $O(\log n)^2$ + log n line two = $O(\log n)^2$ + $O(\log n)^...
A nondeterministic automaton, after reading an input symbol at some state, may jump into any of a (finite?) number of states. Does the automaton uniformly randomly choose one out of the several states? So different runs on the same input will give different sequence of states? Does the automaton have to run in all t...
In the paper: Leslie Lamport: What It Means for a Concurrent Program to Satisfy a Specification: Why No One Has Specified Priority; ACM Symp Principles of Programming Languages, (POPL-12):78-83, 1985. Lamport shows that "...existing specifications that claim to describe prioirty are either vacuous or else too restric...
This is the edited question: Suppose I have $(x_1 \vee y_1 \vee y_2)$. x is existential and y is universal. Then it should be like this in the quantifier string: $\forall y_1 \forall y_2 \exists x_1$ (WHY?) Now suppose I introduce a new variable z and convert the above clause to: $(x_1 \vee \neg z \vee y_2 ) \land (...
I've just wondered if there is a difference between symbol recognition, classification and identification. What would you use when you have a hand-written symbol and you want to get the LaTeX code for it? Is that symbol classification, because you have about 1200 classes of LaTeX symbols? Or identification? Are some of...
Let's say I have a set $A$ of $n$ points represented by real vectors of length $l$. What type of algorithm would I use to find the subset $B$ of $m$ ($m$ is arbitrary, to be chosen) points that maximizes the volume of the polytope with vertices defined by $B$?
This is meant to be a fun question, and I hope it's not too off topic. Is there a defined mathematical object or data structure that has a name collision with a type of physical tree in the real world? In computer science we have red-black trees, B-trees, quadtrees, and so on. In the biological sense of the word tree,...
Though facing the fear that someone might not like my question but does somebody know a useful tool to either resolve left recursion or to simplify a context-free grammar automatically ? I need to resolve a rather long chain of left-recursion in my grammar. So far I've tried this algorithm and this tool. But both are...
Is there an algorithm to check whether an integer $n$ is a square? What about higher powers, e.g., testing whether $n$ is a $k$th power? I understand that the Jacobi symbol $\left(\frac{b}{n}\right)$ can be computed in $O(\log n)$ without needing to know the prime factorization of $n$ but then this seems to be useful ...
Can anybody give me a hint on how to get rid of the left recursion in the following grammar? $$A \rightarrow B \mid a$$ $$B \rightarrow b \mid C \mid D \mid E \mid F \mid G$$ $$C \rightarrow c \mid A d$$ $$D \rightarrow A e \mid f$$ $$E \rightarrow g \mid B h$$ $$F \rightarrow i \mid A j \mid k$$ $$G \rightarrow l \mid...
I've learned about tableau calculus which is a decision procedure solving the problem of satisfiability of a first order logic formula. Now I'm wondering why this technique can't be used to solve the satisfiability problem (SAT)?
Couldn't the type inference in Apple's new programming language Swift had been done more aggressive? For instance why can't the return type of a function be deduced? func sayHello(personName: String) -> String { let greeting = "Hello, " + personName + "!" return greeting }
I started reading the book "Data Structures and Network Algorithms" by Robert Tarjan, which is a classic (but a bit outdated - 1983) and I am a bit perplexed by the paragraph in the first chapter, Page 3, first paragraph. I have attached the paragraph below: An important caveat concerning random-access and pointer m...
For a single stream of elements as input every elements should be routed into a fixed number of $k$ output streams trying to keep them balanced. In the following example $k=3$ : Let's define as flow a sequence of element of the same type represented in the following diagrams using the same colour. Every flow must be r...
I have a list of millions of pairs of strings, and I want to join all of the pairs that have matching members into lists without duplicates. Example input: [["A", "B"], ["A", "D"], ["M", "Q"], ["A", "F"], ["D", "E"], ["Q", "Z"]] Example output: [["A", "B", "D", "E", "F"], ["M", Q", "Z"]] Does anyone know of an ...
Given a statement in natural language, what can be said about how many possible translations there are in first-order-logic? What happen if we take a more complex logic like second-order logic and what if we take a less complex one?
Do there exist two computable functions, a and b, which can construct every computable function by a finite serie of a's and b's which is function composed? Fx. let's take the serie, a,b,a,b,b,a,a,a , which function composed is the function, a∘b∘a∘b∘b∘a∘a∘a ( =a(b(a(b(b(a(a(a(x)))))))) ), this function is the function ...
I'm resolving this question of Hopcroft and et al Book. Figure 1 below is a marble rolling-toy. A marble is dropped at A or B. Levers $x_1,x_2$ and $x_3$ cause the marble to fall either to the left or to the right. Whenever a marble encounters a lever, it causes the lever to reverse after the marble passes, so the next...
I need to place N rects on a 2-dimensional grid with constraints. For the each rect height/width and placing limitations($x_{min}$-$x_{max}$) are known. The problem is to place all rects on a grid with no intersections that every rect's bottom left $x$ is in rect's $x_{min}$-$x_{max}$. I've implemented the naive solut...
The plots in http://blog.wolfram.com/2014/06/04/how-the-wolfram-language-measures-up/ seems to indicate that Pascal has a relatively high code density. What features of the language makes it so? Follow-up question: Does this explain why Pascal are often introduced in high schools as one of the first programming langua...
I'm looking for an algorithm that do the following thing. Given $n$ the number of rows and columns of a matrix of positive integers. Given $(x_1,y_1)$ the starting coordinates. Given $(x_2,y_2)$ the ending coordinates. and $k$ an integer. This are some rules of how you can travel through the matrix: When stepped in so...
Suppose we are given a list of $n$ events $E = \{E_1, E_2, \ldots, E_n\}$ where each $E_i$ is represented by $(s_i, h_i, v_i)$ or $(start, hours, value)$. So if you attend an entire event that lasts 5hrs and has a value of 10 then you will gain 10 points. If you only attend for 3 hours, you only get 3*(10/5) = 6 points...
some questions have been popping up recently on ambiguity in CFLs/CFGs which can have subtleties (eg languages vs grammars & ambiguity vs inherent ambiguity). wikipedia states: Many [context free?] languages admit both ambiguous and unambiguous grammars, while some languages admit only ambiguous grammars. the senten...
During an interview for a Java developer position, I was asked the following: Write a function that takes two params: a String representing a text document and an integer providing the number of items to return. Implement the function such that it returns a list of Strings ordered by word frequency, the most freq...
From Wikipedia Since there is a one-to-one correspondence between linear-bounded automata and such grammars, no more tape than that occupied by the original string is necessary for the string to be recognized by the automaton. Note: If I am correct, "such grammars" mean context-sensitive grammars. I wonder if t...
I have a 20-dimensional dataset, with a large amount of data points. I would like to have each dimension discretized into bins. Per bin, I would like to be able to access two neighbours per dimension (i.e. +1 and -1 per dimension). Basically I want to be able to easily access 2*d (where d is the dimensionality) neighbo...
how can i design XML Schema for logical and digital circuits? i cant find any help or manual for this work for example i have a digital circuits with AND OR NOR ,... gates now i want design xml and schema for that thanks for help soryy for bad english
I am confronted with task to find polynomial time complexity solution for weighted hitting set problem. I have found that usual hitting set problem is NP-complete and therefore the task seems to be contradictory. But there are several other reformulations of this problem. E.g. d-Hitting set problem can be solved in pol...
I was trying to prove the following: if x%(x/2) != 0 or x%(x/2) == 0 then x%(x/y) != 0 or x%(x/y) == 0 such that y = [2,4) So I am trying to figure out whether a number can have a factor in between its half and its fourth. I am trying to use it in a factoring algorithm.
A domino tiling is a tesselation of a region in the plane by 2 × 1 squares. What is a good data type for storing and manipulating such objects? In my current manipulation, use an array to store all the half-squares numbering them 1-2 for a horizontal domino, 3 4 for a vertical. It's not ideal but I can draw the tili...
How is Combinatory Logic relevant to software design? For example, can one transform programs into CL? If so, how? Does CL provide a canonical representation for programs?
Is there an algorithm to check whether an integer $x$ is a square modulo $n$, where $n$ is an integer whose factorization we do not know? Is the Jacobi symbol helpful? What about higher powers, e.g., testing whether $x$ is a $k$th power modulo $n$?
In the seminal paper "Causal memory: definitions, implementations, and programming", distributed causal memory is defined to ensures that all the processes in a system agree on the relative ordering of operations that are causally related. Its implementation: For its implementation, each process maintains a private c...
Let $s$ be the source vertex. In the standard Bellman-Ford algorithm (e.g. the version found in CLRS), when there is a negative cycle reachable form $s$, the algorithm will return that a negative cycle is found. But let's say I am interested in the shortest path from $s$ to some vertex $a$, and it might be that there ...
We have two binary strings, $X$ and $Y$, in two different computers. Both of them in length $n$. The computers can communicate by sending bits to each other. We have to build randomized algorithm to check whether there's an index $i$ such that $X_i=Y_i$. We can send only $O(\log n)$ bits between the computers. If there...
I have a question about Locally Linear Embedding. I am trying to study this algorithm and implement it for better understanding. I have read An Introduction to Locally Linear Embedding. However, I don't think I really understood this algorithm. There are several questions I want to ask. I understand that this algorith...
I want to better understand how OS provides heap memory to a process. Here by heap memory I mean the memory allocated dynamically, say by call to malloc. When a process is newly created, does OS reserve some heap memory for it? If a process calls malloc, does OS associate a "Page" (from paging concept) with process an...
I have a tree with percentages of the following form 100 / \ / \ / \ / \ 25 75 / \ / | \ 15 10 35 10 30 / \ / \ 1 9 5 5 / | \ 3 3 3 So child nodes are added up in the parent node. Does a tree with this attrib...
Given a system of two Boolean Algebra equalities a = b. c = d. one can exhibit a single equation F(a,b,c,d) = 0. which is equivalent to the former system. (Symmetric difference is pivotal for constructing such quaternary operation F(a,b,c,d)). Questions: Is there binary operation x ? y (infix notation) such that a ?...
An exercise from the book Foundations of Algorithms Using Java Pseudocode: Write an efficient algorithm that will find an optimal order for multiplying $n$ matrices $A_1 \times A_2 \times \ldots \times A_n$, where the dimension of each matrix is $1 \times 1$, $1 \times d$, $d \times 1$ or $d \times d$ for some con...
I think the following proof found in a textbook is circular, since the proof for case n=n'0 assumes the case n=n'1 and vice versa. Am I missing something? Proof that the semantic function N is a total function from binary strings into the integers: Let N be defined thusly: N(0) = 0; N(1) = 1; N(n0) = 2*N(n); N(n...
Can someone help me to store the factorial of large numbers such as 100! efficiently? UPDATE: obviously, storing the argument rather than the factorial digits themselves achieves a significant saving. The true challenge is to find a data compression scheme that achieves a significant compression ratio, but with a light...
This question is about the intersection of probability theory and computational complexity. One key observation is that some distributions are easier to generate than others. For example, the problem Given a number $n$, return a uniformly distributed number $i$ with $0 \leq i < n$. is easy to solve. On the other han...
I read about Big-O notation with modular arithmetic. So, Time complexity is commonly estimated by counting the number of elementary operations performed by the algorithm, where an elementary operation takes a fixed amount of time to perform. Thus the amount of time taken and the number of elementary operations performe...
At page 277 of Sipser's Introduction to the Theory of Computation, a proof of the NP-completeness of SAT is given. The following comment is made on the trace of some machine $N$ which can decide a language $A\in\mathrm{NP}$: "Next, we take any language $A$ in NP and show that $A$ is polynomial time reducible to SAT. Le...
It is often stated in the CS folklore that Turing was inspired by Gödel's incompleteness theorem, more specifically the diagonalization proof and the isomorphism between axiomatically generated statements (Gödel numberings). Are there other such links between model theory and computer science? Should a computer scient...
This quote on descriptive complexity theory is given in Wikipedia: "The first main result of descriptive complexity was Fagin's theorem, shown by Ronald Fagin in 1974. It established that NP is precisely the set of languages expressible by sentences of existential second-order logic; that is, second order logic excludi...
The page on descriptive complexity theory in Wikipedia states the following: "First-order logic defines the class FO, corresponding to AC0, the languages recognized by polynomial-size circuits of bounded depth, which equals the languages recognized by a concurrent random access machine in constant time." How can we sho...
I'm having trouble understanding the point of Subnet Masks. I was reading a nice article on Tech-FAQ on the topic, but it has left me a bit confused. When I first heard about Subnets, it was explained to me that these are small independent networks connected to the main internet at one point. For example in an office b...
Lower complexity bounds tend to be a very hard problem in general. Despite this, I was wondering if there are any theoretical results that relate lower complexity bounds for some class of problems in the case where mutation is allowed and in the case it's not allowed? In particular, what type of problems would be inher...
If I had a heap like the following: with blue blocks being occupied memory and white blocks being free memory What is the general name given to the situation illustrated, where the free and occupied cells become distributed almost 'randomly'? This is an exam question, I've tried searching online and through the provid...
as i read some material about Optimal BST, i ran into a trouble. for following key i find two optimal BST with Average Cost = 30. 1 optimal BST using Dynamic programming Algorithm and 1 by hand ! key : 1/ 2/ 3 /4/ 5 frequencies: 10 / 8/ 6/ 4/ 2 i think always the Optimal BST using dynamic programming always h...
Mr. and Mrs. Smith, a married couple, invited 9 other married couples to a party. (So the party consisted of 10 couples.) There was a round of handshaking, but no one shook hand with his or her spouse. Afterwards, Mrs. Smith asked everyone except herself, “how many persons have you shaken hands with?” All 19 answers we...
I want to study theory of computation on my own, so I am looking for books. What set of books would you recommend for the equivalent of a one-semester course that introduces theory of computation? Please post answers that describe a complete curriculum, explaining which chapters of each book are relevant at which stage...
Note its not a homework question, just practice Hi i have always seen linked list implementation in java using the following piece of code class Node { int key; Node prev; Node next; } I implemented linked list using single array which could be increased as per need. (Took code of ...
For a given sufficiently strong formal axiomatic system $\mathsf{F}$ (like $\mathsf{PA}$ or $\mathsf{ZFC}$) and any given function $p^*(x)$ that can be specified within the formal system $\mathsf{F}$, Hutter's algorithm $M_{\mathsf{F},p^*}$ computes the function $p^*(x)$ nearly as quickly as any (provably quick) algori...
Say I am using boost or the built-in float or double mathematical libraries of my C++ compiler. I distribute the program. Will the execution of my C++ program on different machines given different floating point results given that the FPU is CPU specific and AMD may not return exactly the same thing as Intel or ARM. Sh...
I found an algorithm for finding the shortest path on grid between selected cell, to all cells on the grid, with $O(KN)$ where $K$ is the number of neighbor cells and $N$ is the number of cells. How ever if that's true than it's better than A*, Floyd–Warshall and many others. So I probably mistaking some thing. Can you...
I'm interesting in teaching programming to middle school students. I'd like a programming language with the following criteria: Simple - pared down to the absolute minimum needed to support sophisticated programming without too much code. As such, for this language, I'm not interested in pointers and am weary of obj...
Section 12.4 of G.V. Bard's Algebraic Cryptanalysis discusses the XL-algorithm (first reported by N.T. Courtois and A. Shamir in Efficient algorithms for solving overdefined systems of multivariate polynomial equations and Courtois' thesis). The technique is based on the following. Say we have a system of polynomial eq...
I have a following problem: Let $P^{SAT[1]}$ be a class of problems decidable by a deterministic polynomial Turing Machines with SAT oracle. (only one question to oracle). Assume that: $\mathrm{co}NP \neq NP \neq P$ Decide if $coNP \cup NP \neq P^{SAT[1]}$ or $\mathrm{co}NP \cup NP = P^{SAT[1]}$. I know how to show th...
In CLRS (on pages 49-50), what is the meaning of the following statement: $\Sigma_{i=1}^{n} O(i)$ is only a single anonymous function (of $i$), but is not the same as $O(1)+O(2)+\cdots+O(n)$, which doesn't really have an interpretation."
Suppose we have a conjecture on graph theory that can be (dis)proved by means of a counter example, then, is it true that every alternative (dis)proof of the conjecture can be mapped to a counter example? This is in the general case, but for instance, can any proof that the hadwiger's conjecture is false be mapped to ...
Given a string, take all of its substrings (including the empty string). For example, given $abc$, we can form a set $\{\emptyset, a, b, c, ab, bc, abc\}$. Given a regular language, take all the substrings of each of its strings, and form a language thereof. I wonder if the formed language is still regular? Btw, is t...
I am reading over the article found here specifically §D.4.4 Exceptions, Flags and Trap Handlers and am confused by the table D-4 in that section. Specifically the arguments sent to the trap handler for the overflow and and underflow exceptions. It shows round(x2-α) as the argument for both the over and underflow con...
I'm having trouble figuring out the upper bound running time for this scenario: Input: $N$ number of strings $M$ upper bound of string length $T$ threshold for edit distance (2 strings with a Damerau-Levenshtein edit distance lower than $T$ are considered "duplicate") Expected values $N \approx 1,000,000$ $M \appr...
As i passed PHD entrance exam, some days ago, i want to find solutions for challenging problem. In Bayes network on X={X1,...Xn} each random variable has P parents and Q child's. for Xi we want to find minimum number of variable that Xi independent from other variables. at least, how many variable we need? i think, we...
Given a connected graph $G = (V,E)$, assume that there are partitions $\{p_0, p_1, ..., p_k\}$. Denote the partition set of a vertex $v \in V$ as $p(v)$. The neighborhood of a vertex $v$ is denoted as $N(v)$ I need to find a 4-clique $V' = \{v_0, v_1, v_2, v_3\}$ such that the total degree of $V'$ is maximum and $\fora...
Consider the function $B:\mathbb{N}\rightarrow\mathbb{R}$ defined by $$ B(n) = \begin{cases} 1 &\text{if $n\le 2$}\\ B\left(\left\lceil\frac{n}{\log_2n}\right\rceil \right)+n&\text{if $n\ge 3$} \end{cases} $$ I'm having a lot of trouble with this question. I tried substituting things like $n=2^...
Suppose we have two sorted arrays $A$ and $B$, and we want to find the indices in $B$ of all elements of $A$. We can do this in $\mathcal O(|A|\log|B|)$ time by simply binary searching $|A|$ times. We can do it in $\mathcal O(|A| + |B|)$ time by iterating through the arrays together like the merge phase of a mergesort;...
The problem I have is given a Tree graph , and two paths from u1 to v1 and u2 to v2 where u1,u2,v1,v2 are vertices of the Tree . How efficiently can we check that whether they are vertex disjoint paths or not ? The solution I thought was that the LCA of (u1 and v1) should be the ancestor of u2 or v2 or vice versa . But...
Note: This is part of a homework exercise. I am asking for clarifications, not a solution! Given: Assume $g: \mathbb{N} \mapsto \mathbb{N}, g\in R$ ($R$ is the class of recursive functions) is a strictly monotone function, i.e., $\forall n\in \mathbb{N}: g(n) < g(n+1)$. Prove that $g(\mathbb{N})$ is decidable. Clari...
I've found an algorithm that acts like a depth first traversal that don't recognizes nodes that have been visited before. A / \ B C \ / D | E If run on this graph, the algorithm will traverse in this order: A, B, D, E, D, B, A, C, D, E Is there any way I can express the run-time complexity of this algorith...
I hope I'm in the right section: I know that if P = NP, then 3-SAT can be solved in P (Cook), but is the opposite valid, too? If P != NP, then 3-SAT is not in P? Thanks!
I got an unweighted, undirected graph, with $N$ vertices, where each vertex has degree $K$. In my case its a grid with dynamic obstacles. My goal is to output a map, based on given location on the grid, with the shortest path to all the cells on the grid, some thing like this: 4 3 2 3 3 2 1 2 4 x x 3 5 6 5 4 The sta...
As a foreword, I'm not asking what the algorithm is, just whether one can possibly exist (though, if it does already exist and someone knows what it is, that'd be great). Basically, given two sets $S$ and $T$, I want to compute the two set differences $I = T \setminus S$ and $R = S \setminus T$. The goal is that if $S$...
We let $\alpha = \alpha_1\alpha_2\alpha_3\ldots$ be an infinite random sequence (under the uniform measure) where $\alpha_i$ may be $1$ or $0$, and then define the boolean function $B_k$: $$ B_k(\alpha_1\ldots\alpha_k) = \begin{cases} 1 \text{ if at least } \lceil k/2 \rceil \text{ of its inputs are } 1 \\ 0 \text{ o...
Given a weighted, undirected graph $G = (V,E)$, how can I compute the average weight of edges? It seems an easy problem (divide the total weight to the number of edges!) but I couldn't manage to find the sum of the edge weights since each edge can be counted several times while iterating through the vertices.
I am having trouble understanding a part of the proof of Lemma 2 (Page 184). It says the length of the tour is $$ \leq \lceil n^{1/2} \rceil + \triangle(n + \lceil n^{1/2} \rceil) + \sqrt{2} $$ I don't understand how they came up with this inequality. I can understand where the $\sqrt{2} $ comes from, since we have to...
The related and interesting fields of Information Theory, Turing Computability, Kolmogorov Complexity and Algorithmic Information Theory, give definitions of algorithmically random numbers. An algorithmically random number is a number (in some encoding, usually binary) for which the shortest program (e.g using a Tur...
I would like to know if there is a known decision problem with the following characteristics: Represented in unary, the problem is decidable in polynomial time. Represented in binary, the problem is not decidable in polynomial time (and this fact has been proved, not just conjectured). For example, Subset-Sum is in $...
$\text{HAMPATH} = \{(G=(V,E),s',t')| \text{ G has a Hamilton path from s' to t' } \}$ $\text{LONG-PATH} = \{(G,s,t,k) | \text{G has a simple path p from s to t, length(p) $\geq$ k} \}$ I'm trying to prove a polynomial reduction, $\text{HAMPATH} \leq_p \text{LONG-PATH}$. My thought was to take an instance of $\text{HA...
The Berman-Hartmanis conjecture more or less states that if one-way functions exist, there are some problems in $NP$ which cannot be polynomially reduced to $NP$-complete (cf. Ker-I Ko, A Note on One-Way Functions and Polynomial-Time Isomorphism). Since the Cook-Levin theorem states that $NP$ is polynomial-time reducib...
I know that there is something called partial correctness, but I was wondering if there was a way to tell how close a semi-correct program is to a fully correct program. For example, if you had a sorting program that almost completely sorts an array, could you use Hoare logic to determine how close it is to getting th...
A recurrence relation computes value $d_n$ with the $\{d_{i},d_{j}\ldots\}$ previous digits of the sequence So for example, the Fibonacci sequence is defined as follows: $$ F_n = F_{n-1}+F_{n-2},\ \ \ F_0=0, F_1=1 $$ The classic closed form solution is given by the Binet formula: $$ F_n = \frac{\phi^n-\psi^n}{\sqrt{5}}...
In combinatory logic, the axiom of composibility asserts that for any two combinators, $A$ and $B$, there exists a combinator $C$ that composes $A$ and $B$. That is, for all $A,B,x$ there exists a $C$ such that: $CABx = A(Bx)$. But what if $A$ and $B$ have arities other than 1? In particular, suppose that $A$'s ari...
I currently studying machine learning and pattern recognition area. Today, my professor said implementing an unsupervised system that automatically labels data is difficult. Why is that? I think if I am given a data set, then I can categorize all data into groups. Then, for unknown input data, I can extract features an...