computer-science

What is an SSTable?

In BigTable/GFS and Cassandra terminology, what is the definition of a SSTable? ...

whats the term used to describe sending the same message to a system and reciving the same response

I"m looking for a term here. in messaging systems you send a request, and it processes and sends a response. if that same request is sent it should return the same response, (but not necessarily process the details) This would be like submitting financial details twice. ...

First order logic formula

R(x) is a red block B(x) is a blue block T(x,y) block x is on top of block y Question: Write a formula asserting that if no red block is on top of a red block then no red block is on top of itself. My answer: (Ax)(Ay)(R(x) and R(y) -> ~T(x,y))->(Ax)(R(x)-> ~T(x,x)) A = For all ~ = Not -> = implies ...

Searching, Sorting and Graph Algorithms questions

Is there a resource that i can find different variations of searching, sorting and graph algorithm questions ? I have studied CLRS and Algorithm Design by Kleinberg. and solved some set of questions. I have also, checked SO for algorithms questions. Curious, if there is a resource you would highly recommend. EDIT: There is also this...

How to begin with augmented reality?

I'm currently an undergrad in computer science and I'll be entering my final year next year. Augmented reality is something I find to be a really interesting topic, but I have no idea where to start learning about it. Where do you start learning about this topic and what libraries are available? ...

two's complement, why the name "two"

i know unsigned,two's complement, ones' complement and sign magnitude, and the difference between these, but what i'm curious about is: why it's called two's(or ones') complement, so is there a more generalize N's complement? in which way did these genius deduce such a natural way to represent negative numbers? ...

why IEEE floating point number calculate exponent using a biased form?

let's say, for the float type in c, according to the IEEE floating point specification, there are 8-bit used for the fraction filed, and it is calculated as first taken these 8-bit and translated it into an unsigned number, and then minus the BIASE, which is 2^7 - 1 = 127, and the result is an exponent ranges from -127 to 128, inclusive....

Theory of Computation - Showing that a language is regular..

I'm reviewing some notes for my course on Theory of Computation and I'm a little bit stuck on showing the following statement and I was hoping somebody could help me out with an explanation :) Let A be a regular language. The language B = {ab | a exists in A and b does not exist in A*} Why is B a regular language? Some points are obvi...

Theory of computation - Using the pumping lemma for context free languages

I'm reviewing my notes for my course on theory of computation and I'm having trouble understanding how to complete a certain proof. Here is the question: A = {0^n 1^m 0^n | n>=1, m>=1} Prove that A is not regular. It's pretty obvious that the pumping lemma has to be used for this. So, we have |vy| >= 1 |vxy| <= p (p being the pu...

Is the language A = {0^n 1^n 0^n} context free?

Hi, I was just putting some thought into different languages (as I'm reviewing for final exams coming up) and I can not think of a valid pushdown automata to handle the language A = {0^n 1^n 0^n | n >= 0}. This is not a context-free language, am I correct? ...

Divide and conquer method to compute roots [SOLVED]

Hello, Knowing that we can use Divide-and-Conquer algorithm to compute large exponents, for exemple 2 exp 100 = 2 exp(50) * 2 exp(50), which is quite more efficient, is this method efficient using roots ? For exemple 2 exp (1/100) = (2 exp(1/50)) exp(1/50) ? In other words, I'm wondering if (n exp(1/x)) is more efficient to (n exp(1/y)...

Why is it useful to count the number of bits?

I've seen the numerous questions about counting the number of set bits in an insert type of input, but why is it useful? For those looking for algorithms about bit counting, look here: http://stackoverflow.com/questions/1517848/counting-common-bits-in-a-sequence-of-unsigned-longs http://stackoverflow.com/questions/472325/fastest-way-t...

How to determine the longest increasing subsequence using dynamic programming?

Let's say I have a set of integers. I want to find the longest increasing subsequence of that set using dynamic programming. This is simply out of practice, reviewing my old notes from my algorithms course, and I don't seem to understand how this works. Thanks ...

Dynamic programming - Coin change decision problem?

I'm reviewing some old notes from my algorithms course and the dynamic programming problems are seeming a bit tricky to me. I have a problem where we have an unlimited supply of coins, with some denominations x1, x2, ... xn and we want to make change for some value X. We are trying to design a dynamic program to decide whether change f...

Proving that the distance values extracted in Dijkstra's algorithm is non-decreasing?

I'm reviewing my old algorithms notes and have come across this proof. It was from an assignment I had and I got it correct, but I feel that the proof certainly lacks. The question is to prove that the distance values taken from the priority queue in Dijkstra's algorithm is a non-decreasing sequence. My proof goes as follows: Pr...

Proving that P <= NP

As most people know, P = NP is unproven and seems unlikely to be true. The proof would prove that P <= NP and NP <= P. Only one of those is hard, though. P <= NP is almost by definition true. In fact, that's the only way that I know how to state that P <= NP. It's just intuitive. How would you prove that P <= NP? ...

Summer Learning Opportunities for an upcoming College Freshman

I'm currently a senior in high school, about to matriculate and pursue a major in Computer Science (possibly dual-major with electrical engineering. Comments?). I already program regularly as a hobby, but I would like to get a jump start this summer by perhaps attending a seminar, helping out on an open source project...you know, somethi...

Is the integer-factorization problem (used for many cryptographic applications) NP-Complete?

As the question states, does the integer-factorization problem fall into the class of NP-Complete problems? ...

Dynamic programming solution to the subset-sum decision problem

How can a dynamic programming solution for the unbounded knapsack decision problem be used to come up with a dynamic programming solution to the subset-sum decision problem? This limitation seems to render the unbounded knapsack problem useless. In the unbounded knapsack, we simply store true or false for if some subset of integers sum...

What are 'len', 'dir', 'vars' named?

I was wondering what language to use when talking about a function that takes in a specific object, acts on it and returns something else. Clearly they're functions, but I was wondering if there's a more specific term. A couple examples of Python built-in functions that fit this spec are: 'len', 'dir', 'vars' I thought it was 'predicat...