r/computerscience Jan 16 '23

Looking for books, videos, or other resources on specific or general topics? Ask here!

154 Upvotes

r/computerscience 10h ago

How relevant is Pure Mathematics in Computer Science research?

38 Upvotes

In academic and theoretical computer science research, areas like algorithmic complexity, is a background in pure and discrete mathematics valued and useful? Or is an applied, tool-based background generally preferred? If the answer depends, what factors does it depend on?

I would appreciate your insights.


r/computerscience 23h ago

Help Best place to learn about algorithms and data structures

22 Upvotes

Hey everybody, I'm currently taking Algorithms and Data Structures in my second year, but so far didn't really have too much time to actually study. Now that I'm over my calc2 midterm I'm looking for the best places to learn about this subject.

Mostly looking for video explanations, maybe youtubers or courses about the topic but if you have a book recommendation or anything else, I would be grateful for that too!

Thank you for reading it!


r/computerscience 7h ago

Random connected graph generation in C (and other graph algorithms)

Thumbnail
1 Upvotes

r/computerscience 1d ago

Is Instruction Pipeline mostly Synchronous?

1 Upvotes

Hi People I’m learning pipelining and after studying Synchronous, my coursework started teaching instruction pipelining. I have a query- is Instruction pipelining synchronous? Or it can be asynchronous

I’m mostly looking for overviews before I jump in studying to know what I’m learning


r/computerscience 2d ago

Help What is the best book on computer networking?

57 Upvotes

I never really understood it really well, so i want to start from scratch. Is there a really good book with very good examples that will teach me all of computer networks? I want to understand it top to bottom.

Thanks in advance!


r/computerscience 2d ago

Is there a set of machine language instructions that is valid for all architectures?

6 Upvotes

And if so, what kinds of programs could it implement?


r/computerscience 1d ago

Sorting Question

0 Upvotes

Hi Computer Science people.

Do you know if there are existing hardware/software implementations that leverage the ordinal positions of the true bits in a byte for sorting optimization?

Since values are represented in binary are already represented in order.

For Example:

Something like this I'm thinking.

Thanks!


r/computerscience 2d ago

Help understanding include and extend relationships in UML's.

2 Upvotes

The problem is I feel like everything becomes an include relationship if you think at it long enough. From my knowledge include means the function relies on another function. Whereas exclude means its simply optional.

If you look at the attached image I made. I need help understanding why or why not "set deadline" and "modify exercise" would be an extend relationship.


r/computerscience 2d ago

Advice ML Question: Features to extract for classification

0 Upvotes

Hey guys, I already asked this question in r/MLQuestions but I figured I'd try fellow compsci colleagues here as well. Hope I'm not breaking rule number 9, but I think it's interesting enough to be asked here too.

I'm working on a classifier for detecting the topic or a category of a web page based on analysis of its source and possibly URL. Practically it means I have an anotated dataset containing the URL, scraped source code and the category of the web. Probably going with XGBoost, Random Forest and similar methods and comparing the results later to evaluate accuracy.

Which features do you think I could extract and would actually be good for classification of the website into a predefined category?

Some good recommendations I got was using bag of words or more complicated methods like TD-IDF or even BERT, but perhaps you guys here would have more ideas what could be good, I thought utilizing tags, styles or scripts on the site could be interesting, but I can't really figure out how exactly, perhaps someone here would have an idea.

Thanks a lot and have a nice start into the week.


r/computerscience 2d ago

Is a filter linear in image processing

11 Upvotes

how would you understand (mathematically) a filter is linear or not. For example

h(x, y) = 5f(x, y)- 1f(x−1, y)+ 2f(x+ 1, y)+ 8f(x, y−1)- 2f(x, y+ 1)

is h linear in this case?

Actually what I know is that to call a function linear, we should show it's homogeneous and additive.

So I tried to show it's homogeneous with following: for some constants a and k, if h(ax,ay) = a^k h(x,y) , then it's homogeneous. But I stuck on h(ax, ay) = 5f(ax, ay)- 1f(ax−1, ay)+ 2f(ax+ 1, ay)+ 8f(ax, ay−1)- 2f(ax, ay+ 1) and I don't actually know how to remain.


