0% found this document useful (0 votes)
6 views

Lecture 1 Introduction To Computational Thinking

Uploaded by

Muhammad usman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Lecture 1 Introduction To Computational Thinking

Uploaded by

Muhammad usman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 43

Introduction to Computer

Applications (MIS 103)


Lecture 1: Computational Thinking
Instructor’s Introduction
Name Ahmed Akhtar
Designation Visiting Faculty Member

Qualifications: Pursuing PhD in Computer Science (Distributed Systems, Security and


Blockchain)
MS(CS) From LUMS ( 2016)

BS(CS) from FAST-NU (2013)

Course Profile BPE, SCnD, ICA

Job Profile Software Engineer (Folio3), Teaching Assistant at LUMS, Research


Assistant at LUMS, PhD Scholar at LUMS, Senior Lecturer (Muhammad
Ali Jinnah University), Visiting Faculty Member at IBA
Email: TBA

Phone / Mobile 0346-1785563

Counselling Hours 12:30 PM – 2:30 PM Tue and Thu (Faculty Lounge, City Campus)

Lecture 1: Introduction to Computational


2
Thinking
Course Introduction

Course Title Introduction to Computer Applications


Course Code MIS 103 ( 3,0,3)
Class Schedule & ERP Tuesday &Thursday ( 2:30 pm – 3:45 pm) Section: 96105
( 4:00 pm- 5:15 pm) Section: 96052
Class Venue CCL4 Lab ( City Campus)

Lecture 1: Introduction to Computational


3
Thinking
Course Description & Learning Goals

Lecture 1: Introduction to Computational


4
Thinking
ICA mapped to BS-AF PLOs

Lecture 1: Introduction to Computational


5
Thinking
Course Contents

Lecture 1: Introduction to Computational


6
Thinking
Assessment & Grading Scheme

Lecture 1: Introduction to Computational


7
Thinking
Marks Distribution (Tentative)

Lecture 1: Introduction to Computational


8
Thinking
Guidelines

• Since subsequent topics are built on previously learned material, it is imperative that students keep up with
the material.
• You should ensure that lectures are understood properly
• A student who misses a class is responsible for obtaining information on course content, assignments, due
dates, test dates, etc.
• It will only be possible to get full marks in class participation if you have full attendance.
• Unethical behavior (cheating, plagiarism, proxy attendance) will be strictly penalized.
• IBA plagiarism policy
• Assignment copy : Both students will get zero + IBA Plagiarism penalty
• Proxy Attendance : Both students will be marked absent in 02 sessions
• Students are expected to read all topics and solve all end of chapter problems given in the textbook.
• Students are expected to go through all the provided teaching resources and web links

Lecture 1: Introduction to Computational


9
Thinking
Resources
• Recommended Textbook
• Starting out with Python, Tony Gaddis, Third /Latest Edition
• Other Resources & Links
• See the course outline on LMS

Lecture 1: Introduction to Computational


10
Thinking
Lecture 1 : Computational
Thinking

Lecture 1: Introduction to Computational


11
Thinking
What is Computational Thinking ?
• Computers being used in almost every field of life today
• Some pre-requisites for controlling ( increasing efficiency of) computers:
• Understanding of “ how it works?”
• Making human-computer interaction as efficient as possible

“This process of efficient and effective computer use is known as computer like
thinking or Computational Thinking [1]

Lecture 1: Introduction to Computational


12
Thinking
Varying Definitions in Literature

Lecture 1: Introduction to Computational


13
Thinking
Varying Definitions in Literature (cont’d)

Lecture 1: Introduction to Computational


14
Thinking
What is common? “ Computational
Thinking”
• A though process related to structured problem solving
• It involves :
• Problem understanding and formulation
• Formulating / design the solution [ in terms a computer can process and solve]
• Also called “ Algorithmic Thinking” in 1950s and 1960s [ Denning, 2009]
• Involves converting inputs to outputs after some processing through algorithms
• Uses tool and techniques from computer science field
• Considerations:
• Many levels of abstractions
• Use of mathematics to develop algorithms
• How well a solution scales across different sizes of the problems

Lecture 1: Introduction to Computational


15
Thinking
Components of Computational Thinking

Computational thinking abilities are essentially the set of skills needed to convert
complex, messy, partially defined, real-world problems into a form that a mindless
computer can tackle without further assistance from a human (BCS, 2014, p.3).

Lecture 1: Introduction to Computational


16
Thinking
1. Abstraction

• Focusing on the necessary details only while ignoring the unnecessary ones
• Examples
• Your father asks you for a glass of water
• Where the focus is?
• What is abstracted?
• Your instructor ask you to draw five balls and five stars and separate them with a
decision boundary
• Where the focus is?
• What is abstracted ?
• You can send an email by pressing send button.
• Where the focus is?
• What is abstracted?

Lecture 1: Introduction to Computational


17
Thinking
Abstraction Examples ( Google Map)

Lecture 1: Introduction to Computational


18
Thinking
2. Problem Decomposition
• Problem Decomposition is a method for taking apart problems and breaking them into smaller
and more understandable constituents.
• This method is also known as “Divide and Conquer”

Lecture 1: Introduction to Computational Thinking 19


Divide and Conquer ( Merge Sort)

Lecture 1: Introduction to Computational


20
Thinking
Problem Decomposition ( Input – Processing – Output)

• Writing a computer program to compute the average daily temperatures of


the previous 3 weeks and display it graphically.
• Decompose the problem
• Input
• Processing
• Output

Lecture 1: Introduction to Computational


