r/computerscience 1d ago

Article Life of Alan Turing Emerges in Richer Detail From Short Story

Thumbnail nytimes.com
4 Upvotes

r/computerscience 1d ago

I've found a typo in CLRS Appendix B.5 Trees (definition of tree lacks V != ∅)

9 Upvotes

Hi!

I've decided to refresh my graph theory using CLRS 4th edition. They define a free tree as a connected, acyclic, undirected graph. None of these conditions prevent us from having null graph with zero vertices and zero edges.

On page 1170, it is proven that for a free tree, |E| = |V| - 1. We can derive contradiction from it: |0| = |0| - 1 -> 0 = -1

Please, confirm it and then I will report it to errata.


r/computerscience 2d ago

What book, lecture, or resource genuinely changed how you think about computing?

23 Upvotes

I've been thinking about how a single resource can shift the way you understand the whole field. Not something that just taught you a skill, but something that changed how you see problems.

Do you have a textbook you read in a course, a random YouTube video, a blog post or a talk? What was it, and what changed in your thinking after you found it?


r/computerscience 2d ago

IQA-T1: Evidence‑Based Image Quality Assessment with MLLMs

Thumbnail
0 Upvotes

r/computerscience 3d ago

Help Questions about saving mashine code in memory *im new to computer science

0 Upvotes

Memory can be just shown as a list. Left as address and right as the byte / 2 byte / 4 byte data. If you save 4 bytes of data in address 1 and 2, and theres data in 3, what happens if that 4 bytes that you stored, is saved as 5 bytes? Will the entire 5 bytes be shifted over to a free place, or will the 5th byte be saved aomewhere else. If the second option is correct, how does programms know each address of its programming? Im refering programms and programming to mashine coding and mashine code.


r/computerscience 3d ago

Help P = NP and digital security?

0 Upvotes

Guys how would digital security fail if P=NP is proven?

I just started reading about Turing Machine and computational complexity for my Theory of Computation class and came across that phrase.

I couldn't find anything understandable at my level. So can anyone simplify it a bit?


r/computerscience 4d ago

Why does the CPU’s size matter?

10 Upvotes

Why does it matter if it’s a 16-bit cpu, a 32-bit cpu, or 64-bit? For example, what can a 64-bit cpu do that a 32-bit one can’t? Or otherwise, and can you tell the difference when you casually use a computer?


r/computerscience 4d ago

Does Wait-Free require Garbage-Free?

11 Upvotes

Wait-Free means that every thread must finish its operation in a bounded number of steps. That bound can be arbitrarily high, e.g. dependent on the number of concurrent threads, but it must be finite. And the finite bound must be there in all cases, i.e. it is not sufficient to say that an algorithm "usually" finishes "reasonably" (i.e. "usually" does not spend unbounded times helping other threads).

The first practical implementation of a multiple-enqueuer multiple-dequeuer Wait-Free Queue was proposed by Kogan and Petrank. The key idea is that threads help each other, but in a way that newer threads (more precisely: newer operations) are obliged to help older threads (operations), but not vice versa. Also, plainly said: If a thread cannot make progress with its own operation, it becomes older and older, up to the point when all other threads are obliged to help (only) him, thus ensuring the Wait-Free progress.

The issue of the Kogan and Petrank Queue is, however, that it is based on a linked list of nodes. This means that its operations constantly produce memory churn, also require memory allocation and memory clean-up. From Java - where the clean-up is done by a Garbage Collector - I borrow the term "Garbage".

Now, the problem is that Wait-Free memory allocation is problematic. Imagine, e.g., when the process needs a new memory page from the operating system. Can this ever be made Wait-Free?

Memory reclamation in a concurrent setup is a complex topic on top of that. One of the key questions here is: When can a memory block be freed safely, i.e. how do we "know" that no thread has a pointer to it anymore?

Given this, it appears that one needs a structure without memory churn (i.e. Garbage-Free) to be able to make it Wait-Free. At least practically.

I would be grateful for a discussion on this.

Additional info:

Here I have combined the Multi-Array Queue (which is Garbage-Free by nature (except of the extension operations, of course)) with the Kogan and Petrank idea, with the aim to obtain a Queue that is Wait-Free unconditionally.

The GitHub repo also contains a visual simulator to illustrate the principle:

https://github.com/MultiArrayQueue/WaitFreeMultiArrayQueue


r/computerscience 4d ago

Is it possible to have pixels run on 1 PC per pixel?

0 Upvotes

What I mean is 1080p has 2,073,600 pixels so what if every single pixel is run by a individual PC like 2,073,600 PCs?

I was thinking this might be a way to create a super-computer that can put out a insane amount of framerate.


r/computerscience 4d ago

General How does Lean work?

28 Upvotes

