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. Combining multiple computers

1. What happens when the problem you want to solve becomes too big for any one computer?

When the problem is too big to handle the system might crash. The default size of the desktop heap is usually enough for most users, but desktop heap exhaustion can still occur when opening many application windows simultaneously. The user might experience graphical glitches, the windows appearing and missing with some buttons, scroll bars, etc.

2. Suppose 1,000 computers work together. Do you now have one computer that is 1,000 times more powerful? Why or why not?

1000 computers do not make one 1000 times more powerful. They are logically separate with no way for the cpu to communicate or access each other’s memory. They simply distribute tasks, which can be solved independently, such as mathematical calculations, or image rendering.

3. Can 1,000 computers agree on something if some of them fail or even lie?

The question refers to the Byzantine Generals Problem. The Byzantine agreement problem involves achieving consensus among distributed nodes, even if one of the nodes behaves erratically or maliciously. It achieves consensus as long as the maliscious nodes are less than a third of the total nodes. So, in order for 1000 computers to agree on something, about only a third of them can fail or lie.

4. When you use ChatGPT, Google, Instagram, or an online game, where is the computation actually happening?

When using online services such as ChatGPT, Google, Instagram, the computation is happening remotely, in massive cloud data centers. The generating of answers does not use the CPU of users' PCs. The prompts are sent to server networks via the Internet.

5. If you could make millions of computers behave like one dependable machine, what could humanity build that we cannot build today?

A machine with the power of millions of computers could create Artificial General Intelligence, whose level would match human intelligence and consciousness. Such a powerful computer could probably also solve the major problem of N and NP problems.

5. Modality in AI

1. What is a modality in AI? Give three examples of different modalities.

A modality is a distinct type or channel of data or input that carries information in its own format, with each modality having a different structure and requiring different processing methods. Three examples of different modalities are text, which consists of written language and symbols; vision, which includes images and video; and audio, which covers speech and sound waveforms. Other examples of modalities include tactile or sensor data, as well as 3D or depth data such as LiDAR point clouds.

2. What is multimodal learning?

Multimodal learning is when an AI system is trained to process and combine information from two or more modalities together, rather than treating each one separately. This involves the processing and integration of data from multiple distinct sources, known as modalities, which can include text, images, audio, video, and even sensor data. The goal is a richer, more robust understanding than any single modality could give alone — for instance, a model trained on both images and text can identify objects more effectively by cross-referencing visual patterns with linguistic context, and can resolve ambiguities that would confuse a single-modality system

3. Where is multimodal learning used? Can you find one real application and identify the types of information it combines?

Self-driving cars are a good concrete example. A self-driving car combines data from cameras (visual), sensors (audio and tactile), and GPS (essentially positional/text-like data) to navigate roads safely, giving the system a more comprehensive understanding of its environment for more accurate driving decisions. So the modalities combined here are: vision (cameras), sensor/spatial data (LiDAR, radar, ultrasonic), and positional data (GPS).

4. What is embodied AI?

Embodied AI refers to AI systems (typically robots or agents) that learn and act by having a physical or simulated body that interacts with the real world — through sensing, moving, and manipulating objects — rather than just processing static data offline. The key idea is that intelligence emerges partly through interaction with an environment (trial and error, feedback loops from physical action), not purely from analyzing pre-collected datasets. Examples: household robots, warehouse robots, robotic arms, and self-driving cars.

5. How are multimodal learning and embodied AI connected?

Embodied AI systems are almost always multimodal by necessity: a robot moving through the physical world needs to simultaneously process vision (cameras), sound (microphones), touch (tactile sensors), proprioception (joint/motor feedback), and sometimes language (verbal instructions) — then fuse all of that into one coherent understanding to decide how to act. So multimodal learning is often the technical backbone that makes embodied AI possible: the "body" generates multiple simultaneous streams of sensory data, and multimodal learning is what lets the AI merge those streams into a unified perception of its situation. The self-driving car example above is really both at once — it's an embodied agent whose embodiment requires multimodal fusion to function.

5. AI and Roboics

1. How do you define AI?

AI is about getting machines to do things we'd normally say need human intelligence, like learning from experience, understanding language, recognizing what's in an image, or making decisions. A useful way to think about it comes from Russell and Norvig, who describe AI as the study of "agents" that sense their surroundings and act in ways that best achieve their goals. John McCarthy, who coined the term back in 1955, put it more simply: the science and engineering of making intelligent machines. The OECD gives a more modern definition, describing an AI system as one that takes in inputs and works out how to produce outputs, such as predictions, recommendations, or decisions, that can influence the real or virtual world.

2. Sub-fields of AI

1. Machine learning, where systems learn patterns from data instead of being given hand-written rules. Deep learning and reinforcement learning live here. 2. Natural language processing, which is about understanding and generating human language. Translation tools, chatbots, and large language models all come from this area. 3. Computer vision, which lets machines make sense of images and video, for example spotting objects or reading medical scans

3. Why is AI booming now?

AI has existed since the 1950s, but for decades it was held back. The ideas were ahead of what the hardware and data could support, which is why there were a couple of "AI winters" when funding and excitement dried up. Around the 2010s, a few things finally came together: First, data. The internet, smartphones, and sensors created enormous datasets, and projects like ImageNet gave researchers the labeled examples that modern methods need. Second, computing power. GPUs, and later specialized chips like TPUs, made it realistic to train huge neural networks. A turning point was in 2012, when AlexNet, trained on GPUs, won the ImageNet competition by a wide margin. Third, better algorithms. Improved training techniques and architectures, especially deep convolutional networks and then the Transformer in 2017, made models far more accurate and paved the way for today's generative AI. Finally, money and tools. Big investment from industry and governments, plus open-source frameworks and cloud platforms, meant almost anyone could start building with AI. So it's less that AI suddenly got invented, and more that the missing ingredients finally showed up at the same time.

4. Where robots are widely used, and why

Manufacturing is the classic example, especially in automotive and electronics. Robots weld, paint, and assemble parts with a level of precision and repeatability that's hard for people to match, and they can run around the clock. Industry is still the largest user of robots worldwide. Logistics and warehousing is growing fast. With the rise of e-commerce and labor shortages in many places, companies use mobile robots to move, sort, and pick items quickly and accurately. Healthcare uses robots for surgery, rehabilitation, disinfecting rooms, and delivering supplies in hospitals. The big draws are precision, less invasive procedures, and keeping staff away from risky situations.

5. Challenges for a 24-hour wheeled surveillance robot (e.g., Mall of Qatar)

No battery lasts 24 hours of driving and processing, so the robot needs to manage its own charging by finding its dock, plugging in, and getting back to work. Ideally there'd be several robots that hand over patrol zones so there are never gaps in coverage. It also has to cope on its own with problems like wheel slip, getting stuck, or sensor faults, because nobody wants a robot that needs rescuing every few hours

```