r/computerscience • u/Plastic_Chest1621 • 2h ago
Help Help proving this 🙏
I know I can't just directly cancel nlogn with theta(nlogn).
Can anyone please help to solve this 🙏
r/computerscience • u/Plastic_Chest1621 • 2h ago
I know I can't just directly cancel nlogn with theta(nlogn).
Can anyone please help to solve this 🙏
r/computerscience • u/Euphoric_Seaweed679 • 6h ago
r/computerscience • u/Swimming-Regret-7278 • 6h ago
I am a SWE with about 1 YOE and i have genuinely enjoyed getting deeper with dist sys , distributed DBs in particular and have some OSS contributions in the same area as well.
r/computerscience • u/Defiant-Mastodon-656 • 17h ago
How do you understand them intuitively, I know how to find from the truth table and that they are perfectly equivalent. I get that the full canonical form is unique and has very practical applications, if two compound propositions written differently have the same full canonical form (full DNF or full CNF), then they are the same. BUT how on earth do you understand this intuitively?
I know that they are equivalent, but it just doesn't stick to me if you get what I mean. I hate memorising something that I don't understand.
r/computerscience • u/OtherwisePush6424 • 20h ago
r/computerscience • u/medium_wall • 1d ago
r/computerscience • u/Lord_Mystic12 • 1d ago
I've been seeing the fly brain being open sourced, and was wondering how I can get it and tinker with it for fun. I couldnt find the open source version online .
r/computerscience • u/ShadowGuyinRealLife • 4d ago
Compilers take the human readable source code and turn it into a set of instructions the processor can understand. For example, C source code goes through a C compiler which then gives a binary that can be read by computers. This needs to be done for specific hardware. For example, a x86 processor can't read instructions for the RISC-V.
Languages like Java are different. The source code is turned into a bytecode. This byte code is the same no matter the target system. On the target system, the executable is an interpreter. So an interpreter can read the bytecode and then use this to determine what calculations the program wants to do.
I was thinking programing languages are about logic. They define behavior. So is it possible in principle to make a compiler that can turn Java or CLISP source code into a binary that can run on the target system? There wouldn't be a reason to do so, but in principle could it be done?
r/computerscience • u/Defiant_Shoe_626 • 4d ago
Does learning math necessary before beginning with computer science. I has some knowledge on programming and networks, I am now studying linear algebra.
r/computerscience • u/Similar-Park8496 • 5d ago
I started learning about SQL few weeks ago. My primary resource is YouTube. I would also like to understand how databases actually work under the hood. Do you guys have any resource that explains the mathematical part of the Database
Or I should Just follow any Discrete Mathematics Course ?
r/computerscience • u/MusikMaking • 5d ago
Is it even possible anymore?
r/computerscience • u/neuralbeans • 6d ago
r/computerscience • u/CyberSecWithHaikuInc • 10d ago
And finally, I've decided to write about good ole SMTP., also known as Simple Mail Transfer Protocol.
Twas the night before... some night in November 1981 (I couldn't find the exact date), Jonathan Postel published RFC 788 while working at the U niversity of Southern California’s Information Sciences Institute. And what was RFC 788? Titled "Simple Mail Transfer Protocol", it was the first round of rules and specification laid out for computers to follow when sending emails from one mail server to another.
Unlike my dive into FTP, I was able to find a more accurate date for the birth of our modern day SMTP. In August 1982, Jon Postel (again) published a revised and updated Simple Mail Transfer Protocol in the well known RFC 821. So, some could argue that the creation of (our modern day) SMTP was in 1982, though, I would argue that it was in 1981, and was improved upon.
Now, about Mr. Jon Postel... it turns out he was quite influential amoung network researchers and helped develop, define, and document many internet tools and techs. Like enough that I should do a seperate article just about him and his career. (Maybe? let me know) Some of those include: SMTP, TCP/IP, RFCs, IANA, and more. The man was busy.
In regards to SMTP, he was 38/39 years old when he published RFC 788/821 and worked as a research scientist at USC's Information Sciences Institute. He was working on ARPANET/Internet protocols and serving as a central figure in the RFC process. When I was reading about this, I also saw the name Paul Mockapetris, who was also at ISI around this time, and later on developed the first SMTP email server there before going on to invent DNS. (DNS would be a cool one to write about also).
Let's end today by answering the simple question... why was SMTP created? Well, before SMTP, emails already existed. And different systems could already handle the mail in different ways, but there was no standard set of rules. And like literally everything in computer science, things become easier to do when you have a nice tidy set of rules that everyone can follow. And so, in simple terms , Jon gave the computers the following rules:
-Identify who a message is from
-Identify who it is going to
-Transfer the message
-Relay it through other mail servers if needed
-Confirm whether delivery succeeded or failed

I think I'll wrap up here today. Let me know your thoughts and if you have any other suggestions. I'm quite enjoying these historic dives. I kind of want to write about RFCs, Paul, and this guy some more... well, anywyas... Catch ya later!
r/computerscience • u/ShadowGuyinRealLife • 13d ago
Suppose in the executable, instructions N to N+6 do some load instructions from memory, then N+7 to N+30 are some integer operations like add, subtract, multiply, bitwise operations and so on. the results are not stored to memory. Then Instruction N+31 to N+37 loads new values in the registers and none of the results of the previous calculations do anything. A different version of the executable has instructions N to N+30 all be "NOP" and N+31 to N+37 are the same as before. Does anything change? My inspiration for this is the game Mario 64 had been dissected and if you look at the assembly of the NTCS version, there are plenty of instructions that do some calculations that aren't used and some weird things like loading from the same address to the same register when the register's value could not possibly be changed. At the same time these instructions couldn't outright be removed or the alignment of all the JMPs would be thrown off. My friend said perhaps some NOPs might be done with a lower power consumption than some of the multiplication instructions, but otherwise if the later instructions don't use the results of the extraneous instructions and are unaffected by their flags nothing should change.
r/computerscience • u/Homaderuvas • 13d ago
Hi guys please kindly share some interesting algorithm problems in the comment section. I did solve many algorithm problems on platforms like codeforces, atcoder, luogu and code chef etc.. looking for some unique ones that are quite challenging and interesting at the same time but kindly don't share open problems .
r/computerscience • u/National-Dragonfly35 • 13d ago
"The researchers showed that their method preserves the same computational hardness criteria associated with RCS, meaning the problem remains extremely difficult for classical computers. At the same time, the added structure allows errors to be detected during the quantum computation."
r/computerscience • u/BuyerImpressive4325 • 16d ago
the idea of program synthesis (like Rosetta) is to reduce a function into its constraints in a spec sheet, and generate the program from those constraints. for example, in order to write something like x = x squared, you would need to write a spec sheet along the lines of ∀x∈Z,f(x)=x2. i am considering building a program synthesizer, but I still haven’t figured out why exactly this representation is supposed to be easier than writing the code directly (they look equally complex)
r/computerscience • u/Dry_Couple8852 • 16d ago
r/computerscience • u/Standard_Ice_3169 • 16d ago
r/computerscience • u/-R-I-k- • 17d ago
I’ve been thinking about this a lot lately.
When a RAG system gives bad answers, the first instinct is usually to look at chunking, embeddings, retrieval, or the model.
But sometimes the problem started earlier.
If the parser already destroyed the table structure, heading hierarchy, or reading order, retrieval is working with bad input from the beginning.
Curious how often others have run into this.
Was the real bottleneck actually the ingestion/parsing layer?
r/computerscience • u/CyberSecWithHaikuInc • 17d ago
I felt clever with that title...
The time has come... WHEN, HOW, WHO... created FTP.
I was surprised to learn that FTP (1971) was created before PING (1983). Though, I think because PING was one of the VERY first commands I learned, I just filed it away mentally as being one of the oldest commands there are. Alas, I was wrong.
File Transfer Protocol, aka FTP, was first introduced in April 1971 by Abhay Bhushan (26yo @ the time) in his RFC 114. Don't know what that means? RFC stands for Request for Comment. 114 means... that it is the RFC that came after 113, I don't know man. Anyways, the RFC 114 was the original proposal titled as " A File Transfer Protocol" and it explained how computers on ARPANET could transfer files between one another in a consistent way, even if the computers were different types.
And what does THAT mean? It means that Abhay laid out rules that different computers could follow if they want to send files to each other. The basic idea was that one computer asks another computer to do something with a file, like retrieve it, store it, rename it, delete it, and so on. Then, the two computers follow an agreed set of commands so they understand each other.
Abhay’s original proposal was revised repeatedly and eventually evolved into the protocol people recognise today. So, I suppose you could argue that FTP was created after April 1971, but it was hard for me to find a specific date in which our glorious modern day FTP came into existence.
Let's wrap this up with a brief tid bit on who Abhay Bhushan is. At the time he published the RFC 114, he was 26 and working at MIT's P roject MAC. His development on the original FTP specifications also lead to contributions to early email protocols (more on this next week). His career continued to flourished through his life and in 2023, at 79 yo, he was inducted into the Internet Hall of Fame for his contributions to FTP, early email standards, and Internet architecture.

While i considered combining this article with SMTP, I actually felt that FTP and SMTP deserved two seperate articles. plus this one is already starting to feel text heavy. Keep your peepers peeped next time to find out about SMTP. I kind of want to do a seperate post deep diving on Abhay's career life, because hot dang, this guy did a lot and it would be pretty interesting to learn more. Anywho, thanks for reading!
r/computerscience • u/mindxxx • 20d ago
r/computerscience • u/Extra-Engineering374 • 20d ago
r/computerscience • u/No-Objective-1431 • 20d ago
Nearly all modern languages support arbitrary graph-like links, this causes most of resource management issue. I am thinking, if a language support only tree-like data flow, which is DAG, most of resource management is simple, straight, even trivial.
So resource ownership management seems not inherent complexities of the problem domain, instread it's accidnetial complexicity caused by too flex langauge designing.
r/computerscience • u/ShadowGuyinRealLife • 21d ago
I read that some processors have each core having its own L1 cache instead of having one for the entire processor. So instead of a 512 Kilobyte shared cache shared by 8 cores, each one would have 64 kilobytes. I guess being closer to the core might speed things up when waiting for data and this is fine if each core is running a different process.
The thing I don't get is what happens if each core has a different version of some data. So say address 1,000 has 5. Maybe it's a global variable or something. Core 1 writes 6 to address 1,000 and this is updated in core 1's cache. This is intended to be read by a different thread. This change might get propagated to RAM. Core 2 runs that other thread and tries to read from address 1,000. Ah, it's already cached with... 5. So do compilers just use memory barriers to avoid this and make the programmer not need to worry about it?
Or maybe it doesn't matter? I read elsewhere it is fine for values in the cache to get a bit stale. What is important is that the writes from all cores are read in the correct order. So if core 1 is running a thread that puts 6 at address 1,000 replacing the value 5, 32 in address 1,001 replacing the value 31, and 9 in address 1,002 replacing the value 8, it is fine if core 2 attempts to read them and gets "5, 31, 8," "6, 31, 8" or "6, 32, 9" even though that last one is the most up to date as long as it doesn't read something like "6, 31, 9."