1. Programming Languages

1. Why did we move from punch cards to programming languages? What does that tell you about the purpose of programming languages?

Punch cards were the first “tool” to communicate with the computers. These are the pieces of stiff papers that contained data and used to feed the first IBM computers. The method of data storage in such cards was primitive - the holes and their absence represented different characters, words, commands. Each hole was punched manually by programmers. Therefore, it took months to complete basic code. Another disadvantage of such a method was its proneness to human errors. As Grace Hopper, the developer of the first compiler COBOL (Common Business-Oriented Language), said in her speech for the Association for Computing Machinery, “It was amazing how many times a 4 would turn into a delta, which was our space symbol, or into an A. Even B’s turned into 13s”. Undoubtedly, punch cards were not able to mass spread the availability of using computers. It was expensive, time-consuming, and high risk of errors. As time went by, the programmers developed much more effective approaches to eliminate problems related to punch cards. This is a primary purpose of nowadays programming languages. They are fast. They are human-readable, as the code is written in high-level languages, and automatically translated to machine code. And most importantly, nowadays programming languages make programming available for everyone who has a will.

2. There are hundreds of different programming languages out there. Why do you think we need so many?

There are many different programming languages. They seem to be very similar, but in fact, there are major differences. First and foremost, they differ in their purposes, or rather in their fields where they are mainly used. For example, the most popular and my favourite Python is perfectly suitable for ML, backend and task automation, and that’s why it is mainly applied in data science and AI. On the other hand, JavaScript programming language is suited for web development (makes websites interactive). For the third example, SQL is mainly used for databases. It’s convenient to store, search and sort data. Many programming languages serve many jobs.

3. What are some drawbacks of a programming language you use? How would you like it to be different? Think of specific examples.

Python has a lot of advantages, and is therefore beloved for its beneficial features. However, there is another side of the coin as well. Python is an interpreter translator program, which converts and executes code line by line. This is considerably time consuming, compared to compiler translator programs such as C or C++. Moreover, there are no pointers in Python, which store the memory address of another variable. This technique is helpful for working with hardwares and low-level systems, where performance and memory efficiency are critical. Including pointers in Python would allow memory manipulation manually, but it also has plenty of risks (segmentation and memory leaks, etc.) Therefore, if possible - the ability to choose managing memory by programmers or automatically by Python itself would be the major difference I would like to see.

4. If you were going to create a new programming language, how would you start? What do you need to define?

First and foremost, to create a new programming language the type of translator program needs to be determined: would it be a compiler or interpreter. Personally, I would go with an interpreter - it’s easier to debug. Another step is to define how the programming language looks and its syntax. Basically, it is how commands look in a new programming language. For example,

out : # to print the result;

Inp : # to input the values;

Then, it is necessary to break the commands to tokens - we need 4 stages of interpreter translator. Tokenization, lexical analysis, syntactic analysis, the runtime engine. Half of the job is done! The other half is to start by writing small operations and to embed more complex functions such as loops, conditional statements.

2. Decision problems. Algorithms

1. What is a decision problem?

The decision problem is a type of problem fundamental in algorithms, which focuses on problems with input that requires a yes/no decision, or a binary response 1/0. For example: “Can k be reached within n steps?” “Is n an even number”, and etc. The answer would be either yes or no. These types of problems do not show a specific path nor a detailed solution.

2. What does it mean for a decision problem to be decidable?

Decidable problems are: questions with yes or no answers: do not loop forever; and always give right answers. There is an algorithm that is valid for every input and halts(stop) when giving an answer.

3. What is the class P? What is the class NP?

The class P (Polynomial Time) stands for problems that are easy to solve and easy to verify. P class takes a polynomial or less time to find a solution. For example, O(n^2). The problems are sorting lists, etc. The class NP (Non-deterministic Polynomial Time) is a type of problem, which is easy to verify, but not efficient for finding a solution. It takes a factorial time O(2^n). As input gets larger, it does not guarantee an efficient solution. The problems are sudoku (n*n size), candy crash etc.

4. What is the intuitive meaning of the “P versus NP” question?

“P vs NP” is an unresolved issue in computer science. Since NP problems are easy and efficient to verify, it leads to a question whether the solution can be found very quickly as well. When the input grows bigger, solving the problem by trying every possibility becomes unfeasible. If one NP-complete problem is proven to be P, then it means that all NP-complete problems would also be classified as P problems. It is known that P is a subset of NP, as they both are easy to check, but it is still not proved whether P equals or not to NP.

5. If you resolve the P versus NP question, how much richer will you be?

For resolving the P vs NP problem, an award of 1 million dollars is given by the Clay Mathematics Institute.

3. Cybersecurity and Common Cyber Attacks

What is cybersecurity?

Write your answer here.

What are the most common types of cyber attacks?

Write your answer here.

How can individuals protect themselves?

Write your answer here.

```