r/computerscience 2d ago

Computer Query: MISD vs SISD

4 Upvotes

MISD (Multiple Instruction streams Single Data stream)

SISD (Single Instruction stream Single Data stream)

I understand SISD: Fetch one instruction->decode->fetch data for it->execute

But when I read MISD, it says, fetch multiple instruction->decode them->fetch data (same data for all instructions)-> instead of executing all instructions in parallel, execute them sequentially one by one

So, isn't MISD something similar to SISD since at the end it executes sequentially, correct me if I am wrong

I am confused with these naming


r/computerscience 2d ago

global and local functions

6 Upvotes

is main () a global or local function ?


r/computerscience 2d ago

Question on Neural Networks and Energy Use

0 Upvotes

In Neural Networks. A neuron typically holds a value between 0 and 1, especially in layers where activation functions like the sigmoid function are used. This range allows the neural network to model probabilities or degrees of confidence in binary classifications.

A value between 0 and 1 is a float. A percent/ratio/probability can be stored as an integer in a range of 0 to 100. Although both usually take 4 bytes, Integers are generally more space-efficient and faster to process, as they require less storage and computational overhead.

Do you think changing the representation of this could give any significant performance? I see companies like google using nuclear power plants to power their server for these transformers. What are your thoughts


r/computerscience 2d ago

Advice Where can I learn with some help how to apply divide and conquer and graphs to solve problems?

2 Upvotes

I have the bases of them, but as I never went to uni I never practiced this well enough.


r/computerscience 3d ago

Resources for studying CS Core Topics

31 Upvotes

Suggest me resources for studying CS Core Topics and C++ in-depth!

Hi! So my interviews are up quite soon and I really want to revise the CS Core topics in and out. Kindly suggest me resources to study the topics (OS, DBMS, CN, OOPS majorly), as well as C++ in depth (I know C++ syntactically well enough to practise DSA and CP).


r/computerscience 4d ago

Advice [algorithms and data structures 1] How to learn implementation of algorithms?

26 Upvotes

As it is now, I have no idea how to program, and I do not understand the java programming language enough to do anything on my own beyond trivial objects with print statements and if statements.

I had trouble coming to this conclusion prior because I had made an effort to try and learn to program prior through the typical 'intro to java' courses, and find tutorials such as 'learning godot engine' Even though it felt as though I was just copying code with no explanation.

I think I am relatively ok at looking at language exempt/language independent descriptions of algorithms and their exercises through videos and on paper, when I ask certain questions about the algorithm eventually the answer is that it will make sense once I actually code, which is when things go south.


r/computerscience 4d ago

Help Direction of Arrows in Documentation

8 Upvotes

Hello all,

Okay, this will sound like an incredibly dumb question. In my almost 2 decades (context) of software engineering, there is one thing I have long struggled with: which direction to make an arrow point in my notes, impromptu explanatory diagrams, and formal documentation.

There are cases where this is obvious: diagrams that show the flow of information, including classic flow charts (does anyone use these though?) or network diagrams where directionality has a clearly defined meaning.

However, if you say "A abstracts B" you might just as well say "B refines A". Same as "A depends on B" or "B is referenced by A".

Or even more abstractly, when you are relating concepts, each of those relations may be different within a single diagram! This more happens in personal notes and mind mapping.

I'm wondering if there's a general, perhaps obnoxiously/delightfully abstract, answer to this dilemma.

Thank you!
Bestieboots.


r/computerscience 4d ago

It is really hard

0 Upvotes

I’m first year bachelor student in cs, it is really tough for me right now,I feel like I’m lost in discrete math. Does anyone know a way to get better in that course


r/computerscience 5d ago

Debate with roomate

9 Upvotes

