instruction
stringlengths
35
29.1k
Polygon Cover: Input: A set of points $P$, a set of polygons $S$ in a 2D plane, and a positive integer $k \in \mathbb{N}$. Output: True if and only if there exists a subset in $S$ of at most $k$ (not necessarily convex) polygons such that every point in $P$ lie inside some polygon in the subset. I am trying to give a ...
The Robbins/Monro Algorithm is a type of stochastic optimization algorithm of the following form: (as mentioned in wikipedia) $$x_{n+1} - x_n = a_n(\alpha - N(x_n))$$ where $M(x) = \alpha$ is a nondecreasing function whose root is at $x=\theta$, $N$ is a random variable where $E(N) = M(x)$. (E is the expectation). Furt...
I'm a little stuck trying to figure out how to decrypt some messages and could use some hints as to what I may be doing wrong. I was given a series of integer values that make up my cipher text. Here are just a few of them: 6584 15650 16198 11003 I was given the following public key b = 3001 n = 18209 So to encrypt a m...
PSPACE-complete$_{FP}$ problems are the PSPACE problems such that every other PSPACE problem can be transformed to it with a polynomial time reduction, i.e. the reduction is an algorithm $\in$ FP. This class is known as PSPACE-complete. Similarly, we can define : PSPACE-complete$_{FPSPACE}$ problems, the PSPACE proble...
I would like to create a deterministic finite state automaton (DFA) M=(Q, Σ, δ, q0, F) that is accepting the language generated by the following regular grammar (RG) G=(N, Σ, P, S). In short I want to convert RG to DFA. G = ({S,A,B},{a,b},P,S) P = { S -> aA | bB, A -> aS | a, B -> bS | b } I have found these rules th...
I got stuck with this problem since the whole day. When we are finding the longest path in a graph we first do topological sorting and then check the path of adjacent vertices and keep upgrading selecting the maximum of the edge weight or the alternate path from the other vertex. So, we are able to solve this problem ...
I have a number of questions about Paxos which I can't answer in full confidence from reading the paper (Paxos Made Simple). My questions are loosely based around the following quote: In Paxos, a value is chosen when a single proposal with that value has been accepted by a majority of the acceptors. However, we can al...
I notice occasionally in blogs or articles comparing different languages, algorithms, etc. that the author will divulge info about the processor used in the testing. Is this meaningful? Shouldn't the relative performance differences be hardware-agnostic? That is, if Language A executes in twice the time as Language B,...
I am learning about Greedy Algorithms and we did an example on Huffman codes. To prove the correctness of our algorithm, we had to have the greedy choice property and the optimal substructure property. Here is what my professor said about the optimal substructure property: Let C be an alphabet and x and y characters wi...
Given a Tree (without a root) function w : v -> N and a number C - How can we count the number of verticies with distance between them equal to C. I was thinking about some smart vertice numbering so we could use dynamic programing to do it but after some thinking it is no good. I would be really thankful for any tips....
Given a set $P$ of $k$ points in a plane. The Distance Variant problem: partition set $P$ into two subsets $P_{1}, P_{2}$ so you can maximize, $d(P_{1}, P_{2})$ = min $p \in P_{1}$ min $ q \in P_{2}$ $d(p,q)$, where $d(p,q)$ is the Euclidean distance between $p$ and $q$. So basically, $d(P_{1}, P_{2})$ is the smallest...
Some particularly degenerate CFGs can produce a single string in infinitely many ways: for a dumb example, $S \to SS \mid \epsilon$ can produce the empty string as $S \to \epsilon$ or $S \to SS \to S \to \epsilon$, etc. I'm writing a general CFG parser which can produce all the different parses for a given string, but ...
I'm designing software that produces images such as the following: Regions of interest are circumscribed by red pixels. I am interested in extracting the fully-enclosed pixel regions. Ultimately, I would like to calculate the approximate center, width, and height of the regions. Ideally, I would even like to eliminate...
An index set is a set of all indices of some family of computably enumerable sets. It is known that the empty set is an index set and that $K = \{e \mid e \in W_e\}$ is not an index set. The following was an exam question I didn't manage to answer: Which of the following sets are index sets? 1) $\emptyset $ 2) $K= ...
What is complexity theoretic implication of following possibilities - $NP=coNP=BPP=RP$ or $coNP\neq NP=BPP=RP$ (consensus is these seem impossible)?
I moved my question from Theoretical Computer Science to this site - proposed by one of the users there - and I'm hoping don't be off-topic again. At my university, I had chosen to write a term paper about Inventory Routing Problem (IRP). To get comfortable with this topic (I'm a software engineer), I started with some...
The definition of fingerprinting algorithms in Wikipedia describe a property called compounding as you can see here as: Some fingerprinting algorithms allow the fingerprint of a composite file to be computed from the fingerprints of its constituent parts. I suspect compounding is not a commonly used term for describi...
I have the following problem: Let's say I'm in a city with some friend we have a bunch of tasks to do. All persons start on a different position, for example (0/0), (10/5), (-20/0), ... , and every person can move x coordinates per second. Every task has: A coordinate where it can be completed (for example (40/50)) A ...
I am currently in a class that deals with DFA's and their minimization. However I believe I have reached a DFA where the method of minimization we were taught doesn't work. I have the following DFA (in JFLAP) Using the method given in class I do the following see if their are any non dissimilar states and if so collap...
Syntax and semantics section of this paper on probabilistic programming mentions that the return expression of the program is a function f satisfying $ f : \sum \rightarrow \mathbb{R}^{\inf}_{\geqslant0}$ where $\sum$ is the set of states. I do no not see the need of $\geqslant0$. Why can't the return values be negati...
I came across the term "minimum height of a Binary Search Tree" (in Java) in class, but I don't fully understand. Could someone please elaborate on: (a) What it is ? (b) How to determine/find it ?
My problem is very similar to the one posted here. Instead of finding one set covering the maximum of subsets, I need to find the minimal number of sets to cover all subsets. I have $U = \{1, 2, ..., 1000\}$ and $S \subseteq \{A \subset U |\space|A| \leq 15\} $. I know that $|S| < 1000$. I need to find a minimal number...
Written in English, does "the set S contains only members of set T" imply that S does contain some member of set T? How would this relationship be written formally?
Why were primes which are $1$ modulo $4$ considered to be weak for use in RSA cryptography (http://en.wikipedia.org/wiki/Blum_integer)? Was there a time it was considered there could be an efficient algorithm if these primes be utilized (if so, then what exact reasons were these)?
What is the difference between: normalizing the row of an adjacency matrix and taking the right eigenvector normalizing the row of an adjacency matrix and taking the left eigenvector normalizing the columns of an adjacency matrix and taking the right eigenvector normalizing the columns of an adjacency matrix and takin...
I'm going through Dr Joost-Pieter Katoen's slides and stumbled upon this: For some reason I can't quite make out how the transition system relates to the sequential circuit. If I had a question for instance that asked me to convert the circuit into a TS, what steps should I take to approach it (using this one as an ex...
I've been studying about CPU and I am trying to implement a small CPU, like MU0. Control unit gets instruction and generates and gives several control signals to other parts of CPU, such as ALU, PC, ACC, etc. And I know that these works in one clock cycle. But I have some quetions. Meaning of Signals (0 or 1) in Clock...
I am looking for an algorithms to maintain several statistics over a sliding window. The setup is as follows: There is a datastream consisting of (real value,timestamp) tuples. The values for the last x seconds are stored. In each iteration at least one new tuple arrives and between zero and more values are retired. No...
Since a partial function can be seen as a set of tuples, there is a trivial CPO defined by the subset relation on partial functions of the same (co-)domain. However, this is not really useful. What I'd need is a CPO over partial functions allowing for different outputs. I.e. two functions are ordered $f < g$ when, for ...
A popular mobile game, DiscoZoo, is about "rescuing" animals from a 5x5 grid of cells. Each animal represents a unique pattern (some have 3 cells, some have 4). The object is that, given this 5x5 grid, find all (or as many as possible) of the given animals within 10 turns, where the pattern of animals can be at any pla...
I've been trying to wrap my head around the following question for ages, its part of my revision for the upcoming end of year exam, however I fail to see how there is a link from the number to the letter, how will one cycle from 1 to a and iterate to get there? if that makes any sense! We were told that when estimating...
The problem is defined as: Given a set of $N$ points $(x_1, x_2, x_3, \ldots, x_n)$ and $L$ the fixed length of a segment. Find the number of maximum points which you can cover with a segment line of length $L$. Ranges $1 \leq N \leq 100 000$ $1 \leq L \leq 10^{10}$ $0 \leq x_i \leq 10^{10}$ I call sub-optimal ranges...
I was looking through these notes but I am not sure I can locate the answer to these questions of mine - it would be great if someone can just even point out what to look for! So any set of binary vectors can be seen as "code"? Let $M$ be a $d\times m$ matrix over $\mathbb{F}_2$ and let $X(M)$ be the graph on the bin...
This is from a textbook on operating systems. This is not homework, just part of the chapter on deadlocks. transaction(Account from, Account to, Number amount): mutex lock1 = getlock(from) mutex lock2 = getlock(to) acquire(lock1) acquire(lock2) withdraw(from, amount) deposit(to, amount)...
What is the complexity of the recurrence $T(n) = 3T(\frac n2) + O(n)$? So far I have: $ O(n) \le cn$ for some constant $c$ Hence: $$T(n) \le 3T(\frac{n}{2}) + cn$$ After a recursion: $$T(n) \le 3(3T(\frac{n}{4}) + \frac{cn}{2}) + cn$$ $$= 9T(\frac{n}{4}) + \frac{3cn}{2} + cn$$ After another recursion: $$T(n) \le 9(3T(...
I am looking for open problems in complexity theory that an undergrad might have any possibility of tackling.
Anyone has an idea how to solve this problem: Let G be an undirected, unit-weighted connected graph. Design a linear-time algorithm to obtain a 2-approximation of the diameter of G. I.e., the largest shortest-path distance between a pair of vertices of G. I thought about running BFS from an arbitrary node, in the worst...
I am studying Abelson and Sussman's Structure and Interpretation of Computer Programs, 2/e. I solved the exercise 1.7, which asks for a better stopping criteria for an iterative function to calculate the square root function, and then checked my solution against one that I found on this site: http://community.schemewik...
I am reading the paper Compiling with Continuations, Continued, and in section 2.4, Comparison with ANF, the author draws attention to the fact that ANF is not closed under beta reduction. The snippet of text in question follows: As Flanagan et al. (1993) suggest, the “back end of an A-normal form compiler can emplo...
I would like to know the complexity of multiplying a matrix of $n\times m$ size by a scalar $\alpha$? In fact, I have a directed graph $G=(V,E)$ represented by an incidence matrix $M$. I would like to calculate the transpose of this graph, i.e., inverse the directions of the edges. I think that if I multiply $M$ by $-1...
The Problem Convert 256 to its 2's complement representation. My Work    I know that 256's representation in unsigned binary is 100000000. What I know from working with two's complement model is that the most significant digit represents the sign of the number. So in this case, 100000000 cannot be 2's complement rep...
I'm having trouble with a problem from HackerRank, and I'm hoping someone here can enlighten me. The problem is stated like this: What is the minimum size of the largest clique in any graph with N nodes and M edges? The hints suggest using Turan's theorem, but it's not clear to me how to get from that to a solution. ...
Note: I have posted a hugely expanded version of this question on cstheory. Since a Sokoban instance with only $k$ boxes has at most $n^{O(k)}$ possible states, the problem lies in $\operatorname{NSPACE}$$[O(k \cdot \log (n))]$. Since the region X X X XX XX X X X XX X XXX has neither boxes nor storage loca...
A trivial algorithm to decompose a degree-d (n,n)-bipartite graph into d disjoint perfect matchings is this : direct all the edges from left to right and put capacity one on each of them - then add a super-source and a super sink with appropriately directed edges from them to each of the vertices on their side with ca...
The Problem: What value does the hexadecimal number x55544552 represent in data type IEEE floating point? My Work:     I first wrote out that hexadecimal number in binary and got 0101 0101 0101 0100 0100 0101 0101 0010    Now I have my three different sections, the sign, 0, the exponent 10101010 - 127, or 170 - 127...
Use the Pumping Lemma to show that $L$ is not regular: $$ L = \{{a^{n^3} | \ge 0}\}$$ I feel like I have a good intuition of what the Pumping Lemma states; strings that belong to a regular language have a part or parts that repeat over and over again. Example strings: $a^{0^3} = a^0 = $ "" ($\epsilon$) $a^{1^3} = a^...
In relation to the thread Proving that the conversion from CNF to DNF is NP-Hard (and a related Math thread): How about the other direction, from DNF to CNF? Is it easy or hard? On Page 2 of this paper, they seem to hint that both directions are equally hard when they say "We are interested in the maximal blow-up of s...
Suppose $A$ is a sorted array with $n$ elements. I want to know whether we can determine if there are majority elements in $A$ with time complexity $O(1)$. Recall that a majority element of $A$ is an element which appears over $n/2$ times in $A$. I can find a $O(\log(n))$ algorithm to solve this problem. But I'm not s...
give a context-free grammar describing the language L={w∈{a,b}∗∣w is of the form xby, where |x|>|y|}. I had one solution like this S -> AYCbY|AYbY|YCbY A->aB|bB B->aB|bB|_ C->aD|bD D->aD|bD|_ Y->aY|bY|_ but it was complaining that it accepts the language babbabaaaaa which is not belonging to the language. Anyone know...
I have labeled examples coming in on the fly, thus I need to create a classifier from sequential data instead of a static example set. Incoming data is fully labeled, there are no unlabeled examples. Each incoming example has a number of features. E.g. let X by an incoming example with 3 features X := (day = sunday, we...
I'm reading a proof on the time complexity of MergeSort which makes this statement without any justification. I've tried to show it myself but I'm not getting far; these are my steps so far. $\sum\limits_{i=0}^{\lg(n)-1} \theta(\frac{n}{2^i}) =\theta(n\sum\limits_{i=0}^{\lg(n)-1}\frac{1}{2^i})$ Now $\sum\limits_{i=0}^{...
I want to solve the following optimisation problem (an approximation or heuristic would be helpful as well). I have two sets of points in the plane: $P=\left\{ p_{1},p_{2},\dots,p_{N}\right\} $ and $Q=\left\{ q_{1},q_{2},\dots,q_{M}\right\} $. Each point has a value/weight, i.e there is a function $v:P\cup Q\rightarro...
I'm writing a data structure library, and I want to write an efficient algorithm for adding many elements to a finger tree (from an iterable sequence). I'm going to do this by constructing a finger tree from the sequence efficiently, as described below, and then concat it to the original finger tree. Concat is a very c...
In this problem. I have a set of "activities" which can happen. Each "activity" is associated with several values: Duration: The length of time the activity takes Earliest time to start: The earilest time at which the activity can begin Latest time to start: The latest time at which the activity can begin Weight/Value...
I'm interested in finding the LCA of two distinct Nodes in a (not necessarily binary) tree from the bottom up without using depth. How would I go about traversing the tree, starting from any 2 arbitrary nodes, each of which points to a previous node as shown without a depth variable?
i am currently working on a school project that takes in a simple linear equation and has to return the value of x, the code i have transforms x + 3 = 3x - 2 into a binary tree format like so: = / \ + - / \ / \ x 3 * 2 / \ 3 x now that i have the expression ...
I have a tentative understanding of modal logic. Can anyone explain modal logic as it is used in computer science?
I was looking at this question. So if I understand the above discussion right then it concludes that if say one had access to an oracle which can uniformly at random sample from a finite set then one can't using this uniformly at random sample a permutation of another finite set (chosen may be adversarially) and also...
I have benn wondering about the following possibility: if I have multiple hardware threads on the same core, and then someone decides to use shared register to allow fast synchronization among threads that run on the CPU, and implements test-and-set on the register instead of doing it in main memory. Will this work? an...
I've seen a few references [1], [2], [3] that say that for a Turing Machine with transition function defined by: $\delta: Q \times \Gamma \rightarrow Q \times \Gamma \times \{L, R\}$ the number of turing machines with $n$ states and $k$ tape symbols is $(2kn+1)^{kn}$. However, looking at the definition, shouldn't it be...
I understand that every self reducible language recursively queries its oracle with strings of length less than the input size. But how does that show that every such language can be solved in polynomial space?
I need to find out to what extent two shapes are similar. I mean I've got two vectors of points - and just that, no shadows, color or whatever - simplest case. Two triangles are the perfect example. Of course this has to work regardless of what the angle shift is and regardless of their scale (only aspect ratio matters...
In closure properties, I got confused between substitution and morphism. 1) According to Wikipedia, string substitution means to map letters in a set of alphabets to languages (possibly in a different alphabet), that is, $f(a) = L_a$. Does that means to replace a letter with a language? Or replace 1 letter from a set...
I am looking for the function $y=f(x)$ that would map the integer interval $[0,n)$ into itself $[0,n)$. The function must be bijective, so it is a permutation of n elements. It should "randomize" the input variable, ie. for every $x_1$ and $x_2$ that are close $|x_1 - x_2| < 100$ the outputs of the function should dif...
An array A holds n integers, and all integers in A belong to the set {0,1,2}. Describe an O(n) sorting algorithm for putting A in sorted order. Your algorithm may not make use of auxiliary storage such as arrays or hash tables. More precisely, the only additional space used, beyond the given array is O(1). Give an argu...
Note: This problem is from Introduction to Computing Systems: From Bits and Beyond(2nd) edition, 3.15, page 86. The Problem: I was able to do the problem and ended up with sum being 0010 and the last carry bit of 1. Using a tow bit full adder, would the last carry bit be appended to the beginning of the sum, making ...
First, I am not a programmer, but an end user. We are trying to come up with a solution to a TSP issue that is causing us SIGNIFICANT time being wasted "manually" routing. Here is the issue. We receive customers to go see. We route, place on the calendar and confirm about 50% of the appointments before more customers...
In Huffman's algorithm, we form a tree and than replace each character with the tree value of 1 and 0. Why don't we simply use the binary digits like $a=0$, $b=1$, $c=10$, $d=01$, $e=11$ and so on than replace them with the characters and when decompressing aplly the reverse and replace the binary digits with the alpha...
I have some difficulties with a complexity proof : I work with 3 problems : A, B and C I know : A-> B A-> C C -> B A-> B meaning : if I have a "yes answer " for A , then I have a "yes answer" for B. I know that A belongs to NP, B and C are NP-complete. Moreover I can write an algorithm for A with a quadratic number o...
Who were the first researchers to prove the Complementary Slackness condition for linear programming? I believe that strong optimality was proved by Gale, Kuhn, and Tucker in 1951, but I couldn't find anywhere the reference for complementary slackness...
I'm working on a question which gives me a program graph and tells me to give a mathematical description of it. I'm aware that a program graph PG is a tuple $(Loc, Act, Effect, \rightarrow, Loc_0, g_0)$ This is the question I'm trying to answer: So far for $PG_1$ (one of the 2 transition systems) I have: $Loc = \{k_1...
You are given three algorithms, $A$, $B$, and $C$ with the following time complexities in the worst case $O(n)$, $\Theta(n)$, and $\Omega(\log n )$, respectively. Assume that you have to choose exactly one algorithm, what would you choose as the best algorithm? Explain your answer. I think I cannot choose $C$ because...
I'm doing practice problems for an upcoming exam and I'm unsure if the following problem is NP-complete. If it is can you please give me a hint as to what problem I should reduce to it. I believe it's NP-Complete and maybe the knapsack problem can be reduced to it but I'm not sure. WEIGHTED VERTEX COVER: Input: A weig...
This is my first post, and have been self studying Haykin's Neural Networks and Learning Machines book. I'm not sure if this is a typo or if I'm doing something wrong, but I've been stuck on a statement on page 75. The context was the process of finding a Maximum likelihood estimate for a parameter vector assuming a ...
Can a probabilistic Turing Machine compute an uncomputable number? My question probably does not make sense, but, that being the case, is there a reasonably simple formal explanation for it. I should add that I am pretty much ignorant of probabilistic TM and randomized algorithms. I looked at wikipedia, but may even ha...
I was wondering how to prove that a language $C$ is Turing-recognizable iff a decidable language $D$ exists such that $C = \{x \mid \exists y \;(\langle x, y\rangle \in D)\}$. I do not know how to prove this kind of questions, is there any help to solve this problem or any problem as this kind?
My question expands on a related question on the link, Why is the clique problem NP-complete? In that post the author argued that while the $k$-clique problem is NP-complete; for a fixed $k$ the $k$-clique problem is polynomial time solvable. The question "Prove that the presence of 3-clique in a graph can be decided ...
I have been cracking my head over the following question - You are given an undirected connected graph with an even number of edges. Half of the edges have weight less than C (possibly with repetitions), and the other half of edges all have weight C. Is it true that every MST of the graph includes the same numbe...
We just had an interesting though for a routing algorithm for people carpooling. Imagine the following situation: Person 1 is driving with his car from the south of city A to city B far in the north. He is picking up person 2 who is starting in the west of city A and person 3 who is starting in the east of city A. Pers...
The cycle detection problem for a directed graph has well-known polynomial time solutions, graph traversal algorithms such as Dijkstra algorithm can be used to find whether or not a cycle exists in a graph. The difficulty however comes when we are required to find in polynomial time whether 2 vertex disjoint cycles exi...
A comparison sort cannot require fewer than $\Theta (n\log n)$ comparisons on average. However, consider this sorting algorithm: sort(array): if length(array) < 2: return array unsorted ← empty_array i ← 0 while i < length(array) - 1: if array[i] > array[i + 1]: push(unsorted...
Say that string $x$ is a prefix of a string $y$ if there exists a string $z$ such that $xz = y$, and say that $x$ is a proper prefix of $y$ if in addition $x \not= y$. A language is prefix-free if it doesn’t contain a proper prefix of any of its members. $$ \text{Prefix-FreeREX} = \{(R) \mid R \text{ is a regular expre...
I stuck in one challenging question, I read on my notes. An undirected, weighted, connected graph $G$, (with no negative weights and with all weights distinct) is given. We know that, in this graph, the shortest path between any two vertices is on the minimum spanning tree (MST). Verify the following: 1) shortest...
I've been using the Stanford Algorithms (1) Coursera course, and in a description of a problem, the lecturer said that in the problem of allocating n processes to n servers at random, the sample space of allocations is n^n, and each has equal probability. Intuitively this seems unlikely to me: if you imagine each serve...
So from reading "Advanced Topics in Types and Programming Languages" (ATTPL) I know of the calculus of constructions (CoC). It also presents the "algorithmic" type checking rules. Reading Coq's documentation on the Calculus of Inductive Constructions (CioC) you can get a sense of things but it is far from algorithmic. ...
In this question, I asked about a confusion I had counting the size of the sample space for allocation of n processes to n servers. Bangye gave a simple answer by approaching the counting problem from the perspective of the choice when allocating each process. I'd like to know -- to expand my understanding of counting ...
Is the following language context-free? $$ \{u\#v\in\Sigma^* \mid u\not=v \text{ and } u,v\in\{0,1\}^*\} $$ You can assume $\{0,1,\#\}\subseteq\Sigma$. Unnecessary background information: I am grading papers, and a student cited that this language is context-free to state that it is decidable. My intuition says that th...
I really get confused by all the different complexities you find around. One is $O(n \log n)$, the next $O(n \cdot |\Sigma|)$. Personally I think it's the last one, but I'm really not that confident with it to say so. Well on average we go $\log n$ deep and need at max $|\Sigma|$ steps to find a corresponding node that...
I have been scratching my head to find good counter examples to the following problem: Suppose we are given a directed graph G=(V,E) in which every edge has a distinct positive edge weight. A directed graph is acyclic if it has no directed cycle. Suppose that we want to compute the maximum-weight acyclic subgrap...
A graph $G = (V, E)$ is called an $(n, d, \varepsilon)$-expander if the graph has $n$ vertices, maximum degree $d$, and satisfies the following expansion property: for every subset $W\subset V$ such that $|W|\leq n/2$, $|W\cup N(W)|\ge (1+\varepsilon)|W|$ where $N(W)$ is the neighborhood of $W$ in $G$. The expansion...
Consider Weighted Independent Set in a path graph, i.e., a graph where all the vertices are in a single path. Does this problem have practical applications? What are some? This problem is used in many CS courses as an intro to the dynamic programming paradigm, but I don't see any mention about whether this is useful ...
It is well known that context-free languages are closed under the reversal of $L$. My answer to the question "Is the time reversal symmetry of non-deterministic computations important?" notices that this fact can be derived from the time reversal symmetry of non-deterministic computations. Hence: This raises the quest...
I was going through a book of proof and I read: If L is recursive, L is r.e. And the proof goes: Let L be recursive, hence there is a TM that decides it Convert an halt state to a normal state Add to program that when it enters this state it goes to infinite loop How can this be a proof for it?
This is a Local Olympiad question on computation and computer science on 2013. How can explain it and says some hint for understanding such an example question. for $ A \subseteq \mathbb{N}$ we have $a=deg_T(A)=\{B | B \equiv_T A \} $ and $D=\{deg_T(A)| A \subseteq \mathbb{N} \}$. For $(D, \leq)$ that has $A \leq_T...
In his lectures on computer science, Feynman talks about finite state machines: he present a simple delay finite state machine Let me now give a specific example of an FSM that actually does something, albeit something pretty trivial - a delay machine. You feed it a stimulus and, after a pause, it responds with t...
I want to cluster a list of property addressed based on distance and limit the size of each cluster. The properties are currently assigned to modules by discretion of managers. But I hope to develop a system to assign properties automatically based on minimized distance to module center and limit the size of properties...
I'm given n objects, and a set of n permutations of these n objects (out of n! total permutations). There is a true underlying permutation, which I know is one among the set of n permutations, but I don't know which one. An oracle however knows the true permutation. To find the true permutation, I'm allowed to query th...
I'm an undergraduate and am looking forward to becoming an academic; do the whole PhD stuff and start doing research. I'm interested in a variety of computer science related things but lately P2P technologies have really caught my interest. I have the impression that I need to choose one of the computer science fields ...
I am trying to generate a $n$-bit gray code where I can specify two strings $s$ and $t$ that must be consecutive in that gray code. I know that there are ways to generate specific codes (such has the Binary Reflected Gray Code and the Recursive Partition Gray Code), but I need to be able to construct one given any two ...
One of the first programs I wrote when learning Java was a console application modelling the operation of an elevator. I'm trying to teach myself propositional logic and so I thought, why not use the same example? So, suppose I have been given the task of modelling the main functions of an elevator system using proposi...