instruction
stringlengths
35
29.1k
I pulled this right from Wikipedia to compare, staring with an SoC: A system on a chip or system on chip (SoC or SOC) is an integrated circuit (IC) that integrates all components of a computer or other electronic system into a single chip. And to compare, here's the microcontroller: A microcontroller (sometimes abbr...
I am confused by the definition of probabilistic checkable proofs. Language $L$ has an $(r(n),q(n))$ - PCP verifier, if there is a PPA V satisfying: Efficiency: $V$ uses at most $r(n)$ random coins and makes at most $q(n)$ nonadaptive queries to location of $\pi$. Completeness: $x \in L, \exists \pi \in \{0,1\}^*, Pr[...
Let S be a system whose state can be altered by performing actions. Each action has two possible outcomes, and each outcome brings to a specific system state. A state is never visited two times, i.e., the state graph is a DAG (a tree, more specifically, where the root corresponds to the initial system state and each ed...
I've been trying to get my head around Expectation maximization algorithms, and I thought I'd start simple. I found this 3-coin example here: http://cs.dartmouth.edu/~cs104/CS104_11.04.22.pdf I understand the calculation of all of the probabilities but I don't understand how the recalculation of lambda, p1 and p2 is a...
Is there any general technique for proving a problem NOT being NP-Complete? I got this question on the exam that asked me to show whether some problem (see below) is NP-Complete. I could not think of any real solution, and just proved it was in P. Obviously this is not a real answer. NP-Complete is defined as the set o...
Should the independence assumption on which the Naive Bayes (NB) classifier is based, be taken into account when applying Expectation Maximization(EM) to infer missing values? The Naive Bayes classifier assumes that all attributes are independent given the class variable. Normally, the given structure of a Bayesian Ne...
I have to find out whether the language $J_1=\{0^n1^n0^n \mid n \in \mathbb{N}\}$ and $J^{c}_{1}$ is recursively enumerable. I already know that $J_1$ is RE, because I have found Turing machine which accepts $J_1$. I would also like to prove this for $J^{c}_{1}$ by using the following theorem: $J\in RE \wedge J^{c} \i...
The knapsack problem is $O(c\,n)$ where $c$ is the capacity of knapsack and $n$ is the number of items. Yet it's exponential because the size of the input is $\log(c)$. However, why don't we emphasize length of input in other algorithms? To name one example, what would be the input size $n$ and worst case time complexi...
A parallel implementation of a computation is usually compared to a sequential version of the same computation. The ratio of the time taken by the sequential version to the time taken by the parallel version is called the speedup. So if 8 cores run their smaller parts of the computation in 2 time units, and one core ...
When analysing treaps (or, equivalently, BSTs or Quicksort), it is not too hard to show that $\qquad\displaystyle \mathbb{E}[d(k)] \in O(\log n)$ where $d(k)$ is the depth of the element with rank $k$ in the set of $n$ keys. Intuitively, this seems to imply that also $\qquad\displaystyle \mathbb{E}[h(T)] \in O(\log n)$...
Let's say I am using Bloom filters to create a function to check if a word exists in a document or not. If I pick a hash function to fill out a bit bucket for all words in my document. Then if for a given number of words, wouldn't the whole bit bucket be all 1s? If so then checking for any word will return true? What ...
This is a homework problem for a class that ended 2 years ago, I'm learning it by myself. Consider a directed graph $D=(V,A)$, $s,t\in V$. $A=\{a_1,\ldots,a_n\}$. Let $P=\{p_1,\ldots,p_m\}$ be the set of all simple paths from $s$ to $t$, There is a capacity function $c:A\to \mathbb{R}^+$. First we are asked to express...
I've been reading the excellent book Knowledge Representation and Reasoning by Ronald Brachman and Hector Levesque. In the beginning of Section 3.2 "Vocabulary" of Chapter 3 "Expressing Knowledge" they state: In creating a KB (Knowledge Base) it is a good idea to start with the set of domain-dependent predicates and f...
I have 2 histograms that represent the height of characters in 2 images. example: 1 ** 2 **** 3 **** . . . 100 ****** For these 2 histograms I compute the peaks. And To check if these 2 images are similar I compute the interseciton between the indices of the 2 images. Example: For image 1 the indices of the peaks a...
Let $T$ be a depth-first search tree of a connected undirected graph $G$ and $h$ be the height of $T$. How do you show that $G$ has no more than $h \times |V|$ edges where $|V|$ is the number of vertices in $G$?
Most probably, this question is asked before. It's from CLRS (2nd Ed) problem 6.5-8 -- Give an $O(n \lg k)$ time algorithm to merge $k$ sorted lists into one sorted list, where $n$ is the total number of elements in all the input lists. (Hint: Use a min-heap for $k$-way merging.) As there are $k$ sorted lists and to...
I have been searching for long but unable to find a solution for this. My question is "Suppose you have n street lights(cannot be moved) and if you get any m from them then it should have atleast k working.Now in how many ways can this be done" This seems to be a combination problem, but the problem here is "m" must be...
I'm going to be involved with a sort of 'open day' at my university in a few weeks. As part of this time, I (along with a coworker) am being given a whole bunch of high-school level students for two hours, as well as a computer lab big enough to contain them all, and I have to do some kind of activity or set of activit...
I am trying to solve a problem on Sphere Online Judge (SPOJ) link to which is: http://www.spoj.com/problems/TRANSP/ The matrix can be thought of as a permutation and its transposition as another permutation. I need to convert the first one into another. I have found a relation between the Cycles in the Permutation and ...
I know that Hamiltonian cycle problem in $3$-regular triangle-free graphs is $NP$-complete. I would like to know how far we can stretch this result. Observing that a triangle is just $C_3$ cycle, what is the longest fixed-length cycle $C_g$ such that deciding the existence of Hamiltonian cycle in $3$-regular $C_g$-free...
I met the problem Show that the solution to $T(n) = 2T(\lfloor n/2\rfloor + 17) + n$ is $O(n \log n)$ while reading Introduction to Algorithm. It's a question about the substitution method for solving recurrences. Should I just assume $T(n/2 + 17) \leq O((n/2 + 17) \log(n/2 + 17))$ and then prove $T(n) \leq O(n \log...
I have a question whether or not CSS and HTML are regular languages. I believe CSS is a regular language, since it should be possible to create a regular expression to match the structure of CSS. However, I believe that HTML is not a regular language since you have nested attributes that could be defined recursively.
I am a CS undergraduate (but I don't know much about AI though, did not take any courses on it, and definitely nothing about NN until recently) who is about to do a school project in AI, so I pick a topics regarding grammar induction (of context-free language and perhaps some subset of context-sensitive language) using...
I am a bit confused about calculating complexities. Above is a C++ program converting a char array into an int, incrementing the value, parsing it back to char array. #include <iostream> int main() { char number[] = {'4', '3', '1'}; int num = 0; //char to int conversion for (int i = 0; i < (int)siz...
Is it possible, in general, to determine whether two regular expressions admit the same set of strings? Also, in particular, is it possible to determine whether a given regular expression admits the same set of strings as the regular expression ".*" (i.e., accepts anything).
When two threads try to access the same resources at exactly the same time how does the computer decide which one gets the resource, or is it just decided at random?
Suppose that $S \in PCP(r(n),q(n))$, colclude that $S \in NTIME(2^r \cdot poly) \cap DTIME(2^{2^r q+r} \cdot poly)$ The idea of a nondeterminstic simulation of the $V$ on input $x$ is simple, guess a proof, check every string $y$ of the length $2^r$, and this simulation should take nondeterministic time $2^r \cdot poly...
I'm working on old multiple choice exams and would like to know if the following statements are true or false: a) $L_1 \le_p L_2 \le_p L_3 \Rightarrow L_1 \le_p L_3$ b) If $L \in \mathsf{NP}$ and $U \le_p L$ holds for all languages $U \in \mathsf{PSPACE}$ then $\mathsf{NP} = \mathsf{PSPACE}$ c) $L \in P \Leftrightarrow...
I've read that quantum computers can solve 'certain problems' exponentially better than classical computers. As I think I understand it, it's NOT the same to say that quantum computers take any problems that are EXPTIME-complete, 2-EXPTIME,... and convert them to linear time or constant-time. I would like to know some...
Consider the $n$-fold integral $$ J = \int_{\theta_1 \in I_1, \theta_2 \in I_2 \ldots, \theta_n \in I_n} d\theta_n\ldots d\theta_2 d\theta_1 $$ whose intervals are defined by $$ \begin{align} I_1 = [0,1] \\ I_i = [\max(c_i,\theta_{i-1}),1] , 2\leq i\leq n \end{align} $$ and the $c_i \in [0,1]$ are predefined ration...
The main question is, how exactly is the big O analysis calculated on routines? Is there a specific formula that relates what each function in a program does to a big O calculation? Also, what about more complex iterations, such as colour conversions etc? I would like to point out that this is not a homework question, ...
I am trying to implement and optimize the Tiny Mersenne Twister (TinyMT) algorithm as required by an API I am developing with my team at work. The algorithm utilizes a C structure with 32-bit unsigned integers "mat1", "mat2", "tmat", and an array called "status" which is four 32-bit unsigned integers wide. I am relativ...
This is a question I found in a practice exam while I am preparing for my mid term exam. The answer needs justification, either a pseudo code or a logical explanation why not. What puzzled me about that question is that we already know that all LOOP programs terminate at some point, the question seems odd to me. Any re...
Given $m,n\in\mathbb{N}$, finite alphabet $A=\{a,b,c\}$, and $L=\{(a^m,a^n)\}^*=\{(a^{mk},a^{nk})|k∈N\}\subseteq A^*\times A^*$. Is this binary language $L$ regular over $A(2,\$)$ (i.e. $\{A∪\{\$\}\}\times \{A∪\{\$\}\}\setminus \{\$,\$\}$)? For example, is this binary language $L=\{(a^3,a^7)\}^*=\{(a^{3k},a^{7k})|k∈N...
The PCP theorem implies (with other results) that there is no polynomial time algorithm for MAX 3SAT to find an assignment satisfying $7/8+ \epsilon$ clauses of a satisfiable 3SAT formula unless $P = NP$. There is a trivial polynomial time algorithm that satisfies $7/8$ of the clauses. How hard is it to find an assignm...
If I am right students learning computer science at universities learn very theoretical kind of knowledge. A knowledge most of which (e.g. algorithm theory) can't be used to create everyday software (e.g. MS Word, IE, etc.). What opportunities do computer science graduates have if they don't want to do research but ra...
I am having some issues proving a problem I am working on. I have been sketching out examples but the proof is not jumping out at me. Question: Let $G = (V,E)$ be an undirected $r$-regular graph (that is each vertex has a degree of $r$) for some $0 < r < n$, where $|V| = n > 1$. Prove that either $G$ or its complement ...
Solve this problem: "build an infinite binary oscilator" With a Turing Machine we can solve it a=False While True: a=not a print a, then output will be True False True False True False ... (for ever) I think an oracle can't do it, because its definition, it could solve in "one operation", but here there's not h...
I'm writing deduplication program that implements content-defined chunking. Just now i know 3 algorithms to do it (hashing a fixed-size window and selecting hashes < maxuint/N, hashing an order-1 bounded window, and local maxima chunking). Are you know other algorithms or ideas to improve these ones? My goal is to get ...
I'm currently doing some research on operations on languages, specifically prefix, suffix, infix and outfix. For example, for a language $L$, the prefix set of $L$ is: $pref(L) = \{x \mid xy \in L, y \in \Sigma^* \}$ Infix is $inf(L) = \{w \mid xwy \in L, x,y \in \Sigma^* \}$ and outfix is: $outf(L) = \{xy \mid xwy \i...
I was admiring this rendition of the Mona Lisa from quasimondo's Flickr account. He says: Combining circle packing with data visualization. The pie charts show the distribution of the dominant colors under the circle area. The circle packing technique used here is a combination of an image segmentation with a dis...
I'm interested to see if I can use machine learning/network analysis methods to automatically detect automatically generated (spam) webpages. I'm particularly interested in webpages that look structurally like a non-spam website, but on closer inspection are total rubbish. If I want to test a method, I'd need some way...
In Type Theory if one allows Type to be a member of itself, it makes the theory inconsistent. I understand it by analogy to Russel's paradox in Set Theory, but would prefer to see it done in Type Theory. Is there a short example of the equivalent in Type Theory?
This seems like a question that should have an easy answer, but I don't have a definitive one: If I have two $n$ bit numbers $a, p$, what is the complexity of computing $a\bmod p$ ? Merely dividing $a$ by $p$ would take time $O(M(n))$ where $M(n)$ is the complexity of multiplication. But can $\bmod$ be performed s...
I am studying now for a test in my complexity course. When I solved previous exams I saw the following question: Prove that the language $L$ of all directed graphs on $n$ vertices that contain exactly $10\sqrt{n}$ strongly connected components is in $NL$. We saw in class that checking whether a directed graph contains...
Let us define two languages of Turing machines. $$ EQ_{TM} = \{<M_1,M_2> : L(M_1) = L(M_2)\} $$ $$ ALL_{TM} = \{<M> : L(M) = \Sigma^*\} $$ It is easy to show that neither of the languages are in $RE \cup coRE$, and also it is easy to construct a reduction $ALL_{TM} \leq EQ_{TM}$. I suspect that there is no reduction in...
I am generating random DFAs to test a DFA reduction algorithm on them. The algorithm that I'm using right now is as follows: for each state $q$, for each symbol in the alphabet $c$, add $\delta (q, c)$ to some random state. Each state has the same probability of becoming a final state. Is this a good method of generat...
I am interested in showing connection between CSP (Constraint Satisfaction Problems) as it's defined in CSP (definition with Constraint graph, sometimes called binary CSP) and 3SAT problem, when domain of CSP contains of 7 values. The specific requirement is to show reduction from 3SAT to GAP CSP, when domain of CSP c...
I am building a text categorizer for short sentences. In addition to telling the user "the category of the text you entered is C", I want to be able to explain why I made this decision, in a short and understandable way. For example, I don't want to tell the user "I put your sentence into a complex 3-layered neural ne...
I am asking this to advance the argument that BigDecimal is better than float or double for representing exact amounts of currency. Can someone refer me to a proof that between any two integers there are only four values that multiples of .01 and can be exactly represented in base 2? Or at least confirm I'm correct ...
Pardon me if i'm missing something which is very obvious here but i cant seem to figure it out. $E=\{ \langle M, w \rangle \mid \text{ Turing Machine encoded by $M$ accepts input $w$ after at most $ 2^{|w|}$ steps}\}$ We have to prove $E\notin P$ The book (Papadimitrou, Elements of the ToC) assumes $E\in P$ and it con...
I was looking for an appropriate term to call my proposal. I knew it is either platform or architecture. But could not simply and clearly distinguish them in an academic manner. So, I searched the web and the literature and found few definitions on architecture and platform as follows that sound logical. Software Arch...
Suppose that we have a directed graph $G = (V, E)$ represented as an adjacency list. Suppose that we want to list all of the edges incident to some node $v \in V$. We can do this by iterating over all the elements in the adjacency list. My question concerns the runtime of this operation. Is it proper to say that the...
On the circulation problem page on wikipedia, the multicommodity circulation problem formulation seems to be insufficient, since we can just set all but one flow to $0$, and reduce it to a circulation problem. I can't find any concrete description of multicommodity circulation problem to verify the correctness. There i...
Regarding Processor Direct Cache, what is the proper mathematical technique for discovering how many words are loaded on a cache miss? For example if you have a direct mapped cache with a total data cache size of 32 words and a direct mapped cache of 4-word blocks. I believe I have a cache index of 8 cache blocks: 32/...
It is easy to rotate pixel array if the angle is a multiple of 90 degree. For example, (quote from Computer Graphics with OpenGL) We can rotate a two-dimensional object or pattern 90' counterwise by reversing the pixel values in each row of the array, then interchanging rows and columns. But I could not understa...
I want to show that the following problems are in NP (NP-completeness is irrelevant) by textually describing a non-deterministic Turing machine which runs in polynomial time. The assumptions are that addition, multiplication, tests for divisibility can be done in polynomial time and natural numbers are represented in b...
Working on a project for my Data Structures class. I've implemented a Red/Black tree in Java. One of the operations required of the data structure is "find a node which has a key of at least n". The leaves of the tree are the sentinel node. My initial thought was using the regular search with modifications: Search for...
In a different post it came up that (using the Turing machine model of computation), it is not even safe to say that $N$ numbers can be read in $O(N)$ time. To me this is boggling since it's something I take for granted in the RAM model of computation, and I admittedly only have a cursory understanding of Turing ma...
A bit of background, the work that I currently and will be doing involves sorting very large amounts of data (in this case, grayscale pixels in descending order), sometimes up to 4 million. Which are the most effective and efficient sorting algorithms that could handle multiple large datasets (such as descried in the...
Given a valid binary search tree whose keys are unique real numbers, and a set of $k$ pointers to the $k$ minimum elements in the tree, will the BST property be maintained if I replace all $k$ elements with the average of the $k$ elements? The BST property as given in Corman: Let $x$ be a node in a binary search tree...
Let there be 2 sets $X$ and $Y$, both are countable (assume the bijection from $\mathbb{N}$ to the respective sets is computable) and infinite. Let $S$ be the set of all possible functions (NOT necessarily computable, i dont care about computability at this point) from $A$ to $Y$ for all $A \subset X$ (Remember that $A...
If you have a long string of length $n$ and a shorter string of length $m$, what is a suitable recurrence to let you compute all $n-m+1$ Levevenshtein distances between the shorter string and all substrings of the longer string of length $m$? Can it in fact be done in $O(nm)$ time?
Given an undirected graph with positive weights, there are 2 kinds of edges: locked edges and unlocked edges. Determination if a given edge is either locked or unlocked edge takes O(1). For given two vertices s , t and a positive number k = O(1), How can I find the shortest path between s and t which contains at most ...
I am a student of computer science with interest in image processing. I have learned how to apply a few effects to images like making them grayscale, sketching them out of lines, etc. I would like to learn more about the algorithmic techniques behind creative manipulation of images like making them sepia-tone, smudg...
A binary sequence of length $n$ is just an ordered sequence $x_1,\ldots,x_n$ so that each $x_j$ is either $0$ or $1$. In order to generate all such binary sequences, one can use the obvious binary tree structure in the following way: the root is "empty", but each left child corresponds to the addition of $0$ to the exi...
I have two for loops, one nested within the other. I have two int variables n and U, where U > n. I know that the outer loop runs exactly U times (pretty much for(int i = 0; i < U -1; i++)), and the inner loop runs exactly n times in total for the duration of the entire execution. It can run n times once and never run ...
I have a rather interesting exercise in Game Theory. Assume there is a 2-players game, and player $i$ has $n_i$ pure strategies. The game is given by listing the payoffs for each player for each $n_1 × n_2$ possible plays. Give a polynomial time algorithm to check if there is a Nash equilibrium for the game in which ea...
I am reading Kolmogorov Complexity by Li and Vitányi: "Let $x$ be a finite binary string. We write '$x$ is random' if the shortest binary description of $x$ with respect to the optimal specification method $D_0$ has length at least $x$." By length $x$ I understand the natural number that the binary string maps to canon...
While I was doing CLRS (3rd edition), I came across this question on page 629: Professor Sabatier conjectures the following converse of Theorem 23.1: Let $G = (V,E)$ be a connected, undirected graph with a real-valued weight function $w$ defined on $E$. Let $A \subseteq E$ that is included in some minimum spanni...
Given $s$ as a string over some alphabet, what is the best known algorithm to compute a corresponding deterministic finite-state automaton (DFA) that accepts any string that contains $s$? I am mostly interested of the lowest time complexity so if you tell me what is the best known complexity in O notation to build an a...
I'm trying write a program to solve equations from the following form: $$ \begin{align} a \bmod x &= t_1 \\ b \bmod x &= t_2 \\ \end{align} $$ where $a$, $b$, $t_1$ and $t_2$ are known values. I have multiple equations of the same form and I'd like to solve them for $x$. Assuming I have constraints on $t_1$ and on $t_2...
There is a lot of information available on the subject of Pairwise Comparisons but I haven't found any guidance on how to optimize pair measurements that have confidence values attached to them. Imagine that an AI black box has been trained on many pairs of objects in order to predict the distance between the objects i...
How do you go about analysing coin change recursive solution. i.e, T(N,K) = T(N,K-1) + T(N-1,K) for K denominations that add up to amount N. You can find the problem description and pseudo code here - http://www.algorithmist.com/index.php/Coin_Change#Recursive_Formulation
From a very strictly adhering sense to the hardware and circuit-level operations of any standard (non-specialized, DSPs, or supercomputing systems, etc.) microprocessor follow very similar, almost exact in some ways, operations. The typical role of the (main) processor in a computer, integrated with other hardware circ...
The partition problem is a well-known NP-complete problem. In the definitions I have seen, the input is assumed to be a multiset of integers, and we want to decide the existence of a partition into two sets that have the same sum. My question is: Is the partition problem still NP-complete if all input integers are dis...
Could anyone help me please to find who was the first person who has proved that the language of all borderless words is not regular and when was that? Could you mention the reference, please? A word $w$ has a border $u$ if $u$ is both prefix and suffix of $w$ (and $u$ does not equal $\lambda$ or $w$).
I have a large data set consisting of ca. 40 categorical data items and a few interval data items (real numbers, less than 5 such items). Most categories should have a lot of values that repeat themselves over and over, and very few that appear very rarely. Some categories are also overcategories of others (like countr...
This is a problem from a past contest at topcoder : Problem. Its solution is given here : Solution [Scroll Down to Penguin Emperor] I am unable to understand how the section with subheading "Combinations are associative" works. What is actually going on in this step ? How is the convolution property being used ? Or the...
How to find the smallest difference between two numbers in a sorted list using divide-and-conquer approach? For example, (smallest-dif '(5 500 510 670 750 10000)) => 10
Within the field of cache-oblivious algorithms the ideal cache model is used for determining the cache complexity of an algorithm. One of the assumptions of the ideal cache model is that it models a "tall cache". This is given by the statement $Z = \Omega(L^2)$. Where $Z$ is the size of the cache and $L$ is the size...
"The designer of an algorithm needs to balance between space complexity and time complexity." - Comment on the validity of the statement in the context of recursive algorithms. This is a question from my university's previous paper. But i couldn't find a decent answer. Actually i am confused about how can a developer ...
I'm looking for empirical papers which investigate if a user can benefit from Q&A sites like Stack Overflow. I welcome any papers related to this topic, e.g: an experiment, investigating if a specific task can be executed faster, an analysis, investigating if a user understands the solutions on Q&A sites or if he jus...
I need to find the maximal subset $S$ of an array $A$ of length $N$ ,where each element of $A$ contains $X$ and $Y$, such that for each $0 \leq i \lt N$ , $j \lt i$ the rule is $S[i].X \lt S[j].Y$ , What would be the best approach for finding such subset of $A$ (in terms of time, knowing that $N \leq 100,000$) ? EDIT: ...
Let us consider the following game: there are some players and a computer. Each player inputs one positive integer and his name (player doesn't know another's numbers, just his own). When all the players made their moves, computer outputs a name of winner – who submitted the lowest unique number. How do you think, what...
I'm currently writing my thesis, which uses genetic algorithms at some point. Now I need to define some parameters for the genetic algorithm I know that, because of the No Free Lunch Theorem there is no optimal parameter configuration for all problems. However I do need some default parameters, because finding the opt...
The problem is a scheduling problem with n jobs and k machines. Each job i can be started at any time, but its duration is not exactly known except a time span interval. For example, a job may take anything from 5 mins to 10 mins. The list of jobs and their duration interval is given to the scheduler and the aim is to ...
Christofides' 1.5-approximation considers complete graphs as inputs, and as I understand this is essential. If the input graph is not complete, how can I add new edges with suitable weights such that the resulting complete graph still satisfies the triangle inequality, and, of course, the TSP solution for the complete ...
I am having problems understanding a basic concept in CLRS, it is about worst case partitioning during quicksort -- The worst-case behavior for quicksort occurs when the partitioning routine produces one subproblem with $n − 1$ elements and one with $0$ elements. What does it mean by subproblem of size $0$? But what...
Can somebody refer me to peer-reviewed papers studying the advantages or disadvantages of writing code in a functional style? Are there papers which discuss the applications of Lambda Calculus in fields such as Machine Learning, Language Design, etc.?
I'd like to reduce 3 colorability to SAT. I've stuffed up somewhere because I've shown it's equivalent to 2 SAT. Given some graph $G = (V,E)$ and three colors, red, blue, green. For every vertex $i$, let the boolean variable $i_r$ tell you whether the $i$-th vertex is red (or more precisely, that the $i$-th vertex is r...
Consider we have a finite set $S$ with $n$ distinct elements. We want to find a subset $\{a_1, a_2, \dotsc, a_k\}\subseteq S$ ($k\ll n$) such that a function $f(a_1,a_2,\dotsc,a_k)$ is maximized. Consider $f$ to be a symmetric function that takes $k$ arguments. More specifically, we are given $n = 120$ items, each ite...
I just recently learned about the existence of this hierarchical temporal memory (HTM). I already read the document Hierarchical Temporal Memory: Concepts, Theory and Terminology (by Jeff Hawkins and Dileep George), which seems rather easy to understand, but one red flag is that the document is neither peer-reviewed no...
If Turing Machines are the automata equivalent of the $\lambda$ calculus, what is the automaton equivalent of the $\pi$ calculus? I suppose it would be some class of automata that resembled a Turing Machine, but with support for communication channels or signals of some type, but I'm not sure, and would appreciate some...
Do they need to "unwind" exactly to the same set of paths or does it suffice when one set is contained in the other ? Or is it sufficient to argue that M,s satisfies both LTL formulas for any starting s and a model M, that is, reaching with both at "true" ? Generally. Let $M$ be any model. Further, let $s$ be any stat...
Would it be convenient to express semantics of imperative languages (e.g. C) and object-oriented languages (e.g. Java) with $\lambda$-calculus? Or in the other words: is $\lambda$-calculus a suitable candidate for expressing semantics of all context-sensitive languages?
I recall hearing briefly about this back in one of my CS courses on hardware, but I can't recall many of the details, nor can I find anything online that talks about it. A search on Google only yields a bunch of pages about Android emulators and people complaining that PCSX2 is slow. I'd like to know, in general, why s...
I want to find out an algorithm to find out the largest least common multiple (LCM) of the partitions of an integer $n$. Example: $5 = 1 + 4$, $5 = 2 + 3$, since $\mathrm{LCM}(1,4) < \mathrm{LCM}(2,3) = 6$, the largest LCM of the partitions of $5$ is 6. The definition of "partition" is the standard definition of it. I...
The running time of knapsack is $O(n*W)$, but we always specify that this is only pseudo-polynomial. I was wondering if somebody could tell me if I understand the notion of pseudo-polynomial time correctly. My current understanding is that pseudo polynomial time means polynomial in the magnitude of the input, and poly...
It is written on Wikipedia that "... selection sort almost always outperforms bubble sort and gnome sort." Can anybody please explain to me why is selection sort considered faster than bubble sort even though both of them have: Worst case time complexity: $\mathcal O(n^2)$ Number of comparisons: $\mathcal O(n...