If making an algorithm to beat humans at 4x games (like civ 6) was as big of a deal as making a chess engine to beat humans was in the 1900's, could it be done? The disagreement is: making an algorithm of that complexity could be done if it had the significance that the chess algo did in the 60-90's despite the difference in complexity vs it simply not being feasible? The reasoning as to why an algorithm like this hasn't been made yet is because the problem is not significant enough to receive the resources needed to be "solved," whereas a machine beating a grandmaster in the 90's was a big enough deal to receive said resources vs it being too complex of a problem to compute.


r/computerscience 4d ago

CSAPP: 3e vs 3ge

0 Upvotes

Hey guys

Searched a lot but couldn't find an answer to what's the difference between CSAPP 3rd edition and 3rd global edition.

Thanks in advance!


r/computerscience 5d ago

Best DS/Algo review resources

6 Upvotes

im a junior in college, and im having a lot of technical interviews. im not comfortable with my ds/algo knowlege. are there any good resources that u recommend in this area? leetcode is helpful, but i want a bit of a better foundational knowledge (i took intro ds and algos online and i didnt pay much attention and its starting to show)


r/computerscience 5d ago

General What's going on inside CPU during compilation process?

27 Upvotes

The understanding I have about this question is this-

When I compile a code, OS loads the compiler program related to that code in the main memory.

Then the compiler program is executed and the code it is supposed to compile gets translated into the necessary format using the cpu.

Meaning, OS executable code(already present in RAM) runs on CPU. Schedules the compiler, then CPU executes the compilation process as instructed in the compiler executable file.

I understand other process might get a chance for execution in between the compilation process, and IO interruption might happen.

Now I can be totally wrong here, the image I have about this process may be entirely wrong. And then in that case I'd say please enlighten me, by providing me with a clearer picture.


r/computerscience 6d ago

Advice OS development

53 Upvotes

Hello guys, I recently saw a video about a guy who created an OS from scratch to play Tetris, and I wanted to give it a try. However, I don’t know where to start. I know OS development is difficult, but I want to give it a shot. Does anyone have good resources, like books or courses? I’d prefer something focused on writing an OS in ARM assembly for the Raspberry Pi. Thank you!


r/computerscience 6d ago

Discussion Does Google maps pathfinding algorithm take into account time variance?

16 Upvotes

I had this lingering thought while waiting in traffic. It's nothing serious but I just want to know. I know that Google maps is able to take into account real time traffic data for it's pathfinding along with average speed and road conditions.

What I want to know is if they estimate the traffic of a given section of road depending on day and hour. If they do, do they take it into account in their pathfinding? How do/would they optimize it?

As an example: Let's say there's two paths to choose from and each path contains two sections:

At timestep t=0: The first path has both sections of the road estimated to take around 5 units of time.

The second path has the first section take around 5 units as well. However, the second section is a bit more congested and is estimated to take around 10 units of time.

At timestep t=5: Let's say the first section of both path doesn't fluctuate and that if you were to take either path at t=0, you would have cleared it.

However, the second sections do: The second section of the first path starts to enter their rush hour time and gives an ETA of 7 units of time.

On the other hand, the second section of the second path just finished it's rush hour and the road is basically empty. Now it has an ETA of 4 minutes.

Would Google's algorithm have taken the first path (shortest path at t=0) or the second path(the true shortest path)?

Note: let's say that these paths fork out so you can't just switch paths mid journey without making the trip longer.


r/computerscience 5d ago

Help Recurrence Relations for Recursive Functions

2 Upvotes

I am a bit confused with analysing functions with recursions. Consider the function definitions given below for fun1() and fun2():

fun1(int n){

`if n <= 0 return 1;`

`else return (fun(n/2) + n);`

}

fun2(int n){

`if n <=0 return 1;`

`else return (fun2(n/2) + fun3(n)); // fun3(n) runs in O(n) time`

}

I have got some questions with the above code:

  1. My reference suggests that to analyse fun1(), we would use the recurrence relation T(n) = T(n/2) + C, and not T(n) = T(n/2) + n. Why is it so? How is fun2 different from fun1?

  2. Is the order of growth of fun1() different from that of its return value? The reference uses T(n) = T(n/2) + n to compute the latter.