CIS Project
CIS Project
Proponents:
Pham Gia Nguyen 22001626 Supervisor:
Bui Huu Phuoc Do Thanh Ha
Vu Quoc Long
2
Contents
3
4.4 Graph Search Algorithms: Dijkstra’s Algorithm . . . . . 21
4.5 Time Complexity . . . . . . . . . . . . . . . . . . . . . 22
4.6 Real-World Applications . . . . . . . . . . . . . . . . . 24
4.7 Conclusion . . . . . . . . . . . . . . . . . . . . . . . . . 25
5 Alan Turing 26
5.1 Introduction to Alan Turing . . . . . . . . . . . . . . . 26
5.2 Formulating Solutions . . . . . . . . . . . . . . . . . . . 26
5.3 Understanding Turing Machines . . . . . . . . . . . . . 26
5.4 Significance of Turing Machines . . . . . . . . . . . . . 27
5.5 Turing’s Contributions During World War II . . . . . . 27
5.6 Post-War Contributions . . . . . . . . . . . . . . . . . . 27
5.7 Legacy and Impact . . . . . . . . . . . . . . . . . . . . 28
6 Software Engineering 29
6.1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . 29
6.2 Object-Oriented Programming (OOP) . . . . . . . . . . 29
6.2.1 What is OOP? . . . . . . . . . . . . . . . . . . . 29
6.2.2 Benefits of OOP . . . . . . . . . . . . . . . . . . 29
6.2.3 Class & Instances . . . . . . . . . . . . . . . . . 30
6.2.4 Four properties of OOP . . . . . . . . . . . . . . 30
6.2.5 API . . . . . . . . . . . . . . . . . . . . . . . . . 31
6.3 IDE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
6.3.1 What is IDE ? . . . . . . . . . . . . . . . . . . . 32
6.3.2 Application of IDE . . . . . . . . . . . . . . . . 32
6.4 Writing document . . . . . . . . . . . . . . . . . . . . . 33
6.5 Source control . . . . . . . . . . . . . . . . . . . . . . . 33
6.6 QA . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
7 References 35
4
List of Figures
5
Chapter 1
1.1 Introduction
The process of loading programs into the computer and classical data
storage mediums is an important part of the IT industry. This helps con-
vert data from the hardware, software, or computer memory to manage
programs. This process requires coordination between hardware and
software to be successful.
6
1.3 The Program Loading Process
• Procedures: For a program to run, it needs to be loaded into a
computer’s memory through punch cards once used to transfer data
from outside the machine into it.
• Challenges in the Loading Process: Using classical data storage
mediums like punch cards presented many challenges and limita-
tions, especially during program loading into computers:
– Time-consuming and labor-intensive: Entering machine code
through punch cards required a significant amount of time and
effort.
– Prone to errors and hard to fix: Manually adjusting the holes
on punch cards could easily cause errors.
– Limited program management: Punch cards are limited in the
number of holes available per card, restricting the size of the
program that can be stored and loaded.
– Susceptibility to damage or loss: Punch cards could easily be
damaged or lost due to their physical weakness, making their
storage and preservation less efficient than modern mediums.
1.5 Conclusion
By studying the process of program loading and classical data storage
mediums, we have gained an overview of how computers work and how
they execute programming tasks. This not only helps us understand the
program loading process better but also opens up new prospects in the
field of computer science.
7
Chapter 2
2.1 Introduction
Until now, programming languages have been powerful tools for build-
ing software applications and are an essential part of today’s technolog-
ical revolution. From controlling simple devices to developing complex
features on websites, programming languages have played a crucial role.
By delving into the history and evolution of programming languages,
we gain a comprehensive understanding of how humans have interacted
with these languages and how programming languages have evolved over
time.
8
instructions.
– Although it is easier to understand than machine language, as-
sembly language still requires knowledge of computer architec-
ture and processor operations. Writing programs in this lan-
guage can be challenging and time-consuming compared to high-
level programming languages.
9
programming concepts such as data types, control structures, and
procedures.
And there are many other languages that have been created and devel-
oped to this day.
10
2.6 Conclusion
From the birth of machine language to the development of high-
level programming languages, the history of programming is a story of
progress and flexibility. Programming languages have opened the door
for everyone to participate in this field and create amazing applications
and technologies that were previously unimaginable.
11
Chapter 3
Fundamental Concepts of
Programming
3.1 Introduction
In the realm of computer science, programming languages serve as
essential tools for abstracting away intricate hardware details, enabling
programmers to focus on solving problems through computation. This
report delves into the foundational elements that underpin all program-
ming languages, examining statements, control flow, and the pivotal role
of functions.
For example, when we write the statement "A equals 5" in a pro-
gramming language, we are saying that variable A now has a value of 5.
This is similar to saying "I am eating rice" in spoken language, which
describes a specific action taking place.
12
3.3 Control Flow Statements
To navigate beyond linear execution, control flow statements like If-
Else and Loops steer program flow based on conditions. If-Statements,
resembling forks in the road, dictate paths based on truth values, while
loops iteratively execute blocks of code until conditions change.
3.3.1 Loops: While and For
Loops are pivotal for repetitive tasks. A while loop continues iterat-
ing while a condition holds true, dynamically adjusting program behav-
ior. Conversely, for loops offer predetermined iteration counts, providing
controlled repetition within a specified range.
Explanation:
[label=–]Variable i is initially set to 1. The while loop will continue
to run as long as i is less than or equal to 5. Each iteration, the
number i is printed, and i is incremented by 1 (i ++). When i
reaches the value of 6, the condition i <= 5 becomes false, and the
loop ends.
For Loop: The for loop is used to iterate over a specific range of
13
values, such as a sequence of numbers or a list of elements. The for loop
allows us to easily iterate over each element in the sequence.
Example :
Algorithm 2 Print numbers from 0 to 4 using a loop
•1: for i = 0 to 4 do
2: Print i
3: end for
Explanation:
[label=–]The for loop starts by initializing the variable i to 1. The
loop condition is that i is less than or equal to 5. After each iteration,
the variable i is incremented by 1 (i++). Each iteration, the value
of i is printed by console.log(i).
3.3.2 Else If
14
without the need for nested "if" statements. This helps make the code
more readable and understandable.
Functions can also accept parameters, which are the data they will
process. This allows functions to be more flexible and perform different
tasks based on the values passed in.
15
An online shopping cart can demonstrate concepts like functions, ar-
rays, and loops. For instance, each item in the cart can be represented
by a data structure, and an array can be used to store the items in the
cart. Functions can be employed to add, remove, or update items in the
cart, and loops can be used to iterate through the items to calculate the
total value or perform other operations.
3.6 Conclusion
In conclusion, programming languages offer a structured framework
comprising statements, control flow mechanisms, and modular abstrac-
tions facilitated by functions. This report emphasizes the significance of
these foundational concepts, paving the way for scalable, comprehensible
software development practices in modern programming.
16
Chapter 4
17
• Time Complexity: Algorithms are classified based on their time
complexity, ranging from simple algorithms (O(1)) to complex al-
gorithms (O(nlogn) or O(n2 )).
Bubble Sort: Bubble sort iterates through a list and compares ad-
jacent elements, swapping them if they are in the wrong order.
Insertion Sort: Insertion sort considers one element from the list at
a time and inserts it into the correct position within the already sorted
part of the list.
Selection Sort: Selection sort finds the smallest element from the
list and moves it to the beginning of the sorted list.
Merge Sort: Merge sort sorts a list by dividing it into smaller parts,
sorting each part, and then merging them back together in order.
Quick Sort: Quick sort sorts a list by partitioning it into smaller
parts based on a chosen element called the "pivot", then sorting the
smaller and larger parts recursively. ....
Each algorithm has its own advantages and disadvantages. For in-
stance, bubble sort has lower efficiency compared to other algorithms,
while quick sort is often fast and efficient but can suffer from worst-case
time complexity of O(N 2 ) if a poor pivot choice is made. Choosing the
appropriate sorting algorithm depends on factors such as the size of the
input data, the nature of the data, and other considerations like memory
space and performance requirements.
Example:
Selection Sort Sorting algorithms arrange elements in a specific or-
18
der. Selection Sort, a basic sorting algorithm, repeatedly identifies the
smallest element from an unsorted portion of an array and moves it to
its correct position. Despite its simplicity, Selection Sort exhibits a com-
putational complexity of O(N 2 ), making it inefficient for large datasets
due to its quadratic growth rate.
19
Algorithm 5 Merge Sort Algorithm
1: function MergeSort(arr)
2: if length of arr ≤ 1 then
3: return arr
4: end if
5: mid ← length of arr//2
6: lef t ← MergeSort(arr[: mid])
7: right ← MergeSort(arr[mid :])
8: return Merge(lef t, right)
9: end function
10: function Merge(lef t, right)
11: result ← []
12: i←j←0
13: while i < length of lef t and j < length of right do
14: if lef t[i] < right[j] then
15: Append lef t[i] to result
16: i←i+1
17: else
18: Append right[j] to result
19: j ←j+1
20: end if
21: end while
22: Append remaining elements of lef t to result
23: Append remaining elements of right to result
24: return result
25: end function
20
or searching tree or graph data structures. It explores all neighbor
nodes at the present depth before moving on to the nodes at the
next depth level ....
Example:
Linear Search:
Binary Search:
21
Figure 4.1: Dijkstra’s Algorithm
22
propriate algorithms can impact the architecture of the system and
resource utilization.
Example:
Linear Search:
The time complexity of linear search in the worst-case scenario is
O(n), where n is the number of elements in the list or array. In the
best-case scenario, the time complexity is also O(1) if the element to be
found is the first element in the list or array. The basic way to calculate
the complexity of linear search is to count the number of iterations, as
each element in the list or array is checked once.
Binary Search:
The time complexity of binary search is O(log n) in the worst-case
and average-case scenarios, where n is the number of elements in the
list or array. The basic approach to calculate the complexity of binary
search is to count the number of iterations in the process of dividing the
array into halves and searching for the element in each half.
Dijkstra’s Algorithm:
The time complexity of Dijkstra’s algorithm is O((V + E) log V ),
where V is the number of vertices in the graph and E is the number
of edges. The basic approach to calculate the complexity of Dijkstra’s
algorithm is to analyze the steps in finding the shortest path from one
vertex to all other vertices in the graph, including traversing all vertices
and edges in the graph and using a priority queue to select the vertex
with the shortest path.
In summary, algorithm complexity plays a vital role in building high-
performance, scalable systems. Understanding and managing algorithm
complexity is an essential part of software development, leading to better-
designed systems and improved performance.
23
4.6 Real-World Applications
Algorithms are like the unsung heroes of modern technology, quietly
working behind the scenes to make our lives easier and more efficient.
They’re the secret sauce that powers many of the applications and ser-
vices we use every day, from finding the fastest route on Google Maps
to keeping our data secure online.
24
Figure 4.2: AI Neutron networks
4.7 Conclusion
In conclusion, algorithms are the cornerstone of computer science, fa-
cilitating efficient problem-solving and computation. By studying and
optimizing algorithms like Selection Sort, Merge Sort, and Dijkstra’s al-
gorithm, computer scientists leverage foundational principles to address
diverse challenges in software development and beyond.
Through this exploration of algorithmic concepts, we recognize their
pivotal role in shaping the modern digital landscape and paving the way
for innovative advancements in technology.
25
Chapter 5
Alan Turing
26
• A simple example of a Turing Machine is presented to illustrate its
functionality in determining if a string of ones ends with an even
number of ones.
27
5.7 Legacy and Impact
• Turing’s work laid the foundation for modern computer science and
artificial intelligence.
• His visionary ideas continue to influence research and development
in computing and AI, shaping the trajectory of technological ad-
vancement.
28
Chapter 6
Software Engineering
6.1 Introduction
Sorting algorithms as a gateway to understanding software engineer-
ing. Emphasis on the disparity between the simplicity of sorting algo-
rithms and the complexity of large-scale programs like Microsoft Office,
which contain 40 millions of lines of code. Software Engineering as a
discipline to manage such complexity.
29
ier to understand, therefore easier to test, debug, and maintain.
• Reusable software: you don’t need to keep re-inventing the wheels
and re-write the same functions for different situations. The fastest
and safest way of developing a new application is to reuse existing
codes - fully tested and proven codes.
6.2.3 Class & Instances
The classes in the lower hierarchy inherit all the variables (static at-
tributes) and methods (dynamic behaviors) from the higher hierarchies.
30
A class in the lower hierarchy is called a subclass (or derived, child, ex-
tended class). A class in the upper hierarchy is called a superclass (or
base, parent class).
Polymorphism:
The software that wants to access the features and capabilities of the
API is said to call it, and the software that creates the API is said to
publish it.
Programming languages do it by using Access Modifier.
31
Figure 6.2: Access Modifier
6.3 IDE
6.3.1 What is IDE ?
Various search terms show up when you start typing words in a search
engine. Similarly, an IDE can make suggestions to complete a code
statement when the developer begins typing.
Refactoring support:
32
implement just-in-time compiling, in which the IDE converts human-
readable code into machine code from within the application.
Testing:
The IDE allows developers to automate unit tests locally before the
software is integrated with other developers’ code and more complex
integration tests are run.
Debugging:
33
6.6 QA
QA standard for Quality Assurance.
This is where a team tests and attempt to create unforeseen condi-
tions, that might trip it up.
Companies will sometimes release Beta version. This is a version of
software that’s mostly complete, but not fully tested.
Before Beta version, we have Alpha version. It is usually so rough
and buggy, it’s only tested internally.
34
Chapter 7
References
• https://www.geeksforgeeks.org/the-evolution-of-program
ming-languages/
• https://en.wikipedia.org/wiki/History_of_programming_l
anguages
• https://www.geeksforgeeks.org/basics-of-computer-progr
amming-for-beginners/
• https://www.geeksforgeeks.org/software-engineering-int
roduction-to-software-engineering/
• https://m.youtube.com/playlist?list=PL8dPuuaLjXtNlUrzy
H5r6jN9ulIgZBpdo
• https://www.geeksforgeeks.org/learn-data-structures-a
nd-algorithms-dsa-tutorial/
• https://www.freecodecamp.org/news/learn-data-s
• https://en.wikipedia.org/wiki/Alan_Turing
35