A set of languages over {0, 1} which does not belong to Recursively Enumerable set are uncountable [closed] - complexity-theory

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 7 years ago.
Improve this question
I have a problem of Theory of Computation i.e.
Prove that
A set of languages over an alphabet Σ = {0, 1} which does not belong to Recursively Enumerable set, are uncountable.
Anyone can explain it in some simple way?

First note that the entire set of languages over the alphabet {0,1} is already uncountable, as it can be put into 1-1 correspondence with the real numbers between 0 and 1.
To see this, associate a real number between 0 and 1 represented in binary with a set using the following construction. (I use a finite real number for demonstration purposes):
0.00111 -> {"0", "01", "001", "0011", "00111", "001110", "0011100", ...}
Hence, for each real number in the range [0,1), there is a unique corresponding language containing a string of each length.
Okay, that's fine for the entire set of languages over {0,1}, but what about the non-R.E. languages? It suffices to show that the set or R.E. languages is countable. If the R.E. languages are countable, the rest of the languages must be the non-R.E. languages, and those must be uncountable.
To help with this, it suffices to know that the set of Turing machines is countable. We will describe each Turing machine with a finite string showing its states, transition function, etc. Finally, note that each R.E. language is computable by a Turing machine, so that the R.E. languages must therefore be countable.

Related

