Download as pdf or txt
Download as pdf or txt
You are on page 1of 5

GUJRAT INSTITUTE OF MANGEMENT SCIENCES

(CAMPUS)

PMAS-ARID AGRICULTRAL UNIVERISITY RAWALPINDI

NAME: MIRZA HAMZA BAIG

SUBJECT: PROGRAMMING FUNDAMENTALS

DEPARTMENT: BS.IT

SECTION: A

SUBMITTED TO: MS MEHWASHMA AMIR

SUBMISSION DATE: 6/11/2020

ASSIGNMENT# 1

Q1: What are the six steps of problem solving?

ANS:

1 Identify the issue

2 Understand everyone interests

3 List the possible solution

4 Make decision

5 Acting on the solution

6 Mointer

Q2:What is an algorithmic solution to a problem?

ANS: Algorithmic solution to a problem are those problems that are used to solve a problem in the form
of steps.

FOREXAMPLE:

To sort an array in increasing order A sequential order of steps is followed so this type of solution is a
algorithmic solution.

Q3: Name three current problem in your life that could be solved through an algorithmic?

ANS: Three problems of life can be solved by algorithmatic process.

1 Going to work.
2 Fishing in a pond.

3 Withdrawing money from bank.

ALGORITHUM NO1

Going to work

START

STEP1: Get up early in the morning taking bath and get ready.

STEP2: Eating breakfast and take tea.

STEP3: Taking the documents of the office

STEP4: Reached to office and going to cabin and then start working

END

ALGORITHUM NO2

FISHING IN A POND

START

STEP1: Taking all the equipment of fishing in the van.

STEP2: Reached to the pond and unload the all equipment of fishing.

STEP3: Through the hook in the water for fishing.

STEP4: After 30 min I catch many fishes and returned back to home

END

ALGORITHUMNO3

WITHDRAWING MONEY FROM BANK

START

STEP1: First of all I take my check book in the bank and also fill my check.

STEP2: Then give check to cashier.

STEP3: He verify my check.

STEP4: He gave me my money and I come back to home

END

Q4: Explain why each of these problem are algorithmic in nature?


ANS: It is solved by statistics and methods in different steps in different part of world and not any same
time without any statistics steps and parts therefore this is called algorithmic.

Q5: What is heuristics solution to a problem?

ANS:
Question no 5

What is heuristic solution to a problem

Answer

Heuristic are a problem solving method that is uses shortcuts to produce good solution given a limited
time frame or deadline. Heuristic are the flexible technique for quick decision, when working with
complex data. Decisions made using heuristic approach may not necessarily b4e optimal

Question no 6

Name three current problems in your life that might be solved through heuristic

Answer

Three problems in life which are solved by heuristic are

1: Medical case

2: Actuarial problem 3:

scientific problem

Question no 7

Why each of these problems is heuristic in nature

Answer

Heuristics is originally a Greek word that means to find. Heuristics are unconscious ways that we process
information more quickly than if we were to think about it consciously. The brain takes mental shortcuts
to save time by thinking logically about things. There are many different ways (cognitive biases) that our
brains have developed during the history of mankind to manage information in a faster way than
rational thinking. The vast majority of our daily decisions are taken up by heuristic decision making.

Question no 8

Name three problems that might arise at home ,at school or in a business that could be solved more
efficiently with computer assistance . Do these problems required an Algorithmic or heuristic solution
why ? Answer
Three problems that might arise at home, at school, or in a business to be solved efficiently with
computer assistance
The following three solutions can only be solved by computer assistance or may be solved
quickly with computer assistance:
1. Complex calculations at home

2. Visualizing an isometric projection at school

3. Communication between two or more branches of a business organization

This problem requires an algorithmic solution as this problem does not require any trial and error or any
analysis.
Question no 9
Algorithm
Make a cup of cocoa

START

Step 1: Take a pan , milk, chocolate , spoon, microwave and cup

Step2: pour milk into the cup

Step 3: Add the chocolate into the milk

Step 4: Stir it with a spoon

Step 5:Put it in the microwave for a minute

Step 6: Take it out of the microwave and enjoy your cup of hot chocolate

END

Sharpen a pencil

START

Step 1: Take a pencil and sharpener

Step 2: Put pencil into sharpener

Step 3: Turn the pencil clock wise

Step 4 Remove sharped pencil from sharpener

END

Walk from the classroom to the cafeteria

START

Step 1: First of all put all the notes in bag


Step 2: Stand up from the chair and put the bag on shoulder

Step 3: Walk out from the classroom and reached at cafeteria

END
Get a glass of water from your kitchen

START

Step 1: stand up from the bed and go to the kitchen

Step 2: Take a glass from stand

Step 3: Open refrigerator take bottle of water

Step 4: put water into the Glass

END.

Start a car ( include directions regarding what to do if car doesn’t start )

Step 1: Open the door of car

Step 2: Insert the key into ignition and turn key clock wise

Step 3: If the car doesn’t start there is a problem in car

Step 4: Find the problem and fix it

Step 5: After fixing the problem again insert key into the ignition and turn it clock wise

Step 6: Now the car starts by using key

END.

You might also like