21
Thinking
Decomposition
Sub Tasks. Directions
• From Emar to IBA
• From Emar to Korangi Road
• From Korangi Road to Sh. Faisal
• Sh. Faisal To Karsaz
• Karsaz to Hasan Square
• Hasan Square to IBA

Lecture 1: Introduction to Computational


22
Thinking
3. Algorithm Design

• An algorithm is a step-by-step procedure for solving a problem.


• Guidelines
• Correctness: The algorithm must be correct, meaning that it must produce the correct output for all
possible inputs.
• Efficiency: The algorithm should be efficient, meaning that it should solve the problem in a reasonable
amount of time and space.
• Generality: The algorithm should be general, meaning that it should be able to solve a wide variety of
problems.
• Simplicity: The algorithm should be simple, meaning that it should be easy to understand and
implement.
• Robustness: The algorithm should be robust, meaning that it should be able to handle unexpected
inputs and errors.

Lecture 1: Introduction to Computational


23
Thinking
Algorithm Design

Lecture 1: Introduction to Computational


24
Thinking
Searching
• How will you search an element in an unordered list
• Searching an email address in a list of 50 with out any index
• How will you search an element in an ordered or sorted list
• Searching a name in telephone directory and then the phone number
• Searching a word in a dictionary
• Considerations:
• Efficiency in terms of execution time
• Complexity of the algorithm

Lecture 1: Introduction to Computational


25
Thinking
Complexity

Lecture 1: Introduction to Computational


26
Thinking
Linear Search

Lecture 1: Introduction to Computational


27
Thinking
Binary Search

Lecture 1: Introduction to Computational


28
Thinking
Binary Search – Algorithm

Lecture 1: Introduction to Computational


29
Thinking
4. Pattern Recognition
• It is the ability to identify patterns in data and use those patterns to solve
problems.
• Pattern recognition can be used to solve a wide variety of problems,
including:
• Identifying objects in images
• Classifying text
• Predicting future events
• Detecting fraud
• Making medical diagnoses

Lecture 1: Introduction to Computational


30
Thinking
Pattern Recognition
• Examples
• A computer vision program
• A Natural Language processing Program
• A fraud detection program
• A medical diagnosis program

Lecture 1: Introduction to Computational


31
Thinking
Pattern Recognition in Problem Solving

Identifying elements DHA to IBA


• For reuse • At 6 am
• For problem solving • At 8 am
• Algebraic equations • At 6 pm
• At 9 pm
• On a weekend

Lecture 1: Introduction to Computational


33
Thinking
5.
Generalization
• Generalization is the process of adapting formulated solutions or algorithms
into different problem states, even if the variables involved are different.
• Example
• You are required to write a program that sorts a list of numbers
• Suppose you write a program to sort numbers ( integers) in ascending order
• Limitations:
• Can’t work with float values
• Can’t sort in descending order
• May have limit in size of the list provided
• A general solution can be to design an algorithm that can:
• Work with both integers and floats
• Gives the user the flexibility to sort in any order
• Can work with any size of list

Lecture 1: Introduction to Computational


34
Thinking
Generalization used in Problem Solving

Generalize
• How do we apply a solution framework to
other problems.
• Translation for one language pair to all
language pairs
• Route map recommendation for one city /
one journey to all cities

Lecture 1: Introduction to Computational


35
Thinking
What does it take to get things done?

Solving problems
An
objective. Constraints, limitations and
A history of solving similar problems?
An end restrictions
goal

ETA : 8:15 Departure


From DHA IBA Main Comfort
am. time no
to IBA in 30 Campus. Familiarity Approach Design and
Monday to earlier than
minutes? Not City. confidence
Friday. 7:30 am.

Lecture 1: Introduction to Computational


36
Thinking
How does ChatGPT Work?

Lecture 1: Introduction to Computational


37
Thinking
ChatGPT : How it works?
• Suppose , someone writes this prompt

• “The best thing about AI is its ability to”

Lecture 1: Introduction to Computational


38
Thinking
ChatGPT : How it works
• ChatGPT is always fundamentally trying to do is to produce a “reasonable continuation” of
whatever text it’s got so far.
• By “reasonable” we mean “what one might expect someone to write after seeing what people
have written on billions of webpages, etc.”
• Imagine scanning billions of pages of human-written text (say on the web and in digitized books)
and finding all instances of this text, it produces a ranked list of words that might follow, together
with “probabilities”:

Lecture 1: Introduction to Computational


39
Thinking
ChatGPT : How it works

• At each step it gets a list of words with probabilities.


• One might think the next word should be the “highest-ranked”
• If we always pick the highest-ranked word, we’ll typically get a very “flat” essay, that
never seems to “show any creativity”
• But if sometimes (at random) we pick lower-ranked words, we get a “more
interesting” essay.
• Not using the highest ranked word helps in creating randomness
• Temperature Parameter
• Decides how often a lower-ranked word will be used
• Values close to 0 generate more exact response with less randomness
• Values close to 1 tend to generate something novice

Lecture 1: Introduction to Computational


40
Thinking
ChatGPT: How it works?

Lecture 1: Introduction to Computational Thinking 41


ChatGPT: How it Works?

Lecture 1: Introduction to Computational


42
Thinking
ChatGPT: How it Works?

Lecture 1: Introduction to Computational


43
Thinking
References
• [1] An overview of computational thinking.
• [2] The long quest for computational thinking.
• [3] What is ChatGPT and How it works?

Lecture 1: Introduction to Computational


44
Thinking

You might also like