Problem Detail: 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 Read More …
Category: Uncategorized
[Solved]: Which textbook can I use after a high school CS course?
Problem Detail: I just finished the AP Computer Science course in high school and since my school does not have any further classes, I was thinking about getting a textbook and continuing my study. APCS goes through Big O, Arrays + Read More …
[Solved]: Shouldn’t complexity theory consider the time taken for different operations?
Problem Detail: I have read the answer found here which considers the size of integers when doing comparisons and how that affects on the basic cost of comparison. I am trying to understand why each basic operation takes $O(1)$ time. For Read More …
[Solved]: Using singly linked list instead of a doubly linked list?
Problem Detail: Are there advantages of implementing a singly instead of a doubly linked list other than space? Asked By : PRX Answered By : babou Other than saving space, the first advantage I can see for singly linked lists over doubly linked Read More …
[Solved]: match an array with a given set of arrays
Problem Detail: We have a set of 24 distinct arrays, each array has 36 elements and each element can have one of 13 possible values. Then we’re given an array X (this array is certainly part of our set) and we Read More …
[Solved]: Is it possible to convert a graph with one negative capacity to a graph with only positive capacities?
Problem Detail: I am interested in whether a graph (say, a complete graph) with one capacity negative (or many, but one should suffice) can be reconstructed as a graph with all non-negative capacities where the max flow between vertices of the Read More …
[Solved]: Cost of partitioning in quicksort
Problem Detail: I’m reading “Algorithms Fourth Edition” by Sedgewick & Wayne and am wondering if I have spotted an error in the book or if I just can’t wrap my head around something so simple. When talking about the complexity of Read More …
[Solved]: Is it decidable whether a Turing machine will ever leave the start state on any input?
Problem Detail: Is $L={ M | Mtext{ leaves the start state on every input}}$ decidable? I have an intuition that the following language is undecidable, since the complement $L^C$ seems to not be recursively enumerable. Some TM might remain on the Read More …
[Solved]: What is the formal description of a Turing machine?
Problem Detail: I was asked to give a formal description of a Turing machine I have no experience with this, and was wondering what “formal description” entails. Asked By : Mark Answered By : Yuval Filmus In class you must have seen a Read More …
[Solved]: Is there a generalization of Huffman Coding to Arithmetic coding
Problem Detail: In trying to understand the relationships between Huffman Coding, Arithmetic Coding, and Range Coding, I began to think of the shortcomings of fuffman coding to be related to the problem of fractional bit-packing. That is, suppose you have 240 Read More …