Computer Science Stack Exchange Community Digest

Top new questions this week:

Is this "binary submatrix sum equation" problem NP-hard?

There is an unknown matrix $A$ of $R$ rows and $C$ columns. The entry at the $r$-th row, $c$-th column is $A_{rc}$. The matrix is a binary matrix, i.e. each entry is either 0 or 1. Another matrix $B$ ...

complexity-theory np-hard decision-problem matrices  
user avatar asked by Bubbler Score of 7
user avatar answered by EnEm Score of 6

Any algorithm to do Huffman encoding without using graphs?

QUESTION Is there any efficient way to encode words into bits, without having to draw the graphs, solely by only using a list of probabilities? EXAMPLE This list of words: Pr('Apple') = 0.5. Pr('...

graphs information-theory data-compression entropy huffman-coding  
user avatar asked by caveman Score of 6
user avatar answered by Pseudonym Score of 15

Is it possible to have intersection of L1 and L2 DFA contain states with no input edge?

I am doing a HW problem where I have L1 and L2. I did the product construction method to produce all the new states of the DFA representing L1 and L2 (the number of states in L1 times the number of ...

formal-languages regular-languages finite-automata  
user avatar asked by mike Score of 4
user avatar answered by Hendrik Jan Score of 3

Exception handling: 'catch' without explicit 'try'

I'm working on a new general-purpose programming language. Exception handling is supposed to be like in Rust, but simpler. I'm specially interested in feedback for exception handling (throw, catch). ...

programming-languages language-design  
user avatar asked by Thomas Mueller Score of 3
user avatar answered by Jörg W Mittag Score of 4

Simplest way to incorporate edge types into self-attention (in a graph transformer)?

In the GT (Graph Transformer) model presented by Dwivedi & Bresson in "A Generalization of Transformer Networks to Graphs", the following equations are used to update node and edge ...

machine-learning artificial-intelligence  
user avatar asked by td12345 Score of 1

Why $\models (F \rightarrow G)$ when $F$ and $G$ share no atomic formulas implies that either $F$ is unsatisfiable or $G$ is a tautology?

I encountered this problem when studying Uwe Schoning's Logic for Computer Scientists. At the moment, I simply don't seem to think the statement makes sense. What I've tried is to suppose that it is ...

logic  
user avatar asked by The_Eureka Score of 1
user avatar answered by Knogger Score of 1

Effect of slight modification to LL(1) parse table generation

I am experimenting with LL(1) parsers that do not use a separate lexer. I have the following grammar: S = (('<' S '>' | 'a'+) ' '?)+ The notation uses ' ...

formal-languages formal-grammars parsers  
user avatar asked by Maximilian Score of 1

Greatest hits from previous weeks:

Minimum spanning tree vs Shortest path

What is the difference between minimum spanning tree algorithm and a shortest path algorithm? In my data structures class we covered two minimum spanning tree algorithms (Prim's and Kruskal's) and ...

algorithms shortest-path spanning-trees  
user avatar asked by flashburn Score of 72
user avatar answered by Hendrik Jan Score of 60

Why octal and hexadecimal? Computers use binary and humans decimals

Why do we use other bases which are neither binary (for computers) nor decimals (for humans)? Computers end up representing them in binary, and humans strongly prefer getting their decimal ...

numeral-representations  
user avatar asked by Quora Feans Score of 18
user avatar answered by dtech Score of 20

Why is the unit of image size not Pixel²?

If you calculate the area of a rectangle, you just multiply the height and the width and get back the unit squared. Example: 5cm * 10cm = 50cm² In contrast, if you calculate the size of an image, you ...

terminology  
user avatar asked by JFFIGK Score of 90
user avatar answered by Yakk Score of 7

Why does a processor have 32 registers?

I've always wondered why processors stopped at 32 registers. It's by far the fastest piece of the machine, why not just make bigger processors with more registers? Wouldn't that mean less going to the ...

computer-architecture  
user avatar asked by Matt Capone Score of 59
user avatar answered by Wandering Logic Score of 92

Can a public key be used to decrypt a message encrypted by the corresponding private key?

From what I have seen about usage of a pair of public and private keys, the public key is used for encrypting a message, and the private key is used for decrypting the encrypted message. If a message ...

cryptography  
user avatar asked by Tim Score of 49
user avatar answered by Gilles 'SO- stop being evil' Score of 70

Distributed vs parallel computing

I often hear people talking about parallel computing and distributed computing, but I'm under the impression that there is no clear boundary between the 2, and people tend to confuse that pretty ...

terminology distributed-systems parallel-computing  
user avatar asked by Charles Menguy Score of 65
user avatar answered by Gilles 'SO- stop being evil' Score of 61

How does an admissible heuristic ensure an optimal solution?

When using A* (or any other best path finding algorithm), we say that the heuristic used should be admissible, that is, it should never overestimate the actual solution path's length (or moves). How ...

algorithms artificial-intelligence search-algorithms heuristics  
user avatar asked by Ashwin Score of 22

Can you answer these questions?

How many minimal graphs on $n$ vertices with radius and diameter of 2 are there?

A simple graph is a minimal graph with radius and diameter of 2 if its radius and diameter are 2, and removing any edge would increase its diameter. The question is how many such unlabelled graphs on $...

graphs combinatorics  
user avatar asked by rus9384 Score of 1
user avatar answered by codeR Score of 0

Linear time algorithm for computing radius of membership hyper-sphere

We are given a Graph, G(V, E), where V is the node set and E is the edge set consisting of ordered tuples (u, v). The graph is undirected, as such, if (u,v) is in E, then (v, u) is in E. Alongside the ...

algorithms graphs computational-geometry  
user avatar asked by moe asal Score of 1

Failures of greedy graph coloring

I'm working on an algorithm that, in a certain stage, requires solving a variation of the graph coloring problem. (The vertices are line segments in a plane, and two vertices are connected iff the ...

graphs colorings  
user avatar asked by Draconis Score of 1
You're receiving this message because you subscribed to the Computer Science community digest.
Unsubscribe from this community digest       Edit email settings       Leave feedback       Privacy
Stack Overflow

Stack Overflow, 14 Wall Street, 20th Floor, New York, NY 10005

<3
-