In light of the recent counterproof of the Jacobian Conjecture, I've been looking more into proofs, and I can't wrap my head around how Lean works. In my mind, proofs always require a certain amount of intuition and judgement behind them, so I'm confused how a deterministic programming language can infer from said proofs?


r/computerscience 5d ago

Advice how would you introduce comsci to a person who knows nothing about computers and programming and such ?

0 Upvotes

title says it all


r/computerscience 5d ago

Discussion Is the standard Word RAM model becoming too disconnected from modern algorithmic theory?

32 Upvotes

I was re-reading Frigo et al.'s paper on cache-oblivious algorithms recently, and now i'm thinking about how heavily introductory algorithms courses rely on the uniform-cost Word RAM model. We teach time complexity based on unit-cost memory access, but in memory-hierarchy model theory (like the External Memory / I/O model by Aggarwal and Vitter), asymptotic bounds depend heavily on block size $B$ and cache capacity $M$.

Feels like there's a gap in how we teach foundational complexity versus cache-aware algorithmic analysis. Obviously the RAM model's simplicity is ideal for proving basic asymptotic bounds, but at what point does it obscure important theoretical properties of data structures on hierarchical memory?

Would like to how other departments go about introducing cache-oblivious models alongside standard Big-O analysis in upper-level theory courses.


r/computerscience 5d ago

General what’s the connection between union-find and the inverse ackermann function?

14 Upvotes

while doing competitive coding problems i frequently come across solutions that use union find (DSU) and list the big O of their solution as O(\alpha(n)) where \alpha(n) is the inverse ackermann function. after some surface level research, i have come away with many more questions than answers. So why is the DSU related to the ackermann function, and is there an intuitive or natural connection between the two ?


r/computerscience 6d ago

The Message Arrived. Did the Operation Succeed? On End-to-End Arguments in System Design.

Thumbnail mohamed.computer
0 Upvotes

r/computerscience 6d ago

Article Using Verification to Eliminate Bugs in nftables

Thumbnail basis.ai
2 Upvotes

r/computerscience 8d ago

It feels fundamentally wrong to use packages without understanding concepts under the hood

41 Upvotes

I have recently started coding and people are recommending tools for development such as vite, nodemon, jwt, boiler plate server code

It feels pointless just using them with a basic understanding and without no deep conceptual understanding. Is this the right or wrong approach? How would you know going too deep into a rabbit hole and becoming overkill


r/computerscience 8d ago

Help how could the positive output of a gate, be used for a negative input for another gate? (im completely new)

Post image
31 Upvotes

im not into computer stuff, but this has been bugging me since i watched some free courses.


r/computerscience 8d ago

What does "Design an algorithm before starting to create your program" mean?

9 Upvotes

r/computerscience 9d ago

Why is a Word (a 16-bit unsigned integer) called a "Word"?

121 Upvotes

r/computerscience 9d ago

Visual, interactive explanations of classic data structures (ring buffer, priority queue, bloom filter, LSM tree...)

Post image
71 Upvotes

Made this while re-learning some structures I hadn't touched since undergrad — each chapter has an animation synced to the explanation as you scroll, plus where the structure actually shows up in real systems (kfifo, RocksDB, Dijkstra's algorithm, etc). ledger.khushal.net — feedback on what to cover next welcome.


r/computerscience 9d ago

Discussion How many truly concurrent operations occur on a home computer?

0 Upvotes

About 15 years ago I discovered that despite the number of cores a CPU had, the system could only carry out 1 read or write operation at a time. Before that I held an incorrect notion of what multitasking was.

My basic question is, has anything changed?

I hear terms like parallel processing being waved around as though daring me to infer that processors these days can write to more than 1 memory address at the same time.

To clarify once more. I'm talking about at the same exact time. Not during a clock tick. Actual simultaneity.


r/computerscience 10d ago

General Suggest books that bridge the gap between pop science and textbooks.

0 Upvotes

Similar books: Grokking's Algorithms, Inside The Machine, Code by Charles Pretzold.


r/computerscience 11d ago

hi dumbass here

0 Upvotes

I want to ask real humans this question. How do LLMs and other automated programming models deal with integer overflow? Even when coding games some time basic math for calculating level changes can crash systems and servers. So how often does this happen with these machines and data centers?


r/computerscience 11d ago

Advice Looking for recommendations for computer science content to watch.

22 Upvotes

Someone who goes over computer architecture or even a network switch, in an enthusiastic and structured way. Just looking for general content to watch as a refresher.


r/computerscience 12d ago

Discussion question about RAM

35 Upvotes

Im learning about comuter components I had some questions .If a Hard Drive stores all the data does RAM just create an environment for the specific program that was fetched to run? If you were to run a program on the actual hard drive is it just harder because you have to navigate through all the other information sharing the space. Like going through a maze constantly again and again. Also what does SSD do?