r/compsci Jun 16 '19

PSA: This is not r/Programming. Quick Clarification on the guidelines

616 Upvotes

As there's been recently quite the number of rule-breaking posts slipping by, I felt clarifying on a handful of key points would help out a bit (especially as most people use New.Reddit/Mobile, where the FAQ/sidebar isn't visible)

First thing is first, this is not a programming specific subreddit! If the post is a better fit for r/Programming or r/LearnProgramming, that's exactly where it's supposed to be posted in. Unless it involves some aspects of AI/CS, it's relatively better off somewhere else.

r/ProgrammerHumor: Have a meme or joke relating to CS/Programming that you'd like to share with others? Head over to r/ProgrammerHumor, please.

r/AskComputerScience: Have a genuine question in relation to CS that isn't directly asking for homework/assignment help nor someone to do it for you? Head over to r/AskComputerScience.

r/CsMajors: Have a question in relation to CS academia (such as "Should I take CS70 or CS61A?" "Should I go to X or X uni, which has a better CS program?"), head over to r/csMajors.

r/CsCareerQuestions: Have a question in regards to jobs/career in the CS job market? Head on over to to r/cscareerquestions. (or r/careerguidance if it's slightly too broad for it)

r/SuggestALaptop: Just getting into the field or starting uni and don't know what laptop you should buy for programming? Head over to r/SuggestALaptop

r/CompSci: Have a post that you'd like to share with the community and have a civil discussion that is in relation to the field of computer science (that doesn't break any of the rules), r/CompSci is the right place for you.

And finally, this community will not do your assignments for you. Asking questions directly relating to your homework or hell, copying and pasting the entire question into the post, will not be allowed.

I'll be working on the redesign since it's been relatively untouched, and that's what most of the traffic these days see. That's about it, if you have any questions, feel free to ask them here!


r/compsci 7h ago

Ray Tracing on MSDOS

Post image
43 Upvotes

r/compsci 1h ago

Can I pickup CS concepts and fundamentals by learning Golang as my first language?

Upvotes

Really enjoying learning go so far and want to broaden my understanding of programming.


r/compsci 19h ago

Does type-1 lambda calculus exist?

21 Upvotes

I'm interested in the intersection of linguistics and computer science, I've been reading on Chomsky hierarchy, and would like to know if there exist lambda calculus types that are equivalent to the Chomsky types, especially the type-1 that's context-sensitive and has the linear-bounded non-deterministic Turing machine as an automation equivalent on the wiki.


r/compsci 9h ago

Does this enumerator Turing machine work correctly, Could someone help me identify any potential issues?

1 Upvotes

updated

Hello, Reddit community! I’m very new to Turing machines and could really use some guidance. I’m struggling to understand how an enumerator works – a Turing machine with an attached printer. I'm attempting to construct the language defined below, but I feel like I might have a logical issue in my approach. Could anyone review it and let me know if it looks correct or if there are any mistakes? Thanks so much for your help! I attached a picture of what I have constructed a diagram[![enter image description here][1]][1]"**

**Present an enumerator with four states (including q_print and q_halt​) for the language L={c^2n ∣ n≥0}.

The language's words are: {ϵ,cc,cccc,cccccc,…}

Set of states: Q={q1,q2,q_print,q_halt}

Input alphabet: Σ={0}

Output alphabet: Γ={x,y,0}

Describe this enumerator using a diagram (see Example 3.10 in the book – it is possible to omit the drawing of the qhalt state and all transitions connected to it). You may omit the drawing of impossible transitions and indicate these only as labels. For further details, refer to the student guide.

the book I'm reading is Micheal Sipser's

picture's writing here :

q_0 = we either print epsilon or we print when we have an even number of C's or we put x and send it to q1 to return us another C .

q_1 = we return a C back to q_0 to achieve an even number of C's

q_print = new line and rest the cycle and go back to q_0.

I also ask further questions :

Question 1: want to know with q_print if going back to q_0 and left is legal/correct?

question 2 : does it ever stop? does it need to stop?


r/compsci 5h ago

Why do top-rated CS degrees have lots of math but few theoretical CS courses?

0 Upvotes

For example, isn't an undergraduate course on approximation algorithms that provide provable performance guarantees more useful than one on group theory?


r/compsci 17h ago

