instruction stringlengths 35 29.1k |
|---|
Consider the following code, found on wikipedia, that implements the Crout decomposition algorithm:
void crout(double const **A, double **L, double **U, int n) {
int i, j, k;
double sum = 0;
for (i = 0; i < n; i++) {
U[i][i] = 1;
}
for (j = 0; j < n; j++) {
for (i = j; i < n; i... |
Given a weighted complete bipartite directed graph K_{m,n}, is it possible to find a simple cycle (every node is visited at most a single time) with minimal weight in polynomial time (in m*n) when there exist simple cycles with negative weight?
For general graphs this problem is NP-complete (Finding the lowest-weight ... |
Java 8 got a new implement to hashmap (using a tree). I have understand that in the worst case, it may be O(n) for lookup.
Will changing this implement to an avl tree change this O(n) case to something better (without changing the other complexities)?
here are some notes on it:
This map usually acts as a binned (bucke... |
A Markov decision process is typically described as a tuple $\langle A,U,T,R \rangle $ where
$A$ is the state space
$U$ is the action space
$T: A \times U \times A \mapsto [0,\infty) $ is the state transition probability function
$R:A \times U \times A \mapsto \mathbb{R}$ is the reward function
What does this $A \ti... |
I am looking for an algorithm to compute the convex hull of a set of $n$ points $P$. The hull should contains $m$ points. This algorithm should work in time $O(\min(mn,n \log n))$.
My first guess was QuickHull, which has a best case running time of $O(n \log n ) $ and a worst case running time time of $O(n^2)$. However... |
I am trying to solve a practice problem from my textbook which is to draw an FA from this language: L(ab* a*) U L((ab)*ba)
I need help to draw the second part L((ab)*ba). I know the shortest string is ba, then it is abba, ababba, abababba, etc.
I started off with this to show the shortest string:
However, now I need t... |
I am reading up on graph theory from the book Algorithm Design Manual - Skiena. And he shows a structure of a graph as follows :
#define MAXV 100 /* maximum number of vertices */
#define MAXDEGREE 50 /* maximum outdegree of a vertex */
typedef struct {
int v; /* neighboring verte... |
I am printing a document and I want to print an emblem on it that will be copy resistant.
For example, let's say I print the document using a 600 dpi printer. Someone copies the document on a photocopier that both scans and prints at 600 dpi. What dither pattern can I use that will be most likely to make it obvious tha... |
I know it is supposed to be some arbitrary term that is a stand-in for a large class of possible objects.
But I still don't understand what part of the array the term "key" is meant to represent or denote.
Does it mean an element of the array? The index of the element of the array? Some arbitrary function from the elem... |
A friend of mine asked me a question on how to prove that merging two sorted arrays requires at least 2N - 1 comparisons
Prove that merging two sorted arrays of N items requires at least 2N-1 comparisons.
/*
* An example program that merges two arrays to prove that merging two
* sorted arrays takes 2N - 1 comparis... |
I'm trying to check if my understanding of variable elimination is correct.
Assume the above Bayesian network is factorized as:
$p(a,b,d,e,l,s,t,x) = p(a)p(t|a)p(e|t,l)p(x|e)p(l|s)p(b|s)p(d|b,e)p(s)$
Suppose I want to find $p(e|s)$, this means performing $p(e|s) = \sum_{t,l}p(e|l,t)p(t)p(l|s)$
Now, $p(e|l,t)p(t)= \fra... |
I need some help with a question. I'm currently studying for an exam and I could therefore use some help with this following question:
Order the following formalisms (but one) according to their expressive power: placing A before B means that any language definable by A is definable by B. Also state which, if any, of t... |
I want to find some characteristics for a set of points $S$ which contains $n$ points and has some Voronoi Diagram $V(S)$. This diagram should have exactly $2n-5$ vertices.
I tried to use the Euler formula for planar graphs which says $v-e+f = 2$:
$\Rightarrow 2n -5 -e + n = 2 \Rightarrow e = 3n-7$ - but what can I now... |
In decidability theory, I understand that if a problem is labeled "decidable", then we can construct a Turing Machine that definitively tells us whether an input is valid or invalid. My question is what does "undecidable" mean ? I read the "undecidable" applies to problems that have Turing Machines but cannot definitiv... |
The wikipedia page for the Halting problem mentioned practical solutions to avoiding the halting problem such as avoiding infinite loops. And there is a mention that "by restricting the capabilities of general-purpose (Turing-complete) programming language, it is possible to guarantee the completion of all sub-routines... |
So, here's the problem:
Suppose that $A=(Q,\Sigma,\Gamma,\delta,s,\bot, F)$ is a PDA, let
$$L = \{ \gamma \in \Gamma^* \hspace{5pt}|\hspace{5pt} \exists_{x,y\in \Sigma^*} \exists_{q\in Q}: (s,x,\bot)\vdash_A^*(q,y,\gamma)\}$$
Show that $L$ is regular.
So far solution has been eluding me, any hints are welcome.
|
Say one has a $D \times n$ matrix $A$ all of whose entries are non-zero. One wants a method which will look at each of the columns of $A$ one by one and create new $m \ll D $ dimensional columns and stack them up as a matrix $A'$ of dimension $m \times n$ such that
$$\|A^TA - A'^T A'\|_2 < \epsilon$$
for some given $\... |
The wikipedia article for primitive recursion mentions a limitation that primitive recursive function can't compute the function $ ev(i,j) $ which computes the $ i $th primitive recursive function on input $ j $.
I was wondering what you can compute with primitive recursion equipped with $ ev $, which I will refer to a... |
I'm putting together a primality tester for large numbers. When the numbers were smaller things were more straightforwards. I got refined it to a point where I could quickly test any number within the range of long long ints. I wanted to be able to test larger numbers. I've gotten it to read the numbers in as strings t... |
I have problems understanding Lamport's bakery algorithm. The thing I do understand is that each thread ask all other threads what number they have.Then the thread takes the maximum number and add 1 to that and give that number to itself. The thread with the lowest number can enter the critical zone and if two or more ... |
I have a stationary mono camera which captures a single image frame at some fps. Assume the camera is not allowed to move,how do i generate a stereo image pair of the acquired frame? Is there any algorithms exists for this? If so, do they available in Open-CV?
|
I am writing optimization program for unrelated parallel machine scheduling problem on CUDA. Now, the only thing I am missing are some test cases.
Does anyone know where I can find such data? I have been searching for a while but I've only found this: http://people.brunel.ac.uk/~mastjjb/jeb/info.html. Unfortunately th... |
Use the pumping lemma for context-free languages to show that the following
language is not context-free: $ L = \{0^i 1^j 2^i 3^k \mid k=i+j \} $
So I have started like this:
Let us assume that $ L = \{0^i 1^j 2^i 3^k \mid k=i+j \} $ is a context-free language. Then $ ∃ p∈N $ such that $∀ w∈L$, $|w|≥p$, then $∃ u,v... |
Wythoff's game is as follows: there are two players $A$ and $B$ ( $A$ being the first player ) and there are $2$ piles of stones. When his turn a player can remove one or more stones from anyone pile or same number of stones from both the piles. A player unable to make a move loses. Also it is assumed that both the pl... |
I'm currently working on a static analysis work in which I need to check whether a given formula is met or not. I hope the following example clarifies my requirement.
Suppose we have a list of three-addressed expressions whose operators are simple arithmetic and bit-wise operators (such as add, sub, and, xor). Each exp... |
I have two very large files with numbers seperated by commas. What is most efficient/fastest way to say with some confidence that these two files have same numbers.
The main rule if if two distributions are the same, also the order of data does matter for example:
A = {1 2 4 5 6}
B = {6 5 4 2 1}
C = {0.5 0.5 1 2 3 4 5... |
Consider a graph with vertices 1,...,n and suppose that each of the $\binom{n}{2}$pairs of vertices is, independently, an edge of this graph with probability p.Let $P_n$ denote the probability that this graph is connected.
(a)I want to derive an expression that involves $P_k$ for the probability that the vertex set {1,... |
I have a question about the following problem and the two points need not be located on the circumference of such "smallest circle". I know this is a linear-programming problem but I just don't know how to solve it mathematically.
Give two planar points p1=(a1,b1) and p2=(a2,b2) and a line y=0,
design an algorithm ... |
The cut property stated in terms of Theorem 23.1 in Section 23.1 of CLRS (2nd edition) is as follows.
Theorem 23.1 Let $G = (V, E)$ be a connected, undirected graph with a real-valued weight function $w$ defined on $E$. Let $A$ be a subset of $E$ that is included in some minimum spanning tree for $G$, let $(S, V-S)$ b... |
I'm trying to detect quasi cliques in an undirected graph. My problem is that I don't want any overlap between cluster.
I'm currently trying to detect community using Louvain algorithm, but it detects subgraphs with a low clustering coefficient (0.60) and when I detect maximal or quasi cliques they tend to overlap.
Ho... |
There are algorithms to change the forms of words, to define the subject of the text, as well as the definition of his style (literary, business, scientific, etc.). Do you have any ready ideas or solutions with the help of machine learning methods to change the text style?
|
At first I thought the language would be context sensitive because it seems that it can be shown with the pumping lemma for regular languages, that it's not a regular language and analogously with the pumping lemma for context free languages, that it is not context free. But it upon further pondering I came up with a p... |
The question itself:
Let $f:\mathbb{N}\to\Sigma^\star$ be such that $f(n)$ returns the $n$-th word in $\overline{H_{TM,\epsilon}}$ (which is the complement of the language of TMs which accept $\epsilon$, i.e. the TMs which reject or do not halt on $\epsilon$). Prove/disprove: $f$ is computable.
My approach:
I started... |
Suppose that $M$ is a full model of the simply typed lambda calculus. Suppose each base type is infinite.
Now suppose that $f$ and $g$ are two functions in $M$ (not necessarily in the same domain) that are not definable by any pure term, and that $\alpha$ is a pure term of the $\lambda$-calculus such that:
$$M(\alpha) ... |
Could someone explain how to calculate the following 3 evaluative properties:
Intercluster Variability (IV) - How different are the data points within the same cluster
Extracluster Variability (EV) - How different are the data points that are in distinct clusters
Optimum value of k
The third one I believe is by min E... |
Given a graph with weighted edges. How to find the shortest path from vertex $A$ to vertex $B$ that passes through a set of edges $X$ at most once? $X$ can be big.
Slow solution:
Finding shortest path from $A$ to each edge of $X$ and shortest path from each edge to $B$ in graph $G\setminus{X}$. Combining those paths an... |
I am currently working on a paper based on the topic of creating a source-to-source compiler from an existing application to C#. The existing application is actually just based on XML files, which define certain logic and are interpreted by another program.
From my point of view I tend to say that I am working on a sou... |
I am experimenting with the sorting of arrays and their execution times.
While using bubblesort, insertsort and quicksort, I have observed that relative standard deviation (%RSD) of execution times, for five hundred arrays of the same size containing random integers, decreases if the size of the arrays increases.
For ... |
Let's say I have a transaction history, like this:
Transaction #1: Add 5
Transaction #2: Add 8
Transaction #3: Remove 2
Transaction #4: Cancel Transaction #2
Is there a way to guarantee that no transaction will ever be removed, or at least I will notice a missing transaction?
Basically I want to enforce to make a tra... |
I have posted the same problem to Math Overflow, not sure where it fits better.
I have the following problem to solve: Given a set of sequences of edges of an undirected, planar, connected graph, find a "reasonable" reconstruction of the graph. There is an unknown number of vertices in the graph, but it's given that ea... |
A computer can only process numbers smaller than say $2^{64}$ in a single operation, so even an $O(1)$ algorithm only takes constant time if $n<2^{64}$. If I somehow had an array of $2^{1000}$ elements to process, even an $O(1)$ operation such as an index lookup will start to take longer as the index has to be calculat... |
Intel 8085 is a 8 bit processor whereas 8086 is a 16 bit processor,what does the number of bit specify?
|
I have a set of $N$ items to fill a knapsack with maximum capacity
$W$ and the maximum number of items that the knapsack can carry is $N_{m}$ items. The problem can be formulated as following:
max $\sum_{i=1}^{N} w_{i}x_{i}$
subject to
C1: $\sum_{i=1}^{N}w_{i}x_{i}\le W$.
C2: $\sum_{i=1}^{N}x_{i}\le N_{m}$.
C3: $x_{... |
I have the following exponentiation routine, which takes $O(\log n)$ steps
function power(a:real, n:positive integer)
begin
x:=1;
i:=n;
while i > 0 do
begin
if(i % 2 == 1) then //i odd
x:=x*a
i:=floor(i/2)
if(i > 0) then
a:=a*a
end;
power:=x
end
I'm trying to prove that it always ... |
I read up on the Perwitt operator and it detects two types of edges (vertical and horizontal). The Sobel operator on the other hand does the same as the Perwitt except that the masks are not constant and could be dynamically adjusted. Why do the Sobel and the Perwitt matrices compute horizontal and vertical gradients? ... |
How can I prove that the language $L = \{0^nw1^n\mid n\geq0,w\in\{0,1\}\}$ is irregular? I've tried the pumping lemma but that seems not to work.
|
The question:
Let $L_1,L_2,...$ be an enumeration of $\mathcal{R}$ and define $A_i = \{\langle M\rangle \ | \ L(M) = L_i\}$. Let $L$ be a language in $\mathcal{RE}$ such that $L \subset \{\langle M\rangle \ | \ \text{M is a TM that always halts}\}$. Prove that
there exists an $i$ for which $L∩A_i = ∅$.
Hint $\downa... |
I work in renewable energy. My company gathers a lot of data from equipment. This typically includes process data (such as transformer temperature, line voltages, currents, etc.) and discrete alarms (e.g. breaker trip, inverter alarm values, transformer over temperature alarm). This is a rough example of what our data ... |
how can i prove that T(n)=T(n-2)+T(n-3)+T(n-4)+2 is O(logn)?
or T(n)=T(n-1)+T(n-3)+1 the same..
when T(0)=1 T(1)=2 T(2)=3 T(3)=5 T(4)=8 etc`..
it's a Q about AVL-2 tree,the same rules of AVL tree who rotate after 3 levels diff between L,R childs.. and not 2 as AVL tree
thanks for all.
|
Consider a Binary Deletion Channel with a deletion probability p of 1/2 and the channel has no error correction coding at all and that any given message can only be sent once. I want to conjecture that the capacity for the aforementioned channel is zero ( channel capacity for the Deletion Channel is presently unknown),... |
Task : Given $X$ random variables. Find out the minimum conditional entropy for a variable $x_i \in X$ when $x_i$ is conditioned upon any combination $k$ remaining variables.
Find $min(Entropy (x_i | k\,variables))$. Value need not be exact, approximate solutions are fine.
However, I am wondering is it possible to find... |
So after learning about DFS and BFS yesterday in my class I was curious as to how is scanning on various file system being done. I spent quite a bit of time trying to look for some references on the web, but so far I have failed in doing so. I'm assuming that either DFS or BFS are behind the core "scanning" in some fil... |
After researching concurrency I am unable to discern if it is either of these specifically or it encapsulates both?
I was also wondering if someone could provide some programming applications/real world examples I am struggling to grasp the concepts entirely and it feels like every where I look people have different un... |
Wikipedia does not list insertion complexity for arrays in the list of linked-list implementations.
Is this because insertion operations are not defined on the array ADT?
|
Let $G=(V,E)$ be a vertex weighted DAG (Directed Acyclic Graph), with positive real valued weights.
Let also $k\leq \left\vert V\right\vert$, is there any way to find a maximum weighted antichain over $G$ (a set of vertexes $A\subseteq V$ where there is no edges between elements of $A$) , with cardinality less or equal... |
I have a solid with internal holes. My solid is mostly a union between walls/floors/ceilings. Each of them is a mesh with polygons oriented counter-clockwise. Then with those polygons I do a union that serves to delete the intersection between the solids. Which leaves me with only one solid made of polygons.
In term of... |
I have to prove that if L <=p L1 intersection L2, where L1 and L2 are described as above, L belongs to NP.
I thought about the definitions of P and NP and built a DTM D that decides L2 and a NTM N that decides L1. Then I tried to build a NTM NN that accepts when both D and N accept on some input w.
Now,did I really pro... |
I have a Travelling Salesman Problem, where I want to retrieve the "shortest" (approximate solution) circuit including the nodes n_1..n_n in a graph. The graph, however, includes a second set of nodes, say, o_1..o_n, which CAN but do not NEED to be included in the route (see picture).
i.e., this means, in the graph, I... |
Example:
Suppose I have a number a with 100 decimal digits, b with 200 decimal digits, and m with 10 decimal digits.
Would the speed of the computation a mod m vary greatly from b mod m because of the size of a vs b?
|
This is a question I want to answer in pseudocode: This is regarding a sort of priority queue using an AVL tree.
I initialize a global variable (named GLOB) with 0.
I receive from the user an input integer of VALUE and i'm required to insert it into an AVL tree.
So i created an AVL tree, where each node contains a key... |
As you see in the following picture its a shared-memory architecture which has been modeled in a form of complete graph.
Why we can consider the following architecture (which is a complete graph) both as shared-memory and distributed-memory architecture?
I know it seems to be an distributed-memory architecture but can... |
I've had several Computer Science courses and, from what I recall, I've never been given a rigorous definition of suitable encoding. Definitions always tend to use effective method or some synonym to define a suitable encoding, even though the reason we are defining suitable encodings is to formalize what an effective ... |
I have a set of numbers, and want to calculate the maximum subset such that the sum of any two of it's elements is not divisible by an integer $K$.
I tried to solve this problem, but I have found the quadratic solution, which is not efficient response.
$K < 100, N < 10000$, where $N$ is the number of elements and $K$ i... |
Consider a full set-theoretic model of the simply typed $\lambda$-calculus with infinite base types. Say that an element in this model is pure if it is the semantic value of some closed pure term in this model, and impure otherwise.
Intuitively pure functions ought to be blind to the differences between impure functio... |
We are given $n$ objects with individual weights $w_1 , w_2 , \ldots , w_n$ and $m$ buckets in which these objects are to be inserted but in order. Here order means if object $i$ goes in bucket $m_i$ and if object $j$ goes in bucket $m_j$ then if $i < j$ then $m_i \le m_j$.
Objective of the problem is the minimize the ... |
I read Dalal and Triggs paper for HOG description and a blog Chris McCormick HOG regarding the same. The blog says that the image needs to be re-sampled at different scales to recognize different person.
My question is: Already we have a window which we place on the image having a size of 64*128 and which slides over ... |
I'm reading Homer and Selman's "Computability and Complexity" book. In some Corollary 5.3 it says:
For all ε > 0, DTIME(O(n)) = DTIME( (1+ε) n).
Now I'm confused with this corollary and Rosenberg's result (p87 in the same book):
DTIME(n) ≠ DTIME(2n).
Why can we not use the corollary to show that DTIME(n) = DTIM... |
In the Space (Time) Hierarchy Theorem and also fully space (time) constructibility of two function we have the condition: being greater than $log(n)$ (being greater than $n$).
Why do we have these conditions?
|
I know that you can calculate the shortest path in a vectorized fashion using Floyd-Warshall, e.g. like proposed by Han and Kang, however I want the matrix, they call "via", the actual route taken through the graph.
Is it possible to retrieve this "via" matrix from a similar vectorized algorithm?
Actually I do not need... |
I am looking for the longest simple path in a directed, cyclic and weighted graph with positive and negative weights.
In my research so far I have found out that you need to generate -G from graph G and then run a shortest path algorithm on it to find the longest path in G. Of course this won't work if -G contains nega... |
I am currently working on a project that involves a mixed-integer non-linear optimization problem, and wondering if I can state that this problem NP-hard in a research paper. I'm not looking for a formal proof as much as a reasonable argument and/or a citation.
The MINLP has the following general form:
$\begin{align}
... |
I'm taking a course on Coursera about approximation algorithms for fun and one of the modules uses probability to analyze the cost of a linear program with randomized rounding solution to the set cover problem.
One of the problem set questions is a basic probability question and is as follows:
You ask ten of your frien... |
We are modeling our process using a colored Petri net. One of the limitations we have is that when multiple transitions depend on one place, only one of those transitions will fire because then the token and data is consumed.
How can we model our process, or what type of Petri net property can we use, to facilitate the... |
I'm taking a course on Coursera about approximation algorithms for fun and one of the modules uses probability to analyze the cost of a linear program with randomized rounding solution to the set cover problem.
One of the techniques employed is Wald's equation for dependent decrements, described in Neal Young's Notes o... |
I'm running a q-learning agent in tic tac toe against a minimax agent and measuring the tie rate (since you can never win against minimax). When I run 10,000 training games, I've found that there seem to be two drastically different patterns:
1) Q-learning agent has a bad start and ends up with an overall tie rate of ... |
Why can high-level languages seemingly never reach lower-level languages in terms of speed? Examples of high-level languages would be Python, Haskell, and Java. Low-level languages would be trickier to define, but let's say C. Comparisons can be found all around the Internet$^1$ and they all agree that C is a lot faste... |
I was thinking as follows: At each step, a PDA can put arbitrary many symbols onto the stack. But this number is constant for every individual PDA, so it can't be more than, say, $k$ symbols per step. Using only regular transitions, the stack can rise to maximally (more or less) $kn$ symbols in a run on an input sized ... |
Iv'e been struggling a lot with this one.
I am looking for a data-structure (could be a modification of an existing type of data-structure, or a combination of more than one data-structure), which supports the following methods, all with time complexity (at worst-case) of $O(log(n))$:
Insert(v) - insert v to the struc... |
I was reading hashing from CLRS. In it author says:
Let $\mathscr{H}$ be a finite collection of hash functions that map a given universe $U$ of keys into the range ${0,1,...,m-1}$. Such a collection is said to be universal if for each pair of distinct keys $k,l\in U$, the number of hash functions $h\in\mathscr{H}$ for... |
I am reading an article by Cook [1]. In it he writes:
The set of perfect squares is in P, since Newton's method can be used to efficiently approximate square roots.
I can see how to use Newton's method to decide whether a natural number is a
perfect square or not, but it seems tricky to analyse.
Is there an easier wa... |
We're creating our own programming language for a subject. And we're confused whether to add the names of the functions we want to have in our language (like our own version of print) in the BNF grammar.
Reserved words should be recognized by the lexer, right? How about function names?
|
Consider an unweighted, undirected, simple graph $G=(V,E)$. We have some subset $S \subseteq V$, and we want to determine the shortest distance from any vertex $v\in V$ to some vertex $s\in S$.
To be clear, each $v\in V$ has a distance $d_1, d_2,\dots , d_{|S|}$ to each $s\in S$, and we want to find the smallest value... |
Alphabet is {a,b}, the third element from the start must be "b" (e.g: aab..., abb...) and the third-last element must also be "b" (e.g: ...baa, ...bbb). I can do them separately but at the same time I don't know where to start. Help please.
|
I would like to know why the average number of nodes at level d in BFS in a search tree is $\frac{1+b^d}{2}$ as given in this lecture(p.15)?(Here b is the branching factor of the tree and d is the depth of the tree)
I think that as average tells us to take the sum of the numbers and divide by how many numbers are prese... |
My question is pretty simple and to the point. Is there a known way to efficiently compute logistic maps to within a specified precision? In other words, the input is a value $x$ and integers $d,n$; the desired output is the result of $n$ iterations of the logistic map applied to $x$, to $d$ bits of precision.
I know ... |
Given a string $\alpha$ that is derived from context-free grammar $G$, what is an algorithm $f$ such that there exists a string $\beta$ (derived from an unrestricted grammar) where
$f(\alpha)=\beta$,
$f^{-1}(\beta)=\alpha$,
$\forall \alpha_0,\alpha_1,\alpha_2\in G. d(\alpha_0,\alpha_1)<d(\alpha_0,\alpha_2)\leftrightar... |
As I understand, you can build the the word -> pages index in Google or large SQL database since indexed search has complexity O(1) -- lookup gives you a billion-page result at once
сomputer -> About 2.14 bln results
science -> About 1.93 bln results
computer science -> About 377 mln results
"computer science" -> Ab... |
The Wikipedia article about regular languages mentions that $DSPACE(O(1))$ is equal to $REG$. Can I conclude from this that every function in $R$ with constant space complexity is in $REG$?
|
I have this HW problem:
Let $F$ be the set of computable total functions, and let $\emptyset\subsetneq S\subseteq F$. Denote
$$L_S=\{ \langle M \rangle | M \text{ is a TM that computes a function and } f_M\in S \}$$
where $f_M$ is the function $M$ computes.
Prove that for every such none-trivial $S$, $L_S \notin \ma... |
A regular expresssion is defined recursively as
$a$ for some $a \in \Sigma$ is a regular expression,
$\varepsilon$ is a regular expression,
$\emptyset$ is a regular expression,
$(R_1 \cup R_2)$ where $R_1$ and $R_2$ are regular expressions is a regular expression,
$(R_1 \circ R_2)$ where $R_1$ and $R_2$ are regular e... |
The Halting Problem demonstrates that there are things that a machine can never be programmed to do.
Is this proof that true Artificial Intelligence - that is, the ability for a machine to think and reason like humans - is not possible?
|
Definitions
Let $\tau$ be a function on natural numbers defined as $\tau(n)=\lceil n*\phi^2\rceil$ where $n$ is some natural number and $\phi=\frac{1+\sqrt{5}}{2}$ is the golden ratio. This series can also be looked up here : A004957, with first few terms being $3,6,8,11,14...$ .
Let $t$ be the largest natural number ... |
Imagine a village with people trading goods. Each person has his own offer in this format: Giving amount a of good b for amount c of good d.
I have made a simple table to point out what I am trying to explain:
In this case there are three different goods: Wood, Sand and Gras.
I also live in the village and noticed t... |
I have these 4 symbols with their probabilities:
x P(x)
--------
1 0.3
2 0.3
3 0.2
4 0.2
I built the Huffman tree in this way:
and I obtainded:
x P(x) C(x)
----------------
1 0.3 0
2 0.3 10
3 0.2 110
4 0.2 111
it's correct? Because according to the solution the resul... |
Is it possible to prove that the Halting problem is undecidable using Rice's theorem? Here's what I've tried and failed:
We want to reduce Rice's Theorem (decide if a language has the nontrivial property P) to the Halting Problem
We want to say "if the Halting Problem can be solved, then we can decide if a language as... |
Let an integer a, and b is the number of bits a.
1) If I have a number s = sqrt(a), the number of bits s will be up to b/2?
Considering the code:
while (i <= sqrt(a)) {
if (a % i == 0) return i;
i++;
}
2) The complexity is $O(\sqrt{a})$. But in terms of bits? $O(2^{b/2})$?
|
I have a problem that I solved, but I'm unsure if my answers are correct or not. I've never seen the implementation of time complexities as elements of others.
f(n) element of O(log(n))
g(n) element of theta(n)
Prove if the below are true are false, provide a counter example if it's false.
1) g(n) element of omega(f(n... |
Let $G=(V,E)$ be a directed graph whose vertices $v \in V$ have colors and its edges $e\in E$ have costs $cost(e)$.
I am looking to find a set of vertex-disjoint cycles that:
First maximizes the number of differently colored covered vertices.
In case of ties, break ties by secondly maximizing the number of chosen edge... |
TL;DR: If you have two entangled qubits in the state $|00\rangle + |11\rangle$, what is the result of applying the Hadamard gate on the second qubit, and why?
I am trying to understand $\text{PSPACE} \subseteq \text{QIP}(3)$ (Watrous, 2003), and have troubles understanding the following.
Hadamard gate: Given some qubi... |
Let $$L = \{ \langle M \rangle \mid M \text{ is a Turing machine so } A_{TM} \leq_m L(M) \}$$
The question is whether $L$ is in $\mathcal{R}, \mathcal{RE}, co-\mathcal{RE}$ or in $\overline{\mathcal{RE} \cup co-\mathcal{RE}}$ ?
I gained some progrees showing $L \notin co- \mathcal{RE}$:
Define reduction $f:A_{TM}\r... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.