Question Detail: I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming Although every one means executing different lines of codes, and for every one we need something like Task State Segment or context to store data for Read More …
Blog
Are there NP problems, not in P and not NP Complete?
Question Detail: Are there any known problems in $mathsf{NP}$ (and not in $mathsf{P}$) that aren’t $mathsf{NP}$ Complete? My understanding is that there are no currently known problems where this is the case, but it hasn’t been ruled out as a possibility. Read More …
Why is push_back in C++ vectors constant amortized?
Question Detail: I am learning C++ and noticed that the running time for the push_back function for vectors is constant “amortized.” The documentation further notes that “If a reallocation happens, the reallocation is itself up to linear in the entire size.” Read More …
How is this grammar LL(1)?
Question Detail: This is a question from the Dragon Book. This is the grammar: $S to AaAb mid BbBa $ $A to varepsilon$ $B to varepsilon$ The question asks how to show that it is LL(1) but not SLR(1). To prove Read More …
Keeping a String Secret in (Open) Source Code
Question Detail: I have finished developing an app for Android and intend to publish it with GPL — I want it to be open source. However, the nature of the application (a game) is that it asks riddles and has the Read More …
Keeping a String Secret in (Open) Source Code
Question Detail: I have finished developing an app for Android and intend to publish it with GPL — I want it to be open source. However, the nature of the application (a game) is that it asks riddles and has the Read More …
How is this grammar LL(1)?
Question Detail: This is a question from the Dragon Book. This is the grammar: $S to AaAb mid BbBa $ $A to varepsilon$ $B to varepsilon$ The question asks how to show that it is LL(1) but not SLR(1). To prove Read More …
Why is push_back in C++ vectors constant amortized?
Question Detail: I am learning C++ and noticed that the running time for the push_back function for vectors is constant “amortized.” The documentation further notes that “If a reallocation happens, the reallocation is itself up to linear in the entire size.” Read More …
Are there NP problems, not in P and not NP Complete?
Question Detail: Are there any known problems in $mathsf{NP}$ (and not in $mathsf{P}$) that aren’t $mathsf{NP}$ Complete? My understanding is that there are no currently known problems where this is the case, but it hasn’t been ruled out as a possibility. Read More …
Difference between multitasking, multithreading and multiprogramming
Question Detail: I was a little confused between these three terms Multitasking, Multithreading and Multiprogramming Although every one means executing different lines of codes, and for every one we need something like Task State Segment or context to store data for Read More …