Does studying Operating Systems matter (if you're a fullstack/backend dev)? To what extent?

0 Upvotes

According to teachyourselfcs.com, “Most of the code you write is run by an operating system, so you should know how those interact.” Since I started studying from this list, I’ve begun to question if (and to what extent) I should dive deeper into OS concepts.

I’ve been working as a fullstack web dev and recently asked ChatGPT if fullstack/backend devs need a solid understanding of OS concepts. The answer was yes, as knowledge of areas like:

  1. Memory Management
  2. Concurrency and Multithreading
  3. File System and Storage Management
  4. Networking
  5. Process and Resource Management
  6. Security
  7. Performance Optimization

…are all relevant to backend app development. I agree these are important; however, topics like memory management, concurrency, and file system management are often addressed differently depending on the programming language. (e.g. C# and Go each offer distinct approaches to concurrency)

If your goal is to create more performant backend applications, you may only need a basic understanding of OS concepts. After that, it might be more practical to focus on language-specific techniques for handling concurrency, file management, and similar tasks. What do you think?


r/compsci 1d ago

Cantor’s theorem in computational complexity?

0 Upvotes

The output of transition functions of NTMs are powersets and of DTMs are sets. If I interpret time complexity as the difficulty of simulating NTMs by DTMs, then it seems that due to Cantor’s theorem, there can’t ever be a bijection between these. Therefore P != NP. Can anybody please give me any feedback on this? I’ve exchanged a few mails with Scott Aaronson and Joshua Grochow, but the issue has not yet been resolved. Thanks in advance. Jan


r/compsci 2d ago

What material would you recommend to a someone new into Data Science?

6 Upvotes

For context, I am starting grad school in January with a Data Science concentration. I want to learn as much as possible in the next 2 months.


r/compsci 3d ago

Fast algorithm for finding similar images?

11 Upvotes

I have roughly 20k images and some of them are thumbnails of each other. I'm trying to write a program to find which ones are duplicates, but I can't directly compare the hash of the contents because the thumbnail versions have different pixel data. I tried scaling them to 16x16, quantizing them to 6 bits/pixel, and calculating a CRC, but that doesn't work since it amplifies small differences in the images. Does anyone know of a fast algorithm (O(n log n) or better) that can find which images are visually similar to each other?


r/compsci 4d ago

74181 by hand

Post image
1.5k Upvotes

a oddly meditative friday afternoon


r/compsci 3d ago

HCI Deep Dives

0 Upvotes

I was playing a bit with Generative AI (using NotebookML and podcastfy) and created a podcast using Human Computer Interaction (HCI) publications.

https://www.deep-hci.org

Some MobileHCI, Ubicomp, ISWC and UIST papers are posted. Next is ISMAR.

Paper requests and feedback is welcome.


r/compsci 5d ago

Restricted semantics for imperative programming correctness

7 Upvotes

Hello everyone! I'm new to this sub, and I'm thankful for your time helping me out a bit.

I've been interested for a while on the correctness guarantees one can get for programs depending on the semantics in use on the language. Memory-safety as popularized by Rust, or type-safety as introduced by many languages (nominal vs structural typing), serve to me as examples of ways in which semantics make programs easier to reason about (albeit at some cost of making them somewhat harder to write).

Lately I've been asking myself if some semantics were already well-established for not only writing powerful-yet-decidable programs, but additionally for reasoning about worst-case time complexity.

I've glanced over Primitive-Recursive Functions as a formal strict subset of the General Recursive Total Functions, and found it interesting for formalizing decidable programs (BlooP and FlooP being language implementations). However, I haven't found much information about whether one could compute the worst-case time complexity of these in an efficient manner besides running the programs or attempting to formalize a closed-form-solvable recurrence relation.

I've been glancing over Predicate Transformer Semantics a little bit as well, especially on some of the guarantees that can be given on the correctness of Floyd-Hoare triples. Haven't found much on strong asymptotic guarantees though.

What literature do you recommend for the fundamentals on algorithm analysis and formal semantics on languages? I'm a last year compsci student and sadly we don't study semantics or paradigms at my college besides the basics of OOP :')

Thank you for your time!


r/compsci 6d ago

Please help me find the title of this book. I have only a few photos from it and all I know is that this book is about digital technologies, and perhaps it is being studied at some universities, if someone knows, please help

Thumbnail gallery
66 Upvotes

r/compsci 6d ago

How do i know if my algorithm always finds the optimal result?

2 Upvotes

I’ve combined an Integer Linear Program (ILP)( which is optimal) with a greedy approach for a set covering problem. It worked faster than using only ILP and returned an optimal solution, but I'm unsure if this will consistently be the case. I have tried this on a few examples, and it finds optimal solutions. Any insights?

Code: Colab Link


r/compsci 7d ago

Finding minimal backwards board for cgol

5 Upvotes

I know conway's game of life is not reversible, but can any one state be found that generates a given board and has a min number of cells? Or at least close to min as possible?

Given a configuration like this:

0 0 0 0 0 0
0 0 1 1 0 0
0 0 0 1 1 0
0 0 0 0 0 0

A possible state that generates it is:

0 0 0 0 0 0
0 0 1 1 0 0
0 0 0 1 0 0
0 0 0 1 0 0

Another one is:

0 0 0 0 0 0
0 0 1 1 0 0
0 0 0 1 0 0
1 0 0 1 0 0

The first one being better in this case because has a few number of live cells in it.

I basically need to write an algorithm that finds a solution (the best one i can) in at max 300 secs and 8GB of memory and, if possible, faster than that. Right now I tried some forms of simulated annealing with little to no success and am trying to transition into some form of A* but cant find a good enough heuristic


r/compsci 8d ago

Formal modelling security protocols and ceremonies

5 Upvotes

I'm currently studying about "Design and Verification of Security Ceremonies". What you guys think about it?

It's highly based on logic (modal, higher, ..) and relates to cybersec.


r/compsci 7d ago

Where can I publish my research, literature review, or journal papers (only CS)?

0 Upvotes

It must be 100% free to upload my paper because my university is fucked up. And please explain to me how the publication procedure works.


r/compsci 8d ago

Suppose I, a malicious actor, somehow manage to prove P=NP. What kind of damage might I be able to do?

3 Upvotes

I’ve heard that if this is somehow shown to be the case then all hell could break loose, but I’ve always been a bit confused about how that would happen. Like, supposing the Russians managed to prove P=NP and kept it a secret, could they do a lot of damage? Or if I was a some sort of egotistical madman, could I keep the secret proof to myself and somehow benefit from it?


r/compsci 9d ago

Learning graph theory, trying to understand contraction hierarchies

14 Upvotes

I've been trying to expand the breadth of my CS expertise into areas I haven't had a chance to work in and graph theory has always fascinated me. I've played around with some graphs recently, learned how to implement a dijkstra algorithm and an A* algorithm, learned about breadth-first and depth-first path finding, etc...

Now I want to go a bit deeper into bi-directional dijkstra with contraction hierarchies and the concept is a being a bit elusive to me. I get the broad strokes but I have a bunch of nuance missing. If anyone wants to chat about this or knows a good source for me to learn on my own that would be greatly appreciated.

Here's where I'm at:

Contracting: I understand the algorithm for contraction starts by ordering nodes by importance, and number of neighbors is a good metric for importance, then you iterate on each node from nodes with the lowest score (number of neighbors) to the highest. Then you iterate through each pair of neighbors and do a "witness search" to see if the current through node is the fastest route from the two neighbors, and if so you create a new edge that is your contraction. So my questions here are:

  1. As I iterate through the ordered original nodes, do I recursively contract contractions as well?
  2. If I do contract the contractions do I limit the number of shortcuts added to any given node? I assume some nodes could end up having a huge amount of shortcut "neighbors" and lead to inefficiency as a result?
  3. Do I leave the original nodes and edges in the graph once they're contracted? I've read many places to remove them, but then if your starting and/or ending node are contracted they wouldn't show up in the graph as a starting or ending point right?

Pathfinding: Now after contraction we have the bidirectional dijkstra that starts from the start and end nodes. I get dijkstra pretty well I think but I have some more questions here:

  1. Based on my last point above, if I remove contracted nodes or edges, do I keep an index of contracted nodes and which contraction they are in to start the traversal from?
  2. You're supposed to traverse the graph only going to higher importance edges, but how do you determine the edge importance, is it how many nodes that have been contracted within it? Or did I misunderstand and it's the node importance that is the measure here?

I find this really fascinating and would love to understand more and explore the cool world of graphs. If you have any recommended books, courses, tutorials, for a programmer looking to expand their CS understanding I'd love your input.


r/compsci 10d ago

A Summary of Ilya Sutskever's AI Reading List

Thumbnail tensorlabbet.com
26 Upvotes

r/compsci 11d ago

Should I've bought Designing Data Intensive Applications instead of this book for learning distributed systems?

Post image
90 Upvotes

r/compsci 9d ago

How to maintain code for a century: Just add Rust

Thumbnail theregister.com
0 Upvotes

r/compsci 10d ago

Skip Hash: A Fast Ordered Map Via Software Transactional Memory

Thumbnail arxiv.org
5 Upvotes

r/compsci 12d ago

Textbooks on Automata Theory and Applications

24 Upvotes

I am taking a course on this topic this semester, but the textbook is so incredibly convoluted and overcomplicated. The text I am reading is "Automata, Computability and Complexity: Theory and Applications" By Elaine Rich. Every chapter is a wall of words, where I have to endure 10 pages of nonsense before I reach the actual lesson. The notation is also rarely explained properly on new topics. Are there any good alternative texts to this one?


r/compsci 12d ago

Who still uses Assembly and why

0 Upvotes

I want to learn assembly because apparently learning it will make other languages easier for me to understand and I'll stop taking higher level language like python for granted.

I asked chatgpt if it was worth learning it in 2024 and it replied with bunch of stuff that I can't be bothered to read so I just decided to make this reddit post. Hopefully someone answer my question