Subset product & quantum computers, is an instance solvable [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
Suppose you have a quantum computer that can run Shor's algorithm for factorization of integers.
Is it then possible to produce an oracle that determines if no solution exists for an instance of the Subset Product problem, with 100% confidence, in sub-exponential time?
So, the oracle is given a sequence x1, ... xn, as the description of a subset product problem.
It responds either Yes, a solution to this instance does not exist, or No, a solution to this instance may or may not exist.
If we take he prime factors of all elements in the sequence and then check to see if all of them are present in the target product's factors, this should tell us if a solution is not at all possible. A solution exist may exist if and only if all the prime factors are accounted for. On quantum computers, prime factorization is sub-exponential.
Would like some feedback on if this is correct logic- if it works- and if the complexity is indeed different between classical and quantum systems for this oracle/algorithm. Would also appreciate an explanation on reductions - can Subset Product be reduced to 3SAT without consequence?
Your algorithm, if I understood it correctly, will fail for the elements [6, 15] and the target 10. It will determine that 6*15 = 2*3*3*5, which has all of the factors used in 10=2*5, and incorrectly assert that this means you can make 10 by multiplying 6 and 15.
There are two reasons that it's unlikely you'll be able to fix this algorithm:
Subset Product is NP-Complete. Finding a polynomial time quantum algorithm for it, or showing that no such algorithm exists, is probably as hard as determining if P=NP. That is to say, very very hard.
You don't want the prime factors, you want the "no-need-to-reduce" factors. For example, if every time a number in the problem has a prime factor of 13 it's accompanied by a factor of 17 then there's no need to break 221 into 13*17. You can apply Euclid's gcd algorithm to various combinations of elements to find these no-need-to-reduce factors, no quantum-ness required.

Why is it called topological sort? [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
From where does it derive its meaning:
1) Topography, as in region, geography etc.
OR
2) From one of its mathematical meanings: the set of all open subsets of a topological space(http://www.merriam-webster.com/dictionary/topology)
Thanks,
Chris.
P.S: Please do not mention the meaning related to computer science from the dictionary as that is what I am trying to figure out here.
Probably first use of term "Topological sorting" is from Kahn, Arthur B. (1962), "Topological sorting of large networks". Term "Topological sorting" derives from "topological ordering", which is defined in this article:
A list in topological order has a special property. Simply expressed:
proceeding from element to element along any path in the network, one
passes through the list in one direction only
So it would be "topological" in mathematical meaning, but not strictly the one you mentioned. It would be "topological" rather in the sense of Topological Graph Theory

Find a number by the decimal part of its square root [closed]

Closed. This question does not meet Stack Overflow guidelines. It is not currently accepting answers.
This question does not appear to be about programming within the scope defined in the help center.
Closed 8 years ago.
Improve this question
I have a math problem consisting of two questions:
can we find a number N knowing only the decimal part of its square root up to a precision (only an approximation of the decimal part because the decimal part never ends)
is the answer unique? which mean that we won't find two integer whose square root decimal values are equal (the first 50 for example) .
Example:
if we have 0,4142135623730950488016887242097, can we find that it's the decimal part of square root of 2
or 0,418286444621616658231167581 for 1234567890
The answer for the second question is pretty easy because, let's say we have 50 decimals, the number of possible integer's square root is much more than the 10^50-1 possible values of the decimals parts, so there whill be more than one answer.
I am very grateful for your help or any research track.
You answered the second question yourself already. No there is no unique solution.
For the first question i don't know a quick mathematical solution, but some non-performant programming solutions:
Option A: The brute force method:
iterate over all integers, and compare the square root of each with your number.
Option B: More tricky brute force method, which is more performant, but still slow:
Iterate the integers from 1 to M
Add your decimal part to each of them
Take the power of two and see how close the next integer value is
if the next integer value is very close, take the square root of it to counter check the result
stop as soon as you found the correct integer
Option C: caching:
precalculate your decimal parts for all integers and store them in a HashMap.
use the HashMap to find the results quickly
Consider: since you have a very big amount of data, different decimal parts could result in the same hash value, which would break this option.

Optimization similar to Knapsack [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 9 years ago.
Improve this question
I am trying to find a way to solve an Optimization problem as follows:
I have 22 different objects that can be selected more than once. I have a evaluation function f that takes the multiplicities and calculates the total value.
f is a product over fractions of linear (affine) terms and as such, differentiable and even smooth in the allowed region.
I want to optimize f with respect to the 22 variables, with the additional conditions that certain sums may not exceed certain values (for example, if a,...,v are my variables, a + e + i + m + q + s <= 9). By this, all of the variables are bounded.
If f were strictly monotonuous, this could be solved optimally by a (minimalistically modified) knapsack solution. However, the function isnt convex. That means it is even impossible to assume that if taking an object A is better than B on an empty knapsack, that this choice holds even when adding a third object C (as C could modify B's benefit to be better than A). This means that a greedy algorithm cannot be used;
Are there similar algorithms that solve such a problem in a optimal (or at least, nearly optimal) way?
EDIT: As requested, an example of what the problem is (I chose 5 variables a,b,c,d,e for simplicity)
for example,
f(a,b,c,d,e) = e*(a*0.45+b*1.2-1)/(c+d)
(Every variable only appears once, if this helps at all)
Also, for example, a+b+c=4, d+e=3
The problem is to optimize that with respect to a,b,c,d,e as integers. There is a bunch of optimization algorithms that hold for convex functions, but very few for non-convex...

challenging string algorithm on pattern matching from bioinformatics [closed]

Closed. This question is off-topic. It is not currently accepting answers.
Want to improve this question? Update the question so it's on-topic for Stack Overflow.
Closed 11 years ago.
Improve this question
I was told by a friend the following challenge problem.
Given {A, T, G, C} as our alphabet, we want to know the number of valid phrases with a specified length n with the following recursive pattern definition:
pat=pat1pat2, i.e. concatenate two patterns together to form a new pattern pat.
pat=(pat1|pat2), i.e. choosing either one of the patterns pat1 or pat2 to form a new pattern pat.
pat=(pat1*), i.e. repeating pattern pat1 any number of times (can be 0) to form a new pattern pat.
A phrase formed from the alphabet set {A, T, G, C} is said to satisfy a pattern if it can be formed by above pattern definition; its length is the number of alphabets.
A few examples:
Given a pattern ((A|T|G)*) and n=2, the number of valid phrases
is 9, since there are AA, AT, AG, TA, TT, TG, GA, GT,
GG.
Given a pattern (((A|T)*)|((G|C)*)) and n=2, the number of valid phrases
is 8, since there are AA, AT, TA, TT, GG, GC, CG, CC.
Given a pattern ((A*)C(G*)) and n=3, the number of valid phrases
is 3, since there are AAC, ACG, CGG.
Please point to me the source of this problem if you have ever seen it and your ideas to tackle it.
The choice of letters A,C,G, and T makes me think of DNA base pair sequences. But as thiton wrote, clearly this problem was lifted from the study of regular languages. Google "regular language enumeration" and you should find plenty of research papers and code to get you started. I'd be surprised if computing the number of matching strings for these patterns were not a #P-complete problem, so expect run-times exponential in n.

Resources