theory

Could a truly random number be generated using pings to pseudo-randomly selected IP addresses?

北战南征 提交于 2019-12-02 17:15:00
The question posed came about during a 2nd Year Comp Science lecture while discussing the impossibility of generating numbers in a deterministic computational device. This was the only suggestion which didn't depend on non-commodity-class hardware. Subsequently nobody would put their reputation on the line to argue definitively for or against it. Anyone care to make a stand for or against. If so, how about a mention as to a possible implementation? No. A malicious machine on your network could use ARP spoofing (or a number of other techniques) to intercept your pings and reply to them after

What are some good computer science resources for a blind programmer?

夙愿已清 提交于 2019-12-02 17:03:29
I'm a totally blind individual who would like to learn more of the theory aspect of computer science. I've had an intro data structures class and the general intro programming but would like to learn more on things such as software design, advanced data structures, and compiler design. I want to do this as a self study course not as part of college classes. Unfortunately there aren’t many text books available on computer science from Recordings for the Blind and Dyslexic where I normally get my textbooks. I would appreciate any electronic resources preferably free that could help me get more

Why is number of bits always(?) a power of two?

不羁的心 提交于 2019-12-02 16:57:29
We have 8-bit, 16-bit, 32-bit and 64-bit hardware architectures and operating systems. But not, say, 42-bit or 69-bit ones. Why? Is it something fundamental that makes 2^n bits a better choice, or is just about compatibility with existing systems? (It's obviously convenient that a 64-bit register can hold two 32-bit pointers, or that a 32-bit data unit can hold 4 bytes.) sharptooth That's mostly a matter of tradition. It is not even always true. For example, floating-point units in processors (even contemporary ones) have 80-bits registers. And there's nothing that would force us to have 8-bit

Database Internals - Where to Begin? [closed]

醉酒当歌 提交于 2019-12-02 14:55:57
So lets say that you want to learn some stuff about database internals. What's the best source code to look at? the best books to buy? I was talking about this with a buddy the other day and he recommended: Art of Computer Programming, Volume 3: Sorting and Searching What other books would help me learn about all the File IO and memory issues, pages, locking, etc.... ? Textbook: Database Management Systems by Ramakrishnan and Gehrke. Or: Architecture of a Database System by Hellerstein, Stonebraker, and Hamilton. Production Code: PostgreSQL (I like the PG code better than SQLite , it's far

Exactly what is the difference between a “closure” and a “block”?

冷暖自知 提交于 2019-12-02 14:08:10
I've found that lots of people use the words closure and block interchangeably. Most of these people can't explain what they're talking about. Some Java programmers (even ones from really expensive consultancies) talk about anonymous inner classes as "blocks" and "closures" - but I know this isn't true. (You can't pass mutable variables in from the scope of the method in which they're defined...) I'm looking for: a precise, computer science definition of a block a precise, computer science definition of a closure and clarification on the difference between the two. I'd really like to see links

What are the main differences between the Knuth-Morris-Pratt and Boyer-Moore search algorithms?

雨燕双飞 提交于 2019-12-02 14:03:20
What are the main differences between the Knuth-Morris-Pratt search algorithm and the Boyer-Moore search algorithm? I know KMP searches for Y in X, trying to define a pattern in Y, and saves the pattern in a vector. I also know that BM works better for small words, like DNA (ACTG). What are the main differences in how they work? Which one is faster? Which one is less computer-greedy? In which cases? Moore's UTexas webpage walks through both algorithms in a step-by-step fashion (he also provides various technical sources): Knuth-Morris-Pratt Boyer-Moore According to the man himself, The classic

What is the Pumping Lemma in Layman's terms?

一个人想着一个人 提交于 2019-12-02 13:53:39
I saw this question , and was curious as to what the pumping lemma was ( Wikipedia didn't help much). I understand that it's basically a theoretical proof that must be true in order for a language to be in a certain class, but beyond that I don't really get it. Anyone care to try to explain it at a fairly granular level in a way understandable by non mathematicians/comp sci doctorates? Graphics Noob The pumping lemma is a simple proof to show that a language is not regular, meaning that a Finite State Machine cannot be built for it. The canonical example is the language (a^n)(b^n) . This is

Simple basic explanation of a Distributed Hash Table (DHT)

二次信任 提交于 2019-12-02 13:46:44
Could any one give an explanation on how a DHT works? Nothing too heavy, just the basics. Ok, they're fundamentally a pretty simple idea. A DHT gives you a dictionary-like interface, but the nodes are distributed across the network. The trick with DHTs is that the node that gets to store a particular key is found by hashing that key, so in effect your hash-table buckets are now independent nodes in a network. This gives a lot of fault-tolerance and reliability, and possibly some performance benefit, but it also throws up a lot of headaches. For example, what happens when a node leaves the

RegEx / computer theory - construct a regEx in alphabetical order

我只是一个虾纸丫 提交于 2019-12-02 12:31:51
In my grammars - Computer theory class I am trying to create a regular expression in alphabetical order(a-z) l = {a, b, x, y, z, i, o, u, e, c} This is what i have come up with using the kleene closure aeiou(x*, y*, z*, i*, o*, u* e*) With the kleene close * thats zero or more so that should force abceioxyz? We have not been learning this type of form [^abc] am i on the right track? As far as I understand, you want to capture strings with the following format: The string contains any number of a 's, afterwards any number of b 's, then any number of c 's, and so on... Let's consider a derived

Valid Huffman Codes?

霸气de小男生 提交于 2019-12-02 03:42:47
I'm trying to solve a Huffman Coding problem, but I'm not completely sure I understand the topic completely. I am trying to figure out if the following are is a valid Huffman Code: A: 0 B: 01 C: 11 D: 110 E: 111 What I'm thinking is that it is not valid, because A, or 1, would infringe on B, or 01. I'm not positive though. Could someone enlighten me on this? Edit: I'm sorry I meant to type A as 0 and not 1. No. A Huffman code is a prefix code, which means that no code can be a prefix of any other code. In your example, A is a prefix of B, and C is a prefix of both D and E. A valid prefix code