instruction
stringlengths
35
29.1k
I'm having trouble understanding how to calculate effective access time, hit ratios and cache access times. I'm unfamiliar with the concepts and would love help, or an explanation on how to solve this problem: Consider a memory system with a main memory of 16 MB and a cache memory of 8,192 bytes. The cache cost is 0.0...
In a distributed system, how atomic operations are done when network connections inherently have the Two Generals problem? Does atomicity have a different meaning in this context?
We have a Fibonacci heap with $N$ unique elements we want to make $O(N)$ order statistic queries (e.g., what is the element number 7 in this collection if it was sorted). Moreover, we know that the order statistic queries would be made in order (e.g., for $O(N)$ queries: what is elements number $1,3,5,\ldots,N$) . How ...
To show that a problem is polynomial-time solvable, an often-successful technique is to reduce it to 2SAT (that is the problem of deciding satisfiability of CNF formulas with every clause containing at most 2 literals). On the other hand, I never seem to have success with reducing problems to Horn SAT (that is the prob...
I'm guessing I could replace the words "hard drive" with "random access medium" but let's be more specific here. Also for the sake of this question, let's not consider SSDs. Just plain old hard-drives with heads and magnetic discs. I'd guess that the hard drive doesn't care about things as bytes and receives instructi...
Consider an ordinary binary min-heap data structure with n elements supporting the instructions INSERT and EXTRACT-MIN in O($\lg n)$ worst-case time. Give a potential function $\Phi$ such that the amortized cost of INSERT is $O(\lg n)$ and the amortized cost of EXTRACT-MIN is $O(1)$. I try to solve it, but I got in ...
I have two sets $X$ and $Y$ of 2-dimensional points. The points are floating point numbers. The objective is to sort them in such way that sum of differences in distances of consecutive sorted points is minimal. I tried to solve this problem by localisation (dividing the plane by smaller grids of sorted points) and the...
A lot of "famous" undecidable problems are nonetheless at least semidecidable, with their complement being undecidable. One example above all can be the halting problem and its complement. However, can anybody give me an example in which both a problem and its complement are undecidable and not semidecidable? I thought...
Long time lurker, first time poster. The book I am reading is William Stalling's "Operating Systems: Internals and Design Principles" Seventh Edition. Stalling's definition of hit ratio according to the book is thus: "the hit ratio is defined as the fraction of all memory accesses that are found in the faster memory." ...
I came across a question to create a regular expression to check whether there are even number of b's in a string of language {a,b}. The expression I came up with is (a+ba*b)*. However I found the solution online to be a*(ba*ba*). Is there any difference? If any where? Also I know that (a+b)* is equivalent to (a*b*)*. ...
Apparently, ReDos attacks exploit characteristics of some (otherwise useful) regular expressions ... essentially causing an explosion of possible paths through the graph defined by the NFA. Is it possible to avoid such problems by writing an equivalent 'non-evil' regex? If not (thus, the grammar can't be handled in pr...
I found a question: Let a two-way set-associative cache of 4 memory blocks, each block containing one word. What is the number of misses and hits considering the following sequence of block addresses: 0, 8, 0, 6, 8 ? a) 4 misses and 1 hit b) 3 misses and 2 hits c) 1 miss and 4 hits d) 2 misses and 3 hits Althou...
1st Definition. Recursive definition of fold fold$_{recur}$ (c,h) nil = c fold$_{recur}$ (c,h) (cons(a, x)) = h(a, fold$_{recur}$ (c,h) x) 2nd definition of fold. Iterative definition fold$_{itr}$ (c, h) nil = c fold$_{itr}$ (c, h) (cons (a, x) ) = fold$_{itr}$ (h (c, a), h) x How do I express fold$_{itr}$ in terms of ...
Hi I have two definitions of fold. I will call them foldl which is recursive and fold$_{itr}$ which is iterative. I am looking for an algebraic proof that the two definitions are equal ideally through structural induction. Definition for foldl foldl(c,h) nil = c foldl(c, h) (list, element) = h (foldl (c, h) list, ele...
In Cormen's Algorithms textbook, the author casually mentions that ${n \choose 2}$ is $\Theta(n^2)$. Why is this so? In the calculation $$ {n \choose 2} = \frac{n!}{(n-2)!2!} $$ there are $n$ multiplication operations in the numerator and $n$ multiplications in the denominator. That means there are at most $2n+1$ compu...
I am struggling to determine the number of instances a resource will have. I have performed extensive research on this, but unfortunately have come up short. I am tasked with drawing a resource allocation graph and I have been provided with the number of processes which is 3 and the of resources which is 5. I have conc...
What's the intuition for PTAS reductions instead of approximation preserving reductions or something of that ilk? I'd expect APX-Hardness to mean something like "finding a constant factor approximation for this problem is as hard as finding a constant factor approximation to any problem in APX" but having just a PTAS r...
I am interested in knowing about algorithms for finding global minimum when noisy estimates of the function are available.
In the "Covering Things with Things" paper from Langerman and Morin, they mention the BST-Dim-Set-Cover, which is a FPT algorithm for point-line-cover, at page 666. The algorithm chooses each point p from a set S and then subdivides it into k-lines. This can be seen as a special case of set cover. All points (each p be...
is there any difference between transition systems and finite automata? Is it that transition systems consist of both NFA (nondeterministic finite automata) and DFA (deterministic finite automata)?
I'm no cs student, I'm a programmer. I have a couple of questions and a few assumptions that I will make here (correct me if I'm wrong please). From my understanding is that all the sequences of 1 and 0's that computers execute are just representations of actual data or instructions that tell other hardware on a system...
My question may actually be more broadly described as: can I use the fact that an algorithm is expected to return $(O(f(n))$ answers to show that it may never run better than $O(f(n))$? I would intuitively assume yes, but I am not sure. Examples of what I'm talking about is algorithms to calculate all the paths that p...
I am trying to get a big picture on the importance of least fixed point (lfp) in program analysis. For instance abstract interpretation seems to use the existence of lfp. Many research papers on program analysis also focus heavily on finding least fixed point. More specifically, this article in wikipedia : Knaster-Tar...
Given a post-order traversal of Binary Search tree with $k$ nodes, find an algorithm that constructs the BST. My Algortihm Let $n$ represent the next element to be inserted. Let $P(y)$ represent the parent of node $y$. We will read the traversal in reverse. The last element of the traversal is the root. Let $l = root...
I'm writing about Turing machines and often need to denote the tape. I'm using exponential tapes, i.e. a repetition count for each symbol. I usually use something similar to $(x_k^{e_k})_{1 \leq k \leq m} \text{ Q } (x_k^{e_k})_{m+1 \leq k \leq n}$ (latex: $(x_k^{e_k})_{1 \leq k \leq m} \text{ Q } (x_k^{e_k})_{m+1 \leq...
I believe that I have a procedure for doing this, but I don't know how to approach the proof (and for that matter I'm not entirely sure the procedure is correct). Here's the exact problem statement: Given DFA $A = (\Sigma, Q, q_0, F, \delta)$ construct DFA $B$ from $A$ s.t. it accepts all words of the language of $A$ ...
I have a pretty good handle on what recursive and recursively enume table languages mean with respect to Turing machines and how they relate to one another through my algorithms class. What I don't understand is how these languages relate to the computability of problems, and whether these languages correlate to proble...
In my opinion, every imperfect information game where there is the possibility of bluffing lacks a perfect (or winning) strategy, for the simple reason that knowing your opponent's strategy will let you beat him easily (even if his strategy isn't 100% deterministic). So why do the guys that developed 'Cepheus' claim th...
Say I have a snippet of code: k = 5 i, j = 0 for i -> n if i == k for j -> k /* do something */ end for k = k * 4/3 end if /* do something */ end for I can tell that the algorithm is worse than n but can't be worse than n^2. In fact it seems like it would be less than n lo...
Given lists $A_1, A_2, \dots, A_n$ of non-negative numbers, I want to find the $k$ smallest elements of the Cartesian product $A_1 \times A_2 \times \dots \times A_n$ ordered by the value $x_1 + x_2 + \dots + x_n$, where $x_i\in A_i$. I can't simply create all combinations in memory and sort them because of large amoun...
Suppose $L_1, L_2, ..., L_k$ are recursively enumerable languages forming a partition of $\Sigma^*$. How do I show that each $L_i$ are recursive ? I see that for $x \in \Sigma^*$, $x$ belongs to exactly one $L_i$. My idea is to run every Turing machine simultaneosly, stopping as soon as one of them accepts $x$ (must ha...
The specific algorithm I am referring to is Algorithm 6.8 from Vazirani's book "Approximation Algorithms". The book is legally available online here, and the algorithm is on page 58 (76 in the pdf). The algorithm is pretty simple (especially if you're familiar with the layering technique), but in any case I'm only inte...
We just started on the Computer Architecture topic in our CS lectures and I have a few questions that are currently bothering me. So we have different computers, and there are always differences in the hardware and architecture. Now, why don't all computers simply use the same architecture? Won't that make it easier to...
an unweighted connected graph $G=(V,E)$ all nodes of the graph contain a "serial number" between 1 to V. (V is an integer). I am trying to come up with an algorithm that sorts all nodes firstly by distance (number of eadges) from source node 's' , secondly- if two nodes have same distance value sort them by value of th...
I'm currently dealing with a problem for which I could show that an exact algorithm would imply a general algorithm for finding the real (but not complex) roots of an arbitrary univariate polynomial with real coefficients. Now, what exactly are the implications for my problem? It is well-known that there is no formula ...
Most combinatorial problems seem NP-complete. Is this inherent in the design of the problems themselves? Are there any combinatorial problems in "P" ?
Some of my colleagues introduced some code into our codebase that was causing some serious performance issues. The feature they were implementing involved displaying data in a hierarchical fashion, but if there were more than 20 or so nodes involved, there was a serious delay (multiple seconds) before the user could se...
Given an undirected graph $G=(V,E)$ and a vertex $v\in V$, is there some algorithms to enumerate all induced subgraphs $G_s=(V_s,E_s)$, such that $v \in V_s$? It's preferred the algorithm doesn't enumerate duplicated subgraphs.
So I started practicing some algorithms and programming before university starts and I ran into this problem: Given a 3x3 matrix containing the numbers from 0 to 8, find the minimum number of steps required to sort the matrix in the following format: 1 2 3 4 5 6 7 8 0 In one move it is only allowed to pick a cell that ...
I would like to ask a few questions about Assembly language. My understanding is that it's very close to machine language, making it faster and more efficient. Since we have different computer architectures that exist, does that mean I have to write different code in Assembly for different architectures? If so, why is...
I think, maybe some formalism could exist for the task which makes it significantly easier. My problem to solve is that I invented a reentrant algorithm for a task. It is relative simple (its pure logic is around 10 lines in C), but this 10 lines to construct was around 2 days to me. I am 99% sure that it is reentrant ...
Is there a way to generate a set of inputs, for a given output of a function? This may be a common thing in lisp/haskell world, but I'm not aware of it. Is this what mini-kanren does? I understand that there may not be a general solution to this problem, since the halting problem may apply here. Say the function implem...
I'm trying to make a turing machine that will take in a binary string as input x and output the binary representation of the length of x. So M(0110) returns 100, M(1010101010) returns 1010, ect. It also has to have a runtime of O(N). So I can prove that the number of "flips" (changing a 0 to a 1 or a 1 to a 0) that occ...
I was recently faced with the following interview question: Given an array A, and an integer k, find a contiguous subarray with a maximal sum, with the added constraint this subarray has length at most k. So, if $A=[8, -1, -1, 4, -2, -3, 5, 6, -3]$ then we get the following answers for different values of $k$: +--...
This is a specific question about [1]. Before the question, I must explain and organize some topics: 1) In section 3.2, during the "Pre-processing Stage", a hash function maps an element to a bit-string. 2) In the Appendix B, the authors explain the COMPRESSION stage of those bit strings. Question: Is it possible to de...
I saw a card game designed for small children. Each card has a picture of 6 animals on it, and there are 31 cards. When any two cards are compared to each other, they share exactly one animal. The game is for the child to find the animal that is common to both cards. I began to wonder how many animals the company would...
I am trying to understand the following algorithm for Self reducibility of Clique. Here we have a "MBClique" black box algorithm, which return yes/no for parameters where G is a graph and K is a natural number. It answers the question: "Does G has a clique of K size?" - Our aim is then to use this Decision algorithm t...
I am looking up some material for my thesis in CS (development of a module to integrate a genetic algorithm in a system developed by other students). My actual current task is to make a comparative analysis of several libraries for genetic algorithms. After this comparison I will choose one of these libraries and an al...
Let's say we have a relation $R$ with a set of functional and multivalued dependencies $F$, and we found a dependency that violates some normal form. Then we decompose $R$ into $R_1$ and $R_2$. How to compute the corresponding sets of dependencies $D_1$ and $D_2$? I'm not sure if we can just take all dependencies (prob...
As far as I have learned, an approximation algorithm for an optimization problem Runs in polynomial time, and Whose cost can be bounded by a function of input in terms of distance from the optimal cost. If we consider the optimization version of subset-sum problem, it says Given a set $A$ of integers, what is the m...
In statically-typed object-oriented languages (like Java, C++, C#, ...), suppose I declare an abstract class: public abstract class myclass1 { ................. } Most of these languages (like Java) wouldn't allow us to create an Object of an Abstract class, but they do allow us create an Array of Object of an Abstra...
Consider the language: $$ L_1 = \{ x \in \Sigma^* : x \text{ does not contain the substring } 110\} $$ I know that there is a DFA that accepts this language, and furthermore, that the regular expression is: $$ (0 \cup 10)^* 1^* $$ I'm asked to obtain a formal recursive definition of $L_1$, that is, find a basis $B \sub...
Disclamer: this is my uni assignment, which is rated comparatively low, thus I assume that the answer should be simple. Hints are appreciated (as opposed to direct answers). Write an algorithm which accepts a regular expression $r$ and produces a language $\overline{L[r]}$. I think it is reasonable to assume that al...
If we had a computer in base 3 which used the characters {0, 1, 2} instead of just {0, 1} (and we implemented a ternary logic on the hardware), will this computer be faster than computer using binary? Why or why not? If we had a computer with even a higher base than 3 will it be more fast or slow? Which is the best bas...
I'm sure this is not a challenge for you but it remains an open question for me: Is it wise to prefer a recursive algorithm over its for-loop counterpart? E.g. take the evaluation of the natural logarithm of a number $N + 1$ $$ \ln (N+1) = \ln N + \Delta N, $$ where $$ \Delta N = 2 \sum_{k=0}^{\infty} \frac{1}{(2k+1)(...
I'll explain my problem with an analogy to Sudoku-grids. Consider a filled Sudoku-grid. If you exchange labels or rearrange rows/columns within a block, you have another valid Sudoku-grid. However the new grid is essentially equivalent, if that makes sense. One might say, under the operations "swap rows", "exchange lab...
In all the books, packets of slides and similar I read, cache miss is always explained by assuming that blocks of different caches (or cache and RAM) are always of the same size. It's pretty clear how it's works in this case but the question is: what if block dimensions are not equal among caches? For example, assuming...
What I would like to do is improve upon projects like 'RNG plays pokemon'. There, a computer produces a random sequence of inputs that are transmitted to an emulator and played in-game. Though this seems really pointless, the computer managed to beat the game that way. However in this project, buttons are pressed at ra...
How can i compute tag-index-displacement bits from an address if cache size is not a power of two? Intuitively, i would be inclined to think that i can not directly indicate which bits of the address are used to tag, index blocks and displacement. Instead, i think that i should do some conversion such that it appears ...
Regular expressions can be reduced to a standard form. A normal form is either 0 or a term of the form $$ \sum_{i \in I} a_i + \sum_{j \in J} n^*_j + \sum_{k \in K} a_k \cdot n^*_k + \sum_{l \in L} n^*_l \cdot n^{'}_l + \sum_{m \in M} E_m$$ where $E_m =1$ for all $m$, where $n_j, m_k, n_l,n_l'$ are normal forms diffe...
I am looking for an algorithm to find the point that minimizes the sum of the great circle distances to a set of fixed points on a sphere. In more detail: Given $x_1,\ldots, x_k$ fixed points in the $\mathbb{R}^n$ sphere. All of them have non-negative coefficients, i.e., $\|x_i\| = 1$ and $x_{ij} \geq 0$. I wish an al...
Are there any changes that could be made to CPUs to make them perform better for concurrent runtimes like Rust? For instance, are there changes to branch prediction implementations or cache sizes that would help concurrent runtimes? I have the impression that current CPU designs might be optimized more for procedural ...
Typically decision problems are studied in complexity theory and function problems are studied in the Analysis of Algorithms. Unfortunately, Complexity Theory tends to abstract over the exact time complexity of a problem. I know that Decision-Tree Complexity and more generally Query Complexity (Boolean Complexity) aim...
Tangaroa is a relatively new project adding Byzantine fault-tolerance to the Raft consensus protocol using techniques that were already used in the PBFT algorithm. What are the advantages, when should I use Tangaroa and when PBFT?
I'm playing a game where I'm trying to estimate an unknown real number $x$. An oracle exists that will answer the question of "Is a number $y$ greater than or equal to $x$?", to which the oracle will reply either yes or no. The question may be asked an $t$ number of times. For example, with an unknown $x=9.5$, the orac...
Alice and Bob are playing the game of Nim with $n$ piles of stones (p[0], p[1], ..., p[n-1]). If Alice plays first, she loses if and only if the 'xor sum' (or 'Nim sum') of the piles is zero, i.e. $p[0] ⊕ p[1] ⊕ ... p[n-1] = 0$ Bob can remove some stones in some piles before the game starts, but he must keep at least o...
I'm trying to cluster around 16000 images into ~200 clusters, using kmeans with metric as euclidean distance or cosine distance. I understand that i need to extract keypoint descriptors to compute features for each image. I'm looking at SIFT as an option but, SIFT outputs different number of keypoints for each image th...
I have problems to determine the size of the following sets in dependancy of the parameters $m, n>0$: $$M_{m,n}=\{a^iwa^{m-i}\mid 0\le i \le m,\;w\in\{a,b\}^n\}$$ It is easy to see that $|M_{m,n}|\le (m+1)\cdot 2^n$ since there are $m+1$ possibilities for $i$ and $2^n$ possibilities for $w$. If the sets would take the ...
I am solving some example exercises in preparation of a Computational Theory examination. In Exercise 2, I am tasked with building an NFA and DFA of the regular expression: $(b|bba)^*a$ My question is: Can I simplify $b|bba$ inside the parentheses to $bba$? Are they indeed equivalent or will I be breaking some generali...
Everyone knows computing speed has drastically increased since their invention, and it looks set to continue. But one thing is puzzling me: if you ran an electrical current through a material today, it would travel at the same speed as if you did it with the same material 50 years ago. With that in mind, how is it comp...
I know that resolution is refutation complete, but what can we conclude if a resolution procedure leads to a situation with no more chance to operate the resolution? Given a propositional formula which we want to check its satisfiability, ( a + b ) ( ¬a + c ) after one resolution the formula become ( a + b ) ( ¬a + c...
Properties of concurrent algorithms are usually divided into two categories: Safety - something must not happen. Properties in this category are for example partial correctness and sometimes deadlock-freedom (the latter depending on the author). Liveness - something that must happen eventually. Properties in this cate...
I found this in information theory paper, P.3883* the authors states the following Most existing theoretic studies of network coding focus on DAGs due to its simpler structure and dure to the fact that one can always convert a cyclic network to its acyclic counterpart by taking into account the time index and the caus...
I have an array of 2 dimensional points describing a path. I want to reduce the number of points needed to describe this path by using line segments that connect multiple points on the same line, allowing for some minimal deviations. For example, given the points (0,0)-(50,50)-(100,100), the path can be optimized by on...
I am just trying to understand a few minor details regarding images that are compressed with lossless algorithms such as RLE. If a bmp image is compressed using RLE, when does the decompression occur when viewing the image? does the image viewer have a built-in library to decompress the image and then view it? or is i...
So I wrote an implementation of Hopcroft's algorithm. While testing, I discovered that it would sometimes produce an automaton that wasn't equivalent to the original. At first, I figured it must be a bug in my code, but after going over the algorithm by hand with a small example, it seems to be a bug in my understandin...
I have two questions regarding a paragraph about table-driven agent programs from Modern Approach to Artificial Intelligence 3rd Edition. "Let $\mathbb{P}$ be the set of possible percepts and let T be the lifetime of the agent (the total number of percepts it will receive). The lookup table will contain $\sum\limits_{...
In the book "Approximation Algorithms" by Vazirani (legally available online), part of the hint to Exercise 9.6 (on page 77 of the book, page 95 of the PDF) says "Establish a domination". I've never heard this terminology before in the context of computer science/approximation algorithms/bin packing (I'm not so sure wh...
I was wondering if there are cases in which the star closure of a language can make the resulting language easier to parse. In particular, if I have this grammar: S -> c|AS|A A -> aAa|bAb|e I can see that $L(A) = \{x x^R : x \in \Sigma^*\}$ (where $x^R$ denotes the reverse of $x$). That language is not even determinis...
I want to know what is the definition of rate of convergence (non-asymptotic) of iterative methods ? For example is it true that if $\|x_n - x^*\| \leq \frac{K}{n}\|x_0 - x^*\|$ then the rate of convergence is $O(1/n)$.
I've been thinking about ways of measuring code, and, quite frankly, I can't think of truly objective, semi-universal ways of evaluating the quality or "strength" of code to say, "Yes, this is better than that based on X, Y, and Z metrics" that are popular or exist. I've looked at SonarQube, and although I think their ...
I know that a fractal is a non ending pattern, like Pascal's triangle or Sierpinski's triangle, which are the same as Rule 90 from Elementary Cellular Automata. But, what about the other rules from Elementary CA? Are they also considered to be fractals? Is there a definition relating Elementary Cellular Automata and fr...
Graphs are usually defined as a set of vertices $V$ together with a set of edges $E$ consisting of elements $V \times V$. I'm interested in a slight generalization of this, where instead one has two sets $V$, $W$ and the edges are taken from $V \times W$. The adjacency matrix of such an object would be rectangular, as ...
I came across this sentence in the Wikipedia article on Shell short, which states that If the file is then k-sorted for some smaller integer k, then the file remains h-sorted. I've seen this claim in other texts like Lafore as well, but I can't wrap my head around why it's true. Of course I can't find a counterexam...
I've a tree with weighed nodes, the problem is to flag a subset of nodes with the following constraints: The selected nodes must be the optimal solution (maximal sum of weight). If one node is flagged no adjacent nodes can be flagged. If a node is flagged it will be called: "directly controlled", the adjacent nodes in...
Karp reduction (polynomial-time many one) is used in complexity theory to define NP-completeness. However, Cook reductions (polynomial-time Turing) is more powerful and intuitive from information theoretic perspective since it could offer an insight into the information content of hard sets in NP. Intuitively, if we sa...
Suppose we forget about optimizing and just want to find a feasible solution to a set of equations: $$\sum_i w_{ij} x_i = W_j.$$ Here we are given $w_{ij}$ and $W_j$, and want to solve for $x_i$. Also $x_i$ are restricted to be 0/1 and we're promised that $w_{ij}$ and $W_j$ will be non-negative integer constants and w...
I've been studying Computation Theory, and in an exercise I am asked to construct a PDA that accepts the language $L=\{x\in(a,b), \#_a(x) = 2\#_b(x)\}$, where $x$ is the input string and $\#_a(x),\#_b(x)$ the number that $a$ or $b$ appears in the $x$ string. That means that the following sequences should all be accepte...
I'm trying to find the $k^{th}$ smallest element of an array by using Randomized Quicksort, But below code giving erroneous result can anybody help. from random import randint lst=[1,3,5,2,4,6] k=6 n=6 def swap(i,j): t=lst[i] lst[i]=lst[j] lst[j]=t def rand_partition(p,q): # i is the pivot position ...
I want to determine whether this decision problem is decidable. I have tried to establish reductions from Halt and "Accepts empty-string", but I've not yet found a solution. Can someone help me out?
is there a mean of creating a cluster of machines, that can be seen as an entire system, using perhaps mac OS X or mac os x server, and use parallelism and GPGPU optimisation to compute all the tasks of a system,as a single machine? Kind Regards
I recently read that a feed forward neural network with a single hidden layer can represent any continuous function to great precision (ref.). Then how can we justify adding more that one hidden layer to our network ?
I'm reading CLRS Section-4.5: The Master method for solving recurrences. There is a line saying $f(n)$ must be polynomially smaller than $n^{\log_b a}$. What is meant by polynomially smaller? Can anybody explain it to me with an example?
Whats the intuition behind multiplying the factor $\log n$ Master Method Case 2 (CLRS Section 4.5) If $f(n) = \theta(n^{\log_b a})$, then $T(n)= \theta(n^{\log_b a} \log n)$ In generalized form sometime it can be written as If $f(n) = \theta(n^{\log_b a} log^k n)$ with $k = 0$, then $T(n) = \theta(n^{\log_b a} \log^...
Is there a difference between a non computable problem and an undecidable problem? Or is one included in the other?
I A many one reducable to B and given A is decidable then is B decidable ? preparing for an exam and please let me know if this holds I understood how if B is decidable then A is decidable and if A is not decidable then B is not decidable
In an exercise, I am asked to find a context free grammar for language $L = \{a^{2^k}, k \in \mathbb{N}\}$. I have been trying to use a "doubling" variable. If $a^{2n} \in L, n\in\mathbb{N}$ then use this variable to double the $a$'s that have been produced by the other language rules. Is this thinking valid? So far I ...
Fractional cascading allows me to search in k ordered lists. It requires every list to have same ordering (how would I otherwise insert elements from the cascade below, preserving order?). But why is this better than merging those k lists and doing binary search on it?
I have been doing some research into the limits of computation and I have come across the terms intractable and undecidable. Are these two terms the same thing? What does intractable mean and what is an example of an intractable and undecidable problem?
Knuth's TAOCP chapter 7.2.1 discusses generating all the $n$-bit binary strings. I am interested in the total number of bits that change during this process. During generation we store an $n$-bit string and can change some of the bits of the string in each round, with the string output at the end of each round. Call th...